@marinoscar/platform-web 0.0.0-stage → 0.1.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/LICENSE +21 -0
- package/README.md +96 -2
- package/dist/core/api-client.d.ts +112 -0
- package/dist/core/api-client.d.ts.map +1 -0
- package/dist/core/api-client.js +24 -0
- package/dist/core/api-client.js.map +1 -0
- package/dist/core/host.d.ts +74 -0
- package/dist/core/host.d.ts.map +1 -0
- package/dist/core/host.js +84 -0
- package/dist/core/host.js.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +5 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/settings-page.d.ts +47 -0
- package/dist/core/settings-page.d.ts.map +1 -0
- package/dist/core/settings-page.js +5 -0
- package/dist/core/settings-page.js.map +1 -0
- package/dist/core/viewer.d.ts +14 -0
- package/dist/core/viewer.d.ts.map +1 -0
- package/dist/core/viewer.js +4 -0
- package/dist/core/viewer.js.map +1 -0
- package/dist/doctor/headless/categories.d.ts +31 -0
- package/dist/doctor/headless/categories.d.ts.map +1 -0
- package/dist/doctor/headless/categories.js +41 -0
- package/dist/doctor/headless/categories.js.map +1 -0
- package/dist/doctor/headless/client.d.ts +33 -0
- package/dist/doctor/headless/client.d.ts.map +1 -0
- package/dist/doctor/headless/client.js +31 -0
- package/dist/doctor/headless/client.js.map +1 -0
- package/dist/doctor/headless/contract.d.ts +18 -0
- package/dist/doctor/headless/contract.d.ts.map +1 -0
- package/dist/doctor/headless/contract.js +15 -0
- package/dist/doctor/headless/contract.js.map +1 -0
- package/dist/doctor/headless/index.d.ts +12 -0
- package/dist/doctor/headless/index.d.ts.map +1 -0
- package/dist/doctor/headless/index.js +8 -0
- package/dist/doctor/headless/index.js.map +1 -0
- package/dist/doctor/headless/use-doctor.d.ts +36 -0
- package/dist/doctor/headless/use-doctor.d.ts.map +1 -0
- package/dist/doctor/headless/use-doctor.js +80 -0
- package/dist/doctor/headless/use-doctor.js.map +1 -0
- package/dist/doctor/headless/use-support-bundle-download.d.ts +68 -0
- package/dist/doctor/headless/use-support-bundle-download.d.ts.map +1 -0
- package/dist/doctor/headless/use-support-bundle-download.js +135 -0
- package/dist/doctor/headless/use-support-bundle-download.js.map +1 -0
- package/dist/doctor/internal/relative-time.d.ts +2 -0
- package/dist/doctor/internal/relative-time.d.ts.map +1 -0
- package/dist/doctor/internal/relative-time.js +29 -0
- package/dist/doctor/internal/relative-time.js.map +1 -0
- package/dist/doctor/internal/status-colors.d.ts +5 -0
- package/dist/doctor/internal/status-colors.d.ts.map +1 -0
- package/dist/doctor/internal/status-colors.js +29 -0
- package/dist/doctor/internal/status-colors.js.map +1 -0
- package/dist/doctor/internal/use-is-mounted.d.ts +2 -0
- package/dist/doctor/internal/use-is-mounted.d.ts.map +1 -0
- package/dist/doctor/internal/use-is-mounted.js +15 -0
- package/dist/doctor/internal/use-is-mounted.js.map +1 -0
- package/dist/doctor/ui/check-row.d.ts +54 -0
- package/dist/doctor/ui/check-row.d.ts.map +1 -0
- package/dist/doctor/ui/check-row.js +100 -0
- package/dist/doctor/ui/check-row.js.map +1 -0
- package/dist/doctor/ui/copy.d.ts +3 -0
- package/dist/doctor/ui/copy.d.ts.map +1 -0
- package/dist/doctor/ui/copy.js +6 -0
- package/dist/doctor/ui/copy.js.map +1 -0
- package/dist/doctor/ui/doctor-page.d.ts +50 -0
- package/dist/doctor/ui/doctor-page.d.ts.map +1 -0
- package/dist/doctor/ui/doctor-page.js +152 -0
- package/dist/doctor/ui/doctor-page.js.map +1 -0
- package/dist/doctor/ui/index.d.ts +8 -0
- package/dist/doctor/ui/index.d.ts.map +1 -0
- package/dist/doctor/ui/index.js +7 -0
- package/dist/doctor/ui/index.js.map +1 -0
- package/dist/doctor/ui/settings-page.d.ts +20 -0
- package/dist/doctor/ui/settings-page.d.ts.map +1 -0
- package/dist/doctor/ui/settings-page.js +32 -0
- package/dist/doctor/ui/settings-page.js.map +1 -0
- package/dist/doctor/ui/support-bundle-button.d.ts +37 -0
- package/dist/doctor/ui/support-bundle-button.d.ts.map +1 -0
- package/dist/doctor/ui/support-bundle-button.js +39 -0
- package/dist/doctor/ui/support-bundle-button.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/telemetry/headless/adapters/TelemetryWebAdapters.d.ts +106 -0
- package/dist/telemetry/headless/adapters/TelemetryWebAdapters.d.ts.map +1 -0
- package/dist/telemetry/headless/adapters/TelemetryWebAdapters.js +58 -0
- package/dist/telemetry/headless/adapters/TelemetryWebAdapters.js.map +1 -0
- package/dist/telemetry/headless/context/TelemetryConfigProvider.d.ts +43 -0
- package/dist/telemetry/headless/context/TelemetryConfigProvider.d.ts.map +1 -0
- package/dist/telemetry/headless/context/TelemetryConfigProvider.js +24 -0
- package/dist/telemetry/headless/context/TelemetryConfigProvider.js.map +1 -0
- package/dist/telemetry/headless/context/telemetryConfig.d.ts +68 -0
- package/dist/telemetry/headless/context/telemetryConfig.d.ts.map +1 -0
- package/dist/telemetry/headless/context/telemetryConfig.js +119 -0
- package/dist/telemetry/headless/context/telemetryConfig.js.map +1 -0
- package/dist/telemetry/headless/guards/RequireTelemetryEnabled.d.ts +35 -0
- package/dist/telemetry/headless/guards/RequireTelemetryEnabled.d.ts.map +1 -0
- package/dist/telemetry/headless/guards/RequireTelemetryEnabled.js +44 -0
- package/dist/telemetry/headless/guards/RequireTelemetryEnabled.js.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryAdmin.d.ts +40 -0
- package/dist/telemetry/headless/hooks/useTelemetryAdmin.d.ts.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryAdmin.js +111 -0
- package/dist/telemetry/headless/hooks/useTelemetryAdmin.js.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryAssistant.d.ts +120 -0
- package/dist/telemetry/headless/hooks/useTelemetryAssistant.d.ts.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryAssistant.js +185 -0
- package/dist/telemetry/headless/hooks/useTelemetryAssistant.js.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryAssistantAvailable.d.ts +12 -0
- package/dist/telemetry/headless/hooks/useTelemetryAssistantAvailable.d.ts.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryAssistantAvailable.js +36 -0
- package/dist/telemetry/headless/hooks/useTelemetryAssistantAvailable.js.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryConnection.d.ts +46 -0
- package/dist/telemetry/headless/hooks/useTelemetryConnection.d.ts.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryConnection.js +133 -0
- package/dist/telemetry/headless/hooks/useTelemetryConnection.js.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryDashboard.d.ts +147 -0
- package/dist/telemetry/headless/hooks/useTelemetryDashboard.d.ts.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryDashboard.js +231 -0
- package/dist/telemetry/headless/hooks/useTelemetryDashboard.js.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryExplorer.d.ts +95 -0
- package/dist/telemetry/headless/hooks/useTelemetryExplorer.d.ts.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryExplorer.js +197 -0
- package/dist/telemetry/headless/hooks/useTelemetryExplorer.js.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryStack.d.ts +69 -0
- package/dist/telemetry/headless/hooks/useTelemetryStack.d.ts.map +1 -0
- package/dist/telemetry/headless/hooks/useTelemetryStack.js +129 -0
- package/dist/telemetry/headless/hooks/useTelemetryStack.js.map +1 -0
- package/dist/telemetry/headless/index.d.ts +34 -0
- package/dist/telemetry/headless/index.d.ts.map +1 -0
- package/dist/telemetry/headless/index.js +34 -0
- package/dist/telemetry/headless/index.js.map +1 -0
- package/dist/telemetry/headless/lib/assistantExport.d.ts +12 -0
- package/dist/telemetry/headless/lib/assistantExport.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/assistantExport.js +116 -0
- package/dist/telemetry/headless/lib/assistantExport.js.map +1 -0
- package/dist/telemetry/headless/lib/dashboard/assistantPrompt.d.ts +91 -0
- package/dist/telemetry/headless/lib/dashboard/assistantPrompt.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/dashboard/assistantPrompt.js +246 -0
- package/dist/telemetry/headless/lib/dashboard/assistantPrompt.js.map +1 -0
- package/dist/telemetry/headless/lib/dashboardState.d.ts +58 -0
- package/dist/telemetry/headless/lib/dashboardState.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/dashboardState.js +153 -0
- package/dist/telemetry/headless/lib/dashboardState.js.map +1 -0
- package/dist/telemetry/headless/lib/explorerHandoff.d.ts +62 -0
- package/dist/telemetry/headless/lib/explorerHandoff.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/explorerHandoff.js +77 -0
- package/dist/telemetry/headless/lib/explorerHandoff.js.map +1 -0
- package/dist/telemetry/headless/lib/format.d.ts +113 -0
- package/dist/telemetry/headless/lib/format.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/format.js +280 -0
- package/dist/telemetry/headless/lib/format.js.map +1 -0
- package/dist/telemetry/headless/lib/metrics/metricSections.d.ts +44 -0
- package/dist/telemetry/headless/lib/metrics/metricSections.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/metrics/metricSections.js +61 -0
- package/dist/telemetry/headless/lib/metrics/metricSections.js.map +1 -0
- package/dist/telemetry/headless/lib/metrics/topNPreference.d.ts +15 -0
- package/dist/telemetry/headless/lib/metrics/topNPreference.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/metrics/topNPreference.js +33 -0
- package/dist/telemetry/headless/lib/metrics/topNPreference.js.map +1 -0
- package/dist/telemetry/headless/lib/queryHistory.d.ts +20 -0
- package/dist/telemetry/headless/lib/queryHistory.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/queryHistory.js +53 -0
- package/dist/telemetry/headless/lib/queryHistory.js.map +1 -0
- package/dist/telemetry/headless/lib/starterQueries.d.ts +48 -0
- package/dist/telemetry/headless/lib/starterQueries.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/starterQueries.js +84 -0
- package/dist/telemetry/headless/lib/starterQueries.js.map +1 -0
- package/dist/telemetry/headless/lib/traceLink.d.ts +26 -0
- package/dist/telemetry/headless/lib/traceLink.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/traceLink.js +32 -0
- package/dist/telemetry/headless/lib/traceLink.js.map +1 -0
- package/dist/telemetry/headless/lib/unknownRoutes.d.ts +23 -0
- package/dist/telemetry/headless/lib/unknownRoutes.d.ts.map +1 -0
- package/dist/telemetry/headless/lib/unknownRoutes.js +35 -0
- package/dist/telemetry/headless/lib/unknownRoutes.js.map +1 -0
- package/dist/telemetry/headless/services/client.d.ts +144 -0
- package/dist/telemetry/headless/services/client.d.ts.map +1 -0
- package/dist/telemetry/headless/services/client.js +144 -0
- package/dist/telemetry/headless/services/client.js.map +1 -0
- package/dist/telemetry/headless/services/telemetry.d.ts +483 -0
- package/dist/telemetry/headless/services/telemetry.d.ts.map +1 -0
- package/dist/telemetry/headless/services/telemetry.js +190 -0
- package/dist/telemetry/headless/services/telemetry.js.map +1 -0
- package/dist/telemetry/headless/services/telemetryDashboard.d.ts +321 -0
- package/dist/telemetry/headless/services/telemetryDashboard.d.ts.map +1 -0
- package/dist/telemetry/headless/services/telemetryDashboard.js +103 -0
- package/dist/telemetry/headless/services/telemetryDashboard.js.map +1 -0
- package/dist/telemetry/internal/useIsMounted.d.ts +9 -0
- package/dist/telemetry/internal/useIsMounted.d.ts.map +1 -0
- package/dist/telemetry/internal/useIsMounted.js +19 -0
- package/dist/telemetry/internal/useIsMounted.js.map +1 -0
- package/dist/telemetry/internal/useVisiblePolling.d.ts +55 -0
- package/dist/telemetry/internal/useVisiblePolling.d.ts.map +1 -0
- package/dist/telemetry/internal/useVisiblePolling.js +96 -0
- package/dist/telemetry/internal/useVisiblePolling.js.map +1 -0
- package/dist/telemetry/internal/visuallyHidden.d.ts +12 -0
- package/dist/telemetry/internal/visuallyHidden.d.ts.map +1 -0
- package/dist/telemetry/internal/visuallyHidden.js +15 -0
- package/dist/telemetry/internal/visuallyHidden.js.map +1 -0
- package/dist/telemetry/theme/augment.d.ts +65 -0
- package/dist/telemetry/theme/augment.d.ts.map +1 -0
- package/dist/telemetry/theme/augment.js +37 -0
- package/dist/telemetry/theme/augment.js.map +1 -0
- package/dist/telemetry/theme/telemetryTokens.d.ts +121 -0
- package/dist/telemetry/theme/telemetryTokens.d.ts.map +1 -0
- package/dist/telemetry/theme/telemetryTokens.js +129 -0
- package/dist/telemetry/theme/telemetryTokens.js.map +1 -0
- package/dist/telemetry/ui/admin.d.ts +35 -0
- package/dist/telemetry/ui/admin.d.ts.map +1 -0
- package/dist/telemetry/ui/admin.js +58 -0
- package/dist/telemetry/ui/admin.js.map +1 -0
- package/dist/telemetry/ui/components/AssistantContainer.d.ts +35 -0
- package/dist/telemetry/ui/components/AssistantContainer.d.ts.map +1 -0
- package/dist/telemetry/ui/components/AssistantContainer.js +83 -0
- package/dist/telemetry/ui/components/AssistantContainer.js.map +1 -0
- package/dist/telemetry/ui/components/AssistantPanel.d.ts +22 -0
- package/dist/telemetry/ui/components/AssistantPanel.d.ts.map +1 -0
- package/dist/telemetry/ui/components/AssistantPanel.js +150 -0
- package/dist/telemetry/ui/components/AssistantPanel.js.map +1 -0
- package/dist/telemetry/ui/components/AssistantReport.d.ts +13 -0
- package/dist/telemetry/ui/components/AssistantReport.d.ts.map +1 -0
- package/dist/telemetry/ui/components/AssistantReport.js +89 -0
- package/dist/telemetry/ui/components/AssistantReport.js.map +1 -0
- package/dist/telemetry/ui/components/AssistantTimeline.d.ts +10 -0
- package/dist/telemetry/ui/components/AssistantTimeline.d.ts.map +1 -0
- package/dist/telemetry/ui/components/AssistantTimeline.js +84 -0
- package/dist/telemetry/ui/components/AssistantTimeline.js.map +1 -0
- package/dist/telemetry/ui/components/ResultsGrid.d.ts +10 -0
- package/dist/telemetry/ui/components/ResultsGrid.d.ts.map +1 -0
- package/dist/telemetry/ui/components/ResultsGrid.js +71 -0
- package/dist/telemetry/ui/components/ResultsGrid.js.map +1 -0
- package/dist/telemetry/ui/components/SchemaPanel.d.ts +9 -0
- package/dist/telemetry/ui/components/SchemaPanel.d.ts.map +1 -0
- package/dist/telemetry/ui/components/SchemaPanel.js +42 -0
- package/dist/telemetry/ui/components/SchemaPanel.js.map +1 -0
- package/dist/telemetry/ui/components/SqlEditor.d.ts +21 -0
- package/dist/telemetry/ui/components/SqlEditor.d.ts.map +1 -0
- package/dist/telemetry/ui/components/SqlEditor.js +60 -0
- package/dist/telemetry/ui/components/SqlEditor.js.map +1 -0
- package/dist/telemetry/ui/components/TelemetryConnectionSection.d.ts +14 -0
- package/dist/telemetry/ui/components/TelemetryConnectionSection.d.ts.map +1 -0
- package/dist/telemetry/ui/components/TelemetryConnectionSection.js +243 -0
- package/dist/telemetry/ui/components/TelemetryConnectionSection.js.map +1 -0
- package/dist/telemetry/ui/components/TelemetryCrossLink.d.ts +12 -0
- package/dist/telemetry/ui/components/TelemetryCrossLink.d.ts.map +1 -0
- package/dist/telemetry/ui/components/TelemetryCrossLink.js +21 -0
- package/dist/telemetry/ui/components/TelemetryCrossLink.js.map +1 -0
- package/dist/telemetry/ui/components/TelemetryServicesSection.d.ts +23 -0
- package/dist/telemetry/ui/components/TelemetryServicesSection.d.ts.map +1 -0
- package/dist/telemetry/ui/components/TelemetryServicesSection.js +138 -0
- package/dist/telemetry/ui/components/TelemetryServicesSection.js.map +1 -0
- package/dist/telemetry/ui/components/TelemetrySpinner.d.ts +3 -0
- package/dist/telemetry/ui/components/TelemetrySpinner.d.ts.map +1 -0
- package/dist/telemetry/ui/components/TelemetrySpinner.js +14 -0
- package/dist/telemetry/ui/components/TelemetrySpinner.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/ApiTimelineChart.d.ts +17 -0
- package/dist/telemetry/ui/components/dashboard/ApiTimelineChart.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/ApiTimelineChart.js +70 -0
- package/dist/telemetry/ui/components/dashboard/ApiTimelineChart.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/DashboardFilterBar.d.ts +39 -0
- package/dist/telemetry/ui/components/dashboard/DashboardFilterBar.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/DashboardFilterBar.js +143 -0
- package/dist/telemetry/ui/components/dashboard/DashboardFilterBar.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/DashboardPanel.d.ts +58 -0
- package/dist/telemetry/ui/components/dashboard/DashboardPanel.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/DashboardPanel.js +62 -0
- package/dist/telemetry/ui/components/dashboard/DashboardPanel.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/EventsFeed.d.ts +21 -0
- package/dist/telemetry/ui/components/dashboard/EventsFeed.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/EventsFeed.js +96 -0
- package/dist/telemetry/ui/components/dashboard/EventsFeed.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/KpiTiles.d.ts +13 -0
- package/dist/telemetry/ui/components/dashboard/KpiTiles.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/KpiTiles.js +82 -0
- package/dist/telemetry/ui/components/dashboard/KpiTiles.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/LogSeverityChart.d.ts +8 -0
- package/dist/telemetry/ui/components/dashboard/LogSeverityChart.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/LogSeverityChart.js +34 -0
- package/dist/telemetry/ui/components/dashboard/LogSeverityChart.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/TopProblems.d.ts +19 -0
- package/dist/telemetry/ui/components/dashboard/TopProblems.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/TopProblems.js +61 -0
- package/dist/telemetry/ui/components/dashboard/TopProblems.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/UnknownRoutesPanel.d.ts +12 -0
- package/dist/telemetry/ui/components/dashboard/UnknownRoutesPanel.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/UnknownRoutesPanel.js +36 -0
- package/dist/telemetry/ui/components/dashboard/UnknownRoutesPanel.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/VerdictBanner.d.ts +35 -0
- package/dist/telemetry/ui/components/dashboard/VerdictBanner.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/VerdictBanner.js +68 -0
- package/dist/telemetry/ui/components/dashboard/VerdictBanner.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/ZoomBrush.d.ts +9 -0
- package/dist/telemetry/ui/components/dashboard/ZoomBrush.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/ZoomBrush.js +96 -0
- package/dist/telemetry/ui/components/dashboard/ZoomBrush.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricSections.d.ts +75 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricSections.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricSections.js +247 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricSections.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricSeriesChart.d.ts +19 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricSeriesChart.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricSeriesChart.js +64 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricSeriesChart.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricTable.d.ts +74 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricTable.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricTable.js +126 -0
- package/dist/telemetry/ui/components/dashboard/metrics/MetricTable.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/severity.d.ts +43 -0
- package/dist/telemetry/ui/components/dashboard/severity.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/severity.js +66 -0
- package/dist/telemetry/ui/components/dashboard/severity.js.map +1 -0
- package/dist/telemetry/ui/components/dashboard/timelineAxis.d.ts +11 -0
- package/dist/telemetry/ui/components/dashboard/timelineAxis.d.ts.map +1 -0
- package/dist/telemetry/ui/components/dashboard/timelineAxis.js +20 -0
- package/dist/telemetry/ui/components/dashboard/timelineAxis.js.map +1 -0
- package/dist/telemetry/ui/dashboard-page.d.ts +2 -0
- package/dist/telemetry/ui/dashboard-page.d.ts.map +1 -0
- package/dist/telemetry/ui/dashboard-page.js +6 -0
- package/dist/telemetry/ui/dashboard-page.js.map +1 -0
- package/dist/telemetry/ui/explorer-page.d.ts +2 -0
- package/dist/telemetry/ui/explorer-page.d.ts.map +1 -0
- package/dist/telemetry/ui/explorer-page.js +6 -0
- package/dist/telemetry/ui/explorer-page.js.map +1 -0
- package/dist/telemetry/ui/index.d.ts +6 -0
- package/dist/telemetry/ui/index.d.ts.map +1 -0
- package/dist/telemetry/ui/index.js +10 -0
- package/dist/telemetry/ui/index.js.map +1 -0
- package/dist/telemetry/ui/pages/TelemetryDashboardPage.d.ts +14 -0
- package/dist/telemetry/ui/pages/TelemetryDashboardPage.d.ts.map +1 -0
- package/dist/telemetry/ui/pages/TelemetryDashboardPage.js +286 -0
- package/dist/telemetry/ui/pages/TelemetryDashboardPage.js.map +1 -0
- package/dist/telemetry/ui/pages/TelemetryExplorerPage.d.ts +15 -0
- package/dist/telemetry/ui/pages/TelemetryExplorerPage.d.ts.map +1 -0
- package/dist/telemetry/ui/pages/TelemetryExplorerPage.js +197 -0
- package/dist/telemetry/ui/pages/TelemetryExplorerPage.js.map +1 -0
- package/dist/telemetry/ui/pages/TelemetrySettingsPage.d.ts +28 -0
- package/dist/telemetry/ui/pages/TelemetrySettingsPage.d.ts.map +1 -0
- package/dist/telemetry/ui/pages/TelemetrySettingsPage.js +278 -0
- package/dist/telemetry/ui/pages/TelemetrySettingsPage.js.map +1 -0
- package/dist/telemetry/ui/settings-page.d.ts +2 -0
- package/dist/telemetry/ui/settings-page.d.ts.map +1 -0
- package/dist/telemetry/ui/settings-page.js +6 -0
- package/dist/telemetry/ui/settings-page.js.map +1 -0
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +4 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/test-platform-host.d.ts +108 -0
- package/dist/testing/test-platform-host.d.ts.map +1 -0
- package/dist/testing/test-platform-host.js +101 -0
- package/dist/testing/test-platform-host.js.map +1 -0
- package/package.json +132 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @marinoscar/platform-web
|
|
2
|
+
|
|
3
|
+
## 0.1.0-next.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 55a3402: Add the support bundle: `@marinoscar/platform-contract/doctor` (`supportBundleSchema`), `GET <doctor path>/support-bundle` with `SupportBundleRegistry`, `SupportBundleService`, redaction rules v1 and the built-in `meta`, `doctor` and `egress` sections in `@marinoscar/platform-api/doctor`, and the "Download support bundle" button and `useSupportBundleDownload` hook in `@marinoscar/platform-web/doctor` (plus the optional `PlatformApiClient.getBlob`).
|
|
8
|
+
- bd9ad6f: Add the telemetry slice (`@marinoscar/platform-web/telemetry/headless`, `/telemetry/ui` and a subpath per page): the telemetry settings page, explorer and dashboard with their client, hooks, config provider, route guard, `TelemetryWebAdapters`, `telemetryAdminCards` and the `withTelemetryTokens` theme-token contract. `PlatformApiClient` gains optional request options (`signal`, `ifMatch`), `postBlob` and `postSse`, and `PlatformApiError` an optional `details`; the test host answers all of them. The contract's telemetry README points at the web client's new home.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [738d71c]
|
|
13
|
+
- Updated dependencies [55a3402]
|
|
14
|
+
- Updated dependencies [bd9ad6f]
|
|
15
|
+
- @marinoscar/platform-contract@0.1.0-next.3
|
|
16
|
+
|
|
17
|
+
## 0.1.0-next.2
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- fd29180: Add `@marinoscar/platform-contract/doctor`, the first contract slice (#701): the Doctor's report, row, status and query schemas, their types and the zod-free status constants. `platform-api`'s Doctor DTOs now wrap these schemas and `platform-web`'s Doctor takes its types from them; both re-export the old names (`DOCTOR_STATUS_ORDER` and `DoctorReportQuery` in `platform-web` are deprecated aliases). No wire or OpenAPI change. Sets the contract conventions (slice layout, zod-free constants, import rules, `schema` catalog kind).
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [fd29180]
|
|
26
|
+
- @marinoscar/platform-contract@0.1.0-next.2
|
|
27
|
+
|
|
28
|
+
## 0.1.0-next.1
|
|
29
|
+
|
|
30
|
+
## 0.1.0-next.0
|
|
31
|
+
|
|
32
|
+
### Minor Changes
|
|
33
|
+
|
|
34
|
+
- 385e12f: Add the Doctor slice (`@marinoscar/platform-api/doctor`, `@marinoscar/platform-web/doctor/headless` and `/doctor/ui`), host ports in `core` (`definePlatformHost`, `PlatformHostModule`, `PlatformHostProvider`, `PlatformApiClient`) and in-memory test hosts in `testing`.
|
|
35
|
+
- a66fef1: First pre-release of the platform packages: the six-package scaffold (build formats, boundary lint, pack check, TSDoc and generated API reference, single-instance peer dependencies) plus the first slices.
|
|
36
|
+
|
|
37
|
+
- `@marinoscar/platform-api/core`: the typed registry primitive (`defineRegistry`, `Registry`, `RegistryError`, `RegistryFreezeService`, `withTemporaryEntries`).
|
|
38
|
+
- `@marinoscar/platform-api/testing`: the conformance harness (`runPlatformConformance`, `conformanceSuites`) with the `cron-enqueue-only` suite.
|
|
39
|
+
- `@marinoscar/platform-cli/core`: the CLI command and env-spec fragment registries.
|
|
40
|
+
- `@marinoscar/platform-cli/telemetry`: the node span relay and the telemetry env-spec fragment.
|
|
41
|
+
- `@marinoscar/platform-infra`: `infraFile()`, the `platform-infra` command (`sync` materialises fragments into an app) and the `telemetry` slice (collector and GreptimeDB compose fragments, collector config and overlay, typed manifest).
|
|
42
|
+
- `@marinoscar/platform-contract`, `@marinoscar/platform-web` and `@marinoscar/platform-db` ship their package scaffold only; their slices follow in later releases.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 marinoscar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,97 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @marinoscar/platform-web
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The React side of the platform: pages, components and hooks built on MUI, exposed one subpath per slice. ESM with `sideEffects: false`; it loads in plain Node ESM as well as through a bundler.
|
|
4
|
+
|
|
5
|
+
## Purpose and scope
|
|
6
|
+
|
|
7
|
+
Pages, components, hooks and settings-page descriptors of the platform's web slices. It does not own the app's router, theme or settings registries; the app binds the package's descriptors into its own.
|
|
8
|
+
|
|
9
|
+
Status: pre-release (version `0.0.0`). The root export is only the package name (`PLATFORM_PACKAGE`); the slices are subpath exports, each with its own README:
|
|
10
|
+
|
|
11
|
+
- `@marinoscar/platform-web/core`: the web host ports every packaged page reuses (`PlatformHostProvider`, `PlatformApiClient`, `PlatformViewer`, `PlatformSettingsPage`). [README](src/core/README.md).
|
|
12
|
+
- `@marinoscar/platform-web/testing`: test doubles for those ports (`createTestPlatformHost`). [README](src/testing/README.md).
|
|
13
|
+
- `@marinoscar/platform-web/doctor/headless` and `@marinoscar/platform-web/doctor/ui`: the admin Doctor page, its hook and client, and its settings-page descriptor (#696). [README](src/doctor/README.md).
|
|
14
|
+
- `@marinoscar/platform-web/telemetry/headless` and `@marinoscar/platform-web/telemetry/ui` (plus `/telemetry/ui/settings-page`, `/explorer-page`, `/dashboard-page`): the telemetry settings page, explorer and dashboard, their client, hooks, app adapters, admin cards and theme-token contract (#704). [README](src/telemetry/README.md).
|
|
15
|
+
|
|
16
|
+
## Install and peer dependencies
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @marinoscar/platform-web
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Install these in the app; the package never bundles its own copy (a second copy breaks dependency injection, hooks or theme context).
|
|
23
|
+
|
|
24
|
+
| Package | Range |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `@emotion/react` | `^11.14.0` |
|
|
27
|
+
| `@emotion/styled` | `^11.14.1` |
|
|
28
|
+
| `@mui/icons-material` | `^9.1.0` |
|
|
29
|
+
| `@mui/material` | `^9.1.0` |
|
|
30
|
+
| `react` | `^19.2.7` |
|
|
31
|
+
| `react-dom` | `^19.2.7` |
|
|
32
|
+
| `react-router-dom` | `^7.17.0` |
|
|
33
|
+
|
|
34
|
+
Optional peers, needed only by `@marinoscar/platform-web/telemetry/ui` (#704): `@mui/x-charts` `^9.14.0`, `@mui/x-data-grid` `^9.10.1`, `@uiw/react-codemirror` `^4.25.12` and `@codemirror/lang-sql` `^6.10.0`.
|
|
35
|
+
|
|
36
|
+
## Quick start
|
|
37
|
+
|
|
38
|
+
Mount the app's host once, inside the auth provider, then register each packaged page as a card and a route (the reference app: [`platformHost.tsx`](../../apps/web/src/platform/platformHost.tsx), [`adminSections.tsx`](../../apps/web/src/config/adminSections.tsx)):
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
<PlatformHostProvider host={host}><Layout /></PlatformHostProvider>
|
|
42
|
+
|
|
43
|
+
// ADMIN_SECTIONS, appended last
|
|
44
|
+
{ ...doctorSettingsPage.card, Icon: doctorSettingsPage.Icon },
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
See the [core README](src/core/README.md#registering-a-packaged-page-settings-ui-pattern).
|
|
48
|
+
|
|
49
|
+
## Configuration
|
|
50
|
+
|
|
51
|
+
None at the package level. `PlatformHostProvider`'s host is documented in the [core README](src/core/README.md#configuration), `DoctorPage`'s props in the [doctor README](src/doctor/README.md#configuration).
|
|
52
|
+
|
|
53
|
+
## Extension-point catalog
|
|
54
|
+
|
|
55
|
+
None. The root export is only the package name; the extension points live in the slice catalogs ([core](src/core/README.md#extension-point-catalog), [doctor](src/doctor/README.md#extension-point-catalog)).
|
|
56
|
+
|
|
57
|
+
## Data
|
|
58
|
+
|
|
59
|
+
None. The browser holds no data model; it reads and writes through the API.
|
|
60
|
+
|
|
61
|
+
## Permissions and settings
|
|
62
|
+
|
|
63
|
+
The Doctor's card and route require `system_settings:read`, the exact string `@marinoscar/platform-api/doctor` enforces ([README](src/doctor/README.md#permissions-and-settings)). Packaged pages check no permission themselves: the app's route gate does.
|
|
64
|
+
|
|
65
|
+
## UI
|
|
66
|
+
|
|
67
|
+
One page so far: the Doctor (`/admin/settings/doctor`), one admin registry card, one slot (`slots.Header`), and the theme tokens `palette.status.*` ([README](src/doctor/README.md#ui)).
|
|
68
|
+
|
|
69
|
+
## Infra
|
|
70
|
+
|
|
71
|
+
None. The package ships no deployment configuration and reads no environment variable.
|
|
72
|
+
|
|
73
|
+
## Observability
|
|
74
|
+
|
|
75
|
+
None. No slice logs or measures anything in the browser yet.
|
|
76
|
+
|
|
77
|
+
## Security notes
|
|
78
|
+
|
|
79
|
+
Pages never hold an API key and never call an AI provider from the browser; they call the API only through the app's transport (`PlatformApiClient`), and authorization stays in the API and the app's route gates.
|
|
80
|
+
|
|
81
|
+
## Conformance suite
|
|
82
|
+
|
|
83
|
+
None yet. The package ships no conformance suite; `runPlatformConformance()` and the suites arrive with the platform's conformance harness.
|
|
84
|
+
|
|
85
|
+
## Upgrade notes
|
|
86
|
+
|
|
87
|
+
None. No version has been published yet, so there is nothing to migrate from.
|
|
88
|
+
|
|
89
|
+
## Troubleshooting
|
|
90
|
+
|
|
91
|
+
None yet. Build and import problems common to every platform package are in [DEVELOPMENT.md § Platform packages](../../docs/DEVELOPMENT.md#platform-packages).
|
|
92
|
+
|
|
93
|
+
## Links
|
|
94
|
+
|
|
95
|
+
- [Platform packages spec](../../docs/specs/platform-packages.md): the extension contract and the package documentation standard
|
|
96
|
+
- [Package documentation standard and checks](../../docs/PACKAGES.md): how this README, the TSDoc and the catalog are checked
|
|
97
|
+
- [DEVELOPMENT.md § Platform packages](../../docs/DEVELOPMENT.md#platform-packages): build, test and lint commands
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The app's transport. Paths are relative to the API base (`'/admin/doctor'`);
|
|
3
|
+
* auth header, token refresh, maintenance handling stay in the app. Each method
|
|
4
|
+
* resolves to the response's `data` and rejects with a {@link PlatformApiError}
|
|
5
|
+
* when the API answered with an error status.
|
|
6
|
+
*
|
|
7
|
+
* @stability experimental
|
|
8
|
+
*/
|
|
9
|
+
export interface PlatformApiClient {
|
|
10
|
+
/** `GET path`. */
|
|
11
|
+
get<T>(path: string, options?: PlatformRequestOptions): Promise<T>;
|
|
12
|
+
/** `POST path` with an optional JSON body. */
|
|
13
|
+
post<T>(path: string, body?: unknown, options?: PlatformRequestOptions): Promise<T>;
|
|
14
|
+
/** `PUT path` with an optional JSON body; `ifMatch` becomes the `If-Match` header. */
|
|
15
|
+
put<T>(path: string, body?: unknown, options?: PlatformRequestOptions): Promise<T>;
|
|
16
|
+
/** `PATCH path` with an optional JSON body; `ifMatch` becomes the `If-Match` header. */
|
|
17
|
+
patch<T>(path: string, body?: unknown, options?: PlatformRequestOptions): Promise<T>;
|
|
18
|
+
/** `DELETE path`; `ifMatch` becomes the `If-Match` header. */
|
|
19
|
+
delete<T>(path: string, options?: PlatformRequestOptions): Promise<T>;
|
|
20
|
+
/**
|
|
21
|
+
* `GET path` for a file download: the raw body and the response headers
|
|
22
|
+
* (for `Content-Disposition`), never the `{ data }` envelope. Optional: a
|
|
23
|
+
* transport without it cannot serve downloads (the support bundle's
|
|
24
|
+
* `useSupportBundleDownload` reports so instead of failing silently).
|
|
25
|
+
*/
|
|
26
|
+
getBlob?(path: string, options?: PlatformRequestOptions): Promise<PlatformBlobResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* `POST path` with a JSON body, for a file download (the telemetry export):
|
|
29
|
+
* the raw body and the response headers, never the `{ data }` envelope.
|
|
30
|
+
* Optional, like {@link PlatformApiClient.getBlob}; a page that needs it
|
|
31
|
+
* reports its absence instead of failing silently.
|
|
32
|
+
*/
|
|
33
|
+
postBlob?(path: string, body?: unknown, options?: PlatformRequestOptions): Promise<PlatformBlobResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* `POST path` with a JSON body and stream the `text/event-stream` answer,
|
|
36
|
+
* frame by frame (the telemetry assistant). ONE request, never a reconnect;
|
|
37
|
+
* the same authentication as every other call (a real `Authorization`
|
|
38
|
+
* header, one refresh-and-retry on a 401). Resolves when the server ends the
|
|
39
|
+
* stream and quietly on abort; rejects with a {@link PlatformApiError} when
|
|
40
|
+
* the API refused the request before the first byte. Optional: a page that
|
|
41
|
+
* needs it reports its absence.
|
|
42
|
+
*/
|
|
43
|
+
postSse?(path: string, body: unknown, options: PlatformSseOptions): Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Per-request options every {@link PlatformApiClient} method takes. All
|
|
47
|
+
* optional; a transport ignores what it cannot honour.
|
|
48
|
+
*
|
|
49
|
+
* @stability experimental
|
|
50
|
+
*/
|
|
51
|
+
export interface PlatformRequestOptions {
|
|
52
|
+
/** Aborts the request (a superseded query, an unmount). */
|
|
53
|
+
signal?: AbortSignal;
|
|
54
|
+
/** Sent as the `If-Match` header (optimistic concurrency, `docs/API.md`). */
|
|
55
|
+
ifMatch?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* What {@link PlatformApiClient.postSse} takes besides the path and body.
|
|
59
|
+
*
|
|
60
|
+
* @stability experimental
|
|
61
|
+
*/
|
|
62
|
+
export interface PlatformSseOptions {
|
|
63
|
+
/**
|
|
64
|
+
* One parsed frame: its `event:` name and its `data:` parsed as JSON (the
|
|
65
|
+
* raw string when it is not JSON). Comment lines never arrive here.
|
|
66
|
+
*/
|
|
67
|
+
onFrame(event: string, data: unknown): void;
|
|
68
|
+
/** Aborting ends the stream; the promise then resolves quietly. */
|
|
69
|
+
signal?: AbortSignal;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* What {@link PlatformApiClient.getBlob} resolves with.
|
|
73
|
+
*
|
|
74
|
+
* @stability experimental
|
|
75
|
+
*/
|
|
76
|
+
export interface PlatformBlobResponse {
|
|
77
|
+
/** The response body. */
|
|
78
|
+
blob: Blob;
|
|
79
|
+
/** The response headers (only `get` is needed). */
|
|
80
|
+
headers: {
|
|
81
|
+
/** One header's value (case-insensitive name), or `null`. */
|
|
82
|
+
get(name: string): string | null;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* What a packaged page may know about a failed call; the adapter maps the
|
|
87
|
+
* app's error class onto it.
|
|
88
|
+
*
|
|
89
|
+
* @stability experimental
|
|
90
|
+
*/
|
|
91
|
+
export interface PlatformApiError {
|
|
92
|
+
/** The HTTP status (403, 409, 500, ...). */
|
|
93
|
+
status: number;
|
|
94
|
+
/** The API's message, safe to show. */
|
|
95
|
+
message: string;
|
|
96
|
+
/** The API's machine-readable error code, when it sent one. */
|
|
97
|
+
code?: string;
|
|
98
|
+
/** The error envelope's `details`, when the API sent any (e.g. `{ reason }`). */
|
|
99
|
+
details?: unknown;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Whether `error` is a {@link PlatformApiError}: an object with a numeric
|
|
103
|
+
* `status` and a string `message`. A network failure (no response at all) is
|
|
104
|
+
* not one.
|
|
105
|
+
*
|
|
106
|
+
* @param error - whatever a {@link PlatformApiClient} call rejected with.
|
|
107
|
+
* @returns `true` when the API answered with an error status.
|
|
108
|
+
*
|
|
109
|
+
* @stability experimental
|
|
110
|
+
*/
|
|
111
|
+
export declare function isPlatformApiError(error: unknown): error is PlatformApiError;
|
|
112
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../src/core/api-client.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB;IAClB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACnE,8CAA8C;IAC9C,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACpF,sFAAsF;IACtF,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACnF,wFAAwF;IACxF,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACrF,8DAA8D;IAC9D,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACtE;;;;;OAKG;IACH,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACxF;;;;;OAKG;IACH,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACzG;;;;;;;;OAQG;IACH,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnF;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,2DAA2D;IAC3D,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5C,mEAAmE;IACnE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,yBAAyB;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,mDAAmD;IACnD,OAAO,EAAE;QACP,6DAA6D;QAC7D,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;KAClC,CAAC;CACH;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAS5E"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// The transport port (issue #696, PP-2.7). A packaged page never imports the
|
|
2
|
+
// app's fetch wrapper: it calls the app's transport through this interface,
|
|
3
|
+
// and the app's adapter (`apps/web/src/platform/platformHost.tsx`) keeps the
|
|
4
|
+
// auth header, the token refresh and the maintenance handling where they are.
|
|
5
|
+
/**
|
|
6
|
+
* Whether `error` is a {@link PlatformApiError}: an object with a numeric
|
|
7
|
+
* `status` and a string `message`. A network failure (no response at all) is
|
|
8
|
+
* not one.
|
|
9
|
+
*
|
|
10
|
+
* @param error - whatever a {@link PlatformApiClient} call rejected with.
|
|
11
|
+
* @returns `true` when the API answered with an error status.
|
|
12
|
+
*
|
|
13
|
+
* @stability experimental
|
|
14
|
+
*/
|
|
15
|
+
export function isPlatformApiError(error) {
|
|
16
|
+
if (error === null || typeof error !== 'object')
|
|
17
|
+
return false;
|
|
18
|
+
const candidate = error;
|
|
19
|
+
return (typeof candidate.status === 'number' &&
|
|
20
|
+
Number.isFinite(candidate.status) &&
|
|
21
|
+
typeof candidate.message === 'string' &&
|
|
22
|
+
(candidate.code === undefined || typeof candidate.code === 'string'));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=api-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../../src/core/api-client.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AA2G9E;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,SAAS,GAAG,KAAgE,CAAC;IACnF,OAAO,CACL,OAAO,SAAS,CAAC,MAAM,KAAK,QAAQ;QACpC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC;QACjC,OAAO,SAAS,CAAC,OAAO,KAAK,QAAQ;QACrC,CAAC,SAAS,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ,CAAC,CACrE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { PlatformApiClient } from './api-client.js';
|
|
3
|
+
import type { PlatformViewer } from './viewer.js';
|
|
4
|
+
/**
|
|
5
|
+
* Everything a packaged page needs from the app.
|
|
6
|
+
*
|
|
7
|
+
* @stability experimental
|
|
8
|
+
*/
|
|
9
|
+
export interface PlatformWebHost {
|
|
10
|
+
/** The app's transport. Keep its identity stable across renders. */
|
|
11
|
+
api: PlatformApiClient;
|
|
12
|
+
/** Who is looking. */
|
|
13
|
+
viewer: PlatformViewer;
|
|
14
|
+
/** Optional formatting hooks so packaged pages match the app's conventions. */
|
|
15
|
+
formatRelativeTime?(iso: string): string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Makes the app's {@link PlatformWebHost} available to every packaged page
|
|
19
|
+
* below it. Mount it once, inside the app's auth provider.
|
|
20
|
+
*
|
|
21
|
+
* @param props - `host`: the app's host (memoise it); `children`: the routed tree.
|
|
22
|
+
* @returns the provider element.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <PlatformHostProvider host={host}>
|
|
27
|
+
* <Layout />
|
|
28
|
+
* </PlatformHostProvider>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @extensionPoint option
|
|
32
|
+
* @stability experimental
|
|
33
|
+
*/
|
|
34
|
+
export declare function PlatformHostProvider(props: {
|
|
35
|
+
host: PlatformWebHost;
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}): ReactElement;
|
|
38
|
+
/**
|
|
39
|
+
* The host in context, or `null` outside any {@link PlatformHostProvider}.
|
|
40
|
+
* For hooks that also accept an explicit dependency (`useDoctor(client)`).
|
|
41
|
+
*
|
|
42
|
+
* @returns the host, or `null`.
|
|
43
|
+
*
|
|
44
|
+
* @stability experimental
|
|
45
|
+
*/
|
|
46
|
+
export declare function useOptionalPlatformHost(): PlatformWebHost | null;
|
|
47
|
+
/**
|
|
48
|
+
* The host in context.
|
|
49
|
+
*
|
|
50
|
+
* @returns the host.
|
|
51
|
+
* @throws Error outside a {@link PlatformHostProvider}.
|
|
52
|
+
*
|
|
53
|
+
* @stability experimental
|
|
54
|
+
*/
|
|
55
|
+
export declare function usePlatformHost(): PlatformWebHost;
|
|
56
|
+
/**
|
|
57
|
+
* The app's transport from the host in context.
|
|
58
|
+
*
|
|
59
|
+
* @returns the host's {@link PlatformApiClient}.
|
|
60
|
+
* @throws Error outside a {@link PlatformHostProvider}.
|
|
61
|
+
*
|
|
62
|
+
* @stability experimental
|
|
63
|
+
*/
|
|
64
|
+
export declare function usePlatformApi(): PlatformApiClient;
|
|
65
|
+
/**
|
|
66
|
+
* The viewer from the host in context.
|
|
67
|
+
*
|
|
68
|
+
* @returns the host's {@link PlatformViewer}.
|
|
69
|
+
* @throws Error outside a {@link PlatformHostProvider}.
|
|
70
|
+
*
|
|
71
|
+
* @stability experimental
|
|
72
|
+
*/
|
|
73
|
+
export declare function usePlatformViewer(): PlatformViewer;
|
|
74
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/core/host.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,GAAG,EAAE,iBAAiB,CAAC;IACvB,sBAAsB;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,+EAA+E;IAC/E,kBAAkB,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1C;AAKD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,YAAY,CAExG;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,IAAI,eAAe,GAAG,IAAI,CAEhE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,IAAI,eAAe,CASjD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,iBAAiB,CAElD;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAElD"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// =============================================================================
|
|
3
|
+
// The web host ports (issue #696, PP-2.7)
|
|
4
|
+
// =============================================================================
|
|
5
|
+
//
|
|
6
|
+
// Every packaged page reaches the app through ONE context: the app's
|
|
7
|
+
// transport, the signed-in viewer and optional formatting hooks. The app
|
|
8
|
+
// builds the host once (`apps/web/src/platform/platformHost.tsx`) and mounts
|
|
9
|
+
// `PlatformHostProvider` inside its auth provider; a packaged page never
|
|
10
|
+
// imports app context, layout or navigation.
|
|
11
|
+
// =============================================================================
|
|
12
|
+
import { createContext, useContext } from 'react';
|
|
13
|
+
const PlatformHostContext = createContext(null);
|
|
14
|
+
PlatformHostContext.displayName = 'PlatformHostContext';
|
|
15
|
+
/**
|
|
16
|
+
* Makes the app's {@link PlatformWebHost} available to every packaged page
|
|
17
|
+
* below it. Mount it once, inside the app's auth provider.
|
|
18
|
+
*
|
|
19
|
+
* @param props - `host`: the app's host (memoise it); `children`: the routed tree.
|
|
20
|
+
* @returns the provider element.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <PlatformHostProvider host={host}>
|
|
25
|
+
* <Layout />
|
|
26
|
+
* </PlatformHostProvider>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @extensionPoint option
|
|
30
|
+
* @stability experimental
|
|
31
|
+
*/
|
|
32
|
+
export function PlatformHostProvider(props) {
|
|
33
|
+
return _jsx(PlatformHostContext.Provider, { value: props.host, children: props.children });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The host in context, or `null` outside any {@link PlatformHostProvider}.
|
|
37
|
+
* For hooks that also accept an explicit dependency (`useDoctor(client)`).
|
|
38
|
+
*
|
|
39
|
+
* @returns the host, or `null`.
|
|
40
|
+
*
|
|
41
|
+
* @stability experimental
|
|
42
|
+
*/
|
|
43
|
+
export function useOptionalPlatformHost() {
|
|
44
|
+
return useContext(PlatformHostContext);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The host in context.
|
|
48
|
+
*
|
|
49
|
+
* @returns the host.
|
|
50
|
+
* @throws Error outside a {@link PlatformHostProvider}.
|
|
51
|
+
*
|
|
52
|
+
* @stability experimental
|
|
53
|
+
*/
|
|
54
|
+
export function usePlatformHost() {
|
|
55
|
+
const host = useContext(PlatformHostContext);
|
|
56
|
+
if (host === null) {
|
|
57
|
+
throw new Error('usePlatformHost: no PlatformHostProvider above this component. Packaged pages read the app ' +
|
|
58
|
+
"through @marinoscar/platform-web/core's PlatformHostProvider; mount it inside the app's auth provider.");
|
|
59
|
+
}
|
|
60
|
+
return host;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The app's transport from the host in context.
|
|
64
|
+
*
|
|
65
|
+
* @returns the host's {@link PlatformApiClient}.
|
|
66
|
+
* @throws Error outside a {@link PlatformHostProvider}.
|
|
67
|
+
*
|
|
68
|
+
* @stability experimental
|
|
69
|
+
*/
|
|
70
|
+
export function usePlatformApi() {
|
|
71
|
+
return usePlatformHost().api;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The viewer from the host in context.
|
|
75
|
+
*
|
|
76
|
+
* @returns the host's {@link PlatformViewer}.
|
|
77
|
+
* @throws Error outside a {@link PlatformHostProvider}.
|
|
78
|
+
*
|
|
79
|
+
* @stability experimental
|
|
80
|
+
*/
|
|
81
|
+
export function usePlatformViewer() {
|
|
82
|
+
return usePlatformHost().viewer;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/core/host.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,gFAAgF;AAChF,EAAE;AACF,qEAAqE;AACrE,yEAAyE;AACzE,6EAA6E;AAC7E,yEAAyE;AACzE,6CAA6C;AAC7C,gFAAgF;AAEhF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAoBlD,MAAM,mBAAmB,GAAG,aAAa,CAAyB,IAAI,CAAC,CAAC;AACxE,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAqD;IACxF,OAAO,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,YAAG,KAAK,CAAC,QAAQ,GAAgC,CAAC;AAC1G,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,IAAI,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAC7C,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,6FAA6F;YAC3F,wGAAwG,CAC3G,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,eAAe,EAAE,CAAC,GAAG,CAAC;AAC/B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,eAAe,EAAE,CAAC,MAAM,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { isPlatformApiError } from './api-client.js';
|
|
2
|
+
export type { PlatformApiClient, PlatformApiError, PlatformBlobResponse, PlatformRequestOptions, PlatformSseOptions, } from './api-client.js';
|
|
3
|
+
export type { PlatformViewer } from './viewer.js';
|
|
4
|
+
export type { PlatformSettingsPage } from './settings-page.js';
|
|
5
|
+
export { PlatformHostProvider, useOptionalPlatformHost, usePlatformApi, usePlatformHost, usePlatformViewer, } from './host.js';
|
|
6
|
+
export type { PlatformWebHost } from './host.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,iBAAiB,GAClB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// `@marinoscar/platform-web/core`: the web host ports every packaged page
|
|
2
|
+
// reuses (issue #696). Documented in ./README.md.
|
|
3
|
+
export { isPlatformApiError } from './api-client.js';
|
|
4
|
+
export { PlatformHostProvider, useOptionalPlatformHost, usePlatformApi, usePlatformHost, usePlatformViewer, } from './host.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,kDAAkD;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAUrD,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,iBAAiB,GAClB,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { SvgIcon } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* Descriptor a packaged admin/settings page exports; the app turns it into a
|
|
5
|
+
* registry card (`{ ...page.card, Icon: page.Icon }`, appended to the right
|
|
6
|
+
* section) and a route (`path={page.card.path}`, wrapped in the app's
|
|
7
|
+
* permission gate for `page.card.permission`).
|
|
8
|
+
*
|
|
9
|
+
* @typeParam TFeature - the feature keys `card.feature` may take; `never` for a
|
|
10
|
+
* page that is never feature-gated, so the card is assignable to any app's
|
|
11
|
+
* card type.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* // apps/web/src/config/adminSections.tsx
|
|
16
|
+
* { ...doctorSettingsPage.card, Icon: doctorSettingsPage.Icon },
|
|
17
|
+
* // apps/web/src/App.tsx
|
|
18
|
+
* <Route path={doctorSettingsPage.card.path} element={
|
|
19
|
+
* <RequirePermission permission={doctorSettingsPage.card.permission!}><DoctorPage /></RequirePermission>
|
|
20
|
+
* } />
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @extensionPoint component
|
|
24
|
+
* @stability experimental
|
|
25
|
+
*/
|
|
26
|
+
export interface PlatformSettingsPage<TFeature extends string = string> {
|
|
27
|
+
/** Stable id, e.g. `'doctor'`. */
|
|
28
|
+
id: string;
|
|
29
|
+
/** The registry card: the same text the page shows as its title and subtitle. */
|
|
30
|
+
card: {
|
|
31
|
+
/** Card and page title. */
|
|
32
|
+
title: string;
|
|
33
|
+
/** Card text and page subtitle. */
|
|
34
|
+
description: string;
|
|
35
|
+
/** The route, e.g. `/admin/settings/doctor`. */
|
|
36
|
+
path: string;
|
|
37
|
+
/** The exact permission the packaged API route enforces; absent means any signed-in user. */
|
|
38
|
+
permission?: string;
|
|
39
|
+
/** A deployment feature the card exists under (hidden while it is off). */
|
|
40
|
+
feature?: TFeature;
|
|
41
|
+
};
|
|
42
|
+
/** Default icon (an MUI SvgIcon); the app may override it. */
|
|
43
|
+
Icon: typeof SvgIcon;
|
|
44
|
+
/** The route element; reads everything from `usePlatformHost()`. */
|
|
45
|
+
Page: ComponentType;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=settings-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-page.d.ts","sourceRoot":"","sources":["../../src/core/settings-page.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,oBAAoB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM;IACpE,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,iFAAiF;IACjF,IAAI,EAAE;QACJ,2BAA2B;QAC3B,KAAK,EAAE,MAAM,CAAC;QACd,mCAAmC;QACnC,WAAW,EAAE,MAAM,CAAC;QACpB,gDAAgD;QAChD,IAAI,EAAE,MAAM,CAAC;QACb,6FAA6F;QAC7F,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,2EAA2E;QAC3E,OAAO,CAAC,EAAE,QAAQ,CAAC;KACpB,CAAC;IACF,8DAA8D;IAC9D,IAAI,EAAE,OAAO,OAAO,CAAC;IACrB,oEAAoE;IACpE,IAAI,EAAE,aAAa,CAAC;CACrB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// The settings-page descriptor (issue #696, PP-2.7). A packaged admin or
|
|
2
|
+
// settings page exports one; the app turns it into a registry card and a route
|
|
3
|
+
// (Settings UI Pattern: the app stays the owner of its registries and routes).
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=settings-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-page.js","sourceRoot":"","sources":["../../src/core/settings-page.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,+EAA+E;AAC/E,+EAA+E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The signed-in viewer, as packaged pages may see it.
|
|
3
|
+
*
|
|
4
|
+
* @stability experimental
|
|
5
|
+
*/
|
|
6
|
+
export interface PlatformViewer {
|
|
7
|
+
/** The signed-in user's id, or `null` when nobody is signed in. */
|
|
8
|
+
userId: string | null;
|
|
9
|
+
/** Whether the viewer holds `permission` (the exact string the API enforces). */
|
|
10
|
+
hasPermission(permission: string): boolean;
|
|
11
|
+
/** Feature switches the app exposes to settings surfaces (e.g. ai, telemetry). */
|
|
12
|
+
isFeatureEnabled(feature: string): boolean;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewer.d.ts","sourceRoot":"","sources":["../../src/core/viewer.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,mEAAmE;IACnE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iFAAiF;IACjF,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,kFAAkF;IAClF,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../../src/core/viewer.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,kEAAkE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A category key and its display label.
|
|
3
|
+
*
|
|
4
|
+
* @stability stable
|
|
5
|
+
*/
|
|
6
|
+
export interface DoctorCategoryLabel {
|
|
7
|
+
/** The category key the API reports (`storage`). */
|
|
8
|
+
key: string;
|
|
9
|
+
/** What the page shows (`Object storage`). */
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The shipped categories, in display order, with their labels. The default of
|
|
14
|
+
* `DoctorPage`'s `categories` prop; a category an app adds renders after these,
|
|
15
|
+
* title-cased, unless the app passes its own list.
|
|
16
|
+
*
|
|
17
|
+
* @stability stable
|
|
18
|
+
*/
|
|
19
|
+
export declare const PLATFORM_DOCTOR_CATEGORY_LABELS: readonly DoctorCategoryLabel[];
|
|
20
|
+
/**
|
|
21
|
+
* The label of a category: from `labels` when listed, otherwise the key
|
|
22
|
+
* title-cased (`fork_widgets` becomes `Fork Widgets`).
|
|
23
|
+
*
|
|
24
|
+
* @param key - the category key.
|
|
25
|
+
* @param labels - the known labels. Default {@link PLATFORM_DOCTOR_CATEGORY_LABELS}.
|
|
26
|
+
* @returns the label.
|
|
27
|
+
*
|
|
28
|
+
* @stability stable
|
|
29
|
+
*/
|
|
30
|
+
export declare function categoryLabel(key: string, labels?: readonly DoctorCategoryLabel[]): string;
|
|
31
|
+
//# sourceMappingURL=categories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../../src/doctor/headless/categories.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,EAAE,SAAS,mBAAmB,EAYzE,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,MAAM,GAAE,SAAS,mBAAmB,EAAoC,GACvE,MAAM,CAQR"}
|