import Gtk from "gi://Gtk"; import React from "react"; import type { StackElement, StackProps } from "./stack"; import type { StackScreenElement, StackScreenProps } from "./stack-screen"; import type { StackSwitcherProps } from "./stack-switcher"; export declare const createStack: () => { /** The Stack component that should contain StackScreen components. */ Stack: (props: Rg.IntrinsicComponent) => React.ReactElement<{ _widget: Gtk.Stack; ref?: { current: StackElement | null; } | ((ref: StackElement | null) => void) | undefined; transitionDuration?: number; transitionType?: import("../../..").StackTransitionType; interpolateSize?: boolean; sameSize?: boolean; children?: React.ReactElement | React.ReactElement[]; "cpt:pack-type"?: import("../../..").PackType; widthRequest?: number; heightRequest?: number; verticalAlign?: import("../../..").Align; horizontalAlign?: import("../../..").Align; margin?: import("../../utils/apply-margin").ElementMargin; expand?: boolean; expandHorizontal?: boolean; expandVertical?: boolean; }, string | React.JSXElementConstructor>; /** * A component that can be used to navigate between StackItem * components. */ Switcher: (props: Rg.IntrinsicComponent) => React.ReactElement<{ _widget: Gtk.Stack; ref?: { current: StackScreenElement | null; } | ((ref: StackScreenElement | null) => void) | undefined; iconSize?: number; "cpt:pack-type"?: import("../../..").PackType; widthRequest?: number; heightRequest?: number; verticalAlign?: import("../../..").Align; horizontalAlign?: import("../../..").Align; margin?: import("../../utils/apply-margin").ElementMargin; expand?: boolean; expandHorizontal?: boolean; expandVertical?: boolean; style?: import("../../utils/property-maps-factories/create-style-prop-mapper").StyleSheet; className?: string | string[]; }, string | React.JSXElementConstructor>; /** * A StackScreen component that can be used to define different * views that the Stack can display and switch between. */ Screen: (props: Rg.IntrinsicComponent>, StackScreenElement>) => React.ReactElement<{ [x: `cpt:${string}`]: string | number | boolean | undefined; ref?: { current: StackScreenElement | null; } | ((ref: StackScreenElement | null) => void) | undefined; children?: React.ReactNode | React.ReactNode[]; label: string; spacing?: number; baselinePosition?: import("../../..").BaselinePosition; orientation?: import("../../..").Orientation; uid?: R | undefined; "cpt:pack-type"?: import("../../..").PackType; widthRequest?: number; heightRequest?: number; verticalAlign?: import("../../..").Align; horizontalAlign?: import("../../..").Align; margin?: import("../../utils/apply-margin").ElementMargin; expand?: boolean; expandHorizontal?: boolean; expandVertical?: boolean; style?: import("../../utils/property-maps-factories/create-style-prop-mapper").StyleSheet; className?: string | string[]; }, string | React.JSXElementConstructor>; /** * Navigates the stack to the specified Stack Item. * * @param to The UID of the Stack Item to navigate to. */ navigate: (to: R) => void; }; export declare const useStack: () => { /** The Stack component that should contain StackScreen components. */ Stack: (props: Rg.IntrinsicComponent) => React.ReactElement<{ _widget: Gtk.Stack; ref?: { current: StackElement | null; } | ((ref: StackElement | null) => void) | undefined; transitionDuration?: number; transitionType?: import("../../..").StackTransitionType; interpolateSize?: boolean; sameSize?: boolean; children?: React.ReactElement | React.ReactElement[]; "cpt:pack-type"?: import("../../..").PackType; widthRequest?: number; heightRequest?: number; verticalAlign?: import("../../..").Align; horizontalAlign?: import("../../..").Align; margin?: import("../../utils/apply-margin").ElementMargin; expand?: boolean; expandHorizontal?: boolean; expandVertical?: boolean; }, string | React.JSXElementConstructor>; /** * A component that can be used to navigate between StackItem * components. */ Switcher: (props: Rg.IntrinsicComponent) => React.ReactElement<{ _widget: Gtk.Stack; ref?: { current: StackScreenElement | null; } | ((ref: StackScreenElement | null) => void) | undefined; iconSize?: number; "cpt:pack-type"?: import("../../..").PackType; widthRequest?: number; heightRequest?: number; verticalAlign?: import("../../..").Align; horizontalAlign?: import("../../..").Align; margin?: import("../../utils/apply-margin").ElementMargin; expand?: boolean; expandHorizontal?: boolean; expandVertical?: boolean; style?: import("../../utils/property-maps-factories/create-style-prop-mapper").StyleSheet; className?: string | string[]; }, string | React.JSXElementConstructor>; /** * A StackScreen component that can be used to define different * views that the Stack can display and switch between. */ Screen: (props: Rg.IntrinsicComponent, React.ReactNode>, StackScreenElement>) => React.ReactElement<{ [x: `cpt:${string}`]: string | number | boolean | undefined; ref?: { current: StackScreenElement | null; } | ((ref: StackScreenElement | null) => void) | undefined; children?: React.ReactNode | React.ReactNode[]; label: string; spacing?: number; baselinePosition?: import("../../..").BaselinePosition; orientation?: import("../../..").Orientation; uid?: R | undefined; "cpt:pack-type"?: import("../../..").PackType; widthRequest?: number; heightRequest?: number; verticalAlign?: import("../../..").Align; horizontalAlign?: import("../../..").Align; margin?: import("../../utils/apply-margin").ElementMargin; expand?: boolean; expandHorizontal?: boolean; expandVertical?: boolean; style?: import("../../utils/property-maps-factories/create-style-prop-mapper").StyleSheet; className?: string | string[]; }, string | React.JSXElementConstructor>; /** * Navigates the stack to the specified Stack Item. * * @param to The UID of the Stack Item to navigate to. */ navigate: (to: R) => void; };