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>;