deploy: v0.12 fix 存档key名

This commit is contained in:
2026-06-24 03:09:02 +00:00
parent 7a08d49fe3
commit e0a5281119
58743 changed files with 7297269 additions and 39505 deletions
@@ -0,0 +1,49 @@
import type { Extension } from "@codemirror/state";
import { EditorView } from "@codemirror/view";
import type { KeyBinding } from "@codemirror/view";
import * as React from "react";
import type { CustomLanguage, EditorState as SandpackEditorState, SandpackInitMode } from "../../types";
export type Decorators = Array<{
className?: string;
line: number;
startColumn?: number;
endColumn?: number;
elementAttributes?: Record<string, string>;
}>;
interface CodeMirrorProps {
code: string;
filePath?: string;
fileType?: string;
onCodeUpdate?: (newCode: string) => void;
showLineNumbers?: boolean;
showInlineErrors?: boolean;
wrapContent?: boolean;
editorState?: SandpackEditorState;
/**
* This disables editing of content by the user in all files.
*/
readOnly?: boolean;
/**
* Controls the visibility of Read-only label, which will only
* appears when `readOnly` is `true`
*/
showReadOnly?: boolean;
/**
* Provides a way to draw or style a piece of the content.
*/
decorators?: Decorators;
initMode: SandpackInitMode;
extensions?: Extension[];
extensionsKeymap?: KeyBinding[];
/**
* Provides a way to add custom language modes by supplying a language
* type, applicable file extensions, and a LanguageSupport instance
* for that syntax mode
*/
additionalLanguages?: CustomLanguage[];
}
export interface CodeMirrorRef {
getCodemirror: () => EditorView | undefined;
}
export declare const CodeMirror: React.ForwardRefExoticComponent<CodeMirrorProps & React.RefAttributes<CodeMirrorRef>>;
export {};
@@ -0,0 +1,3 @@
import type { Extension } from "@codemirror/state";
import type { Decorators } from "../CodeEditor/CodeMirror";
export declare function highlightDecorators(positions: Decorators): Extension;
@@ -0,0 +1,2 @@
import type { Extension } from "@codemirror/state";
export declare function highlightInlineError(): Extension;
@@ -0,0 +1,50 @@
/// <reference types="react" />
import type { Extension } from "@codemirror/state";
import type { KeyBinding } from "@codemirror/view";
import type { CustomLanguage, SandpackInitMode } from "../../types";
import { CodeMirror } from "./CodeMirror";
import type { CodeMirrorRef } from "./CodeMirror";
export type CodeEditorRef = CodeMirrorRef;
export interface CodeEditorProps {
style?: React.CSSProperties;
className?: string;
showTabs?: boolean;
showLineNumbers?: boolean;
showInlineErrors?: boolean;
showRunButton?: boolean;
wrapContent?: boolean;
closableTabs?: boolean;
/**
* This provides a way to control how some components are going to
* be initialized on the page. The CodeEditor and the Preview components
* are quite expensive and might overload the memory usage, so this gives
* a certain control of when to initialize them.
*/
initMode?: SandpackInitMode;
/**
* CodeMirror extensions for the editor state, which can
* provide extra features and functionalities to the editor component.
*/
extensions?: Extension[];
/**
* Property to register CodeMirror extension keymap.
*/
extensionsKeymap?: KeyBinding[];
/**
* This disables editing of the editor content by the user.
*/
readOnly?: boolean;
/**
* Controls the visibility of Read-only label, which will only
* appears when `readOnly` is `true`
*/
showReadOnly?: boolean;
/**
* Provides a way to add custom language modes by supplying a language
* type, applicable file extensions, and a LanguageSupport instance
* for that syntax mode
*/
additionalLanguages?: CustomLanguage[];
}
export { CodeMirror as CodeEditor };
export declare const SandpackCodeEditor: import("react").ForwardRefExoticComponent<CodeEditorProps & import("react").RefAttributes<CodeMirrorRef>>;
@@ -0,0 +1,8 @@
export declare const html = "\n<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <title>HTML 5 Boilerplate</title>\n <link rel=\"stylesheet\" href=\"style.css\">\n </head>\n <body>\n <script src=\"index.js\"></script>\n </body>\n</html>\n";
export declare const js = "function foo(params) {\n return params\n}\n\nconst baz = (foo) => {\n return foo\n}\n\nconst array = [];\nconst object = {};\nconst regex = new Regex(//);\n\nconst expr = 'Papayas';\nswitch (expr) {\n case 'Oranges':\n console.log('Oranges are $0.59 a pound.');\n break;\n case 'Mangoes':\n case 'Papayas':\n console.log('Mangoes and papayas are $2.79 a pound.');\n // expected output: \"Mangoes and papayas are $2.79 a pound.\"\n break;\n default:\n console.log(`Sorry, we are out of ${expr}.`);\n}";
export declare const jsx = "function Greeting({ name }) {\n return <h1>Hello, {name}!</h1>;\n}\n\nexport default function App() {\n return (\n <div>\n <Greeting name=\"Divyesh\" />\n <Greeting name=\"Sarah\" />\n <Greeting name=\"Taylor\" />\n </div>\n );\n}";
export declare const css = "body {\n background-color: lightblue;\n}\n\nh1 {\n color: white;\n text-align: center;\n}\n\np {\n font-family: verdana;\n font-size: 20px;\n}";
export declare const less = "@width: 10px;\n@height: @width + 10px;\n\n#header {\n width: @width;\n height: @height;\n}";
export declare const vue = "<template>\n<div class=\"column is-12\">\n <label class=\"label\" for=\"email\">Email</label>\n <p :class=\"{ 'control': true }\">\n <input v-validate=\"'required|email'\" :class=\"{'input': true, 'is-danger': errors.has('email') }\" name=\"email\" type=\"text\" placeholder=\"Email\">\n <span v-show=\"errors.has('email')\" class=\"help is-danger\">{{ errors.first('email') }}</span>\n </p>\n</div>\n</template>\n\n<script>\n export default {\n name: 'basic-example'\n};\n</script>";
export declare const shell = "#!/bin/sh\n\nEXAMPLE=\"drawn joyed\"\n\n# Prints the EXAMPLE variable\nfunction show-example() {\n echo $EXAMPLE\n}";
export declare const python = "import os\n\napi_token = os.environ['API_TOKEN']\n\n# Prints the api_token variable\nprint(\"API token:\", api_token)";
@@ -0,0 +1,60 @@
export declare const placeholderClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
margin: string;
display: string;
fontFamily: string;
fontSize: string;
color: string;
lineHeight: string;
}>;
export declare const tokensClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, Record<string, string>>;
export declare const editorClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
[x: string]: string | number | {
padding: string;
"@supports (-webkit-overflow-scrolling: touch)"?: undefined;
} | {
"@supports (-webkit-overflow-scrolling: touch)": {
".cm-content": {
fontSize: string;
};
};
padding?: undefined;
};
flex: number;
position: string;
overflow: string;
background: string;
".cm-scroller": {
padding: string;
};
/**
* For iOS: prevent browser zoom when clicking on sandbox.
* Does NOT apply to code blocks.
*/
"@media screen and (max-width: 768px)": {
"@supports (-webkit-overflow-scrolling: touch)": {
".cm-content": {
fontSize: string;
};
};
};
}>;
export declare const cmClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
margin: string;
outline: string;
height: string;
}>;
export declare const readOnlyClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
[x: string]: string | {
right: string;
};
fontFamily: string;
fontSize: string;
position: string;
right: string;
bottom: string;
zIndex: string;
color: string;
backgroundColor: string;
borderRadius: string;
padding: string;
}>;
@@ -0,0 +1,6 @@
import type { HighlightStyle, LanguageSupport } from "@codemirror/language";
export declare const useSyntaxHighlight: ({ langSupport, highlightTheme, code, }: {
langSupport: LanguageSupport;
highlightTheme: HighlightStyle;
code?: string | undefined;
}) => React.ReactNode[];
@@ -0,0 +1,15 @@
import type { LanguageSupport } from "@codemirror/language";
import { HighlightStyle } from "@codemirror/language";
import type { Extension, Text } from "@codemirror/state";
import * as React from "react";
import type { CustomLanguage, SandpackTheme } from "../../types";
export declare const getCodeMirrorPosition: (doc: Text, { line, column }: {
line: number;
column?: number | undefined;
}) => number;
export declare const getEditorTheme: () => Extension;
export declare const styleTokens: () => Record<string, string>;
export declare const getSyntaxHighlight: (theme: SandpackTheme) => HighlightStyle;
export declare const getLanguageFromFile: (filePath: string | undefined, fileType: string | undefined, additionalLanguages: CustomLanguage[]) => string;
export declare const getCodeMirrorLanguage: (extension: string, additionalLanguages: CustomLanguage[]) => LanguageSupport;
export declare const useCombinedRefs: <T>(...refs: React.Ref<T>[]) => React.Ref<T>;
@@ -0,0 +1,27 @@
import * as React from "react";
import type { CustomLanguage, SandpackInitMode } from "../..";
import type { Decorators } from "../CodeEditor/CodeMirror";
export interface CodeViewerProps {
showTabs?: boolean;
showLineNumbers?: boolean;
/**
* Provides a way to draw or style a piece of the content.
*/
decorators?: Decorators;
code?: string;
wrapContent?: boolean;
/**
* This provides a way to control how some components are going to
* be initialized on the page. The CodeEditor and the Preview components
* are quite expensive and might overload the memory usage, so this gives
* a certain control of when to initialize them.
*/
initMode?: SandpackInitMode;
/**
* Provides a way to add custom language modes by supplying a language
* type, applicable file extensions, and a LanguageSupport instance
* for that syntax mode
*/
additionalLanguages?: CustomLanguage[];
}
export declare const SandpackCodeViewer: React.ForwardRefExoticComponent<CodeViewerProps & React.RefAttributes<import("../CodeEditor/CodeMirror").CodeMirrorRef>>;
@@ -0,0 +1,5 @@
import * as React from "react";
import type { SandpackConsoleData } from "./utils/getType";
export declare const ConsoleList: React.FC<{
data: SandpackConsoleData;
}>;
@@ -0,0 +1,6 @@
import React from "react";
export declare const Header: React.FC<{
currentTab: "server" | "client";
setCurrentTab: (value: "server" | "client") => void;
node: boolean;
}>;
@@ -0,0 +1,26 @@
import * as React from "react";
import type { SandpackConsoleData } from "./utils/getType";
interface SandpackConsoleProps {
clientId?: string;
showHeader?: boolean;
showSyntaxError?: boolean;
showSetupProgress?: boolean;
showRestartButton?: boolean;
showResetConsoleButton?: boolean;
maxMessageCount?: number;
onLogsChange?: (logs: SandpackConsoleData) => void;
resetOnPreviewRestart?: boolean;
standalone?: boolean;
actionsChildren?: JSX.Element;
}
export interface SandpackConsoleRef {
reset: () => void;
}
/**
* `SandpackConsole` is a Sandpack devtool that allows printing
* the console logs from a Sandpack client. It is designed to be
* a light version of a browser console, which means that it's
* limited to a set of common use cases you may encounter when coding.
*/
export declare const SandpackConsole: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & SandpackConsoleProps & React.RefAttributes<SandpackConsoleRef>>;
export {};
@@ -0,0 +1,7 @@
import * as React from "react";
export declare const StdoutList: React.FC<{
data: Array<{
data: string;
id: string;
}>;
}>;
@@ -0,0 +1,2 @@
export { SandpackConsole } from "./SandpackConsole";
export { useSandpackConsole } from "./useSandpackConsole";
@@ -0,0 +1,15 @@
import type { SandpackConsoleData } from "./utils/getType";
/**
* It provides an interface to consume the logs from a sandpack client.
*
* @category Hooks
*/
export declare const useSandpackConsole: ({ clientId, maxMessageCount, showSyntaxError, resetOnPreviewRestart, }: {
clientId?: string | undefined;
maxMessageCount?: number | undefined;
showSyntaxError?: boolean | undefined;
resetOnPreviewRestart: boolean;
}) => {
logs: SandpackConsoleData;
reset: () => void;
};
@@ -0,0 +1,13 @@
export declare const SYNTAX_ERROR_PATTERN: string[];
export declare const CLEAR_LOG: {
id: string;
method: "clear";
data: string[];
};
export declare const TRANSFORMED_TYPE_KEY = "@t";
export declare const TRANSFORMED_TYPE_KEY_ALTERNATE = "#@t";
export declare const CIRCULAR_REF_KEY = "@r";
export declare const MAX_LENGTH_STRING = 10000;
export declare const MAX_NEST_LEVEL = 2;
export declare const MAX_KEYS = 400;
export declare const MAX_MESSAGE_COUNT: number;
@@ -0,0 +1,12 @@
import type { TransformsTypes } from "./transformers";
export type Message = null | string | number | undefined | Array<any> | Record<any, any> | Boolean | Symbol | {
"@r": number;
} | {
"@t": TransformsTypes;
data: {
name: string;
body: string;
proto: TransformsTypes;
};
};
export declare const fromConsoleToString: (message: Message, references: Array<Message>, level?: number) => string;
@@ -0,0 +1,7 @@
import type { SandpackMessageConsoleMethods } from "@codesandbox/sandpack-client";
export declare const getType: (message: SandpackMessageConsoleMethods) => "info" | "warning" | "error" | "clear";
export type SandpackConsoleData = Array<{
data: Array<string | Record<string, string>> | undefined;
id: string;
method: SandpackMessageConsoleMethods;
}>;
@@ -0,0 +1,4 @@
export type TransformsTypes = "Function" | "HTMLElement" | "[[NaN]]" | "[[undefined]]" | "[[Date]]" | "[[RegExp]]" | "[[Error]]" | "[[RegExp]]" | "[[Error]]" | "[[ArrayBuffer]]" | "[[TypedArray]]" | "[[Map]]" | "[[Set]]" | "Arithmetic";
type Transforms = Record<TransformsTypes, (...params: any) => any>;
export declare const transformers: Transforms;
export {};
@@ -0,0 +1,13 @@
import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client";
import * as React from "react";
import type { SandpackOptions } from "../../types";
import type { SandpackFileExplorerProp } from ".";
export interface Props extends SandpackFileExplorerProp {
prefixedPath: string;
files: SandpackBundlerFiles;
selectFile: (path: string) => void;
activeFile: NonNullable<SandpackOptions["activeFile"]>;
depth: number;
visibleFiles: NonNullable<SandpackOptions["visibleFiles"]>;
}
export declare const Directory: React.FC<Props>;
@@ -0,0 +1,10 @@
import * as React from "react";
export interface Props {
path: string;
selectFile?: (path: string) => void;
active?: boolean;
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
depth: number;
isDirOpen?: boolean;
}
export declare const File: React.FC<Props>;
@@ -0,0 +1,13 @@
import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client";
import * as React from "react";
import type { SandpackOptions } from "../../types";
import type { SandpackFileExplorerProp } from ".";
export interface ModuleListProps extends SandpackFileExplorerProp {
prefixedPath: string;
files: SandpackBundlerFiles;
selectFile: (path: string) => void;
activeFile: NonNullable<SandpackOptions["activeFile"]>;
depth?: number;
visibleFiles: NonNullable<SandpackOptions["visibleFiles"]>;
}
export declare const ModuleList: React.FC<ModuleListProps>;
@@ -0,0 +1,12 @@
import * as React from "react";
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 declare const SandpackFileExplorer: ({ className, autoHiddenFiles, initialCollapsedFolder, ...props }: SandpackFileExplorerProp & React.HTMLAttributes<HTMLDivElement>) => JSX.Element | null;
@@ -0,0 +1,10 @@
import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client";
export declare const fromPropsToModules: ({ autoHiddenFiles, visibleFiles, files, prefixedPath, }: {
prefixedPath: string;
files: SandpackBundlerFiles;
autoHiddenFiles?: boolean | undefined;
visibleFiles: string[];
}) => {
directories: string[];
modules: string[];
};
@@ -0,0 +1,31 @@
import * as React from "react";
export declare const tabButton: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
[x: string]: string | {
outline: string;
visibility?: undefined;
} | {
visibility: string;
outline?: undefined;
};
padding: string;
height: string;
whiteSpace: string;
"&:focus": {
outline: string;
};
}>;
export interface FileTabsProps {
/**
* This adds a close button next to each file with a unique trigger to close it.
*/
closableTabs?: boolean;
/**
* unique id appended with active files. This is
* used in aria-controls value along the combination of activeFile
*/
activeFileUniqueId?: string;
}
/**
* FileTabs is a list of all open files, the active file, and its state.
*/
export declare const FileTabs: ({ closableTabs, className, activeFileUniqueId, ...props }: FileTabsProps & React.HTMLAttributes<HTMLDivElement>) => JSX.Element;
@@ -0,0 +1,7 @@
import * as React from "react";
export interface NavigatorProps {
clientId: string;
onURLChange?: (newURL: string) => void;
startRoute?: string;
}
export declare const Navigator: ({ clientId, onURLChange, className, startRoute, ...props }: NavigatorProps & React.HTMLAttributes<HTMLDivElement>) => JSX.Element;
@@ -0,0 +1 @@
export declare const splitUrl: (url: string) => string[];
@@ -0,0 +1,30 @@
import type { SandpackClient } from "@codesandbox/sandpack-client";
import * as React from "react";
export interface PreviewProps {
style?: React.CSSProperties;
showNavigator?: boolean;
showOpenInCodeSandbox?: boolean;
showRefreshButton?: boolean;
showRestartButton?: boolean;
/**
* Whether to show the `<ErrorOverlay>` component on top of
* the preview, if a runtime error happens.
*/
showSandpackErrorOverlay?: boolean;
showOpenNewtab?: boolean;
actionsChildren?: JSX.Element;
children?: JSX.Element;
startRoute?: string;
}
export interface SandpackPreviewRef {
/**
* Retrieve the current Sandpack client instance from preview
*/
getClient: () => InstanceType<typeof SandpackClient> | null;
/**
* Returns the client id, which will be used to
* initialize a client in the main Sandpack context
*/
clientId: string;
}
export declare const SandpackPreview: React.ForwardRefExoticComponent<PreviewProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<SandpackPreviewRef>>;
@@ -0,0 +1,7 @@
import * as React from "react";
type DevToolsTheme = "dark" | "light" | "auto";
export declare const SandpackReactDevTools: ({ clientId, theme, className, ...props }: {
clientId?: string | undefined;
theme?: DevToolsTheme | undefined;
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element | null;
export {};
@@ -0,0 +1,10 @@
import * as React from "react";
import type { Test } from "./Tests";
export interface Describe {
name: string;
tests: Record<string, Test>;
describes: Record<string, Describe>;
}
export declare const Describes: React.FC<{
describes: Describe[];
}>;
@@ -0,0 +1,8 @@
import type { TestError } from "@codesandbox/sandpack-client";
import * as React from "react";
interface Props {
error: TestError;
path: string;
}
export declare const FormattedError: React.FC<Props>;
export {};
@@ -0,0 +1,17 @@
import * as React from "react";
import type { Status } from "./SandpackTests";
interface Props {
setVerbose: () => void;
setSuiteOnly: () => void;
verbose: boolean;
suiteOnly: boolean;
status: Status;
watchMode: boolean;
setWatchMode: () => void;
showSuitesOnly: boolean;
showVerboseButton: boolean;
showWatchButton: boolean;
hideTestsAndSupressLogs: boolean;
}
export declare const Header: React.FC<Props>;
export {};
@@ -0,0 +1,4 @@
import * as React from "react";
export declare const RunButton: React.FC<{
onClick: () => void;
}>;
@@ -0,0 +1,17 @@
import * as React from "react";
import type { Spec } from "./Specs";
export type Status = "initialising" | "idle" | "running" | "complete";
export declare const SandpackTests: React.FC<{
verbose?: boolean;
watchMode?: boolean;
onComplete?: (specs: Record<string, Spec>) => void;
actionsChildren?: JSX.Element;
showVerboseButton?: boolean;
showWatchButton?: boolean;
/**
* Hide the tests and supress logs
* If `true` the tests will be hidden and the logs will be supressed. This is useful when you want to run tests in the background and don't want to show the tests to the user.
* @default false
*/
hideTestsAndSupressLogs?: boolean;
} & React.HtmlHTMLAttributes<HTMLDivElement>>;
@@ -0,0 +1,16 @@
import type { TestError } from "@codesandbox/sandpack-client";
import * as React from "react";
import type { Describe } from "./Describes";
import type { Status } from "./SandpackTests";
export type Spec = {
error?: TestError;
} & Describe;
interface Props {
specs: Spec[];
verbose: boolean;
status: Status;
openSpec: (name: string) => void;
hideTestsAndSupressLogs?: boolean;
}
export declare const Specs: React.FC<Props>;
export {};
@@ -0,0 +1,19 @@
import * as React from "react";
export interface TestResults {
pass: number;
fail: number;
skip: number;
total: number;
}
export interface SuiteResults {
pass: number;
fail: number;
total: number;
}
interface Props {
suites: SuiteResults;
tests: TestResults;
duration: number;
}
export declare const Summary: React.FC<Props>;
export {};
@@ -0,0 +1,16 @@
import type { TestError } from "@codesandbox/sandpack-client";
import React from "react";
type TestStatus = "idle" | "running" | "pass" | "fail";
export interface Test {
name: string;
blocks: string[];
status: TestStatus;
path: string;
errors: TestError[];
duration?: number | undefined;
}
interface SandpackTests extends React.HtmlHTMLAttributes<HTMLDivElement> {
tests: Test[];
}
export declare const Tests: React.FC<SandpackTests>;
export {};
@@ -0,0 +1 @@
export { SandpackTests } from "./SandpackTests";
@@ -0,0 +1,36 @@
export declare const setTestTheme: (isDark: boolean) => Record<string, string>;
export declare const passTextClassName: string & {
className: string;
selector: string;
props: {};
};
export declare const failTextClassName: string & {
className: string;
selector: string;
props: {};
};
export declare const skipTextClassName: string & {
className: string;
selector: string;
props: {};
};
export declare const titleTextClassName: string & {
className: string;
selector: string;
props: {};
};
export declare const runBackgroundClassName: string & {
className: string;
selector: string;
props: {};
};
export declare const passBackgroundClassName: string & {
className: string;
selector: string;
props: {};
};
export declare const failBackgroundClassName: string & {
className: string;
selector: string;
props: {};
};
@@ -0,0 +1,13 @@
import type { Describe } from "./Describes";
import type { Spec } from "./Specs";
import type { SuiteResults, TestResults } from "./Summary";
import type { Test } from "./Tests";
export declare const getFailingTests: (block: Describe | Spec) => Test[];
export declare const getAllTestResults: (specs: Spec[]) => TestResults;
export declare const getSpecTestResults: (spec: Spec) => TestResults;
export declare const getAllSuiteResults: (specs: Spec[]) => SuiteResults;
export declare const getDuration: (specs: Spec[]) => number;
export declare const isEmpty: (block: Spec | Describe) => boolean;
export declare const splitTail: <A>(as: A[]) => [A[], A | undefined];
export declare const flatMap: <A, B>(as: A[], f: (a: A) => B[]) => B[];
export declare const set: (path: string[], value: unknown) => <A extends Record<string, any>>(object: A) => A;
@@ -0,0 +1,3 @@
import * as React from "react";
import type { CodeViewerProps } from "../CodeViewer";
export declare const SandpackTranspiledCode: ({ className, ...props }: CodeViewerProps & React.HTMLAttributes<HTMLDivElement>) => JSX.Element;
@@ -0,0 +1,4 @@
/// <reference types="react" />
export declare const DependenciesProgress: React.FC<{
clientId?: string;
}>;
@@ -0,0 +1,5 @@
import * as React from "react";
export type ErrorOverlayProps = React.HTMLAttributes<HTMLDivElement> & {
children?: React.ReactNode;
};
export declare const ErrorOverlay: React.FC<ErrorOverlayProps>;
@@ -0,0 +1,57 @@
import * as React from "react";
export interface SandpackLayoutProps extends React.HtmlHTMLAttributes<unknown> {
children?: React.ReactNode;
}
export declare const layoutClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
[x: string]: string | number | {
flexGrow: number;
flexShrink: number;
flexBasis: string;
height: string;
overflow: string;
"@media print": {
height: string;
display: string;
};
"@media screen and (max-width: 768px)": {
"&:not(.sp-preview, .sp-editor, .sp-preset-column)": {
height: string;
};
minWidth: string;
flex?: undefined;
};
flex?: undefined;
minWidth?: undefined;
} | {
flex: number;
minWidth: number;
"@media screen and (max-width: 768px)": {
flex: number;
"&:not(.sp-preview, .sp-editor, .sp-preset-column)"?: undefined;
minWidth?: undefined;
};
flexGrow?: undefined;
flexShrink?: undefined;
flexBasis?: undefined;
height?: undefined;
overflow?: undefined;
"@media print"?: undefined;
};
border: string;
display: string;
flexWrap: string;
alignItems: string;
borderRadius: string;
overflow: string;
position: string;
backgroundColor: string;
gap: number;
"> .sp-file-explorer": {
flex: number;
minWidth: number;
"@media screen and (max-width: 768px)": {
flex: number;
};
};
}>;
export declare const SandpackLayout: React.ForwardRefExoticComponent<SandpackLayoutProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,4 @@
import * as React from "react";
export declare const Loading: ({ className, showOpenInCodeSandbox, ...props }: React.HTMLAttributes<HTMLDivElement> & {
showOpenInCodeSandbox: boolean;
}) => JSX.Element;
@@ -0,0 +1,11 @@
import * as React from "react";
export interface LoadingOverlayProps {
clientId?: string;
/**
* It enforces keeping the loading state visible,
* which is helpful for external loading states.
*/
loading?: boolean;
showOpenInCodeSandbox: boolean;
}
export declare const LoadingOverlay: React.FC<LoadingOverlayProps & React.HTMLAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
/// <reference types="react" />
export declare const OpenInCodeSandboxButton: () => JSX.Element | null;
@@ -0,0 +1,6 @@
import * as React from "react";
import type { SandpackState } from "../../../types";
export declare const UnstyledOpenInCodeSandboxButton: React.FC<React.HtmlHTMLAttributes<unknown>>;
export declare const ExportToWorkspaceButton: React.FC<React.HtmlHTMLAttributes<unknown> & {
state: SandpackState;
}>;
@@ -0,0 +1,2 @@
export { OpenInCodeSandboxButton } from "./OpenInCodeSandboxButton";
export { UnstyledOpenInCodeSandboxButton } from "./UnstyledOpenInCodeSandboxButton";
@@ -0,0 +1,2 @@
import React from "react";
export declare const RoundedButton: React.FC<React.PropsWithChildren & React.ButtonHTMLAttributes<unknown>>;
@@ -0,0 +1,2 @@
import * as React from "react";
export declare const RunButton: React.FC<React.PropsWithChildren & React.ButtonHTMLAttributes<unknown>>;
@@ -0,0 +1,15 @@
import * as React from "react";
export declare const stackClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
display: string;
flexDirection: string;
width: string;
position: string;
backgroundColor: string;
gap: number;
"&:has(.sp-stack)": {
backgroundColor: string;
};
}>;
export declare const SandpackStack: React.FC<React.HTMLAttributes<HTMLDivElement> & {
children?: React.ReactNode;
}>;
@@ -0,0 +1,8 @@
export * from "./Layout";
export * from "./Stack";
export * from "./ErrorOverlay";
export * from "./LoadingOverlay";
export * from "./OpenInCodeSandboxButton";
export * from "./RunButton";
export * from "./RoundedButton";
export * from "./DependenciesProgress";
@@ -0,0 +1,15 @@
import * as React from "react";
export declare const SignInIcon: () => React.ReactElement;
export declare const SignOutIcon: () => React.ReactElement;
export declare const RestartIcon: () => React.ReactElement;
export declare const RunIcon: () => React.ReactElement;
export declare const BackwardIcon: () => React.ReactElement;
export declare const ForwardIcon: () => React.ReactElement;
export declare const RefreshIcon: () => React.ReactElement;
export declare const CleanIcon: () => React.ReactElement;
export declare const ExportIcon: () => React.ReactElement;
export declare const DirectoryIconOpen: () => React.ReactElement;
export declare const DirectoryIconClosed: () => React.ReactElement;
export declare const FileIcon: () => React.ReactElement;
export declare const CloseIcon: () => React.ReactElement;
export declare const ConsoleIcon: () => React.ReactElement;
+9
View File
@@ -0,0 +1,9 @@
export * from "./CodeEditor";
export * from "./CodeViewer";
export * from "./FileExplorer";
export * from "./FileTabs";
export * from "./Navigator";
export * from "./Preview";
export * from "./TranspiledCode";
export * from "./Tests";
export * from "./Console";
@@ -0,0 +1,9 @@
import * as React from "react";
import type { SandpackContext, SandpackProviderProps } from "../types";
declare const Sandpack: React.Context<SandpackContext | null>;
export declare const SandpackProvider: React.FC<SandpackProviderProps>;
/**
* @category Provider
*/
declare const SandpackConsumer: React.Consumer<SandpackContext | null>;
export { SandpackConsumer, Sandpack as SandpackReactContext };
@@ -0,0 +1,8 @@
import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client";
import type { SandpackProviderProps } from "../..";
interface SandpackAppState {
editorState: "pristine" | "dirty";
}
type UseAppState = (props: SandpackProviderProps, files: SandpackBundlerFiles) => SandpackAppState;
export declare const useAppState: UseAppState;
export {};
@@ -0,0 +1,32 @@
/// <reference types="react" />
import type { BundlerState, ListenerFunction, ReactDevToolsMode, SandpackError, SandpackMessage, UnsubscribeFunction, SandpackClient } from "@codesandbox/sandpack-client";
import type { SandpackInitMode, SandpackProviderProps, SandpackStatus } from "../..";
import type { FilesState } from "./useFiles";
type SandpackClientType = InstanceType<typeof SandpackClient>;
interface SandpackConfigState {
reactDevTools?: ReactDevToolsMode;
startRoute?: string;
initMode: SandpackInitMode;
bundlerState: BundlerState | undefined;
error: SandpackError | null;
status: SandpackStatus;
}
export interface ClientPropsOverride {
startRoute?: string;
}
export interface UseClientOperations {
clients: Record<string, SandpackClientType>;
initializeSandpackIframe: () => void;
runSandpack: () => Promise<void>;
unregisterBundler: (clientId: string) => void;
registerBundler: (iframe: HTMLIFrameElement, clientId: string, clientPropsOverride?: ClientPropsOverride) => Promise<void>;
registerReactDevTools: (value: ReactDevToolsMode) => void;
addListener: (listener: ListenerFunction, clientId?: string) => UnsubscribeFunction;
dispatchMessage: (message: SandpackMessage, clientId?: string) => void;
lazyAnchorRef: React.RefObject<HTMLDivElement>;
unsubscribeClientListenersRef: React.MutableRefObject<Record<string, Record<string, UnsubscribeFunction>>>;
queuedListenersRef: React.MutableRefObject<Record<string, Record<string, ListenerFunction>>>;
}
type UseClient = (props: SandpackProviderProps, filesState: FilesState) => [SandpackConfigState, UseClientOperations];
export declare const useClient: UseClient;
export {};
@@ -0,0 +1,28 @@
import type { SandpackBundlerFiles } from "@codesandbox/sandpack-client";
import type { SandboxEnvironment, SandpackFiles, SandpackPredefinedTemplate, SandpackProviderProps, TemplateFiles } from "../..";
export interface FilesState {
files: SandpackBundlerFiles;
environment?: SandboxEnvironment;
visibleFiles: Array<TemplateFiles<SandpackPredefinedTemplate> | string>;
activeFile: TemplateFiles<SandpackPredefinedTemplate> | string;
shouldUpdatePreview: boolean;
}
interface FilesOperations {
openFile: (path: string) => void;
resetFile: (path: string) => void;
resetAllFiles: () => void;
setActiveFile: (path: string) => void;
updateCurrentFile: (code: string, shouldUpdatePreview?: boolean) => void;
updateFile: (pathOrFiles: string | SandpackFiles, code?: string, shouldUpdatePreview?: boolean) => void;
addFile: (pathOrFiles: string | SandpackFiles, code?: string, shouldUpdatePreview?: boolean) => void;
closeFile: (path: string) => void;
deleteFile: (path: string, shouldUpdatePreview?: boolean) => void;
}
export type UseFiles = (props: SandpackProviderProps) => [
FilesState & {
visibleFilesFromProps: Array<TemplateFiles<SandpackPredefinedTemplate> | string>;
},
FilesOperations
];
export declare const useFiles: UseFiles;
export {};
+11
View File
@@ -0,0 +1,11 @@
export * from "./useActiveCode";
export * from "./useErrorMessage";
export * from "./useLoadingOverlayState";
export * from "./useSandpack";
export * from "./useSandpackNavigation";
export * from "./useSandpackTheme";
export * from "./useTranspiledCode";
export * from "./useSandpackClient";
export * from "./useSandpackShell";
export * from "./useSandpackPreviewProgress";
export * from "./useSandpackShellStdout";
+11
View File
@@ -0,0 +1,11 @@
/**
* This returns the current state of the active file
* and a method to update its content.
*
* @category Hooks
*/
export declare const useActiveCode: () => {
code: string;
readOnly: boolean;
updateCode: (newCode: string, shouldUpdatePreview?: boolean) => void;
};
@@ -0,0 +1,4 @@
/**
* @category Hooks
*/
export declare const useErrorMessage: () => string | null;
@@ -0,0 +1,6 @@
export type LoadingOverlayState = "LOADING" | "PRE_FADING" | "FADING" | "HIDDEN" | "TIMEOUT";
export declare const FADE_ANIMATION_DURATION = 200;
/**
* @category Hooks
*/
export declare const useLoadingOverlayState: (clientId?: string, externalLoading?: boolean) => LoadingOverlayState;
+13
View File
@@ -0,0 +1,13 @@
import type { SandpackClientDispatch, SandpackClientListen, SandpackState } from "../types";
/**
* @category Hooks
*/
export interface UseSandpack {
sandpack: SandpackState;
dispatch: SandpackClientDispatch;
listen: SandpackClientListen;
}
/**
* @category Hooks
*/
export declare function useSandpack(): UseSandpack;
@@ -0,0 +1,22 @@
import type { ListenerFunction, SandpackClient, SandpackMessage, UnsubscribeFunction } from "@codesandbox/sandpack-client";
import * as React from "react";
import type { ClientPropsOverride } from "../contexts/utils/useClient";
import type { SandpackState } from "../types";
interface UseSandpackClient {
sandpack: SandpackState;
getClient: () => InstanceType<typeof SandpackClient> | null;
iframe: React.MutableRefObject<HTMLIFrameElement | null>;
listen: (listener: ListenerFunction) => UnsubscribeFunction;
dispatch: (message: SandpackMessage) => void;
clientId: string;
}
/**
* It registers a new sandpack client and returns its instance,
* listeners, and dispatch function. Using it when creating a custom
* component to interact directly with the client is recommended.
* For other cases, use `useSandpack` instead.
*
* @category Hooks
*/
export declare const useSandpackClient: (clientPropsOverride?: ClientPropsOverride) => UseSandpackClient;
export {};
@@ -0,0 +1,8 @@
/**
* @category Hooks
*/
export declare const useSandpackNavigation: (clientId?: string) => {
refresh: () => void;
back: () => void;
forward: () => void;
};
@@ -0,0 +1,4 @@
export declare const useSandpackPreviewProgress: (props: {
timeout?: number | undefined;
clientId?: string | undefined;
} | undefined) => string | null;
@@ -0,0 +1,7 @@
/**
* @category Hooks
*/
export declare const useSandpackShell: (clientId?: string) => {
restart: () => void;
openPreview: () => void;
};
@@ -0,0 +1,11 @@
export declare const useSandpackShellStdout: ({ clientId, maxMessageCount, resetOnPreviewRestart, }: {
clientId?: string | undefined;
maxMessageCount?: number | undefined;
resetOnPreviewRestart?: boolean | undefined;
}) => {
logs: Array<{
id: string;
data: string;
}>;
reset: () => void;
};
@@ -0,0 +1,9 @@
import type { SandpackTheme } from "../types";
/**
* @category Hooks
*/
export declare const useSandpackTheme: () => {
theme: SandpackTheme;
themeId: string;
themeMode: "dark" | "light" | "auto";
};
@@ -0,0 +1,4 @@
/**
* @category Hooks
*/
export declare const useTranspiledCode: () => string | null;
+12
View File
@@ -0,0 +1,12 @@
export * from "./components/icons";
export * from "./components";
export * from "./components/common";
export * from "./hooks";
export { useClassNames } from "./utils/classNames";
export { getCssText as getSandpackCssText } from "./styles";
export * from "./styles/themeContext";
export * from "./contexts/sandpackContext";
export * from "./presets/";
export * from "./themes";
export * from "./types";
export * from "./templates";
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2
View File
@@ -0,0 +1,2 @@
import type { SandpackInternal } from "../types";
export declare const Sandpack: SandpackInternal;
+1
View File
@@ -0,0 +1 @@
export * from "./Sandpack";
+1
View File
@@ -0,0 +1 @@
export {};
+93
View File
@@ -0,0 +1,93 @@
import type { SandpackTheme, SandpackThemeProp } from "../types";
/**
* @category Theme
*/
export declare const THEME_PREFIX = "sp";
/**
* @category Theme
*/
export declare const createTheme: (<Argument0 extends string | ({} & {
[x: string]: {
[x: string]: string | number | boolean;
[x: number]: string | number | boolean;
};
}), Argument1 extends string | ({} & {
[x: string]: {
[x: string]: string | number | boolean;
[x: number]: string | number | boolean;
};
})>(nameOrScalesArg0: Argument0, nameOrScalesArg1?: Argument1 | undefined) => string & {
className: string;
selector: string;
} & (Argument0 extends string ? import("@stitches/core/types/stitches").ThemeTokens<Argument1, ""> : import("@stitches/core/types/stitches").ThemeTokens<Argument0, "">)) | (<Argument0_1 extends string | ({} & {
[x: string]: {
[x: string]: string | number | boolean;
[x: number]: string | number | boolean;
};
}), Argument1_1 extends string | ({} & {
[x: string]: {
[x: string]: string | number | boolean;
[x: number]: string | number | boolean;
};
})>(nameOrScalesArg0: Argument0_1, nameOrScalesArg1?: Argument1_1 | undefined) => string & {
className: string;
selector: string;
} & (Argument0_1 extends string ? import("@stitches/core/types/stitches").ThemeTokens<Argument1_1, "sp"> : import("@stitches/core/types/stitches").ThemeTokens<Argument0_1, "sp">)), css: (<Composers extends (string | import("@stitches/core/types/util").Function | {
[name: string]: unknown;
})[], CSS = import("@stitches/core/types/css-util").CSS<{}, {}, {}, {}>>(...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("@stitches/core/types/util").Function ? Composers[K] : import("@stitches/core/types/stitches").RemoveIndex<CSS> & {
variants?: {
[x: string]: {
[x: string]: CSS;
[x: number]: CSS;
};
} | undefined;
compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/core/types/util").String | import("@stitches/core/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("@stitches/core/types/util").WideObject) & {
css: CSS;
})[] | undefined;
defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/core/types/util").String | import("@stitches/core/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("@stitches/core/types/util").WideObject) | undefined;
} & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("@stitches/core/types/styled-component").CssComponent<import("@stitches/core/types/styled-component").StyledComponentType<Composers>, import("@stitches/core/types/styled-component").StyledComponentProps<Composers>, {}, CSS>) | (<Composers_1 extends (string | import("@stitches/core/types/util").Function | {
[name: string]: unknown;
})[], CSS_1 = import("@stitches/core/types/css-util").CSS<{}, {}, import("@stitches/core/types/config").DefaultThemeMap, {}>>(...composers: { [K_1 in keyof Composers_1]: string extends Composers_1[K_1] ? Composers_1[K_1] : Composers_1[K_1] extends string | import("@stitches/core/types/util").Function ? Composers_1[K_1] : import("@stitches/core/types/stitches").RemoveIndex<CSS_1> & {
variants?: {
[x: string]: {
[x: string]: CSS_1;
[x: number]: CSS_1;
};
} | undefined;
compoundVariants?: (("variants" extends keyof Composers_1[K_1] ? { [Name_2 in keyof Composers_1[K_1][keyof Composers_1[K_1] & "variants"]]?: import("@stitches/core/types/util").String | import("@stitches/core/types/util").Widen<keyof Composers_1[K_1][keyof Composers_1[K_1] & "variants"][Name_2]> | undefined; } : import("@stitches/core/types/util").WideObject) & {
css: CSS_1;
})[] | undefined;
defaultVariants?: ("variants" extends keyof Composers_1[K_1] ? { [Name_3 in keyof Composers_1[K_1][keyof Composers_1[K_1] & "variants"]]?: import("@stitches/core/types/util").String | import("@stitches/core/types/util").Widen<keyof Composers_1[K_1][keyof Composers_1[K_1] & "variants"][Name_3]> | undefined; } : import("@stitches/core/types/util").WideObject) | undefined;
} & CSS_1 & { [K2_1 in keyof Composers_1[K_1]]: K2_1 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2_1 extends keyof CSS_1 ? CSS_1[K2_1] : unknown; }; }) => import("@stitches/core/types/styled-component").CssComponent<import("@stitches/core/types/styled-component").StyledComponentType<Composers_1>, import("@stitches/core/types/styled-component").StyledComponentProps<Composers_1>, {}, CSS_1>), getCssText: () => string, keyframes: ((style: {
[offset: string]: import("@stitches/core/types/css-util").CSS<{}, {}, {}, {}>;
}) => {
(): string;
name: string;
}) | ((style: {
[offset: string]: import("@stitches/core/types/css-util").CSS<{}, {}, import("@stitches/core/types/config").DefaultThemeMap, {}>;
}) => {
(): string;
name: string;
});
/**
* @category Theme
*/
export declare const standardizeStitchesTheme: (theme: SandpackTheme) => Record<string, Record<string, string>>;
/**
* @category Theme
*/
export declare const standardizeTheme: (inputTheme?: SandpackThemeProp) => {
id: string;
theme: SandpackTheme;
mode: "dark" | "light";
};
/**
* The fake `css` function used to match the real `css` function usage
* We use this for the unstyled bundle which do not need real class names
* `css` is a factory which return a className generator, but also it be used in scenarios which `toString` will be invoked
* so we also need to add the `toString` method to it.
*/
export declare const fakeCss: {
(): string;
toString: any;
};
+130
View File
@@ -0,0 +1,130 @@
export declare const iconStandaloneClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
svg: {
margin: string;
};
}>;
export declare const buttonClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
[x: string]: string | number | {
color: string;
minWidth?: undefined;
width?: undefined;
height?: undefined;
padding?: undefined;
display?: undefined;
paddingRight?: undefined;
paddingLeft?: undefined;
gap?: undefined;
} | {
minWidth: string;
width: string;
height: string;
color?: undefined;
padding?: undefined;
display?: undefined;
paddingRight?: undefined;
paddingLeft?: undefined;
gap?: undefined;
} | {
padding: string;
height: string;
display: string;
color?: undefined;
minWidth?: undefined;
width?: undefined;
paddingRight?: undefined;
paddingLeft?: undefined;
gap?: undefined;
} | {
width: string;
color?: undefined;
minWidth?: undefined;
height?: undefined;
padding?: undefined;
display?: undefined;
paddingRight?: undefined;
paddingLeft?: undefined;
gap?: undefined;
} | {
paddingRight: string;
paddingLeft: string;
gap: string;
color?: undefined;
minWidth?: undefined;
width?: undefined;
height?: undefined;
padding?: undefined;
display?: undefined;
};
appearance: string;
outline: string;
display: string;
alignItems: string;
fontSize: string;
fontFamily: string;
backgroundColor: string;
transition: string;
cursor: string;
color: string;
border: number;
textDecoration: string;
"&:disabled": {
color: string;
};
"&:hover:not(:disabled,[data-active='true'])": {
color: string;
};
'&[data-active="true"]': {
color: string;
};
svg: {
minWidth: string;
width: string;
height: string;
};
}>;
export declare const roundedButtonClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
backgroundColor: string;
borderRadius: string;
border: string;
'&[data-active="true"]': {
color: string;
background: string;
};
"&:hover:not(:disabled,[data-active='true'])": {
backgroundColor: string;
};
}>;
export declare const iconClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
padding: number;
}>;
export declare const fadeIn: {
(): string;
name: string;
};
export declare const absoluteClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
position: string;
bottom: string;
left: string;
right: string;
top: string;
margin: string;
overflow: string;
height: string;
zIndex: string;
}>;
export declare const errorClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
backgroundColor: string;
}>;
export declare const errorBundlerClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
[x: string]: string | {
marginTop: string;
width: string;
gap: string;
padding: string;
};
padding: string;
backgroundColor: string;
}>;
export declare const errorMessageClassName: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, {
fontFamily: string;
}>;
@@ -0,0 +1,2 @@
import type Stitches from "@stitches/core/types/stitches";
export declare const createStitchesMock: Stitches<"", {}, {}, {}, {}>;
+20
View File
@@ -0,0 +1,20 @@
import * as React from "react";
import type { SandpackTheme, SandpackThemeProp } from "../types";
declare const SandpackThemeContext: React.Context<{
theme: SandpackTheme;
id: string;
mode: "dark" | "light" | "auto";
}>;
/**
* @category Theme
*/
declare const SandpackThemeProvider: React.FC<React.HTMLAttributes<HTMLDivElement> & {
theme?: SandpackThemeProp;
children?: React.ReactNode;
}>;
declare const SandpackThemeConsumer: React.Consumer<{
theme: SandpackTheme;
id: string;
mode: "dark" | "light" | "auto";
}>;
export { SandpackThemeProvider, SandpackThemeConsumer, SandpackThemeContext };
+5
View File
@@ -0,0 +1,5 @@
export declare const commonFiles: {
"/styles.css": {
code: string;
};
};
+548
View File
@@ -0,0 +1,548 @@
export { ASTRO_TEMPLATE } from "./node/astro";
export { ANGULAR_TEMPLATE } from "./runtime/angular";
export { REACT_TEMPLATE } from "./runtime/react";
export { REACT_TYPESCRIPT_TEMPLATE } from "./runtime/react-typescript";
export { SOLID_TEMPLATE } from "./runtime/solid";
export { SVELTE_TEMPLATE } from "./runtime/svelte";
export { TEST_TYPESCRIPT_TEMPLATE } from "./runtime/tests-ts";
export { VANILLA_TEMPLATE } from "./runtime/vanilla";
export { VANILLA_TYPESCRIPT_TEMPLATE } from "./runtime/vanilla-typescript";
export { VUE_TEMPLATE } from "./runtime/vue";
export declare const SANDBOX_TEMPLATES: {
static: {
files: {
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
angular: {
files: {
"/src/app/app.component.css": {
code: string;
};
"/src/app/app.component.html": {
code: string;
};
"/src/app/app.component.ts": {
code: string;
};
"/src/app/app.module.ts": {
code: string;
};
"/src/index.html": {
code: string;
};
"/src/main.ts": {
code: string;
};
"/src/polyfills.ts": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
react: {
files: {
"/App.js": {
code: string;
};
"/index.js": {
code: string;
};
"/public/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
"react-ts": {
files: {
"tsconfig.json": {
code: string;
};
"/App.tsx": {
code: string;
};
"/index.tsx": {
code: string;
};
"/public/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
solid: {
files: {
"/App.tsx": {
code: string;
};
"/index.tsx": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
svelte: {
files: {
"/App.svelte": {
code: string;
};
"/index.js": {
code: string;
};
"/public/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
"test-ts": {
files: {
"tsconfig.json": {
code: string;
};
"/add.ts": {
code: string;
};
"/add.test.ts": {
code: string;
};
"package.json": {
code: string;
};
};
main: string;
environment: string;
mode: string;
};
"vanilla-ts": {
files: {
"tsconfig.json": {
code: string;
};
"/index.ts": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
vanilla: {
files: {
"/index.js": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
vue: {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.vue": {
code: string;
};
"/src/main.js": {
code: string;
};
"/public/index.html": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
"vue-ts": {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.vue": {
code: string;
};
"/src/main.ts": {
code: string;
};
"/src/shims-vue.d.ts": string;
"/public/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/tsconfig.json": {
code: string;
};
};
main: string;
environment: string;
};
node: {
files: {
"/index.js": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
nextjs: {
files: {
"/pages/_app.js": {
code: string;
};
"/pages/index.js": {
code: string;
};
"/next.config.js": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
vite: {
files: {
"/index.js": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
"vite-react": {
files: {
"/App.jsx": {
code: string;
};
"/index.jsx": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/vite.config.js": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
"vite-react-ts": {
files: {
"/App.tsx": {
code: string;
};
"/index.tsx": {
code: string;
};
"/index.html": {
code: string;
};
"/tsconfig.json": {
code: string;
};
"/tsconfig.node.json": {
code: string;
};
"/package.json": {
code: string;
};
"/vite-env.d.ts": {
code: string;
};
"/vite.config.ts": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
"vite-preact": {
files: {
"/App.jsx": {
code: string;
};
"/index.jsx": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/vite.config.js": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
"vite-preact-ts": {
files: {
"/App.tsx": {
code: string;
};
"/index.tsx": {
code: string;
};
"/index.html": {
code: string;
};
"/tsconfig.json": {
code: string;
};
"/tsconfig.node.json": {
code: string;
};
"/package.json": {
code: string;
};
"/vite-env.d.ts": {
code: string;
};
"/vite.config.ts": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
"vite-vue": {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.vue": {
code: string;
};
"/src/main.js": {
code: string;
};
"/index.html": {
code: string;
};
"/vite.config.js": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
"vite-vue-ts": {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.vue": {
code: string;
};
"/src/main.ts": {
code: string;
};
"/index.html": {
code: string;
};
"/vite-env.d.ts": {
code: string;
};
"/vite.config.ts": {
code: string;
};
"tsconfig.json": {
code: string;
};
"tsconfig.node.json": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
"vite-svelte": {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.svelte": {
code: string;
};
"/src/main.js": {
code: string;
};
"/index.html": {
code: string;
};
"/vite.config.js": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
"vite-svelte-ts": {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.svelte": {
code: string;
};
"/src/main.ts": {
code: string;
};
"/index.html": {
code: string;
};
"/vite-env.d.ts": {
code: string;
};
"svelte.config.js": {
code: string;
};
"/vite.config.ts": {
code: string;
};
"tsconfig.json": {
code: string;
};
"tsconfig.node.json": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
astro: {
files: {
"/src/styles.css": {
code: string;
};
"/src/pages/index.astro": {
code: string;
};
".env": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
};
@@ -0,0 +1,21 @@
/**
* @hidden
*/
export declare const ASTRO_TEMPLATE: {
files: {
"/src/styles.css": {
code: string;
};
"/src/pages/index.astro": {
code: string;
};
".env": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,21 @@
export declare const NEXTJS_TEMPLATE: {
files: {
"/pages/_app.js": {
code: string;
};
"/pages/index.js": {
code: string;
};
"/next.config.js": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
+12
View File
@@ -0,0 +1,12 @@
export declare const NODE_TEMPLATE: {
files: {
"/index.js": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,33 @@
export declare const VITE_PREACT_TS_TEMPLATE: {
files: {
"/App.tsx": {
code: string;
};
"/index.tsx": {
code: string;
};
"/index.html": {
code: string;
};
"/tsconfig.json": {
code: string;
};
"/tsconfig.node.json": {
code: string;
};
"/package.json": {
code: string;
};
"/vite-env.d.ts": {
code: string;
};
"/vite.config.ts": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,24 @@
export declare const VITE_PREACT_TEMPLATE: {
files: {
"/App.jsx": {
code: string;
};
"/index.jsx": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/vite.config.js": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,33 @@
export declare const VITE_REACT_TS_TEMPLATE: {
files: {
"/App.tsx": {
code: string;
};
"/index.tsx": {
code: string;
};
"/index.html": {
code: string;
};
"/tsconfig.json": {
code: string;
};
"/tsconfig.node.json": {
code: string;
};
"/package.json": {
code: string;
};
"/vite-env.d.ts": {
code: string;
};
"/vite.config.ts": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,24 @@
export declare const VITE_REACT_TEMPLATE: {
files: {
"/App.jsx": {
code: string;
};
"/index.jsx": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/vite.config.js": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,36 @@
export declare const VITE_SVELTE_TS_TEMPLATE: {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.svelte": {
code: string;
};
"/src/main.ts": {
code: string;
};
"/index.html": {
code: string;
};
"/vite-env.d.ts": {
code: string;
};
"svelte.config.js": {
code: string;
};
"/vite.config.ts": {
code: string;
};
"tsconfig.json": {
code: string;
};
"tsconfig.node.json": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,24 @@
export declare const VITE_SVELTE_TEMPLATE: {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.svelte": {
code: string;
};
"/src/main.js": {
code: string;
};
"/index.html": {
code: string;
};
"/vite.config.js": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,33 @@
export declare const VITE_VUE_TS_TEMPLATE: {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.vue": {
code: string;
};
"/src/main.ts": {
code: string;
};
"/index.html": {
code: string;
};
"/vite-env.d.ts": {
code: string;
};
"/vite.config.ts": {
code: string;
};
"tsconfig.json": {
code: string;
};
"tsconfig.node.json": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,24 @@
export declare const VITE_VUE_TEMPLATE: {
files: {
"/src/styles.css": {
code: string;
};
"/src/App.vue": {
code: string;
};
"/src/main.js": {
code: string;
};
"/index.html": {
code: string;
};
"/vite.config.js": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
+18
View File
@@ -0,0 +1,18 @@
export declare const VITE_TEMPLATE: {
files: {
"/index.js": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,30 @@
export declare const ANGULAR_TEMPLATE: {
files: {
"/src/app/app.component.css": {
code: string;
};
"/src/app/app.component.html": {
code: string;
};
"/src/app/app.component.ts": {
code: string;
};
"/src/app/app.module.ts": {
code: string;
};
"/src/index.html": {
code: string;
};
"/src/main.ts": {
code: string;
};
"/src/polyfills.ts": {
code: string;
};
"/package.json": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,24 @@
export declare const REACT_TYPESCRIPT_TEMPLATE: {
files: {
"tsconfig.json": {
code: string;
};
"/App.tsx": {
code: string;
};
"/index.tsx": {
code: string;
};
"/public/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,21 @@
export declare const REACT_TEMPLATE: {
files: {
"/App.js": {
code: string;
};
"/index.js": {
code: string;
};
"/public/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,21 @@
export declare const SOLID_TEMPLATE: {
files: {
"/App.tsx": {
code: string;
};
"/index.tsx": {
code: string;
};
"/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};
@@ -0,0 +1,21 @@
export declare const SVELTE_TEMPLATE: {
files: {
"/App.svelte": {
code: string;
};
"/index.js": {
code: string;
};
"/public/index.html": {
code: string;
};
"/package.json": {
code: string;
};
"/styles.css": {
code: string;
};
};
main: string;
environment: string;
};

Some files were not shown because too many files have changed in this diff Show More