@dou-ui/code 0.1.0-alpha.23 → 0.1.0-alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/default-BWWFJmzn.js.map +1 -0
- package/dist/code-diff.js.map +1 -1
- package/dist/code-diff.vue_vue_type_script_setup_true_lang.js +196 -18
- package/dist/code-diff.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/code-editor.js.map +1 -1
- package/dist/code-editor.vue_vue_type_script_setup_true_lang.js +636 -461
- package/dist/code-editor.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/extension.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/language/highlighter.js +1 -1
- package/dist/language/highlighter.js.map +1 -1
- package/dist/language/language.js +24 -2
- package/dist/language/language.js.map +1 -1
- package/dist/language/remote-tokens.js +131 -0
- package/dist/language/remote-tokens.js.map +1 -0
- package/dist/language/worker-client.js +308 -33
- package/dist/language/worker-client.js.map +1 -1
- package/dist/language/worker-protocol.js.map +1 -1
- package/dist/shiki/index.js +54 -3
- package/dist/shiki/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/code-diff.vue.d.ts +4 -1
- package/dist/types/code-editor.vue.d.ts +2 -1
- package/dist/types/extension.d.ts +13 -1
- package/dist/types/index.d.ts +18 -6
- package/dist/types/language/language.d.ts +27 -0
- package/dist/types/language/remote-tokens.d.ts +38 -0
- package/dist/types/language/worker-client.d.ts +85 -15
- package/dist/types/language/worker-protocol.d.ts +53 -2
- package/dist/types/shiki/index.d.ts +36 -1
- package/dist/types/types.d.ts +43 -8
- package/dist/types/view/measure.d.ts +6 -0
- package/dist/types/worker/index.d.ts +27 -12
- package/dist/view/measure.js +23 -5
- package/dist/view/measure.js.map +1 -1
- package/dist/worker/default.js +1 -1
- package/dist/worker/index.js +280 -53
- package/dist/worker/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/assets/default-BZBMZKf_.js.map +0 -1
package/dist/shiki/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/shiki/index.ts"],"sourcesContent":["import { type CodeLanguage, type CodeTokenType, defineCodeLanguage } from '../language/language'\n\n/** The part of a TextMate rule stack the editor uses: Shiki's `StateStack`. */\nexport interface ShikiStateStack {\n equals(other: ShikiStateStack): boolean\n}\n\n/** What the editor needs of a Shiki highlighter (`createHighlighter()` from `shiki`). */\nexport interface ShikiHighlighterLike {\n getLanguage(name: string): {\n tokenizeLine(\n line: string,\n state: ShikiStateStack | null,\n timeLimit?: number,\n ): {\n tokens: Array<{ startIndex: number; endIndex: number; scopes: string[] }>\n ruleStack: ShikiStateStack\n /** The time limit ran out before the end of the line. */\n stoppedEarly?: boolean\n }\n }\n}\n\nexport interface ShikiLanguageOptions {\n /** The name the editor and code blocks know it by; defaults to the Shiki language's. */\n name?: string\n aliases?: string[]\n /** How the language writes comments, for toggling them; Shiki doesn't say. */\n comment?: { line?: string; block?: [open: string, close: string] }\n brackets?: string\n autoClose?: string\n indentAfter?: RegExp\n /**\n * The token kind (syntax color) for a token's scopes, outermost first;\n * return `undefined` to use the built-in mapping (`tokenTypeOfScopes`).\n */\n tokenType?: (scopes: readonly string[]) => CodeTokenType | null | undefined\n}\n\nexport interface ShikiState {\n /** The grammar's state at the start of the line being read, or after the last line. */\n stack: ShikiStateStack | null\n /** The tokens of the line being read; positions from `base`. */\n line: { text: string; base: number; ends: number[]; types: Array<CodeTokenType | null> } | null\n}\n\n/** Scope prefixes and the kind each is drawn as; the first that matches a token's scopes, from the innermost scope out, wins. */\nconst SCOPES: Array<[prefix: string, type: CodeTokenType]> = [\n ['comment', 'comment'],\n ['punctuation.definition.comment', 'comment'],\n ['string.regexp', 'string'],\n ['constant.character.escape', 'string'],\n ['punctuation.definition.string', 'string'],\n ['string', 'string'],\n ['constant.numeric', 'number'],\n ['constant.language', 'keyword'],\n ['constant.other.color', 'number'],\n ['keyword.operator', 'operator'],\n ['storage.type.function.arrow', 'operator'],\n ['keyword', 'keyword'],\n ['storage', 'keyword'],\n ['entity.name.function', 'function'],\n ['support.function', 'function'],\n ['meta.function-call', 'function'],\n ['entity.name.tag', 'tag'],\n ['entity.other.attribute-name', 'attribute'],\n ['entity.name.type', 'type'],\n ['entity.name.class', 'type'],\n ['entity.other.inherited-class', 'type'],\n ['support.type.property-name', 'property'],\n ['support.type', 'type'],\n ['support.class', 'type'],\n ['variable.other.property', 'property'],\n ['variable.other.object.property', 'property'],\n ['support.variable.property', 'property'],\n ['meta.object-literal.key', 'property'],\n ['variable.language', 'keyword'],\n ['variable', 'variable'],\n ['entity.name', 'variable'],\n ['markup.heading', 'heading'],\n ['markup.bold', 'strong'],\n ['markup.italic', 'emphasis'],\n ['markup.underline.link', 'link'],\n ['markup.inline.raw', 'string'],\n ['meta.preprocessor', 'meta'],\n ['meta.decorator', 'meta'],\n ['meta.annotation', 'meta'],\n ['invalid', 'invalid'],\n ['punctuation', 'punctuation'],\n]\n\nconst matches = (scope: string, prefix: string) =>\n scope === prefix || (scope.startsWith(prefix) && scope[prefix.length] === '.')\n\n/** The kind a token with these scopes (outermost first, as Shiki gives them) is drawn as. */\nexport function tokenTypeOfScopes(scopes: readonly string[]): CodeTokenType | null {\n for (let i = scopes.length - 1; i > 0; i--) {\n const scope = scopes[i]!\n for (const [prefix, type] of SCOPES) if (matches(scope, prefix)) return type\n }\n return null\n}\n\n/** How long one line may take to read, in milliseconds, so a huge line doesn't hold up typing. */\nconst TIME_LIMIT = 50\n/**\n * Lines up to this long are read to the end even past the time limit. The\n * first lines a grammar reads also build its patterns, which on a busy\n * machine can take longer than the limit; stopping there would cut a block\n * comment or string in two and color the lines after it wrongly.\n */\nconst ALWAYS_WHOLE = 2000\n\ntype ShikiGrammar = ReturnType<ShikiHighlighterLike['getLanguage']>\n/** Reads a line within the time limit, and to its end when it is not too long. */\nfunction readLine(grammar: ShikiGrammar, text: string, stack: ShikiStateStack | null) {\n const result = grammar.tokenizeLine(text, stack, TIME_LIMIT)\n return result.stoppedEarly && text.length <= ALWAYS_WHOLE\n ? grammar.tokenizeLine(text, stack, 0)\n : result\n}\n\n/**\n * Turns a language loaded into a Shiki highlighter into one the editor\n * reads. Shiki's grammar does the reading; its scopes are drawn with the\n * editor's own syntax colors, so the theme and dark mode apply as they do\n * to the built-in languages.\n *\n * ```ts\n * const highlighter = await createHighlighter({ langs: ['rust'], themes: [] })\n * const rust = shikiLanguage(highlighter, 'rust', { comment: { line: '//' } })\n * ```\n */\nexport function shikiLanguage(\n highlighter: ShikiHighlighterLike,\n language: string,\n options: ShikiLanguageOptions = {},\n): CodeLanguage<ShikiState> {\n const grammar = highlighter.getLanguage(language)\n const typeOf = options.tokenType\n ? (scopes: readonly string[]) => {\n const own = options.tokenType!(scopes)\n return own === undefined ? tokenTypeOfScopes(scopes) : own\n }\n : tokenTypeOfScopes\n return defineCodeLanguage<ShikiState>({\n name: options.name ?? language,\n aliases: options.aliases,\n startState: () => ({ stack: null, line: null }),\n // the stack never changes once made: copies share it\n copyState: (state) => ({ stack: state.stack, line: state.line }),\n sameState: (a, b) => a.stack === b.stack || (!!a.stack && !!b.stack && a.stack.equals(b.stack)),\n token(stream, state) {\n let line = state.line\n if (!line || line.text !== stream.string || stream.pos < line.base) {\n // a new line: read it whole, and keep the state after it\n const text = stream.string.slice(stream.pos, stream.end)\n const result = readLine(grammar, text, state.stack)\n const ends: number[] = []\n const types: Array<CodeTokenType | null> = []\n for (const token of result.tokens) {\n ends.push(stream.pos + Math.min(token.endIndex, text.length))\n types.push(typeOf(token.scopes))\n }\n line = { text: stream.string, base: stream.pos, ends, types }\n state.stack = result.ruleStack\n state.line = line\n }\n for (let i = 0; i < line.ends.length; i++)\n if (line.ends[i]! > stream.pos) {\n stream.pos = Math.min(line.ends[i]!, stream.end)\n // the line is read: the next one is read afresh, even with the same text\n if (stream.pos >= stream.end) state.line = null\n return line.types[i]!\n }\n stream.skipToEnd()\n state.line = null\n return null\n },\n blankLine(state) {\n state.stack = readLine(grammar, '', state.stack).ruleStack\n state.line = null\n },\n comment: options.comment,\n brackets: options.brackets,\n autoClose: options.autoClose,\n indentAfter: options.indentAfter,\n })\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/shiki/index.ts"],"sourcesContent":["import {\n type CodeLanguage,\n type CodeTokenType,\n type RemoteCodeLanguageOptions,\n defineCodeLanguage,\n remoteCodeLanguage,\n} from '../language/language'\n\nexport { remoteCodeLanguage }\nexport type { RemoteCodeLanguageOptions }\n\n/** The part of a TextMate rule stack the editor uses: Shiki's `StateStack`. */\nexport interface ShikiStateStack {\n equals(other: ShikiStateStack): boolean\n}\n\n/** What the editor needs of a Shiki highlighter (`createHighlighter()` from `shiki`). */\nexport interface ShikiHighlighterLike {\n getLanguage(name: string): {\n tokenizeLine(\n line: string,\n state: ShikiStateStack | null,\n timeLimit?: number,\n ): {\n tokens: Array<{ startIndex: number; endIndex: number; scopes: string[] }>\n ruleStack: ShikiStateStack\n /** The time limit ran out before the end of the line. */\n stoppedEarly?: boolean\n }\n }\n getLoadedLanguages?: () => string[]\n loadLanguage?: (lang: never) => Promise<void>\n}\n\nexport interface ShikiLanguageOptions {\n /** The name the editor and code blocks know it by; defaults to the Shiki language's. */\n name?: string\n aliases?: string[]\n /** How the language writes comments, for toggling them; Shiki doesn't say. */\n comment?: { line?: string; block?: [open: string, close: string] }\n brackets?: string\n autoClose?: string\n indentAfter?: RegExp\n /**\n * The token kind (syntax color) for a token's scopes, outermost first;\n * return `undefined` to use the built-in mapping (`tokenTypeOfScopes`).\n */\n tokenType?: (scopes: readonly string[]) => CodeTokenType | null | undefined\n}\n\nexport interface ShikiState {\n /** The grammar's state at the start of the line being read, or after the last line. */\n stack: ShikiStateStack | null\n /** The tokens of the line being read; positions from `base`. */\n line: { text: string; base: number; ends: number[]; types: Array<CodeTokenType | null> } | null\n}\n\n/** Scope prefixes and the kind each is drawn as; the first that matches a token's scopes, from the innermost scope out, wins. */\nconst SCOPES: Array<[prefix: string, type: CodeTokenType]> = [\n ['comment', 'comment'],\n ['punctuation.definition.comment', 'comment'],\n ['string.regexp', 'string'],\n ['constant.character.escape', 'string'],\n ['punctuation.definition.string', 'string'],\n ['string', 'string'],\n ['constant.numeric', 'number'],\n ['constant.language', 'keyword'],\n ['constant.other.color', 'number'],\n ['keyword.operator', 'operator'],\n ['storage.type.function.arrow', 'operator'],\n ['keyword', 'keyword'],\n ['storage', 'keyword'],\n ['entity.name.function', 'function'],\n ['support.function', 'function'],\n ['meta.function-call', 'function'],\n ['entity.name.tag', 'tag'],\n ['entity.other.attribute-name', 'attribute'],\n ['entity.name.type', 'type'],\n ['entity.name.class', 'type'],\n ['entity.other.inherited-class', 'type'],\n ['support.type.property-name', 'property'],\n ['support.type', 'type'],\n ['support.class', 'type'],\n ['variable.other.property', 'property'],\n ['variable.other.object.property', 'property'],\n ['support.variable.property', 'property'],\n ['meta.object-literal.key', 'property'],\n ['variable.language', 'keyword'],\n ['variable', 'variable'],\n ['entity.name', 'variable'],\n ['markup.heading', 'heading'],\n ['markup.bold', 'strong'],\n ['markup.italic', 'emphasis'],\n ['markup.underline.link', 'link'],\n ['markup.inline.raw', 'string'],\n ['meta.preprocessor', 'meta'],\n ['meta.decorator', 'meta'],\n ['meta.annotation', 'meta'],\n ['invalid', 'invalid'],\n ['punctuation', 'punctuation'],\n]\n\nconst matches = (scope: string, prefix: string) =>\n scope === prefix || (scope.startsWith(prefix) && scope[prefix.length] === '.')\n\n/** The kind a token with these scopes (outermost first, as Shiki gives them) is drawn as. */\nexport function tokenTypeOfScopes(scopes: readonly string[]): CodeTokenType | null {\n for (let i = scopes.length - 1; i > 0; i--) {\n const scope = scopes[i]!\n for (const [prefix, type] of SCOPES) if (matches(scope, prefix)) return type\n }\n return null\n}\n\n/** How long one line may take to read, in milliseconds, so a huge line doesn't hold up typing. */\nconst TIME_LIMIT = 50\n/**\n * Lines up to this long are read to the end even past the time limit. The\n * first lines a grammar reads also build its patterns, which on a busy\n * machine can take longer than the limit; stopping there would cut a block\n * comment or string in two and color the lines after it wrongly.\n */\nconst ALWAYS_WHOLE = 2000\n\ntype ShikiGrammar = ReturnType<ShikiHighlighterLike['getLanguage']>\n/** Reads a line within the time limit, and to its end when it is not too long. */\nfunction readLine(grammar: ShikiGrammar, text: string, stack: ShikiStateStack | null) {\n const result = grammar.tokenizeLine(text, stack, TIME_LIMIT)\n return result.stoppedEarly && text.length <= ALWAYS_WHOLE\n ? grammar.tokenizeLine(text, stack, 0)\n : result\n}\n\n/**\n * Turns a language loaded into a Shiki highlighter into one the editor\n * reads. Shiki's grammar does the reading; its scopes are drawn with the\n * editor's own syntax colors, so the theme and dark mode apply as they do\n * to the built-in languages.\n *\n * ```ts\n * const highlighter = await createHighlighter({ langs: ['rust'], themes: [] })\n * const rust = shikiLanguage(highlighter, 'rust', { comment: { line: '//' } })\n * ```\n */\nexport function shikiLanguage(\n highlighter: ShikiHighlighterLike,\n language: string,\n options: ShikiLanguageOptions = {},\n): CodeLanguage<ShikiState> {\n const grammar = highlighter.getLanguage(language)\n const typeOf = options.tokenType\n ? (scopes: readonly string[]) => {\n const own = options.tokenType!(scopes)\n return own === undefined ? tokenTypeOfScopes(scopes) : own\n }\n : tokenTypeOfScopes\n return defineCodeLanguage<ShikiState>({\n name: options.name ?? language,\n aliases: options.aliases,\n startState: () => ({ stack: null, line: null }),\n // the stack never changes once made: copies share it\n copyState: (state) => ({ stack: state.stack, line: state.line }),\n sameState: (a, b) => a.stack === b.stack || (!!a.stack && !!b.stack && a.stack.equals(b.stack)),\n token(stream, state) {\n let line = state.line\n if (!line || line.text !== stream.string || stream.pos < line.base) {\n // a new line: read it whole, and keep the state after it\n const text = stream.string.slice(stream.pos, stream.end)\n const result = readLine(grammar, text, state.stack)\n const ends: number[] = []\n const types: Array<CodeTokenType | null> = []\n for (const token of result.tokens) {\n ends.push(stream.pos + Math.min(token.endIndex, text.length))\n types.push(typeOf(token.scopes))\n }\n line = { text: stream.string, base: stream.pos, ends, types }\n state.stack = result.ruleStack\n state.line = line\n }\n for (let i = 0; i < line.ends.length; i++)\n if (line.ends[i]! > stream.pos) {\n stream.pos = Math.min(line.ends[i]!, stream.end)\n // the line is read: the next one is read afresh, even with the same text\n if (stream.pos >= stream.end) state.line = null\n return line.types[i]!\n }\n stream.skipToEnd()\n state.line = null\n return null\n },\n blankLine(state) {\n state.stack = readLine(grammar, '', state.stack).ruleStack\n state.line = null\n },\n comment: options.comment,\n brackets: options.brackets,\n autoClose: options.autoClose,\n indentAfter: options.indentAfter,\n // Shiki's StateStack cannot cross postMessage: in a worker, return flat line tokens directly.\n workerMode: 'tokens',\n })\n}\n\nexport interface ShikiResolverOptions {\n /** Lazily returns (or creates) a Shiki highlighter instance inside the worker. */\n highlighter: () => ShikiHighlighterLike | Promise<ShikiHighlighterLike>\n /**\n * Loads a language grammar into the highlighter on demand. When omitted, calls\n * `highlighter.loadLanguage(name)` if available and the language is not yet loaded.\n */\n loadLanguage?: (highlighter: ShikiHighlighterLike, name: string) => Promise<void> | void\n /** Optional `ShikiLanguageOptions` applied to resolved languages. */\n options?: ShikiLanguageOptions | ((name: string) => ShikiLanguageOptions | undefined)\n}\n\n/**\n * Creates a `resolve` callback for `serveCodeHighlighting` that lazy-loads\n * Shiki grammars inside the worker and wraps them with `shikiLanguage`.\n *\n * ```ts\n * // shiki.worker.ts\n * import { createHighlighter } from 'shiki'\n * import { createShikiLanguageResolver } from '@dou-ui/code/shiki'\n * import { serveCodeHighlighting, typescript } from '@dou-ui/code/worker'\n *\n * let highlighter: ReturnType<typeof createHighlighter> | undefined\n * serveCodeHighlighting({\n * languages: [typescript],\n * resolve: createShikiLanguageResolver(\n * () => (highlighter ??= createHighlighter({ langs: [], themes: [] })),\n * ),\n * })\n * ```\n */\nexport function createShikiLanguageResolver(\n highlighterOrOptions: ShikiResolverOptions['highlighter'] | ShikiResolverOptions,\n): (name: string) => Promise<CodeLanguage<ShikiState> | null> {\n const opts: ShikiResolverOptions =\n typeof highlighterOrOptions === 'function'\n ? { highlighter: highlighterOrOptions }\n : highlighterOrOptions\n let shared: Promise<ShikiHighlighterLike> | null = null\n const getHighlighter = () => {\n if (!shared) {\n const pending = Promise.resolve()\n .then(() => opts.highlighter())\n .catch((error) => {\n if (shared === pending) shared = null\n throw error\n })\n shared = pending\n }\n return shared\n }\n\n return async (name: string): Promise<CodeLanguage<ShikiState> | null> => {\n try {\n const hl = await getHighlighter()\n const loaded = hl.getLoadedLanguages?.()\n if (!loaded || !loaded.includes(name)) {\n if (opts.loadLanguage) {\n await opts.loadLanguage(hl, name)\n } else if (hl.loadLanguage) {\n await hl.loadLanguage(name as never)\n }\n }\n const langOptions = typeof opts.options === 'function' ? opts.options(name) : opts.options\n return shikiLanguage(hl, name, { ...langOptions, name: langOptions?.name ?? name })\n } catch {\n return null\n }\n }\n}\n"],"mappings":"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"}
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer dou.components{.dou-code-editor{--dou-code-editor-font-size:var(--dou-font-size-sm);--dou-code-editor-line-height:20px;--dou-code-editor-padding-y:8px;--dou-code-editor-padding-x:12px;--dou-code-editor-bg:var(--dou-color-bg-surface);--dou-code-editor-gutter-bg:var(--dou-code-editor-bg);--dou-code-editor-gutter-text:var(--dou-color-text-tertiary);--dou-code-editor-border:var(--dou-color-border);--dou-code-editor-border-focus:color-mix(in oklab,var(--dou-color-focus)70%,var(--dou-color-text));--dou-code-editor-cursor:var(--dou-color-text);--dou-code-editor-active-line:color-mix(in oklab,var(--dou-color-text)4%,transparent);--dou-code-editor-selection:color-mix(in oklab,var(--dou-color-primary)20%,transparent);--dou-code-editor-match:color-mix(in oklab,var(--dou-color-warning)22%,transparent);--dou-code-editor-match-current:color-mix(in oklab,var(--dou-color-warning-text)80%,transparent);--dou-code-editor-match-mark:color-mix(in oklab,var(--dou-color-warning)60%,transparent);--dou-code-editor-bracket:color-mix(in oklab,var(--dou-color-text)35%,transparent);--dou-code-editor-error:var(--dou-color-danger-text);--dou-code-editor-warning:var(--dou-color-warning-text);--dou-code-editor-info:var(--dou-color-primary-text);--dou-code-editor-bracket-unmatched:color-mix(in oklab,var(--dou-color-danger-text)70%,transparent);position:relative;display:flex;box-sizing:border-box;min-height:calc(var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px);overflow:hidden;border:1px solid var(--dou-code-editor-border);border-radius:var(--dou-radius-container);background-color:var(--dou-code-editor-bg);color:var(--dou-color-text);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);font-variant-ligatures:none;line-height:var(--dou-code-editor-line-height);transition:border-color var(--dou-motion-duration-fast)var(--dou-motion-easing);flex-direction:column;width:100%;min-width:0}.dou-code-editor.is-focused{border-color:var(--dou-code-editor-border-focus)}.dou-code-editor:not(.is-bordered){min-height:calc(var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y));border:0;border-radius:0}.dou-code-editor:not(.is-focused){--dou-code-editor-selection:color-mix(in oklab,var(--dou-color-text)10%,transparent)}.dou-code-editor.is-disabled{color:var(--dou-color-text-disabled);cursor:not-allowed}.dou-code-editor__body{position:relative;display:flex;flex:auto;min-height:0}.dou-code-editor__scroller{position:relative;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin;flex:auto;min-width:0;min-height:0}.dou-code-editor:not(.is-scroll-y)>.dou-code-editor__body>.dou-code-editor__scroller{overflow-x:auto;overflow-y:hidden}.dou-code-editor__minimap{position:relative;overflow:hidden;box-shadow:inset 1px 0 0 color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text-tertiary);cursor:default;touch-action:none;user-select:none;flex:none;width:96px}.dou-code-editor__minimap-canvas{position:absolute;width:100%;height:100%;inset:0}.dou-code-editor__minimap-view{position:absolute;background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);transition:background-color var(--dou-motion-duration-fast)var(--dou-motion-easing);top:0;left:0;right:0}.dou-code-editor__minimap:hover .dou-code-editor__minimap-view{background-color:color-mix(in oklab,var(--dou-color-text)9%,transparent)}.dou-code-editor__minimap:active .dou-code-editor__minimap-view{background-color:color-mix(in oklab,var(--dou-color-text)12%,transparent)}.dou-code-editor__sizer{position:relative;display:flex;box-sizing:border-box;width:max-content;min-width:100%}.dou-code-editor__gutter{position:sticky;z-index:2;box-sizing:border-box;width:var(--dou-code-editor-gutter);background-color:var(--dou-code-editor-gutter-bg);color:var(--dou-code-editor-gutter-text);font-variant-numeric:tabular-nums;cursor:default;user-select:none;-webkit-user-select:none;touch-action:manipulation;flex:none;left:0}.dou-code-editor__numbers{position:absolute;will-change:transform;top:0;left:0;right:0}.dou-code-editor__number{position:relative;box-sizing:border-box;height:var(--dou-code-editor-line-height);padding:0 12px 0 calc(16px + var(--dou-code-editor-gutter-cells,0px));text-align:right}.dou-code-editor__number.is-active{color:var(--dou-color-text-secondary)}.dou-code-editor.is-foldable .dou-code-editor__number{padding-right:24px}.dou-code-editor__fold-toggle{position:absolute;display:flex;height:var(--dou-code-editor-line-height);color:var(--dou-color-text-tertiary);cursor:pointer;opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);justify-content:center;align-items: center;width:14px;font-size:12px;top:0;right:6px}.dou-code-editor__gutter:hover .dou-code-editor__fold-toggle{opacity:1}.dou-code-editor__fold-toggle.is-folded{opacity:1}.dou-code-editor__fold-toggle:hover{color:var(--dou-color-text)}@media (pointer:coarse){.dou-code-editor__fold-toggle{opacity:1}.dou-code-editor__fold-toggle:before{position:absolute;content:"";inset:-4px -6px}}.dou-code-editor__content{position:relative;cursor:text;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;flex:auto;min-width:0}.dou-code-editor.is-disabled .dou-code-editor__content{cursor:not-allowed}.dou-code-editor__lines,.dou-code-editor__matches,.dou-code-editor__brackets,.dou-code-editor__selections,.dou-code-editor__cursors{position:absolute;pointer-events:none;top:0;left:0}.dou-code-editor__lines{will-change:transform;right:0}.dou-code-editor__line{box-sizing:border-box;height:var(--dou-code-editor-line-height);padding:0 var(--dou-code-editor-padding-x);white-space:pre;tab-size:var(--dou-code-editor-tab-size,2)}.dou-code-editor__line.is-wrapped{height:auto}.dou-code-editor__row{box-sizing:border-box;height:var(--dou-code-editor-line-height)}.dou-code-editor__fold-marker{display:inline-block;box-sizing:border-box;border:1px solid var(--dou-color-border);background-color:var(--dou-color-bg-muted);color:var(--dou-color-text-secondary);vertical-align:1px;cursor:pointer;pointer-events:auto;border-radius:4px;height:16px;margin-left:6px;padding:0 6px;font-size:12px;line-height:14px}.dou-code-editor__fold-marker:hover{color:var(--dou-color-text)}.dou-code-editor__line :-webkit-any(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__line :-moz-any(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__line :is(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__compose{text-decoration:underline;text-decoration-color:var(--dou-color-text-tertiary);text-underline-offset:3px}.dou-code-editor__probe{position:absolute;visibility:hidden;white-space:pre;pointer-events:none;top:0;left:0}.dou-code-editor__active-line{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-active-line);pointer-events:none;top:0;left:0;right:0}.dou-code-editor:not(.is-focused) .dou-code-editor__active-line{background-color:#0000}.dou-code-editor__match{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-match);border-radius:2px;top:0;left:0}.dou-code-editor__match.is-current{box-shadow:inset 0 0 0 1px var(--dou-code-editor-match-current)}.dou-code-editor__marks{position:absolute;z-index:3;pointer-events:none;width:6px;top:0;bottom:0;right:0}.dou-code-editor__mark{position:absolute;background-color:var(--dou-code-editor-match-mark);border-radius:1px;width:6px;height:2px;right:0}.dou-code-editor__mark.is-current{background-color:var(--dou-code-editor-match-current);height:3px}.dou-code-editor__live{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-editor__search{position:absolute;z-index:4;display:flex;container-type:inline-size;pointer-events:none;justify-content:flex-end;top:6px;left:6px;right:14px}.dou-code-editor__search>*{pointer-events:auto}.dou-code-editor__bracket{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);border:1px solid var(--dou-code-editor-bracket);border-radius:2px;top:0;left:0}.dou-code-editor__bracket.is-unmatched{border-color:var(--dou-code-editor-bracket-unmatched)}.dou-code-editor__selection{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-selection);border-radius:2px;top:0;left:0}.dou-code-editor__cursor{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-cursor);animation:1.2s step-end .5s infinite dou-code-editor-blink;border-radius:1px;width:2px;top:0;left:0}.dou-code-editor.is-readonly .dou-code-editor__cursor{opacity:.4;animation:none}@media (prefers-reduced-motion:reduce){.dou-code-editor__cursor{animation:none}}.dou-code-editor__placeholder{position:absolute;top:var(--dou-code-editor-padding-y);left:var(--dou-code-editor-padding-x);color:var(--dou-color-text-tertiary);white-space:pre;pointer-events:none}.dou-code-editor__input{position:absolute;z-index:-1;box-sizing:border-box;width:calc(100% - var(--dou-code-editor-padding-x));overflow:hidden;outline:none;color:#0000;caret-color:transparent;font:inherit;font-size:max(var(--dou-font-size-input-min),var(--dou-code-editor-font-size));line-height:inherit;letter-spacing:inherit;white-space:pre;tab-size:var(--dou-code-editor-tab-size,2);resize:none;pointer-events:none;background:0 0;border:0;min-width:1px;margin:0;padding:0}.dou-code-editor__input::selection{background:0 0}}@layer dou.components{.dou-code-editor__problem{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-thickness:1px;text-decoration-skip-ink:none;text-underline-offset:3px}.dou-code-editor__problem.is-error{text-decoration-color:var(--dou-code-editor-error)}.dou-code-editor__problem.is-warning{text-decoration-color:var(--dou-code-editor-warning)}.dou-code-editor__problem.is-info{text-decoration-color:var(--dou-code-editor-info)}.dou-code-editor__problem.is-hint{text-decoration-style:dotted;text-decoration-color:var(--dou-color-text-tertiary)}.dou-code-editor__cells{position:absolute;display:flex;top:0;bottom:0;left:0}.dou-code-editor__cell{display:inline-grid;grid-template-rows:var(--dou-code-editor-line-height);grid-auto-flow:column;position:relative;font-size:var(--dou-font-size-sm);flex:none;place-content: start center;align-items: center;height:100%}.dou-code-editor__cell[data-gutter-cell]{cursor:pointer}.dou-code-editor.is-disabled .dou-code-editor__cell[data-gutter-cell]{cursor:default}.dou-code-editor__cell[role=button]{border-radius:var(--dou-radius-control)}.dou-code-editor__cell[role=button]:focus-visible{outline:none}.dou-code-editor__cell[role=button]:focus-visible:after{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);border:2px solid var(--dou-color-focus);border-radius:var(--dou-radius-control);content:"";pointer-events:none;top:0;left:0;right:0}.dou-code-editor__cell>svg{width:14px;height:14px}.dou-code-editor__cell.is-on-hover{opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing)}.dou-code-editor:not(.is-disabled) .dou-code-editor__number:-webkit-any(:hover,.is-hovered)>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor:not(.is-disabled) .dou-code-editor__number:-moz-any(:hover,.is-hovered)>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor:not(.is-disabled) .dou-code-editor__number:is(:hover,.is-hovered)>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor.is-focused .dou-code-editor__number.is-active>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor__cell.is-on-hover:focus-visible{opacity:1}.dou-code-editor__problem-icon.is-error{color:var(--dou-code-editor-error)}.dou-code-editor__problem-icon.is-warning{color:var(--dou-code-editor-warning)}.dou-code-editor__problem-icon.is-info{color:var(--dou-code-editor-info)}.dou-code-editor__problem-icon.is-hint{color:var(--dou-color-text-tertiary)}.dou-code-editor__problem-mark.is-error{background-color:var(--dou-code-editor-error)}.dou-code-editor__problem-mark.is-warning{background-color:var(--dou-code-editor-warning)}.dou-code-editor__problem-mark.is-info{background-color:var(--dou-code-editor-info)}.dou-code-editor__problem-mark.is-hint{background-color:var(--dou-color-text-tertiary)}.dou-code-editor__floating{display:contents}.dou-code-editor__floating.is-outside{--dou-code-editor-font-size:var(--dou-font-size-sm);--dou-code-editor-bg:var(--dou-color-bg-surface);--dou-code-editor-error:var(--dou-color-danger-text);--dou-code-editor-warning:var(--dou-color-warning-text);--dou-code-editor-info:var(--dou-color-primary-text);position:absolute;display:block;color:var(--dou-color-text);transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);width:0;height:0;line-height:20px;top:0;left:0}.dou-code-editor__floating.is-outside.is-scrolling{opacity:0;pointer-events:none;transition:none}.dou-code-editor__floating.is-outside.is-fixed{position:fixed}.dou-code-editor__problems{position:absolute;z-index:6;box-sizing:border-box;display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:normal;overflow-y:auto;overscroll-behavior:contain;flex-direction:column;gap:4px;width:max-content;max-width:min(440px,100% - 8px);padding:6px;line-height:20px;top:0;left:0}.dou-code-editor__problems>*{flex-shrink:0}.dou-code-editor__problem-item{display:flex;align-items: flex-start;gap:6px;padding:0 2px}.dou-code-editor__problem-item.is-error{--dou-code-editor-problem:var(--dou-code-editor-error)}.dou-code-editor__problem-item.is-warning{--dou-code-editor-problem:var(--dou-code-editor-warning)}.dou-code-editor__problem-item.is-info{--dou-code-editor-problem:var(--dou-code-editor-info)}.dou-code-editor__problem-item.is-hint{--dou-code-editor-problem:var(--dou-color-text-tertiary)}.dou-code-editor__problem-severity{color:var(--dou-code-editor-problem);flex:none;width:14px;height:20px}.dou-code-editor__problem-message{overflow-wrap:anywhere;color:var(--dou-color-text);min-width:0}.dou-code-editor__problem-source{color:var(--dou-color-text-tertiary);margin-left:8px}.dou-code-editor__fixes{display:flex;border-top:1px solid var(--dou-color-border-subtle);flex-wrap:wrap;gap:2px;padding-top:4px}.dou-code-editor__fix{display:inline-flex;border-radius:calc(var(--dou-radius-control) - 2px);color:var(--dou-color-primary-text);font:inherit;cursor:pointer;background:0 0;border:0;align-items: center;height:24px;padding:0 8px}.dou-code-editor__fix.is-active{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent)}.dou-code-editor__fix:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent)}@media (pointer:coarse){.dou-code-editor__fix{height:36px}}.dou-code-editor__hover{color:var(--dou-color-text);overflow-wrap:anywhere;white-space:pre-wrap;padding:0 2px}.dou-code-editor__hover+.dou-code-editor__problem-item{border-top:1px solid var(--dou-color-border-subtle);padding-top:4px}.dou-code-lsp-markup{display:flex;white-space:normal;flex-direction:column;gap:6px}.dou-code-lsp-markup__text{white-space:pre-wrap;margin:0}.dou-code-lsp-markup__code{font-family:var(--dou-font-family-mono);white-space:pre-wrap;margin:0}.dou-code-lsp-markup__inline{font-family:var(--dou-font-family-mono)}.dou-code-editor__completions{position:absolute;z-index:7;box-sizing:border-box;display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);flex-direction:column;width:max-content;min-width:min(200px,100%);max-height:264px;padding:4px;line-height:20px;top:0;left:0}.dou-code-editor__completion-list{overflow-y:auto;overscroll-behavior:contain;flex:0 auto;min-height:28px}.dou-code-editor__completion{display:flex;border-radius:calc(var(--dou-radius-control) - 2px);color:var(--dou-color-text);cursor:pointer;align-items: center;gap:8px;height:28px;padding:0 8px 0 6px}.dou-code-editor__completion.is-active{background-color:color-mix(in oklab,var(--dou-color-text)8%,transparent)}@media (hover:hover){.dou-code-editor__completion:not(.is-active):hover{background-color:color-mix(in oklab,var(--dou-color-text)4%,transparent)}}@media (pointer:coarse){.dou-code-editor__completion{height:36px}}.dou-code-editor__completion-kind{color:var(--dou-color-text-tertiary);flex:none;width:16px;height:16px}.dou-code-editor__completion-label{overflow:hidden;text-overflow:ellipsis;white-space:pre;flex:none;max-width:75%}.dou-code-editor__completion-match{color:var(--dou-color-primary-text);background:0 0;font-weight:600}.dou-code-editor__completion-detail{overflow:hidden;color:var(--dou-color-text-tertiary);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;margin-left:auto;padding-left:16px}.dou-code-editor__completion-info{border-top:1px solid var(--dou-color-border-subtle);color:var(--dou-color-text-secondary);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:pre-wrap;overflow-wrap:anywhere;flex:none;max-width:400px;margin-top:4px;padding:6px 6px 2px}.dou-code-editor__signature{position:absolute;z-index:6;box-sizing:border-box;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-size:var(--dou-font-size-sm);overflow-y:auto;pointer-events:none;width:max-content;max-width:min(440px,100% - 8px);padding:4px 8px;line-height:20px;top:0;left:0}.dou-code-editor__signature-label{color:var(--dou-color-text-secondary);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);overflow-wrap:anywhere}.dou-code-editor__signature-active{color:var(--dou-color-text);text-decoration:underline;text-underline-offset:3px;font-weight:600}.dou-code-editor__signature-info{color:var(--dou-color-text-tertiary);font-family:var(--dou-font-family);white-space:pre-wrap}.dou-code-editor__field{box-shadow:inset 0 0 0 1px var(--dou-color-border-strong);border-radius:2px}.dou-code-editor__widgets{position:absolute;z-index:3;top:0;left:0}.dou-code-editor__widget{position:absolute;box-sizing:border-box;cursor:auto;font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:normal;user-select:text;-webkit-user-select:text;display:flow-root;line-height:20px;top:0;left:0}.dou-code-editor__inline{display:inline-block;vertical-align:top;height:var(--dou-code-editor-line-height);white-space:nowrap}.dou-code-editor__panels{font-family:var(--dou-font-family);flex:none}.dou-code-editor__panels.is-top{border-bottom:1px solid var(--dou-color-border-subtle)}.dou-code-editor__panels.is-bottom{border-top:1px solid var(--dou-color-border-subtle)}.dou-code-editor__handle{position:absolute;z-index:5;touch-action:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;width:0;height:0;top:0;left:0}.dou-code-editor__handle:before{position:absolute;content:"";width:36px;height:36px;top:-6px}.dou-code-editor__handle:after{position:absolute;background-color:var(--dou-color-primary);content:"";width:14px;height:14px;top:0}.dou-code-editor__handle.is-start:before{left:-27px}.dou-code-editor__handle.is-start:after{border-radius:50% 0 50% 50%;right:0}.dou-code-editor__handle.is-end:before{left:-9px}.dou-code-editor__handle.is-end:after{border-radius:0 50% 50%;left:0}.dou-code-editor__handle.is-caret:before{left:-18px}.dou-code-editor__handle.is-caret:after{border-radius:0 50% 50%;width:12px;height:12px;top:4px;left:-6px;transform:rotate(45deg)}.dou-code-editor__magnifier{position:absolute;z-index:6;box-sizing:border-box;overflow:hidden;border:1px solid var(--dou-color-border);background:linear-gradient(var(--dou-code-editor-bg),var(--dou-code-editor-bg)),var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);pointer-events:none;border-radius:999px;width:128px;top:0;left:0}.dou-code-editor__magnifier-text{position:absolute;height:var(--dou-code-editor-line-height);margin-top:calc(var(--dou-code-editor-line-height)/-2);white-space:pre;tab-size:var(--dou-code-editor-tab-size);transform-origin:0 50%;top:50%;left:0}.dou-code-editor__magnifier-caret{position:absolute;height:calc(var(--dou-code-editor-line-height)*1.5);background-color:var(--dou-color-primary);border-radius:1px;width:2px;top:50%;translate:0 -50%}.dou-code-editor__menu{position:absolute;z-index:6;display:flex;border:1px solid var(--dou-color-border);border-radius:calc(var(--dou-radius-control) + 2px);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family);white-space:nowrap;gap:2px;padding:2px;top:0;left:0}.dou-code-editor__menu-button{display:inline-flex;border-radius:var(--dou-radius-control);color:var(--dou-color-text);font:inherit;font-size:var(--dou-font-size-sm);cursor:pointer;-webkit-tap-highlight-color:transparent;background:0 0;border:0;align-items: center;min-width:36px;height:36px;padding:0 12px;line-height:1}.dou-code-editor__menu-button:active{background-color:color-mix(in oklab,var(--dou-color-text)8%,transparent)}@media (hover:hover){.dou-code-editor__menu-button:hover{background-color:color-mix(in oklab,var(--dou-color-text)5%,transparent)}}.dou-code-editor__keys{position:absolute;box-sizing:border-box;display:flex;border:1px solid color-mix(in oklab,var(--dou-color-text)10%,transparent);background-color:color-mix(in oklab,var(--dou-color-bg-surface)92%,transparent);box-shadow:var(--dou-shadow-md);-webkit-backdrop-filter:blur(20px)saturate(1.8);backdrop-filter:blur(20px)saturate(1.8);transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);border-radius:22px;height:44px;padding:0 3px 0 0;top:0;left:0}.dou-code-editor__keys.is-fixed{position:fixed}.dou-code-editor__keys.is-scrolling{opacity:0;pointer-events:none;transition:none}.dou-code-editor__keys>.dou-code-keys{background-color:#0000;border-top:0;flex:auto;min-width:0;height:42px}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__scroll{padding:0}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__arrows{position:relative;box-shadow:none;padding:0 0 0 5px}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__arrows:before{position:absolute;background-color:var(--dou-color-border-subtle);content:"";width:1px;top:10px;bottom:10px;left:0}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__key{border-radius:18px}.dou-code-editor__keys-grip{display:flex;color:var(--dou-color-text-tertiary);cursor:grab;touch-action:none;-webkit-tap-highlight-color:transparent;background:0 0;border:0;flex:none;justify-content:center;align-items: center;width:36px;margin:0;padding:0 0 0 6px}.dou-code-editor__keys-grip>svg{width:18px;height:18px}.dou-code-editor__keys-grip:active{cursor:grabbing}.dou-code-editor__keys-grip:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-4px;border-radius:18px}.dou-code-keys{display:flex;box-sizing:border-box;border-top:1px solid var(--dou-color-border);background-color:var(--dou-color-bg-surface);color:var(--dou-color-text);font-family:var(--dou-font-family-mono);font-size:var(--dou-font-size-md);user-select:none;-webkit-user-select:none;height:45px}.dou-code-keys__scroll{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;touch-action:pan-x;flex:auto;align-items: center;gap:2px;min-width:0;padding:0 4px}.dou-code-keys__scroll::-webkit-scrollbar{display:none}.dou-code-keys__arrows{display:flex;box-shadow:-1px 0 0 var(--dou-color-border-subtle);flex:none;align-items: center;gap:2px;padding:0 4px}.dou-code-keys__stick{position:relative;color:var(--dou-color-text-tertiary);cursor:grab;touch-action:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;background:0 0;border:0;border-radius:50%;flex:none;width:36px;height:36px;margin:0;padding:0}.dou-code-keys__stick:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:0}.dou-code-keys__pad{position:absolute;z-index:1;display:flex;box-sizing:border-box;background-color:var(--dou-color-bg-muted);box-shadow:inset 0 0 0 1px var(--dou-color-border-subtle);pointer-events:none;transition-property:width,height,margin,background-color,box-shadow,translate;transition-duration:var(--dou-motion-duration-normal);transition-timing-function:var(--dou-motion-easing);border-radius:50%;justify-content:center;align-items: center;width:32px;height:32px;margin:-16px 0 0 -16px;top:50%;left:50%}.dou-code-keys__way{position:absolute;opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);width:16px;height:16px}.dou-code-keys__way.is-up{top:8px}.dou-code-keys__way.is-down{bottom:8px}.dou-code-keys__way.is-left{left:8px}.dou-code-keys__way.is-right{right:8px}.dou-code-keys__thumb{box-sizing:border-box;background-color:var(--dou-color-bg-surface);box-shadow:0 0 0 1px color-mix(in oklab,var(--dou-color-text)14%,transparent),var(--dou-shadow-sm);transition-property:width,height,transform;transition-duration:var(--dou-motion-duration-normal);transition-timing-function:var(--dou-motion-easing-spring);border-radius:50%;width:18px;height:18px}.dou-code-keys__stick.is-held{cursor:grabbing}.dou-code-keys__stick.is-held .dou-code-keys__pad{background-color:var(--dou-color-bg-surface);box-shadow:inset 0 0 0 1px var(--dou-color-border),var(--dou-shadow-lg);transition-duration:var(--dou-motion-duration-slow);transition-timing-function:var(--dou-motion-easing-spring);width:104px;height:104px;margin:-52px 0 0 -52px}.dou-code-keys__stick.is-held .dou-code-keys__way{opacity:1}.dou-code-keys__stick.is-held .dou-code-keys__thumb{background-color:color-mix(in oklab,var(--dou-color-text)8%,var(--dou-color-bg-surface));width:40px;height:40px;transition-property:width,height}.dou-code-keys__key{display:inline-flex;box-sizing:border-box;border-radius:var(--dou-radius-control);color:inherit;font:inherit;cursor:pointer;touch-action:pan-x;-webkit-tap-highlight-color:transparent;transition-property:background-color,transform;transition-duration:var(--dou-motion-duration-fast);transition-timing-function:var(--dou-motion-easing-exit);background:0 0;border:0;flex:none;justify-content:center;align-items: center;min-width:36px;height:36px;padding:0 8px;line-height:1}.dou-code-keys__key>svg{color:var(--dou-color-text-secondary);width:18px;height:18px}@media (hover:hover){.dou-code-keys__key:hover{background-color:color-mix(in oklab,var(--dou-color-text)5%,transparent)}}.dou-code-keys__key.is-pressed{background-color:color-mix(in oklab,var(--dou-color-text)10%,transparent);transition-duration:var(--dou-motion-duration-slow);transition-timing-function:var(--dou-motion-easing-spring);transform:scale(1.12)}}@layer dou.components{.dou-code-input{--dou-code-input-height:var(--dou-control-height-md);display:block;width:100%;min-width:0}.dou-code-input .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-md);--dou-code-editor-padding-y:calc((var(--dou-code-input-height) - var(--dou-code-editor-line-height) - 2px)/2);min-height:var(--dou-code-input-height);border-radius:var(--dou-radius-control);transition-property:border-color,box-shadow}@media (hover:hover){.dou-code-input .dou-code-editor:not(:-webkit-any(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}.dou-code-input .dou-code-editor:not(:-moz-any(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}.dou-code-input .dou-code-editor:not(:is(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}}.dou-code-input .dou-code-editor__marks{display:none}.dou-code-input:not(.is-multiline) .dou-code-editor{height:var(--dou-code-input-height)}.dou-code-input:not(.is-multiline) .dou-code-editor .dou-code-editor__scroller{scrollbar-width:none}.dou-code-input:not(.is-multiline) .dou-code-editor .dou-code-editor__scroller::-webkit-scrollbar{display:none}.dou-code-input.is-multiline .dou-code-editor{min-height:calc(var(--dou-code-input-min-rows,1)*var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px);max-height:calc(var(--dou-code-input-max-rows,6)*var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px)}.dou-code-input.is-invalid .dou-code-editor{--dou-code-editor-border:color-mix(in oklab,var(--dou-color-danger)55%,var(--dou-color-border));--dou-code-editor-border-focus:var(--dou-color-danger)}.dou-code-input--sm{--dou-code-input-height:var(--dou-control-height-sm)}.dou-code-input--sm .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-sm)}.dou-code-input--lg{--dou-code-input-height:var(--dou-control-height-lg)}.dou-code-input--lg .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-lg)}}@keyframes dou-code-peer-name{to{opacity:0;visibility:hidden}}@keyframes dou-code-editor-blink{50%{opacity:0}}@layer dou.components{.dou-code-diff{--dou-code-diff-removed:color-mix(in oklab,var(--dou-color-danger)10%,transparent);--dou-code-diff-added:color-mix(in oklab,var(--dou-color-success)10%,transparent);--dou-code-diff-removed-word:color-mix(in oklab,var(--dou-color-danger-text)30%,transparent);--dou-code-diff-added-word:color-mix(in oklab,var(--dou-color-success-text)30%,transparent);--dou-code-diff-border:var(--dou-color-border);--dou-code-diff-toolbar-bg:var(--dou-color-bg-surface);--dou-code-diff-toolbar-top:0px;position:relative;display:flex;box-sizing:border-box;overflow:clip;border:1px solid var(--dou-code-diff-border);border-radius:var(--dou-radius-container);background-color:var(--dou-color-bg-surface);transition:border-color var(--dou-motion-duration-fast)var(--dou-motion-easing);flex-direction:column;width:100%;min-width:0}.dou-code-diff:focus-within{border-color:color-mix(in oklab,var(--dou-color-focus)70%,var(--dou-color-text))}.dou-code-diff:not(.is-bordered){border:0;border-radius:0}.dou-code-diff__toolbar{display:flex;border-bottom:1px solid var(--dou-code-diff-border);background-color:var(--dou-code-diff-toolbar-bg);font-size:var(--dou-font-size-sm);flex:none;align-items: center;gap:2px;min-height:36px;padding:0 6px 0 12px}@media (pointer:coarse){.dou-code-diff__toolbar{min-height:44px}}.dou-code-diff__toolbar.is-sticky{position:sticky;top:var(--dou-code-diff-toolbar-top);z-index:4}.dou-code-diff__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;margin-inline-end:8px}.dou-code-diff__stats{display:flex;overflow:hidden;white-space:nowrap;flex:auto;align-items: center;gap:8px;min-width:0}.dou-code-diff__title+.dou-code-diff__stats{flex:none;margin-inline-end:4px}.dou-code-diff__count{font-family:var(--dou-font-family-mono);font-variant-numeric:tabular-nums}.dou-code-diff__count.is-added{color:var(--dou-color-success-text)}.dou-code-diff__count.is-removed{color:var(--dou-color-danger-text)}.dou-code-diff__summary{overflow:hidden;color:var(--dou-color-text-secondary);text-overflow:ellipsis}.dou-code-diff__hidden-text{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-diff__toolbar .dou-button{flex:none}@media (pointer:coarse){.dou-code-diff__toolbar .dou-button{position:relative;min-width:36px;min-height:36px}.dou-code-diff__toolbar .dou-button:after{position:absolute;content:"";inset:-2px}}.dou-code-diff__body{display:grid;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr);isolation:isolate;flex:auto;min-height:0}.dou-code-diff--split>.dou-code-diff__body{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)minmax(0,1fr)}.dou-code-diff__label{border-bottom:1px solid var(--dou-code-diff-border);color:var(--dou-color-text-secondary);padding:4px 12px;font-size:12px}.dou-code-diff__label:nth-child(2){border-left:1px solid var(--dou-code-diff-border)}.dou-code-diff__side{display:flex;flex-direction:column;min-width:0;min-height:0}.dou-code-diff__side.is-modified{border-left:1px solid var(--dou-code-diff-border)}.dou-code-diff__side>.dou-code-editor{flex:auto}.dou-code-diff__line.is-removed{background-color:var(--dou-code-diff-removed)}.dou-code-diff__line.is-added{background-color:var(--dou-code-diff-added)}.dou-code-diff__word.is-removed{background-color:var(--dou-code-diff-removed-word)}.dou-code-diff__word.is-added{background-color:var(--dou-code-diff-added-word)}.dou-code-editor__cell.dou-code-diff__sign{font-family:var(--dou-font-family-mono)}.dou-code-editor__cell.dou-code-diff__sign:after{position:absolute;z-index:-1;top:0;bottom:0;left:calc(100% - var(--dou-code-editor-gutter-cells));width:var(--dou-code-editor-gutter);content:"";pointer-events:none}.dou-code-editor__cell.dou-code-diff__sign.is-removed{color:var(--dou-color-danger-text)}.dou-code-editor__cell.dou-code-diff__sign.is-removed:after{background-color:var(--dou-code-diff-removed)}.dou-code-editor__cell.dou-code-diff__sign.is-added{color:var(--dou-color-success-text)}.dou-code-editor__cell.dou-code-diff__sign.is-added:after{background-color:var(--dou-code-diff-added)}.dou-code-editor__cell.dou-code-diff__number{box-sizing:border-box;color:var(--dou-code-editor-gutter-text);font-family:var(--dou-font-family-mono);font-size:inherit;font-variant-numeric:tabular-nums;justify-content:flex-end;padding-right:8px}.dou-code-diff__widget{display:flow-root}.dou-code-diff--split>.dou-code-diff__body{position:relative}.dou-code-diff__spans{position:absolute;z-index:3;overflow:hidden;pointer-events:none;left:0;right:0}.dou-code-diff__span{position:absolute;display:flow-root;box-sizing:border-box;font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);pointer-events:auto;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);line-height:20px;top:0;left:0;right:0}.dou-code-diff__span:not(.is-placed){visibility:hidden;opacity:0;transition:none}.dou-code-diff__filler{background-image:repeating-linear-gradient(-45deg,transparent 0 6px,color-mix(in oklab,var(--dou-color-text)5%,transparent)6px 7px)}.dou-code-diff__bar{display:flex;box-sizing:border-box;border:0;border-block:1px solid var(--dou-code-diff-border);background-color:color-mix(in oklab,var(--dou-color-text)3%,transparent);color:var(--dou-color-text-secondary);font:inherit;text-align:left;cursor:pointer;align-items: center;gap:6px;width:100%;height:28px;margin:0;padding:0 12px;font-size:12px}@media (hover:hover){.dou-code-diff__bar:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text)}}.dou-code-diff__bar:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-2px}@media (pointer:coarse){.dou-code-diff__bar{height:36px}}.dou-code-diff__bar-icon{flex:none;font-size:14px}.dou-code-diff__live{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-peer{position:relative;z-index:1;display:inline-block;height:var(--dou-code-editor-line-height);vertical-align:top;pointer-events:none;width:0}.dou-code-peer:before{content:"";position:absolute;background-color:var(--dou-code-peer-color);border-radius:1px;width:2px;height:100%;top:0;left:-1px}.dou-code-peer__name{position:absolute;background-color:var(--dou-code-peer-color);color:oklch(from var(--dou-code-peer-color)clamp(.2,(.66 - l)*100,.99)0 0);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:nowrap;user-select:none;animation:dou-code-peer-name var(--dou-motion-duration-fast)var(--dou-motion-easing)3s forwards;border-radius:4px 4px 4px 0;padding:0 6px;line-height:18px;bottom:100%;left:-1px}.dou-code-peer.is-below .dou-code-peer__name{border-radius:0 4px 4px;top:100%;bottom:auto}.dou-code-peer-selection{background-color:color-mix(in oklab,var(--dou-code-peer-color)20%,transparent)}}
|
|
1
|
+
@layer dou.components{.dou-code-editor{--dou-code-editor-font-size:var(--dou-font-size-sm);--dou-code-editor-line-height:20px;--dou-code-editor-padding-y:8px;--dou-code-editor-padding-x:12px;--dou-code-editor-gutter-padding-left:16px;--dou-code-editor-gutter-padding-right:12px;--dou-code-editor-gutter-overlay-offset:-4px;--dou-code-editor-bg:var(--dou-color-bg-surface);--dou-code-editor-gutter-bg:var(--dou-code-editor-bg);--dou-code-editor-gutter-text:var(--dou-color-text-tertiary);--dou-code-editor-border:var(--dou-color-border);--dou-code-editor-border-focus:color-mix(in oklab,var(--dou-color-focus)70%,var(--dou-color-text));--dou-code-editor-cursor:var(--dou-color-text);--dou-code-editor-active-line:color-mix(in oklab,var(--dou-color-text)4%,transparent);--dou-code-editor-selection:color-mix(in oklab,var(--dou-color-primary)20%,transparent);--dou-code-editor-match:color-mix(in oklab,var(--dou-color-warning)22%,transparent);--dou-code-editor-match-current:color-mix(in oklab,var(--dou-color-warning-text)80%,transparent);--dou-code-editor-match-mark:color-mix(in oklab,var(--dou-color-warning)60%,transparent);--dou-code-editor-bracket:color-mix(in oklab,var(--dou-color-text)35%,transparent);--dou-code-editor-error:var(--dou-color-danger-text);--dou-code-editor-warning:var(--dou-color-warning-text);--dou-code-editor-info:var(--dou-color-primary-text);--dou-code-editor-bracket-unmatched:color-mix(in oklab,var(--dou-color-danger-text)70%,transparent);position:relative;display:flex;box-sizing:border-box;min-height:calc(var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px);overflow:hidden;border:1px solid var(--dou-code-editor-border);border-radius:var(--dou-radius-container);background-color:var(--dou-code-editor-bg);color:var(--dou-color-text);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);font-variant-ligatures:none;line-height:var(--dou-code-editor-line-height);transition:border-color var(--dou-motion-duration-fast)var(--dou-motion-easing);flex-direction:column;width:100%;min-width:0}.dou-code-editor.is-focused{border-color:var(--dou-code-editor-border-focus)}.dou-code-editor:not(.is-bordered){min-height:calc(var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y));border:0;border-radius:0}.dou-code-editor:not(.is-focused){--dou-code-editor-selection:color-mix(in oklab,var(--dou-color-text)10%,transparent)}.dou-code-editor.is-disabled{color:var(--dou-color-text-disabled);cursor:not-allowed}.dou-code-editor__body{position:relative;display:flex;flex:auto;min-height:0}.dou-code-editor__scroller{position:relative;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin;flex:auto;min-width:0;min-height:0}.dou-code-editor:not(.is-scroll-y)>.dou-code-editor__body>.dou-code-editor__scroller{overflow-x:auto;overflow-y:hidden}.dou-code-editor__minimap{position:relative;overflow:hidden;box-shadow:inset 1px 0 0 color-mix(in oklab,var(--dou-color-text)6%,transparent);color:var(--dou-color-text-tertiary);cursor:default;touch-action:none;user-select:none;flex:none;width:96px}.dou-code-editor__minimap-canvas{position:absolute;width:100%;height:100%;inset:0}.dou-code-editor__minimap-view{position:absolute;background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent);transition:background-color var(--dou-motion-duration-fast)var(--dou-motion-easing);top:0;left:0;right:0}.dou-code-editor__minimap:hover .dou-code-editor__minimap-view{background-color:color-mix(in oklab,var(--dou-color-text)9%,transparent)}.dou-code-editor__minimap:active .dou-code-editor__minimap-view{background-color:color-mix(in oklab,var(--dou-color-text)12%,transparent)}.dou-code-editor__sizer{position:relative;display:flex;box-sizing:border-box;width:max-content;min-width:100%}.dou-code-editor__gutter{position:sticky;z-index:2;box-sizing:border-box;width:var(--dou-code-editor-gutter);background-color:var(--dou-code-editor-gutter-bg);color:var(--dou-code-editor-gutter-text);font-variant-numeric:tabular-nums;cursor:default;user-select:none;-webkit-user-select:none;touch-action:manipulation;flex:none;left:0}.dou-code-editor__numbers{position:absolute;will-change:transform;top:0;left:0;right:0}.dou-code-editor__number{position:relative;box-sizing:border-box;height:var(--dou-code-editor-line-height);padding:0 var(--dou-code-editor-gutter-padding-right)0 calc(var(--dou-code-editor-gutter-padding-left) + var(--dou-code-editor-gutter-cells,0px));text-align:right}.dou-code-editor__number.is-active{color:var(--dou-color-text-secondary)}.dou-code-editor.is-foldable>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number{padding-right:calc(var(--dou-code-editor-gutter-padding-right) + 12px)}.dou-code-editor:not(.is-line-numbers)>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number{padding:0}.dou-code-editor__fold-toggle{position:absolute;display:flex;height:var(--dou-code-editor-line-height);color:var(--dou-color-text-tertiary);cursor:pointer;opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);justify-content:center;align-items: center;width:14px;font-size:12px;top:0;right:6px}.dou-code-editor__gutter:hover .dou-code-editor__fold-toggle{opacity:1}.dou-code-editor__fold-toggle.is-folded{opacity:1}.dou-code-editor__fold-toggle:hover{color:var(--dou-color-text)}@media (pointer:coarse){.dou-code-editor__fold-toggle{opacity:1}.dou-code-editor__fold-toggle:before{position:absolute;content:"";inset:-4px -6px}}.dou-code-editor__content{position:relative;cursor:text;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;flex:auto;min-width:0}.dou-code-editor.is-disabled .dou-code-editor__content{cursor:not-allowed}.dou-code-editor__lines,.dou-code-editor__matches,.dou-code-editor__brackets,.dou-code-editor__selections,.dou-code-editor__cursors{position:absolute;pointer-events:none;top:0;left:0}.dou-code-editor__lines{will-change:transform;right:0}.dou-code-editor__line{box-sizing:border-box;height:var(--dou-code-editor-line-height);padding:0 var(--dou-code-editor-padding-x);white-space:pre;tab-size:var(--dou-code-editor-tab-size,2)}.dou-code-editor__line.is-wrapped{height:auto}.dou-code-editor__row{box-sizing:border-box;height:var(--dou-code-editor-line-height)}.dou-code-editor__fold-marker{display:inline-block;box-sizing:border-box;border:1px solid var(--dou-color-border);background-color:var(--dou-color-bg-muted);color:var(--dou-color-text-secondary);vertical-align:1px;cursor:pointer;pointer-events:auto;border-radius:4px;height:16px;margin-left:6px;padding:0 6px;font-size:12px;line-height:14px}.dou-code-editor__fold-marker:hover{color:var(--dou-color-text)}.dou-code-editor__line :-webkit-any(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__line :-moz-any(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__line :is(.dou-syntax-heading,.dou-syntax-strong){font-weight:inherit}.dou-code-editor__compose{text-decoration:underline;text-decoration-color:var(--dou-color-text-tertiary);text-underline-offset:3px}.dou-code-editor__probe{position:absolute;visibility:hidden;white-space:pre;pointer-events:none;top:0;left:0}.dou-code-editor__active-line{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-active-line);pointer-events:none;top:0;left:0;right:0}.dou-code-editor:not(.is-focused) .dou-code-editor__active-line{background-color:#0000}.dou-code-editor__match{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-match);border-radius:2px;top:0;left:0}.dou-code-editor__match.is-current{box-shadow:inset 0 0 0 1px var(--dou-code-editor-match-current)}.dou-code-editor__marks{position:absolute;z-index:3;pointer-events:none;width:6px;top:0;bottom:0;right:0}.dou-code-editor__mark{position:absolute;background-color:var(--dou-code-editor-match-mark);border-radius:1px;width:6px;height:2px;right:0}.dou-code-editor__mark.is-current{background-color:var(--dou-code-editor-match-current);height:3px}.dou-code-editor__live{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-editor__search{position:absolute;z-index:4;display:flex;container-type:inline-size;pointer-events:none;justify-content:flex-end;top:6px;left:6px;right:14px}.dou-code-editor__search>*{pointer-events:auto}.dou-code-editor__bracket{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);border:1px solid var(--dou-code-editor-bracket);border-radius:2px;top:0;left:0}.dou-code-editor__bracket.is-unmatched{border-color:var(--dou-code-editor-bracket-unmatched)}.dou-code-editor__selection{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-selection);border-radius:2px;top:0;left:0}.dou-code-editor__cursor{position:absolute;height:var(--dou-code-editor-line-height);background-color:var(--dou-code-editor-cursor);animation:1.2s step-end .5s infinite dou-code-editor-blink;border-radius:1px;width:2px;top:0;left:0}.dou-code-editor.is-readonly .dou-code-editor__cursor{opacity:.4;animation:none}@media (prefers-reduced-motion:reduce){.dou-code-editor__cursor{animation:none}}.dou-code-editor__placeholder{position:absolute;top:var(--dou-code-editor-padding-y);left:var(--dou-code-editor-padding-x);color:var(--dou-color-text-tertiary);white-space:pre;pointer-events:none}.dou-code-editor__input{position:absolute;z-index:-1;box-sizing:border-box;width:calc(100% - var(--dou-code-editor-padding-x));overflow:hidden;outline:none;color:#0000;caret-color:transparent;font:inherit;font-size:max(var(--dou-font-size-input-min),var(--dou-code-editor-font-size));line-height:inherit;letter-spacing:inherit;white-space:pre;tab-size:var(--dou-code-editor-tab-size,2);resize:none;pointer-events:none;background:0 0;border:0;min-width:1px;margin:0;padding:0}.dou-code-editor__input::selection{background:0 0}}@layer dou.components{.dou-code-editor__problem{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-thickness:1px;text-decoration-skip-ink:none;text-underline-offset:3px}.dou-code-editor__problem.is-error{text-decoration-color:var(--dou-code-editor-error)}.dou-code-editor__problem.is-warning{text-decoration-color:var(--dou-code-editor-warning)}.dou-code-editor__problem.is-info{text-decoration-color:var(--dou-code-editor-info)}.dou-code-editor__problem.is-hint{text-decoration-style:dotted;text-decoration-color:var(--dou-color-text-tertiary)}.dou-code-editor__cells{position:absolute;display:flex;top:0;bottom:0;left:0}.dou-code-editor__cell{display:inline-grid;grid-template-rows:var(--dou-code-editor-line-height);grid-auto-flow:column;position:relative;font-size:var(--dou-font-size-sm);flex:none;place-content: start center;align-items: center;height:100%}.dou-code-editor__cell[data-gutter-cell]{cursor:pointer}.dou-code-editor.is-disabled .dou-code-editor__cell[data-gutter-cell]{cursor:default}.dou-code-editor__cell[role=button]{border-radius:var(--dou-radius-control)}.dou-code-editor__cell[role=button]:focus-visible{outline:none}.dou-code-editor__cell[role=button]:focus-visible:after{position:absolute;box-sizing:border-box;height:var(--dou-code-editor-line-height);border:2px solid var(--dou-color-focus);border-radius:var(--dou-radius-control);content:"";pointer-events:none;top:0;left:0;right:0}.dou-code-editor__cell>svg{width:14px;height:14px}.dou-code-editor__cell.is-on-hover{opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing)}.dou-code-editor:not(.is-disabled) .dou-code-editor__number:-webkit-any(:hover,.is-hovered)>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor:not(.is-disabled) .dou-code-editor__number:-moz-any(:hover,.is-hovered)>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor:not(.is-disabled) .dou-code-editor__number:is(:hover,.is-hovered)>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor.is-focused .dou-code-editor__number.is-active>.dou-code-editor__cells>.dou-code-editor__cell.is-on-hover{opacity:1}.dou-code-editor__cell.is-on-hover:focus-visible{opacity:1}.dou-code-editor__overlays{position:absolute;top:0;right:var(--dou-code-editor-gutter-overlay-offset,-4px);z-index:1;display:flex;height:var(--dou-code-editor-line-height);pointer-events:none;align-items: center;gap:2px}.dou-code-editor.is-gutter-empty>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number>.dou-code-editor__overlays{left:2px;right:auto}.dou-code-editor__cell.is-overlay{display:inline-flex;box-sizing:border-box;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-code-editor-bg);box-shadow:var(--dou-shadow-sm);color:var(--dou-color-text-secondary);pointer-events:auto;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing),background-color var(--dou-motion-duration-fast)var(--dou-motion-easing),border-color var(--dou-motion-duration-fast)var(--dou-motion-easing),color var(--dou-motion-duration-fast)var(--dou-motion-easing);height:18px;font-size:12px;line-height:1}.dou-code-editor__cell.is-overlay>svg{width:12px;height:12px}@media (hover:hover){.dou-code-editor__cell.is-overlay:hover{border-color:var(--dou-color-border-strong);background-color:var(--dou-color-bg-muted);color:var(--dou-color-text)}}.dou-code-editor__cell.is-overlay[role=button]:focus-visible:after{height:auto;inset:-1px}@media (pointer:coarse){.dou-code-editor__cell.is-overlay:before{position:absolute;content:"";inset:-6px}}.dou-code-editor__cell.is-overlay.is-on-hover{opacity:0;pointer-events:none}.dou-code-editor:not(.is-disabled)>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number:-webkit-any(:hover,.is-hovered)>.dou-code-editor__overlays>.dou-code-editor__cell.is-overlay.is-on-hover{opacity:1;pointer-events:auto}.dou-code-editor:not(.is-disabled)>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number:-moz-any(:hover,.is-hovered)>.dou-code-editor__overlays>.dou-code-editor__cell.is-overlay.is-on-hover{opacity:1;pointer-events:auto}.dou-code-editor:not(.is-disabled)>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number:is(:hover,.is-hovered)>.dou-code-editor__overlays>.dou-code-editor__cell.is-overlay.is-on-hover{opacity:1;pointer-events:auto}.dou-code-editor.is-focused>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number.is-active>.dou-code-editor__overlays>.dou-code-editor__cell.is-overlay.is-on-hover{opacity:1;pointer-events:auto}.dou-code-editor__cell.is-overlay.is-on-hover:focus-visible{opacity:1;pointer-events:auto}.dou-code-editor__problem-icon.is-error{color:var(--dou-code-editor-error)}.dou-code-editor__problem-icon.is-warning{color:var(--dou-code-editor-warning)}.dou-code-editor__problem-icon.is-info{color:var(--dou-code-editor-info)}.dou-code-editor__problem-icon.is-hint{color:var(--dou-color-text-tertiary)}.dou-code-editor__problem-mark.is-error{background-color:var(--dou-code-editor-error)}.dou-code-editor__problem-mark.is-warning{background-color:var(--dou-code-editor-warning)}.dou-code-editor__problem-mark.is-info{background-color:var(--dou-code-editor-info)}.dou-code-editor__problem-mark.is-hint{background-color:var(--dou-color-text-tertiary)}.dou-code-editor__floating{display:contents}.dou-code-editor__floating.is-outside{--dou-code-editor-font-size:var(--dou-font-size-sm);--dou-code-editor-bg:var(--dou-color-bg-surface);--dou-code-editor-error:var(--dou-color-danger-text);--dou-code-editor-warning:var(--dou-color-warning-text);--dou-code-editor-info:var(--dou-color-primary-text);position:absolute;display:block;color:var(--dou-color-text);transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);width:0;height:0;line-height:20px;top:0;left:0}.dou-code-editor__floating.is-outside.is-scrolling{opacity:0;pointer-events:none;transition:none}.dou-code-editor__floating.is-outside.is-fixed{position:fixed}.dou-code-editor__problems{position:absolute;z-index:6;box-sizing:border-box;display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:normal;overflow-y:auto;overscroll-behavior:contain;flex-direction:column;gap:4px;width:max-content;max-width:min(440px,100% - 8px);padding:6px;line-height:20px;top:0;left:0}.dou-code-editor__problems>*{flex-shrink:0}.dou-code-editor__problem-item{display:flex;align-items: flex-start;gap:6px;padding:0 2px}.dou-code-editor__problem-item.is-error{--dou-code-editor-problem:var(--dou-code-editor-error)}.dou-code-editor__problem-item.is-warning{--dou-code-editor-problem:var(--dou-code-editor-warning)}.dou-code-editor__problem-item.is-info{--dou-code-editor-problem:var(--dou-code-editor-info)}.dou-code-editor__problem-item.is-hint{--dou-code-editor-problem:var(--dou-color-text-tertiary)}.dou-code-editor__problem-severity{color:var(--dou-code-editor-problem);flex:none;width:14px;height:20px}.dou-code-editor__problem-message{overflow-wrap:anywhere;color:var(--dou-color-text);min-width:0}.dou-code-editor__problem-source{color:var(--dou-color-text-tertiary);margin-left:8px}.dou-code-editor__fixes{display:flex;border-top:1px solid var(--dou-color-border-subtle);flex-wrap:wrap;gap:2px;padding-top:4px}.dou-code-editor__fix{display:inline-flex;border-radius:calc(var(--dou-radius-control) - 2px);color:var(--dou-color-primary-text);font:inherit;cursor:pointer;background:0 0;border:0;align-items: center;height:24px;padding:0 8px}.dou-code-editor__fix.is-active{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent)}.dou-code-editor__fix:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,transparent)}@media (pointer:coarse){.dou-code-editor__fix{height:36px}}.dou-code-editor__hover{color:var(--dou-color-text);overflow-wrap:anywhere;white-space:pre-wrap;padding:0 2px}.dou-code-editor__hover+.dou-code-editor__problem-item{border-top:1px solid var(--dou-color-border-subtle);padding-top:4px}.dou-code-lsp-markup{display:flex;white-space:normal;flex-direction:column;gap:6px}.dou-code-lsp-markup__text{white-space:pre-wrap;margin:0}.dou-code-lsp-markup__code{font-family:var(--dou-font-family-mono);white-space:pre-wrap;margin:0}.dou-code-lsp-markup__inline{font-family:var(--dou-font-family-mono)}.dou-code-editor__completions{position:absolute;z-index:7;box-sizing:border-box;display:flex;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);flex-direction:column;width:max-content;min-width:min(200px,100%);max-height:264px;padding:4px;line-height:20px;top:0;left:0}.dou-code-editor__completion-list{overflow-y:auto;overscroll-behavior:contain;flex:0 auto;min-height:28px}.dou-code-editor__completion{display:flex;border-radius:calc(var(--dou-radius-control) - 2px);color:var(--dou-color-text);cursor:pointer;align-items: center;gap:8px;height:28px;padding:0 8px 0 6px}.dou-code-editor__completion.is-active{background-color:color-mix(in oklab,var(--dou-color-text)8%,transparent)}@media (hover:hover){.dou-code-editor__completion:not(.is-active):hover{background-color:color-mix(in oklab,var(--dou-color-text)4%,transparent)}}@media (pointer:coarse){.dou-code-editor__completion{height:36px}}.dou-code-editor__completion-kind{color:var(--dou-color-text-tertiary);flex:none;width:16px;height:16px}.dou-code-editor__completion-label{overflow:hidden;text-overflow:ellipsis;white-space:pre;flex:none;max-width:75%}.dou-code-editor__completion-match{color:var(--dou-color-primary-text);background:0 0;font-weight:600}.dou-code-editor__completion-detail{overflow:hidden;color:var(--dou-color-text-tertiary);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;margin-left:auto;padding-left:16px}.dou-code-editor__completion-info{border-top:1px solid var(--dou-color-border-subtle);color:var(--dou-color-text-secondary);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:pre-wrap;overflow-wrap:anywhere;flex:none;max-width:400px;margin-top:4px;padding:6px 6px 2px}.dou-code-editor__signature{position:absolute;z-index:6;box-sizing:border-box;border:1px solid var(--dou-color-border);border-radius:var(--dou-radius-control);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-size:var(--dou-font-size-sm);overflow-y:auto;pointer-events:none;width:max-content;max-width:min(440px,100% - 8px);padding:4px 8px;line-height:20px;top:0;left:0}.dou-code-editor__signature-label{color:var(--dou-color-text-secondary);font-family:var(--dou-font-family-mono);font-size:var(--dou-code-editor-font-size);overflow-wrap:anywhere}.dou-code-editor__signature-active{color:var(--dou-color-text);text-decoration:underline;text-underline-offset:3px;font-weight:600}.dou-code-editor__signature-info{color:var(--dou-color-text-tertiary);font-family:var(--dou-font-family);white-space:pre-wrap}.dou-code-editor__field{box-shadow:inset 0 0 0 1px var(--dou-color-border-strong);border-radius:2px}.dou-code-editor__widgets{position:absolute;z-index:3;overflow-x:clip;pointer-events:none;inset:0}.dou-code-editor__widget-slot{position:absolute;top:0;right:0;left:var(--dou-code-editor-gutter,0px);pointer-events:none}.dou-code-editor__widget-slot.is-full-width{left:0}.dou-code-editor__widget{position:sticky;left:var(--dou-code-editor-gutter,0px);box-sizing:border-box;width:var(--dou-code-editor-widget-width,100%);pointer-events:auto;cursor:auto;font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:normal;user-select:text;-webkit-user-select:text;display:flow-root;max-width:100%;line-height:20px}.dou-code-editor__widget.is-full-width{width:var(--dou-code-editor-view-width,100%);left:0}.dou-code-editor__inline{display:inline-block;vertical-align:top;height:var(--dou-code-editor-line-height);white-space:nowrap}.dou-code-editor__panels{font-family:var(--dou-font-family);flex:none}.dou-code-editor__panels.is-top{border-bottom:1px solid var(--dou-color-border-subtle)}.dou-code-editor__panels.is-bottom{border-top:1px solid var(--dou-color-border-subtle)}.dou-code-editor__handle{position:absolute;z-index:5;touch-action:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;width:0;height:0;top:0;left:0}.dou-code-editor__handle:before{position:absolute;content:"";width:36px;height:36px;top:-6px}.dou-code-editor__handle:after{position:absolute;background-color:var(--dou-color-primary);content:"";width:14px;height:14px;top:0}.dou-code-editor__handle.is-start:before{left:-27px}.dou-code-editor__handle.is-start:after{border-radius:50% 0 50% 50%;right:0}.dou-code-editor__handle.is-end:before{left:-9px}.dou-code-editor__handle.is-end:after{border-radius:0 50% 50%;left:0}.dou-code-editor__handle.is-caret:before{left:-18px}.dou-code-editor__handle.is-caret:after{border-radius:0 50% 50%;width:12px;height:12px;top:4px;left:-6px;transform:rotate(45deg)}.dou-code-editor__magnifier{position:absolute;z-index:6;box-sizing:border-box;overflow:hidden;border:1px solid var(--dou-color-border);background:linear-gradient(var(--dou-code-editor-bg),var(--dou-code-editor-bg)),var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);pointer-events:none;border-radius:999px;width:128px;top:0;left:0}.dou-code-editor__magnifier-text{position:absolute;height:var(--dou-code-editor-line-height);margin-top:calc(var(--dou-code-editor-line-height)/-2);white-space:pre;tab-size:var(--dou-code-editor-tab-size);transform-origin:0 50%;top:50%;left:0}.dou-code-editor__magnifier-caret{position:absolute;height:calc(var(--dou-code-editor-line-height)*1.5);background-color:var(--dou-color-primary);border-radius:1px;width:2px;top:50%;translate:0 -50%}.dou-code-editor__menu{position:absolute;z-index:6;display:flex;border:1px solid var(--dou-color-border);border-radius:calc(var(--dou-radius-control) + 2px);background-color:var(--dou-color-bg-surface);box-shadow:var(--dou-shadow-md);font-family:var(--dou-font-family);white-space:nowrap;gap:2px;padding:2px;top:0;left:0}.dou-code-editor__menu-button{display:inline-flex;border-radius:var(--dou-radius-control);color:var(--dou-color-text);font:inherit;font-size:var(--dou-font-size-sm);cursor:pointer;-webkit-tap-highlight-color:transparent;background:0 0;border:0;align-items: center;min-width:36px;height:36px;padding:0 12px;line-height:1}.dou-code-editor__menu-button:active{background-color:color-mix(in oklab,var(--dou-color-text)8%,transparent)}@media (hover:hover){.dou-code-editor__menu-button:hover{background-color:color-mix(in oklab,var(--dou-color-text)5%,transparent)}}.dou-code-editor__keys{position:absolute;box-sizing:border-box;display:flex;border:1px solid color-mix(in oklab,var(--dou-color-text)10%,transparent);background-color:color-mix(in oklab,var(--dou-color-bg-surface)92%,transparent);box-shadow:var(--dou-shadow-md);-webkit-backdrop-filter:blur(20px)saturate(1.8);backdrop-filter:blur(20px)saturate(1.8);transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);border-radius:22px;height:44px;padding:0 3px 0 0;top:0;left:0}.dou-code-editor__keys.is-fixed{position:fixed}.dou-code-editor__keys.is-scrolling{opacity:0;pointer-events:none;transition:none}.dou-code-editor__keys>.dou-code-keys{background-color:#0000;border-top:0;flex:auto;min-width:0;height:42px}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__scroll{padding:0}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__arrows{position:relative;box-shadow:none;padding:0 0 0 5px}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__arrows:before{position:absolute;background-color:var(--dou-color-border-subtle);content:"";width:1px;top:10px;bottom:10px;left:0}.dou-code-editor__keys>.dou-code-keys .dou-code-keys__key{border-radius:18px}.dou-code-editor__keys-grip{display:flex;color:var(--dou-color-text-tertiary);cursor:grab;touch-action:none;-webkit-tap-highlight-color:transparent;background:0 0;border:0;flex:none;justify-content:center;align-items: center;width:36px;margin:0;padding:0 0 0 6px}.dou-code-editor__keys-grip>svg{width:18px;height:18px}.dou-code-editor__keys-grip:active{cursor:grabbing}.dou-code-editor__keys-grip:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-4px;border-radius:18px}.dou-code-keys{display:flex;box-sizing:border-box;border-top:1px solid var(--dou-color-border);background-color:var(--dou-color-bg-surface);color:var(--dou-color-text);font-family:var(--dou-font-family-mono);font-size:var(--dou-font-size-md);user-select:none;-webkit-user-select:none;height:45px}.dou-code-keys__scroll{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;touch-action:pan-x;flex:auto;align-items: center;gap:2px;min-width:0;padding:0 4px}.dou-code-keys__scroll::-webkit-scrollbar{display:none}.dou-code-keys__arrows{display:flex;box-shadow:-1px 0 0 var(--dou-color-border-subtle);flex:none;align-items: center;gap:2px;padding:0 4px}.dou-code-keys__stick{position:relative;color:var(--dou-color-text-tertiary);cursor:grab;touch-action:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;background:0 0;border:0;border-radius:50%;flex:none;width:36px;height:36px;margin:0;padding:0}.dou-code-keys__stick:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:0}.dou-code-keys__pad{position:absolute;z-index:1;display:flex;box-sizing:border-box;background-color:var(--dou-color-bg-muted);box-shadow:inset 0 0 0 1px var(--dou-color-border-subtle);pointer-events:none;transition-property:width,height,margin,background-color,box-shadow,translate;transition-duration:var(--dou-motion-duration-normal);transition-timing-function:var(--dou-motion-easing);border-radius:50%;justify-content:center;align-items: center;width:32px;height:32px;margin:-16px 0 0 -16px;top:50%;left:50%}.dou-code-keys__way{position:absolute;opacity:0;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);width:16px;height:16px}.dou-code-keys__way.is-up{top:8px}.dou-code-keys__way.is-down{bottom:8px}.dou-code-keys__way.is-left{left:8px}.dou-code-keys__way.is-right{right:8px}.dou-code-keys__thumb{box-sizing:border-box;background-color:var(--dou-color-bg-surface);box-shadow:0 0 0 1px color-mix(in oklab,var(--dou-color-text)14%,transparent),var(--dou-shadow-sm);transition-property:width,height,transform;transition-duration:var(--dou-motion-duration-normal);transition-timing-function:var(--dou-motion-easing-spring);border-radius:50%;width:18px;height:18px}.dou-code-keys__stick.is-held{cursor:grabbing}.dou-code-keys__stick.is-held .dou-code-keys__pad{background-color:var(--dou-color-bg-surface);box-shadow:inset 0 0 0 1px var(--dou-color-border),var(--dou-shadow-lg);transition-duration:var(--dou-motion-duration-slow);transition-timing-function:var(--dou-motion-easing-spring);width:104px;height:104px;margin:-52px 0 0 -52px}.dou-code-keys__stick.is-held .dou-code-keys__way{opacity:1}.dou-code-keys__stick.is-held .dou-code-keys__thumb{background-color:color-mix(in oklab,var(--dou-color-text)8%,var(--dou-color-bg-surface));width:40px;height:40px;transition-property:width,height}.dou-code-keys__key{display:inline-flex;box-sizing:border-box;border-radius:var(--dou-radius-control);color:inherit;font:inherit;cursor:pointer;touch-action:pan-x;-webkit-tap-highlight-color:transparent;transition-property:background-color,transform;transition-duration:var(--dou-motion-duration-fast);transition-timing-function:var(--dou-motion-easing-exit);background:0 0;border:0;flex:none;justify-content:center;align-items: center;min-width:36px;height:36px;padding:0 8px;line-height:1}.dou-code-keys__key>svg{color:var(--dou-color-text-secondary);width:18px;height:18px}@media (hover:hover){.dou-code-keys__key:hover{background-color:color-mix(in oklab,var(--dou-color-text)5%,transparent)}}.dou-code-keys__key.is-pressed{background-color:color-mix(in oklab,var(--dou-color-text)10%,transparent);transition-duration:var(--dou-motion-duration-slow);transition-timing-function:var(--dou-motion-easing-spring);transform:scale(1.12)}}@layer dou.components{.dou-code-input{--dou-code-input-height:var(--dou-control-height-md);display:block;width:100%;min-width:0}.dou-code-input .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-md);--dou-code-editor-padding-y:calc((var(--dou-code-input-height) - var(--dou-code-editor-line-height) - 2px)/2);min-height:var(--dou-code-input-height);border-radius:var(--dou-radius-control);transition-property:border-color,box-shadow}@media (hover:hover){.dou-code-input .dou-code-editor:not(:-webkit-any(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}.dou-code-input .dou-code-editor:not(:-moz-any(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}.dou-code-input .dou-code-editor:not(:is(.is-focused,.is-disabled)):hover{--dou-code-editor-border:var(--dou-color-border-strong)}}.dou-code-input .dou-code-editor__marks{display:none}.dou-code-input:not(.is-multiline) .dou-code-editor{height:var(--dou-code-input-height)}.dou-code-input:not(.is-multiline) .dou-code-editor .dou-code-editor__scroller{scrollbar-width:none}.dou-code-input:not(.is-multiline) .dou-code-editor .dou-code-editor__scroller::-webkit-scrollbar{display:none}.dou-code-input.is-multiline .dou-code-editor{min-height:calc(var(--dou-code-input-min-rows,1)*var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px);max-height:calc(var(--dou-code-input-max-rows,6)*var(--dou-code-editor-line-height) + 2*var(--dou-code-editor-padding-y) + 2px)}.dou-code-input.is-invalid .dou-code-editor{--dou-code-editor-border:color-mix(in oklab,var(--dou-color-danger)55%,var(--dou-color-border));--dou-code-editor-border-focus:var(--dou-color-danger)}.dou-code-input--sm{--dou-code-input-height:var(--dou-control-height-sm)}.dou-code-input--sm .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-sm)}.dou-code-input--lg{--dou-code-input-height:var(--dou-control-height-lg)}.dou-code-input--lg .dou-code-editor{--dou-code-editor-padding-x:var(--dou-control-padding-x-lg)}}@keyframes dou-code-peer-name{to{opacity:0;visibility:hidden}}@keyframes dou-code-editor-blink{50%{opacity:0}}@layer dou.components{.dou-code-diff{--dou-code-diff-removed:color-mix(in oklab,var(--dou-color-danger)10%,transparent);--dou-code-diff-added:color-mix(in oklab,var(--dou-color-success)10%,transparent);--dou-code-diff-removed-word:color-mix(in oklab,var(--dou-color-danger-text)30%,transparent);--dou-code-diff-added-word:color-mix(in oklab,var(--dou-color-success-text)30%,transparent);--dou-code-diff-border:var(--dou-color-border);--dou-code-diff-toolbar-bg:var(--dou-color-bg-surface);--dou-code-diff-toolbar-top:0px;position:relative;display:flex;box-sizing:border-box;overflow:clip;border:1px solid var(--dou-code-diff-border);border-radius:var(--dou-radius-container);background-color:var(--dou-color-bg-surface);transition:border-color var(--dou-motion-duration-fast)var(--dou-motion-easing);flex-direction:column;width:100%;min-width:0}.dou-code-diff:focus-within{border-color:color-mix(in oklab,var(--dou-color-focus)70%,var(--dou-color-text))}.dou-code-diff:not(.is-bordered){border:0;border-radius:0}.dou-code-diff__toolbar{display:flex;border-bottom:1px solid var(--dou-code-diff-border);background-color:var(--dou-code-diff-toolbar-bg);font-size:var(--dou-font-size-sm);flex:none;align-items: center;gap:2px;min-height:36px;padding:0 6px 0 12px}@media (pointer:coarse){.dou-code-diff__toolbar{min-height:44px}}.dou-code-diff__toolbar.is-sticky{position:sticky;top:var(--dou-code-diff-toolbar-top);z-index:4}.dou-code-diff__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;margin-inline-end:8px}.dou-code-diff__stats{display:flex;overflow:hidden;white-space:nowrap;flex:auto;align-items: center;gap:8px;min-width:0}.dou-code-diff__title+.dou-code-diff__stats{flex:none;margin-inline-end:4px}.dou-code-diff__count{font-family:var(--dou-font-family-mono);font-variant-numeric:tabular-nums}.dou-code-diff__count.is-added{color:var(--dou-color-success-text)}.dou-code-diff__count.is-removed{color:var(--dou-color-danger-text)}.dou-code-diff__summary{overflow:hidden;color:var(--dou-color-text-secondary);text-overflow:ellipsis}.dou-code-diff__hidden-text{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-diff__toolbar .dou-button{flex:none}@media (pointer:coarse){.dou-code-diff__toolbar .dou-button{position:relative;min-width:36px;min-height:36px}.dou-code-diff__toolbar .dou-button:after{position:absolute;content:"";inset:-2px}}.dou-code-diff__body{display:grid;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr);isolation:isolate;flex:auto;min-height:0}.dou-code-diff--split>.dou-code-diff__body{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)minmax(0,1fr)}.dou-code-diff--split>.dou-code-diff__body>.dou-code-diff__side>.dou-code-editor{--dou-code-editor-gutter-padding-left:6px;--dou-code-editor-gutter-padding-right:8px;--dou-code-editor-padding-x:8px}.dou-code-diff--split>.dou-code-diff__body>.dou-code-diff__side>.dou-code-editor>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number{font-size:12px}.dou-code-diff--split>.dou-code-diff__body>.dou-code-diff__side>.dou-code-editor>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number>.dou-code-editor__overlays{right:auto;left:calc(var(--dou-code-editor-gutter-cells,16px) - 15px)}.dou-code-diff--inline>.dou-code-diff__body>.dou-code-editor{--dou-code-editor-padding-x:6px;--dou-code-editor-gutter-overlay-offset:-2px}.dou-code-diff__label{border-bottom:1px solid var(--dou-code-diff-border);color:var(--dou-color-text-secondary);padding:4px 12px;font-size:12px}.dou-code-diff__label:nth-child(2){border-left:1px solid var(--dou-code-diff-border)}.dou-code-diff__side{display:flex;flex-direction:column;min-width:0;min-height:0}.dou-code-diff__side.is-modified{border-left:1px solid var(--dou-code-diff-border)}.dou-code-diff__side>.dou-code-editor{flex:auto}.dou-code-diff__line.is-removed{background-color:var(--dou-code-diff-removed)}.dou-code-diff__line.is-added{background-color:var(--dou-code-diff-added)}.dou-code-diff__word.is-removed{background-color:var(--dou-code-diff-removed-word)}.dou-code-diff__word.is-added{background-color:var(--dou-code-diff-added-word)}.dou-code-editor__cell.dou-code-diff__sign{font-family:var(--dou-font-family-mono)}.dou-code-editor__cell.dou-code-diff__sign:after{position:absolute;z-index:-1;top:0;bottom:0;left:calc(100% - var(--dou-code-editor-gutter-cells));width:var(--dou-code-editor-gutter);content:"";pointer-events:none}.dou-code-editor__cell.dou-code-diff__sign.is-removed{color:var(--dou-color-danger-text)}.dou-code-editor__cell.dou-code-diff__sign.is-removed:after{background-color:var(--dou-code-diff-removed)}.dou-code-editor__cell.dou-code-diff__sign.is-added{color:var(--dou-color-success-text)}.dou-code-editor__cell.dou-code-diff__sign.is-added:after{background-color:var(--dou-code-diff-added)}.dou-code-editor__cell.dou-code-diff__number{box-sizing:border-box;color:var(--dou-code-editor-gutter-text);font-family:var(--dou-font-family-mono);font-variant-numeric:tabular-nums;justify-content:flex-end;padding:0 6px;font-size:12px}.dou-code-editor__cell.dou-code-diff__number.is-modified{padding-left:2px}.dou-code-diff.is-compact>.dou-code-diff__body>.dou-code-editor>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number>.dou-code-editor__cells>.dou-code-editor__cell.dou-code-diff__number{padding:0 4px;font-size:11px}.dou-code-diff.is-compact>.dou-code-diff__body>.dou-code-editor>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number>.dou-code-editor__cells>.dou-code-editor__cell.dou-code-diff__number.is-modified{padding-left:2px}.dou-code-diff.is-compact>.dou-code-diff__body>.dou-code-editor>.dou-code-editor__body>.dou-code-editor__scroller>.dou-code-editor__sizer>.dou-code-editor__gutter>.dou-code-editor__numbers>.dou-code-editor__number>.dou-code-editor__cells>.dou-code-editor__cell.dou-code-diff__sign{font-size:12px}.dou-code-diff__widget{display:flow-root}.dou-code-diff--split>.dou-code-diff__body{position:relative}.dou-code-diff__spans{position:absolute;z-index:3;overflow:hidden;pointer-events:none;left:0;right:0}.dou-code-diff__span{position:absolute;display:flow-root;box-sizing:border-box;font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);pointer-events:auto;transition:opacity var(--dou-motion-duration-fast)var(--dou-motion-easing);line-height:20px;top:0;left:0;right:0}.dou-code-diff__span:not(.is-placed){visibility:hidden;opacity:0;transition:none}.dou-code-diff__filler{background-color:var(--dou-code-editor-bg);background-image:repeating-linear-gradient(-45deg,transparent 0 6px,color-mix(in oklab,var(--dou-color-text)5%,transparent)6px 7px)}.dou-code-diff__bar{display:flex;box-sizing:border-box;border:0;border-block:1px solid var(--dou-code-diff-border);background-color:color-mix(in oklab,var(--dou-color-text)3%,var(--dou-code-editor-bg));color:var(--dou-color-text-secondary);font:inherit;text-align:left;cursor:pointer;align-items: center;gap:6px;width:100%;height:28px;margin:0;padding:0 12px;font-size:12px}@media (hover:hover){.dou-code-diff__bar:hover{background-color:color-mix(in oklab,var(--dou-color-text)6%,var(--dou-code-editor-bg));color:var(--dou-color-text)}}.dou-code-diff__bar:focus-visible{outline:2px solid var(--dou-color-focus);outline-offset:-2px}@media (pointer:coarse){.dou-code-diff__bar{height:36px}}.dou-code-diff__bar-icon{flex:none;font-size:14px}.dou-code-diff__live{position:absolute;overflow:hidden;clip-path:inset(50%);white-space:nowrap;width:1px;height:1px}.dou-code-peer{position:relative;z-index:1;display:inline-block;height:var(--dou-code-editor-line-height);vertical-align:top;pointer-events:none;width:0}.dou-code-peer:before{content:"";position:absolute;background-color:var(--dou-code-peer-color);border-radius:1px;width:2px;height:100%;top:0;left:-1px}.dou-code-peer__name{position:absolute;background-color:var(--dou-code-peer-color);color:oklch(from var(--dou-code-peer-color)clamp(.2,(.66 - l)*100,.99)0 0);font-family:var(--dou-font-family);font-size:var(--dou-font-size-sm);white-space:nowrap;user-select:none;animation:dou-code-peer-name var(--dou-motion-duration-fast)var(--dou-motion-easing)3s forwards;border-radius:4px 4px 4px 0;padding:0 6px;line-height:18px;bottom:100%;left:-1px}.dou-code-peer.is-below .dou-code-peer__name{border-radius:0 4px 4px;top:100%;bottom:auto}.dou-code-peer-selection{background-color:color-mix(in oklab,var(--dou-code-peer-color)20%,transparent)}}
|
|
@@ -12,15 +12,18 @@ declare const __VLS_base: import("vue").DefineComponent<CodeDiffProps, CodeDiffE
|
|
|
12
12
|
toolbar: boolean;
|
|
13
13
|
language: import("./index.js").CodeLanguage<any> | null;
|
|
14
14
|
tabSize: number;
|
|
15
|
+
mode: "auto" | "split" | "inline";
|
|
15
16
|
original: string;
|
|
16
17
|
messages: Partial<import("./locale").CodeMessages>;
|
|
17
|
-
mode: "split" | "inline" | "auto";
|
|
18
18
|
modelValue: string;
|
|
19
19
|
bordered: boolean;
|
|
20
|
+
worker: import("./index.js").CodeWorkerOption;
|
|
21
|
+
syncHighlightLines: number;
|
|
20
22
|
wrap: boolean;
|
|
21
23
|
extensions: CodeExtension[];
|
|
22
24
|
editable: boolean;
|
|
23
25
|
widgets: CodeDiffWidget[];
|
|
26
|
+
syncDiffLines: number;
|
|
24
27
|
collapseUnchanged: boolean | {
|
|
25
28
|
context?: number;
|
|
26
29
|
minLines?: number;
|
|
@@ -25,13 +25,14 @@ declare const __VLS_export: import("vue").DefineComponent<CodeEditorProps, CodeE
|
|
|
25
25
|
scrollY: boolean;
|
|
26
26
|
language: import(".").CodeLanguage<any> | null;
|
|
27
27
|
tabSize: number;
|
|
28
|
-
worker: boolean | (() => Worker);
|
|
29
28
|
messages: Partial<import("./locale").CodeMessages>;
|
|
30
29
|
modelValue: string;
|
|
31
30
|
lineNumbers: boolean;
|
|
32
31
|
gutter: boolean;
|
|
33
32
|
bordered: boolean;
|
|
34
33
|
activeLine: boolean;
|
|
34
|
+
worker: import(".").CodeWorkerOption;
|
|
35
|
+
syncHighlightLines: number;
|
|
35
36
|
closeBrackets: boolean;
|
|
36
37
|
matchBrackets: boolean;
|
|
37
38
|
searchable: boolean;
|
|
@@ -89,6 +89,11 @@ export interface CodeWidget {
|
|
|
89
89
|
height?: number;
|
|
90
90
|
/** What it is, read out when the cursor moves onto its line, e.g. "戴兜的评论". */
|
|
91
91
|
label?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Draws across the gutter too, taking the full width of the editor's view.
|
|
94
|
+
* Off by default, so widgets start beside the gutter, aligned with the text.
|
|
95
|
+
*/
|
|
96
|
+
fullWidth?: boolean;
|
|
92
97
|
}
|
|
93
98
|
/** Something drawn in a column beside the line numbers, on line `line` (from 1). */
|
|
94
99
|
export interface CodeGutterMarker {
|
|
@@ -126,8 +131,15 @@ export interface CodeGutterHoverMarker extends Pick<CodeGutterMarker, 'icon' | '
|
|
|
126
131
|
/** A column of the gutter, left of the line numbers. */
|
|
127
132
|
export interface CodeGutter {
|
|
128
133
|
name: string;
|
|
129
|
-
/** In px. Defaults to 16. */
|
|
134
|
+
/** In px. Defaults to 16 (or 18 when `overlay` is set). */
|
|
130
135
|
width?: number;
|
|
136
|
+
/**
|
|
137
|
+
* Draws markers floating over the gutter's right edge without reserving a
|
|
138
|
+
* dedicated column width (0px layout footprint). Best paired with
|
|
139
|
+
* `hoverMarker` or `visible: 'hover'` for row actions such as adding review
|
|
140
|
+
* comments. Empty rows take no pointer events.
|
|
141
|
+
*/
|
|
142
|
+
overlay?: boolean;
|
|
131
143
|
/** The markers on the lines in view; reactive state read here updates them. */
|
|
132
144
|
markers?: (context: CodeExtensionContext) => CodeGutterMarker[];
|
|
133
145
|
/** A marker on every other line, shown on hover. */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -21,13 +21,14 @@ export declare const DouCodeEditor: import("dou-ui").WithInstall<import("vue").D
|
|
|
21
21
|
scrollY: boolean;
|
|
22
22
|
language: import("./index.js").CodeLanguage<any> | null;
|
|
23
23
|
tabSize: number;
|
|
24
|
-
worker: boolean | (() => Worker);
|
|
25
24
|
messages: Partial<import("./locale").CodeMessages>;
|
|
26
25
|
modelValue: string;
|
|
27
26
|
lineNumbers: boolean;
|
|
28
27
|
gutter: boolean;
|
|
29
28
|
bordered: boolean;
|
|
30
29
|
activeLine: boolean;
|
|
30
|
+
worker: import("./index.js").CodeWorkerOption;
|
|
31
|
+
syncHighlightLines: number;
|
|
31
32
|
closeBrackets: boolean;
|
|
32
33
|
matchBrackets: boolean;
|
|
33
34
|
searchable: boolean;
|
|
@@ -82,15 +83,18 @@ export declare const DouCodeDiff: import("dou-ui").WithInstall<{
|
|
|
82
83
|
toolbar: boolean;
|
|
83
84
|
language: import("./index.js").CodeLanguage<any> | null;
|
|
84
85
|
tabSize: number;
|
|
86
|
+
mode: "auto" | "split" | "inline";
|
|
85
87
|
original: string;
|
|
86
88
|
messages: Partial<import("./locale").CodeMessages>;
|
|
87
|
-
mode: "split" | "inline" | "auto";
|
|
88
89
|
modelValue: string;
|
|
89
90
|
bordered: boolean;
|
|
91
|
+
worker: import("./index.js").CodeWorkerOption;
|
|
92
|
+
syncHighlightLines: number;
|
|
90
93
|
wrap: boolean;
|
|
91
94
|
extensions: import("./extension").CodeExtension[];
|
|
92
95
|
editable: boolean;
|
|
93
96
|
widgets: import("./types").CodeDiffWidget[];
|
|
97
|
+
syncDiffLines: number;
|
|
94
98
|
collapseUnchanged: boolean | {
|
|
95
99
|
context?: number;
|
|
96
100
|
minLines?: number;
|
|
@@ -114,15 +118,18 @@ export declare const DouCodeDiff: import("dou-ui").WithInstall<{
|
|
|
114
118
|
toolbar: boolean;
|
|
115
119
|
language: import("./index.js").CodeLanguage<any> | null;
|
|
116
120
|
tabSize: number;
|
|
121
|
+
mode: "auto" | "split" | "inline";
|
|
117
122
|
original: string;
|
|
118
123
|
messages: Partial<import("./locale").CodeMessages>;
|
|
119
|
-
mode: "split" | "inline" | "auto";
|
|
120
124
|
modelValue: string;
|
|
121
125
|
bordered: boolean;
|
|
126
|
+
worker: import("./index.js").CodeWorkerOption;
|
|
127
|
+
syncHighlightLines: number;
|
|
122
128
|
wrap: boolean;
|
|
123
129
|
extensions: import("./extension").CodeExtension[];
|
|
124
130
|
editable: boolean;
|
|
125
131
|
widgets: import("./types").CodeDiffWidget[];
|
|
132
|
+
syncDiffLines: number;
|
|
126
133
|
collapseUnchanged: boolean | {
|
|
127
134
|
context?: number;
|
|
128
135
|
minLines?: number;
|
|
@@ -146,15 +153,18 @@ export declare const DouCodeDiff: import("dou-ui").WithInstall<{
|
|
|
146
153
|
toolbar: boolean;
|
|
147
154
|
language: import("./index.js").CodeLanguage<any> | null;
|
|
148
155
|
tabSize: number;
|
|
156
|
+
mode: "auto" | "split" | "inline";
|
|
149
157
|
original: string;
|
|
150
158
|
messages: Partial<import("./locale").CodeMessages>;
|
|
151
|
-
mode: "split" | "inline" | "auto";
|
|
152
159
|
modelValue: string;
|
|
153
160
|
bordered: boolean;
|
|
161
|
+
worker: import("./index.js").CodeWorkerOption;
|
|
162
|
+
syncHighlightLines: number;
|
|
154
163
|
wrap: boolean;
|
|
155
164
|
extensions: import("./extension").CodeExtension[];
|
|
156
165
|
editable: boolean;
|
|
157
166
|
widgets: import("./types").CodeDiffWidget[];
|
|
167
|
+
syncDiffLines: number;
|
|
158
168
|
collapseUnchanged: boolean | {
|
|
159
169
|
context?: number;
|
|
160
170
|
minLines?: number;
|
|
@@ -187,8 +197,10 @@ export { defaultKeymap } from './core/keymap';
|
|
|
187
197
|
export { findPartner, matchBracket } from './core/brackets';
|
|
188
198
|
export type { BracketMatch } from './core/brackets';
|
|
189
199
|
export { CodeStream } from './language/stream';
|
|
190
|
-
export { copyPlain, defineCodeLanguage, languageFor, lineParts, samePlain, tokenizeLine, tokenTypes, } from './language/language';
|
|
191
|
-
export type { CodeLanguage, CodeLanguageSpec, CodeLineTokens, CodeTokenType, } from './language/language';
|
|
200
|
+
export { copyPlain, defineCodeLanguage, languageFor, lineParts, remoteCodeLanguage, samePlain, tokenizeLine, tokenTypes, } from './language/language';
|
|
201
|
+
export type { CodeLanguage, CodeLanguageSpec, CodeLineTokens, CodeTokenType, RemoteCodeLanguageOptions, } from './language/language';
|
|
202
|
+
export { createCodeWorkerPool } from './language/worker-client';
|
|
203
|
+
export type { CodeWorkerOption, CodeWorkerPool, CodeWorkerPoolOptions, } from './language/worker-client';
|
|
192
204
|
export { CodeHighlighter } from './language/highlighter';
|
|
193
205
|
export { createCodeHighlighter, highlightToHtml } from './language/to-html';
|
|
194
206
|
export { createJavaScript, javascript, jsx, tsx, typescript } from './languages/javascript';
|
|
@@ -45,6 +45,12 @@ export interface CodeLanguageSpec<S> {
|
|
|
45
45
|
* ones the names are looked up in.
|
|
46
46
|
*/
|
|
47
47
|
nested?: readonly CodeLanguage[];
|
|
48
|
+
/**
|
|
49
|
+
* How a highlighting worker transfers results for this language:
|
|
50
|
+
* - `'states'` (default): sends serialized state checkpoints so the page tokenizes visible lines.
|
|
51
|
+
* - `'tokens'`: keeps non-serializable states (such as Shiki's `StateStack`) in the worker and sends flat line token arrays directly.
|
|
52
|
+
*/
|
|
53
|
+
workerMode?: 'states' | 'tokens';
|
|
48
54
|
}
|
|
49
55
|
/** A language: how to read its tokens, and a few facts for editing it. */
|
|
50
56
|
export interface CodeLanguage<S = any> {
|
|
@@ -64,6 +70,7 @@ export interface CodeLanguage<S = any> {
|
|
|
64
70
|
readonly indentAfter?: RegExp;
|
|
65
71
|
languageAt(state: S): CodeLanguage | null;
|
|
66
72
|
readonly nested: readonly CodeLanguage[];
|
|
73
|
+
readonly workerMode?: 'states' | 'tokens';
|
|
67
74
|
}
|
|
68
75
|
/** Copies arrays and plain objects; everything else (languages among them) is shared. */
|
|
69
76
|
export declare function copyPlain<T>(value: T): T;
|
|
@@ -86,6 +93,26 @@ export declare function samePlain(a: unknown, b: unknown): boolean;
|
|
|
86
93
|
* ```
|
|
87
94
|
*/
|
|
88
95
|
export declare function defineCodeLanguage<S = Record<string, never>>(spec: CodeLanguageSpec<S>): CodeLanguage<S>;
|
|
96
|
+
export interface RemoteCodeLanguageOptions {
|
|
97
|
+
/** The language name resolved inside the highlighting worker (e.g. `'rust'`, `'go'`, `'proto'`). */
|
|
98
|
+
name: string;
|
|
99
|
+
aliases?: string[];
|
|
100
|
+
/** How the language writes comments, for toggling them. */
|
|
101
|
+
comment?: {
|
|
102
|
+
line?: string;
|
|
103
|
+
block?: [open: string, close: string];
|
|
104
|
+
};
|
|
105
|
+
brackets?: string;
|
|
106
|
+
autoClose?: string;
|
|
107
|
+
indentAfter?: RegExp;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Describes a language highlighted entirely inside a Web Worker (such as a
|
|
111
|
+
* Shiki grammar loaded in the worker), without loading its tokenizer or WASM
|
|
112
|
+
* on the main thread. Editing features (comments, bracket pairing, auto-close,
|
|
113
|
+
* indentation) still work on the page; without a worker it renders plain text.
|
|
114
|
+
*/
|
|
115
|
+
export declare function remoteCodeLanguage(options: RemoteCodeLanguageOptions): CodeLanguage;
|
|
89
116
|
/** The language among `languages` named `name` or one of its aliases, ignoring case. */
|
|
90
117
|
export declare function languageFor(languages: readonly CodeLanguage[], name: string | undefined): CodeLanguage | null;
|
|
91
118
|
/**
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ChangeSet } from '../core/changes';
|
|
2
|
+
import type { CodeText } from '../core/text';
|
|
3
|
+
import type { CodeLineTokens } from './language';
|
|
4
|
+
/** Compresses sorted 1-based line numbers into contiguous inclusive `[from, to]` intervals. */
|
|
5
|
+
export declare function compressLineRanges(numbers: readonly number[]): Array<[from: number, to: number]>;
|
|
6
|
+
/**
|
|
7
|
+
* Caches flat per-line tokens returned by a highlighting worker in `tokens`
|
|
8
|
+
* mode (e.g. Shiki grammars whose state lives only inside the worker).
|
|
9
|
+
*
|
|
10
|
+
* Lines before an edit stay fresh across document versions; lines after an edit
|
|
11
|
+
* shift by the line delta so the viewport keeps its colors without flickering
|
|
12
|
+
* while the worker recomputes the new version.
|
|
13
|
+
*/
|
|
14
|
+
export declare class RemoteTokenStore {
|
|
15
|
+
private readonly maxSize;
|
|
16
|
+
/** 1-based line number → flat tokens, oldest first for LRU eviction. */
|
|
17
|
+
private tokens;
|
|
18
|
+
/** 1-based line number → version at which the cached tokens were produced. */
|
|
19
|
+
private versions;
|
|
20
|
+
private currentVersion;
|
|
21
|
+
private workerFrontier;
|
|
22
|
+
constructor(maxSize?: number);
|
|
23
|
+
get version(): number;
|
|
24
|
+
get frontier(): number;
|
|
25
|
+
/** Cached tokens for 1-based line `n`, or `null` if never received yet. */
|
|
26
|
+
line(n: number): CodeLineTokens | null;
|
|
27
|
+
/** Whether every line in 1-based inclusive `[from, to]` has tokens for the current version. */
|
|
28
|
+
readyRange(from: number, to: number): boolean;
|
|
29
|
+
/** Whether every 1-based line number in `numbers` has tokens for the current version. */
|
|
30
|
+
readyNumbers(numbers: readonly number[]): boolean;
|
|
31
|
+
/** Stores flat line tokens starting at 1-based line `from` from the worker. */
|
|
32
|
+
adopt(from: number, lines: readonly CodeLineTokens[], frontier: number): void;
|
|
33
|
+
/** Stores flat line tokens for multiple disjoint visible ranges returned by the worker. */
|
|
34
|
+
adoptRanges(ranges: ReadonlyArray<readonly [from: number, lines: readonly CodeLineTokens[]]>, frontier: number): void;
|
|
35
|
+
/** Shifts cached lines across an edit so unchanged regions avoid flicker while stale lines re-fetch. */
|
|
36
|
+
update(oldDoc: CodeText, nextDoc: CodeText, changes?: ChangeSet): void;
|
|
37
|
+
clear(): void;
|
|
38
|
+
}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import type { ChangeSet } from '../core/changes';
|
|
2
|
+
import type { CodeDiffHunk, CodeDiffOptions } from '../core/diff';
|
|
2
3
|
import type { CodeText } from '../core/text';
|
|
3
|
-
import type { CodeLanguage } from './language';
|
|
4
|
+
import type { CodeLanguage, CodeLineTokens } from './language';
|
|
5
|
+
export declare function defaultPoolSize(): number;
|
|
6
|
+
export interface SyntaxWorkerHandlers {
|
|
7
|
+
states: (points: Array<[line: number, state: unknown]>) => void;
|
|
8
|
+
/** Flat per-line tokens returned in `tokens` mode (e.g. Shiki or non-serializable states). */
|
|
9
|
+
tokens?: (from: number, lines: readonly CodeLineTokens[], frontier: number, ranges?: ReadonlyArray<readonly [from: number, lines: readonly CodeLineTokens[]]>) => void;
|
|
10
|
+
/** The worker hasn't the language named `missing`, or can't highlight it (no `missing`). */
|
|
11
|
+
unsupported: (missing?: string) => void;
|
|
12
|
+
/** The worker could not run (it failed to load, or threw). */
|
|
13
|
+
failed: (error: unknown) => void;
|
|
14
|
+
/** Notifies a worker pool whether this client currently has an in-flight request. */
|
|
15
|
+
onBusyChange?: (busy: boolean) => void;
|
|
16
|
+
}
|
|
4
17
|
/**
|
|
5
18
|
* The editor's side of a highlighting worker (`serveCodeHighlighting`).
|
|
6
|
-
* The text goes over the first time
|
|
7
|
-
*
|
|
8
|
-
*
|
|
19
|
+
* The text goes over the first time syntax data is wanted, in pieces between
|
|
20
|
+
* other work; every change follows it. Newer viewport requests preempt older
|
|
21
|
+
* ones, and `cancel()` aborts pending work when scrolled out of view.
|
|
9
22
|
*/
|
|
10
23
|
export declare class SyntaxWorkerClient {
|
|
11
24
|
private readonly worker;
|
|
@@ -17,7 +30,12 @@ export declare class SyntaxWorkerClient {
|
|
|
17
30
|
private readonly id;
|
|
18
31
|
/** Changes sent so far; the worker's answers name how many it had taken in. */
|
|
19
32
|
private version;
|
|
33
|
+
/** Monotonic request counter so newer viewport requests preempt stale ones. */
|
|
34
|
+
private seq;
|
|
20
35
|
private asking;
|
|
36
|
+
private paused;
|
|
37
|
+
private busy;
|
|
38
|
+
private lastAsked;
|
|
21
39
|
private closed;
|
|
22
40
|
/** Sending the text: messages wait until it is all there. */
|
|
23
41
|
private sending;
|
|
@@ -25,28 +43,80 @@ export declare class SyntaxWorkerClient {
|
|
|
25
43
|
private queue;
|
|
26
44
|
private timer;
|
|
27
45
|
private readonly languages;
|
|
46
|
+
private readonly mode;
|
|
28
47
|
constructor(worker: Worker, language: CodeLanguage,
|
|
29
48
|
/** The text as it is now. */
|
|
30
|
-
text: () => CodeText, tabSize: number, handlers:
|
|
31
|
-
|
|
32
|
-
/** The worker hasn't the language named `missing`, or can't send its states (no `missing`). */
|
|
33
|
-
unsupported: (missing?: string) => void;
|
|
34
|
-
/** The worker could not run (it failed to load, or threw). */
|
|
35
|
-
failed: (error: unknown) => void;
|
|
36
|
-
});
|
|
49
|
+
text: () => CodeText, tabSize: number, handlers: SyntaxWorkerHandlers);
|
|
50
|
+
private setBusy;
|
|
37
51
|
private fail;
|
|
38
52
|
private post;
|
|
39
53
|
private open;
|
|
40
54
|
private listen;
|
|
41
55
|
/** Passes on a change made to the text, once the worker has it. */
|
|
42
56
|
change(changes: ChangeSet): void;
|
|
43
|
-
/**
|
|
44
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Requests syntax data up to `until` (and flat tokens for 1-based inclusive
|
|
59
|
+
* `[tokensFrom, tokensTo]` or disjoint `tokenRanges` when in `tokens` mode).
|
|
60
|
+
* A new range preempts any older in-flight request.
|
|
61
|
+
*/
|
|
62
|
+
want(from: number, until: number, tokensFrom?: number, tokensTo?: number, tokenRanges?: Array<[from: number, to: number]>): void;
|
|
63
|
+
/** Cancels any pending highlighting task for this document (e.g. when scrolled out of view). */
|
|
64
|
+
cancel(): void;
|
|
65
|
+
dispose(): void;
|
|
66
|
+
}
|
|
67
|
+
export interface WorkerDiffRequest {
|
|
68
|
+
promise: Promise<CodeDiffHunk[]>;
|
|
69
|
+
cancel(): void;
|
|
70
|
+
}
|
|
71
|
+
/** Runs `diffText` asynchronously inside a `serveCodeHighlighting` worker, with cancellation support. */
|
|
72
|
+
export declare function requestWorkerDiff(worker: Worker, original: string, modified: string, options?: CodeDiffOptions): WorkerDiffRequest;
|
|
73
|
+
export interface CodeWorkerPoolOptions {
|
|
74
|
+
/**
|
|
75
|
+
* Maximum number of workers spawned lazily on demand.
|
|
76
|
+
* Defaults to `Math.min(4, Math.max(2, Math.floor((hardwareConcurrency || 4) / 2)))` (1 on single-core).
|
|
77
|
+
*/
|
|
78
|
+
maxWorkers?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Milliseconds to keep an idle worker alive after its last user releases it,
|
|
81
|
+
* avoiding repeated worker/WASM startup during fast list scrolling.
|
|
82
|
+
* Defaults to `10_000`. Set to `0` to terminate immediately when idle.
|
|
83
|
+
*/
|
|
84
|
+
idleTimeout?: number;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* A lazily-spawned pool of highlighting workers shared across `DouCodeEditor`
|
|
88
|
+
* and `DouCodeDiff` instances via the `worker` prop.
|
|
89
|
+
*/
|
|
90
|
+
export interface CodeWorkerPool {
|
|
91
|
+
readonly kind: 'pool';
|
|
92
|
+
/** Number of currently live worker instances in the pool. */
|
|
93
|
+
readonly size: number;
|
|
94
|
+
/** Maximum number of workers the pool may spawn. */
|
|
95
|
+
readonly maxWorkers: number;
|
|
96
|
+
/** Terminates all live workers and clears idle timers. */
|
|
45
97
|
dispose(): void;
|
|
46
98
|
}
|
|
47
|
-
|
|
99
|
+
/** Accepted values for the `worker` prop on `DouCodeEditor` and `DouCodeDiff`. */
|
|
100
|
+
export type CodeWorkerOption = boolean | (() => Worker) | CodeWorkerPool;
|
|
101
|
+
export interface AcquiredWorker {
|
|
48
102
|
worker: Worker;
|
|
49
103
|
release: () => void;
|
|
50
|
-
|
|
104
|
+
setBusy?: (busy: boolean) => void;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Creates a lazily-spawned worker pool that can be passed to the `worker` prop
|
|
108
|
+
* of multiple `DouCodeEditor` and `DouCodeDiff` instances.
|
|
109
|
+
*
|
|
110
|
+
* Workers are created only when concurrent tasks need them (up to `maxWorkers`)
|
|
111
|
+
* and kept warm briefly when idle so scrolling through a multi-file list avoids
|
|
112
|
+
* re-initializing workers or Shiki WASM grammars.
|
|
113
|
+
*/
|
|
114
|
+
export declare function createCodeWorkerPool(factory: () => Worker, options?: CodeWorkerPoolOptions): CodeWorkerPool;
|
|
115
|
+
export declare function isCodeWorkerPool(value: unknown): value is CodeWorkerPool;
|
|
116
|
+
export declare function acquirePoolWorker(pool: CodeWorkerPool): Promise<AcquiredWorker>;
|
|
117
|
+
/** Acquires a worker from the built-in lazily-spawned worker pool (`worker: true`). */
|
|
118
|
+
export declare function ownWorker(): Promise<AcquiredWorker>;
|
|
119
|
+
/** Disposes the built-in worker pool (useful in tests or teardown). */
|
|
120
|
+
export declare function disposeOwnWorkerPool(): void;
|
|
51
121
|
/** Counts an editor using `worker`; the returned function lets go, ending the worker after the last. */
|
|
52
122
|
export declare function holdWorker(worker: Worker): () => void;
|