@octane-xplat/ui 0.7.3 → 0.9.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 +4 -3
- package/dist/native/Button.tsrx.js +1 -1
- package/dist/native/KeyboardAvoiding.mobile.tsrx.js +2 -2
- package/dist/native/Markdown.tsrx.js +233 -0
- package/dist/native/Overlay.tsrx.js +15 -26
- package/dist/native/PinInput.tsrx.js +25 -7
- package/dist/native/Popover.tsrx.js +17 -18
- package/dist/native/Pressable.tsrx.js +4 -1
- package/dist/native/SearchInput.tsrx.js +6 -3
- package/dist/native/Sheet.tsrx.js +22 -37
- package/dist/native/TextArea.tsrx.js +6 -3
- package/dist/native/TextInput.tsrx.js +6 -3
- package/dist/native/VirtualList.tsrx.js +305 -121
- package/dist/native/index.shared.js +7 -5
- package/dist/native/keyboard-inset.mobile.js +5 -5
- package/dist/native/navigation-request.js +26 -0
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/overlay-lifetime.mobile.js +65 -0
- package/dist/native/pan.tsrx.js +16 -2
- package/dist/native/route-table.js +90 -10
- package/dist/native/route.js +26 -16
- package/dist/native/shared.js +7 -5
- package/dist/native/sheet-service.js +1 -1
- package/dist/native/svg.mobile.js +1 -1
- package/dist/native/text-focus.js +10 -0
- package/dist/native/text-write.js +18 -11
- package/dist/native/toast-anchor.tsrx.js +1 -1
- package/dist/native/ui.js +7 -6
- package/dist/native/vendor/ui-svg/index.android.js +2 -2
- package/dist/native/vendor/ui-svg/index.ios.js +2 -2
- package/dist/native/vendor/ui-svg/{index.common.js → src/index.common.js} +1 -1
- package/dist/native/virtual-list-cell-pool.js +63 -0
- package/dist/web/Button.web.tsrx.js +1 -1
- package/dist/web/KeyboardAvoiding.web.tsrx.js +78 -0
- package/dist/web/Markdown.tsrx.js +98 -0
- package/dist/web/Overlay.web.tsrx.js +81 -32
- package/dist/web/PinInput.web.tsrx.js +24 -10
- package/dist/web/Pressable.web.tsrx.js +169 -53
- package/dist/web/SearchInput.web.tsrx.js +2 -2
- package/dist/web/Sheet.web.tsrx.js +20 -7
- package/dist/web/TextArea.web.tsrx.js +22 -17
- package/dist/web/TextInput.web.tsrx.js +2 -2
- package/dist/web/VirtualList.web.tsrx.js +220 -109
- package/dist/web/WebView.web.tsrx.js +3 -3
- package/dist/web/{index.shared.js → index.shared.web.js} +7 -5
- package/dist/web/modal-focus.web.js +95 -0
- package/dist/web/navigation-request.js +26 -0
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/pan.web.tsrx.js +27 -10
- package/dist/web/route-table.js +90 -10
- package/dist/web/route.web.js +88 -22
- package/dist/web/sheet-service.web.js +8 -0
- package/dist/web/theme/colorScheme.web.js +31 -4
- package/dist/web/ui.js +8 -6
- package/dist/web/virtual-list-cell-pool.js +63 -0
- package/package.json +21 -19
- package/platforms/android/native-api-usage.json +7 -7
- package/src/CommandPalette.tsrx +1 -0
- package/src/Grid.tsrx +2 -0
- package/src/Icon.macos.tsrx +1 -0
- package/src/KeyboardAvoiding.macos.tsrx +7 -1
- package/src/KeyboardAvoiding.mobile.tsrx +2 -2
- package/src/KeyboardAvoiding.tsrx +15 -0
- package/src/KeyboardAvoiding.web.tsrx +15 -0
- package/src/Markdown.tsrx +121 -0
- package/src/Meter.tsrx +1 -0
- package/src/Overlay.tsrx +15 -30
- package/src/Overlay.web.tsrx +12 -3
- package/src/PinInput.macos.tsrx +20 -6
- package/src/PinInput.mobile.test.ts +107 -0
- package/src/PinInput.tsrx +20 -6
- package/src/PinInput.web.test.tsrx +42 -0
- package/src/PinInput.web.tsrx +20 -6
- package/src/Popover.tsrx +17 -17
- package/src/Pressable.tsrx +1 -1
- package/src/Pressable.web.test.tsrx +36 -0
- package/src/Pressable.web.tsrx +37 -6
- package/src/RouteHost.macos.tsrx +1 -0
- package/src/SearchInput.tsrx +4 -3
- package/src/SearchInput.web.tsrx +1 -1
- package/src/Sheet.tsrx +20 -41
- package/src/Sheet.web.tsrx +9 -1
- package/src/Text.tsrx +2 -0
- package/src/TextArea.tsrx +6 -5
- package/src/TextArea.web.test.tsrx +39 -0
- package/src/TextArea.web.tsrx +7 -5
- package/src/TextInput.tsrx +6 -6
- package/src/TextInput.web.tsrx +1 -1
- package/src/VirtualList.macos.tsrx +93 -6
- package/src/VirtualList.mobile.test.tsrx +232 -0
- package/src/VirtualList.tsrx +285 -81
- package/src/VirtualList.web.tsrx +131 -25
- package/src/WebView.tsrx +1 -0
- package/src/WebView.web.tsrx +3 -0
- package/src/android/BottomNavigationView.android.tsrx +1 -0
- package/src/android/MaterialDialog.android.tsrx +1 -0
- package/src/anim.macos.tsrx +1 -0
- package/src/apply-native-modifiers.native.ts +4 -1
- package/src/child-array.ts +12 -7
- package/src/colorScheme.macos.ts +1 -0
- package/src/controls.macos.tsrx +4 -1
- package/src/data-driver.mobile.test.ts +120 -0
- package/src/data-lifecycle.mobile.test.ts +251 -0
- package/src/escape-props.ts +2 -0
- package/src/grid-auto-placement.ts +54 -12
- package/src/grid-placement.ts +1 -1
- package/src/hosted-unsupported.macos.tsrx +1 -0
- package/src/index.macos.ts +23 -3
- package/src/index.mobile.ts +0 -1
- package/src/index.shared.ts +22 -1
- package/src/index.shared.web.ts +291 -0
- package/src/index.web.ts +1 -1
- package/src/input-readiness.web.test.tsrx +82 -0
- package/src/ios/UITabBar.ios.tsrx +1 -0
- package/src/keyboard-inset.mobile.test.ts +62 -0
- package/src/keyboard-inset.mobile.ts +63 -43
- package/src/layout-shells.macos.tsrx +1 -5
- package/src/macos-extras.macos.tsrx +2 -0
- package/src/modal-focus.web.test.tsrx +63 -0
- package/src/modal-focus.web.ts +162 -0
- package/src/navigation-request.ts +37 -0
- package/src/overlay-lifecycle.mobile.test.ts +316 -0
- package/src/overlay-lifetime.mobile.ts +107 -0
- package/src/pan.mobile.test.tsrx +116 -0
- package/src/pan.tsrx +20 -2
- package/src/pan.web.tsrx +35 -7
- package/src/platformProps.ts +1 -0
- package/src/popover.mobile.test.ts +9 -1
- package/src/pressable-accessibility.mobile.test.ts +30 -0
- package/src/props.ts +163 -3
- package/src/refresh.ts +6 -1
- package/src/refresh.web.test.ts +77 -77
- package/src/route-android.test.ts +162 -0
- package/src/route-history.web.test.ts +80 -0
- package/src/route-navigation.web.test.ts +173 -0
- package/src/route-table.test.ts +188 -9
- package/src/route-table.ts +138 -10
- package/src/route.macos.ts +56 -13
- package/src/route.ts +54 -24
- package/src/route.web.ts +141 -24
- package/src/sheet-detents.ts +5 -3
- package/src/sheet-service.macos.ts +5 -1
- package/src/sheet-service.web.ts +8 -0
- package/src/sheet-snap.test.ts +23 -23
- package/src/sheet-snap.ts +6 -1
- package/src/svg.mobile.ts +9 -3
- package/src/tap-to-blur.ios.ts +48 -32
- package/src/tap-to-blur.mobile.ts +23 -15
- package/src/text-focus.ts +12 -0
- package/src/text-input.mobile.test.ts +89 -0
- package/src/text-write.ts +21 -11
- package/src/theme/colorScheme.linux.ts +2 -4
- package/src/theme/colorScheme.web.ts +51 -4
- package/src/theme/theme-scheme.macos.ts +8 -2
- package/src/theme/tokens.css +1736 -1730
- package/src/translate.macos.ts +4 -1
- package/src/virtual-list-cell-pool.test.ts +53 -0
- package/src/virtual-list-cell-pool.ts +81 -0
- package/src/virtual-list-layout.test.ts +11 -8
- package/src/virtual-list-layout.ts +4 -8
- package/src/windows.linux.ts +7 -2
- package/src/windows.macos.ts +1 -0
- package/types/generated/.tsrx-typegen-manifest.json +13 -3
- package/types/generated/KeyboardAvoiding.d.ts +3 -0
- package/types/generated/KeyboardAvoiding.web.d.ts +2 -0
- package/types/generated/Markdown.d.ts +59 -0
- package/types/generated/TextArea.d.ts +2 -2
- package/types/generated/TextArea.web.d.ts +1 -1
- package/types/generated/TextInput.d.ts +2 -3
- package/types/generated/VirtualList.d.ts +3 -3
- package/types/generated/index.mobile.d.ts +0 -1
- package/types/generated/index.shared.d.ts +6 -3
- package/types/generated/index.shared.web.d.ts +114 -0
- package/types/generated/index.web.d.ts +1 -1
- package/types/generated/modal-focus.web.d.ts +3 -0
- package/types/generated/navigation-request.d.ts +10 -0
- package/types/generated/overlay-lifetime.mobile.d.ts +10 -0
- package/types/generated/props.d.ts +111 -3
- package/types/generated/route-table.d.ts +14 -3
- package/types/generated/svg.mobile.d.ts +2 -2
- package/types/generated/text-focus.d.ts +3 -0
- package/types/generated/text-write.d.ts +3 -1
- package/types/generated/theme/colorScheme.web.d.ts +5 -0
- package/types/generated/virtual-list-cell-pool.d.ts +18 -0
- package/types/index.macos.d.ts +15 -3
- /package/src/vendor/ui-svg/{index.android.ts → src/index.android.ts} +0 -0
- /package/src/vendor/ui-svg/{index.common.ts → src/index.common.ts} +0 -0
- /package/src/vendor/ui-svg/{index.ios.ts → src/index.ios.ts} +0 -0
- /package/src/vendor/ui-svg/{index.ts → src/index.ts} +0 -0
- /package/src/vendor/ui-svg/{typings → src/typings}/SVGKit.d.ts +0 -0
- /package/src/vendor/ui-svg/{typings → src/typings}/android.d.ts +0 -0
- /package/src/vendor/ui-svg/{typings → src/typings}/ios.d.ts +0 -0
- /package/types/generated/vendor/ui-svg/{index.common.d.ts → src/index.common.d.ts} +0 -0
- /package/types/generated/vendor/ui-svg/{index.d.ts → src/index.d.ts} +0 -0
- /package/types/generated/vendor/ui-svg/{index.ios.d.ts → src/index.ios.d.ts} +0 -0
|
@@ -319,7 +319,8 @@ export interface TextAreaProps extends TextInputProps {
|
|
|
319
319
|
* minHeight at the widget's measured line height. With `autoGrow` it
|
|
320
320
|
* becomes the starting height instead of a fixed one. */
|
|
321
321
|
rows?: number;
|
|
322
|
-
/** Grow
|
|
322
|
+
/** Grow on input and value updates, capped by `maxRows`, including when
|
|
323
|
+
* `value` is omitted. Native TextView grows by
|
|
323
324
|
* default — this prop exists so web (<textarea> is fixed-rows) matches;
|
|
324
325
|
* without it, native gets a fixed `rows`-high box like web. */
|
|
325
326
|
autoGrow?: boolean;
|
|
@@ -917,14 +918,23 @@ export interface RouteMeta {
|
|
|
917
918
|
/** Optional `loader` named export — a prefetch hook, not a data layer.
|
|
918
919
|
* pushRoute fires it (fire-and-forget) before navigating so the
|
|
919
920
|
* screen's `query$` reads hit a warm cache; boot/deep-link routes
|
|
920
|
-
* skip it (the screen mounts in the same tick anyway).
|
|
921
|
+
* skip it (the screen mounts in the same tick anyway). Ignored when
|
|
922
|
+
* `dataMode: 'baked'` — baked routes resolve from `manifest.baked`. */
|
|
921
923
|
loader?: (params: Record<string, unknown>) => unknown;
|
|
924
|
+
/** Data provenance: 'live' (default) runs `loader` at navigation;
|
|
925
|
+
* 'baked' reads build-time output from the manifest's `baked` map —
|
|
926
|
+
* for file routes the loader lives in a `<route>.loader.ts` sibling
|
|
927
|
+
* that `xplat routes`/`xplat build` executes and never bundles. */
|
|
928
|
+
dataMode?: RouteDataMode;
|
|
922
929
|
/** Optional guard awaited before a push commits. A thrown `redirect(...)`
|
|
923
930
|
* short-circuits the attempted route. */
|
|
924
931
|
beforeLoad?: BeforeLoad;
|
|
925
932
|
/** Optional route title/meta declaration, or a params-only function. */
|
|
926
933
|
head?: RouteHeadExport;
|
|
927
934
|
}
|
|
935
|
+
/** How a route's data is produced — `'live'` runs the loader at navigation,
|
|
936
|
+
* `'baked'` freezes loader output into the bundle at build time. */
|
|
937
|
+
export type RouteDataMode = 'live' | 'baked';
|
|
928
938
|
/** Output of `deriveRouteManifest` — `screens` feeds `registerScreens`
|
|
929
939
|
* (native pushRoute + web outlet fallback), `routes` feeds web URL
|
|
930
940
|
* matching, `layouts` catalogs `_layout` files by directory ('' = root). */
|
|
@@ -933,6 +943,10 @@ export interface RouteManifest {
|
|
|
933
943
|
routes: RouteMeta[];
|
|
934
944
|
layouts: Record<string, any>;
|
|
935
945
|
loaders?: Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>>;
|
|
946
|
+
/** Build-time loader output for `dataMode: 'baked'` routes — the
|
|
947
|
+
* generated `routes.gen.*` glue assigns it from `routes.gen.data`;
|
|
948
|
+
* programmatic hosts pass it on `RouteSpecSet`/`addRoutes` directly. */
|
|
949
|
+
baked?: Record<string, unknown>;
|
|
936
950
|
}
|
|
937
951
|
/** One programmatic route entry for `defineRoutes` — the manifest fields a
|
|
938
952
|
* route file would have produced, supplied directly. `path` uses the
|
|
@@ -944,6 +958,7 @@ export interface RouteSpec {
|
|
|
944
958
|
/** Default presentation, like a `+modal`/`+fade` filename suffix. */
|
|
945
959
|
presentation?: 'push' | 'modal' | 'fade';
|
|
946
960
|
loader?: RouteMeta['loader'];
|
|
961
|
+
dataMode?: RouteDataMode;
|
|
947
962
|
beforeLoad?: BeforeLoad;
|
|
948
963
|
head?: RouteHeadExport;
|
|
949
964
|
/** Diagnostics label recorded on `RouteMeta.file` (warn strings). */
|
|
@@ -951,11 +966,103 @@ export interface RouteSpec {
|
|
|
951
966
|
}
|
|
952
967
|
/** Input to `defineRoutes`: the route list plus optional path-keyed layouts
|
|
953
968
|
* — `layouts: { docs: Shell }` plays the `_layout.tsrx` role for every
|
|
954
|
-
* route under `docs/*`.
|
|
969
|
+
* route under `docs/*`. `baked` carries build-time data for
|
|
970
|
+
* `dataMode: 'baked'` specs — the host computes it (a content dir read, a
|
|
971
|
+
* build step) and ships it in the manifest. */
|
|
955
972
|
export interface RouteSpecSet {
|
|
956
973
|
routes: readonly RouteSpec[];
|
|
957
974
|
layouts?: Record<string, any>;
|
|
975
|
+
baked?: Record<string, unknown>;
|
|
976
|
+
}
|
|
977
|
+
/** The host-consumable route schema — what `xplat routes` writes to
|
|
978
|
+
* `routes.gen.manifest.json` and `manifestToJson` produces from any
|
|
979
|
+
* RouteManifest. Same shape whether the routes came from the file dir
|
|
980
|
+
* or `defineRoutes`, so an external host (e.g. a web SSR tier) consumes
|
|
981
|
+
* one normalized list. `loader`/`guard`/`head` are presence flags — the
|
|
982
|
+
* functions don't cross the JSON boundary. */
|
|
983
|
+
export interface RouteManifestJson {
|
|
984
|
+
version: 1;
|
|
985
|
+
/** Layout dirs present, '' = the root `_layout` — sorted. */
|
|
986
|
+
layouts: string[];
|
|
987
|
+
/** Registered screen names, including any without a URL pattern. */
|
|
988
|
+
screens: string[];
|
|
989
|
+
routes: RouteJson[];
|
|
990
|
+
}
|
|
991
|
+
export interface RouteJson {
|
|
992
|
+
name: string;
|
|
993
|
+
/** Colon-syntax path — 'docs/:slug', '' for the root index. */
|
|
994
|
+
path: string;
|
|
995
|
+
params: string[];
|
|
996
|
+
presentation?: 'push' | 'modal' | 'fade';
|
|
997
|
+
dataMode?: RouteDataMode;
|
|
998
|
+
/** Layout dirs applying to this route, root '' first, innermost last. */
|
|
999
|
+
layouts: string[];
|
|
1000
|
+
/** Source label — file path or `programmatic:<path>`. */
|
|
1001
|
+
source: string;
|
|
1002
|
+
loader: boolean;
|
|
1003
|
+
guard: boolean;
|
|
1004
|
+
head: boolean;
|
|
1005
|
+
}
|
|
1006
|
+
/** Phantom key carrying a `defineRoutes` manifest's spec-derived route
|
|
1007
|
+
* types — type-level only, never present at runtime. Module-private so the
|
|
1008
|
+
* published declarations carry no value binding for it. */
|
|
1009
|
+
declare const specRouteTypes: unique symbol;
|
|
1010
|
+
/** ':id' or '[id]' segment → 'id'; a static segment contributes nothing. */
|
|
1011
|
+
type RouteParamOf<S extends string> = S extends `:${infer P}` ? P : S extends `[${infer P}]` ? P : never;
|
|
1012
|
+
type TrimSlashes<P extends string> = P extends `/${infer R}` ? TrimSlashes<R> : P extends `${infer R}/` ? TrimSlashes<R> : P;
|
|
1013
|
+
/** Route-dir vocabulary at the type level: '[id]' normalizes to ':id'. */
|
|
1014
|
+
type NormSegment<S extends string> = S extends `[${infer P}]` ? `:${P}` : S;
|
|
1015
|
+
type NormPath<P extends string> = P extends `${infer Head}/${infer Tail}` ? `${NormSegment<Head>}/${NormPath<Tail>}` : NormSegment<P>;
|
|
1016
|
+
/** The route name a spec `path` produces — `''`/`'index'` and a trailing
|
|
1017
|
+
* 'index' segment normalize like `specSegments` does at runtime. */
|
|
1018
|
+
export type RouteNameOfPath<P extends string> = NormPath<TrimSlashes<P>> extends infer N extends string ? N extends '' | 'index' ? 'index' : N extends `${infer R}/index` ? R : N : never;
|
|
1019
|
+
/** Param names in a spec path — `'docs/[slug]'` and `'docs/:slug'` both
|
|
1020
|
+
* give `'slug'`; static-only paths give `never`. */
|
|
1021
|
+
export type RoutePathParams<Path extends string> = TrimSlashes<Path> extends infer P extends string ? P extends `${infer Head}/${infer Tail}` ? RouteParamOf<Head> | RoutePathParams<Tail> : RouteParamOf<P> : never;
|
|
1022
|
+
type RouteParamRecord<Path extends string> = {
|
|
1023
|
+
[K in RoutePathParams<Path>]: string;
|
|
1024
|
+
};
|
|
1025
|
+
type SpecPaths<Specs extends readonly RouteSpec[]> = Specs[number] extends infer S ? S extends {
|
|
1026
|
+
path: infer P extends string;
|
|
1027
|
+
} ? P : never : never;
|
|
1028
|
+
type SpecsToParamMap<P extends string> = P extends string ? {
|
|
1029
|
+
[N in RouteNameOfPath<P>]: RouteParamRecord<P>;
|
|
1030
|
+
} : never;
|
|
1031
|
+
type UnionToIntersection<U> = (U extends unknown ? (value: U) => void : never) extends (value: infer I) => void ? I : never;
|
|
1032
|
+
/** name → params map for a spec list — same shape `routes.gen.types.ts`
|
|
1033
|
+
* emits for file routes, so the two merge with `&`/`|`. */
|
|
1034
|
+
export type RouteParamsFromSpecs<Specs extends readonly RouteSpec[]> = UnionToIntersection<SpecsToParamMap<SpecPaths<Specs>>>;
|
|
1035
|
+
type SpecPresentations<S> = S extends {
|
|
1036
|
+
path: infer P extends string;
|
|
1037
|
+
presentation: infer Pr;
|
|
1038
|
+
} ? {
|
|
1039
|
+
[N in RouteNameOfPath<P>]: Pr;
|
|
1040
|
+
} : {};
|
|
1041
|
+
export type RoutePresentationsFromSpecs<Specs extends readonly RouteSpec[]> = UnionToIntersection<SpecPresentations<Specs[number]>>;
|
|
1042
|
+
/** The spec-derived typing record `defineRoutes` brands onto its manifest
|
|
1043
|
+
* return — read it with the `ManifestRoute*` helpers, never directly. */
|
|
1044
|
+
export interface SpecRouteInfo<Specs extends readonly RouteSpec[]> {
|
|
1045
|
+
readonly [specRouteTypes]: {
|
|
1046
|
+
params: RouteParamsFromSpecs<Specs>;
|
|
1047
|
+
presentations: RoutePresentationsFromSpecs<Specs>;
|
|
1048
|
+
};
|
|
958
1049
|
}
|
|
1050
|
+
/** Pull the `{name: params}` map out of a `defineRoutes` manifest's type —
|
|
1051
|
+
* `RouteParams & ManifestRouteParams<typeof manifest>` merges file and
|
|
1052
|
+
* programmatic routes into one typed navigation surface. A plain
|
|
1053
|
+
* `RouteManifest` (untagged) extracts to `{}`, so `ManifestRouteNames`
|
|
1054
|
+
* is `never` and unions degrade to the file-derived names. */
|
|
1055
|
+
export type ManifestRouteParams<M> = M extends {
|
|
1056
|
+
readonly [specRouteTypes]: {
|
|
1057
|
+
params: infer P;
|
|
1058
|
+
};
|
|
1059
|
+
} ? P : {};
|
|
1060
|
+
export type ManifestRouteNames<M> = keyof ManifestRouteParams<M> & string;
|
|
1061
|
+
export type ManifestRoutePresentations<M> = M extends {
|
|
1062
|
+
readonly [specRouteTypes]: {
|
|
1063
|
+
presentations: infer P;
|
|
1064
|
+
};
|
|
1065
|
+
} ? P : {};
|
|
959
1066
|
export interface OpenWindowOptions {
|
|
960
1067
|
/** Data made available to the native window content resolver. */
|
|
961
1068
|
data?: Record<string, unknown>;
|
|
@@ -1624,3 +1731,4 @@ export interface ReadableStore<T> {
|
|
|
1624
1731
|
export interface Store<T> extends ReadableStore<T> {
|
|
1625
1732
|
set(next: T | ((prev: T) => T)): void;
|
|
1626
1733
|
}
|
|
1734
|
+
export {};
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* platform's file and is skipped entirely; unsuffixed files are the
|
|
30
30
|
* fallback (rank = prefer.length). Web callers pass ['web']; mobile
|
|
31
31
|
* callers pass the running OS first. */
|
|
32
|
-
import type { Route, RouteManifest, RouteMeta, RouteSpec, RouteSpecSet } from './props.js';
|
|
32
|
+
import type { Route, RouteManifest, RouteManifestJson, RouteMeta, RouteSpec, RouteSpecSet, SpecRouteInfo } from './props.js';
|
|
33
33
|
/** Internal error carrier used by the public `redirect()` helper. Keeping
|
|
34
34
|
* this in the shared route table gives both platform leaves the same guard
|
|
35
35
|
* behavior without importing a platform runtime. */
|
|
@@ -43,8 +43,15 @@ export declare function deriveRouteManifest(files: Record<string, any>, prefer:
|
|
|
43
43
|
* from their own sources, e.g. `readdirSync` over a content dir). Each
|
|
44
44
|
* spec's `path` uses the route-dir vocabulary; `layouts` keys are path
|
|
45
45
|
* prefixes playing the `_layout` role. Same-name duplicates inside the
|
|
46
|
-
* set keep the later entry with a warn, matching merge precedence.
|
|
47
|
-
|
|
46
|
+
* set keep the later entry with a warn, matching merge precedence.
|
|
47
|
+
*
|
|
48
|
+
* The return is branded with the spec-derived route types — read them
|
|
49
|
+
* with `ManifestRouteParams`/`ManifestRouteNames`/
|
|
50
|
+
* `ManifestRoutePresentations` to merge programmatic names into the
|
|
51
|
+
* app's typed navigation surface (`RouteName | …`, `RouteParams & …`). */
|
|
52
|
+
export declare function defineRoutes<const Specs extends readonly RouteSpec[]>(input: Specs | (Omit<RouteSpecSet, 'routes'> & {
|
|
53
|
+
routes: Specs;
|
|
54
|
+
})): RouteManifest & SpecRouteInfo<Specs>;
|
|
48
55
|
/** Compose manifests into one — file-derived base plus any number of
|
|
49
56
|
* programmatic sets (`registerRoutes(mergeRouteManifests(fromDir, dynamic))`).
|
|
50
57
|
* Registration order is precedence: on a same-name collision the later
|
|
@@ -52,6 +59,10 @@ export declare function defineRoutes(input: readonly RouteSpec[] | RouteSpecSet)
|
|
|
52
59
|
* a warn fires once per colliding name. `layouts` merge key-wise the same
|
|
53
60
|
* way. `matchRoute` order is rebuilt by specificity after the merge. */
|
|
54
61
|
export declare function mergeRouteManifests(...manifests: RouteManifest[]): RouteManifest;
|
|
62
|
+
/** Serialize a manifest to the normalized `RouteManifestJson` shape — the
|
|
63
|
+
* same list `xplat routes` emits for file routes, produced here for
|
|
64
|
+
* programmatic/merged manifests so hosts consume one schema. */
|
|
65
|
+
export declare function manifestToJson(manifest: RouteManifest): RouteManifestJson;
|
|
55
66
|
/** Match URL path segments against a manifest — returns the winning meta
|
|
56
67
|
* plus extracted params, or null. First hit wins (routes are pre-sorted
|
|
57
68
|
* by specificity). */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SVGView } from './vendor/ui-svg/index.js';
|
|
1
|
+
import { SVGView } from './vendor/ui-svg/src/index.js';
|
|
2
2
|
import type { IconGlyph } from './props.js';
|
|
3
3
|
declare module '@nativescript-community/octane/intrinsics' {
|
|
4
4
|
interface NativeScriptElements {
|
|
5
|
-
svgview: Omit<Attributes<typeof SVGView>, 'src'> & {
|
|
5
|
+
svgview: Omit<import('@nativescript-community/octane/intrinsics').Attributes<typeof SVGView>, 'src'> & {
|
|
6
6
|
/** SVGView awaits promise srcs — remote .svg URLs arrive as fetched markup. */
|
|
7
7
|
src?: string | Promise<string>;
|
|
8
8
|
stretch?: 'none' | 'fill' | 'aspectFit' | 'aspectFill';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Whether a textChange is the synchronous echo of our controlled write. */
|
|
2
|
+
export declare function isWritingText(view: object): boolean;
|
|
3
|
+
/** Controlled `text` write for TextInput/TextArea/SearchInput leaves. The driver's
|
|
2
4
|
* generic prop path writes view.text verbatim; on Android the EditText
|
|
3
5
|
* setText resets the cursor to 0 on every controlled write. Park and
|
|
4
6
|
* restore the selection around the write (clamped to the new length so an
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { ColorScheme } from '../props.js';
|
|
2
|
+
import type { ColorScheme } from '../props.js';
|
|
3
|
+
export declare function getColorScheme(): ColorScheme;
|
|
4
|
+
export declare function subscribeSystemScheme(cb: () => void): () => void;
|
|
5
|
+
export declare function useColorScheme(): ColorScheme;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { VirtualListEntry } from './virtual-list-layout.js';
|
|
2
|
+
export interface VirtualListCell<T> {
|
|
3
|
+
id: number;
|
|
4
|
+
typeKey: string;
|
|
5
|
+
generation: number;
|
|
6
|
+
entry: VirtualListEntry<T> | null;
|
|
7
|
+
rows: readonly VirtualListEntry<T>[];
|
|
8
|
+
}
|
|
9
|
+
/** Reuse physical hosts without retaining an off-window logical row subtree. */
|
|
10
|
+
export declare class VirtualListCellPool<T> {
|
|
11
|
+
private cells;
|
|
12
|
+
private byId;
|
|
13
|
+
private nextId;
|
|
14
|
+
update(entries: readonly VirtualListEntry<T>[]): readonly VirtualListCell<T>[];
|
|
15
|
+
get(id: number): VirtualListCell<T> | undefined;
|
|
16
|
+
isCurrent(id: number, rowKey: string, generation: number): boolean;
|
|
17
|
+
clear(): void;
|
|
18
|
+
}
|
package/types/index.macos.d.ts
CHANGED
|
@@ -67,7 +67,10 @@ export declare const SegmentedControl: Component<P.SegmentedControlProps>
|
|
|
67
67
|
export declare const ScrollBox: Component<P.ScrollViewProps>
|
|
68
68
|
export declare const ScrollView: Component<P.ScrollViewProps>
|
|
69
69
|
/** AppKit fallback with keyed rows and one nonvirtualized scroll view. */
|
|
70
|
-
export declare function VirtualList<T = any>(
|
|
70
|
+
export declare function VirtualList<T = any>(
|
|
71
|
+
props: P.VirtualListProps<T> & { children?: any },
|
|
72
|
+
): unknown
|
|
73
|
+
|
|
71
74
|
export declare const Image: Component<P.ImageProps>
|
|
72
75
|
export declare const WebView: Component<P.WebViewProps>
|
|
73
76
|
export declare const CameraView: Component
|
|
@@ -75,6 +78,7 @@ export declare const Overlay: Component<P.OverlayProps>
|
|
|
75
78
|
export declare const Popover: Component<P.PopoverProps>
|
|
76
79
|
export declare const Hoverable: Component<P.HoverableProps>
|
|
77
80
|
export declare const Tooltip: Component<P.TooltipProps>
|
|
81
|
+
export { Markdown, MarkdownScreen } from './generated/Markdown.js'
|
|
78
82
|
export declare const Sheet: Component<P.SheetProps>
|
|
79
83
|
export declare const Tabs: Component<P.TabsProps>
|
|
80
84
|
export declare const Screen: Component<P.ScreenProps>
|
|
@@ -132,8 +136,16 @@ export declare function addRoutes(manifest: P.RouteManifest): void
|
|
|
132
136
|
export declare function screenFor(name: string): P.ScreenTable[string] | undefined
|
|
133
137
|
export declare function hrefFor(route: P.Route): string
|
|
134
138
|
export declare function layoutsForRoute(name: string): any[]
|
|
135
|
-
export declare function deriveRouteManifest(
|
|
136
|
-
|
|
139
|
+
export declare function deriveRouteManifest(
|
|
140
|
+
files: Record<string, any>,
|
|
141
|
+
prefer: readonly string[],
|
|
142
|
+
dir?: string,
|
|
143
|
+
): P.RouteManifest
|
|
144
|
+
|
|
145
|
+
export declare function defineRoutes(
|
|
146
|
+
input: readonly P.RouteSpec[] | P.RouteSpecSet,
|
|
147
|
+
): P.RouteManifest
|
|
148
|
+
|
|
137
149
|
export declare function mergeRouteManifests(...manifests: P.RouteManifest[]): P.RouteManifest
|
|
138
150
|
export declare function createStore<T>(initial: T): P.Store<T>
|
|
139
151
|
export declare function useStore<T>(store: P.ReadableStore<T>): T
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|