From 153de01a7353fe37fafcfc0077b0e10d4210dc0e Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Sat, 13 Sep 2025 22:45:38 +0200 Subject: [PATCH] gh-pages changes --- docs/.vitepress/config.mts | 160 +++--- .../theme/components/BasaltDemo.vue | 178 ++++++ .../theme/components/BasaltDemoWithCode.vue | 523 ++++++++++++++++++ docs/.vitepress/theme/emulator.js | 258 +++++++++ docs/.vitepress/theme/index.js | 6 + docs/.vitepress/theme/styles.css | 88 +++ node_modules/.vue-global-types/vue_3.3_0.d.ts | 132 +++++ 7 files changed, 1270 insertions(+), 75 deletions(-) create mode 100644 docs/.vitepress/theme/components/BasaltDemo.vue create mode 100644 docs/.vitepress/theme/components/BasaltDemoWithCode.vue create mode 100644 docs/.vitepress/theme/emulator.js create mode 100644 docs/.vitepress/theme/styles.css create mode 100644 node_modules/.vue-global-types/vue_3.3_0.d.ts diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 52d71ed..f1296dd 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -72,82 +72,92 @@ export default defineConfig({ { text: 'FAQ', link: '/guides/faq' }, ], - '/references/':[ - { - text: 'Basalt', link: 'references/main', - collapsed: true, - items: [ - {text: 'PropertySystem', link: 'references/propertySystem'}, - {text: 'Render', link: 'references/render'}, - {text: 'Log', link: 'references/log'}, - {text: 'ElementManager', link: 'references/elementManager'}, - {text: 'ErrorManager', link: 'references/errorManager'}, - ], - }, - { - text: 'Element', link: 'references/elements/BaseElement', - collapsed: false, - items: [ - {text: 'VisualElement', link: 'references/elements/VisualElement', collapsed: false, items: [ - {text: 'Container', link: 'references/elements/Container', collapsed: true, items: [ - {text: 'BaseFrame', link: 'references/elements/BaseFrame'}, - {text: 'Flexbox', link: 'references/elements/Flexbox'}, - {text: 'Frame', link: 'references/elements/Frame'}, - ]}, - {text: 'BigFont', link: 'references/elements/BigFont'}, - {text: 'Button', link: 'references/elements/Button'}, - {text: 'Display', link: 'references/elements/Display'}, - {text: 'Graph', link: 'references/elements/Graph', collapsed: true, items: [ - {text: 'BarChart', link: 'references/elements/BarChart'}, - {text: 'LineChart', link: 'references/elements/LineChart'}, - ]}, - {text: 'Label', link: 'references/elements/Label'}, - {text: 'Image', link: 'references/elements/Image'}, - {text: 'Input', link: 'references/elements/Input'}, - {text: 'Checkbox', link: 'references/elements/Checkbox'}, - {text: 'List', link: 'references/elements/List', collapsed: true, - items: [ - {text: 'Dropdown', link: 'references/elements/Dropdown'}, - {text: 'Menu', link: 'references/elements/Menu'}, - ] - }, - {text: 'Table', link: 'references/elements/Table'}, - {text: 'TextBox', link: 'references/elements/TextBox'}, - {text: 'Tree', link: 'references/elements/Tree'}, - //{text: 'Timer', link: 'references/elements/Timer'}, - {text: 'ScrollBar', link: 'references/elements/ScrollBar'}, - {text: 'Slider', link: 'references/elements/Slider'}, - {text: 'ProgressBar', link: 'references/elements/ProgressBar'}, - {text: 'Program', link: 'references/elements/Program'}, - ]}, - ] - }, - { - text: 'plugins', link: 'references/plugins/animations', - collapsed: false, - items: [ - {text: 'Animations', link: 'references/plugins/animation', collapsed: true, - items: [ - {text: 'Animation Instance', link: 'references/plugins/animation_AnimationInstance'}, - {text: 'VisualElement', link: 'references/plugins/animation_VisualElement'}, - ] - }, - {text: 'Benchmark', link: 'references/plugins/benchmark', collapsed: true, - items: [ - {text: 'BaseElement', link: 'references/plugins/benchmark_BaseElement'}, - {text: 'Container', link: 'references/plugins/benchmark_Container'}, - ] - }, - {text: 'Debug', link: 'references/plugins/debug'}, - {text: 'Reactive', link: 'references/plugins/reactive'}, - {text: 'State', link: 'references/plugins/state'}, - {text: 'Text Wrapping', link: 'references/plugins/textWrapping'}, - {text: 'Theme', link: 'references/plugins/theme'}, - {text: 'Xml', link: 'references/plugins/xml'}, - ] - }, - ] +'/references/': [ + { + text: 'Basalt', + link: 'references/main', + collapsed: true, + items: [ + { text: 'ElementManager', link: 'references/elementManager' }, + { text: 'ErrorManager', link: 'references/errorManager' }, + { text: 'Log', link: 'references/log' }, + { text: 'PropertySystem', link: 'references/propertySystem' }, + { text: 'Render', link: 'references/render' }, + ], }, + { + text: 'Element', + link: 'references/elements/BaseElement', + collapsed: false, + items: [ + { + text: 'VisualElement', + link: 'references/elements/VisualElement', + collapsed: false, + items: [ + { text: 'BigFont', link: 'references/elements/BigFont' }, + { text: 'Button', link: 'references/elements/Button' }, + { text: 'CheckBox', link: 'references/elements/CheckBox' }, + { + text: 'Container', + link: 'references/elements/Container', + collapsed: true, + items: [ + { text: 'BaseFrame', link: 'references/elements/BaseFrame' }, + { text: 'Frame', link: 'references/elements/Frame' }, + { text: 'TabControl', link: 'references/elements/TabControl' }, + ], + }, + { text: 'Display', link: 'references/elements/Display' }, + { + text: 'Graph', + link: 'references/elements/Graph', + collapsed: true, + items: [ + { text: 'BarChart', link: 'references/elements/BarChart' }, + { text: 'LineChart', link: 'references/elements/LineChart' }, + ], + }, + { text: 'Image', link: 'references/elements/Image' }, + { text: 'Input', link: 'references/elements/Input' }, + { text: 'Label', link: 'references/elements/Label' }, + { + text: 'List', + link: 'references/elements/List', + collapsed: true, + items: [ + { text: 'DropDown', link: 'references/elements/DropDown' }, + { text: 'Menu', link: 'references/elements/Menu' }, + ], + }, + { text: 'ProgressBar', link: 'references/elements/ProgressBar' }, + { text: 'Program', link: 'references/elements/Program' }, + { text: 'ScrollBar', link: 'references/elements/ScrollBar' }, + { text: 'Slider', link: 'references/elements/Slider' }, + { text: 'Table', link: 'references/elements/Table' }, + { text: 'TextBox', link: 'references/elements/TextBox' }, + { text: 'Tree', link: 'references/elements/Tree' }, + ], + }, + ], + }, + { + text: 'plugins', + link: 'references/plugins', + collapsed: false, + items: [ + { text: 'Animations', link: 'references/plugins/animation' }, + { text: 'Benchmark', link: 'references/plugins/benchmark' }, + { text: 'Debug', link: 'references/plugins/debug' }, + { text: 'Reactive', link: 'references/plugins/reactive' }, + { text: 'State', link: 'references/plugins/state' }, + { text: 'Text Wrapping', link: 'references/plugins/textWrapping' }, + { text: 'Theme', link: 'references/plugins/theme' }, + { text: 'Xml', link: 'references/plugins/xml' }, + ], + }, + ], +}, socialLinks: [ diff --git a/docs/.vitepress/theme/components/BasaltDemo.vue b/docs/.vitepress/theme/components/BasaltDemo.vue new file mode 100644 index 0000000..ee81845 --- /dev/null +++ b/docs/.vitepress/theme/components/BasaltDemo.vue @@ -0,0 +1,178 @@ + + + + + + diff --git a/docs/.vitepress/theme/components/BasaltDemoWithCode.vue b/docs/.vitepress/theme/components/BasaltDemoWithCode.vue new file mode 100644 index 0000000..8647610 --- /dev/null +++ b/docs/.vitepress/theme/components/BasaltDemoWithCode.vue @@ -0,0 +1,523 @@ + + + + + + \ No newline at end of file diff --git a/docs/.vitepress/theme/emulator.js b/docs/.vitepress/theme/emulator.js new file mode 100644 index 0000000..5adda26 --- /dev/null +++ b/docs/.vitepress/theme/emulator.js @@ -0,0 +1,258 @@ +// .vitepress/theme/emulator.js +let globalComputerInstance = null +let isGlobalLoading = false + +async function loadDependencies() { + const basalt = await fetch( + 'https://raw.githubusercontent.com/Pyroxenium/Basalt2/refs/heads/main/release/basalt.lua' + ).then(res => res.text()) + + if (!window.require) { + await new Promise((resolve, reject) => { + const script = document.createElement('script') + script.src = 'https://copy-cat.squiddev.cc/require.js' + script.onload = resolve + script.onerror = reject + document.body.appendChild(script) + }) + } + + return basalt +} + +async function runCodeInEmulator(code, title = 'Code Demo') { + console.log('runCodeInEmulator called with:', { code, title }) + + if (isGlobalLoading || globalComputerInstance) { + console.warn('Emulator already running') + return + } + + isGlobalLoading = true + console.log('Starting emulator loading...') + + try { + console.log('Loading dependencies...') + const basalt = await loadDependencies() + console.log('Dependencies loaded, basalt length:', basalt.length) + + const tempContainer = document.createElement('div') + tempContainer.style.position = 'fixed' + tempContainer.style.top = '-9999px' + tempContainer.style.left = '-9999px' + tempContainer.style.width = '650px' + tempContainer.style.height = '480px' + tempContainer.style.padding = '0' + tempContainer.style.margin = '0' + tempContainer.style.border = 'none' + document.body.appendChild(tempContainer) + console.log('Temporary container created') + + console.log('Setting up CopyCat...') + window.require.config({ paths: { copycat: 'https://copy-cat.squiddev.cc/' } }) + + window.require(['copycat/embed'], (setup) => { + console.log('CopyCat setup function received:', setup) + + const setupPromise = setup(tempContainer, { + hdFont: 'https://copy-cat.squiddev.cc/term_font_hd-0506b6efe5f7feae.png', + files: { + 'startup.lua': code, + 'basalt.lua': basalt + }, + label: title + }) + + console.log('Setup promise created:', setupPromise) + + if (setupPromise && typeof setupPromise.then === 'function') { + setupPromise.then((computer) => { + console.log('Computer instance resolved from promise:', computer) + globalComputerInstance = computer + + if (computer && typeof computer.run === 'function') { + computer.run() + console.log('Computer started running') + } else if (computer && typeof computer.start === 'function') { + computer.start() + console.log('Computer started with start()') + } else { + console.error('Computer does not have run or start method:', computer) + console.log('Available methods:', Object.getOwnPropertyNames(computer || {})) + } + + console.log('Showing terminal window...') + showTerminalWindow(tempContainer, title) + + isGlobalLoading = false + console.log('Emulator setup complete') + }).catch((error) => { + console.error('Error in setup promise:', error) + isGlobalLoading = false + }) + } else { + console.log('Setup returned directly:', setupPromise) + globalComputerInstance = setupPromise + + if (setupPromise && typeof setupPromise.run === 'function') { + setupPromise.run() + console.log('Computer started running (direct)') + } else { + console.error('Direct setup does not have run method:', setupPromise) + } + + showTerminalWindow(tempContainer, title) + isGlobalLoading = false + } + }) + + } catch (error) { + console.error('Error starting emulator:', error) + isGlobalLoading = false + } +} + +function showTerminalWindow(container, title) { + console.log('showTerminalWindow called with:', { container, title }) + + const windowDiv = document.createElement('div') + windowDiv.className = 'global-terminal-window' + console.log('Terminal window div created') + + windowDiv.style.cssText = ` + position: fixed; + width: 625px; + height: 425px; + background: #1a1a1a; + border-radius: 8px; + box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); + display: flex; + flex-direction: column; + z-index: 9999; + border: 1px solid #333; + top: 100px; + left: 100px; + ` + + const header = document.createElement('div') + header.className = 'terminal-header' + header.style.cssText = ` + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.2rem 1rem; + background: linear-gradient(180deg, #2a2a2a 0%, #222 100%); + border-bottom: 1px solid #111; + cursor: move; + user-select: none; + border-radius: 8px 8px 0 0; + ` + + const titleDiv = document.createElement('div') + titleDiv.innerHTML = `💻 ${title}` + + const controls = document.createElement('div') + controls.innerHTML = ` + + ` + + header.appendChild(titleDiv) + header.appendChild(controls) + + const body = document.createElement('div') + body.style.cssText = ` + flex: 1; + background: #000; + border-radius: 0 0 8px 8px; + overflow: hidden; + padding: 0; /* <-- REDUCED FROM DEFAULT */ + margin: 0; /* <-- NO MARGIN */ + ` + body.appendChild(container) + container.style.position = 'static' + container.style.top = 'auto' + container.style.left = 'auto' + container.style.width = '100%' + container.style.height = '100%' + container.style.padding = '0' + container.style.margin = '0' + + windowDiv.appendChild(header) + windowDiv.appendChild(body) + + document.body.appendChild(windowDiv) + console.log('Terminal window added to body') + + let isDragging = false + let offset = { x: 0, y: 0 } + + header.addEventListener('mousedown', (e) => { + isDragging = true + offset.x = e.clientX - windowDiv.offsetLeft + offset.y = e.clientY - windowDiv.offsetTop + }) + + document.addEventListener('mousemove', (e) => { + if (!isDragging) return + + const terminalWidth = windowDiv.offsetWidth + const terminalHeight = windowDiv.offsetHeight + + let newX = e.clientX - offset.x + let newY = e.clientY - offset.y + + const maxX = window.innerWidth - terminalWidth + const maxY = window.innerHeight - terminalHeight + + newX = Math.max(0, Math.min(newX, maxX)) + newY = Math.max(0, Math.min(newY, maxY)) + + windowDiv.style.left = newX + 'px' + windowDiv.style.top = newY + 'px' + }) + + document.addEventListener('mouseup', () => { + isDragging = false + }) +} + +function closeGlobalEmulator() { + if (globalComputerInstance) { + try { + globalComputerInstance.shutdown() + } catch (e) { + console.warn('Error shutting down:', e) + } + globalComputerInstance = null + } + + const windowDiv = document.querySelector('.global-terminal-window') + if (windowDiv) { + document.body.removeChild(windowDiv) + } +} + +window.runCodeBlock = function(button) { + console.log('Run button clicked!', button) + + const container = button.closest('.code-block-with-run') + console.log('Container found:', container) + + const codeContent = container.querySelector('.code-content') + console.log('Code content found:', codeContent) + + const dataCode = codeContent.getAttribute('data-code') + console.log('Data code:', dataCode) + + const code = atob(dataCode) + console.log('Decoded code:', code) + + const languageBadge = container.querySelector('.language-badge') + const language = languageBadge && languageBadge.textContent ? languageBadge.textContent : 'lua' + console.log('Language:', language) + + console.log('Calling runCodeInEmulator...') + runCodeInEmulator(code, `Code Demo (${language})`) +} + +window.closeGlobalEmulator = closeGlobalEmulator diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js index a932c6a..a72e5d3 100644 --- a/docs/.vitepress/theme/index.js +++ b/docs/.vitepress/theme/index.js @@ -1,11 +1,17 @@ import CopyButton from 'vitepress-copy-helper'; import 'vitepress-copy-helper/style.css' import DefaultTheme from 'vitepress/theme' +import BasaltDemo from './components/BasaltDemo.vue' +import BasaltDemoWithCode from './components/BasaltDemoWithCode.vue' +import './emulator.js' +import './styles.css' /** @type {import('vitepress').Theme} */ export default { extends: DefaultTheme, enhanceApp({ app }) { app.component('C', CopyButton) + app.component('BasaltDemo', BasaltDemo) + app.component('BasaltDemoWithCode', BasaltDemoWithCode) } } \ No newline at end of file diff --git a/docs/.vitepress/theme/styles.css b/docs/.vitepress/theme/styles.css new file mode 100644 index 0000000..2e02410 --- /dev/null +++ b/docs/.vitepress/theme/styles.css @@ -0,0 +1,88 @@ +/* .vitepress/theme/styles.css */ + +.code-block-with-run { + position: relative; + border-radius: 8px; + overflow: hidden; + background: var(--vp-code-block-bg); + border: 1px solid var(--vp-c-divider); + margin: 1rem 0; +} + +.code-block-with-run .code-header { + display: flex; + justify-content: flex-end; + align-items: center; + padding: 0.4rem 0.4rem; + background: rgba(0, 0, 0, 0.2); + border-bottom: 1px solid var(--vp-c-divider); +} + +.code-block-with-run .language-badge { + display: none; +} + +.code-block-with-run .run-button { + display: flex; + align-items: center; + gap: 0.25rem; + padding: 0.15rem 0.75rem; + background: #4CAF50; + color: white; + border: none; + border-radius: 4px; + font-size: 0.875rem; + font-weight: 500; + cursor: pointer; + transition: all 0.2s ease; +} + +.code-block-with-run .run-button:hover { + background: #45a049; + transform: translateY(-1px); +} + +.code-block-with-run .code-content { + overflow: auto; + max-height: 500px; +} + +.code-block-with-run .code-content pre { + background: transparent; + border: none; + margin: 0; + padding: 1rem; + font-family: 'Courier New', Consolas, monospace; + font-size: 14px; + line-height: 1.5; + color: #d4d4d4; + white-space: pre; + overflow-x: auto; +} + +.code-block-with-run .code-content pre code { + background: transparent; + border: none; + padding: 0; +} + +.code-block-with-run .code-data { + display: none; +} + +.dark .code-block-with-run .code-content pre { + color: var(--vp-code-block-color); +} + +html:not(.dark) .code-block-with-run .code-content pre { + color: var(--vp-code-block-color); +} + +html:not(.dark) .code-block-with-run .code-header { + background: rgba(0, 0, 0, 0.05); + border-bottom-color: var(--vp-c-divider); +} + +html:not(.dark) .code-block-with-run .language-badge { + color: #666; +} diff --git a/node_modules/.vue-global-types/vue_3.3_0.d.ts b/node_modules/.vue-global-types/vue_3.3_0.d.ts new file mode 100644 index 0000000..8dda663 --- /dev/null +++ b/node_modules/.vue-global-types/vue_3.3_0.d.ts @@ -0,0 +1,132 @@ +// @ts-nocheck +export {}; + +; declare module 'vue' { + export interface GlobalComponents { } + export interface GlobalDirectives { } +} +; declare global { + const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any }; + const __VLS_unref: typeof import('vue').unref; + const __VLS_placeholder: any; + + type __VLS_NativeElements = __VLS_SpreadMerge; + type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements; + type __VLS_Element = import('vue/jsx-runtime').JSX.Element; + type __VLS_GlobalComponents = import('vue').GlobalComponents & Pick; + type __VLS_GlobalDirectives = import('vue').GlobalDirectives; + type __VLS_IsAny = 0 extends 1 & T ? true : false; + type __VLS_PickNotAny = __VLS_IsAny extends true ? B : A; + type __VLS_SpreadMerge = Omit & B; + type __VLS_WithComponent = + N1 extends keyof LocalComponents ? N1 extends N0 ? Pick : { [K in N0]: LocalComponents[N1] } : + N2 extends keyof LocalComponents ? N2 extends N0 ? Pick : { [K in N0]: LocalComponents[N2] } : + N3 extends keyof LocalComponents ? N3 extends N0 ? Pick : { [K in N0]: LocalComponents[N3] } : + Self extends object ? { [K in N0]: Self } : + N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } : + N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } : + N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } : + {}; + type __VLS_FunctionalComponentCtx = __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny + ? K extends { __ctx?: infer Ctx } ? NonNullable : never : any + , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any + >; + type __VLS_FunctionalComponentProps = '__ctx' extends keyof __VLS_PickNotAny + ? K extends { __ctx?: { props?: infer P } } ? NonNullable

: never + : T extends (props: infer P, ...args: any) => any ? P + : {}; + type __VLS_FunctionalComponent = (props: (T extends { $props: infer Props } ? Props : {}) & Record, ctx?: any) => __VLS_Element & { + __ctx?: { + attrs?: any; + slots?: T extends { $slots: infer Slots } ? Slots : Record; + emit?: T extends { $emit: infer Emit } ? Emit : {}; + props?: (T extends { $props: infer Props } ? Props : {}) & Record; + expose?: (exposed: T) => void; + }; + }; + type __VLS_IsFunction = K extends keyof T + ? __VLS_IsAny extends false + ? unknown extends T[K] + ? false + : true + : false + : false; + type __VLS_NormalizeComponentEvent< + Props, + Emits, + onEvent extends keyof Props, + Event extends keyof Emits, + CamelizedEvent extends keyof Emits, + > = __VLS_IsFunction extends true + ? Props + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Emits[Event] } + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Emits[CamelizedEvent] } + : Props; + // fix https://github.com/vuejs/language-tools/issues/926 + type __VLS_UnionToIntersection = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never; + type __VLS_OverloadUnionInner = U & T extends (...args: infer A) => infer R + ? U extends T + ? never + : __VLS_OverloadUnionInner & U & ((...args: A) => R)> | ((...args: A) => R) + : never; + type __VLS_OverloadUnion = Exclude< + __VLS_OverloadUnionInner<(() => never) & T>, + T extends () => never ? never : () => never + >; + type __VLS_ConstructorOverloads = __VLS_OverloadUnion extends infer F + ? F extends (event: infer E, ...args: infer A) => any + ? { [K in E & string]: (...args: A) => void; } + : never + : never; + type __VLS_NormalizeEmits = __VLS_PrettifyGlobal< + __VLS_UnionToIntersection< + __VLS_ConstructorOverloads & { + [K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never + } + > + >; + type __VLS_ResolveEmits< + Comp, + Emits, + TypeEmits = {}, + NormalizedEmits = __VLS_NormalizeEmits extends infer E ? string extends keyof E ? {} : E : never, + > = __VLS_SpreadMerge; + type __VLS_ResolveDirectives = { + [K in Exclude & string as `v${Capitalize}`]: T[K]; + }; + type __VLS_PrettifyGlobal = { [K in keyof T as K]: T[K]; } & {}; + type __VLS_UseTemplateRef = Readonly>; + + function __VLS_getVForSourceType>(source: T): [ + item: T extends number ? number + : T extends string ? string + : T extends any[] ? T[number] + : T extends Iterable ? T1 + : any, + index: number, + ][]; + function __VLS_getVForSourceType(source: T): [ + item: T[keyof T], + key: keyof T, + index: number, + ][]; + function __VLS_getSlotParameters(slot: S, decl?: D): + D extends (...args: infer P) => any ? P : any[]; + function __VLS_asFunctionalDirective(dir: T): T extends import('vue').ObjectDirective + ? NonNullable + : T extends (...args: any) => any + ? T + : (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void; + function __VLS_makeOptional(t: T): { [K in keyof T]?: T[K] }; + function __VLS_asFunctionalComponent any ? InstanceType : unknown>(t: T, instance?: K): + T extends new (...args: any) => any ? __VLS_FunctionalComponent + : T extends () => any ? (props: {}, ctx?: any) => ReturnType + : T extends (...args: any) => any ? T + : __VLS_FunctionalComponent<{}>; + function __VLS_functionalComponentArgsRest any>(t: T): 2 extends Parameters['length'] ? [any] : []; + function __VLS_asFunctionalElement(tag: T, endTag?: T): (attrs: T & Record) => void; + function __VLS_asFunctionalSlot(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable; + function __VLS_tryAsConstant(t: T): T; +}