lecodes-sdk 2.0.10 → 2.0.11
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/types/ui/UITabs.d.ts +16 -3
- package/dist/types/version.d.ts +1 -1
- package/dist/types.json +1 -1
- package/package.json +1 -1
- package/prompts/ui.md +2 -0
- package/src/ui/UIPager.ts +2 -0
- package/src/ui/UITabs.ts +43 -5
- package/src/version.ts +1 -1
|
@@ -61,9 +61,22 @@ export declare class TabsElement extends ScreenElement {
|
|
|
61
61
|
onSelect(callback: (id: string, index: number) => void): this;
|
|
62
62
|
badge(id: string, value: number | string | boolean | null | undefined): this;
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
export interface UITabsConstructor {
|
|
65
|
+
/** Create the standard bottom-tab shell — see {@link UITabs}. Keys are tab ids in tab order;
|
|
66
|
+
* each tab needs a `label` and its root `screen` (plus an optional `icon`). */
|
|
67
|
+
(tabs: Record<string, UITabDef>): UITabs;
|
|
68
|
+
/** The tabs whose page is currently visible, or `null` when the visible screen is not a tab
|
|
69
|
+
* of any — the twin of `UIPager.current`, so a screen switches tabs with no reference
|
|
70
|
+
* threading: `UITabs.current?.select("services")`. With tabs nested inside a tab's page,
|
|
71
|
+
* resolves to the innermost. */
|
|
72
|
+
readonly current: UITabs | null;
|
|
73
|
+
/** `UITabs.current.select(id)` — switch the visible tabs to `id`; a console warning and no-op
|
|
74
|
+
* when no tabs are on screen. */
|
|
75
|
+
select(id: string, animated?: boolean): void;
|
|
76
|
+
}
|
|
77
|
+
/** Create the standard bottom-tab shell — see {@link UITabs}; `UITabs.current` / `UITabs.select(id)`
|
|
78
|
+
* reach the visible tabs from anywhere. */
|
|
79
|
+
export declare const UITabs: UITabsConstructor;
|
|
67
80
|
/** A `defineTabs` tab: `label` + optional `icon` (an `assetIcon("lucide:…")` call — never a
|
|
68
81
|
* hand-written source object). `UITabDef` is this plus the tab's root `screen`. */
|
|
69
82
|
export type TabDef = Omit<UITabDef, "screen">;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.11";
|
|
2
2
|
/** The major of a semver string, or null when it is not one. */
|
|
3
3
|
export declare const sdkMajor: (version: string | null | undefined) => number | null;
|
|
4
4
|
/** The `// sdk: <version>` line of a compiled bundle's header (sdk/src/compile/header.ts), read from
|