From 67928ce35258a32d379e66fb1061ec4d398a7d4d Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Mon, 17 Feb 2025 12:23:08 +0800 Subject: [PATCH 1/4] Merge remote-tracking branch 'origin/main' into kitchen-sink-cleanup From 2b2b90df988aa3387bd700d7536fc4b1c7717f9c Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Mon, 17 Feb 2025 13:03:38 +0800 Subject: [PATCH 2/4] Add lite mode --- packages/scan/src/core/index.ts | 9 +- packages/scan/src/core/utils.ts | 54 -- packages/scan/src/core/worker/deferred.ts | 22 - .../scan/src/core/worker/smol-extension.ts | 24 - packages/scan/src/core/worker/smol.ts | 102 --- packages/scan/src/lite.ts | 1 + .../components/copy-to-clipboard/index.tsx | 4 +- .../scan/src/web/components/icon/index.tsx | 71 +- .../web/components/sticky-section/index.tsx | 152 ++-- packages/scan/src/web/overlay.ts | 88 --- packages/scan/src/web/state.ts | 14 +- packages/scan/src/web/utils/helpers.ts | 3 +- packages/scan/src/web/utils/outline-worker.ts | 132 ---- packages/scan/src/web/utils/outline.ts | 683 +----------------- .../views/inspector/components-tree/state.ts | 4 +- .../scan/src/web/views/inspector/index.tsx | 2 +- .../src/web/views/inspector/overlay/index.tsx | 4 +- .../scan/src/web/views/inspector/states.ts | 5 +- .../web/views/inspector/timeline/index.tsx | 64 +- .../src/web/views/inspector/what-changed.tsx | 8 +- packages/scan/src/web/views/toolbar/index.tsx | 2 +- packages/scan/tsup.config.ts | 52 +- 22 files changed, 224 insertions(+), 1276 deletions(-) delete mode 100644 packages/scan/src/core/worker/deferred.ts delete mode 100644 packages/scan/src/core/worker/smol-extension.ts delete mode 100644 packages/scan/src/core/worker/smol.ts create mode 100644 packages/scan/src/lite.ts delete mode 100644 packages/scan/src/web/overlay.ts delete mode 100644 packages/scan/src/web/utils/outline-worker.ts diff --git a/packages/scan/src/core/index.ts b/packages/scan/src/core/index.ts index 29ae657f..359727fe 100644 --- a/packages/scan/src/core/index.ts +++ b/packages/scan/src/core/index.ts @@ -9,7 +9,6 @@ import { import type { ComponentType } from 'preact'; import type { ReactNode } from 'preact/compat'; import type { RenderData } from 'src/core/utils'; -// import { initReactScanOverlay } from '~web/overlay'; import { initReactScanInstrumentation } from 'src/new-outlines'; import styles from '~web/assets/css/styles.css'; import { ICONS } from '~web/assets/svgs/svgs'; @@ -496,9 +495,11 @@ export const start = () => { const options = getOptions(); - initReactScanInstrumentation(() => - idempotent_createToolbar(!!options.value.showToolbar), - ); + initReactScanInstrumentation(() => { + if (process.env.BUNDLE_MODE === 'full') { + idempotent_createToolbar(!!options.value.showToolbar); + } + }); const isUsedInBrowserExtension = typeof window !== 'undefined'; if (!Store.monitor.value && !isUsedInBrowserExtension) { diff --git a/packages/scan/src/core/utils.ts b/packages/scan/src/core/utils.ts index 80a37900..34b3d2a4 100644 --- a/packages/scan/src/core/utils.ts +++ b/packages/scan/src/core/utils.ts @@ -5,60 +5,6 @@ import { ReactScanInternals } from '~core/index'; import type { AggregatedRender } from '~web/utils/outline'; import type { AggregatedChange, Render } from './instrumentation'; -export const aggregateChanges = ( - changes: Array, - prevAggregatedChange?: AggregatedChange, -) => { - const newChange = { - type: prevAggregatedChange?.type ?? 0, - unstable: prevAggregatedChange?.unstable ?? false, - }; - for (const change of changes) { - newChange.type |= change.type; - newChange.unstable = newChange.unstable || (change.unstable ?? false); - } - - return newChange; -}; - -export const joinAggregations = ({ - from, - to, -}: { - from: AggregatedRender; - to: AggregatedRender; -}) => { - to.changes.type |= from.changes.type; - to.changes.unstable = to.changes.unstable || from.changes.unstable; - to.aggregatedCount += 1; - to.didCommit = to.didCommit || from.didCommit; - to.forget = to.forget || from.forget; - to.fps = to.fps + from.fps; - to.phase |= from.phase; - to.time = (to.time ?? 0) + (from.time ?? 0); - - to.unnecessary = to.unnecessary || from.unnecessary; -}; - -export const aggregateRender = ( - newRender: Render, - prevAggregated: AggregatedRender, -) => { - prevAggregated.changes = aggregateChanges( - newRender.changes, - prevAggregated.changes, - ); - prevAggregated.aggregatedCount += 1; - prevAggregated.didCommit = prevAggregated.didCommit || newRender.didCommit; - prevAggregated.forget = prevAggregated.forget || newRender.forget; - prevAggregated.fps = prevAggregated.fps + newRender.fps; - prevAggregated.phase |= newRender.phase; - prevAggregated.time = (prevAggregated.time ?? 0) + (newRender.time ?? 0); - - prevAggregated.unnecessary = - prevAggregated.unnecessary || newRender.unnecessary; -}; - function descending(a: number, b: number): number { return b - a; } diff --git a/packages/scan/src/core/worker/deferred.ts b/packages/scan/src/core/worker/deferred.ts deleted file mode 100644 index 94b9c289..00000000 --- a/packages/scan/src/core/worker/deferred.ts +++ /dev/null @@ -1,22 +0,0 @@ -export interface Deferred { - promise: Promise; - resolve: (value: unknown) => void; - reject: (value: unknown) => void; -} - -export function createDeferred(): Deferred { - let resolve: Deferred["resolve"]; - let reject: Deferred["reject"]; - return { - promise: new Promise((res, rej) => { - resolve = res; - reject = rej; - }), - resolve(value): void { - resolve(value); - }, - reject(value): void { - reject(value); - }, - }; -} diff --git a/packages/scan/src/core/worker/smol-extension.ts b/packages/scan/src/core/worker/smol-extension.ts deleted file mode 100644 index fb215491..00000000 --- a/packages/scan/src/core/worker/smol-extension.ts +++ /dev/null @@ -1,24 +0,0 @@ -export type SmolWorkerCallback = () => (arg: T) => Promise; - -export class SmolWorkerExtension { - private setup?: (arg: T) => Promise; - public sync = true; - - constructor(private callback: SmolWorkerCallback) {} - - async call( - data: T, - _options?: { - transfer?: Array; - }, - ): Promise { - if (!this.setup) { - this.setup = this.callback(); - } - return this.setup(data); - } - - destroy(): void { - // No cleanup needed for extension version - } -} diff --git a/packages/scan/src/core/worker/smol.ts b/packages/scan/src/core/worker/smol.ts deleted file mode 100644 index aad0f3f1..00000000 --- a/packages/scan/src/core/worker/smol.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { createDeferred, type Deferred } from './deferred'; - -export type SmolWorkerCallback = () => (arg: T) => Promise; - -function setupWorker(setup: () => (arg: T) => R) { - const callback = setup(); - - function success(id: number, data: unknown) { - self.postMessage([id, true, data]); - } - - function failure(id: number, data: unknown) { - self.postMessage([id, false, data]); - } - - self.addEventListener('message', (event) => { - const [id, data] = event.data; - try { - Promise.resolve(callback(data)).then( - (res) => success(id, res), - (res) => failure(id, res), - ); - } catch (error) { - failure(id, error); - } - }); -} - -function createWorker(callback: SmolWorkerCallback): Worker { - const template = `(${setupWorker.toString()})(${callback.toString()})`; - - const url = URL.createObjectURL(new Blob([template])); - - const worker = new Worker(url); - - return worker; -} - -type SmolWorkerEventType = [id: number, flag: boolean, data: unknown]; - -export class SmolWorker { - private worker?: Worker; - - private deferredMap = new Map(); - - private count = 0; - - private setup?: (arg: T) => Promise; - - public sync = false; - - constructor(private callback: SmolWorkerCallback) {} - - setupWorker(worker: Worker): void { - worker.addEventListener( - 'message', - (event: MessageEvent) => { - const [id, flag, data] = event.data; - - const deferred = this.deferredMap.get(id); - if (deferred) { - if (flag) { - deferred.resolve(data); - } else { - deferred.reject(data); - } - this.deferredMap.delete(id); - } - }, - ); - } - - async call( - data: T, - options?: { - transfer?: Array; - }, - ): Promise { - if (this.sync) { - if (!this.setup) { - this.setup = this.callback(); - } - return this.setup(data); - } - if (!this.worker) { - this.worker = createWorker(this.callback); - this.setupWorker(this.worker); - } - const deferred = createDeferred(); - const id = this.count++; - this.deferredMap.set(id, deferred); - this.worker.postMessage([id, data], { - transfer: options?.transfer, - }); - return deferred.promise as Promise; - } - - destroy(): void { - this.deferredMap.clear(); - this.worker?.terminate(); - } -} diff --git a/packages/scan/src/lite.ts b/packages/scan/src/lite.ts new file mode 100644 index 00000000..ea465c2a --- /dev/null +++ b/packages/scan/src/lite.ts @@ -0,0 +1 @@ +export * from './index'; diff --git a/packages/scan/src/web/components/copy-to-clipboard/index.tsx b/packages/scan/src/web/components/copy-to-clipboard/index.tsx index a07908a6..97bd5275 100644 --- a/packages/scan/src/web/components/copy-to-clipboard/index.tsx +++ b/packages/scan/src/web/components/copy-to-clipboard/index.tsx @@ -1,5 +1,5 @@ import { memo } from 'preact/compat'; -import { useCallback, useEffect, useRef, useState } from 'preact/hooks'; +import { useCallback, useEffect, useState } from 'preact/hooks'; import { cn } from '~web/utils/helpers'; import { Icon } from '../icon'; @@ -14,7 +14,7 @@ interface CopyToClipboardProps { iconSize?: number; } -export const CopyToClipboard = memo( +export const CopyToClipboard = /* @__PURE__ */ memo( ({ text, children, diff --git a/packages/scan/src/web/components/icon/index.tsx b/packages/scan/src/web/components/icon/index.tsx index 39e1cc8c..76c18389 100644 --- a/packages/scan/src/web/components/icon/index.tsx +++ b/packages/scan/src/web/components/icon/index.tsx @@ -11,38 +11,43 @@ export interface SVGIconProps { style?: JSX.CSSProperties; } -export const Icon = forwardRef(({ - size = 15, - name, - fill = 'currentColor', - stroke = 'currentColor', - className, - externalURL = '', - style, -}: SVGIconProps, ref: ForwardedRef) => { - const width = Array.isArray(size) ? size[0] : size; - const height = Array.isArray(size) ? size[1] || size[0] : size; +export const Icon = /* @__PURE__ */ forwardRef( + ( + { + size = 15, + name, + fill = 'currentColor', + stroke = 'currentColor', + className, + externalURL = '', + style, + }: SVGIconProps, + ref: ForwardedRef, + ) => { + const width = Array.isArray(size) ? size[0] : size; + const height = Array.isArray(size) ? size[1] || size[0] : size; - const path = `${externalURL}#${name}`; + const path = `${externalURL}#${name}`; - return ( - - {name} - - - ); -}); + return ( + + {name} + + + ); + }, +); diff --git a/packages/scan/src/web/components/sticky-section/index.tsx b/packages/scan/src/web/components/sticky-section/index.tsx index a3223f49..bffb867e 100644 --- a/packages/scan/src/web/components/sticky-section/index.tsx +++ b/packages/scan/src/web/components/sticky-section/index.tsx @@ -12,91 +12,93 @@ interface StickyProps { children: (props: StickyRenderProps) => preact.JSX.Element; } -export const StickySection = memo(({ children }: StickyProps) => { - const refScrollableElement = useRef(null); - const refScrollAtTop = useRef(false); - const [isSticky, setIsSticky] = useState(false); - const refRafId = useRef(0); - - const calculateStickyTop = useCallback((removeSticky = false) => { - const stickyElements = Array.from( - refScrollableElement.current?.children || [], - ) as HTMLElement[]; - if (!stickyElements.length) return; - - let cumulativeHeight = 0; - - for (const element of stickyElements) { - const sticky = element as HTMLElement; - if (sticky.dataset.sticky) { - if (removeSticky) { - sticky.style.removeProperty('top'); - } else { - sticky.style.setProperty('top', `${cumulativeHeight}px`); +export const StickySection = /* @__PURE__ */ memo( + ({ children }: StickyProps) => { + const refScrollableElement = useRef(null); + const refScrollAtTop = useRef(false); + const [isSticky, setIsSticky] = useState(false); + const refRafId = useRef(0); + + const calculateStickyTop = useCallback((removeSticky = false) => { + const stickyElements = Array.from( + refScrollableElement.current?.children || [], + ) as HTMLElement[]; + if (!stickyElements.length) return; + + let cumulativeHeight = 0; + + for (const element of stickyElements) { + const sticky = element as HTMLElement; + if (sticky.dataset.sticky) { + if (removeSticky) { + sticky.style.removeProperty('top'); + } else { + sticky.style.setProperty('top', `${cumulativeHeight}px`); + } + cumulativeHeight += sticky.offsetHeight; } - cumulativeHeight += sticky.offsetHeight; - } - } - }, []); - - const refSticky = useCallback( - (node: HTMLElement | null) => { - if (!node) { - requestAnimationFrame(() => { - calculateStickyTop(); - }); - return; } + }, []); - refScrollableElement.current = node.parentElement; - node.dataset.sticky = 'true'; - - const handleClick = () => { - if (!node.dataset.disableScroll) { - refScrollableElement.current?.scrollTo({ - top: Number(node.style.top) ?? 0, - behavior: 'smooth', + const refSticky = useCallback( + (node: HTMLElement | null) => { + if (!node) { + requestAnimationFrame(() => { + calculateStickyTop(); }); + return; } - }; - node.onclick = handleClick; - calculateStickyTop(); + refScrollableElement.current = node.parentElement; + node.dataset.sticky = 'true'; + + const handleClick = () => { + if (!node.dataset.disableScroll) { + refScrollableElement.current?.scrollTo({ + top: Number(node.style.top) ?? 0, + behavior: 'smooth', + }); + } + }; - const handleScroll = () => { - cancelAnimationFrame(refRafId.current); - refRafId.current = requestAnimationFrame(() => { - if (!node || !refScrollableElement.current) return; + node.onclick = handleClick; + calculateStickyTop(); - const refRect = node.getBoundingClientRect(); - const containerRect = - refScrollableElement.current.getBoundingClientRect(); + const handleScroll = () => { + cancelAnimationFrame(refRafId.current); + refRafId.current = requestAnimationFrame(() => { + if (!node || !refScrollableElement.current) return; - const stickyOffset = Number.parseInt(getComputedStyle(node).top); - refScrollAtTop.current = refScrollableElement.current.scrollTop > 0; + const refRect = node.getBoundingClientRect(); + const containerRect = + refScrollableElement.current.getBoundingClientRect(); - const stickyActive = - refScrollAtTop.current && - refRect.top <= containerRect.top + stickyOffset; + const stickyOffset = Number.parseInt(getComputedStyle(node).top); + refScrollAtTop.current = refScrollableElement.current.scrollTop > 0; - if (stickyActive !== isSticky) { - setIsSticky(stickyActive); - } + const stickyActive = + refScrollAtTop.current && + refRect.top <= containerRect.top + stickyOffset; + + if (stickyActive !== isSticky) { + setIsSticky(stickyActive); + } + + calculateStickyTop(); + }); + }; - calculateStickyTop(); + refScrollableElement.current?.addEventListener('scroll', handleScroll, { + passive: true, }); - }; - - refScrollableElement.current?.addEventListener('scroll', handleScroll, { - passive: true, - }); - }, - [isSticky, calculateStickyTop], - ); - - return children({ - refSticky, - isSticky, - calculateStickyTop, - }); -}); + }, + [isSticky, calculateStickyTop], + ); + + return children({ + refSticky, + isSticky, + calculateStickyTop, + }); + }, +); diff --git a/packages/scan/src/web/overlay.ts b/packages/scan/src/web/overlay.ts deleted file mode 100644 index 5f6ae246..00000000 --- a/packages/scan/src/web/overlay.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { recalcOutlines } from './utils/outline'; -import { outlineWorker } from './utils/outline-worker'; - -export const initReactScanOverlay = () => { - const container = document.getElementById('react-scan-root'); - const shadow = container?.shadowRoot; - - if (!shadow) { - return null; - } - - const overlayElement = document.createElement('canvas'); - overlayElement.id = 'react-scan-overlay'; - - overlayElement.style.position = 'fixed'; - overlayElement.style.top = '0'; - overlayElement.style.left = '0'; - overlayElement.style.width = '100vw'; - overlayElement.style.height = '100vh'; - overlayElement.style.pointerEvents = 'none'; - overlayElement.style.zIndex = '2147483646'; - overlayElement.setAttribute('aria-hidden', 'true'); - - shadow.appendChild(overlayElement); - - const dpi = window.devicePixelRatio || 1; - overlayElement.width = dpi * window.innerWidth; - overlayElement.height = dpi * window.innerHeight; - - let resizeScheduled = false; - - const updateCanvasSize = () => { - const dpi = window.devicePixelRatio || 1; - - outlineWorker - .call({ - type: 'resize', - payload: { - width: dpi * window.innerWidth, - height: dpi * window.innerHeight, - dpi, - }, - }) - .then( - () => { - resizeScheduled = false; - }, - () => { - resizeScheduled = false; - }, - ); - }; - - window.addEventListener('resize', () => { - recalcOutlines(); - - if (!resizeScheduled) { - resizeScheduled = true; - updateCanvasSize(); - } - }); - - window.addEventListener('scroll', () => { - recalcOutlines(); - }); - - outlineWorker.sync = !('OffscreenCanvas' in window); - - const offscreen = outlineWorker.sync - ? (overlayElement as unknown as OffscreenCanvas) - : overlayElement.transferControlToOffscreen(); - - outlineWorker - .call( - { - type: 'set-canvas', - payload: offscreen, - }, - { - transfer: [offscreen], - }, - ) - .catch(console.error); - - updateCanvasSize(); - - return offscreen; -}; diff --git a/packages/scan/src/web/state.ts b/packages/scan/src/web/state.ts index 72388d53..fff5816f 100644 --- a/packages/scan/src/web/state.ts +++ b/packages/scan/src/web/state.ts @@ -8,8 +8,10 @@ import { import { readLocalStorage, saveLocalStorage } from './utils/helpers'; import type { Corner, WidgetConfig, WidgetSettings } from './widget/types'; -export const signalIsSettingsOpen = signal(false); -export const signalRefWidget = signal(null); +export const signalIsSettingsOpen = /* @__PURE__ */ signal(false); +export const signalRefWidget = /* @__PURE__ */ signal( + null, +); export const defaultWidgetConfig = { corner: 'top-left' as Corner, @@ -60,7 +62,9 @@ export const getInitialWidgetConfig = (): WidgetConfig => { }; }; -export const signalWidget = signal(getInitialWidgetConfig()); +export const signalWidget = /* @__PURE__ */ signal( + getInitialWidgetConfig(), +); export const updateDimensions = (): void => { if (typeof window === 'undefined') return; @@ -85,7 +89,7 @@ export interface SlowDowns { hideNotification: boolean; } -export const signalSlowDowns = signal({ +export const signalSlowDowns = /* @__PURE__ */ signal({ slowDowns: 0, hideNotification: false, }); @@ -110,6 +114,6 @@ export type WidgetStates = view: 'summary'; // extra params }; -export const signalWidgetViews = signal({ +export const signalWidgetViews = /* @__PURE__ */ signal({ view: 'none', }); diff --git a/packages/scan/src/web/utils/helpers.ts b/packages/scan/src/web/utils/helpers.ts index d3f05f6a..05e74873 100644 --- a/packages/scan/src/web/utils/helpers.ts +++ b/packages/scan/src/web/utils/helpers.ts @@ -15,7 +15,8 @@ export const cn = (...inputs: Array): string => { }; export const isFirefox = - typeof navigator !== 'undefined' && navigator.userAgent.includes('Firefox'); + typeof navigator !== 'undefined' && + /* @__PURE__ */ navigator.userAgent.includes('Firefox'); export const onIdle = (callback: () => void) => { if ('scheduler' in globalThis) { diff --git a/packages/scan/src/web/utils/outline-worker.ts b/packages/scan/src/web/utils/outline-worker.ts deleted file mode 100644 index b876945c..00000000 --- a/packages/scan/src/web/utils/outline-worker.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { SmolWorker } from '~core/worker/smol'; -import { SmolWorkerExtension } from '~core/worker/smol-extension'; -import { readLocalStorage, removeLocalStorage } from '~web/utils/helpers'; - -export interface DrawingQueue { - rect: DOMRect; - color: { - r: number; - g: number; - b: number; - }; - alpha: number; - fillAlpha: number; -} - -export interface SerializedOutlineLabel { - alpha: number; - rect: DOMRect; - color: { r: number; g: number; b: number }; - reasons: number; - labelText: string; -} - -export type OutlineWorkerAction = - | { type: 'set-canvas'; payload: OffscreenCanvas } - | { - type: 'fade-out-outline'; - payload: { - dpi: number; - drawingQueue: Array; - mergedLabels: Array; - }; - } - | { - type: 'resize'; - payload: { - width: number; - height: number; - dpi: number; - }; - }; - -function setupOutlineWorker(): (action: OutlineWorkerAction) => Promise { - const MONO_FONT = - 'Menlo,Consolas,Monaco,Liberation Mono,Lucida Console,monospace'; - let ctx: OffscreenCanvasRenderingContext2D | undefined; - - // biome-ignore lint/suspicious/noConstEnum: TS enums are bloated - const enum Reason { - Commit = 0b001, - Unstable = 0b010, - Unnecessary = 0b100, - } - - return async (action: OutlineWorkerAction): Promise => { - switch (action.type) { - case 'set-canvas': - { - const current = action.payload.getContext('2d'); - if (current) { - ctx = current; - } - } - break; - case 'resize': - if (ctx) { - const { dpi, width, height } = action.payload; - ctx.canvas.width = width; - ctx.canvas.height = height; - ctx.resetTransform(); - ctx.scale(dpi, dpi); - } - break; - case 'fade-out-outline': - if (ctx) { - const { dpi, drawingQueue, mergedLabels } = action.payload; - ctx.clearRect(0, 0, ctx.canvas.width / dpi, ctx.canvas.height / dpi); - - ctx.save(); - - for (let i = 0, len = drawingQueue.length; i < len; i++) { - const { rect, color, alpha, fillAlpha } = drawingQueue[i]; - const rgb = `${color.r},${color.g},${color.b}`; - ctx.strokeStyle = `rgba(${rgb},${alpha})`; - ctx.lineWidth = 1; - ctx.fillStyle = `rgba(${rgb},${fillAlpha})`; - - ctx.beginPath(); - ctx.rect(rect.x, rect.y, rect.width, rect.height); - ctx.stroke(); - ctx.fill(); - } - - ctx.restore(); - - for (let i = 0, len = mergedLabels.length; i < len; i++) { - const { alpha, rect, color, reasons, labelText } = mergedLabels[i]; - const conditionalText = - reasons & Reason.Unnecessary ? `${labelText}⚠️` : labelText; - ctx.save(); - - ctx.font = `11px ${MONO_FONT}`; - const textMetrics = ctx.measureText(conditionalText); - const textWidth = textMetrics.width; - const textHeight = 11; - - const labelX: number = rect.x; - const labelY: number = rect.y - textHeight - 4; - - ctx.fillStyle = `rgba(${color.r},${color.g},${color.b},${alpha})`; - ctx.fillRect(labelX, labelY, textWidth + 4, textHeight + 4); - - ctx.fillStyle = `rgba(255,255,255,${alpha})`; - ctx.fillText(conditionalText, labelX + 2, labelY + textHeight); - } - } - break; - } - }; -} - -const createWorker = () => { - const useExtensionWorker = readLocalStorage('use-extension-worker'); - removeLocalStorage('use-extension-worker'); - - if (useExtensionWorker) { - return new SmolWorkerExtension(setupOutlineWorker); - } - return new SmolWorker(setupOutlineWorker); -}; - -export const outlineWorker = createWorker(); diff --git a/packages/scan/src/web/utils/outline.ts b/packages/scan/src/web/utils/outline.ts index b53a8525..74b13561 100644 --- a/packages/scan/src/web/utils/outline.ts +++ b/packages/scan/src/web/utils/outline.ts @@ -1,20 +1,8 @@ // THIS FILE WILL BE DELETED import type { Fiber } from 'bippy'; -import { type OutlineKey, ReactScanInternals } from '~core/index'; +import type { OutlineKey } from '~core/index'; import type { AggregatedChange } from '~core/instrumentation'; -import { getLabelText, joinAggregations } from '~core/utils'; -import { lerp } from '~web/utils/lerp'; -import { throttle } from './helpers'; -import { LRUMap } from './lru'; -import { type DrawingQueue, outlineWorker } from './outline-worker'; - -enum Reason { - Commit = 0b001, - Unstable = 0b010, - Unnecessary = 0b100, - All = 0b111, -} export interface OutlineLabel { alpha: number; @@ -25,42 +13,6 @@ export interface OutlineLabel { activeOutline: Outline; } -const DEFAULT_THROTTLE_TIME = 32; // 2 frames - -const START_COLOR = { r: 115, g: 97, b: 230 }; -const END_COLOR = { r: 185, g: 49, b: 115 }; -const MONO_FONT = - 'Menlo,Consolas,Monaco,Liberation Mono,Lucida Console,monospace'; - -export const getOutlineKey = (rect: DOMRect): string => { - return `${rect.top}-${rect.left}-${rect.width}-${rect.height}`; -}; - -function incrementFrameId() { - requestAnimationFrame(incrementFrameId); -} - -if (typeof window !== 'undefined') { - incrementFrameId(); -} - -export const recalcOutlines = throttle(async () => { - const { activeOutlines } = ReactScanInternals; - const domNodes: Array = []; - for (const activeOutline of activeOutlines.values()) { - domNodes.push(activeOutline.domNode); - } - const rectMap = await batchGetBoundingRects(domNodes); - for (const activeOutline of activeOutlines.values()) { - const rect = rectMap.get(activeOutline.domNode); - if (!rect) { - // we couldn't get a rect for the dom node, but the rect will fade out on its own when we continue - continue; - } - activeOutline.target = rect; - } -}, DEFAULT_THROTTLE_TIME); - // using intersection observer lets us get the boundingClientRect asynchronously without forcing a reflow. // The browser can internally optimize the bounding rect query, so this will be faster then meticulously // Batching getBoundingClientRect at the right time in the browser rendering pipeline. @@ -92,218 +44,6 @@ export const batchGetBoundingRects = ( }); }; -export const flushOutlines = async () => { - if ( - !( - ReactScanInternals.scheduledOutlines.size || - ReactScanInternals.activeOutlines.size - ) - ) { - return; - } - - await activateOutlines(); - - recalcOutlines(); - - ReactScanInternals.scheduledOutlines = new Map(); - // ReactScanInternals.options.value.onPaintStart?.(flattenedScheduledOutlines); - - if (!animationFrameId) { - animationFrameId = requestAnimationFrame(fadeOutOutline); - } -}; - -let animationFrameId: number | null = null; - -const shouldSkipInterpolation = (_rect: DOMRect) => { - return false; - // // animations tend to transform out of screen/ to a very tiny size, those are noisy so we don't lerp them - // if ( - // rect.top >= window.innerHeight || // completely below viewport - // rect.bottom <= 0 || // completely above viewport - // rect.left >= window.innerWidth || // completely right of viewport - // rect.right <= 0 // completely left of viewport - // ) { - // return true; - // } - - // return !ReactScanInternals.options.value.smoothlyAnimateOutlines; -}; - -const INTERPOLATION_SPEED = 0.2; - -export const fadeOutOutline = () => { - const drawingQueue: Array = []; - const pendingLabeledOutlines: Array = []; - const phases = new Set(); - const activeOutlines = ReactScanInternals.activeOutlines; - - for (const [key, activeOutline] of activeOutlines) { - // invariant: active outline has "active" info non nullable at this point of the program b/c they must be activated - const invariantActiveOutline = activeOutline as { - [K in keyof Outline]: NonNullable; - }; - let frame: number | null = null; - - for (const aggregatedRender of invariantActiveOutline.groupedAggregatedRender.values()) { - const newFrame = (aggregatedRender.frame ?? 0) + 1; - aggregatedRender.frame = newFrame; - frame = frame ? Math.max(newFrame, frame) : newFrame; - } - - if (!frame) { - // Invariant: There should always be at least one frame - // Fixme: there currently exists an edge case where an active outline has 0 group aggregated renders - activeOutlines.delete(key); - continue; // then there's nothing to draw - } - - const THRESHOLD_FPS = 60; - const avgFps = - invariantActiveOutline.aggregatedRender.fps / - invariantActiveOutline.aggregatedRender.aggregatedCount; - const averageScore = Math.max( - (THRESHOLD_FPS - Math.min(avgFps, THRESHOLD_FPS)) / THRESHOLD_FPS, - invariantActiveOutline.aggregatedRender.time ?? - 0 / invariantActiveOutline.aggregatedRender.aggregatedCount / 16, - ); - - const t = Math.min(averageScore, 1); - const r = Math.round(START_COLOR.r + t * (END_COLOR.r - START_COLOR.r)); - const g = Math.round(START_COLOR.g + t * (END_COLOR.g - START_COLOR.g)); - const b = Math.round(START_COLOR.b + t * (END_COLOR.b - START_COLOR.b)); - const color = { r, g, b }; - - let reasons = 0; - - // don't re-create to avoid gc time - phases.clear(); - - for (const render of invariantActiveOutline.groupedAggregatedRender.values()) { - if (render.unnecessary) { - reasons |= Reason.Unnecessary; - color.r = 128; - color.g = 128; - color.b = 128; - } - if (render.changes.unstable) { - reasons |= Reason.Unstable; - } - if (render.didCommit) { - reasons |= Reason.Commit; - } - - if (reasons === Reason.All) { - break; - } - } - - const alphaScalar = 0.8; - invariantActiveOutline.alpha = - alphaScalar * (1 - frame / invariantActiveOutline.totalFrames); - - const alpha = invariantActiveOutline.alpha; - const fillAlpha = alpha * 0.1; - const target = invariantActiveOutline.target; - - const shouldSkip = shouldSkipInterpolation(target); - if (shouldSkip) { - invariantActiveOutline.current = target; - for (const [, v] of invariantActiveOutline.groupedAggregatedRender) { - v.computedCurrent = target; - } - } else { - if (!invariantActiveOutline.current) { - invariantActiveOutline.current = new DOMRect( - target.x, - target.y, - target.width, - target.height, - ); - } - const current = invariantActiveOutline.current; - - const computedCurrent = new DOMRect( - lerp(current.x, target.x, INTERPOLATION_SPEED), - lerp(current.y, target.y, INTERPOLATION_SPEED), - lerp(current.width, target.width, INTERPOLATION_SPEED), - lerp(current.height, target.height, INTERPOLATION_SPEED), - ); - - invariantActiveOutline.current = computedCurrent; - - for (const [, v] of invariantActiveOutline.groupedAggregatedRender) { - v.computedCurrent = computedCurrent; - } - } - - drawingQueue.push({ - rect: invariantActiveOutline.current, - color, - alpha, - fillAlpha, - }); - - const labelText = getLabelText( - Array.from(invariantActiveOutline.groupedAggregatedRender.values()), - ); - - if ( - reasons > 0 && - labelText && - !(phases.has('mount') && phases.size === 1) - ) { - const measured = measureTextCached(labelText); - pendingLabeledOutlines.push({ - alpha, - color, - reasons, - labelText, - textWidth: measured.width, - activeOutline: invariantActiveOutline, - }); - } - - const totalFrames = invariantActiveOutline.totalFrames; - for (const [ - fiber, - aggregatedRender, - ] of invariantActiveOutline.groupedAggregatedRender) { - if ((aggregatedRender.frame ?? 0) >= totalFrames) { - invariantActiveOutline.groupedAggregatedRender.delete(fiber); - } - } - - if (invariantActiveOutline.groupedAggregatedRender.size === 0) { - activeOutlines.delete(key); - } - } - - const mergedLabels = mergeOverlappingLabels(pendingLabeledOutlines); - - outlineWorker.call({ - type: 'fade-out-outline', - payload: { - dpi: window.devicePixelRatio, - drawingQueue, - mergedLabels: mergedLabels.map((v) => ({ - alpha: v.alpha, - rect: v.rect, - color: v.color, - reasons: v.reasons, - labelText: getLabelText(v.groupedAggregatedRender) ?? 'N/A', - })), - }, - }); - - if (activeOutlines.size) { - animationFrameId = requestAnimationFrame(() => fadeOutOutline()); - } else { - animationFrameId = null; - } -}; - type ComponentName = string; export interface Outline { @@ -356,188 +96,6 @@ export interface AggregatedRender { computedCurrent: DOMRect | null; // reference to dom rect to copy over to new outline made at new position } -export const areFibersEqual = (fiberA: Fiber, fiberB: Fiber) => { - if (fiberA === fiberB) { - return true; - } - - if (fiberA.alternate === fiberB) { - return true; - } - - if (fiberA === fiberB.alternate) { - return true; - } - - if ( - fiberA.alternate && - fiberB.alternate && - fiberA.alternate === fiberB.alternate - ) { - return true; - } - return false; -}; - -export const getIsOffscreen = (rect: DOMRect) => { - const viewportWidth = window.innerWidth; - const viewportHeight = window.innerHeight; - - return ( - rect.bottom < 0 || - rect.right < 0 || - rect.top > viewportHeight || - rect.left > viewportWidth - ); -}; -const activateOutlines = async () => { - const domNodes: Array = []; - const scheduledOutlines = ReactScanInternals.scheduledOutlines; - const activeOutlines = ReactScanInternals.activeOutlines; - const activeFibers = new Map(); - - // fiber alternate merging - for (const activeOutline of ReactScanInternals.activeOutlines.values()) { - if (!activeOutline.groupedAggregatedRender) { - continue; - } - for (const [ - fiber, - aggregatedRender, - ] of activeOutline.groupedAggregatedRender) { - if (fiber.alternate && activeFibers.has(fiber.alternate)) { - // if it already exists, copy it over - const alternateAggregatedRender = activeFibers.get(fiber.alternate); - - if (alternateAggregatedRender) { - joinAggregations({ - from: alternateAggregatedRender, - to: aggregatedRender, - }); - } - // fixme: this seems to leave a label/outline alive for an extra frame in some cases - activeOutline.groupedAggregatedRender?.delete(fiber); - activeFibers.delete(fiber.alternate); - } - // match the current render to its fiber - activeFibers.set(fiber, aggregatedRender); - } - } - // handles the case where the fiber already is in a position group, and the data - // simply needs to be merged in the existing entry - for (const [fiber, outline] of scheduledOutlines) { - const existingAggregatedRender = - activeFibers.get(fiber) ?? - (fiber.alternate && activeFibers.get(fiber.alternate)); - if (existingAggregatedRender) { - joinAggregations({ - to: existingAggregatedRender, - from: outline.aggregatedRender, - }); - existingAggregatedRender.frame = 0; - } - // else, the later logic will handle adding the entry - - domNodes.push(outline.domNode); - } - - const rects = await batchGetBoundingRects(domNodes); - const totalFrames = 45; - const alpha = 0.8; - - /** - * - handles calculating + updating rects, adding new outlines to a groupedAggregatedRender, and moving fibers to new position groups if their rect moved - * - * - this logic makes sense together since we can only determine if an outline should be created OR moved after we calculate the latest - * rect for the scheduled outline since that allows us to compute the position key- first level of aggregation we do on aggregations - * (note: we aggregate on position because we will always merge outlines with the same rect. Within the position based aggregation we - * aggregate based on fiber because we want re-renders for a fibers outline to stay consistent between frames, and gives us tight - * control over animation restart/cancel + interpolation) - */ - for (const [fiber, outline] of scheduledOutlines) { - // todo: put this behind config to use intersection observer or update speed - // outlineUpdateSpeed: throttled | synchronous // "using synchronous updates will result in smoother animations, but add more overhead to react-scan" - const rect = rects.get(outline.domNode); - if (!rect) { - // intersection observer could not get a rect, so we have nothing to paint/activate - continue; - } - - if (rect.top === rect.bottom || rect.left === rect.right) { - continue; - } - - const prevAggregatedRender = - activeFibers.get(fiber) ?? - (fiber.alternate && activeFibers.get(fiber.alternate)); - - const isOffScreen = getIsOffscreen(rect); - if (isOffScreen) { - continue; - } - - const key = `${rect.x}-${rect.y}` as const; - let existingOutline = activeOutlines.get(key); - - if (!existingOutline) { - existingOutline = outline; // re-use the existing object to avoid GC time - - existingOutline.target = rect; - existingOutline.totalFrames = totalFrames; - - existingOutline.groupedAggregatedRender = new Map([ - [fiber, outline.aggregatedRender], - ]); - existingOutline.aggregatedRender.aggregatedCount = - prevAggregatedRender?.aggregatedCount ?? 1; - - existingOutline.alpha = alpha; - - existingOutline.aggregatedRender.computedKey = key; - - // handles canceling the animation of the associated render that was painted at a different location - if (prevAggregatedRender?.computedKey) { - const groupOnKey = activeOutlines.get(prevAggregatedRender.computedKey); - if (groupOnKey?.groupedAggregatedRender) { - for (const [ - prevStoredFiber, - value, - ] of groupOnKey.groupedAggregatedRender) { - if (areFibersEqual(prevStoredFiber, fiber)) { - value.frame = 45; // todo: make this max frame, not hardcoded - - // for interpolation reference equality - if (existingOutline && value.computedCurrent) { - existingOutline.current = value.computedCurrent; - } - } - } - } - } - activeOutlines.set(key, existingOutline); - } else if (!prevAggregatedRender) { - existingOutline.alpha = outline.alpha; - existingOutline.groupedAggregatedRender?.set( - fiber, - outline.aggregatedRender, - ); - } - // if there's an aggregation at the rect position AND a previously computed render - // the previous fiber joining logic handles merging render aggregations with updated data - - // FIXME(Alexis): `|| 0` just for tseslint to shutup - existingOutline.alpha = Math.max( - existingOutline.alpha || 0, - outline.alpha || 0, - ); - - existingOutline.totalFrames = Math.max( - existingOutline.totalFrames || 0, - outline.totalFrames || 0, - ); - } -}; - export interface MergedOutlineLabel { alpha: number; color: { r: number; g: number; b: number }; @@ -545,242 +103,3 @@ export interface MergedOutlineLabel { groupedAggregatedRender: Array; rect: DOMRect; } - -interface TransformedOutlineLabel { - original: OutlineLabel; - rect: DOMRect; -} - -function ascendingTransformedOutlineLabel( - a: TransformedOutlineLabel, - b: TransformedOutlineLabel, -): number { - return a.rect.x - b.rect.x; -} - -function getTransformedOutlineLabels( - labels: Array, -): Array { - const array: Array = []; - - for (let i = 0, len = labels.length, label: OutlineLabel; i < len; i++) { - label = labels[i]; - const current = label.activeOutline.current; - if (current) { - array.push({ - original: label, - rect: applyLabelTransform(current, label.textWidth), - }); - } - } - - array.sort(ascendingTransformedOutlineLabel); - - return array; -} - -function getMergedOutlineLabels( - labels: Array, -): Array { - const array: Array = []; - - for (let i = 0, len = labels.length; i < len; i++) { - array.push(toMergedLabel(labels[i])); - } - - return array; -} - -// todo: optimize me so this can run always -// note: this can be implemented in nlogn using https://en.wikipedia.org/wiki/Sweep_line_algorithm -export const mergeOverlappingLabels = ( - labels: Array, -): Array => { - if (labels.length > 1500) { - return getMergedOutlineLabels(labels); - } - - const transformed = getTransformedOutlineLabels(labels); - - const mergedLabels: Array = []; - const mergedSet = new Set(); - - for (let i = 0, len = transformed.length; i < len; i++) { - if (mergedSet.has(i)) continue; - - let currentMerged = toMergedLabel( - transformed[i].original, - transformed[i].rect, - ); - let currentRight = currentMerged.rect.x + currentMerged.rect.width; - - for (let j = i + 1; j < len; j++) { - if (mergedSet.has(j)) continue; - - if (transformed[j].rect.x > currentRight) { - break; - } - - const nextRect = transformed[j].rect; - const overlapArea = getOverlapArea(currentMerged.rect, nextRect); - if (overlapArea > 0) { - const nextLabel = toMergedLabel(transformed[j].original, nextRect); - currentMerged = mergeTwoLabels(currentMerged, nextLabel); - mergedSet.add(j); - - currentRight = currentMerged.rect.x + currentMerged.rect.width; - } - } - - mergedLabels.push(currentMerged); - } - - return mergedLabels; -}; - -function toMergedLabel( - label: OutlineLabel, - rectOverride?: DOMRect, -): MergedOutlineLabel { - const current = label.activeOutline.current; - const groupedAggregatedRender = label.activeOutline.groupedAggregatedRender; - const rect = - rectOverride ?? - (current - ? applyLabelTransform(current, label.textWidth) - : new DOMRect(0, 0, 0, 0)); - const groupedArray = groupedAggregatedRender - ? Array.from(groupedAggregatedRender.values()) - : []; - - return { - alpha: label.alpha, - color: label.color, - reasons: label.reasons, - groupedAggregatedRender: groupedArray, - rect, - }; -} - -function mergeTwoLabels( - a: MergedOutlineLabel, - b: MergedOutlineLabel, -): MergedOutlineLabel { - const mergedRect = getBoundingRect(a.rect, b.rect); - - const mergedGrouped = a.groupedAggregatedRender.concat( - b.groupedAggregatedRender, - ); - - const mergedReasons = a.reasons | b.reasons; - - return { - alpha: Math.max(a.alpha, b.alpha), - - color: pickColorClosestToStartStage(a, b), // kinda wrong, should pick color in earliest stage - reasons: mergedReasons, - groupedAggregatedRender: mergedGrouped, - rect: mergedRect, - }; -} - -function getBoundingRect(r1: DOMRect, r2: DOMRect): DOMRect { - const x1 = Math.min(r1.x, r2.x); - const y1 = Math.min(r1.y, r2.y); - const x2 = Math.max(r1.x + r1.width, r2.x + r2.width); - const y2 = Math.max(r1.y + r1.height, r2.y + r2.height); - return new DOMRect(x1, y1, x2 - x1, y2 - y1); -} - -interface Color { - r: number; - g: number; - b: number; -} - -function pickColorClosestToStartStage( - a: MergedOutlineLabel, - b: MergedOutlineLabel, -): Color { - // stupid hack to always take the gray value when the render is unnecessary (we know the gray value has equal rgb) - if (a.color.r === a.color.g && a.color.g === a.color.b) { - return a.color; - } - if (b.color.r === b.color.g && b.color.g === b.color.b) { - return b.color; - } - - return a.color.r <= b.color.r ? a.color : b.color; -} - -function getOverlapArea(rect1: DOMRect, rect2: DOMRect): number { - if (rect1.right <= rect2.left || rect2.right <= rect1.left) { - return 0; - } - - if (rect1.bottom <= rect2.top || rect2.bottom <= rect1.top) { - return 0; - } - - const xOverlap = - Math.min(rect1.right, rect2.right) - Math.max(rect1.left, rect2.left); - const yOverlap = - Math.min(rect1.bottom, rect2.bottom) - Math.max(rect1.top, rect2.top); - - return xOverlap * yOverlap; -} - -function applyLabelTransform( - rect: DOMRect, - estimatedTextWidth: number, -): DOMRect { - const textHeight = 11; - const labelX = rect.x; - const labelY = rect.y; - return new DOMRect(labelX, labelY, estimatedTextWidth + 4, textHeight + 4); -} - -const textMeasurementCache = new LRUMap(100); - -type MeasuringContext = CanvasTextDrawingStyles & CanvasText; - -let offscreenContext: MeasuringContext; - -function getMeasuringContext(): MeasuringContext { - if (!offscreenContext) { - const dpi = window.devicePixelRatio || 1; - const width = dpi * window.innerWidth; - const height = dpi * window.innerHeight; - - if ('OffscreenCanvas' in window) { - const canvas = new OffscreenCanvas(width, height); - const ctx = canvas.getContext('2d'); - if (!ctx) { - throw new Error('unreachable'); - } - offscreenContext = ctx; - } else { - const canvas = document.createElement('canvas'); - canvas.width = width; - canvas.height = height; - const ctx = canvas.getContext('2d'); - if (!ctx) { - throw new Error('unreachable'); - } - offscreenContext = ctx as MeasuringContext; - } - } - return offscreenContext; -} - -export const measureTextCached = (text: string): TextMetrics => { - const cached = textMeasurementCache.get(text); - if (cached) { - return cached; - } - const ctx = getMeasuringContext(); - ctx.font = `11px ${MONO_FONT}`; - const metrics = ctx.measureText(text); - textMeasurementCache.set(text, metrics); - return metrics; -}; diff --git a/packages/scan/src/web/views/inspector/components-tree/state.ts b/packages/scan/src/web/views/inspector/components-tree/state.ts index b4e31af4..e2d346c4 100644 --- a/packages/scan/src/web/views/inspector/components-tree/state.ts +++ b/packages/scan/src/web/views/inspector/components-tree/state.ts @@ -18,7 +18,7 @@ export interface FlattenedNode extends TreeNode { fiber: Fiber; } -export const searchState = signal<{ +export const searchState = /* @__PURE__ */ signal<{ query: string; matches: FlattenedNode[]; currentMatchIndex: number; @@ -35,4 +35,4 @@ export interface TreeItem { fiber: Fiber; } -export const signalSkipTreeUpdate = signal(false); +export const signalSkipTreeUpdate = /* @__PURE__ */ signal(false); diff --git a/packages/scan/src/web/views/inspector/index.tsx b/packages/scan/src/web/views/inspector/index.tsx index 9f63faa0..7a3c8585 100644 --- a/packages/scan/src/web/views/inspector/index.tsx +++ b/packages/scan/src/web/views/inspector/index.tsx @@ -206,7 +206,7 @@ const Inspector = constant(() => { ); }); -export const ViewInspector = constant(() => { +export const ViewInspector = /* @__PURE__ */ constant(() => { if (Store.inspectState.value.kind !== 'focused') return null; return ( diff --git a/packages/scan/src/web/views/inspector/overlay/index.tsx b/packages/scan/src/web/views/inspector/overlay/index.tsx index 4a37029b..72f253f0 100644 --- a/packages/scan/src/web/views/inspector/overlay/index.tsx +++ b/packages/scan/src/web/views/inspector/overlay/index.tsx @@ -39,7 +39,9 @@ const ANIMATION_CONFIG = { } as const; export const OVERLAY_DPR = - typeof window !== 'undefined' ? window.devicePixelRatio || 1 : 1; + /* @__PURE__ */ typeof window !== 'undefined' + ? window.devicePixelRatio || 1 + : 1; export const currentLockIconRect: LockIconRect | null = null; diff --git a/packages/scan/src/web/views/inspector/states.ts b/packages/scan/src/web/views/inspector/states.ts index 38ecda97..290cb18d 100644 --- a/packages/scan/src/web/views/inspector/states.ts +++ b/packages/scan/src/web/views/inspector/states.ts @@ -48,9 +48,10 @@ export const timelineStateDefault: TimelineState = { playbackSpeed: 1, }; -export const timelineState = signal(timelineStateDefault); +export const timelineState = + /* @__PURE__ */ signal(timelineStateDefault); -export const inspectorUpdateSignal = signal(0); +export const inspectorUpdateSignal = /* @__PURE__ */ signal(0); let pendingUpdates: Array<{ update: TimelineUpdate; fiber: Fiber | null }> = []; let batchTimeout: ReturnType | null = null; diff --git a/packages/scan/src/web/views/inspector/timeline/index.tsx b/packages/scan/src/web/views/inspector/timeline/index.tsx index f36d2d88..43852c2a 100644 --- a/packages/scan/src/web/views/inspector/timeline/index.tsx +++ b/packages/scan/src/web/views/inspector/timeline/index.tsx @@ -4,29 +4,20 @@ import { useCallback, useEffect, useMemo, useRef } from 'preact/hooks'; import { Icon } from '~web/components/icon'; import { Slider } from '~web/components/slider'; import type { useMergedRefs } from '~web/hooks/use-merged-refs'; -import { - timelineActions, - timelineState, -} from '../states'; +import { timelineActions, timelineState } from '../states'; import { calculateSliderValues } from '../utils'; interface TimelineProps { refSticky?: - | ReturnType> - | ((node: HTMLElement | null) => void); + | ReturnType> + | ((node: HTMLElement | null) => void); } -export const Timeline = memo(({ - refSticky, -}: TimelineProps) => { +export const Timeline = /* @__PURE__ */ memo(({ refSticky }: TimelineProps) => { const refPlayInterval = useRef(null); - const { - currentIndex, - isVisible, - totalUpdates, - updates, - } = timelineState.value; + const { currentIndex, isVisible, totalUpdates, updates } = + timelineState.value; const sliderValues = useMemo(() => { return calculateSliderValues(totalUpdates, currentIndex); @@ -38,7 +29,6 @@ export const Timeline = memo(({ const newIndex = Math.min(updates.length - 1, Math.max(0, value)); - let isViewingHistory = false; if (newIndex > 0 && newIndex < updates.length - 1) { isViewingHistory = true; @@ -89,33 +79,29 @@ export const Timeline = memo(({ - { - isVisible - ? ( - <> -
- {sliderValues.leftValue} -
- -
- {sliderValues.rightValue} -
- - ) - : 'View Re-renders History' - } + {isVisible ? ( + <> +
{sliderValues.leftValue}
+ +
{sliderValues.rightValue}
+ + ) : ( + 'View Re-renders History' + )} ); }); diff --git a/packages/scan/src/web/views/inspector/what-changed.tsx b/packages/scan/src/web/views/inspector/what-changed.tsx index 48197b74..6afeaaa9 100644 --- a/packages/scan/src/web/views/inspector/what-changed.tsx +++ b/packages/scan/src/web/views/inspector/what-changed.tsx @@ -68,7 +68,7 @@ interface WhatChangedProps { shouldShowChanges: boolean; } -export const WhatChangedSection = memo(() => { +export const WhatChangedSection = /* @__PURE__ */ memo(() => { const showTimeline = useSignal(false); const shouldShowChanges = useSignal(true); @@ -114,7 +114,7 @@ export const WhatChangedSection = memo(() => { ); }); -export const WhatChanged = memo( +export const WhatChanged = /* @__PURE__ */ memo( ({ isSticky, refSticky, @@ -195,7 +195,7 @@ const renderStateName = (key: string, componentName: string) => { ); }; -const WhatsChangedHeader = memo<{ +const WhatsChangedHeader = /* @__PURE__ */ memo<{ refSticky?: | ReturnType> | ((node: HTMLElement | null) => void); @@ -374,7 +374,7 @@ interface SectionProps { isExpanded: boolean; } -const Section = memo(({ title, isExpanded }: SectionProps) => { +const Section = /* @__PURE__ */ memo(({ title, isExpanded }: SectionProps) => { const refFiberInfo = useRef(null); const refLastUpdated = useRef(new Set()); const refChangesValues = useRef(new Map()); diff --git a/packages/scan/src/web/views/toolbar/index.tsx b/packages/scan/src/web/views/toolbar/index.tsx index e47c94d1..c4811533 100644 --- a/packages/scan/src/web/views/toolbar/index.tsx +++ b/packages/scan/src/web/views/toolbar/index.tsx @@ -12,7 +12,7 @@ import { cn, readLocalStorage, saveLocalStorage } from '~web/utils/helpers'; import { constant } from '~web/utils/preact/constant'; import FpsMeter from '~web/widget/fps-meter'; -export const Toolbar = constant(() => { +export const Toolbar = /* @__PURE__ */ constant(() => { // const refSettingsButton = useRef(null); // const [isPinned, setIsPinned] = useState(false); // const [metadata, setMetadata] = useState(null); diff --git a/packages/scan/tsup.config.ts b/packages/scan/tsup.config.ts index d13b7eb4..c3bbb827 100644 --- a/packages/scan/tsup.config.ts +++ b/packages/scan/tsup.config.ts @@ -1,8 +1,8 @@ +import { TsconfigPathsPlugin } from '@esbuild-plugins/tsconfig-paths'; +import { init, parse } from 'es-module-lexer'; import * as fs from 'node:fs'; import fsPromise from 'node:fs/promises'; import path from 'node:path'; -import { TsconfigPathsPlugin } from '@esbuild-plugins/tsconfig-paths'; -import { init, parse } from 'es-module-lexer'; import { defineConfig } from 'tsup'; import { workerPlugin } from './worker-plugin'; @@ -113,6 +113,53 @@ export default defineConfig([ '.worker.js': 'text', }, }, + { + entry: ['./src/lite.ts'], + banner: { + js: banner, + }, + outDir: DIST_PATH, + splitting: false, + clean: false, + sourcemap: false, + format: ['cjs', 'esm'], + target: 'esnext', + platform: 'browser', + treeshake: true, + dts: true, + minify: false, + watch: process.env.NODE_ENV === 'development', + env: { + NODE_ENV: process.env.NODE_ENV ?? 'development', + BUNDLE_MODE: 'lite', + NPM_PACKAGE_VERSION: JSON.parse( + fs.readFileSync( + path.join(__dirname, '../scan', 'package.json'), + 'utf8', + ), + ).version, + }, + external: [ + 'react', + 'react-dom', + 'next', + 'next/navigation', + 'react-router', + 'react-router-dom', + '@remix-run/react', + 'preact', + '@preact/signals', + ], + loader: { + '.css': 'text', + }, + esbuildPlugins: [ + workerPlugin, + TsconfigPathsPlugin({ + tsconfig: path.resolve(__dirname, './tsconfig.json'), + }), + ], + }, { entry: [ './src/index.ts', @@ -148,6 +195,7 @@ export default defineConfig([ }, minify: false, env: { + BUNDLE_MODE: 'full', NODE_ENV: process.env.NODE_ENV ?? 'development', NPM_PACKAGE_VERSION: JSON.parse( fs.readFileSync( From 67074f2901b6e8e9d771085f40d6566ac520f492 Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Mon, 17 Feb 2025 13:06:55 +0800 Subject: [PATCH 3/4] Update package.json --- packages/scan/package.json | 83 +++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/packages/scan/package.json b/packages/scan/package.json index 0388a8b1..a1089b00 100644 --- a/packages/scan/package.json +++ b/packages/scan/package.json @@ -2,13 +2,7 @@ "name": "react-scan", "version": "0.1.3", "description": "Scan your React app for renders", - "keywords": [ - "react", - "react-scan", - "react scan", - "render", - "performance" - ], + "keywords": ["react", "react-scan", "react scan", "render", "performance"], "homepage": "https://react-scan.million.dev", "bugs": { "url": "/~https://github.com/aidenybai/react-scan/issues" @@ -96,6 +90,44 @@ "import": "./dist/install-hook.mjs", "require": "./dist/install-hook.js" }, + "./lite": { + "production": { + "import": { + "types": "./dist/rsc-shim.d.mts", + "react-server": "./dist/rsc-shim.mjs", + "default": "./dist/rsc-shim.mjs" + }, + "require": { + "types": "./dist/rsc-shim.d.ts", + "react-server": "./dist/rsc-shim.js", + "default": "./dist/rsc-shim.js" + } + }, + "development": { + "import": { + "types": "./dist/lite.d.mts", + "react-server": "./dist/rsc-shim.mjs", + "default": "./dist/lite.mjs" + }, + "require": { + "types": "./dist/lite.d.ts", + "react-server": "./dist/rsc-shim.js", + "default": "./dist/lite.js" + } + }, + "default": { + "import": { + "types": "./dist/lite.d.mts", + "react-server": "./dist/rsc-shim.mjs", + "default": "./dist/lite.mjs" + }, + "require": { + "types": "./dist/lite.d.ts", + "react-server": "./dist/rsc-shim.js", + "default": "./dist/lite.js" + } + } + }, "./auto": { "production": { "import": { @@ -172,27 +204,17 @@ "types": "dist/index.d.ts", "typesVersions": { "*": { - "monitoring": [ - "./dist/core/monitor/index.d.ts" - ], - "monitoring/next": [ - "./dist/core/monitor/params/next.d.ts" - ], + "monitoring": ["./dist/core/monitor/index.d.ts"], + "monitoring/next": ["./dist/core/monitor/params/next.d.ts"], "monitoring/react-router-legacy": [ "./dist/core/monitor/params/react-router-v5.d.ts" ], "monitoring/react-router": [ "./dist/core/monitor/params/react-router-v6.d.ts" ], - "monitoring/remix": [ - "./dist/core/monitor/params/remix.d.ts" - ], - "monitoring/astro": [ - "./dist/core/monitor/params/astro/index.ts" - ], - "react-component-name/vite": [ - "./dist/react-component-name/vite.d.ts" - ], + "monitoring/remix": ["./dist/core/monitor/params/remix.d.ts"], + "monitoring/astro": ["./dist/core/monitor/params/astro/index.ts"], + "react-component-name/vite": ["./dist/react-component-name/vite.d.ts"], "react-component-name/webpack": [ "./dist/react-component-name/webpack.d.ts" ], @@ -208,23 +230,12 @@ "react-component-name/rollup": [ "./dist/react-component-name/rollup.d.ts" ], - "react-component-name/astro": [ - "./dist/react-component-name/astro.d.ts" - ], - "react-component-name/loader": [ - "./dist/react-component-name/loader.d.ts" - ] + "react-component-name/astro": ["./dist/react-component-name/astro.d.ts"], + "react-component-name/loader": ["./dist/react-component-name/loader.d.ts"] } }, "bin": "bin/cli.js", - "files": [ - "dist", - "bin", - "package.json", - "README.md", - "LICENSE", - "auto.d.ts" - ], + "files": ["dist", "bin", "package.json", "README.md", "LICENSE", "auto.d.ts"], "scripts": { "dev:kitchen": "node dist/cli.js http://localhost:5173", "build": "npm run build:css && NODE_ENV=production tsup", From 4b8843321d4655299189689ae52bfe91346c7633 Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Mon, 17 Feb 2025 13:19:06 +0800 Subject: [PATCH 4/4] fix lockfile and linking --- .npmrc | 2 + packages/kitchen-sink/pnpm-lock.yaml | 1657 ------------------------- packages/kitchen-sink/src/index.jsx | 2 +- packages/kitchen-sink/vite.config.mjs | 14 +- pnpm-lock.yaml | 122 +- 5 files changed, 35 insertions(+), 1762 deletions(-) create mode 100644 .npmrc delete mode 100644 packages/kitchen-sink/pnpm-lock.yaml diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..54036c8e --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +prefer-workspace-packages=true +link-workspace-packages=true \ No newline at end of file diff --git a/packages/kitchen-sink/pnpm-lock.yaml b/packages/kitchen-sink/pnpm-lock.yaml deleted file mode 100644 index 079f5a77..00000000 --- a/packages/kitchen-sink/pnpm-lock.yaml +++ /dev/null @@ -1,1657 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - .: - dependencies: - '@vercel/analytics': - specifier: ^1.4.0 - version: 1.4.0(react@19.0.0-rc.1) - babel-plugin-react-compiler: - specifier: 19.0.0-beta-a7bf2bd-20241110 - version: 19.0.0-beta-a7bf2bd-20241110 - react: - specifier: 19.0.0-rc.1 - version: 19.0.0-rc.1 - react-dom: - specifier: 19.0.0-rc.1 - version: 19.0.0-rc.1(react@19.0.0-rc.1) - react-scan: - specifier: ^0.0.3 - version: 0.0.3 - vite-plugin-inspect: - specifier: ^0.8.7 - version: 0.8.7(rollup@4.21.2)(vite@5.4.3) - devDependencies: - '@vitejs/plugin-react': - specifier: ^4.3.1 - version: 4.3.1(vite@5.4.3) - vite: - specifier: ^5.4.3 - version: 5.4.3 - -packages: - '@ampproject/remapping@2.3.0': - resolution: - { - integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==, - } - engines: { node: '>=6.0.0' } - - '@antfu/utils@0.7.10': - resolution: - { - integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==, - } - - '@babel/code-frame@7.24.7': - resolution: - { - integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==, - } - engines: { node: '>=6.9.0' } - - '@babel/compat-data@7.25.4': - resolution: - { - integrity: sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==, - } - engines: { node: '>=6.9.0' } - - '@babel/core@7.25.2': - resolution: - { - integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==, - } - engines: { node: '>=6.9.0' } - - '@babel/generator@7.25.6': - resolution: - { - integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==, - } - engines: { node: '>=6.9.0' } - - '@babel/helper-compilation-targets@7.25.2': - resolution: - { - integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==, - } - engines: { node: '>=6.9.0' } - - '@babel/helper-module-imports@7.24.7': - resolution: - { - integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==, - } - engines: { node: '>=6.9.0' } - - '@babel/helper-module-transforms@7.25.2': - resolution: - { - integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==, - } - engines: { node: '>=6.9.0' } - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/helper-plugin-utils@7.24.8': - resolution: - { - integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==, - } - engines: { node: '>=6.9.0' } - - '@babel/helper-simple-access@7.24.7': - resolution: - { - integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==, - } - engines: { node: '>=6.9.0' } - - '@babel/helper-string-parser@7.24.8': - resolution: - { - integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==, - } - engines: { node: '>=6.9.0' } - - '@babel/helper-validator-identifier@7.24.7': - resolution: - { - integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==, - } - engines: { node: '>=6.9.0' } - - '@babel/helper-validator-option@7.24.8': - resolution: - { - integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==, - } - engines: { node: '>=6.9.0' } - - '@babel/helpers@7.25.6': - resolution: - { - integrity: sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==, - } - engines: { node: '>=6.9.0' } - - '@babel/highlight@7.24.7': - resolution: - { - integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==, - } - engines: { node: '>=6.9.0' } - - '@babel/parser@7.25.6': - resolution: - { - integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==, - } - engines: { node: '>=6.0.0' } - hasBin: true - - '@babel/plugin-transform-react-jsx-self@7.24.7': - resolution: - { - integrity: sha512-fOPQYbGSgH0HUp4UJO4sMBFjY6DuWq+2i8rixyUMb3CdGixs/gccURvYOAhajBdKDoGajFr3mUq5rH3phtkGzw==, - } - engines: { node: '>=6.9.0' } - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-react-jsx-source@7.24.7': - resolution: - { - integrity: sha512-J2z+MWzZHVOemyLweMqngXrgGC42jQ//R0KdxqkIz/OrbVIIlhFI3WigZ5fO+nwFvBlncr4MGapd8vTyc7RPNQ==, - } - engines: { node: '>=6.9.0' } - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/template@7.25.0': - resolution: - { - integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==, - } - engines: { node: '>=6.9.0' } - - '@babel/traverse@7.25.6': - resolution: - { - integrity: sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==, - } - engines: { node: '>=6.9.0' } - - '@babel/types@7.25.6': - resolution: - { - integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==, - } - engines: { node: '>=6.9.0' } - - '@esbuild/aix-ppc64@0.21.5': - resolution: - { - integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==, - } - engines: { node: '>=12' } - cpu: [ppc64] - os: [aix] - - '@esbuild/android-arm64@0.21.5': - resolution: - { - integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==, - } - engines: { node: '>=12' } - cpu: [arm64] - os: [android] - - '@esbuild/android-arm@0.21.5': - resolution: - { - integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==, - } - engines: { node: '>=12' } - cpu: [arm] - os: [android] - - '@esbuild/android-x64@0.21.5': - resolution: - { - integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==, - } - engines: { node: '>=12' } - cpu: [x64] - os: [android] - - '@esbuild/darwin-arm64@0.21.5': - resolution: - { - integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==, - } - engines: { node: '>=12' } - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-x64@0.21.5': - resolution: - { - integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==, - } - engines: { node: '>=12' } - cpu: [x64] - os: [darwin] - - '@esbuild/freebsd-arm64@0.21.5': - resolution: - { - integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==, - } - engines: { node: '>=12' } - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.21.5': - resolution: - { - integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==, - } - engines: { node: '>=12' } - cpu: [x64] - os: [freebsd] - - '@esbuild/linux-arm64@0.21.5': - resolution: - { - integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==, - } - engines: { node: '>=12' } - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm@0.21.5': - resolution: - { - integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==, - } - engines: { node: '>=12' } - cpu: [arm] - os: [linux] - - '@esbuild/linux-ia32@0.21.5': - resolution: - { - integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==, - } - engines: { node: '>=12' } - cpu: [ia32] - os: [linux] - - '@esbuild/linux-loong64@0.21.5': - resolution: - { - integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==, - } - engines: { node: '>=12' } - cpu: [loong64] - os: [linux] - - '@esbuild/linux-mips64el@0.21.5': - resolution: - { - integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==, - } - engines: { node: '>=12' } - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-ppc64@0.21.5': - resolution: - { - integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==, - } - engines: { node: '>=12' } - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-riscv64@0.21.5': - resolution: - { - integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==, - } - engines: { node: '>=12' } - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-s390x@0.21.5': - resolution: - { - integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==, - } - engines: { node: '>=12' } - cpu: [s390x] - os: [linux] - - '@esbuild/linux-x64@0.21.5': - resolution: - { - integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==, - } - engines: { node: '>=12' } - cpu: [x64] - os: [linux] - - '@esbuild/netbsd-x64@0.21.5': - resolution: - { - integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==, - } - engines: { node: '>=12' } - cpu: [x64] - os: [netbsd] - - '@esbuild/openbsd-x64@0.21.5': - resolution: - { - integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==, - } - engines: { node: '>=12' } - cpu: [x64] - os: [openbsd] - - '@esbuild/sunos-x64@0.21.5': - resolution: - { - integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==, - } - engines: { node: '>=12' } - cpu: [x64] - os: [sunos] - - '@esbuild/win32-arm64@0.21.5': - resolution: - { - integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==, - } - engines: { node: '>=12' } - cpu: [arm64] - os: [win32] - - '@esbuild/win32-ia32@0.21.5': - resolution: - { - integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==, - } - engines: { node: '>=12' } - cpu: [ia32] - os: [win32] - - '@esbuild/win32-x64@0.21.5': - resolution: - { - integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==, - } - engines: { node: '>=12' } - cpu: [x64] - os: [win32] - - '@jridgewell/gen-mapping@0.3.5': - resolution: - { - integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==, - } - engines: { node: '>=6.0.0' } - - '@jridgewell/resolve-uri@3.1.2': - resolution: - { - integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==, - } - engines: { node: '>=6.0.0' } - - '@jridgewell/set-array@1.2.1': - resolution: - { - integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==, - } - engines: { node: '>=6.0.0' } - - '@jridgewell/sourcemap-codec@1.5.0': - resolution: - { - integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==, - } - - '@jridgewell/trace-mapping@0.3.25': - resolution: - { - integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==, - } - - '@polka/url@1.0.0-next.28': - resolution: - { - integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==, - } - - '@rollup/pluginutils@5.1.3': - resolution: - { - integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==, - } - engines: { node: '>=14.0.0' } - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - - '@rollup/rollup-android-arm-eabi@4.21.2': - resolution: - { - integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==, - } - cpu: [arm] - os: [android] - - '@rollup/rollup-android-arm64@4.21.2': - resolution: - { - integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==, - } - cpu: [arm64] - os: [android] - - '@rollup/rollup-darwin-arm64@4.21.2': - resolution: - { - integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==, - } - cpu: [arm64] - os: [darwin] - - '@rollup/rollup-darwin-x64@4.21.2': - resolution: - { - integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==, - } - cpu: [x64] - os: [darwin] - - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': - resolution: - { - integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==, - } - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm-musleabihf@4.21.2': - resolution: - { - integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==, - } - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm64-gnu@4.21.2': - resolution: - { - integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==, - } - cpu: [arm64] - os: [linux] - - '@rollup/rollup-linux-arm64-musl@4.21.2': - resolution: - { - integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==, - } - cpu: [arm64] - os: [linux] - - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': - resolution: - { - integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==, - } - cpu: [ppc64] - os: [linux] - - '@rollup/rollup-linux-riscv64-gnu@4.21.2': - resolution: - { - integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==, - } - cpu: [riscv64] - os: [linux] - - '@rollup/rollup-linux-s390x-gnu@4.21.2': - resolution: - { - integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==, - } - cpu: [s390x] - os: [linux] - - '@rollup/rollup-linux-x64-gnu@4.21.2': - resolution: - { - integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==, - } - cpu: [x64] - os: [linux] - - '@rollup/rollup-linux-x64-musl@4.21.2': - resolution: - { - integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==, - } - cpu: [x64] - os: [linux] - - '@rollup/rollup-win32-arm64-msvc@4.21.2': - resolution: - { - integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==, - } - cpu: [arm64] - os: [win32] - - '@rollup/rollup-win32-ia32-msvc@4.21.2': - resolution: - { - integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==, - } - cpu: [ia32] - os: [win32] - - '@rollup/rollup-win32-x64-msvc@4.21.2': - resolution: - { - integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==, - } - cpu: [x64] - os: [win32] - - '@types/babel__core@7.20.5': - resolution: - { - integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==, - } - - '@types/babel__generator@7.6.8': - resolution: - { - integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==, - } - - '@types/babel__template@7.4.4': - resolution: - { - integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==, - } - - '@types/babel__traverse@7.20.6': - resolution: - { - integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==, - } - - '@types/estree@1.0.5': - resolution: - { - integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==, - } - - '@vercel/analytics@1.4.0': - resolution: - { - integrity: sha512-eUwWW7l8nPJb0nJmjZuYp9o7YZ9XPj67lU9mEogaPXiFxq/SFB5DMnvQVk4aKcL8kFgotiYdDZWxdiNcWo7cgg==, - } - peerDependencies: - '@remix-run/react': ^2 - '@sveltejs/kit': ^1 || ^2 - next: '>= 13' - react: ^18 || ^19 || ^19.0.0-rc - svelte: '>= 4' - vue: ^3 - vue-router: ^4 - peerDependenciesMeta: - '@remix-run/react': - optional: true - '@sveltejs/kit': - optional: true - next: - optional: true - react: - optional: true - svelte: - optional: true - vue: - optional: true - vue-router: - optional: true - - '@vitejs/plugin-react@4.3.1': - resolution: - { - integrity: sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg==, - } - engines: { node: ^14.18.0 || >=16.0.0 } - peerDependencies: - vite: ^4.2.0 || ^5.0.0 - - ansi-styles@3.2.1: - resolution: - { - integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==, - } - engines: { node: '>=4' } - - babel-plugin-react-compiler@19.0.0-beta-a7bf2bd-20241110: - resolution: - { - integrity: sha512-WdxXtLxsV4gh/GlEK4fuFDGkcED0Wb9UJEBB6Uc1SFqRFEmJNFKboW+Z4NUS5gYrPImqrjh4IwHAmgS6ZBg4Cg==, - } - - browserslist@4.23.3: - resolution: - { - integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==, - } - engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 } - hasBin: true - - bundle-name@4.1.0: - resolution: - { - integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==, - } - engines: { node: '>=18' } - - caniuse-lite@1.0.30001657: - resolution: - { - integrity: sha512-DPbJAlP8/BAXy3IgiWmZKItubb3TYGP0WscQQlVGIfT4s/YlFYVuJgyOsQNP7rJRChx/qdMeLJQJP0Sgg2yjNA==, - } - - chalk@2.4.2: - resolution: - { - integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==, - } - engines: { node: '>=4' } - - color-convert@1.9.3: - resolution: - { - integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==, - } - - color-name@1.1.3: - resolution: - { - integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==, - } - - convert-source-map@2.0.0: - resolution: - { - integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==, - } - - debug@4.3.6: - resolution: - { - integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==, - } - engines: { node: '>=6.0' } - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - default-browser-id@5.0.0: - resolution: - { - integrity: sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==, - } - engines: { node: '>=18' } - - default-browser@5.2.1: - resolution: - { - integrity: sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==, - } - engines: { node: '>=18' } - - define-lazy-prop@3.0.0: - resolution: - { - integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==, - } - engines: { node: '>=12' } - - electron-to-chromium@1.5.14: - resolution: - { - integrity: sha512-bEfPECb3fJ15eaDnu9LEJ2vPGD6W1vt7vZleSVyFhYuMIKm3vz/g9lt7IvEzgdwj58RjbPKUF2rXTCN/UW47tQ==, - } - - error-stack-parser-es@0.1.5: - resolution: - { - integrity: sha512-xHku1X40RO+fO8yJ8Wh2f2rZWVjqyhb1zgq1yZ8aZRQkv6OOKhKWRUaht3eSCUbAOBaKIgM+ykwFLE+QUxgGeg==, - } - - esbuild@0.21.5: - resolution: - { - integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==, - } - engines: { node: '>=12' } - hasBin: true - - escalade@3.2.0: - resolution: - { - integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==, - } - engines: { node: '>=6' } - - escape-string-regexp@1.0.5: - resolution: - { - integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==, - } - engines: { node: '>=0.8.0' } - - estree-walker@2.0.2: - resolution: - { - integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==, - } - - fs-extra@11.2.0: - resolution: - { - integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==, - } - engines: { node: '>=14.14' } - - fsevents@2.3.3: - resolution: - { - integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, - } - engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } - os: [darwin] - - gensync@1.0.0-beta.2: - resolution: - { - integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==, - } - engines: { node: '>=6.9.0' } - - globals@11.12.0: - resolution: - { - integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==, - } - engines: { node: '>=4' } - - graceful-fs@4.2.11: - resolution: - { - integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==, - } - - has-flag@3.0.0: - resolution: - { - integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==, - } - engines: { node: '>=4' } - - is-docker@3.0.0: - resolution: - { - integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==, - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } - hasBin: true - - is-inside-container@1.0.0: - resolution: - { - integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==, - } - engines: { node: '>=14.16' } - hasBin: true - - is-wsl@3.1.0: - resolution: - { - integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==, - } - engines: { node: '>=16' } - - js-tokens@4.0.0: - resolution: - { - integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==, - } - - jsesc@2.5.2: - resolution: - { - integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==, - } - engines: { node: '>=4' } - hasBin: true - - json5@2.2.3: - resolution: - { - integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==, - } - engines: { node: '>=6' } - hasBin: true - - jsonfile@6.1.0: - resolution: - { - integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==, - } - - lru-cache@5.1.1: - resolution: - { - integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==, - } - - mrmime@2.0.0: - resolution: - { - integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==, - } - engines: { node: '>=10' } - - ms@2.1.2: - resolution: - { - integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==, - } - - nanoid@3.3.7: - resolution: - { - integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==, - } - engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 } - hasBin: true - - node-releases@2.0.18: - resolution: - { - integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==, - } - - open@10.1.0: - resolution: - { - integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==, - } - engines: { node: '>=18' } - - perfect-debounce@1.0.0: - resolution: - { - integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==, - } - - picocolors@1.1.0: - resolution: - { - integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==, - } - - picomatch@4.0.2: - resolution: - { - integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==, - } - engines: { node: '>=12' } - - postcss@8.4.45: - resolution: - { - integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==, - } - engines: { node: ^10 || ^12 || >=14 } - - react-dom@19.0.0-rc.1: - resolution: - { - integrity: sha512-k8MfDX+4G+eaa1cXXI9QF4d+pQtYol3nx8vauqRWUEOPqC7NQn2qmEqUsLoSd28rrZUL+R3T2VC+kZ2Hyx1geQ==, - } - peerDependencies: - react: 19.0.0-rc.1 - - react-refresh@0.14.2: - resolution: - { - integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==, - } - engines: { node: '>=0.10.0' } - - react-scan@0.0.3: - resolution: - { - integrity: sha512-nL0rFnHAGNp5NdsKEfy1FfwyDy3x9ddWl+W2YshWvFJNlE9rBip6j8Au7hQO/jpQhFCSZIVcOzb+Kd+jeOZTDg==, - } - - react@19.0.0-rc.1: - resolution: - { - integrity: sha512-NZKln+uyPuyHchzP07I6GGYFxdAoaKhehgpCa3ltJGzwE31OYumLeshGaitA1R/fS5d9D2qpZVwTFAr6zCLM9w==, - } - engines: { node: '>=0.10.0' } - - rollup@4.21.2: - resolution: - { - integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==, - } - engines: { node: '>=18.0.0', npm: '>=8.0.0' } - hasBin: true - - run-applescript@7.0.0: - resolution: - { - integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==, - } - engines: { node: '>=18' } - - scheduler@0.25.0-rc.1: - resolution: - { - integrity: sha512-fVinv2lXqYpKConAMdergOl5owd0rY1O4P/QTe0aWKCqGtu7VsCt1iqQFxSJtqK4Lci/upVSBpGwVC7eWcuS9Q==, - } - - semver@6.3.1: - resolution: - { - integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==, - } - hasBin: true - - sirv@2.0.4: - resolution: - { - integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==, - } - engines: { node: '>= 10' } - - source-map-js@1.2.0: - resolution: - { - integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==, - } - engines: { node: '>=0.10.0' } - - supports-color@5.5.0: - resolution: - { - integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==, - } - engines: { node: '>=4' } - - to-fast-properties@2.0.0: - resolution: - { - integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==, - } - engines: { node: '>=4' } - - totalist@3.0.1: - resolution: - { - integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==, - } - engines: { node: '>=6' } - - universalify@2.0.1: - resolution: - { - integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==, - } - engines: { node: '>= 10.0.0' } - - update-browserslist-db@1.1.0: - resolution: - { - integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==, - } - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - - vite-plugin-inspect@0.8.7: - resolution: - { - integrity: sha512-/XXou3MVc13A5O9/2Nd6xczjrUwt7ZyI9h8pTnUMkr5SshLcb0PJUOVq2V+XVkdeU4njsqAtmK87THZuO2coGA==, - } - engines: { node: '>=14' } - peerDependencies: - '@nuxt/kit': '*' - vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 - peerDependenciesMeta: - '@nuxt/kit': - optional: true - - vite@5.4.3: - resolution: - { - integrity: sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==, - } - engines: { node: ^18.0.0 || >=20.0.0 } - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - - yallist@3.1.1: - resolution: - { - integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==, - } - -snapshots: - '@ampproject/remapping@2.3.0': - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - - '@antfu/utils@0.7.10': {} - - '@babel/code-frame@7.24.7': - dependencies: - '@babel/highlight': 7.24.7 - picocolors: 1.1.0 - - '@babel/compat-data@7.25.4': {} - - '@babel/core@7.25.2': - dependencies: - '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.6 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helpers': 7.25.6 - '@babel/parser': 7.25.6 - '@babel/template': 7.25.0 - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 - convert-source-map: 2.0.0 - debug: 4.3.6 - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/generator@7.25.6': - dependencies: - '@babel/types': 7.25.6 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 - - '@babel/helper-compilation-targets@7.25.2': - dependencies: - '@babel/compat-data': 7.25.4 - '@babel/helper-validator-option': 7.24.8 - browserslist: 4.23.3 - lru-cache: 5.1.1 - semver: 6.3.1 - - '@babel/helper-module-imports@7.24.7': - dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-simple-access': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.6 - transitivePeerDependencies: - - supports-color - - '@babel/helper-plugin-utils@7.24.8': {} - - '@babel/helper-simple-access@7.24.7': - dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 - transitivePeerDependencies: - - supports-color - - '@babel/helper-string-parser@7.24.8': {} - - '@babel/helper-validator-identifier@7.24.7': {} - - '@babel/helper-validator-option@7.24.8': {} - - '@babel/helpers@7.25.6': - dependencies: - '@babel/template': 7.25.0 - '@babel/types': 7.25.6 - - '@babel/highlight@7.24.7': - dependencies: - '@babel/helper-validator-identifier': 7.24.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.1.0 - - '@babel/parser@7.25.6': - dependencies: - '@babel/types': 7.25.6 - - '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - - '@babel/plugin-transform-react-jsx-source@7.24.7(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - - '@babel/template@7.25.0': - dependencies: - '@babel/code-frame': 7.24.7 - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 - - '@babel/traverse@7.25.6': - dependencies: - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.6 - '@babel/parser': 7.25.6 - '@babel/template': 7.25.0 - '@babel/types': 7.25.6 - debug: 4.3.6 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - '@babel/types@7.25.6': - dependencies: - '@babel/helper-string-parser': 7.24.8 - '@babel/helper-validator-identifier': 7.24.7 - to-fast-properties: 2.0.0 - - '@esbuild/aix-ppc64@0.21.5': - optional: true - - '@esbuild/android-arm64@0.21.5': - optional: true - - '@esbuild/android-arm@0.21.5': - optional: true - - '@esbuild/android-x64@0.21.5': - optional: true - - '@esbuild/darwin-arm64@0.21.5': - optional: true - - '@esbuild/darwin-x64@0.21.5': - optional: true - - '@esbuild/freebsd-arm64@0.21.5': - optional: true - - '@esbuild/freebsd-x64@0.21.5': - optional: true - - '@esbuild/linux-arm64@0.21.5': - optional: true - - '@esbuild/linux-arm@0.21.5': - optional: true - - '@esbuild/linux-ia32@0.21.5': - optional: true - - '@esbuild/linux-loong64@0.21.5': - optional: true - - '@esbuild/linux-mips64el@0.21.5': - optional: true - - '@esbuild/linux-ppc64@0.21.5': - optional: true - - '@esbuild/linux-riscv64@0.21.5': - optional: true - - '@esbuild/linux-s390x@0.21.5': - optional: true - - '@esbuild/linux-x64@0.21.5': - optional: true - - '@esbuild/netbsd-x64@0.21.5': - optional: true - - '@esbuild/openbsd-x64@0.21.5': - optional: true - - '@esbuild/sunos-x64@0.21.5': - optional: true - - '@esbuild/win32-arm64@0.21.5': - optional: true - - '@esbuild/win32-ia32@0.21.5': - optional: true - - '@esbuild/win32-x64@0.21.5': - optional: true - - '@jridgewell/gen-mapping@0.3.5': - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 - - '@jridgewell/resolve-uri@3.1.2': {} - - '@jridgewell/set-array@1.2.1': {} - - '@jridgewell/sourcemap-codec@1.5.0': {} - - '@jridgewell/trace-mapping@0.3.25': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 - - '@polka/url@1.0.0-next.28': {} - - '@rollup/pluginutils@5.1.3(rollup@4.21.2)': - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 4.0.2 - optionalDependencies: - rollup: 4.21.2 - - '@rollup/rollup-android-arm-eabi@4.21.2': - optional: true - - '@rollup/rollup-android-arm64@4.21.2': - optional: true - - '@rollup/rollup-darwin-arm64@4.21.2': - optional: true - - '@rollup/rollup-darwin-x64@4.21.2': - optional: true - - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': - optional: true - - '@rollup/rollup-linux-arm-musleabihf@4.21.2': - optional: true - - '@rollup/rollup-linux-arm64-gnu@4.21.2': - optional: true - - '@rollup/rollup-linux-arm64-musl@4.21.2': - optional: true - - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': - optional: true - - '@rollup/rollup-linux-riscv64-gnu@4.21.2': - optional: true - - '@rollup/rollup-linux-s390x-gnu@4.21.2': - optional: true - - '@rollup/rollup-linux-x64-gnu@4.21.2': - optional: true - - '@rollup/rollup-linux-x64-musl@4.21.2': - optional: true - - '@rollup/rollup-win32-arm64-msvc@4.21.2': - optional: true - - '@rollup/rollup-win32-ia32-msvc@4.21.2': - optional: true - - '@rollup/rollup-win32-x64-msvc@4.21.2': - optional: true - - '@types/babel__core@7.20.5': - dependencies: - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.6 - - '@types/babel__generator@7.6.8': - dependencies: - '@babel/types': 7.25.6 - - '@types/babel__template@7.4.4': - dependencies: - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 - - '@types/babel__traverse@7.20.6': - dependencies: - '@babel/types': 7.25.6 - - '@types/estree@1.0.5': {} - - '@vercel/analytics@1.4.0(react@19.0.0-rc.1)': - optionalDependencies: - react: 19.0.0-rc.1 - - '@vitejs/plugin-react@4.3.1(vite@5.4.3)': - dependencies: - '@babel/core': 7.25.2 - '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) - '@types/babel__core': 7.20.5 - react-refresh: 0.14.2 - vite: 5.4.3 - transitivePeerDependencies: - - supports-color - - ansi-styles@3.2.1: - dependencies: - color-convert: 1.9.3 - - babel-plugin-react-compiler@19.0.0-beta-a7bf2bd-20241110: - dependencies: - '@babel/types': 7.25.6 - - browserslist@4.23.3: - dependencies: - caniuse-lite: 1.0.30001657 - electron-to-chromium: 1.5.14 - node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.3) - - bundle-name@4.1.0: - dependencies: - run-applescript: 7.0.0 - - caniuse-lite@1.0.30001657: {} - - chalk@2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - - color-convert@1.9.3: - dependencies: - color-name: 1.1.3 - - color-name@1.1.3: {} - - convert-source-map@2.0.0: {} - - debug@4.3.6: - dependencies: - ms: 2.1.2 - - default-browser-id@5.0.0: {} - - default-browser@5.2.1: - dependencies: - bundle-name: 4.1.0 - default-browser-id: 5.0.0 - - define-lazy-prop@3.0.0: {} - - electron-to-chromium@1.5.14: {} - - error-stack-parser-es@0.1.5: {} - - esbuild@0.21.5: - optionalDependencies: - '@esbuild/aix-ppc64': 0.21.5 - '@esbuild/android-arm': 0.21.5 - '@esbuild/android-arm64': 0.21.5 - '@esbuild/android-x64': 0.21.5 - '@esbuild/darwin-arm64': 0.21.5 - '@esbuild/darwin-x64': 0.21.5 - '@esbuild/freebsd-arm64': 0.21.5 - '@esbuild/freebsd-x64': 0.21.5 - '@esbuild/linux-arm': 0.21.5 - '@esbuild/linux-arm64': 0.21.5 - '@esbuild/linux-ia32': 0.21.5 - '@esbuild/linux-loong64': 0.21.5 - '@esbuild/linux-mips64el': 0.21.5 - '@esbuild/linux-ppc64': 0.21.5 - '@esbuild/linux-riscv64': 0.21.5 - '@esbuild/linux-s390x': 0.21.5 - '@esbuild/linux-x64': 0.21.5 - '@esbuild/netbsd-x64': 0.21.5 - '@esbuild/openbsd-x64': 0.21.5 - '@esbuild/sunos-x64': 0.21.5 - '@esbuild/win32-arm64': 0.21.5 - '@esbuild/win32-ia32': 0.21.5 - '@esbuild/win32-x64': 0.21.5 - - escalade@3.2.0: {} - - escape-string-regexp@1.0.5: {} - - estree-walker@2.0.2: {} - - fs-extra@11.2.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.1 - - fsevents@2.3.3: - optional: true - - gensync@1.0.0-beta.2: {} - - globals@11.12.0: {} - - graceful-fs@4.2.11: {} - - has-flag@3.0.0: {} - - is-docker@3.0.0: {} - - is-inside-container@1.0.0: - dependencies: - is-docker: 3.0.0 - - is-wsl@3.1.0: - dependencies: - is-inside-container: 1.0.0 - - js-tokens@4.0.0: {} - - jsesc@2.5.2: {} - - json5@2.2.3: {} - - jsonfile@6.1.0: - dependencies: - universalify: 2.0.1 - optionalDependencies: - graceful-fs: 4.2.11 - - lru-cache@5.1.1: - dependencies: - yallist: 3.1.1 - - mrmime@2.0.0: {} - - ms@2.1.2: {} - - nanoid@3.3.7: {} - - node-releases@2.0.18: {} - - open@10.1.0: - dependencies: - default-browser: 5.2.1 - define-lazy-prop: 3.0.0 - is-inside-container: 1.0.0 - is-wsl: 3.1.0 - - perfect-debounce@1.0.0: {} - - picocolors@1.1.0: {} - - picomatch@4.0.2: {} - - postcss@8.4.45: - dependencies: - nanoid: 3.3.7 - picocolors: 1.1.0 - source-map-js: 1.2.0 - - react-dom@19.0.0-rc.1(react@19.0.0-rc.1): - dependencies: - react: 19.0.0-rc.1 - scheduler: 0.25.0-rc.1 - - react-refresh@0.14.2: {} - - react-scan@0.0.3: {} - - react@19.0.0-rc.1: {} - - rollup@4.21.2: - dependencies: - '@types/estree': 1.0.5 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.21.2 - '@rollup/rollup-android-arm64': 4.21.2 - '@rollup/rollup-darwin-arm64': 4.21.2 - '@rollup/rollup-darwin-x64': 4.21.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 - '@rollup/rollup-linux-arm-musleabihf': 4.21.2 - '@rollup/rollup-linux-arm64-gnu': 4.21.2 - '@rollup/rollup-linux-arm64-musl': 4.21.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 - '@rollup/rollup-linux-riscv64-gnu': 4.21.2 - '@rollup/rollup-linux-s390x-gnu': 4.21.2 - '@rollup/rollup-linux-x64-gnu': 4.21.2 - '@rollup/rollup-linux-x64-musl': 4.21.2 - '@rollup/rollup-win32-arm64-msvc': 4.21.2 - '@rollup/rollup-win32-ia32-msvc': 4.21.2 - '@rollup/rollup-win32-x64-msvc': 4.21.2 - fsevents: 2.3.3 - - run-applescript@7.0.0: {} - - scheduler@0.25.0-rc.1: {} - - semver@6.3.1: {} - - sirv@2.0.4: - dependencies: - '@polka/url': 1.0.0-next.28 - mrmime: 2.0.0 - totalist: 3.0.1 - - source-map-js@1.2.0: {} - - supports-color@5.5.0: - dependencies: - has-flag: 3.0.0 - - to-fast-properties@2.0.0: {} - - totalist@3.0.1: {} - - universalify@2.0.1: {} - - update-browserslist-db@1.1.0(browserslist@4.23.3): - dependencies: - browserslist: 4.23.3 - escalade: 3.2.0 - picocolors: 1.1.0 - - vite-plugin-inspect@0.8.7(rollup@4.21.2)(vite@5.4.3): - dependencies: - '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.1.3(rollup@4.21.2) - debug: 4.3.6 - error-stack-parser-es: 0.1.5 - fs-extra: 11.2.0 - open: 10.1.0 - perfect-debounce: 1.0.0 - picocolors: 1.1.0 - sirv: 2.0.4 - vite: 5.4.3 - transitivePeerDependencies: - - rollup - - supports-color - - vite@5.4.3: - dependencies: - esbuild: 0.21.5 - postcss: 8.4.45 - rollup: 4.21.2 - optionalDependencies: - fsevents: 2.3.3 - - yallist@3.1.1: {} diff --git a/packages/kitchen-sink/src/index.jsx b/packages/kitchen-sink/src/index.jsx index 86dfe7b6..37028fd4 100644 --- a/packages/kitchen-sink/src/index.jsx +++ b/packages/kitchen-sink/src/index.jsx @@ -1,6 +1,6 @@ import React, { createContext, useState } from 'react'; import ReactDOMClient from 'react-dom/client'; -import { scan } from 'react-scan'; // force production build +import { scan } from 'react-scan/lite'; // force production build import './styles.css'; diff --git a/packages/kitchen-sink/vite.config.mjs b/packages/kitchen-sink/vite.config.mjs index 16d30e5d..4f015b62 100644 --- a/packages/kitchen-sink/vite.config.mjs +++ b/packages/kitchen-sink/vite.config.mjs @@ -1,6 +1,5 @@ -import path from 'node:path'; -import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; import Inspect from 'vite-plugin-inspect'; export default defineConfig({ @@ -10,15 +9,4 @@ export default defineConfig({ ], resolve: process.env.NODE_ENV === 'production' && !process.env.TEST - ? {} - : { - alias: { - 'react-scan/auto': path.resolve(__dirname, '../scan/dist/auto.mjs'), - 'react-scan/packages/dist/index.mjs': path.resolve( - __dirname, - '../scan/dist/index.mjs', - ), - 'react-scan': path.resolve(__dirname, '../scan'), - }, - }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2123b5aa..c3afeec0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: '@vercel/speed-insights': specifier: ^1.1.0 - version: 1.1.0(next@15.0.3(@babel/core@7.26.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) + version: 1.1.0(next@15.0.3(@babel/core@7.26.0)(react@19.0.0))(react@19.0.0) devDependencies: '@biomejs/biome': specifier: ^1.9.4 @@ -23,7 +23,7 @@ importers: version: 22.10.2 '@vercel/style-guide': specifier: ^6.0.0 - version: 6.0.0(eslint@8.57.1)(prettier@3.3.3)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2)(terser@5.36.0)) + version: 6.0.0(eslint@8.57.1)(prettier@3.3.3)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2)) autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) @@ -44,7 +44,7 @@ importers: version: 5.7.3 vite-tsconfig-paths: specifier: ^5.1.4 - version: 5.1.4(typescript@5.7.3)(vite@6.0.7(@types/node@22.10.2)(jiti@1.21.6)(terser@5.36.0)(yaml@2.6.1)) + version: 5.1.4(typescript@5.7.3)(vite@6.0.7(@types/node@22.10.2)) examples/sierpinski: dependencies: @@ -148,7 +148,7 @@ importers: version: 19.0.0(react@19.0.0) react-scan: specifier: ^0.1.3 - version: 0.1.3(@remix-run/react@2.15.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.3))(next@15.0.3(@babel/core@7.26.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react-router-dom@6.28.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-router@6.28.0(react@19.0.0))(react@19.0.0)(rollup@4.28.0) + version: link:../scan sugar-high: specifier: ^0.7.5 version: 0.7.5 @@ -304,7 +304,7 @@ importers: version: 1.0.0 react-scan: specifier: ^0.1.0 - version: 0.1.3(@remix-run/react@2.15.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.3))(next@15.0.3(@babel/core@7.26.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react-router-dom@6.28.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-router@6.28.0(react@19.0.0))(react@19.0.0)(rollup@4.28.0) + version: link:../scan devDependencies: '@types/babel__core': specifier: ^7.20.5 @@ -4615,26 +4615,6 @@ packages: react-router-dom: optional: true - react-scan@0.1.3: - resolution: {integrity: sha512-mPhceIDUm6KugQPOF6PcQWBxo49/ZX7TnP5+/f/wbz7/36sM1A3ESAIAOXe+Leha30AJPriG1U4nABnEF4N8vQ==} - hasBin: true - peerDependencies: - '@remix-run/react': '>=1.0.0' - next: '>=13.0.0' - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - react-router: ^5.0.0 || ^6.0.0 || ^7.0.0 - react-router-dom: ^5.0.0 || ^6.0.0 || ^7.0.0 - peerDependenciesMeta: - '@remix-run/react': - optional: true - next: - optional: true - react-router: - optional: true - react-router-dom: - optional: true - react@18.2.0: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} engines: {node: '>=0.10.0'} @@ -6722,11 +6702,6 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@pivanov/utils@0.0.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': - dependencies: - react: 19.0.0 - react-dom: 19.0.0(react@19.0.0) - '@pkgjs/parseargs@0.11.0': optional: true @@ -7218,16 +7193,16 @@ snapshots: next: 15.0.3(@babel/core@7.26.0)(babel-plugin-react-compiler@19.0.0-beta-a7bf2bd-20241110)(react-dom@19.0.0-rc.1(react@19.0.0-rc.1))(react@19.0.0-rc.1) react: 19.0.0-rc.1 - '@vercel/speed-insights@1.1.0(next@15.0.3(@babel/core@7.26.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)': - optionalDependencies: - next: 15.0.3(@babel/core@7.26.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - react: 19.0.0 - '@vercel/speed-insights@1.1.0(next@15.0.3(@babel/core@7.26.0)(react-dom@19.0.0-rc-66855b96-20241106(react@19.0.0-rc-66855b96-20241106))(react@19.0.0-rc-66855b96-20241106))(react@19.0.0-rc-66855b96-20241106)': optionalDependencies: next: 15.0.3(@babel/core@7.26.0)(react-dom@19.0.0-rc-66855b96-20241106(react@19.0.0-rc-66855b96-20241106))(react@19.0.0-rc-66855b96-20241106) react: 19.0.0-rc-66855b96-20241106 + '@vercel/speed-insights@1.1.0(next@15.0.3(@babel/core@7.26.0)(react@19.0.0))(react@19.0.0)': + optionalDependencies: + next: 15.0.3(@babel/core@7.26.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + '@vercel/style-guide@6.0.0(eslint@8.57.1)(prettier@3.3.3)(typescript@5.7.3)(vitest@1.0.0(@types/node@20.17.10)(terser@5.36.0))': dependencies: '@babel/core': 7.26.0 @@ -7236,7 +7211,7 @@ snapshots: '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.3) eslint-config-prettier: 9.1.0(eslint@8.57.1) - eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.31.0) + eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1)) eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@8.57.1) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1) @@ -7261,7 +7236,7 @@ snapshots: - supports-color - vitest - '@vercel/style-guide@6.0.0(eslint@8.57.1)(prettier@3.3.3)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2)(terser@5.36.0))': + '@vercel/style-guide@6.0.0(eslint@8.57.1)(prettier@3.3.3)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2))': dependencies: '@babel/core': 7.26.0 '@babel/eslint-parser': 7.25.9(@babel/core@7.26.0)(eslint@8.57.1) @@ -7269,7 +7244,7 @@ snapshots: '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.3) eslint-config-prettier: 9.1.0(eslint@8.57.1) - eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.31.0) + eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1)) eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@8.57.1) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1) @@ -7281,7 +7256,7 @@ snapshots: eslint-plugin-testing-library: 6.5.0(eslint@8.57.1)(typescript@5.7.3) eslint-plugin-tsdoc: 0.2.17 eslint-plugin-unicorn: 51.0.1(eslint@8.57.1) - eslint-plugin-vitest: 0.3.26(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2)(terser@5.36.0)) + eslint-plugin-vitest: 0.3.26(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2)) prettier-plugin-packagejson: 2.5.6(prettier@3.3.3) optionalDependencies: eslint: 8.57.1 @@ -8351,7 +8326,7 @@ snapshots: dependencies: eslint: 8.57.1 - eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0): + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1)): dependencies: eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1) @@ -8369,7 +8344,7 @@ snapshots: debug: 4.3.7 enhanced-resolve: 5.17.1 eslint: 8.57.1 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.0.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.0.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.0.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) fast-glob: 3.3.2 get-tsconfig: 4.8.1 is-bun-module: 1.3.0 @@ -8398,7 +8373,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@6.0.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1): + eslint-module-utils@2.12.0(@typescript-eslint/parser@6.0.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.0.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: @@ -8409,7 +8384,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1): + eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: @@ -8437,7 +8412,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.0.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.0.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.0.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -8466,7 +8441,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -8596,13 +8571,13 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.3.26(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2)(terser@5.36.0)): + eslint-plugin-vitest@0.3.26(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3)(vitest@1.0.0(@types/node@22.10.2)): dependencies: '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.3) eslint: 8.57.1 optionalDependencies: '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.3))(eslint@8.57.1)(typescript@5.7.3) - vitest: 1.0.0(@types/node@22.10.2)(terser@5.36.0) + vitest: 1.0.0(@types/node@22.10.2) transitivePeerDependencies: - supports-color - typescript @@ -10266,37 +10241,6 @@ snapshots: - rollup - supports-color - react-scan@0.1.3(@remix-run/react@2.15.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.3))(next@15.0.3(@babel/core@7.26.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react-router-dom@6.28.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-router@6.28.0(react@19.0.0))(react@19.0.0)(rollup@4.28.0): - dependencies: - '@babel/core': 7.26.0 - '@babel/generator': 7.26.2 - '@babel/types': 7.26.0 - '@clack/core': 0.3.5 - '@clack/prompts': 0.8.2 - '@pivanov/utils': 0.0.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - '@preact/signals': 1.3.1(preact@10.25.1) - '@rollup/pluginutils': 5.1.3(rollup@4.28.0) - '@types/node': 20.17.10 - bippy: 0.2.7 - esbuild: 0.24.2 - estree-walker: 3.0.3 - kleur: 4.1.5 - mri: 1.2.0 - playwright: 1.49.0 - preact: 10.25.1 - react: 19.0.0 - react-dom: 19.0.0(react@19.0.0) - tsx: 4.0.0 - optionalDependencies: - '@remix-run/react': 2.15.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.3) - next: 15.0.3(@babel/core@7.26.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - react-router: 6.28.0(react@19.0.0) - react-router-dom: 6.28.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - unplugin: 2.1.0 - transitivePeerDependencies: - - rollup - - supports-color - react@18.2.0: dependencies: loose-envify: 1.4.0 @@ -11151,13 +11095,13 @@ snapshots: - supports-color - terser - vite-node@1.0.0(@types/node@22.10.2)(terser@5.36.0): + vite-node@1.0.0(@types/node@22.10.2): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 picocolors: 1.1.1 - vite: 5.4.3(@types/node@22.10.2)(terser@5.36.0) + vite: 5.4.3(@types/node@22.10.2) transitivePeerDependencies: - '@types/node' - less @@ -11216,13 +11160,13 @@ snapshots: - tsx - utf-8-validate - vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@6.0.7(@types/node@22.10.2)(jiti@1.21.6)(terser@5.36.0)(yaml@2.6.1)): + vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@6.0.7(@types/node@22.10.2)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.7.3) optionalDependencies: - vite: 6.0.7(@types/node@22.10.2)(jiti@1.21.6)(terser@5.36.0)(yaml@2.6.1) + vite: 6.0.7(@types/node@22.10.2) transitivePeerDependencies: - supports-color - typescript @@ -11248,7 +11192,7 @@ snapshots: fsevents: 2.3.3 terser: 5.36.0 - vite@5.4.3(@types/node@22.10.2)(terser@5.36.0): + vite@5.4.3(@types/node@22.10.2): dependencies: esbuild: 0.21.5 postcss: 8.4.49 @@ -11256,7 +11200,6 @@ snapshots: optionalDependencies: '@types/node': 22.10.2 fsevents: 2.3.3 - terser: 5.36.0 optional: true vite@5.4.3(@types/node@22.13.1)(terser@5.36.0): @@ -11269,7 +11212,7 @@ snapshots: fsevents: 2.3.3 terser: 5.36.0 - vite@6.0.7(@types/node@22.10.2)(jiti@1.21.6)(terser@5.36.0)(yaml@2.6.1): + vite@6.0.7(@types/node@22.10.2): dependencies: esbuild: 0.24.2 postcss: 8.4.49 @@ -11277,9 +11220,6 @@ snapshots: optionalDependencies: '@types/node': 22.10.2 fsevents: 2.3.3 - jiti: 1.21.6 - terser: 5.36.0 - yaml: 2.6.1 optional: true vite@6.0.7(@types/node@22.13.1)(jiti@1.21.6)(terser@5.36.0)(yaml@2.6.1): @@ -11329,7 +11269,7 @@ snapshots: - supports-color - terser - vitest@1.0.0(@types/node@22.10.2)(terser@5.36.0): + vitest@1.0.0(@types/node@22.10.2): dependencies: '@vitest/expect': 1.0.0 '@vitest/runner': 1.0.0 @@ -11349,8 +11289,8 @@ snapshots: strip-literal: 1.3.0 tinybench: 2.9.0 tinypool: 0.8.4 - vite: 5.4.3(@types/node@22.10.2)(terser@5.36.0) - vite-node: 1.0.0(@types/node@22.10.2)(terser@5.36.0) + vite: 5.4.3(@types/node@22.10.2) + vite-node: 1.0.0(@types/node@22.10.2) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.10.2