@alepha/ui 0.34.0 → 0.35.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/dist/account/$pageAccount.js +1 -2
- package/dist/account/AccountBackToSiteMenuItem.js +1 -2
- package/dist/account/AccountBrand.js +1 -2
- 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.js +4 -5
- 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.js +2 -3
- 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.js +3 -4
- package/dist/ai/AiChatConfirmCard.js +1 -2
- package/dist/ai/AiChatHistory.js +2 -3
- package/dist/ai/AiChatMessage.js +1 -2
- 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.js +1 -1
- package/dist/ai/useAiChat.js +1 -2
- 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 +5 -6
- 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.js +37 -37
- package/dist/core/useDialog.js +1 -2
- package/dist/core/useIsMobile.js +1 -2
- package/dist/core/useToast.js +1 -2
- 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.js +1 -2
- package/dist/markdown/MarkdownView.js +1 -2
- 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.js +1 -2
- 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 +4 -3
- 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 +2 -2
- package/dist/shell/PlateTabBar.js.map +1 -1
- package/dist/shell/SidebarNavAutoClose.js +1 -2
- package/dist/shell/Spotlight.js +2 -3
- package/dist/shell/appShellNav.d.ts +6 -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.js +10 -10
- 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/table/DataTable.js +2 -3
- package/dist/table/DataTableBody.js +3 -4
- 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/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.js +2 -3
- package/dist/table/PermissionMatrixGroupRows.js +3 -4
- package/dist/table/PermissionMatrixRowLabel.js +1 -2
- 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/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 +2 -2
- package/dist/table/useDataTableData.d.ts.map +1 -1
- package/dist/table/useDataTableData.js +1 -2
- package/dist/table/useDataTableFilterForm.js +2 -3
- package/dist/table/useDataTableFilterVisibility.js +1 -2
- package/dist/table/useDataTableRefresh.js +1 -2
- package/dist/table/useDataTableSummary.js +1 -2
- 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/package.json +16 -16
- 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/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/analytics/analyticsModel.spec.ts +6 -6
- package/src/auth/AuthRegister.tsx +1 -3
- 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__/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/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/shell/AppShellSidebarNavItem.tsx +8 -0
- package/src/shell/ButtonLanguage.tsx +1 -1
- package/src/shell/ButtonSettingsLanguageMenu.tsx +1 -1
- package/src/shell/PlateTabBar.tsx +6 -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 +6 -0
- package/src/table/DataTableFilterBar.tsx +1 -1
- package/src/table/queryFilters.ts +1 -1
package/dist/form/FormField.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { cn } from "../core/utils.js";
|
|
2
1
|
import { Label } from "../core/Label.js";
|
|
2
|
+
import { cn } from "../core/utils.js";
|
|
3
3
|
import { useFormFieldLayout } from "./FormFieldLayoutProvider.js";
|
|
4
4
|
import { useFormFieldRequiredMarker } from "./FormFieldRequiredMarkerProvider.js";
|
|
5
5
|
import { createContext, useContext, useMemo } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/form/FormField.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Label + description + error wrapper shared by every Control variant.
|
|
10
10
|
*
|
|
@@ -142,7 +142,6 @@ const FormFieldA11yContext = createContext({});
|
|
|
142
142
|
function useFormFieldA11y() {
|
|
143
143
|
return useContext(FormFieldA11yContext);
|
|
144
144
|
}
|
|
145
|
-
//#endregion
|
|
146
145
|
export { FormField, formFieldAriaProps, formFieldDescriptionId, formFieldErrorId, useFormFieldA11y };
|
|
147
146
|
|
|
148
147
|
//# sourceMappingURL=FormField.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/form/FormFieldAutoSaveProvider.tsx
|
|
4
4
|
const FormFieldAutoSaveProvider = (props) => {
|
|
5
5
|
return /* @__PURE__ */ jsx(FormFieldAutoSaveContext.Provider, {
|
|
6
6
|
value: props.value,
|
|
@@ -22,7 +22,6 @@ const FormFieldAutoSaveContext = createContext(false);
|
|
|
22
22
|
function useFormFieldAutoSave() {
|
|
23
23
|
return useContext(FormFieldAutoSaveContext);
|
|
24
24
|
}
|
|
25
|
-
//#endregion
|
|
26
25
|
export { FormFieldAutoSaveProvider, useFormFieldAutoSave };
|
|
27
26
|
|
|
28
27
|
//# sourceMappingURL=FormFieldAutoSaveProvider.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/form/FormFieldLayoutProvider.tsx
|
|
4
4
|
const FormFieldLayoutProvider = (props) => {
|
|
5
5
|
return /* @__PURE__ */ jsx(FormFieldLayoutContext.Provider, {
|
|
6
6
|
value: props.value,
|
|
@@ -27,7 +27,6 @@ const FormFieldLayoutContext = createContext("stack");
|
|
|
27
27
|
function useFormFieldLayout() {
|
|
28
28
|
return useContext(FormFieldLayoutContext);
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
export { FormFieldLayoutProvider, useFormFieldLayout };
|
|
32
31
|
|
|
33
32
|
//# sourceMappingURL=FormFieldLayoutProvider.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/form/FormFieldRequiredMarkerProvider.tsx
|
|
4
4
|
const FormFieldRequiredMarkerProvider = (props) => {
|
|
5
5
|
return /* @__PURE__ */ jsx(FormFieldRequiredMarkerContext.Provider, {
|
|
6
6
|
value: props.value,
|
|
@@ -30,7 +30,6 @@ const FormFieldRequiredMarkerContext = createContext(true);
|
|
|
30
30
|
function useFormFieldRequiredMarker() {
|
|
31
31
|
return useContext(FormFieldRequiredMarkerContext);
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { FormFieldRequiredMarkerProvider, useFormFieldRequiredMarker };
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=FormFieldRequiredMarkerProvider.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "alepha";
|
|
2
2
|
import { isObjectOrUnionOfObjects } from "alepha/react/form";
|
|
3
|
-
|
|
3
|
+
// src/form/autoFormGroups.ts
|
|
4
4
|
const autoGroupSchema = (schema, opts) => {
|
|
5
5
|
const general = {
|
|
6
6
|
title: opts.defaultTitle ?? opts.tr?.("autoForm.general", { default: "General" }) ?? "General",
|
|
@@ -18,7 +18,6 @@ const autoGroupSchema = (schema, opts) => {
|
|
|
18
18
|
if (general.fields.length === 0) return groups;
|
|
19
19
|
return [general, ...groups];
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { autoGroupSchema };
|
|
23
22
|
|
|
24
23
|
//# sourceMappingURL=autoFormGroups.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/form/controlSelectOptions.ts
|
|
2
2
|
/**
|
|
3
3
|
* Internal sentinel for the "select every match" row. Same reasoning as
|
|
4
4
|
* `CLEAR_VALUE`: it never reaches a caller, because it is expanded into the
|
|
@@ -126,7 +126,6 @@ const resolveComboboxItems = (props, query, labelCache, tr) => {
|
|
|
126
126
|
]
|
|
127
127
|
};
|
|
128
128
|
};
|
|
129
|
-
//#endregion
|
|
130
129
|
export { optValue, resolveComboboxItems };
|
|
131
130
|
|
|
132
131
|
//# sourceMappingURL=controlSelectOptions.js.map
|
package/dist/form/dateOnly.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/form/dateOnly.ts
|
|
2
2
|
/**
|
|
3
3
|
* A date-only value (`YYYY-MM-DD`) names a calendar DAY, not an instant, so
|
|
4
4
|
* it is parsed and formatted in local parts.
|
|
@@ -23,7 +23,6 @@ const formatDateOnly = (date) => {
|
|
|
23
23
|
return `${date.getFullYear()}-${month}-${day}`;
|
|
24
24
|
};
|
|
25
25
|
const DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
|
|
26
|
-
//#endregion
|
|
27
26
|
export { DATE_ONLY, formatDateOnly, parseDateOnly };
|
|
28
27
|
|
|
29
28
|
//# sourceMappingURL=dateOnly.js.map
|
package/dist/form/fieldI18n.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/form/fieldI18n.ts
|
|
2
2
|
/**
|
|
3
3
|
* Fill `label`/`description` from the dictionary when the caller left them
|
|
4
4
|
* unset. A missing key makes `tr` echo the key back, so compare against it:
|
|
@@ -23,7 +23,6 @@ const resolveFieldI18n = (tr, prefix, name, current) => {
|
|
|
23
23
|
* Prefix for a child of `name`: `parameters.x.payg` + `dailyCapCents`.
|
|
24
24
|
*/
|
|
25
25
|
const childI18nPrefix = (prefix, name) => prefix ? `${prefix}.${name}` : void 0;
|
|
26
|
-
//#endregion
|
|
27
26
|
export { childI18nPrefix, resolveFieldI18n };
|
|
28
27
|
|
|
29
28
|
//# sourceMappingURL=fieldI18n.js.map
|
|
@@ -3,7 +3,7 @@ import { useI18n } from "alepha/react/i18n";
|
|
|
3
3
|
import { X } from "lucide-react";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/form/fieldTrigger.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Per-size trigger geometry. Kept as one table rather than scattered
|
|
9
9
|
* conditionals so a new size is one row and the axes cannot drift.
|
|
@@ -197,7 +197,6 @@ const ControlClearButton = (props) => {
|
|
|
197
197
|
children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
|
|
198
198
|
});
|
|
199
199
|
};
|
|
200
|
-
//#endregion
|
|
201
200
|
export { ControlClearButton, TRIGGER_CLASSES, TRIGGER_MINIMAL_CLASSES, TRIGGER_SIZES, TRIGGER_WRAPPER_CLASSES };
|
|
202
201
|
|
|
203
202
|
//# sourceMappingURL=fieldTrigger.js.map
|
package/dist/form/grid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "alepha";
|
|
2
2
|
import "react";
|
|
3
|
-
|
|
3
|
+
// src/form/grid.tsx
|
|
4
4
|
/**
|
|
5
5
|
* Decides the column-span (out of 12) for a control inside a 12-col grid.
|
|
6
6
|
*
|
|
@@ -51,7 +51,6 @@ const spanClass = (width) => {
|
|
|
51
51
|
if (width >= 25) return "col-span-12 sm:col-span-3";
|
|
52
52
|
return "col-span-12 sm:col-span-4";
|
|
53
53
|
};
|
|
54
|
-
//#endregion
|
|
55
54
|
export { spanClass, widthFor };
|
|
56
55
|
|
|
57
56
|
//# sourceMappingURL=grid.js.map
|
package/dist/form/iconHint.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AtSign, Calendar, Clock, Cog, Download, File, Hash, Key, Link, List, Lock, Phone, RotateCcw, ToggleLeft, Type, Upload, User, Wrench } from "lucide-react";
|
|
2
2
|
import "react";
|
|
3
|
-
|
|
3
|
+
// src/form/iconHint.tsx
|
|
4
4
|
const namedIcons = {
|
|
5
5
|
email: AtSign,
|
|
6
6
|
password: Lock,
|
|
@@ -29,7 +29,6 @@ const iconFor = (hint) => {
|
|
|
29
29
|
if (!hint) return void 0;
|
|
30
30
|
return namedIcons[hint];
|
|
31
31
|
};
|
|
32
|
-
//#endregion
|
|
33
32
|
export { iconFor };
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=iconHint.js.map
|
package/dist/form/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { AutoForm } from "./AutoForm.js";
|
|
2
|
+
import { Control, readSchemaControl, useDynamicControlRefresh } from "./Control.js";
|
|
1
3
|
import { ControlArray } from "./ControlArray.js";
|
|
2
|
-
import { FormFieldLayoutProvider, useFormFieldLayout } from "./FormFieldLayoutProvider.js";
|
|
3
|
-
import { FormFieldRequiredMarkerProvider, useFormFieldRequiredMarker } from "./FormFieldRequiredMarkerProvider.js";
|
|
4
|
-
import { FormField, formFieldAriaProps, formFieldDescriptionId, formFieldErrorId, useFormFieldA11y } from "./FormField.js";
|
|
5
4
|
import { ControlDate } from "./ControlDate.js";
|
|
6
5
|
import { ControlDateRange } from "./ControlDateRange.js";
|
|
7
6
|
import { ControlNumber } from "./ControlNumber.js";
|
|
8
|
-
import { spanClass, widthFor } from "./grid.js";
|
|
9
7
|
import { ControlObject } from "./ControlObject.js";
|
|
10
8
|
import { ControlPassword } from "./ControlPassword.js";
|
|
11
9
|
import { ControlSelect } from "./ControlSelect.js";
|
|
12
|
-
import { resizeImage } from "./resizeImage.js";
|
|
13
10
|
import { ControlUpload } from "./ControlUpload.js";
|
|
11
|
+
import { FormField, formFieldAriaProps, formFieldDescriptionId, formFieldErrorId, useFormFieldA11y } from "./FormField.js";
|
|
14
12
|
import { FormFieldAutoSaveProvider, useFormFieldAutoSave } from "./FormFieldAutoSaveProvider.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
13
|
+
import { FormFieldLayoutProvider, useFormFieldLayout } from "./FormFieldLayoutProvider.js";
|
|
14
|
+
import { FormFieldRequiredMarkerProvider, useFormFieldRequiredMarker } from "./FormFieldRequiredMarkerProvider.js";
|
|
15
|
+
import { spanClass, widthFor } from "./grid.js";
|
|
16
|
+
import { resizeImage } from "./resizeImage.js";
|
|
17
17
|
export { AutoForm, Control, ControlArray, ControlDate, ControlDateRange, ControlNumber, ControlObject, ControlPassword, ControlSelect, ControlUpload, FormField, FormFieldAutoSaveProvider, FormFieldLayoutProvider, FormFieldRequiredMarkerProvider, formFieldAriaProps, formFieldDescriptionId, formFieldErrorId, readSchemaControl, resizeImage, spanClass, useDynamicControlRefresh, useFormFieldA11y, useFormFieldAutoSave, useFormFieldLayout, useFormFieldRequiredMarker, widthFor };
|
package/dist/form/resizeImage.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/form/resizeImage.ts
|
|
2
2
|
/**
|
|
3
3
|
* Downscales an image in the browser before it is uploaded.
|
|
4
4
|
*
|
|
@@ -62,7 +62,6 @@ const renameFor = (name, type) => {
|
|
|
62
62
|
const dot = name.lastIndexOf(".");
|
|
63
63
|
return `${dot > 0 ? name.slice(0, dot) : name}.${extension}`;
|
|
64
64
|
};
|
|
65
|
-
//#endregion
|
|
66
65
|
export { resizeImage };
|
|
67
66
|
|
|
68
67
|
//# sourceMappingURL=resizeImage.js.map
|
package/dist/i18n/fr/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { uiFr };
|
|
1
|
+
export { uiFr } from "./uiFr.js";
|
package/dist/i18n/fr/uiFr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/i18n/fr/uiFr.ts
|
|
2
2
|
/**
|
|
3
3
|
* French strings for every component in this package.
|
|
4
4
|
*
|
|
@@ -1101,7 +1101,6 @@ const uiFr = {
|
|
|
1101
1101
|
"organizations.transfer.title": "Transférer la propriété",
|
|
1102
1102
|
"organizations.transfer.yourRank": "Votre nouveau rang"
|
|
1103
1103
|
};
|
|
1104
|
-
//#endregion
|
|
1105
1104
|
export { uiFr };
|
|
1106
1105
|
|
|
1107
1106
|
//# sourceMappingURL=uiFr.js.map
|
|
@@ -7,7 +7,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
7
7
|
import "./MarkdownView.css";
|
|
8
8
|
import ReactMarkdown from "react-markdown";
|
|
9
9
|
import remarkGfm from "remark-gfm";
|
|
10
|
-
|
|
10
|
+
// src/markdown/MarkdownView.tsx
|
|
11
11
|
/**
|
|
12
12
|
* Both parsers, both layouts (`graphre` for the flowchart, arithmetic for
|
|
13
13
|
* the sequence diagram) and both emitters, pulled in ONLY when a document
|
|
@@ -210,7 +210,6 @@ const mermaidSource = (node) => {
|
|
|
210
210
|
const text = code.children?.filter((child) => child.type === "text").map((child) => child.value ?? "").join("");
|
|
211
211
|
return text?.trim() ? text : void 0;
|
|
212
212
|
};
|
|
213
|
-
//#endregion
|
|
214
213
|
export { MarkdownView };
|
|
215
214
|
|
|
216
215
|
//# sourceMappingURL=MarkdownView.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/markdown/SpoilerSpan.tsx
|
|
4
4
|
/**
|
|
5
5
|
* A `||spoiler||`, hidden until the reader asks for it.
|
|
6
6
|
*
|
|
@@ -47,7 +47,6 @@ const SpoilerSpan = (props) => {
|
|
|
47
47
|
children: props.children
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
//#endregion
|
|
51
50
|
export { SpoilerSpan };
|
|
52
51
|
|
|
53
52
|
//# sourceMappingURL=SpoilerSpan.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from "react";
|
|
2
|
-
|
|
2
|
+
// src/markdown/diagram/DiagramErrorBoundary.tsx
|
|
3
3
|
/**
|
|
4
4
|
* Renders the code block instead of the diagram if anything below throws.
|
|
5
5
|
*
|
|
@@ -19,7 +19,6 @@ var DiagramErrorBoundary = class extends Component {
|
|
|
19
19
|
return this.state.failed ? this.props.fallback : this.props.children;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { DiagramErrorBoundary };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=DiagramErrorBoundary.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DIAGRAM_LINE_HEIGHT } from "./textMetrics.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/markdown/diagram/DiagramLabel.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Two decimals is plenty for a diagram and keeps the emitted attributes
|
|
7
7
|
* readable; a layout's raw coordinates carry a dozen.
|
|
@@ -37,7 +37,6 @@ const DiagramLabel = (props) => {
|
|
|
37
37
|
}, `${index}:${line}`))
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
//#endregion
|
|
41
40
|
export { DiagramLabel, round };
|
|
42
41
|
|
|
43
42
|
//# sourceMappingURL=DiagramLabel.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DIAGRAM_FONT_FAMILY } from "./textMetrics.js";
|
|
2
1
|
import { round } from "./DiagramLabel.js";
|
|
3
2
|
import { FlowchartDiagramCluster } from "./FlowchartDiagramCluster.js";
|
|
4
3
|
import { FlowchartDiagramEdge } from "./FlowchartDiagramEdge.js";
|
|
5
4
|
import { FlowchartDiagramNode } from "./FlowchartDiagramNode.js";
|
|
5
|
+
import { DIAGRAM_FONT_FAMILY } from "./textMetrics.js";
|
|
6
6
|
import { useId } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/markdown/diagram/FlowchartDiagram.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Draw a laid-out flowchart as themed SVG.
|
|
11
11
|
*
|
|
@@ -88,7 +88,6 @@ const FlowchartDiagram = (props) => {
|
|
|
88
88
|
]
|
|
89
89
|
});
|
|
90
90
|
};
|
|
91
|
-
//#endregion
|
|
92
91
|
export { FlowchartDiagram };
|
|
93
92
|
|
|
94
93
|
//# sourceMappingURL=FlowchartDiagram.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./textMetrics.js";
|
|
2
1
|
import { round } from "./DiagramLabel.js";
|
|
2
|
+
import "./textMetrics.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/markdown/diagram/FlowchartDiagramCluster.tsx
|
|
6
6
|
/**
|
|
7
7
|
* One `subgraph` box, drawn behind its members.
|
|
8
8
|
*
|
|
@@ -39,7 +39,6 @@ const FlowchartDiagramCluster = (props) => {
|
|
|
39
39
|
})]
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { FlowchartDiagramCluster };
|
|
44
43
|
|
|
45
44
|
//# sourceMappingURL=FlowchartDiagramCluster.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DiagramLabel, round } from "./DiagramLabel.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/markdown/diagram/FlowchartDiagramEdge.tsx
|
|
5
5
|
/**
|
|
6
6
|
* One routed edge, its arrowheads and its label chip.
|
|
7
7
|
*
|
|
@@ -62,7 +62,6 @@ const pathOf = (points) => {
|
|
|
62
62
|
}
|
|
63
63
|
return `${d} L${at(points.length - 1)}`;
|
|
64
64
|
};
|
|
65
|
-
//#endregion
|
|
66
65
|
export { FlowchartDiagramEdge };
|
|
67
66
|
|
|
68
67
|
//# sourceMappingURL=FlowchartDiagramEdge.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DiagramLabel, round } from "./DiagramLabel.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/markdown/diagram/FlowchartDiagramNode.tsx
|
|
5
5
|
/**
|
|
6
6
|
* One box and its label.
|
|
7
7
|
*
|
|
@@ -56,7 +56,6 @@ const FlowchartDiagramNode = (props) => {
|
|
|
56
56
|
})]
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
-
//#endregion
|
|
60
59
|
export { FlowchartDiagramNode };
|
|
61
60
|
|
|
62
61
|
//# sourceMappingURL=FlowchartDiagramNode.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { diagramKind } from "./diagramKind.js";
|
|
2
|
-
import { parseFlowchart } from "./flowchartParser.js";
|
|
3
|
-
import { parseSequence } from "./sequenceParser.js";
|
|
4
2
|
import { FlowchartDiagram } from "./FlowchartDiagram.js";
|
|
3
|
+
import { parseFlowchart } from "./flowchartParser.js";
|
|
5
4
|
import { layoutFlowchart } from "./layoutFlowchart.js";
|
|
6
5
|
import { layoutSequence } from "./layoutSequence.js";
|
|
7
6
|
import { SequenceDiagram } from "./SequenceDiagram.js";
|
|
7
|
+
import { parseSequence } from "./sequenceParser.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/markdown/diagram/MermaidFence.tsx
|
|
11
11
|
/**
|
|
12
12
|
* The lazy chunk's entry point, and the dispatcher between the two
|
|
13
13
|
* pipelines: read the header, parse, lay out, draw - or hand back the fence
|
|
@@ -45,7 +45,6 @@ const MermaidFence = (props) => {
|
|
|
45
45
|
}
|
|
46
46
|
return /* @__PURE__ */ jsx(Fragment$1, { children: props.fallback });
|
|
47
47
|
};
|
|
48
|
-
//#endregion
|
|
49
48
|
export { MermaidFence, MermaidFence as default };
|
|
50
49
|
|
|
51
50
|
//# sourceMappingURL=MermaidFence.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { DIAGRAM_FONT_FAMILY } from "./textMetrics.js";
|
|
2
1
|
import { round } from "./DiagramLabel.js";
|
|
3
2
|
import { SequenceDiagramFragment } from "./SequenceDiagramFragment.js";
|
|
4
3
|
import { SequenceDiagramMessage } from "./SequenceDiagramMessage.js";
|
|
5
4
|
import { SequenceDiagramNote } from "./SequenceDiagramNote.js";
|
|
6
5
|
import { SequenceDiagramParticipant } from "./SequenceDiagramParticipant.js";
|
|
6
|
+
import { DIAGRAM_FONT_FAMILY } from "./textMetrics.js";
|
|
7
7
|
import { useId } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
|
|
9
|
+
// src/markdown/diagram/SequenceDiagram.tsx
|
|
10
10
|
/**
|
|
11
11
|
* Draw a laid-out sequence diagram as themed SVG.
|
|
12
12
|
*
|
|
@@ -135,7 +135,6 @@ const SequenceDiagram = (props) => {
|
|
|
135
135
|
})
|
|
136
136
|
});
|
|
137
137
|
};
|
|
138
|
-
//#endregion
|
|
139
138
|
export { SequenceDiagram };
|
|
140
139
|
|
|
141
140
|
//# sourceMappingURL=SequenceDiagram.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { round } from "./DiagramLabel.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/markdown/diagram/SequenceDiagramFragment.tsx
|
|
5
5
|
/**
|
|
6
6
|
* The box around an `alt`, `opt` or `loop`, its corner tab, and a dashed
|
|
7
7
|
* divider at each `else`.
|
|
@@ -95,7 +95,6 @@ const SequenceDiagramFragment = (props) => {
|
|
|
95
95
|
]
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
|
-
//#endregion
|
|
99
98
|
export { SequenceDiagramFragment };
|
|
100
99
|
|
|
101
100
|
//# sourceMappingURL=SequenceDiagramFragment.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DiagramLabel, round } from "./DiagramLabel.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/markdown/diagram/SequenceDiagramMessage.tsx
|
|
5
5
|
/**
|
|
6
6
|
* One message: its line, its head and its label.
|
|
7
7
|
*
|
|
@@ -71,7 +71,6 @@ const pathOf = (points) => {
|
|
|
71
71
|
`L${at(3)}`
|
|
72
72
|
].join(" ");
|
|
73
73
|
};
|
|
74
|
-
//#endregion
|
|
75
74
|
export { SequenceDiagramMessage };
|
|
76
75
|
|
|
77
76
|
//# sourceMappingURL=SequenceDiagramMessage.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DiagramLabel, round } from "./DiagramLabel.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/markdown/diagram/SequenceDiagramNote.tsx
|
|
5
5
|
/**
|
|
6
6
|
* An annotation box with its text wrapped inside it.
|
|
7
7
|
*
|
|
@@ -33,7 +33,6 @@ const SequenceDiagramNote = (props) => {
|
|
|
33
33
|
})]
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { SequenceDiagramNote };
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=SequenceDiagramNote.js.map
|
|
@@ -2,7 +2,7 @@ import { DiagramLabel, round } from "./DiagramLabel.js";
|
|
|
2
2
|
import { SequenceDiagramParticipantActor } from "./SequenceDiagramParticipantActor.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/markdown/diagram/SequenceDiagramParticipant.tsx
|
|
6
6
|
/**
|
|
7
7
|
* One lifeline, with its header and footer.
|
|
8
8
|
*
|
|
@@ -55,7 +55,6 @@ const SequenceDiagramParticipant = (props) => {
|
|
|
55
55
|
})] }, `box@${round(top)}`))]
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
|
-
//#endregion
|
|
59
58
|
export { SequenceDiagramParticipant };
|
|
60
59
|
|
|
61
60
|
//# sourceMappingURL=SequenceDiagramParticipant.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DIAGRAM_LINE_HEIGHT } from "./textMetrics.js";
|
|
2
1
|
import { DiagramLabel, round } from "./DiagramLabel.js";
|
|
2
|
+
import { DIAGRAM_LINE_HEIGHT } from "./textMetrics.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/markdown/diagram/SequenceDiagramParticipantActor.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Head, body, arms and legs, with the name underneath.
|
|
8
8
|
*
|
|
@@ -59,7 +59,6 @@ const SequenceDiagramParticipantActor = (props) => {
|
|
|
59
59
|
* sits below the feet.
|
|
60
60
|
*/
|
|
61
61
|
const ACTOR_LABEL_GAP = 4;
|
|
62
|
-
//#endregion
|
|
63
62
|
export { SequenceDiagramParticipantActor };
|
|
64
63
|
|
|
65
64
|
//# sourceMappingURL=SequenceDiagramParticipantActor.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/markdown/diagram/diagramKind.ts
|
|
2
2
|
/**
|
|
3
3
|
* Which pipeline a ` ```mermaid ` fence belongs to, from its header line.
|
|
4
4
|
*
|
|
@@ -21,7 +21,6 @@ const diagramKind = (source) => {
|
|
|
21
21
|
if (/^sequenceDiagram\b/i.test(header)) return "sequence";
|
|
22
22
|
if (/^(?:flowchart|graph)\b/i.test(header)) return "flowchart";
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { diagramKind };
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=diagramKind.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/markdown/diagram/flowchartParser.ts
|
|
2
2
|
/**
|
|
3
3
|
* Parse the text inside a ` ```mermaid ` fence into a `GraphModel`.
|
|
4
4
|
*
|
|
@@ -364,7 +364,6 @@ const normalizeDirection = (raw) => {
|
|
|
364
364
|
const upper = raw.toUpperCase();
|
|
365
365
|
return upper === "TD" ? "TB" : upper;
|
|
366
366
|
};
|
|
367
|
-
//#endregion
|
|
368
367
|
export { parseFlowchart };
|
|
369
368
|
|
|
370
369
|
//# sourceMappingURL=flowchartParser.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { measureLabel, measureNode } from "./textMetrics.js";
|
|
2
2
|
import { graphlib, layout } from "graphre";
|
|
3
|
-
|
|
3
|
+
// src/markdown/diagram/layoutFlowchart.ts
|
|
4
4
|
/**
|
|
5
5
|
* The largest graph that gets laid out. Above it the caller falls back to
|
|
6
6
|
* the code block.
|
|
@@ -179,7 +179,6 @@ const depthOf = (id, model) => {
|
|
|
179
179
|
}
|
|
180
180
|
return depth;
|
|
181
181
|
};
|
|
182
|
-
//#endregion
|
|
183
182
|
export { MAX_GRAPH_EDGES, MAX_GRAPH_NODES, layoutFlowchart };
|
|
184
183
|
|
|
185
184
|
//# sourceMappingURL=layoutFlowchart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layoutFlowchart.js","names":[],"sources":["../../../src/markdown/diagram/layoutFlowchart.ts"],"sourcesContent":["import { graphlib, layout } from \"graphre\";\n\nimport type {\n GraphEdgeStyle,\n GraphModel,\n GraphNodeShape,\n} from \"./graphModel.ts\";\nimport { DIAGRAM_FONT_SIZE, measureLabel, measureNode } from \"./textMetrics.ts\";\n\n/**\n * The largest graph that gets laid out. Above it the caller falls back to\n * the code block.\n *\n * Measured on an M-series laptop under Node 26, tree-shaped graphs: 50 nodes\n * 8 ms, 200 nodes 31 ms, 500 nodes 106 ms, 1000 nodes 310 ms, 2000 nodes\n * 1.2 s. Phones are several times slower. A pasted graph dump must not be\n * able to freeze the page.\n */\nexport const MAX_GRAPH_NODES = 200;\nexport const MAX_GRAPH_EDGES = 400;\n\nexport interface PositionedNode {\n id: string;\n /**\n * TOP-LEFT corner, in graph units. graphre reports CENTRES, for nodes and\n * clusters alike; the conversion happens here, once, rather than in the\n * emitter - an emitter half a box off looks almost right, which is the\n * worst way for this to be wrong.\n */\n x: number;\n y: number;\n width: number;\n height: number;\n /**\n * The lines as MEASURED - wrapped and capped. Draw exactly these.\n */\n lines: string[];\n shape: GraphNodeShape;\n}\n\nexport interface PositionedCluster {\n id: string;\n label: string;\n /**\n * TOP-LEFT corner, same convention as `PositionedNode`.\n */\n x: number;\n y: number;\n width: number;\n height: number;\n /**\n * 0 for an outermost `subgraph`, 1 for one nested inside it, and so on.\n */\n depth: number;\n}\n\nexport interface PositionedEdgeLabel {\n lines: string[];\n /**\n * TOP-LEFT corner, same convention as `PositionedNode`.\n */\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface PositionedEdge {\n from: string;\n to: string;\n style: GraphEdgeStyle;\n arrowStart: boolean;\n arrowEnd: boolean;\n /**\n * The polyline graphre routed, in order, in graph units.\n */\n points: Array<{ x: number; y: number }>;\n label?: PositionedEdgeLabel;\n}\n\n/**\n * A laid-out flowchart: data, not markup. No SVG, no React, no strings, no\n * DOM. This is the seam that keeps a second emitter possible without\n * redoing the hard part.\n */\nexport interface PositionedGraph {\n width: number;\n height: number;\n fontSize: number;\n nodes: PositionedNode[];\n /**\n * Outermost first, so an emitter can draw them in order and get z-order free.\n */\n clusters: PositionedCluster[];\n edges: PositionedEdge[];\n}\n\n/**\n * Run `graphre` over a `GraphModel` and read positions back out.\n *\n * Returns `undefined` (never throws, and never returns a partial graph)\n * for an empty model, a model past the caps, or anything graphre refuses.\n * The caller's fallback is the original code block, and graphre must never\n * throw into React.\n *\n * ## Why graphre\n *\n * It is dagre reimplemented in TypeScript with no dependencies: 62 kB\n * unpacked (~15.5 kB gzip) against `@dagrejs/dagre`'s 1.4 MB, same\n * algorithm, compound graphs included. It is frozen (last publish\n * 2022-05, CJS/UMD only, no ESM build) and that is accepted with eyes\n * open - Vite bundles it in both the client and the worker target, and\n * `@dagrejs/dagre` 3.1.1 is the drop-in fallback.\n *\n * **It is imported in this file and nowhere else**, deliberately: plain\n * Node ESM without a bundler sees only the default export, so if the\n * interop ever bites, it is a one-line fix in one place.\n */\nexport const layoutFlowchart = (\n model: GraphModel,\n fontSize: number = DIAGRAM_FONT_SIZE,\n): PositionedGraph | undefined => {\n if (model.nodes.length === 0) return undefined;\n if (model.nodes.length > MAX_GRAPH_NODES) return undefined;\n if (model.edges.length > MAX_GRAPH_EDGES) return undefined;\n\n try {\n return run(model, fontSize);\n } catch {\n return undefined;\n }\n};\n\nconst run = (\n model: GraphModel,\n fontSize: number,\n): PositionedGraph | undefined => {\n const known = new Set(model.nodes.map((n) => n.id));\n const clusterIds = new Set(model.clusters.map((c) => c.id));\n\n const g = new graphlib.Graph({ compound: true, multigraph: true });\n g.setGraph({\n rankdir: model.direction,\n nodesep: 36,\n ranksep: 44,\n edgesep: 12,\n marginx: 8,\n marginy: 8,\n });\n g.setDefaultEdgeLabel(() => ({}));\n\n const sizes = new Map<string, ReturnType<typeof measureNode>>();\n for (const node of model.nodes) {\n const size = measureNode(node, fontSize);\n sizes.set(node.id, size);\n g.setNode(node.id, { width: size.width, height: size.height });\n }\n\n // A cluster is a node with children, so it must exist before setParent.\n for (const cluster of model.clusters) {\n g.setNode(cluster.id, {});\n }\n for (const cluster of model.clusters) {\n if (cluster.parent && clusterIds.has(cluster.parent)) {\n g.setParent(cluster.id, cluster.parent);\n }\n }\n for (const node of model.nodes) {\n if (node.parent && clusterIds.has(node.parent)) {\n g.setParent(node.id, node.parent);\n }\n }\n\n // An edge whose endpoint is a cluster id makes graphre throw\n // (`Cannot set properties of undefined (setting 'rank')`), the same\n // limitation dagre has. The parser re-targets those, so one arriving here\n // is a parser bug - refuse the whole layout rather than draw a graph\n // missing an edge nobody will notice is missing.\n if (model.edges.some((e) => clusterIds.has(e.from) || clusterIds.has(e.to))) {\n return undefined;\n }\n\n // An edge naming a node that was never declared is a different case: it is\n // ordinary malformed input, and dropping it costs one arrow.\n const edges = model.edges.filter((e) => known.has(e.from) && known.has(e.to));\n\n const labels = new Map<string, PositionedEdgeLabel>();\n edges.forEach((edge, index) => {\n const name = String(index);\n const label = edge.label\n ? measureLabel(edge.label.split(\"\\n\"), fontSize)\n : undefined;\n g.setEdge(\n { v: edge.from, w: edge.to, name },\n label\n ? {\n width: label.width + EDGE_LABEL_PAD * 2,\n height: label.height + EDGE_LABEL_PAD,\n labelpos: \"c\" as never,\n }\n : {},\n );\n if (label) {\n labels.set(name, {\n lines: label.lines,\n x: 0,\n y: 0,\n width: label.width + EDGE_LABEL_PAD * 2,\n height: label.height + EDGE_LABEL_PAD,\n });\n }\n });\n\n layout(g as never);\n\n const graphLabel = g.graph() as { width?: number; height?: number };\n const width = graphLabel.width;\n const height = graphLabel.height;\n if (!Number.isFinite(width) || !Number.isFinite(height)) return undefined;\n\n const nodes: PositionedNode[] = [];\n for (const node of model.nodes) {\n const laid = g.node(node.id) as\n | { x?: number; y?: number; width?: number; height?: number }\n | undefined;\n const size = sizes.get(node.id);\n if (\n !laid ||\n !size ||\n !Number.isFinite(laid.x) ||\n !Number.isFinite(laid.y)\n ) {\n return undefined;\n }\n nodes.push({\n id: node.id,\n x: (laid.x as number) - size.width / 2,\n y: (laid.y as number) - size.height / 2,\n width: size.width,\n height: size.height,\n lines: size.lines,\n shape: node.shape,\n });\n }\n\n const clusters: PositionedCluster[] = [];\n for (const cluster of model.clusters) {\n const laid = g.node(cluster.id) as\n | { x?: number; y?: number; width?: number; height?: number }\n | undefined;\n if (!laid || !Number.isFinite(laid.x) || !Number.isFinite(laid.y)) continue;\n const boxWidth = laid.width ?? 0;\n const boxHeight = laid.height ?? 0;\n clusters.push({\n id: cluster.id,\n label: cluster.label,\n x: (laid.x as number) - boxWidth / 2,\n y: (laid.y as number) - boxHeight / 2,\n width: boxWidth,\n height: boxHeight,\n depth: depthOf(cluster.id, model),\n });\n }\n // Outermost first: an emitter that draws them in order gets z-order for\n // free, with no per-element z-index to keep in sync.\n clusters.sort((a, b) => a.depth - b.depth);\n\n const positionedEdges: PositionedEdge[] = [];\n edges.forEach((edge, index) => {\n const name = String(index);\n const laid = g.edge({ v: edge.from, w: edge.to, name }) as\n | { points?: Array<{ x: number; y: number }>; x?: number; y?: number }\n | undefined;\n const points = laid?.points?.filter(\n (p) => Number.isFinite(p.x) && Number.isFinite(p.y),\n );\n if (!points || points.length < 2) return;\n\n const label = labels.get(name);\n positionedEdges.push({\n from: edge.from,\n to: edge.to,\n style: edge.style,\n arrowStart: edge.arrowStart,\n arrowEnd: edge.arrowEnd,\n points,\n ...(label && Number.isFinite(laid?.x) && Number.isFinite(laid?.y)\n ? {\n label: {\n ...label,\n x: (laid?.x as number) - label.width / 2,\n y: (laid?.y as number) - label.height / 2,\n },\n }\n : {}),\n });\n });\n\n return {\n width: width as number,\n height: height as number,\n fontSize,\n nodes,\n clusters,\n edges: positionedEdges,\n };\n};\n\n/**\n * Breathing room around an edge label, so the line does not run into the\n * text before the emitter's chip covers it.\n */\nconst EDGE_LABEL_PAD = 6;\n\nconst depthOf = (id: string, model: GraphModel): number => {\n let depth = 0;\n let current = model.clusters.find((c) => c.id === id)?.parent;\n // Bounded by the cluster count: a malformed parent cycle must not hang.\n while (current && depth <= model.clusters.length) {\n depth++;\n current = model.clusters.find((c) => c.id === current)?.parent;\n }\n return depth;\n};\n"],"mappings":";;;;;;;;;;;;AAkBA,MAAa,kBAAkB;AAC/B,MAAa,kBAAkB;;;;;;;;;;;;;;;;;;;;;;AAmG/B,MAAa,mBACX,OACA,WAAA,OACgC;CAChC,IAAI,MAAM,MAAM,WAAW,GAAG,OAAO,KAAA;CACrC,IAAI,MAAM,MAAM,SAAA,KAA0B,OAAO,KAAA;CACjD,IAAI,MAAM,MAAM,SAAA,KAA0B,OAAO,KAAA;CAEjD,IAAI;EACF,OAAO,IAAI,OAAO,QAAQ;CAC5B,QAAQ;EACN;CACF;AACF;AAEA,MAAM,OACJ,OACA,aACgC;CAChC,MAAM,QAAQ,IAAI,IAAI,MAAM,MAAM,KAAK,MAAM,EAAE,EAAE,CAAC;CAClD,MAAM,aAAa,IAAI,IAAI,MAAM,SAAS,KAAK,MAAM,EAAE,EAAE,CAAC;CAE1D,MAAM,IAAI,IAAI,SAAS,MAAM;EAAE,UAAU;EAAM,YAAY;CAAK,CAAC;CACjE,EAAE,SAAS;EACT,SAAS,MAAM;EACf,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;CACX,CAAC;CACD,EAAE,2BAA2B,CAAC,EAAE;CAEhC,MAAM,wBAAQ,IAAI,IAA4C;CAC9D,KAAK,MAAM,QAAQ,MAAM,OAAO;EAC9B,MAAM,OAAO,YAAY,MAAM,QAAQ;EACvC,MAAM,IAAI,KAAK,IAAI,IAAI;EACvB,EAAE,QAAQ,KAAK,IAAI;GAAE,OAAO,KAAK;GAAO,QAAQ,KAAK;EAAO,CAAC;CAC/D;CAGA,KAAK,MAA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AAC,UAAU,OAAO,SAAS,GAAG;EAElC,MAAM,QAAQ,OAAO,IAAI,IAAI;EAC7B,gBAAgB,KAAK;GACnB,MAAM,KAAK;GACX,IAAI,KAAK;GACT,OAAO,KAAK;GACZ,YAAY,KAAK;GACjB,UAAU,KAAK;GACf;GACA,GAAI,SAAS,OAAO,SAAS,MAAM,CAAC,KAAK,OAAO,SAAS,MAAM,CAAC,IAC5D,EACE,OAAO;IACL,GAAG;IACH,GAAI,MAAM,IAAe,MAAM,QAAQ;IACvC,GAAI,MAAM,IAAe,MAAM,SAAS;GAC1C,EACF,IACA,CAAC;EACP,CAAC;CACH,CAAC;CAED,OAAO;EACE;EACC;EACR;EACA;EACA;EACA,OAAO;CACT;AACF;;;;;AAMA,MAAM,iBAAiB;AAEvB,MAAM,WAAW,IAAY,UAA8B;CACzD,IAAI,QAAQ;CACZ,IAAI,UAAU,MAAM,SAAS,MAAM,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE;CAEvD,OAAO,WAAW,SAAS,MAAM,SAAS,QAAQ;EAChD;EACA,UAAU,MAAM,SAAS,MAAM,MAAM,EAAE,OAAO,OAAO,CAAC,EAAE;CAC1D;CACA,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"layoutFlowchart.js","names":[],"sources":["../../../src/markdown/diagram/layoutFlowchart.ts"],"sourcesContent":["import { graphlib, layout } from \"graphre\";\n\nimport type {\n GraphEdgeStyle,\n GraphModel,\n GraphNodeShape,\n} from \"./graphModel.ts\";\nimport { DIAGRAM_FONT_SIZE, measureLabel, measureNode } from \"./textMetrics.ts\";\n\n/**\n * The largest graph that gets laid out. Above it the caller falls back to\n * the code block.\n *\n * Measured on an M-series laptop under Node 26, tree-shaped graphs: 50 nodes\n * 8 ms, 200 nodes 31 ms, 500 nodes 106 ms, 1000 nodes 310 ms, 2000 nodes\n * 1.2 s. Phones are several times slower. A pasted graph dump must not be\n * able to freeze the page.\n */\nexport const MAX_GRAPH_NODES = 200;\nexport const MAX_GRAPH_EDGES = 400;\n\nexport interface PositionedNode {\n id: string;\n /**\n * TOP-LEFT corner, in graph units. graphre reports CENTRES, for nodes and\n * clusters alike; the conversion happens here, once, rather than in the\n * emitter - an emitter half a box off looks almost right, which is the\n * worst way for this to be wrong.\n */\n x: number;\n y: number;\n width: number;\n height: number;\n /**\n * The lines as MEASURED - wrapped and capped. Draw exactly these.\n */\n lines: string[];\n shape: GraphNodeShape;\n}\n\nexport interface PositionedCluster {\n id: string;\n label: string;\n /**\n * TOP-LEFT corner, same convention as `PositionedNode`.\n */\n x: number;\n y: number;\n width: number;\n height: number;\n /**\n * 0 for an outermost `subgraph`, 1 for one nested inside it, and so on.\n */\n depth: number;\n}\n\nexport interface PositionedEdgeLabel {\n lines: string[];\n /**\n * TOP-LEFT corner, same convention as `PositionedNode`.\n */\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface PositionedEdge {\n from: string;\n to: string;\n style: GraphEdgeStyle;\n arrowStart: boolean;\n arrowEnd: boolean;\n /**\n * The polyline graphre routed, in order, in graph units.\n */\n points: Array<{ x: number; y: number }>;\n label?: PositionedEdgeLabel;\n}\n\n/**\n * A laid-out flowchart: data, not markup. No SVG, no React, no strings, no\n * DOM. This is the seam that keeps a second emitter possible without\n * redoing the hard part.\n */\nexport interface PositionedGraph {\n width: number;\n height: number;\n fontSize: number;\n nodes: PositionedNode[];\n /**\n * Outermost first, so an emitter can draw them in order and get z-order free.\n */\n clusters: PositionedCluster[];\n edges: PositionedEdge[];\n}\n\n/**\n * Run `graphre` over a `GraphModel` and read positions back out.\n *\n * Returns `undefined` (never throws, and never returns a partial graph)\n * for an empty model, a model past the caps, or anything graphre refuses.\n * The caller's fallback is the original code block, and graphre must never\n * throw into React.\n *\n * ## Why graphre\n *\n * It is dagre reimplemented in TypeScript with no dependencies: 62 kB\n * unpacked (~15.5 kB gzip) against `@dagrejs/dagre`'s 1.4 MB, same\n * algorithm, compound graphs included. It is frozen (last publish\n * 2022-05, CJS/UMD only, no ESM build) and that is accepted with eyes\n * open - Vite bundles it in both the client and the worker target, and\n * `@dagrejs/dagre` 3.1.1 is the drop-in fallback.\n *\n * **It is imported in this file and nowhere else**, deliberately: plain\n * Node ESM without a bundler sees only the default export, so if the\n * interop ever bites, it is a one-line fix in one place.\n */\nexport const layoutFlowchart = (\n model: GraphModel,\n fontSize: number = DIAGRAM_FONT_SIZE,\n): PositionedGraph | undefined => {\n if (model.nodes.length === 0) return undefined;\n if (model.nodes.length > MAX_GRAPH_NODES) return undefined;\n if (model.edges.length > MAX_GRAPH_EDGES) return undefined;\n\n try {\n return run(model, fontSize);\n } catch {\n return undefined;\n }\n};\n\nconst run = (\n model: GraphModel,\n fontSize: number,\n): PositionedGraph | undefined => {\n const known = new Set(model.nodes.map((n) => n.id));\n const clusterIds = new Set(model.clusters.map((c) => c.id));\n\n const g = new graphlib.Graph({ compound: true, multigraph: true });\n g.setGraph({\n rankdir: model.direction,\n nodesep: 36,\n ranksep: 44,\n edgesep: 12,\n marginx: 8,\n marginy: 8,\n });\n g.setDefaultEdgeLabel(() => ({}));\n\n const sizes = new Map<string, ReturnType<typeof measureNode>>();\n for (const node of model.nodes) {\n const size = measureNode(node, fontSize);\n sizes.set(node.id, size);\n g.setNode(node.id, { width: size.width, height: size.height });\n }\n\n // A cluster is a node with children, so it must exist before setParent.\n for (const cluster of model.clusters) {\n g.setNode(cluster.id, {});\n }\n for (const cluster of model.clusters) {\n if (cluster.parent && clusterIds.has(cluster.parent)) {\n g.setParent(cluster.id, cluster.parent);\n }\n }\n for (const node of model.nodes) {\n if (node.parent && clusterIds.has(node.parent)) {\n g.setParent(node.id, node.parent);\n }\n }\n\n // An edge whose endpoint is a cluster id makes graphre throw\n // (`Cannot set properties of undefined (setting 'rank')`), the same\n // limitation dagre has. The parser re-targets those, so one arriving here\n // is a parser bug - refuse the whole layout rather than draw a graph\n // missing an edge nobody will notice is missing.\n if (model.edges.some((e) => clusterIds.has(e.from) || clusterIds.has(e.to))) {\n return undefined;\n }\n\n // An edge naming a node that was never declared is a different case: it is\n // ordinary malformed input, and dropping it costs one arrow.\n const edges = model.edges.filter((e) => known.has(e.from) && known.has(e.to));\n\n const labels = new Map<string, PositionedEdgeLabel>();\n edges.forEach((edge, index) => {\n const name = String(index);\n const label = edge.label\n ? measureLabel(edge.label.split(\"\\n\"), fontSize)\n : undefined;\n g.setEdge(\n { v: edge.from, w: edge.to, name },\n label\n ? {\n width: label.width + EDGE_LABEL_PAD * 2,\n height: label.height + EDGE_LABEL_PAD,\n labelpos: \"c\",\n }\n : {},\n );\n if (label) {\n labels.set(name, {\n lines: label.lines,\n x: 0,\n y: 0,\n width: label.width + EDGE_LABEL_PAD * 2,\n height: label.height + EDGE_LABEL_PAD,\n });\n }\n });\n\n layout(g as never);\n\n const graphLabel = g.graph() as { width?: number; height?: number };\n const width = graphLabel.width;\n const height = graphLabel.height;\n if (!Number.isFinite(width) || !Number.isFinite(height)) return undefined;\n\n const nodes: PositionedNode[] = [];\n for (const node of model.nodes) {\n const laid = g.node(node.id) as\n | { x?: number; y?: number; width?: number; height?: number }\n | undefined;\n const size = sizes.get(node.id);\n if (\n !laid ||\n !size ||\n !Number.isFinite(laid.x) ||\n !Number.isFinite(laid.y)\n ) {\n return undefined;\n }\n nodes.push({\n id: node.id,\n x: (laid.x as number) - size.width / 2,\n y: (laid.y as number) - size.height / 2,\n width: size.width,\n height: size.height,\n lines: size.lines,\n shape: node.shape,\n });\n }\n\n const clusters: PositionedCluster[] = [];\n for (const cluster of model.clusters) {\n const laid = g.node(cluster.id) as\n | { x?: number; y?: number; width?: number; height?: number }\n | undefined;\n if (!laid || !Number.isFinite(laid.x) || !Number.isFinite(laid.y)) continue;\n const boxWidth = laid.width ?? 0;\n const boxHeight = laid.height ?? 0;\n clusters.push({\n id: cluster.id,\n label: cluster.label,\n x: (laid.x as number) - boxWidth / 2,\n y: (laid.y as number) - boxHeight / 2,\n width: boxWidth,\n height: boxHeight,\n depth: depthOf(cluster.id, model),\n });\n }\n // Outermost first: an emitter that draws them in order gets z-order for\n // free, with no per-element z-index to keep in sync.\n clusters.sort((a, b) => a.depth - b.depth);\n\n const positionedEdges: PositionedEdge[] = [];\n edges.forEach((edge, index) => {\n const name = String(index);\n const laid = g.edge({ v: edge.from, w: edge.to, name }) as\n | { points?: Array<{ x: number; y: number }>; x?: number; y?: number }\n | undefined;\n const points = laid?.points?.filter(\n (p) => Number.isFinite(p.x) && Number.isFinite(p.y),\n );\n if (!points || points.length < 2) return;\n\n const label = labels.get(name);\n positionedEdges.push({\n from: edge.from,\n to: edge.to,\n style: edge.style,\n arrowStart: edge.arrowStart,\n arrowEnd: edge.arrowEnd,\n points,\n ...(label && Number.isFinite(laid?.x) && Number.isFinite(laid?.y)\n ? {\n label: {\n ...label,\n x: (laid?.x as number) - label.width / 2,\n y: (laid?.y as number) - label.height / 2,\n },\n }\n : {}),\n });\n });\n\n return {\n width: width as number,\n height: height as number,\n fontSize,\n nodes,\n clusters,\n edges: positionedEdges,\n };\n};\n\n/**\n * Breathing room around an edge label, so the line does not run into the\n * text before the emitter's chip covers it.\n */\nconst EDGE_LABEL_PAD = 6;\n\nconst depthOf = (id: string, model: GraphModel): number => {\n let depth = 0;\n let current = model.clusters.find((c) => c.id === id)?.parent;\n // Bounded by the cluster count: a malformed parent cycle must not hang.\n while (current && depth <= model.clusters.length) {\n depth++;\n current = model.clusters.find((c) => c.id === current)?.parent;\n }\n return depth;\n};\n"],"mappings":";;;;;;;;;;;;AAkBA,MAAa,kBAAkB;AAC/B,MAAa,kBAAkB;;;;;;;;;;;;;;;;;;;;;;AAmG/B,MAAa,mBACX,OACA,WAAA,OACgC;CAChC,IAAI,MAAM,MAAM,WAAW,GAAG,OAAO,KAAA;CACrC,IAAI,MAAM,MAAM,SAAA,KAA0B,OAAO,KAAA;CACjD,IAAI,MAAM,MAAM,SAAA,KAA0B,OAAO,KAAA;CAEjD,IAAI;EACF,OAAO,IAAI,OAAO,QAAQ;CAC5B,QAAQ;EACN;CACF;AACF;AAE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