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