deploy: v0.12 存档迁移+考古日志滚动条

This commit is contained in:
2026-06-24 03:04:38 +00:00
parent 4831505ef9
commit b4c6111516
58986 changed files with 7569452 additions and 31667 deletions
@@ -0,0 +1,12 @@
/**
* Stole from https://github.com/nteract/ansi-to-react/blob/master/src/index.ts
*/
/// <reference types="react" />
declare interface Props {
children?: string;
linkify?: boolean;
className?: string;
useClasses?: boolean;
}
export default function Ansi(props: Props): JSX.Element;
export {};
@@ -0,0 +1 @@
export declare const shallowEqual: (a: any[], b: any[]) => boolean;
@@ -0,0 +1,6 @@
/// <reference types="react" />
export declare const ClassNamesProvider: React.FC<React.PropsWithChildren<{
classes?: Record<string, string>;
}>>;
export declare const useClassNames: () => (customClassName: string, allClassNames?: any[]) => string;
export declare const joinClassNames: (...args: any[]) => string;
@@ -0,0 +1,33 @@
import type { SandpackBundlerFile, SandpackBundlerFiles } from "@codesandbox/sandpack-client";
import type { SandpackProviderProps, SandpackFiles, SandboxEnvironment } from "../types";
export interface SandpackContextInfo {
activeFile: string;
visibleFiles: string[];
files: Record<string, SandpackBundlerFile>;
environment: SandboxEnvironment;
shouldUpdatePreview: true;
}
/**
* Creates a standard sandpack state given the setup,
* options, and files props. Using this function is
* the reliable way to ensure a consistent and predictable
* sandpack-content throughout application
*/
export declare const getSandpackStateFromProps: (props: SandpackProviderProps) => SandpackContextInfo;
/**
* Given a file tree and a file, it uses a couple of rules
* to tweak the filename to match with one of the inside of file tree
*
* - Adds the leading slash;
* - Tries to find the same filename with different extensions (js only);
* - Returns `null` if it doesn't satisfy any rule
*/
export declare const resolveFile: (path: string, files: SandpackFiles) => string | null;
/**
* Transform an regular object, which contain files to
* an object that sandpack-client can understand
*
* From: Record<string, string>
* To: Record<string, { code: string }>
*/
export declare const convertedFilesToBundlerFiles: (files?: SandpackFiles) => SandpackBundlerFiles;
@@ -0,0 +1,9 @@
export declare const getFileName: (filePath: string) => string;
export declare const calculateNearestUniquePath: (currentPath: string, otherPaths: string[]) => string;
export declare const hexToRGB: (hex: string) => {
red: number;
green: number;
blue: number;
};
export declare const isDarkColor: (color: string) => boolean;
export declare const generateRandomId: () => string;
@@ -0,0 +1,3 @@
import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client";
export declare const useSandpackId: () => string;
export declare const useAsyncSandpackId: (files: SandpackBundlerFiles) => (() => Promise<string>) | (() => string);