@ankhorage/navigator 1.6.1 → 1.6.2
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/{expo-router/resolveCustomNavigatorPlan.d.ts → features/custom/application/resolveCustomNavigatorAdapterPlan.d.ts} +4 -3
- package/dist/features/custom/application/resolveCustomNavigatorAdapterPlan.d.ts.map +1 -0
- package/dist/{expo-router/resolveCustomNavigatorPlan.js → features/custom/application/resolveCustomNavigatorAdapterPlan.js} +1 -1
- package/dist/features/custom/application/resolveCustomNavigatorAdapterPlan.js.map +1 -0
- package/dist/features/custom/domain/CustomNavigatorConfigIssue.d.ts +6 -0
- package/dist/features/custom/domain/CustomNavigatorConfigIssue.d.ts.map +1 -0
- package/dist/features/custom/domain/CustomNavigatorConfigIssue.js +2 -0
- package/dist/features/custom/domain/CustomNavigatorConfigIssue.js.map +1 -0
- package/dist/features/custom/domain/CustomNavigatorRegistration.d.ts +15 -0
- package/dist/features/custom/domain/CustomNavigatorRegistration.d.ts.map +1 -0
- package/dist/features/custom/domain/CustomNavigatorRegistration.js +2 -0
- package/dist/features/custom/domain/CustomNavigatorRegistration.js.map +1 -0
- package/dist/features/custom/domain/CustomNavigatorRegistry.d.ts +7 -0
- package/dist/features/custom/domain/CustomNavigatorRegistry.d.ts.map +1 -0
- package/dist/features/custom/domain/CustomNavigatorRegistry.js +2 -0
- package/dist/features/custom/domain/CustomNavigatorRegistry.js.map +1 -0
- package/dist/{validation/validateCustomNavigator.d.ts → features/custom/domain/addCustomNavigatorDiagnostics.d.ts} +4 -3
- package/dist/features/custom/domain/addCustomNavigatorDiagnostics.d.ts.map +1 -0
- package/dist/{validation/validateCustomNavigator.js → features/custom/domain/addCustomNavigatorDiagnostics.js} +50 -50
- package/dist/features/custom/domain/addCustomNavigatorDiagnostics.js.map +1 -0
- package/dist/features/custom/domain/defineCustomNavigatorRegistry.d.ts +5 -0
- package/dist/features/custom/domain/defineCustomNavigatorRegistry.d.ts.map +1 -0
- package/dist/{custom/CustomNavigatorRegistry.js → features/custom/domain/defineCustomNavigatorRegistry.js} +4 -4
- package/dist/features/custom/domain/defineCustomNavigatorRegistry.js.map +1 -0
- package/dist/features/drawer/adapters/outbound/resolveDrawerRouteOptions.d.ts +4 -0
- package/dist/features/drawer/adapters/outbound/resolveDrawerRouteOptions.d.ts.map +1 -0
- package/dist/features/drawer/adapters/outbound/resolveDrawerRouteOptions.js +8 -0
- package/dist/features/drawer/adapters/outbound/resolveDrawerRouteOptions.js.map +1 -0
- package/dist/features/drawer/application/createDrawerAdapter.d.ts +4 -0
- package/dist/features/drawer/application/createDrawerAdapter.d.ts.map +1 -0
- package/dist/features/drawer/application/createDrawerAdapter.js +12 -0
- package/dist/features/drawer/application/createDrawerAdapter.js.map +1 -0
- package/dist/features/slot/adapters/outbound/generateSlotLayoutFile.d.ts +4 -0
- package/dist/features/slot/adapters/outbound/generateSlotLayoutFile.d.ts.map +1 -0
- package/dist/features/slot/adapters/outbound/generateSlotLayoutFile.js +8 -0
- package/dist/features/slot/adapters/outbound/generateSlotLayoutFile.js.map +1 -0
- package/dist/features/slot/application/createSlotAdapter.d.ts +4 -0
- package/dist/features/slot/application/createSlotAdapter.d.ts.map +1 -0
- package/dist/features/slot/application/createSlotAdapter.js +12 -0
- package/dist/features/slot/application/createSlotAdapter.js.map +1 -0
- package/dist/features/slot/domain/addSlotDiagnostics.d.ts +5 -0
- package/dist/features/slot/domain/addSlotDiagnostics.d.ts.map +1 -0
- package/dist/features/slot/domain/addSlotDiagnostics.js +24 -0
- package/dist/features/slot/domain/addSlotDiagnostics.js.map +1 -0
- package/dist/features/split-view/adapters/outbound/generateSplitViewLayoutFile.d.ts +6 -0
- package/dist/features/split-view/adapters/outbound/generateSplitViewLayoutFile.d.ts.map +1 -0
- package/dist/{generation → features/split-view/adapters/outbound}/generateSplitViewLayoutFile.js +37 -35
- package/dist/features/split-view/adapters/outbound/generateSplitViewLayoutFile.js.map +1 -0
- package/dist/{expo-router/resolveSplitViewNavigatorPlan.d.ts → features/split-view/application/resolveSplitViewAdapterPlan.d.ts} +3 -2
- package/dist/features/split-view/application/resolveSplitViewAdapterPlan.d.ts.map +1 -0
- package/dist/{expo-router/resolveSplitViewNavigatorPlan.js → features/split-view/application/resolveSplitViewAdapterPlan.js} +1 -1
- package/dist/features/split-view/application/resolveSplitViewAdapterPlan.js.map +1 -0
- package/dist/{validation/validateSplitView.d.ts → features/split-view/domain/addSplitViewDiagnostics.d.ts} +3 -2
- package/dist/features/split-view/domain/addSplitViewDiagnostics.d.ts.map +1 -0
- package/dist/{validation/validateSplitView.js → features/split-view/domain/addSplitViewDiagnostics.js} +76 -76
- package/dist/features/split-view/domain/addSplitViewDiagnostics.js.map +1 -0
- package/dist/features/stack/application/createStackAdapter.d.ts +6 -0
- package/dist/features/stack/application/createStackAdapter.d.ts.map +1 -0
- package/dist/features/stack/application/createStackAdapter.js +43 -0
- package/dist/features/stack/application/createStackAdapter.js.map +1 -0
- package/dist/features/stack/domain/ResolvedStackConfigSource.d.ts +6 -0
- package/dist/features/stack/domain/ResolvedStackConfigSource.d.ts.map +1 -0
- package/dist/features/stack/domain/ResolvedStackConfigSource.js +2 -0
- package/dist/features/stack/domain/ResolvedStackConfigSource.js.map +1 -0
- package/dist/{validation/validateExperimentalStack.d.ts → features/stack/domain/addExperimentalStackDiagnostics.d.ts} +3 -2
- package/dist/features/stack/domain/addExperimentalStackDiagnostics.d.ts.map +1 -0
- package/dist/{validation/validateExperimentalStack.js → features/stack/domain/addExperimentalStackDiagnostics.js} +49 -49
- package/dist/features/stack/domain/addExperimentalStackDiagnostics.js.map +1 -0
- package/dist/features/stack/domain/addStackAdapterDiagnostics.d.ts +6 -0
- package/dist/features/stack/domain/addStackAdapterDiagnostics.d.ts.map +1 -0
- package/dist/features/stack/domain/addStackAdapterDiagnostics.js +15 -0
- package/dist/features/stack/domain/addStackAdapterDiagnostics.js.map +1 -0
- package/dist/features/stack/domain/resolveEffectiveStackConfig.d.ts +5 -0
- package/dist/features/stack/domain/resolveEffectiveStackConfig.d.ts.map +1 -0
- package/dist/features/stack/domain/resolveEffectiveStackConfig.js +6 -0
- package/dist/features/stack/domain/resolveEffectiveStackConfig.js.map +1 -0
- package/dist/features/stack/domain/resolveEffectiveStackConfigSource.d.ts +6 -0
- package/dist/features/stack/domain/resolveEffectiveStackConfigSource.d.ts.map +1 -0
- package/dist/{expo-router/resolveNavigatorConfig.js → features/stack/domain/resolveEffectiveStackConfigSource.js} +20 -46
- package/dist/features/stack/domain/resolveEffectiveStackConfigSource.js.map +1 -0
- package/dist/features/stack/domain/validateStackRouteOptions.d.ts +5 -0
- package/dist/features/stack/domain/validateStackRouteOptions.d.ts.map +1 -0
- package/dist/features/stack/domain/validateStackRouteOptions.js +25 -0
- package/dist/features/stack/domain/validateStackRouteOptions.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsIconSourceResolver.d.ts +11 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsIconSourceResolver.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsIconSourceResolver.js +2 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsIconSourceResolver.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsLayout.d.ts +4 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsLayout.d.ts.map +1 -0
- package/dist/{tabs → features/tabs/adapters/inbound}/CustomTabsLayout.js +62 -61
- package/dist/features/tabs/adapters/inbound/CustomTabsLayout.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsLayoutProps.d.ts +18 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsLayoutProps.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsLayoutProps.js +2 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsLayoutProps.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsPresentationProps.d.ts +7 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsPresentationProps.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsPresentationProps.js +2 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsPresentationProps.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsRoute.d.ts +12 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsRoute.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsRoute.js +2 -0
- package/dist/features/tabs/adapters/inbound/CustomTabsRoute.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesome5Family.d.ts +4 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesome5Family.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesome5Family.js +9 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesome5Family.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesome6Family.d.ts +4 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesome6Family.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesome6Family.js +9 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesome6Family.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesomeFamily.d.ts +4 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesomeFamily.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesomeFamily.js +4 -0
- package/dist/features/tabs/adapters/inbound/NativeFontAwesomeFamily.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeIoniconsFamily.d.ts +4 -0
- package/dist/features/tabs/adapters/inbound/NativeIoniconsFamily.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeIoniconsFamily.js +4 -0
- package/dist/features/tabs/adapters/inbound/NativeIoniconsFamily.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeMaterialDesignIconsFamily.d.ts +4 -0
- package/dist/features/tabs/adapters/inbound/NativeMaterialDesignIconsFamily.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeMaterialDesignIconsFamily.js +4 -0
- package/dist/features/tabs/adapters/inbound/NativeMaterialDesignIconsFamily.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeVectorIconFamily.d.ts +5 -0
- package/dist/features/tabs/adapters/inbound/NativeVectorIconFamily.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/NativeVectorIconFamily.js +2 -0
- package/dist/features/tabs/adapters/inbound/NativeVectorIconFamily.js.map +1 -0
- package/dist/features/tabs/adapters/outbound/generateTabsLayoutFile.d.ts +6 -0
- package/dist/features/tabs/adapters/outbound/generateTabsLayoutFile.d.ts.map +1 -0
- package/dist/{generation → features/tabs/adapters/outbound}/generateTabsLayoutFile.js +86 -83
- package/dist/features/tabs/adapters/outbound/generateTabsLayoutFile.js.map +1 -0
- package/dist/features/tabs/application/createTabsAdapter.d.ts +6 -0
- package/dist/features/tabs/application/createTabsAdapter.d.ts.map +1 -0
- package/dist/features/tabs/application/createTabsAdapter.js +18 -0
- package/dist/features/tabs/application/createTabsAdapter.js.map +1 -0
- package/dist/{expo-router → features/tabs/application}/resolveTabsNavigatorPlan.d.ts +3 -1
- package/dist/features/tabs/application/resolveTabsNavigatorPlan.d.ts.map +1 -0
- package/dist/{expo-router → features/tabs/application}/resolveTabsNavigatorPlan.js +41 -41
- package/dist/features/tabs/application/resolveTabsNavigatorPlan.js.map +1 -0
- package/dist/features/tabs/application/resolveTabsPlan.d.ts +7 -0
- package/dist/features/tabs/application/resolveTabsPlan.d.ts.map +1 -0
- package/dist/features/tabs/application/resolveTabsPlan.js +14 -0
- package/dist/features/tabs/application/resolveTabsPlan.js.map +1 -0
- package/dist/features/tabs/domain/ResolvedCustomTabsPresentation.d.ts +6 -0
- package/dist/features/tabs/domain/ResolvedCustomTabsPresentation.d.ts.map +1 -0
- package/dist/features/tabs/domain/ResolvedCustomTabsPresentation.js +2 -0
- package/dist/features/tabs/domain/ResolvedCustomTabsPresentation.js.map +1 -0
- package/dist/features/tabs/domain/ResolvedTabsImplementation.d.ts +2 -0
- package/dist/features/tabs/domain/ResolvedTabsImplementation.d.ts.map +1 -0
- package/dist/features/tabs/domain/ResolvedTabsImplementation.js +2 -0
- package/dist/features/tabs/domain/ResolvedTabsImplementation.js.map +1 -0
- package/dist/features/tabs/domain/ResolvedTabsPresentation.d.ts +2 -0
- package/dist/features/tabs/domain/ResolvedTabsPresentation.d.ts.map +1 -0
- package/dist/features/tabs/domain/ResolvedTabsPresentation.js +2 -0
- package/dist/features/tabs/domain/ResolvedTabsPresentation.js.map +1 -0
- package/dist/features/tabs/domain/TabsNavigatorPlan.d.ts +23 -0
- package/dist/features/tabs/domain/TabsNavigatorPlan.d.ts.map +1 -0
- package/dist/features/tabs/domain/TabsNavigatorPlan.js +2 -0
- package/dist/features/tabs/domain/TabsNavigatorPlan.js.map +1 -0
- package/dist/{validation/validateTabsNavigator.d.ts → features/tabs/domain/addTabsAdapterDiagnostics.d.ts} +3 -2
- package/dist/features/tabs/domain/addTabsAdapterDiagnostics.d.ts.map +1 -0
- package/dist/{validation/validateTabsNavigator.js → features/tabs/domain/addTabsAdapterDiagnostics.js} +47 -47
- package/dist/features/tabs/domain/addTabsAdapterDiagnostics.js.map +1 -0
- package/dist/{presentation → features/tabs/domain}/resolveCustomTabsPresentation.d.ts +2 -5
- package/dist/features/tabs/domain/resolveCustomTabsPresentation.d.ts.map +1 -0
- package/dist/{presentation → features/tabs/domain}/resolveCustomTabsPresentation.js +16 -16
- package/dist/features/tabs/domain/resolveCustomTabsPresentation.js.map +1 -0
- package/dist/features/tabs/domain/resolveEffectiveTabsConfig.d.ts +5 -0
- package/dist/features/tabs/domain/resolveEffectiveTabsConfig.d.ts.map +1 -0
- package/dist/features/tabs/domain/resolveEffectiveTabsConfig.js +24 -0
- package/dist/features/tabs/domain/resolveEffectiveTabsConfig.js.map +1 -0
- package/dist/features/tabs/nativeIcons.d.ts +6 -0
- package/dist/features/tabs/nativeIcons.d.ts.map +1 -0
- package/dist/features/tabs/nativeIcons.js +6 -0
- package/dist/features/tabs/nativeIcons.js.map +1 -0
- package/dist/features/tabs/tabs.d.ts +7 -0
- package/dist/features/tabs/tabs.d.ts.map +1 -0
- package/dist/features/tabs/tabs.js +2 -0
- package/dist/features/tabs/tabs.js.map +1 -0
- package/dist/navigator.d.ts +33 -0
- package/dist/navigator.d.ts.map +1 -0
- package/dist/navigator.js +8 -0
- package/dist/navigator.js.map +1 -0
- package/dist/utils/CreateNavigatorPlanOptions.d.ts +10 -0
- package/dist/utils/CreateNavigatorPlanOptions.d.ts.map +1 -0
- package/dist/utils/CreateNavigatorPlanOptions.js +2 -0
- package/dist/utils/CreateNavigatorPlanOptions.js.map +1 -0
- package/dist/utils/ExpoRouterNavigatorModule.d.ts +2 -0
- package/dist/utils/ExpoRouterNavigatorModule.d.ts.map +1 -0
- package/dist/utils/ExpoRouterNavigatorModule.js +2 -0
- package/dist/utils/ExpoRouterNavigatorModule.js.map +1 -0
- package/dist/{metadata/index.d.ts → utils/NAVIGATOR_PACKAGE_METADATA.d.ts} +1 -1
- package/dist/utils/NAVIGATOR_PACKAGE_METADATA.d.ts.map +1 -0
- package/dist/{metadata/index.js → utils/NAVIGATOR_PACKAGE_METADATA.js} +1 -1
- package/dist/utils/NAVIGATOR_PACKAGE_METADATA.js.map +1 -0
- package/dist/utils/NavigatorAdapterId.d.ts +2 -0
- package/dist/utils/NavigatorAdapterId.d.ts.map +1 -0
- package/dist/utils/NavigatorAdapterId.js +2 -0
- package/dist/utils/NavigatorAdapterId.js.map +1 -0
- package/dist/utils/NavigatorAdapterPlan.d.ts +13 -0
- package/dist/utils/NavigatorAdapterPlan.d.ts.map +1 -0
- package/dist/utils/NavigatorAdapterPlan.js +2 -0
- package/dist/utils/NavigatorAdapterPlan.js.map +1 -0
- package/dist/utils/NavigatorApiStability.d.ts +2 -0
- package/dist/utils/NavigatorApiStability.d.ts.map +1 -0
- package/dist/utils/NavigatorApiStability.js +2 -0
- package/dist/utils/NavigatorApiStability.js.map +1 -0
- package/dist/utils/NavigatorDiagnostic.d.ts +7 -0
- package/dist/utils/NavigatorDiagnostic.d.ts.map +1 -0
- package/dist/utils/NavigatorDiagnostic.js +2 -0
- package/dist/utils/NavigatorDiagnostic.js.map +1 -0
- package/dist/utils/NavigatorGeneratedFile.d.ts +5 -0
- package/dist/utils/NavigatorGeneratedFile.d.ts.map +1 -0
- package/dist/utils/NavigatorGeneratedFile.js +2 -0
- package/dist/utils/NavigatorGeneratedFile.js.map +1 -0
- package/dist/utils/NavigatorGenerationBindings.d.ts +12 -0
- package/dist/utils/NavigatorGenerationBindings.d.ts.map +1 -0
- package/dist/utils/NavigatorGenerationBindings.js +2 -0
- package/dist/utils/NavigatorGenerationBindings.js.map +1 -0
- package/dist/utils/NavigatorGenerationOptions.d.ts +8 -0
- package/dist/utils/NavigatorGenerationOptions.d.ts.map +1 -0
- package/dist/utils/NavigatorGenerationOptions.js +2 -0
- package/dist/utils/NavigatorGenerationOptions.js.map +1 -0
- package/dist/utils/NavigatorNodePlan.d.ts +32 -0
- package/dist/utils/NavigatorNodePlan.d.ts.map +1 -0
- package/dist/utils/NavigatorNodePlan.js +2 -0
- package/dist/utils/NavigatorNodePlan.js.map +1 -0
- package/dist/utils/NavigatorPlan.d.ts +14 -0
- package/dist/utils/NavigatorPlan.d.ts.map +1 -0
- package/dist/utils/NavigatorPlan.js.map +1 -0
- package/dist/utils/NavigatorResponsiveSize.d.ts +2 -0
- package/dist/utils/NavigatorResponsiveSize.d.ts.map +1 -0
- package/dist/utils/NavigatorResponsiveSize.js +2 -0
- package/dist/utils/NavigatorResponsiveSize.js.map +1 -0
- package/dist/utils/NavigatorRoutePlan.d.ts +14 -0
- package/dist/utils/NavigatorRoutePlan.d.ts.map +1 -0
- package/dist/utils/NavigatorRoutePlan.js +2 -0
- package/dist/utils/NavigatorRoutePlan.js.map +1 -0
- package/dist/utils/NavigatorRuntimePlatform.d.ts +2 -0
- package/dist/utils/NavigatorRuntimePlatform.d.ts.map +1 -0
- package/dist/utils/NavigatorRuntimePlatform.js +2 -0
- package/dist/utils/NavigatorRuntimePlatform.js.map +1 -0
- package/dist/utils/NavigatorScreenModule.d.ts +5 -0
- package/dist/utils/NavigatorScreenModule.d.ts.map +1 -0
- package/dist/utils/NavigatorScreenModule.js +2 -0
- package/dist/utils/NavigatorScreenModule.js.map +1 -0
- package/dist/utils/NavigatorSupportStatus.d.ts +2 -0
- package/dist/utils/NavigatorSupportStatus.d.ts.map +1 -0
- package/dist/utils/NavigatorSupportStatus.js +2 -0
- package/dist/utils/NavigatorSupportStatus.js.map +1 -0
- package/dist/utils/NavigatorValidationContext.d.ts +6 -0
- package/dist/utils/NavigatorValidationContext.d.ts.map +1 -0
- package/dist/utils/NavigatorValidationContext.js +2 -0
- package/dist/utils/NavigatorValidationContext.js.map +1 -0
- package/dist/utils/assertModuleBinding.d.ts +4 -0
- package/dist/utils/assertModuleBinding.d.ts.map +1 -0
- package/dist/utils/assertModuleBinding.js +14 -0
- package/dist/utils/assertModuleBinding.js.map +1 -0
- package/dist/utils/createNavigatorPlan.d.ts +6 -0
- package/dist/utils/createNavigatorPlan.d.ts.map +1 -0
- package/dist/{expo-router → utils}/createNavigatorPlan.js +67 -140
- package/dist/utils/createNavigatorPlan.js.map +1 -0
- package/dist/utils/generateNavigatorFiles.d.ts +7 -0
- package/dist/utils/generateNavigatorFiles.d.ts.map +1 -0
- package/dist/{generation → utils}/generateNavigatorFiles.js +155 -147
- package/dist/utils/generateNavigatorFiles.js.map +1 -0
- package/dist/utils/parseExpoRouterMajor.d.ts +3 -0
- package/dist/utils/parseExpoRouterMajor.d.ts.map +1 -0
- package/dist/utils/parseExpoRouterMajor.js +6 -0
- package/dist/utils/parseExpoRouterMajor.js.map +1 -0
- package/dist/utils/quote.d.ts +3 -0
- package/dist/utils/quote.d.ts.map +1 -0
- package/dist/utils/quote.js +18 -0
- package/dist/utils/quote.js.map +1 -0
- package/dist/utils/quoteJsxAttribute.d.ts +3 -0
- package/dist/utils/quoteJsxAttribute.d.ts.map +1 -0
- package/dist/utils/quoteJsxAttribute.js +5 -0
- package/dist/utils/quoteJsxAttribute.js.map +1 -0
- package/dist/utils/resolveNavigatorPreset.d.ts.map +1 -0
- package/dist/utils/resolveNavigatorPreset.js.map +1 -0
- package/dist/utils/sourceLiteral.d.ts +3 -0
- package/dist/utils/sourceLiteral.d.ts.map +1 -0
- package/dist/utils/sourceLiteral.js +21 -0
- package/dist/utils/sourceLiteral.js.map +1 -0
- package/dist/{validation → utils}/validateNavigatorManifest.d.ts +3 -2
- package/dist/utils/validateNavigatorManifest.d.ts.map +1 -0
- package/dist/{validation → utils}/validateNavigatorManifest.js +53 -92
- package/dist/utils/validateNavigatorManifest.js.map +1 -0
- package/dist/{validation → utils}/validatePresetTopology.d.ts +1 -1
- package/dist/utils/validatePresetTopology.d.ts.map +1 -0
- package/dist/{validation → utils}/validatePresetTopology.js +1 -1
- package/dist/utils/validatePresetTopology.js.map +1 -0
- package/package.json +12 -12
- package/dist/custom/CustomNavigatorRegistry.d.ts +0 -25
- package/dist/custom/CustomNavigatorRegistry.d.ts.map +0 -1
- package/dist/custom/CustomNavigatorRegistry.js.map +0 -1
- package/dist/definitions/NavigatorPlan.d.ts +0 -119
- package/dist/definitions/NavigatorPlan.d.ts.map +0 -1
- package/dist/definitions/NavigatorPlan.js.map +0 -1
- package/dist/expo-router/createNavigatorPlan.d.ts +0 -12
- package/dist/expo-router/createNavigatorPlan.d.ts.map +0 -1
- package/dist/expo-router/createNavigatorPlan.js.map +0 -1
- package/dist/expo-router/resolveCustomNavigatorPlan.d.ts.map +0 -1
- package/dist/expo-router/resolveCustomNavigatorPlan.js.map +0 -1
- package/dist/expo-router/resolveNavigatorConfig.d.ts +0 -13
- package/dist/expo-router/resolveNavigatorConfig.d.ts.map +0 -1
- package/dist/expo-router/resolveNavigatorConfig.js.map +0 -1
- package/dist/expo-router/resolveSplitViewNavigatorPlan.d.ts.map +0 -1
- package/dist/expo-router/resolveSplitViewNavigatorPlan.js.map +0 -1
- package/dist/expo-router/resolveTabsNavigatorPlan.d.ts.map +0 -1
- package/dist/expo-router/resolveTabsNavigatorPlan.js.map +0 -1
- package/dist/generation/generateNavigatorFiles.d.ts +0 -4
- package/dist/generation/generateNavigatorFiles.d.ts.map +0 -1
- package/dist/generation/generateNavigatorFiles.js.map +0 -1
- package/dist/generation/generateSplitViewLayoutFile.d.ts +0 -4
- package/dist/generation/generateSplitViewLayoutFile.d.ts.map +0 -1
- package/dist/generation/generateSplitViewLayoutFile.js.map +0 -1
- package/dist/generation/generateTabsLayoutFile.d.ts +0 -4
- package/dist/generation/generateTabsLayoutFile.d.ts.map +0 -1
- package/dist/generation/generateTabsLayoutFile.js.map +0 -1
- package/dist/generation/generationSafety.d.ts +0 -10
- package/dist/generation/generationSafety.d.ts.map +0 -1
- package/dist/generation/generationSafety.js +0 -54
- package/dist/generation/generationSafety.js.map +0 -1
- package/dist/index.d.ts +0 -12
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +0 -1
- package/dist/metadata/index.d.ts.map +0 -1
- package/dist/metadata/index.js.map +0 -1
- package/dist/presentation/resolveCustomTabsPresentation.d.ts.map +0 -1
- package/dist/presentation/resolveCustomTabsPresentation.js.map +0 -1
- package/dist/tabs/CustomTabsLayout.d.ts +0 -39
- package/dist/tabs/CustomTabsLayout.d.ts.map +0 -1
- package/dist/tabs/CustomTabsLayout.js.map +0 -1
- package/dist/tabs/index.d.ts +0 -3
- package/dist/tabs/index.d.ts.map +0 -1
- package/dist/tabs/index.js +0 -2
- package/dist/tabs/index.js.map +0 -1
- package/dist/tabs/nativeIconFamilies.d.ts +0 -16
- package/dist/tabs/nativeIconFamilies.d.ts.map +0 -1
- package/dist/tabs/nativeIconFamilies.js +0 -24
- package/dist/tabs/nativeIconFamilies.js.map +0 -1
- package/dist/topology/resolveNavigatorPreset.d.ts.map +0 -1
- package/dist/topology/resolveNavigatorPreset.js.map +0 -1
- package/dist/validation/validateCustomNavigator.d.ts.map +0 -1
- package/dist/validation/validateCustomNavigator.js.map +0 -1
- package/dist/validation/validateExperimentalStack.d.ts.map +0 -1
- package/dist/validation/validateExperimentalStack.js.map +0 -1
- package/dist/validation/validateNavigatorManifest.d.ts.map +0 -1
- package/dist/validation/validateNavigatorManifest.js.map +0 -1
- package/dist/validation/validatePresetTopology.d.ts.map +0 -1
- package/dist/validation/validatePresetTopology.js.map +0 -1
- package/dist/validation/validateSplitView.d.ts.map +0 -1
- package/dist/validation/validateSplitView.js.map +0 -1
- package/dist/validation/validateTabsNavigator.d.ts.map +0 -1
- package/dist/validation/validateTabsNavigator.js.map +0 -1
- /package/dist/{definitions → utils}/NavigatorPlan.js +0 -0
- /package/dist/{topology → utils}/resolveNavigatorPreset.d.ts +0 -0
- /package/dist/{topology → utils}/resolveNavigatorPreset.js +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CustomTabsLayoutProps } from './CustomTabsLayoutProps';
|
|
2
|
+
/*** Render one stable headless Expo Router tab topology with Surface-owned presentations. */
|
|
3
|
+
export declare function CustomTabsLayout({ routes, presentations, initialRouteName, resolveIconSource, customPresentation: CustomPresentation, }: CustomTabsLayoutProps): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=CustomTabsLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTabsLayout.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/CustomTabsLayout.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIrE,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAAE,kBAAkB,GACvC,EAAE,qBAAqB,+BAyCvB"}
|
|
@@ -4,42 +4,24 @@ import { TabList, Tabs, TabSlot, TabTrigger, useTabTrigger } from 'expo-router/u
|
|
|
4
4
|
import { useSyncExternalStore } from 'react';
|
|
5
5
|
import { StyleSheet, View } from 'react-native';
|
|
6
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return undefined;
|
|
26
|
-
const variant = provider === 'FontAwesome5' || provider === 'FontAwesome6' ? 'regular' : undefined;
|
|
27
|
-
return { name: icon.name, provider, variant };
|
|
28
|
-
}
|
|
29
|
-
/*** Render one Surface navigation control bound to Expo Router's headless tab trigger. */
|
|
30
|
-
function SurfaceTabTrigger({ route, presentation, compact, resolveIconSource, }) {
|
|
31
|
-
const { switchTab, trigger } = useTabTrigger({ name: route.name });
|
|
32
|
-
const item = {
|
|
33
|
-
id: route.name,
|
|
34
|
-
label: route.label,
|
|
35
|
-
active: trigger?.isFocused ?? false,
|
|
36
|
-
onPress: () => switchTab(route.name, {}),
|
|
37
|
-
accessibilityLabel: route.label,
|
|
38
|
-
accessibilityRole: 'tab',
|
|
39
|
-
icon: resolveIcon(route.icon, resolveIconSource),
|
|
40
|
-
badge: route.badge,
|
|
41
|
-
};
|
|
42
|
-
return presentation === 'horizontal' ? (_jsx(TabBarItem, { compact: compact, item: item, testID: "navigator-tabs" })) : (_jsx(NavigationItem, { compact: compact, item: item, testID: "navigator-tabs" }));
|
|
7
|
+
/*** Render one stable headless Expo Router tab topology with Surface-owned presentations. */
|
|
8
|
+
export function CustomTabsLayout({ routes, presentations, initialRouteName, resolveIconSource, customPresentation: CustomPresentation, }) {
|
|
9
|
+
const size = useHydrationSafeSize();
|
|
10
|
+
const presentation = selectPresentation(presentations, size);
|
|
11
|
+
const insets = useSafeAreaInsets();
|
|
12
|
+
const navigation = (_jsx(TabsNavigation, { CustomPresentation: CustomPresentation, presentation: presentation, resolveIconSource: resolveIconSource, routes: routes }));
|
|
13
|
+
const vertical = presentation === 'rail' || presentation === 'sidebar';
|
|
14
|
+
const navigationFirst = vertical || presentation === 'top' || presentation === 'custom';
|
|
15
|
+
const navigationInsets = presentation === 'top'
|
|
16
|
+
? { paddingTop: insets.top }
|
|
17
|
+
: vertical
|
|
18
|
+
? { paddingLeft: insets.left, paddingRight: insets.right }
|
|
19
|
+
: undefined;
|
|
20
|
+
const layoutStyle = vertical ? styles.row : styles.column;
|
|
21
|
+
const bottomNavigationStyle = StyleSheet.compose(styles.bottomNavigation, {
|
|
22
|
+
paddingBottom: insets.bottom,
|
|
23
|
+
});
|
|
24
|
+
return (_jsxs(Tabs, { options: { initialRouteName }, style: styles.root, children: [_jsxs(View, { style: layoutStyle, children: [navigationFirst ? _jsx(View, { style: navigationInsets, children: navigation }) : null, _jsx(View, { style: styles.screen, children: _jsx(TabSlot, {}) }), !navigationFirst ? _jsx(View, { style: bottomNavigationStyle, children: navigation }) : null] }), _jsx(TabList, { style: styles.hidden, children: routes.map((route) => (_jsx(TabTrigger, { href: route.href, name: route.name }, route.name))) })] }));
|
|
43
25
|
}
|
|
44
26
|
/*** Resolve a hydration-safe semantic size from the Surface breakpoint owner. */
|
|
45
27
|
function useHydrationSafeSize() {
|
|
@@ -74,40 +56,59 @@ function selectPresentation(presentations, size) {
|
|
|
74
56
|
return presentations.expanded;
|
|
75
57
|
}
|
|
76
58
|
}
|
|
77
|
-
/*** Render Surface-owned bottom, top, rail, or sidebar tab chrome. */
|
|
78
|
-
function BuiltInPresentation({ presentation, routes, resolveIconSource, }) {
|
|
79
|
-
const horizontal = presentation === 'bottom' || presentation === 'top';
|
|
80
|
-
const compact = presentation === 'rail';
|
|
81
|
-
const style = horizontal ? styles.horizontalNavigation : styles.verticalNavigation;
|
|
82
|
-
return (_jsx(View, { accessibilityRole: "tablist", style: style, testID: `navigator-tabs-${presentation}`, children: routes.map((route) => (_jsx(SurfaceTabTrigger, { compact: compact, presentation: horizontal ? 'horizontal' : 'vertical', resolveIconSource: resolveIconSource, route: route }, route.name))) }));
|
|
83
|
-
}
|
|
84
59
|
/*** Select built-in or registered custom chrome for the currently visible routes. */
|
|
85
60
|
function TabsNavigation({ CustomPresentation, presentation, resolveIconSource, routes, }) {
|
|
86
61
|
const visibleRoutes = routes.filter((route) => route.visible);
|
|
62
|
+
/*** Bind one visible route to the shared Surface trigger for registered custom chrome. */
|
|
87
63
|
const renderItem = (route, compact = false) => (_jsx(SurfaceTabTrigger, { compact: compact, presentation: "vertical", resolveIconSource: resolveIconSource, route: route }, route.name));
|
|
88
64
|
if (presentation === 'custom') {
|
|
89
65
|
return CustomPresentation === undefined ? null : (_jsx(CustomPresentation, { renderItem: renderItem, routes: visibleRoutes }));
|
|
90
66
|
}
|
|
91
67
|
return (_jsx(BuiltInPresentation, { presentation: presentation, resolveIconSource: resolveIconSource, routes: visibleRoutes }));
|
|
92
68
|
}
|
|
93
|
-
/*** Render one
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
69
|
+
/*** Render one Surface navigation control bound to Expo Router's headless tab trigger. */
|
|
70
|
+
function SurfaceTabTrigger({ route, presentation, compact, resolveIconSource, }) {
|
|
71
|
+
const { switchTab, trigger } = useTabTrigger({ name: route.name });
|
|
72
|
+
const item = {
|
|
73
|
+
id: route.name,
|
|
74
|
+
label: route.label,
|
|
75
|
+
active: trigger?.isFocused ?? false,
|
|
76
|
+
onPress: () => switchTab(route.name, {}),
|
|
77
|
+
accessibilityLabel: route.label,
|
|
78
|
+
accessibilityRole: 'tab',
|
|
79
|
+
icon: resolveIcon(route.icon, resolveIconSource),
|
|
80
|
+
badge: route.badge,
|
|
81
|
+
};
|
|
82
|
+
return presentation === 'horizontal' ? (_jsx(TabBarItem, { compact: compact, item: item, testID: "navigator-tabs" })) : (_jsx(NavigationItem, { compact: compact, item: item, testID: "navigator-tabs" }));
|
|
83
|
+
}
|
|
84
|
+
/*** Convert portable route icon metadata to the Surface navigation icon contract. */
|
|
85
|
+
function resolveIcon(icon, resolveIconSource) {
|
|
86
|
+
if (icon === undefined)
|
|
87
|
+
return undefined;
|
|
88
|
+
if ('source' in icon) {
|
|
89
|
+
return resolveIconSource === undefined || icon.source === undefined
|
|
90
|
+
? undefined
|
|
91
|
+
: { source: resolveIconSource(icon.source) };
|
|
92
|
+
}
|
|
93
|
+
const provider = icon.provider ?? 'Ionicons';
|
|
94
|
+
if (!ICON_PROVIDERS.has(provider))
|
|
95
|
+
return undefined;
|
|
96
|
+
const variant = provider === 'FontAwesome5' || provider === 'FontAwesome6' ? 'regular' : undefined;
|
|
97
|
+
return { name: icon.name, provider, variant };
|
|
98
|
+
}
|
|
99
|
+
const ICON_PROVIDERS = new Set([
|
|
100
|
+
'Ionicons',
|
|
101
|
+
'FontAwesome',
|
|
102
|
+
'FontAwesome5',
|
|
103
|
+
'FontAwesome6',
|
|
104
|
+
'MaterialDesignIcons',
|
|
105
|
+
]);
|
|
106
|
+
/*** Render Surface-owned bottom, top, rail, or sidebar tab chrome. */
|
|
107
|
+
function BuiltInPresentation({ presentation, routes, resolveIconSource, }) {
|
|
108
|
+
const horizontal = presentation === 'bottom' || presentation === 'top';
|
|
109
|
+
const compact = presentation === 'rail';
|
|
110
|
+
const style = horizontal ? styles.horizontalNavigation : styles.verticalNavigation;
|
|
111
|
+
return (_jsx(View, { accessibilityRole: "tablist", style: style, testID: `navigator-tabs-${presentation}`, children: routes.map((route) => (_jsx(SurfaceTabTrigger, { compact: compact, presentation: horizontal ? 'horizontal' : 'vertical', resolveIconSource: resolveIconSource, route: route }, route.name))) }));
|
|
111
112
|
}
|
|
112
113
|
const styles = StyleSheet.create({
|
|
113
114
|
bottomNavigation: {},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTabsLayout.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/CustomTabsLayout.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,cAAc,EAGd,UAAU,EACV,aAAa,GACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAsB,oBAAoB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AASnE,6FAA6F;AAC7F,MAAM,UAAU,gBAAgB,CAAC,EAC/B,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAAE,kBAAkB,GAChB;IACtB,MAAM,IAAI,GAAG,oBAAoB,EAAE,CAAC;IACpC,MAAM,YAAY,GAAG,kBAAkB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,MAAM,UAAU,GAAG,CACjB,KAAC,cAAc,IACb,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,MAAM,GACd,CACH,CAAC;IACF,MAAM,QAAQ,GAAG,YAAY,KAAK,MAAM,IAAI,YAAY,KAAK,SAAS,CAAC;IACvE,MAAM,eAAe,GAAG,QAAQ,IAAI,YAAY,KAAK,KAAK,IAAI,YAAY,KAAK,QAAQ,CAAC;IACxF,MAAM,gBAAgB,GACpB,YAAY,KAAK,KAAK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AC,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC;IACnF,OAAO,CACL,KAAC,IAAI,IAAC,iBAAiB,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,YAAY,EAAE,YACrF,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACrB,KAAC,iBAAiB,IAChB,OAAO,EAAE,OAAO,EAEhB,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,EACpD,iBAAiB,EAAE,iBAAiB,EACpC,KAAK,EAAE,KAAK,IAHP,KAAK,CAAC,IAAI,CAIf,CACH,CAAC,GACG,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,gBAAgB,EAAE,EAAE;IACpB,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE;IAC5C,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;IAC3B,oBAAoB,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE;IAC9C,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;IACjB,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE;IACtC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;IACnB,kBAAkB,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE;CAChD,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { NavigatorResponsiveSize } from '../../../../utils/NavigatorResponsiveSize';
|
|
3
|
+
import type { ResolvedTabsPresentation } from '../../domain/ResolvedTabsPresentation';
|
|
4
|
+
import type { CustomTabsIconSourceResolver } from './CustomTabsIconSourceResolver';
|
|
5
|
+
import type { CustomTabsPresentationProps } from './CustomTabsPresentationProps';
|
|
6
|
+
import type { CustomTabsRoute } from './CustomTabsRoute';
|
|
7
|
+
/**
|
|
8
|
+
* Runtime inputs for the cross-platform custom-tabs adapter. Routes remain mounted in one headless Router
|
|
9
|
+
* topology while Surface selects bottom, top, rail, sidebar, or registered custom chrome.
|
|
10
|
+
*/
|
|
11
|
+
export interface CustomTabsLayoutProps {
|
|
12
|
+
routes: readonly CustomTabsRoute[];
|
|
13
|
+
presentations: Readonly<Record<NavigatorResponsiveSize, ResolvedTabsPresentation>>;
|
|
14
|
+
initialRouteName?: string;
|
|
15
|
+
resolveIconSource?: CustomTabsIconSourceResolver;
|
|
16
|
+
customPresentation?: ComponentType<CustomTabsPresentationProps>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=CustomTabsLayoutProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTabsLayoutProps.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/CustomTabsLayoutProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IACnC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,CAAC,CAAC;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,4BAA4B,CAAC;IACjD,kBAAkB,CAAC,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;CACjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTabsLayoutProps.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/CustomTabsLayoutProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CustomTabsRoute } from './CustomTabsRoute';
|
|
3
|
+
export interface CustomTabsPresentationProps {
|
|
4
|
+
routes: readonly CustomTabsRoute[];
|
|
5
|
+
renderItem: (route: CustomTabsRoute, compact?: boolean) => ReactNode;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=CustomTabsPresentationProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTabsPresentationProps.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/CustomTabsPresentationProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IACnC,UAAU,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,SAAS,CAAC;CACtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTabsPresentationProps.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/CustomTabsPresentationProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RouteDefinition } from '@ankhorage/contracts/navigator';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
/** One explicit Expo Router tab registration plus optional Surface-owned presentation metadata. */
|
|
4
|
+
export interface CustomTabsRoute {
|
|
5
|
+
name: string;
|
|
6
|
+
href: string;
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: RouteDefinition['icon'];
|
|
9
|
+
badge?: ReactNode;
|
|
10
|
+
visible: boolean;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=CustomTabsRoute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTabsRoute.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/CustomTabsRoute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,mGAAmG;AACnG,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTabsRoute.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/CustomTabsRoute.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NativeVectorIconFamily } from './NativeVectorIconFamily';
|
|
2
|
+
/*** Regular-style Font Awesome 5 family adapter for Expo Native Tabs. */
|
|
3
|
+
export declare const NativeFontAwesome5Family: NativeVectorIconFamily;
|
|
4
|
+
//# sourceMappingURL=NativeFontAwesome5Family.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeFontAwesome5Family.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeFontAwesome5Family.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,EAAE,sBAKtC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FontAwesome5, } from '@react-native-vector-icons/fontawesome5/static';
|
|
2
|
+
/*** Regular-style Font Awesome 5 family adapter for Expo Native Tabs. */
|
|
3
|
+
export const NativeFontAwesome5Family = {
|
|
4
|
+
/*** Request a regular-style image using Expo Native Tabs' required family method signature. */
|
|
5
|
+
getImageSource(name, size, color) {
|
|
6
|
+
return FontAwesome5.getImageSource('regular', name, size, color);
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=NativeFontAwesome5Family.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeFontAwesome5Family.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeFontAwesome5Family.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,GAEb,MAAM,gDAAgD,CAAC;AAIxD,yEAAyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAA2B;IAC9D,+FAA+F;IAC/F,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK;QAC9B,OAAO,YAAY,CAAC,cAAc,CAAC,SAAS,EAAE,IAAmC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAClG,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NativeVectorIconFamily } from './NativeVectorIconFamily';
|
|
2
|
+
/*** Regular-style Font Awesome 6 family adapter for Expo Native Tabs. */
|
|
3
|
+
export declare const NativeFontAwesome6Family: NativeVectorIconFamily;
|
|
4
|
+
//# sourceMappingURL=NativeFontAwesome6Family.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeFontAwesome6Family.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeFontAwesome6Family.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,EAAE,sBAStC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FontAwesome6, } from '@react-native-vector-icons/fontawesome6/static';
|
|
2
|
+
/*** Regular-style Font Awesome 6 family adapter for Expo Native Tabs. */
|
|
3
|
+
export const NativeFontAwesome6Family = {
|
|
4
|
+
/*** Request a regular-style image using Expo Native Tabs' required family method signature. */
|
|
5
|
+
getImageSource(name, size, color) {
|
|
6
|
+
return FontAwesome6.getImageSource('regular', name, size, color);
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=NativeFontAwesome6Family.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeFontAwesome6Family.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeFontAwesome6Family.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,GAEb,MAAM,gDAAgD,CAAC;AAKxD,yEAAyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAA2B;IAC9D,+FAA+F;IAC/F,cAAc,CACZ,IAAY,EACZ,IAAY,EACZ,KAAiB;QAEjB,OAAO,YAAY,CAAC,cAAc,CAAC,SAAS,EAAE,IAAmC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAClG,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NativeVectorIconFamily } from './NativeVectorIconFamily';
|
|
2
|
+
/*** Ionicons-compatible Font Awesome family adapter for Expo Native Tabs. */
|
|
3
|
+
export declare const NativeFontAwesomeFamily: NativeVectorIconFamily;
|
|
4
|
+
//# sourceMappingURL=NativeFontAwesomeFamily.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeFontAwesomeFamily.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeFontAwesomeFamily.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB,EAA6B,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeFontAwesomeFamily.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeFontAwesomeFamily.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAI5E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAgD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeIoniconsFamily.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeIoniconsFamily.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,EAA0B,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeIoniconsFamily.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeIoniconsFamily.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAItE,qDAAqD;AACrD,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAA6C,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NativeVectorIconFamily } from './NativeVectorIconFamily';
|
|
2
|
+
/*** Material Design Icons family adapter for Expo Native Tabs. */
|
|
3
|
+
export declare const NativeMaterialDesignIconsFamily: NativeVectorIconFamily;
|
|
4
|
+
//# sourceMappingURL=NativeMaterialDesignIconsFamily.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeMaterialDesignIconsFamily.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeMaterialDesignIconsFamily.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,kEAAkE;AAClE,eAAO,MAAM,+BAA+B,EACR,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MaterialDesignIcons } from '@react-native-vector-icons/material-design-icons/static';
|
|
2
|
+
/*** Material Design Icons family adapter for Expo Native Tabs. */
|
|
3
|
+
export const NativeMaterialDesignIconsFamily = MaterialDesignIcons;
|
|
4
|
+
//# sourceMappingURL=NativeMaterialDesignIconsFamily.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeMaterialDesignIconsFamily.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeMaterialDesignIconsFamily.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAI9F,kEAAkE;AAClE,MAAM,CAAC,MAAM,+BAA+B,GAC1C,mBAAwD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ColorValue, ImageSourcePropType } from 'react-native';
|
|
2
|
+
export interface NativeVectorIconFamily {
|
|
3
|
+
getImageSource(name: string, size: number, color: ColorValue): Promise<ImageSourcePropType | null>;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=NativeVectorIconFamily.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeVectorIconFamily.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeVectorIconFamily.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,WAAW,sBAAsB;IACrC,cAAc,CACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeVectorIconFamily.js","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/inbound/NativeVectorIconFamily.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NavigatorGeneratedFile } from '../../../../utils/NavigatorGeneratedFile';
|
|
2
|
+
import type { NavigatorGenerationBindings } from '../../../../utils/NavigatorGenerationBindings';
|
|
3
|
+
import type { NavigatorNodePlan } from '../../../../utils/NavigatorNodePlan';
|
|
4
|
+
/*** Generate the specialized layout file for a supported tabs implementation. */
|
|
5
|
+
export declare function generateTabsLayoutFile(node: NavigatorNodePlan, directory: string, bindings: NavigatorGenerationBindings): NavigatorGeneratedFile | undefined;
|
|
6
|
+
//# sourceMappingURL=generateTabsLayoutFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateTabsLayoutFile.d.ts","sourceRoot":"","sources":["../../../../../src/features/tabs/adapters/outbound/generateTabsLayoutFile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAO7E,iFAAiF;AACjF,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,iBAAiB,EACvB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,2BAA2B,GACpC,sBAAsB,GAAG,SAAS,CASpC"}
|
|
@@ -1,27 +1,42 @@
|
|
|
1
|
-
import { assertModuleBinding
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { assertModuleBinding } from '../../../../utils/assertModuleBinding';
|
|
2
|
+
import { quote } from '../../../../utils/quote';
|
|
3
|
+
import { quoteJsxAttribute } from '../../../../utils/quoteJsxAttribute';
|
|
4
|
+
import { sourceLiteral } from '../../../../utils/sourceLiteral';
|
|
5
|
+
/*** Generate the specialized layout file for a supported tabs implementation. */
|
|
6
|
+
export function generateTabsLayoutFile(node, directory, bindings) {
|
|
7
|
+
if (node.type !== 'tabs')
|
|
8
|
+
return undefined;
|
|
9
|
+
if (node.tabs?.implementation === 'native') {
|
|
10
|
+
return createNativeTabsFile(node, directory, bindings);
|
|
6
11
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
case 'FontAwesome':
|
|
10
|
-
case 'FontAwesome5':
|
|
11
|
-
case 'FontAwesome6':
|
|
12
|
-
case 'Ionicons':
|
|
13
|
-
case 'MaterialDesignIcons':
|
|
14
|
-
return provider;
|
|
15
|
-
default:
|
|
16
|
-
throw new Error(`Native Tabs icon provider ${JSON.stringify(provider)} is unsupported.`);
|
|
12
|
+
if (node.tabs?.implementation === 'custom') {
|
|
13
|
+
return createCustomTabsFile(node, directory, bindings);
|
|
17
14
|
}
|
|
15
|
+
return undefined;
|
|
18
16
|
}
|
|
19
|
-
/***
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
/*** Create the generated Native Tabs layout file and its narrow runtime imports. */
|
|
18
|
+
function createNativeTabsFile(node, directory, bindings) {
|
|
19
|
+
const componentName = node.adapter.exportName ?? 'NativeTabs';
|
|
20
|
+
const imports = [`import { ${componentName} } from ${quote(node.adapter.module ?? '')};`];
|
|
21
|
+
const iconFamilies = [
|
|
22
|
+
...new Set(node.routes.flatMap((route) => route.icon === undefined ? [] : [nativeIconFamily(nativeIconProvider(route.icon))])),
|
|
23
|
+
].sort();
|
|
24
|
+
if (iconFamilies.length > 0) {
|
|
25
|
+
imports.push(`import { ${iconFamilies.join(', ')} } from '@ankhorage/navigator/tabs/native-icons';`);
|
|
23
26
|
}
|
|
24
|
-
|
|
27
|
+
let accessoryName;
|
|
28
|
+
if (node.tabs?.bottomAccessoryScreenId !== undefined) {
|
|
29
|
+
const binding = Reflect.get(bindings.screens, node.tabs.bottomAccessoryScreenId);
|
|
30
|
+
if (binding === undefined)
|
|
31
|
+
throw new Error('Missing Native Tabs bottom-accessory binding.');
|
|
32
|
+
assertModuleBinding(binding, 'Native Tabs bottom accessory');
|
|
33
|
+
accessoryName = 'NavigatorBottomAccessory';
|
|
34
|
+
imports.push(`import { ${binding.exportName} as ${accessoryName} } from ${quote(binding.module)};`);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
path: `${directory}/_layout.tsx`,
|
|
38
|
+
contents: createNativeTabsContents(node, componentName, imports.sort().join('\n'), accessoryName),
|
|
39
|
+
};
|
|
25
40
|
}
|
|
26
41
|
/*** Map a supported provider to the Navigator-owned Native Tabs family export. */
|
|
27
42
|
function nativeIconFamily(provider) {
|
|
@@ -38,18 +53,22 @@ function nativeIconFamily(provider) {
|
|
|
38
53
|
return 'NativeMaterialDesignIconsFamily';
|
|
39
54
|
}
|
|
40
55
|
}
|
|
41
|
-
/***
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
/*** Resolve and validate the native vector-icon provider for one planned route icon. */
|
|
57
|
+
function nativeIconProvider(icon) {
|
|
58
|
+
if (icon === undefined || 'source' in icon) {
|
|
59
|
+
throw new Error('Native Tabs require a supported named icon.');
|
|
60
|
+
}
|
|
61
|
+
const provider = icon.provider ?? 'Ionicons';
|
|
62
|
+
switch (provider) {
|
|
63
|
+
case 'FontAwesome':
|
|
64
|
+
case 'FontAwesome5':
|
|
65
|
+
case 'FontAwesome6':
|
|
66
|
+
case 'Ionicons':
|
|
67
|
+
case 'MaterialDesignIcons':
|
|
68
|
+
return provider;
|
|
69
|
+
default:
|
|
70
|
+
throw new Error(`Native Tabs icon provider ${JSON.stringify(provider)} is unsupported.`);
|
|
71
|
+
}
|
|
53
72
|
}
|
|
54
73
|
/*** Render a complete Native Tabs layout module from one validated node plan. */
|
|
55
74
|
function createNativeTabsContents(node, componentName, imports, accessoryName) {
|
|
@@ -75,47 +94,25 @@ ${nativeIconSource(componentName, nativeIconFamily(nativeIconProvider(route.icon
|
|
|
75
94
|
: `\n <${componentName}.BottomAccessory>\n <${accessoryName} />\n </${componentName}.BottomAccessory>`;
|
|
76
95
|
return `${imports}${initialRoute}\n\nexport default function NavigatorLayout() {\n return (\n <${componentName}${minimize}>\n${triggers}${accessory}\n </${componentName}>\n );\n}\n`;
|
|
77
96
|
}
|
|
78
|
-
/***
|
|
79
|
-
function
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const binding = Reflect.get(bindings.screens, node.tabs.bottomAccessoryScreenId);
|
|
91
|
-
if (binding === undefined)
|
|
92
|
-
throw new Error('Missing Native Tabs bottom-accessory binding.');
|
|
93
|
-
assertModuleBinding(binding, 'Native Tabs bottom accessory');
|
|
94
|
-
accessoryName = 'NavigatorBottomAccessory';
|
|
95
|
-
imports.push(`import { ${binding.exportName} as ${accessoryName} } from ${quote(binding.module)};`);
|
|
96
|
-
}
|
|
97
|
-
return {
|
|
98
|
-
path: `${directory}/_layout.tsx`,
|
|
99
|
-
contents: createNativeTabsContents(node, componentName, imports.sort().join('\n'), accessoryName),
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
/*** Render custom-tab route records as stable multiline source objects. */
|
|
103
|
-
function renderCustomTabRoutes(routes) {
|
|
104
|
-
return `[
|
|
105
|
-
${routes
|
|
106
|
-
.map((route) => ` {
|
|
107
|
-
${Object.entries(route)
|
|
108
|
-
.filter(([, value]) => value !== undefined)
|
|
109
|
-
.map(([key, value]) => ` ${key}: ${sourceLiteral(value)},`)
|
|
110
|
-
.join('\n')}
|
|
111
|
-
},`)
|
|
112
|
-
.join('\n')}
|
|
113
|
-
]`;
|
|
97
|
+
/*** Render a Native Tabs vector icon source within the canonical generated-code print width. */
|
|
98
|
+
function nativeIconSource(componentName, family, name) {
|
|
99
|
+
const vectorIcon = `<${componentName}.Trigger.VectorIcon family={${family}} name=${quoteJsxAttribute(name)} />`;
|
|
100
|
+
const inlineSource = ` src={${vectorIcon}}`;
|
|
101
|
+
if (inlineSource.length <= 100)
|
|
102
|
+
return inlineSource;
|
|
103
|
+
return ` src={
|
|
104
|
+
<${componentName}.Trigger.VectorIcon
|
|
105
|
+
family={${family}}
|
|
106
|
+
name=${quoteJsxAttribute(name)}
|
|
107
|
+
/>
|
|
108
|
+
}`;
|
|
114
109
|
}
|
|
115
|
-
/***
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
/*** Read the required native vector-icon name from one planned route icon. */
|
|
111
|
+
function nativeIconName(icon) {
|
|
112
|
+
if (icon === undefined || 'source' in icon) {
|
|
113
|
+
throw new Error('Native Tabs require a supported named icon.');
|
|
114
|
+
}
|
|
115
|
+
return icon.name;
|
|
119
116
|
}
|
|
120
117
|
/*** Create the generated cross-platform custom-tabs layout and registered integration imports. */
|
|
121
118
|
function createCustomTabsFile(node, directory, bindings) {
|
|
@@ -159,16 +156,22 @@ function createCustomTabsFile(node, directory, bindings) {
|
|
|
159
156
|
contents: `${imports.sort().join('\n')}\n\nconst routes = ${routeSource} as const;\nconst presentations = ${sourceLiteral(tabs.presentations)} as const;\n\nexport default function NavigatorLayout() {\n${renderCustomTabsReturn(component)}\n}\n`,
|
|
160
157
|
};
|
|
161
158
|
}
|
|
162
|
-
/***
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
159
|
+
/*** Render custom-tab route records as stable multiline source objects. */
|
|
160
|
+
function renderCustomTabRoutes(routes) {
|
|
161
|
+
return `[
|
|
162
|
+
${routes
|
|
163
|
+
.map((route) => ` {
|
|
164
|
+
${Object.entries(route)
|
|
165
|
+
.filter(([, value]) => value !== undefined)
|
|
166
|
+
.map(([key, value]) => ` ${key}: ${sourceLiteral(value)},`)
|
|
167
|
+
.join('\n')}
|
|
168
|
+
},`)
|
|
169
|
+
.join('\n')}
|
|
170
|
+
]`;
|
|
171
|
+
}
|
|
172
|
+
/*** Render the custom Tabs return statement without exceeding the canonical print width. */
|
|
173
|
+
function renderCustomTabsReturn(component) {
|
|
174
|
+
const directReturn = ` return ${component};`;
|
|
175
|
+
return directReturn.length <= 100 ? directReturn : ` return (\n ${component}\n );`;
|
|
173
176
|
}
|
|
174
177
|
//# sourceMappingURL=generateTabsLayoutFile.js.map
|