@alepha/ui 0.34.0 → 0.36.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 +54 -1
- package/dist/account/$pageAccount.js +1 -2
- package/dist/account/AccountBackToSiteMenuItem.js +1 -2
- package/dist/account/AccountBrand.d.ts +10 -3
- package/dist/account/AccountBrand.d.ts.map +1 -1
- package/dist/account/AccountBrand.js +13 -8
- package/dist/account/AccountBrand.js.map +1 -1
- package/dist/account/AccountConnections.js +1 -2
- package/dist/account/AccountDeleteDialog.js +2 -3
- package/dist/account/AccountKeys.js +3 -4
- package/dist/account/AccountLayout.d.ts.map +1 -1
- package/dist/account/AccountLayout.js +5 -6
- package/dist/account/AccountLayout.js.map +1 -1
- package/dist/account/AccountMfaDialog.js +2 -3
- package/dist/account/AccountPage.js +1 -2
- package/dist/account/AccountPasswordDialog.js +2 -3
- package/dist/account/AccountProfile.js +3 -4
- package/dist/account/AccountRecoveryCodes.js +2 -3
- package/dist/account/AccountRecoveryCodesDialog.js +1 -2
- package/dist/account/AccountRouter.js +1 -2
- package/dist/account/AccountRouterOptions.js +1 -2
- package/dist/account/AccountSecurity.js +6 -7
- package/dist/account/AccountSessions.js +1 -2
- package/dist/account/ApiKeyCreateDialog.js +2 -3
- package/dist/account/ApiKeyScopeMatrix.js +1 -2
- package/dist/account/ApiKeyScopeSummary.js +1 -2
- package/dist/account/ApiKeyStatusBadge.js +1 -2
- package/dist/account/index.js +5 -5
- package/dist/admin/$pageAdmin.js +1 -2
- package/dist/admin/AdminAnalytics.js +1 -2
- package/dist/admin/AdminAudits.js +2 -3
- package/dist/admin/AdminAudits.js.map +1 -1
- package/dist/admin/AdminDashboard.js +2 -3
- package/dist/admin/AdminDashboardCountCard.js +1 -2
- package/dist/admin/AdminFiles.js +5 -6
- package/dist/admin/AdminFiles.js.map +1 -1
- package/dist/admin/AdminFilesUsage.d.ts.map +1 -1
- package/dist/admin/AdminFilesUsage.js +1 -2
- package/dist/admin/AdminFilesUsage.js.map +1 -1
- package/dist/admin/AdminFilesUsageCard.js +2 -3
- package/dist/admin/AdminJobDetail.js +1 -2
- package/dist/admin/AdminJobDetailAside.js +1 -2
- package/dist/admin/AdminJobDetailExecutions.js +2 -3
- package/dist/admin/AdminJobExecutionLogs.js +1 -2
- package/dist/admin/AdminJobExecutionSheet.js +3 -4
- package/dist/admin/AdminJobs.js +2 -3
- package/dist/admin/AdminJobsPayloadBody.js +1 -2
- package/dist/admin/AdminJobsPayloadDialog.js +1 -2
- package/dist/admin/AdminJobsStatusBadge.js +1 -2
- package/dist/admin/AdminJobsTypeIcon.js +1 -2
- package/dist/admin/AdminKeys.js +6 -7
- package/dist/admin/AdminKeysTokenDialog.js +2 -3
- package/dist/admin/AdminLayout.js +1 -2
- package/dist/admin/AdminNotifications.d.ts.map +1 -1
- package/dist/admin/AdminNotifications.js +6 -7
- package/dist/admin/AdminNotifications.js.map +1 -1
- package/dist/admin/AdminNotificationsDetail.js +1 -2
- package/dist/admin/AdminNotificationsDetailTabs.js +1 -2
- package/dist/admin/AdminNotificationsPreviewBody.js +1 -2
- package/dist/admin/AdminNotificationsPreviewTab.js +1 -2
- package/dist/admin/AdminNotificationsPreviewTab.js.map +1 -1
- package/dist/admin/AdminNotificationsRawTab.js +1 -2
- package/dist/admin/AdminNotificationsStatusBadge.js +1 -2
- package/dist/admin/AdminPage.js +1 -2
- package/dist/admin/AdminParameters.d.ts.map +1 -1
- package/dist/admin/AdminParameters.js +5 -6
- package/dist/admin/AdminParameters.js.map +1 -1
- package/dist/admin/AdminParametersEditorForm.js +1 -2
- package/dist/admin/AdminParametersEditorForm.js.map +1 -1
- package/dist/admin/AdminParametersEditorPane.js +3 -4
- package/dist/admin/AdminParametersEditorPane.js.map +1 -1
- package/dist/admin/AdminParametersHistoryPane.js +2 -3
- package/dist/admin/AdminParametersTreeFooterActions.js +1 -2
- package/dist/admin/AdminParametersTreeNodeView.js +2 -3
- package/dist/admin/AdminParametersTreePane.js +1 -2
- package/dist/admin/AdminPayments.js +2 -3
- package/dist/admin/AdminPaymentsStatusBadge.js +1 -2
- package/dist/admin/AdminRouter.d.ts +3 -2
- package/dist/admin/AdminRouter.d.ts.map +1 -1
- package/dist/admin/AdminRouter.js +1 -2
- package/dist/admin/AdminRouterOptions.js +1 -2
- package/dist/admin/AdminSessions.js +1 -2
- package/dist/admin/AdminUserAvatarControl.js +1 -2
- package/dist/admin/AdminUserCell.js +1 -2
- package/dist/admin/AdminUserDetail.d.ts +3 -3
- package/dist/admin/AdminUserDetail.js +5 -6
- package/dist/admin/AdminUserDetail.js.map +1 -1
- package/dist/admin/AdminUserDetailAuditsTab.js +2 -3
- package/dist/admin/AdminUserDetailIdentityAside.js +1 -2
- package/dist/admin/AdminUserDetailOverviewTab.js +1 -2
- package/dist/admin/AdminUserDetailPasswordDialog.js +1 -2
- package/dist/admin/AdminUserDetailSecurityTab.js +3 -4
- package/dist/admin/AdminUserDetailSessionsTab.js +1 -2
- package/dist/admin/AdminUsers.js +3 -4
- package/dist/admin/AdminUsersRolesPicker.js +1 -2
- package/dist/admin/AdminUsersStatusBadge.js +1 -2
- package/dist/admin/EmailBodyFrame.js +1 -2
- package/dist/admin/ParameterDiffDialog.js +2 -3
- package/dist/admin/ParameterHistoryItem.d.ts.map +1 -1
- package/dist/admin/ParameterHistoryItem.js +4 -5
- package/dist/admin/ParameterHistoryItem.js.map +1 -1
- package/dist/admin/ParameterJsonDialog.js +2 -3
- package/dist/admin/ParameterSaveDialog.js +1 -2
- package/dist/admin/adminJobsStatusTones.js +1 -2
- package/dist/admin/adminNotificationsChannelLabel.js +1 -2
- package/dist/admin/adminNotificationsStatusTones.js +1 -2
- package/dist/admin/adminNotificationsTemplateLabel.js +1 -2
- package/dist/admin/adminParametersTree.js +1 -2
- package/dist/admin/adminPaymentsStatusTones.js +1 -2
- package/dist/admin/adminUserDetailPasswordSchema.d.ts +2 -1
- package/dist/admin/adminUserDetailPasswordSchema.d.ts.map +1 -1
- package/dist/admin/adminUserDetailPasswordSchema.js +1 -2
- package/dist/admin/adminUserDetailProfilePolicy.js +1 -2
- package/dist/admin/adminUserDetailProfileSchema.d.ts +7 -7
- package/dist/admin/adminUserDetailProfileSchema.d.ts.map +1 -1
- package/dist/admin/adminUserDetailProfileSchema.js +1 -2
- package/dist/admin/analytics/AdvancedSection.js +2 -3
- package/dist/admin/analytics/AnalyticsChart.js +1 -2
- package/dist/admin/analytics/AnalyticsChartBars.js +1 -2
- package/dist/admin/analytics/AnalyticsChartDonut.js +1 -2
- package/dist/admin/analytics/AnalyticsChartHeader.js +1 -2
- package/dist/admin/analytics/AnalyticsChartHeat.js +1 -2
- package/dist/admin/analytics/AnalyticsChartLegend.js +1 -2
- package/dist/admin/analytics/AnalyticsChartLine.js +1 -2
- package/dist/admin/analytics/AnalyticsChartRank.js +1 -2
- package/dist/admin/analytics/AnalyticsChartTicks.js +1 -2
- package/dist/admin/analytics/AnalyticsEmpty.js +1 -2
- package/dist/admin/analytics/ClauseLabel.js +1 -2
- package/dist/admin/analytics/CoarsenedBadge.js +1 -2
- package/dist/admin/analytics/CompareNote.js +1 -2
- package/dist/admin/analytics/DatasetSelect.js +1 -2
- package/dist/admin/analytics/FilterEditor.js +1 -2
- package/dist/admin/analytics/FilterValuePicker.js +2 -3
- package/dist/admin/analytics/GroupByChips.js +1 -2
- package/dist/admin/analytics/MeasureChips.js +1 -2
- package/dist/admin/analytics/QueryPanel.js +2 -3
- package/dist/admin/analytics/RangeControl.js +2 -3
- package/dist/admin/analytics/RequestDialog.js +1 -2
- package/dist/admin/analytics/ResultsPane.js +6 -7
- package/dist/admin/analytics/ResultsTable.js +3 -4
- package/dist/admin/analytics/RunFooter.js +1 -2
- package/dist/admin/analytics/SamplingBadge.js +1 -2
- package/dist/admin/analytics/ToggleChip.js +2 -3
- package/dist/admin/analytics/TotalsCards.js +1 -2
- package/dist/admin/analytics/TruncationBanner.js +1 -2
- package/dist/admin/analytics/analyticsModel.js +1 -2
- package/dist/admin/analytics/chartModel.js +1 -2
- package/dist/admin/analytics/instantRangeSchema.d.ts +3 -2
- package/dist/admin/analytics/instantRangeSchema.d.ts.map +1 -1
- package/dist/admin/analytics/instantRangeSchema.js +1 -2
- package/dist/admin/analytics/useAnalyticsQuery.js +1 -2
- package/dist/admin/analytics/useDismissable.js +1 -2
- package/dist/admin/analytics/useFilterValues.js +1 -2
- package/dist/admin/analytics/usePanelWidth.js +1 -2
- package/dist/admin/analytics/useShapeLabels.js +1 -2
- package/dist/admin/diffLines.js +1 -2
- package/dist/admin/downloadJson.js +1 -2
- package/dist/admin/index.js +5 -5
- package/dist/admin/useConfirmedAction.js +1 -2
- package/dist/admin/useJobRetentionLabels.js +1 -2
- package/dist/admin/useJobStatusLabels.js +1 -2
- package/dist/admin/useNotificationStatusLabels.js +1 -2
- package/dist/admin/useParameterHistoryCollapsed.js +1 -2
- package/dist/ai/AiChat.d.ts +36 -6
- package/dist/ai/AiChat.d.ts.map +1 -1
- package/dist/ai/AiChat.js +103 -66
- package/dist/ai/AiChat.js.map +1 -1
- package/dist/ai/AiChatComposer.d.ts +22 -0
- package/dist/ai/AiChatComposer.d.ts.map +1 -0
- package/dist/ai/AiChatComposer.js +75 -0
- package/dist/ai/AiChatComposer.js.map +1 -0
- package/dist/ai/AiChatConfirmCard.d.ts +5 -2
- package/dist/ai/AiChatConfirmCard.d.ts.map +1 -1
- package/dist/ai/AiChatConfirmCard.js +8 -8
- package/dist/ai/AiChatConfirmCard.js.map +1 -1
- package/dist/ai/AiChatConfirmFields.d.ts +9 -0
- package/dist/ai/AiChatConfirmFields.d.ts.map +1 -0
- package/dist/ai/AiChatConfirmFields.js +45 -0
- package/dist/ai/AiChatConfirmFields.js.map +1 -0
- package/dist/ai/AiChatEmpty.d.ts +26 -0
- package/dist/ai/AiChatEmpty.d.ts.map +1 -0
- package/dist/ai/AiChatEmpty.js +47 -0
- package/dist/ai/AiChatEmpty.js.map +1 -0
- package/dist/ai/AiChatHistory.d.ts +3 -2
- package/dist/ai/AiChatHistory.d.ts.map +1 -1
- package/dist/ai/AiChatHistory.js +53 -25
- package/dist/ai/AiChatHistory.js.map +1 -1
- package/dist/ai/AiChatMessage.d.ts +14 -0
- package/dist/ai/AiChatMessage.d.ts.map +1 -1
- package/dist/ai/AiChatMessage.js +21 -14
- package/dist/ai/AiChatMessage.js.map +1 -1
- package/dist/ai/AiFormRegistry.js +1 -2
- package/dist/ai/aiChatMessageFormSchema.d.ts +2 -1
- package/dist/ai/aiChatMessageFormSchema.d.ts.map +1 -1
- package/dist/ai/aiChatMessageFormSchema.js +1 -2
- package/dist/ai/aiContextAtom.d.ts +6 -5
- package/dist/ai/aiContextAtom.d.ts.map +1 -1
- package/dist/ai/aiContextAtom.js +1 -2
- package/dist/ai/index.d.ts +3 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +5 -2
- package/dist/ai/useAiChat.d.ts +4 -0
- package/dist/ai/useAiChat.d.ts.map +1 -1
- package/dist/ai/useAiChat.js +16 -3
- package/dist/ai/useAiChat.js.map +1 -1
- package/dist/ai/useAiContext.js +1 -2
- package/dist/auth/AuthLogin.js +5 -6
- package/dist/auth/AuthMfaStep.js +2 -3
- package/dist/auth/AuthRegister.d.ts.map +1 -1
- package/dist/auth/AuthRegister.js +4 -5
- package/dist/auth/AuthRegister.js.map +1 -1
- package/dist/auth/AuthRegisterCentered.js +1 -2
- package/dist/auth/AuthRegisterFormPhase.js +5 -6
- package/dist/auth/AuthRegisterPasswordRules.js +1 -2
- package/dist/auth/AuthRegisterRealmHeader.js +1 -2
- package/dist/auth/AuthRegisterRealmLogo.js +1 -2
- package/dist/auth/AuthResetPassword.js +4 -5
- package/dist/auth/AuthRouter.js +1 -2
- package/dist/auth/AuthVerifyEmail.js +2 -3
- package/dist/auth/AuthVerifyEmailStateful.js +1 -2
- package/dist/auth/AuthVerifyEmailView.js +2 -3
- package/dist/auth/TurnstileWidget.js +1 -2
- package/dist/auth/index.js +3 -3
- package/dist/auth/providerLabels.js +1 -2
- package/dist/auth/safeRedirect.js +1 -2
- package/dist/calendar/Calendar.js +2 -3
- package/dist/calendar/LazyCalendar.js +1 -2
- package/dist/calendar/index.js +1 -2
- package/dist/chart/Chart.js +1 -2
- package/dist/chart/index.js +1 -2
- package/dist/command/Command.js +2 -3
- package/dist/command/commandScore.js +1 -2
- package/dist/command/index.js +1 -1
- package/dist/command/rankCommandItems.js +1 -2
- package/dist/core/Alert.js +1 -2
- package/dist/core/AlertDialog.js +2 -3
- package/dist/core/Avatar.js +1 -2
- package/dist/core/Badge.js +1 -2
- package/dist/core/BrandIcon.js +1 -2
- package/dist/core/Breadcrumb.js +1 -2
- package/dist/core/Button.js +1 -2
- package/dist/core/ButtonGroup.js +2 -3
- package/dist/core/Card.js +1 -2
- package/dist/core/Checkbox.js +1 -2
- package/dist/core/Combobox.js +2 -3
- package/dist/core/ContextMenu.js +1 -2
- package/dist/core/Dialog.js +2 -3
- package/dist/core/Drawer.js +1 -2
- package/dist/core/DropdownMenu.js +1 -2
- package/dist/core/Empty.js +1 -2
- package/dist/core/FileImage.js +1 -2
- package/dist/core/FilterSlot.js +1 -2
- package/dist/core/Highlight.js +2 -3
- package/dist/core/HoverCard.js +1 -2
- package/dist/core/Input.js +1 -2
- package/dist/core/InputGroup.js +2 -3
- package/dist/core/Kbd.js +1 -2
- package/dist/core/Label.js +1 -2
- package/dist/core/Menubar.js +2 -3
- package/dist/core/Pagination.js +2 -3
- package/dist/core/PaneRail.js +1 -2
- package/dist/core/Popover.js +1 -2
- package/dist/core/Progress.js +1 -2
- package/dist/core/Segmented.js +1 -2
- package/dist/core/Separator.js +1 -2
- package/dist/core/Sheet.js +2 -3
- package/dist/core/Sidebar.js +7 -8
- package/dist/core/Sidebar.js.map +1 -1
- package/dist/core/Skeleton.js +1 -2
- package/dist/core/Slider.js +1 -2
- package/dist/core/Spinner.js +1 -2
- package/dist/core/Switch.js +1 -2
- package/dist/core/Table.js +1 -2
- package/dist/core/Tabs.js +1 -2
- package/dist/core/Textarea.js +1 -2
- package/dist/core/TimeAgo.js +1 -2
- package/dist/core/Toaster.js +1 -2
- package/dist/core/Tooltip.js +1 -2
- package/dist/core/UserAvatar.js +2 -3
- package/dist/core/highlightRanges.js +1 -2
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +39 -38
- package/dist/core/useDialog.js +1 -2
- package/dist/core/useIsMobile.js +1 -2
- package/dist/core/useToast.d.ts +22 -1
- package/dist/core/useToast.d.ts.map +1 -1
- package/dist/core/useToast.js +5 -3
- package/dist/core/useToast.js.map +1 -1
- package/dist/core/useUndoable.d.ts +93 -0
- package/dist/core/useUndoable.d.ts.map +1 -0
- package/dist/core/useUndoable.js +172 -0
- package/dist/core/useUndoable.js.map +1 -0
- package/dist/core/utils.js +1 -2
- package/dist/form/AutoForm.js +6 -7
- package/dist/form/AutoFormBottomBar.js +2 -3
- package/dist/form/AutoFormErrorPopover.js +1 -2
- package/dist/form/AutoFormGroupBlock.js +3 -4
- package/dist/form/AutoFormGroupGridField.js +2 -3
- package/dist/form/Control.js +5 -6
- package/dist/form/ControlArray.js +2 -3
- package/dist/form/ControlArray.js.map +1 -1
- package/dist/form/ControlDate.js +1 -2
- package/dist/form/ControlDatePopover.js +3 -4
- package/dist/form/ControlDateRange.js +2 -3
- package/dist/form/ControlMonthPopover.js +2 -3
- package/dist/form/ControlNumber.js +2 -3
- package/dist/form/ControlObject.js +2 -3
- package/dist/form/ControlObject.js.map +1 -1
- package/dist/form/ControlPassword.js +1 -2
- package/dist/form/ControlSelect.js +3 -4
- package/dist/form/ControlSelectCombobox.js +3 -4
- package/dist/form/ControlUpload.js +4 -5
- package/dist/form/ControlUpload.js.map +1 -1
- package/dist/form/ControlUploadItemThumb.js +1 -2
- package/dist/form/FormField.js +2 -3
- package/dist/form/FormFieldAutoSaveProvider.js +1 -2
- package/dist/form/FormFieldLayoutProvider.js +1 -2
- package/dist/form/FormFieldRequiredMarkerProvider.js +1 -2
- package/dist/form/autoFormGroups.js +1 -2
- package/dist/form/controlSelectOptions.js +1 -2
- package/dist/form/dateOnly.js +1 -2
- package/dist/form/fieldI18n.js +1 -2
- package/dist/form/fieldTrigger.js +1 -2
- package/dist/form/grid.js +1 -2
- package/dist/form/iconHint.js +1 -2
- package/dist/form/index.js +7 -7
- package/dist/form/resizeImage.js +1 -2
- package/dist/i18n/fr/index.js +1 -2
- package/dist/i18n/fr/uiFr.d.ts.map +1 -1
- package/dist/i18n/fr/uiFr.js +51 -3
- package/dist/i18n/fr/uiFr.js.map +1 -1
- package/dist/markdown/MarkdownView.d.ts +15 -0
- package/dist/markdown/MarkdownView.d.ts.map +1 -1
- package/dist/markdown/MarkdownView.js +5 -3
- package/dist/markdown/MarkdownView.js.map +1 -1
- package/dist/markdown/SpoilerSpan.js +1 -2
- package/dist/markdown/diagram/DiagramErrorBoundary.js +1 -2
- package/dist/markdown/diagram/DiagramLabel.js +1 -2
- package/dist/markdown/diagram/FlowchartDiagram.js +2 -3
- package/dist/markdown/diagram/FlowchartDiagramCluster.js +2 -3
- package/dist/markdown/diagram/FlowchartDiagramEdge.js +1 -2
- package/dist/markdown/diagram/FlowchartDiagramNode.js +1 -2
- package/dist/markdown/diagram/MermaidFence.js +3 -4
- package/dist/markdown/diagram/SequenceDiagram.js +2 -3
- package/dist/markdown/diagram/SequenceDiagramFragment.js +1 -2
- package/dist/markdown/diagram/SequenceDiagramMessage.js +1 -2
- package/dist/markdown/diagram/SequenceDiagramNote.js +1 -2
- package/dist/markdown/diagram/SequenceDiagramParticipant.js +1 -2
- package/dist/markdown/diagram/SequenceDiagramParticipantActor.js +2 -3
- package/dist/markdown/diagram/diagramKind.js +1 -2
- package/dist/markdown/diagram/flowchartParser.js +1 -2
- package/dist/markdown/diagram/layoutFlowchart.js +1 -2
- package/dist/markdown/diagram/layoutFlowchart.js.map +1 -1
- package/dist/markdown/diagram/layoutSequence.js +1 -2
- package/dist/markdown/diagram/sequenceParser.js +1 -2
- package/dist/markdown/diagram/textMetrics.js +1 -2
- package/dist/markdown/index.js +1 -1
- package/dist/markdown/rehypeHighlight.js +1 -2
- package/dist/markdown/remarkSpoiler.js +1 -2
- package/dist/organizations/MyOrganizationInvitations.js +2 -3
- package/dist/organizations/MyOrganizations.js +2 -3
- package/dist/organizations/OrganizationInviteDialog.js +2 -3
- package/dist/organizations/OrganizationMemberIdentity.js +2 -3
- package/dist/organizations/OrganizationMemberRankPicker.js +1 -2
- package/dist/organizations/OrganizationMembers.js +3 -4
- package/dist/organizations/OrganizationPendingInvitations.js +3 -4
- package/dist/organizations/OrganizationRankColumnHeader.js +2 -3
- package/dist/organizations/OrganizationRanks.js +5 -6
- package/dist/organizations/OrganizationTransferOwnershipDialog.js +2 -3
- package/dist/organizations/index.js +6 -6
- package/dist/organizations/useInviteOrganizationMember.d.ts +2 -2
- package/dist/organizations/useInviteOrganizationMember.js +1 -2
- package/dist/organizations/useInviteOrganizationMember.js.map +1 -1
- package/dist/organizations/useRevokeOrganizationInvitation.js +1 -2
- package/dist/otp/InputOTP.js +1 -2
- package/dist/otp/index.js +1 -2
- package/dist/resizable/Resizable.js +1 -2
- package/dist/resizable/index.js +1 -2
- package/dist/settings/SettingsDangerSection.js +2 -3
- package/dist/settings/SettingsHeading.js +1 -2
- package/dist/settings/SettingsLayout.js +1 -2
- package/dist/settings/SettingsNav.js +1 -2
- package/dist/settings/SettingsRow.js +2 -3
- package/dist/settings/SettingsSection.js +3 -4
- package/dist/settings/index.js +3 -3
- package/dist/settings/settingsCardEdge.js +1 -2
- package/dist/shell/$pageNav.js +1 -2
- package/dist/shell/ActionErrorToaster.js +1 -2
- package/dist/shell/AppActions.js +2 -3
- package/dist/shell/AppShell.js +3 -4
- package/dist/shell/AppShellNavCollapse.js +1 -2
- package/dist/shell/AppShellNavDropdownItems.js +1 -2
- package/dist/shell/AppShellSidebarNavItem.d.ts.map +1 -1
- package/dist/shell/AppShellSidebarNavItem.js +29 -5
- package/dist/shell/AppShellSidebarNavItem.js.map +1 -1
- package/dist/shell/AppShellStatefulSidebarTrigger.js +1 -2
- package/dist/shell/ButtonDark.js +1 -2
- package/dist/shell/ButtonInbox.js +3 -4
- package/dist/shell/ButtonLanguage.js +2 -3
- package/dist/shell/ButtonLanguage.js.map +1 -1
- package/dist/shell/ButtonSettings.js +2 -3
- package/dist/shell/ButtonSettingsColorModeMenu.js +1 -2
- package/dist/shell/ButtonSettingsLanguageMenu.js +1 -2
- package/dist/shell/ButtonSettingsLanguageMenu.js.map +1 -1
- package/dist/shell/ButtonSettingsThemeMenu.js +1 -2
- package/dist/shell/ButtonTheme.js +3 -4
- package/dist/shell/ButtonThemeSwatch.js +1 -2
- package/dist/shell/ButtonUser.js +2 -3
- package/dist/shell/ButtonUserAccountMenuItem.js +1 -2
- package/dist/shell/ButtonUserAdminMenuItem.js +1 -2
- package/dist/shell/ButtonUserContent.js +3 -4
- package/dist/shell/ButtonUserDefaultMenu.js +1 -2
- package/dist/shell/ButtonUserEmail.js +1 -2
- package/dist/shell/ButtonUserLogoutMenuItem.js +1 -2
- package/dist/shell/ButtonUserPlaceholder.js +1 -2
- package/dist/shell/DetailAside.js +3 -4
- package/dist/shell/DetailLayout.js +2 -3
- package/dist/shell/NavShell.js +1 -2
- package/dist/shell/NavigationProgress.js +1 -2
- package/dist/shell/PlateLayout.js +1 -2
- package/dist/shell/PlateTabBar.d.ts +5 -0
- package/dist/shell/PlateTabBar.d.ts.map +1 -1
- package/dist/shell/PlateTabBar.js +4 -4
- package/dist/shell/PlateTabBar.js.map +1 -1
- package/dist/shell/SidebarBackHeader.d.ts +35 -0
- package/dist/shell/SidebarBackHeader.d.ts.map +1 -0
- package/dist/shell/SidebarBackHeader.js +34 -0
- package/dist/shell/SidebarBackHeader.js.map +1 -0
- package/dist/shell/SidebarNavAutoClose.js +1 -2
- package/dist/shell/Spotlight.js +2 -3
- package/dist/shell/appShellNav.d.ts +36 -0
- package/dist/shell/appShellNav.d.ts.map +1 -1
- package/dist/shell/appShellNav.js +1 -2
- package/dist/shell/appShellNav.js.map +1 -1
- package/dist/shell/inboxUnreadAtom.js +1 -2
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +12 -11
- package/dist/shell/navTreeUtil.js +1 -2
- package/dist/shell/spotlightSearchText.js +1 -2
- package/dist/shell/useDetailTab.js +1 -2
- package/dist/shell/useNavBreadcrumbs.js +1 -2
- package/dist/shell/useNavEntries.js +1 -2
- package/dist/shell/useNavTree.js +1 -2
- package/dist/swagger/$uiSwagger.d.ts +75 -0
- package/dist/swagger/$uiSwagger.d.ts.map +1 -0
- package/dist/swagger/$uiSwagger.js +51 -0
- package/dist/swagger/$uiSwagger.js.map +1 -0
- package/dist/swagger/OpenApiSpec.d.ts +113 -0
- package/dist/swagger/OpenApiSpec.d.ts.map +1 -0
- package/dist/swagger/OpenApiSpec.js +186 -0
- package/dist/swagger/OpenApiSpec.js.map +1 -0
- package/dist/swagger/SwaggerAccessBadge.d.ts +16 -0
- package/dist/swagger/SwaggerAccessBadge.d.ts.map +1 -0
- package/dist/swagger/SwaggerAccessBadge.js +40 -0
- package/dist/swagger/SwaggerAccessBadge.js.map +1 -0
- package/dist/swagger/SwaggerAlephaMeta.d.ts +11 -0
- package/dist/swagger/SwaggerAlephaMeta.d.ts.map +1 -0
- package/dist/swagger/SwaggerAlephaMeta.js +103 -0
- package/dist/swagger/SwaggerAlephaMeta.js.map +1 -0
- package/dist/swagger/SwaggerCredentials.d.ts +11 -0
- package/dist/swagger/SwaggerCredentials.d.ts.map +1 -0
- package/dist/swagger/SwaggerCredentials.js +35 -0
- package/dist/swagger/SwaggerCredentials.js.map +1 -0
- package/dist/swagger/SwaggerExplorer.d.ts +31 -0
- package/dist/swagger/SwaggerExplorer.d.ts.map +1 -0
- package/dist/swagger/SwaggerExplorer.js +156 -0
- package/dist/swagger/SwaggerExplorer.js.map +1 -0
- package/dist/swagger/SwaggerMethodBadge.d.ts +10 -0
- package/dist/swagger/SwaggerMethodBadge.d.ts.map +1 -0
- package/dist/swagger/SwaggerMethodBadge.js +27 -0
- package/dist/swagger/SwaggerMethodBadge.js.map +1 -0
- package/dist/swagger/SwaggerNav.d.ts +16 -0
- package/dist/swagger/SwaggerNav.d.ts.map +1 -0
- package/dist/swagger/SwaggerNav.js +63 -0
- package/dist/swagger/SwaggerNav.js.map +1 -0
- package/dist/swagger/SwaggerOperationView.d.ts +22 -0
- package/dist/swagger/SwaggerOperationView.d.ts.map +1 -0
- package/dist/swagger/SwaggerOperationView.js +89 -0
- package/dist/swagger/SwaggerOperationView.js.map +1 -0
- package/dist/swagger/SwaggerParameters.d.ts +11 -0
- package/dist/swagger/SwaggerParameters.d.ts.map +1 -0
- package/dist/swagger/SwaggerParameters.js +80 -0
- package/dist/swagger/SwaggerParameters.js.map +1 -0
- package/dist/swagger/SwaggerRequestBuilder.d.ts +83 -0
- package/dist/swagger/SwaggerRequestBuilder.d.ts.map +1 -0
- package/dist/swagger/SwaggerRequestBuilder.js +231 -0
- package/dist/swagger/SwaggerRequestBuilder.js.map +1 -0
- package/dist/swagger/SwaggerResponseView.d.ts +25 -0
- package/dist/swagger/SwaggerResponseView.d.ts.map +1 -0
- package/dist/swagger/SwaggerResponseView.js +94 -0
- package/dist/swagger/SwaggerResponseView.js.map +1 -0
- package/dist/swagger/SwaggerResponses.d.ts +12 -0
- package/dist/swagger/SwaggerResponses.d.ts.map +1 -0
- package/dist/swagger/SwaggerResponses.js +75 -0
- package/dist/swagger/SwaggerResponses.js.map +1 -0
- package/dist/swagger/SwaggerSchemaView.d.ts +19 -0
- package/dist/swagger/SwaggerSchemaView.d.ts.map +1 -0
- package/dist/swagger/SwaggerSchemaView.js +98 -0
- package/dist/swagger/SwaggerSchemaView.js.map +1 -0
- package/dist/swagger/SwaggerSection.d.ts +14 -0
- package/dist/swagger/SwaggerSection.d.ts.map +1 -0
- package/dist/swagger/SwaggerSection.js +23 -0
- package/dist/swagger/SwaggerSection.js.map +1 -0
- package/dist/swagger/SwaggerTryIt.d.ts +31 -0
- package/dist/swagger/SwaggerTryIt.d.ts.map +1 -0
- package/dist/swagger/SwaggerTryIt.js +68 -0
- package/dist/swagger/SwaggerTryIt.js.map +1 -0
- package/dist/swagger/SwaggerTryItForm.d.ts +20 -0
- package/dist/swagger/SwaggerTryItForm.d.ts.map +1 -0
- package/dist/swagger/SwaggerTryItForm.js +52 -0
- package/dist/swagger/SwaggerTryItForm.js.map +1 -0
- package/dist/swagger/index.d.ts +29 -0
- package/dist/swagger/index.d.ts.map +1 -0
- package/dist/swagger/index.js +18 -0
- package/dist/swagger/useSwaggerAccess.d.ts +24 -0
- package/dist/swagger/useSwaggerAccess.d.ts.map +1 -0
- package/dist/swagger/useSwaggerAccess.js +33 -0
- package/dist/swagger/useSwaggerAccess.js.map +1 -0
- package/dist/table/DataTable.d.ts.map +1 -1
- package/dist/table/DataTable.js +52 -16
- package/dist/table/DataTable.js.map +1 -1
- package/dist/table/DataTableBody.d.ts +18 -1
- package/dist/table/DataTableBody.d.ts.map +1 -1
- package/dist/table/DataTableBody.js +86 -62
- package/dist/table/DataTableBody.js.map +1 -1
- package/dist/table/DataTableBulkBar.js +1 -2
- package/dist/table/DataTableBulkMenu.js +2 -3
- package/dist/table/DataTableColumnPicker.js +3 -4
- package/dist/table/DataTableFilterAdd.js +2 -3
- package/dist/table/DataTableFilterBar.js +2 -3
- package/dist/table/DataTableFilterBar.js.map +1 -1
- package/dist/table/DataTableFilterControl.js +2 -3
- package/dist/table/DataTableFilterDialog.js +1 -2
- package/dist/table/DataTableFilterMenu.js +2 -3
- package/dist/table/DataTableFilterOperator.js +1 -2
- package/dist/table/DataTableFooter.js +2 -3
- package/dist/table/DataTableHeaderRow.js +3 -4
- package/dist/table/DataTableHelpButton.js +1 -2
- package/dist/table/DataTableRowActionItem.js +1 -2
- package/dist/table/DataTableRowActionsInline.d.ts +17 -0
- package/dist/table/DataTableRowActionsInline.d.ts.map +1 -0
- package/dist/table/DataTableRowActionsInline.js +45 -0
- package/dist/table/DataTableRowActionsInline.js.map +1 -0
- package/dist/table/DataTableRowActionsMenu.js +2 -3
- package/dist/table/DataTableSkeletonRows.js +2 -3
- package/dist/table/DataTableSummaryCard.js +1 -2
- package/dist/table/DataTableSummaryPanel.js +2 -3
- package/dist/table/DataTableToolbar.js +2 -3
- package/dist/table/PermissionMatrix.d.ts +4 -4
- package/dist/table/PermissionMatrix.js +4 -5
- package/dist/table/PermissionMatrix.js.map +1 -1
- package/dist/table/PermissionMatrixGroupRows.js +3 -4
- package/dist/table/PermissionMatrixRowLabel.js +1 -2
- package/dist/table/dataTableBaseProps.d.ts +31 -0
- package/dist/table/dataTableBaseProps.d.ts.map +1 -1
- package/dist/table/dataTableCellPadding.js +1 -2
- package/dist/table/dataTableFilterFields.js +1 -2
- package/dist/table/dataTablePersistence.js +1 -2
- package/dist/table/dataTableSquareRight.js +1 -2
- package/dist/table/dataTableTypes.d.ts +16 -2
- package/dist/table/dataTableTypes.d.ts.map +1 -1
- package/dist/table/index.js +4 -4
- package/dist/table/paginateLocal.js +1 -2
- package/dist/table/queryFilters.js +1 -2
- package/dist/table/queryFilters.js.map +1 -1
- package/dist/table/useDataTableColumns.js +1 -2
- package/dist/table/useDataTableData.d.ts +5 -2
- package/dist/table/useDataTableData.d.ts.map +1 -1
- package/dist/table/useDataTableData.js +10 -4
- package/dist/table/useDataTableData.js.map +1 -1
- package/dist/table/useDataTableFilterForm.js +2 -3
- package/dist/table/useDataTableFilterVisibility.js +1 -2
- package/dist/table/useDataTableRefresh.d.ts +1 -0
- package/dist/table/useDataTableRefresh.d.ts.map +1 -1
- package/dist/table/useDataTableRefresh.js +14 -3
- package/dist/table/useDataTableRefresh.js.map +1 -1
- package/dist/table/useDataTableSummary.js +1 -2
- package/dist/table/useOptimisticRows.d.ts +64 -0
- package/dist/table/useOptimisticRows.d.ts.map +1 -0
- package/dist/table/useOptimisticRows.js +185 -0
- package/dist/table/useOptimisticRows.js.map +1 -0
- package/dist/table/useRowMotion.d.ts +27 -0
- package/dist/table/useRowMotion.d.ts.map +1 -0
- package/dist/table/useRowMotion.js +112 -0
- package/dist/table/useRowMotion.js.map +1 -0
- package/dist/table/useTableSelection.js +1 -2
- package/dist/tree/TreeView.js +1 -2
- package/dist/tree/TreeViewRenameInput.js +1 -2
- package/dist/tree/TreeViewResizer.js +1 -2
- package/dist/tree/TreeViewRow.js +2 -3
- package/dist/tree/index.js +1 -1
- package/dist/tree/treeModel.js +1 -2
- package/dist/tree/useTreeState.js +1 -2
- package/docs/packages-alepha-ui-core.md +1 -0
- package/docs/packages-alepha-ui-overview.md +53 -1
- package/docs/packages-alepha-ui-swagger.md +35 -0
- package/package.json +24 -16
- package/src/account/AccountBrand.tsx +25 -6
- package/src/account/AccountLayout.tsx +5 -1
- package/src/account/__tests__/AccountLayout.browser.spec.tsx +2 -2
- package/src/account/__tests__/AccountRouter.spec.ts +1 -1
- package/src/admin/AdminAudits.tsx +1 -1
- package/src/admin/AdminFiles.tsx +1 -1
- package/src/admin/AdminFilesUsage.tsx +1 -2
- package/src/admin/AdminNotifications.tsx +2 -5
- package/src/admin/AdminNotificationsPreviewTab.tsx +2 -2
- package/src/admin/AdminParameters.tsx +1 -3
- package/src/admin/AdminParametersEditorForm.tsx +1 -1
- package/src/admin/AdminParametersEditorPane.tsx +1 -1
- package/src/admin/AdminUserDetail.tsx +3 -3
- package/src/admin/ParameterHistoryItem.tsx +1 -3
- package/src/admin/__tests__/AdminNavI18n.browser.spec.tsx +1 -1
- package/src/admin/__tests__/AdminStatusLabels.browser.spec.tsx +1 -1
- package/src/admin/__tests__/AdminUserDetail.spec.ts +2 -2
- package/src/admin/analytics/analyticsModel.spec.ts +6 -6
- package/src/ai/AiChat.tsx +160 -82
- package/src/ai/AiChatComposer.tsx +117 -0
- package/src/ai/AiChatConfirmCard.tsx +7 -5
- package/src/ai/AiChatConfirmFields.tsx +65 -0
- package/src/ai/AiChatEmpty.tsx +73 -0
- package/src/ai/AiChatHistory.tsx +64 -28
- package/src/ai/AiChatMessage.tsx +41 -14
- package/src/ai/__tests__/AiChat.browser.spec.tsx +146 -5
- package/src/ai/index.ts +3 -0
- package/src/ai/useAiChat.ts +18 -0
- package/src/auth/AuthRegister.tsx +1 -3
- package/src/core/Sidebar.tsx +2 -2
- package/src/core/__tests__/useUndoable.browser.spec.tsx +201 -0
- package/src/core/index.ts +7 -0
- package/src/core/useToast.tsx +30 -2
- package/src/core/useUndoable.tsx +285 -0
- package/src/form/ControlArray.tsx +1 -1
- package/src/form/ControlObject.tsx +1 -1
- package/src/form/ControlUpload.tsx +1 -1
- package/src/form/__tests__/ControlChoices.browser.spec.tsx +2 -1
- package/src/form/__tests__/ControlDateLanguage.browser.spec.tsx +1 -1
- package/src/form/__tests__/ControlDateRange.browser.spec.tsx +1 -1
- package/src/form/__tests__/ControlObjectClear.browser.spec.tsx +2 -2
- package/src/form/__tests__/ControlSelectClearLabel.browser.spec.tsx +1 -1
- package/src/form/__tests__/ControlSelectDeselect.browser.spec.tsx +1 -3
- package/src/form/__tests__/ControlSelectMulti.browser.spec.tsx +2 -2
- package/src/form/__tests__/ControlSelectSearchable.browser.spec.tsx +1 -1
- package/src/form/__tests__/ControlSelectSizeMinimal.browser.spec.tsx +2 -2
- package/src/form/__tests__/ControlSelectTriggerProps.browser.spec.tsx +1 -3
- package/src/i18n/fr/uiFr.ts +52 -0
- package/src/markdown/MarkdownView.tsx +27 -9
- package/src/markdown/diagram/layoutFlowchart.ts +1 -1
- package/src/organizations/__tests__/OrganizationRanks.browser.spec.tsx +1 -1
- package/src/organizations/__tests__/OrganizationTransferOwnershipDialog.browser.spec.tsx +1 -1
- package/src/organizations/useInviteOrganizationMember.ts +2 -2
- package/src/shell/AppShellSidebarNavItem.tsx +59 -1
- package/src/shell/ButtonLanguage.tsx +1 -1
- package/src/shell/ButtonSettingsLanguageMenu.tsx +1 -1
- package/src/shell/PlateTabBar.tsx +14 -2
- package/src/shell/SidebarBackHeader.tsx +58 -0
- package/src/shell/__tests__/AppActions.browser.spec.tsx +1 -1
- package/src/shell/__tests__/ButtonInbox.browser.spec.tsx +1 -1
- package/src/shell/__tests__/ButtonSettings.browser.spec.tsx +1 -1
- package/src/shell/__tests__/ButtonUserAvatar.browser.spec.tsx +1 -1
- package/src/shell/__tests__/SidebarNavAutoClose.browser.spec.tsx +1 -1
- package/src/shell/appShellNav.tsx +37 -0
- package/src/shell/index.ts +5 -1
- package/src/swagger/$uiSwagger.tsx +95 -0
- package/src/swagger/OpenApiSpec.ts +300 -0
- package/src/swagger/SwaggerAccessBadge.tsx +64 -0
- package/src/swagger/SwaggerAlephaMeta.tsx +141 -0
- package/src/swagger/SwaggerCredentials.tsx +44 -0
- package/src/swagger/SwaggerExplorer.tsx +208 -0
- package/src/swagger/SwaggerMethodBadge.tsx +32 -0
- package/src/swagger/SwaggerNav.tsx +92 -0
- package/src/swagger/SwaggerOperationView.tsx +102 -0
- package/src/swagger/SwaggerParameters.tsx +74 -0
- package/src/swagger/SwaggerRequestBuilder.ts +331 -0
- package/src/swagger/SwaggerResponseView.tsx +107 -0
- package/src/swagger/SwaggerResponses.tsx +83 -0
- package/src/swagger/SwaggerSchemaView.tsx +134 -0
- package/src/swagger/SwaggerSection.tsx +29 -0
- package/src/swagger/SwaggerTryIt.tsx +95 -0
- package/src/swagger/SwaggerTryItForm.tsx +87 -0
- package/src/swagger/__tests__/$uiSwagger.spec.ts +52 -0
- package/src/swagger/__tests__/OpenApiSpec.spec.ts +139 -0
- package/src/swagger/__tests__/SwaggerAccess.browser.spec.tsx +124 -0
- package/src/swagger/__tests__/SwaggerOperationView.browser.spec.tsx +194 -0
- package/src/swagger/__tests__/SwaggerRequestBuilder.spec.ts +250 -0
- package/src/swagger/index.ts +75 -0
- package/src/swagger/useSwaggerAccess.ts +59 -0
- package/src/table/DataTable.tsx +85 -34
- package/src/table/DataTableBody.tsx +51 -7
- package/src/table/DataTableFilterBar.tsx +1 -1
- package/src/table/DataTableRowActionsInline.tsx +80 -0
- package/src/table/PermissionMatrix.tsx +4 -4
- package/src/table/__tests__/DataTableEmptyState.browser.spec.tsx +1 -1
- package/src/table/__tests__/DataTableListMode.browser.spec.tsx +174 -0
- package/src/table/__tests__/DataTableOptimistic.browser.spec.tsx +173 -0
- package/src/table/__tests__/PermissionMatrix.browser.spec.tsx +2 -2
- package/src/table/__tests__/queryFilters.spec.ts +10 -12
- package/src/table/dataTableBaseProps.ts +31 -0
- package/src/table/dataTableTypes.ts +16 -2
- package/src/table/queryFilters.ts +1 -1
- package/src/table/useDataTableData.ts +18 -2
- package/src/table/useDataTableRefresh.ts +26 -2
- package/src/table/useOptimisticRows.ts +265 -0
- package/src/table/useRowMotion.ts +152 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useEvents } from "alepha/react";
|
|
4
|
-
|
|
4
|
+
// src/shell/NavigationProgress.tsx
|
|
5
5
|
const NavigationProgress = (props) => {
|
|
6
6
|
const [progress, setProgress] = useState(0);
|
|
7
7
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -53,7 +53,6 @@ const NavigationProgress = (props) => {
|
|
|
53
53
|
})
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
-
//#endregion
|
|
57
56
|
export { NavigationProgress, NavigationProgress as default };
|
|
58
57
|
|
|
59
58
|
//# sourceMappingURL=NavigationProgress.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../core/utils.js";
|
|
2
2
|
import { PlateTabBar } from "./PlateTabBar.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/shell/PlateLayout.tsx
|
|
5
5
|
/**
|
|
6
6
|
* A full-width plate over a tab strip, and a body that scrolls under both.
|
|
7
7
|
*
|
|
@@ -32,7 +32,6 @@ const PlateLayout = (props) => /* @__PURE__ */ jsxs("div", {
|
|
|
32
32
|
children: props.children
|
|
33
33
|
})]
|
|
34
34
|
});
|
|
35
|
-
//#endregion
|
|
36
35
|
export { PlateLayout };
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=PlateLayout.js.map
|
|
@@ -28,6 +28,11 @@ export interface PlateTab {
|
|
|
28
28
|
* middle-click, copy-link and the back button all depend on it.
|
|
29
29
|
*/
|
|
30
30
|
href?: string;
|
|
31
|
+
/**
|
|
32
|
+
* When to fetch a tab that is a link ahead of the click. Loader data comes
|
|
33
|
+
* with the code when the page's `prefetch` says it may.
|
|
34
|
+
*/
|
|
35
|
+
prefetch?: "hover" | "visible";
|
|
31
36
|
}
|
|
32
37
|
export interface PlateTabBarProps {
|
|
33
38
|
tabs: PlateTab[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlateTabBar.d.ts","sourceRoot":"","sources":["../../src/shell/PlateTabBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"PlateTabBar.d.ts","sourceRoot":"","sources":["../../src/shell/PlateTabBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,gCAwFlD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../core/utils.js";
|
|
2
2
|
import { Link } from "alepha/react/router";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/shell/PlateTabBar.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Underlined tabs along the bottom edge of a {@link PlateLayout}'s plate.
|
|
7
7
|
*
|
|
@@ -14,11 +14,11 @@ const PlateTabBar = (props) => {
|
|
|
14
14
|
const navigates = props.tabs.every((tab) => tab.href !== void 0);
|
|
15
15
|
return /* @__PURE__ */ jsx("div", {
|
|
16
16
|
"data-testid": props.testId,
|
|
17
|
-
className: cn("bg-muted border-border flex gap-5 overflow-x-auto px-6 shadow-[inset_0_1px_0_0_var(--bevel)]", props.divided !== false && "border-t"),
|
|
17
|
+
className: cn("bg-muted border-border flex gap-5 overflow-x-auto overflow-y-hidden px-6 shadow-[inset_0_1px_0_0_var(--bevel)]", props.divided !== false && "border-t"),
|
|
18
18
|
role: navigates ? "navigation" : "tablist",
|
|
19
19
|
children: props.tabs.map((tab) => {
|
|
20
20
|
const active = tab.key === props.active;
|
|
21
|
-
const className = cn("
|
|
21
|
+
const className = cn("inline-flex h-[42px] shrink-0 items-center gap-[7px] border-b-2 text-[13.5px] font-medium whitespace-nowrap transition-colors", active ? "border-primary text-foreground" : "text-muted-foreground hover:text-foreground border-transparent");
|
|
22
22
|
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
23
|
tab.icon && /* @__PURE__ */ jsx(tab.icon, {
|
|
24
24
|
className: "size-[14px]",
|
|
@@ -32,6 +32,7 @@ const PlateTabBar = (props) => {
|
|
|
32
32
|
] });
|
|
33
33
|
return tab.href !== void 0 ? /* @__PURE__ */ jsx(Link, {
|
|
34
34
|
href: tab.href,
|
|
35
|
+
prefetch: tab.prefetch,
|
|
35
36
|
"aria-current": active ? "page" : void 0,
|
|
36
37
|
className,
|
|
37
38
|
children: body
|
|
@@ -46,7 +47,6 @@ const PlateTabBar = (props) => {
|
|
|
46
47
|
})
|
|
47
48
|
});
|
|
48
49
|
};
|
|
49
|
-
//#endregion
|
|
50
50
|
export { PlateTabBar };
|
|
51
51
|
|
|
52
52
|
//# sourceMappingURL=PlateTabBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlateTabBar.js","names":[],"sources":["../../src/shell/PlateTabBar.tsx"],"sourcesContent":["import { Link } from \"alepha/react/router\";\n\nimport { cn } from \"../core/utils.ts\";\nimport type { IconComponent } from \"../form/iconHint.tsx\";\n\nexport interface PlateTab {\n /**\n * Identifies the tab. Compared against {@link PlateTabBarProps.active}, and\n * handed back to {@link PlateTabBarProps.onSelect}. For a router-driven bar\n * this is the route name.\n */\n key: string;\n label: string;\n icon?: IconComponent;\n /**\n * A trailing count, in a pill of its own rather than folded into the label.\n * The pill's colour follows the tab's state - `text-foreground` active,\n * `text-muted-foreground` not - and a count written into the label would\n * carry one fixed class that is wrong on one of the two. Same reason\n * `Segmented` has a `count` prop.\n *\n * Show it only once its collection has resolved: `undefined` renders the\n * bare label rather than a confident \"0\".\n */\n count?: number;\n /**\n * Makes this tab a NAVIGATION rather than a state change. Present, the tab\n * is a router `Link` and `onSelect` is not called; absent, it is a button.\n *\n * Both shapes exist because both are real: a tab that swaps a panel inside\n * one route is state, and a tab that is its own route has to be a link -\n * middle-click, copy-link and the back button all depend on it.\n */\n href?: string;\n}\n\nexport interface PlateTabBarProps {\n tabs: PlateTab[];\n active: string;\n /**\n * Called for a tab with no `href`. A router-driven bar passes nothing.\n */\n onSelect?: (key: string) => void;\n /**\n * Marks the bar for tests. Worth setting: tab labels are ordinary words\n * (\"Overview\", \"Settings\") that a page-wide `getByRole` finds in the tab\n * BODIES too, and \"Settings\" is also a project-level nav entry.\n */\n testId?: string;\n /**\n * Whether to rule off the top edge. Default `true`.\n *\n * The line separates the tabs from the plate above them, so it is only\n * right when there IS one. `PlateLayout` derives this from its own `plate`\n * slot; a bar with no plate above it would otherwise draw a stray line\n * immediately under the container's top edge, which is what a caller\n * omitting the plate for the first time discovered (feedback #2095).\n */\n divided?: boolean;\n}\n\n/**\n * Underlined tabs along the bottom edge of a {@link PlateLayout}'s plate.\n *\n * Underlines rather than `Segmented`, which sits inside a toolbar as a\n * control. This bar IS the bottom edge of a full-width band, and a pill group\n * floating on that edge reads as a widget dropped onto the header rather than\n * as the header's own last row.\n */\nexport const PlateTabBar = (props: PlateTabBarProps) => {\n // A bar of links is a NAVIGATION, not a tablist, and its items are links\n // rather than tabs. `role=\"tab\"` on an anchor overrides the implicit link\n // role, which takes it out of `getByRole(\"link\")` and tells a screen reader\n // it swaps a panel when it actually leaves the page. `aria-current=\"page\"`\n // is what marks the current one in a set of navigation links.\n const navigates = props.tabs.every((tab) => tab.href !== undefined);\n\n return (\n <div\n data-testid={props.testId}\n className={cn(\n // The table header's surface, and for the same reason: this strip is\n // chrome, not body. `bg-muted` under a `--bevel` line laid just inside\n // the top edge - two adjacent lines of opposite polarity read as a\n // fold - so the band looks raised out of the page rather than painted\n // onto it. Opaque like the sticky table header, not the base header's\n // `bg-muted/50`: the plate above is already translucent over the page,\n // and stacking a second wash on it makes the two bands differ by a\n // couple of percent instead of reading as one raised object.\n //\n // The border above the bevel is whichever line closes the top edge:\n // the bar's own `border-t` when there is a plate, and the shell\n // header's bottom border when there is not. Both are `--border`, so\n // the fold reads the same either way.\n // `overflow-x-auto` so a bar wider than a phone scrolls sideways\n // instead of widening the page; the tabs never wrap or shrink.\n \"bg-muted border-border flex gap-5 overflow-x-auto px-6 shadow-[inset_0_1px_0_0_var(--bevel)]\",\n props.divided !== false && \"border-t\",\n )}\n role={navigates ? \"navigation\" : \"tablist\"}\n >\n {props.tabs.map((tab) => {\n const active = tab.key === props.active;\n const className = cn(\n \"
|
|
1
|
+
{"version":3,"file":"PlateTabBar.js","names":[],"sources":["../../src/shell/PlateTabBar.tsx"],"sourcesContent":["import { Link } from \"alepha/react/router\";\n\nimport { cn } from \"../core/utils.ts\";\nimport type { IconComponent } from \"../form/iconHint.tsx\";\n\nexport interface PlateTab {\n /**\n * Identifies the tab. Compared against {@link PlateTabBarProps.active}, and\n * handed back to {@link PlateTabBarProps.onSelect}. For a router-driven bar\n * this is the route name.\n */\n key: string;\n label: string;\n icon?: IconComponent;\n /**\n * A trailing count, in a pill of its own rather than folded into the label.\n * The pill's colour follows the tab's state - `text-foreground` active,\n * `text-muted-foreground` not - and a count written into the label would\n * carry one fixed class that is wrong on one of the two. Same reason\n * `Segmented` has a `count` prop.\n *\n * Show it only once its collection has resolved: `undefined` renders the\n * bare label rather than a confident \"0\".\n */\n count?: number;\n /**\n * Makes this tab a NAVIGATION rather than a state change. Present, the tab\n * is a router `Link` and `onSelect` is not called; absent, it is a button.\n *\n * Both shapes exist because both are real: a tab that swaps a panel inside\n * one route is state, and a tab that is its own route has to be a link -\n * middle-click, copy-link and the back button all depend on it.\n */\n href?: string;\n /**\n * When to fetch a tab that is a link ahead of the click. Loader data comes\n * with the code when the page's `prefetch` says it may.\n */\n prefetch?: \"hover\" | \"visible\";\n}\n\nexport interface PlateTabBarProps {\n tabs: PlateTab[];\n active: string;\n /**\n * Called for a tab with no `href`. A router-driven bar passes nothing.\n */\n onSelect?: (key: string) => void;\n /**\n * Marks the bar for tests. Worth setting: tab labels are ordinary words\n * (\"Overview\", \"Settings\") that a page-wide `getByRole` finds in the tab\n * BODIES too, and \"Settings\" is also a project-level nav entry.\n */\n testId?: string;\n /**\n * Whether to rule off the top edge. Default `true`.\n *\n * The line separates the tabs from the plate above them, so it is only\n * right when there IS one. `PlateLayout` derives this from its own `plate`\n * slot; a bar with no plate above it would otherwise draw a stray line\n * immediately under the container's top edge, which is what a caller\n * omitting the plate for the first time discovered (feedback #2095).\n */\n divided?: boolean;\n}\n\n/**\n * Underlined tabs along the bottom edge of a {@link PlateLayout}'s plate.\n *\n * Underlines rather than `Segmented`, which sits inside a toolbar as a\n * control. This bar IS the bottom edge of a full-width band, and a pill group\n * floating on that edge reads as a widget dropped onto the header rather than\n * as the header's own last row.\n */\nexport const PlateTabBar = (props: PlateTabBarProps) => {\n // A bar of links is a NAVIGATION, not a tablist, and its items are links\n // rather than tabs. `role=\"tab\"` on an anchor overrides the implicit link\n // role, which takes it out of `getByRole(\"link\")` and tells a screen reader\n // it swaps a panel when it actually leaves the page. `aria-current=\"page\"`\n // is what marks the current one in a set of navigation links.\n const navigates = props.tabs.every((tab) => tab.href !== undefined);\n\n return (\n <div\n data-testid={props.testId}\n className={cn(\n // The table header's surface, and for the same reason: this strip is\n // chrome, not body. `bg-muted` under a `--bevel` line laid just inside\n // the top edge - two adjacent lines of opposite polarity read as a\n // fold - so the band looks raised out of the page rather than painted\n // onto it. Opaque like the sticky table header, not the base header's\n // `bg-muted/50`: the plate above is already translucent over the page,\n // and stacking a second wash on it makes the two bands differ by a\n // couple of percent instead of reading as one raised object.\n //\n // The border above the bevel is whichever line closes the top edge:\n // the bar's own `border-t` when there is a plate, and the shell\n // header's bottom border when there is not. Both are `--border`, so\n // the fold reads the same either way.\n // `overflow-x-auto` so a bar wider than a phone scrolls sideways\n // instead of widening the page; the tabs never wrap or shrink.\n // `overflow-x: auto` computes `overflow-y` as `auto` too, so the bar\n // is a vertical scroller as well: anything a pixel taller than it\n // shows a vertical scrollbar wherever scrollbars are always visible\n // (macOS \"always show\", Windows). `overflow-y-hidden` stops that, and\n // the tabs carry no negative bottom margin, which is what used to\n // overflow by one pixel and hide half of the active underline.\n \"bg-muted border-border flex gap-5 overflow-x-auto overflow-y-hidden px-6 shadow-[inset_0_1px_0_0_var(--bevel)]\",\n props.divided !== false && \"border-t\",\n )}\n role={navigates ? \"navigation\" : \"tablist\"}\n >\n {props.tabs.map((tab) => {\n const active = tab.key === props.active;\n const className = cn(\n \"inline-flex h-[42px] shrink-0 items-center gap-[7px] border-b-2 text-[13.5px] font-medium whitespace-nowrap transition-colors\",\n active\n ? \"border-primary text-foreground\"\n : \"text-muted-foreground hover:text-foreground border-transparent\",\n );\n const body = (\n <>\n {tab.icon && <tab.icon className=\"size-[14px]\" aria-hidden />}\n {tab.label}\n {tab.count !== undefined && (\n <span\n className={cn(\n \"bg-foreground/10 inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full px-[5px] font-mono text-[10.5px]\",\n active ? \"text-foreground\" : \"text-muted-foreground\",\n )}\n >\n {tab.count}\n </span>\n )}\n </>\n );\n\n return tab.href !== undefined ? (\n <Link\n key={tab.key}\n href={tab.href}\n prefetch={tab.prefetch}\n aria-current={active ? \"page\" : undefined}\n className={className}\n >\n {body}\n </Link>\n ) : (\n <button\n key={tab.key}\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => props.onSelect?.(tab.key)}\n className={className}\n >\n {body}\n </button>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;AA0EA,MAAa,eAAe,UAA4B;CAMtD,MAAM,YAAY,MAAM,KAAK,OAAO,QAAQ,IAAI,SAAS,KAAA,CAAS;CAElE,OACE,oBAAC,OAAD;EACE,eAAa,MAAM;EACnB,WAAW,GAsBT,kHACA,MAAM,YAAY,SAAS,UAC7B;EACA,MAAM,YAAY,eAAe;EAEhC,UAAA,MAAM,KAAK,KAAK,QAAQ;GACvB,MAAM,SAAS,IAAI,QAAQ,MAAM;GACjC,MAAM,YAAY,GAChB,iIACA,SACI,mCACA,gEACN;GACA,MAAM,OACJ,qBAAA,UAAA,EAAA,UAAA;IACG,IAAI,QAAQ,oBAAC,IAAI,MAAL;KAAU,WAAU;KAAc,eAAA;IAAa,CAAA;IAC3D,IAAI;IACJ,IAAI,UAAU,KAAA,KACb,oBAAC,QAAD;KACE,WAAW,GACT,gIACA,SAAS,oBAAoB,uBAC/B;KAEC,UAAA,IAAI;IACD,CAAA;GAER,EAAA,CAAA;GAGJ,OAAO,IAAI,SAAS,KAAA,IAClB,oBAAC,MAAD;IAEE,MAAM,IAAI;IACV,UAAU,IAAI;IACd,gBAAc,SAAS,SAAS,KAAA;IACrB;IAEV,UAAA;GACG,GAPC,IAAI,GAOL,IAEN,oBAAC,UAAD;IAEE,MAAK;IACL,MAAK;IACL,iBAAe;IACf,eAAe,MAAM,WAAW,IAAI,GAAG;IAC5B;IAEV,UAAA;GACK,GARD,IAAI,GAQH;EAEZ,CAAC;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export interface SidebarBackHeaderProps {
|
|
4
|
+
/**
|
|
5
|
+
* Where the arrow leads: the application's home, out of a root shell such
|
|
6
|
+
* as `/account` or `/admin` that is not drawn inside the application's own
|
|
7
|
+
* chrome. Absent, there is no arrow, for an application with nowhere to
|
|
8
|
+
* go back to.
|
|
9
|
+
*/
|
|
10
|
+
href?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Names the arrow for assistive technology, since it shows only an icon.
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* What the header says beside the arrow: an icon and a title, or a whole
|
|
17
|
+
* identity block. Hidden when the sidebar folds to its icon rail, where
|
|
18
|
+
* the arrow alone stays.
|
|
19
|
+
*/
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A root shell's sidebar header with a way out: a back arrow to the
|
|
24
|
+
* application's home, then what the area is.
|
|
25
|
+
*
|
|
26
|
+
* `/account` and `/admin` own the viewport, so the application's sidebar and
|
|
27
|
+
* its links are gone while they are open, and the only other way back is an
|
|
28
|
+
* item inside the account menu. The arrow is a real `Link`, so home can also
|
|
29
|
+
* be opened in a new tab.
|
|
30
|
+
*
|
|
31
|
+
* Collapsed to the icon rail, the words go and the arrow stays: it is the
|
|
32
|
+
* one part of the header a reader still needs there.
|
|
33
|
+
*/
|
|
34
|
+
export declare const SidebarBackHeader: (props: SidebarBackHeaderProps) => React.JSX.Element;
|
|
35
|
+
//# sourceMappingURL=SidebarBackHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarBackHeader.d.ts","sourceRoot":"","sources":["../../src/shell/SidebarBackHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,sBAiB9D,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Link } from "alepha/react/router";
|
|
2
|
+
import { ArrowLeft } from "lucide-react";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/shell/SidebarBackHeader.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A root shell's sidebar header with a way out: a back arrow to the
|
|
8
|
+
* application's home, then what the area is.
|
|
9
|
+
*
|
|
10
|
+
* `/account` and `/admin` own the viewport, so the application's sidebar and
|
|
11
|
+
* its links are gone while they are open, and the only other way back is an
|
|
12
|
+
* item inside the account menu. The arrow is a real `Link`, so home can also
|
|
13
|
+
* be opened in a new tab.
|
|
14
|
+
*
|
|
15
|
+
* Collapsed to the icon rail, the words go and the arrow stays: it is the
|
|
16
|
+
* one part of the header a reader still needs there.
|
|
17
|
+
*/
|
|
18
|
+
const SidebarBackHeader = (props) => {
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: "flex min-w-0 items-center gap-2 px-2 py-1.5 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:px-0",
|
|
21
|
+
children: [props.href && /* @__PURE__ */ jsx(Link, {
|
|
22
|
+
href: props.href,
|
|
23
|
+
"aria-label": props.label,
|
|
24
|
+
className: "text-muted-foreground hover:bg-hover hover:text-foreground flex size-7 shrink-0 items-center justify-center rounded-md transition-colors",
|
|
25
|
+
children: /* @__PURE__ */ jsx(ArrowLeft, { className: "size-4 rtl:-scale-x-100" })
|
|
26
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
27
|
+
className: "flex min-w-0 items-center gap-2 group-data-[collapsible=icon]:hidden",
|
|
28
|
+
children: props.children
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
export { SidebarBackHeader };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=SidebarBackHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarBackHeader.js","names":[],"sources":["../../src/shell/SidebarBackHeader.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Link } from \"alepha/react/router\";\nimport { ArrowLeft } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\n\nexport interface SidebarBackHeaderProps {\n /**\n * Where the arrow leads: the application's home, out of a root shell such\n * as `/account` or `/admin` that is not drawn inside the application's own\n * chrome. Absent, there is no arrow, for an application with nowhere to\n * go back to.\n */\n href?: string;\n /**\n * Names the arrow for assistive technology, since it shows only an icon.\n */\n label: string;\n /**\n * What the header says beside the arrow: an icon and a title, or a whole\n * identity block. Hidden when the sidebar folds to its icon rail, where\n * the arrow alone stays.\n */\n children: ReactNode;\n}\n\n/**\n * A root shell's sidebar header with a way out: a back arrow to the\n * application's home, then what the area is.\n *\n * `/account` and `/admin` own the viewport, so the application's sidebar and\n * its links are gone while they are open, and the only other way back is an\n * item inside the account menu. The arrow is a real `Link`, so home can also\n * be opened in a new tab.\n *\n * Collapsed to the icon rail, the words go and the arrow stays: it is the\n * one part of the header a reader still needs there.\n */\nexport const SidebarBackHeader = (props: SidebarBackHeaderProps) => {\n return (\n <div className=\"flex min-w-0 items-center gap-2 px-2 py-1.5 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:px-0\">\n {props.href && (\n <Link\n href={props.href}\n aria-label={props.label}\n className=\"text-muted-foreground hover:bg-hover hover:text-foreground flex size-7 shrink-0 items-center justify-center rounded-md transition-colors\"\n >\n <ArrowLeft className=\"size-4 rtl:-scale-x-100\" />\n </Link>\n )}\n <div className=\"flex min-w-0 items-center gap-2 group-data-[collapsible=icon]:hidden\">\n {props.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAwCA,MAAa,qBAAqB,UAAkC;CAClE,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,MAAM,QACL,oBAAC,MAAD;GACE,MAAM,MAAM;GACZ,cAAY,MAAM;GAClB,WAAU;GAEV,UAAA,oBAAC,WAAD,EAAW,WAAU,0BAA2B,CAAA;EAC5C,CAAA,GAER,oBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,MAAM;EACJ,CAAA,CACF;;AAET"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSidebar } from "../core/Sidebar.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/shell/SidebarNavAutoClose.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Closes the mobile nav sheet when a link inside it is followed.
|
|
7
7
|
*
|
|
@@ -42,7 +42,6 @@ const SidebarNavAutoClose = (props) => {
|
|
|
42
42
|
children: props.children
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
//#endregion
|
|
46
45
|
export { SidebarNavAutoClose };
|
|
47
46
|
|
|
48
47
|
//# sourceMappingURL=SidebarNavAutoClose.js.map
|
package/dist/shell/Spotlight.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useNavEntries } from "./useNavEntries.js";
|
|
2
1
|
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../command/Command.js";
|
|
3
2
|
import { spotlightSearchText } from "./spotlightSearchText.js";
|
|
3
|
+
import { useNavEntries } from "./useNavEntries.js";
|
|
4
4
|
import { useRouter } from "alepha/react/router";
|
|
5
5
|
import { useI18n } from "alepha/react/i18n";
|
|
6
6
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/shell/Spotlight.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Command palette over the navigation tree. Opens on ⌘K / Ctrl+K (or via
|
|
11
11
|
* controlled `open`), searches page labels / keywords / descriptions, and
|
|
@@ -96,7 +96,6 @@ const Spotlight = (props) => {
|
|
|
96
96
|
})
|
|
97
97
|
});
|
|
98
98
|
};
|
|
99
|
-
//#endregion
|
|
100
99
|
export { Spotlight };
|
|
101
100
|
|
|
102
101
|
//# sourceMappingURL=Spotlight.js.map
|
|
@@ -6,6 +6,12 @@ export interface NavItem {
|
|
|
6
6
|
* Required for leaf items. Ignored when `children` is provided (the parent becomes a toggle group).
|
|
7
7
|
*/
|
|
8
8
|
href?: string;
|
|
9
|
+
/**
|
|
10
|
+
* When to fetch the page's code ahead of the click. `false` turns it off.
|
|
11
|
+
*
|
|
12
|
+
* @default "hover"
|
|
13
|
+
*/
|
|
14
|
+
prefetch?: "hover" | "visible" | false;
|
|
9
15
|
/**
|
|
10
16
|
* Either an icon *component* (e.g. a lucide `Users`) which is instantiated
|
|
11
17
|
* with the row's sizing className, or an already-rendered ReactNode element
|
|
@@ -29,6 +35,14 @@ export interface NavItem {
|
|
|
29
35
|
* Optional trailing badge (e.g. unread count). Hidden when the sidebar is collapsed to icons.
|
|
30
36
|
*/
|
|
31
37
|
badge?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* A trailing button revealed while the row is hovered or focused, a "+"
|
|
40
|
+
* by default: the place to create one more of what the entry lists. It
|
|
41
|
+
* takes the badge's slot while it shows, so a row with a count reads the
|
|
42
|
+
* count at rest and offers the action under the pointer. Leaf items only,
|
|
43
|
+
* and hidden when the sidebar is collapsed to icons.
|
|
44
|
+
*/
|
|
45
|
+
action?: NavItemAction;
|
|
32
46
|
/**
|
|
33
47
|
* When true the item is rendered muted, navigation is blocked, and the
|
|
34
48
|
* `tooltip` (if any) explains why. Use for paywalled / unavailable entries.
|
|
@@ -42,6 +56,28 @@ export interface NavItem {
|
|
|
42
56
|
*/
|
|
43
57
|
tooltip?: ReactNode;
|
|
44
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* The hover action of a {@link NavItem}.
|
|
61
|
+
*/
|
|
62
|
+
export interface NavItemAction {
|
|
63
|
+
/**
|
|
64
|
+
* Names the action for assistive technology and in its tooltip, since the
|
|
65
|
+
* button itself shows only an icon.
|
|
66
|
+
*/
|
|
67
|
+
label: string;
|
|
68
|
+
/**
|
|
69
|
+
* Defaults to a plus.
|
|
70
|
+
*/
|
|
71
|
+
icon?: IconType | ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* What a click does. Takes precedence over `href`.
|
|
74
|
+
*/
|
|
75
|
+
onClick?: () => void;
|
|
76
|
+
/**
|
|
77
|
+
* Where a click goes, when the action is a page rather than a dialog.
|
|
78
|
+
*/
|
|
79
|
+
href?: string;
|
|
80
|
+
}
|
|
45
81
|
export interface NavGroup {
|
|
46
82
|
label?: string;
|
|
47
83
|
items: NavItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appShellNav.d.ts","sourceRoot":"","sources":["../../src/shell/appShellNav.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,KAAK,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAG1D;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACvC;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAG5E;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAE1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,CAuBtD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,EACrB,SAAS,EAAE,MAAM,GAChB,SAAS,CAgBX"}
|
|
1
|
+
{"version":3,"file":"appShellNav.d.ts","sourceRoot":"","sources":["../../src/shell/appShellNav.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,KAAK,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IACvC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAG1D;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACvC;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAG5E;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAE1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,CAuBtD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,EACrB,SAAS,EAAE,MAAM,GAChB,SAAS,CAgBX"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/shell/appShellNav.tsx
|
|
4
4
|
function hasActiveDescendant(item) {
|
|
5
5
|
if (item.active) return true;
|
|
6
6
|
return (item.children ?? []).some(hasActiveDescendant);
|
|
@@ -57,7 +57,6 @@ function renderNavIcon(icon, className) {
|
|
|
57
57
|
}
|
|
58
58
|
return /* @__PURE__ */ jsx(icon, { className });
|
|
59
59
|
}
|
|
60
|
-
//#endregion
|
|
61
60
|
export { findOpenPath, hasActiveDescendant, isOpenPathPrefix, renderNavIcon, samePath };
|
|
62
61
|
|
|
63
62
|
//# sourceMappingURL=appShellNav.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appShellNav.js","names":["Icon"],"sources":["../../src/shell/appShellNav.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport type { ComponentType, ReactNode, SVGProps } from \"react\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface NavItem {\n label: ReactNode;\n /**\n * Required for leaf items. Ignored when `children` is provided (the parent becomes a toggle group).\n */\n href?: string;\n /**\n * Either an icon *component* (e.g. a lucide `Users`) which is instantiated\n * with the row's sizing className, or an already-rendered ReactNode element\n * (e.g. `<Users />`). The latter lets nav metadata declared on a `$page`\n * (which is pure React) carry its icon as a node — see `useNavTree`.\n */\n icon?: IconType | ReactNode;\n /**\n * When provided, renders as the active marker. Compare against current path.\n */\n active?: boolean;\n /**\n * Nested items. When set, the parent becomes a collapsible group.\n */\n children?: NavItem[];\n /**\n * Initial open state for groups. Defaults to true if any descendant is active.\n */\n defaultOpen?: boolean;\n /**\n * Optional trailing badge (e.g. unread count). Hidden when the sidebar is collapsed to icons.\n */\n badge?: ReactNode;\n /**\n * When true the item is rendered muted, navigation is blocked, and the\n * `tooltip` (if any) explains why. Use for paywalled / unavailable entries.\n */\n disabled?: boolean;\n /**\n * Hover tooltip shown on the row regardless of sidebar state. When the\n * item is `disabled`, this is the explanation surface (HoverCard, with\n * room to breathe). When the item is enabled, it surfaces as a regular\n * Tooltip on the trigger.\n */\n tooltip?: ReactNode;\n}\n\nexport interface NavGroup {\n label?: string;\n items: NavItem[];\n}\n\nexport function hasActiveDescendant(item: NavItem): boolean {\n if (item.active) return true;\n return (item.children ?? []).some(hasActiveDescendant);\n}\n\n/**\n * The one open branch of the nav tree, when `navAccordion` is on.\n *\n * A single path rather than a set of open ids, because \"one group open\" has to\n * mean one group open PER LEVEL: a nested group closing its own parent to open\n * itself would be a bug, not exclusivity. A path says both things at once - a\n * group is open exactly when its path is a prefix of this one, so opening a\n * sibling replaces the path (the sibling closes) while opening a child extends\n * it (the parent stays).\n *\n * Paths are indices into `nav`: `[groupIndex, itemIndex, ...childIndex]`.\n */\nexport interface NavAccordion {\n openPath: number[];\n setOpenPath: (path: number[]) => void;\n}\n\nexport function isOpenPathPrefix(path: number[], openPath: number[]): boolean {\n if (path.length === 0 || path.length > openPath.length) return false;\n return path.every((index, depth) => openPath[depth] === index);\n}\n\nexport function samePath(a: number[], b: number[]): boolean {\n return a.length === b.length && a.every((index, i) => b[i] === index);\n}\n\n/**\n * The path the accordion should be showing: the DEEPEST group holding the\n * active page, or failing that the first group asking for `defaultOpen`.\n *\n * Computed here, from the tree, rather than reported upwards by the item that\n * notices it is active. An item cannot set its parent's state during render\n * (React refuses to update another component mid-render), and doing it in an\n * effect costs a frame of the wrong group being open on every navigation.\n */\nexport function findOpenPath(nav: NavGroup[]): number[] {\n let fallback: number[] = [];\n\n const walk = (item: NavItem, path: number[]): number[] | undefined => {\n const children = item.children ?? [];\n if (children.length === 0) return undefined;\n for (let ci = 0; ci < children.length; ci++) {\n const deeper = walk(children[ci]!, [...path, ci]);\n if (deeper) return deeper;\n }\n if (hasActiveDescendant(item)) return path;\n if (fallback.length === 0 && item.defaultOpen) fallback = path;\n return undefined;\n };\n\n for (let gi = 0; gi < nav.length; gi++) {\n const items = nav[gi]?.items ?? [];\n for (let ii = 0; ii < items.length; ii++) {\n const found = walk(items[ii]!, [gi, ii]);\n if (found) return found;\n }\n }\n return fallback;\n}\n\n/**\n * Render a NavItem icon. An already-created element (e.g. `<Users />`, which\n * `React.isValidElement` recognises) is returned as-is; anything else is\n * treated as a component *type* — including lucide's `forwardRef` icons, which\n * are objects rather than plain functions — and instantiated with the row's\n * sizing className.\n */\nexport function renderNavIcon(\n icon: NavItem[\"icon\"],\n className: string,\n): ReactNode {\n if (icon == null || icon === false) return null;\n if (React.isValidElement(icon)) {\n // Already an element (e.g. `<Users />`): clone it to apply the row's sizing\n // className so element icons render at the same size as component icons,\n // merging with any className the caller already set.\n const existing = (icon.props as { className?: string })?.className;\n return React.cloneElement(\n icon as React.ReactElement<{ className?: string }>,\n {\n className: existing ? `${existing} ${className}` : className,\n },\n );\n }\n const Icon = icon as IconType;\n return <Icon className={className} />;\n}\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"appShellNav.js","names":["Icon"],"sources":["../../src/shell/appShellNav.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport type { ComponentType, ReactNode, SVGProps } from \"react\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface NavItem {\n label: ReactNode;\n /**\n * Required for leaf items. Ignored when `children` is provided (the parent becomes a toggle group).\n */\n href?: string;\n /**\n * When to fetch the page's code ahead of the click. `false` turns it off.\n *\n * @default \"hover\"\n */\n prefetch?: \"hover\" | \"visible\" | false;\n /**\n * Either an icon *component* (e.g. a lucide `Users`) which is instantiated\n * with the row's sizing className, or an already-rendered ReactNode element\n * (e.g. `<Users />`). The latter lets nav metadata declared on a `$page`\n * (which is pure React) carry its icon as a node — see `useNavTree`.\n */\n icon?: IconType | ReactNode;\n /**\n * When provided, renders as the active marker. Compare against current path.\n */\n active?: boolean;\n /**\n * Nested items. When set, the parent becomes a collapsible group.\n */\n children?: NavItem[];\n /**\n * Initial open state for groups. Defaults to true if any descendant is active.\n */\n defaultOpen?: boolean;\n /**\n * Optional trailing badge (e.g. unread count). Hidden when the sidebar is collapsed to icons.\n */\n badge?: ReactNode;\n /**\n * A trailing button revealed while the row is hovered or focused, a \"+\"\n * by default: the place to create one more of what the entry lists. It\n * takes the badge's slot while it shows, so a row with a count reads the\n * count at rest and offers the action under the pointer. Leaf items only,\n * and hidden when the sidebar is collapsed to icons.\n */\n action?: NavItemAction;\n /**\n * When true the item is rendered muted, navigation is blocked, and the\n * `tooltip` (if any) explains why. Use for paywalled / unavailable entries.\n */\n disabled?: boolean;\n /**\n * Hover tooltip shown on the row regardless of sidebar state. When the\n * item is `disabled`, this is the explanation surface (HoverCard, with\n * room to breathe). When the item is enabled, it surfaces as a regular\n * Tooltip on the trigger.\n */\n tooltip?: ReactNode;\n}\n\n/**\n * The hover action of a {@link NavItem}.\n */\nexport interface NavItemAction {\n /**\n * Names the action for assistive technology and in its tooltip, since the\n * button itself shows only an icon.\n */\n label: string;\n /**\n * Defaults to a plus.\n */\n icon?: IconType | ReactNode;\n /**\n * What a click does. Takes precedence over `href`.\n */\n onClick?: () => void;\n /**\n * Where a click goes, when the action is a page rather than a dialog.\n */\n href?: string;\n}\n\nexport interface NavGroup {\n label?: string;\n items: NavItem[];\n}\n\nexport function hasActiveDescendant(item: NavItem): boolean {\n if (item.active) return true;\n return (item.children ?? []).some(hasActiveDescendant);\n}\n\n/**\n * The one open branch of the nav tree, when `navAccordion` is on.\n *\n * A single path rather than a set of open ids, because \"one group open\" has to\n * mean one group open PER LEVEL: a nested group closing its own parent to open\n * itself would be a bug, not exclusivity. A path says both things at once - a\n * group is open exactly when its path is a prefix of this one, so opening a\n * sibling replaces the path (the sibling closes) while opening a child extends\n * it (the parent stays).\n *\n * Paths are indices into `nav`: `[groupIndex, itemIndex, ...childIndex]`.\n */\nexport interface NavAccordion {\n openPath: number[];\n setOpenPath: (path: number[]) => void;\n}\n\nexport function isOpenPathPrefix(path: number[], openPath: number[]): boolean {\n if (path.length === 0 || path.length > openPath.length) return false;\n return path.every((index, depth) => openPath[depth] === index);\n}\n\nexport function samePath(a: number[], b: number[]): boolean {\n return a.length === b.length && a.every((index, i) => b[i] === index);\n}\n\n/**\n * The path the accordion should be showing: the DEEPEST group holding the\n * active page, or failing that the first group asking for `defaultOpen`.\n *\n * Computed here, from the tree, rather than reported upwards by the item that\n * notices it is active. An item cannot set its parent's state during render\n * (React refuses to update another component mid-render), and doing it in an\n * effect costs a frame of the wrong group being open on every navigation.\n */\nexport function findOpenPath(nav: NavGroup[]): number[] {\n let fallback: number[] = [];\n\n const walk = (item: NavItem, path: number[]): number[] | undefined => {\n const children = item.children ?? [];\n if (children.length === 0) return undefined;\n for (let ci = 0; ci < children.length; ci++) {\n const deeper = walk(children[ci]!, [...path, ci]);\n if (deeper) return deeper;\n }\n if (hasActiveDescendant(item)) return path;\n if (fallback.length === 0 && item.defaultOpen) fallback = path;\n return undefined;\n };\n\n for (let gi = 0; gi < nav.length; gi++) {\n const items = nav[gi]?.items ?? [];\n for (let ii = 0; ii < items.length; ii++) {\n const found = walk(items[ii]!, [gi, ii]);\n if (found) return found;\n }\n }\n return fallback;\n}\n\n/**\n * Render a NavItem icon. An already-created element (e.g. `<Users />`, which\n * `React.isValidElement` recognises) is returned as-is; anything else is\n * treated as a component *type* — including lucide's `forwardRef` icons, which\n * are objects rather than plain functions — and instantiated with the row's\n * sizing className.\n */\nexport function renderNavIcon(\n icon: NavItem[\"icon\"],\n className: string,\n): ReactNode {\n if (icon == null || icon === false) return null;\n if (React.isValidElement(icon)) {\n // Already an element (e.g. `<Users />`): clone it to apply the row's sizing\n // className so element icons render at the same size as component icons,\n // merging with any className the caller already set.\n const existing = (icon.props as { className?: string })?.className;\n return React.cloneElement(\n icon as React.ReactElement<{ className?: string }>,\n {\n className: existing ? `${existing} ${className}` : className,\n },\n );\n }\n const Icon = icon as IconType;\n return <Icon className={className} />;\n}\n"],"mappings":";;;AA6FA,SAAgB,oBAAoB,MAAwB;CAC1D,IAAI,KAAK,QAAQ,OAAO;CACxB,QAAQ,KAAK,YAAY,CAAC,EAAA,CAAG,KAAK,mBAAmB;AACvD;AAmBA,SAAgB,iBAAiB,MAAgB,UAA6B;CAC5E,IAAI,KAAK,WAAW,KAAK,KAAK,SAAS,SAAS,QAAQ,OAAO;CAC/D,OAAO,KAAK,OAAO,OAAO,UAAU,SAAS,WAAW,KAAK;AAC/D;AAEA,SAAgB,SAAS,GAAa,GAAsB;CAC1D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,OAAO,MAAM,EAAE,OAAO,KAAK;AACtE;;;;;;;;;;AAWA,SAAgB,aAAa,KAA2B;CACtD,IAAI,WAAqB,CAAC;CAE1B,MAAM,QAAQ,MAAe,SAAyC;EACpE,MAAM,WAAW,KAAK,YAAY,CAAC;EACnC,IAAI,SAAS,WAAW,GAAG,OAAO,KAAA;EAClC,KAAK,IAAI,KAAK,GAAG,KAAK,SAAS,QAAQ,MAAM;GAC3C,MAAM,SAAS,KAAK,SAAS,KAAM,CAAC,GAAG,MAAM,EAAE,CAAC;GAChD,IAAI,QAAQ,OAAO;EACrB;EACA,IAAI,oBAAoB,IAAI,GAAG,OAAO;EACtC,IAAI,SAAS,WAAW,KAAK,KAAK,aAAa,WAAW;CAE5D;CAEA,KAAK,IAAI,KAAK,GAAG,KAAK,IAAI,QAAQ,MAAM;EACtC,MAAM,QAAQ,IAAI,GAAG,EAAE,SAAS,CAAC;EACjC,KAAK,IAAI,KAAK,GAAG,KAAK,MAAM,QAAQ,MAAM;GACxC,MAAM,QAAQ,KAAK,MAAM,KAAM,CAAC,IAAI,EAAE,CAAC;GACvC,IAAI,OAAO,OAAO;EACpB;CACF;CACA,OAAO;AACT;;;;;;;;AASA,SAAgB,cACd,MACA,WACW;CACX,IAAI,QAAQ,QAAQ,SAAS,OAAO,OAAO;CAC3C,IAAI,MAAM,eAAe,IAAI,GAAG;EAI9B,MAAM,WAAY,KAAK,OAAkC;EACzD,OAAO,MAAM,aACX,MACA,EACE,WAAW,WAAW,GAAG,SAAS,GAAG,cAAc,UACrD,CACF;CACF;CAEA,OAAO,oBAACA,MAAD,EAAiB,UAAY,CAAA;AACtC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $atom, z } from "alepha";
|
|
2
|
-
|
|
2
|
+
// src/shell/inboxUnreadAtom.ts
|
|
3
3
|
/**
|
|
4
4
|
* How many messages the signed-in viewer has not read, **across every
|
|
5
5
|
* scope**.
|
|
@@ -23,7 +23,6 @@ const inboxUnreadAtom = $atom({
|
|
|
23
23
|
schema: z.object({ count: z.integer() }),
|
|
24
24
|
default: { count: 0 }
|
|
25
25
|
});
|
|
26
|
-
//#endregion
|
|
27
26
|
export { inboxUnreadAtom };
|
|
28
27
|
|
|
29
28
|
//# sourceMappingURL=inboxUnreadAtom.js.map
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { ActionErrorToaster, type ActionErrorToasterProps, } from "./ActionError
|
|
|
19
19
|
export { $pageNav, type PageNavOptions } from "./$pageNav.tsx";
|
|
20
20
|
export { AppActions, type AppActionsProps } from "./AppActions.tsx";
|
|
21
21
|
export { AppShell, type AppShellProps, type NavigationProgressOptions, } from "./AppShell.tsx";
|
|
22
|
-
export type { NavGroup, NavItem } from "./appShellNav.tsx";
|
|
22
|
+
export type { NavGroup, NavItem, NavItemAction } from "./appShellNav.tsx";
|
|
23
23
|
export { ButtonDark, type ButtonDarkProps } from "./ButtonDark.tsx";
|
|
24
24
|
export { ButtonInbox, type ButtonInboxProps } from "./ButtonInbox.tsx";
|
|
25
25
|
export { ButtonLanguage, type ButtonLanguageProps } from "./ButtonLanguage.tsx";
|
|
@@ -40,6 +40,7 @@ export { NavigationProgress, type NavigationProgressProps, } from "./NavigationP
|
|
|
40
40
|
export { NavShell, type NavShellProps } from "./NavShell.tsx";
|
|
41
41
|
export { PlateLayout, type PlateLayoutProps } from "./PlateLayout.tsx";
|
|
42
42
|
export type { PlateTab } from "./PlateTabBar.tsx";
|
|
43
|
+
export { SidebarBackHeader, type SidebarBackHeaderProps, } from "./SidebarBackHeader.tsx";
|
|
43
44
|
export { SidebarNavAutoClose } from "./SidebarNavAutoClose.tsx";
|
|
44
45
|
export { Spotlight, type SpotlightProps } from "./Spotlight.tsx";
|
|
45
46
|
export { useDetailTab } from "./useDetailTab.tsx";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,yBAAyB,GAC/B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,yBAAyB,GAC/B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,YAAY,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AAC1F,YAAY,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACxF,YAAY,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,YAAY,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACtF,YAAY,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAClF,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,YAAY,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/shell/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
+
import { ActionErrorToaster } from "./ActionErrorToaster.js";
|
|
1
2
|
import { $pageNav } from "./$pageNav.js";
|
|
3
|
+
import { AppActions } from "./AppActions.js";
|
|
4
|
+
import { AppShell } from "./AppShell.js";
|
|
2
5
|
import { ButtonDark } from "./ButtonDark.js";
|
|
6
|
+
import { ButtonInbox } from "./ButtonInbox.js";
|
|
3
7
|
import { ButtonLanguage } from "./ButtonLanguage.js";
|
|
8
|
+
import { ButtonSettings } from "./ButtonSettings.js";
|
|
4
9
|
import { ButtonTheme } from "./ButtonTheme.js";
|
|
5
10
|
import { ButtonUser } from "./ButtonUser.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
11
|
+
import { DetailAside } from "./DetailAside.js";
|
|
12
|
+
import { DetailLayout } from "./DetailLayout.js";
|
|
13
|
+
import { inboxUnreadAtom } from "./inboxUnreadAtom.js";
|
|
8
14
|
import { NavigationProgress } from "./NavigationProgress.js";
|
|
9
|
-
import { SidebarNavAutoClose } from "./SidebarNavAutoClose.js";
|
|
10
|
-
import { AppShell } from "./AppShell.js";
|
|
11
15
|
import { NavShell } from "./NavShell.js";
|
|
16
|
+
import { PlateLayout } from "./PlateLayout.js";
|
|
17
|
+
import { SidebarBackHeader } from "./SidebarBackHeader.js";
|
|
18
|
+
import { SidebarNavAutoClose } from "./SidebarNavAutoClose.js";
|
|
12
19
|
import { Spotlight } from "./Spotlight.js";
|
|
13
|
-
import { DetailLayout } from "./DetailLayout.js";
|
|
14
20
|
import { useDetailTab } from "./useDetailTab.js";
|
|
15
|
-
|
|
16
|
-
import { AppActions } from "./AppActions.js";
|
|
17
|
-
import { inboxUnreadAtom } from "./inboxUnreadAtom.js";
|
|
18
|
-
import { ButtonInbox } from "./ButtonInbox.js";
|
|
19
|
-
import { PlateLayout } from "./PlateLayout.js";
|
|
20
|
-
export { $pageNav, ActionErrorToaster, AppActions, AppShell, ButtonDark, ButtonInbox, ButtonLanguage, ButtonSettings, ButtonTheme, ButtonUser, DetailAside, DetailLayout, NavShell, NavigationProgress, PlateLayout, SidebarNavAutoClose, Spotlight, inboxUnreadAtom, useDetailTab };
|
|
21
|
+
export { $pageNav, ActionErrorToaster, AppActions, AppShell, ButtonDark, ButtonInbox, ButtonLanguage, ButtonSettings, ButtonTheme, ButtonUser, DetailAside, DetailLayout, NavShell, NavigationProgress, PlateLayout, SidebarBackHeader, SidebarNavAutoClose, Spotlight, inboxUnreadAtom, useDetailTab };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/shell/navTreeUtil.ts
|
|
2
2
|
/**
|
|
3
3
|
* A page's nav metadata, widened to the shell's own {@link NavMeta}.
|
|
4
4
|
*
|
|
@@ -104,7 +104,6 @@ function keepDeepestActive(entries) {
|
|
|
104
104
|
for (const entry of entries) if (entry.active && entry.href.length < deepest) entry.active = false;
|
|
105
105
|
return entries;
|
|
106
106
|
}
|
|
107
|
-
//#endregion
|
|
108
107
|
export { hasNavPermission, isActivePath, isDescendantOf, keepDeepestActive, navGroupLabel, navLabel, navMeta };
|
|
109
108
|
|
|
110
109
|
//# sourceMappingURL=navTreeUtil.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/shell/spotlightSearchText.ts
|
|
2
2
|
/**
|
|
3
3
|
* A `ReactNode` label as searchable text. A component label contributes
|
|
4
4
|
* nothing, which is what `nav.keywords` is for.
|
|
@@ -22,7 +22,6 @@ const spotlightSearchText = (entry) => {
|
|
|
22
22
|
const value = `${entry.name} ${toText(entry.label)}`;
|
|
23
23
|
return keywords.length > 0 ? `${value} ${keywords.join(" ")}` : value;
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { spotlightSearchText };
|
|
27
26
|
|
|
28
27
|
//# sourceMappingURL=spotlightSearchText.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "alepha";
|
|
2
2
|
import { useQueryParams } from "alepha/react/router";
|
|
3
3
|
import { useCallback } from "react";
|
|
4
|
-
|
|
4
|
+
// src/shell/useDetailTab.tsx
|
|
5
5
|
/**
|
|
6
6
|
* `.tsx` despite holding no JSX, like `useConfirmedAction.tsx`: both were named
|
|
7
7
|
* when the package exported one wildcard subpath per component, which resolved
|
|
@@ -31,7 +31,6 @@ const useDetailTab = (defaultTab) => {
|
|
|
31
31
|
const setTab = useCallback((next) => setQuery({ tab: next }), [setQuery]);
|
|
32
32
|
return [query.tab ?? defaultTab, setTab];
|
|
33
33
|
};
|
|
34
|
-
//#endregion
|
|
35
34
|
export { useDetailTab };
|
|
36
35
|
|
|
37
36
|
//# sourceMappingURL=useDetailTab.js.map
|
|
@@ -2,7 +2,7 @@ import { navLabel } from "./navTreeUtil.js";
|
|
|
2
2
|
import { useRouterState } from "alepha/react/router";
|
|
3
3
|
import { useI18n } from "alepha/react/i18n";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
|
-
|
|
5
|
+
// src/shell/useNavBreadcrumbs.ts
|
|
6
6
|
/**
|
|
7
7
|
* Derive the breadcrumb trail from the active route layers. Each rendered
|
|
8
8
|
* layer that carries a route becomes a crumb (labelled via {@link navLabel});
|
|
@@ -37,7 +37,6 @@ function useNavBreadcrumbs(options) {
|
|
|
37
37
|
lang
|
|
38
38
|
]);
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { useNavBreadcrumbs };
|
|
42
41
|
|
|
43
42
|
//# sourceMappingURL=useNavBreadcrumbs.js.map
|
|
@@ -3,7 +3,7 @@ import { useRouter, useRouterState } from "alepha/react/router";
|
|
|
3
3
|
import { useI18n } from "alepha/react/i18n";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { useAuth } from "alepha/react/auth";
|
|
6
|
-
|
|
6
|
+
// src/shell/useNavEntries.ts
|
|
7
7
|
/**
|
|
8
8
|
* Flat, filtered, sorted list of nav entries for the subtree under `root`.
|
|
9
9
|
* Filtering (hidden / permission / `can`), labelling and active-state matching
|
|
@@ -59,7 +59,6 @@ function useNavEntries(options) {
|
|
|
59
59
|
lang
|
|
60
60
|
]);
|
|
61
61
|
}
|
|
62
|
-
//#endregion
|
|
63
62
|
export { useNavEntries };
|
|
64
63
|
|
|
65
64
|
//# sourceMappingURL=useNavEntries.js.map
|
package/dist/shell/useNavTree.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useNavEntries } from "./useNavEntries.js";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
|
|
3
|
+
// src/shell/useNavTree.ts
|
|
4
4
|
/**
|
|
5
5
|
* Derive sidebar navigation groups from the route tree. Built on the shared
|
|
6
6
|
* {@link useNavEntries} (which handles filtering, permissions, `can`, labelling
|
|
@@ -42,7 +42,6 @@ function toNavItem(entry) {
|
|
|
42
42
|
active: entry.active
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
//#endregion
|
|
46
45
|
export { useNavTree };
|
|
47
46
|
|
|
48
47
|
//# sourceMappingURL=useNavTree.js.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Middleware } from "alepha";
|
|
2
|
+
import { type PagePrimitive } from "alepha/react/router";
|
|
3
|
+
import type { SwaggerExplorerProps } from "./SwaggerExplorer.tsx";
|
|
4
|
+
export interface UiSwaggerOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The page's name in the router, for `router.push(name)`.
|
|
7
|
+
*
|
|
8
|
+
* @default "swagger"
|
|
9
|
+
*/
|
|
10
|
+
name?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Where the explorer is mounted.
|
|
13
|
+
*
|
|
14
|
+
* @default "/docs"
|
|
15
|
+
*/
|
|
16
|
+
path?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Where the OpenAPI document is served: `<prefix>/json` of the app's
|
|
19
|
+
* `$swagger`, or any OpenAPI 3 document the browser may fetch.
|
|
20
|
+
*
|
|
21
|
+
* @default "/docs/json"
|
|
22
|
+
*/
|
|
23
|
+
spec?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The browser tab's title.
|
|
26
|
+
*
|
|
27
|
+
* @default "API"
|
|
28
|
+
*/
|
|
29
|
+
title?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Where to sign in, linked from a gated operation when nobody is signed in.
|
|
32
|
+
*
|
|
33
|
+
* @default "/auth/login"
|
|
34
|
+
*/
|
|
35
|
+
signIn?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Middlewares guarding the page, `[$secure({ roles: ["admin"] })]` for an
|
|
38
|
+
* explorer only the team should see. The OpenAPI document itself is served
|
|
39
|
+
* by `$swagger`: guard that route too, or the JSON stays public.
|
|
40
|
+
*/
|
|
41
|
+
use?: Middleware[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* An API explorer page, reading the app's OpenAPI document.
|
|
45
|
+
*
|
|
46
|
+
* `alepha/server/swagger` serves the document only (`$swagger`, at
|
|
47
|
+
* `/docs/json` by default); this is the viewer, built on `@alepha/ui`. It
|
|
48
|
+
* lists the operations by tag with a search, and shows each in full:
|
|
49
|
+
* parameters, request body, responses, their schemas, and what Alepha
|
|
50
|
+
* declared about it (the action, who may call it, middlewares, declared
|
|
51
|
+
* errors, timeout) from the `x-alepha-*` extensions. Each operation can be
|
|
52
|
+
* called from a form built from its schemas, as the signed-in user (the
|
|
53
|
+
* session cookie) or with a token typed in, and a gated one says whether the
|
|
54
|
+
* viewer's permissions reach it.
|
|
55
|
+
*
|
|
56
|
+
* The page and the document share the `/docs` prefix by default, which is
|
|
57
|
+
* fine: the page is `/docs`, the document `/docs/json`.
|
|
58
|
+
*
|
|
59
|
+
* ```ts
|
|
60
|
+
* import { $swagger } from "alepha/server/swagger";
|
|
61
|
+
* import { $uiSwagger } from "@alepha/ui/swagger";
|
|
62
|
+
*
|
|
63
|
+
* class App {
|
|
64
|
+
* openapi = $swagger({ info: { title: "Shop API", version: "1.0.0" } });
|
|
65
|
+
* docs = $uiSwagger();
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* It carries the `$` prefix to sit with the framework's other declarations
|
|
70
|
+
* at a call site, but it is a plain function wrapping `$page`, like
|
|
71
|
+
* `$pageAdmin`. The page component is a lazy chunk, so an app pays for the
|
|
72
|
+
* explorer only when someone opens it.
|
|
73
|
+
*/
|
|
74
|
+
export declare const $uiSwagger: (options?: UiSwaggerOptions) => PagePrimitive<any, SwaggerExplorerProps>;
|
|
75
|
+
//# sourceMappingURL=$uiSwagger.d.ts.map
|