From c63e4ceb3c765df6fcfdb72c849f832355bb2bac Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Tue, 5 Nov 2024 14:09:17 +0000 Subject: [PATCH 01/14] init sdk integration --- sandpack-client/package.json | 1 + sandpack-client/src/clients/index.ts | 4 + .../src/clients/vm/client.utils.test.ts | 61 +++ .../src/clients/vm/client.utils.ts | 52 +++ .../src/clients/vm/iframe.utils.ts | 65 ++++ sandpack-client/src/clients/vm/index.ts | 354 ++++++++++++++++++ .../vm/inject-scripts/historyListener.ts | 85 +++++ .../src/clients/vm/inject-scripts/index.ts | 36 ++ .../src/clients/vm/inject-scripts/resize.ts | 57 +++ sandpack-client/src/clients/vm/types.ts | 74 ++++ sandpack-client/src/types.ts | 3 +- yarn.lock | 12 + 12 files changed, 803 insertions(+), 1 deletion(-) create mode 100644 sandpack-client/src/clients/vm/client.utils.test.ts create mode 100644 sandpack-client/src/clients/vm/client.utils.ts create mode 100644 sandpack-client/src/clients/vm/iframe.utils.ts create mode 100644 sandpack-client/src/clients/vm/index.ts create mode 100644 sandpack-client/src/clients/vm/inject-scripts/historyListener.ts create mode 100644 sandpack-client/src/clients/vm/inject-scripts/index.ts create mode 100644 sandpack-client/src/clients/vm/inject-scripts/resize.ts create mode 100644 sandpack-client/src/clients/vm/types.ts diff --git a/sandpack-client/package.json b/sandpack-client/package.json index d7f2a3548..6834eede0 100644 --- a/sandpack-client/package.json +++ b/sandpack-client/package.json @@ -56,6 +56,7 @@ ], "dependencies": { "@codesandbox/nodebox": "0.1.8", + "@codesandbox/sdk": "latest", "buffer": "^6.0.3", "dequal": "^2.0.2", "mime-db": "^1.52.0", diff --git a/sandpack-client/src/clients/index.ts b/sandpack-client/src/clients/index.ts index 12f0abc49..e639eed98 100644 --- a/sandpack-client/src/clients/index.ts +++ b/sandpack-client/src/clients/index.ts @@ -22,6 +22,10 @@ export async function loadSandpackClient( Client = await import("./static").then((m) => m.SandpackStatic); break; + case "vm": + Client = await import("./vm").then((m) => m.SandpackVM); + break; + default: Client = await import("./runtime").then((m) => m.SandpackRuntime); } diff --git a/sandpack-client/src/clients/vm/client.utils.test.ts b/sandpack-client/src/clients/vm/client.utils.test.ts new file mode 100644 index 000000000..40443a53b --- /dev/null +++ b/sandpack-client/src/clients/vm/client.utils.test.ts @@ -0,0 +1,61 @@ +import { findStartScriptPackageJson } from "./client.utils"; + +describe(findStartScriptPackageJson, () => { + it("should parse a regular command", () => { + expect( + findStartScriptPackageJson(JSON.stringify({ scripts: { start: "node" } })) + ).toEqual(["node", [], { env: {} }]); + }); + + it("should parse a regular command with arguments", () => { + expect( + findStartScriptPackageJson( + JSON.stringify({ scripts: { start: "node dev --foo" } }) + ) + ).toEqual(["node", ["dev", "--foo"], { env: {} }]); + }); + + it("should get dev script first", () => { + expect( + findStartScriptPackageJson( + JSON.stringify({ + scripts: { start: "node start --foo", dev: "node dev --foo" }, + }) + ) + ).toEqual(["node", ["dev", "--foo"], { env: {} }]); + }); + + it("should parse env vars", () => { + expect( + findStartScriptPackageJson( + JSON.stringify({ + scripts: { start: "NODE=1 ANOTHER=2 node start --foo" }, + }) + ) + ).toEqual([ + "node", + ["start", "--foo"], + { env: { NODE: "1", ANOTHER: "2" } }, + ]); + }); + + it("should parse a single env var", () => { + expect( + findStartScriptPackageJson( + JSON.stringify({ + scripts: { start: "NODE=1 node start --foo" }, + }) + ) + ).toEqual(["node", ["start", "--foo"], { env: { NODE: "1" } }]); + }); + + it("should parse a single env var and a single commmand", () => { + expect( + findStartScriptPackageJson( + JSON.stringify({ + scripts: { start: "NODE=1 node" }, + }) + ) + ).toEqual(["node", [], { env: { NODE: "1" } }]); + }); +}); diff --git a/sandpack-client/src/clients/vm/client.utils.ts b/sandpack-client/src/clients/vm/client.utils.ts new file mode 100644 index 000000000..51aa0c3e6 --- /dev/null +++ b/sandpack-client/src/clients/vm/client.utils.ts @@ -0,0 +1,52 @@ +import { createError } from "../.."; +import type { SandpackBundlerFiles } from "../../"; + +let counter = 0; + +export function generateRandomId() { + const now = Date.now(); + const randomNumber = Math.round(Math.random() * 10000); + const count = (counter += 1); + return (+`${now}${randomNumber}${count}`).toString(16); +} + +export const writeBuffer = (content: string | Uint8Array): Uint8Array => { + if (typeof content === "string") { + return new TextEncoder().encode(content); + } else { + return content; + } +}; + +export const readBuffer = (content: string | Uint8Array): string => { + if (typeof content === "string") { + return content; + } else { + return new TextDecoder().decode(content); + } +}; + +export const fromBundlerFilesToFS = ( + files: SandpackBundlerFiles +): Record => { + return Object.entries(files).reduce>( + (acc, [key, value]) => { + acc[key] = writeBuffer(value.code); + + return acc; + }, + {} + ); +}; + +export const getMessageFromError = (error: Error | string): string => { + if (typeof error === "string") return error; + + if (typeof error === "object" && "message" in error) { + return error.message; + } + + return createError( + "The server could not be reached. Make sure that the node script is running and that a port has been started." + ); +}; diff --git a/sandpack-client/src/clients/vm/iframe.utils.ts b/sandpack-client/src/clients/vm/iframe.utils.ts new file mode 100644 index 000000000..30724ce99 --- /dev/null +++ b/sandpack-client/src/clients/vm/iframe.utils.ts @@ -0,0 +1,65 @@ +import type { ClientOptions } from "../.."; +import { createError } from "../.."; +import { nullthrows } from "../.."; + +export async function loadPreviewIframe( + iframe: HTMLIFrameElement, + url: string +): Promise { + const { contentWindow } = iframe; + + nullthrows( + contentWindow, + "Failed to await preview iframe: no content window found" + ); + + const TIME_OUT = 90_000; + const MAX_MANY_TIRES = 20; + let tries = 0; + let timeout: ReturnType; + + return new Promise((resolve, reject) => { + const triesToSetUrl = (): void => { + const onLoadPage = (): void => { + clearTimeout(timeout); + tries = MAX_MANY_TIRES; + resolve(); + + iframe.removeEventListener("load", onLoadPage); + }; + + if (tries >= MAX_MANY_TIRES) { + reject(createError(`Could not able to connect to preview.`)); + + return; + } + + iframe.setAttribute("src", url); + + timeout = setTimeout(() => { + triesToSetUrl(); + iframe.removeEventListener("load", onLoadPage); + }, TIME_OUT); + + tries = tries + 1; + + iframe.addEventListener("load", onLoadPage); + }; + + iframe.addEventListener("error", () => reject(new Error("Iframe error"))); + iframe.addEventListener("abort", () => reject(new Error("Aborted"))); + + triesToSetUrl(); + }); +} + +export const setPreviewIframeProperties = ( + iframe: HTMLIFrameElement, + options: ClientOptions +): void => { + iframe.style.border = "0"; + iframe.style.width = options.width || "100%"; + iframe.style.height = options.height || "100%"; + iframe.style.overflow = "hidden"; + iframe.allow = "cross-origin-isolated"; +}; diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts new file mode 100644 index 000000000..3caee4c25 --- /dev/null +++ b/sandpack-client/src/clients/vm/index.ts @@ -0,0 +1,354 @@ +/* eslint-disable no-console,@typescript-eslint/no-explicit-any,prefer-rest-params,@typescript-eslint/explicit-module-boundary-types */ + +import type { FilesMap } from "@codesandbox/nodebox"; +import type { Sandbox } from "@codesandbox/sdk"; +import { CodeSandbox } from "@codesandbox/sdk"; + +import type { + ClientOptions, + ListenerFunction, + SandboxSetup, + UnsubscribeFunction, +} from "../.."; +import { nullthrows } from "../.."; +import { SandpackClient } from "../base"; +import { EventEmitter } from "../event-emitter"; + +import { + getMessageFromError, + generateRandomId, + readBuffer, + fromBundlerFilesToFS, + writeBuffer, +} from "./client.utils"; +import { loadPreviewIframe, setPreviewIframeProperties } from "./iframe.utils"; +import type { SandpackNodeMessage } from "./types"; + +const token = ""; +const sdk = new CodeSandbox(token); + +export class SandpackVM extends SandpackClient { + private emitter: EventEmitter; + private sandbox!: Sandbox; + private iframePreviewUrl: string | undefined; + private _modulesCache = new Map(); + private messageChannelId = generateRandomId(); + + // Public + public iframe!: HTMLIFrameElement; + + private _initPromise: Promise | null = null; + + constructor( + selector: string | HTMLIFrameElement, + sandboxInfo: SandboxSetup, + options: ClientOptions = {} + ) { + super(selector, sandboxInfo, { + ...options, + bundlerURL: options.bundlerURL, + }); + + this.emitter = new EventEmitter(); + + // Assign iframes + this.manageIframes(selector); + + // Trigger initial compile + this.updateSandbox(sandboxInfo); + } + + // Initialize sandbox, should only ever be called once + private async _init(files: FilesMap): Promise { + this.sandbox = await sdk.createSandbox(); + + for (const [key, value] of Object.entries(files)) { + this.sandbox.fs.writeTextFile(key, readBuffer(value)); + } + + await this.globalListeners(); + } + + /** + * It initializes the emulator and provide it with files, template and script to run + */ + private async compile(files: FilesMap): Promise { + try { + // 1. Init + this.status = "initializing"; + this.dispatch({ type: "start", firstLoad: true }); + if (!this._initPromise) { + this._initPromise = this._init(files); + } + await this._initPromise; + + this.dispatch({ type: "connected" }); + + // 3. Create, run task and assign preview + // const { id: shellId } = await this.createShellProcessFromTask(files); + + // 4. Launch Preview + // await this.createPreviewURLFromId(shellId); + // await this.setLocationURLIntoIFrame(); + + // 5. Returns to consumer + this.dispatchDoneMessage(); + } catch (err) { + this.dispatch({ + type: "action", + action: "notification", + notificationType: "error", + title: getMessageFromError(err as Error), + }); + + this.dispatch({ type: "done", compilatonError: true }); + } + } + + private async createPreviewURLFromId(id: string): Promise { + // this.iframePreviewUrl = undefined; + // const { url } = await this.emulator.preview.getByShellId(id); + // this.iframePreviewUrl = url + (this.options.startRoute ?? ""); + } + + /** + * Nodebox needs to handle two types of iframes at the same time: + * + * 1. Runtime iframe: where the emulator process runs, which is responsible + * for creating the other iframes (hidden); + * 2. Preview iframes: any other node process that contains a PORT (public); + */ + private manageIframes(selector: string | HTMLIFrameElement): void { + /** + * Pick the preview iframe + */ + if (typeof selector === "string") { + const element = document.querySelector(selector); + + nullthrows(element, `The element '${selector}' was not found`); + + this.iframe = document.createElement("iframe"); + element?.appendChild(this.iframe); + } else { + this.iframe = selector; + } + + // Set preview iframe styles + setPreviewIframeProperties(this.iframe, this.options); + } + + private async setLocationURLIntoIFrame(): Promise { + if (this.iframePreviewUrl) { + await loadPreviewIframe(this.iframe, this.iframePreviewUrl); + } + } + + /** + * Send all messages and events to tell to the + * consumer that the bundler is ready without any error + */ + private dispatchDoneMessage(): void { + this.status = "done"; + this.dispatch({ type: "done", compilatonError: false }); + + if (this.iframePreviewUrl) { + this.dispatch({ + type: "urlchange", + url: this.iframePreviewUrl, + back: false, + forward: false, + }); + } + } + + private async globalListeners(): Promise { + // window.addEventListener("message", (event) => { + // if (event.data.type === PREVIEW_LOADED_MESSAGE_TYPE) { + // injectScriptToIframe(this.iframe, this.messageChannelId); + // } + // if ( + // event.data.type === "urlchange" && + // event.data.channelId === this.messageChannelId + // ) { + // this.dispatch({ + // type: "urlchange", + // url: event.data.url, + // back: event.data.back, + // forward: event.data.forward, + // }); + // } else if (event.data.channelId === this.messageChannelId) { + // this.dispatch(event.data); + // } + // }); + // await this.emulator.fs.watch( + // ["*"], + // [ + // ".next", + // "node_modules", + // "build", + // "dist", + // "vendor", + // ".config", + // ".vuepress", + // ], + // async (message) => { + // if (!message) return; + // const event = message as FSWatchEvent; + // const path = + // "newPath" in event + // ? event.newPath + // : "path" in event + // ? event.path + // : ""; + // const { type } = await this.emulator.fs.stat(path); + // if (type !== "file") return null; + // try { + // switch (event.type) { + // case "change": + // case "create": { + // const content = await this.emulator.fs.readFile( + // event.path, + // "utf8" + // ); + // this.dispatch({ + // type: "fs/change", + // path: event.path, + // content: content, + // }); + // this._modulesCache.set(event.path, writeBuffer(content)); + // break; + // } + // case "remove": + // this.dispatch({ + // type: "fs/remove", + // path: event.path, + // }); + // this._modulesCache.delete(event.path); + // break; + // case "rename": { + // this.dispatch({ + // type: "fs/remove", + // path: event.oldPath, + // }); + // this._modulesCache.delete(event.oldPath); + // const newContent = await this.emulator.fs.readFile( + // event.newPath, + // "utf8" + // ); + // this.dispatch({ + // type: "fs/change", + // path: event.newPath, + // content: newContent, + // }); + // this._modulesCache.set(event.newPath, writeBuffer(newContent)); + // break; + // } + // case "close": + // break; + // } + // } catch (err) { + // this.dispatch({ + // type: "action", + // action: "notification", + // notificationType: "error", + // title: getMessageFromError(err as Error), + // }); + // } + // } + // ); + } + + /** + * PUBLIC Methods + */ + public async restartShellProcess(): Promise { + throw Error("Not implemented"); + // if (this.emulatorShellProcess && this.emulatorCommand) { + // // 1. Set the loading state and clean the URL + // this.dispatch({ type: "start", firstLoad: true }); + // this.status = "initializing"; + + // // 2. Exit shell + // await this.emulatorShellProcess.kill(); + // this.iframe?.removeAttribute("attr"); + + // this.emulator.fs.rm("/node_modules/.vite", { + // recursive: true, + // force: true, + // }); + + // // 3 Run command again + // await this.compile(Object.fromEntries(this._modulesCache)); + // } + } + + public updateSandbox(setup: SandboxSetup): void { + const modules = fromBundlerFilesToFS(setup.files); + + /** + * Update file changes + */ + + // TODO: figure out if sandbox is running + // if (this.sandbox.?.state === "running") { + // Object.entries(modules).forEach(([key, value]) => { + // if ( + // !this._modulesCache.get(key) || + // readBuffer(value) !== readBuffer(this._modulesCache.get(key)) + // ) { + // this.sandbox.fs.writeFile(key, value); + // } + // }); + + // return; + // } + + /** + * Pass init files to the bundler + */ + this.dispatch({ + codesandbox: true, + modules, + template: setup.template, + type: "compile", + }); + + /** + * Add modules to cache, this will ensure uniqueness changes + * + * Keep it after the compile action, in order to update the cache at the right moment + */ + Object.entries(modules).forEach(([key, value]) => { + this._modulesCache.set(key, writeBuffer(value)); + }); + } + + public async dispatch(message: SandpackNodeMessage): Promise { + switch (message.type) { + case "compile": + this.compile(message.modules); + break; + + case "refresh": + await this.setLocationURLIntoIFrame(); + break; + + case "urlback": + case "urlforward": + this.iframe?.contentWindow?.postMessage(message, "*"); + break; + + default: + this.emitter.dispatch(message); + } + } + + public listen(listener: ListenerFunction): UnsubscribeFunction { + return this.emitter.listener(listener); + } + + public destroy(): void { + this.emitter.cleanup(); + this.sandbox.hibernate(); + } +} diff --git a/sandpack-client/src/clients/vm/inject-scripts/historyListener.ts b/sandpack-client/src/clients/vm/inject-scripts/historyListener.ts new file mode 100644 index 000000000..142bd814a --- /dev/null +++ b/sandpack-client/src/clients/vm/inject-scripts/historyListener.ts @@ -0,0 +1,85 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/explicit-function-return-type, no-restricted-globals, @typescript-eslint/no-explicit-any */ + +export function setupHistoryListeners({ + scope, +}: { + scope: { channelId: string }; +}) { + // @ts-ignore + const origHistoryProto = window.history.__proto__; + + const historyList: Array<{ state: string; url: string }> = []; + let historyPosition = 0; + + const dispatchMessage = (url: string) => { + parent.postMessage( + { + type: "urlchange", + url, + back: historyPosition > 0, + forward: historyPosition < historyList.length - 1, + channelId: scope.channelId, + }, + "*" + ); + }; + + function pushHistory(url: string, state: string) { + // remove "future" locations + historyList.splice(historyPosition + 1); + historyList.push({ url, state }); + historyPosition = historyList.length - 1; + } + + Object.assign(window.history, { + go(delta: number) { + const newPos = historyPosition + delta; + if (newPos >= 0 && newPos <= historyList.length - 1) { + historyPosition = newPos; + + const { url, state } = historyList[historyPosition]; + origHistoryProto.replaceState.call(window.history, state, "", url); + + const newURL = document.location.href; + dispatchMessage(newURL); + + window.dispatchEvent(new PopStateEvent("popstate", { state })); + } + }, + + back() { + window.history.go(-1); + }, + + forward() { + window.history.go(1); + }, + + pushState(state: string, title: string, url: string) { + origHistoryProto.replaceState.call(window.history, state, title, url); + pushHistory(url, state); + dispatchMessage(document.location.href); + }, + + replaceState(state: string, title: string, url: string) { + origHistoryProto.replaceState.call(window.history, state, title, url); + historyList[historyPosition] = { state, url }; + dispatchMessage(document.location.href); + }, + }); + + interface NavigationMessage { + type: "urlback" | "urlforward" | "refresh"; + } + function handleMessage({ data }: { data: NavigationMessage }) { + if (data.type === "urlback") { + history.back(); + } else if (data.type === "urlforward") { + history.forward(); + } else if (data.type === "refresh") { + document.location.reload(); + } + } + + window.addEventListener("message", handleMessage); +} diff --git a/sandpack-client/src/clients/vm/inject-scripts/index.ts b/sandpack-client/src/clients/vm/inject-scripts/index.ts new file mode 100644 index 000000000..86bb62cc5 --- /dev/null +++ b/sandpack-client/src/clients/vm/inject-scripts/index.ts @@ -0,0 +1,36 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ + +import type { InjectMessage } from "@codesandbox/nodebox"; +import { INJECT_MESSAGE_TYPE } from "@codesandbox/nodebox"; + +// get the bundled file, which contains all dependencies +// @ts-ignore +import consoleHook from "../../../inject-scripts/dist/consoleHook.js"; + +import { setupHistoryListeners } from "./historyListener"; +import { watchResize } from "./resize.js"; + +const scripts = [ + { code: setupHistoryListeners.toString(), id: "historyListener" }, + { + code: "function consoleHook({ scope }) {" + consoleHook + "\n};", + id: "consoleHook", + }, + { code: watchResize.toString(), id: "watchResize" }, +]; + +export const injectScriptToIframe = ( + iframe: HTMLIFrameElement, + channelId: string +): void => { + scripts.forEach(({ code, id }) => { + const message: InjectMessage = { + uid: id, + type: INJECT_MESSAGE_TYPE, + code: `exports.activate = ${code}`, + scope: { channelId }, + }; + + iframe.contentWindow?.postMessage(message, "*"); + }); +}; diff --git a/sandpack-client/src/clients/vm/inject-scripts/resize.ts b/sandpack-client/src/clients/vm/inject-scripts/resize.ts new file mode 100644 index 000000000..c3d41f4ed --- /dev/null +++ b/sandpack-client/src/clients/vm/inject-scripts/resize.ts @@ -0,0 +1,57 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +export function watchResize({ scope }: { scope: { channelId: string } }) { + let lastHeight = 0; + + function getDocumentHeight(): number { + if (typeof window === "undefined") return 0; + + const { body } = document; + const html = document.documentElement; + + return Math.max(body.scrollHeight, body.offsetHeight, html.offsetHeight); + } + + function sendResizeEvent() { + const height = getDocumentHeight(); + + if (lastHeight !== height) { + window.parent.postMessage( + { + type: "resize", + height, + codesandbox: true, + channelId: scope.channelId, + }, + "*" + ); + } + + lastHeight = height; + } + + sendResizeEvent(); + + let throttle: any; + const observer = new MutationObserver(() => { + if (throttle === undefined) { + sendResizeEvent(); + + throttle = setTimeout(() => { + throttle = undefined; + }, 300); + } + }); + + observer.observe(document, { + attributes: true, + childList: true, + subtree: true, + }); + + /** + * Ideally we should only use a `MutationObserver` to trigger a resize event, + * however, we noted that it's not 100% reliable, so we went for polling strategy as well + */ + setInterval(sendResizeEvent, 300); +} diff --git a/sandpack-client/src/clients/vm/types.ts b/sandpack-client/src/clients/vm/types.ts new file mode 100644 index 000000000..0758e50d3 --- /dev/null +++ b/sandpack-client/src/clients/vm/types.ts @@ -0,0 +1,74 @@ +import type { FilesMap } from "@codesandbox/nodebox"; + +import type { + BaseSandpackMessage, + SandpackErrorMessage, + SandpackLogLevel, +} from "../.."; + +type SandpackStandartMessages = + | { + type: "start"; + firstLoad?: boolean; + } + | { + type: "done"; + compilatonError: boolean; + }; + +type SandpackBundlerMessages = + | { + type: "compile"; + modules: FilesMap; + template?: string; + logLevel?: SandpackLogLevel; + } + | ({ + type: "action"; + action: "show-error"; + } & SandpackErrorMessage) + | { + type: "action"; + action: "notification"; + notificationType: "error"; + title: string; + }; + +type SandpackFSMessages = + | { type: "fs/change"; path: string; content: string } + | { type: "fs/remove"; path: string }; + +type SandpackURLsMessages = + | { + type: "urlchange"; + url: string; + back: boolean; + forward: boolean; + } + | { + type: "refresh"; + } + | { + type: "urlback"; + } + | { + type: "urlforward"; + }; + +export type SandpackNodeMessage = BaseSandpackMessage & + ( + | SandpackStandartMessages + | SandpackURLsMessages + | SandpackBundlerMessages + | { type: "connected" } + | { + type: "stdout"; + payload: SandpackShellStdoutData; + } + | SandpackFSMessages + ); + +export interface SandpackShellStdoutData { + data?: string; + type?: "out" | "err"; +} diff --git a/sandpack-client/src/types.ts b/sandpack-client/src/types.ts index 9e4fc8ce8..128683d6e 100644 --- a/sandpack-client/src/types.ts +++ b/sandpack-client/src/types.ts @@ -397,4 +397,5 @@ export type SandpackTemplate = | "static" | "solid" | "nextjs" - | "node"; + | "node" + | "vm"; diff --git a/yarn.lock b/yarn.lock index 40687fa2c..025e67f18 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2072,6 +2072,13 @@ outvariant "^1.4.0" strict-event-emitter "^0.4.3" +"@codesandbox/sdk@latest": + version "0.0.0-alpha.1" + resolved "https://registry.yarnpkg.com/@codesandbox/sdk/-/sdk-0.0.0-alpha.1.tgz#33bb656e3127ab91ca887a06e1a3d62082403a57" + integrity sha512-pf4bWYd8u1pg/cHVez4JLfYC+ibpPYC4bPpGNOEFrs5nYCAIBnEQtnXEEiq96CdT9UaFOPgJiRVcTF9GD1RKvw== + dependencies: + "@hey-api/client-fetch" "^0.4.2" + "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" @@ -2353,6 +2360,11 @@ dependencies: client-only "^0.0.1" +"@hey-api/client-fetch@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@hey-api/client-fetch/-/client-fetch-0.4.2.tgz#02924579205dcfd4cb7c33db236007cb617ab30d" + integrity sha512-9BqcLTjsM3rWbads3afJkELS86vK7EqJvYgT429EVS9IO/kN75HEka3Ay/k142xCHSfXOuOShMdDam3nbG8wVA== + "@humanwhocodes/config-array@^0.11.8": version "0.11.13" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" From db9600c6082e99fc0187bf6ec998e3cd40ffb7bd Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Tue, 5 Nov 2024 16:08:06 +0000 Subject: [PATCH 02/14] get ports --- sandpack-client/package.json | 2 +- sandpack-client/src/clients/vm/index.ts | 98 ++++++++++++++-------- sandpack-react/src/Playground.stories.tsx | 18 +--- sandpack-react/src/templates/node/nexjs.ts | 2 +- yarn.lock | 8 +- 5 files changed, 69 insertions(+), 59 deletions(-) diff --git a/sandpack-client/package.json b/sandpack-client/package.json index 6834eede0..7f70e96b1 100644 --- a/sandpack-client/package.json +++ b/sandpack-client/package.json @@ -56,7 +56,7 @@ ], "dependencies": { "@codesandbox/nodebox": "0.1.8", - "@codesandbox/sdk": "latest", + "@codesandbox/sdk": "0.0.0-alpha.2", "buffer": "^6.0.3", "dequal": "^2.0.2", "mime-db": "^1.52.0", diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts index 3caee4c25..24bb9b742 100644 --- a/sandpack-client/src/clients/vm/index.ts +++ b/sandpack-client/src/clients/vm/index.ts @@ -23,8 +23,9 @@ import { } from "./client.utils"; import { loadPreviewIframe, setPreviewIframeProperties } from "./iframe.utils"; import type { SandpackNodeMessage } from "./types"; +import { PortInfo } from "@codesandbox/sdk/dist/esm/ports"; -const token = ""; +const token = localStorage.getItem("sandpack-vm") || ""; const sdk = new CodeSandbox(token); export class SandpackVM extends SandpackClient { @@ -58,12 +59,29 @@ export class SandpackVM extends SandpackClient { this.updateSandbox(sandboxInfo); } + async ensureDirectoryExist(path: string): Promise { + const directory = path.split("/").slice(0, -1).join("/"); + + if (directory === ".") { + return Promise.resolve(); + } + + await this.sandbox.fs.mkdir(directory, true); + } + // Initialize sandbox, should only ever be called once private async _init(files: FilesMap): Promise { this.sandbox = await sdk.createSandbox(); for (const [key, value] of Object.entries(files)) { - this.sandbox.fs.writeTextFile(key, readBuffer(value)); + const path = key.startsWith(".") ? key : `.${key}`; + + await this.ensureDirectoryExist(path); + + await this.sandbox.fs.writeFile(path, writeBuffer(value), { + create: true, + overwrite: true, + }); } await this.globalListeners(); @@ -84,12 +102,7 @@ export class SandpackVM extends SandpackClient { this.dispatch({ type: "connected" }); - // 3. Create, run task and assign preview - // const { id: shellId } = await this.createShellProcessFromTask(files); - - // 4. Launch Preview - // await this.createPreviewURLFromId(shellId); - // await this.setLocationURLIntoIFrame(); + await this.setLocationURLIntoIFrame(); // 5. Returns to consumer this.dispatchDoneMessage(); @@ -105,12 +118,6 @@ export class SandpackVM extends SandpackClient { } } - private async createPreviewURLFromId(id: string): Promise { - // this.iframePreviewUrl = undefined; - // const { url } = await this.emulator.preview.getByShellId(id); - // this.iframePreviewUrl = url + (this.options.startRoute ?? ""); - } - /** * Nodebox needs to handle two types of iframes at the same time: * @@ -137,7 +144,27 @@ export class SandpackVM extends SandpackClient { setPreviewIframeProperties(this.iframe, this.options); } + private awaitForPorts(): Promise { + return new Promise((resolve) => { + const initPorts = this.sandbox.ports.getOpenedPorts(); + + if (initPorts.length > 0) { + resolve(initPorts[0]); + + return; + } + + this.sandbox.ports.onDidPortOpen(() => { + resolve(this.sandbox.ports.getOpenedPorts()[0]); + }); + }); + } + private async setLocationURLIntoIFrame(): Promise { + const port = await this.awaitForPorts(); + + this.iframePreviewUrl = this.sandbox.ports.getPreviewUrl(port.port); + if (this.iframePreviewUrl) { await loadPreviewIframe(this.iframe, this.iframePreviewUrl); } @@ -180,19 +207,22 @@ export class SandpackVM extends SandpackClient { // this.dispatch(event.data); // } // }); - // await this.emulator.fs.watch( - // ["*"], - // [ - // ".next", - // "node_modules", - // "build", - // "dist", - // "vendor", - // ".config", - // ".vuepress", - // ], + // await this.sandbox.fs.watch( + // "*", + // { + // excludes: [ + // ".next", + // "node_modules", + // "build", + // "dist", + // "vendor", + // ".config", + // ".vuepress", + // ], + // }, // async (message) => { // if (!message) return; + // debugger; // const event = message as FSWatchEvent; // const path = // "newPath" in event @@ -200,20 +230,17 @@ export class SandpackVM extends SandpackClient { // : "path" in event // ? event.path // : ""; - // const { type } = await this.emulator.fs.stat(path); + // const { type } = await this.sandbox.fs.stat(path); // if (type !== "file") return null; // try { // switch (event.type) { // case "change": // case "create": { - // const content = await this.emulator.fs.readFile( - // event.path, - // "utf8" - // ); + // const content = await this.sandbox.fs.readFile(event.path); // this.dispatch({ // type: "fs/change", // path: event.path, - // content: content, + // content: readBuffer(content), // }); // this._modulesCache.set(event.path, writeBuffer(content)); // break; @@ -231,14 +258,11 @@ export class SandpackVM extends SandpackClient { // path: event.oldPath, // }); // this._modulesCache.delete(event.oldPath); - // const newContent = await this.emulator.fs.readFile( - // event.newPath, - // "utf8" - // ); + // const newContent = await this.sandbox.fs.readFile(event.newPath); // this.dispatch({ // type: "fs/change", // path: event.newPath, - // content: newContent, + // content: readBuffer(newContent), // }); // this._modulesCache.set(event.newPath, writeBuffer(newContent)); // break; @@ -296,7 +320,7 @@ export class SandpackVM extends SandpackClient { // !this._modulesCache.get(key) || // readBuffer(value) !== readBuffer(this._modulesCache.get(key)) // ) { - // this.sandbox.fs.writeFile(key, value); + // this.sandbox.fs.writeFile(key, value, { create: true, overwrite: true }); // } // }); diff --git a/sandpack-react/src/Playground.stories.tsx b/sandpack-react/src/Playground.stories.tsx index 1cbb2b563..28f9e33f4 100644 --- a/sandpack-react/src/Playground.stories.tsx +++ b/sandpack-react/src/Playground.stories.tsx @@ -1,26 +1,12 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import React from "react"; -import { - SandpackCodeEditor, - SandpackFileExplorer, - SandpackLayout, - SandpackProvider, -} from "./"; +import { Sandpack } from "./"; export default { title: "Intro/Playground", }; export const Basic: React.FC = () => { - return ( -
- - - - - - -
- ); + return ; }; diff --git a/sandpack-react/src/templates/node/nexjs.ts b/sandpack-react/src/templates/node/nexjs.ts index 1aeaf4542..304a6e44c 100644 --- a/sandpack-react/src/templates/node/nexjs.ts +++ b/sandpack-react/src/templates/node/nexjs.ts @@ -57,5 +57,5 @@ module.exports = nextConfig }, }, main: "/pages/index.js", - environment: "node", + environment: "vm", }; diff --git a/yarn.lock b/yarn.lock index 025e67f18..df227124f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2072,10 +2072,10 @@ outvariant "^1.4.0" strict-event-emitter "^0.4.3" -"@codesandbox/sdk@latest": - version "0.0.0-alpha.1" - resolved "https://registry.yarnpkg.com/@codesandbox/sdk/-/sdk-0.0.0-alpha.1.tgz#33bb656e3127ab91ca887a06e1a3d62082403a57" - integrity sha512-pf4bWYd8u1pg/cHVez4JLfYC+ibpPYC4bPpGNOEFrs5nYCAIBnEQtnXEEiq96CdT9UaFOPgJiRVcTF9GD1RKvw== +"@codesandbox/sdk@0.0.0-alpha.2": + version "0.0.0-alpha.2" + resolved "https://registry.yarnpkg.com/@codesandbox/sdk/-/sdk-0.0.0-alpha.2.tgz#f10641ff1504fe632167c845a4d2cd397a2d2537" + integrity sha512-U2BzgSyVV6z2JYyLH/21/83RqKEOaHqTGvfY7PHIjbDK/48YdzaQwgEL6i746c8xg077QeZBpHHYtKZMFVMQZw== dependencies: "@hey-api/client-fetch" "^0.4.2" From d0f87737687473bafeaebe75b175282c88917dc9 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Fri, 8 Nov 2024 10:50:31 +0000 Subject: [PATCH 03/14] introduce template id --- sandpack-client/package.json | 2 +- sandpack-client/src/clients/vm/index.ts | 60 +++++++------------ sandpack-client/src/types.ts | 1 + sandpack-client/src/utils.ts | 1 - .../src/contexts/utils/useClient.ts | 1 + sandpack-react/src/contexts/utils/useFiles.ts | 1 + sandpack-react/src/presets/Sandpack.tsx | 22 ++++--- sandpack-react/src/templates/index.tsx | 52 ++++++++-------- sandpack-react/src/types.ts | 8 ++- sandpack-react/src/utils/sandpackUtils.ts | 34 ++++++++--- yarn.lock | 8 +-- 11 files changed, 103 insertions(+), 87 deletions(-) diff --git a/sandpack-client/package.json b/sandpack-client/package.json index 7f70e96b1..301a33213 100644 --- a/sandpack-client/package.json +++ b/sandpack-client/package.json @@ -56,7 +56,7 @@ ], "dependencies": { "@codesandbox/nodebox": "0.1.8", - "@codesandbox/sdk": "0.0.0-alpha.2", + "@codesandbox/sdk": "0.0.0-alpha.3", "buffer": "^6.0.3", "dequal": "^2.0.2", "mime-db": "^1.52.0", diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts index 24bb9b742..82f975539 100644 --- a/sandpack-client/src/clients/vm/index.ts +++ b/sandpack-client/src/clients/vm/index.ts @@ -3,6 +3,7 @@ import type { FilesMap } from "@codesandbox/nodebox"; import type { Sandbox } from "@codesandbox/sdk"; import { CodeSandbox } from "@codesandbox/sdk"; +import type { PortInfo } from "@codesandbox/sdk/dist/esm/ports"; import type { ClientOptions, @@ -23,7 +24,6 @@ import { } from "./client.utils"; import { loadPreviewIframe, setPreviewIframeProperties } from "./iframe.utils"; import type { SandpackNodeMessage } from "./types"; -import { PortInfo } from "@codesandbox/sdk/dist/esm/ports"; const token = localStorage.getItem("sandpack-vm") || ""; const sdk = new CodeSandbox(token); @@ -71,11 +71,13 @@ export class SandpackVM extends SandpackClient { // Initialize sandbox, should only ever be called once private async _init(files: FilesMap): Promise { - this.sandbox = await sdk.createSandbox(); + // TODO: move to server + this.sandbox = await sdk.sandbox.create({ + template: this.sandboxSetup.templateID, + }); for (const [key, value] of Object.entries(files)) { const path = key.startsWith(".") ? key : `.${key}`; - await this.ensureDirectoryExist(path); await this.sandbox.fs.writeFile(path, writeBuffer(value), { @@ -104,7 +106,6 @@ export class SandpackVM extends SandpackClient { await this.setLocationURLIntoIFrame(); - // 5. Returns to consumer this.dispatchDoneMessage(); } catch (err) { this.dispatch({ @@ -285,47 +286,30 @@ export class SandpackVM extends SandpackClient { /** * PUBLIC Methods */ - public async restartShellProcess(): Promise { - throw Error("Not implemented"); - // if (this.emulatorShellProcess && this.emulatorCommand) { - // // 1. Set the loading state and clean the URL - // this.dispatch({ type: "start", firstLoad: true }); - // this.status = "initializing"; - - // // 2. Exit shell - // await this.emulatorShellProcess.kill(); - // this.iframe?.removeAttribute("attr"); - - // this.emulator.fs.rm("/node_modules/.vite", { - // recursive: true, - // force: true, - // }); - - // // 3 Run command again - // await this.compile(Object.fromEntries(this._modulesCache)); - // } - } - public updateSandbox(setup: SandboxSetup): void { const modules = fromBundlerFilesToFS(setup.files); /** * Update file changes */ + if (this.status === "done") { + Object.entries(modules).forEach(async ([key, value]) => { + if ( + !this._modulesCache.get(key) || + readBuffer(value) !== readBuffer(this._modulesCache.get(key)) + ) { + const path = key.startsWith(".") ? key : `.${key}`; + await this.ensureDirectoryExist(path); + + this.sandbox.fs.writeFile(key, writeBuffer(value), { + create: true, + overwrite: true, + }); + } + }); - // TODO: figure out if sandbox is running - // if (this.sandbox.?.state === "running") { - // Object.entries(modules).forEach(([key, value]) => { - // if ( - // !this._modulesCache.get(key) || - // readBuffer(value) !== readBuffer(this._modulesCache.get(key)) - // ) { - // this.sandbox.fs.writeFile(key, value, { create: true, overwrite: true }); - // } - // }); - - // return; - // } + return; + } /** * Pass init files to the bundler diff --git a/sandpack-client/src/types.ts b/sandpack-client/src/types.ts index 128683d6e..3e851c510 100644 --- a/sandpack-client/src/types.ts +++ b/sandpack-client/src/types.ts @@ -83,6 +83,7 @@ export interface SandboxSetup { dependencies?: Dependencies; devDependencies?: Dependencies; entry?: string; + templateID?: string; /** * What template we use, if not defined we infer the template from the dependencies or files. * diff --git a/sandpack-client/src/utils.ts b/sandpack-client/src/utils.ts index d2d8eba47..5b0e71bea 100644 --- a/sandpack-client/src/utils.ts +++ b/sandpack-client/src/utils.ts @@ -52,7 +52,6 @@ export function addPackageJSONIfNeeded( */ if (!packageJsonFile) { nullthrows(dependencies, DEPENDENCY_ERROR_MESSAGE); - nullthrows(entry, ENTRY_ERROR_MESSAGE); normalizedFilesPath["/package.json"] = { code: createPackageJSON(dependencies, devDependencies, entry), diff --git a/sandpack-react/src/contexts/utils/useClient.ts b/sandpack-react/src/contexts/utils/useClient.ts index 13c702720..63ec88e83 100644 --- a/sandpack-react/src/contexts/utils/useClient.ts +++ b/sandpack-react/src/contexts/utils/useClient.ts @@ -178,6 +178,7 @@ export const useClient: UseClient = ( { files: filesState.files, template: filesState.environment, + templateID: filesState.templateID, }, { externalResources: options.externalResources, diff --git a/sandpack-react/src/contexts/utils/useFiles.ts b/sandpack-react/src/contexts/utils/useFiles.ts index 97752c3a0..4713aada4 100644 --- a/sandpack-react/src/contexts/utils/useFiles.ts +++ b/sandpack-react/src/contexts/utils/useFiles.ts @@ -20,6 +20,7 @@ export interface FilesState { visibleFiles: Array | string>; activeFile: TemplateFiles | string; shouldUpdatePreview: boolean; + templateID?: string; } interface FilesOperations { diff --git a/sandpack-react/src/presets/Sandpack.tsx b/sandpack-react/src/presets/Sandpack.tsx index fa74f1b03..b48dcc825 100644 --- a/sandpack-react/src/presets/Sandpack.tsx +++ b/sandpack-react/src/presets/Sandpack.tsx @@ -86,15 +86,19 @@ export const Sandpack: SandpackInternal = ({ const [counter, setCounter] = React.useState(0); const hasRightColumn = options.showConsole || options.showConsoleButton; - /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */ - const templateFiles = SANDBOX_TEMPLATES[template!] ?? {}; - const mode = ( - options?.layout - ? options?.layout - : "mode" in templateFiles - ? templateFiles.mode - : "preview" - ) as typeof options.layout; + function getMode() { + if (options?.layout) { + return options.layout; + } + + const templateFiles = SANDBOX_TEMPLATES[template!]; + if (typeof templateFiles === "object" && "mode" in templateFiles) { + return templateFiles.mode; + } + + return "preview"; + } + const mode = getMode(); const actionsChildren = options.showConsoleButton ? ( = - keyof typeof SANDBOX_TEMPLATES[Name]["files"]; + keyof (typeof SANDBOX_TEMPLATES)[Name]["files"]; export interface SandpackInternal { < @@ -643,8 +644,9 @@ export interface SandboxTemplate { dependencies: Record; devDependencies?: Record; entry?: string; - main: string; + main?: string; environment: SandboxEnvironment; + templateID?: string; } export type SandpackFiles = Record; diff --git a/sandpack-react/src/utils/sandpackUtils.ts b/sandpack-react/src/utils/sandpackUtils.ts index fe4516565..5d42ef881 100644 --- a/sandpack-react/src/utils/sandpackUtils.ts +++ b/sandpack-react/src/utils/sandpackUtils.ts @@ -23,6 +23,7 @@ export interface SandpackContextInfo { files: Record; environment: SandboxEnvironment; shouldUpdatePreview: true; + templateID?: string; } /** @@ -72,7 +73,7 @@ export const getSandpackStateFromProps = ( }); } - if (visibleFiles.length === 0) { + if (visibleFiles.length === 0 && projectSetup.main) { // If no files are received, use the project setup / template visibleFiles = [projectSetup.main]; } @@ -99,12 +100,16 @@ export const getSandpackStateFromProps = ( visibleFiles.push(activeFile); } - const files = addPackageJSONIfNeeded( - projectSetup.files, - projectSetup.dependencies ?? {}, - projectSetup.devDependencies ?? {}, - projectSetup.entry - ); + let files = projectSetup.files; + + if (projectSetup.environment !== "vm") { + files = addPackageJSONIfNeeded( + projectSetup.files, + projectSetup.dependencies ?? {}, + projectSetup.devDependencies ?? {}, + projectSetup.entry + ); + } const existOpenPath = visibleFiles.filter((path) => files[path]); @@ -115,6 +120,7 @@ export const getSandpackStateFromProps = ( files, environment: projectSetup.environment, shouldUpdatePreview: true, + templateID: projectSetup.templateID, }; }; @@ -210,6 +216,20 @@ const combineTemplateFilesToSetup = ({ ); } + /** + * Sandbox template id for VM env + */ + if (baseTemplate.templateID) { + return { + files: convertedFilesToBundlerFiles(files), + dependencies: customSetup?.dependencies ?? {}, + devDependencies: customSetup?.devDependencies, + entry: normalizePath(customSetup?.entry), + environment: customSetup?.environment || baseTemplate.environment, + templateID: baseTemplate.templateID, + }; + } + // If no setup and not files, the template is used entirely if (!customSetup && !files) { return baseTemplate; diff --git a/yarn.lock b/yarn.lock index df227124f..eb2c469b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2072,10 +2072,10 @@ outvariant "^1.4.0" strict-event-emitter "^0.4.3" -"@codesandbox/sdk@0.0.0-alpha.2": - version "0.0.0-alpha.2" - resolved "https://registry.yarnpkg.com/@codesandbox/sdk/-/sdk-0.0.0-alpha.2.tgz#f10641ff1504fe632167c845a4d2cd397a2d2537" - integrity sha512-U2BzgSyVV6z2JYyLH/21/83RqKEOaHqTGvfY7PHIjbDK/48YdzaQwgEL6i746c8xg077QeZBpHHYtKZMFVMQZw== +"@codesandbox/sdk@0.0.0-alpha.3": + version "0.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/@codesandbox/sdk/-/sdk-0.0.0-alpha.3.tgz#d1ee6e3fe9619e74878acd137e1909f5be78647d" + integrity sha512-oeAjbKJPsUWa9infhpgKjO2GzIslpAfTXSPUPmJ3dvalV9BH/4qABVQmkRr1HOIUsgkcAjkyZ4KsKmMjyxjXGw== dependencies: "@hey-api/client-fetch" "^0.4.2" From 6a8f00ad3e83e009493802529669ab458037dba5 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Fri, 8 Nov 2024 11:47:44 +0000 Subject: [PATCH 04/14] enable nextjs env --- .../components/sandpack-examples.tsx | 5 +--- examples/nextjs-app-dir/next-env.d.ts | 2 +- package.json | 4 ++- sandpack-client/src/clients/vm/index.ts | 8 +++--- sandpack-react/src/types.ts | 2 ++ yarn.lock | 26 +++++++++++++++++++ 6 files changed, 38 insertions(+), 9 deletions(-) diff --git a/examples/nextjs-app-dir/components/sandpack-examples.tsx b/examples/nextjs-app-dir/components/sandpack-examples.tsx index 710f03599..b7c69a3b9 100644 --- a/examples/nextjs-app-dir/components/sandpack-examples.tsx +++ b/examples/nextjs-app-dir/components/sandpack-examples.tsx @@ -7,10 +7,7 @@ import { githubLight, sandpackDark } from "@codesandbox/sandpack-themes"; export const SandpackExamples = () => { return ( <> - - - - + ); }; diff --git a/examples/nextjs-app-dir/next-env.d.ts b/examples/nextjs-app-dir/next-env.d.ts index 4f11a03dc..40c3d6809 100644 --- a/examples/nextjs-app-dir/next-env.d.ts +++ b/examples/nextjs-app-dir/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. diff --git a/package.json b/package.json index d1eaf64bd..8a0ede31d 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "sandpack-client", "sandpack-react", "sandpack-themes", + "examples/nextjs-app-dir", "website/*" ], "nohoist": [ @@ -26,7 +27,8 @@ "dev:docs": "yarn workspace sandpack-docs dev", "dev:react": "turbo run dev --filter=@codesandbox/sandpack-react --filter=@codesandbox/sandpack-client", "dev:landing": "yarn workspace sandpack-landing dev -p 3001", - "dev:theme": "yarn workspace sandpack-theme dev -p 3002" + "dev:theme": "yarn workspace sandpack-theme dev -p 3002", + "dev:nextjs": "yarn workspace nextjs-app-dir dev" }, "repository": { "type": "git", diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts index 82f975539..1a9839564 100644 --- a/sandpack-client/src/clients/vm/index.ts +++ b/sandpack-client/src/clients/vm/index.ts @@ -2,7 +2,7 @@ import type { FilesMap } from "@codesandbox/nodebox"; import type { Sandbox } from "@codesandbox/sdk"; -import { CodeSandbox } from "@codesandbox/sdk"; +import { connectToSandbox } from "@codesandbox/sdk/dist/cjs/browser"; import type { PortInfo } from "@codesandbox/sdk/dist/esm/ports"; import type { @@ -25,8 +25,8 @@ import { import { loadPreviewIframe, setPreviewIframeProperties } from "./iframe.utils"; import type { SandpackNodeMessage } from "./types"; -const token = localStorage.getItem("sandpack-vm") || ""; -const sdk = new CodeSandbox(token); +// const token = localStorage.getItem("sandpack-vm") || ""; +// const sdk = new CodeSandbox(token); export class SandpackVM extends SandpackClient { private emitter: EventEmitter; @@ -52,6 +52,8 @@ export class SandpackVM extends SandpackClient { this.emitter = new EventEmitter(); + debugger; + // Assign iframes this.manageIframes(selector); diff --git a/sandpack-react/src/types.ts b/sandpack-react/src/types.ts index bd3734536..586677634 100644 --- a/sandpack-react/src/types.ts +++ b/sandpack-react/src/types.ts @@ -407,6 +407,8 @@ export type SandpackThemeProp = */ export type TemplateFiles = + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore keyof (typeof SANDBOX_TEMPLATES)[Name]["files"]; export interface SandpackInternal { diff --git a/yarn.lock b/yarn.lock index eb2c469b9..c2e937bb1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4378,6 +4378,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae" integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w== +"@types/node@18.15.11": + version "18.15.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" + integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== + "@types/node@^18.0.0": version "18.18.7" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.7.tgz#bb3a7068dc4ba421b6968f2a259298b3a4e129e8" @@ -4430,6 +4435,13 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.6.tgz#7cb33992049fd7340d5b10c0098e104184dfcd2a" integrity sha512-+0autS93xyXizIYiyL02FCY8N+KkKPhILhcUSA276HxzreZ16kl+cmwvV2qAM/PuCCwPXzOXOWhiPcw20uSFcA== +"@types/react-dom@18.0.11": + version "18.0.11" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.11.tgz#321351c1459bc9ca3d216aefc8a167beec334e33" + integrity sha512-O38bPbI2CWtgw/OoQoY+BRelw7uysmXbWvw3nLWO21H1HSh+GOlqPuXshJfjmpNlKiiSDG9cc1JZAaMmVdcTlw== + dependencies: + "@types/react" "*" + "@types/react-dom@^18.0.6": version "18.0.8" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.8.tgz#d2606d855186cd42cc1b11e63a71c39525441685" @@ -4446,6 +4458,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@18.0.37": + version "18.0.37" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.37.tgz#7a784e2a8b8f83abb04dc6b9ed9c9b4c0aee9be7" + integrity sha512-4yaZZtkRN3ZIQD3KSEwkfcik8s0SWV+82dlJot1AbGYHCzJkWP3ENBY6wYeDRmKZ6HkrgoGAmR2HqdwYGp6OEw== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/resolve@1.20.2": version "1.20.2" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" @@ -16650,6 +16671,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== + "typescript@>=3 < 6", typescript@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" From 473e8fa030ee6c87a19dbaaacbdc941e557c9927 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Mon, 11 Nov 2024 15:40:52 +0000 Subject: [PATCH 05/14] logs --- .../app/api/sandbox/[id]/route.ts | 15 ++++ .../components/sandpack-examples.tsx | 2 +- sandpack-client/package.json | 2 +- sandpack-client/src/clients/vm/index.ts | 78 ++++++++++++++++--- .../src/hooks/useSandpackPreviewProgress.ts | 1 + yarn.lock | 8 +- 6 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 examples/nextjs-app-dir/app/api/sandbox/[id]/route.ts diff --git a/examples/nextjs-app-dir/app/api/sandbox/[id]/route.ts b/examples/nextjs-app-dir/app/api/sandbox/[id]/route.ts new file mode 100644 index 000000000..9131501cb --- /dev/null +++ b/examples/nextjs-app-dir/app/api/sandbox/[id]/route.ts @@ -0,0 +1,15 @@ +import { CodeSandbox } from "@codesandbox/sdk"; + +const apiKey = process.env.CSB_API_TOKEN as string; + +export const GET = async ( + req: Request, + { params }: { params: { id: string } } +) => { + const templateId = params.id; + const sdk = new CodeSandbox(apiKey, {}); + + const data = await sdk.sandbox.start(templateId); + + return new Response(JSON.stringify(data), { status: 200 }); +}; diff --git a/examples/nextjs-app-dir/components/sandpack-examples.tsx b/examples/nextjs-app-dir/components/sandpack-examples.tsx index b7c69a3b9..643aa13f1 100644 --- a/examples/nextjs-app-dir/components/sandpack-examples.tsx +++ b/examples/nextjs-app-dir/components/sandpack-examples.tsx @@ -7,7 +7,7 @@ import { githubLight, sandpackDark } from "@codesandbox/sandpack-themes"; export const SandpackExamples = () => { return ( <> - + ); }; diff --git a/sandpack-client/package.json b/sandpack-client/package.json index 301a33213..7f0fb9449 100644 --- a/sandpack-client/package.json +++ b/sandpack-client/package.json @@ -56,7 +56,7 @@ ], "dependencies": { "@codesandbox/nodebox": "0.1.8", - "@codesandbox/sdk": "0.0.0-alpha.3", + "@codesandbox/sdk": "0.0.0-alpha.8", "buffer": "^6.0.3", "dequal": "^2.0.2", "mime-db": "^1.52.0", diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts index 1a9839564..8d4e96fcf 100644 --- a/sandpack-client/src/clients/vm/index.ts +++ b/sandpack-client/src/clients/vm/index.ts @@ -1,9 +1,9 @@ /* eslint-disable no-console,@typescript-eslint/no-explicit-any,prefer-rest-params,@typescript-eslint/explicit-module-boundary-types */ import type { FilesMap } from "@codesandbox/nodebox"; -import type { Sandbox } from "@codesandbox/sdk"; -import { connectToSandbox } from "@codesandbox/sdk/dist/cjs/browser"; +import { connectToSandbox } from "@codesandbox/sdk/browser"; import type { PortInfo } from "@codesandbox/sdk/dist/esm/ports"; +import type { SandboxWithoutClient } from "@codesandbox/sdk/dist/esm/sandbox"; import type { ClientOptions, @@ -25,12 +25,31 @@ import { import { loadPreviewIframe, setPreviewIframeProperties } from "./iframe.utils"; import type { SandpackNodeMessage } from "./types"; -// const token = localStorage.getItem("sandpack-vm") || ""; -// const sdk = new CodeSandbox(token); +let groupId = 1; +const createLogGroup = (group: string) => { + let logId = 1; + + console.group(`[${groupId++}]: ${group}`); + + return { + groupEnd: () => console.groupEnd(), + log: (...args: any[]): void => { + console.info(`[${logId++}]:`, ...args); + }, + }; +}; + +const throwIfTimeout = (timeout: number) => { + return new Promise((_, reject) => + setTimeout(() => { + reject(new Error(`Timeout of ${timeout}ms exceeded`)); + }, timeout) + ); +}; export class SandpackVM extends SandpackClient { private emitter: EventEmitter; - private sandbox!: Sandbox; + private sandbox!: SandboxWithoutClient; private iframePreviewUrl: string | undefined; private _modulesCache = new Map(); private messageChannelId = generateRandomId(); @@ -45,6 +64,8 @@ export class SandpackVM extends SandpackClient { sandboxInfo: SandboxSetup, options: ClientOptions = {} ) { + const initLog = createLogGroup("Setup"); + super(selector, sandboxInfo, { ...options, bundlerURL: options.bundlerURL, @@ -52,11 +73,12 @@ export class SandpackVM extends SandpackClient { this.emitter = new EventEmitter(); - debugger; - // Assign iframes this.manageIframes(selector); + initLog.log("Create iframe"); + initLog.log("Trigger initial compile"); + initLog.groupEnd(); // Trigger initial compile this.updateSandbox(sandboxInfo); } @@ -73,11 +95,29 @@ export class SandpackVM extends SandpackClient { // Initialize sandbox, should only ever be called once private async _init(files: FilesMap): Promise { - // TODO: move to server - this.sandbox = await sdk.sandbox.create({ - template: this.sandboxSetup.templateID, - }); + const initLog = createLogGroup("Initializing sandbox..."); + + initLog.log("Fetching sandbox..."); + const response = await fetch( + `/api/sandbox/${this.sandboxSetup.templateID}` + ); + + const sandpackData = await response.json(); + initLog.log("Fetching sandbox success", sandpackData); + + initLog.log("Connecting sandbox..."); + this.sandbox = await Promise.race([ + throwIfTimeout(5000), + connectToSandbox(sandpackData), + ]); + initLog.log("Connecting sandbox success", this.sandbox); + initLog.groupEnd(); + + console.group("Files"); + + const filesLog = createLogGroup("Files"); + filesLog.log("Writing files..."); for (const [key, value] of Object.entries(files)) { const path = key.startsWith(".") ? key : `.${key}`; await this.ensureDirectoryExist(path); @@ -88,6 +128,9 @@ export class SandpackVM extends SandpackClient { }); } + filesLog.log("Writing files success"); + filesLog.groupEnd(); + await this.globalListeners(); } @@ -96,7 +139,6 @@ export class SandpackVM extends SandpackClient { */ private async compile(files: FilesMap): Promise { try { - // 1. Init this.status = "initializing"; this.dispatch({ type: "start", firstLoad: true }); if (!this._initPromise) { @@ -164,13 +206,25 @@ export class SandpackVM extends SandpackClient { } private async setLocationURLIntoIFrame(): Promise { + const initLog = createLogGroup("Preview"); + + initLog.log("Waiting for port..."); const port = await this.awaitForPorts(); + initLog.log("Pors found", port); + initLog.log("Getting preview url for port..."); this.iframePreviewUrl = this.sandbox.ports.getPreviewUrl(port.port); + initLog.log("Got preview url", this.iframePreviewUrl); if (this.iframePreviewUrl) { + initLog.log("Loading preview iframe..."); await loadPreviewIframe(this.iframe, this.iframePreviewUrl); + initLog.log("Preview iframe loaded"); + } else { + initLog.log("No preview url found"); } + + initLog.groupEnd(); } /** diff --git a/sandpack-react/src/hooks/useSandpackPreviewProgress.ts b/sandpack-react/src/hooks/useSandpackPreviewProgress.ts index 972809a06..bfd1ce134 100644 --- a/sandpack-react/src/hooks/useSandpackPreviewProgress.ts +++ b/sandpack-react/src/hooks/useSandpackPreviewProgress.ts @@ -46,6 +46,7 @@ export const useSandpackPreviewProgress = ( React.useEffect(() => { let timer: NodeJS.Timer; const unsubscribe = listen((message) => { + console.log(message); if (message.type === "start" && message.firstLoad) { setIsReady(false); } diff --git a/yarn.lock b/yarn.lock index c2e937bb1..1069afc0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2072,10 +2072,10 @@ outvariant "^1.4.0" strict-event-emitter "^0.4.3" -"@codesandbox/sdk@0.0.0-alpha.3": - version "0.0.0-alpha.3" - resolved "https://registry.yarnpkg.com/@codesandbox/sdk/-/sdk-0.0.0-alpha.3.tgz#d1ee6e3fe9619e74878acd137e1909f5be78647d" - integrity sha512-oeAjbKJPsUWa9infhpgKjO2GzIslpAfTXSPUPmJ3dvalV9BH/4qABVQmkRr1HOIUsgkcAjkyZ4KsKmMjyxjXGw== +"@codesandbox/sdk@0.0.0-alpha.8": + version "0.0.0-alpha.8" + resolved "https://registry.yarnpkg.com/@codesandbox/sdk/-/sdk-0.0.0-alpha.8.tgz#5505bf2506dde23050535be39878a7cb11e262a5" + integrity sha512-HaR8Mlhy0ccfCBSEm+ly/qxkSI51yBqXqDJjrPLR3sKkquphSntnG4FMA1zw6e43ktslLioZ01w/K2+T7zBlUw== dependencies: "@hey-api/client-fetch" "^0.4.2" From 58522a4f5de271038b6ba4f939d507701c8be062 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Tue, 12 Nov 2024 11:52:07 +0000 Subject: [PATCH 06/14] write files --- .../components/sandpack-examples.tsx | 17 +++- .../src/clients/vm/client.utils.ts | 68 ++++++++++++++ sandpack-client/src/clients/vm/index.ts | 89 +++++++++++++------ 3 files changed, 147 insertions(+), 27 deletions(-) diff --git a/examples/nextjs-app-dir/components/sandpack-examples.tsx b/examples/nextjs-app-dir/components/sandpack-examples.tsx index 643aa13f1..f3e4159d3 100644 --- a/examples/nextjs-app-dir/components/sandpack-examples.tsx +++ b/examples/nextjs-app-dir/components/sandpack-examples.tsx @@ -1,4 +1,11 @@ -import { Sandpack } from "@codesandbox/sandpack-react"; +import { + Sandpack, + SandpackCodeEditor, + SandpackFileExplorer, + SandpackLayout, + SandpackPreview, + SandpackProvider, +} from "@codesandbox/sandpack-react"; import { githubLight, sandpackDark } from "@codesandbox/sandpack-themes"; /** * The only reason this is a separate import, is so @@ -7,7 +14,13 @@ import { githubLight, sandpackDark } from "@codesandbox/sandpack-themes"; export const SandpackExamples = () => { return ( <> - + + + + + + + ); }; diff --git a/sandpack-client/src/clients/vm/client.utils.ts b/sandpack-client/src/clients/vm/client.utils.ts index 51aa0c3e6..0758d6e5d 100644 --- a/sandpack-client/src/clients/vm/client.utils.ts +++ b/sandpack-client/src/clients/vm/client.utils.ts @@ -1,3 +1,5 @@ +import type { SandboxWithoutClient } from "@codesandbox/sdk/dist/esm/sandbox"; + import { createError } from "../.."; import type { SandpackBundlerFiles } from "../../"; @@ -50,3 +52,69 @@ export const getMessageFromError = (error: Error | string): string => { "The server could not be reached. Make sure that the node script is running and that a port has been started." ); }; + +// Directories to ignore +const IGNORED_DIRS = new Set([ + "node_modules", + ".git", + "dist", + "build", + "coverage", + ".cache", + ".next", + ".nuxt", + ".output", + ".vscode", + ".idea", + ".devcontainer", + ".codesandbox", + "yarn.lock", + "pnpm-lock.yaml", +]); + +const TYPES = { + FILE: 0, + FOLDER: 1, +}; + +export async function scanDirectory( + dirPath: string, + fs: SandboxWithoutClient["fs"] +) { + const results: Array<{ path: string; content: Uint8Array }> = []; + + try { + const entries = await fs.readdir(dirPath); + + for (const entry of entries) { + const fullPath = dirPath + "/" + entry.name; + + // Skip ignored directories + if (entry.type === TYPES.FOLDER && IGNORED_DIRS.has(entry.name)) { + continue; + } + + if (entry.isSymlink) { + continue; + } + + if (entry.type === TYPES.FILE) { + results.push({ + path: fullPath, + content: await fs.readFile(fullPath), + }); + } + + // Recursively scan subdirectories + if (entry.type === TYPES.FOLDER) { + const subDirResults = await scanDirectory(fullPath, fs); + results.push(...subDirResults); + } + } + + return results; + } catch (error) { + console.error(`Error scanning directory ${dirPath}:`, error); + throw error; + } +} diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts index 8d4e96fcf..b8cbf5300 100644 --- a/sandpack-client/src/clients/vm/index.ts +++ b/sandpack-client/src/clients/vm/index.ts @@ -21,6 +21,7 @@ import { readBuffer, fromBundlerFilesToFS, writeBuffer, + scanDirectory, } from "./client.utils"; import { loadPreviewIframe, setPreviewIframeProperties } from "./iframe.utils"; import type { SandpackNodeMessage } from "./types"; @@ -84,13 +85,21 @@ export class SandpackVM extends SandpackClient { } async ensureDirectoryExist(path: string): Promise { + if (path === ".") { + return Promise.resolve(); + } + const directory = path.split("/").slice(0, -1).join("/"); if (directory === ".") { return Promise.resolve(); } - await this.sandbox.fs.mkdir(directory, true); + try { + await this.sandbox.fs.mkdir(directory, true); + } catch { + // File already exists + } } // Initialize sandbox, should only ever be called once @@ -98,9 +107,11 @@ export class SandpackVM extends SandpackClient { const initLog = createLogGroup("Initializing sandbox..."); initLog.log("Fetching sandbox..."); - const response = await fetch( - `/api/sandbox/${this.sandboxSetup.templateID}` - ); + // const response = await fetch( + // `/api/sandbox/${this.sandboxSetup.templateID}` + // ); + + const response = await fetch(`/api/sandbox/5c6t9h`); const sandpackData = await response.json(); @@ -108,14 +119,12 @@ export class SandpackVM extends SandpackClient { initLog.log("Connecting sandbox..."); this.sandbox = await Promise.race([ - throwIfTimeout(5000), + throwIfTimeout(10_000), connectToSandbox(sandpackData), ]); initLog.log("Connecting sandbox success", this.sandbox); initLog.groupEnd(); - console.group("Files"); - const filesLog = createLogGroup("Files"); filesLog.log("Writing files..."); for (const [key, value] of Object.entries(files)) { @@ -127,8 +136,28 @@ export class SandpackVM extends SandpackClient { overwrite: true, }); } - filesLog.log("Writing files success"); + + filesLog.log("Scaning VM FS..."); + + const vmFiles = await scanDirectory(".", this.sandbox.fs); + + vmFiles.forEach(({ path, content }) => { + const pathWithoutLeading = path.startsWith("./") + ? path.replace("./", "/") + : path; + + this._modulesCache.set(pathWithoutLeading, content); + + this.dispatch({ + type: "fs/change", + path: pathWithoutLeading, + content: readBuffer(content), + }); + }); + + filesLog.log("Scaning VM FS success", vmFiles); + filesLog.groupEnd(); await this.globalListeners(); @@ -189,18 +218,18 @@ export class SandpackVM extends SandpackClient { setPreviewIframeProperties(this.iframe, this.options); } - private awaitForPorts(): Promise { + private awaitForPorts(): Promise { return new Promise((resolve) => { const initPorts = this.sandbox.ports.getOpenedPorts(); if (initPorts.length > 0) { - resolve(initPorts[0]); + resolve(initPorts); return; } this.sandbox.ports.onDidPortOpen(() => { - resolve(this.sandbox.ports.getOpenedPorts()[0]); + resolve(this.sandbox.ports.getOpenedPorts()); }); }); } @@ -209,11 +238,17 @@ export class SandpackVM extends SandpackClient { const initLog = createLogGroup("Preview"); initLog.log("Waiting for port..."); - const port = await this.awaitForPorts(); - initLog.log("Pors found", port); + const ports = await this.awaitForPorts(); + initLog.log("Ports found", ports); + + const mainPort = ports.sort((a, b) => { + return a.port - b.port; + })[0]; + + initLog.log("Defined main port", mainPort); initLog.log("Getting preview url for port..."); - this.iframePreviewUrl = this.sandbox.ports.getPreviewUrl(port.port); + this.iframePreviewUrl = this.sandbox.ports.getPreviewUrl(mainPort.port); initLog.log("Got preview url", this.iframePreviewUrl); if (this.iframePreviewUrl) { @@ -342,27 +377,31 @@ export class SandpackVM extends SandpackClient { /** * PUBLIC Methods */ - public updateSandbox(setup: SandboxSetup): void { + public async updateSandbox(setup: SandboxSetup) { const modules = fromBundlerFilesToFS(setup.files); /** * Update file changes */ if (this.status === "done") { - Object.entries(modules).forEach(async ([key, value]) => { + for await (const [key, value] of Object.entries(modules)) { if ( !this._modulesCache.get(key) || readBuffer(value) !== readBuffer(this._modulesCache.get(key)) ) { - const path = key.startsWith(".") ? key : `.${key}`; - await this.ensureDirectoryExist(path); - - this.sandbox.fs.writeFile(key, writeBuffer(value), { - create: true, - overwrite: true, - }); + const ensureLeadingPath = key.startsWith(".") ? key : "." + key; + await this.ensureDirectoryExist(ensureLeadingPath); + console.log(this._modulesCache, key); + try { + this.sandbox.fs.writeFile(ensureLeadingPath, writeBuffer(value), { + create: true, + overwrite: true, + }); + } catch (error) { + console.error(error); + } } - }); + } return; } @@ -413,6 +452,6 @@ export class SandpackVM extends SandpackClient { public destroy(): void { this.emitter.cleanup(); - this.sandbox.hibernate(); + this.sandbox?.hibernate(); } } From 69127c360a53f5bdd7e5146f18ffa46ea6dbebd4 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Wed, 13 Nov 2024 11:51:06 +0000 Subject: [PATCH 07/14] wip --- .../app/api/sandbox/[id]/route.ts | 19 ++- .../components/sandpack-examples.tsx | 26 ++- .../src/clients/vm/client.utils.ts | 79 +++++---- sandpack-client/src/clients/vm/index.ts | 156 ++++++++++-------- sandpack-client/src/clients/vm/types.ts | 5 +- sandpack-client/src/types.ts | 6 +- .../src/components/FileExplorer/index.tsx | 30 +--- .../src/components/common/LoadingOverlay.tsx | 8 +- .../UnstyledOpenInCodeSandboxButton.tsx | 36 ++++ .../src/contexts/sandpackContext.tsx | 19 +++ sandpack-react/src/contexts/utils/useFiles.ts | 15 ++ .../src/hooks/useSandpackPreviewProgress.ts | 3 +- sandpack-react/src/templates/index.tsx | 3 +- sandpack-react/src/utils/sandpackUtils.ts | 26 ++- 14 files changed, 281 insertions(+), 150 deletions(-) diff --git a/examples/nextjs-app-dir/app/api/sandbox/[id]/route.ts b/examples/nextjs-app-dir/app/api/sandbox/[id]/route.ts index 9131501cb..6b2f71f29 100644 --- a/examples/nextjs-app-dir/app/api/sandbox/[id]/route.ts +++ b/examples/nextjs-app-dir/app/api/sandbox/[id]/route.ts @@ -1,15 +1,22 @@ import { CodeSandbox } from "@codesandbox/sdk"; +type Params = { params: { id: string } }; + const apiKey = process.env.CSB_API_TOKEN as string; +const sdk = new CodeSandbox(apiKey, {}); -export const GET = async ( - req: Request, - { params }: { params: { id: string } } -) => { +export const GET = async (_req: Request, { params }: Params) => { const templateId = params.id; - const sdk = new CodeSandbox(apiKey, {}); - const data = await sdk.sandbox.start(templateId); return new Response(JSON.stringify(data), { status: 200 }); }; + +export const POST = async (_req: Request, { params }: Params) => { + const templateId = params.id; + + const sandbox = await sdk.sandbox.create({ template: templateId }); + const data = await sdk.sandbox.start(sandbox.id); + + return new Response(JSON.stringify(data), { status: 200 }); +}; diff --git a/examples/nextjs-app-dir/components/sandpack-examples.tsx b/examples/nextjs-app-dir/components/sandpack-examples.tsx index f3e4159d3..d7511af95 100644 --- a/examples/nextjs-app-dir/components/sandpack-examples.tsx +++ b/examples/nextjs-app-dir/components/sandpack-examples.tsx @@ -1,3 +1,4 @@ +"use client"; import { Sandpack, SandpackCodeEditor, @@ -6,16 +7,35 @@ import { SandpackPreview, SandpackProvider, } from "@codesandbox/sandpack-react"; -import { githubLight, sandpackDark } from "@codesandbox/sandpack-themes"; +import { useState } from "react"; + +const TEMPLATES = ["vite-react-ts", "nextjs", "rust", "python", "node"]; + /** * The only reason this is a separate import, is so * we don't need to make the full page 'use client', but only this copmponent. */ export const SandpackExamples = () => { + const [state, setState] = useState( + window.localStorage["template"] || TEMPLATES[0] + ); + return ( <> - - + + + + diff --git a/sandpack-client/src/clients/vm/client.utils.ts b/sandpack-client/src/clients/vm/client.utils.ts index 0758d6e5d..5f223f61f 100644 --- a/sandpack-client/src/clients/vm/client.utils.ts +++ b/sandpack-client/src/clients/vm/client.utils.ts @@ -53,34 +53,33 @@ export const getMessageFromError = (error: Error | string): string => { ); }; -// Directories to ignore -const IGNORED_DIRS = new Set([ - "node_modules", - ".git", - "dist", - "build", - "coverage", - ".cache", - ".next", - ".nuxt", - ".output", - ".vscode", - ".idea", - ".devcontainer", - ".codesandbox", - "yarn.lock", - "pnpm-lock.yaml", -]); - -const TYPES = { - FILE: 0, - FOLDER: 1, -}; - export async function scanDirectory( dirPath: string, fs: SandboxWithoutClient["fs"] ) { + const IGNORED_DIRS = new Set([ + "node_modules", + ".git", + "dist", + "build", + "coverage", + ".cache", + ".next", + ".nuxt", + ".output", + ".vscode", + ".idea", + ".devcontainer", + ".codesandbox", + "yarn.lock", + "pnpm-lock.yaml", + ]); + + const TYPES = { + FILE: 0, + FOLDER: 1, + }; + const results: Array<{ path: string; content: Uint8Array }> = []; try { @@ -89,12 +88,7 @@ export async function scanDirectory( for (const entry of entries) { const fullPath = dirPath + "/" + entry.name; - // Skip ignored directories - if (entry.type === TYPES.FOLDER && IGNORED_DIRS.has(entry.name)) { - continue; - } - - if (entry.isSymlink) { + if (entry.isSymlink || IGNORED_DIRS.has(entry.name)) { continue; } @@ -118,3 +112,28 @@ export async function scanDirectory( throw error; } } + +let groupId = 1; +export const createLogGroup = (group: string) => { + let logId = 1; + + // eslint-disable-next-line no-console + console.group(`[${groupId++}]: ${group}`); + + return { + // eslint-disable-next-line no-console + groupEnd: () => console.groupEnd(), + log: (...args: unknown[]): void => { + // eslint-disable-next-line no-console + console.debug(`[${logId++}]:`, ...args); + }, + }; +}; + +export const throwIfTimeout = (timeout: number) => { + return new Promise((_, reject) => + setTimeout(() => { + reject(new Error(`Timeout of ${timeout}ms exceeded`)); + }, timeout) + ); +}; diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts index b8cbf5300..d05c7ccf9 100644 --- a/sandpack-client/src/clients/vm/index.ts +++ b/sandpack-client/src/clients/vm/index.ts @@ -17,47 +17,23 @@ import { EventEmitter } from "../event-emitter"; import { getMessageFromError, - generateRandomId, readBuffer, fromBundlerFilesToFS, writeBuffer, scanDirectory, + createLogGroup, + throwIfTimeout, } from "./client.utils"; import { loadPreviewIframe, setPreviewIframeProperties } from "./iframe.utils"; -import type { SandpackNodeMessage } from "./types"; - -let groupId = 1; -const createLogGroup = (group: string) => { - let logId = 1; - - console.group(`[${groupId++}]: ${group}`); - - return { - groupEnd: () => console.groupEnd(), - log: (...args: any[]): void => { - console.info(`[${logId++}]:`, ...args); - }, - }; -}; - -const throwIfTimeout = (timeout: number) => { - return new Promise((_, reject) => - setTimeout(() => { - reject(new Error(`Timeout of ${timeout}ms exceeded`)); - }, timeout) - ); -}; +import type { SandpackVMMessage } from "./types"; export class SandpackVM extends SandpackClient { private emitter: EventEmitter; private sandbox!: SandboxWithoutClient; - private iframePreviewUrl: string | undefined; - private _modulesCache = new Map(); - private messageChannelId = generateRandomId(); - - // Public public iframe!: HTMLIFrameElement; + private _modulesCache = new Map(); + private _forkPromise: Promise | null = null; private _initPromise: Promise | null = null; constructor( @@ -106,25 +82,31 @@ export class SandpackVM extends SandpackClient { private async _init(files: FilesMap): Promise { const initLog = createLogGroup("Initializing sandbox..."); - initLog.log("Fetching sandbox..."); - // const response = await fetch( - // `/api/sandbox/${this.sandboxSetup.templateID}` - // ); - - const response = await fetch(`/api/sandbox/5c6t9h`); + this.dispatch({ + type: "vm/progress", + data: "[1/3] Fetching sandbox...", + }); + initLog.log("Fetching sandbox..."); + const response = await fetch( + `/api/sandbox/${this.sandboxSetup.templateID}` + ); const sandpackData = await response.json(); - initLog.log("Fetching sandbox success", sandpackData); initLog.log("Connecting sandbox..."); this.sandbox = await Promise.race([ - throwIfTimeout(10_000), + throwIfTimeout(15_000), connectToSandbox(sandpackData), ]); initLog.log("Connecting sandbox success", this.sandbox); initLog.groupEnd(); + this.dispatch({ + type: "vm/progress", + data: "[2/3] Creating FS...", + }); + const filesLog = createLogGroup("Files"); filesLog.log("Writing files..."); for (const [key, value] of Object.entries(files)) { @@ -139,7 +121,6 @@ export class SandpackVM extends SandpackClient { filesLog.log("Writing files success"); filesLog.log("Scaning VM FS..."); - const vmFiles = await scanDirectory(".", this.sandbox.fs); vmFiles.forEach(({ path, content }) => { @@ -155,9 +136,7 @@ export class SandpackVM extends SandpackClient { content: readBuffer(content), }); }); - filesLog.log("Scaning VM FS success", vmFiles); - filesLog.groupEnd(); await this.globalListeners(); @@ -237,6 +216,11 @@ export class SandpackVM extends SandpackClient { private async setLocationURLIntoIFrame(): Promise { const initLog = createLogGroup("Preview"); + this.dispatch({ + type: "vm/progress", + data: "[3/3] Opening preview...", + }); + initLog.log("Waiting for port..."); const ports = await this.awaitForPorts(); initLog.log("Ports found", ports); @@ -248,12 +232,12 @@ export class SandpackVM extends SandpackClient { initLog.log("Defined main port", mainPort); initLog.log("Getting preview url for port..."); - this.iframePreviewUrl = this.sandbox.ports.getPreviewUrl(mainPort.port); - initLog.log("Got preview url", this.iframePreviewUrl); + const iframePreviewUrl = this.sandbox.ports.getPreviewUrl(mainPort.port); + initLog.log("Got preview url", iframePreviewUrl); - if (this.iframePreviewUrl) { + if (iframePreviewUrl) { initLog.log("Loading preview iframe..."); - await loadPreviewIframe(this.iframe, this.iframePreviewUrl); + await loadPreviewIframe(this.iframe, iframePreviewUrl); initLog.log("Preview iframe loaded"); } else { initLog.log("No preview url found"); @@ -269,36 +253,9 @@ export class SandpackVM extends SandpackClient { private dispatchDoneMessage(): void { this.status = "done"; this.dispatch({ type: "done", compilatonError: false }); - - if (this.iframePreviewUrl) { - this.dispatch({ - type: "urlchange", - url: this.iframePreviewUrl, - back: false, - forward: false, - }); - } } private async globalListeners(): Promise { - // window.addEventListener("message", (event) => { - // if (event.data.type === PREVIEW_LOADED_MESSAGE_TYPE) { - // injectScriptToIframe(this.iframe, this.messageChannelId); - // } - // if ( - // event.data.type === "urlchange" && - // event.data.channelId === this.messageChannelId - // ) { - // this.dispatch({ - // type: "urlchange", - // url: event.data.url, - // back: event.data.back, - // forward: event.data.forward, - // }); - // } else if (event.data.channelId === this.messageChannelId) { - // this.dispatch(event.data); - // } - // }); // await this.sandbox.fs.watch( // "*", // { @@ -374,6 +331,42 @@ export class SandpackVM extends SandpackClient { // ); } + public async fork() { + this.dispatch({ + type: "vm/progress", + data: "Forking sandbox...", + }); + + const timer = setTimeout(() => { + this.dispatch({ + type: "vm/progress", + data: "Still forking...", + }); + }, 3_000); + + const response = await fetch(`/api/sandbox/${this.sandbox.id}`, { + method: "POST", + }); + const sandpackData = await response.json(); + this.sandbox = await Promise.race([ + throwIfTimeout(10_000), + connectToSandbox(sandpackData), + ]); + + clearTimeout(timer); + + this.dispatch({ + type: "vm/progress", + data: "Assigining new preview...", + }); + this.setLocationURLIntoIFrame(); + + this.dispatch({ + type: "done", + compilatonError: false, + }); + } + /** * PUBLIC Methods */ @@ -384,6 +377,15 @@ export class SandpackVM extends SandpackClient { * Update file changes */ if (this.status === "done") { + // Stack pending requests + await this._forkPromise; + + const needToFork = this.sandboxSetup.templateID === this.sandbox.id; + if (needToFork) { + this._forkPromise = this.fork(); + await this._forkPromise; + } + for await (const [key, value] of Object.entries(modules)) { if ( !this._modulesCache.get(key) || @@ -426,7 +428,7 @@ export class SandpackVM extends SandpackClient { }); } - public async dispatch(message: SandpackNodeMessage): Promise { + public async dispatch(message: SandpackVMMessage): Promise { switch (message.type) { case "compile": this.compile(message.modules); @@ -441,6 +443,15 @@ export class SandpackVM extends SandpackClient { this.iframe?.contentWindow?.postMessage(message, "*"); break; + case "vm/request_editor_url": { + this.dispatch({ + type: "vm/response_editor_url", + data: `https://codesandbox.io/p/redirect-to-project-editor/${this.sandbox.id}`, + }); + + break; + } + default: this.emitter.dispatch(message); } @@ -452,6 +463,5 @@ export class SandpackVM extends SandpackClient { public destroy(): void { this.emitter.cleanup(); - this.sandbox?.hibernate(); } } diff --git a/sandpack-client/src/clients/vm/types.ts b/sandpack-client/src/clients/vm/types.ts index 0758e50d3..d5ab3322d 100644 --- a/sandpack-client/src/clients/vm/types.ts +++ b/sandpack-client/src/clients/vm/types.ts @@ -55,7 +55,7 @@ type SandpackURLsMessages = type: "urlforward"; }; -export type SandpackNodeMessage = BaseSandpackMessage & +export type SandpackVMMessage = BaseSandpackMessage & ( | SandpackStandartMessages | SandpackURLsMessages @@ -65,6 +65,9 @@ export type SandpackNodeMessage = BaseSandpackMessage & type: "stdout"; payload: SandpackShellStdoutData; } + | { type: "vm/progress"; data: string } + | { type: "vm/request_editor_url" } + | { type: "vm/response_editor_url"; data: string } | SandpackFSMessages ); diff --git a/sandpack-client/src/types.ts b/sandpack-client/src/types.ts index 3e851c510..245520266 100644 --- a/sandpack-client/src/types.ts +++ b/sandpack-client/src/types.ts @@ -1,5 +1,6 @@ import type { SandpackNodeMessage } from "./clients/node/types"; import type { SandpackRuntimeMessage } from "./clients/runtime/types"; +import { SandpackVMMessage } from "./clients/vm/types"; export interface ClientOptions { /** @@ -177,7 +178,10 @@ export interface BundlerState { transpiledModules: Record; } -export type SandpackMessage = SandpackRuntimeMessage | SandpackNodeMessage; +export type SandpackMessage = + | SandpackRuntimeMessage + | SandpackNodeMessage + | SandpackVMMessage; export type ListenerFunction = (msg: SandpackMessage) => void; export type UnsubscribeFunction = () => void; diff --git a/sandpack-react/src/components/FileExplorer/index.tsx b/sandpack-react/src/components/FileExplorer/index.tsx index b3652e606..184f08dfe 100644 --- a/sandpack-react/src/components/FileExplorer/index.tsx +++ b/sandpack-react/src/components/FileExplorer/index.tsx @@ -34,38 +34,10 @@ export const SandpackFileExplorer = ({ }: SandpackFileExplorerProp & React.HTMLAttributes): JSX.Element | null => { const { - sandpack: { - status, - updateFile, - deleteFile, - activeFile, - files, - openFile, - visibleFilesFromProps, - }, - listen, + sandpack: { activeFile, files, openFile, visibleFilesFromProps }, } = useSandpack(); const classNames = useClassNames(); - React.useEffect( - function watchFSFilesChanges() { - if (status !== "running") return; - - const unsubscribe = listen((message) => { - if (message.type === "fs/change") { - updateFile(message.path, message.content, false); - } - - if (message.type === "fs/remove") { - deleteFile(message.path, false); - } - }); - - return unsubscribe; - }, - [status] - ); - const orderedFiles = Object.keys(files) .sort() .reduce((obj, key) => { diff --git a/sandpack-react/src/components/common/LoadingOverlay.tsx b/sandpack-react/src/components/common/LoadingOverlay.tsx index bddefbd2b..89f57c175 100644 --- a/sandpack-react/src/components/common/LoadingOverlay.tsx +++ b/sandpack-react/src/components/common/LoadingOverlay.tsx @@ -56,10 +56,12 @@ export const LoadingOverlay: React.FC< } = useSandpack(); const [shouldShowStdout, setShouldShowStdout] = React.useState(false); - const loadingOverlayState = useLoadingOverlayState(clientId, loading); const progressMessage = useSandpackPreviewProgress({ clientId }); + const loadingOverlayState = useLoadingOverlayState(clientId, loading); const { logs: stdoutData } = useSandpackShellStdout({ clientId }); + const forking = progressMessage?.toLowerCase().includes("forking"); + React.useEffect(() => { let timer: NodeJS.Timer; if (progressMessage?.includes("Running")) { @@ -75,7 +77,7 @@ export const LoadingOverlay: React.FC< }; }, [progressMessage]); - if (loadingOverlayState === "HIDDEN") { + if (loadingOverlayState === "HIDDEN" && !forking) { return null; } @@ -161,7 +163,7 @@ export const LoadingOverlay: React.FC< ])} style={{ ...style, - opacity: stillLoading ? 1 : 0, + opacity: stillLoading ? 1 : forking ? 0.7 : 0, transition: `opacity ${FADE_ANIMATION_DURATION}ms ease-out`, }} {...props} diff --git a/sandpack-react/src/components/common/OpenInCodeSandboxButton/UnstyledOpenInCodeSandboxButton.tsx b/sandpack-react/src/components/common/OpenInCodeSandboxButton/UnstyledOpenInCodeSandboxButton.tsx index 966c6a79c..35dc05811 100644 --- a/sandpack-react/src/components/common/OpenInCodeSandboxButton/UnstyledOpenInCodeSandboxButton.tsx +++ b/sandpack-react/src/components/common/OpenInCodeSandboxButton/UnstyledOpenInCodeSandboxButton.tsx @@ -48,6 +48,10 @@ export const UnstyledOpenInCodeSandboxButton: React.FC< > = (props) => { const { sandpack } = useSandpack(); + if (sandpack.environment === "vm") { + return ; + } + if (sandpack.exportOptions) { return ; } @@ -55,6 +59,38 @@ export const UnstyledOpenInCodeSandboxButton: React.FC< return ; }; +export const ExportVMButton: React.FC> = ({ + children, + ...props +}) => { + const sandpack = useSandpack(); + + React.useEffect(() => { + return sandpack.listen((message) => { + if (message.type === "vm/response_editor_url") { + window.open(message.data, "_blank"); + } + }); + }); + + const submit = () => { + sandpack.dispatch({ + type: "vm/request_editor_url", + }); + }; + + return ( + + ); +}; + export const ExportToWorkspaceButton: React.FC< React.HtmlHTMLAttributes & { state: SandpackState } > = ({ children, state, ...props }) => { diff --git a/sandpack-react/src/contexts/sandpackContext.tsx b/sandpack-react/src/contexts/sandpackContext.tsx index 6cc910c16..8a3128ae5 100644 --- a/sandpack-react/src/contexts/sandpackContext.tsx +++ b/sandpack-react/src/contexts/sandpackContext.tsx @@ -21,6 +21,25 @@ export const SandpackProvider: React.FC = (props) => { clientOperations.initializeSandpackIframe(); }, []); + React.useEffect( + function watchFSFilesChanges() { + if (clientState.status !== "running") return; + + const unsubscribe = addListener((message) => { + if (message.type === "fs/change") { + fileOperations.updateFile(message.path, message.content, false); + } + + if (message.type === "fs/remove") { + fileOperations.deleteFile(message.path, false); + } + }); + + return unsubscribe; + }, + [clientState.status] + ); + return ( { } }, [props.files, props.customSetup, props.template]); + useEffect( + function findActiveFileIfMissed() { + if (!state.activeFile) { + for (const file of DEFAULT_FILES_TO_OPEN) { + if (state.files[file]) { + setState((prev) => ({ ...prev, activeFile: file })); + break; + } + } + } + }, + [state] + ); + const updateFile = ( pathOrFiles: string | SandpackFiles, code?: string, diff --git a/sandpack-react/src/hooks/useSandpackPreviewProgress.ts b/sandpack-react/src/hooks/useSandpackPreviewProgress.ts index bfd1ce134..b323e2b3d 100644 --- a/sandpack-react/src/hooks/useSandpackPreviewProgress.ts +++ b/sandpack-react/src/hooks/useSandpackPreviewProgress.ts @@ -46,7 +46,6 @@ export const useSandpackPreviewProgress = ( React.useEffect(() => { let timer: NodeJS.Timer; const unsubscribe = listen((message) => { - console.log(message); if (message.type === "start" && message.firstLoad) { setIsReady(false); } @@ -82,6 +81,8 @@ export const useSandpackPreviewProgress = ( mapProgressMessage(message.data, totalDependencies) ); } + } else if (message.type === "vm/progress") { + setLoadingMessage(message.data); } if (message.type === "done" && message.compilatonError === false) { diff --git a/sandpack-react/src/templates/index.tsx b/sandpack-react/src/templates/index.tsx index 35f395200..5ed6b3559 100644 --- a/sandpack-react/src/templates/index.tsx +++ b/sandpack-react/src/templates/index.tsx @@ -58,7 +58,8 @@ export const SANDBOX_TEMPLATES = { // astro: ASTRO_TEMPLATE, nextjs: { environment: "vm", templateID: "1bvd7d" }, - "vite-react-ts": { environment: "vm", templateID: "9qputt" }, + "vite-react-ts": { environment: "vm", templateID: "9qputt" }, // TODO: orignal template is `9qputt` python: { environment: "vm", templateID: "in2qez" }, rust: { environment: "vm", templateID: "rk69p3" }, + node: { environment: "vm", templateID: "compassionate-thompson-node" }, }; diff --git a/sandpack-react/src/utils/sandpackUtils.ts b/sandpack-react/src/utils/sandpackUtils.ts index 5d42ef881..696bd1870 100644 --- a/sandpack-react/src/utils/sandpackUtils.ts +++ b/sandpack-react/src/utils/sandpackUtils.ts @@ -115,8 +115,7 @@ export const getSandpackStateFromProps = ( return { visibleFiles: existOpenPath, - /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */ - activeFile: activeFile!, + activeFile: activeFile, files, environment: projectSetup.environment, shouldUpdatePreview: true, @@ -282,3 +281,26 @@ export const convertedFilesToBundlerFiles = ( return acc; }, {}); }; + +export const DEFAULT_FILES_TO_OPEN = [ + "/src/App.js", + "/src/App.tsx", + "/src/index.js", + "/src/index.ts", + "/src/index.tsx", + "/app/page.tsx", + "/app/page.jsx", + "/index.js", + "/index.ts", + "/src/main.tsx", + "/src/main.jsx", + "/main.ts", + "/src/main.rs", + "/src/lib.rs", + "/index.html", + "/src/index.html", + "/src/index.vue", + "/src/App.vue", + "/src/main.astro", + "/package.json", +]; From 870e3aa8c1fc887d86ee43d1d7dfce081c9ad974 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Wed, 13 Nov 2024 14:48:20 +0000 Subject: [PATCH 08/14] architecture --- sandpack-client/src/clients/vm/index.ts | 28 + website/codesandbox-theme-docs/src/index.tsx | 5 +- website/docs/next-env.d.ts | 2 +- website/docs/package.json | 2 + .../docs/src/pages/architecture/overview.md | 2 + .../pages/architecture/private-packages.mdx | 85 + yarn.lock | 1413 ++++++++++++++++- 7 files changed, 1524 insertions(+), 13 deletions(-) create mode 100644 website/docs/src/pages/architecture/overview.md create mode 100644 website/docs/src/pages/architecture/private-packages.mdx diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts index d05c7ccf9..9ee93211c 100644 --- a/sandpack-client/src/clients/vm/index.ts +++ b/sandpack-client/src/clients/vm/index.ts @@ -256,6 +256,34 @@ export class SandpackVM extends SandpackClient { } private async globalListeners(): Promise { + // { + // "type": "change", + // "paths": [ + // "/project/sandbox/.git/FETCH_HEAD" + // ] + // } + + await this.sandbox.fs.watch( + "./", + { + recursive: true, + excludes: [ + "**/node_modules/**", + "**/build/**", + "**/dist/**", + "**/vendor/**", + "**/.config/**", + "**/.vuepress/**", + "**/.git/**", + "**/.next/**", + "**/.nuxt/**", + ], + }, + (message) => { + console.log(message); + } + ); + // await this.sandbox.fs.watch( // "*", // { diff --git a/website/codesandbox-theme-docs/src/index.tsx b/website/codesandbox-theme-docs/src/index.tsx index a85633965..4f70909b2 100644 --- a/website/codesandbox-theme-docs/src/index.tsx +++ b/website/codesandbox-theme-docs/src/index.tsx @@ -90,7 +90,10 @@ const Body = ({ "nextra-body-typesetting-article" )} > -
+
{breadcrumb} {body}
diff --git a/website/docs/next-env.d.ts b/website/docs/next-env.d.ts index 4f11a03dc..a4a7b3f5c 100644 --- a/website/docs/next-env.d.ts +++ b/website/docs/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. diff --git a/website/docs/package.json b/website/docs/package.json index b6505d279..5e4ea75cd 100644 --- a/website/docs/package.json +++ b/website/docs/package.json @@ -17,6 +17,8 @@ "@radix-ui/react-tabs": "^1.0.1", "amplitude-js": "^8.13.0", "codesandbox-theme-docs": "^2.0.2", + "mdx-mermaid": "^2.0.2", + "mermaid": "^11.4.0", "next": "^14.0.0", "nextra": "^2.0.1", "nextra-theme-docs": "^2.0.1", diff --git a/website/docs/src/pages/architecture/overview.md b/website/docs/src/pages/architecture/overview.md new file mode 100644 index 000000000..476060daa --- /dev/null +++ b/website/docs/src/pages/architecture/overview.md @@ -0,0 +1,2 @@ +# Overview + diff --git a/website/docs/src/pages/architecture/private-packages.mdx b/website/docs/src/pages/architecture/private-packages.mdx new file mode 100644 index 000000000..e069b10c6 --- /dev/null +++ b/website/docs/src/pages/architecture/private-packages.mdx @@ -0,0 +1,85 @@ +import { Mermaid } from 'mdx-mermaid/Mermaid'; + +# Private dependencies: technical specification + +This document outlines the technical specification for enabling the use of private dependencies on CodeSandbox, specifically for Pro users. This feature leverages the existing infrastructure used for CodeSandbox's private package proxy to provide a secure and seamless experience for developers working with internal or private packages. + +### Use cases + +- **CodeSandbox proxy:** all secrets are stored on csb server, which will proxy internally and respond with package content. This is the safest way to deal with sensitive data once it doesn’t expose any secrets to the client; +- **Companies with internal VPN**: given the nature of a VPN restriction, csb will respond with the registry token to the client, which then will fetch to the npm registry in the internal network. + +## Technical Specification + +1. Authentication Flow: +- The Sandpack component initiates the authentication flow by redirecting the user to `codesandbox.io/auth/sandpack?team-id=`. +- The CodeSandbox authentication service verifies the team-id and provides a sandpack-secret token. +- The sandpack-secret token is stored in a secure cookie with `SameSite=None` and `Secure=true` settings. + +2. Trusted Domains: +- After the authentication flow, Sandpack requests the list of trusted domains for the specified team-id from the CodeSandbox API. +- The API returns the list of trusted domains, which Sandpack uses to set the appropriate Content Security Policy (CSP) headers for the iframe. + + +3. Package Fetch: +- With the sandpack-secret token available, Sandpack makes requests to the CodeSandbox API to fetch the private package data. +- The API authenticates the request using the sandpack-secret token and retrieves the package payload from the internal npm registry. +- The API handles token renewal as necessary to ensure seamless access to the private package. + +
+ + + + alt Pop-up authentication + Note over U: 1st step + S->>+C: Sign-in [team-id] + C->>-A: GET /auth/sandpack [team-id] + Note over A: website-url match team config? + A->>+C: sandpack-token + C->>-S: sandpack-token + Note over S: Cookie SameSite=None Secure=true + end + + Note over S: Refresh iframe to use the new cookie + + alt Worker + Note over U: 2nd step + U --> S: iframe src: teamid.sandpack.codesandbox.io + S ->>+A: GET /trusted-domains/:team-id + A ->>-S: List of trusted domains + S ->> U: CSP: frame-ancestors + end + + Note over U: At this point, this domain is a trusted one + + alt Authenticated connection + Note over U: 3rd step: run sandbox + U->>+S: Run this sandbox + S->>+A: GET /[team-id]/npm_registry + A->>-S: Registry configuration + S->>+A: GET /[team-id]/npm_registry/[package] + Note over A: Make sure it renews the token as need + A->>-S: Package payload + end`} /> + +### Worker Technical Specification + +
+ + S: iframe src: teamid.sandpack.codesandbox.io + S ->>+A: GET /trusted-domains/:team-id + A ->>-S: List of trusted domains + S ->> U: CSP: frame-ancestors +`} /> diff --git a/yarn.lock b/yarn.lock index 1069afc0e..ac6648b50 100644 --- a/yarn.lock +++ b/yarn.lock @@ -43,6 +43,19 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" +"@antfu/install-pkg@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.4.1.tgz#d1d7f3be96ecdb41581629cafe8626d1748c0cf1" + integrity sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw== + dependencies: + package-manager-detector "^0.2.0" + tinyexec "^0.3.0" + +"@antfu/utils@^0.7.10": + version "0.7.10" + resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.7.10.tgz#ae829f170158e297a9b6a28f161a8e487d00814d" + integrity sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww== + "@aw-web-design/x-default-browser@1.4.126": version "1.4.126" resolved "https://registry.yarnpkg.com/@aw-web-design/x-default-browser/-/x-default-browser-1.4.126.tgz#43e4bd8f0314ed907a8718d7e862a203af79bc16" @@ -1955,6 +1968,43 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@braintree/sanitize-url@^7.0.1": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-7.1.0.tgz#048e48aab4f1460e3121e22aa62459d16653dc85" + integrity sha512-o+UlMLt49RvtCASlOMW0AkHnabN9wR9rwCCherxO0yG4Npy34GkvrAqdXQvrhNs+jh+gkK8gB8Lf05qL/O7KWg== + +"@chevrotain/cst-dts-gen@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz#5e0863cc57dc45e204ccfee6303225d15d9d4783" + integrity sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ== + dependencies: + "@chevrotain/gast" "11.0.3" + "@chevrotain/types" "11.0.3" + lodash-es "4.17.21" + +"@chevrotain/gast@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/gast/-/gast-11.0.3.tgz#e84d8880323fe8cbe792ef69ce3ffd43a936e818" + integrity sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q== + dependencies: + "@chevrotain/types" "11.0.3" + lodash-es "4.17.21" + +"@chevrotain/regexp-to-ast@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz#11429a81c74a8e6a829271ce02fc66166d56dcdb" + integrity sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA== + +"@chevrotain/types@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/types/-/types-11.0.3.tgz#f8a03914f7b937f594f56eb89312b3b8f1c91848" + integrity sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ== + +"@chevrotain/utils@11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@chevrotain/utils/-/utils-11.0.3.tgz#e39999307b102cff3645ec4f5b3665f5297a2224" + integrity sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ== + "@codemirror/autocomplete@^6.0.0", "@codemirror/autocomplete@^6.3.2", "@codemirror/autocomplete@^6.4.0": version "6.4.0" resolved "https://registry.yarnpkg.com/@codemirror/autocomplete/-/autocomplete-6.4.0.tgz#76ac9a2a411a4cc6e13103014dba5e0fe601da5a" @@ -2389,6 +2439,24 @@ resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== +"@iconify/types@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@iconify/types/-/types-2.0.0.tgz#ab0e9ea681d6c8a1214f30cd741fe3a20cc57f57" + integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== + +"@iconify/utils@^2.1.32": + version "2.1.33" + resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.1.33.tgz#cbf7242a52fd0ec58c42d37d28e4406b5327e8c0" + integrity sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw== + dependencies: + "@antfu/install-pkg" "^0.4.0" + "@antfu/utils" "^0.7.10" + "@iconify/types" "^2.0.0" + debug "^4.3.6" + kolorist "^1.8.0" + local-pkg "^0.5.0" + mlly "^1.7.1" + "@icons/material@^0.2.4": version "0.2.4" resolved "https://registry.yarnpkg.com/@icons/material/-/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8" @@ -2837,6 +2905,13 @@ "@types/mdx" "^2.0.0" "@types/react" ">=16" +"@mermaid-js/parser@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@mermaid-js/parser/-/parser-0.3.0.tgz#7a28714599f692f93df130b299fa1aadc9f9c8ab" + integrity sha512-HsvL6zgE5sUPGgkIDlmAWR1HTNHz2Iy11BAWPTa4Jjabkpguy4Ze2gzfLrg6pdRuBvFwgUYyxiaNqZwrEEXepA== + dependencies: + langium "3.0.0" + "@napi-rs/simple-git-android-arm-eabi@0.1.8": version "0.1.8" resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.8.tgz#303bea1ec00db24466e3b3ba13de337d87c5371b" @@ -3309,6 +3384,20 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.6.tgz#cee20bd55e68a1720bdab363ecf0c821ded4cd45" integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw== +"@puppeteer/browsers@2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.3.0.tgz#791ea7d80450fea24eb19fb1d70c367ad4e08cae" + integrity sha512-ioXoq9gPxkss4MYhD+SFaU9p1IHFUX0ILAWFPyjGaBdjLsYAlZw6j1iLA0N/m12uVHLFDfSYNF7EQccjinIMDA== + dependencies: + debug "^4.3.5" + extract-zip "^2.0.1" + progress "^2.0.3" + proxy-agent "^6.4.0" + semver "^7.6.3" + tar-fs "^3.0.6" + unbzip2-stream "^1.4.3" + yargs "^17.7.2" + "@radix-ui/primitive@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.0.0.tgz#e1d8ef30b10ea10e69c76e896f608d9276352253" @@ -4018,6 +4107,11 @@ resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== +"@tootallnate/quickjs-emscripten@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" + integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== + "@tufjs/canonical-json@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz#eade9fd1f537993bc1f0949f3aea276ecc4fab31" @@ -4135,6 +4229,216 @@ dependencies: "@types/node" "*" +"@types/d3-array@*": + version "3.2.1" + resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-3.2.1.tgz#1f6658e3d2006c4fceac53fde464166859f8b8c5" + integrity sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg== + +"@types/d3-axis@*": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/d3-axis/-/d3-axis-3.0.6.tgz#e760e5765b8188b1defa32bc8bb6062f81e4c795" + integrity sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw== + dependencies: + "@types/d3-selection" "*" + +"@types/d3-brush@*": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/d3-brush/-/d3-brush-3.0.6.tgz#c2f4362b045d472e1b186cdbec329ba52bdaee6c" + integrity sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A== + dependencies: + "@types/d3-selection" "*" + +"@types/d3-chord@*": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/d3-chord/-/d3-chord-3.0.6.tgz#1706ca40cf7ea59a0add8f4456efff8f8775793d" + integrity sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg== + +"@types/d3-color@*": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@types/d3-color/-/d3-color-3.1.3.tgz#368c961a18de721da8200e80bf3943fb53136af2" + integrity sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A== + +"@types/d3-contour@*": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/d3-contour/-/d3-contour-3.0.6.tgz#9ada3fa9c4d00e3a5093fed0356c7ab929604231" + integrity sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg== + dependencies: + "@types/d3-array" "*" + "@types/geojson" "*" + +"@types/d3-delaunay@*": + version "6.0.4" + resolved "https://registry.yarnpkg.com/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz#185c1a80cc807fdda2a3fe960f7c11c4a27952e1" + integrity sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw== + +"@types/d3-dispatch@*": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/d3-dispatch/-/d3-dispatch-3.0.6.tgz#096efdf55eb97480e3f5621ff9a8da552f0961e7" + integrity sha512-4fvZhzMeeuBJYZXRXrRIQnvUYfyXwYmLsdiN7XXmVNQKKw1cM8a5WdID0g1hVFZDqT9ZqZEY5pD44p24VS7iZQ== + +"@types/d3-drag@*": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@types/d3-drag/-/d3-drag-3.0.7.tgz#b13aba8b2442b4068c9a9e6d1d82f8bcea77fc02" + integrity sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ== + dependencies: + "@types/d3-selection" "*" + +"@types/d3-dsv@*": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@types/d3-dsv/-/d3-dsv-3.0.7.tgz#0a351f996dc99b37f4fa58b492c2d1c04e3dac17" + integrity sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g== + +"@types/d3-ease@*": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/d3-ease/-/d3-ease-3.0.2.tgz#e28db1bfbfa617076f7770dd1d9a48eaa3b6c51b" + integrity sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA== + +"@types/d3-fetch@*": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@types/d3-fetch/-/d3-fetch-3.0.7.tgz#c04a2b4f23181aa376f30af0283dbc7b3b569980" + integrity sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA== + dependencies: + "@types/d3-dsv" "*" + +"@types/d3-force@*": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@types/d3-force/-/d3-force-3.0.10.tgz#6dc8fc6e1f35704f3b057090beeeb7ac674bff1a" + integrity sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw== + +"@types/d3-format@*": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/d3-format/-/d3-format-3.0.4.tgz#b1e4465644ddb3fdf3a263febb240a6cd616de90" + integrity sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g== + +"@types/d3-geo@*": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/d3-geo/-/d3-geo-3.1.0.tgz#b9e56a079449174f0a2c8684a9a4df3f60522440" + integrity sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ== + dependencies: + "@types/geojson" "*" + +"@types/d3-hierarchy@*": + version "3.1.7" + resolved "https://registry.yarnpkg.com/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz#6023fb3b2d463229f2d680f9ac4b47466f71f17b" + integrity sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg== + +"@types/d3-interpolate@*": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz#412b90e84870285f2ff8a846c6eb60344f12a41c" + integrity sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA== + dependencies: + "@types/d3-color" "*" + +"@types/d3-path@*": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-3.1.0.tgz#2b907adce762a78e98828f0b438eaca339ae410a" + integrity sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ== + +"@types/d3-polygon@*": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/d3-polygon/-/d3-polygon-3.0.2.tgz#dfae54a6d35d19e76ac9565bcb32a8e54693189c" + integrity sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA== + +"@types/d3-quadtree@*": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz#d4740b0fe35b1c58b66e1488f4e7ed02952f570f" + integrity sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg== + +"@types/d3-random@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/d3-random/-/d3-random-3.0.3.tgz#ed995c71ecb15e0cd31e22d9d5d23942e3300cfb" + integrity sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ== + +"@types/d3-scale-chromatic@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.3.tgz#fc0db9c10e789c351f4c42d96f31f2e4df8f5644" + integrity sha512-laXM4+1o5ImZv3RpFAsTRn3TEkzqkytiOY0Dz0sq5cnd1dtNlk6sHLon4OvqaiJb28T0S/TdsBI3Sjsy+keJrw== + +"@types/d3-scale@*": + version "4.0.8" + resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-4.0.8.tgz#d409b5f9dcf63074464bf8ddfb8ee5a1f95945bb" + integrity sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ== + dependencies: + "@types/d3-time" "*" + +"@types/d3-selection@*": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@types/d3-selection/-/d3-selection-3.0.11.tgz#bd7a45fc0a8c3167a631675e61bc2ca2b058d4a3" + integrity sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w== + +"@types/d3-shape@*": + version "3.1.6" + resolved "https://registry.yarnpkg.com/@types/d3-shape/-/d3-shape-3.1.6.tgz#65d40d5a548f0a023821773e39012805e6e31a72" + integrity sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA== + dependencies: + "@types/d3-path" "*" + +"@types/d3-time-format@*": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/d3-time-format/-/d3-time-format-4.0.3.tgz#d6bc1e6b6a7db69cccfbbdd4c34b70632d9e9db2" + integrity sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg== + +"@types/d3-time@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-3.0.3.tgz#3c186bbd9d12b9d84253b6be6487ca56b54f88be" + integrity sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw== + +"@types/d3-timer@*": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/d3-timer/-/d3-timer-3.0.2.tgz#70bbda77dc23aa727413e22e214afa3f0e852f70" + integrity sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw== + +"@types/d3-transition@*": + version "3.0.9" + resolved "https://registry.yarnpkg.com/@types/d3-transition/-/d3-transition-3.0.9.tgz#1136bc57e9ddb3c390dccc9b5ff3b7d2b8d94706" + integrity sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg== + dependencies: + "@types/d3-selection" "*" + +"@types/d3-zoom@*": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@types/d3-zoom/-/d3-zoom-3.0.8.tgz#dccb32d1c56b1e1c6e0f1180d994896f038bc40b" + integrity sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw== + dependencies: + "@types/d3-interpolate" "*" + "@types/d3-selection" "*" + +"@types/d3@^7.4.3": + version "7.4.3" + resolved "https://registry.yarnpkg.com/@types/d3/-/d3-7.4.3.tgz#d4550a85d08f4978faf0a4c36b848c61eaac07e2" + integrity sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww== + dependencies: + "@types/d3-array" "*" + "@types/d3-axis" "*" + "@types/d3-brush" "*" + "@types/d3-chord" "*" + "@types/d3-color" "*" + "@types/d3-contour" "*" + "@types/d3-delaunay" "*" + "@types/d3-dispatch" "*" + "@types/d3-drag" "*" + "@types/d3-dsv" "*" + "@types/d3-ease" "*" + "@types/d3-fetch" "*" + "@types/d3-force" "*" + "@types/d3-format" "*" + "@types/d3-geo" "*" + "@types/d3-hierarchy" "*" + "@types/d3-interpolate" "*" + "@types/d3-path" "*" + "@types/d3-polygon" "*" + "@types/d3-quadtree" "*" + "@types/d3-random" "*" + "@types/d3-scale" "*" + "@types/d3-scale-chromatic" "*" + "@types/d3-selection" "*" + "@types/d3-shape" "*" + "@types/d3-time" "*" + "@types/d3-time-format" "*" + "@types/d3-timer" "*" + "@types/d3-transition" "*" + "@types/d3-zoom" "*" + "@types/debug@^4.0.0": version "4.1.7" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" @@ -4157,6 +4461,13 @@ resolved "https://registry.yarnpkg.com/@types/doctrine/-/doctrine-0.0.6.tgz#12ede1f7cd3797be5856277c85f031299ccd2641" integrity sha512-KlEqPtaNBHBJ2/fVA4yLdD0Tc8zw34pKU4K5SHBIEwtLJ8xxumIC1xeG+4S+/9qhVj2MqC7O3Ld8WvDG4HqlgA== +"@types/dompurify@^3.0.5": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-3.0.5.tgz#02069a2fcb89a163bacf1a788f73cb415dd75cb7" + integrity sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg== + dependencies: + "@types/trusted-types" "*" + "@types/ejs@^3.1.1": version "3.1.4" resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.1.4.tgz#b9919c89767493b6443f85994ae6be6e49011b5c" @@ -4226,6 +4537,11 @@ dependencies: "@types/node" "*" +"@types/geojson@*": + version "7946.0.14" + resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613" + integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg== + "@types/git-url-parse@^9.0.1": version "9.0.1" resolved "https://registry.yarnpkg.com/@types/git-url-parse/-/git-url-parse-9.0.1.tgz#1c7cc89527ca8b5afcf260ead3b0e4e373c43938" @@ -4509,6 +4825,11 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== +"@types/trusted-types@*": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11" + integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw== + "@types/unist@*", "@types/unist@^2.0.0": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" @@ -4526,6 +4847,13 @@ dependencies: "@types/yargs-parser" "*" +"@types/yauzl@^2.9.1": + version "2.10.3" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.3.tgz#e9b2808b4f109504a03cda958259876f61017999" + integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== + dependencies: + "@types/node" "*" + "@typescript-eslint/eslint-plugin@^6.9.0": version "6.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.0.tgz#fdb6f3821c0167e3356e9d89c80e8230b2e401f4" @@ -4738,6 +5066,11 @@ acorn@^8.10.0, acorn@^8.8.2, acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== +acorn@^8.14.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -4767,6 +5100,13 @@ agent-base@^7.0.2: dependencies: debug "^4.3.4" +agent-base@^7.1.0, agent-base@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== + dependencies: + debug "^4.3.4" + agentkeepalive@^4.1.3: version "4.2.1" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" @@ -5221,6 +5561,13 @@ ast-types@0.15.2: dependencies: tslib "^2.0.1" +ast-types@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== + dependencies: + tslib "^2.0.1" + ast-types@^0.16.1: version "0.16.1" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.16.1.tgz#7a9da1617c9081bc121faafe91711b4c8bb81da2" @@ -5345,6 +5692,11 @@ axobject-query@^3.1.1: dependencies: dequal "^2.0.3" +b4a@^1.6.4: + version "1.6.7" + resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.7.tgz#a99587d4ebbfbd5a6e3b21bdb5d5fa385767abe4" + integrity sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg== + babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" @@ -5542,6 +5894,39 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +bare-events@^2.0.0, bare-events@^2.2.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.5.0.tgz#305b511e262ffd8b9d5616b056464f8e1b3329cc" + integrity sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A== + +bare-fs@^2.1.1: + version "2.3.5" + resolved "https://registry.yarnpkg.com/bare-fs/-/bare-fs-2.3.5.tgz#05daa8e8206aeb46d13c2fe25a2cd3797b0d284a" + integrity sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw== + dependencies: + bare-events "^2.0.0" + bare-path "^2.0.0" + bare-stream "^2.0.0" + +bare-os@^2.1.0: + version "2.4.4" + resolved "https://registry.yarnpkg.com/bare-os/-/bare-os-2.4.4.tgz#01243392eb0a6e947177bb7c8a45123d45c9b1a9" + integrity sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ== + +bare-path@^2.0.0, bare-path@^2.1.0: + version "2.1.3" + resolved "https://registry.yarnpkg.com/bare-path/-/bare-path-2.1.3.tgz#594104c829ef660e43b5589ec8daef7df6cedb3e" + integrity sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA== + dependencies: + bare-os "^2.1.0" + +bare-stream@^2.0.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/bare-stream/-/bare-stream-2.3.2.tgz#3bc62b429bcf850d2f265719b7a49ee0630a3ae4" + integrity sha512-EFZHSIBkDgSHIwj2l2QZfP4U5OcD4xFAOwhSb/vlr9PIqyGJGvB/nfClJbcnh3EY4jtPE4zsb5ztae96bVF79A== + dependencies: + streamx "^2.20.0" + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -5560,6 +5945,11 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" +basic-ftp@^5.0.2: + version "5.0.5" + resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.0.5.tgz#14a474f5fffecca1f4f406f1c26b18f800225ac0" + integrity sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg== + before-after-hook@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" @@ -5756,7 +6146,7 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^5.5.0: +buffer@^5.2.1, buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -6059,6 +6449,25 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== +chevrotain-allstar@~0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz#b7412755f5d83cc139ab65810cdb00d8db40e6ca" + integrity sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw== + dependencies: + lodash-es "^4.17.21" + +chevrotain@~11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/chevrotain/-/chevrotain-11.0.3.tgz#88ffc1fb4b5739c715807eaeedbbf200e202fc1b" + integrity sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw== + dependencies: + "@chevrotain/cst-dts-gen" "11.0.3" + "@chevrotain/gast" "11.0.3" + "@chevrotain/regexp-to-ast" "11.0.3" + "@chevrotain/types" "11.0.3" + "@chevrotain/utils" "11.0.3" + lodash-es "4.17.21" + "chokidar@>=3.0.0 <4.0.0", chokidar@^3.3.0, chokidar@^3.5.1, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -6103,6 +6512,15 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== +chromium-bidi@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.6.3.tgz#363fe1ca6b9c6122b9f1b2a47f9449ecf712f755" + integrity sha512-qXlsCmpCZJAnoTYI83Iu6EdYQpMYdVkCfq08KDh2pmlVqK5t5IA9mGs4/LwCwp4fqisSOMXZxP3HIh8w8aRn0A== + dependencies: + mitt "3.0.1" + urlpattern-polyfill "10.0.0" + zod "3.23.8" + ci-info@^3.2.0: version "3.3.1" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.1.tgz#58331f6f472a25fe3a50a351ae3052936c2c7f32" @@ -6383,6 +6801,11 @@ comma-separated-tokens@^2.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.2.tgz#d4c25abb679b7751c880be623c1179780fe1dd98" integrity sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg== +commander@7: + version "7.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== + commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -6398,6 +6821,11 @@ commander@^6.2.0, commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== +commander@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -6481,6 +6909,11 @@ concurrently@^7.3.0: tree-kill "^1.2.2" yargs "^17.3.1" +confbox@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.8.tgz#820d73d3b3c82d9bd910652c5d4d599ef8ff8b06" + integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== + confusing-browser-globals@^1.0.10: version "1.0.11" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" @@ -6651,6 +7084,20 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== +cose-base@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-1.0.3.tgz#650334b41b869578a543358b80cda7e0abe0a60a" + integrity sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg== + dependencies: + layout-base "^1.0.0" + +cose-base@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-2.2.0.tgz#1c395c35b6e10bb83f9769ca8b817d614add5c01" + integrity sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g== + dependencies: + layout-base "^2.0.0" + cosmiconfig@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" @@ -6683,6 +7130,16 @@ cosmiconfig@^8.2.0: parse-json "^5.2.0" path-type "^4.0.0" +cosmiconfig@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" + integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== + dependencies: + env-paths "^2.2.1" + import-fresh "^3.3.0" + js-yaml "^4.1.0" + parse-json "^5.2.0" + crelt@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/crelt/-/crelt-1.0.5.tgz#57c0d52af8c859e354bace1883eb2e1eb182bb94" @@ -6743,6 +7200,296 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2" integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA== +cytoscape-cose-bilkent@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz#762fa121df9930ffeb51a495d87917c570ac209b" + integrity sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ== + dependencies: + cose-base "^1.0.0" + +cytoscape-fcose@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz#e4d6f6490df4fab58ae9cea9e5c3ab8d7472f471" + integrity sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ== + dependencies: + cose-base "^2.2.0" + +cytoscape@^3.29.2: + version "3.30.3" + resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.30.3.tgz#1b2726bbfa6673f643488a81147354841c252352" + integrity sha512-HncJ9gGJbVtw7YXtIs3+6YAFSSiKsom0amWc33Z7QbylbY2JGMrA0yz4EwrdTScZxnwclXeEZHzO5pxoy0ZE4g== + +"d3-array@1 - 2": + version "2.12.1" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.12.1.tgz#e20b41aafcdffdf5d50928004ececf815a465e81" + integrity sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ== + dependencies: + internmap "^1.0.0" + +"d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3, d3-array@^3.2.0: + version "3.2.4" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.4.tgz#15fec33b237f97ac5d7c986dc77da273a8ed0bb5" + integrity sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg== + dependencies: + internmap "1 - 2" + +d3-axis@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322" + integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw== + +d3-brush@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c" + integrity sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ== + dependencies: + d3-dispatch "1 - 3" + d3-drag "2 - 3" + d3-interpolate "1 - 3" + d3-selection "3" + d3-transition "3" + +d3-chord@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966" + integrity sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g== + dependencies: + d3-path "1 - 3" + +"d3-color@1 - 3", d3-color@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" + integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== + +d3-contour@4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-4.0.2.tgz#bb92063bc8c5663acb2422f99c73cbb6c6ae3bcc" + integrity sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA== + dependencies: + d3-array "^3.2.0" + +d3-delaunay@6: + version "6.0.4" + resolved "https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.4.tgz#98169038733a0a5babbeda55054f795bb9e4a58b" + integrity sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A== + dependencies: + delaunator "5" + +"d3-dispatch@1 - 3", d3-dispatch@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e" + integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg== + +"d3-drag@2 - 3", d3-drag@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba" + integrity sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg== + dependencies: + d3-dispatch "1 - 3" + d3-selection "3" + +"d3-dsv@1 - 3", d3-dsv@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73" + integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q== + dependencies: + commander "7" + iconv-lite "0.6" + rw "1" + +"d3-ease@1 - 3", d3-ease@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4" + integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w== + +d3-fetch@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22" + integrity sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw== + dependencies: + d3-dsv "1 - 3" + +d3-force@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4" + integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg== + dependencies: + d3-dispatch "1 - 3" + d3-quadtree "1 - 3" + d3-timer "1 - 3" + +"d3-format@1 - 3", d3-format@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641" + integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== + +d3-geo@3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.1.1.tgz#6027cf51246f9b2ebd64f99e01dc7c3364033a4d" + integrity sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q== + dependencies: + d3-array "2.5.0 - 3" + +d3-hierarchy@3: + version "3.1.2" + resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b01cd42c1eed3d46db77a5966cf726f8c09160c6" + integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA== + +"d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" + integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== + dependencies: + d3-color "1 - 3" + +d3-path@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" + integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== + +"d3-path@1 - 3", d3-path@3, d3-path@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.1.0.tgz#22df939032fb5a71ae8b1800d61ddb7851c42526" + integrity sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ== + +d3-polygon@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398" + integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg== + +"d3-quadtree@1 - 3", d3-quadtree@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f" + integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw== + +d3-random@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4" + integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== + +d3-sankey@^0.12.3: + version "0.12.3" + resolved "https://registry.yarnpkg.com/d3-sankey/-/d3-sankey-0.12.3.tgz#b3c268627bd72e5d80336e8de6acbfec9d15d01d" + integrity sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ== + dependencies: + d3-array "1 - 2" + d3-shape "^1.2.0" + +d3-scale-chromatic@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz#34c39da298b23c20e02f1a4b239bd0f22e7f1314" + integrity sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ== + dependencies: + d3-color "1 - 3" + d3-interpolate "1 - 3" + +d3-scale@4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396" + integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ== + dependencies: + d3-array "2.10.0 - 3" + d3-format "1 - 3" + d3-interpolate "1.2.0 - 3" + d3-time "2.1.1 - 3" + d3-time-format "2 - 4" + +"d3-selection@2 - 3", d3-selection@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31" + integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ== + +d3-shape@3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.2.0.tgz#a1a839cbd9ba45f28674c69d7f855bcf91dfc6a5" + integrity sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA== + dependencies: + d3-path "^3.1.0" + +d3-shape@^1.2.0: + version "1.3.7" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" + integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw== + dependencies: + d3-path "1" + +"d3-time-format@2 - 4", d3-time-format@4: + version "4.1.0" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a" + integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg== + dependencies: + d3-time "1 - 3" + +"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.1.0.tgz#9310db56e992e3c0175e1ef385e545e48a9bb5c7" + integrity sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q== + dependencies: + d3-array "2 - 3" + +"d3-timer@1 - 3", d3-timer@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0" + integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA== + +"d3-transition@2 - 3", d3-transition@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f" + integrity sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w== + dependencies: + d3-color "1 - 3" + d3-dispatch "1 - 3" + d3-ease "1 - 3" + d3-interpolate "1 - 3" + d3-timer "1 - 3" + +d3-zoom@3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3" + integrity sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw== + dependencies: + d3-dispatch "1 - 3" + d3-drag "2 - 3" + d3-interpolate "1 - 3" + d3-selection "2 - 3" + d3-transition "2 - 3" + +d3@^7.9.0: + version "7.9.0" + resolved "https://registry.yarnpkg.com/d3/-/d3-7.9.0.tgz#579e7acb3d749caf8860bd1741ae8d371070cd5d" + integrity sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA== + dependencies: + d3-array "3" + d3-axis "3" + d3-brush "3" + d3-chord "3" + d3-color "3" + d3-contour "4" + d3-delaunay "6" + d3-dispatch "3" + d3-drag "3" + d3-dsv "3" + d3-ease "3" + d3-fetch "3" + d3-force "3" + d3-format "3" + d3-geo "3" + d3-hierarchy "3" + d3-interpolate "3" + d3-path "3" + d3-polygon "3" + d3-quadtree "3" + d3-random "3" + d3-scale "4" + d3-scale-chromatic "3" + d3-selection "3" + d3-shape "3" + d3-time "3" + d3-time-format "4" + d3-timer "3" + d3-transition "3" + d3-zoom "3" + d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" @@ -6751,6 +7498,14 @@ d@1, d@^1.0.1: es5-ext "^0.10.50" type "^1.0.1" +dagre-d3-es@7.0.11: + version "7.0.11" + resolved "https://registry.yarnpkg.com/dagre-d3-es/-/dagre-d3-es-7.0.11.tgz#2237e726c0577bfe67d1a7cfd2265b9ab2c15c40" + integrity sha512-tvlJLyQf834SylNKax8Wkzco/1ias1OPw8DcUMDE7oUIoSEW25riQVuiu/0OWEFqT0cxHT3Pa9/D82Jr47IONw== + dependencies: + d3 "^7.9.0" + lodash-es "^4.17.21" + damerau-levenshtein@^1.0.7, damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" @@ -6761,6 +7516,11 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== +data-uri-to-buffer@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" + integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== + data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -6780,6 +7540,11 @@ dateformat@^3.0.3: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== +dayjs@^1.11.10: + version "1.11.13" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" + integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== + debounce@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" @@ -6806,6 +7571,13 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.3.5, debug@^4.3.6: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -6962,6 +7734,15 @@ defu@^6.1.2: resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.3.tgz#6d7f56bc61668e844f9f593ace66fd67ef1205fd" integrity sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ== +degenerator@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" + integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== + dependencies: + ast-types "^0.13.4" + escodegen "^2.1.0" + esprima "^4.0.1" + del@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/del/-/del-6.1.0.tgz#aa79a5b0a2a9ecc985c0a075e8ad9a5b23bf949c" @@ -6976,6 +7757,13 @@ del@^6.0.0: rimraf "^3.0.2" slash "^3.0.0" +delaunator@5: + version "5.0.1" + resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.1.tgz#39032b08053923e924d6094fe2cde1a99cc51278" + integrity sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw== + dependencies: + robust-predicates "^3.0.2" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -7065,6 +7853,11 @@ detective@^5.2.1: defined "^1.0.0" minimist "^1.2.6" +devtools-protocol@0.0.1312386: + version "0.0.1312386" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz#5ab824d6f1669ec6c6eb0fba047e73601d969052" + integrity sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA== + didyoumean@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" @@ -7118,6 +7911,11 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" +"dompurify@^3.0.11 <3.1.7": + version "3.1.6" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.1.6.tgz#43c714a94c6a7b8801850f82e756685300a027e2" + integrity sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ== + dot-prop@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -7263,7 +8061,12 @@ enquirer@^2.3.6, enquirer@~2.3.6: dependencies: ansi-colors "^4.1.1" -env-paths@^2.2.0: +entities@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +env-paths@^2.2.0, env-paths@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== @@ -8018,6 +8821,15 @@ estree-util-to-js@^1.1.0: astring "^1.8.0" source-map "^0.7.0" +estree-util-to-js@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/estree-util-to-js/-/estree-util-to-js-1.2.0.tgz#0f80d42443e3b13bd32f7012fffa6f93603f4a36" + integrity sha512-IzU74r1PK5IMMGZXUVZbmiu4A1uhiPgW5hm1GjcOfr4ZzHaMPpLNJjR7HjXiIOzi25nZDrgFTobHTkV5Q6ITjA== + dependencies: + "@types/estree-jsx" "^1.0.0" + astring "^1.8.0" + source-map "^0.7.0" + estree-util-value-to-estree@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/estree-util-value-to-estree/-/estree-util-value-to-estree-1.3.0.tgz#1d3125594b4d6680f666644491e7ac1745a3df49" @@ -8033,6 +8845,14 @@ estree-util-visit@^1.0.0: "@types/estree-jsx" "^1.0.0" "@types/unist" "^2.0.0" +estree-util-visit@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/estree-util-visit/-/estree-util-visit-1.2.1.tgz#8bc2bc09f25b00827294703835aabee1cc9ec69d" + integrity sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw== + dependencies: + "@types/estree-jsx" "^1.0.0" + "@types/unist" "^2.0.0" + estree-walker@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" @@ -8261,6 +9081,17 @@ extract-zip@^1.6.6: mkdirp "^0.5.4" yauzl "^2.10.0" +extract-zip@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== + dependencies: + debug "^4.1.1" + get-stream "^5.1.0" + yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" + fancy-log@^1.3.2: version "1.3.3" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" @@ -8276,6 +9107,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-fifo@^1.2.0, fast-fifo@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" + integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== + fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" @@ -8668,6 +9504,15 @@ fs-extra@11.1.1, fs-extra@^11.1.0, fs-extra@^11.1.1: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^11.2.0: + version "11.2.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^9.0.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -8862,7 +9707,7 @@ get-stream@^3.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== -get-stream@^5.0.0: +get-stream@^5.0.0, get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== @@ -8889,6 +9734,16 @@ get-tsconfig@^4.5.0: dependencies: resolve-pkg-maps "^1.0.0" +get-uri@^6.0.1: + version "6.0.3" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.3.tgz#0d26697bc13cf91092e519aa63aa60ee5b6f385a" + integrity sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw== + dependencies: + basic-ftp "^5.0.2" + data-uri-to-buffer "^6.0.2" + debug "^4.3.4" + fs-extra "^11.2.0" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -9263,6 +10118,11 @@ gzip-size@^6.0.0: dependencies: duplexer "^0.1.2" +hachure-fill@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/hachure-fill/-/hachure-fill-0.5.2.tgz#d19bc4cc8750a5962b47fb1300557a85fcf934cc" + integrity sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg== + handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" @@ -9381,6 +10241,37 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" +hast-util-from-html@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/hast-util-from-html/-/hast-util-from-html-1.0.2.tgz#2482fd701b2d8270b912b3909d6fb645d4a346cf" + integrity sha512-LhrTA2gfCbLOGJq2u/asp4kwuG0y6NhWTXiPKP+n0qNukKy7hc10whqqCFfyvIA1Q5U5d0sp9HhNim9gglEH4A== + dependencies: + "@types/hast" "^2.0.0" + hast-util-from-parse5 "^7.0.0" + parse5 "^7.0.0" + vfile "^5.0.0" + vfile-message "^3.0.0" + +hast-util-from-parse5@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz#aecfef73e3ceafdfa4550716443e4eb7b02e22b0" + integrity sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw== + dependencies: + "@types/hast" "^2.0.0" + "@types/unist" "^2.0.0" + hastscript "^7.0.0" + property-information "^6.0.0" + vfile "^5.0.0" + vfile-location "^4.0.0" + web-namespaces "^2.0.0" + +hast-util-parse-selector@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz#25ab00ae9e75cbc62cf7a901f68a247eade659e2" + integrity sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA== + dependencies: + "@types/hast" "^2.0.0" + hast-util-to-estree@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hast-util-to-estree/-/hast-util-to-estree-2.1.0.tgz#aeac70aad0102ae309570907b3f56a08231d5323" @@ -9402,6 +10293,27 @@ hast-util-to-estree@^2.0.0: unist-util-position "^4.0.0" zwitch "^2.0.0" +hast-util-to-estree@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/hast-util-to-estree/-/hast-util-to-estree-2.3.3.tgz#da60142ffe19a6296923ec222aba73339c8bf470" + integrity sha512-ihhPIUPxN0v0w6M5+IiAZZrn0LH2uZomeWwhn7uP7avZC6TE7lIiEh2yBMPr5+zi1aUCXq6VoYRgs2Bw9xmycQ== + dependencies: + "@types/estree" "^1.0.0" + "@types/estree-jsx" "^1.0.0" + "@types/hast" "^2.0.0" + "@types/unist" "^2.0.0" + comma-separated-tokens "^2.0.0" + estree-util-attach-comments "^2.0.0" + estree-util-is-identifier-name "^2.0.0" + hast-util-whitespace "^2.0.0" + mdast-util-mdx-expression "^1.0.0" + mdast-util-mdxjs-esm "^1.0.0" + property-information "^6.0.0" + space-separated-tokens "^2.0.0" + style-to-object "^0.4.1" + unist-util-position "^4.0.0" + zwitch "^2.0.0" + hast-util-to-string@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/hast-util-to-string/-/hast-util-to-string-1.0.4.tgz#9b24c114866bdb9478927d7e9c36a485ac728378" @@ -9412,6 +10324,17 @@ hast-util-whitespace@^2.0.0: resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-2.0.0.tgz#4fc1086467cc1ef5ba20673cb6b03cec3a970f1c" integrity sha512-Pkw+xBHuV6xFeJprJe2BBEoDV+AvQySaz3pPDRUs5PNZEMQjpXJJueqrpcHIXxnWTcAGi/UOCgVShlkY6kLoqg== +hastscript@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-7.2.0.tgz#0eafb7afb153d047077fa2a833dc9b7ec604d10b" + integrity sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw== + dependencies: + "@types/hast" "^2.0.0" + comma-separated-tokens "^2.0.0" + hast-util-parse-selector "^3.0.0" + property-information "^6.0.0" + space-separated-tokens "^2.0.0" + hex-rgb@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/hex-rgb/-/hex-rgb-4.3.0.tgz#af5e974e83bb2fefe44d55182b004ec818c07776" @@ -9518,6 +10441,14 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + https-proxy-agent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" @@ -9542,6 +10473,14 @@ https-proxy-agent@^7.0.2: agent-base "^7.0.2" debug "4" +https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -9573,7 +10512,7 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2: +iconv-lite@0.6, iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -9720,6 +10659,16 @@ internal-slot@^1.0.5: hasown "^2.0.0" side-channel "^1.0.4" +"internmap@1 - 2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" + integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== + +internmap@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/internmap/-/internmap-1.0.1.tgz#0017cc8a3b99605f0302f2b198d272e015e5df95" + integrity sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw== + interpret@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -9740,6 +10689,14 @@ invert-kv@^1.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + ip@^1.1.5: version "1.1.9" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396" @@ -10858,6 +11815,11 @@ js-yaml@^3.10.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jscodeshift@^0.14.0: version "0.14.0" resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.14.0.tgz#7542e6715d6d2e8bde0b4e883f0ccea358b46881" @@ -11015,6 +11977,18 @@ just-debounce@^1.0.0: resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.1.0.tgz#2f81a3ad4121a76bc7cb45dbf704c0d76a8e5ddf" integrity sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ== +katex@^0.16.9: + version "0.16.11" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.11.tgz#4bc84d5584f996abece5f01c6ad11304276a33f5" + integrity sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ== + dependencies: + commander "^8.3.0" + +khroma@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/khroma/-/khroma-2.1.0.tgz#45f2ce94ce231a437cf5b63c2e886e6eb42bbbb1" + integrity sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw== + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -11049,6 +12023,22 @@ kleur@^4.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== +kolorist@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c" + integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ== + +langium@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/langium/-/langium-3.0.0.tgz#4938294eb57c59066ef955070ac4d0c917b26026" + integrity sha512-+Ez9EoiByeoTu/2BXmEaZ06iPNXM6thWJp02KfBO/raSMyCJ4jw7AkWWa+zBCTm0+Tw1Fj9FOxdqSskyN5nAwg== + dependencies: + chevrotain "~11.0.3" + chevrotain-allstar "~0.3.0" + vscode-languageserver "~9.0.1" + vscode-languageserver-textdocument "~1.0.11" + vscode-uri "~3.0.8" + language-subtag-registry@~0.3.2: version "0.3.21" resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz#04ac218bea46f04cb039084602c6da9e788dd45a" @@ -11069,6 +12059,16 @@ last-run@^1.1.0: default-resolution "^2.0.0" es6-weak-map "^2.0.1" +layout-base@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-1.0.2.tgz#1291e296883c322a9dd4c5dd82063721b53e26e2" + integrity sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg== + +layout-base@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-2.0.1.tgz#d0337913586c90f9c2c075292069f5c2da5dd285" + integrity sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg== + lazy-universal-dotenv@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/lazy-universal-dotenv/-/lazy-universal-dotenv-4.0.0.tgz#0b220c264e89a042a37181a4928cdd298af73422" @@ -11421,6 +12421,14 @@ local-pkg@^0.4.2: resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.2.tgz#13107310b77e74a0e513147a131a2ba288176c2f" integrity sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg== +local-pkg@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.0.tgz#093d25a346bae59a99f80e75f6e9d36d7e8c925c" + integrity sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg== + dependencies: + mlly "^1.4.2" + pkg-types "^1.0.3" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -11451,7 +12459,7 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash-es@^4.17.15: +lodash-es@4.17.21, lodash-es@^4.17.15, lodash-es@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== @@ -11550,7 +12558,7 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: +lru-cache@^7.14.1, lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: version "7.18.3" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== @@ -11745,6 +12753,11 @@ markdown-table@^3.0.0: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.2.tgz#9b59eb2c1b22fe71954a65ff512887065a7bb57c" integrity sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA== +marked@^13.0.2: + version "13.0.3" + resolved "https://registry.yarnpkg.com/marked/-/marked-13.0.3.tgz#5c5b4a5d0198060c7c9bc6ef9420a7fed30f822d" + integrity sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA== + match-sorter@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/match-sorter/-/match-sorter-6.3.1.tgz#98cc37fda756093424ddf3cbc62bfe9c75b92bda" @@ -11804,6 +12817,24 @@ mdast-util-from-markdown@^1.0.0: unist-util-stringify-position "^3.0.0" uvu "^0.5.0" +mdast-util-from-markdown@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz#9421a5a247f10d31d2faed2a30df5ec89ceafcf0" + integrity sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww== + dependencies: + "@types/mdast" "^3.0.0" + "@types/unist" "^2.0.0" + decode-named-character-reference "^1.0.0" + mdast-util-to-string "^3.1.0" + micromark "^3.0.0" + micromark-util-decode-numeric-character-reference "^1.0.0" + micromark-util-decode-string "^1.0.0" + micromark-util-normalize-identifier "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + unist-util-stringify-position "^3.0.0" + uvu "^0.5.0" + mdast-util-gfm-autolink-literal@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.2.tgz#4032dcbaddaef7d4f2f3768ed830475bb22d3970" @@ -11898,6 +12929,17 @@ mdast-util-mdx@^2.0.0: mdast-util-mdx-jsx "^2.0.0" mdast-util-mdxjs-esm "^1.0.0" +mdast-util-mdx@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/mdast-util-mdx/-/mdast-util-mdx-2.0.1.tgz#49b6e70819b99bb615d7223c088d295e53bb810f" + integrity sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw== + dependencies: + mdast-util-from-markdown "^1.0.0" + mdast-util-mdx-expression "^1.0.0" + mdast-util-mdx-jsx "^2.0.0" + mdast-util-mdxjs-esm "^1.0.0" + mdast-util-to-markdown "^1.0.0" + mdast-util-mdxjs-esm@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-1.3.0.tgz#137345ef827169aeeeb6069277cd3e090830ce9a" @@ -11942,6 +12984,20 @@ mdast-util-to-string@^3.0.0, mdast-util-to-string@^3.1.0: resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-3.1.0.tgz#56c506d065fbf769515235e577b5a261552d56e9" integrity sha512-n4Vypz/DZgwo0iMHLQL49dJzlp7YtAJP+N07MZHpjPf/5XJuHUWstviF4Mn2jEiR/GNmtnRRqnwsXExk3igfFA== +mdx-mermaid@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/mdx-mermaid/-/mdx-mermaid-2.0.2.tgz#8ddaaa5708d08292e8c99c91db0c6b3a4a7b18ef" + integrity sha512-HBeR0yO2gtu5seSRrTGL3ufqLhSlvNPJ7DouckRMxJWYQVE4TzoZwfPyd52pv81OdQwZQlNYu6txUhAPN4LUkw== + optionalDependencies: + estree-util-to-js "^1.2.0" + estree-util-visit "^1.2.1" + hast-util-from-html "^1.0.2" + hast-util-to-estree "^2.3.3" + mdast-util-from-markdown "^1.3.1" + mdast-util-mdx "^2.0.1" + micromark-extension-mdxjs "^1.0.1" + puppeteer "^22.15.0" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -11986,6 +13042,33 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +mermaid@^11.4.0: + version "11.4.0" + resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-11.4.0.tgz#e510f45700ed4b31e1dc327b3a405ad9f6907ca3" + integrity sha512-mxCfEYvADJqOiHfGpJXLs4/fAjHz448rH0pfY5fAoxiz70rQiDSzUUy4dNET2T08i46IVpjohPd6WWbzmRHiPA== + dependencies: + "@braintree/sanitize-url" "^7.0.1" + "@iconify/utils" "^2.1.32" + "@mermaid-js/parser" "^0.3.0" + "@types/d3" "^7.4.3" + "@types/dompurify" "^3.0.5" + cytoscape "^3.29.2" + cytoscape-cose-bilkent "^4.1.0" + cytoscape-fcose "^2.2.0" + d3 "^7.9.0" + d3-sankey "^0.12.3" + dagre-d3-es "7.0.11" + dayjs "^1.11.10" + dompurify "^3.0.11 <3.1.7" + katex "^0.16.9" + khroma "^2.1.0" + lodash-es "^4.17.21" + marked "^13.0.2" + roughjs "^4.6.6" + stylis "^4.3.1" + ts-dedent "^2.2.0" + uuid "^9.0.1" + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -12156,6 +13239,20 @@ micromark-extension-mdxjs@^1.0.0: micromark-util-combine-extensions "^1.0.0" micromark-util-types "^1.0.0" +micromark-extension-mdxjs@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/micromark-extension-mdxjs/-/micromark-extension-mdxjs-1.0.1.tgz#f78d4671678d16395efeda85170c520ee795ded8" + integrity sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q== + dependencies: + acorn "^8.0.0" + acorn-jsx "^5.0.0" + micromark-extension-mdx-expression "^1.0.0" + micromark-extension-mdx-jsx "^1.0.0" + micromark-extension-mdx-md "^1.0.0" + micromark-extension-mdxjs-esm "^1.0.0" + micromark-util-combine-extensions "^1.0.0" + micromark-util-types "^1.0.0" + micromark-factory-destination@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz#fef1cb59ad4997c496f887b6977aa3034a5a277e" @@ -12582,6 +13679,11 @@ minizlib@^2.0.0, minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" +mitt@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1" + integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== + mix-css-color@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/mix-css-color/-/mix-css-color-0.2.0.tgz#413a2346effcb36a815b1d09bcbac12bcf3aac63" @@ -12615,6 +13717,16 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mlly@^1.4.2, mlly@^1.7.1, mlly@^1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.3.tgz#d86c0fcd8ad8e16395eb764a5f4b831590cee48c" + integrity sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A== + dependencies: + acorn "^8.14.0" + pathe "^1.1.2" + pkg-types "^1.2.1" + ufo "^1.5.4" + modify-values@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -12635,7 +13747,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -12717,6 +13829,11 @@ neo-async@^2.5.0, neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== +netmask@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7" + integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== + next-seo@^5.5.0: version "5.14.0" resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-5.14.0.tgz#961376571d50c76c3d469c607900774065f62907" @@ -13526,6 +14643,33 @@ p-waterfall@2.1.1: dependencies: p-reduce "^2.0.0" +pac-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz#0fb02496bd9fb8ae7eb11cfd98386daaac442f58" + integrity sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg== + dependencies: + "@tootallnate/quickjs-emscripten" "^0.23.0" + agent-base "^7.0.2" + debug "^4.3.4" + get-uri "^6.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.5" + pac-resolver "^7.0.1" + socks-proxy-agent "^8.0.4" + +pac-resolver@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.1.tgz#54675558ea368b64d210fd9c92a640b5f3b8abb6" + integrity sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== + dependencies: + degenerator "^5.0.0" + netmask "^2.0.2" + +package-manager-detector@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/package-manager-detector/-/package-manager-detector-0.2.2.tgz#fbbc8afe87cdaee471ca9b89c3700236c6d2d9e5" + integrity sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg== + pacote@^15.1.1: version "15.1.1" resolved "https://registry.npmjs.org/pacote/-/pacote-15.1.1.tgz#94d8c6e0605e04d427610b3aacb0357073978348" @@ -13696,6 +14840,13 @@ parse5@^5.1.1: resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== +parse5@^7.0.0: + version "7.2.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.2.1.tgz#8928f55915e6125f430cc44309765bf17556a33a" + integrity sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ== + dependencies: + entities "^4.5.0" + parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -13706,6 +14857,11 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= +path-data-parser@0.1.0, path-data-parser@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/path-data-parser/-/path-data-parser-0.1.0.tgz#8f5ba5cc70fc7becb3dcefaea08e2659aba60b8c" + integrity sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w== + path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -13799,6 +14955,11 @@ pathe@^1.1.1: resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a" integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q== +pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -13906,6 +15067,15 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" +pkg-types@^1.0.3, pkg-types@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.2.1.tgz#6ac4e455a5bb4b9a6185c1c79abd544c901db2e5" + integrity sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw== + dependencies: + confbox "^0.1.8" + mlly "^1.7.2" + pathe "^1.1.2" + please-upgrade-node@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" @@ -13913,6 +15083,19 @@ please-upgrade-node@^3.2.0: dependencies: semver-compare "^1.0.0" +points-on-curve@0.2.0, points-on-curve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/points-on-curve/-/points-on-curve-0.2.0.tgz#7dbb98c43791859434284761330fa893cb81b4d1" + integrity sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A== + +points-on-path@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/points-on-path/-/points-on-path-0.2.1.tgz#553202b5424c53bed37135b318858eacff85dd52" + integrity sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g== + dependencies: + path-data-parser "0.1.0" + points-on-curve "0.2.0" + popmotion@11.0.3: version "11.0.3" resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.3.tgz#565c5f6590bbcddab7a33a074bb2ba97e24b0cc9" @@ -14072,7 +15255,7 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -progress@^2.0.0, progress@^2.0.1: +progress@^2.0.0, progress@^2.0.1, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -14132,6 +15315,20 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-agent@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.4.0.tgz#b4e2dd51dee2b377748aef8d45604c2d7608652d" + integrity sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ== + dependencies: + agent-base "^7.0.2" + debug "^4.3.4" + http-proxy-agent "^7.0.1" + https-proxy-agent "^7.0.3" + lru-cache "^7.14.1" + pac-proxy-agent "^7.0.1" + proxy-from-env "^1.1.0" + socks-proxy-agent "^8.0.2" + proxy-from-env@^1.0.0, proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" @@ -14177,6 +15374,17 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +puppeteer-core@22.15.0: + version "22.15.0" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-22.15.0.tgz#c76926cce5dbc177572797a9dacc325c313fa91a" + integrity sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA== + dependencies: + "@puppeteer/browsers" "2.3.0" + chromium-bidi "0.6.3" + debug "^4.3.6" + devtools-protocol "0.0.1312386" + ws "^8.18.0" + puppeteer-core@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-2.1.1.tgz#e9b3fbc1237b4f66e25999832229e9db3e0b90ed" @@ -14193,6 +15401,16 @@ puppeteer-core@^2.1.1: rimraf "^2.6.1" ws "^6.1.0" +puppeteer@^22.15.0: + version "22.15.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-22.15.0.tgz#4f842087090f1d9017ce947512e7baff55a10e75" + integrity sha512-XjCY1SiSEi1T7iSYuxS82ft85kwDJUS7wj1Z0eGVXKdtr5g4xnVcbjwxhq5xBnpK/E7x1VZZoJDxpjAOasHT4Q== + dependencies: + "@puppeteer/browsers" "2.3.0" + cosmiconfig "^9.0.0" + devtools-protocol "0.0.1312386" + puppeteer-core "22.15.0" + pure-color@1.3.0, pure-color@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" @@ -14231,6 +15449,11 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +queue-tick@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" + integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== + quick-lru@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" @@ -14985,6 +16208,11 @@ rimraf@~2.6.2: dependencies: glob "^7.1.3" +robust-predicates@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.2.tgz#d5b28528c4824d20fc48df1928d41d9efa1ad771" + integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== + rollup-plugin-filesize@^10.0.0: version "10.0.0" resolved "https://registry.npmjs.org/rollup-plugin-filesize/-/rollup-plugin-filesize-10.0.0.tgz#fe5af99e5194fd379f1797b0c87549feaf407f82" @@ -15027,6 +16255,16 @@ rollup@^2.79.1: optionalDependencies: fsevents "~2.3.2" +roughjs@^4.6.6: + version "4.6.6" + resolved "https://registry.yarnpkg.com/roughjs/-/roughjs-4.6.6.tgz#1059f49a5e0c80dee541a005b20cc322b222158b" + integrity sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ== + dependencies: + hachure-fill "^0.5.2" + path-data-parser "^0.1.0" + points-on-curve "^0.2.0" + points-on-path "^0.2.1" + run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -15039,6 +16277,11 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +rw@1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" + integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== + rxjs@^7.0.0, rxjs@^7.5.1: version "7.5.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.7.tgz#2ec0d57fdc89ece220d2e702730ae8f1e49def39" @@ -15191,6 +16434,11 @@ semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semve dependencies: lru-cache "^6.0.0" +semver@^7.6.3: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + send@0.19.0: version "0.19.0" resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" @@ -15464,6 +16712,15 @@ socks-proxy-agent@^7.0.0: debug "^4.3.3" socks "^2.6.2" +socks-proxy-agent@^8.0.2, socks-proxy-agent@^8.0.4: + version "8.0.4" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c" + integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw== + dependencies: + agent-base "^7.1.1" + debug "^4.3.4" + socks "^2.8.3" + socks@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" @@ -15472,6 +16729,14 @@ socks@^2.6.2: ip "^1.1.5" smart-buffer "^4.2.0" +socks@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -15592,6 +16857,11 @@ split@^1.0.1: dependencies: through "2" +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -15682,6 +16952,17 @@ streamsearch@^1.1.0: resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== +streamx@^2.15.0, streamx@^2.20.0: + version "2.20.1" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.20.1.tgz#471c4f8b860f7b696feb83d5b125caab2fdbb93c" + integrity sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA== + dependencies: + fast-fifo "^1.3.2" + queue-tick "^1.0.1" + text-decoder "^1.1.0" + optionalDependencies: + bare-events "^2.2.0" + strict-event-emitter@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.4.3.tgz#45d0f75e1dc071eeb7cfbdff864fd2b9172bc257" @@ -15951,6 +17232,13 @@ style-to-object@^0.3.0: dependencies: inline-style-parser "0.1.1" +style-to-object@^0.4.1: + version "0.4.4" + resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.4.4.tgz#266e3dfd56391a7eefb7770423612d043c3f33ec" + integrity sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg== + dependencies: + inline-style-parser "0.1.1" + style-value-types@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-5.0.0.tgz#76c35f0e579843d523187989da866729411fc8ad" @@ -15966,6 +17254,11 @@ styled-jsx@5.1.1: dependencies: client-only "0.0.1" +stylis@^4.3.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.3.4.tgz#ca5c6c4a35c4784e4e93a2a24dc4e9fa075250a4" + integrity sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now== + sucrase@^3.20.3: version "3.28.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.28.0.tgz#7fd8b3118d2155fcdf291088ab77fa6eefd63c4c" @@ -16081,6 +17374,17 @@ tar-fs@^2.1.1: pump "^3.0.0" tar-stream "^2.1.4" +tar-fs@^3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.6.tgz#eaccd3a67d5672f09ca8e8f9c3d2b89fa173f217" + integrity sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w== + dependencies: + pump "^3.0.0" + tar-stream "^3.1.5" + optionalDependencies: + bare-fs "^2.1.1" + bare-path "^2.1.0" + tar-stream@^2.1.4, tar-stream@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" @@ -16092,6 +17396,15 @@ tar-stream@^2.1.4, tar-stream@~2.2.0: inherits "^2.0.3" readable-stream "^3.1.1" +tar-stream@^3.1.5: + version "3.1.7" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b" + integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ== + dependencies: + b4a "^1.6.4" + fast-fifo "^1.2.0" + streamx "^2.15.0" + tar@6.1.11, tar@^6.0.2: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" @@ -16190,6 +17503,11 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +text-decoder@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.2.1.tgz#e173f5121d97bfa3ff8723429ad5ba92e1ead67e" + integrity sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ== + text-extensions@^1.0.0: version "1.9.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" @@ -16265,6 +17583,11 @@ tinycolor2@^1.4.1: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== +tinyexec@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.1.tgz#0ab0daf93b43e2c211212396bdb836b468c97c98" + integrity sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ== + tinypool@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.2.4.tgz#4d2598c4689d1a2ce267ddf3360a9c6b3925a20c" @@ -16420,7 +17743,7 @@ ts-api-utils@^1.0.1: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== -ts-dedent@^2.0.0: +ts-dedent@^2.0.0, ts-dedent@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5" integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ== @@ -16681,6 +18004,11 @@ typescript@5.0.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== +ufo@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754" + integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== + uglify-js@^3.1.4: version "3.15.5" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.5.tgz#2b10f9e0bfb3f5c15a8e8404393b6361eaeb33b3" @@ -16696,6 +18024,14 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +unbzip2-stream@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" + integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -17035,6 +18371,11 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" +urlpattern-polyfill@10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz#f0a03a97bfb03cdf33553e5e79a2aadd22cac8ec" + integrity sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg== + use-clipboard-copy@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/use-clipboard-copy/-/use-clipboard-copy-0.2.0.tgz#e1f31f2b21e369bc79b5d7b358e2c8aece6ef264" @@ -17068,7 +18409,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^9.0.0: +uuid@^9.0.0, uuid@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== @@ -17246,6 +18587,36 @@ vitest@^0.21.0: tinyspy "^1.0.0" vite "^2.9.12 || ^3.0.0-0" +vscode-jsonrpc@8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz#f43dfa35fb51e763d17cd94dcca0c9458f35abf9" + integrity sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA== + +vscode-languageserver-protocol@3.17.5: + version "3.17.5" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz#864a8b8f390835572f4e13bd9f8313d0e3ac4bea" + integrity sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg== + dependencies: + vscode-jsonrpc "8.2.0" + vscode-languageserver-types "3.17.5" + +vscode-languageserver-textdocument@~1.0.11: + version "1.0.12" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz#457ee04271ab38998a093c68c2342f53f6e4a631" + integrity sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA== + +vscode-languageserver-types@3.17.5: + version "3.17.5" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a" + integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg== + +vscode-languageserver@~9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz#500aef82097eb94df90d008678b0b6b5f474015b" + integrity sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g== + dependencies: + vscode-languageserver-protocol "3.17.5" + vscode-oniguruma@^1.6.1: version "1.6.2" resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz#aeb9771a2f1dbfc9083c8a7fdd9cccaa3f386607" @@ -17256,6 +18627,11 @@ vscode-textmate@5.2.0: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== +vscode-uri@~3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.8.tgz#1770938d3e72588659a172d0fd4642780083ff9f" + integrity sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw== + w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -17297,6 +18673,11 @@ wcwidth@^1.0.0, wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +web-namespaces@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692" + integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -17574,6 +18955,11 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== +ws@^8.18.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + ws@^8.2.3: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" @@ -17673,7 +19059,7 @@ yargs@^17.1.0, yargs@^17.3.1: y18n "^5.0.5" yargs-parser "^21.1.1" -yargs@^17.6.2: +yargs@^17.6.2, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== @@ -17718,6 +19104,11 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +zod@3.23.8: + version "3.23.8" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" + integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== + zwitch@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.2.tgz#91f8d0e901ffa3d66599756dde7f57b17c95dce1" From 559e6ad678830538f55c195857f7aa729541f643 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Thu, 14 Nov 2024 10:04:21 +0000 Subject: [PATCH 09/14] docs --- .../docs/src/pages/architecture/overview.md | 2 - .../docs/src/pages/architecture/overview.mdx | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) delete mode 100644 website/docs/src/pages/architecture/overview.md create mode 100644 website/docs/src/pages/architecture/overview.mdx diff --git a/website/docs/src/pages/architecture/overview.md b/website/docs/src/pages/architecture/overview.md deleted file mode 100644 index 476060daa..000000000 --- a/website/docs/src/pages/architecture/overview.md +++ /dev/null @@ -1,2 +0,0 @@ -# Overview - diff --git a/website/docs/src/pages/architecture/overview.mdx b/website/docs/src/pages/architecture/overview.mdx new file mode 100644 index 000000000..f9e81d29a --- /dev/null +++ b/website/docs/src/pages/architecture/overview.mdx @@ -0,0 +1,50 @@ +# Overview + +import { Mermaid } from 'mdx-mermaid/Mermaid'; + +1. Sandpack React + +- `` component initializes +- Manages React integration & UI state + +2. Sandpack Clinet + +- `loadSandpackClient()` selects appropriate client type (VM/Runtime/Static/Node) +- Creates sandbox context from files, template, and dependencies + +3. Bundler + +- Processes sandbox setup +- Handles code bundling +- Returns updates to client + +
+ + + Note right of C: loadSandpackClient(...) + Note right of C: Depending on the template/env
loadSandpackClient will return a
vm, runtime, static or node client + Note right of C: sandpack-client/clients/index.ts + R->>+C: Get sandbox context + Note over R,C: Based on files, template, and deps,
will be create a SandpackContextInfo. + Note right of R: getSandpackStateFromProps(...) + + C->>-R: New client instance + Note left of R: new SandpackClient() + + create participant B as Bundler + C->>+B: Dispatch sandbox setup + B->>+C: Messages with updates + Note left of R: Once it's done, show
iframe with preview + C->>-R: Done + end + + C->>+R: Dispatch sandbox setup +`} /> \ No newline at end of file From 3015d81f3e004d689adcf54c0107f745574d7d1d Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Thu, 14 Nov 2024 11:44:38 +0000 Subject: [PATCH 10/14] create surface apu --- .codesandbox/tasks.json | 4 ++ .../components/sandpack-examples.tsx | 8 ++- sandpack-client/src/clients/event-emitter.ts | 2 +- sandpack-client/src/clients/vm/index.ts | 67 ++++++++++++------- sandpack-client/src/types.ts | 7 +- .../src/contexts/utils/useClient.ts | 1 + sandpack-react/src/types.ts | 4 ++ 7 files changed, 64 insertions(+), 29 deletions(-) diff --git a/.codesandbox/tasks.json b/.codesandbox/tasks.json index fa65446e2..0461e480c 100644 --- a/.codesandbox/tasks.json +++ b/.codesandbox/tasks.json @@ -63,6 +63,10 @@ "pr-link": "direct" } }, + "dev:nextjs": { + "name": "Dev: Nextjs example", + "command": "yarn dev:nextjs" + }, "dev:website-landing": { "name": "Dev: Website landing", "command": "yarn dev:landing" diff --git a/examples/nextjs-app-dir/components/sandpack-examples.tsx b/examples/nextjs-app-dir/components/sandpack-examples.tsx index d7511af95..f43f46ac1 100644 --- a/examples/nextjs-app-dir/components/sandpack-examples.tsx +++ b/examples/nextjs-app-dir/components/sandpack-examples.tsx @@ -34,7 +34,13 @@ export const SandpackExamples = () => { ))} - + `/api/sandbox/${id}`, + }} + > diff --git a/sandpack-client/src/clients/event-emitter.ts b/sandpack-client/src/clients/event-emitter.ts index f154f48e0..9ef6e433e 100644 --- a/sandpack-client/src/clients/event-emitter.ts +++ b/sandpack-client/src/clients/event-emitter.ts @@ -6,7 +6,7 @@ import type { export class EventEmitter { private listeners: Record = {}; - private listenersCount = 0; + public listenersCount = 0; readonly channelId: number = Math.floor(Math.random() * 1000000); diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts index 9ee93211c..5ac9d37a6 100644 --- a/sandpack-client/src/clients/vm/index.ts +++ b/sandpack-client/src/clients/vm/index.ts @@ -88,8 +88,19 @@ export class SandpackVM extends SandpackClient { }); initLog.log("Fetching sandbox..."); + + nullthrows( + this.options.vmEnvironmentApiUrl, + `No 'options.vmEnvironmentApiUrl' provided. This options is mandatory when using VM as environment` + ); + + nullthrows( + this.sandboxSetup.templateID, + `No templateID provided. This options is mandatory when using VM as environment` + ); + const response = await fetch( - `/api/sandbox/${this.sandboxSetup.templateID}` + this.options.vmEnvironmentApiUrl!(this.sandboxSetup.templateID!) ); const sandpackData = await response.json(); initLog.log("Fetching sandbox success", sandpackData); @@ -160,6 +171,10 @@ export class SandpackVM extends SandpackClient { this.dispatchDoneMessage(); } catch (err) { + if (this.emitter.listenersCount === 0) { + throw err; + } + this.dispatch({ type: "action", action: "notification", @@ -256,34 +271,33 @@ export class SandpackVM extends SandpackClient { } private async globalListeners(): Promise { + // TYPE: // { // "type": "change", // "paths": [ // "/project/sandbox/.git/FETCH_HEAD" // ] // } - - await this.sandbox.fs.watch( - "./", - { - recursive: true, - excludes: [ - "**/node_modules/**", - "**/build/**", - "**/dist/**", - "**/vendor/**", - "**/.config/**", - "**/.vuepress/**", - "**/.git/**", - "**/.next/**", - "**/.nuxt/**", - ], - }, - (message) => { - console.log(message); - } - ); - + // await this.sandbox.fs.watch( + // "./", + // { + // recursive: true, + // excludes: [ + // "**/node_modules/**", + // "**/build/**", + // "**/dist/**", + // "**/vendor/**", + // "**/.config/**", + // "**/.vuepress/**", + // "**/.git/**", + // "**/.next/**", + // "**/.nuxt/**", + // ], + // }, + // (message) => { + // console.log(message); + // } + // ); // await this.sandbox.fs.watch( // "*", // { @@ -372,9 +386,10 @@ export class SandpackVM extends SandpackClient { }); }, 3_000); - const response = await fetch(`/api/sandbox/${this.sandbox.id}`, { - method: "POST", - }); + const response = await fetch( + this.options.vmEnvironmentApiUrl!(this.sandbox.id), + { method: "POST" } + ); const sandpackData = await response.json(); this.sandbox = await Promise.race([ throwIfTimeout(10_000), diff --git a/sandpack-client/src/types.ts b/sandpack-client/src/types.ts index 245520266..b7b1ba60d 100644 --- a/sandpack-client/src/types.ts +++ b/sandpack-client/src/types.ts @@ -1,6 +1,6 @@ import type { SandpackNodeMessage } from "./clients/node/types"; import type { SandpackRuntimeMessage } from "./clients/runtime/types"; -import { SandpackVMMessage } from "./clients/vm/types"; +import type { SandpackVMMessage } from "./clients/vm/types"; export interface ClientOptions { /** @@ -77,6 +77,11 @@ export interface ClientOptions { */ experimental_enableServiceWorker?: boolean; experimental_stableServiceWorkerId?: string; + + /** + * URL Api to connect to the server endpoint when using VM environment + */ + vmEnvironmentApiUrl?: (id: string) => string; } export interface SandboxSetup { diff --git a/sandpack-react/src/contexts/utils/useClient.ts b/sandpack-react/src/contexts/utils/useClient.ts index 63ec88e83..2f4554ecb 100644 --- a/sandpack-react/src/contexts/utils/useClient.ts +++ b/sandpack-react/src/contexts/utils/useClient.ts @@ -197,6 +197,7 @@ export const useClient: UseClient = ( !!options?.experimental_enableServiceWorker, experimental_stableServiceWorkerId: await getStableServiceWorkerId(), sandboxId, + vmEnvironmentApiUrl: options.vmEnvironmentApiUrl, } ); diff --git a/sandpack-react/src/types.ts b/sandpack-react/src/types.ts index 586677634..bee0965d1 100644 --- a/sandpack-react/src/types.ts +++ b/sandpack-react/src/types.ts @@ -172,6 +172,8 @@ export interface SandpackOptions { skipEval?: boolean; fileResolver?: FileResolver; externalResources?: string[]; + + vmEnvironmentApiUrl?: (id: string) => string; } /** @@ -485,6 +487,7 @@ export interface SandpackInternalOptions< classes?: Record; experimental_enableServiceWorker?: boolean; experimental_enableStableServiceWorkerId?: boolean; + vmEnvironmentApiUrl?: (id: string) => string; } interface SandpackInternalProps< @@ -524,6 +527,7 @@ interface SandpackInternalProps< showReadOnly?: boolean; layout?: "preview" | "tests" | "console"; + vmEnvironmentApiUrl?: (id: string) => string; }; } From 1d036f0940913628bb073266338eeb94271813f7 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Fri, 15 Nov 2024 09:49:53 +0000 Subject: [PATCH 11/14] reevrt --- .../docs/src/pages/architecture/overview.mdx | 50 ----------- .../pages/architecture/private-packages.mdx | 85 ------------------- 2 files changed, 135 deletions(-) delete mode 100644 website/docs/src/pages/architecture/overview.mdx delete mode 100644 website/docs/src/pages/architecture/private-packages.mdx diff --git a/website/docs/src/pages/architecture/overview.mdx b/website/docs/src/pages/architecture/overview.mdx deleted file mode 100644 index f9e81d29a..000000000 --- a/website/docs/src/pages/architecture/overview.mdx +++ /dev/null @@ -1,50 +0,0 @@ -# Overview - -import { Mermaid } from 'mdx-mermaid/Mermaid'; - -1. Sandpack React - -- `` component initializes -- Manages React integration & UI state - -2. Sandpack Clinet - -- `loadSandpackClient()` selects appropriate client type (VM/Runtime/Static/Node) -- Creates sandbox context from files, template, and dependencies - -3. Bundler - -- Processes sandbox setup -- Handles code bundling -- Returns updates to client - -
- - - Note right of C: loadSandpackClient(...) - Note right of C: Depending on the template/env
loadSandpackClient will return a
vm, runtime, static or node client - Note right of C: sandpack-client/clients/index.ts - R->>+C: Get sandbox context - Note over R,C: Based on files, template, and deps,
will be create a SandpackContextInfo. - Note right of R: getSandpackStateFromProps(...) - - C->>-R: New client instance - Note left of R: new SandpackClient() - - create participant B as Bundler - C->>+B: Dispatch sandbox setup - B->>+C: Messages with updates - Note left of R: Once it's done, show
iframe with preview - C->>-R: Done - end - - C->>+R: Dispatch sandbox setup -`} /> \ No newline at end of file diff --git a/website/docs/src/pages/architecture/private-packages.mdx b/website/docs/src/pages/architecture/private-packages.mdx deleted file mode 100644 index e069b10c6..000000000 --- a/website/docs/src/pages/architecture/private-packages.mdx +++ /dev/null @@ -1,85 +0,0 @@ -import { Mermaid } from 'mdx-mermaid/Mermaid'; - -# Private dependencies: technical specification - -This document outlines the technical specification for enabling the use of private dependencies on CodeSandbox, specifically for Pro users. This feature leverages the existing infrastructure used for CodeSandbox's private package proxy to provide a secure and seamless experience for developers working with internal or private packages. - -### Use cases - -- **CodeSandbox proxy:** all secrets are stored on csb server, which will proxy internally and respond with package content. This is the safest way to deal with sensitive data once it doesn’t expose any secrets to the client; -- **Companies with internal VPN**: given the nature of a VPN restriction, csb will respond with the registry token to the client, which then will fetch to the npm registry in the internal network. - -## Technical Specification - -1. Authentication Flow: -- The Sandpack component initiates the authentication flow by redirecting the user to `codesandbox.io/auth/sandpack?team-id=`. -- The CodeSandbox authentication service verifies the team-id and provides a sandpack-secret token. -- The sandpack-secret token is stored in a secure cookie with `SameSite=None` and `Secure=true` settings. - -2. Trusted Domains: -- After the authentication flow, Sandpack requests the list of trusted domains for the specified team-id from the CodeSandbox API. -- The API returns the list of trusted domains, which Sandpack uses to set the appropriate Content Security Policy (CSP) headers for the iframe. - - -3. Package Fetch: -- With the sandpack-secret token available, Sandpack makes requests to the CodeSandbox API to fetch the private package data. -- The API authenticates the request using the sandpack-secret token and retrieves the package payload from the internal npm registry. -- The API handles token renewal as necessary to ensure seamless access to the private package. - -
- - - - alt Pop-up authentication - Note over U: 1st step - S->>+C: Sign-in [team-id] - C->>-A: GET /auth/sandpack [team-id] - Note over A: website-url match team config? - A->>+C: sandpack-token - C->>-S: sandpack-token - Note over S: Cookie SameSite=None Secure=true - end - - Note over S: Refresh iframe to use the new cookie - - alt Worker - Note over U: 2nd step - U --> S: iframe src: teamid.sandpack.codesandbox.io - S ->>+A: GET /trusted-domains/:team-id - A ->>-S: List of trusted domains - S ->> U: CSP: frame-ancestors - end - - Note over U: At this point, this domain is a trusted one - - alt Authenticated connection - Note over U: 3rd step: run sandbox - U->>+S: Run this sandbox - S->>+A: GET /[team-id]/npm_registry - A->>-S: Registry configuration - S->>+A: GET /[team-id]/npm_registry/[package] - Note over A: Make sure it renews the token as need - A->>-S: Package payload - end`} /> - -### Worker Technical Specification - -
- - S: iframe src: teamid.sandpack.codesandbox.io - S ->>+A: GET /trusted-domains/:team-id - A ->>-S: List of trusted domains - S ->> U: CSP: frame-ancestors -`} /> From 60b951b336ba89d8a2bc6ea371ff0a558f628410 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Fri, 15 Nov 2024 09:56:34 +0000 Subject: [PATCH 12/14] revert --- website/docs/package.json | 2 - yarn.lock | 1413 +------------------------------------ 2 files changed, 11 insertions(+), 1404 deletions(-) diff --git a/website/docs/package.json b/website/docs/package.json index 5e4ea75cd..b6505d279 100644 --- a/website/docs/package.json +++ b/website/docs/package.json @@ -17,8 +17,6 @@ "@radix-ui/react-tabs": "^1.0.1", "amplitude-js": "^8.13.0", "codesandbox-theme-docs": "^2.0.2", - "mdx-mermaid": "^2.0.2", - "mermaid": "^11.4.0", "next": "^14.0.0", "nextra": "^2.0.1", "nextra-theme-docs": "^2.0.1", diff --git a/yarn.lock b/yarn.lock index ac6648b50..1069afc0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -43,19 +43,6 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@antfu/install-pkg@^0.4.0": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.4.1.tgz#d1d7f3be96ecdb41581629cafe8626d1748c0cf1" - integrity sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw== - dependencies: - package-manager-detector "^0.2.0" - tinyexec "^0.3.0" - -"@antfu/utils@^0.7.10": - version "0.7.10" - resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.7.10.tgz#ae829f170158e297a9b6a28f161a8e487d00814d" - integrity sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww== - "@aw-web-design/x-default-browser@1.4.126": version "1.4.126" resolved "https://registry.yarnpkg.com/@aw-web-design/x-default-browser/-/x-default-browser-1.4.126.tgz#43e4bd8f0314ed907a8718d7e862a203af79bc16" @@ -1968,43 +1955,6 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@braintree/sanitize-url@^7.0.1": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-7.1.0.tgz#048e48aab4f1460e3121e22aa62459d16653dc85" - integrity sha512-o+UlMLt49RvtCASlOMW0AkHnabN9wR9rwCCherxO0yG4Npy34GkvrAqdXQvrhNs+jh+gkK8gB8Lf05qL/O7KWg== - -"@chevrotain/cst-dts-gen@11.0.3": - version "11.0.3" - resolved "https://registry.yarnpkg.com/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz#5e0863cc57dc45e204ccfee6303225d15d9d4783" - integrity sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ== - dependencies: - "@chevrotain/gast" "11.0.3" - "@chevrotain/types" "11.0.3" - lodash-es "4.17.21" - -"@chevrotain/gast@11.0.3": - version "11.0.3" - resolved "https://registry.yarnpkg.com/@chevrotain/gast/-/gast-11.0.3.tgz#e84d8880323fe8cbe792ef69ce3ffd43a936e818" - integrity sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q== - dependencies: - "@chevrotain/types" "11.0.3" - lodash-es "4.17.21" - -"@chevrotain/regexp-to-ast@11.0.3": - version "11.0.3" - resolved "https://registry.yarnpkg.com/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz#11429a81c74a8e6a829271ce02fc66166d56dcdb" - integrity sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA== - -"@chevrotain/types@11.0.3": - version "11.0.3" - resolved "https://registry.yarnpkg.com/@chevrotain/types/-/types-11.0.3.tgz#f8a03914f7b937f594f56eb89312b3b8f1c91848" - integrity sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ== - -"@chevrotain/utils@11.0.3": - version "11.0.3" - resolved "https://registry.yarnpkg.com/@chevrotain/utils/-/utils-11.0.3.tgz#e39999307b102cff3645ec4f5b3665f5297a2224" - integrity sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ== - "@codemirror/autocomplete@^6.0.0", "@codemirror/autocomplete@^6.3.2", "@codemirror/autocomplete@^6.4.0": version "6.4.0" resolved "https://registry.yarnpkg.com/@codemirror/autocomplete/-/autocomplete-6.4.0.tgz#76ac9a2a411a4cc6e13103014dba5e0fe601da5a" @@ -2439,24 +2389,6 @@ resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== -"@iconify/types@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@iconify/types/-/types-2.0.0.tgz#ab0e9ea681d6c8a1214f30cd741fe3a20cc57f57" - integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== - -"@iconify/utils@^2.1.32": - version "2.1.33" - resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.1.33.tgz#cbf7242a52fd0ec58c42d37d28e4406b5327e8c0" - integrity sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw== - dependencies: - "@antfu/install-pkg" "^0.4.0" - "@antfu/utils" "^0.7.10" - "@iconify/types" "^2.0.0" - debug "^4.3.6" - kolorist "^1.8.0" - local-pkg "^0.5.0" - mlly "^1.7.1" - "@icons/material@^0.2.4": version "0.2.4" resolved "https://registry.yarnpkg.com/@icons/material/-/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8" @@ -2905,13 +2837,6 @@ "@types/mdx" "^2.0.0" "@types/react" ">=16" -"@mermaid-js/parser@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@mermaid-js/parser/-/parser-0.3.0.tgz#7a28714599f692f93df130b299fa1aadc9f9c8ab" - integrity sha512-HsvL6zgE5sUPGgkIDlmAWR1HTNHz2Iy11BAWPTa4Jjabkpguy4Ze2gzfLrg6pdRuBvFwgUYyxiaNqZwrEEXepA== - dependencies: - langium "3.0.0" - "@napi-rs/simple-git-android-arm-eabi@0.1.8": version "0.1.8" resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.8.tgz#303bea1ec00db24466e3b3ba13de337d87c5371b" @@ -3384,20 +3309,6 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.6.tgz#cee20bd55e68a1720bdab363ecf0c821ded4cd45" integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw== -"@puppeteer/browsers@2.3.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.3.0.tgz#791ea7d80450fea24eb19fb1d70c367ad4e08cae" - integrity sha512-ioXoq9gPxkss4MYhD+SFaU9p1IHFUX0ILAWFPyjGaBdjLsYAlZw6j1iLA0N/m12uVHLFDfSYNF7EQccjinIMDA== - dependencies: - debug "^4.3.5" - extract-zip "^2.0.1" - progress "^2.0.3" - proxy-agent "^6.4.0" - semver "^7.6.3" - tar-fs "^3.0.6" - unbzip2-stream "^1.4.3" - yargs "^17.7.2" - "@radix-ui/primitive@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.0.0.tgz#e1d8ef30b10ea10e69c76e896f608d9276352253" @@ -4107,11 +4018,6 @@ resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== -"@tootallnate/quickjs-emscripten@^0.23.0": - version "0.23.0" - resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" - integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== - "@tufjs/canonical-json@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz#eade9fd1f537993bc1f0949f3aea276ecc4fab31" @@ -4229,216 +4135,6 @@ dependencies: "@types/node" "*" -"@types/d3-array@*": - version "3.2.1" - resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-3.2.1.tgz#1f6658e3d2006c4fceac53fde464166859f8b8c5" - integrity sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg== - -"@types/d3-axis@*": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@types/d3-axis/-/d3-axis-3.0.6.tgz#e760e5765b8188b1defa32bc8bb6062f81e4c795" - integrity sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-brush@*": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@types/d3-brush/-/d3-brush-3.0.6.tgz#c2f4362b045d472e1b186cdbec329ba52bdaee6c" - integrity sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-chord@*": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@types/d3-chord/-/d3-chord-3.0.6.tgz#1706ca40cf7ea59a0add8f4456efff8f8775793d" - integrity sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg== - -"@types/d3-color@*": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@types/d3-color/-/d3-color-3.1.3.tgz#368c961a18de721da8200e80bf3943fb53136af2" - integrity sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A== - -"@types/d3-contour@*": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@types/d3-contour/-/d3-contour-3.0.6.tgz#9ada3fa9c4d00e3a5093fed0356c7ab929604231" - integrity sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg== - dependencies: - "@types/d3-array" "*" - "@types/geojson" "*" - -"@types/d3-delaunay@*": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz#185c1a80cc807fdda2a3fe960f7c11c4a27952e1" - integrity sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw== - -"@types/d3-dispatch@*": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@types/d3-dispatch/-/d3-dispatch-3.0.6.tgz#096efdf55eb97480e3f5621ff9a8da552f0961e7" - integrity sha512-4fvZhzMeeuBJYZXRXrRIQnvUYfyXwYmLsdiN7XXmVNQKKw1cM8a5WdID0g1hVFZDqT9ZqZEY5pD44p24VS7iZQ== - -"@types/d3-drag@*": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@types/d3-drag/-/d3-drag-3.0.7.tgz#b13aba8b2442b4068c9a9e6d1d82f8bcea77fc02" - integrity sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-dsv@*": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@types/d3-dsv/-/d3-dsv-3.0.7.tgz#0a351f996dc99b37f4fa58b492c2d1c04e3dac17" - integrity sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g== - -"@types/d3-ease@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/d3-ease/-/d3-ease-3.0.2.tgz#e28db1bfbfa617076f7770dd1d9a48eaa3b6c51b" - integrity sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA== - -"@types/d3-fetch@*": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@types/d3-fetch/-/d3-fetch-3.0.7.tgz#c04a2b4f23181aa376f30af0283dbc7b3b569980" - integrity sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA== - dependencies: - "@types/d3-dsv" "*" - -"@types/d3-force@*": - version "3.0.10" - resolved "https://registry.yarnpkg.com/@types/d3-force/-/d3-force-3.0.10.tgz#6dc8fc6e1f35704f3b057090beeeb7ac674bff1a" - integrity sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw== - -"@types/d3-format@*": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/d3-format/-/d3-format-3.0.4.tgz#b1e4465644ddb3fdf3a263febb240a6cd616de90" - integrity sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g== - -"@types/d3-geo@*": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/d3-geo/-/d3-geo-3.1.0.tgz#b9e56a079449174f0a2c8684a9a4df3f60522440" - integrity sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ== - dependencies: - "@types/geojson" "*" - -"@types/d3-hierarchy@*": - version "3.1.7" - resolved "https://registry.yarnpkg.com/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz#6023fb3b2d463229f2d680f9ac4b47466f71f17b" - integrity sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg== - -"@types/d3-interpolate@*": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz#412b90e84870285f2ff8a846c6eb60344f12a41c" - integrity sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA== - dependencies: - "@types/d3-color" "*" - -"@types/d3-path@*": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-3.1.0.tgz#2b907adce762a78e98828f0b438eaca339ae410a" - integrity sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ== - -"@types/d3-polygon@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/d3-polygon/-/d3-polygon-3.0.2.tgz#dfae54a6d35d19e76ac9565bcb32a8e54693189c" - integrity sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA== - -"@types/d3-quadtree@*": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz#d4740b0fe35b1c58b66e1488f4e7ed02952f570f" - integrity sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg== - -"@types/d3-random@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/d3-random/-/d3-random-3.0.3.tgz#ed995c71ecb15e0cd31e22d9d5d23942e3300cfb" - integrity sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ== - -"@types/d3-scale-chromatic@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.3.tgz#fc0db9c10e789c351f4c42d96f31f2e4df8f5644" - integrity sha512-laXM4+1o5ImZv3RpFAsTRn3TEkzqkytiOY0Dz0sq5cnd1dtNlk6sHLon4OvqaiJb28T0S/TdsBI3Sjsy+keJrw== - -"@types/d3-scale@*": - version "4.0.8" - resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-4.0.8.tgz#d409b5f9dcf63074464bf8ddfb8ee5a1f95945bb" - integrity sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ== - dependencies: - "@types/d3-time" "*" - -"@types/d3-selection@*": - version "3.0.11" - resolved "https://registry.yarnpkg.com/@types/d3-selection/-/d3-selection-3.0.11.tgz#bd7a45fc0a8c3167a631675e61bc2ca2b058d4a3" - integrity sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w== - -"@types/d3-shape@*": - version "3.1.6" - resolved "https://registry.yarnpkg.com/@types/d3-shape/-/d3-shape-3.1.6.tgz#65d40d5a548f0a023821773e39012805e6e31a72" - integrity sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA== - dependencies: - "@types/d3-path" "*" - -"@types/d3-time-format@*": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/d3-time-format/-/d3-time-format-4.0.3.tgz#d6bc1e6b6a7db69cccfbbdd4c34b70632d9e9db2" - integrity sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg== - -"@types/d3-time@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-3.0.3.tgz#3c186bbd9d12b9d84253b6be6487ca56b54f88be" - integrity sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw== - -"@types/d3-timer@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/d3-timer/-/d3-timer-3.0.2.tgz#70bbda77dc23aa727413e22e214afa3f0e852f70" - integrity sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw== - -"@types/d3-transition@*": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@types/d3-transition/-/d3-transition-3.0.9.tgz#1136bc57e9ddb3c390dccc9b5ff3b7d2b8d94706" - integrity sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-zoom@*": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@types/d3-zoom/-/d3-zoom-3.0.8.tgz#dccb32d1c56b1e1c6e0f1180d994896f038bc40b" - integrity sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw== - dependencies: - "@types/d3-interpolate" "*" - "@types/d3-selection" "*" - -"@types/d3@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@types/d3/-/d3-7.4.3.tgz#d4550a85d08f4978faf0a4c36b848c61eaac07e2" - integrity sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww== - dependencies: - "@types/d3-array" "*" - "@types/d3-axis" "*" - "@types/d3-brush" "*" - "@types/d3-chord" "*" - "@types/d3-color" "*" - "@types/d3-contour" "*" - "@types/d3-delaunay" "*" - "@types/d3-dispatch" "*" - "@types/d3-drag" "*" - "@types/d3-dsv" "*" - "@types/d3-ease" "*" - "@types/d3-fetch" "*" - "@types/d3-force" "*" - "@types/d3-format" "*" - "@types/d3-geo" "*" - "@types/d3-hierarchy" "*" - "@types/d3-interpolate" "*" - "@types/d3-path" "*" - "@types/d3-polygon" "*" - "@types/d3-quadtree" "*" - "@types/d3-random" "*" - "@types/d3-scale" "*" - "@types/d3-scale-chromatic" "*" - "@types/d3-selection" "*" - "@types/d3-shape" "*" - "@types/d3-time" "*" - "@types/d3-time-format" "*" - "@types/d3-timer" "*" - "@types/d3-transition" "*" - "@types/d3-zoom" "*" - "@types/debug@^4.0.0": version "4.1.7" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" @@ -4461,13 +4157,6 @@ resolved "https://registry.yarnpkg.com/@types/doctrine/-/doctrine-0.0.6.tgz#12ede1f7cd3797be5856277c85f031299ccd2641" integrity sha512-KlEqPtaNBHBJ2/fVA4yLdD0Tc8zw34pKU4K5SHBIEwtLJ8xxumIC1xeG+4S+/9qhVj2MqC7O3Ld8WvDG4HqlgA== -"@types/dompurify@^3.0.5": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-3.0.5.tgz#02069a2fcb89a163bacf1a788f73cb415dd75cb7" - integrity sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg== - dependencies: - "@types/trusted-types" "*" - "@types/ejs@^3.1.1": version "3.1.4" resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.1.4.tgz#b9919c89767493b6443f85994ae6be6e49011b5c" @@ -4537,11 +4226,6 @@ dependencies: "@types/node" "*" -"@types/geojson@*": - version "7946.0.14" - resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613" - integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg== - "@types/git-url-parse@^9.0.1": version "9.0.1" resolved "https://registry.yarnpkg.com/@types/git-url-parse/-/git-url-parse-9.0.1.tgz#1c7cc89527ca8b5afcf260ead3b0e4e373c43938" @@ -4825,11 +4509,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/trusted-types@*": - version "2.0.7" - resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11" - integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw== - "@types/unist@*", "@types/unist@^2.0.0": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" @@ -4847,13 +4526,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yauzl@^2.9.1": - version "2.10.3" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.3.tgz#e9b2808b4f109504a03cda958259876f61017999" - integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== - dependencies: - "@types/node" "*" - "@typescript-eslint/eslint-plugin@^6.9.0": version "6.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.0.tgz#fdb6f3821c0167e3356e9d89c80e8230b2e401f4" @@ -5066,11 +4738,6 @@ acorn@^8.10.0, acorn@^8.8.2, acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== -acorn@^8.14.0: - version "8.14.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" - integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== - add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -5100,13 +4767,6 @@ agent-base@^7.0.2: dependencies: debug "^4.3.4" -agent-base@^7.1.0, agent-base@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" - integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== - dependencies: - debug "^4.3.4" - agentkeepalive@^4.1.3: version "4.2.1" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" @@ -5561,13 +5221,6 @@ ast-types@0.15.2: dependencies: tslib "^2.0.1" -ast-types@^0.13.4: - version "0.13.4" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" - integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== - dependencies: - tslib "^2.0.1" - ast-types@^0.16.1: version "0.16.1" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.16.1.tgz#7a9da1617c9081bc121faafe91711b4c8bb81da2" @@ -5692,11 +5345,6 @@ axobject-query@^3.1.1: dependencies: dequal "^2.0.3" -b4a@^1.6.4: - version "1.6.7" - resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.7.tgz#a99587d4ebbfbd5a6e3b21bdb5d5fa385767abe4" - integrity sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg== - babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" @@ -5894,39 +5542,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -bare-events@^2.0.0, bare-events@^2.2.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.5.0.tgz#305b511e262ffd8b9d5616b056464f8e1b3329cc" - integrity sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A== - -bare-fs@^2.1.1: - version "2.3.5" - resolved "https://registry.yarnpkg.com/bare-fs/-/bare-fs-2.3.5.tgz#05daa8e8206aeb46d13c2fe25a2cd3797b0d284a" - integrity sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw== - dependencies: - bare-events "^2.0.0" - bare-path "^2.0.0" - bare-stream "^2.0.0" - -bare-os@^2.1.0: - version "2.4.4" - resolved "https://registry.yarnpkg.com/bare-os/-/bare-os-2.4.4.tgz#01243392eb0a6e947177bb7c8a45123d45c9b1a9" - integrity sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ== - -bare-path@^2.0.0, bare-path@^2.1.0: - version "2.1.3" - resolved "https://registry.yarnpkg.com/bare-path/-/bare-path-2.1.3.tgz#594104c829ef660e43b5589ec8daef7df6cedb3e" - integrity sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA== - dependencies: - bare-os "^2.1.0" - -bare-stream@^2.0.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/bare-stream/-/bare-stream-2.3.2.tgz#3bc62b429bcf850d2f265719b7a49ee0630a3ae4" - integrity sha512-EFZHSIBkDgSHIwj2l2QZfP4U5OcD4xFAOwhSb/vlr9PIqyGJGvB/nfClJbcnh3EY4jtPE4zsb5ztae96bVF79A== - dependencies: - streamx "^2.20.0" - base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -5945,11 +5560,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -basic-ftp@^5.0.2: - version "5.0.5" - resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.0.5.tgz#14a474f5fffecca1f4f406f1c26b18f800225ac0" - integrity sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg== - before-after-hook@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" @@ -6146,7 +5756,7 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^5.2.1, buffer@^5.5.0: +buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -6449,25 +6059,6 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== -chevrotain-allstar@~0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz#b7412755f5d83cc139ab65810cdb00d8db40e6ca" - integrity sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw== - dependencies: - lodash-es "^4.17.21" - -chevrotain@~11.0.3: - version "11.0.3" - resolved "https://registry.yarnpkg.com/chevrotain/-/chevrotain-11.0.3.tgz#88ffc1fb4b5739c715807eaeedbbf200e202fc1b" - integrity sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw== - dependencies: - "@chevrotain/cst-dts-gen" "11.0.3" - "@chevrotain/gast" "11.0.3" - "@chevrotain/regexp-to-ast" "11.0.3" - "@chevrotain/types" "11.0.3" - "@chevrotain/utils" "11.0.3" - lodash-es "4.17.21" - "chokidar@>=3.0.0 <4.0.0", chokidar@^3.3.0, chokidar@^3.5.1, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -6512,15 +6103,6 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -chromium-bidi@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.6.3.tgz#363fe1ca6b9c6122b9f1b2a47f9449ecf712f755" - integrity sha512-qXlsCmpCZJAnoTYI83Iu6EdYQpMYdVkCfq08KDh2pmlVqK5t5IA9mGs4/LwCwp4fqisSOMXZxP3HIh8w8aRn0A== - dependencies: - mitt "3.0.1" - urlpattern-polyfill "10.0.0" - zod "3.23.8" - ci-info@^3.2.0: version "3.3.1" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.1.tgz#58331f6f472a25fe3a50a351ae3052936c2c7f32" @@ -6801,11 +6383,6 @@ comma-separated-tokens@^2.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.2.tgz#d4c25abb679b7751c880be623c1179780fe1dd98" integrity sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg== -commander@7: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -6821,11 +6398,6 @@ commander@^6.2.0, commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -6909,11 +6481,6 @@ concurrently@^7.3.0: tree-kill "^1.2.2" yargs "^17.3.1" -confbox@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.8.tgz#820d73d3b3c82d9bd910652c5d4d599ef8ff8b06" - integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== - confusing-browser-globals@^1.0.10: version "1.0.11" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" @@ -7084,20 +6651,6 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cose-base@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-1.0.3.tgz#650334b41b869578a543358b80cda7e0abe0a60a" - integrity sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg== - dependencies: - layout-base "^1.0.0" - -cose-base@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cose-base/-/cose-base-2.2.0.tgz#1c395c35b6e10bb83f9769ca8b817d614add5c01" - integrity sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g== - dependencies: - layout-base "^2.0.0" - cosmiconfig@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" @@ -7130,16 +6683,6 @@ cosmiconfig@^8.2.0: parse-json "^5.2.0" path-type "^4.0.0" -cosmiconfig@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" - integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== - dependencies: - env-paths "^2.2.1" - import-fresh "^3.3.0" - js-yaml "^4.1.0" - parse-json "^5.2.0" - crelt@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/crelt/-/crelt-1.0.5.tgz#57c0d52af8c859e354bace1883eb2e1eb182bb94" @@ -7200,296 +6743,6 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2" integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA== -cytoscape-cose-bilkent@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz#762fa121df9930ffeb51a495d87917c570ac209b" - integrity sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ== - dependencies: - cose-base "^1.0.0" - -cytoscape-fcose@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz#e4d6f6490df4fab58ae9cea9e5c3ab8d7472f471" - integrity sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ== - dependencies: - cose-base "^2.2.0" - -cytoscape@^3.29.2: - version "3.30.3" - resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.30.3.tgz#1b2726bbfa6673f643488a81147354841c252352" - integrity sha512-HncJ9gGJbVtw7YXtIs3+6YAFSSiKsom0amWc33Z7QbylbY2JGMrA0yz4EwrdTScZxnwclXeEZHzO5pxoy0ZE4g== - -"d3-array@1 - 2": - version "2.12.1" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.12.1.tgz#e20b41aafcdffdf5d50928004ececf815a465e81" - integrity sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ== - dependencies: - internmap "^1.0.0" - -"d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3, d3-array@^3.2.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.4.tgz#15fec33b237f97ac5d7c986dc77da273a8ed0bb5" - integrity sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg== - dependencies: - internmap "1 - 2" - -d3-axis@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322" - integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw== - -d3-brush@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c" - integrity sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ== - dependencies: - d3-dispatch "1 - 3" - d3-drag "2 - 3" - d3-interpolate "1 - 3" - d3-selection "3" - d3-transition "3" - -d3-chord@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966" - integrity sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g== - dependencies: - d3-path "1 - 3" - -"d3-color@1 - 3", d3-color@3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" - integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== - -d3-contour@4: - version "4.0.2" - resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-4.0.2.tgz#bb92063bc8c5663acb2422f99c73cbb6c6ae3bcc" - integrity sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA== - dependencies: - d3-array "^3.2.0" - -d3-delaunay@6: - version "6.0.4" - resolved "https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.4.tgz#98169038733a0a5babbeda55054f795bb9e4a58b" - integrity sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A== - dependencies: - delaunator "5" - -"d3-dispatch@1 - 3", d3-dispatch@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e" - integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg== - -"d3-drag@2 - 3", d3-drag@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba" - integrity sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg== - dependencies: - d3-dispatch "1 - 3" - d3-selection "3" - -"d3-dsv@1 - 3", d3-dsv@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73" - integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q== - dependencies: - commander "7" - iconv-lite "0.6" - rw "1" - -"d3-ease@1 - 3", d3-ease@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4" - integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w== - -d3-fetch@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22" - integrity sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw== - dependencies: - d3-dsv "1 - 3" - -d3-force@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4" - integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg== - dependencies: - d3-dispatch "1 - 3" - d3-quadtree "1 - 3" - d3-timer "1 - 3" - -"d3-format@1 - 3", d3-format@3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641" - integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== - -d3-geo@3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.1.1.tgz#6027cf51246f9b2ebd64f99e01dc7c3364033a4d" - integrity sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q== - dependencies: - d3-array "2.5.0 - 3" - -d3-hierarchy@3: - version "3.1.2" - resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b01cd42c1eed3d46db77a5966cf726f8c09160c6" - integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA== - -"d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" - integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== - dependencies: - d3-color "1 - 3" - -d3-path@1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" - integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== - -"d3-path@1 - 3", d3-path@3, d3-path@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.1.0.tgz#22df939032fb5a71ae8b1800d61ddb7851c42526" - integrity sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ== - -d3-polygon@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398" - integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg== - -"d3-quadtree@1 - 3", d3-quadtree@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f" - integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw== - -d3-random@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4" - integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== - -d3-sankey@^0.12.3: - version "0.12.3" - resolved "https://registry.yarnpkg.com/d3-sankey/-/d3-sankey-0.12.3.tgz#b3c268627bd72e5d80336e8de6acbfec9d15d01d" - integrity sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ== - dependencies: - d3-array "1 - 2" - d3-shape "^1.2.0" - -d3-scale-chromatic@3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz#34c39da298b23c20e02f1a4b239bd0f22e7f1314" - integrity sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ== - dependencies: - d3-color "1 - 3" - d3-interpolate "1 - 3" - -d3-scale@4: - version "4.0.2" - resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396" - integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ== - dependencies: - d3-array "2.10.0 - 3" - d3-format "1 - 3" - d3-interpolate "1.2.0 - 3" - d3-time "2.1.1 - 3" - d3-time-format "2 - 4" - -"d3-selection@2 - 3", d3-selection@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31" - integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ== - -d3-shape@3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.2.0.tgz#a1a839cbd9ba45f28674c69d7f855bcf91dfc6a5" - integrity sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA== - dependencies: - d3-path "^3.1.0" - -d3-shape@^1.2.0: - version "1.3.7" - resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" - integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw== - dependencies: - d3-path "1" - -"d3-time-format@2 - 4", d3-time-format@4: - version "4.1.0" - resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a" - integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg== - dependencies: - d3-time "1 - 3" - -"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.1.0.tgz#9310db56e992e3c0175e1ef385e545e48a9bb5c7" - integrity sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q== - dependencies: - d3-array "2 - 3" - -"d3-timer@1 - 3", d3-timer@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0" - integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA== - -"d3-transition@2 - 3", d3-transition@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f" - integrity sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w== - dependencies: - d3-color "1 - 3" - d3-dispatch "1 - 3" - d3-ease "1 - 3" - d3-interpolate "1 - 3" - d3-timer "1 - 3" - -d3-zoom@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3" - integrity sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw== - dependencies: - d3-dispatch "1 - 3" - d3-drag "2 - 3" - d3-interpolate "1 - 3" - d3-selection "2 - 3" - d3-transition "2 - 3" - -d3@^7.9.0: - version "7.9.0" - resolved "https://registry.yarnpkg.com/d3/-/d3-7.9.0.tgz#579e7acb3d749caf8860bd1741ae8d371070cd5d" - integrity sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA== - dependencies: - d3-array "3" - d3-axis "3" - d3-brush "3" - d3-chord "3" - d3-color "3" - d3-contour "4" - d3-delaunay "6" - d3-dispatch "3" - d3-drag "3" - d3-dsv "3" - d3-ease "3" - d3-fetch "3" - d3-force "3" - d3-format "3" - d3-geo "3" - d3-hierarchy "3" - d3-interpolate "3" - d3-path "3" - d3-polygon "3" - d3-quadtree "3" - d3-random "3" - d3-scale "4" - d3-scale-chromatic "3" - d3-selection "3" - d3-shape "3" - d3-time "3" - d3-time-format "4" - d3-timer "3" - d3-transition "3" - d3-zoom "3" - d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" @@ -7498,14 +6751,6 @@ d@1, d@^1.0.1: es5-ext "^0.10.50" type "^1.0.1" -dagre-d3-es@7.0.11: - version "7.0.11" - resolved "https://registry.yarnpkg.com/dagre-d3-es/-/dagre-d3-es-7.0.11.tgz#2237e726c0577bfe67d1a7cfd2265b9ab2c15c40" - integrity sha512-tvlJLyQf834SylNKax8Wkzco/1ias1OPw8DcUMDE7oUIoSEW25riQVuiu/0OWEFqT0cxHT3Pa9/D82Jr47IONw== - dependencies: - d3 "^7.9.0" - lodash-es "^4.17.21" - damerau-levenshtein@^1.0.7, damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" @@ -7516,11 +6761,6 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== -data-uri-to-buffer@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" - integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== - data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -7540,11 +6780,6 @@ dateformat@^3.0.3: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -dayjs@^1.11.10: - version "1.11.13" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" - integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== - debounce@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" @@ -7571,13 +6806,6 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.3.5, debug@^4.3.6: - version "4.3.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== - dependencies: - ms "^2.1.3" - decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -7734,15 +6962,6 @@ defu@^6.1.2: resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.3.tgz#6d7f56bc61668e844f9f593ace66fd67ef1205fd" integrity sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ== -degenerator@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" - integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== - dependencies: - ast-types "^0.13.4" - escodegen "^2.1.0" - esprima "^4.0.1" - del@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/del/-/del-6.1.0.tgz#aa79a5b0a2a9ecc985c0a075e8ad9a5b23bf949c" @@ -7757,13 +6976,6 @@ del@^6.0.0: rimraf "^3.0.2" slash "^3.0.0" -delaunator@5: - version "5.0.1" - resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.1.tgz#39032b08053923e924d6094fe2cde1a99cc51278" - integrity sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw== - dependencies: - robust-predicates "^3.0.2" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -7853,11 +7065,6 @@ detective@^5.2.1: defined "^1.0.0" minimist "^1.2.6" -devtools-protocol@0.0.1312386: - version "0.0.1312386" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz#5ab824d6f1669ec6c6eb0fba047e73601d969052" - integrity sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA== - didyoumean@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" @@ -7911,11 +7118,6 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" -"dompurify@^3.0.11 <3.1.7": - version "3.1.6" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.1.6.tgz#43c714a94c6a7b8801850f82e756685300a027e2" - integrity sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ== - dot-prop@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -8061,12 +7263,7 @@ enquirer@^2.3.6, enquirer@~2.3.6: dependencies: ansi-colors "^4.1.1" -entities@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - -env-paths@^2.2.0, env-paths@^2.2.1: +env-paths@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== @@ -8821,15 +8018,6 @@ estree-util-to-js@^1.1.0: astring "^1.8.0" source-map "^0.7.0" -estree-util-to-js@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/estree-util-to-js/-/estree-util-to-js-1.2.0.tgz#0f80d42443e3b13bd32f7012fffa6f93603f4a36" - integrity sha512-IzU74r1PK5IMMGZXUVZbmiu4A1uhiPgW5hm1GjcOfr4ZzHaMPpLNJjR7HjXiIOzi25nZDrgFTobHTkV5Q6ITjA== - dependencies: - "@types/estree-jsx" "^1.0.0" - astring "^1.8.0" - source-map "^0.7.0" - estree-util-value-to-estree@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/estree-util-value-to-estree/-/estree-util-value-to-estree-1.3.0.tgz#1d3125594b4d6680f666644491e7ac1745a3df49" @@ -8845,14 +8033,6 @@ estree-util-visit@^1.0.0: "@types/estree-jsx" "^1.0.0" "@types/unist" "^2.0.0" -estree-util-visit@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/estree-util-visit/-/estree-util-visit-1.2.1.tgz#8bc2bc09f25b00827294703835aabee1cc9ec69d" - integrity sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/unist" "^2.0.0" - estree-walker@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" @@ -9081,17 +8261,6 @@ extract-zip@^1.6.6: mkdirp "^0.5.4" yauzl "^2.10.0" -extract-zip@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" - integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== - dependencies: - debug "^4.1.1" - get-stream "^5.1.0" - yauzl "^2.10.0" - optionalDependencies: - "@types/yauzl" "^2.9.1" - fancy-log@^1.3.2: version "1.3.3" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" @@ -9107,11 +8276,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-fifo@^1.2.0, fast-fifo@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" - integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== - fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" @@ -9504,15 +8668,6 @@ fs-extra@11.1.1, fs-extra@^11.1.0, fs-extra@^11.1.1: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^11.2.0: - version "11.2.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" - integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-extra@^9.0.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -9707,7 +8862,7 @@ get-stream@^3.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== -get-stream@^5.0.0, get-stream@^5.1.0: +get-stream@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== @@ -9734,16 +8889,6 @@ get-tsconfig@^4.5.0: dependencies: resolve-pkg-maps "^1.0.0" -get-uri@^6.0.1: - version "6.0.3" - resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.3.tgz#0d26697bc13cf91092e519aa63aa60ee5b6f385a" - integrity sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw== - dependencies: - basic-ftp "^5.0.2" - data-uri-to-buffer "^6.0.2" - debug "^4.3.4" - fs-extra "^11.2.0" - get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -10118,11 +9263,6 @@ gzip-size@^6.0.0: dependencies: duplexer "^0.1.2" -hachure-fill@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/hachure-fill/-/hachure-fill-0.5.2.tgz#d19bc4cc8750a5962b47fb1300557a85fcf934cc" - integrity sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg== - handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" @@ -10241,37 +9381,6 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" -hast-util-from-html@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/hast-util-from-html/-/hast-util-from-html-1.0.2.tgz#2482fd701b2d8270b912b3909d6fb645d4a346cf" - integrity sha512-LhrTA2gfCbLOGJq2u/asp4kwuG0y6NhWTXiPKP+n0qNukKy7hc10whqqCFfyvIA1Q5U5d0sp9HhNim9gglEH4A== - dependencies: - "@types/hast" "^2.0.0" - hast-util-from-parse5 "^7.0.0" - parse5 "^7.0.0" - vfile "^5.0.0" - vfile-message "^3.0.0" - -hast-util-from-parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz#aecfef73e3ceafdfa4550716443e4eb7b02e22b0" - integrity sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw== - dependencies: - "@types/hast" "^2.0.0" - "@types/unist" "^2.0.0" - hastscript "^7.0.0" - property-information "^6.0.0" - vfile "^5.0.0" - vfile-location "^4.0.0" - web-namespaces "^2.0.0" - -hast-util-parse-selector@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz#25ab00ae9e75cbc62cf7a901f68a247eade659e2" - integrity sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA== - dependencies: - "@types/hast" "^2.0.0" - hast-util-to-estree@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hast-util-to-estree/-/hast-util-to-estree-2.1.0.tgz#aeac70aad0102ae309570907b3f56a08231d5323" @@ -10293,27 +9402,6 @@ hast-util-to-estree@^2.0.0: unist-util-position "^4.0.0" zwitch "^2.0.0" -hast-util-to-estree@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/hast-util-to-estree/-/hast-util-to-estree-2.3.3.tgz#da60142ffe19a6296923ec222aba73339c8bf470" - integrity sha512-ihhPIUPxN0v0w6M5+IiAZZrn0LH2uZomeWwhn7uP7avZC6TE7lIiEh2yBMPr5+zi1aUCXq6VoYRgs2Bw9xmycQ== - dependencies: - "@types/estree" "^1.0.0" - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^2.0.0" - "@types/unist" "^2.0.0" - comma-separated-tokens "^2.0.0" - estree-util-attach-comments "^2.0.0" - estree-util-is-identifier-name "^2.0.0" - hast-util-whitespace "^2.0.0" - mdast-util-mdx-expression "^1.0.0" - mdast-util-mdxjs-esm "^1.0.0" - property-information "^6.0.0" - space-separated-tokens "^2.0.0" - style-to-object "^0.4.1" - unist-util-position "^4.0.0" - zwitch "^2.0.0" - hast-util-to-string@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/hast-util-to-string/-/hast-util-to-string-1.0.4.tgz#9b24c114866bdb9478927d7e9c36a485ac728378" @@ -10324,17 +9412,6 @@ hast-util-whitespace@^2.0.0: resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-2.0.0.tgz#4fc1086467cc1ef5ba20673cb6b03cec3a970f1c" integrity sha512-Pkw+xBHuV6xFeJprJe2BBEoDV+AvQySaz3pPDRUs5PNZEMQjpXJJueqrpcHIXxnWTcAGi/UOCgVShlkY6kLoqg== -hastscript@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-7.2.0.tgz#0eafb7afb153d047077fa2a833dc9b7ec604d10b" - integrity sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw== - dependencies: - "@types/hast" "^2.0.0" - comma-separated-tokens "^2.0.0" - hast-util-parse-selector "^3.0.0" - property-information "^6.0.0" - space-separated-tokens "^2.0.0" - hex-rgb@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/hex-rgb/-/hex-rgb-4.3.0.tgz#af5e974e83bb2fefe44d55182b004ec818c07776" @@ -10441,14 +9518,6 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" -http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: - version "7.0.2" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" - integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== - dependencies: - agent-base "^7.1.0" - debug "^4.3.4" - https-proxy-agent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" @@ -10473,14 +9542,6 @@ https-proxy-agent@^7.0.2: agent-base "^7.0.2" debug "4" -https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" - integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== - dependencies: - agent-base "^7.0.2" - debug "4" - human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -10512,7 +9573,7 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@0.6, iconv-lite@^0.6.2: +iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -10659,16 +9720,6 @@ internal-slot@^1.0.5: hasown "^2.0.0" side-channel "^1.0.4" -"internmap@1 - 2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" - integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== - -internmap@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/internmap/-/internmap-1.0.1.tgz#0017cc8a3b99605f0302f2b198d272e015e5df95" - integrity sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw== - interpret@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -10689,14 +9740,6 @@ invert-kv@^1.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= -ip-address@^9.0.5: - version "9.0.5" - resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" - integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== - dependencies: - jsbn "1.1.0" - sprintf-js "^1.1.3" - ip@^1.1.5: version "1.1.9" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396" @@ -11815,11 +10858,6 @@ js-yaml@^3.10.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -jsbn@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" - integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== - jscodeshift@^0.14.0: version "0.14.0" resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.14.0.tgz#7542e6715d6d2e8bde0b4e883f0ccea358b46881" @@ -11977,18 +11015,6 @@ just-debounce@^1.0.0: resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.1.0.tgz#2f81a3ad4121a76bc7cb45dbf704c0d76a8e5ddf" integrity sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ== -katex@^0.16.9: - version "0.16.11" - resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.11.tgz#4bc84d5584f996abece5f01c6ad11304276a33f5" - integrity sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ== - dependencies: - commander "^8.3.0" - -khroma@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/khroma/-/khroma-2.1.0.tgz#45f2ce94ce231a437cf5b63c2e886e6eb42bbbb1" - integrity sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw== - kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -12023,22 +11049,6 @@ kleur@^4.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== -kolorist@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c" - integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ== - -langium@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/langium/-/langium-3.0.0.tgz#4938294eb57c59066ef955070ac4d0c917b26026" - integrity sha512-+Ez9EoiByeoTu/2BXmEaZ06iPNXM6thWJp02KfBO/raSMyCJ4jw7AkWWa+zBCTm0+Tw1Fj9FOxdqSskyN5nAwg== - dependencies: - chevrotain "~11.0.3" - chevrotain-allstar "~0.3.0" - vscode-languageserver "~9.0.1" - vscode-languageserver-textdocument "~1.0.11" - vscode-uri "~3.0.8" - language-subtag-registry@~0.3.2: version "0.3.21" resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz#04ac218bea46f04cb039084602c6da9e788dd45a" @@ -12059,16 +11069,6 @@ last-run@^1.1.0: default-resolution "^2.0.0" es6-weak-map "^2.0.1" -layout-base@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-1.0.2.tgz#1291e296883c322a9dd4c5dd82063721b53e26e2" - integrity sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg== - -layout-base@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/layout-base/-/layout-base-2.0.1.tgz#d0337913586c90f9c2c075292069f5c2da5dd285" - integrity sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg== - lazy-universal-dotenv@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/lazy-universal-dotenv/-/lazy-universal-dotenv-4.0.0.tgz#0b220c264e89a042a37181a4928cdd298af73422" @@ -12421,14 +11421,6 @@ local-pkg@^0.4.2: resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.2.tgz#13107310b77e74a0e513147a131a2ba288176c2f" integrity sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg== -local-pkg@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.0.tgz#093d25a346bae59a99f80e75f6e9d36d7e8c925c" - integrity sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg== - dependencies: - mlly "^1.4.2" - pkg-types "^1.0.3" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -12459,7 +11451,7 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash-es@4.17.21, lodash-es@^4.17.15, lodash-es@^4.17.21: +lodash-es@^4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== @@ -12558,7 +11550,7 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.14.1, lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: +lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: version "7.18.3" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== @@ -12753,11 +11745,6 @@ markdown-table@^3.0.0: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.2.tgz#9b59eb2c1b22fe71954a65ff512887065a7bb57c" integrity sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA== -marked@^13.0.2: - version "13.0.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-13.0.3.tgz#5c5b4a5d0198060c7c9bc6ef9420a7fed30f822d" - integrity sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA== - match-sorter@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/match-sorter/-/match-sorter-6.3.1.tgz#98cc37fda756093424ddf3cbc62bfe9c75b92bda" @@ -12817,24 +11804,6 @@ mdast-util-from-markdown@^1.0.0: unist-util-stringify-position "^3.0.0" uvu "^0.5.0" -mdast-util-from-markdown@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz#9421a5a247f10d31d2faed2a30df5ec89ceafcf0" - integrity sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - decode-named-character-reference "^1.0.0" - mdast-util-to-string "^3.1.0" - micromark "^3.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-decode-string "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - unist-util-stringify-position "^3.0.0" - uvu "^0.5.0" - mdast-util-gfm-autolink-literal@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.2.tgz#4032dcbaddaef7d4f2f3768ed830475bb22d3970" @@ -12929,17 +11898,6 @@ mdast-util-mdx@^2.0.0: mdast-util-mdx-jsx "^2.0.0" mdast-util-mdxjs-esm "^1.0.0" -mdast-util-mdx@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-mdx/-/mdast-util-mdx-2.0.1.tgz#49b6e70819b99bb615d7223c088d295e53bb810f" - integrity sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw== - dependencies: - mdast-util-from-markdown "^1.0.0" - mdast-util-mdx-expression "^1.0.0" - mdast-util-mdx-jsx "^2.0.0" - mdast-util-mdxjs-esm "^1.0.0" - mdast-util-to-markdown "^1.0.0" - mdast-util-mdxjs-esm@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-1.3.0.tgz#137345ef827169aeeeb6069277cd3e090830ce9a" @@ -12984,20 +11942,6 @@ mdast-util-to-string@^3.0.0, mdast-util-to-string@^3.1.0: resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-3.1.0.tgz#56c506d065fbf769515235e577b5a261552d56e9" integrity sha512-n4Vypz/DZgwo0iMHLQL49dJzlp7YtAJP+N07MZHpjPf/5XJuHUWstviF4Mn2jEiR/GNmtnRRqnwsXExk3igfFA== -mdx-mermaid@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/mdx-mermaid/-/mdx-mermaid-2.0.2.tgz#8ddaaa5708d08292e8c99c91db0c6b3a4a7b18ef" - integrity sha512-HBeR0yO2gtu5seSRrTGL3ufqLhSlvNPJ7DouckRMxJWYQVE4TzoZwfPyd52pv81OdQwZQlNYu6txUhAPN4LUkw== - optionalDependencies: - estree-util-to-js "^1.2.0" - estree-util-visit "^1.2.1" - hast-util-from-html "^1.0.2" - hast-util-to-estree "^2.3.3" - mdast-util-from-markdown "^1.3.1" - mdast-util-mdx "^2.0.1" - micromark-extension-mdxjs "^1.0.1" - puppeteer "^22.15.0" - media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -13042,33 +11986,6 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -mermaid@^11.4.0: - version "11.4.0" - resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-11.4.0.tgz#e510f45700ed4b31e1dc327b3a405ad9f6907ca3" - integrity sha512-mxCfEYvADJqOiHfGpJXLs4/fAjHz448rH0pfY5fAoxiz70rQiDSzUUy4dNET2T08i46IVpjohPd6WWbzmRHiPA== - dependencies: - "@braintree/sanitize-url" "^7.0.1" - "@iconify/utils" "^2.1.32" - "@mermaid-js/parser" "^0.3.0" - "@types/d3" "^7.4.3" - "@types/dompurify" "^3.0.5" - cytoscape "^3.29.2" - cytoscape-cose-bilkent "^4.1.0" - cytoscape-fcose "^2.2.0" - d3 "^7.9.0" - d3-sankey "^0.12.3" - dagre-d3-es "7.0.11" - dayjs "^1.11.10" - dompurify "^3.0.11 <3.1.7" - katex "^0.16.9" - khroma "^2.1.0" - lodash-es "^4.17.21" - marked "^13.0.2" - roughjs "^4.6.6" - stylis "^4.3.1" - ts-dedent "^2.2.0" - uuid "^9.0.1" - methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -13239,20 +12156,6 @@ micromark-extension-mdxjs@^1.0.0: micromark-util-combine-extensions "^1.0.0" micromark-util-types "^1.0.0" -micromark-extension-mdxjs@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/micromark-extension-mdxjs/-/micromark-extension-mdxjs-1.0.1.tgz#f78d4671678d16395efeda85170c520ee795ded8" - integrity sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q== - dependencies: - acorn "^8.0.0" - acorn-jsx "^5.0.0" - micromark-extension-mdx-expression "^1.0.0" - micromark-extension-mdx-jsx "^1.0.0" - micromark-extension-mdx-md "^1.0.0" - micromark-extension-mdxjs-esm "^1.0.0" - micromark-util-combine-extensions "^1.0.0" - micromark-util-types "^1.0.0" - micromark-factory-destination@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz#fef1cb59ad4997c496f887b6977aa3034a5a277e" @@ -13679,11 +12582,6 @@ minizlib@^2.0.0, minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" -mitt@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1" - integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== - mix-css-color@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/mix-css-color/-/mix-css-color-0.2.0.tgz#413a2346effcb36a815b1d09bcbac12bcf3aac63" @@ -13717,16 +12615,6 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mlly@^1.4.2, mlly@^1.7.1, mlly@^1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.3.tgz#d86c0fcd8ad8e16395eb764a5f4b831590cee48c" - integrity sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A== - dependencies: - acorn "^8.14.0" - pathe "^1.1.2" - pkg-types "^1.2.1" - ufo "^1.5.4" - modify-values@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -13747,7 +12635,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -13829,11 +12717,6 @@ neo-async@^2.5.0, neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -netmask@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7" - integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== - next-seo@^5.5.0: version "5.14.0" resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-5.14.0.tgz#961376571d50c76c3d469c607900774065f62907" @@ -14643,33 +13526,6 @@ p-waterfall@2.1.1: dependencies: p-reduce "^2.0.0" -pac-proxy-agent@^7.0.1: - version "7.0.2" - resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz#0fb02496bd9fb8ae7eb11cfd98386daaac442f58" - integrity sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg== - dependencies: - "@tootallnate/quickjs-emscripten" "^0.23.0" - agent-base "^7.0.2" - debug "^4.3.4" - get-uri "^6.0.1" - http-proxy-agent "^7.0.0" - https-proxy-agent "^7.0.5" - pac-resolver "^7.0.1" - socks-proxy-agent "^8.0.4" - -pac-resolver@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.1.tgz#54675558ea368b64d210fd9c92a640b5f3b8abb6" - integrity sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== - dependencies: - degenerator "^5.0.0" - netmask "^2.0.2" - -package-manager-detector@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/package-manager-detector/-/package-manager-detector-0.2.2.tgz#fbbc8afe87cdaee471ca9b89c3700236c6d2d9e5" - integrity sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg== - pacote@^15.1.1: version "15.1.1" resolved "https://registry.npmjs.org/pacote/-/pacote-15.1.1.tgz#94d8c6e0605e04d427610b3aacb0357073978348" @@ -14840,13 +13696,6 @@ parse5@^5.1.1: resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== -parse5@^7.0.0: - version "7.2.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.2.1.tgz#8928f55915e6125f430cc44309765bf17556a33a" - integrity sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ== - dependencies: - entities "^4.5.0" - parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -14857,11 +13706,6 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-data-parser@0.1.0, path-data-parser@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/path-data-parser/-/path-data-parser-0.1.0.tgz#8f5ba5cc70fc7becb3dcefaea08e2659aba60b8c" - integrity sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w== - path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -14955,11 +13799,6 @@ pathe@^1.1.1: resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a" integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q== -pathe@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" - integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== - pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -15067,15 +13906,6 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" -pkg-types@^1.0.3, pkg-types@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.2.1.tgz#6ac4e455a5bb4b9a6185c1c79abd544c901db2e5" - integrity sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw== - dependencies: - confbox "^0.1.8" - mlly "^1.7.2" - pathe "^1.1.2" - please-upgrade-node@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" @@ -15083,19 +13913,6 @@ please-upgrade-node@^3.2.0: dependencies: semver-compare "^1.0.0" -points-on-curve@0.2.0, points-on-curve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/points-on-curve/-/points-on-curve-0.2.0.tgz#7dbb98c43791859434284761330fa893cb81b4d1" - integrity sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A== - -points-on-path@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/points-on-path/-/points-on-path-0.2.1.tgz#553202b5424c53bed37135b318858eacff85dd52" - integrity sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g== - dependencies: - path-data-parser "0.1.0" - points-on-curve "0.2.0" - popmotion@11.0.3: version "11.0.3" resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.3.tgz#565c5f6590bbcddab7a33a074bb2ba97e24b0cc9" @@ -15255,7 +14072,7 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -progress@^2.0.0, progress@^2.0.1, progress@^2.0.3: +progress@^2.0.0, progress@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -15315,20 +14132,6 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-agent@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.4.0.tgz#b4e2dd51dee2b377748aef8d45604c2d7608652d" - integrity sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ== - dependencies: - agent-base "^7.0.2" - debug "^4.3.4" - http-proxy-agent "^7.0.1" - https-proxy-agent "^7.0.3" - lru-cache "^7.14.1" - pac-proxy-agent "^7.0.1" - proxy-from-env "^1.1.0" - socks-proxy-agent "^8.0.2" - proxy-from-env@^1.0.0, proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" @@ -15374,17 +14177,6 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer-core@22.15.0: - version "22.15.0" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-22.15.0.tgz#c76926cce5dbc177572797a9dacc325c313fa91a" - integrity sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA== - dependencies: - "@puppeteer/browsers" "2.3.0" - chromium-bidi "0.6.3" - debug "^4.3.6" - devtools-protocol "0.0.1312386" - ws "^8.18.0" - puppeteer-core@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-2.1.1.tgz#e9b3fbc1237b4f66e25999832229e9db3e0b90ed" @@ -15401,16 +14193,6 @@ puppeteer-core@^2.1.1: rimraf "^2.6.1" ws "^6.1.0" -puppeteer@^22.15.0: - version "22.15.0" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-22.15.0.tgz#4f842087090f1d9017ce947512e7baff55a10e75" - integrity sha512-XjCY1SiSEi1T7iSYuxS82ft85kwDJUS7wj1Z0eGVXKdtr5g4xnVcbjwxhq5xBnpK/E7x1VZZoJDxpjAOasHT4Q== - dependencies: - "@puppeteer/browsers" "2.3.0" - cosmiconfig "^9.0.0" - devtools-protocol "0.0.1312386" - puppeteer-core "22.15.0" - pure-color@1.3.0, pure-color@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" @@ -15449,11 +14231,6 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -queue-tick@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" - integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== - quick-lru@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" @@ -16208,11 +14985,6 @@ rimraf@~2.6.2: dependencies: glob "^7.1.3" -robust-predicates@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.2.tgz#d5b28528c4824d20fc48df1928d41d9efa1ad771" - integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== - rollup-plugin-filesize@^10.0.0: version "10.0.0" resolved "https://registry.npmjs.org/rollup-plugin-filesize/-/rollup-plugin-filesize-10.0.0.tgz#fe5af99e5194fd379f1797b0c87549feaf407f82" @@ -16255,16 +15027,6 @@ rollup@^2.79.1: optionalDependencies: fsevents "~2.3.2" -roughjs@^4.6.6: - version "4.6.6" - resolved "https://registry.yarnpkg.com/roughjs/-/roughjs-4.6.6.tgz#1059f49a5e0c80dee541a005b20cc322b222158b" - integrity sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ== - dependencies: - hachure-fill "^0.5.2" - path-data-parser "^0.1.0" - points-on-curve "^0.2.0" - points-on-path "^0.2.1" - run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -16277,11 +15039,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rw@1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" - integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== - rxjs@^7.0.0, rxjs@^7.5.1: version "7.5.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.7.tgz#2ec0d57fdc89ece220d2e702730ae8f1e49def39" @@ -16434,11 +15191,6 @@ semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semve dependencies: lru-cache "^6.0.0" -semver@^7.6.3: - version "7.6.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" - integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== - send@0.19.0: version "0.19.0" resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" @@ -16712,15 +15464,6 @@ socks-proxy-agent@^7.0.0: debug "^4.3.3" socks "^2.6.2" -socks-proxy-agent@^8.0.2, socks-proxy-agent@^8.0.4: - version "8.0.4" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c" - integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw== - dependencies: - agent-base "^7.1.1" - debug "^4.3.4" - socks "^2.8.3" - socks@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" @@ -16729,14 +15472,6 @@ socks@^2.6.2: ip "^1.1.5" smart-buffer "^4.2.0" -socks@^2.8.3: - version "2.8.3" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" - integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== - dependencies: - ip-address "^9.0.5" - smart-buffer "^4.2.0" - sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -16857,11 +15592,6 @@ split@^1.0.1: dependencies: through "2" -sprintf-js@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" - integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -16952,17 +15682,6 @@ streamsearch@^1.1.0: resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== -streamx@^2.15.0, streamx@^2.20.0: - version "2.20.1" - resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.20.1.tgz#471c4f8b860f7b696feb83d5b125caab2fdbb93c" - integrity sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA== - dependencies: - fast-fifo "^1.3.2" - queue-tick "^1.0.1" - text-decoder "^1.1.0" - optionalDependencies: - bare-events "^2.2.0" - strict-event-emitter@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.4.3.tgz#45d0f75e1dc071eeb7cfbdff864fd2b9172bc257" @@ -17232,13 +15951,6 @@ style-to-object@^0.3.0: dependencies: inline-style-parser "0.1.1" -style-to-object@^0.4.1: - version "0.4.4" - resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.4.4.tgz#266e3dfd56391a7eefb7770423612d043c3f33ec" - integrity sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg== - dependencies: - inline-style-parser "0.1.1" - style-value-types@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-5.0.0.tgz#76c35f0e579843d523187989da866729411fc8ad" @@ -17254,11 +15966,6 @@ styled-jsx@5.1.1: dependencies: client-only "0.0.1" -stylis@^4.3.1: - version "4.3.4" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.3.4.tgz#ca5c6c4a35c4784e4e93a2a24dc4e9fa075250a4" - integrity sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now== - sucrase@^3.20.3: version "3.28.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.28.0.tgz#7fd8b3118d2155fcdf291088ab77fa6eefd63c4c" @@ -17374,17 +16081,6 @@ tar-fs@^2.1.1: pump "^3.0.0" tar-stream "^2.1.4" -tar-fs@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.6.tgz#eaccd3a67d5672f09ca8e8f9c3d2b89fa173f217" - integrity sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w== - dependencies: - pump "^3.0.0" - tar-stream "^3.1.5" - optionalDependencies: - bare-fs "^2.1.1" - bare-path "^2.1.0" - tar-stream@^2.1.4, tar-stream@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" @@ -17396,15 +16092,6 @@ tar-stream@^2.1.4, tar-stream@~2.2.0: inherits "^2.0.3" readable-stream "^3.1.1" -tar-stream@^3.1.5: - version "3.1.7" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b" - integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ== - dependencies: - b4a "^1.6.4" - fast-fifo "^1.2.0" - streamx "^2.15.0" - tar@6.1.11, tar@^6.0.2: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" @@ -17503,11 +16190,6 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -text-decoder@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.2.1.tgz#e173f5121d97bfa3ff8723429ad5ba92e1ead67e" - integrity sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ== - text-extensions@^1.0.0: version "1.9.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" @@ -17583,11 +16265,6 @@ tinycolor2@^1.4.1: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== -tinyexec@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.1.tgz#0ab0daf93b43e2c211212396bdb836b468c97c98" - integrity sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ== - tinypool@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.2.4.tgz#4d2598c4689d1a2ce267ddf3360a9c6b3925a20c" @@ -17743,7 +16420,7 @@ ts-api-utils@^1.0.1: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== -ts-dedent@^2.0.0, ts-dedent@^2.2.0: +ts-dedent@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5" integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ== @@ -18004,11 +16681,6 @@ typescript@5.0.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== -ufo@^1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754" - integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ== - uglify-js@^3.1.4: version "3.15.5" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.5.tgz#2b10f9e0bfb3f5c15a8e8404393b6361eaeb33b3" @@ -18024,14 +16696,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -unbzip2-stream@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" - integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -18371,11 +17035,6 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" -urlpattern-polyfill@10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz#f0a03a97bfb03cdf33553e5e79a2aadd22cac8ec" - integrity sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg== - use-clipboard-copy@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/use-clipboard-copy/-/use-clipboard-copy-0.2.0.tgz#e1f31f2b21e369bc79b5d7b358e2c8aece6ef264" @@ -18409,7 +17068,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^9.0.0, uuid@^9.0.1: +uuid@^9.0.0: version "9.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== @@ -18587,36 +17246,6 @@ vitest@^0.21.0: tinyspy "^1.0.0" vite "^2.9.12 || ^3.0.0-0" -vscode-jsonrpc@8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz#f43dfa35fb51e763d17cd94dcca0c9458f35abf9" - integrity sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA== - -vscode-languageserver-protocol@3.17.5: - version "3.17.5" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz#864a8b8f390835572f4e13bd9f8313d0e3ac4bea" - integrity sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg== - dependencies: - vscode-jsonrpc "8.2.0" - vscode-languageserver-types "3.17.5" - -vscode-languageserver-textdocument@~1.0.11: - version "1.0.12" - resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz#457ee04271ab38998a093c68c2342f53f6e4a631" - integrity sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA== - -vscode-languageserver-types@3.17.5: - version "3.17.5" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a" - integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg== - -vscode-languageserver@~9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz#500aef82097eb94df90d008678b0b6b5f474015b" - integrity sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g== - dependencies: - vscode-languageserver-protocol "3.17.5" - vscode-oniguruma@^1.6.1: version "1.6.2" resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz#aeb9771a2f1dbfc9083c8a7fdd9cccaa3f386607" @@ -18627,11 +17256,6 @@ vscode-textmate@5.2.0: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== -vscode-uri@~3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.8.tgz#1770938d3e72588659a172d0fd4642780083ff9f" - integrity sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw== - w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -18673,11 +17297,6 @@ wcwidth@^1.0.0, wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -web-namespaces@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692" - integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ== - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -18955,11 +17574,6 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@^8.18.0: - version "8.18.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" - integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== - ws@^8.2.3: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" @@ -19059,7 +17673,7 @@ yargs@^17.1.0, yargs@^17.3.1: y18n "^5.0.5" yargs-parser "^21.1.1" -yargs@^17.6.2, yargs@^17.7.2: +yargs@^17.6.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== @@ -19104,11 +17718,6 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zod@3.23.8: - version "3.23.8" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" - integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== - zwitch@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.2.tgz#91f8d0e901ffa3d66599756dde7f57b17c95dce1" From c671cc5f45bc0816440820d0b53d2bdd137558b1 Mon Sep 17 00:00:00 2001 From: Christian Alfoni Date: Wed, 23 Apr 2025 15:29:07 +0200 Subject: [PATCH 13/14] REWORK --- .prettierignore | 16 +- lerna.json | 7 +- package.json | 18 +- playground/.gitignore | 24 + playground/README.md | 54 + playground/index.html | 13 + playground/package.json | 27 + playground/public/vite.svg | 1 + playground/server/index.ts | 112 ++ playground/src/App.tsx | 15 + playground/src/Dashboard.tsx | 24 + playground/src/Editor.tsx | 55 + playground/src/main.tsx | 13 + playground/src/vite-env.d.ts | 1 + playground/tsconfig.app.json | 26 + playground/tsconfig.json | 7 + playground/tsconfig.node.json | 24 + playground/vite.config.ts | 23 + playground/yarn.lock | 1211 ++++++++++++++++ sandpack-client/package.json | 11 +- sandpack-client/rollup.config.js | 9 +- sandpack-client/src/clients/index.ts | 3 - .../src/clients/node/client.utils.test.ts | 61 - .../src/clients/node/client.utils.ts | 120 -- .../src/clients/node/iframe.utils.ts | 65 - sandpack-client/src/clients/node/index.ts | 463 ------ .../node/inject-scripts/historyListener.ts | 85 -- .../src/clients/node/inject-scripts/index.ts | 36 - .../src/clients/node/inject-scripts/resize.ts | 57 - .../src/clients/node/taskManager.test.ts | 124 -- .../src/clients/node/taskManager.ts | 178 --- sandpack-client/src/clients/node/types.ts | 80 -- sandpack-client/src/clients/static/index.ts | 16 +- sandpack-client/src/clients/static/utils.ts | 2 +- .../src/clients/vm/client.utils.ts | 18 +- sandpack-client/src/clients/vm/index.ts | 12 +- .../src/clients/vm/inject-scripts/index.ts | 16 +- sandpack-client/src/types.ts | 6 +- sandpack-client/tsconfig.json | 3 +- sandpack-environments/.bundler | 3 + sandpack-environments/.eslintignore | 5 + sandpack-environments/.gitignore | 7 + sandpack-environments/CHANGELOG.md | 696 ++++++++++ sandpack-environments/README.md | 26 + sandpack-environments/babel.config.js | 7 + sandpack-environments/gulpfile.js | 51 + sandpack-environments/package.json | 69 + sandpack-environments/rollup.config.js | 70 + .../src/InMemoryFileSystem.ts | 299 ++++ .../src/clients/bundler/BundlerPreview.ts | 463 ++++++ .../clients/bundler/file-resolver-protocol.ts | 58 + .../src/clients/bundler/iframe-protocol.ts | 135 ++ .../src/clients/bundler/index.ts | 131 ++ .../src/clients/bundler/mime.ts | 22 + .../src/clients/bundler/types.ts | 433 ++++++ .../src/clients/bundler/utils.ts | 437 ++++++ .../src/clients/static/StaticPreview.ts | 240 ++++ .../src/clients/static/index.ts | 97 ++ .../src/clients/static/utils.ts | 48 + .../src/clients/vm/VMFileSystem.ts | 69 + .../src/clients/vm/VMPreview.ts | 102 ++ sandpack-environments/src/clients/vm/index.ts | 98 ++ sandpack-environments/src/index.ts | 31 + .../src/inject-scripts/consoleHook.ts | 20 + .../src/sandpack-bundler-types.ts | 79 ++ sandpack-environments/src/types.ts | 89 ++ sandpack-environments/src/utils.ts | 31 + sandpack-environments/tsconfig.json | 20 + sandpack-react/package.json | 7 +- .../src/components/CodeEditor/CodeMirror.tsx | 11 +- .../src/components/CodeEditor/index.tsx | 95 +- .../src/components/FileExplorer/Directory.tsx | 59 - .../components/FileExplorer/ModuleList.tsx | 123 +- .../src/components/FileExplorer/index.tsx | 41 +- .../src/components/FileExplorer/util.test.ts | 78 -- .../src/components/FileExplorer/utils.ts | 48 - .../src/components/Navigator/index.tsx | 49 +- .../src/components/Preview/index.tsx | 264 ++-- .../src/components/SandpackProvider/index.tsx | 37 + .../src/components/TranspiledCode/index.tsx | 4 +- .../common/DependenciesProgress.tsx | 6 +- .../src/components/common/ErrorOverlay.tsx | 50 +- .../src/components/common/Layout.tsx | 3 - .../src/components/common/Loading.tsx | 4 +- .../src/components/common/LoadingOverlay.tsx | 59 +- .../contexts/SandpackEnvironmentContext.tsx | 138 ++ .../src/contexts/SandpackStateContext.tsx | 63 + .../src/contexts/sandpackContext.test.tsx | 547 -------- .../src/contexts/sandpackContext.tsx | 79 -- .../src/contexts/utils/useAppState.ts | 8 +- .../src/contexts/utils/useClient.ts | 115 +- sandpack-react/src/contexts/utils/useFiles.ts | 11 +- .../src/hooks/useLoadingOverlayState.ts | 46 +- sandpack-react/src/hooks/usePreview.ts | 22 + sandpack-react/src/hooks/useSandpack.ts | 4 +- .../src/hooks/useSandpackPreviewProgress.ts | 86 +- sandpack-react/src/hooks/useSandpackShell.ts | 12 +- sandpack-react/src/index.ts | 2 +- sandpack-react/src/presets/Sandpack.tsx | 169 ++- sandpack-react/src/types.ts | 110 +- sandpack-react/src/utils/sandpackUtils.ts | 64 +- sandpack-react/tsconfig.json | 3 + yarn.lock | 1235 +++++++++++++++-- 103 files changed, 7596 insertions(+), 2928 deletions(-) create mode 100644 playground/.gitignore create mode 100644 playground/README.md create mode 100644 playground/index.html create mode 100644 playground/package.json create mode 100644 playground/public/vite.svg create mode 100644 playground/server/index.ts create mode 100644 playground/src/App.tsx create mode 100644 playground/src/Dashboard.tsx create mode 100644 playground/src/Editor.tsx create mode 100644 playground/src/main.tsx create mode 100644 playground/src/vite-env.d.ts create mode 100644 playground/tsconfig.app.json create mode 100644 playground/tsconfig.json create mode 100644 playground/tsconfig.node.json create mode 100644 playground/vite.config.ts create mode 100644 playground/yarn.lock delete mode 100644 sandpack-client/src/clients/node/client.utils.test.ts delete mode 100644 sandpack-client/src/clients/node/client.utils.ts delete mode 100644 sandpack-client/src/clients/node/iframe.utils.ts delete mode 100644 sandpack-client/src/clients/node/index.ts delete mode 100644 sandpack-client/src/clients/node/inject-scripts/historyListener.ts delete mode 100644 sandpack-client/src/clients/node/inject-scripts/index.ts delete mode 100644 sandpack-client/src/clients/node/inject-scripts/resize.ts delete mode 100644 sandpack-client/src/clients/node/taskManager.test.ts delete mode 100644 sandpack-client/src/clients/node/taskManager.ts delete mode 100644 sandpack-client/src/clients/node/types.ts create mode 100644 sandpack-environments/.bundler create mode 100644 sandpack-environments/.eslintignore create mode 100644 sandpack-environments/.gitignore create mode 100644 sandpack-environments/CHANGELOG.md create mode 100644 sandpack-environments/README.md create mode 100644 sandpack-environments/babel.config.js create mode 100644 sandpack-environments/gulpfile.js create mode 100644 sandpack-environments/package.json create mode 100644 sandpack-environments/rollup.config.js create mode 100644 sandpack-environments/src/InMemoryFileSystem.ts create mode 100644 sandpack-environments/src/clients/bundler/BundlerPreview.ts create mode 100644 sandpack-environments/src/clients/bundler/file-resolver-protocol.ts create mode 100644 sandpack-environments/src/clients/bundler/iframe-protocol.ts create mode 100644 sandpack-environments/src/clients/bundler/index.ts create mode 100644 sandpack-environments/src/clients/bundler/mime.ts create mode 100644 sandpack-environments/src/clients/bundler/types.ts create mode 100644 sandpack-environments/src/clients/bundler/utils.ts create mode 100644 sandpack-environments/src/clients/static/StaticPreview.ts create mode 100644 sandpack-environments/src/clients/static/index.ts create mode 100644 sandpack-environments/src/clients/static/utils.ts create mode 100644 sandpack-environments/src/clients/vm/VMFileSystem.ts create mode 100644 sandpack-environments/src/clients/vm/VMPreview.ts create mode 100644 sandpack-environments/src/clients/vm/index.ts create mode 100644 sandpack-environments/src/index.ts create mode 100644 sandpack-environments/src/inject-scripts/consoleHook.ts create mode 100644 sandpack-environments/src/sandpack-bundler-types.ts create mode 100644 sandpack-environments/src/types.ts create mode 100644 sandpack-environments/src/utils.ts create mode 100644 sandpack-environments/tsconfig.json delete mode 100644 sandpack-react/src/components/FileExplorer/Directory.tsx delete mode 100644 sandpack-react/src/components/FileExplorer/util.test.ts delete mode 100644 sandpack-react/src/components/FileExplorer/utils.ts create mode 100644 sandpack-react/src/components/SandpackProvider/index.tsx create mode 100644 sandpack-react/src/contexts/SandpackEnvironmentContext.tsx create mode 100644 sandpack-react/src/contexts/SandpackStateContext.tsx delete mode 100644 sandpack-react/src/contexts/sandpackContext.test.tsx delete mode 100644 sandpack-react/src/contexts/sandpackContext.tsx create mode 100644 sandpack-react/src/hooks/usePreview.ts diff --git a/.prettierignore b/.prettierignore index 4b6850b40..52ffa1d05 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,23 +1,9 @@ -!/standalone-packages/vscode/src/vs/codesandbox/ -!/standalone-packages/vscode/src/vs/codesandbox/* -!/standalone-packages/vscode/src/vs/codesandbox/**/*.ts -!/standalone-packages/vscode/src/vs/codesandbox/**/*.* - dist/ lib/ -packages/executors/.rts2_cache_cjs -packages/executors/.rts2_cache_es -packages/executors/.rts2_cache_umd -packages/homepage/.cache -packages/homepage/public -static/ -/standalone-packages/* -www/ + # Our server side code changes html, we don't want to unintentionally break this by formatting *.html .drone.yml -!/standalone-packages/react-sandpack -!/standalone-packages/sandpack \ No newline at end of file diff --git a/lerna.json b/lerna.json index f47d3a430..d083882ff 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,10 @@ { - "packages": ["sandpack-client", "sandpack-react"], + "packages": [ + "sandpack-client", + "sandpack-react", + "playgorund", + "sandpack-environments" + ], "npmClient": "yarn", "command": { "version": { diff --git a/package.json b/package.json index 8a0ede31d..5d9f5b0ef 100644 --- a/package.json +++ b/package.json @@ -3,15 +3,19 @@ "version": "1.0.0", "private": true, "workspaces": [ + "playground", "sandpack-client", "sandpack-react", "sandpack-themes", + "sandpack-environments", "examples/nextjs-app-dir", "website/*" ], "nohoist": [ "website/docs/**", - "**/html-minifier-terser" + "**/html-minifier-terser", + "**/static-browser-server", + "**/static-browser-server/**" ], "description": "", "scripts": { @@ -40,11 +44,11 @@ "@babel/preset-env": "^7.16.5", "@babel/preset-react": "^7.16.5", "@babel/preset-typescript": "^7.16.5", - "@rollup/plugin-commonjs": "^24.0.0", - "@rollup/plugin-node-resolve": "^15.0.1", - "@rollup/plugin-replace": "^5.0.2", - "@rollup/plugin-terser": "^0.4.0", - "@rollup/plugin-typescript": "^10.0.1", + "@rollup/plugin-commonjs": "^28.0.3", + "@rollup/plugin-node-resolve": "^16.0.1", + "@rollup/plugin-replace": "^6.0.2", + "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^12.1.2", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "^6.9.0", "@typescript-eslint/parser": "^6.9.0", @@ -63,7 +67,7 @@ "lint-staged": "^10.5.4", "prettier": "^2.2.1", "react-test-renderer": "^18.1.0", - "rollup": "^3.9.1", + "rollup": "^4.39.0", "rollup-plugin-string": "^3.0.0", "turbo": "^1.5.5" }, diff --git a/playground/.gitignore b/playground/.gitignore new file mode 100644 index 000000000..a547bf36d --- /dev/null +++ b/playground/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/playground/README.md b/playground/README.md new file mode 100644 index 000000000..40ede56ea --- /dev/null +++ b/playground/README.md @@ -0,0 +1,54 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: + +```js +export default tseslint.config({ + extends: [ + // Remove ...tseslint.configs.recommended and replace with this + ...tseslint.configs.recommendedTypeChecked, + // Alternatively, use this for stricter rules + ...tseslint.configs.strictTypeChecked, + // Optionally, add this for stylistic rules + ...tseslint.configs.stylisticTypeChecked, + ], + languageOptions: { + // other options... + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + }, +}) +``` + +You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: + +```js +// eslint.config.js +import reactX from 'eslint-plugin-react-x' +import reactDom from 'eslint-plugin-react-dom' + +export default tseslint.config({ + plugins: { + // Add the react-x and react-dom plugins + 'react-x': reactX, + 'react-dom': reactDom, + }, + rules: { + // other rules... + // Enable its recommended typescript rules + ...reactX.configs['recommended-typescript'].rules, + ...reactDom.configs.recommended.rules, + }, +}) +``` diff --git a/playground/index.html b/playground/index.html new file mode 100644 index 000000000..e4b78eae1 --- /dev/null +++ b/playground/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/playground/package.json b/playground/package.json new file mode 100644 index 000000000..c025a542a --- /dev/null +++ b/playground/package.json @@ -0,0 +1,27 @@ +{ + "name": "@codesandbox/playground", + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "dev:server": "vite-node server/index.ts", + "build": "tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@codesandbox/sandpack-react": "workspace:*", + "express": "^5.1.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-router": "^7.5.0" + }, + "devDependencies": { + "@types/react": "^19.1.0", + "@types/react-dom": "^19.1.2", + "@vitejs/plugin-react": "^4.3.4", + "globals": "^15.15.0", + "typescript": "~5.7.2", + "vite": "^6.2.0", + "vite-node": "^3.1.1" + } +} diff --git a/playground/public/vite.svg b/playground/public/vite.svg new file mode 100644 index 000000000..e7b8dfb1b --- /dev/null +++ b/playground/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/playground/server/index.ts b/playground/server/index.ts new file mode 100644 index 000000000..f2ac29b47 --- /dev/null +++ b/playground/server/index.ts @@ -0,0 +1,112 @@ +import path from "path"; + +import type { + BundlerSandbox, + Sandbox, + StaticSandbox, + VMSandbox, +} from "@codesandbox/sandpack-react"; +import { CodeSandbox } from "@codesandbox/sdk"; +import dotenv from "dotenv"; +import express from "express"; + +// Load environment variables +dotenv.config(); + +const app = express(); +const port = 3001; + +// Middleware to parse JSON bodies +app.use(express.json()); + +// Serve static files from the 'public' directory +const publicPath = path.join(__dirname, "public"); +app.use(express.static(publicPath)); + +const apiKey = JSON.parse(process.env.CSB_API_KEY) as string; +const globalApiKey = JSON.parse(process.env.CSB_GLOBAL_API_KEY) as string; + +const sdk = new CodeSandbox(apiKey, {}); + +// TODO: Deliver the actual built files +app.get("/", async (req, res) => { + res.send("Hello from CodeSandbox API!"); +}); + +// GET endpoint for starting a sandbox from a template +app.get("/api/sandboxes/:id", async (req, res) => { + try { + const sandboxId = req.params.id; + const { data } = await fetch( + "https://codesandbox.io/api/v1/sandboxes/" + sandboxId, + { + method: "GET", + headers: { + Authorization: `Bearer ${globalApiKey}`, + "Content-Type": "application/json", + }, + } + ).then((res) => res.json()); + + if (data.v2) { + const session = await sdk.sandbox.start(sandboxId); + const sandbox: VMSandbox = { + environment: "vm", + session, + }; + + res.status(200).json(sandbox); + return; + } + + const getModulePath = (moduleOrDirectory) => { + const parentDir = moduleOrDirectory.directory_shortid + ? data.directories.find( + (dir) => dir.shortid === moduleOrDirectory.directory_shortid + ) + : null; + return parentDir + ? getModulePath(parentDir).concat(moduleOrDirectory.title) + : [moduleOrDirectory.title]; + }; + + const sandbox: BundlerSandbox | StaticSandbox = { + environment: data.template === "static" ? "static" : "bundler", + template: data.template, + main: data.entry, + files: data.modules.reduce((acc, module) => { + acc[getModulePath(module).join("/")] = { + code: module.code, + }; + + return acc; + }, {}), + }; + + res.status(200).json(sandbox); + } catch (error) { + console.error("Error starting sandbox:", error); + res.status(500).json({ error: "Failed to start sandbox" }); + } +}); + +// POST endpoint for creating and starting a sandbox +app.post("/api/sandboxes/:id", async (req, res) => { + try { + const templateId = req.params.id; + + const sandbox = await sdk.sandbox.create({ template: templateId }); + const data = await sdk.sandbox.start(sandbox.id); + + res.status(200).json(data); + } catch (error) { + console.error("Error creating/starting sandbox:", error); + res.status(500).json({ error: "Failed to create or start sandbox" }); + } +}); + +// Start the server +app.listen(port, () => { + console.log(`Server running at http://localhost:${port}`); + console.log(`Serving static files from: ${publicPath}`); +}); diff --git a/playground/src/App.tsx b/playground/src/App.tsx new file mode 100644 index 000000000..24ecfd2b9 --- /dev/null +++ b/playground/src/App.tsx @@ -0,0 +1,15 @@ +import { Route, Routes } from "react-router"; + +import { Dashboard } from "./Dashboard"; +import { Editor } from "./Editor"; + +function App() { + return ( + + } path="/" /> + } path="/:sandboxId" /> + + ); +} + +export default App; diff --git a/playground/src/Dashboard.tsx b/playground/src/Dashboard.tsx new file mode 100644 index 000000000..a2144efcc --- /dev/null +++ b/playground/src/Dashboard.tsx @@ -0,0 +1,24 @@ +import { + SandpackCodeEditor, + SandpackFileExplorer, + SandpackLayout, + SandpackPreview, + SandpackProvider, +} from "@codesandbox/sandpack-react"; + +export function Dashboard() { + return ( + {}} + sandbox={() => fetch(`/api/sandboxes/qc7lnq`).then((res) => res.json())} + // sandboxId: "hqw3k9", + // sandboxId: "qc7lnq", + > + + + + + + + ); +} diff --git a/playground/src/Editor.tsx b/playground/src/Editor.tsx new file mode 100644 index 000000000..30ff9c586 --- /dev/null +++ b/playground/src/Editor.tsx @@ -0,0 +1,55 @@ +import { + SandpackCodeEditor, + SandpackFileExplorer, + SandpackLayout, + SandpackPreview, + SandpackProvider, +} from "@codesandbox/sandpack-react"; +import { useState } from "react"; +import { useParams } from "react-router"; + +const TEMPLATES = ["vite-react-ts", "nextjs", "rust", "python", "node"]; + +/** + * The only reason this is a separate import, is so + * we don't need to make the full page 'use client', but only this copmponent. + */ +export function Editor() { + const { sandboxId } = useParams(); + const [state, setState] = useState( + window.localStorage["template"] || TEMPLATES[0] + ); + + return ( + <> + + + `/api/sandbox/${id}`, + }} + template={state} + > + + + {/**/} + + + + + ); +} diff --git a/playground/src/main.tsx b/playground/src/main.tsx new file mode 100644 index 000000000..4226ad529 --- /dev/null +++ b/playground/src/main.tsx @@ -0,0 +1,13 @@ +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import { BrowserRouter } from "react-router"; + +import App from "./App.tsx"; + +createRoot(document.getElementById("root")!).render( + + + + + +); diff --git a/playground/src/vite-env.d.ts b/playground/src/vite-env.d.ts new file mode 100644 index 000000000..11f02fe2a --- /dev/null +++ b/playground/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/playground/tsconfig.app.json b/playground/tsconfig.app.json new file mode 100644 index 000000000..358ca9ba9 --- /dev/null +++ b/playground/tsconfig.app.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src"] +} diff --git a/playground/tsconfig.json b/playground/tsconfig.json new file mode 100644 index 000000000..1ffef600d --- /dev/null +++ b/playground/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/playground/tsconfig.node.json b/playground/tsconfig.node.json new file mode 100644 index 000000000..db0becc8b --- /dev/null +++ b/playground/tsconfig.node.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/playground/vite.config.ts b/playground/vite.config.ts new file mode 100644 index 000000000..a093789e4 --- /dev/null +++ b/playground/vite.config.ts @@ -0,0 +1,23 @@ +import react from "@vitejs/plugin-react"; +import { defineConfig } from "vite"; + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], + server: { + proxy: { + "/api": { + target: "http://localhost:3001", + changeOrigin: true, + secure: false, + }, + }, + }, + define: { + // Provide a shim for `process.env` + "process.env": { + CSB_API_KEY: JSON.stringify(process.env.CSB_API_KEY), + CSB_GLOBAL_API_KEY: JSON.stringify(process.env.CSB_GLOBAL_API_KEY), + }, + }, +}); diff --git a/playground/yarn.lock b/playground/yarn.lock new file mode 100644 index 000000000..671d7a2a1 --- /dev/null +++ b/playground/yarn.lock @@ -0,0 +1,1211 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ampproject/remapping@^2.2.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@babel/code-frame@^7.26.2": + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== + dependencies: + "@babel/helper-validator-identifier" "^7.25.9" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/compat-data@^7.26.8": + version "7.26.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.8.tgz#821c1d35641c355284d4a870b8a4a7b0c141e367" + integrity sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ== + +"@babel/core@^7.26.0": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.10.tgz#5c876f83c8c4dcb233ee4b670c0606f2ac3000f9" + integrity sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.10" + "@babel/helper-compilation-targets" "^7.26.5" + "@babel/helper-module-transforms" "^7.26.0" + "@babel/helpers" "^7.26.10" + "@babel/parser" "^7.26.10" + "@babel/template" "^7.26.9" + "@babel/traverse" "^7.26.10" + "@babel/types" "^7.26.10" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.26.10", "@babel/generator@^7.27.0": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.0.tgz#764382b5392e5b9aff93cadb190d0745866cbc2c" + integrity sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw== + dependencies: + "@babel/parser" "^7.27.0" + "@babel/types" "^7.27.0" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^3.0.2" + +"@babel/helper-compilation-targets@^7.26.5": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz#de0c753b1cd1d9ab55d473c5a5cf7170f0a81880" + integrity sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA== + dependencies: + "@babel/compat-data" "^7.26.8" + "@babel/helper-validator-option" "^7.25.9" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-module-imports@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz#e7f8d20602ebdbf9ebbea0a0751fb0f2a4141715" + integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== + dependencies: + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" + +"@babel/helper-module-transforms@^7.26.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz#8ce54ec9d592695e58d84cd884b7b5c6a2fdeeae" + integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== + dependencies: + "@babel/helper-module-imports" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@babel/traverse" "^7.25.9" + +"@babel/helper-plugin-utils@^7.25.9": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz#18580d00c9934117ad719392c4f6585c9333cc35" + integrity sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg== + +"@babel/helper-string-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" + integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== + +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== + +"@babel/helper-validator-option@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz#86e45bd8a49ab7e03f276577f96179653d41da72" + integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== + +"@babel/helpers@^7.26.10": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.0.tgz#53d156098defa8243eab0f32fa17589075a1b808" + integrity sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg== + dependencies: + "@babel/template" "^7.27.0" + "@babel/types" "^7.27.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.26.10", "@babel/parser@^7.27.0": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.0.tgz#3d7d6ee268e41d2600091cbd4e145ffee85a44ec" + integrity sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg== + dependencies: + "@babel/types" "^7.27.0" + +"@babel/plugin-transform-react-jsx-self@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.9.tgz#c0b6cae9c1b73967f7f9eb2fca9536ba2fad2858" + integrity sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-react-jsx-source@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.9.tgz#4c6b8daa520b5f155b5fb55547d7c9fa91417503" + integrity sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/template@^7.26.9", "@babel/template@^7.27.0": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.0.tgz#b253e5406cc1df1c57dcd18f11760c2dbf40c0b4" + integrity sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/parser" "^7.27.0" + "@babel/types" "^7.27.0" + +"@babel/traverse@^7.25.9", "@babel/traverse@^7.26.10": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.0.tgz#11d7e644779e166c0442f9a07274d02cd91d4a70" + integrity sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.27.0" + "@babel/parser" "^7.27.0" + "@babel/template" "^7.27.0" + "@babel/types" "^7.27.0" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.10", "@babel/types@^7.27.0": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.0.tgz#ef9acb6b06c3173f6632d993ecb6d4ae470b4559" + integrity sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg== + dependencies: + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + +"@esbuild/aix-ppc64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz#b87036f644f572efb2b3c75746c97d1d2d87ace8" + integrity sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag== + +"@esbuild/android-arm64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz#5ca7dc20a18f18960ad8d5e6ef5cf7b0a256e196" + integrity sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w== + +"@esbuild/android-arm@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.2.tgz#3c49f607b7082cde70c6ce0c011c362c57a194ee" + integrity sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA== + +"@esbuild/android-x64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.2.tgz#8a00147780016aff59e04f1036e7cb1b683859e2" + integrity sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg== + +"@esbuild/darwin-arm64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz#486efe7599a8d90a27780f2bb0318d9a85c6c423" + integrity sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA== + +"@esbuild/darwin-x64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz#95ee222aacf668c7a4f3d7ee87b3240a51baf374" + integrity sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA== + +"@esbuild/freebsd-arm64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz#67efceda8554b6fc6a43476feba068fb37fa2ef6" + integrity sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w== + +"@esbuild/freebsd-x64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz#88a9d7ecdd3adadbfe5227c2122d24816959b809" + integrity sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ== + +"@esbuild/linux-arm64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz#87be1099b2bbe61282333b084737d46bc8308058" + integrity sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g== + +"@esbuild/linux-arm@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz#72a285b0fe64496e191fcad222185d7bf9f816f6" + integrity sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g== + +"@esbuild/linux-ia32@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz#337a87a4c4dd48a832baed5cbb022be20809d737" + integrity sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ== + +"@esbuild/linux-loong64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz#1b81aa77103d6b8a8cfa7c094ed3d25c7579ba2a" + integrity sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w== + +"@esbuild/linux-mips64el@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz#afbe380b6992e7459bf7c2c3b9556633b2e47f30" + integrity sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q== + +"@esbuild/linux-ppc64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz#6bf8695cab8a2b135cca1aa555226dc932d52067" + integrity sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g== + +"@esbuild/linux-riscv64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz#43c2d67a1a39199fb06ba978aebb44992d7becc3" + integrity sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw== + +"@esbuild/linux-s390x@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz#419e25737ec815c6dce2cd20d026e347cbb7a602" + integrity sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q== + +"@esbuild/linux-x64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz#22451f6edbba84abe754a8cbd8528ff6e28d9bcb" + integrity sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg== + +"@esbuild/netbsd-arm64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz#744affd3b8d8236b08c5210d828b0698a62c58ac" + integrity sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw== + +"@esbuild/netbsd-x64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz#dbbe7521fd6d7352f34328d676af923fc0f8a78f" + integrity sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg== + +"@esbuild/openbsd-arm64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz#f9caf987e3e0570500832b487ce3039ca648ce9f" + integrity sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg== + +"@esbuild/openbsd-x64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz#d2bb6a0f8ffea7b394bb43dfccbb07cabd89f768" + integrity sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw== + +"@esbuild/sunos-x64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz#49b437ed63fe333b92137b7a0c65a65852031afb" + integrity sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA== + +"@esbuild/win32-arm64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz#081424168463c7d6c7fb78f631aede0c104373cf" + integrity sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q== + +"@esbuild/win32-ia32@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz#3f9e87143ddd003133d21384944a6c6cadf9693f" + integrity sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg== + +"@esbuild/win32-x64@0.25.2": + version "0.25.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz#839f72c2decd378f86b8f525e1979a97b920c67d" + integrity sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA== + +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.8" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142" + integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@rollup/rollup-android-arm-eabi@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.39.0.tgz#1d8cc5dd3d8ffe569d8f7f67a45c7909828a0f66" + integrity sha512-lGVys55Qb00Wvh8DMAocp5kIcaNzEFTmGhfFd88LfaogYTRKrdxgtlO5H6S49v2Nd8R2C6wLOal0qv6/kCkOwA== + +"@rollup/rollup-android-arm64@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.39.0.tgz#9c136034d3d9ed29d0b138c74dd63c5744507fca" + integrity sha512-It9+M1zE31KWfqh/0cJLrrsCPiF72PoJjIChLX+rEcujVRCb4NLQ5QzFkzIZW8Kn8FTbvGQBY5TkKBau3S8cCQ== + +"@rollup/rollup-darwin-arm64@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.39.0.tgz#830d07794d6a407c12b484b8cf71affd4d3800a6" + integrity sha512-lXQnhpFDOKDXiGxsU9/l8UEGGM65comrQuZ+lDcGUx+9YQ9dKpF3rSEGepyeR5AHZ0b5RgiligsBhWZfSSQh8Q== + +"@rollup/rollup-darwin-x64@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.39.0.tgz#b26f0f47005c1fa5419a880f323ed509dc8d885c" + integrity sha512-mKXpNZLvtEbgu6WCkNij7CGycdw9cJi2k9v0noMb++Vab12GZjFgUXD69ilAbBh034Zwn95c2PNSz9xM7KYEAQ== + +"@rollup/rollup-freebsd-arm64@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.39.0.tgz#2b60c81ac01ff7d1bc8df66aee7808b6690c6d19" + integrity sha512-jivRRlh2Lod/KvDZx2zUR+I4iBfHcu2V/BA2vasUtdtTN2Uk3jfcZczLa81ESHZHPHy4ih3T/W5rPFZ/hX7RtQ== + +"@rollup/rollup-freebsd-x64@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.39.0.tgz#4826af30f4d933d82221289068846c9629cc628c" + integrity sha512-8RXIWvYIRK9nO+bhVz8DwLBepcptw633gv/QT4015CpJ0Ht8punmoHU/DuEd3iw9Hr8UwUV+t+VNNuZIWYeY7Q== + +"@rollup/rollup-linux-arm-gnueabihf@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.39.0.tgz#a1f4f963d5dcc9e5575c7acf9911824806436bf7" + integrity sha512-mz5POx5Zu58f2xAG5RaRRhp3IZDK7zXGk5sdEDj4o96HeaXhlUwmLFzNlc4hCQi5sGdR12VDgEUqVSHer0lI9g== + +"@rollup/rollup-linux-arm-musleabihf@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.39.0.tgz#e924b0a8b7c400089146f6278446e6b398b75a06" + integrity sha512-+YDwhM6gUAyakl0CD+bMFpdmwIoRDzZYaTWV3SDRBGkMU/VpIBYXXEvkEcTagw/7VVkL2vA29zU4UVy1mP0/Yw== + +"@rollup/rollup-linux-arm64-gnu@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.39.0.tgz#cb43303274ec9a716f4440b01ab4e20c23aebe20" + integrity sha512-EKf7iF7aK36eEChvlgxGnk7pdJfzfQbNvGV/+l98iiMwU23MwvmV0Ty3pJ0p5WQfm3JRHOytSIqD9LB7Bq7xdQ== + +"@rollup/rollup-linux-arm64-musl@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.39.0.tgz#531c92533ce3d167f2111bfcd2aa1a2041266987" + integrity sha512-vYanR6MtqC7Z2SNr8gzVnzUul09Wi1kZqJaek3KcIlI/wq5Xtq4ZPIZ0Mr/st/sv/NnaPwy/D4yXg5x0B3aUUA== + +"@rollup/rollup-linux-loongarch64-gnu@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.39.0.tgz#53403889755d0c37c92650aad016d5b06c1b061a" + integrity sha512-NMRUT40+h0FBa5fb+cpxtZoGAggRem16ocVKIv5gDB5uLDgBIwrIsXlGqYbLwW8YyO3WVTk1FkFDjMETYlDqiw== + +"@rollup/rollup-linux-powerpc64le-gnu@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.39.0.tgz#f669f162e29094c819c509e99dbeced58fc708f9" + integrity sha512-0pCNnmxgduJ3YRt+D+kJ6Ai/r+TaePu9ZLENl+ZDV/CdVczXl95CbIiwwswu4L+K7uOIGf6tMo2vm8uadRaICQ== + +"@rollup/rollup-linux-riscv64-gnu@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.39.0.tgz#4bab37353b11bcda5a74ca11b99dea929657fd5f" + integrity sha512-t7j5Zhr7S4bBtksT73bO6c3Qa2AV/HqiGlj9+KB3gNF5upcVkx+HLgxTm8DK4OkzsOYqbdqbLKwvGMhylJCPhQ== + +"@rollup/rollup-linux-riscv64-musl@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.39.0.tgz#4d66be1ce3cfd40a7910eb34dddc7cbd4c2dd2a5" + integrity sha512-m6cwI86IvQ7M93MQ2RF5SP8tUjD39Y7rjb1qjHgYh28uAPVU8+k/xYWvxRO3/tBN2pZkSMa5RjnPuUIbrwVxeA== + +"@rollup/rollup-linux-s390x-gnu@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.39.0.tgz#7181c329395ed53340a0c59678ad304a99627f6d" + integrity sha512-iRDJd2ebMunnk2rsSBYlsptCyuINvxUfGwOUldjv5M4tpa93K8tFMeYGpNk2+Nxl+OBJnBzy2/JCscGeO507kA== + +"@rollup/rollup-linux-x64-gnu@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.39.0.tgz#00825b3458094d5c27cb4ed66e88bfe9f1e65f90" + integrity sha512-t9jqYw27R6Lx0XKfEFe5vUeEJ5pF3SGIM6gTfONSMb7DuG6z6wfj2yjcoZxHg129veTqU7+wOhY6GX8wmf90dA== + +"@rollup/rollup-linux-x64-musl@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.39.0.tgz#81caac2a31b8754186f3acc142953a178fcd6fba" + integrity sha512-ThFdkrFDP55AIsIZDKSBWEt/JcWlCzydbZHinZ0F/r1h83qbGeenCt/G/wG2O0reuENDD2tawfAj2s8VK7Bugg== + +"@rollup/rollup-win32-arm64-msvc@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.39.0.tgz#3a3f421f5ce9bd99ed20ce1660cce7cee3e9f199" + integrity sha512-jDrLm6yUtbOg2TYB3sBF3acUnAwsIksEYjLeHL+TJv9jg+TmTwdyjnDex27jqEMakNKf3RwwPahDIt7QXCSqRQ== + +"@rollup/rollup-win32-ia32-msvc@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.39.0.tgz#a44972d5cdd484dfd9cf3705a884bf0c2b7785a7" + integrity sha512-6w9uMuza+LbLCVoNKL5FSLE7yvYkq9laSd09bwS0tMjkwXrmib/4KmoJcrKhLWHvw19mwU+33ndC69T7weNNjQ== + +"@rollup/rollup-win32-x64-msvc@4.39.0": + version "4.39.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.39.0.tgz#bfe0214e163f70c4fec1c8f7bb8ce266f4c05b7e" + integrity sha512-yAkUOkIKZlK5dl7u6dg897doBgLXmUHhIINM2c+sND3DZwnrdQkkSiDh7N75Ll4mM4dxSkYfXqU9fW3lLkMFug== + +"@types/babel__core@^7.20.5": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" + integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.7.tgz#968cdc2366ec3da159f61166428ee40f370e56c2" + integrity sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng== + dependencies: + "@babel/types" "^7.20.7" + +"@types/estree@1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.7.tgz#4158d3105276773d5b7695cd4834b1722e4f37a8" + integrity sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ== + +"@types/react-dom@^19.0.4": + version "19.1.2" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.2.tgz#bd1fe3b8c28a3a2e942f85314dcfb71f531a242f" + integrity sha512-XGJkWF41Qq305SKWEILa1O8vzhb3aOo3ogBlSmiqNko/WmRb6QIaweuZCXjKygVDXpzXb5wyxKTSOsmkuqj+Qw== + +"@types/react@^19.0.10": + version "19.1.0" + resolved "https://registry.yarnpkg.com/@types/react/-/react-19.1.0.tgz#73c43ad9bc43496ca8184332b111e2aef63fc9da" + integrity sha512-UaicktuQI+9UKyA4njtDOGBD/67t8YEBt2xdfqu8+gP9hqPUPsiXlNPcpS2gVdjmis5GKPG3fCxbQLVgxsQZ8w== + dependencies: + csstype "^3.0.2" + +"@vitejs/plugin-react@^4.3.4": + version "4.3.4" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.3.4.tgz#c64be10b54c4640135a5b28a2432330e88ad7c20" + integrity sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug== + dependencies: + "@babel/core" "^7.26.0" + "@babel/plugin-transform-react-jsx-self" "^7.25.9" + "@babel/plugin-transform-react-jsx-source" "^7.25.9" + "@types/babel__core" "^7.20.5" + react-refresh "^0.14.2" + +accepts@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-2.0.0.tgz#bbcf4ba5075467f3f2131eab3cffc73c2f5d7895" + integrity sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng== + dependencies: + mime-types "^3.0.0" + negotiator "^1.0.0" + +body-parser@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-2.2.0.tgz#f7a9656de305249a715b549b7b8fd1ab9dfddcfa" + integrity sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg== + dependencies: + bytes "^3.1.2" + content-type "^1.0.5" + debug "^4.4.0" + http-errors "^2.0.0" + iconv-lite "^0.6.3" + on-finished "^2.4.1" + qs "^6.14.0" + raw-body "^3.0.0" + type-is "^2.0.0" + +browserslist@^4.24.0: + version "4.24.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.4.tgz#c6b2865a3f08bcb860a0e827389003b9fe686e4b" + integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== + dependencies: + caniuse-lite "^1.0.30001688" + electron-to-chromium "^1.5.73" + node-releases "^2.0.19" + update-browserslist-db "^1.1.1" + +bytes@3.1.2, bytes@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +cac@^6.7.14: + version "6.7.14" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" + integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== + +call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + +call-bound@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a" + integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== + dependencies: + call-bind-apply-helpers "^1.0.2" + get-intrinsic "^1.3.0" + +caniuse-lite@^1.0.30001688: + version "1.0.30001713" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz#6b33a8857e6c7dcb41a0caa2dd0f0489c823a52d" + integrity sha512-wCIWIg+A4Xr7NfhTuHdX+/FKh3+Op3LBbSp2N5Pfx6T/LhdQy3GTyoTg48BReaW/MyMNZAkTadsBtai3ldWK0Q== + +content-disposition@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-1.0.0.tgz#844426cb398f934caefcbb172200126bc7ceace2" + integrity sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg== + dependencies: + safe-buffer "5.2.1" + +content-type@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +cookie-signature@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.2.2.tgz#57c7fc3cc293acab9fec54d73e15690ebe4a1793" + integrity sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg== + +cookie@^0.7.1: + version "0.7.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" + integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w== + +csstype@^3.0.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" + integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== + +debug@^4.1.0, debug@^4.3.1, debug@^4.3.5, debug@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== + dependencies: + ms "^2.1.3" + +depd@2.0.0, depd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +electron-to-chromium@^1.5.73: + version "1.5.135" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.135.tgz#6d835020fa0c7f02f30d7608c2f3c0a764236699" + integrity sha512-8gXUdEmvb+WCaYUhA0Svr08uSeRjM2w3x5uHOc1QbaEVzJXB8rgm5eptieXzyKoVEtinLvW6MtTcurA65PeS1Q== + +encodeurl@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-module-lexer@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.6.0.tgz#da49f587fd9e68ee2404fe4e256c0c7d3a81be21" + integrity sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ== + +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + +esbuild@^0.25.0: + version "0.25.2" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.2.tgz#55a1d9ebcb3aa2f95e8bba9e900c1a5061bc168b" + integrity sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ== + optionalDependencies: + "@esbuild/aix-ppc64" "0.25.2" + "@esbuild/android-arm" "0.25.2" + "@esbuild/android-arm64" "0.25.2" + "@esbuild/android-x64" "0.25.2" + "@esbuild/darwin-arm64" "0.25.2" + "@esbuild/darwin-x64" "0.25.2" + "@esbuild/freebsd-arm64" "0.25.2" + "@esbuild/freebsd-x64" "0.25.2" + "@esbuild/linux-arm" "0.25.2" + "@esbuild/linux-arm64" "0.25.2" + "@esbuild/linux-ia32" "0.25.2" + "@esbuild/linux-loong64" "0.25.2" + "@esbuild/linux-mips64el" "0.25.2" + "@esbuild/linux-ppc64" "0.25.2" + "@esbuild/linux-riscv64" "0.25.2" + "@esbuild/linux-s390x" "0.25.2" + "@esbuild/linux-x64" "0.25.2" + "@esbuild/netbsd-arm64" "0.25.2" + "@esbuild/netbsd-x64" "0.25.2" + "@esbuild/openbsd-arm64" "0.25.2" + "@esbuild/openbsd-x64" "0.25.2" + "@esbuild/sunos-x64" "0.25.2" + "@esbuild/win32-arm64" "0.25.2" + "@esbuild/win32-ia32" "0.25.2" + "@esbuild/win32-x64" "0.25.2" + +escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-html@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +etag@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +express@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/express/-/express-5.1.0.tgz#d31beaf715a0016f0d53f47d3b4d7acf28c75cc9" + integrity sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA== + dependencies: + accepts "^2.0.0" + body-parser "^2.2.0" + content-disposition "^1.0.0" + content-type "^1.0.5" + cookie "^0.7.1" + cookie-signature "^1.2.1" + debug "^4.4.0" + encodeurl "^2.0.0" + escape-html "^1.0.3" + etag "^1.8.1" + finalhandler "^2.1.0" + fresh "^2.0.0" + http-errors "^2.0.0" + merge-descriptors "^2.0.0" + mime-types "^3.0.0" + on-finished "^2.4.1" + once "^1.4.0" + parseurl "^1.3.3" + proxy-addr "^2.0.7" + qs "^6.14.0" + range-parser "^1.2.1" + router "^2.2.0" + send "^1.1.0" + serve-static "^2.2.0" + statuses "^2.0.1" + type-is "^2.0.1" + vary "^1.1.2" + +finalhandler@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-2.1.0.tgz#72306373aa89d05a8242ed569ed86a1bff7c561f" + integrity sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q== + dependencies: + debug "^4.4.0" + encodeurl "^2.0.0" + escape-html "^1.0.3" + on-finished "^2.4.1" + parseurl "^1.3.3" + statuses "^2.0.1" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-2.0.0.tgz#8dd7df6a1b3a1b3a5cf186c05a5dd267622635a4" + integrity sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A== + +fsevents@~2.3.2, fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-intrinsic@^1.2.5, get-intrinsic@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + +get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^15.15.0: + version "15.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.15.0.tgz#7c4761299d41c32b075715a4ce1ede7897ff72a8" + integrity sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg== + +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +http-errors@2.0.0, http-errors@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +iconv-lite@0.6.3, iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-promise@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3" + integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== + +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + +media-typer@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-1.1.0.tgz#6ab74b8f2d3320f2064b2a87a38e7931ff3a5561" + integrity sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw== + +merge-descriptors@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-2.0.0.tgz#ea922f660635a2249ee565e0449f951e6b603808" + integrity sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g== + +mime-db@^1.54.0: + version "1.54.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.54.0.tgz#cddb3ee4f9c64530dff640236661d42cb6a314f5" + integrity sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ== + +mime-types@^3.0.0, mime-types@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-3.0.1.tgz#b1d94d6997a9b32fd69ebaed0db73de8acb519ce" + integrity sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA== + dependencies: + mime-db "^1.54.0" + +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@^3.3.8: + version "3.3.11" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b" + integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== + +negotiator@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-1.0.0.tgz#b6c91bb47172d69f93cfd7c357bbb529019b5f6a" + integrity sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg== + +node-releases@^2.0.19: + version "2.0.19" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" + integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== + +object-inspect@^1.13.3: + version "1.13.4" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213" + integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew== + +on-finished@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +parseurl@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-to-regexp@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-8.2.0.tgz#73990cc29e57a3ff2a0d914095156df5db79e8b4" + integrity sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ== + +pathe@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-2.0.3.tgz#3ecbec55421685b70a9da872b2cff3e1cbed1716" + integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== + +picocolors@^1.0.0, picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +postcss@^8.5.3: + version "8.5.3" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.3.tgz#1463b6f1c7fb16fe258736cba29a2de35237eafb" + integrity sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A== + dependencies: + nanoid "^3.3.8" + picocolors "^1.1.1" + source-map-js "^1.2.1" + +proxy-addr@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +qs@^6.14.0: + version "6.14.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.14.0.tgz#c63fa40680d2c5c941412a0e899c89af60c0a930" + integrity sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w== + dependencies: + side-channel "^1.1.0" + +range-parser@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-3.0.0.tgz#25b3476f07a51600619dae3fe82ddc28a36e5e0f" + integrity sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.6.3" + unpipe "1.0.0" + +react-dom@^19.0.0: + version "19.1.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.1.0.tgz#133558deca37fa1d682708df8904b25186793623" + integrity sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g== + dependencies: + scheduler "^0.26.0" + +react-refresh@^0.14.2: + version "0.14.2" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9" + integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== + +react@^19.0.0: + version "19.1.0" + resolved "https://registry.yarnpkg.com/react/-/react-19.1.0.tgz#926864b6c48da7627f004795d6cce50e90793b75" + integrity sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg== + +rollup@^4.30.1: + version "4.39.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.39.0.tgz#9dc1013b70c0e2cb70ef28350142e9b81b3f640c" + integrity sha512-thI8kNc02yNvnmJp8dr3fNWJ9tCONDhp6TV35X6HkKGGs9E6q7YWCHbe5vKiTa7TAiNcFEmXKj3X/pG2b3ci0g== + dependencies: + "@types/estree" "1.0.7" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.39.0" + "@rollup/rollup-android-arm64" "4.39.0" + "@rollup/rollup-darwin-arm64" "4.39.0" + "@rollup/rollup-darwin-x64" "4.39.0" + "@rollup/rollup-freebsd-arm64" "4.39.0" + "@rollup/rollup-freebsd-x64" "4.39.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.39.0" + "@rollup/rollup-linux-arm-musleabihf" "4.39.0" + "@rollup/rollup-linux-arm64-gnu" "4.39.0" + "@rollup/rollup-linux-arm64-musl" "4.39.0" + "@rollup/rollup-linux-loongarch64-gnu" "4.39.0" + "@rollup/rollup-linux-powerpc64le-gnu" "4.39.0" + "@rollup/rollup-linux-riscv64-gnu" "4.39.0" + "@rollup/rollup-linux-riscv64-musl" "4.39.0" + "@rollup/rollup-linux-s390x-gnu" "4.39.0" + "@rollup/rollup-linux-x64-gnu" "4.39.0" + "@rollup/rollup-linux-x64-musl" "4.39.0" + "@rollup/rollup-win32-arm64-msvc" "4.39.0" + "@rollup/rollup-win32-ia32-msvc" "4.39.0" + "@rollup/rollup-win32-x64-msvc" "4.39.0" + fsevents "~2.3.2" + +router@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/router/-/router-2.2.0.tgz#019be620b711c87641167cc79b99090f00b146ef" + integrity sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ== + dependencies: + debug "^4.4.0" + depd "^2.0.0" + is-promise "^4.0.0" + parseurl "^1.3.3" + path-to-regexp "^8.0.0" + +safe-buffer@5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +scheduler@^0.26.0: + version "0.26.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.26.0.tgz#4ce8a8c2a2095f13ea11bf9a445be50c555d6337" + integrity sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA== + +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +send@^1.1.0, send@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/send/-/send-1.2.0.tgz#32a7554fb777b831dfa828370f773a3808d37212" + integrity sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw== + dependencies: + debug "^4.3.5" + encodeurl "^2.0.0" + escape-html "^1.0.3" + etag "^1.8.1" + fresh "^2.0.0" + http-errors "^2.0.0" + mime-types "^3.0.1" + ms "^2.1.3" + on-finished "^2.4.1" + range-parser "^1.2.1" + statuses "^2.0.1" + +serve-static@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-2.2.0.tgz#9c02564ee259bdd2251b82d659a2e7e1938d66f9" + integrity sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ== + dependencies: + encodeurl "^2.0.0" + escape-html "^1.0.3" + parseurl "^1.3.3" + send "^1.2.0" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +side-channel-list@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" + integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + +side-channel-map@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" + integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + +side-channel-weakmap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" + integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + get-intrinsic "^1.2.5" + object-inspect "^1.13.3" + side-channel-map "^1.0.1" + +side-channel@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" + integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== + dependencies: + es-errors "^1.3.0" + object-inspect "^1.13.3" + side-channel-list "^1.0.0" + side-channel-map "^1.0.1" + side-channel-weakmap "^1.0.2" + +source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== + +statuses@2.0.1, statuses@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +type-is@^2.0.0, type-is@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-2.0.1.tgz#64f6cf03f92fce4015c2b224793f6bdd4b068c97" + integrity sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw== + dependencies: + content-type "^1.0.5" + media-typer "^1.1.0" + mime-types "^3.0.0" + +typescript@~5.7.2: + version "5.7.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" + integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== + +unpipe@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420" + integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.1" + +vary@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +vite-node@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-3.1.1.tgz#ad186c07859a6e5fca7c7f563e55fb11b16557bc" + integrity sha512-V+IxPAE2FvXpTCHXyNem0M+gWm6J7eRyWPR6vYoG/Gl+IscNOjXzztUhimQgTxaAoUoj40Qqimaa0NLIOOAH4w== + dependencies: + cac "^6.7.14" + debug "^4.4.0" + es-module-lexer "^1.6.0" + pathe "^2.0.3" + vite "^5.0.0 || ^6.0.0" + +"vite@^5.0.0 || ^6.0.0", vite@^6.2.0: + version "6.2.6" + resolved "https://registry.yarnpkg.com/vite/-/vite-6.2.6.tgz#7f0ccf2fdc0c1eda079ce258508728e2473d3f61" + integrity sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw== + dependencies: + esbuild "^0.25.0" + postcss "^8.5.3" + rollup "^4.30.1" + optionalDependencies: + fsevents "~2.3.3" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== diff --git a/sandpack-client/package.json b/sandpack-client/package.json index 7f0fb9449..ebfaf59f1 100644 --- a/sandpack-client/package.json +++ b/sandpack-client/package.json @@ -19,11 +19,6 @@ "import": "./dist/clients/runtime/index.mjs", "require": "./dist/clients/runtime/index.js" }, - "./clients/node": { - "types": "./dist/clients/node/index.d.ts", - "import": "./dist/clients/node/index.mjs", - "require": "./dist/clients/node/index.js" - }, "./clients/static": { "types": "./dist/clients/static/index.d.ts", "import": "./dist/clients/static/index.mjs", @@ -45,7 +40,8 @@ "build:bundler": "gulp", "format": "prettier --write '**/*.{ts,tsx,js,jsx}'", "format:check": "prettier --check '**/*.{ts,tsx}'", - "dev": "yarn build -- --watch" + "dev": "yarn build -- --watch", + "typecheck": "tsc --noEmit --skipLibCheck" }, "files": [ "dist", @@ -55,8 +51,7 @@ "README.md" ], "dependencies": { - "@codesandbox/nodebox": "0.1.8", - "@codesandbox/sdk": "0.0.0-alpha.8", + "@codesandbox/sdk": "^0.11.1", "buffer": "^6.0.3", "dequal": "^2.0.2", "mime-db": "^1.52.0", diff --git a/sandpack-client/rollup.config.js b/sandpack-client/rollup.config.js index 6ac089098..e13214f86 100644 --- a/sandpack-client/rollup.config.js +++ b/sandpack-client/rollup.config.js @@ -29,7 +29,7 @@ const configs = [ { input: { index: "src/index.ts", - "clients/node/index": "src/clients/node/index.ts", + "clients/vm/index": "src/clients/vm/index.ts", "clients/runtime/index": "src/clients/runtime/index.ts", }, output: [ @@ -46,7 +46,10 @@ const configs = [ ], plugins: [ - typescript({ tsconfig: "./tsconfig.json" }), + typescript({ + tsconfig: "./tsconfig.json", + compilerOptions: { declaration: true, declarationDir: "dist" }, + }), string({ include: "**/dist/consoleHook.js" }), replace({ preventAssignment: true, @@ -61,7 +64,7 @@ const configs = [ ...(pkg.dependencies || {}), ...(pkg.devDependencies || {}), ...(pkg.peerDependencies || {}), - }), + }).concat("@codesandbox/sdk/browser"), }, ]; diff --git a/sandpack-client/src/clients/index.ts b/sandpack-client/src/clients/index.ts index e639eed98..aa787d511 100644 --- a/sandpack-client/src/clients/index.ts +++ b/sandpack-client/src/clients/index.ts @@ -15,9 +15,6 @@ export async function loadSandpackClient( let Client; switch (template) { - case "node": - Client = await import("./node").then((m) => m.SandpackNode); - break; case "static": Client = await import("./static").then((m) => m.SandpackStatic); break; diff --git a/sandpack-client/src/clients/node/client.utils.test.ts b/sandpack-client/src/clients/node/client.utils.test.ts deleted file mode 100644 index 40443a53b..000000000 --- a/sandpack-client/src/clients/node/client.utils.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { findStartScriptPackageJson } from "./client.utils"; - -describe(findStartScriptPackageJson, () => { - it("should parse a regular command", () => { - expect( - findStartScriptPackageJson(JSON.stringify({ scripts: { start: "node" } })) - ).toEqual(["node", [], { env: {} }]); - }); - - it("should parse a regular command with arguments", () => { - expect( - findStartScriptPackageJson( - JSON.stringify({ scripts: { start: "node dev --foo" } }) - ) - ).toEqual(["node", ["dev", "--foo"], { env: {} }]); - }); - - it("should get dev script first", () => { - expect( - findStartScriptPackageJson( - JSON.stringify({ - scripts: { start: "node start --foo", dev: "node dev --foo" }, - }) - ) - ).toEqual(["node", ["dev", "--foo"], { env: {} }]); - }); - - it("should parse env vars", () => { - expect( - findStartScriptPackageJson( - JSON.stringify({ - scripts: { start: "NODE=1 ANOTHER=2 node start --foo" }, - }) - ) - ).toEqual([ - "node", - ["start", "--foo"], - { env: { NODE: "1", ANOTHER: "2" } }, - ]); - }); - - it("should parse a single env var", () => { - expect( - findStartScriptPackageJson( - JSON.stringify({ - scripts: { start: "NODE=1 node start --foo" }, - }) - ) - ).toEqual(["node", ["start", "--foo"], { env: { NODE: "1" } }]); - }); - - it("should parse a single env var and a single commmand", () => { - expect( - findStartScriptPackageJson( - JSON.stringify({ - scripts: { start: "NODE=1 node" }, - }) - ) - ).toEqual(["node", [], { env: { NODE: "1" } }]); - }); -}); diff --git a/sandpack-client/src/clients/node/client.utils.ts b/sandpack-client/src/clients/node/client.utils.ts deleted file mode 100644 index 8a5bfe8a8..000000000 --- a/sandpack-client/src/clients/node/client.utils.ts +++ /dev/null @@ -1,120 +0,0 @@ -import type { ShellCommandOptions } from "@codesandbox/nodebox/build/modules/shell"; -import { invariant } from "outvariant"; - -import type { SandpackBundlerFiles } from "../.."; -import { createError } from "../.."; - -import { tokenize, TokenType } from "./taskManager"; - -let counter = 0; - -export function generateRandomId() { - const now = Date.now(); - const randomNumber = Math.round(Math.random() * 10000); - const count = (counter += 1); - return (+`${now}${randomNumber}${count}`).toString(16); -} - -export const writeBuffer = (content: string | Uint8Array): Uint8Array => { - if (typeof content === "string") { - return new TextEncoder().encode(content); - } else { - return content; - } -}; - -export const readBuffer = (content: string | Uint8Array): string => { - if (typeof content === "string") { - return content; - } else { - return new TextDecoder().decode(content); - } -}; - -export const fromBundlerFilesToFS = ( - files: SandpackBundlerFiles -): Record => { - return Object.entries(files).reduce>( - (acc, [key, value]) => { - acc[key] = writeBuffer(value.code); - - return acc; - }, - {} - ); -}; - -/** - * Figure out which script it must run to start a server - */ -export const findStartScriptPackageJson = ( - packageJson: string -): [string, string[], ShellCommandOptions] => { - let scripts: Record = {}; - // TODO: support postinstall - const possibleKeys = ["dev", "start"]; - - try { - scripts = JSON.parse(packageJson).scripts; - } catch (e) { - throw createError( - "Could not parse package.json file: " + (e as Error).message - ); - } - - invariant( - scripts, - "Failed to start. Please provide a `start` or `dev` script on the package.json" - ); - - for (let index = 0; index < possibleKeys.length; index++) { - if (possibleKeys[index] in scripts) { - const script = possibleKeys[index]; - - const candidate = scripts[script]; - - let env = {}; - let command = ""; - const args: string[] = []; - - tokenize(candidate).forEach((item) => { - const commandNotFoundYet = command === ""; - - if (item.type === TokenType.EnvVar) { - env = item.value; - } - - if (item.type === TokenType.Command && commandNotFoundYet) { - command = item.value!; - } - - if ( - item.type === TokenType.Argument || - (!commandNotFoundYet && item.type === TokenType.Command) - ) { - args.push(item.value!); - } - - // TODO: support TokenType.AND, TokenType.OR, TokenType.PIPE - }); - - return [command, args, { env }]; - } - } - - throw createError( - "Failed to start. Please provide a `start` or `dev` script on the package.json" - ); -}; - -export const getMessageFromError = (error: Error | string): string => { - if (typeof error === "string") return error; - - if (typeof error === "object" && "message" in error) { - return error.message; - } - - return createError( - "The server could not be reached. Make sure that the node script is running and that a port has been started." - ); -}; diff --git a/sandpack-client/src/clients/node/iframe.utils.ts b/sandpack-client/src/clients/node/iframe.utils.ts deleted file mode 100644 index 30724ce99..000000000 --- a/sandpack-client/src/clients/node/iframe.utils.ts +++ /dev/null @@ -1,65 +0,0 @@ -import type { ClientOptions } from "../.."; -import { createError } from "../.."; -import { nullthrows } from "../.."; - -export async function loadPreviewIframe( - iframe: HTMLIFrameElement, - url: string -): Promise { - const { contentWindow } = iframe; - - nullthrows( - contentWindow, - "Failed to await preview iframe: no content window found" - ); - - const TIME_OUT = 90_000; - const MAX_MANY_TIRES = 20; - let tries = 0; - let timeout: ReturnType; - - return new Promise((resolve, reject) => { - const triesToSetUrl = (): void => { - const onLoadPage = (): void => { - clearTimeout(timeout); - tries = MAX_MANY_TIRES; - resolve(); - - iframe.removeEventListener("load", onLoadPage); - }; - - if (tries >= MAX_MANY_TIRES) { - reject(createError(`Could not able to connect to preview.`)); - - return; - } - - iframe.setAttribute("src", url); - - timeout = setTimeout(() => { - triesToSetUrl(); - iframe.removeEventListener("load", onLoadPage); - }, TIME_OUT); - - tries = tries + 1; - - iframe.addEventListener("load", onLoadPage); - }; - - iframe.addEventListener("error", () => reject(new Error("Iframe error"))); - iframe.addEventListener("abort", () => reject(new Error("Aborted"))); - - triesToSetUrl(); - }); -} - -export const setPreviewIframeProperties = ( - iframe: HTMLIFrameElement, - options: ClientOptions -): void => { - iframe.style.border = "0"; - iframe.style.width = options.width || "100%"; - iframe.style.height = options.height || "100%"; - iframe.style.overflow = "hidden"; - iframe.allow = "cross-origin-isolated"; -}; diff --git a/sandpack-client/src/clients/node/index.ts b/sandpack-client/src/clients/node/index.ts deleted file mode 100644 index a12aadfd9..000000000 --- a/sandpack-client/src/clients/node/index.ts +++ /dev/null @@ -1,463 +0,0 @@ -/* eslint-disable no-console,@typescript-eslint/no-explicit-any,prefer-rest-params,@typescript-eslint/explicit-module-boundary-types */ - -import { PREVIEW_LOADED_MESSAGE_TYPE, Nodebox } from "@codesandbox/nodebox"; -import type { - FilesMap, - ShellProcess, - FSWatchEvent, -} from "@codesandbox/nodebox"; -import type { ShellCommandOptions } from "@codesandbox/nodebox/build/modules/shell"; - -import type { - ClientOptions, - ListenerFunction, - SandboxSetup, - UnsubscribeFunction, -} from "../.."; -import { nullthrows } from "../.."; -import { createError } from "../.."; -import { SandpackClient } from "../base"; -import { EventEmitter } from "../event-emitter"; - -import { - fromBundlerFilesToFS, - readBuffer, - findStartScriptPackageJson, - getMessageFromError, - writeBuffer, - generateRandomId, -} from "./client.utils"; -import { loadPreviewIframe, setPreviewIframeProperties } from "./iframe.utils"; -import { injectScriptToIframe } from "./inject-scripts"; -import type { SandpackNodeMessage } from "./types"; - -export class SandpackNode extends SandpackClient { - // General - private emitter: EventEmitter; - - // Nodebox - private emulatorIframe!: HTMLIFrameElement; - private emulator!: Nodebox; - private emulatorShellProcess: ShellProcess | undefined; - private emulatorCommand: [string, string[], ShellCommandOptions] | undefined; - private iframePreviewUrl: string | undefined; - private _modulesCache = new Map(); - private messageChannelId = generateRandomId(); - - // Public - public iframe!: HTMLIFrameElement; - - private _initPromise: Promise | null = null; - - constructor( - selector: string | HTMLIFrameElement, - sandboxInfo: SandboxSetup, - options: ClientOptions = {} - ) { - super(selector, sandboxInfo, { - ...options, - bundlerURL: options.bundlerURL, - }); - - this.emitter = new EventEmitter(); - - // Assign iframes - this.manageIframes(selector); - - // Init emulator - this.emulator = new Nodebox({ - iframe: this.emulatorIframe, - runtimeUrl: this.options.bundlerURL, - }); - - // Trigger initial compile - this.updateSandbox(sandboxInfo); - } - - // Initialize nodebox, should only ever be called once - private async _init(files: FilesMap): Promise { - await this.emulator.connect(); - - // 2. Setup - await this.emulator.fs.init(files); - - // 2.1 Other dependencies - await this.globalListeners(); - } - - /** - * It initializes the emulator and provide it with files, template and script to run - */ - private async compile(files: FilesMap): Promise { - try { - // 1. Init - this.status = "initializing"; - this.dispatch({ type: "start", firstLoad: true }); - if (!this._initPromise) { - this._initPromise = this._init(files); - } - await this._initPromise; - - this.dispatch({ type: "connected" }); - - // 3. Create, run task and assign preview - const { id: shellId } = await this.createShellProcessFromTask(files); - - // 4. Launch Preview - await this.createPreviewURLFromId(shellId); - await this.setLocationURLIntoIFrame(); - - // 5. Returns to consumer - this.dispatchDoneMessage(); - } catch (err) { - this.dispatch({ - type: "action", - action: "notification", - notificationType: "error", - title: getMessageFromError(err as Error), - }); - - this.dispatch({ type: "done", compilatonError: true }); - } - } - - /** - * It creates a new shell and run the starting task - */ - private async createShellProcessFromTask( - files: FilesMap - ): Promise<{ id: string }> { - const packageJsonContent = readBuffer(files["/package.json"]); - - this.emulatorCommand = findStartScriptPackageJson(packageJsonContent); - this.emulatorShellProcess = this.emulator.shell.create(); - - // Shell listeners - await this.emulatorShellProcess.on("exit", (exitCode) => { - this.dispatch({ - type: "action", - action: "notification", - notificationType: "error", - title: createError(`Error: process.exit(${exitCode}) called.`), - }); - }); - - await this.emulatorShellProcess.on("progress", (data) => { - if ( - data.state === "command_running" || - data.state === "starting_command" - ) { - this.dispatch({ - type: "shell/progress", - data: { - ...data, - command: [ - this.emulatorCommand?.[0], - this.emulatorCommand?.[1].join(" "), - ].join(" "), - }, - }); - - this.status = "installing-dependencies"; - - return; - } - - this.dispatch({ type: "shell/progress", data }); - }); - - this.emulatorShellProcess.stdout.on("data", (data) => { - this.dispatch({ type: "stdout", payload: { data, type: "out" } }); - }); - - this.emulatorShellProcess.stderr.on("data", (data) => { - this.dispatch({ type: "stdout", payload: { data, type: "err" } }); - }); - - return await this.emulatorShellProcess.runCommand(...this.emulatorCommand); - } - - private async createPreviewURLFromId(id: string): Promise { - this.iframePreviewUrl = undefined; - - const { url } = await this.emulator.preview.getByShellId(id); - - this.iframePreviewUrl = url + (this.options.startRoute ?? ""); - } - - /** - * Nodebox needs to handle two types of iframes at the same time: - * - * 1. Runtime iframe: where the emulator process runs, which is responsible - * for creating the other iframes (hidden); - * 2. Preview iframes: any other node process that contains a PORT (public); - */ - private manageIframes(selector: string | HTMLIFrameElement): void { - /** - * Pick the preview iframe - */ - if (typeof selector === "string") { - const element = document.querySelector(selector); - - nullthrows(element, `The element '${selector}' was not found`); - - this.iframe = document.createElement("iframe"); - element?.appendChild(this.iframe); - } else { - this.iframe = selector; - } - - // Set preview iframe styles - setPreviewIframeProperties(this.iframe, this.options); - - nullthrows( - this.iframe.parentNode, - `The given iframe does not have a parent.` - ); - - /** - * Create the runtime iframe, which is hidden sibling - * from the preview one - */ - this.emulatorIframe = document.createElement("iframe"); - this.emulatorIframe.classList.add("sp-bridge-frame"); - this.iframe.parentNode?.appendChild(this.emulatorIframe); - } - - private async setLocationURLIntoIFrame(): Promise { - if (this.iframePreviewUrl) { - await loadPreviewIframe(this.iframe, this.iframePreviewUrl); - } - } - - /** - * Send all messages and events to tell to the - * consumer that the bundler is ready without any error - */ - private dispatchDoneMessage(): void { - this.status = "done"; - this.dispatch({ type: "done", compilatonError: false }); - - if (this.iframePreviewUrl) { - this.dispatch({ - type: "urlchange", - url: this.iframePreviewUrl, - back: false, - forward: false, - }); - } - } - - private async globalListeners(): Promise { - window.addEventListener("message", (event) => { - if (event.data.type === PREVIEW_LOADED_MESSAGE_TYPE) { - injectScriptToIframe(this.iframe, this.messageChannelId); - } - - if ( - event.data.type === "urlchange" && - event.data.channelId === this.messageChannelId - ) { - this.dispatch({ - type: "urlchange", - url: event.data.url, - back: event.data.back, - forward: event.data.forward, - }); - } else if (event.data.channelId === this.messageChannelId) { - this.dispatch(event.data); - } - }); - - await this.emulator.fs.watch( - ["*"], - [ - ".next", - "node_modules", - "build", - "dist", - "vendor", - ".config", - ".vuepress", - ], - - async (message) => { - if (!message) return; - - const event = message as FSWatchEvent; - - const path = - "newPath" in event - ? event.newPath - : "path" in event - ? event.path - : ""; - const { type } = await this.emulator.fs.stat(path); - if (type !== "file") return null; - - try { - switch (event.type) { - case "change": - case "create": { - const content = await this.emulator.fs.readFile( - event.path, - "utf8" - ); - this.dispatch({ - type: "fs/change", - path: event.path, - content: content, - }); - - this._modulesCache.set(event.path, writeBuffer(content)); - - break; - } - case "remove": - this.dispatch({ - type: "fs/remove", - path: event.path, - }); - - this._modulesCache.delete(event.path); - - break; - - case "rename": { - this.dispatch({ - type: "fs/remove", - path: event.oldPath, - }); - - this._modulesCache.delete(event.oldPath); - - const newContent = await this.emulator.fs.readFile( - event.newPath, - "utf8" - ); - this.dispatch({ - type: "fs/change", - path: event.newPath, - content: newContent, - }); - - this._modulesCache.set(event.newPath, writeBuffer(newContent)); - - break; - } - - case "close": - break; - } - } catch (err) { - this.dispatch({ - type: "action", - action: "notification", - notificationType: "error", - title: getMessageFromError(err as Error), - }); - } - } - ); - } - - /** - * PUBLIC Methods - */ - public async restartShellProcess(): Promise { - if (this.emulatorShellProcess && this.emulatorCommand) { - // 1. Set the loading state and clean the URL - this.dispatch({ type: "start", firstLoad: true }); - this.status = "initializing"; - - // 2. Exit shell - await this.emulatorShellProcess.kill(); - this.iframe?.removeAttribute("attr"); - - this.emulator.fs.rm("/node_modules/.vite", { - recursive: true, - force: true, - }); - - // 3 Run command again - await this.compile(Object.fromEntries(this._modulesCache)); - } - } - - public updateSandbox(setup: SandboxSetup): void { - const modules = fromBundlerFilesToFS(setup.files); - - /** - * Update file changes - */ - - if (this.emulatorShellProcess?.state === "running") { - Object.entries(modules).forEach(([key, value]) => { - if ( - !this._modulesCache.get(key) || - readBuffer(value) !== readBuffer(this._modulesCache.get(key)) - ) { - this.emulator.fs.writeFile(key, value, { recursive: true }); - } - }); - - return; - } - - /** - * Pass init files to the bundler - */ - this.dispatch({ - codesandbox: true, - modules, - template: setup.template, - type: "compile", - }); - - /** - * Add modules to cache, this will ensure uniqueness changes - * - * Keep it after the compile action, in order to update the cache at the right moment - */ - Object.entries(modules).forEach(([key, value]) => { - this._modulesCache.set(key, writeBuffer(value)); - }); - } - - public async dispatch(message: SandpackNodeMessage): Promise { - switch (message.type) { - case "compile": - this.compile(message.modules); - break; - - case "refresh": - await this.setLocationURLIntoIFrame(); - break; - - case "urlback": - case "urlforward": - this.iframe?.contentWindow?.postMessage(message, "*"); - break; - - case "shell/restart": - this.restartShellProcess(); - break; - - case "shell/openPreview": - window.open(this.iframePreviewUrl, "_blank"); - break; - - default: - this.emitter.dispatch(message); - } - } - - public listen(listener: ListenerFunction): UnsubscribeFunction { - return this.emitter.listener(listener); - } - - public destroy(): void { - this.emulatorIframe.remove(); - this.emitter.cleanup(); - } -} diff --git a/sandpack-client/src/clients/node/inject-scripts/historyListener.ts b/sandpack-client/src/clients/node/inject-scripts/historyListener.ts deleted file mode 100644 index 142bd814a..000000000 --- a/sandpack-client/src/clients/node/inject-scripts/historyListener.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/explicit-function-return-type, no-restricted-globals, @typescript-eslint/no-explicit-any */ - -export function setupHistoryListeners({ - scope, -}: { - scope: { channelId: string }; -}) { - // @ts-ignore - const origHistoryProto = window.history.__proto__; - - const historyList: Array<{ state: string; url: string }> = []; - let historyPosition = 0; - - const dispatchMessage = (url: string) => { - parent.postMessage( - { - type: "urlchange", - url, - back: historyPosition > 0, - forward: historyPosition < historyList.length - 1, - channelId: scope.channelId, - }, - "*" - ); - }; - - function pushHistory(url: string, state: string) { - // remove "future" locations - historyList.splice(historyPosition + 1); - historyList.push({ url, state }); - historyPosition = historyList.length - 1; - } - - Object.assign(window.history, { - go(delta: number) { - const newPos = historyPosition + delta; - if (newPos >= 0 && newPos <= historyList.length - 1) { - historyPosition = newPos; - - const { url, state } = historyList[historyPosition]; - origHistoryProto.replaceState.call(window.history, state, "", url); - - const newURL = document.location.href; - dispatchMessage(newURL); - - window.dispatchEvent(new PopStateEvent("popstate", { state })); - } - }, - - back() { - window.history.go(-1); - }, - - forward() { - window.history.go(1); - }, - - pushState(state: string, title: string, url: string) { - origHistoryProto.replaceState.call(window.history, state, title, url); - pushHistory(url, state); - dispatchMessage(document.location.href); - }, - - replaceState(state: string, title: string, url: string) { - origHistoryProto.replaceState.call(window.history, state, title, url); - historyList[historyPosition] = { state, url }; - dispatchMessage(document.location.href); - }, - }); - - interface NavigationMessage { - type: "urlback" | "urlforward" | "refresh"; - } - function handleMessage({ data }: { data: NavigationMessage }) { - if (data.type === "urlback") { - history.back(); - } else if (data.type === "urlforward") { - history.forward(); - } else if (data.type === "refresh") { - document.location.reload(); - } - } - - window.addEventListener("message", handleMessage); -} diff --git a/sandpack-client/src/clients/node/inject-scripts/index.ts b/sandpack-client/src/clients/node/inject-scripts/index.ts deleted file mode 100644 index 86bb62cc5..000000000 --- a/sandpack-client/src/clients/node/inject-scripts/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ - -import type { InjectMessage } from "@codesandbox/nodebox"; -import { INJECT_MESSAGE_TYPE } from "@codesandbox/nodebox"; - -// get the bundled file, which contains all dependencies -// @ts-ignore -import consoleHook from "../../../inject-scripts/dist/consoleHook.js"; - -import { setupHistoryListeners } from "./historyListener"; -import { watchResize } from "./resize.js"; - -const scripts = [ - { code: setupHistoryListeners.toString(), id: "historyListener" }, - { - code: "function consoleHook({ scope }) {" + consoleHook + "\n};", - id: "consoleHook", - }, - { code: watchResize.toString(), id: "watchResize" }, -]; - -export const injectScriptToIframe = ( - iframe: HTMLIFrameElement, - channelId: string -): void => { - scripts.forEach(({ code, id }) => { - const message: InjectMessage = { - uid: id, - type: INJECT_MESSAGE_TYPE, - code: `exports.activate = ${code}`, - scope: { channelId }, - }; - - iframe.contentWindow?.postMessage(message, "*"); - }); -}; diff --git a/sandpack-client/src/clients/node/inject-scripts/resize.ts b/sandpack-client/src/clients/node/inject-scripts/resize.ts deleted file mode 100644 index c3d41f4ed..000000000 --- a/sandpack-client/src/clients/node/inject-scripts/resize.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ - -export function watchResize({ scope }: { scope: { channelId: string } }) { - let lastHeight = 0; - - function getDocumentHeight(): number { - if (typeof window === "undefined") return 0; - - const { body } = document; - const html = document.documentElement; - - return Math.max(body.scrollHeight, body.offsetHeight, html.offsetHeight); - } - - function sendResizeEvent() { - const height = getDocumentHeight(); - - if (lastHeight !== height) { - window.parent.postMessage( - { - type: "resize", - height, - codesandbox: true, - channelId: scope.channelId, - }, - "*" - ); - } - - lastHeight = height; - } - - sendResizeEvent(); - - let throttle: any; - const observer = new MutationObserver(() => { - if (throttle === undefined) { - sendResizeEvent(); - - throttle = setTimeout(() => { - throttle = undefined; - }, 300); - } - }); - - observer.observe(document, { - attributes: true, - childList: true, - subtree: true, - }); - - /** - * Ideally we should only use a `MutationObserver` to trigger a resize event, - * however, we noted that it's not 100% reliable, so we went for polling strategy as well - */ - setInterval(sendResizeEvent, 300); -} diff --git a/sandpack-client/src/clients/node/taskManager.test.ts b/sandpack-client/src/clients/node/taskManager.test.ts deleted file mode 100644 index fa595de81..000000000 --- a/sandpack-client/src/clients/node/taskManager.test.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { tokenize } from "./taskManager"; - -describe(tokenize, () => { - it("parses environment variables", () => { - const input = tokenize("FOO=1 tsc -p"); - const output = [ - { type: "EnvVar", value: { FOO: "1" } }, - { type: "Command", value: "tsc" }, - { type: "Argument", value: "-p" }, - ]; - - expect(input).toEqual(output); - }); - - it("parses multiples envs environment variables", () => { - const input = tokenize("FOO=1 BAZ=bla tsc -p"); - const output = [ - { type: "EnvVar", value: { FOO: "1", BAZ: "bla" } }, - { type: "Command", value: "tsc" }, - { type: "Argument", value: "-p" }, - ]; - - expect(input).toEqual(output); - }); - - it("parses command and argument", () => { - const input = tokenize("tsc -p"); - const output = [ - { type: "Command", value: "tsc" }, - { type: "Argument", value: "-p" }, - ]; - - expect(input).toEqual(output); - }); - - it("parses two commands", () => { - const input = tokenize("tsc && node"); - const output = [ - { type: "Command", value: "tsc" }, - { type: "AND" }, - { type: "Command", value: "node" }, - ]; - - expect(input).toEqual(output); - }); - - it("parses two commands", () => { - const input = tokenize("tsc -p . && node index.js"); - const output = [ - { type: "Command", value: "tsc" }, - { type: "Argument", value: "-p" }, - { type: "Command", value: "." }, - { type: "AND" }, - { type: "Command", value: "node" }, - { type: "Command", value: "index.js" }, - ]; - - expect(input).toEqual(output); - }); - - it("parses multiple arguments", () => { - const input = tokenize("tsc --foo -- --foo"); - const output = [ - { type: "Command", value: "tsc" }, - { type: "Argument", value: "--foo" }, - { type: "Argument", value: "--" }, - { type: "Argument", value: "--foo" }, - ]; - - expect(input).toEqual(output); - }); - - it("parses pipe and string commands", () => { - const input = tokenize(`echo "Hello World" | wc -w`); - const output = [ - { type: "Command", value: "echo" }, - { type: "String", value: '"Hello World"' }, - { type: "PIPE" }, - { type: "Command", value: "wc" }, - { type: "Argument", value: "-w" }, - ]; - - expect(input).toEqual(output); - }); - - it("parses escaped characters", () => { - const input = tokenize(`echo "Hello | World" | wc -w`); - const output = [ - { type: "Command", value: "echo" }, - { type: "String", value: '"Hello | World"' }, - { type: "PIPE" }, - { type: "Command", value: "wc" }, - { type: "Argument", value: "-w" }, - ]; - - expect(input).toEqual(output); - }); - - it("parses escaped characters", () => { - const input = tokenize(`echo "Hello | World" | wc -w`); - const output = [ - { type: "Command", value: "echo" }, - { type: "String", value: '"Hello | World"' }, - { type: "PIPE" }, - { type: "Command", value: "wc" }, - { type: "Argument", value: "-w" }, - ]; - - expect(input).toEqual(output); - }); - - it("parses or", () => { - const input = tokenize(`echo "Hello | World" || wc -w`); - const output = [ - { type: "Command", value: "echo" }, - { type: "String", value: '"Hello | World"' }, - { type: "OR" }, - { type: "Command", value: "wc" }, - { type: "Argument", value: "-w" }, - ]; - - expect(input).toEqual(output); - }); -}); diff --git a/sandpack-client/src/clients/node/taskManager.ts b/sandpack-client/src/clients/node/taskManager.ts deleted file mode 100644 index 93b1afe3b..000000000 --- a/sandpack-client/src/clients/node/taskManager.ts +++ /dev/null @@ -1,178 +0,0 @@ -function isCommand(char: string) { - return /[a-zA-Z.]/.test(char); -} - -function isAlpha(char: string) { - return /[a-zA-Z]/.test(char); -} - -function isWhitespace(char: string) { - return /\s/.test(char); -} - -function isOperator(char: string) { - return /[&|]/.test(char); -} - -function isArgument(char: string) { - return /-/.test(char); -} - -function isString(char: string) { - return /["']/.test(char); -} - -function isEnvVar(char: string) { - return isAlpha(char) && char === char.toUpperCase(); -} - -export enum TokenType { - OR = "OR", - AND = "AND", - PIPE = "PIPE", - Command = "Command", - Argument = "Argument", - String = "String", - EnvVar = "EnvVar", -} - -type Token = - | { type: TokenType.OR | TokenType.AND | TokenType.PIPE } - | { - type: TokenType.Command | TokenType.Argument | TokenType.String; - value?: string; - } - | { - type: TokenType.EnvVar; - value: Record; - }; - -const operators = new Map([ - ["&&", { type: TokenType.AND }], - ["||", { type: TokenType.OR }], - ["|", { type: TokenType.PIPE }], - ["-", { type: TokenType.Argument }], -]); - -export function tokenize(input: string): Token[] { - let current = 0; - const tokens = []; - - function parseCommand(): Token { - let value = ""; - while (isCommand(input[current]) && current < input.length) { - value += input[current]; - current++; - } - - return { type: TokenType.Command, value }; - } - - function parseOperator(): Token { - let value = ""; - while (isOperator(input[current]) && current < input.length) { - value += input[current]; - current++; - } - - return operators.get(value)!; - } - - function parseArgument(): Token { - let value = ""; - while ( - (isArgument(input[current]) || isAlpha(input[current])) && - current < input.length - ) { - value += input[current]; - current++; - } - - return { type: TokenType.Argument, value }; - } - - function parseString(): Token { - const openCloseQuote = input[current]; - - let value = input[current]; - current++; - - while (input[current] !== openCloseQuote && current < input.length) { - value += input[current]; - current++; - } - - value += input[current]; - current++; - - return { type: TokenType.String, value }; - } - - function parseEnvVars(): Token { - const value: Record = {}; - - const parseSingleEnv = () => { - let key = ""; - let pair = ""; - - while (input[current] !== "=" && current < input.length) { - key += input[current]; - current++; - } - - // Skip equal - if (input[current] === "=") { - current++; - } - - while (input[current] !== " " && current < input.length) { - pair += input[current]; - current++; - } - - value[key] = pair; - }; - - while (isEnvVar(input[current]) && current < input.length) { - parseSingleEnv(); - - current++; - } - - return { type: TokenType.EnvVar, value }; - } - - while (current < input.length) { - const currentChar = input[current]; - - if (isWhitespace(currentChar)) { - current++; - continue; - } - - switch (true) { - case isEnvVar(currentChar): - tokens.push(parseEnvVars()); - break; - - case isCommand(currentChar): - tokens.push(parseCommand()); - break; - case isOperator(currentChar): - tokens.push(parseOperator()); - break; - case isArgument(currentChar): - tokens.push(parseArgument()); - break; - - case isString(currentChar): - tokens.push(parseString()); - break; - - default: - throw new Error(`Unknown character: ${currentChar}`); - } - } - - return tokens; -} diff --git a/sandpack-client/src/clients/node/types.ts b/sandpack-client/src/clients/node/types.ts deleted file mode 100644 index de519a0b0..000000000 --- a/sandpack-client/src/clients/node/types.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { FilesMap, WorkerStatusUpdate } from "@codesandbox/nodebox"; - -import type { - BaseSandpackMessage, - SandpackErrorMessage, - SandpackLogLevel, -} from "../.."; - -type SandpackStandartMessages = - | { - type: "start"; - firstLoad?: boolean; - } - | { - type: "done"; - compilatonError: boolean; - }; - -type SandpackBundlerMessages = - | { - type: "compile"; - modules: FilesMap; - template?: string; - logLevel?: SandpackLogLevel; - } - | ({ - type: "action"; - action: "show-error"; - } & SandpackErrorMessage) - | { - type: "action"; - action: "notification"; - notificationType: "error"; - title: string; - }; - -type SandpackFSMessages = - | { type: "fs/change"; path: string; content: string } - | { type: "fs/remove"; path: string }; - -type SandpackURLsMessages = - | { - type: "urlchange"; - url: string; - back: boolean; - forward: boolean; - } - | { - type: "refresh"; - } - | { - type: "urlback"; - } - | { - type: "urlforward"; - }; - -type SandpackShellMessages = - | { type: "shell/restart" } - | { type: "shell/openPreview" } - | { type: "shell/progress"; data: WorkerStatusUpdate & { command?: string } }; - -export type SandpackNodeMessage = BaseSandpackMessage & - ( - | SandpackStandartMessages - | SandpackURLsMessages - | SandpackBundlerMessages - | SandpackShellMessages - | { type: "connected" } - | { - type: "stdout"; - payload: SandpackShellStdoutData; - } - | SandpackFSMessages - ); - -export interface SandpackShellStdoutData { - data?: string; - type?: "out" | "err"; -} diff --git a/sandpack-client/src/clients/static/index.ts b/sandpack-client/src/clients/static/index.ts index 2d034c932..dbf962d02 100644 --- a/sandpack-client/src/clients/static/index.ts +++ b/sandpack-client/src/clients/static/index.ts @@ -1,5 +1,4 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ -import type { FilesMap } from "@codesandbox/nodebox"; + import type { FileContent } from "static-browser-server"; import { PreviewController } from "static-browser-server"; @@ -9,22 +8,23 @@ import type { SandboxSetup, UnsubscribeFunction, } from "../.."; -// get the bundled file, which contains all dependencies -// @ts-ignore +// @ts-expect-error // get the bundled file, which contains all dependencies import consoleHook from "../../inject-scripts/dist/consoleHook.js"; import { SandpackClient } from "../base"; import { EventEmitter } from "../event-emitter"; -import { fromBundlerFilesToFS, generateRandomId } from "../node/client.utils"; -import type { SandpackNodeMessage } from "../node/types"; +import { fromBundlerFilesToFS, generateRandomId } from "../vm/client.utils"; +import type { SandpackVMMessage } from "../vm/types"; import { insertHtmlAfterRegex, readBuffer, validateHtml } from "./utils"; +export type FilesMap = Record; + export class SandpackStatic extends SandpackClient { private emitter: EventEmitter; private previewController: PreviewController; private files: Map = new Map(); - public iframe!: HTMLIFrameElement; + public selector!: string; public element: Element; @@ -222,7 +222,7 @@ export class SandpackStatic extends SandpackClient { /** * Bundler communication */ - public dispatch(message: SandpackNodeMessage): void { + public dispatch(message: SandpackVMMessage): void { switch (message.type) { case "compile": this.compile(message.modules); diff --git a/sandpack-client/src/clients/static/utils.ts b/sandpack-client/src/clients/static/utils.ts index ac9639f02..1ce842ae6 100644 --- a/sandpack-client/src/clients/static/utils.ts +++ b/sandpack-client/src/clients/static/utils.ts @@ -4,7 +4,7 @@ export const insertHtmlAfterRegex = ( regex: RegExp, content: string, insertable: string -): string | void => { +) => { const match = regex.exec(content); if (match && match.length >= 1) { const offset = match.index + match[0].length; diff --git a/sandpack-client/src/clients/vm/client.utils.ts b/sandpack-client/src/clients/vm/client.utils.ts index 5f223f61f..d51a25667 100644 --- a/sandpack-client/src/clients/vm/client.utils.ts +++ b/sandpack-client/src/clients/vm/client.utils.ts @@ -1,4 +1,4 @@ -import type { SandboxWithoutClient } from "@codesandbox/sdk/dist/esm/sandbox"; +import type { SandboxSession } from "@codesandbox/sdk"; import { createError } from "../.."; import type { SandpackBundlerFiles } from "../../"; @@ -53,10 +53,7 @@ export const getMessageFromError = (error: Error | string): string => { ); }; -export async function scanDirectory( - dirPath: string, - fs: SandboxWithoutClient["fs"] -) { +export async function scanDirectory(dirPath: string, fs: SandboxSession["fs"]) { const IGNORED_DIRS = new Set([ "node_modules", ".git", @@ -75,11 +72,6 @@ export async function scanDirectory( "pnpm-lock.yaml", ]); - const TYPES = { - FILE: 0, - FOLDER: 1, - }; - const results: Array<{ path: string; content: Uint8Array }> = []; try { @@ -92,7 +84,7 @@ export async function scanDirectory( continue; } - if (entry.type === TYPES.FILE) { + if (entry.type === "file") { results.push({ path: fullPath, content: await fs.readFile(fullPath), @@ -100,7 +92,7 @@ export async function scanDirectory( } // Recursively scan subdirectories - if (entry.type === TYPES.FOLDER) { + if (entry.type === "directory") { const subDirResults = await scanDirectory(fullPath, fs); results.push(...subDirResults); } @@ -131,7 +123,7 @@ export const createLogGroup = (group: string) => { }; export const throwIfTimeout = (timeout: number) => { - return new Promise((_, reject) => + return new Promise((_, reject) => setTimeout(() => { reject(new Error(`Timeout of ${timeout}ms exceeded`)); }, timeout) diff --git a/sandpack-client/src/clients/vm/index.ts b/sandpack-client/src/clients/vm/index.ts index 5ac9d37a6..71578fc32 100644 --- a/sandpack-client/src/clients/vm/index.ts +++ b/sandpack-client/src/clients/vm/index.ts @@ -1,9 +1,7 @@ /* eslint-disable no-console,@typescript-eslint/no-explicit-any,prefer-rest-params,@typescript-eslint/explicit-module-boundary-types */ - -import type { FilesMap } from "@codesandbox/nodebox"; +import type { SandboxSession } from "@codesandbox/sdk"; +import type { PortInfo } from "@codesandbox/sdk"; import { connectToSandbox } from "@codesandbox/sdk/browser"; -import type { PortInfo } from "@codesandbox/sdk/dist/esm/ports"; -import type { SandboxWithoutClient } from "@codesandbox/sdk/dist/esm/sandbox"; import type { ClientOptions, @@ -27,10 +25,12 @@ import { import { loadPreviewIframe, setPreviewIframeProperties } from "./iframe.utils"; import type { SandpackVMMessage } from "./types"; +export type FileContent = Uint8Array | string; +export type FilesMap = Record; + export class SandpackVM extends SandpackClient { private emitter: EventEmitter; - private sandbox!: SandboxWithoutClient; - public iframe!: HTMLIFrameElement; + private sandbox!: SandboxSession; private _modulesCache = new Map(); private _forkPromise: Promise | null = null; diff --git a/sandpack-client/src/clients/vm/inject-scripts/index.ts b/sandpack-client/src/clients/vm/inject-scripts/index.ts index 86bb62cc5..624dda4b7 100644 --- a/sandpack-client/src/clients/vm/inject-scripts/index.ts +++ b/sandpack-client/src/clients/vm/inject-scripts/index.ts @@ -1,8 +1,5 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ -import type { InjectMessage } from "@codesandbox/nodebox"; -import { INJECT_MESSAGE_TYPE } from "@codesandbox/nodebox"; - // get the bundled file, which contains all dependencies // @ts-ignore import consoleHook from "../../../inject-scripts/dist/consoleHook.js"; @@ -10,6 +7,19 @@ import consoleHook from "../../../inject-scripts/dist/consoleHook.js"; import { setupHistoryListeners } from "./historyListener"; import { watchResize } from "./resize.js"; +const INJECT_MESSAGE_TYPE = "INJECT_AND_INVOKE"; + +export interface Message { + type: string; +} +type BaseScope = Record; +export interface InjectMessage { + uid: string; + type: typeof INJECT_MESSAGE_TYPE; + code: string; + scope: Scope; +} + const scripts = [ { code: setupHistoryListeners.toString(), id: "historyListener" }, { diff --git a/sandpack-client/src/types.ts b/sandpack-client/src/types.ts index b7b1ba60d..47f229269 100644 --- a/sandpack-client/src/types.ts +++ b/sandpack-client/src/types.ts @@ -1,4 +1,3 @@ -import type { SandpackNodeMessage } from "./clients/node/types"; import type { SandpackRuntimeMessage } from "./clients/runtime/types"; import type { SandpackVMMessage } from "./clients/vm/types"; @@ -183,10 +182,7 @@ export interface BundlerState { transpiledModules: Record; } -export type SandpackMessage = - | SandpackRuntimeMessage - | SandpackNodeMessage - | SandpackVMMessage; +export type SandpackMessage = SandpackRuntimeMessage | SandpackVMMessage; export type ListenerFunction = (msg: SandpackMessage) => void; export type UnsubscribeFunction = () => void; diff --git a/sandpack-client/tsconfig.json b/sandpack-client/tsconfig.json index a6d8bc12e..d556cd19e 100644 --- a/sandpack-client/tsconfig.json +++ b/sandpack-client/tsconfig.json @@ -2,6 +2,8 @@ "compilerOptions": { "lib": ["es2015", "es2016", "es2017", "ES2019", "dom"], "strict": true, + "module": "ESNext", + "moduleResolution": "bundler", "sourceMap": false, "emitDeclarationOnly": true, "declaration": true, @@ -10,7 +12,6 @@ "emitDecoratorMetadata": true, "noImplicitAny": true, "typeRoots": ["node_modules/@types"], - "outDir": "dist", "skipLibCheck": true }, "include": ["./src"], diff --git a/sandpack-environments/.bundler b/sandpack-environments/.bundler new file mode 100644 index 000000000..a018049f8 --- /dev/null +++ b/sandpack-environments/.bundler @@ -0,0 +1,3 @@ +// Manually generated file to trigger new releases based on the bundler changes. +// The following value is the commit hash from codesandbox-client +f64b210d3832ce8558516bcda9bebd543400c9d9 diff --git a/sandpack-environments/.eslintignore b/sandpack-environments/.eslintignore new file mode 100644 index 000000000..5971abb9a --- /dev/null +++ b/sandpack-environments/.eslintignore @@ -0,0 +1,5 @@ +dist/ +esm/ +sandpack/ +file-resolver-protocol.ts +examples/ \ No newline at end of file diff --git a/sandpack-environments/.gitignore b/sandpack-environments/.gitignore new file mode 100644 index 000000000..14537d2eb --- /dev/null +++ b/sandpack-environments/.gitignore @@ -0,0 +1,7 @@ +compiled +storybook-static +.rpt2_cache +dist +esm +docs +sandpack/ diff --git a/sandpack-environments/CHANGELOG.md b/sandpack-environments/CHANGELOG.md new file mode 100644 index 000000000..1dd22e3f6 --- /dev/null +++ b/sandpack-environments/CHANGELOG.md @@ -0,0 +1,696 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [2.19.8](https://github.com/codesandbox/sandpack/compare/v2.19.7...v2.19.8) (2024-09-12) + +### Bug Fixes + +- **sandpack-id:** generate new bundler id based on client version ([#1202](https://github.com/codesandbox/sandpack/issues/1202)) ([dbb882e](https://github.com/codesandbox/sandpack/commit/dbb882eec6963a11c2eac7293c0891b501f9a9fe)) + +## [2.19.7](https://github.com/codesandbox/sandpack/compare/v2.19.6...v2.19.7) (2024-09-11) + +### Bug Fixes + +- **client:** postcss transpile to angular template ([#1201](https://github.com/codesandbox/sandpack/issues/1201)) ([0b57de6](https://github.com/codesandbox/sandpack/commit/0b57de653d3bea38917c2665aae3942c87a212ff)) + +## [2.19.4](https://github.com/codesandbox/sandpack/compare/v2.19.3...v2.19.4) (2024-09-10) + +### Bug Fixes + +- **sw:** get transpiled files from bundler ([#1196](https://github.com/codesandbox/sandpack/issues/1196)) ([4563646](https://github.com/codesandbox/sandpack/commit/4563646a08d3b072dec14c0942af46f9755d2719)) + +# [2.19.0](https://github.com/codesandbox/sandpack/compare/v2.18.3...v2.19.0) (2024-08-22) + +### Features + +- **iframe allow:** introduce xr-spatial-tracking ([#1183](https://github.com/codesandbox/sandpack/issues/1183)) ([7245731](https://github.com/codesandbox/sandpack/commit/72457311c01c9d6ece540e177007e59b42a64153)) + +## [2.18.2](https://github.com/codesandbox/sandpack/compare/v2.18.1...v2.18.2) (2024-07-31) + +### Bug Fixes + +- **client:** use stable sw id ([#1169](https://github.com/codesandbox/sandpack/issues/1169)) ([8c15b85](https://github.com/codesandbox/sandpack/commit/8c15b85018fae9d55bfad86922c736694e45848f)) + +## [2.18.1](https://github.com/codesandbox/sandpack/compare/v2.18.0...v2.18.1) (2024-07-25) + +### Bug Fixes + +- **sw:** assign new channel port on reload ([#1166](https://github.com/codesandbox/sandpack/issues/1166)) ([2d92bea](https://github.com/codesandbox/sandpack/commit/2d92bea4a9754373027455494050110d91bd13fc)) + +# [2.18.0](https://github.com/codesandbox/sandpack/compare/v2.17.1...v2.18.0) (2024-07-11) + +### Features + +- Add support for enabling service worker feature ([#1127](https://github.com/codesandbox/sandpack/issues/1127)) ([4e2b116](https://github.com/codesandbox/sandpack/commit/4e2b1167446be930e4b072f785f719aa7444b5a9)) + +## [2.17.1](https://github.com/codesandbox/sandpack/compare/v2.17.0...v2.17.1) (2024-07-11) + +### Bug Fixes + +- **client:** update bundler ([#1160](https://github.com/codesandbox/sandpack/issues/1160)) ([a0c4209](https://github.com/codesandbox/sandpack/commit/a0c4209ce1172b2a9cdadd21dc3007d7f7cbfb1f)) + +# [2.17.0](https://github.com/codesandbox/sandpack/compare/v2.16.1...v2.17.0) (2024-07-09) + +### Features + +- **client:** enable SW in the bundler ([#1159](https://github.com/codesandbox/sandpack/issues/1159)) ([36e580b](https://github.com/codesandbox/sandpack/commit/36e580b5b76ee34bb722027b35302fa6c75e521e)) + +## [2.16.1](https://github.com/codesandbox/sandpack/compare/v2.16.0...v2.16.1) (2024-07-08) + +### Bug Fixes + +- **loading:** update bundler to consume the correct loading message ([#1157](https://github.com/codesandbox/sandpack/issues/1157)) ([7a70999](https://github.com/codesandbox/sandpack/commit/7a7099991e8831a5ca76b56cada5ec06b17aa339)) + +# [2.16.0](https://github.com/codesandbox/sandpack/compare/v2.15.0...v2.16.0) (2024-07-08) + +### Features + +- **loading:** show dependency download progress ([#1146](https://github.com/codesandbox/sandpack/issues/1146)) ([a811267](https://github.com/codesandbox/sandpack/commit/a811267243785bb461fafed3228a90e8630d022f)) + +## [2.14.5](https://github.com/codesandbox/sandpack/compare/v2.14.4...v2.14.5) (2024-07-03) + +### Bug Fixes + +- **bundler:** use latest bundler version ([#1155](https://github.com/codesandbox/sandpack/issues/1155)) ([260cb35](https://github.com/codesandbox/sandpack/commit/260cb35be7a669cf337533a0c1b970f04bc8571c)) + +## [2.14.4](https://github.com/codesandbox/sandpack/compare/v2.14.3...v2.14.4) (2024-06-18) + +### Bug Fixes + +- **client:** bump version ([#1151](https://github.com/codesandbox/sandpack/issues/1151)) ([a2e56c0](https://github.com/codesandbox/sandpack/commit/a2e56c0bcdacb242295fb545ab8d08231adfba21)) + +## [2.14.3](https://github.com/codesandbox/sandpack/compare/v2.14.2...v2.14.3) (2024-06-18) + +### Bug Fixes + +- **preview:** allows clipboard api ([#1149](https://github.com/codesandbox/sandpack/issues/1149)) ([7350364](https://github.com/codesandbox/sandpack/commit/7350364b3dbf933ac04686be284222994335c001)) + +## [2.13.8](https://github.com/codesandbox/sandpack/compare/v2.13.7...v2.13.8) (2024-04-11) + +### Bug Fixes + +- force new release ([#1118](https://github.com/codesandbox/sandpack/issues/1118)) ([5b38b37](https://github.com/codesandbox/sandpack/commit/5b38b372de2d9ff26967fec1e22c772c755a0d33)) + +## [2.13.7](https://github.com/codesandbox/sandpack/compare/v2.13.6...v2.13.7) (2024-03-26) + +### Bug Fixes + +- Fixed sandpackNode initializing failure ([#1105](https://github.com/codesandbox/sandpack/issues/1105)) ([26685d9](https://github.com/codesandbox/sandpack/commit/26685d92973ab609bae03dadca4d7f21c1fd696c)) + +## [2.13.6](https://github.com/codesandbox/sandpack/compare/v2.13.5...v2.13.6) (2024-03-25) + +### Bug Fixes + +- **pro:** use partitioned cookie for sandpack authentication ([#1110](https://github.com/codesandbox/sandpack/issues/1110)) ([2950186](https://github.com/codesandbox/sandpack/commit/29501863c2ebbcbf64fb9e7080feed1f2bc724b5)) + +## [2.13.2](https://github.com/codesandbox/sandpack/compare/v2.13.1...v2.13.2) (2024-02-24) + +### Bug Fixes + +- **compile opts:** don't overwrite default properties ([#1090](https://github.com/codesandbox/sandpack/issues/1090)) ([2877fcf](https://github.com/codesandbox/sandpack/commit/2877fcf46be7579a20d793b5ebb746e63622fb74)) + +# [2.13.0](https://github.com/codesandbox/sandpack/compare/v2.12.1...v2.13.0) (2024-02-22) + +### Features + +- Add spread operator for options in runtime client ([#1086](https://github.com/codesandbox/sandpack/issues/1086)) ([b7c7551](https://github.com/codesandbox/sandpack/commit/b7c7551472e42723a70db7cbf7af853810dfd9d3)) + +# [2.12.0](https://github.com/codesandbox/sandpack/compare/v2.11.3...v2.12.0) (2024-02-05) + +### Features + +- sandpack template type ([#1075](https://github.com/codesandbox/sandpack/issues/1075)) ([db8eba7](https://github.com/codesandbox/sandpack/commit/db8eba7d7810896948e29067ac6606388e31c5e2)) + +## [2.11.2](https://github.com/codesandbox/sandpack/compare/v2.11.1...v2.11.2) (2024-01-11) + +### Bug Fixes + +- bump codesandbox-client and test new publish script ([#1056](https://github.com/codesandbox/sandpack/issues/1056)) ([1736185](https://github.com/codesandbox/sandpack/commit/173618538584f11426c7b2156243bc1691303696)) + +## [2.11.1](https://github.com/codesandbox/sandpack/compare/v2.11.0...v2.11.1) (2024-01-10) + +### Bug Fixes + +- add `allow-downloads` to iframes ([#1054](https://github.com/codesandbox/sandpack/issues/1054)) ([c038e13](https://github.com/codesandbox/sandpack/commit/c038e1322bbca94ea529f7a92089ad0f605d1ba5)) + +# [2.10.0](https://github.com/codesandbox/sandpack/compare/v2.9.0...v2.10.0) (2023-11-15) + +### Features + +- **node:** Added resize event ([#1037](https://github.com/codesandbox/sandpack/issues/1037)) ([61ccf7e](https://github.com/codesandbox/sandpack/commit/61ccf7ebfb954710fed40d26f800d8e145806006)) +- Upgrade Node.js version ([#1029](https://github.com/codesandbox/sandpack/issues/1029)) ([a79a5d2](https://github.com/codesandbox/sandpack/commit/a79a5d2feca6800e1d967df688a555aa39f8c5e6)) + +# [2.9.0](https://github.com/codesandbox/sandpack/compare/v2.8.0...v2.9.0) (2023-10-06) + +### Features + +- add sandbox-id prop to compile ([#1015](https://github.com/codesandbox/sandpack/issues/1015)) ([600b984](https://github.com/codesandbox/sandpack/commit/600b984d4dccaefc36e87d41a56bbd4cb9bb434f)) + +## [2.7.1](https://github.com/codesandbox/sandpack/compare/v2.7.0...v2.7.1) (2023-09-13) + +### Bug Fixes + +- **node:** fix issue with undefined startRoute in iframePreviewUrl ([#1002](https://github.com/codesandbox/sandpack/issues/1002)) ([c457a53](https://github.com/codesandbox/sandpack/commit/c457a5330d4c0eb9bf4bf35ab4af7c9171a5680e)) + +# [2.7.0](https://github.com/codesandbox/sandpack/compare/v2.6.9...v2.7.0) (2023-09-11) + +### Features + +- add console hook to static template ([#909](https://github.com/codesandbox/sandpack/issues/909)) ([1a473e3](https://github.com/codesandbox/sandpack/commit/1a473e3fa2a4d6581d8a1c4e30586588f5a9ee9b)) + +## [2.6.9](https://github.com/codesandbox/sandpack/compare/v2.6.8...v2.6.9) (2023-06-20) + +### Bug Fixes + +- **lerna:** remove experimental flag for workspaces ([#956](https://github.com/codesandbox/sandpack/issues/956)) ([dec34f0](https://github.com/codesandbox/sandpack/commit/dec34f02bcbb92b0f3d62c305d58cd27a7db6b3b)) + +## [2.6.8](https://github.com/codesandbox/sandpack/compare/v2.6.7...v2.6.8) (2023-06-20) + +### Bug Fixes + +- **client:** hard reload on module removal ([d5dfdd1](https://github.com/codesandbox/sandpack/commit/d5dfdd126d1061d63e1f1b086f30cbe7077ca30b)) + +## [2.6.7](https://github.com/codesandbox/sandpack/compare/v2.6.6...v2.6.7) (2023-05-26) + +### Bug Fixes + +- **client:** avoid concurrent compile step and init ([#946](https://github.com/codesandbox/sandpack/issues/946)) ([98a20e9](https://github.com/codesandbox/sandpack/commit/98a20e92ebb3aecb7ef23f18a5d3cb76f716b0a4)) +- **node:** remove --force option from all Sandpack Vite templates ([#947](https://github.com/codesandbox/sandpack/issues/947)) ([4d1b576](https://github.com/codesandbox/sandpack/commit/4d1b576adaa607e460b17a44f6d2b4c2349a2648)) + +## [2.6.6](https://github.com/codesandbox/sandpack/compare/v2.6.5...v2.6.6) (2023-05-22) + +### Bug Fixes + +- **compile:** create one TestRunner between sandbox compiles ([5ada4e3](https://github.com/codesandbox/sandpack/commit/5ada4e3e80509a0810e39baf8a638675991bb7dd)) + +## [2.6.5](https://github.com/codesandbox/sandpack/compare/v2.6.4...v2.6.5) (2023-05-19) + +### Bug Fixes + +- **package.json:** update @codesandbox/nodebox and outvariant versions ([#942](https://github.com/codesandbox/sandpack/issues/942)) ([e20d475](https://github.com/codesandbox/sandpack/commit/e20d475fdd5bd63c6597e4ba9367d7f9c49aa3ff)) + +## [2.6.4](https://github.com/codesandbox/sandpack/compare/v2.6.3...v2.6.4) (2023-05-11) + +### Bug Fixes + +- **runtime-client:** disable loading state by default ([#935](https://github.com/codesandbox/sandpack/issues/935)) ([aee0e3d](https://github.com/codesandbox/sandpack/commit/aee0e3dd76548c43c7439ce353200685ab7f5288)) + +## [2.6.3](https://github.com/codesandbox/sandpack/compare/v2.6.2...v2.6.3) (2023-05-05) + +### Bug Fixes + +- **client:** work around solid refresh bugs ([b11b5c7](https://github.com/codesandbox/sandpack/commit/b11b5c79d1bfbbf0806e68a9ae74eeebb23c58f1)) + +## [2.6.2](https://github.com/codesandbox/sandpack/compare/v2.6.1...v2.6.2) (2023-05-02) + +### Bug Fixes + +- **useClient:** track all clients and update clients on runSandpack ([#923](https://github.com/codesandbox/sandpack/issues/923)) ([a7334ad](https://github.com/codesandbox/sandpack/commit/a7334adfb712abd2342c3fa949f72f201c7ba2c4)) + +# [2.6.0](https://github.com/codesandbox/sandpack/compare/v2.5.0...v2.6.0) (2023-04-11) + +### Features + +- private dep v2 ([#746](https://github.com/codesandbox/sandpack/issues/746)) ([4fef453](https://github.com/codesandbox/sandpack/commit/4fef453b78444d41a4917629545decc091ff3cb6)) + +# [2.5.0](https://github.com/codesandbox/sandpack/compare/v2.4.11...v2.5.0) (2023-04-11) + +### Features + +- **task-manager:** parse commands ([#892](https://github.com/codesandbox/sandpack/issues/892)) ([7b5f25c](https://github.com/codesandbox/sandpack/commit/7b5f25c1355ab290f67b253e9de845825cc8ddb2)) + +## [2.4.9](https://github.com/codesandbox/sandpack/compare/v2.4.8...v2.4.9) (2023-04-10) + +### Bug Fixes + +- **Static Template:** Ensure valid HTML formatting for static template ([#894](https://github.com/codesandbox/sandpack/issues/894)) ([af68579](https://github.com/codesandbox/sandpack/commit/af68579a8cd2177608110d6a5c87006c31d77cd6)) + +## [2.4.7](https://github.com/codesandbox/sandpack/compare/v2.4.6...v2.4.7) (2023-04-08) + +### Bug Fixes + +- **Static Template:** fix doctype injection ([#899](https://github.com/codesandbox/sandpack/issues/899)) ([9d4a1c7](https://github.com/codesandbox/sandpack/commit/9d4a1c70d2353946adc78fea0bd3b900322e7888)) + +## [2.4.5](https://github.com/codesandbox/sandpack/compare/v2.4.4...v2.4.5) (2023-04-07) + +### Bug Fixes + +- **client:** remove buffer dependency ([#891](https://github.com/codesandbox/sandpack/issues/891)) ([307e52b](https://github.com/codesandbox/sandpack/commit/307e52b3fb59fcef4942c27a14dd51326ebbe649)) + +## [2.4.3](https://github.com/codesandbox/sandpack/compare/v2.4.2...v2.4.3) (2023-04-07) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [2.4.0](https://github.com/codesandbox/sandpack/compare/v2.3.2...v2.4.0) (2023-04-06) + +### Features + +- **Static Template:** add hidden head tags option ([#884](https://github.com/codesandbox/sandpack/issues/884)) ([3cee76f](https://github.com/codesandbox/sandpack/commit/3cee76fdd937460e379ddffea52f462c34ed5d36)) + +## [2.3.1](https://github.com/codesandbox/sandpack/compare/v2.3.0...v2.3.1) (2023-04-06) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [2.3.0](https://github.com/codesandbox/sandpack/compare/v2.2.9...v2.3.0) (2023-04-05) + +### Features + +- **Preview:** add startRoute prop to override Provider default ([#868](https://github.com/codesandbox/sandpack/issues/868)) ([bc28871](https://github.com/codesandbox/sandpack/commit/bc288719afd057d8699cf10de13f905bf1dcded9)) + +## [2.2.9](https://github.com/codesandbox/sandpack/compare/v2.2.8...v2.2.9) (2023-04-03) + +### Bug Fixes + +- **static:** Don't crash at inserting runtime ([#878](https://github.com/codesandbox/sandpack/issues/878)) ([7da3346](https://github.com/codesandbox/sandpack/commit/7da3346aa0f79abc24c4ecf51fd7506bbf590dd7)) + +## [2.2.6](https://github.com/codesandbox/sandpack/compare/v2.2.5...v2.2.6) (2023-04-03) + +### Bug Fixes + +- Don't add index logic to StaticSandbox ([#874](https://github.com/codesandbox/sandpack/issues/874)) ([146287b](https://github.com/codesandbox/sandpack/commit/146287b6fc09c6cf6335c1167f1425a3ec636614)) + +## [2.2.4](https://github.com/codesandbox/sandpack/compare/v2.2.3...v2.2.4) (2023-04-01) + +### Bug Fixes + +- **SandpackConsole:** make showHeader flag works ([#867](https://github.com/codesandbox/sandpack/issues/867)) ([54fd641](https://github.com/codesandbox/sandpack/commit/54fd64181e5318c396815ecd58baa1e2316d75a8)) + +## [2.2.1](https://github.com/codesandbox/sandpack/compare/v2.2.0...v2.2.1) (2023-04-01) + +### Bug Fixes + +- **clients:** allow clipboard write ([#864](https://github.com/codesandbox/sandpack/issues/864)) ([7ec95e1](https://github.com/codesandbox/sandpack/commit/7ec95e1dfdbf1d943a6ef063f75dd14650bbba1a)) + +# [2.2.0](https://github.com/codesandbox/sandpack/compare/v2.1.11...v2.2.0) (2023-03-31) + +### Features + +- static template ([#830](https://github.com/codesandbox/sandpack/issues/830)) ([2b14ed2](https://github.com/codesandbox/sandpack/commit/2b14ed226c7fdfe49054c6efe732f7f9f560b23c)) + +## [2.1.9](https://github.com/codesandbox/sandpack/compare/v2.1.8...v2.1.9) (2023-03-17) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [2.1.0](https://github.com/codesandbox/sandpack/compare/v2.0.29...v2.1.0) (2023-03-06) + +### Features + +- Improved loading and restarts ([#805](https://github.com/codesandbox/sandpack/issues/805)) ([1e1dffb](https://github.com/codesandbox/sandpack/commit/1e1dffb451f36b56084a87497e0da77ec6f16e29)) + +## [2.0.29](https://github.com/codesandbox/sandpack/compare/v2.0.28...v2.0.29) (2023-03-05) + +### Reverts + +- **remove outvariant:** remove it as it doesn't support esm ([#801](https://github.com/codesandbox/sandpack/issues/801)) ([dd47b0d](https://github.com/codesandbox/sandpack/commit/dd47b0d1e7811ab72d7ea48ee5c5256a79a69731)) + +## [2.0.28](https://github.com/codesandbox/sandpack/compare/v2.0.27...v2.0.28) (2023-03-05) + +### Bug Fixes + +- **remove outvariant:** remove it as it doesn't support esm ([#800](https://github.com/codesandbox/sandpack/issues/800)) ([3c1faef](https://github.com/codesandbox/sandpack/commit/3c1faefb5d2989c6ba75357ea743dbeb3cf71e5d)) + +## [2.0.26](https://github.com/codesandbox/sandpack/compare/v2.0.25...v2.0.26) (2023-03-02) + +### Bug Fixes + +- **preview:** add stdout for long process ([#792](https://github.com/codesandbox/sandpack/issues/792)) ([4da4d99](https://github.com/codesandbox/sandpack/commit/4da4d997b54beb408d3ec2f15d027090d05879c7)) + +## [2.0.25](https://github.com/codesandbox/sandpack/compare/v2.0.24...v2.0.25) (2023-03-02) + +### Bug Fixes + +- throw error on timeout ([#791](https://github.com/codesandbox/sandpack/issues/791)) ([3c201aa](https://github.com/codesandbox/sandpack/commit/3c201aa1edc0bd16ad7045bd8c6303f7fdeba289)) + +## [2.0.24](https://github.com/codesandbox/sandpack/compare/v2.0.23...v2.0.24) (2023-03-02) + +### Bug Fixes + +- increase preview timeout ([#789](https://github.com/codesandbox/sandpack/issues/789)) ([27fe67b](https://github.com/codesandbox/sandpack/commit/27fe67b986b81eee31f62c134fb08e47e002f7ee)) + +## [2.0.23](https://github.com/codesandbox/sandpack/compare/v2.0.22...v2.0.23) (2023-03-01) + +### Bug Fixes + +- **nodebox:** writeFile recursively ([#783](https://github.com/codesandbox/sandpack/issues/783)) ([9e61ef0](https://github.com/codesandbox/sandpack/commit/9e61ef0518677f2742d9b372a773af133ca4a2e5)) + +## [2.0.21](https://github.com/codesandbox/sandpack/compare/v2.0.20...v2.0.21) (2023-02-28) + +### Bug Fixes + +- **nodebox:** consider new files from Sandpack ([#778](https://github.com/codesandbox/sandpack/issues/778)) ([877222e](https://github.com/codesandbox/sandpack/commit/877222ef649ed741534709c834053eeefce70948)) + +## [2.0.20](https://github.com/codesandbox/sandpack/compare/v2.0.19...v2.0.20) (2023-02-28) + +### Bug Fixes + +- **sandpack-client:** setup build with rollup ([#758](https://github.com/codesandbox/sandpack/issues/758)) ([f645119](https://github.com/codesandbox/sandpack/commit/f6451194a718a0679ce5fcb4d64d1f0d58f6c146)) + +## [2.0.17](https://github.com/codesandbox/sandpack/compare/v2.0.16...v2.0.17) (2023-02-24) + +### Bug Fixes + +- **use-files:** make files reference more stable ([#760](https://github.com/codesandbox/sandpack/issues/760)) ([32ab419](https://github.com/codesandbox/sandpack/commit/32ab419bdd082353408ca2cfb7e2dba6d52caf08)) + +## [2.0.15](https://github.com/codesandbox/sandpack/compare/v2.0.14...v2.0.15) (2023-02-22) + +### Bug Fixes + +- Send serialized console output to parent ([#757](https://github.com/codesandbox/sandpack/issues/757)) ([5865fc5](https://github.com/codesandbox/sandpack/commit/5865fc51ae18a877194bd6832df12d0de86b38e0)) + +## [2.0.13](https://github.com/codesandbox/sandpack/compare/v2.0.12...v2.0.13) (2023-02-22) + +### Bug Fixes + +- **nodebox:** support env vars on commands ([#755](https://github.com/codesandbox/sandpack/issues/755)) ([af8d5c1](https://github.com/codesandbox/sandpack/commit/af8d5c1cfa0d9ef525565ec62c77459d745dfbf2)) + +## [2.0.11](https://github.com/codesandbox/sandpack/compare/v2.0.10...v2.0.11) (2023-02-22) + +### Bug Fixes + +- **sandpack-client:** move console-feed to dev deps ([#747](https://github.com/codesandbox/sandpack/issues/747)) ([bdd1bb7](https://github.com/codesandbox/sandpack/commit/bdd1bb7925f2511aaea594593e3f7f3b7b9c3613)) + +## [2.0.10](https://github.com/codesandbox/sandpack/compare/v2.0.9...v2.0.10) (2023-02-21) + +### Bug Fixes + +- **client:** enable code-splitting and dynamic imports in esbuild ([#741](https://github.com/codesandbox/sandpack/issues/741)) ([0bc9d80](https://github.com/codesandbox/sandpack/commit/0bc9d80f05d2c1bd35f2b74e1a4de96d9ddd4839)) + +## [2.0.8](https://github.com/codesandbox/sandpack/compare/v2.0.7...v2.0.8) (2023-02-20) + +### Bug Fixes + +- **sandpack-client:** fixing package exports ([#737](https://github.com/codesandbox/sandpack/issues/737)) ([e96672a](https://github.com/codesandbox/sandpack/commit/e96672a4abb8f09234126b95bdf0bb641fdbad91)) + +## [2.0.7](https://github.com/codesandbox/sandpack/compare/v2.0.6...v2.0.7) (2023-02-20) + +### Bug Fixes + +- Invalid esm package exports ([#725](https://github.com/codesandbox/sandpack/issues/725)) ([44b05ec](https://github.com/codesandbox/sandpack/commit/44b05ecc5a2d322473f06e8eef8ad49afe3c2d20)), closes [#724](https://github.com/codesandbox/sandpack/issues/724) + +## [2.0.1](https://github.com/codesandbox/sandpack/compare/v1.20.9...v2.0.1) (2023-02-16) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [1.12.1](https://github.com/codesandbox/sandpack/compare/v1.12.0...v1.12.1) (2022-10-04) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [1.10.1](https://github.com/codesandbox/sandpack/compare/v1.10.0...v1.10.1) (2022-10-04) + +### Bug Fixes + +- **templates:** move dependencies to a package json ([#594](https://github.com/codesandbox/sandpack/issues/594)) ([441d5a5](https://github.com/codesandbox/sandpack/commit/441d5a5182f162d343e4ad56cb6321e3e839d984)) + +## [1.8.7](https://github.com/codesandbox/sandpack/compare/v1.8.6...v1.8.7) (2022-09-30) + +### Bug Fixes + +- **files:** normalize paths ([#595](https://github.com/codesandbox/sandpack/issues/595)) ([71a2044](https://github.com/codesandbox/sandpack/commit/71a2044f61ae32f69822f8eefdaae246629ef400)) + +## [1.8.5](https://github.com/codesandbox/sandpack/compare/v1.8.4...v1.8.5) (2022-09-28) + +### Bug Fixes + +- **client-navigation:** make sure iframe is using the right location on refreshing ([#587](https://github.com/codesandbox/sandpack/issues/587)) ([317d456](https://github.com/codesandbox/sandpack/commit/317d456d5b137e795bb6e7bfa86fb92803c5afd3)) + +# [1.7.0](https://github.com/codesandbox/sandpack/compare/v1.6.0...v1.7.0) (2022-08-31) + +### Features + +- **SandpackTests:** Add SandpackTests component ([#562](https://github.com/codesandbox/sandpack/issues/562)) ([1191f82](https://github.com/codesandbox/sandpack/commit/1191f82c643356a3ff5729edc81ef0b501f81edc)) + +## [1.5.4](https://github.com/codesandbox/sandpack/compare/v1.5.3...v1.5.4) (2022-08-22) + +### Bug Fixes + +- **client:** do not set default credentials for custom npm requests ([4ce7be9](https://github.com/codesandbox/sandpack/commit/4ce7be95e771339ebcbdd4868c04d3c4e2cb2d77)) + +## [1.5.3](https://github.com/codesandbox/sandpack/compare/v1.5.2...v1.5.3) (2022-08-22) + +### Bug Fixes + +- **client:** custom registry should include the credentials only for csb urls ([#555](https://github.com/codesandbox/sandpack/issues/555)) ([de1e424](https://github.com/codesandbox/sandpack/commit/de1e424092525f2e9fa013c35ec8c961a4f1ced7)) + +# [1.4.0](https://github.com/codesandbox/sandpack/compare/v1.3.5...v1.4.0) (2022-08-11) + +### Features + +- **custom-setup:** introduce custom npm registries ([#542](https://github.com/codesandbox/sandpack/issues/542)) ([1fd8b99](https://github.com/codesandbox/sandpack/commit/1fd8b997e3e95bc76026e3de1a5c267859d92c82)) + +## [1.3.2](https://github.com/codesandbox/sandpack/compare/v1.3.1...v1.3.2) (2022-07-29) + +### Bug Fixes + +- **client:** update bundler ([bb6d9c1](https://github.com/codesandbox/sandpack/commit/bb6d9c175568b26f51a11b84e44ceba7fcf3d74c)) + +## [1.2.2](https://github.com/codesandbox/sandpack/compare/v1.2.1...v1.2.2) (2022-06-29) + +### Bug Fixes + +- **codeeditor:** test-id should not be included in the bundler ([#521](https://github.com/codesandbox/sandpack/issues/521)) ([bf9cc21](https://github.com/codesandbox/sandpack/commit/bf9cc21827b69374914f416e03f06832d444af24)) + +## [1.2.1](https://github.com/codesandbox/sandpack/compare/v1.2.0...v1.2.1) (2022-06-27) + +### Bug Fixes + +- **global-listeners:** doesn't unsubscribe all listener unexpectedly ([#516](https://github.com/codesandbox/sandpack/issues/516)) ([7e65f6e](https://github.com/codesandbox/sandpack/commit/7e65f6ef3df52dfcd30be4181257ad3dadbfac53)) + +## [1.1.6](https://github.com/codesandbox/sandpack/compare/v1.1.5...v1.1.6) (2022-06-20) + +### Bug Fixes + +- **client/react:** make Template more accessible and do a deep equal on react context ([#504](https://github.com/codesandbox/sandpack/issues/504)) ([31980f8](https://github.com/codesandbox/sandpack/commit/31980f86e40d4cd09e586eaa004df8073e02d6e0)) + +## [1.1.3](https://github.com/codesandbox/sandpack/compare/v1.1.2...v1.1.3) (2022-06-07) + +### Bug Fixes + +- **file-explorer:** adds property not to show hidden files ([#488](https://github.com/codesandbox/sandpack/issues/488)) ([1048fe9](https://github.com/codesandbox/sandpack/commit/1048fe93b7f3be2d54cd9d35ac64271e1ea613fe)) + +# [1.1.0](https://github.com/codesandbox/sandpack/compare/v1.0.4...v1.1.0) (2022-05-31) + +### Features + +- **client:** refactor iFrame fs protocol ([#483](https://github.com/codesandbox/sandpack/issues/483)) ([28f93d0](https://github.com/codesandbox/sandpack/commit/28f93d05b978ae59655d4c574a1393ce4b9d6e53)) + +## [1.0.4](https://github.com/codesandbox/sandpack/compare/v1.0.3...v1.0.4) (2022-05-27) + +### Bug Fixes + +- **release-script:** trigger release ([#480](https://github.com/codesandbox/sandpack/issues/480)) ([46890fd](https://github.com/codesandbox/sandpack/commit/46890fdc6748f997cad38a39860b573869af1c60)) + +## [1.0.2](https://github.com/codesandbox/sandpack/compare/v1.0.1...v1.0.2) (2022-05-26) + +### Bug Fixes + +- **package registry:** trigger deploy ([#475](https://github.com/codesandbox/sandpack/issues/475)) ([551c7c0](https://github.com/codesandbox/sandpack/commit/551c7c08898e5a49ceae36572b3e16bff5e9d64c)) + +# [1.0.0](https://github.com/codesandbox/sandpack/compare/v0.19.10...v1.0.0) (2022-05-25) + +### Features + +- **react/client:** BREAKING CHANGES ([#375](https://github.com/codesandbox/sandpack/issues/375)) ([20a8993](https://github.com/codesandbox/sandpack/commit/20a899337343e35a8d8e0b4e00c42e7190625747)) + +## [0.19.9](https://github.com/codesandbox/sandpack/compare/v0.19.8...v0.19.9) (2022-05-23) + +### Bug Fixes + +- **client:** console message methods ([1b76dcf](https://github.com/codesandbox/sandpack/commit/1b76dcf5ccfd0db61cda8d70329424cdf27116ad)) + +## [0.19.8](https://github.com/codesandbox/sandpack/compare/v0.19.7...v0.19.8) (2022-05-23) + +### Bug Fixes + +- **sandpack messages:** add console type ([3edcb4d](https://github.com/codesandbox/sandpack/commit/3edcb4d11238f47ecbc286a8535205579856d3f3)) + +## [0.19.1](https://github.com/codesandbox/sandpack/compare/v0.19.0...v0.19.1) (2022-04-26) + +### Bug Fixes + +- **client:** update bundler version ([#450](https://github.com/codesandbox/sandpack/issues/450)) ([1b6a663](https://github.com/codesandbox/sandpack/commit/1b6a663d8d7ff0bf3c3449b4aa0bfd675e37a221)) + +# [0.19.0](https://github.com/codesandbox/sandpack/compare/v0.18.2...v0.19.0) (2022-04-21) + +### Features + +- **template:** add solidjs (beta) ([#447](https://github.com/codesandbox/sandpack/issues/447)) ([7b03882](https://github.com/codesandbox/sandpack/commit/7b038827add0001b460af7574e12e4c664a075d2)) + +# [0.18.0](https://github.com/codesandbox/sandpack/compare/v0.17.1...v0.18.0) (2022-03-31) + +### Features + +- file-resolver protocol error handling ([#427](https://github.com/codesandbox/sandpack/issues/427)) ([c3b3cca](https://github.com/codesandbox/sandpack/commit/c3b3cca98ca4aba2c0744545969683e41d963ab4)) + +# [0.17.0](https://github.com/codesandbox/sandpack/compare/v0.16.1...v0.17.0) (2022-03-30) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.16.1](https://github.com/codesandbox/sandpack/compare/v0.16.0...v0.16.1) (2022-03-29) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.16.0](https://github.com/codesandbox/sandpack/compare/v0.15.2...v0.16.0) (2022-03-27) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.15.2](https://github.com/codesandbox/sandpack/compare/v0.15.1...v0.15.2) (2022-03-18) + +### Bug Fixes + +- **loglevel:** set default ([#418](https://github.com/codesandbox/sandpack/issues/418)) ([abf0243](https://github.com/codesandbox/sandpack/commit/abf0243e5f106888ac3829daa6a5e6d6dd4f41b5)) + +# [0.15.0](https://github.com/codesandbox/sandpack/compare/v0.14.9...v0.15.0) (2022-03-16) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.14.8](https://github.com/codesandbox/sandpack/compare/v0.14.7...v0.14.8) (2022-03-11) + +### Bug Fixes + +- **client:** prevent add route into the main page browser history ([#407](https://github.com/codesandbox/sandpack/issues/407)) ([1e5230a](https://github.com/codesandbox/sandpack/commit/1e5230af5dff6c9afec8a96d1b9281cc585a826d)) + +## [0.14.4](https://github.com/codesandbox/sandpack/compare/v0.14.3...v0.14.4) (2022-03-07) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.14.0](https://github.com/codesandbox/sandpack/compare/v0.13.15...v0.14.0) (2022-02-18) + +### Features + +- add loglevel to sandpack opts ([#378](https://github.com/codesandbox/sandpack/issues/378)) ([a3216e8](https://github.com/codesandbox/sandpack/commit/a3216e8f4940373df87e938148632e46cb661b4f)) + +## [0.13.15](https://github.com/codesandbox/sandpack/compare/v0.13.14...v0.13.15) (2022-02-11) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.13.7](https://github.com/codesandbox/sandpack/compare/v0.13.6...v0.13.7) (2022-01-26) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.13.5](https://github.com/codesandbox/sandpack/compare/v0.13.4...v0.13.5) (2022-01-21) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.13.0](https://github.com/codesandbox/sandpack/compare/v0.12.0...v0.13.0) (2022-01-14) + +### Features + +- **files:** read-only mode ([#300](https://github.com/codesandbox/sandpack/issues/300)) ([9d5d1bf](https://github.com/codesandbox/sandpack/commit/9d5d1bfc3ac0d21d57958ee61057a706762701f2)) + +# [0.12.0](https://github.com/codesandbox/sandpack/compare/v0.11.0...v0.12.0) (2022-01-11) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.11.0](https://github.com/codesandbox/sandpack/compare/v0.10.12...v0.11.0) (2022-01-11) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.10.11](https://github.com/codesandbox/sandpack/compare/v0.10.10...v0.10.11) (2022-01-05) + +### Bug Fixes + +- **react-devtools:** legacy mode ([#272](https://github.com/codesandbox/sandpack/issues/272)) ([4891ba4](https://github.com/codesandbox/sandpack/commit/4891ba4bdf5ad8ed1aed1f6a37cc4b8e5a94b8e2)) + +## [0.10.3](https://github.com/codesandbox/sandpack/compare/v0.10.2...v0.10.3) (2021-12-14) + +### Bug Fixes + +- lint errors ([#234](https://github.com/codesandbox/sandpack/issues/234)) ([2d51830](https://github.com/codesandbox/sandpack/commit/2d518309cfd86222078fde25d399ea12258b3493)) + +# [0.10.0](https://github.com/codesandbox/sandpack/compare/v0.9.14...v0.10.0) (2021-12-09) + +### Features + +- **react:** react devtool ([#236](https://github.com/codesandbox/sandpack/issues/236)) ([a67e1b2](https://github.com/codesandbox/sandpack/commit/a67e1b2ccfc38b01ad78d2d7f518148cf94eb15d)) + +## [0.9.13](https://github.com/codesandbox/sandpack/compare/v0.9.12...v0.9.13) (2021-12-08) + +### Bug Fixes + +- **client:** support reactdevtools ([7f0373f](https://github.com/codesandbox/sandpack/commit/7f0373f328d60229904bbebab0329718616b59bb)) + +## [0.9.9](https://github.com/codesandbox/sandpack/compare/v0.9.8...v0.9.9) (2021-12-03) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.9.8](https://github.com/codesandbox/sandpack/compare/v0.9.7...v0.9.8) (2021-12-02) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.9.0](https://github.com/codesandbox/sandpack/compare/v0.8.0...v0.9.0) (2021-11-25) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.8.0](https://github.com/codesandbox/sandpack/compare/v0.7.3...v0.8.0) (2021-11-25) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.7.1](https://github.com/codesandbox/sandpack/compare/v0.7.0...v0.7.1) (2021-11-24) + +### Bug Fixes + +- **bundler:** make sure transpiled files are cut ([ef11a7c](https://github.com/codesandbox/sandpack/commit/ef11a7c5178e6d41200ed0b4aa157c6c73096eba)) + +# [0.7.0](https://github.com/codesandbox/sandpack/compare/v0.6.0...v0.7.0) (2021-11-23) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.6.0](https://github.com/codesandbox/sandpack/compare/v0.5.4...v0.6.0) (2021-11-22) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.5.0](https://github.com/codesandbox/sandpack/compare/v0.4.1...v0.5.0) (2021-11-19) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.4.0](https://github.com/codesandbox/sandpack/compare/v0.3.10...v0.4.0) (2021-11-18) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.3.7](https://github.com/codesandbox/sandpack/compare/v0.3.6...v0.3.7) (2021-11-16) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.3.3](https://github.com/codesandbox/sandpack/compare/v0.3.2...v0.3.3) (2021-11-15) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.3.2](https://github.com/codesandbox/sandpack/compare/v0.3.1...v0.3.2) (2021-11-15) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.3.0](https://github.com/codesandbox/sandpack/compare/v0.2.3...v0.3.0) (2021-11-15) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +# [0.2.0](https://github.com/codesandbox/sandpack/compare/v0.1.20...v0.2.0) (2021-11-10) + +### Features + +- **template:** add react typescript ([#114](https://github.com/codesandbox/sandpack/issues/114)) ([96aaac8](https://github.com/codesandbox/sandpack/commit/96aaac86afc2287a1e96fa95a9836d156a4bc9de)) + +## [0.1.20](https://github.com/codesandbox/sandpack/compare/v0.1.19...v0.1.20) (2021-11-08) + +### Bug Fixes + +- **codemirror:** upgrade dependencies ([#125](https://github.com/codesandbox/sandpack/issues/125)) ([7cbf7f1](https://github.com/codesandbox/sandpack/commit/7cbf7f1aa8f07b4826eb8ebbeb1ca5d868b5c4df)) + +## [0.1.19](https://github.com/codesandbox/sandpack/compare/v0.1.18...v0.1.19) (2021-11-04) + +### Bug Fixes + +- **bundler:** reduce retry count for jsdelivr if it fails to load ([0712fe1](https://github.com/codesandbox/sandpack/commit/0712fe16ec25df8ca420e3e36c22742711ec2d0b)) + +## [0.1.18](https://github.com/codesandbox/sandpack/compare/v0.1.17...v0.1.18) (2021-11-04) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.1.17](https://github.com/codesandbox/sandpack/compare/v0.1.16...v0.1.17) (2021-11-04) + +**Note:** Version bump only for package @codesandbox/sandpack-client + +## [0.1.16](https://github.com/codesandbox/sandpack/compare/v0.1.15...v0.1.16) (2021-11-03) + +**Note:** Version bump only for package @codesandbox/sandpack-client diff --git a/sandpack-environments/README.md b/sandpack-environments/README.md new file mode 100644 index 000000000..aae84a5f8 --- /dev/null +++ b/sandpack-environments/README.md @@ -0,0 +1,26 @@ +Component toolkit for live running code editing experiences + +# Sandpack client + +This is a small foundation package that sits on top of the bundler. It is +framework agnostic and facilitates the handshake between your context and the bundler iframe. + +```js +import { loadSandpackClient } from "@codesandbox/sandpack-client"; + +const main = async () => { + const client = await loadSandpackClient("#preview", { + files: { + "/index.js": { + code: `console.log(require('uuid'))`, + }, + }, + entry: "/index.js", + dependencies: { + uuid: "latest", + }, + }); +} +``` + +[Read more](https://sandpack.codesandbox.io/docs/advanced-usage/client) diff --git a/sandpack-environments/babel.config.js b/sandpack-environments/babel.config.js new file mode 100644 index 000000000..89a4577b9 --- /dev/null +++ b/sandpack-environments/babel.config.js @@ -0,0 +1,7 @@ +module.exports = { + presets: [ + ["@babel/preset-env", { targets: { node: "current" } }], + "@babel/preset-react", + "@babel/preset-typescript", + ], +}; diff --git a/sandpack-environments/gulpfile.js b/sandpack-environments/gulpfile.js new file mode 100644 index 000000000..660ce8d69 --- /dev/null +++ b/sandpack-environments/gulpfile.js @@ -0,0 +1,51 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const del = require("del"); +const gulp = require("gulp"); +var Transform = require("stream").Transform; + +function removeSourcemaps() { + var transformStream = new Transform({ objectMode: true }); + + transformStream._transform = function (file, encoding, callback) { + if (file.isNull()) { + return callback(null, file); + } + + if (file.isStream()) { + return callback(": Streams not supported!", undefined); + } + + let contents = file.contents.toString(encoding); + + const lines = contents.split("\n"); + const lastLine = lines[lines.length - 1]; + if (lastLine.startsWith("//# sourceMappingURL=")) { + lines.pop(); + } + + contents = lines.join("\n"); + + file.contents = Buffer.from(contents, encoding); + + callback(null, file); + }; + + return transformStream; +} + +const dist = "./sandpack/"; +const paths = process.env.CI + ? ["../bundler/**/!(*.map)", "!../bundler/public/**"] + : [ + "../../codesandbox-client/www/**/!(*.map)", + "!../../codesandbox-client/www/public/**", + ]; + +const remove = () => del(dist); +const copyFolder = () => + gulp + .src(paths, { matchBase: true }) + .pipe(removeSourcemaps()) + .pipe(gulp.dest(dist)); + +exports["default"] = gulp.series(remove, copyFolder); diff --git a/sandpack-environments/package.json b/sandpack-environments/package.json new file mode 100644 index 000000000..9c5aee6d8 --- /dev/null +++ b/sandpack-environments/package.json @@ -0,0 +1,69 @@ +{ + "name": "@codesandbox/sandpack-environments", + "version": "0.1.0", + "description": "", + "keywords": [], + "repository": { + "type": "git", + "url": "https://github.com/codesandbox/sandpack" + }, + "license": "Apache-2.0", + "author": "CodeSandbox", + "sideEffects": false, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + "./clients/runtime": { + "types": "./dist/clients/runtime/index.d.ts", + "import": "./dist/clients/runtime/index.mjs", + "require": "./dist/clients/runtime/index.js" + }, + "./clients/static": { + "types": "./dist/clients/static/index.d.ts", + "import": "./dist/clients/static/index.mjs", + "require": "./dist/clients/static/index.js" + }, + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + } + }, + "scripts": { + "clean": "rm -rf dist sandpack src/clients/node/inject-scripts/dist", + "prebuild": "yarn run clean", + "test": "jest .", + "lint": "eslint '**/*.ts?(x)' --fix", + "build": "rollup -c --bundleConfigAsCjs", + "build:publish": "yarn build && gulp", + "build:bundler": "gulp", + "format": "prettier --write '**/*.{ts,tsx,js,jsx}'", + "format:check": "prettier --check '**/*.{ts,tsx}'", + "dev": "yarn build -- --watch", + "typecheck": "tsc --noEmit --skipLibCheck" + }, + "files": [ + "dist", + "esm", + "sandpack", + "package.json", + "README.md" + ], + "dependencies": { + "@codesandbox/sdk": "^0.11.1", + "buffer": "^6.0.3", + "dequal": "^2.0.2", + "mime-db": "^1.54.0", + "outvariant": "1.4.0", + "static-browser-server": "1.0.3" + }, + "devDependencies": { + "@types/mime-db": "^1.43.5", + "@types/node": "^9.3.0", + "console-feed": "3.3.0", + "del": "^6.0.0", + "gulp": "^4.0.2", + "typescript": "^5.2.2" + } +} diff --git a/sandpack-environments/rollup.config.js b/sandpack-environments/rollup.config.js new file mode 100644 index 000000000..4721e24b1 --- /dev/null +++ b/sandpack-environments/rollup.config.js @@ -0,0 +1,70 @@ +import commonjs from "@rollup/plugin-commonjs"; +import { nodeResolve } from "@rollup/plugin-node-resolve"; +import replace from "@rollup/plugin-replace"; +import terser from "@rollup/plugin-terser"; +import typescript from "@rollup/plugin-typescript"; +import { string } from "rollup-plugin-string"; + +import pkg from "./package.json"; + +const configs = [ + { + input: "src/inject-scripts/consoleHook.ts", + output: { + file: "src/inject-scripts/dist/consoleHook.js", + format: "es", + }, + plugins: [ + typescript({ + tsconfig: "./tsconfig.json", + compilerOptions: { declaration: false }, + }), + commonjs(), + nodeResolve(), + terser({ compress: { passes: 2 } }), + ], + external: [], + }, + + { + input: { + index: "src/index.ts", + "clients/static/index": "src/clients/static/index.ts", + }, + output: [ + { + dir: "dist", + format: "cjs", + }, + { + dir: "dist", + chunkFileNames: "[name]-[hash].mjs", + entryFileNames: "[name].mjs", + format: "es", + }, + ], + + plugins: [ + typescript({ + tsconfig: "./tsconfig.json", + compilerOptions: { declaration: true, declarationDir: "dist" }, + }), + string({ include: "**/dist/consoleHook.js" }), + replace({ + preventAssignment: true, + values: { + global: "globalThis", + "process.env.CODESANDBOX_ENV": `"${process.env.CODESANDBOX_ENV}"`, + "process.env.PACKAGE_VERSION": `"${pkg.version}"`, + }, + }), + ], + external: Object.keys({ + ...(pkg.dependencies || {}), + ...(pkg.devDependencies || {}), + ...(pkg.peerDependencies || {}), + }).concat("@codesandbox/sdk/browser"), + }, +]; + +export default configs; diff --git a/sandpack-environments/src/InMemoryFileSystem.ts b/sandpack-environments/src/InMemoryFileSystem.ts new file mode 100644 index 000000000..7648296f2 --- /dev/null +++ b/sandpack-environments/src/InMemoryFileSystem.ts @@ -0,0 +1,299 @@ +import type { FileContent } from "./sandpack-bundler-types"; +import type { SandpackFileSystem } from "./types"; +import { normalizePath } from "./utils"; + +interface Directory { + name: string; + path: string; + files: Set; + subdirectories: Set; +} + +export class InMemoryFileSystem implements SandpackFileSystem { + private files: Record = {}; + private directories: Record = {}; + private watchers: Record void>> = {}; + private globalWatchers: Set<() => void> = new Set(); + + constructor() { + // Initialize root directory + this.directories["/"] = { + name: "/", + path: "/", + files: new Set(), + subdirectories: new Set(), + }; + } + + private ensureDirectoryExists(path: string): void { + const normalizedPath = normalizePath(path); + if (normalizedPath === "/") return; // Root always exists + + const parts = normalizedPath.split("/").filter(Boolean); + let currentPath = "/"; + + // Create parent directories if they don't exist + for (let i = 0; i < parts.length; i++) { + const dirName = parts[i]; + const nextPath = `${currentPath}${dirName}/`; + + if (!this.directories[nextPath]) { + this.directories[nextPath] = { + name: dirName, + path: nextPath, + files: new Set(), + subdirectories: new Set(), + }; + + // Add to parent's subdirectories + this.directories[currentPath].subdirectories.add(nextPath); + } + + currentPath = nextPath; + } + } + + private getDirectoryForFile(filePath: string): string { + const normalizedPath = normalizePath(filePath); + const lastSlashIndex = normalizedPath.lastIndexOf("/"); + if (lastSlashIndex <= 0) return "/"; // Root directory + return normalizedPath.substring(0, lastSlashIndex + 1); + } + + async writeFile(path: string, content: string) { + const normalizedPath = normalizePath(path); + const dirPath = this.getDirectoryForFile(normalizedPath); + + // Ensure parent directory exists + this.ensureDirectoryExists(dirPath); + + // Add file to directory + this.directories[dirPath].files.add(normalizedPath); + + // Store file content + this.files[normalizedPath] = content; + + // Notify watchers + if (this.watchers[normalizedPath]) { + this.watchers[normalizedPath].forEach((callback) => callback()); + } + + // Notify global watchers + this.notifyGlobalWatchers(); + } + + async readFile(path: string) { + const normalizedPath = normalizePath(path); + if (!this.files[normalizedPath]) { + throw new Error(`ENOENT: no such file '${path}'`); + } + return this.files[normalizedPath]; + } + + async readDirectory(path: string) { + const normalizedPath = normalizePath(path); + const directoryPath = normalizedPath.endsWith("/") + ? normalizedPath + : `${normalizedPath}/`; + + if (!this.directories[directoryPath]) { + throw new Error(`ENOENT: no such directory '${path}'`); + } + + const directory = this.directories[directoryPath]; + + // Get file entries + const fileEntries = Array.from(directory.files).map((filePath) => { + const parts = filePath.split("/"); + return { + name: parts[parts.length - 1], + type: "file" as const, + }; + }); + + // Get directory entries + const dirEntries = Array.from(directory.subdirectories).map((dirPath) => { + // Remove trailing slash and get the last part + const name = dirPath.endsWith("/") ? dirPath.slice(0, -1) : dirPath; + const parts = name.split("/"); + return { + name: parts[parts.length - 1], + type: "directory" as const, + }; + }); + + return [...fileEntries, ...dirEntries]; + } + + async createDirectory(path: string): Promise { + const normalizedPath = normalizePath(path); + const directoryPath = normalizedPath.endsWith("/") + ? normalizedPath + : `${normalizedPath}/`; + + this.ensureDirectoryExists(directoryPath); + + // Notify watchers + if (this.watchers[directoryPath]) { + this.watchers[directoryPath].forEach((callback) => callback()); + } + + // Notify global watchers + this.notifyGlobalWatchers(); + } + + async deleteDirectory(path: string): Promise { + const normalizedPath = normalizePath(path); + const directoryPath = normalizedPath.endsWith("/") + ? normalizedPath + : `${normalizedPath}/`; + + if (!this.directories[directoryPath]) { + return; // Directory doesn't exist, nothing to delete + } + + // Get all files in this directory and subdirectories + const filesToDelete = this.getAllFilesInDirectory(directoryPath); + + // Delete all files + for (const filePath of filesToDelete) { + delete this.files[filePath]; + + // Notify watchers + if (this.watchers[filePath]) { + this.watchers[filePath].forEach((callback) => callback()); + } + } + + // Delete from parent's subdirectories + const parentPath = this.getParentDirectoryPath(directoryPath); + if (parentPath && this.directories[parentPath]) { + this.directories[parentPath].subdirectories.delete(directoryPath); + } + + // Delete the directory and all subdirectories + const dirsToDelete = this.getAllSubdirectories(directoryPath); + for (const dirPath of dirsToDelete) { + delete this.directories[dirPath]; + + // Notify watchers + if (this.watchers[dirPath]) { + this.watchers[dirPath].forEach((callback) => callback()); + } + } + + // Notify global watchers + this.notifyGlobalWatchers(); + } + + private getAllFilesInDirectory(dirPath: string): string[] { + const result: string[] = []; + const dir = this.directories[dirPath]; + + if (!dir) return result; + + // Add direct files + result.push(...Array.from(dir.files)); + + // Add files from subdirectories + for (const subdir of dir.subdirectories) { + result.push(...this.getAllFilesInDirectory(subdir)); + } + + return result; + } + + private getAllSubdirectories(dirPath: string): string[] { + const result: string[] = [dirPath]; + const dir = this.directories[dirPath]; + + if (!dir) return result; + + // Add subdirectories recursively + for (const subdir of dir.subdirectories) { + result.push(...this.getAllSubdirectories(subdir)); + } + + return result; + } + + private getParentDirectoryPath(dirPath: string): string | null { + if (dirPath === "/") return null; // Root has no parent + + const parts = dirPath.split("/").filter(Boolean); + if (parts.length === 0) return null; + + parts.pop(); // Remove last part + return parts.length === 0 ? "/" : `/${parts.join("/")}/`; + } + + async deleteFile(path: string): Promise { + const normalizedPath = normalizePath(path); + + if (!this.files[normalizedPath]) { + return; // File doesn't exist, nothing to delete + } + + // Remove from directory + const dirPath = this.getDirectoryForFile(normalizedPath); + if (this.directories[dirPath]) { + this.directories[dirPath].files.delete(normalizedPath); + } + + // Delete file + delete this.files[normalizedPath]; + + // Notify watchers + if (this.watchers[normalizedPath]) { + this.watchers[normalizedPath].forEach((callback) => callback()); + } + + // Notify global watchers + this.notifyGlobalWatchers(); + } + + private notifyGlobalWatchers(): void { + this.globalWatchers.forEach((callback) => callback()); + } + + watch(callback: () => void): () => void { + this.globalWatchers.add(callback); + + // Return unwatch function + return () => { + this.globalWatchers.delete(callback); + }; + } + + watchDirectory(path: string, callback: () => void): () => void { + const normalizedPath = normalizePath(path); + if (!this.watchers[normalizedPath]) { + this.watchers[normalizedPath] = new Set(); + } + + this.watchers[normalizedPath].add(callback); + + return () => { + this.watchers[normalizedPath].delete(callback); + }; + } + + dispose() { + // Clean up watchers + for (const path in this.watchers) { + this.watchers[path].clear(); + } + + this.watchers = {}; + this.globalWatchers.clear(); + this.files = {}; + this.directories = { + "/": { + name: "/", + path: "/", + files: new Set(), + subdirectories: new Set(), + }, + }; + } +} diff --git a/sandpack-environments/src/clients/bundler/BundlerPreview.ts b/sandpack-environments/src/clients/bundler/BundlerPreview.ts new file mode 100644 index 000000000..b23b7c979 --- /dev/null +++ b/sandpack-environments/src/clients/bundler/BundlerPreview.ts @@ -0,0 +1,463 @@ +import type { InMemoryFileSystem } from "../../InMemoryFileSystem"; +import type { + SandpackPreviewMessage, + SandpackPreviewStatus, +} from "../../types"; + +import Protocol from "./file-resolver-protocol"; +import { IFrameProtocol } from "./iframe-protocol.js"; +import { EXTENSIONS_MAP } from "./mime"; +import type { + IPreviewRequestMessage, + IPreviewResponseMessage, + ListenerFunction, + Modules, + SandpackBundlerFile, + SandpackBundlerFiles, + UnsubscribeFunction, +} from "./types"; +import { + CHANNEL_NAME, + SandpackLogLevel, + type BundlerState, + type SandpackError, + type SandpackMessage, +} from "./types"; +import { + addPackageJSONIfNeeded, + createError, + createPackageJSON, + extractErrorDetails, + getExtension, + getTemplate, + readAllFiles, +} from "./utils"; + +import type { SandpackBundlerEnvironmentOptions } from "./index"; + +const SUFFIX_PLACEHOLDER = "-{{suffix}}"; + +const BUNDLER_URL = + process.env.CODESANDBOX_ENV === "development" + ? "http://localhost:3000/" + : `https://${process.env.PACKAGE_VERSION?.replace( + /\./g, + "-" + )}${SUFFIX_PLACEHOLDER}-sandpack.codesandbox.io/`; + +export class SandpackBundlerPreview { + private disposers = new Set<() => void>(); + private iframeMessageSubscribers = new Set< + (message: SandpackPreviewMessage) => void + >(); + private statusSubscribers = new Set< + (status: SandpackPreviewStatus) => void + >(); + private iframe: HTMLIFrameElement; + private bundlerURL: string; + private bundlerState?: BundlerState; + private errors: SandpackError[] = []; + private _status: SandpackPreviewStatus = { + current: "LOADING", + progress: [], + }; + get status() { + return this._status; + } + set status(newStatus) { + this._status = newStatus; + this.statusSubscribers.forEach((subscriber) => { + subscriber(newStatus); + }); + } + private fileResolverProtocol?: Protocol; + private iframeProtocol: IFrameProtocol; + constructor( + iframe: HTMLIFrameElement, + private options: SandpackBundlerEnvironmentOptions, + private fs: InMemoryFileSystem + ) { + this.bundlerURL = this.createBundlerURL(); + this.iframe = this.configureIframe(iframe); + this.iframeProtocol = this.configureIframeProtocol(); + this.setLocationURLIntoIFrame(); + } + private createBundlerURL() { + let bundlerURL = this.options.bundlerURL || BUNDLER_URL; + + // if it's a custom, skip the rest + if (this.options.bundlerURL) { + return bundlerURL; + } + + if (this.options.teamId) { + bundlerURL = + bundlerURL.replace("https://", "https://" + this.options.teamId + "-") + + `?cache=${Date.now()}`; + } + + if (this.options.experimental_enableServiceWorker) { + const suffixes: string[] = []; + suffixes.push(Math.random().toString(36).slice(4)); + + bundlerURL = bundlerURL.replace( + SUFFIX_PLACEHOLDER, + `-${ + this.options.experimental_stableServiceWorkerId ?? suffixes.join("-") + }` + ); + } else { + bundlerURL = bundlerURL.replace(SUFFIX_PLACEHOLDER, ""); + } + + return bundlerURL; + } + + private configureIframeProtocol() { + const iframeProtocol = new IFrameProtocol(this.iframe, this.bundlerURL); + + this.disposers.add( + iframeProtocol.globalListen((mes: SandpackMessage) => { + if (mes.type !== "initialized" || !this.iframe.contentWindow) { + return; + } + + iframeProtocol.register(); + + if (this.options.fileResolver) { + this.fileResolverProtocol = new Protocol( + "fs", + async (data) => { + if (data.method === "isFile") { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return this.options.fileResolver!.isFile(data.params[0]); + } else if (data.method === "readFile") { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return this.options.fileResolver!.readFile(data.params[0]); + } else { + throw new Error("Method not supported"); + } + }, + this.iframeProtocol + ); + } + + this.updateSandbox(); + }) + ); + + this.disposers.add( + iframeProtocol.channelListen((mes: SandpackMessage) => { + switch (mes.type) { + case "start": { + this.errors = []; + this.status = { + current: "LOADING", + progress: [], + }; + break; + } + case "status": { + if (this.status.current === "LOADING") { + this.status.progress.push(mes.status); + } + break; + } + case "action": { + if (mes.action === "show-error") { + this.errors = [...this.errors, extractErrorDetails(mes)]; + } + break; + } + case "done": { + this.status = { + current: "READY", + }; + break; + } + case "state": { + this.bundlerState = mes.state; + break; + } + } + }) + ); + + if (this.options.experimental_enableServiceWorker) { + this.serviceWorkerHandshake(); + } + + return iframeProtocol; + } + + setLocationURLIntoIFrame(): void { + const urlSource = this.options.startRoute + ? new URL(this.options.startRoute, this.bundlerURL).toString() + : this.bundlerURL; + + this.iframe.contentWindow?.location.replace(urlSource); + this.iframe.src = urlSource; + } + + private configureIframe(iframe: HTMLIFrameElement) { + if (!iframe.getAttribute("sandbox")) { + iframe.setAttribute( + "sandbox", + "allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts allow-downloads allow-pointer-lock" + ); + + iframe.setAttribute( + "allow", + "accelerometer; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; clipboard-read; clipboard-write; xr-spatial-tracking;" + ); + } + + return iframe; + } + + private serviceWorkerHandshake() { + const channel = new MessageChannel(); + + const iframeContentWindow = this.iframe.contentWindow; + if (!iframeContentWindow) { + throw new Error("Could not get iframe contentWindow"); + } + + const port = channel.port1; + port.onmessage = (evt: MessageEvent) => { + if (typeof evt.data === "object" && evt.data.$channel === CHANNEL_NAME) { + switch (evt.data.$type) { + case "preview/ready": + // no op for now + break; + case "preview/request": + this.handleWorkerRequest(evt.data, port); + + break; + } + } + }; + + const sendMessage = () => { + const initMsg = { + $channel: CHANNEL_NAME, + $type: "preview/init", + }; + + iframeContentWindow.postMessage(initMsg, "*", [channel.port2]); + + this.iframe.removeEventListener("load", sendMessage); + }; + + this.iframe.addEventListener("load", sendMessage); + } + + public getTranspiledFiles = (): Promise< + Array<{ path: string; code: string }> + > => { + return new Promise((resolve) => { + const unsubscribe = this.listen((message) => { + if (message.type === "all-modules") { + resolve(message.data); + + unsubscribe(); + } + }); + + this.dispatch({ type: "get-modules" }); + }); + }; + + private async getFiles(): Promise { + const files = await readAllFiles(this.fs, "/", {}); + + if (files["/package.json"] === undefined) { + return addPackageJSONIfNeeded( + files, + this.options.dependencies, + this.options.devDependencies, + this.options.entry + ); + } + + return files; + } + + private async handleWorkerRequest( + request: IPreviewRequestMessage, + port: MessagePort + ) { + const notFound = () => { + const responseMessage: IPreviewResponseMessage = { + $channel: CHANNEL_NAME, + $type: "preview/response", + id: request.id, + headers: { + "Content-Type": "text/html; charset=utf-8", + }, + status: 404, + body: "File not found", + }; + + port.postMessage(responseMessage); + }; + try { + const filepath = new URL(request.url, this.bundlerURL).pathname; + + const headers: Record = {}; + + const files = await this.getFiles(); + let file = files[filepath]; + + if (!file) { + const modulesFromManager = await this.getTranspiledFiles(); + + file = modulesFromManager.find((item) => + item.path.endsWith(filepath) + ) as SandpackBundlerFile; + + if (!file) { + notFound(); + return; + } + } + + const body = file.code; + + if (!headers["Content-Type"]) { + const extension = getExtension(filepath); + const foundMimetype = EXTENSIONS_MAP.get(extension); + if (foundMimetype) { + headers["Content-Type"] = foundMimetype; + } + } + + const responseMessage: IPreviewResponseMessage = { + $channel: CHANNEL_NAME, + $type: "preview/response", + id: request.id, + headers, + status: 200, + body, + }; + + port.postMessage(responseMessage); + } catch (err) { + console.error(err); + notFound(); + } + } + + public dispatch(message: SandpackMessage): void { + /** + * Intercept "refresh" dispatch: this will make sure + * that the iframe is still in the location it's supposed to be. + * External links inside the iframe will change the location and + * prevent the user from navigating back. + */ + if (message.type === "refresh") { + this.setLocationURLIntoIFrame(); + + if (this.options.experimental_enableServiceWorker) { + this.serviceWorkerHandshake(); + } + } + + this.iframeProtocol.dispatch(message); + } + + public listen(listener: ListenerFunction): UnsubscribeFunction { + return this.iframeProtocol.channelListen(listener); + } + + onStatusChange( + callback: (status: SandpackPreviewStatus) => void + ): () => void { + this.statusSubscribers.add(callback); + return () => { + this.statusSubscribers.delete(callback); + }; + } + + async updateSandbox() { + const files = await this.getFiles(); + + const modules: Modules = Object.keys(files).reduce( + (prev, next) => ({ + ...prev, + [next]: { + code: files[next].code, + path: next, + }, + }), + {} + ); + + let packageJSON = JSON.parse( + createPackageJSON( + this.options.dependencies, + this.options.devDependencies, + this.options.entry + ) + ); + try { + packageJSON = JSON.parse(files["/package.json"].code); + } catch (e) { + console.error( + createError( + "could not parse package.json file: " + (e as Error).message + ) + ); + } + + // TODO move this to a common format + const normalizedModules = Object.keys(files).reduce( + (prev, next) => ({ + ...prev, + [next]: { + content: files[next].code, + path: next, + }, + }), + {} + ); + + const payload = { + ...this.options, + type: "compile", + codesandbox: true, + version: 3, + isInitializationCompile: true, + modules, + reactDevTools: this.options.reactDevTools, + externalResources: this.options.externalResources || [], + hasFileResolver: Boolean(this.options.fileResolver), + disableDependencyPreprocessing: + this.options.disableDependencyPreprocessing, + experimental_enableServiceWorker: + this.options.experimental_enableServiceWorker, + template: + this.options.template || getTemplate(packageJSON, normalizedModules), + showOpenInCodeSandbox: this.options.showOpenInCodeSandbox ?? true, + showErrorScreen: this.options.showErrorScreen ?? true, + showLoadingScreen: this.options.showLoadingScreen ?? false, + skipEval: this.options.skipEval || false, + clearConsoleDisabled: !this.options.clearConsoleOnFirstCompile, + logLevel: this.options.logLevel ?? SandpackLogLevel.Info, + customNpmRegistries: this.options.customNpmRegistries, + teamId: this.options.teamId, + sandboxId: this.options.sandboxId, + } as any; + + console.log({ payload }); + + this.dispatch(payload); + } + + dispose(): void { + this.disposers.forEach((dispose) => { + dispose(); + }); + this.disposers.clear(); + } +} diff --git a/sandpack-environments/src/clients/bundler/file-resolver-protocol.ts b/sandpack-environments/src/clients/bundler/file-resolver-protocol.ts new file mode 100644 index 000000000..51af7e225 --- /dev/null +++ b/sandpack-environments/src/clients/bundler/file-resolver-protocol.ts @@ -0,0 +1,58 @@ +/** + * This file is a copy of the resolver from the `codesandbox-api` package. + * We wanted to avoid to reference codesandbox-api because of the code that runs on load in the package. + * The plan is to take some time and refactor codesandbox-api into what it was supposed to be in the first place, + * an abstraction over the actions that can be dispatched between the bundler and the iframe. + */ + +import type { IFrameProtocol } from "./iframe-protocol"; +import type { + UnsubscribeFunction, + ProtocolRequestMessage, + ProtocolResultMessage, + ProtocolErrorMessage, +} from "./types"; + +export default class Protocol { + private _disposeMessageListener: UnsubscribeFunction; + + constructor( + private type: string, + private handleMessage: (message: ProtocolRequestMessage) => any, + private protocol: IFrameProtocol + ) { + this._disposeMessageListener = this.protocol.channelListen( + async (msg: any) => { + if (msg.type === this.getTypeId() && msg.method) { + const message = msg as ProtocolRequestMessage; + try { + const result = await this.handleMessage(message); + const response: ProtocolResultMessage = { + type: this.getTypeId(), + msgId: message.msgId, + result: result, + }; + this.protocol.dispatch(response as any); + } catch (err: any) { + const response: ProtocolErrorMessage = { + type: this.getTypeId(), + msgId: message.msgId, + error: { + message: err.message, + }, + }; + this.protocol.dispatch(response as any); + } + } + } + ); + } + + getTypeId() { + return `protocol-${this.type}`; + } + + public dispose() { + this._disposeMessageListener(); + } +} diff --git a/sandpack-environments/src/clients/bundler/iframe-protocol.ts b/sandpack-environments/src/clients/bundler/iframe-protocol.ts new file mode 100644 index 000000000..74691f312 --- /dev/null +++ b/sandpack-environments/src/clients/bundler/iframe-protocol.ts @@ -0,0 +1,135 @@ +import type { + ListenerFunction, + SandpackMessage, + UnsubscribeFunction, +} from "./types"; + +export class IFrameProtocol { + private get frameWindow() { + return this.iframe.contentWindow; + } + private origin: string; + + // React to messages from any iframe + private globalListeners: Record = {}; + private globalListenersCount = 0; + + // React to messages from the iframe owned by this instance + public channelListeners: Record = {}; + private channelListenersCount = 0; + + // Random number to identify this instance of the client when messages are coming from multiple iframes + readonly channelId: number = Math.floor(Math.random() * 1000000); + + constructor(private iframe: HTMLIFrameElement, origin: string) { + this.origin = origin; + this.globalListeners = []; + this.channelListeners = []; + + this.eventListener = this.eventListener.bind(this); + + if (typeof window !== "undefined") { + window.addEventListener("message", this.eventListener); + } + } + + cleanup(): void { + window.removeEventListener("message", this.eventListener); + this.globalListeners = {}; + this.channelListeners = {}; + this.globalListenersCount = 0; + this.channelListenersCount = 0; + } + + // Sends the channelId and triggers an iframeHandshake promise to resolve, + // so the iframe can start listening for messages (based on the id) + register(): void { + if (!this.frameWindow) { + return; + } + + this.frameWindow.postMessage( + { + type: "register-frame", + origin: document.location.origin, + id: this.channelId, + }, + this.origin + ); + } + + // Messages are dispatched from the client directly to the instance iframe + dispatch(message: SandpackMessage): void { + if (!this.frameWindow) { + return; + } + + this.frameWindow.postMessage( + { + $id: this.channelId, + codesandbox: true, + ...message, + }, + this.origin + ); + } + + // Add a listener that is called on any message coming from an iframe in the page + // This is needed for the `initialize` message which comes without a channelId + globalListen(listener: ListenerFunction): UnsubscribeFunction { + if (typeof listener !== "function") { + return (): void => { + return; + }; + } + + const listenerId = this.globalListenersCount; + this.globalListeners[listenerId] = listener; + this.globalListenersCount++; + return (): void => { + delete this.globalListeners[listenerId]; + }; + } + + // Add a listener that is called on any message coming from an iframe with the instance channelId + // All other messages (eg: from other iframes) are ignored + channelListen(listener: ListenerFunction): UnsubscribeFunction { + if (typeof listener !== "function") { + return (): void => { + return; + }; + } + + const listenerId = this.channelListenersCount; + this.channelListeners[listenerId] = listener; + this.channelListenersCount++; + return (): void => { + delete this.channelListeners[listenerId]; + }; + } + + // Handles message windows coming from iframes + private eventListener(evt: MessageEvent): void { + // skip events originating from different iframes + if (evt.source !== this.frameWindow) { + return; + } + + const message = evt.data; + if (!message.codesandbox) { + return; + } + + Object.values(this.globalListeners).forEach((listener) => + listener(message) + ); + + if (message.$id !== this.channelId) { + return; + } + + Object.values(this.channelListeners).forEach((listener) => + listener(message) + ); + } +} diff --git a/sandpack-environments/src/clients/bundler/index.ts b/sandpack-environments/src/clients/bundler/index.ts new file mode 100644 index 000000000..26e79da36 --- /dev/null +++ b/sandpack-environments/src/clients/bundler/index.ts @@ -0,0 +1,131 @@ +import { InMemoryFileSystem } from "../../InMemoryFileSystem.js"; +import type { + SandpackEnvironment, + SandpackEnvironmentStatus, + SandpackPreview, + SandpackPreviewMessage, + SandpackPreviewStatus, +} from "../../types"; +import { debounce } from "../../utils"; + +import { SandpackBundlerPreview } from "./BundlerPreview.js"; +import type { + FileResolver, + NpmRegistry, + ReactDevToolsMode, + SandpackLogLevel, + SandpackTemplate, +} from "./types.js"; + +export interface SandpackBundlerEnvironmentOptions { + teamId?: string; + experimental_enableServiceWorker?: boolean; + experimental_stableServiceWorkerId?: string; + bundlerURL?: string; + externalResources?: string[]; + fileResolver?: FileResolver; + startRoute?: string; + dependencies?: Record; + devDependencies?: Record; + autorun?: boolean; + autoReload?: boolean; + recompileMode?: "immediate" | "delayed"; + recompileDelay?: number; + id?: string; + bundlerTimeOut?: number; + entry?: string; + reactDevTools?: ReactDevToolsMode; + disableDependencyPreprocessing?: boolean; + template?: SandpackTemplate; + showOpenInCodeSandbox?: boolean; + showErrorScreen?: boolean; + showLoadingScreen?: boolean; + skipEval?: boolean; + clearConsoleOnFirstCompile?: boolean; + logLevel?: SandpackLogLevel; + customNpmRegistries?: NpmRegistry[]; + sandboxId?: string; +} + +export class SandpackBundlerEnvironment implements SandpackEnvironment { + readonly type = "bundler"; + private previews = new Map(); + private statusSubscribers = new Set< + (status: SandpackEnvironmentStatus) => void + >(); + status: SandpackEnvironmentStatus = { + current: "LOADING", + progress: [], + }; + fs = new InMemoryFileSystem(); + + constructor(private options: SandpackBundlerEnvironmentOptions) { + this.fs.watch( + debounce(() => { + this.previews.forEach((preview) => { + preview.updateSandbox(); + }); + }, 10) + ); + } + + restart() { + // TODO + } + + onStatusChange( + callback: (status: SandpackEnvironmentStatus) => void + ): () => void { + this.statusSubscribers.add(callback); + return () => { + this.statusSubscribers.delete(callback); + }; + } + + createPreview(): SandpackPreview { + const iframe = document.createElement("iframe"); + const staticPreview = new SandpackBundlerPreview( + iframe, + this.options, + this.fs + ); + + this.previews.set(iframe, staticPreview); + + return { + iframe, + get status() { + return staticPreview.status; + }, + onStatusChange(subscriber: (status: SandpackPreviewStatus) => void) { + return staticPreview.onStatusChange(subscriber); + }, + onMessage(subscriber: (message: SandpackPreviewMessage) => void) { + return () => { + // Coming soon + }; + }, + back() { + // TODO + }, + forward() { + // TODO + }, + refresh() { + // TODO + }, + dispose: () => { + this.previews.delete(iframe); + staticPreview.dispose(); + }, + }; + } + + public dispose() { + this.fs.dispose(); + this.previews.forEach((preview) => { + preview.dispose(); + }); + this.previews.clear(); + } +} diff --git a/sandpack-environments/src/clients/bundler/mime.ts b/sandpack-environments/src/clients/bundler/mime.ts new file mode 100644 index 000000000..b0384bab7 --- /dev/null +++ b/sandpack-environments/src/clients/bundler/mime.ts @@ -0,0 +1,22 @@ +import mimeDB from "mime-db"; + +const extensionMap = new Map(); +const entries = Object.entries(mimeDB); +for (const [mimetype, entry] of entries) { + // eslint-disable-next-line + // @ts-ignore + if (!entry.extensions) { + continue; + } + + // eslint-disable-next-line + // @ts-ignore + const extensions = entry.extensions as string[]; + if (extensions.length) { + for (const ext of extensions) { + extensionMap.set(ext, mimetype); + } + } +} + +export const EXTENSIONS_MAP = extensionMap; diff --git a/sandpack-environments/src/clients/bundler/types.ts b/sandpack-environments/src/clients/bundler/types.ts new file mode 100644 index 000000000..272366727 --- /dev/null +++ b/sandpack-environments/src/clients/bundler/types.ts @@ -0,0 +1,433 @@ +export interface SandpackError { + message: string; + line?: number; + column?: number; + path?: string; + title?: string; +} + +export interface Module { + code: string; + path: string; +} + +export type Modules = Record< + string, + { + code: string; + path: string; + } +>; + +export interface ModuleSource { + fileName: string; + compiledCode: string; + sourceMap: unknown | undefined; +} + +export interface TranspiledModule { + module: Module; + query: string; + source: ModuleSource | undefined; + assets: Record; + isEntry: boolean; + isTestFile: boolean; + childModules: string[]; + /** + * All extra modules emitted by the loader + */ + emittedAssets: ModuleSource[]; + initiators: string[]; + dependencies: string[]; + asyncDependencies: string[]; + transpilationDependencies: string[]; + transpilationInitiators: string[]; +} + +export interface BundlerState { + entry: string; + transpiledModules: Record; +} + +export type ClientStatus = + | "initializing" + | "installing-dependencies" + | "transpiling" + | "evaluating" + | "running-tests" + | "idle" + | "done"; + +export interface ErrorStackFrame { + columnNumber: number; + fileName: string; + functionName: string; + lineNumber: number; + _originalColumnNumber: number; + _originalFileName: string; + _originalFunctionName: string; + _originalLineNumber: number; + _originalScriptCode: Array<{ + lineNumber: number; + content: string; + highlight: boolean; + }>; +} + +export interface SandpackErrorMessage { + title: string; + path: string; + message: string; + line: number; + column: number; + payload: { + frames?: ErrorStackFrame[]; + }; +} + +export interface NpmRegistry { + enabledScopes: string[]; + limitToScopes: boolean; + registryUrl: string; + /** + * It must be `false` if you're providing a sef-host solution, + * otherwise, it'll try to proxy from CodeSandbox Proxy + */ + proxyEnabled: boolean; + registryAuthToken?: string; +} + +export enum SandpackLogLevel { + None = 0, + Error = 10, + Warning = 20, + Info = 30, + Debug = 40, +} + +export type ReactDevToolsMode = "latest" | "legacy"; + +export type SandpackTemplate = + | "angular-cli" + | "create-react-app" + | "create-react-app-typescript" + | "svelte" + | "parcel" + | "vue-cli" + | "static" + | "solid" + | "nextjs"; + +export type SandpackMessageConsoleMethods = + | "log" + | "debug" + | "info" + | "warn" + | "error" + | "table" + | "clear" + | "time" + | "timeEnd" + | "count" + | "assert"; + +type TestStatus = "running" | "pass" | "fail"; + +export type TestError = Error & { + matcherResult?: boolean; + mappedErrors?: Array<{ + fileName: string; + _originalFunctionName: string; + _originalColumnNumber: number; + _originalLineNumber: number; + _originalScriptCode: Array<{ + lineNumber: number; + content: string; + highlight: boolean; + }> | null; + }>; +}; + +export interface Test { + name: string; + blocks: string[]; + status: TestStatus; + path: string; + errors: TestError[]; + duration?: number | undefined; +} + +export type ListenerFunction = (msg: SandpackMessage) => void; +export type UnsubscribeFunction = () => void; + +export interface FileResolver { + isFile: (path: string) => Promise; + readFile: (path: string) => Promise; +} + +export interface BaseProtocolMessage { + type: string; + msgId: string; +} + +export interface ProtocolErrorMessage extends BaseProtocolMessage { + error: { + message: string; + }; +} + +export interface ProtocolResultMessage extends BaseProtocolMessage { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + result: any; +} + +export interface ProtocolRequestMessage extends BaseProtocolMessage { + method: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + params: any[]; +} + +export type SandboxTestMessage = + | RunAllTests + | RunTests + | ClearJestErrors + | ({ type: "test" } & ( + | InitializedTestsMessage + | TestCountMessage + | TotalTestStartMessage + | TotalTestEndMessage + | AddFileMessage + | RemoveFileMessage + | FileErrorMessage + | DescribeStartMessage + | DescribeEndMessage + | AddTestMessage + | TestStartMessage + | TestEndMessage + )); + +interface InitializedTestsMessage { + event: "initialize_tests"; +} + +interface ClearJestErrors { + type: "action"; + action: "clear-errors"; + source: "jest"; + path: string; +} + +interface TestCountMessage { + event: "test_count"; + count: number; +} + +interface TotalTestStartMessage { + event: "total_test_start"; +} + +interface TotalTestEndMessage { + event: "total_test_end"; +} + +interface AddFileMessage { + event: "add_file"; + path: string; +} + +interface RemoveFileMessage { + event: "remove_file"; + path: string; +} + +interface FileErrorMessage { + event: "file_error"; + path: string; + error: TestError; +} + +interface DescribeStartMessage { + event: "describe_start"; + blockName: string; +} + +interface DescribeEndMessage { + event: "describe_end"; +} + +interface AddTestMessage { + event: "add_test"; + testName: string; + path: string; +} + +interface TestStartMessage { + event: "test_start"; + test: Test; +} + +interface TestEndMessage { + event: "test_end"; + test: Test; +} + +interface RunAllTests { + type: "run-all-tests"; +} + +interface RunTests { + type: "run-tests"; + path: string; +} + +export interface BaseSandpackMessage { + type: string; + $id?: number; + codesandbox?: boolean; +} + +export type SandpackMessage = BaseSandpackMessage & + ( + | { + type: "initialized"; + } + | { + type: "start"; + firstLoad?: boolean; + } + | { + type: "status"; + status: ClientStatus; + } + | { + type: "state"; + state: BundlerState; + } + | { + type: "success"; + } + | ({ + type: "action"; + action: "show-error"; + } & SandpackErrorMessage) + | { + type: "action"; + action: "notification"; + notificationType: "error"; + title: string; + } + | { + type: "done"; + compilatonError: boolean; + } + | { + type: "urlchange"; + url: string; + back: boolean; + forward: boolean; + } + | { + type: "resize"; + height: number; + } + | { + type: "transpiler-context"; + data: Record>; + } + | { + type: "compile"; + version: number; + isInitializationCompile?: boolean; + modules: Modules; + externalResources: string[]; + hasFileResolver: boolean; + disableDependencyPreprocessing?: boolean; + experimental_enableServiceWorker?: boolean; + experimental_stableServiceWorkerId?: string; + template?: string | SandpackTemplate; + showOpenInCodeSandbox: boolean; + showErrorScreen: boolean; + showLoadingScreen: boolean; + skipEval: boolean; + clearConsoleDisabled?: boolean; + reactDevTools?: ReactDevToolsMode; + logLevel?: SandpackLogLevel; + customNpmRegistries?: NpmRegistry[]; + teamId?: string; + sandboxId?: string; + } + | { + type: "refresh"; + } + | { + type: "urlback"; + } + | { + type: "urlforward"; + } + | { + type: "get-transpiler-context"; + } + | { type: "get-modules" } + | { type: "all-modules"; data: Array<{ path: string; code: string }> } + | { + type: "activate-react-devtools"; + } + | { + type: "console"; + log: Array<{ + method: SandpackMessageConsoleMethods; + id: string; + data: string[]; + }>; + } + | SandboxTestMessage + | { type: "sign-in"; teamId: string } + | { type: "sign-out" } + | { + type: "dependencies"; + data: + | { + state: "downloading_manifest"; + } + | { + state: "downloaded_module"; + name: string; + total: number; + progress: number; + } + | { + state: "starting"; + }; + } + ); + +export interface SandpackBundlerFile { + code: string; + hidden?: boolean; + active?: boolean; + readOnly?: boolean; +} + +export type SandpackBundlerFiles = Record; + +export type Dependencies = Record; + +export const CHANNEL_NAME = "$CSB_RELAY"; + +export interface IPreviewRequestMessage { + $channel: typeof CHANNEL_NAME; + $type: "preview/request"; + id: string; + method: string; + url: string; +} + +export interface IPreviewResponseMessage { + $channel: typeof CHANNEL_NAME; + $type: "preview/response"; + id: string; + status: number; + headers: Record; + body: string | Uint8Array; +} diff --git a/sandpack-environments/src/clients/bundler/utils.ts b/sandpack-environments/src/clients/bundler/utils.ts new file mode 100644 index 000000000..a70779f2d --- /dev/null +++ b/sandpack-environments/src/clients/bundler/utils.ts @@ -0,0 +1,437 @@ +import { invariant } from "outvariant"; + +import type { SandpackFileSystem } from "../../types"; + +import type { + SandpackBundlerFiles, + Dependencies, + SandpackErrorMessage, + SandpackError, + ErrorStackFrame, +} from "./types"; + +export const createError = (message: string): string => + `[sandpack-client]: ${message}`; + +export function nullthrows(value?: T | null, err = "Value is nullish"): T { + invariant(value != null, createError(err)); + + return value; +} + +const DEPENDENCY_ERROR_MESSAGE = `"dependencies" was not specified - provide either a package.json or a "dependencies" value`; +const ENTRY_ERROR_MESSAGE = `"entry" was not specified - provide either a package.json with the "main" field or an "entry" value`; + +export function createPackageJSON( + dependencies: Dependencies = {}, + devDependencies: Dependencies = {}, + entry = "/index.js" +): string { + return JSON.stringify( + { + name: "sandpack-project", + main: entry, + dependencies, + devDependencies, + }, + null, + 2 + ); +} + +export function addPackageJSONIfNeeded( + files: SandpackBundlerFiles, + dependencies?: Dependencies, + devDependencies?: Dependencies, + entry?: string +): SandpackBundlerFiles { + const normalizedFilesPath = normalizePath(files); + + const packageJsonFile = normalizedFilesPath["/package.json"]; + + /** + * Create a new package json + */ + if (!packageJsonFile) { + normalizedFilesPath["/package.json"] = { + code: createPackageJSON(dependencies, devDependencies, entry), + }; + + return normalizedFilesPath; + } + + /** + * Merge package json with custom setup + */ + if (packageJsonFile) { + const packageJsonContent = JSON.parse(packageJsonFile.code); + + nullthrows( + !(!dependencies && !packageJsonContent.dependencies), + ENTRY_ERROR_MESSAGE + ); + + if (dependencies) { + packageJsonContent.dependencies = { + ...(packageJsonContent.dependencies ?? {}), + ...(dependencies ?? {}), + }; + } + + if (devDependencies) { + packageJsonContent.devDependencies = { + ...(packageJsonContent.devDependencies ?? {}), + ...(devDependencies ?? {}), + }; + } + + if (entry) { + packageJsonContent.main = entry; + } + + normalizedFilesPath["/package.json"] = { + code: JSON.stringify(packageJsonContent, null, 2), + }; + } + + return normalizedFilesPath; +} + +export function extractErrorDetails(msg: SandpackErrorMessage): SandpackError { + if (msg.title === "SyntaxError") { + const { title, path, message, line, column } = msg; + return { title, path, message, line, column }; + } + + const relevantStackFrame = getRelevantStackFrame(msg.payload?.frames); + if (!relevantStackFrame) { + return { message: msg.message }; + } + + const errorInCode = getErrorInOriginalCode(relevantStackFrame); + const errorLocation = getErrorLocation(relevantStackFrame); + const errorMessage = formatErrorMessage( + relevantStackFrame._originalFileName, + msg.message, + errorLocation, + errorInCode + ); + + return { + message: errorMessage, + title: msg.title, + path: relevantStackFrame._originalFileName, + line: relevantStackFrame._originalLineNumber, + column: relevantStackFrame._originalColumnNumber, + }; +} + +function getRelevantStackFrame( + frames?: ErrorStackFrame[] +): ErrorStackFrame | undefined { + if (!frames) { + return; + } + + return frames.find((frame) => !!frame._originalFileName); +} + +function getErrorLocation(errorFrame: ErrorStackFrame): string { + return errorFrame + ? ` (${errorFrame._originalLineNumber}:${errorFrame._originalColumnNumber})` + : ``; +} + +function getErrorInOriginalCode(errorFrame: ErrorStackFrame): string { + const lastScriptLine = + errorFrame._originalScriptCode[errorFrame._originalScriptCode.length - 1]; + const numberOfLineNumberCharacters = + lastScriptLine.lineNumber.toString().length; + + const leadingCharacterOffset = 2; + const barSeparatorCharacterOffset = 3; + const extraLineLeadingSpaces = + leadingCharacterOffset + + numberOfLineNumberCharacters + + barSeparatorCharacterOffset + + errorFrame._originalColumnNumber; + + return errorFrame._originalScriptCode.reduce((result, scriptLine) => { + const leadingChar = scriptLine.highlight ? ">" : " "; + const lineNumber = + scriptLine.lineNumber.toString().length === numberOfLineNumberCharacters + ? `${scriptLine.lineNumber}` + : ` ${scriptLine.lineNumber}`; + + const extraLine = scriptLine.highlight + ? "\n" + " ".repeat(extraLineLeadingSpaces) + "^" + : ""; + + return ( + result + // accumulator + "\n" + + leadingChar + // > or " " + " " + + lineNumber + // line number on equal number of characters + " | " + + scriptLine.content + // code + extraLine // line under the highlighed line to show the column index + ); + }, ""); +} + +function formatErrorMessage( + filePath: string, + message: string, + location: string, + errorInCode: string +): string { + return `${filePath}: ${message}${location} +${errorInCode}`; +} + +/* eslint-disable @typescript-eslint/no-explicit-any */ +export const normalizePath = (path: R): R => { + if (typeof path === "string") { + return (path.startsWith("/") ? path : `/${path}`) as R; + } + + if (Array.isArray(path)) { + return path.map((p) => (p.startsWith("/") ? p : `/${p}`)) as R; + } + + if (typeof path === "object" && path !== null) { + return Object.entries(path as any).reduce( + (acc, [key, content]: [string, string | any]) => { + const fileName = key.startsWith("/") ? key : `/${key}`; + + acc[fileName] = content; + + return acc; + }, + {} + ); + } + + return null as R; +}; +const MAX_CLIENT_DEPENDENCY_COUNT = 50; + +interface PackageJSON { + dependencies?: Dependencies; + devDependencies?: Dependencies; +} + +export function getTemplate( + pkg: PackageJSON | null, + /* eslint-disable @typescript-eslint/no-explicit-any */ + modules: any +): string | undefined { + if (!pkg) { + return "static"; + } + + const { dependencies = {}, devDependencies = {} } = pkg; + + const totalDependencies = [ + ...Object.keys(dependencies), + ...Object.keys(devDependencies), + ]; + const moduleNames = Object.keys(modules); + + const adonis = ["@adonisjs/framework", "@adonisjs/core"]; + + if (totalDependencies.some((dep) => adonis.indexOf(dep) > -1)) { + return "adonis"; + } + + const nuxt = ["nuxt", "nuxt-edge", "nuxt-ts", "nuxt-ts-edge", "nuxt3"]; + + if (totalDependencies.some((dep) => nuxt.indexOf(dep) > -1)) { + return "nuxt"; + } + + if (totalDependencies.indexOf("next") > -1) { + return "next"; + } + + const apollo = [ + "apollo-server", + "apollo-server-express", + "apollo-server-hapi", + "apollo-server-koa", + "apollo-server-lambda", + "apollo-server-micro", + ]; + + if (totalDependencies.some((dep) => apollo.indexOf(dep) > -1)) { + return "apollo"; + } + + if (totalDependencies.indexOf("mdx-deck") > -1) { + return "mdx-deck"; + } + + if (totalDependencies.indexOf("gridsome") > -1) { + return "gridsome"; + } + + if (totalDependencies.indexOf("vuepress") > -1) { + return "vuepress"; + } + + if (totalDependencies.indexOf("ember-cli") > -1) { + return "ember"; + } + + if (totalDependencies.indexOf("sapper") > -1) { + return "sapper"; + } + + if (totalDependencies.indexOf("gatsby") > -1) { + return "gatsby"; + } + + if (totalDependencies.indexOf("quasar") > -1) { + return "quasar"; + } + + if (totalDependencies.indexOf("@docusaurus/core") > -1) { + return "docusaurus"; + } + + if (totalDependencies.indexOf("remix") > -1) { + return "remix"; + } + + if (totalDependencies.indexOf("astro") > -1) { + return "node"; + } + + // CLIENT + + if (moduleNames.some((m) => m.endsWith(".re"))) { + return "reason"; + } + + const parcel = ["parcel-bundler", "parcel"]; + if (totalDependencies.some((dep) => parcel.indexOf(dep) > -1)) { + return "parcel"; + } + + const dojo = ["@dojo/core", "@dojo/framework"]; + if (totalDependencies.some((dep) => dojo.indexOf(dep) > -1)) { + return "@dojo/cli-create-app"; + } + if ( + totalDependencies.indexOf("@nestjs/core") > -1 || + totalDependencies.indexOf("@nestjs/common") > -1 + ) { + return "nest"; + } + + if (totalDependencies.indexOf("react-styleguidist") > -1) { + return "styleguidist"; + } + + if (totalDependencies.indexOf("react-scripts") > -1) { + return "create-react-app"; + } + + if (totalDependencies.indexOf("react-scripts-ts") > -1) { + return "create-react-app-typescript"; + } + + if (totalDependencies.indexOf("@angular/core") > -1) { + return "angular-cli"; + } + + if (totalDependencies.indexOf("preact-cli") > -1) { + return "preact-cli"; + } + + if ( + totalDependencies.indexOf("@sveltech/routify") > -1 || + totalDependencies.indexOf("@roxi/routify") > -1 + ) { + return "node"; + } + + if (totalDependencies.indexOf("vite") > -1) { + return "node"; + } + + if (totalDependencies.indexOf("@frontity/core") > -1) { + return "node"; + } + + if (totalDependencies.indexOf("svelte") > -1) { + return "svelte"; + } + + if (totalDependencies.indexOf("vue") > -1) { + return "vue-cli"; + } + + if (totalDependencies.indexOf("cx") > -1) { + return "cxjs"; + } + + const nodeDeps = [ + "express", + "koa", + "nodemon", + "ts-node", + "@tensorflow/tfjs-node", + "webpack-dev-server", + "snowpack", + ]; + if (totalDependencies.some((dep) => nodeDeps.indexOf(dep) > -1)) { + return "node"; + } + + if (Object.keys(dependencies).length >= MAX_CLIENT_DEPENDENCY_COUNT) { + // The dependencies are too much for client sandboxes to handle + return "node"; + } + + return undefined; +} + +export function getExtension(filepath: string): string { + const parts = filepath.split("."); + if (parts.length <= 1) { + return ""; + } else { + const ext = parts[parts.length - 1]; + return ext; + } +} + +export async function readAllFiles( + fs: SandpackFileSystem, + directoryPath: string, + files: SandpackBundlerFiles +) { + const entries = await fs.readDirectory(directoryPath); + + await Promise.all( + entries.map(async (entry) => { + const fullPath = + directoryPath === "/" + ? directoryPath + entry.name + : directoryPath + "/" + entry.name; + if (entry.type === "directory") { + return readAllFiles(fs, fullPath, files); + } + + const code = await fs.readFile(fullPath); + + if (typeof code === "string") { + files[fullPath] = { code }; + } + }) + ); + + return files; +} diff --git a/sandpack-environments/src/clients/static/StaticPreview.ts b/sandpack-environments/src/clients/static/StaticPreview.ts new file mode 100644 index 000000000..23dd96332 --- /dev/null +++ b/sandpack-environments/src/clients/static/StaticPreview.ts @@ -0,0 +1,240 @@ +import type { FileContent } from "static-browser-server"; +import { PreviewController } from "static-browser-server"; + +import type { InMemoryFileSystem } from "../../InMemoryFileSystem.js"; +// @ts-expect-error // get the bundled file, which contains all dependencies +import consoleHook from "../../inject-scripts/dist/consoleHook.js"; +import type { SandpackBundlerMessages } from "../../sandpack-bundler-types"; +import type { + SandpackPreviewMessage, + SandpackPreviewStatus, +} from "../../types"; + +import { + generateRandomId, + insertHtmlAfterRegex, + readBuffer, + validateHtml, +} from "./utils"; + +import type { SandpackStaticEnvironmentOptions } from "./index.js"; + +export class SandpackStaticPreview { + private disposers = new Set<() => void>(); + private iframeMessageSubscribers = new Set< + (message: SandpackPreviewMessage) => void + >(); + private statusSubscribers = new Set< + (status: SandpackPreviewStatus) => void + >(); + private previewController: PreviewController; + private iframe: HTMLIFrameElement; + private _status: SandpackPreviewStatus = { + current: "READY", + }; + get status() { + return this._status; + } + set status(newStatus) { + this._status = newStatus; + this.statusSubscribers.forEach((subscriber) => { + subscriber(newStatus); + }); + } + constructor( + iframe: HTMLIFrameElement, + private options: SandpackStaticEnvironmentOptions, + private fs: InMemoryFileSystem + ) { + this.previewController = this.createPreviewController(); + this.iframe = this.configureIframe(iframe); + } + // Handles message windows coming from iframes + private onIframeMessage(evt: MessageEvent): void { + const message = evt.data; + if (!message.codesandbox) { + return; + } + + // TODO: Dispatch urlchange? + // this.dispatch(message); + + this.iframeMessageSubscribers.forEach((subscriber) => { + subscriber(message); + }); + } + + private configureIframe(iframe: HTMLIFrameElement) { + if (!iframe.getAttribute("sandbox")) { + iframe.setAttribute( + "sandbox", + "allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts allow-downloads allow-pointer-lock" + ); + + iframe.setAttribute( + "allow", + "accelerometer; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; clipboard-read; clipboard-write; xr-spatial-tracking;" + ); + } + + if (typeof window !== "undefined") { + const listener = (evt: MessageEvent) => { + // skip events originating from different iframes + if (evt.source !== this.iframe.contentWindow) { + return; + } + this.onIframeMessage(evt); + }; + + window.addEventListener("message", listener); + + this.disposers.add(() => { + window.removeEventListener("message", listener); + }); + } + + return iframe; + } + + private createPreviewController() { + return new PreviewController({ + baseUrl: + this.options.bundlerURL ?? + "https://preview.sandpack-static-server.codesandbox.io", + // filepath is always normalized to start with / and not end with a slash + getFileContent: async (filepath) => { + let content = await this.fs.readFile(filepath); + + if (!content) { + throw new Error("File not found"); + } + if (filepath.endsWith(".html") || filepath.endsWith(".htm")) { + try { + content = validateHtml(content); + content = this.injectProtocolScript(content); + content = this.injectExternalResources( + content, + this.options.externalResources + ); + content = this.injectScriptIntoHead(content, { + script: consoleHook, + scope: { channelId: generateRandomId() }, + }); + } catch (err) { + console.error("Runtime injection failed", err); + } + } + return content; + }, + }); + } + + private injectContentIntoHead( + content: FileContent, + contentToInsert: string + ): FileContent { + // Make it a string + content = readBuffer(content); + + // Inject script + content = + insertHtmlAfterRegex(/]*>/g, content, "\n" + contentToInsert) ?? + contentToInsert + "\n" + content; + + return content; + } + + private injectProtocolScript(content: FileContent): FileContent { + const scriptToInsert = ``; + + return this.injectContentIntoHead(content, scriptToInsert); + } + + private injectExternalResources( + content: FileContent, + externalResources: string[] = [] + ): FileContent { + const tagsToInsert = externalResources + .map((resource) => { + const match = resource.match(/\.([^.]*)$/); + const fileType = match?.[1]; + + if (fileType === "css" || resource.includes("fonts.googleapis")) { + return ``; + } + + if (fileType === "js") { + return ``; + } + + throw new Error( + `Unable to determine file type for external resource: ${resource}` + ); + }) + .join("\n"); + + return this.injectContentIntoHead(content, tagsToInsert); + } + + private injectScriptIntoHead( + content: FileContent, + opts: { + script: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + scope?: { channelId: string } & Record; + } + ): FileContent { + const { script, scope = {} } = opts; + const scriptToInsert = ` + + `.trim(); + + return this.injectContentIntoHead(content, scriptToInsert); + } + + onMessage(callback: (message: SandpackPreviewMessage) => void): () => void { + this.iframeMessageSubscribers.add(callback); + return () => { + this.iframeMessageSubscribers.delete(callback); + }; + } + + onStatusChange( + callback: (status: SandpackPreviewStatus) => void + ): () => void { + this.statusSubscribers.add(callback); + return () => { + this.statusSubscribers.delete(callback); + }; + } + + async compile(): Promise { + const previewUrl = await this.previewController.initPreview(); + this.iframe.setAttribute("src", previewUrl); + + this.sendBundlerMessage({ type: "done", compilatonError: false }); + this.sendBundlerMessage({ + type: "urlchange", + url: previewUrl, + back: false, + forward: false, + }); + } + + sendBundlerMessage(message: SandpackBundlerMessages): void { + this.iframe.contentWindow?.postMessage(message, "*"); + } + + dispose(): void { + // TODO: Dispose of the preview + } +} diff --git a/sandpack-environments/src/clients/static/index.ts b/sandpack-environments/src/clients/static/index.ts new file mode 100644 index 000000000..e1fc935ed --- /dev/null +++ b/sandpack-environments/src/clients/static/index.ts @@ -0,0 +1,97 @@ +import { InMemoryFileSystem } from "../../InMemoryFileSystem.js"; +import type { + SandpackEnvironment, + SandpackEnvironmentStatus, + SandpackPreview, + SandpackPreviewMessage, + SandpackPreviewStatus, +} from "../../types"; +import { debounce } from "../../utils"; + +import { SandpackStaticPreview } from "./StaticPreview.js"; + +export interface SandpackStaticEnvironmentOptions { + bundlerURL?: string; + externalResources?: string[]; +} + +export class SandpackStaticEnvironment implements SandpackEnvironment { + readonly type = "static"; + private previews = new Map(); + private statusSubscribers = new Set< + (status: SandpackEnvironmentStatus) => void + >(); + status: SandpackEnvironmentStatus = { + current: "LOADING", + progress: [], + }; + fs = new InMemoryFileSystem(); + + constructor(private options: SandpackStaticEnvironmentOptions) { + this.fs.watch( + debounce(() => { + this.previews.forEach((preview) => { + preview.compile(); + }); + }, 10) + ); + } + + restart() { + // TODO + } + + onStatusChange( + callback: (status: SandpackEnvironmentStatus) => void + ): () => void { + this.statusSubscribers.add(callback); + return () => { + this.statusSubscribers.delete(callback); + }; + } + + createPreview(): SandpackPreview { + const iframe = document.createElement("iframe"); + const staticPreview = new SandpackStaticPreview( + iframe, + this.options, + this.fs + ); + + this.previews.set(iframe, staticPreview); + + return { + iframe, + get status() { + return staticPreview.status; + }, + onStatusChange(subscriber: (status: SandpackPreviewStatus) => void) { + return staticPreview.onStatusChange(subscriber); + }, + onMessage(subscriber: (message: SandpackPreviewMessage) => void) { + return staticPreview.onMessage(subscriber); + }, + back() { + // TODO + }, + forward() { + // TODO + }, + refresh() { + // TODO + }, + dispose: () => { + this.previews.delete(iframe); + staticPreview.dispose(); + }, + }; + } + + public dispose() { + this.fs.dispose(); + this.previews.forEach((preview) => { + preview.dispose(); + }); + this.previews.clear(); + } +} diff --git a/sandpack-environments/src/clients/static/utils.ts b/sandpack-environments/src/clients/static/utils.ts new file mode 100644 index 000000000..be93d3a24 --- /dev/null +++ b/sandpack-environments/src/clients/static/utils.ts @@ -0,0 +1,48 @@ +import type { FileContent } from "static-browser-server"; + +export const insertHtmlAfterRegex = ( + regex: RegExp, + content: string, + insertable: string +) => { + const match = regex.exec(content); + if (match && match.length >= 1) { + const offset = match.index + match[0].length; + const prefix = content.substring(0, offset); + const suffix = content.substring(offset); + return prefix + insertable + suffix; + } +}; + +export const readBuffer = (content: string | Uint8Array): string => { + if (typeof content === "string") { + return content; + } else { + return new TextDecoder().decode(content); + } +}; + +export const validateHtml = (content: FileContent): FileContent => { + // Make it a string + const contentString = readBuffer(content); + + const domParser = new DOMParser(); + const doc = domParser.parseFromString(contentString, "text/html"); + + if (!doc.documentElement.getAttribute("lang")) { + doc.documentElement.setAttribute("lang", "en"); + } + + const html = doc.documentElement.outerHTML; + + return `\n${html}`; +}; + +let counter = 0; + +export function generateRandomId() { + const now = Date.now(); + const randomNumber = Math.round(Math.random() * 10000); + const count = (counter += 1); + return (+`${now}${randomNumber}${count}`).toString(16); +} diff --git a/sandpack-environments/src/clients/vm/VMFileSystem.ts b/sandpack-environments/src/clients/vm/VMFileSystem.ts new file mode 100644 index 000000000..2ac58d463 --- /dev/null +++ b/sandpack-environments/src/clients/vm/VMFileSystem.ts @@ -0,0 +1,69 @@ +import type { SandboxSession } from "@codesandbox/sdk"; + +import type { DirectoryEntry, SandpackFileSystem } from "../../types"; + +export class VMFileSystem implements SandpackFileSystem { + constructor( + private sandboxPromise: Promise, + private workspacePath: string + ) {} + + async writeFile(path: string, content: string): Promise { + const sandbox = await this.sandboxPromise; + + await sandbox.fs.writeTextFile(this.workspacePath + path, content, { + create: true, + overwrite: true, + }); + } + + async readFile(path: string): Promise { + const sandbox = await this.sandboxPromise; + const file = await sandbox.fs.readFile(this.workspacePath + path); + + return new TextDecoder().decode(file); + } + + async readDirectory(path: string): Promise { + const sandbox = await this.sandboxPromise; + const entries = await sandbox.fs.readdir(this.workspacePath + path); + + return entries; + } + + createDirectory(path: string): Promise { + throw new Error("Not implemented"); + } + + deleteFile(path: string): Promise { + throw new Error("Not implemented"); + } + + deleteDirectory(path: string): Promise { + throw new Error("Not implemented"); + } + + watchDirectory(path: string, callback: () => void): () => void { + const watcherPromise = this.sandboxPromise.then((sandbox) => + sandbox.fs.watch(this.workspacePath + path) + ); + + watcherPromise.then((watcher) => { + watcher.onEvent(callback); + }); + + return () => { + watcherPromise.then((watcher) => { + watcher.dispose(); + }); + }; + } + + watch(callback: () => void): () => void { + throw new Error("Not implemented"); + } + + dispose(): void { + // Clean up resources if needed + } +} diff --git a/sandpack-environments/src/clients/vm/VMPreview.ts b/sandpack-environments/src/clients/vm/VMPreview.ts new file mode 100644 index 000000000..c98696b27 --- /dev/null +++ b/sandpack-environments/src/clients/vm/VMPreview.ts @@ -0,0 +1,102 @@ +import type { SandpackBundlerMessages } from "../../sandpack-bundler-types"; +import type { + SandpackPreviewMessage, + SandpackPreviewStatus, +} from "../../types"; + +export class VMPreview { + private disposers = new Set<() => void>(); + private iframeMessageSubscribers = new Set< + (message: SandpackPreviewMessage) => void + >(); + private statusSubscribers = new Set< + (status: SandpackPreviewStatus) => void + >(); + private iframe: HTMLIFrameElement; + private _status: SandpackPreviewStatus = { + current: "READY", + }; + get status() { + return this._status; + } + set status(newStatus) { + this._status = newStatus; + this.statusSubscribers.forEach((subscriber) => { + subscriber(newStatus); + }); + } + constructor(iframe: HTMLIFrameElement) { + this.iframe = this.configureIframe(iframe); + this.iframe.src = "https://qc7lnq-5173.csb.app"; + } + // Handles message windows coming from iframes + private onIframeMessage(evt: MessageEvent): void { + const message = evt.data; + if (!message.codesandbox) { + return; + } + + // TODO: Dispatch urlchange? + // this.dispatch(message); + + this.iframeMessageSubscribers.forEach((subscriber) => { + subscriber(message); + }); + } + + private configureIframe(iframe: HTMLIFrameElement) { + if (!iframe.getAttribute("sandbox")) { + iframe.setAttribute( + "sandbox", + "allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts allow-downloads allow-pointer-lock" + ); + + iframe.setAttribute( + "allow", + "accelerometer; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; clipboard-read; clipboard-write; xr-spatial-tracking;" + ); + } + + if (typeof window !== "undefined") { + const listener = (evt: MessageEvent) => { + // skip events originating from different iframes + if (evt.source !== this.iframe.contentWindow) { + return; + } + this.onIframeMessage(evt); + }; + + window.addEventListener("message", listener); + + this.disposers.add(() => { + window.removeEventListener("message", listener); + }); + } + + return iframe; + } + + onMessage(callback: (message: SandpackPreviewMessage) => void): () => void { + this.iframeMessageSubscribers.add(callback); + return () => { + this.iframeMessageSubscribers.delete(callback); + }; + } + + onStatusChange( + callback: (status: SandpackPreviewStatus) => void + ): () => void { + this.statusSubscribers.add(callback); + return () => { + this.statusSubscribers.delete(callback); + }; + } + + sendBundlerMessage(message: SandpackBundlerMessages): void { + this.iframe.contentWindow?.postMessage(message, "*"); + } + + dispose(): void { + // TODO: Dispose of the preview + } +} diff --git a/sandpack-environments/src/clients/vm/index.ts b/sandpack-environments/src/clients/vm/index.ts new file mode 100644 index 000000000..f48a1f589 --- /dev/null +++ b/sandpack-environments/src/clients/vm/index.ts @@ -0,0 +1,98 @@ +import type { SessionData } from "@codesandbox/sdk"; +import { connectToSandbox } from "@codesandbox/sdk/browser"; + +import type { + SandpackEnvironment, + SandpackEnvironmentStatus, + SandpackPreview, + SandpackPreviewMessage, + SandpackPreviewStatus, +} from "../../types"; + +import { VMFileSystem } from "./VMFileSystem"; +import { VMPreview } from "./VMPreview"; + +export interface SandpackVMEnvironmentOptions { + session: SessionData; +} + +export class SandpackVMEnvironment implements SandpackEnvironment { + readonly type = "vm"; + private statusSubscribers = new Set< + (status: SandpackEnvironmentStatus) => void + >(); + fs: VMFileSystem; + private _status: SandpackEnvironmentStatus = { + current: "LOADING", + progress: [], + }; + get status() { + return this._status; + } + set status(newStatus) { + this._status = newStatus; + this.statusSubscribers.forEach((subscriber) => { + subscriber(newStatus); + }); + } + + constructor(private options: SandpackVMEnvironmentOptions) { + const sandboxPromise = connectToSandbox(options.session); + this.fs = new VMFileSystem( + sandboxPromise, + options.session.user_workspace_path + ); + sandboxPromise.then(() => { + this.status = { + current: "READY", + }; + }); + } + + restart() { + // TODO + } + + onStatusChange( + callback: (status: SandpackEnvironmentStatus) => void + ): () => void { + this.statusSubscribers.add(callback); + return () => { + this.statusSubscribers.delete(callback); + }; + } + + createPreview(): SandpackPreview { + const iframe = document.createElement("iframe"); + const vmPreview = new VMPreview(iframe); + + return { + iframe, + get status() { + return vmPreview.status; + }, + onStatusChange(subscriber: (status: SandpackPreviewStatus) => void) { + return vmPreview.onStatusChange(subscriber); + }, + onMessage(subscriber: (message: SandpackPreviewMessage) => void) { + return vmPreview.onMessage(subscriber); + }, + back() { + // TODO + }, + forward() { + // TODO + }, + refresh() { + // TODO + }, + dispose: () => { + vmPreview.dispose(); + }, + }; + } + + public dispose() { + // TODO + } +} diff --git a/sandpack-environments/src/index.ts b/sandpack-environments/src/index.ts new file mode 100644 index 000000000..0ca6c47bf --- /dev/null +++ b/sandpack-environments/src/index.ts @@ -0,0 +1,31 @@ +import type { SandpackEnvironmentOptions, SandpackEnvironment } from "./types"; + +export { + SandpackEnvironment, + DirectoryEntry, + SandpackPreview, + SandpackFileSystem, + SandpackEnvironmentOptions, +} from "./types"; + +export async function loadEnvironment( + options: T +): Promise { + switch (options.type) { + case "static": { + return import("./clients/static").then( + (m) => new m.SandpackStaticEnvironment(options) + ); + } + case "bundler": { + return import("./clients/bundler").then( + (m) => new m.SandpackBundlerEnvironment(options) + ); + } + case "vm": { + return import("./clients/vm").then( + (m) => new m.SandpackVMEnvironment(options) + ); + } + } +} diff --git a/sandpack-environments/src/inject-scripts/consoleHook.ts b/sandpack-environments/src/inject-scripts/consoleHook.ts new file mode 100644 index 000000000..2fc38d769 --- /dev/null +++ b/sandpack-environments/src/inject-scripts/consoleHook.ts @@ -0,0 +1,20 @@ +/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/ban-ts-comment,no-console,@typescript-eslint/explicit-function-return-type, no-restricted-globals */ +import Hook from "console-feed/lib/Hook"; +import { Encode } from "console-feed/lib/Transform"; + +declare global { + const scope: { channelId: string }; +} + +Hook(window.console, (log) => { + const encodeMessage = Encode(log) as any; + parent.postMessage( + { + type: "console", + codesandbox: true, + log: Array.isArray(encodeMessage) ? encodeMessage[0] : encodeMessage, + channelId: scope.channelId, + }, + "*" + ); +}); diff --git a/sandpack-environments/src/sandpack-bundler-types.ts b/sandpack-environments/src/sandpack-bundler-types.ts new file mode 100644 index 000000000..d8b721f69 --- /dev/null +++ b/sandpack-environments/src/sandpack-bundler-types.ts @@ -0,0 +1,79 @@ +export enum SandpackLogLevel { + None = 0, + Error = 10, + Warning = 20, + Info = 30, + Debug = 40, +} + +export interface ErrorStackFrame { + columnNumber: number; + fileName: string; + functionName: string; + lineNumber: number; + _originalColumnNumber: number; + _originalFileName: string; + _originalFunctionName: string; + _originalLineNumber: number; + _originalScriptCode: Array<{ + lineNumber: number; + content: string; + highlight: boolean; + }>; +} + +export interface SandpackBundlerErrorMessage { + title: string; + path: string; + message: string; + line: number; + column: number; + payload: { + frames?: ErrorStackFrame[]; + }; +} + +export type FileContent = Uint8Array | string; + +export type FilesMap = Record; + +export type SandpackBundlerMessages = + | { + type: "start"; + firstLoad?: boolean; + } + | { + type: "done"; + compilatonError: boolean; + } + | { + type: "compile"; + modules: FilesMap; + template?: string; + logLevel?: SandpackLogLevel; + } + | ({ + type: "action"; + action: "show-error"; + } & SandpackBundlerErrorMessage) + | { + type: "action"; + action: "notification"; + notificationType: "error"; + title: string; + } + | { + type: "urlchange"; + url: string; + back: boolean; + forward: boolean; + } + | { + type: "refresh"; + } + | { + type: "urlback"; + } + | { + type: "urlforward"; + }; diff --git a/sandpack-environments/src/types.ts b/sandpack-environments/src/types.ts new file mode 100644 index 000000000..065c88de6 --- /dev/null +++ b/sandpack-environments/src/types.ts @@ -0,0 +1,89 @@ +import type { SandpackBundlerEnvironmentOptions } from "./clients/bundler"; +import type { SandpackStaticEnvironmentOptions } from "./clients/static"; +import type { SandpackVMEnvironmentOptions } from "./clients/vm"; +import type { FileContent } from "./sandpack-bundler-types"; + +export type SandpackEnvironmentOptions = + | ({ + type: "static"; + } & SandpackStaticEnvironmentOptions) + | ({ + type: "bundler"; + } & SandpackBundlerEnvironmentOptions) + | ({ + type: "vm"; + } & SandpackVMEnvironmentOptions); + +export interface DirectoryEntry { + name: string; + type: "file" | "directory"; +} + +export interface SandpackFileSystem { + writeFile(path: string, content: FileContent): Promise; + readFile(path: string): Promise; + readDirectory(path: string): Promise; + createDirectory(path: string): Promise; + deleteFile(path: string): Promise; + deleteDirectory(path: string): Promise; + watchDirectory(path: string, callback: () => void): () => void; + watch(callback: () => void): () => void; + dispose(): void; +} + +export interface SandpackPreviewMessage { + type: "urlchange"; + url: string; + back: boolean; + forward: boolean; +} + +export type SandpackPreviewStatus = + | { + current: "LOADING"; + progress: string[]; + } + | { + current: "READY"; + } + | { + current: "ERROR"; + error: Error; + }; + +// TODO: Implement method to initialize iframe +export interface SandpackPreview { + status: SandpackPreviewStatus; + iframe: HTMLIFrameElement; + onStatusChange(listener: (status: SandpackPreviewStatus) => void): () => void; + onMessage(listener: (message: SandpackPreviewMessage) => void): () => void; + back(): void; + forward(): void; + refresh(): void; + dispose(): void; +} + +export type SandpackEnvironmentStatus = + | { + current: "LOADING"; + progress: string[]; + } + | { + current: "READY"; + } + | { + current: "ERROR"; + error: Error; + }; + +export interface SandpackEnvironment { + type: "bundler" | "static" | "vm"; + status: SandpackEnvironmentStatus; + onStatusChange( + listener: (status: SandpackEnvironmentStatus) => void + ): () => void; + createPreview(): SandpackPreview; + fs: SandpackFileSystem; + restart: () => void; + dispose(): void; +} diff --git a/sandpack-environments/src/utils.ts b/sandpack-environments/src/utils.ts new file mode 100644 index 000000000..bcef942a8 --- /dev/null +++ b/sandpack-environments/src/utils.ts @@ -0,0 +1,31 @@ +export function normalizePath(pathToNormalize: string): string { + // Normalize the path and ensure it starts with a slash + const withLeadingSlash = pathToNormalize.startsWith("/") + ? pathToNormalize + : "/" + pathToNormalize; + + // Ensure path does not end with a slash (unless it's the root path) + return withLeadingSlash === "/" + ? withLeadingSlash + : withLeadingSlash.endsWith("/") + ? withLeadingSlash.slice(0, -1) + : withLeadingSlash; +} + +export function debounce unknown>( + fn: T, + delay: number +): (...args: Parameters) => void { + // 'timer' will hold the timeout id for the pending function execution. + let timer: ReturnType; + + return (...args: Parameters): void => { + // If there is an existing timer, clear it to cancel the previous scheduled call. + clearTimeout(timer); + + // Set a new timeout to call the function after the specified delay. + timer = setTimeout(() => { + fn(...args); + }, delay); + }; +} diff --git a/sandpack-environments/tsconfig.json b/sandpack-environments/tsconfig.json new file mode 100644 index 000000000..5b03a94ec --- /dev/null +++ b/sandpack-environments/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "lib": ["es2015", "es2016", "es2017", "ES2019", "dom"], + "strict": true, + "module": "ESNext", + "target": "ES2015", + "moduleResolution": "bundler", + "sourceMap": false, + "emitDeclarationOnly": true, + "declaration": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noImplicitAny": true, + "typeRoots": ["node_modules/@types"], + "skipLibCheck": true + }, + "include": ["./src"], + "exclude": ["node_modules", "src/**/*.test.ts"] +} diff --git a/sandpack-react/package.json b/sandpack-react/package.json index 74b513ce8..96e2548b4 100644 --- a/sandpack-react/package.json +++ b/sandpack-react/package.json @@ -58,7 +58,8 @@ "@codemirror/language": "^6.3.2", "@codemirror/state": "^6.2.0", "@codemirror/view": "^6.7.1", - "@codesandbox/sandpack-client": "^2.19.8", + "@codesandbox/sandpack-environments": "^0.1.0", + "@codesandbox/sdk": "workspace:*", "@lezer/highlight": "^1.1.3", "@react-hook/intersection-observer": "^3.1.1", "@stitches/core": "^1.2.6", @@ -91,7 +92,7 @@ "typescript": "^5.2.2" }, "peerDependencies": { - "react": "^16.8.0 || ^17 || ^18", - "react-dom": "^16.8.0 || ^17 || ^18" + "react": "^18", + "react-dom": "^18" } } diff --git a/sandpack-react/src/components/CodeEditor/CodeMirror.tsx b/sandpack-react/src/components/CodeEditor/CodeMirror.tsx index 8fae66401..33ca6c7c5 100644 --- a/sandpack-react/src/components/CodeEditor/CodeMirror.tsx +++ b/sandpack-react/src/components/CodeEditor/CodeMirror.tsx @@ -131,10 +131,6 @@ export const CodeMirror = React.forwardRef( ); const classNames = useClassNames(); - const { - listen, - sandpack: { autoReload }, - } = useSandpack(); const prevExtension = React.useRef([]); const prevExtensionKeymap = React.useRef([]); @@ -336,7 +332,6 @@ export const CodeMirror = React.forwardRef( themeId, readOnly, useStaticReadOnly, - autoReload, ]); React.useEffect( @@ -396,13 +391,15 @@ export const CodeMirror = React.forwardRef( // eslint-disable-next-line react-hooks/exhaustive-deps }, [code]); + /* + TODO: Allow sending generic action messages? React.useEffect( function messageToInlineError() { if (!showInlineErrors) return; const unsubscribe = listen((message) => { const view = cmView.current; - + if (message.type === "success") { view?.dispatch({ // @ts-ignore @@ -425,7 +422,7 @@ export const CodeMirror = React.forwardRef( }, [listen, showInlineErrors] ); - +*/ const handleContainerKeyDown = (evt: React.KeyboardEvent): void => { if (evt.key === "Enter" && cmView.current) { evt.preventDefault(); diff --git a/sandpack-react/src/components/CodeEditor/index.tsx b/sandpack-react/src/components/CodeEditor/index.tsx index a8b13b316..d81b502f2 100644 --- a/sandpack-react/src/components/CodeEditor/index.tsx +++ b/sandpack-react/src/components/CodeEditor/index.tsx @@ -1,7 +1,9 @@ import type { Extension } from "@codemirror/state"; import type { KeyBinding } from "@codemirror/view"; -import { forwardRef } from "react"; +import { forwardRef, useEffect, useRef, useState } from "react"; +import { useEnvironment } from "../../contexts/SandpackEnvironmentContext"; +import { useSandpackState } from "../../contexts/SandpackStateContext"; import { useActiveCode } from "../../hooks/useActiveCode"; import { useSandpack } from "../../hooks/useSandpack"; import type { CustomLanguage, SandpackInitMode } from "../../types"; @@ -81,60 +83,93 @@ export const SandpackCodeEditor = forwardRef( }, ref ) => { - const { sandpack } = useSandpack(); - const { code, updateCode, readOnly: readOnlyFile } = useActiveCode(); - const { activeFile, status, editorState } = sandpack; - const shouldShowTabs = showTabs ?? sandpack.visibleFiles.length > 1; - + const env = useEnvironment(); + const useCodeRef = useRef(""); + const state = useSandpackState(); + const [code, setCode] = useState(""); + // const { code, updateCode, readOnly: readOnlyFile } = useActiveCode(); + const shouldShowTabs = false; // showTabs ?? sandpack.visibleFiles.length > 1; const classNames = useClassNames(); - const handleCodeUpdate = ( - newCode: string, - shouldUpdatePreview = true - ): void => { - updateCode(newCode, shouldUpdatePreview); + useEffect(() => { + if (state?.activeFile) { + env.fs.readFile(state.activeFile).then((content) => { + const code = + typeof content === "string" + ? content + : new TextDecoder("utf-8").decode(content); + + useCodeRef.current = code; + + setCode(code); + }); + } + }, [state?.activeFile]); + + useEffect(() => { + const saveListener = (event: KeyboardEvent) => { + if ( + state.activeFile && + (event.metaKey || event.ctrlKey) && + event.key.toLowerCase() === "s" + ) { + event.preventDefault(); + + env.fs.writeFile(state.activeFile, useCodeRef.current); + } + }; + + window.addEventListener("keydown", saveListener); + + return () => { + window.removeEventListener("keydown", saveListener); + }; + }, [state]); + + const handleCodeUpdate = (newCode: string): void => { + useCodeRef.current = newCode; + + if (env.type !== "vm" && state?.activeFile) { + env.fs.writeFile(state.activeFile, newCode); + } }; - const activeFileUniqueId = useSandpackId(); + if (!state.activeFile) { + return null; + } return ( - {shouldShowTabs && ( - - )} + {shouldShowTabs && }
- handleCodeUpdate(newCode, sandpack.autoReload ?? true) - } - readOnly={readOnly || readOnlyFile} + filePath={state.activeFile} + // TODO: Rather pass component specific options from the top always + initMode={"immediate" /*initMode || sandpack.initMode*/} + onCodeUpdate={(newCode: string) => handleCodeUpdate(newCode)} + readOnly={false /*readOnly || readOnlyFile*/} showInlineErrors={showInlineErrors} showLineNumbers={showLineNumbers} showReadOnly={showReadOnly} wrapContent={wrapContent} /> - {showRunButton && (!sandpack.autoReload || status === "idle") ? ( + {/*showRunButton && (!sandpack.autoReload || status === "idle") ? ( - ) : null} + ) : null*/}
); diff --git a/sandpack-react/src/components/FileExplorer/Directory.tsx b/sandpack-react/src/components/FileExplorer/Directory.tsx deleted file mode 100644 index 9f9730a6c..000000000 --- a/sandpack-react/src/components/FileExplorer/Directory.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client"; -import * as React from "react"; - -import type { SandpackOptions } from "../../types"; - -import { File } from "./File"; -import { ModuleList } from "./ModuleList"; - -import type { SandpackFileExplorerProp } from "."; - -export interface Props extends SandpackFileExplorerProp { - prefixedPath: string; - files: SandpackBundlerFiles; - selectFile: (path: string) => void; - activeFile: NonNullable; - depth: number; - visibleFiles: NonNullable; -} - -export const Directory: React.FC = ({ - prefixedPath, - files, - selectFile, - activeFile, - depth, - autoHiddenFiles, - visibleFiles, - initialCollapsedFolder, -}) => { - const [open, setOpen] = React.useState( - !initialCollapsedFolder?.includes(prefixedPath) - ); - - const toggle = (): void => setOpen((prev) => !prev); - - return ( -
- - - {open && ( - - )} -
- ); -}; diff --git a/sandpack-react/src/components/FileExplorer/ModuleList.tsx b/sandpack-react/src/components/FileExplorer/ModuleList.tsx index 6b9e9f5e1..c9fe55f42 100644 --- a/sandpack-react/src/components/FileExplorer/ModuleList.tsx +++ b/sandpack-react/src/components/FileExplorer/ModuleList.tsx @@ -1,65 +1,144 @@ -import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client"; +import type { DirectoryEntry } from "@codesandbox/sandpack-environments"; import * as React from "react"; +import { useEnvironment } from "../../contexts/SandpackEnvironmentContext"; import type { SandpackOptions } from "../../types"; -import { Directory } from "./Directory"; import { File } from "./File"; -import { fromPropsToModules } from "./utils"; -import type { SandpackFileExplorerProp } from "."; - -export interface ModuleListProps extends SandpackFileExplorerProp { - prefixedPath: string; - files: SandpackBundlerFiles; +export interface ModuleListProps { + path: string; selectFile: (path: string) => void; activeFile: NonNullable; depth?: number; visibleFiles: NonNullable; + /** + * enable auto hidden file in file explorer + * + * @description set with hidden property in files property + * @default false + */ + autoHiddenFiles?: boolean; + + initialCollapsedFolder?: string[]; +} + +function join(...paths: string[]): string { + return paths.join("/").replace(/\/+/g, "/"); } export const ModuleList: React.FC = ({ depth = 0, activeFile, selectFile, - prefixedPath, - files, autoHiddenFiles, visibleFiles, initialCollapsedFolder, + path, }) => { - const { directories, modules } = fromPropsToModules({ - visibleFiles, - autoHiddenFiles, - prefixedPath, - files, - }); + const env = useEnvironment(); + const [entries, setEntries] = React.useState([]); + + React.useEffect(() => { + const updateEntries = () => { + env.fs.readDirectory(path).then((entries) => { + setEntries(entries); + }); + }; + + updateEntries(); + + return env.fs.watchDirectory(path, updateEntries); + }, []); + + const { directories, files } = React.useMemo( + () => + entries.reduce<{ + directories: string[]; + files: string[]; + }>( + (acc, entry) => { + const { name, type } = entry; + + if (type === "directory") { + acc.directories.push(name); + } else { + acc.files.push(name); + } + + return acc; + }, + { directories: [], files: [] } + ), + [entries] + ); return (
- {directories.map((dir) => ( + {directories.map((directoryPath) => ( ))} - {modules.map((file) => ( + {files.map((file) => ( ))}
); }; + +export type DirectoryProps = { + prefixedPath: string; + path: string; + selectFile: (path: string) => void; + activeFile: NonNullable; + depth: number; + visibleFiles: NonNullable; +} & Pick; + +export const Directory: React.FC = ({ + selectFile, + activeFile, + depth, + path, + autoHiddenFiles, + visibleFiles, + initialCollapsedFolder, +}) => { + const [open, setOpen] = React.useState(false); + + const toggle = (): void => setOpen((prev) => !prev); + + return ( +
+ + + {open && ( + + )} +
+ ); +}; diff --git a/sandpack-react/src/components/FileExplorer/index.tsx b/sandpack-react/src/components/FileExplorer/index.tsx index 184f08dfe..22044c822 100644 --- a/sandpack-react/src/components/FileExplorer/index.tsx +++ b/sandpack-react/src/components/FileExplorer/index.tsx @@ -1,11 +1,11 @@ -import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client"; import * as React from "react"; -import { useSandpack } from "../../hooks/useSandpack"; +import { useSandpackState } from "../../contexts/SandpackStateContext"; import { css } from "../../styles"; import { useClassNames } from "../../utils/classNames"; import { stackClassName } from "../common"; +import type { ModuleListProps } from "./ModuleList"; import { ModuleList } from "./ModuleList"; const fileExplorerClassName = css({ @@ -14,17 +14,10 @@ const fileExplorerClassName = css({ height: "100%", }); -export interface SandpackFileExplorerProp { - /** - * enable auto hidden file in file explorer - * - * @description set with hidden property in files property - * @default false - */ - autoHiddenFiles?: boolean; - - initialCollapsedFolder?: string[]; -} +export type SandpackFileExplorerProp = Pick< + ModuleListProps, + "initialCollapsedFolder" | "autoHiddenFiles" +>; export const SandpackFileExplorer = ({ className, @@ -33,18 +26,9 @@ export const SandpackFileExplorer = ({ ...props }: SandpackFileExplorerProp & React.HTMLAttributes): JSX.Element | null => { - const { - sandpack: { activeFile, files, openFile, visibleFilesFromProps }, - } = useSandpack(); + const sandpackState = useSandpackState(); const classNames = useClassNames(); - const orderedFiles = Object.keys(files) - .sort() - .reduce((obj, key) => { - obj[key] = files[key]; - return obj; - }, {}); - return (
{ + sandpackState.setActiveFile(filepath); + }} + visibleFiles={[]} />
diff --git a/sandpack-react/src/components/FileExplorer/util.test.ts b/sandpack-react/src/components/FileExplorer/util.test.ts deleted file mode 100644 index 3708639d2..000000000 --- a/sandpack-react/src/components/FileExplorer/util.test.ts +++ /dev/null @@ -1,78 +0,0 @@ -import type { ModuleListProps } from "./ModuleList"; -import { fromPropsToModules } from "./utils"; - -const defaultProps: ModuleListProps = { - files: { - "/src/component/index.js": { code: "", hidden: true }, - "/src/folder/index.js": { code: "", hidden: true }, - "/component/index.js": { code: "", hidden: true }, - "/component/src/index.js": { code: "", hidden: true }, - "/hidden-folder/index.js": { code: "", hidden: true }, - "/non-hidden-folder/index.js": { code: "", hidden: false }, - "/index.js": { code: "", hidden: true }, - "/App.js": { code: "", hidden: false }, - }, - autoHiddenFiles: false, - visibleFiles: [], - prefixedPath: "/", - activeFile: "", - selectFile: () => { - // - }, -}; - -describe(fromPropsToModules, () => { - it("returns a list of unique folder", () => { - expect(fromPropsToModules(defaultProps).directories).toEqual([ - "/src/", - "/component/", - "/hidden-folder/", - "/non-hidden-folder/", - ]); - }); - - it("returns only the root files", () => { - expect(fromPropsToModules(defaultProps).modules).toEqual([ - "/index.js", - "/App.js", - ]); - }); - - it("returns the folder from a subfolder", () => { - const input: ModuleListProps = { - ...defaultProps, - prefixedPath: "/src/", - }; - - expect(fromPropsToModules(input).directories).toEqual([ - "/src/component/", - "/src/folder/", - ]); - }); - - it("returns only the files from the visibleFiles prop (autoHiddenFiles)", () => { - const input: ModuleListProps = { - ...defaultProps, - autoHiddenFiles: true, - visibleFiles: ["/index.js", "/src/component/index.js"], - }; - - expect(fromPropsToModules(input)).toEqual({ - directories: ["/src/"], - modules: ["/index.js"], - }); - }); - - it("returns only the non-hidden files (autoHiddenFiles)", () => { - const input: ModuleListProps = { - ...defaultProps, - autoHiddenFiles: true, - visibleFiles: [], - }; - - expect(fromPropsToModules(input)).toEqual({ - directories: ["/non-hidden-folder/"], - modules: ["/App.js"], - }); - }); -}); diff --git a/sandpack-react/src/components/FileExplorer/utils.ts b/sandpack-react/src/components/FileExplorer/utils.ts deleted file mode 100644 index 45ec12215..000000000 --- a/sandpack-react/src/components/FileExplorer/utils.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client"; - -export const fromPropsToModules = ({ - autoHiddenFiles, - visibleFiles, - files, - prefixedPath, -}: { - prefixedPath: string; - files: SandpackBundlerFiles; - autoHiddenFiles?: boolean; - visibleFiles: string[]; -}): { directories: string[]; modules: string[] } => { - const hasVisibleFilesOption = visibleFiles.length > 0; - - /** - * When visibleFiles or activeFile are set, the hidden and active flags on the files prop are ignored. - */ - const filterByHiddenProperty = autoHiddenFiles && !hasVisibleFilesOption; - const filterByVisibleFilesOption = autoHiddenFiles && !!hasVisibleFilesOption; - - const fileListWithoutPrefix = Object.keys(files) - .filter((filePath) => { - const isValidatedPath = filePath.startsWith(prefixedPath); - if (filterByVisibleFilesOption) { - return isValidatedPath && visibleFiles.includes(filePath); - } - - if (filterByHiddenProperty) { - return isValidatedPath && !files[filePath]?.hidden; - } - - return isValidatedPath; - }) - .map((file) => file.substring(prefixedPath.length)); - - const directories = new Set( - fileListWithoutPrefix - .filter((file) => file.includes("/")) - .map((file) => `${prefixedPath}${file.split("/")[0]}/`) - ); - - const modules = fileListWithoutPrefix - .filter((file) => !file.includes("/")) - .map((file) => `${prefixedPath}${file}`); - - return { directories: Array.from(directories), modules }; -}; diff --git a/sandpack-react/src/components/Navigator/index.tsx b/sandpack-react/src/components/Navigator/index.tsx index f97be2db2..1a9cf1dfa 100644 --- a/sandpack-react/src/components/Navigator/index.tsx +++ b/sandpack-react/src/components/Navigator/index.tsx @@ -1,6 +1,6 @@ +import type * as sandpackEnv from "@codesandbox/sandpack-environments"; import * as React from "react"; -import { useSandpack } from "../../hooks/useSandpack"; import { css } from "../../styles"; import { buttonClassName, iconClassName } from "../../styles/shared"; import { useClassNames } from "../../utils/classNames"; @@ -44,23 +44,23 @@ const inputClassName = css({ }); export interface NavigatorProps { - clientId: string; onURLChange?: (newURL: string) => void; startRoute?: string; + preview: sandpackEnv.SandpackPreview; } export const Navigator = ({ - clientId, onURLChange, className, startRoute, + preview, ...props }: NavigatorProps & React.HTMLAttributes): JSX.Element => { const [baseUrl, setBaseUrl] = React.useState(""); - const { sandpack, dispatch, listen } = useSandpack(); const [relativeUrl, setRelativeUrl] = React.useState( - startRoute ?? sandpack.startRoute ?? "/" + // TODO: This should rather come from the new useOptions hook + startRoute ?? "/" ); const [backEnabled, setBackEnabled] = React.useState(false); @@ -68,23 +68,22 @@ export const Navigator = ({ const classNames = useClassNames(); - React.useEffect(() => { - const unsub = listen((message) => { - if (message.type === "urlchange") { - const { url, back, forward } = message; - - const [newBaseUrl, newRelativeUrl] = splitUrl(url); - - setBaseUrl(newBaseUrl); - setRelativeUrl(newRelativeUrl); - setBackEnabled(back); - setForwardEnabled(forward); - } - }, clientId); - - return (): void => unsub(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + React.useEffect( + () => + preview.onMessage((message) => { + if (message.type === "urlchange") { + const { url, back, forward } = message; + + const [newBaseUrl, newRelativeUrl] = splitUrl(url); + + setBaseUrl(newBaseUrl); + setRelativeUrl(newRelativeUrl); + setBackEnabled(back); + setForwardEnabled(forward); + } + }), + [preview] + ); const handleInputChange = (e: React.ChangeEvent): void => { const path = e.target.value.startsWith("/") @@ -107,15 +106,15 @@ export const Navigator = ({ }; const handleRefresh = (): void => { - dispatch({ type: "refresh" }); + preview.refresh(); }; const handleBack = (): void => { - dispatch({ type: "urlback" }); + preview.back(); }; const handleForward = (): void => { - dispatch({ type: "urlforward" }); + preview.forward(); }; const buttonsClassNames = classNames("button", [ diff --git a/sandpack-react/src/components/Preview/index.tsx b/sandpack-react/src/components/Preview/index.tsx index 8996a0aba..c0d27b84f 100644 --- a/sandpack-react/src/components/Preview/index.tsx +++ b/sandpack-react/src/components/Preview/index.tsx @@ -1,20 +1,7 @@ -import type { - SandpackClient, - SandpackMessage, -} from "@codesandbox/sandpack-client"; import * as React from "react"; -import { - useSandpackClient, - useSandpackNavigation, - useSandpackShell, -} from "../../hooks"; +import { usePreview } from "../../hooks/usePreview"; import { css, THEME_PREFIX } from "../../styles"; -import { - buttonClassName, - iconStandaloneClassName, - roundedButtonClassName, -} from "../../styles/shared"; import { useClassNames } from "../../utils/classNames"; import { Navigator } from "../Navigator"; import { ErrorOverlay } from "../common/ErrorOverlay"; @@ -22,8 +9,7 @@ import { LoadingOverlay } from "../common/LoadingOverlay"; import { OpenInCodeSandboxButton } from "../common/OpenInCodeSandboxButton"; import { RoundedButton } from "../common/RoundedButton"; import { SandpackStack } from "../common/Stack"; -import { RefreshIcon, RestartIcon } from "../icons"; -import { SignOutIcon } from "../icons"; +import { RefreshIcon } from "../icons"; export interface PreviewProps { style?: React.CSSProperties; @@ -83,146 +69,120 @@ const previewActionsClassName = css({ gap: "$space$2", }); -export interface SandpackPreviewRef { - /** - * Retrieve the current Sandpack client instance from preview - */ - getClient: () => InstanceType | null; - /** - * Returns the client id, which will be used to - * initialize a client in the main Sandpack context - */ - clientId: string; -} - -export const SandpackPreview = React.forwardRef< - SandpackPreviewRef, - PreviewProps & React.HTMLAttributes ->( - ( - { - showNavigator = false, - showRefreshButton = true, - showOpenInCodeSandbox = true, - showSandpackErrorOverlay = true, - showOpenNewtab = true, - showRestartButton = true, - actionsChildren = <>, - children, - className, - startRoute = "/", - ...props - }, - ref - ) => { - const { sandpack, listen, iframe, getClient, clientId, dispatch } = - useSandpackClient({ startRoute }); - const [iframeComputedHeight, setComputedAutoHeight] = React.useState< - number | null - >(null); - const { status } = sandpack; - const { refresh } = useSandpackNavigation(clientId); - const { restart } = useSandpackShell(clientId); - - const classNames = useClassNames(); - - React.useEffect(() => { - const unsubscribe = listen((message: SandpackMessage) => { - if (message.type === "resize") { - setComputedAutoHeight(message.height); - } - }); - - return unsubscribe; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - React.useImperativeHandle( - ref, - () => ({ - clientId: clientId, - getClient, - }), - [getClient, clientId] - ); - - const handleNewURL = (newUrl: string): void => { - if (!iframe.current) { - return; - } - - iframe.current.src = newUrl; - // eslint-disable-next-line react-hooks/exhaustive-deps - }; - - return ( - - {showNavigator && ( - - )} - -
-