diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index da885ed..b63d8bb 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -37,7 +37,7 @@ export default defineConfig({ themeConfig: { editLink: { - pattern: 'https://github.com/Pyroxenium/Basalt/tree/master/docs/:path' + pattern: 'https://github.com/Pyroxenium/Basalt2/tree/gh-pages/docs/:path' }, search: { provider: 'local' @@ -46,11 +46,10 @@ export default defineConfig({ outline: 2, footer: { message: 'Released under the MIT License.', - copyright: 'Copyright © 2024 Robert Jelic' + copyright: 'Copyright © 2025 Robert Jelic' }, nav: [ { text: 'Home', link: '/home' }, - { text: 'Guides', link: '/guides/getting-started' }, { text: 'References', link: '/references/main' }, ], @@ -61,13 +60,7 @@ export default defineConfig({ sidebar: { '/guides/': [ - { - text: 'Getting Started',link: 'guides/getting-started', - items: [ - { text: 'Download', link: '/guides/download' }, - { text: 'Properties', link: '/guides/properties' }, - ] - } + ], '/references/':[ @@ -75,51 +68,11 @@ export default defineConfig({ text: 'References', link: 'references/main', items: [ {text: 'Basalt', link: 'references/basalt'}, - {text: 'Element', link: 'references/element', - items: [ - {text: 'VisualElement', link: 'references/visualelement', - items: [ - {text: 'Container', link: 'references/container', - items: [ - {text: 'Baseframe', link: 'references/baseframe'}, - {text: 'Frame', link: 'references/frame'}, - {text: 'Monitor', link: 'references/monitor'}, - {text: 'BigMonitor', link: 'references/bigmonitor'}, - ]}, - {text: 'Button', link: 'references/button'}, - {text: 'Checkbox', link: 'references/checkbox'}, - {text: 'Input', link: 'references/input'}, - {text: 'Label', link: 'references/label'}, - {text: 'List', link: 'references/list', - items: [ - {text: 'Dropdown', link: 'references/dropdown'}, - {text: 'Menubar', link: 'references/menubar'}, - ]}, - {text: 'Program', link: 'references/program'}, - {text: 'Progressbar', link: 'references/progressbar'}, - {text: 'Slider', link: 'references/slider'}, - {text: 'Textfield', link: 'references/textfield'}, - ] - }, - + {text: 'Frame', link: 'references/frame'}, ] - }, - {text: 'Extensions', link: 'references/extensions', - items: [ - {text: 'Dynamic Values', link: 'references/dynamicvalues'}, - {text: 'Template', link: 'references/template'}, - {text: 'Animations', link: 'references/animations'}, - {text: 'Borders', link: 'references/borders'}, - {text: 'Better Backgrounds', link: 'references/betterbackgrounds'}, - {text: 'Shadows', link: 'references/shadows'}, - {text: 'Debug', link: 'references/debug'}, - {text: 'XML', link: 'references/xml'}, - ] - }, - ] - }, - ], - }, + } + ] + }, socialLinks: [ diff --git a/docs/beta.md b/docs/beta.md deleted file mode 100644 index e2a60f4..0000000 --- a/docs/beta.md +++ /dev/null @@ -1,45 +0,0 @@ -# Basalt 2 Beta - -Welcome to the Basalt 2 Beta! This page serves as a temporary hub for information. During this period, Basalt 2 is available for testing and feedback while I work on resolving any remaining bugs and issues. - -The beta phase will last around 1 month, longer if it's necessary. While the beta phase is active, both, basalt 1 and basalt 2 will exist. After the Beta phase is done, and i feel like basalt 2 is polished enough, i'd like to archive basalt 1 and make basalt 2 the new default. Don't worry i'll try to keep the old docs alive. - -You can download Basalt [here](guides/download), and [here](guides/getting-started) is a link to the getting-started page. The API can be found [here](references/main). - -## What's new? - -Basalt 2 represents a significant evolution from its predecessor. Here are some of the key improvements and features: - -### Complete Rewrite - -Basalt 2 is a complete rewrite of the Basalt framework. The codebase has been redesigned from the ground up to be more readable, maintainable, and logical. This rewrite was necessary due to the accumulation of features in Basalt 1, which made the codebase unwieldy and difficult to manage, resulting in unexpected bugs. - -### Property System - -One of the major features of Basalt 2 is the introduction of a dynamic property system. All elements and their properties are now based on this system, providing greater flexibility and consistency in customization. - -### Error Handling - -Basalt 2 includes a robust error handling system, making it easier to identify and diagnose errors. Previously, errors were difficult to detect and understand, but with Basalt 2, error messages are clear and informative, helping developers troubleshoot more effectively. - -### Improved Elements - -Many elements in Basalt 2 have been enhanced and their usage streamlined for improved usability. - -### Other things - -Additionally, annotations have been added to simplify programming in the editor, and performance optimizations have been implemented to ensure smoother operation. - -## Why Basalt 2? - -The decision to create Basalt 2 stemmed from the need for a cleaner, more efficient framework. Basalt 1 became increasingly complex over time, making it challenging to maintain and extend. With Basalt 2, I aimed to address these issues from the outset, resulting in a more cohesive and user-friendly framework. - -## Future of Basalt 2 - -After the release of Basalt 2, I will not be introducing any new features. My primary focus will be on addressing existing bugs and improving performance. There are no new elements planned, nor are there any additional features in the pipeline. This decision has been made to maintain consistency in Basalt 2 and ensure that there are no sudden issues arising from updates after the release. The release version of Basalt 2 will remain the core version, and there will be no further updates. - -However, this does not mean that I will never introduce anything new again. Given that Basalt is highly modular, I will be adding new elements in a separate GitHub repository (basaltadditions) when I have the time. These elements can be installed additionally but are not related to the core version of Basalt 2. - -## Get Involved - -Your feedback is invaluable during the beta phase of Basalt 2. Please take the time to test the framework, report any bugs or issues you encounter, and provide suggestions for improvements. Together, we can make Basalt 2 the best it can be! diff --git a/docs/guides/download.md b/docs/guides/download.md deleted file mode 100644 index 33ff33b..0000000 --- a/docs/guides/download.md +++ /dev/null @@ -1,72 +0,0 @@ -# Download - -Basalt is available in two project versions: the source version, ideal for debugging errors and featuring annotations with a LLS for a proper code editor, and the packaged version, which is more compact. - -:::tip -The domain link will change once the new version of basalt is fully released! -::: - -## Downloading Basalt - -To download the Basalt UI using a CC shell command, use the following: - -``` -wget run https://raw.githubusercontent.com/Pyroxenium/basalt-docs/main/install.lua -``` - -This method provides a convenient way to modify Basalt according to your specific needs by utilizing a UI. - -## Download Basalt without UI - -If you want to skip the UI and just download the essentials, here are some other commands: - -- ### Source Default - -This is the default source version of Basalt, containing essential files for a UI framework. - -``` -wget run https://raw.githubusercontent.com/Pyroxenium/basalt-docs/main/install.lua source default -``` - -- ### Source Full - -This is the full source version of Basalt, containing all available files. - -``` -wget run https://raw.githubusercontent.com/Pyroxenium/basalt-docs/main/install.lua source full -``` - -- ### Bundle Default - -This is the default bundle version of Basalt, containing essential files for a UI framework. - -``` -wget run https://raw.githubusercontent.com/Pyroxenium/basalt-docs/main/install.lua bundle default -``` - -- ### Bundle Full - -This is the full bundle version of Basalt, containing all available files. - -``` -wget run https://raw.githubusercontent.com/Pyroxenium/basalt-docs/main/install.lua bundle full -``` - -## Update Basalt - -The update command is used to ensure that your Basalt installation is up to date with the latest version available on GitHub. When you run this command, Basalt will perform the following actions: - -- Basalt will first check the settings to determine the location of the Basalt installation (i.e., the file path). -- Next, Basalt will iterate through each file in the installation directory. -- For each file, Basalt will compare its version with the corresponding version on GitHub. -- If a file needs to be updated to match the latest version, Basalt will automatically perform the update. - -::: info -This [config](https://github.com/Pyroxenium/basalt-docs/config.json) file is used to check if a update needs to be done. -::: - -To execute the update command, use the following: - -``` -wget run https://raw.githubusercontent.com/Pyroxenium/basalt-docs/main/install.lua update -``` \ No newline at end of file diff --git a/docs/guides/dynamicvalues.md b/docs/guides/dynamicvalues.md deleted file mode 100644 index 9051730..0000000 --- a/docs/guides/dynamicvalues.md +++ /dev/null @@ -1,55 +0,0 @@ -# Dynamic Values - -Dynamic Values allow you to incorporate more complex logic into the properties of UI elements by dynamically updating values based on other variables or conditions. They provide a powerful way to customize the appearance and behavior of UI elements in response to changing conditions or user interactions. - -## How Dynamic Values Work - -Dynamic Values are defined as strings enclosed in curly braces `{}` within the properties of UI elements. These strings can contain conditional expressions, mathematical operations, or references to other variables or properties. - -## Special Variables - -In addition to element properties, Dynamic Values support special variables that provide context or reference points for calculations: - -- **self:** Refers to the current element, allowing you to access its properties within the Dynamic Value expression. -- **parent:** Refers to the parent container of the current element, useful for relative positioning or sizing adjustments. -- **elementID:** Allows you to reference a specific element by its ID within the Dynamic Value expression. - -## Examples - -Let's explore some examples of how Dynamic Values can be used: - -### 1. Conditional Expressions: - -```lua --- Change background color based on a condition -main:addButton():setBackground("{self.clicked ? red : green}") -``` - -In this example, the background color of the button changes dynamically based on whether it has been clicked. If clicked, the background color becomes red; otherwise, it remains green. - -### 2. Positioning Elements: - -```lua --- Centering a button horizontally -main:addButton():setX("{parent.w / 2 - self.w / 2}") -``` - -This example centers the button horizontally within its parent container by dynamically adjusting its X position based on the width of the parent and the width of the button itself. - -### 3. Dynamic Sizing: - -```lua --- Adjusting the width of a button relative to its parent container -main:addButton():setWidth("{parent.w - 20}") -``` - -In this example, the width of the button is dynamically set to be 20 pixels less than the width of its parent container. - -### 4. Dynamic Styling: - -```lua --- Changing input background color when focused -main:addInput():setBackground("{self.focused ? cyan : black}") -``` - -Here, the background color of the input field changes dynamically based on whether it is currently focused. If focused, the background color becomes cyan; otherwise, it remains black. \ No newline at end of file diff --git a/docs/guides/getting-started.md b/docs/guides/getting-started.md deleted file mode 100644 index 91b08c0..0000000 --- a/docs/guides/getting-started.md +++ /dev/null @@ -1,117 +0,0 @@ -# Getting Started - -Basalt is designed to make it easier for Lua programmers to create graphical user interfaces (GUIs) within the popular Minecraft mod, [CC:Tweaked](https://tweaked.cc/). Before diving into Basalt, it's important to have a basic understanding of [Lua](https://www.lua.org/manual/5.1/) programming and how to use [CC:Tweaked](https://tweaked.cc/). - -## How to Install - -Download Basalt: Visit the [Download Page](download) and choose the version of Basalt you want to install: source or packaged. - -::: info -Basalt is a library and does not execute any code by itself. You need to write Lua scripts that import and use Basalt to create user interfaces for your projects. -::: - -## Setting up Basalt - -The next step is to create your own program. You can call it whatever you want. The command for it is: - -``` -edit fileName -``` - -In your Lua script, use the require function to include Basalt. Here's an example of how to do it: - -```lua -local basalt = require("basalt") -- Here we're including the Library and storing it to a variable called "basalt" -``` - -Merely loading Basalt is insufficient. It's essential to initiate the event and draw handlers. To facilitate this, Basalt offers the [basalt.run()](../references/basalt#basalt-run) function. - -Here is an example: - -```lua -local basalt = require("basalt") - --- your UI code is here - -basalt.run() -- starts a infinite-loop to listen to all incoming events -``` - - -## Create your first UI with Basalt - -Now that you have Basalt installed, let's dive into creating a simple user interface (UI). - -### The Baseframe - -The Baseframe serves as the foundation for building user interfaces in Basalt. It acts as the root container for all other UI elements and is essential for creating your UI layout. Check out [basalt.addFrame](../references/basalt#basalt-addframe) to learn more about how to create Baseframes. - -```lua -local basalt = require("basalt") -local main = basalt.getMainFrame() -- Returns or creates a new Baseframe - -basalt.run() -- lets start the event listener (should be on the bottom) -``` - -### Adding Elements - -After creating your Baseframe, you can start adding elements to it. Basalt offers a variety of UI elements that you can integrate into your interface. Below is an outline of how you can add elements to your Baseframe: - -1. **Choose the Right Element:** Before adding an element, decide which UI component suits your requirements best. Refer to the [reference](../references/main) page to explore the available elements and their functionalities. -2. **Use the [add{Element}](../references/container#add-element) Method:** To add an element, utilize the [add{Element}](../references/container#add-element) method, where {Element} corresponds to the specific UI component you wish to include. For example, to add a [button](../references/button), you would use addButton(), and for [labels](../references/label), you would use addLabel(). -3. **Customize as Needed:** Once added, you can customize the properties and appearance of each element according to your preferences. Basalt provides a range of options for customization, including text, colors, size, position, and more. - -Let us add a button to our example: - - -```lua -local basalt = require("basalt") -local main = basalt.getMainFrame() -local button = main:addButton() -- a simple button with default properties - -basalt.run() -``` - -### Modifying Properties - -Once you've added elements to your UI, you can customize their appearance and behavior by modifying their properties. If you're new to working with properties in Basalt, it's recommended to check out our [property guide](/guides/properties) for a detailed overview. - -To begin modifying properties, you first need to identify which properties are available for a specific element. For example, let's consider the [Button](../references/button) element. In the reference page for the [Button](../references/button), you'll find a list of properties available for that element. However, keep in mind that Button inherits properties from [VisualElement](../references/visualelement), which expands the available properties further. For instance, [VisualElement](../references/visualelement) includes properties like background, foreground, x, y, width, height, and visibility. - -To modify these properties, you'll use corresponding setter functions. Each property has its own setter function, such as `setBackground()` for background color, `setX()` for horizontal position, and so on. Here's an example demonstrating how to set properties for a button: - -```lua -local basalt = require("basalt") -local main = basalt.getMainFrame() - --- Create a button and set its properties -local button = main:addButton():setX(5):setY(3):setBackground(colors.red) - -basalt.run() -``` - -In this example, we create a button, set its horizontal and vertical positions using `setX()` and `setY()`, and change its background color to red using `setBackground()`. Experiment with different property values to achieve the desired appearance and behavior for your UI elements. - -### Attaching Events to Elements - -Events allow you to define actions that should be performed when a specific user interaction occurs, such as clicking a button or typing in an input field. While some events are specific to certain elements, many general events are inherited from the [VisualElement](../references/visualelement) class. Let's explore how to attach events to elements, using a `onClick` event as an example. - -First, let's clarify that while certain events may appear to be associated with specific elements like input, many general events are inherited from the VisualElement class. This means that you can attach these events to any UI element, not just buttons. Common events include `onClick`, `onClickUp`, `onScroll`, `onDrag`, `onKey`, `onKeyUp`, `onChar`,... - a full list can be found on the [VisualElement](../references/visualelement#events) page. - -To attach an event to an element, you'll use a function definition that specifies the action to be performed when the event occurs. Here's how you can attach an onClick event to a button: - -```lua -local basalt = require("basalt") -local main = basalt.getMainFrame() - --- Create a button -local button = main:addButton():setText("Click me") - --- Attach an onClick event to the button -button:onClick(function() - basalt.debug("Button clicked!") -end) - -basalt.run() -``` - -In this example, we create a button and use the `onClick` function to attach an `mouse_click` event. When the button is clicked, the specified function is executed, which prints "Button clicked!" to the console. Experiment with different events and actions to add interactivity to your UI elements. \ No newline at end of file diff --git a/docs/guides/home.md b/docs/guides/home.md deleted file mode 100644 index 459f937..0000000 --- a/docs/guides/home.md +++ /dev/null @@ -1,27 +0,0 @@ -# Welcome to The Basalt Wiki - -*Note: The Basalt Wiki is a work in progress. Please treat wiki errors the same as bugs and report them accordingly.* - -Basalt is a user-friendly UI framework for CC:Tweaked (also known as "ComputerCraft: Tweaked") - a popular Minecraft mod. It was developed to enhance user interaction through visual displays. In this wiki, you'll find information on how to use Basalt as well as examples of functional Basalt code. - -This Website is made with the help of ChatGPT. - -## About Basalt - -Basalt is an easy-to-understand UI framework designed to improve user interaction with CC:Tweaked. Some of its key features include: - -- A set of pre-built UI components for creating interfaces quickly and easily. -- A flexible layout system that allows users to create custom designs. -- A powerful event handling system for managing user input and interaction. -- Support for multiple screen resolutions and aspect ratios. -- Extensive documentation and examples to help users get started quickly. - -## Quick Demo - -![Basalt Demo GIF](https://raw.githubusercontent.com/Pyroxenium/Basalt/master/docs/_media/basaltPreview2.gif) - -## Questions & Bugs - -Bugs can be reported here: [Github](https://github.com/Pyroxenium/Basalt/issues) or in our [discord](https://discord.gg/yNNnmBVBpE). - -If you have questions about Basalt or how to make use of it, feel free to create a new discussion on [Basalt's Discussion Board (Github)](https://github.com/Pyroxenium/Basalt/discussions), or ask in our [discord](https://discord.gg/yNNnmBVBpE). diff --git a/docs/guides/properties.md b/docs/guides/properties.md deleted file mode 100644 index d2798e1..0000000 --- a/docs/guides/properties.md +++ /dev/null @@ -1,67 +0,0 @@ -# Introduction to Properties - -In Basalt, Properties are attributes or characteristics of UI elements that determine their appearance, behavior, and state. They allow you to customize various aspects of UI elements, such as their position, size, color, text content, and more. - -A list with all available properties can be found in the [references](../references/main) page. - -## Changing properties - -Properties are typically modified using setter functions. Setter functions are used to assign values to properties. - -For example, to set the background color of a button to red, you would use the `setBackground()` setter function: - -```lua -local button = main:addButton():setBackground(colors.red) -``` - -Using setter functions to manipulate properties offers several advantages: - -### Defining properties on element creation - -Another way to define properties in Basalt is by passing a table of property-value pairs when creating an element. This method allows you to specify multiple properties at once in a single statement. For example, to create a button with specific position and background color, you would use a property table like this: - -```lua -local button = main:addButton({x = 5, y = 2, background = colors.red, text = "Click me!"}) -``` - -Using property tables can be more concise and convenient, especially when initializing multiple properties for an element. - -## Accessing properties - -### Using Getter Functions - -Getter functions provide a straightforward way to retrieve the current value of a specific property directly from a UI element. Here's an example of using getter functions to access properties: - -```lua -local button = main:addButton() -local backgroundColor = button:getBackground() -local text = button:getText() -``` - -### Direct Access - -In addition to getter functions, you can directly access properties as attributes of UI elements. This approach is concise and intuitive, especially when you only need to read the current value of a property. Here's how you can directly access properties. - -```lua -local button = main:addButton() -local backgroundColor = button.background -local text = button.text -``` - -::: warning -Sometimes a property can be a function, especially when using dynamic values. The getter function automatically calls the function for you, while directly accessing the -variables does not. -::: - -### Using getProperty - -Basalt provides the `getProperty` method as an alternative way to access properties of UI elements. This method allows you to retrieve the value of a specific property by passing its name as an argument to the `getProperty` function. Here's how you can use the getProperty method: - -```lua -local button = main:addButton() -local text = button:getProperty("text") -local backgroundColor = button:getProperty("background") -``` - -By using the getProperty method, you can access any property of a UI element without needing to know the specific getter function for each property. This approach simplifies property access, especially when dealing with properties dynamically defined at runtime. - diff --git a/docs/home.md b/docs/home.md index 4b36b62..597c115 100644 --- a/docs/home.md +++ b/docs/home.md @@ -20,6 +20,6 @@ If you want to learn more about basalt, check out our [Guides](/guides/getting-s ## Questions & Bugs -Bugs can be reported here: [Github](https://github.com/Pyroxenium/Basalt/issues) or in our [discord](https://discord.gg/yNNnmBVBpE). +Bugs can be reported here: [Github](https://github.com/Pyroxenium/Basalt2/issues) or in our [discord](https://discord.gg/yNNnmBVBpE). -If you have questions about Basalt or how to make use of it, feel free to create a new discussion on [Basalt's Discussion Board (Github)](https://github.com/Pyroxenium/Basalt/discussions), or ask in our [discord](https://discord.gg/yNNnmBVBpE). +If you have questions about Basalt or how to make use of it, feel free to create a new discussion on [Basalt's Discussion Board (Github)](https://github.com/Pyroxenium/Basalt2/discussions), or ask in our [discord](https://discord.gg/yNNnmBVBpE). diff --git a/node_modules/.vue-global-types/vue_3.3_false.d.ts b/node_modules/.vue-global-types/vue_3.3_false.d.ts new file mode 100644 index 0000000..98efa7e --- /dev/null +++ b/node_modules/.vue-global-types/vue_3.3_false.d.ts @@ -0,0 +1,132 @@ +// @ts-nocheck +export {}; + +; declare module 'vue' { + export interface GlobalComponents { } + export interface GlobalDirectives { } +} +; declare global { + const __VLS_intrinsicElements: __VLS_IntrinsicElements; + const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any }; + const __VLS_unref: typeof import('vue').unref; + const __VLS_placeholder: any; + + const __VLS_nativeElements = { + ...{} as SVGElementTagNameMap, + ...{} as HTMLElementTagNameMap, + }; + + 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_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void; + 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] } : + 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] } : + { [K in N0]: unknown }; + 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_IsFunction = K extends keyof T + ? __VLS_IsAny extends false + ? unknown extends T[K] + ? false + : true + : false + : false; + type __VLS_NormalizeComponentEvent = ( + __VLS_IsFunction extends true + ? Props + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Events[Event] } + : __VLS_IsFunction extends true + ? { [K in onEvent]?: Events[CamelizedEvent] } + : Props + ) & Record; + // 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_PrettifyGlobal = { [K in keyof T]: T[K]; } & {}; + type __VLS_PickFunctionalComponentCtx = NonNullable<__VLS_PickNotAny< + '__ctx' extends keyof __VLS_PickNotAny ? K extends { __ctx?: infer Ctx } ? Ctx : never : any + , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any + >>; + type __VLS_UseTemplateRef = Readonly>; + + function __VLS_getVForSourceType(source: number): [number, number, number][]; + function __VLS_getVForSourceType(source: string): [string, number, number][]; + function __VLS_getVForSourceType(source: T): [ + item: T[number], + key: number, + index: number, + ][]; + function __VLS_getVForSourceType }>(source: T): [ + item: T extends { [Symbol.iterator](): Iterator } ? T1 : never, + key: number, + index: undefined, + ][]; + // #3845 + function __VLS_getVForSourceType }>(source: T): [ + item: number | (Exclude extends { [Symbol.iterator](): Iterator } ? T1 : never), + key: number, + index: undefined, + ][]; + function __VLS_getVForSourceType(source: T): [ + item: T[keyof T], + key: keyof T, + index: number, + ][]; + // @ts-ignore + function __VLS_getSlotParams(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>; + // @ts-ignore + function __VLS_getSlotParam(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>[0]; + function __VLS_asFunctionalDirective(dir: T): T extends import('vue').ObjectDirective + ? NonNullable + : T extends (...args: any) => any + ? T + : __VLS_unknownDirective; + function __VLS_withScope(ctx: T, scope: K): ctx is T & K; + 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 + ? (props: (K extends { $props: infer Props } ? Props : any) & Record, ctx?: any) => __VLS_Element & { __ctx?: { + attrs?: any, + slots?: K extends { $slots: infer Slots } ? Slots : any, + emit?: K extends { $emit: infer Emit } ? Emit : any + } & { props?: (K extends { $props: infer Props } ? Props : any) & Record; expose?(exposed: K): void; } } + : T extends () => any ? (props: {}, ctx?: any) => ReturnType + : T extends (...args: any) => any ? T + : (_: {} & Record, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record } }; + function __VLS_elementAsFunction(tag: T, endTag?: T): (_: T & Record) => void; + function __VLS_functionalComponentArgsRest any>(t: T): 2 extends Parameters['length'] ? [any] : []; + function __VLS_normalizeSlot(s: S): S extends () => infer R ? (props: {}) => R : S; + function __VLS_tryAsConstant(t: T): T; +}