@octane-xplat/ui 0.2.1 → 0.4.0
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/README.md +46 -0
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/ui.js +52 -19
- package/dist/native/ui10.js +25 -45
- package/dist/native/ui11.js +52 -57
- package/dist/native/ui12.js +47 -16
- package/dist/native/ui13.js +24 -18
- package/dist/native/ui14.js +117 -12
- package/dist/native/ui15.js +78 -17
- package/dist/native/ui16.js +88 -115
- package/dist/native/ui17.js +29 -19
- package/dist/native/ui18.js +34 -12
- package/dist/native/ui19.js +244 -8
- package/dist/native/ui2.js +10 -48
- package/dist/native/ui20.js +28 -0
- package/dist/native/ui21.js +383 -0
- package/dist/native/ui22.js +36 -0
- package/dist/native/ui23.js +55 -0
- package/dist/native/ui24.js +83 -0
- package/dist/native/ui25.js +141 -0
- package/dist/native/ui26.js +12 -0
- package/dist/native/ui27.js +61 -0
- package/dist/native/ui28.js +40 -0
- package/dist/native/ui29.js +108 -0
- package/dist/native/ui3.js +17 -20
- package/dist/native/ui30.js +18 -0
- package/dist/native/ui31.js +58 -0
- package/dist/native/ui32.js +58 -0
- package/dist/native/ui33.js +38 -0
- package/dist/native/ui34.js +53 -0
- package/dist/native/ui35.js +105 -0
- package/dist/native/ui36.js +10 -0
- package/dist/native/ui37.js +44 -0
- package/dist/native/ui38.js +197 -0
- package/dist/native/ui39.js +105 -0
- package/dist/native/ui4.js +23 -48
- package/dist/native/ui40.js +58 -0
- package/dist/native/ui41.js +19 -0
- package/dist/native/ui42.js +8 -0
- package/dist/native/ui43.js +38 -0
- package/dist/native/ui44.js +267 -0
- package/dist/native/ui45.js +28 -0
- package/dist/native/ui46.js +35 -0
- package/dist/native/ui47.js +41 -0
- package/dist/native/ui48.js +72 -0
- package/dist/native/ui49.js +66 -0
- package/dist/native/ui5.js +37 -34
- package/dist/native/ui50.js +27 -0
- package/dist/native/ui51.js +13 -0
- package/dist/native/ui52.js +92 -0
- package/dist/native/ui53.js +34 -0
- package/dist/native/ui54.js +17 -0
- package/dist/native/ui55.js +156 -0
- package/dist/native/ui56.js +33 -0
- package/dist/native/ui57.js +14 -0
- package/dist/native/ui58.js +22 -0
- package/dist/native/ui59.js +8 -0
- package/dist/native/ui6.js +79 -20
- package/dist/native/ui60.js +108 -0
- package/dist/native/ui61.js +76 -0
- package/dist/native/ui7.js +44 -65
- package/dist/native/ui8.js +25 -17
- package/dist/native/ui9.js +24 -12
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/ui.js +51 -19
- package/dist/web/ui10.js +33 -30
- package/dist/web/ui11.js +40 -55
- package/dist/web/ui12.js +36 -15
- package/dist/web/ui13.js +212 -20
- package/dist/web/ui14.js +84 -14
- package/dist/web/ui15.js +425 -46
- package/dist/web/ui16.js +12 -93
- package/dist/web/ui17.js +246 -28
- package/dist/web/ui18.js +238 -15
- package/dist/web/ui19.js +36 -8
- package/dist/web/ui2.js +15 -103
- package/dist/web/ui20.js +85 -0
- package/dist/web/ui21.js +111 -0
- package/dist/web/ui22.js +108 -0
- package/dist/web/ui23.js +96 -0
- package/dist/web/ui24.js +32 -0
- package/dist/web/ui25.js +108 -0
- package/dist/web/ui26.js +45 -0
- package/dist/web/ui27.js +16 -0
- package/dist/web/ui28.js +11 -0
- package/dist/web/ui29.js +58 -0
- package/dist/web/ui3.js +30 -27
- package/dist/web/ui30.js +34 -0
- package/dist/web/ui31.js +123 -0
- package/dist/web/ui32.js +44 -0
- package/dist/web/ui33.js +159 -0
- package/dist/web/ui34.js +70 -0
- package/dist/web/ui35.js +57 -0
- package/dist/web/ui36.js +22 -0
- package/dist/web/ui37.js +7 -0
- package/dist/web/ui38.js +38 -0
- package/dist/web/ui39.js +154 -0
- package/dist/web/ui4.js +46 -24
- package/dist/web/ui40.js +43 -0
- package/dist/web/ui41.js +42 -0
- package/dist/web/ui42.js +76 -0
- package/dist/web/ui43.js +42 -0
- package/dist/web/ui44.js +62 -0
- package/dist/web/ui45.js +9 -0
- package/dist/web/ui46.js +45 -0
- package/dist/web/ui47.js +13 -0
- package/dist/web/ui48.js +63 -0
- package/dist/web/ui49.js +47 -0
- package/dist/web/ui5.js +158 -52
- package/dist/web/ui50.js +17 -0
- package/dist/web/ui51.js +149 -0
- package/dist/web/ui52.js +42 -0
- package/dist/web/ui53.js +17 -0
- package/dist/web/ui54.js +9 -0
- package/dist/web/ui55.js +22 -0
- package/dist/web/ui56.js +8 -0
- package/dist/web/ui57.js +44 -0
- package/dist/web/ui58.js +46 -0
- package/dist/web/ui6.js +85 -22
- package/dist/web/ui7.js +46 -41
- package/dist/web/ui8.js +28 -11
- package/dist/web/ui9.js +32 -13
- package/package.json +18 -6
- package/src/theme/tokens.css +444 -47
- package/types/index.d.ts +180 -29
- package/types/props.d.ts +553 -8
package/types/index.d.ts
CHANGED
|
@@ -6,92 +6,243 @@
|
|
|
6
6
|
// emit declarations for .tsrx (upstream: tsrx-org/tsrx#136); this file is
|
|
7
7
|
// what `tsc --emitDeclarationOnly` on pure .ts buys us.
|
|
8
8
|
|
|
9
|
-
import type { UniversalComponent } from 'octane/universal'
|
|
9
|
+
import type { UniversalComponent } from 'octane/universal'
|
|
10
10
|
import type {
|
|
11
11
|
AnimatedValue,
|
|
12
|
+
AbsoluteProps,
|
|
13
|
+
ActivityIndicatorProps,
|
|
14
|
+
BeforeLoad,
|
|
15
|
+
BeforeLoadArgs,
|
|
12
16
|
ColorScheme,
|
|
17
|
+
DrawerProps,
|
|
18
|
+
GridProps,
|
|
19
|
+
HeadingProps,
|
|
20
|
+
IconGlyph,
|
|
21
|
+
IconProps,
|
|
13
22
|
ImageProps,
|
|
23
|
+
KeyboardAvoidingProps,
|
|
24
|
+
LayoutChildProps,
|
|
25
|
+
LinkProps,
|
|
14
26
|
ListProps,
|
|
27
|
+
MeterProps,
|
|
15
28
|
ModalProps,
|
|
29
|
+
ModalOpenOptions,
|
|
30
|
+
ModalOpenResult,
|
|
31
|
+
NavLinkProps,
|
|
32
|
+
OpenModal,
|
|
33
|
+
OpenWindowOptions,
|
|
34
|
+
OverlayProps,
|
|
35
|
+
PopoverAnchorRef,
|
|
36
|
+
PopoverPlacement,
|
|
37
|
+
PopoverProps,
|
|
16
38
|
PlatformBadgeProps,
|
|
17
39
|
PressableProps,
|
|
40
|
+
ReadableStore,
|
|
18
41
|
Route,
|
|
42
|
+
RouteContext,
|
|
43
|
+
RouteHead,
|
|
44
|
+
RouteHeadExport,
|
|
45
|
+
RouteManifest,
|
|
46
|
+
RouteMeta,
|
|
47
|
+
RichTextProps,
|
|
48
|
+
RichTextSpanProps,
|
|
19
49
|
RowProps,
|
|
20
50
|
ScreenProps,
|
|
51
|
+
SafeAreaProps,
|
|
52
|
+
ScreenTable,
|
|
21
53
|
ScrollViewProps,
|
|
54
|
+
SliderProps,
|
|
55
|
+
Store,
|
|
56
|
+
SpacerProps,
|
|
57
|
+
StackProps,
|
|
22
58
|
SwitchProps,
|
|
23
59
|
TabSpec,
|
|
24
60
|
TabsProps,
|
|
61
|
+
TextAreaProps,
|
|
25
62
|
TextInputProps,
|
|
26
63
|
TextProps,
|
|
64
|
+
ToastContent,
|
|
65
|
+
ToastOptions,
|
|
66
|
+
ToastPosition,
|
|
27
67
|
ViewProps,
|
|
28
|
-
} from './props'
|
|
68
|
+
} from './props'
|
|
29
69
|
|
|
30
70
|
export type {
|
|
71
|
+
AbsoluteProps,
|
|
31
72
|
AnimatedValue,
|
|
73
|
+
ActivityIndicatorProps,
|
|
74
|
+
BeforeLoad,
|
|
75
|
+
BeforeLoadArgs,
|
|
32
76
|
ColorScheme,
|
|
77
|
+
DrawerProps,
|
|
78
|
+
GridProps,
|
|
79
|
+
HeadingProps,
|
|
80
|
+
IconGlyph,
|
|
81
|
+
IconProps,
|
|
33
82
|
ImageProps,
|
|
83
|
+
KeyboardAvoidingProps,
|
|
84
|
+
LayoutChildProps,
|
|
85
|
+
LinkProps,
|
|
34
86
|
ListProps,
|
|
35
87
|
ModalProps,
|
|
88
|
+
ModalOpenOptions,
|
|
89
|
+
ModalOpenResult,
|
|
90
|
+
NavLinkProps,
|
|
91
|
+
OpenModal,
|
|
92
|
+
OpenWindowOptions,
|
|
93
|
+
OverlayProps,
|
|
94
|
+
PopoverAnchorRef,
|
|
95
|
+
PopoverPlacement,
|
|
96
|
+
PopoverProps,
|
|
36
97
|
PanEvent,
|
|
37
98
|
PlatformBadgeProps,
|
|
38
99
|
PressableProps,
|
|
100
|
+
ReadableStore,
|
|
39
101
|
Route,
|
|
102
|
+
RouteContext,
|
|
103
|
+
RouteHead,
|
|
104
|
+
RouteHeadExport,
|
|
105
|
+
RouteManifest,
|
|
106
|
+
RouteMeta,
|
|
107
|
+
RichTextProps,
|
|
108
|
+
RichTextSpanProps,
|
|
40
109
|
RowProps,
|
|
41
110
|
ScreenProps,
|
|
111
|
+
SafeAreaProps,
|
|
112
|
+
ScreenTable,
|
|
42
113
|
ScrollViewProps,
|
|
114
|
+
SliderProps,
|
|
115
|
+
Store,
|
|
116
|
+
SpacerProps,
|
|
117
|
+
StackProps,
|
|
43
118
|
SwipeEvent,
|
|
44
119
|
SwitchProps,
|
|
45
120
|
TabSpec,
|
|
46
121
|
TabsProps,
|
|
122
|
+
TextAreaProps,
|
|
47
123
|
TextInputProps,
|
|
48
124
|
TextProps,
|
|
125
|
+
ToastContent,
|
|
126
|
+
ToastOptions,
|
|
127
|
+
ToastPosition,
|
|
49
128
|
ViewProps,
|
|
50
|
-
} from './props'
|
|
129
|
+
} from './props'
|
|
130
|
+
|
|
131
|
+
/** ScrollBox shares ScrollView's public shell props; native renders it inline. */
|
|
132
|
+
export type ScrollBoxProps = ScrollViewProps
|
|
51
133
|
|
|
52
134
|
// ---------- primitives ----------
|
|
53
135
|
|
|
54
|
-
export declare const View: UniversalComponent<ViewProps
|
|
136
|
+
export declare const View: UniversalComponent<ViewProps>
|
|
55
137
|
/** Column-direction alias of View. */
|
|
56
|
-
export declare const Column: UniversalComponent<ViewProps
|
|
57
|
-
export declare const Row: UniversalComponent<RowProps
|
|
58
|
-
export declare const
|
|
59
|
-
export declare const
|
|
60
|
-
export declare const
|
|
61
|
-
export declare const
|
|
62
|
-
export declare const
|
|
63
|
-
export declare const
|
|
64
|
-
export declare const
|
|
65
|
-
export declare const
|
|
66
|
-
export declare const
|
|
138
|
+
export declare const Column: UniversalComponent<ViewProps>
|
|
139
|
+
export declare const Row: UniversalComponent<RowProps>
|
|
140
|
+
export declare const Grid: UniversalComponent<GridProps>
|
|
141
|
+
export declare const Stack: UniversalComponent<StackProps>
|
|
142
|
+
export declare const Absolute: UniversalComponent<AbsoluteProps>
|
|
143
|
+
export declare const Spacer: UniversalComponent<SpacerProps>
|
|
144
|
+
export declare const Text: UniversalComponent<TextProps>
|
|
145
|
+
export declare const RichText: UniversalComponent<RichTextProps>
|
|
146
|
+
export declare const RichTextSpan: UniversalComponent<RichTextSpanProps>
|
|
147
|
+
export declare const Pressable: UniversalComponent<PressableProps>
|
|
148
|
+
export declare const Link: UniversalComponent<LinkProps>
|
|
149
|
+
export declare const NavLink: UniversalComponent<NavLinkProps>
|
|
150
|
+
export declare const TextInput: UniversalComponent<TextInputProps>
|
|
151
|
+
export declare const TextArea: UniversalComponent<TextAreaProps>
|
|
152
|
+
export declare const List: UniversalComponent<ListProps>
|
|
153
|
+
export declare const ScrollBox: UniversalComponent<ScrollBoxProps>
|
|
154
|
+
export declare const ScrollView: UniversalComponent<ScrollViewProps>
|
|
155
|
+
export declare const Image: UniversalComponent<ImageProps>
|
|
156
|
+
export declare const Screen: UniversalComponent<ScreenProps>
|
|
157
|
+
export declare const SafeArea: UniversalComponent<SafeAreaProps>
|
|
158
|
+
export declare const KeyboardAvoiding: UniversalComponent<KeyboardAvoidingProps>
|
|
159
|
+
export declare const Drawer: UniversalComponent<DrawerProps>
|
|
160
|
+
export declare const Switch: UniversalComponent<SwitchProps>
|
|
161
|
+
export declare const ActivityIndicator: UniversalComponent<ActivityIndicatorProps>
|
|
162
|
+
export declare const Meter: UniversalComponent<MeterProps>
|
|
163
|
+
export declare const Slider: UniversalComponent<SliderProps>
|
|
164
|
+
export declare const Icon: UniversalComponent<IconProps>
|
|
165
|
+
export declare const Heading: UniversalComponent<HeadingProps>
|
|
166
|
+
export declare const PlatformBadge: UniversalComponent<PlatformBadgeProps>
|
|
167
|
+
|
|
168
|
+
export declare function registerIcon(name: string, glyph: IconGlyph): void
|
|
169
|
+
export declare function registerIcons(record: Record<string, IconGlyph>): void
|
|
67
170
|
|
|
68
171
|
// ---------- overlays / shells ----------
|
|
69
172
|
|
|
70
|
-
export declare const Modal: UniversalComponent<ModalProps
|
|
71
|
-
export declare const
|
|
173
|
+
export declare const Modal: UniversalComponent<ModalProps>
|
|
174
|
+
export declare const openModal: OpenModal
|
|
175
|
+
export declare function openWindow(options?: OpenWindowOptions): any
|
|
176
|
+
export declare const Overlay: UniversalComponent<OverlayProps>
|
|
177
|
+
export declare const Popover: UniversalComponent<PopoverProps>
|
|
178
|
+
export declare function showToast(content: ToastContent, options?: ToastOptions): void
|
|
179
|
+
export declare const Tabs: UniversalComponent<TabsProps>
|
|
72
180
|
|
|
73
181
|
// ---------- stacks (native registry; no-op on web) ----------
|
|
74
182
|
|
|
75
|
-
export declare function registerStack(name: string, frame: any): void
|
|
76
|
-
export declare function getStack(name: string): any
|
|
77
|
-
export declare function stackEntries(): IterableIterator<[string, any]
|
|
183
|
+
export declare function registerStack(name: string, frame: any): void
|
|
184
|
+
export declare function getStack(name: string): any
|
|
185
|
+
export declare function stackEntries(): IterableIterator<[string, any]>
|
|
186
|
+
|
|
187
|
+
// ---------- routes (real on both: URL store on web, Frame stacks on native) ----------
|
|
188
|
+
|
|
189
|
+
export declare function pushRoute(r: Route): void
|
|
190
|
+
export declare function popRoute(stack?: string): void
|
|
191
|
+
export declare function routeStacks(): string[]
|
|
192
|
+
export declare function layoutsForRoute(name: string): any[]
|
|
193
|
+
export declare function routeFor(stack: string): Route | null
|
|
194
|
+
export declare function currentRoute(): Route | null
|
|
195
|
+
export declare function canGoBack(stack?: string): boolean
|
|
196
|
+
export declare function useCanGoBack(stack?: string): boolean
|
|
197
|
+
export declare function redirect(route: Route): never
|
|
198
|
+
export declare function useRoute(stack: string): Route | null
|
|
199
|
+
/** name → screen table; native pushRoute resolves `route.name` through
|
|
200
|
+
* it, web outlets fall back to it via `screenFor`. `manifest` (from
|
|
201
|
+
* deriveRouteManifest) enables path-param URL matching on web. Call
|
|
202
|
+
* once at boot. */
|
|
203
|
+
export declare function registerScreens(table: ScreenTable, manifest?: RouteMeta[]): void
|
|
204
|
+
/** One-call registration for route-dir apps — screens + URL patterns +
|
|
205
|
+
* layouts all come from deriveRouteManifest. */
|
|
206
|
+
export declare function registerRoutes(manifest: RouteManifest): void
|
|
207
|
+
export declare function screenFor(name: string): any
|
|
208
|
+
/** Canonical /<stack>/<path> for a Route — Link's href on web. */
|
|
209
|
+
export declare function hrefFor(r: Route): string
|
|
78
210
|
|
|
79
|
-
// ----------
|
|
211
|
+
// ---------- route dir (file → route manifest; docs/navigation-notes.md) ----------
|
|
80
212
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
213
|
+
/** Turn an `import.meta.glob` module map of the route dir into
|
|
214
|
+
* {screens, routes, layouts}: `demo/[id].tsrx` → 'demo/:id',
|
|
215
|
+
* `_layout.tsrx` → layouts[''], platform suffixes deduped by `prefer`
|
|
216
|
+
* rank (web: ['web']; native: ['ios'|'android','native']). */
|
|
217
|
+
export declare function deriveRouteManifest(
|
|
218
|
+
files: Record<string, any>,
|
|
219
|
+
prefer: readonly string[],
|
|
220
|
+
dir?: string,
|
|
221
|
+
): RouteManifest
|
|
85
222
|
|
|
86
223
|
// ---------- animation / theme ----------
|
|
87
224
|
|
|
88
|
-
export declare function useAnimation(initial?: number, prop?: string): AnimatedValue
|
|
89
|
-
export declare function getColorScheme(): ColorScheme
|
|
90
|
-
export declare function useColorScheme(): ColorScheme
|
|
225
|
+
export declare function useAnimation(initial?: number, prop?: string): AnimatedValue
|
|
226
|
+
export declare function getColorScheme(): ColorScheme
|
|
227
|
+
export declare function useColorScheme(): ColorScheme
|
|
228
|
+
export interface SafeAreaInsets {
|
|
229
|
+
top: number
|
|
230
|
+
right: number
|
|
231
|
+
bottom: number
|
|
232
|
+
left: number
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export declare function useSafeAreaInsets(): SafeAreaInsets
|
|
91
236
|
|
|
92
237
|
// ---------- styled ----------
|
|
93
238
|
|
|
94
239
|
export declare function styled<P extends { className?: any }, V extends Record<string, any>>(
|
|
95
240
|
Base: (props: P) => any,
|
|
96
241
|
def: { base?: any; variants?: V },
|
|
97
|
-
): UniversalComponent<P & { [K in keyof V]?: boolean }
|
|
242
|
+
): UniversalComponent<P & { [K in keyof V]?: boolean }>
|
|
243
|
+
|
|
244
|
+
// ---------- stores ----------
|
|
245
|
+
|
|
246
|
+
export declare function createStore<T>(initial: T): Store<T>
|
|
247
|
+
export declare function useStore<T>(store: ReadableStore<T>): T
|
|
248
|
+
export declare function useStore<T, S>(store: ReadableStore<T>, select: (state: T) => S): S
|