From efda07bac587cb109c88525e83f932a1a59b8963 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Sat, 31 Jan 2026 22:10:51 +0100 Subject: [PATCH] Fixed link issues --- .../version-0.1.1/00-intro/getting-started.md | 10 ++--- .../version-0.1.1/00-intro/overview.md | 2 +- .../01-guides/creating-custom-widgets.md | 2 +- .../01-guides/getting-started-example.md | 10 ++--- .../advanced/performance-and-customization.md | 2 +- .../version-0.1.1/concepts/widget-model.md | 2 +- .../performance-and-customization.md | 2 +- .../version-0.1.1/reference/elements.md | 12 +++--- .../version-0.1.1/reference/index.md | 38 +++++++++---------- .../00-intro/03-example-basic-component.md | 2 - .../01-guides/00-creating-components.md | 2 +- 11 files changed, 41 insertions(+), 43 deletions(-) diff --git a/versioned_docs/version-0.1.1/00-intro/getting-started.md b/versioned_docs/version-0.1.1/00-intro/getting-started.md index de524f7..8f2239a 100644 --- a/versioned_docs/version-0.1.1/00-intro/getting-started.md +++ b/versioned_docs/version-0.1.1/00-intro/getting-started.md @@ -75,11 +75,11 @@ Save the file and run your application from the terminal: cargo run ``` -You should see "Hello, OSUI!" displayed in your terminal. You can press `Ctrl+C` or `Esc` (if you add an event handler for `Esc` like in the [Demo Application Guide](/docs/guides/building-a-demo-app)) to exit the application. +You should see "Hello, OSUI!" displayed in your terminal. You can press `Ctrl+C` or `Esc` (if you add an event handler for `Esc` like in the [Demo Application Guide](/docs/0.1.1/guides/building-a-demo-app)) to exit the application. ## Next Steps -* **[Concepts: Widget Model](/docs/concepts/widget-model)**: Understand the core building blocks of OSUI: Elements, Components, and Widgets. -* **[Guides: Layout and Styling](/docs/guides/layout-and-styling)**: Learn how to position and style your UI elements. -* **[Guides: Common Elements](/docs/guides/common-elements)**: Explore the built-in UI elements provided by OSUI like Divs, Flex containers, and Input fields. -* **[Guides: State and Reactivity](/docs/guides/state-and-reactivity)**: Discover how to make your UI dynamic and responsive to data changes. +* **[Concepts: Widget Model](/docs/0.1.1/concepts/widget-model)**: Understand the core building blocks of OSUI: Elements, Components, and Widgets. +* **[Guides: Layout and Styling](/docs/0.1.1/guides/layout-and-styling)**: Learn how to position and style your UI elements. +* **[Guides: Common Elements](/docs/0.1.1/guides/common-elements)**: Explore the built-in UI elements provided by OSUI like Divs, Flex containers, and Input fields. +* **[Guides: State and Reactivity](/docs/0.1.1/guides/state-and-reactivity)**: Discover how to make your UI dynamic and responsive to data changes. diff --git a/versioned_docs/version-0.1.1/00-intro/overview.md b/versioned_docs/version-0.1.1/00-intro/overview.md index 84b4033..11e5891 100644 --- a/versioned_docs/version-0.1.1/00-intro/overview.md +++ b/versioned_docs/version-0.1.1/00-intro/overview.md @@ -39,4 +39,4 @@ fn main() -> std::io::Result<()> { This example initializes a `Screen`, uses the `rsx!` macro to define a basic text element, draws it to the screen, and then starts the rendering loop. -For more detailed information on installation and setting up your project, refer to the [Getting Started Guide](/docs/). For comprehensive API details, explore the [Reference section](/docs/reference/). +For more detailed information on installation and setting up your project, refer to the [Getting Started Guide](/docs/0.1.1/). For comprehensive API details, explore the [Reference section](/docs/0.1.1/reference/). diff --git a/versioned_docs/version-0.1.1/01-guides/creating-custom-widgets.md b/versioned_docs/version-0.1.1/01-guides/creating-custom-widgets.md index 34acf57..98c8cc9 100644 --- a/versioned_docs/version-0.1.1/01-guides/creating-custom-widgets.md +++ b/versioned_docs/version-0.1.1/01-guides/creating-custom-widgets.md @@ -4,7 +4,7 @@ While OSUI provides a rich set of built-in elements, you'll often need to create ## The `Element` Trait Revisited -As discussed in [Concepts: Widget Model](/docs/concepts/widget-model), the `Element` trait is the contract for anything that can be rendered. +As discussed in [Concepts: Widget Model](/docs/0.1.1/concepts/widget-model), the `Element` trait is the contract for anything that can be rendered. ```rust pub trait Element: Send + Sync { diff --git a/versioned_docs/version-0.1.1/01-guides/getting-started-example.md b/versioned_docs/version-0.1.1/01-guides/getting-started-example.md index 9996d10..2c472b7 100644 --- a/versioned_docs/version-0.1.1/01-guides/getting-started-example.md +++ b/versioned_docs/version-0.1.1/01-guides/getting-started-example.md @@ -4,7 +4,7 @@ This guide expands on the basic "Hello, OSUI!" example to demonstrate a slightly ## 1. Project Setup (Review) -Ensure you have a new Rust project set up and `osui` added to your `Cargo.toml`. Refer to the [Getting Started](/docs/) guide if you haven't done this already. +Ensure you have a new Rust project set up and `osui` added to your `Cargo.toml`. Refer to the [Getting Started](/docs/0.1.1/) guide if you haven't done this already. ## 2. The `main.rs` File @@ -145,10 +145,10 @@ pub fn app(screen: Arc) -> Rsx { * Whenever `count` is marked as changed, the `DynWidget` associated with that `Div` automatically rebuilds its content and triggers a re-render in the next frame. This is why the number updates in the UI. 4. **`rsx!` Macro**: * The `rsx!` macro provides a declarative way to define your UI tree. It creates a hierarchy of `Widget`s, each potentially containing an `Element` and various `Component`s. - * `Paginator`, `FlexRow`, `FlexCol`, `Div`, `Heading`, `Input` are built-in [elements](/docs/reference/elements) that define structure and appearance. - * `@Transform` and `@Style` are [components](/docs/reference/style) that attach layout and visual properties to elements. - * `@Handler` is a [component](/docs/reference/extensions) that allows a widget to listen for specific events (here, `crossterm::event::Event`). - * `@Focused` and `@AlwaysFocused` are [components](/docs/reference/extensions/focus) from `RelativeFocusExtension` that manage input focus. + * `Paginator`, `FlexRow`, `FlexCol`, `Div`, `Heading`, `Input` are built-in [elements](/docs/0.1.1/reference/elements) that define structure and appearance. + * `@Transform` and `@Style` are [components](/docs/0.1.1/reference/style) that attach layout and visual properties to elements. + * `@Handler` is a [component](/docs/0.1.1/reference/extensions) that allows a widget to listen for specific events (here, `crossterm::event::Event`). + * `@Focused` and `@AlwaysFocused` are [components](/docs/0.1.1/reference/extensions/focus) from `RelativeFocusExtension` that manage input focus. 5. **`screen.run()`**: This method starts the main application loop. It continuously: * Renders all widgets. * Processes events from extensions. diff --git a/versioned_docs/version-0.1.1/advanced/performance-and-customization.md b/versioned_docs/version-0.1.1/advanced/performance-and-customization.md index 52375b5..a551af8 100644 --- a/versioned_docs/version-0.1.1/advanced/performance-and-customization.md +++ b/versioned_docs/version-0.1.1/advanced/performance-and-customization.md @@ -26,7 +26,7 @@ OSUI is designed to be efficient for terminal UIs, but there are always consider ### 1. Custom Elements -As detailed in [Creating Custom Widgets](/docs/guides/creating-custom-widgets), the primary way to customize OSUI is by implementing the `Element` trait. This allows you to define completely new visual components or logical containers tailored to your application. +As detailed in [Creating Custom Widgets](/docs/0.1.1/guides/creating-custom-widgets), the primary way to customize OSUI is by implementing the `Element` trait. This allows you to define completely new visual components or logical containers tailored to your application. ### 2. Custom Components diff --git a/versioned_docs/version-0.1.1/concepts/widget-model.md b/versioned_docs/version-0.1.1/concepts/widget-model.md index 81420f9..de64eb1 100644 --- a/versioned_docs/version-0.1.1/concepts/widget-model.md +++ b/versioned_docs/version-0.1.1/concepts/widget-model.md @@ -97,4 +97,4 @@ The distinction allows OSUI to efficiently render static parts of the UI while p ### Dependency Tracking -`DynWidget`s are at the core of OSUI's reactivity. They listen for changes in their registered dependencies. When a dependency changes, the widget's internal `load` closure is re-executed, effectively rebuilding its `Element` and `Component`s, leading to a re-render. This mechanism is explained in detail in [State Management](/docs/concepts/state-management). +`DynWidget`s are at the core of OSUI's reactivity. They listen for changes in their registered dependencies. When a dependency changes, the widget's internal `load` closure is re-executed, effectively rebuilding its `Element` and `Component`s, leading to a re-render. This mechanism is explained in detail in [State Management](/docs/0.1.1/concepts/state-management). diff --git a/versioned_docs/version-0.1.1/performance-and-customization.md b/versioned_docs/version-0.1.1/performance-and-customization.md index 52375b5..a551af8 100644 --- a/versioned_docs/version-0.1.1/performance-and-customization.md +++ b/versioned_docs/version-0.1.1/performance-and-customization.md @@ -26,7 +26,7 @@ OSUI is designed to be efficient for terminal UIs, but there are always consider ### 1. Custom Elements -As detailed in [Creating Custom Widgets](/docs/guides/creating-custom-widgets), the primary way to customize OSUI is by implementing the `Element` trait. This allows you to define completely new visual components or logical containers tailored to your application. +As detailed in [Creating Custom Widgets](/docs/0.1.1/guides/creating-custom-widgets), the primary way to customize OSUI is by implementing the `Element` trait. This allows you to define completely new visual components or logical containers tailored to your application. ### 2. Custom Components diff --git a/versioned_docs/version-0.1.1/reference/elements.md b/versioned_docs/version-0.1.1/reference/elements.md index 80c1780..9bcf613 100644 --- a/versioned_docs/version-0.1.1/reference/elements.md +++ b/versioned_docs/version-0.1.1/reference/elements.md @@ -46,11 +46,11 @@ rsx! { The `elements` module exports several other essential UI elements, each with its own dedicated documentation: -* **[`Div`](/docs/reference/elements/div)**: A generic, transparent container element used for grouping children and applying layout and style. -* **[`FlexRow`](/docs/reference/elements/flex)**: A layout container that arranges its children horizontally in a row. -* **[`FlexCol`](/docs/reference/elements/flex)**: A layout container that arranges its children vertically in a column. -* **[`Heading`](/docs/reference/elements/heading)**: Renders large, stylized ASCII art text using `figlet-rs`. -* **[`Input`](/docs/reference/elements/input)**: An interactive element for user text input. -* **[`Paginator`](/docs/reference/elements/paginator)**: A container that manages multiple "pages" (children) and allows navigation between them. +* **[`Div`](/docs/0.1.1/reference/elements/div)**: A generic, transparent container element used for grouping children and applying layout and style. +* **[`FlexRow`](/docs/0.1.1/reference/elements/flex)**: A layout container that arranges its children horizontally in a row. +* **[`FlexCol`](/docs/0.1.1/reference/elements/flex)**: A layout container that arranges its children vertically in a column. +* **[`Heading`](/docs/0.1.1/reference/elements/heading)**: Renders large, stylized ASCII art text using `figlet-rs`. +* **[`Input`](/docs/0.1.1/reference/elements/input)**: An interactive element for user text input. +* **[`Paginator`](/docs/0.1.1/reference/elements/paginator)**: A container that manages multiple "pages" (children) and allows navigation between them. These elements, combined with the `Transform` and `Style` components, provide a powerful foundation for building diverse and complex terminal user interfaces in OSUI. diff --git a/versioned_docs/version-0.1.1/reference/index.md b/versioned_docs/version-0.1.1/reference/index.md index f43687a..92c18b4 100644 --- a/versioned_docs/version-0.1.1/reference/index.md +++ b/versioned_docs/version-0.1.1/reference/index.md @@ -4,28 +4,28 @@ This section provides detailed documentation for all public modules, structs, en ## Core Concepts & Structure -* [Screen](/docs/reference/screen): The main application context for managing widgets and extensions. -* [Widget Model](/docs/reference/widget): `Element`, `Component`, `Widget` (Static/Dynamic), and `WidgetLoad`. -* [Rendering & Scope](/docs/reference/render-scope): `RenderScope`, `RenderMethod`, and `ElementRenderer`. -* [State Management](/docs/reference/state): `State` and `DependencyHandler` for reactivity. -* [Frontend & Macros](/docs/reference/frontend): `RsxElement`, `Rsx`, and the `event!`, `component!`, `transform!`, `rsx!` macros. -* [Utilities](/docs/reference/utils): Helper functions for terminal control and string manipulation. +* [Screen](/docs/0.1.1/reference/screen): The main application context for managing widgets and extensions. +* [Widget Model](/docs/0.1.1/reference/widget): `Element`, `Component`, `Widget` (Static/Dynamic), and `WidgetLoad`. +* [Rendering & Scope](/docs/0.1.1/reference/render-scope): `RenderScope`, `RenderMethod`, and `ElementRenderer`. +* [State Management](/docs/0.1.1/reference/state): `State` and `DependencyHandler` for reactivity. +* [Frontend & Macros](/docs/0.1.1/reference/frontend): `RsxElement`, `Rsx`, and the `event!`, `component!`, `transform!`, `rsx!` macros. +* [Utilities](/docs/0.1.1/reference/utils): Helper functions for terminal control and string manipulation. ## Built-in Components & Extensions -* [Style & Layout](/docs/reference/style): `Transform`, `Position`, `Dimension`, `Style`, `Background`. -* [Extensions Overview](/docs/reference/extensions): The `Extension` trait, `Event` trait, and `Context` for global behaviors. -* [Focus Extension](/docs/reference/extensions/focus): `AlwaysFocused`, `Focused`, `RelativeFocusExtension` for keyboard navigation. -* [ID Extension](/docs/reference/extensions/id): `IdExtension`, `Id` for unique widget identification. -* [Input Handling Extension](/docs/reference/extensions/input_handling): `InputExtension` for keyboard and mouse input. -* [Tick Extension](/docs/reference/extensions/tick): `TickExtension`, `TickEvent` for timed events. -* [Velocity Extension](/docs/reference/extensions/velocity): `VelocityExtension`, `Velocity` for simple animations. +* [Style & Layout](/docs/0.1.1/reference/style): `Transform`, `Position`, `Dimension`, `Style`, `Background`. +* [Extensions Overview](/docs/0.1.1/reference/extensions): The `Extension` trait, `Event` trait, and `Context` for global behaviors. +* [Focus Extension](/docs/0.1.1/reference/extensions/focus): `AlwaysFocused`, `Focused`, `RelativeFocusExtension` for keyboard navigation. +* [ID Extension](/docs/0.1.1/reference/extensions/id): `IdExtension`, `Id` for unique widget identification. +* [Input Handling Extension](/docs/0.1.1/reference/extensions/input_handling): `InputExtension` for keyboard and mouse input. +* [Tick Extension](/docs/0.1.1/reference/extensions/tick): `TickExtension`, `TickEvent` for timed events. +* [Velocity Extension](/docs/0.1.1/reference/extensions/velocity): `VelocityExtension`, `Velocity` for simple animations. ## Built-in UI Elements -* [Elements Overview](/docs/reference/elements): General Element trait and String as an Element. -* [Div](/docs/reference/elements/div): A generic container element. -* [Flex Containers](/docs/reference/elements/flex): `FlexRow` and `FlexCol` for automatic horizontal/vertical layout. -* [Heading](/docs/reference/elements/heading): Renders large ASCII art text. -* [Input](/docs/reference/elements/input): An interactive text input field. -* [Paginator](/docs/reference/elements/paginator): Manages and navigates between multiple pages/children. +* [Elements Overview](/docs/0.1.1/reference/elements): General Element trait and String as an Element. +* [Div](/docs/0.1.1/reference/elements/div): A generic container element. +* [Flex Containers](/docs/0.1.1/reference/elements/flex): `FlexRow` and `FlexCol` for automatic horizontal/vertical layout. +* [Heading](/docs/0.1.1/reference/elements/heading): Renders large ASCII art text. +* [Input](/docs/0.1.1/reference/elements/input): An interactive text input field. +* [Paginator](/docs/0.1.1/reference/elements/paginator): Manages and navigates between multiple pages/children. diff --git a/versioned_docs/version-0.2.0/00-intro/03-example-basic-component.md b/versioned_docs/version-0.2.0/00-intro/03-example-basic-component.md index b0e6124..7743611 100644 --- a/versioned_docs/version-0.2.0/00-intro/03-example-basic-component.md +++ b/versioned_docs/version-0.2.0/00-intro/03-example-basic-component.md @@ -108,5 +108,3 @@ This pattern allows you to build highly flexible and composable components, wher ## Next Steps You've seen how to define components and pass basic children. The next step is to explore the full power of OSUI's RSX syntax, including how to pass other types of props, use conditional rendering, and loop through data. - -**Next:** Dive into the details of the [RSX Syntax Guide](../guides/01-rsx-syntax.md). diff --git a/versioned_docs/version-0.2.0/01-guides/00-creating-components.md b/versioned_docs/version-0.2.0/01-guides/00-creating-components.md index 87e9b7f..8182cea 100644 --- a/versioned_docs/version-0.2.0/01-guides/00-creating-components.md +++ b/versioned_docs/version-0.2.0/01-guides/00-creating-components.md @@ -73,7 +73,7 @@ pub fn App(cx: &Arc) -> View { * **Parameter Names**: The names of your function parameters (e.g., `name`, `age`) become the names of the props you use when instantiating the component in `rsx!`. * **Reference Types**: Props are typically passed as references (e.g., `&str`, `&u8`). The `#[component]` macro automatically "strips" the reference when generating the internal component struct, storing the owned type. This means you don't need to manually clone values unless you intend to move them into a closure or `State`. -* **`children` Prop**: As seen in the [previous guide](/docs/intro/03-example-basic-component.md), any content nested inside a component's `rsx!` invocation is implicitly passed as a `children: &Rsx` prop. This allows for flexible content composition. +* **`children` Prop**: As seen in the [previous guide](/docs/intro/example-basic-component), any content nested inside a component's `rsx!` invocation is implicitly passed as a `children: &Rsx` prop. This allows for flexible content composition. ### Example: Component with `children` and custom props