@burdenoff/microfe-labsofscience 2026.1029.1 → 2026.1110.1
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/generated/global-operations.d.ts +0 -1
- package/dist/generated/global-types.d.ts +0 -1
- package/dist/generated/wspace-operations.d.ts +0 -1
- package/dist/generated/wspace-types.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/labsofscience/LabsOfScienceRoot.d.ts +0 -2
- package/dist/labsofscience/LabsOfScienceRoot.js +2 -3
- package/dist/labsofscience/LabsOfScienceRoot.js.map +1 -1
- package/dist/labsofscience/LabsOfScienceRoutes.d.ts +0 -2
- package/dist/labsofscience/LabsOfScienceRoutes.js +1 -2
- package/dist/labsofscience/LabsOfScienceRoutes.js.map +1 -1
- package/dist/labsofscience/components/BottomNav.d.ts +0 -2
- package/dist/labsofscience/components/BottomNav.js +8 -9
- package/dist/labsofscience/components/BottomNav.js.map +1 -1
- package/dist/labsofscience/components/DiscussionPanel.d.ts +1 -2
- package/dist/labsofscience/components/DiscussionPanel.js +4 -4
- package/dist/labsofscience/components/DiscussionPanel.js.map +1 -1
- package/dist/labsofscience/components/EmptyState.d.ts +0 -2
- package/dist/labsofscience/components/EmptyState.js +1 -2
- package/dist/labsofscience/components/EmptyState.js.map +1 -1
- package/dist/labsofscience/components/FileAttachment.d.ts +0 -2
- package/dist/labsofscience/components/FileAttachment.js +1 -2
- package/dist/labsofscience/components/FileAttachment.js.map +1 -1
- package/dist/labsofscience/components/FileUploadField.d.ts +0 -2
- package/dist/labsofscience/components/FileUploadField.js +1 -2
- package/dist/labsofscience/components/FileUploadField.js.map +1 -1
- package/dist/labsofscience/components/ListSearchInput.d.ts +0 -2
- package/dist/labsofscience/components/ListSearchInput.js +1 -2
- package/dist/labsofscience/components/ListSearchInput.js.map +1 -1
- package/dist/labsofscience/components/MetricsCard.d.ts +0 -2
- package/dist/labsofscience/components/MetricsCard.js +1 -2
- package/dist/labsofscience/components/MetricsCard.js.map +1 -1
- package/dist/labsofscience/components/PageLayout.d.ts +0 -2
- package/dist/labsofscience/components/PageLayout.js +1 -2
- package/dist/labsofscience/components/PageLayout.js.map +1 -1
- package/dist/labsofscience/components/ProvenanceChain.d.ts +1 -3
- package/dist/labsofscience/components/ProvenanceChain.js +1 -2
- package/dist/labsofscience/components/ProvenanceChain.js.map +1 -1
- package/dist/labsofscience/components/ProvenancePanel.d.ts +1 -3
- package/dist/labsofscience/components/ProvenancePanel.js +11 -12
- package/dist/labsofscience/components/ProvenancePanel.js.map +1 -1
- package/dist/labsofscience/components/QueryStates.d.ts +0 -2
- package/dist/labsofscience/components/QueryStates.js +12 -6
- package/dist/labsofscience/components/QueryStates.js.map +1 -1
- package/dist/labsofscience/components/StatusBadge.d.ts +0 -2
- package/dist/labsofscience/components/StatusBadge.js +1 -2
- package/dist/labsofscience/components/StatusBadge.js.map +1 -1
- package/dist/labsofscience/components/index.d.ts +0 -1
- package/dist/labsofscience/components/provenanceMapping.d.ts +0 -2
- package/dist/labsofscience/components/provenanceMapping.js +1 -2
- package/dist/labsofscience/components/provenanceMapping.js.map +1 -1
- package/dist/labsofscience/context/LabsOfScienceContext.d.ts +0 -2
- package/dist/labsofscience/context/LabsOfScienceContext.js +1 -2
- package/dist/labsofscience/context/LabsOfScienceContext.js.map +1 -1
- package/dist/labsofscience/context/index.d.ts +0 -1
- package/dist/labsofscience/context/index.js +1 -2
- package/dist/labsofscience/hooks/index.d.ts +0 -1
- package/dist/labsofscience/hooks/useLabActorNames.d.ts +0 -2
- package/dist/labsofscience/hooks/useLabActorNames.js +4 -5
- package/dist/labsofscience/hooks/useLabActorNames.js.map +1 -1
- package/dist/labsofscience/hooks/useLabsOfScienceApi.d.ts +27 -29
- package/dist/labsofscience/hooks/useLabsOfScienceApi.js +3 -4
- package/dist/labsofscience/hooks/useLabsOfScienceApi.js.map +1 -1
- package/dist/labsofscience/hooks/useTr.d.ts +0 -1
- package/dist/labsofscience/hooks/useTr.js +1 -2
- package/dist/labsofscience/hooks/useTr.js.map +1 -1
- package/dist/labsofscience/index.d.ts +0 -1
- package/dist/labsofscience/index.js +3 -3
- package/dist/labsofscience/legal/aiTerms.d.ts +0 -1
- package/dist/labsofscience/legal/aiTerms.js +1 -2
- package/dist/labsofscience/legal/aiTerms.js.map +1 -1
- package/dist/labsofscience/pages/OverviewPage.d.ts +1 -2
- package/dist/labsofscience/pages/OverviewPage.js +60 -61
- package/dist/labsofscience/pages/OverviewPage.js.map +1 -1
- package/dist/labsofscience/pages/ai/AiDialogs.d.ts +3 -5
- package/dist/labsofscience/pages/ai/AiDialogs.js +37 -47
- package/dist/labsofscience/pages/ai/AiDialogs.js.map +1 -1
- package/dist/labsofscience/pages/ai/AiErrorNotice.d.ts +0 -2
- package/dist/labsofscience/pages/ai/AiErrorNotice.js +14 -15
- package/dist/labsofscience/pages/ai/AiErrorNotice.js.map +1 -1
- package/dist/labsofscience/pages/ai/AiOperationsPage.d.ts +1 -2
- package/dist/labsofscience/pages/ai/AiOperationsPage.js +27 -28
- package/dist/labsofscience/pages/ai/AiOperationsPage.js.map +1 -1
- package/dist/labsofscience/pages/ai/AiTermsGate.d.ts +0 -2
- package/dist/labsofscience/pages/ai/AiTermsGate.js +6 -7
- package/dist/labsofscience/pages/ai/AiTermsGate.js.map +1 -1
- package/dist/labsofscience/pages/ai/DecisionCard.d.ts +0 -2
- package/dist/labsofscience/pages/ai/DecisionCard.js +1 -2
- package/dist/labsofscience/pages/ai/DecisionCard.js.map +1 -1
- package/dist/labsofscience/pages/ai/ModelSettings.d.ts +1 -2
- package/dist/labsofscience/pages/ai/ModelSettings.js +1 -2
- package/dist/labsofscience/pages/ai/ModelSettings.js.map +1 -1
- package/dist/labsofscience/pages/ai/aiReaders.d.ts +0 -2
- package/dist/labsofscience/pages/ai/aiReaders.js +1 -2
- package/dist/labsofscience/pages/ai/aiReaders.js.map +1 -1
- package/dist/labsofscience/pages/analytics/AnalyticsPage.d.ts +1 -2
- package/dist/labsofscience/pages/analytics/AnalyticsPage.js +1 -2
- package/dist/labsofscience/pages/analytics/AnalyticsPage.js.map +1 -1
- package/dist/labsofscience/pages/datasets/AddDatasetVersionDialog.d.ts +1 -2
- package/dist/labsofscience/pages/datasets/AddDatasetVersionDialog.js +1 -2
- package/dist/labsofscience/pages/datasets/AddDatasetVersionDialog.js.map +1 -1
- package/dist/labsofscience/pages/datasets/DatasetDetailPage.d.ts +1 -2
- package/dist/labsofscience/pages/datasets/DatasetDetailPage.js +36 -37
- package/dist/labsofscience/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/labsofscience/pages/datasets/DatasetFormDialog.d.ts +1 -3
- package/dist/labsofscience/pages/datasets/DatasetFormDialog.js +16 -18
- package/dist/labsofscience/pages/datasets/DatasetFormDialog.js.map +1 -1
- package/dist/labsofscience/pages/datasets/DatasetsListPage.d.ts +1 -2
- package/dist/labsofscience/pages/datasets/DatasetsListPage.js +20 -21
- package/dist/labsofscience/pages/datasets/DatasetsListPage.js.map +1 -1
- package/dist/labsofscience/pages/experiments/AcceptRecommendationDialog.d.ts +1 -2
- package/dist/labsofscience/pages/experiments/AcceptRecommendationDialog.js +1 -2
- package/dist/labsofscience/pages/experiments/AcceptRecommendationDialog.js.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentActivitySummary.d.ts +1 -3
- package/dist/labsofscience/pages/experiments/ExperimentActivitySummary.js +2 -3
- package/dist/labsofscience/pages/experiments/ExperimentActivitySummary.js.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentAiPanel.d.ts +1 -2
- package/dist/labsofscience/pages/experiments/ExperimentAiPanel.js +9 -10
- package/dist/labsofscience/pages/experiments/ExperimentAiPanel.js.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentDetailPage.d.ts +1 -2
- package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js +44 -45
- package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentFormDialog.d.ts +1 -3
- package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js +1 -2
- package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentLifecycleStepper.d.ts +1 -3
- package/dist/labsofscience/pages/experiments/ExperimentLifecycleStepper.js +7 -8
- package/dist/labsofscience/pages/experiments/ExperimentLifecycleStepper.js.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentLinkedItems.d.ts +1 -2
- package/dist/labsofscience/pages/experiments/ExperimentLinkedItems.js +4 -5
- package/dist/labsofscience/pages/experiments/ExperimentLinkedItems.js.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentRunProgress.d.ts +1 -3
- package/dist/labsofscience/pages/experiments/ExperimentRunProgress.js +12 -13
- package/dist/labsofscience/pages/experiments/ExperimentRunProgress.js.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentsListPage.d.ts +1 -2
- package/dist/labsofscience/pages/experiments/ExperimentsListPage.js +22 -23
- package/dist/labsofscience/pages/experiments/ExperimentsListPage.js.map +1 -1
- package/dist/labsofscience/pages/experiments/RunDialogs.d.ts +2 -4
- package/dist/labsofscience/pages/experiments/RunDialogs.js +13 -15
- package/dist/labsofscience/pages/experiments/RunDialogs.js.map +1 -1
- package/dist/labsofscience/pages/instruments/BookInstrumentDialog.d.ts +1 -2
- package/dist/labsofscience/pages/instruments/BookInstrumentDialog.js +16 -21
- package/dist/labsofscience/pages/instruments/BookInstrumentDialog.js.map +1 -1
- package/dist/labsofscience/pages/instruments/InstrumentDetailPage.d.ts +1 -2
- package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js +15 -16
- package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js.map +1 -1
- package/dist/labsofscience/pages/instruments/InstrumentFormDialog.d.ts +1 -3
- package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js +1 -2
- package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js.map +1 -1
- package/dist/labsofscience/pages/instruments/InstrumentsListPage.d.ts +1 -2
- package/dist/labsofscience/pages/instruments/InstrumentsListPage.js +19 -20
- package/dist/labsofscience/pages/instruments/InstrumentsListPage.js.map +1 -1
- package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.d.ts +1 -3
- package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js +16 -21
- package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js.map +1 -1
- package/dist/labsofscience/pages/inventory/InventoryDetailPage.d.ts +1 -2
- package/dist/labsofscience/pages/inventory/InventoryDetailPage.js +15 -16
- package/dist/labsofscience/pages/inventory/InventoryDetailPage.js.map +1 -1
- package/dist/labsofscience/pages/inventory/InventoryFormDialog.d.ts +1 -3
- package/dist/labsofscience/pages/inventory/InventoryFormDialog.js +5 -6
- package/dist/labsofscience/pages/inventory/InventoryFormDialog.js.map +1 -1
- package/dist/labsofscience/pages/inventory/InventoryListPage.d.ts +1 -2
- package/dist/labsofscience/pages/inventory/InventoryListPage.js +23 -24
- package/dist/labsofscience/pages/inventory/InventoryListPage.js.map +1 -1
- package/dist/labsofscience/pages/notebook/NotebookEntryDetailPage.d.ts +1 -2
- package/dist/labsofscience/pages/notebook/NotebookEntryDetailPage.js +46 -47
- package/dist/labsofscience/pages/notebook/NotebookEntryDetailPage.js.map +1 -1
- package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.d.ts +1 -3
- package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js +22 -27
- package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js.map +1 -1
- package/dist/labsofscience/pages/notebook/NotebookListPage.d.ts +1 -2
- package/dist/labsofscience/pages/notebook/NotebookListPage.js +29 -30
- package/dist/labsofscience/pages/notebook/NotebookListPage.js.map +1 -1
- package/dist/labsofscience/pages/pipelines/PipelineFormDialog.d.ts +1 -3
- package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js +16 -18
- package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js.map +1 -1
- package/dist/labsofscience/pages/pipelines/PipelinesPage.d.ts +1 -2
- package/dist/labsofscience/pages/pipelines/PipelinesPage.js +66 -67
- package/dist/labsofscience/pages/pipelines/PipelinesPage.js.map +1 -1
- package/dist/labsofscience/pages/pipelines/RunPipelineDialog.d.ts +1 -3
- package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js +14 -16
- package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js.map +1 -1
- package/dist/labsofscience/pages/projects/ProjectDetailPage.d.ts +1 -2
- package/dist/labsofscience/pages/projects/ProjectDetailPage.js +35 -36
- package/dist/labsofscience/pages/projects/ProjectDetailPage.js.map +1 -1
- package/dist/labsofscience/pages/projects/ProjectFormDialog.d.ts +1 -3
- package/dist/labsofscience/pages/projects/ProjectFormDialog.js +1 -2
- package/dist/labsofscience/pages/projects/ProjectFormDialog.js.map +1 -1
- package/dist/labsofscience/pages/projects/ProjectsListPage.d.ts +1 -2
- package/dist/labsofscience/pages/projects/ProjectsListPage.js +24 -25
- package/dist/labsofscience/pages/projects/ProjectsListPage.js.map +1 -1
- package/dist/labsofscience/pages/protocols/AddProtocolStepDialog.d.ts +1 -2
- package/dist/labsofscience/pages/protocols/AddProtocolStepDialog.js +1 -2
- package/dist/labsofscience/pages/protocols/AddProtocolStepDialog.js.map +1 -1
- package/dist/labsofscience/pages/protocols/ProtocolDetailPage.d.ts +1 -2
- package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js +17 -18
- package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js.map +1 -1
- package/dist/labsofscience/pages/protocols/ProtocolFormDialog.d.ts +1 -3
- package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js +1 -2
- package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js.map +1 -1
- package/dist/labsofscience/pages/protocols/ProtocolsListPage.d.ts +1 -2
- package/dist/labsofscience/pages/protocols/ProtocolsListPage.js +19 -20
- package/dist/labsofscience/pages/protocols/ProtocolsListPage.js.map +1 -1
- package/dist/labsofscience/pages/shared/DetailComponents.d.ts +0 -2
- package/dist/labsofscience/pages/shared/DetailComponents.js +1 -2
- package/dist/labsofscience/pages/shared/DetailComponents.js.map +1 -1
- package/dist/labsofscience/pages/shared/tags.d.ts +0 -1
- package/dist/labsofscience/pages/shared/tags.js +1 -2
- package/dist/labsofscience/pages/shared/tags.js.map +1 -1
- package/dist/labsofscience/store/index.d.ts +0 -1
- package/dist/labsofscience/store/index.js +1 -2
- package/dist/labsofscience/store/labsofscienceStore.d.ts +1 -2
- package/dist/labsofscience/store/labsofscienceStore.js +1 -2
- package/dist/labsofscience/store/labsofscienceStore.js.map +1 -1
- package/dist/labsofscience/types/index.d.ts +0 -2
- package/dist/labsofscience/utils/cn.d.ts +0 -2
- package/dist/labsofscience/utils/cn.js +1 -2
- package/dist/labsofscience/utils/cn.js.map +1 -1
- package/dist/labsofscience/utils/formatters.d.ts +0 -1
- package/dist/labsofscience/utils/formatters.js +1 -2
- package/dist/labsofscience/utils/formatters.js.map +1 -1
- package/dist/labsofscience/utils/index.d.ts +0 -1
- package/dist/labsofscience/utils/navigation.d.ts +0 -1
- package/dist/labsofscience/utils/navigation.js +1 -2
- package/dist/labsofscience/utils/navigation.js.map +1 -1
- package/dist/labsofscience/utils/uploadFile.d.ts +1 -2
- package/dist/labsofscience/utils/uploadFile.js +2 -3
- package/dist/labsofscience/utils/uploadFile.js.map +1 -1
- package/dist/labsofscience/utils/useDebouncedValue.d.ts +0 -1
- package/dist/labsofscience/utils/useDebouncedValue.js +1 -2
- package/dist/labsofscience/utils/useDebouncedValue.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +7 -6
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +100 -38
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/services/createSandboxAssistantTransport.d.ts +0 -1
- package/dist/services/createSandboxAssistantTransport.js +1 -2
- package/dist/services/createSandboxAssistantTransport.js.map +1 -1
- package/dist/stories/EmptyState.stories.d.ts +0 -2
- package/dist/stories/MetricsCard.stories.d.ts +0 -2
- package/dist/stories/StatusBadge.stories.d.ts +0 -2
- package/dist/test/happydom.d.ts +1 -0
- package/dist/types/assistant.d.ts +0 -1
- package/dist/utils/pageContext.d.ts +0 -1
- package/dist/utils/pageContext.js +2 -3
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +82 -60
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/labsofscience/LabsOfScienceRoot.d.ts.map +0 -1
- package/dist/labsofscience/LabsOfScienceRoutes.d.ts.map +0 -1
- package/dist/labsofscience/components/BottomNav.d.ts.map +0 -1
- package/dist/labsofscience/components/DiscussionPanel.d.ts.map +0 -1
- package/dist/labsofscience/components/EmptyState.d.ts.map +0 -1
- package/dist/labsofscience/components/FileAttachment.d.ts.map +0 -1
- package/dist/labsofscience/components/FileUploadField.d.ts.map +0 -1
- package/dist/labsofscience/components/ListSearchInput.d.ts.map +0 -1
- package/dist/labsofscience/components/MetricsCard.d.ts.map +0 -1
- package/dist/labsofscience/components/PageLayout.d.ts.map +0 -1
- package/dist/labsofscience/components/ProvenanceChain.d.ts.map +0 -1
- package/dist/labsofscience/components/ProvenancePanel.d.ts.map +0 -1
- package/dist/labsofscience/components/QueryStates.d.ts.map +0 -1
- package/dist/labsofscience/components/StatusBadge.d.ts.map +0 -1
- package/dist/labsofscience/components/index.d.ts.map +0 -1
- package/dist/labsofscience/components/provenanceMapping.d.ts.map +0 -1
- package/dist/labsofscience/context/LabsOfScienceContext.d.ts.map +0 -1
- package/dist/labsofscience/context/index.d.ts.map +0 -1
- package/dist/labsofscience/hooks/index.d.ts.map +0 -1
- package/dist/labsofscience/hooks/useLabActorNames.d.ts.map +0 -1
- package/dist/labsofscience/hooks/useLabsOfScienceApi.d.ts.map +0 -1
- package/dist/labsofscience/hooks/useTr.d.ts.map +0 -1
- package/dist/labsofscience/index.d.ts.map +0 -1
- package/dist/labsofscience/legal/aiTerms.d.ts.map +0 -1
- package/dist/labsofscience/pages/OverviewPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/ai/AiDialogs.d.ts.map +0 -1
- package/dist/labsofscience/pages/ai/AiErrorNotice.d.ts.map +0 -1
- package/dist/labsofscience/pages/ai/AiOperationsPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/ai/AiTermsGate.d.ts.map +0 -1
- package/dist/labsofscience/pages/ai/DecisionCard.d.ts.map +0 -1
- package/dist/labsofscience/pages/ai/ModelSettings.d.ts.map +0 -1
- package/dist/labsofscience/pages/ai/aiReaders.d.ts.map +0 -1
- package/dist/labsofscience/pages/analytics/AnalyticsPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/datasets/AddDatasetVersionDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/datasets/DatasetDetailPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/datasets/DatasetFormDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/datasets/DatasetsListPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/AcceptRecommendationDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/ExperimentActivitySummary.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/ExperimentAiPanel.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/ExperimentDetailPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/ExperimentFormDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/ExperimentLifecycleStepper.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/ExperimentLinkedItems.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/ExperimentRunProgress.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/ExperimentsListPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/experiments/RunDialogs.d.ts.map +0 -1
- package/dist/labsofscience/pages/instruments/BookInstrumentDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/instruments/InstrumentDetailPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/instruments/InstrumentFormDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/instruments/InstrumentsListPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/inventory/InventoryDetailPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/inventory/InventoryFormDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/inventory/InventoryListPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/notebook/NotebookEntryDetailPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/notebook/NotebookListPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/pipelines/PipelineFormDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/pipelines/PipelinesPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/pipelines/RunPipelineDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/projects/ProjectDetailPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/projects/ProjectFormDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/projects/ProjectsListPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/protocols/AddProtocolStepDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/protocols/ProtocolDetailPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/protocols/ProtocolFormDialog.d.ts.map +0 -1
- package/dist/labsofscience/pages/protocols/ProtocolsListPage.d.ts.map +0 -1
- package/dist/labsofscience/pages/shared/DetailComponents.d.ts.map +0 -1
- package/dist/labsofscience/pages/shared/tags.d.ts.map +0 -1
- package/dist/labsofscience/store/index.d.ts.map +0 -1
- package/dist/labsofscience/store/labsofscienceStore.d.ts.map +0 -1
- package/dist/labsofscience/types/index.d.ts.map +0 -1
- package/dist/labsofscience/utils/cn.d.ts.map +0 -1
- package/dist/labsofscience/utils/formatters.d.ts.map +0 -1
- package/dist/labsofscience/utils/index.d.ts.map +0 -1
- package/dist/labsofscience/utils/navigation.d.ts.map +0 -1
- package/dist/labsofscience/utils/uploadFile.d.ts.map +0 -1
- package/dist/labsofscience/utils/useDebouncedValue.d.ts.map +0 -1
- package/dist/services/createSandboxAssistantTransport.d.ts.map +0 -1
- package/dist/stories/EmptyState.stories.d.ts.map +0 -1
- package/dist/stories/MetricsCard.stories.d.ts.map +0 -1
- package/dist/stories/StatusBadge.stories.d.ts.map +0 -1
- package/dist/test/setup.d.ts +0 -2
- package/dist/test/setup.d.ts.map +0 -1
- package/dist/types/assistant.d.ts.map +0 -1
- package/dist/utils/pageContext.d.ts.map +0 -1
|
@@ -23524,4 +23524,3 @@ export type UserRegisterInput = {
|
|
|
23524
23524
|
phoneNumber?: InputMaybe<Scalars['String']['input']>;
|
|
23525
23525
|
username: Scalars['String']['input'];
|
|
23526
23526
|
};
|
|
23527
|
-
//# sourceMappingURL=global-types.d.ts.map
|
|
@@ -93234,4 +93234,3 @@ export type YieldTrendPoint = {
|
|
|
93234
93234
|
peppers: Scalars['Float']['output'];
|
|
93235
93235
|
tomatoes: Scalars['Float']['output'];
|
|
93236
93236
|
};
|
|
93237
|
-
//# sourceMappingURL=wspace-types.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import { QueryClient as i, QueryClientProvider as a } from "@tanstack/react-quer
|
|
|
6
6
|
import { BookOpen as o, Boxes as s, Cpu as c, Database as l, FlaskConical as u, FolderKanban as d, GitBranch as f, LayoutDashboard as p, Microscope as m, Sparkles as h } from "lucide-react";
|
|
7
7
|
import { jsx as g } from "react/jsx-runtime";
|
|
8
8
|
import { FeatureFlagProvider as _ } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
9
|
-
|
|
9
|
+
// src/labsofscience/LabsOfScienceRoot.tsx
|
|
10
10
|
var v = new i({ defaultOptions: { queries: {
|
|
11
|
-
staleTime:
|
|
11
|
+
staleTime: 3e5,
|
|
12
12
|
retry: 1
|
|
13
13
|
} } }), y = (i) => {
|
|
14
14
|
let { registerNavItems: y, registerFooterItems: b, basePath: x = "/" } = i, S = e(), C = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
@@ -124,7 +124,6 @@ var v = new i({ defaultOptions: { queries: {
|
|
|
124
124
|
})
|
|
125
125
|
});
|
|
126
126
|
};
|
|
127
|
-
//#endregion
|
|
128
127
|
export { y as LabsOfScienceRoot };
|
|
129
128
|
|
|
130
129
|
//# sourceMappingURL=LabsOfScienceRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabsOfScienceRoot.js","names":[],"sources":["../../src/labsofscience/LabsOfScienceRoot.tsx"],"sourcesContent":["/**\n * LabsOfScience Root Component\n * @module labsofscience\n */\n\nimport type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { useTr } from './hooks/useTr';\nimport {\n LayoutDashboard,\n FolderKanban,\n FlaskConical,\n Database,\n Microscope,\n Cpu,\n Boxes,\n BookOpen,\n GitBranch,\n Sparkles,\n} from 'lucide-react';\nimport { LabsOfScienceProvider } from './context/LabsOfScienceContext';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { LabsOfScienceRoutes } from './LabsOfScienceRoutes';\nimport type { LabsOfScienceRootProps, NavItem } from './types';\n\n// Create a query client for this microfrontend\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000,\n retry: 1,\n },\n },\n});\n\nexport const LabsOfScienceRoot: FC<LabsOfScienceRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const tr = useTr();\n\n // Helper to join paths correctly\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with shell on mount\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n // Overview\n {\n id: 'labsofscience-overview',\n label: tr('labsofscience.nav.overview', 'Overview'),\n path: joinPath(basePath, ''),\n icon: <LayoutDashboard size={20} />,\n order: 1,\n group: 'main',\n },\n\n // Research\n {\n id: 'labsofscience-projects',\n label: tr('labsofscience.nav.projects', 'Projects'),\n path: joinPath(basePath, 'projects'),\n icon: <FolderKanban size={20} />,\n order: 10,\n group: 'research',\n },\n {\n id: 'labsofscience-experiments',\n label: tr('labsofscience.nav.experiments', 'Experiments'),\n path: joinPath(basePath, 'experiments'),\n icon: <FlaskConical size={20} />,\n order: 11,\n group: 'research',\n },\n {\n id: 'labsofscience-notebook',\n label: tr('labsofscience.nav.notebook', 'Notebook'),\n path: joinPath(basePath, 'notebook'),\n icon: <BookOpen size={20} />,\n order: 12,\n group: 'research',\n },\n {\n id: 'labsofscience-protocols',\n label: tr('labsofscience.nav.protocols', 'Protocols'),\n path: joinPath(basePath, 'protocols'),\n icon: <Microscope size={20} />,\n order: 13,\n group: 'research',\n },\n\n // Data & analysis\n {\n id: 'labsofscience-datasets',\n label: tr('labsofscience.nav.datasets', 'Datasets'),\n path: joinPath(basePath, 'datasets'),\n icon: <Database size={20} />,\n order: 20,\n group: 'data',\n },\n {\n id: 'labsofscience-pipelines',\n label: tr('labsofscience.nav.pipelines', 'Pipelines'),\n path: joinPath(basePath, 'pipelines'),\n icon: <GitBranch size={20} />,\n order: 21,\n group: 'data',\n },\n\n // The bench\n {\n id: 'labsofscience-inventory',\n label: tr('labsofscience.nav.inventory', 'Inventory'),\n path: joinPath(basePath, 'inventory'),\n icon: <Boxes size={20} />,\n order: 30,\n group: 'bench',\n },\n {\n id: 'labsofscience-instruments',\n label: tr('labsofscience.nav.instruments', 'Instruments'),\n path: joinPath(basePath, 'instruments'),\n icon: <Cpu size={20} />,\n order: 31,\n group: 'bench',\n },\n\n // AI operations\n {\n id: 'labsofscience-ai',\n label: tr('labsofscience.nav.ai', 'AI Operations'),\n path: joinPath(basePath, 'ai'),\n icon: <Sparkles size={20} />,\n order: 40,\n group: 'ai',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, tr]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'labsofscience-status',\n label: tr('labsofscience.footer.ready', 'LabsOfScience Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, tr]);\n\n return (\n <QueryClientProvider client={queryClient}>\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <LabsOfScienceProvider {...props}>\n <LabsOfScienceRoutes />\n </LabsOfScienceProvider>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;AA2BA,
|
|
1
|
+
{"version":3,"file":"LabsOfScienceRoot.js","names":["queryClient","QueryClient","LabsOfScienceRoot","props","tr","useTr","joinPath","base","path","useEffect","registerNavItems","navItems","basePath","LayoutDashboard","FolderKanban","FlaskConical","BookOpen","Microscope","Database","GitBranch","Boxes","Cpu","Sparkles","registerFooterItems","footerItems","QueryClientProvider","FeatureFlagProvider","LabsOfScienceProvider","LabsOfScienceRoutes"],"sources":["../../src/labsofscience/LabsOfScienceRoot.tsx"],"sourcesContent":["/**\n * LabsOfScience Root Component\n * @module labsofscience\n */\n\nimport type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { useTr } from './hooks/useTr';\nimport {\n LayoutDashboard,\n FolderKanban,\n FlaskConical,\n Database,\n Microscope,\n Cpu,\n Boxes,\n BookOpen,\n GitBranch,\n Sparkles,\n} from 'lucide-react';\nimport { LabsOfScienceProvider } from './context/LabsOfScienceContext';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { LabsOfScienceRoutes } from './LabsOfScienceRoutes';\nimport type { LabsOfScienceRootProps, NavItem } from './types';\n\n// Create a query client for this microfrontend\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000,\n retry: 1,\n },\n },\n});\n\nexport const LabsOfScienceRoot: FC<LabsOfScienceRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const tr = useTr();\n\n // Helper to join paths correctly\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with shell on mount\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n // Overview\n {\n id: 'labsofscience-overview',\n label: tr('labsofscience.nav.overview', 'Overview'),\n path: joinPath(basePath, ''),\n icon: <LayoutDashboard size={20} />,\n order: 1,\n group: 'main',\n },\n\n // Research\n {\n id: 'labsofscience-projects',\n label: tr('labsofscience.nav.projects', 'Projects'),\n path: joinPath(basePath, 'projects'),\n icon: <FolderKanban size={20} />,\n order: 10,\n group: 'research',\n },\n {\n id: 'labsofscience-experiments',\n label: tr('labsofscience.nav.experiments', 'Experiments'),\n path: joinPath(basePath, 'experiments'),\n icon: <FlaskConical size={20} />,\n order: 11,\n group: 'research',\n },\n {\n id: 'labsofscience-notebook',\n label: tr('labsofscience.nav.notebook', 'Notebook'),\n path: joinPath(basePath, 'notebook'),\n icon: <BookOpen size={20} />,\n order: 12,\n group: 'research',\n },\n {\n id: 'labsofscience-protocols',\n label: tr('labsofscience.nav.protocols', 'Protocols'),\n path: joinPath(basePath, 'protocols'),\n icon: <Microscope size={20} />,\n order: 13,\n group: 'research',\n },\n\n // Data & analysis\n {\n id: 'labsofscience-datasets',\n label: tr('labsofscience.nav.datasets', 'Datasets'),\n path: joinPath(basePath, 'datasets'),\n icon: <Database size={20} />,\n order: 20,\n group: 'data',\n },\n {\n id: 'labsofscience-pipelines',\n label: tr('labsofscience.nav.pipelines', 'Pipelines'),\n path: joinPath(basePath, 'pipelines'),\n icon: <GitBranch size={20} />,\n order: 21,\n group: 'data',\n },\n\n // The bench\n {\n id: 'labsofscience-inventory',\n label: tr('labsofscience.nav.inventory', 'Inventory'),\n path: joinPath(basePath, 'inventory'),\n icon: <Boxes size={20} />,\n order: 30,\n group: 'bench',\n },\n {\n id: 'labsofscience-instruments',\n label: tr('labsofscience.nav.instruments', 'Instruments'),\n path: joinPath(basePath, 'instruments'),\n icon: <Cpu size={20} />,\n order: 31,\n group: 'bench',\n },\n\n // AI operations\n {\n id: 'labsofscience-ai',\n label: tr('labsofscience.nav.ai', 'AI Operations'),\n path: joinPath(basePath, 'ai'),\n icon: <Sparkles size={20} />,\n order: 40,\n group: 'ai',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, tr]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'labsofscience-status',\n label: tr('labsofscience.footer.ready', 'LabsOfScience Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, tr]);\n\n return (\n <QueryClientProvider client={queryClient}>\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <LabsOfScienceProvider {...props}>\n <LabsOfScienceRoutes />\n </LabsOfScienceProvider>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;AA2BA,IAAMA,IAAc,IAAIC,EAAY,EAClC,gBAAgB,EACd,SAAS;CACP,WAAW;CACX,OAAO;AACT,EACF,EACF,CAAC,GAEYC,KAAiD,MAAU;CACtE,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as r, lazy as i } from "react";
|
|
5
5
|
import { Navigate as a, Route as o, Routes as s, useLocation as c } from "react-router";
|
|
6
6
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/labsofscience/LabsOfScienceRoutes.tsx
|
|
8
8
|
var d = i(() => import("./pages/projects/ProjectsListPage.js").then((e) => ({ default: e.ProjectsListPage }))), f = i(() => import("./pages/projects/ProjectDetailPage.js").then((e) => ({ default: e.ProjectDetailPage }))), p = i(() => import("./pages/experiments/ExperimentsListPage.js").then((e) => ({ default: e.ExperimentsListPage }))), m = i(() => import("./pages/experiments/ExperimentDetailPage.js").then((e) => ({ default: e.ExperimentDetailPage }))), h = i(() => import("./pages/datasets/DatasetsListPage.js").then((e) => ({ default: e.DatasetsListPage }))), g = i(() => import("./pages/datasets/DatasetDetailPage.js").then((e) => ({ default: e.DatasetDetailPage }))), _ = i(() => import("./pages/protocols/ProtocolsListPage.js").then((e) => ({ default: e.ProtocolsListPage }))), v = i(() => import("./pages/protocols/ProtocolDetailPage.js").then((e) => ({ default: e.ProtocolDetailPage }))), y = i(() => import("./pages/instruments/InstrumentsListPage.js").then((e) => ({ default: e.InstrumentsListPage }))), b = i(() => import("./pages/instruments/InstrumentDetailPage.js").then((e) => ({ default: e.InstrumentDetailPage }))), x = i(() => import("./pages/inventory/InventoryListPage.js").then((e) => ({ default: e.InventoryListPage }))), S = i(() => import("./pages/inventory/InventoryDetailPage.js").then((e) => ({ default: e.InventoryDetailPage }))), C = i(() => import("./pages/notebook/NotebookListPage.js").then((e) => ({ default: e.NotebookListPage }))), w = i(() => import("./pages/notebook/NotebookEntryDetailPage.js").then((e) => ({ default: e.NotebookEntryDetailPage }))), T = i(() => import("./pages/pipelines/PipelinesPage.js").then((e) => ({ default: e.PipelinesPage }))), E = i(() => import("./pages/analytics/AnalyticsPage.js").then((e) => ({ default: e.AnalyticsPage }))), D = i(() => import("./pages/ai/AiOperationsPage.js").then((e) => ({ default: e.AiOperationsPage }))), O = () => /* @__PURE__ */ l("div", {
|
|
9
9
|
className: "flex min-h-[400px] items-center justify-center",
|
|
10
10
|
children: /* @__PURE__ */ l("div", { className: "h-8 w-8 animate-spin rounded-full border-b-2 border-primary" })
|
|
@@ -98,7 +98,6 @@ var d = i(() => import("./pages/projects/ProjectsListPage.js").then((e) => ({ de
|
|
|
98
98
|
}), /* @__PURE__ */ l(t, {})]
|
|
99
99
|
});
|
|
100
100
|
};
|
|
101
|
-
//#endregion
|
|
102
101
|
export { k as LabsOfScienceRoutes };
|
|
103
102
|
|
|
104
103
|
//# sourceMappingURL=LabsOfScienceRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabsOfScienceRoutes.js","names":[],"sources":["../../src/labsofscience/LabsOfScienceRoutes.tsx"],"sourcesContent":["/**\n * LabsOfScience Routes\n * @module labsofscience\n *\n * Domain routes for the research microfrontend. The overview is eager-loaded;\n * every other page is lazy-loaded so the host shell only pays for what is\n * navigated to.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router';\nimport { useLabsOfScience } from './context/LabsOfScienceContext';\nimport { BottomNav } from './components/BottomNav';\n\n// Eager-loaded landing page\nimport { OverviewPage } from './pages/OverviewPage';\n\n// Projects\nconst ProjectsListPage = lazy(() =>\n import('./pages/projects/ProjectsListPage').then((m) => ({ default: m.ProjectsListPage }))\n);\nconst ProjectDetailPage = lazy(() =>\n import('./pages/projects/ProjectDetailPage').then((m) => ({ default: m.ProjectDetailPage }))\n);\n\n// Experiments (+ runs)\nconst ExperimentsListPage = lazy(() =>\n import('./pages/experiments/ExperimentsListPage').then((m) => ({\n default: m.ExperimentsListPage,\n }))\n);\nconst ExperimentDetailPage = lazy(() =>\n import('./pages/experiments/ExperimentDetailPage').then((m) => ({\n default: m.ExperimentDetailPage,\n }))\n);\n\n// Datasets\nconst DatasetsListPage = lazy(() =>\n import('./pages/datasets/DatasetsListPage').then((m) => ({ default: m.DatasetsListPage }))\n);\nconst DatasetDetailPage = lazy(() =>\n import('./pages/datasets/DatasetDetailPage').then((m) => ({ default: m.DatasetDetailPage }))\n);\n\n// Protocols\nconst ProtocolsListPage = lazy(() =>\n import('./pages/protocols/ProtocolsListPage').then((m) => ({ default: m.ProtocolsListPage }))\n);\nconst ProtocolDetailPage = lazy(() =>\n import('./pages/protocols/ProtocolDetailPage').then((m) => ({ default: m.ProtocolDetailPage }))\n);\n\n// Instruments\nconst InstrumentsListPage = lazy(() =>\n import('./pages/instruments/InstrumentsListPage').then((m) => ({\n default: m.InstrumentsListPage,\n }))\n);\nconst InstrumentDetailPage = lazy(() =>\n import('./pages/instruments/InstrumentDetailPage').then((m) => ({\n default: m.InstrumentDetailPage,\n }))\n);\n\n// Inventory\nconst InventoryListPage = lazy(() =>\n import('./pages/inventory/InventoryListPage').then((m) => ({ default: m.InventoryListPage }))\n);\nconst InventoryDetailPage = lazy(() =>\n import('./pages/inventory/InventoryDetailPage').then((m) => ({ default: m.InventoryDetailPage }))\n);\n\n// Notebook\nconst NotebookListPage = lazy(() =>\n import('./pages/notebook/NotebookListPage').then((m) => ({ default: m.NotebookListPage }))\n);\nconst NotebookEntryDetailPage = lazy(() =>\n import('./pages/notebook/NotebookEntryDetailPage').then((m) => ({\n default: m.NotebookEntryDetailPage,\n }))\n);\n\n// Pipelines\nconst PipelinesPage = lazy(() =>\n import('./pages/pipelines/PipelinesPage').then((m) => ({ default: m.PipelinesPage }))\n);\n\n// Research Analytics\nconst AnalyticsPage = lazy(() =>\n import('./pages/analytics/AnalyticsPage').then((m) => ({ default: m.AnalyticsPage }))\n);\n\n// AI operations (model picker, decision feed, decision cards)\nconst AiOperationsPage = lazy(() =>\n import('./pages/ai/AiOperationsPage').then((m) => ({ default: m.AiOperationsPage }))\n);\n\n// Loading fallback component\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-b-2 border-primary\" />\n </div>\n);\n\nexport const LabsOfScienceRoutes: FC = () => {\n const { basePath, isStandalone } = useLabsOfScience();\n const location = useLocation();\n\n // Normalize base path\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: Only render if path matches basePath (when integrated)\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col pb-16 lg:pb-0\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Overview — eager loaded landing */}\n <Route index element={<OverviewPage />} />\n\n {/* Projects */}\n <Route path=\"projects\" element={<ProjectsListPage />} />\n <Route path=\"projects/:id\" element={<ProjectDetailPage />} />\n\n {/* Experiments (+ runs) */}\n <Route path=\"experiments\" element={<ExperimentsListPage />} />\n <Route path=\"experiments/:id\" element={<ExperimentDetailPage />} />\n\n {/* Datasets */}\n <Route path=\"datasets\" element={<DatasetsListPage />} />\n <Route path=\"datasets/:id\" element={<DatasetDetailPage />} />\n\n {/* Protocols */}\n <Route path=\"protocols\" element={<ProtocolsListPage />} />\n <Route path=\"protocols/:id\" element={<ProtocolDetailPage />} />\n\n {/* Instruments */}\n <Route path=\"instruments\" element={<InstrumentsListPage />} />\n <Route path=\"instruments/:id\" element={<InstrumentDetailPage />} />\n\n {/* Inventory */}\n <Route path=\"inventory\" element={<InventoryListPage />} />\n <Route path=\"inventory/:id\" element={<InventoryDetailPage />} />\n\n {/* Notebook (ELN) */}\n <Route path=\"notebook\" element={<NotebookListPage />} />\n <Route path=\"notebook/:id\" element={<NotebookEntryDetailPage />} />\n\n {/* Analysis pipelines */}\n <Route path=\"pipelines\" element={<PipelinesPage />} />\n\n {/* Research Analytics */}\n <Route path=\"analytics\" element={<AnalyticsPage />} />\n\n {/* AI operations */}\n <Route path=\"ai\" element={<AiOperationsPage />} />\n\n {/* Fallback */}\n <Route path=\"*\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ACA,CAAA,GACV,kBAAC,GAAD,CAAY,CAAA,CACT;;AAET"}
|
|
1
|
+
{"version":3,"file":"LabsOfScienceRoutes.js","names":["ProjectsListPage","lazy","m","ProjectDetailPage","ExperimentsListPage","ExperimentDetailPage","DatasetsListPage","DatasetDetailPage","ProtocolsListPage","ProtocolDetailPage","InstrumentsListPage","InstrumentDetailPage","InventoryListPage","InventoryDetailPage","NotebookListPage","NotebookEntryDetailPage","PipelinesPage","AnalyticsPage","AiOperationsPage","PageLoader","LabsOfScienceRoutes","useLabsOfScience","location","useLocation","normalizedBasePath","basePath","isStandalone","Suspense","Routes","Route","OverviewPage","Navigate","BottomNav"],"sources":["../../src/labsofscience/LabsOfScienceRoutes.tsx"],"sourcesContent":["/**\n * LabsOfScience Routes\n * @module labsofscience\n *\n * Domain routes for the research microfrontend. The overview is eager-loaded;\n * every other page is lazy-loaded so the host shell only pays for what is\n * navigated to.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router';\nimport { useLabsOfScience } from './context/LabsOfScienceContext';\nimport { BottomNav } from './components/BottomNav';\n\n// Eager-loaded landing page\nimport { OverviewPage } from './pages/OverviewPage';\n\n// Projects\nconst ProjectsListPage = lazy(() =>\n import('./pages/projects/ProjectsListPage').then((m) => ({ default: m.ProjectsListPage }))\n);\nconst ProjectDetailPage = lazy(() =>\n import('./pages/projects/ProjectDetailPage').then((m) => ({ default: m.ProjectDetailPage }))\n);\n\n// Experiments (+ runs)\nconst ExperimentsListPage = lazy(() =>\n import('./pages/experiments/ExperimentsListPage').then((m) => ({\n default: m.ExperimentsListPage,\n }))\n);\nconst ExperimentDetailPage = lazy(() =>\n import('./pages/experiments/ExperimentDetailPage').then((m) => ({\n default: m.ExperimentDetailPage,\n }))\n);\n\n// Datasets\nconst DatasetsListPage = lazy(() =>\n import('./pages/datasets/DatasetsListPage').then((m) => ({ default: m.DatasetsListPage }))\n);\nconst DatasetDetailPage = lazy(() =>\n import('./pages/datasets/DatasetDetailPage').then((m) => ({ default: m.DatasetDetailPage }))\n);\n\n// Protocols\nconst ProtocolsListPage = lazy(() =>\n import('./pages/protocols/ProtocolsListPage').then((m) => ({ default: m.ProtocolsListPage }))\n);\nconst ProtocolDetailPage = lazy(() =>\n import('./pages/protocols/ProtocolDetailPage').then((m) => ({ default: m.ProtocolDetailPage }))\n);\n\n// Instruments\nconst InstrumentsListPage = lazy(() =>\n import('./pages/instruments/InstrumentsListPage').then((m) => ({\n default: m.InstrumentsListPage,\n }))\n);\nconst InstrumentDetailPage = lazy(() =>\n import('./pages/instruments/InstrumentDetailPage').then((m) => ({\n default: m.InstrumentDetailPage,\n }))\n);\n\n// Inventory\nconst InventoryListPage = lazy(() =>\n import('./pages/inventory/InventoryListPage').then((m) => ({ default: m.InventoryListPage }))\n);\nconst InventoryDetailPage = lazy(() =>\n import('./pages/inventory/InventoryDetailPage').then((m) => ({ default: m.InventoryDetailPage }))\n);\n\n// Notebook\nconst NotebookListPage = lazy(() =>\n import('./pages/notebook/NotebookListPage').then((m) => ({ default: m.NotebookListPage }))\n);\nconst NotebookEntryDetailPage = lazy(() =>\n import('./pages/notebook/NotebookEntryDetailPage').then((m) => ({\n default: m.NotebookEntryDetailPage,\n }))\n);\n\n// Pipelines\nconst PipelinesPage = lazy(() =>\n import('./pages/pipelines/PipelinesPage').then((m) => ({ default: m.PipelinesPage }))\n);\n\n// Research Analytics\nconst AnalyticsPage = lazy(() =>\n import('./pages/analytics/AnalyticsPage').then((m) => ({ default: m.AnalyticsPage }))\n);\n\n// AI operations (model picker, decision feed, decision cards)\nconst AiOperationsPage = lazy(() =>\n import('./pages/ai/AiOperationsPage').then((m) => ({ default: m.AiOperationsPage }))\n);\n\n// Loading fallback component\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-b-2 border-primary\" />\n </div>\n);\n\nexport const LabsOfScienceRoutes: FC = () => {\n const { basePath, isStandalone } = useLabsOfScience();\n const location = useLocation();\n\n // Normalize base path\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: Only render if path matches basePath (when integrated)\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col pb-16 lg:pb-0\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Overview — eager loaded landing */}\n <Route index element={<OverviewPage />} />\n\n {/* Projects */}\n <Route path=\"projects\" element={<ProjectsListPage />} />\n <Route path=\"projects/:id\" element={<ProjectDetailPage />} />\n\n {/* Experiments (+ runs) */}\n <Route path=\"experiments\" element={<ExperimentsListPage />} />\n <Route path=\"experiments/:id\" element={<ExperimentDetailPage />} />\n\n {/* Datasets */}\n <Route path=\"datasets\" element={<DatasetsListPage />} />\n <Route path=\"datasets/:id\" element={<DatasetDetailPage />} />\n\n {/* Protocols */}\n <Route path=\"protocols\" element={<ProtocolsListPage />} />\n <Route path=\"protocols/:id\" element={<ProtocolDetailPage />} />\n\n {/* Instruments */}\n <Route path=\"instruments\" element={<InstrumentsListPage />} />\n <Route path=\"instruments/:id\" element={<InstrumentDetailPage />} />\n\n {/* Inventory */}\n <Route path=\"inventory\" element={<InventoryListPage />} />\n <Route path=\"inventory/:id\" element={<InventoryDetailPage />} />\n\n {/* Notebook (ELN) */}\n <Route path=\"notebook\" element={<NotebookListPage />} />\n <Route path=\"notebook/:id\" element={<NotebookEntryDetailPage />} />\n\n {/* Analysis pipelines */}\n <Route path=\"pipelines\" element={<PipelinesPage />} />\n\n {/* Research Analytics */}\n <Route path=\"analytics\" element={<AnalyticsPage />} />\n\n {/* AI operations */}\n <Route path=\"ai\" element={<AiOperationsPage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n <BottomNav />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AAU,IAAG;MAAG,SAAA;KAAS,CAAA;IAAI,CAAA;GAChD,EAAA,CAAA;EACA,CAAA,GACV,kBAACC,GAAD,CAAY,CAAA,CACT;;AAET"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useLabsOfScience as e } from "../context/LabsOfScienceContext.js";
|
|
2
|
+
import { useTr as t } from "../hooks/useTr.js";
|
|
3
3
|
import { cn as n } from "../utils/cn.js";
|
|
4
4
|
import { useState as r } from "react";
|
|
5
5
|
import { BookOpen as i, Boxes as a, Cpu as o, Database as s, FlaskConical as c, FolderKanban as l, GitBranch as u, LayoutDashboard as d, Microscope as f, MoreHorizontal as p, Sparkles as m } from "lucide-react";
|
|
6
6
|
import { useLocation as h } from "react-router";
|
|
7
7
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
8
8
|
import { BottomSheet as y, BottomSheetContent as b, BottomSheetDescription as x, BottomSheetHeader as S, BottomSheetTitle as C } from "@burdenoff/fe-libs/ui";
|
|
9
|
-
|
|
9
|
+
// src/labsofscience/components/BottomNav.tsx
|
|
10
10
|
var w = [
|
|
11
11
|
{
|
|
12
12
|
id: "overview",
|
|
@@ -87,7 +87,7 @@ var D = ({ tab: e, active: t, onClick: r }) => {
|
|
|
87
87
|
})
|
|
88
88
|
});
|
|
89
89
|
}, O = () => {
|
|
90
|
-
let { getPath: i, navigateTo: a } =
|
|
90
|
+
let { getPath: i, navigateTo: a } = e(), o = h(), [s, c] = r(!1), l = t(), u = (e) => e.map((e) => ({
|
|
91
91
|
...e,
|
|
92
92
|
label: l(`labsofscience.nav.${e.id}`, e.label)
|
|
93
93
|
})), d = u(w), f = u(T), m = T.some((e) => {
|
|
@@ -137,15 +137,14 @@ var D = ({ tab: e, active: t, onClick: r }) => {
|
|
|
137
137
|
})]
|
|
138
138
|
})
|
|
139
139
|
})] });
|
|
140
|
-
}, k = ({ tab:
|
|
141
|
-
let { getPath: r } =
|
|
140
|
+
}, k = ({ tab: t, onClick: n }) => {
|
|
141
|
+
let { getPath: r } = e(), i = E(r, t.path);
|
|
142
142
|
return /* @__PURE__ */ _(D, {
|
|
143
|
-
tab:
|
|
144
|
-
active:
|
|
143
|
+
tab: t,
|
|
144
|
+
active: i,
|
|
145
145
|
onClick: n
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
-
//#endregion
|
|
149
148
|
export { O as BottomNav };
|
|
150
149
|
|
|
151
150
|
//# sourceMappingURL=BottomNav.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomNav.js","names":[],"sources":["../../../src/labsofscience/components/BottomNav.tsx"],"sourcesContent":["/**\n * BottomNav — LabsOfScience's mobile tab bar (BOFF-3982 / BOFF-4199 / BOFF-4642).\n * @module labsofscience/components\n *\n * The Capacitor iOS/Android shell renders this MFE inside a WebView with no\n * layout adaptation of its own: without this component the app shipped the\n * same desktop sidebar-oriented navigation on a phone screen. Mirrors the\n * host shell's own ten registered nav items (see `LabsOfScienceRoot`) but\n * surfaces only the four highest-traffic research destinations directly —\n * Overview / Projects / Experiments / Notebook — plus a \"More\" tab that opens\n * a bottom sheet for the remaining six (Protocols, Datasets, Pipelines,\n * Inventory, Instruments, AI Operations), matching the mobile mocks\n * (`labsofscience-specs/product/mockups/labsci-29-mobile-nav.png`,\n * `labsci-30-mobile-more-sheet.png`).\n *\n * Fixed at the bottom of the viewport, hidden at and above the `lg`\n * breakpoint — the same responsive split the shared `ResponsiveTable` /\n * `ResponsiveDialog` primitives already use throughout this MFE.\n */\n\nimport { type FC, useState } from 'react';\nimport { useLocation } from 'react-router';\nimport {\n LayoutDashboard,\n FolderKanban,\n FlaskConical,\n BookOpen,\n Microscope,\n Database,\n GitBranch,\n Boxes,\n Cpu,\n MoreHorizontal,\n Sparkles,\n} from 'lucide-react';\nimport {\n BottomSheet,\n BottomSheetContent,\n BottomSheetHeader,\n BottomSheetTitle,\n BottomSheetDescription,\n} from '@burdenoff/fe-libs/ui';\nimport { useLabsOfScience } from '../context/LabsOfScienceContext';\nimport { useTr } from '../hooks/useTr';\nimport { cn } from '../utils/cn';\n\ninterface TabDef {\n id: string;\n label: string;\n /** Path relative to basePath, '' for the overview. */\n path: string;\n icon: FC<{ className?: string }>;\n}\n\nconst PRIMARY_TABS: TabDef[] = [\n { id: 'overview', label: 'Overview', path: '', icon: LayoutDashboard },\n { id: 'projects', label: 'Projects', path: 'projects', icon: FolderKanban },\n { id: 'experiments', label: 'Experiments', path: 'experiments', icon: FlaskConical },\n { id: 'notebook', label: 'Notebook', path: 'notebook', icon: BookOpen },\n];\n\nconst MORE_TABS: TabDef[] = [\n { id: 'protocols', label: 'Protocols', path: 'protocols', icon: Microscope },\n { id: 'datasets', label: 'Datasets', path: 'datasets', icon: Database },\n { id: 'pipelines', label: 'Pipelines', path: 'pipelines', icon: GitBranch },\n { id: 'inventory', label: 'Inventory', path: 'inventory', icon: Boxes },\n { id: 'instruments', label: 'Instruments', path: 'instruments', icon: Cpu },\n { id: 'ai', label: 'AI Operations', path: 'ai', icon: Sparkles },\n];\n\nfunction useIsTabActive(getPath: (relativePath: string) => string, path: string): boolean {\n const location = useLocation();\n const target = getPath(path);\n return path === ''\n ? location.pathname === target\n : location.pathname === target || location.pathname.startsWith(`${target}/`);\n}\n\nconst TabButton: FC<{\n tab: TabDef;\n active: boolean;\n onClick: () => void;\n}> = ({ tab, active, onClick }) => {\n const Icon = tab.icon;\n return (\n <li className=\"flex-1\">\n <button\n type=\"button\"\n aria-current={active ? 'page' : undefined}\n onClick={onClick}\n className={cn(\n 'flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors',\n active ? 'text-accent' : 'text-text-tertiary hover:text-text-secondary'\n )}\n >\n <Icon className={cn('h-5 w-5', active && 'text-accent')} />\n {tab.label}\n </button>\n </li>\n );\n};\n\nexport const BottomNav: FC = () => {\n const { getPath, navigateTo } = useLabsOfScience();\n const location = useLocation();\n const [moreOpen, setMoreOpen] = useState(false);\n const tr = useTr();\n\n const translateTabs = (tabs: TabDef[]): TabDef[] =>\n tabs.map((tab) => ({\n ...tab,\n label: tr(`labsofscience.nav.${tab.id}`, tab.label),\n }));\n\n const primaryTabs = translateTabs(PRIMARY_TABS);\n const moreTabs = translateTabs(MORE_TABS);\n\n const moreActive = MORE_TABS.some((tab) => {\n const target = getPath(tab.path);\n return location.pathname === target || location.pathname.startsWith(`${target}/`);\n });\n\n const moreLabel = tr('labsofscience.nav.more', 'More');\n const moreSheetTitle = tr('labsofscience.mobileNav.moreTitle', 'More');\n const moreSheetDescription = tr(\n 'labsofscience.mobileNav.moreDescription',\n 'Protocols, datasets, pipelines, inventory, instruments and AI operations.'\n );\n\n return (\n <>\n <nav\n aria-label={tr('labsofscience.mobileNav.label', 'LabsOfScience mobile navigation')}\n className={cn(\n 'fixed inset-x-0 bottom-0 z-40 lg:hidden',\n 'border-t border-border-seam bg-bg-surface/95 backdrop-blur-sm',\n 'pb-[max(env(safe-area-inset-bottom),0px)]'\n )}\n >\n <ul className=\"flex\">\n {primaryTabs.map((tab) => (\n <TabButtonWithActive key={tab.id} tab={tab} onClick={() => navigateTo(tab.path)} />\n ))}\n <li className=\"flex-1\">\n <button\n type=\"button\"\n aria-current={moreActive ? 'page' : undefined}\n aria-haspopup=\"dialog\"\n aria-expanded={moreOpen}\n onClick={() => setMoreOpen(true)}\n className={cn(\n 'flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors',\n moreActive ? 'text-accent' : 'text-text-tertiary hover:text-text-secondary'\n )}\n >\n <MoreHorizontal className={cn('h-5 w-5', moreActive && 'text-accent')} />\n {moreLabel}\n </button>\n </li>\n </ul>\n </nav>\n\n <BottomSheet open={moreOpen} onOpenChange={setMoreOpen}>\n <BottomSheetContent className=\"lg:hidden\">\n <BottomSheetHeader>\n <BottomSheetTitle>{moreSheetTitle}</BottomSheetTitle>\n <BottomSheetDescription>{moreSheetDescription}</BottomSheetDescription>\n </BottomSheetHeader>\n <ul className=\"grid grid-cols-3 gap-3 pb-6\">\n {moreTabs.map((tab) => {\n const Icon = tab.icon;\n const target = getPath(tab.path);\n const active =\n location.pathname === target || location.pathname.startsWith(`${target}/`);\n return (\n <li key={tab.id}>\n <button\n type=\"button\"\n aria-current={active ? 'page' : undefined}\n onClick={() => {\n setMoreOpen(false);\n navigateTo(tab.path);\n }}\n className={cn(\n 'flex w-full flex-col items-center gap-2 rounded-card border border-border-subtle bg-bg-surface p-3 text-xs font-medium transition-colors',\n active\n ? 'border-border-strong text-accent'\n : 'text-text-secondary hover:border-border-strong hover:text-text-primary'\n )}\n >\n <Icon className={cn('h-5 w-5', active && 'text-accent')} />\n {tab.label}\n </button>\n </li>\n );\n })}\n </ul>\n </BottomSheetContent>\n </BottomSheet>\n </>\n );\n};\n\n/** Split out so `useIsTabActive` (which calls `useLocation`) stays a proper hook call per list item. */\nconst TabButtonWithActive: FC<{ tab: TabDef; onClick: () => void }> = ({ tab, onClick }) => {\n const { getPath } = useLabsOfScience();\n const active = useIsTabActive(getPath, tab.path);\n return <TabButton tab={tab} active={active} onClick={onClick} />;\n};\n"],"mappings":";;;;;;;;;AAsDA,IAAM,IAAyB;CAC7B;EAAE,IAAI;EAAY,OAAO;EAAY,MAAM;EAAI,MAAM;CAAgB;CACrE;EAAE,IAAI;EAAY,OAAO;EAAY,MAAM;EAAY,MAAM;CAAa;CAC1E;EAAE,IAAI;EAAe,OAAO;EAAe,MAAM;EAAe,MAAM;CAAa;CACnF;EAAE,IAAI;EAAY,OAAO;EAAY,MAAM;EAAY,MAAM;CAAS;AACxE,GAEM,IAAsB;CAC1B;EAAE,IAAI;EAAa,OAAO;EAAa,MAAM;EAAa,MAAM;CAAW;CAC3E;EAAE,IAAI;EAAY,OAAO;EAAY,MAAM;EAAY,MAAM;CAAS;CACtE;EAAE,IAAI;EAAa,OAAO;EAAa,MAAM;EAAa,MAAM;CAAU;CAC1E;EAAE,IAAI;EAAa,OAAO;EAAa,MAAM;EAAa,MAAM;CA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A,CACc;;CACT,CAAA,CACb,EAAA,CAAA;AAEN,GAGM,KAAiE,EAAE,QAAK,iBAAc;CAC1F,IAAM,EAAE,eAAY,EAAiB;CAErC,OAAO,kBAAC,GAAD;EAAgB;EAAa,QADrB,EAAe,GAAS,EAAI,IACP;EAAiB;CAAU,CAAA;AACjE"}
|
|
1
|
+
{"version":3,"file":"BottomNav.js","names":["_Fragment","PRIMARY_TABS","LayoutDashboard","FolderKanban","FlaskConical","BookOpen","MORE_TABS","Microscope","Database","GitBranch","Boxes","Cpu","Sparkles","useIsTabActive","location","useLocation","target","getPath","path","TabButton","Icon","tab","active","cn","BottomNav","useLabsOfScience","moreOpen","setMoreOpen","useState","tr","useTr","translateTabs","tabs","primaryTabs","moreTabs","moreActive","moreLabel","moreSheetTitle","moreSheetDescription","Fragment","TabButtonWithActive","navigateTo","MoreHorizontal","BottomSheet","BottomSheetContent","BottomSheetHeader","BottomSheetTitle","BottomSheetDescription"],"sources":["../../../src/labsofscience/components/BottomNav.tsx"],"sourcesContent":["/**\n * BottomNav — LabsOfScience's mobile tab bar (BOFF-3982 / BOFF-4199 / BOFF-4642).\n * @module labsofscience/components\n *\n * The Capacitor iOS/Android shell renders this MFE inside a WebView with no\n * layout adaptation of its own: without this component the app shipped the\n * same desktop sidebar-oriented navigation on a phone screen. Mirrors the\n * host shell's own ten registered nav items (see `LabsOfScienceRoot`) but\n * surfaces only the four highest-traffic research destinations directly —\n * Overview / Projects / Experiments / Notebook — plus a \"More\" tab that opens\n * a bottom sheet for the remaining six (Protocols, Datasets, Pipelines,\n * Inventory, Instruments, AI Operations), matching the mobile mocks\n * (`labsofscience-specs/product/mockups/labsci-29-mobile-nav.png`,\n * `labsci-30-mobile-more-sheet.png`).\n *\n * Fixed at the bottom of the viewport, hidden at and above the `lg`\n * breakpoint — the same responsive split the shared `ResponsiveTable` /\n * `ResponsiveDialog` primitives already use throughout this MFE.\n */\n\nimport { type FC, useState } from 'react';\nimport { useLocation } from 'react-router';\nimport {\n LayoutDashboard,\n FolderKanban,\n FlaskConical,\n BookOpen,\n Microscope,\n Database,\n GitBranch,\n Boxes,\n Cpu,\n MoreHorizontal,\n Sparkles,\n} from 'lucide-react';\nimport {\n BottomSheet,\n BottomSheetContent,\n BottomSheetHeader,\n BottomSheetTitle,\n BottomSheetDescription,\n} from '@burdenoff/fe-libs/ui';\nimport { useLabsOfScience } from '../context/LabsOfScienceContext';\nimport { useTr } from '../hooks/useTr';\nimport { cn } from '../utils/cn';\n\ninterface TabDef {\n id: string;\n label: string;\n /** Path relative to basePath, '' for the overview. */\n path: string;\n icon: FC<{ className?: string }>;\n}\n\nconst PRIMARY_TABS: TabDef[] = [\n { id: 'overview', label: 'Overview', path: '', icon: LayoutDashboard },\n { id: 'projects', label: 'Projects', path: 'projects', icon: FolderKanban },\n { id: 'experiments', label: 'Experiments', path: 'experiments', icon: FlaskConical },\n { id: 'notebook', label: 'Notebook', path: 'notebook', icon: BookOpen },\n];\n\nconst MORE_TABS: TabDef[] = [\n { id: 'protocols', label: 'Protocols', path: 'protocols', icon: Microscope },\n { id: 'datasets', label: 'Datasets', path: 'datasets', icon: Database },\n { id: 'pipelines', label: 'Pipelines', path: 'pipelines', icon: GitBranch },\n { id: 'inventory', label: 'Inventory', path: 'inventory', icon: Boxes },\n { id: 'instruments', label: 'Instruments', path: 'instruments', icon: Cpu },\n { id: 'ai', label: 'AI Operations', path: 'ai', icon: Sparkles },\n];\n\nfunction useIsTabActive(getPath: (relativePath: string) => string, path: string): boolean {\n const location = useLocation();\n const target = getPath(path);\n return path === ''\n ? location.pathname === target\n : location.pathname === target || location.pathname.startsWith(`${target}/`);\n}\n\nconst TabButton: FC<{\n tab: TabDef;\n active: boolean;\n onClick: () => void;\n}> = ({ tab, active, onClick }) => {\n const Icon = tab.icon;\n return (\n <li className=\"flex-1\">\n <button\n type=\"button\"\n aria-current={active ? 'page' : undefined}\n onClick={onClick}\n className={cn(\n 'flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors',\n active ? 'text-accent' : 'text-text-tertiary hover:text-text-secondary'\n )}\n >\n <Icon className={cn('h-5 w-5', active && 'text-accent')} />\n {tab.label}\n </button>\n </li>\n );\n};\n\nexport const BottomNav: FC = () => {\n const { getPath, navigateTo } = useLabsOfScience();\n const location = useLocation();\n const [moreOpen, setMoreOpen] = useState(false);\n const tr = useTr();\n\n const translateTabs = (tabs: TabDef[]): TabDef[] =>\n tabs.map((tab) => ({\n ...tab,\n label: tr(`labsofscience.nav.${tab.id}`, tab.label),\n }));\n\n const primaryTabs = translateTabs(PRIMARY_TABS);\n const moreTabs = translateTabs(MORE_TABS);\n\n const moreActive = MORE_TABS.some((tab) => {\n const target = getPath(tab.path);\n return location.pathname === target || location.pathname.startsWith(`${target}/`);\n });\n\n const moreLabel = tr('labsofscience.nav.more', 'More');\n const moreSheetTitle = tr('labsofscience.mobileNav.moreTitle', 'More');\n const moreSheetDescription = tr(\n 'labsofscience.mobileNav.moreDescription',\n 'Protocols, datasets, pipelines, inventory, instruments and AI operations.'\n );\n\n return (\n <>\n <nav\n aria-label={tr('labsofscience.mobileNav.label', 'LabsOfScience mobile navigation')}\n className={cn(\n 'fixed inset-x-0 bottom-0 z-40 lg:hidden',\n 'border-t border-border-seam bg-bg-surface/95 backdrop-blur-sm',\n 'pb-[max(env(safe-area-inset-bottom),0px)]'\n )}\n >\n <ul className=\"flex\">\n {primaryTabs.map((tab) => (\n <TabButtonWithActive key={tab.id} tab={tab} onClick={() => navigateTo(tab.path)} />\n ))}\n <li className=\"flex-1\">\n <button\n type=\"button\"\n aria-current={moreActive ? 'page' : undefined}\n aria-haspopup=\"dialog\"\n aria-expanded={moreOpen}\n onClick={() => setMoreOpen(true)}\n className={cn(\n 'flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors',\n moreActive ? 'text-accent' : 'text-text-tertiary hover:text-text-secondary'\n )}\n >\n <MoreHorizontal className={cn('h-5 w-5', moreActive && 'text-accent')} />\n {moreLabel}\n </button>\n </li>\n </ul>\n </nav>\n\n <BottomSheet open={moreOpen} onOpenChange={setMoreOpen}>\n <BottomSheetContent className=\"lg:hidden\">\n <BottomSheetHeader>\n <BottomSheetTitle>{moreSheetTitle}</BottomSheetTitle>\n <BottomSheetDescription>{moreSheetDescription}</BottomSheetDescription>\n </BottomSheetHeader>\n <ul className=\"grid grid-cols-3 gap-3 pb-6\">\n {moreTabs.map((tab) => {\n const Icon = tab.icon;\n const target = getPath(tab.path);\n const active =\n location.pathname === target || location.pathname.startsWith(`${target}/`);\n return (\n <li key={tab.id}>\n <button\n type=\"button\"\n aria-current={active ? 'page' : undefined}\n onClick={() => {\n setMoreOpen(false);\n navigateTo(tab.path);\n }}\n className={cn(\n 'flex w-full flex-col items-center gap-2 rounded-card border border-border-subtle bg-bg-surface p-3 text-xs font-medium transition-colors',\n active\n ? 'border-border-strong text-accent'\n : 'text-text-secondary hover:border-border-strong hover:text-text-primary'\n )}\n >\n <Icon className={cn('h-5 w-5', active && 'text-accent')} />\n {tab.label}\n </button>\n </li>\n );\n })}\n </ul>\n </BottomSheetContent>\n </BottomSheet>\n </>\n );\n};\n\n/** Split out so `useIsTabActive` (which calls `useLocation`) stays a proper hook call per list item. */\nconst TabButtonWithActive: FC<{ tab: TabDef; onClick: () => void }> = ({ tab, onClick }) => {\n const { getPath } = useLabsOfScience();\n const active = useIsTabActive(getPath, tab.path);\n return <TabButton tab={tab} active={active} onClick={onClick} />;\n};\n"],"mappings":";;;;;;;;;AAsDA,IAAMC,IAAyB;CAC7B;EAAE,IAAI;EAAY,OAAO;EAAY,MAAM;EAAI,MAAMC;CAAgB;CACrE;EAAE,IAAI;EAAY,OAAO;EAAY,MAAM;EAAY,MAAMC;CAAa;CAC1E;EAAE,IAAI;EAAe,OAAO;EAAe,MAAM;EAAe,MAAMC;CAAa;CACnF;EAAE,IAAI;EAAY,OAAO;EAAY,MAAM;EAAY,MAAMC;CAAS;AACxE,GAEMC,IAAsB;CAC1B;EAAE,IAAI;EAAa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JR,EAAS,aAAaE,KAAUF,EAAS,SAAS,WAAW,GAAGE,EAAO,EAAE;KAC3E,OACE,kBAAC,MAAD,EAAA,UACE,kBAAC,UAAD;MACE,MAAK;MACL,gBAAcM,IAAS,SAAS,KAAA;MAChC,eAAe;OAEb,AADAK,EAAY,EAAK,GACjBc,EAAWpB,EAAI,IAAI;MACrB;MACA,WAAWE,EACT,4IACAD,IACI,qCACA,wEACN;MAZF,UAAA,CAcE,kBAACF,GAAD,EAAM,WAAWG,EAAG,WAAWD,KAAU,aAAa,EAAI,CAAA,GACzDD,EAAI,KACC;KACN,CAAA,EAAA,GAlBKA,EAAI,EAkBT;IAER,CAAC;GACC,CAAA,CACc;;CACT,CAAA,CACb,EAAA,CAAA;AAEN,GAGMmB,KAAiE,EAAE,QAAK,iBAAc;CAC1F,IAAM,EAAE,eAAYf,EAAiB,GAC/BH,IAAST,EAAeI,GAASI,EAAI,IAAI;CAC/C,OAAO,kBAACF,GAAD;EAAgB;EAAa;EAAiB;CAAU,CAAA;AACjE"}
|
|
@@ -23,6 +23,5 @@ export interface DiscussionPanelProps {
|
|
|
23
23
|
/** Section heading; also used as the conversation context label. */
|
|
24
24
|
title?: string;
|
|
25
25
|
}
|
|
26
|
-
export declare function DiscussionPanel({ entityType, entityId, title, }: DiscussionPanelProps): import(
|
|
26
|
+
export declare function DiscussionPanel({ entityType, entityId, title, }: DiscussionPanelProps): import('react').JSX.Element;
|
|
27
27
|
export default DiscussionPanel;
|
|
28
|
-
//# sourceMappingURL=DiscussionPanel.d.ts.map
|
|
@@ -6,7 +6,7 @@ import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
|
6
6
|
import { Button as c } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
import { ContextConversationWidget as l } from "@burdenoff/fe-libs/shared";
|
|
8
8
|
import { useRegisterPageConversationContext as u } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
9
|
-
|
|
9
|
+
// src/labsofscience/components/DiscussionPanel.tsx
|
|
10
10
|
var d = class extends n {
|
|
11
11
|
state = { failed: !1 };
|
|
12
12
|
static getDerivedStateFromError() {
|
|
@@ -18,7 +18,7 @@ var d = class extends n {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
function f({ entityType: e, entityId: t, contextTitle: n, widgetKey: r }) {
|
|
21
|
-
|
|
21
|
+
let a = i(() => ({
|
|
22
22
|
entityType: e,
|
|
23
23
|
entityId: t,
|
|
24
24
|
contextTitle: n
|
|
@@ -26,7 +26,8 @@ function f({ entityType: e, entityId: t, contextTitle: n, widgetKey: r }) {
|
|
|
26
26
|
e,
|
|
27
27
|
t,
|
|
28
28
|
n
|
|
29
|
-
])
|
|
29
|
+
]);
|
|
30
|
+
return u(a), /* @__PURE__ */ o(l, { widgetKey: r });
|
|
30
31
|
}
|
|
31
32
|
function p({ entityType: n, entityId: i, title: l = "Discussion" }) {
|
|
32
33
|
let { navigate: u, navigateTo: p } = e(), m = `${n}:${i}`, h = r(() => {
|
|
@@ -61,7 +62,6 @@ function p({ entityType: n, entityId: i, title: l = "Discussion" }) {
|
|
|
61
62
|
})
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
|
-
//#endregion
|
|
65
65
|
export { p as DiscussionPanel, p as default };
|
|
66
66
|
|
|
67
67
|
//# sourceMappingURL=DiscussionPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscussionPanel.js","names":[],"sources":["../../../src/labsofscience/components/DiscussionPanel.tsx"],"sourcesContent":["/**\n * DiscussionPanel — entity-scoped discussion for a lab record, reusing the\n * platform wspace-conversations-svc widget (no bespoke comment model / UI).\n * @module labsofscience/components\n *\n * The fe-libs `ContextConversationWidget` binds its thread to the page's\n * conversation context. We drive that binding from the MFE via the public\n * `useRegisterPageConversationContext` hook (setting `entityType` + `entityId`),\n * exactly like microfe-cosmicintersection. The widget itself only accepts a\n * `widgetKey`, so the entity is supplied through the register hook rather than\n * props.\n *\n * The widget REQUIRES the host shell's `PageConversationContextProvider` (plus\n * the auth / active-context / gateway providers) to be mounted around the MFE.\n * When the shell has not yet mounted it, those hooks throw during render; the\n * error boundary below catches that and degrades to the working `/conversations`\n * deep-link so a detail page never crashes.\n */\n\nimport { Component, useCallback, useMemo, type ReactNode } from 'react';\nimport { MessagesSquare } from 'lucide-react';\nimport { ContextConversationWidget } from '@burdenoff/fe-libs/shared';\nimport { useRegisterPageConversationContext } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { useLabsOfScience } from '../context/LabsOfScienceContext';\nimport { DetailSection } from '../pages/shared/DetailComponents';\n\ninterface DiscussionBoundaryProps {\n fallback: ReactNode;\n children: ReactNode;\n}\n\ninterface DiscussionBoundaryState {\n failed: boolean;\n}\n\n/**\n * Renders `fallback` if the embedded conversation widget throws (e.g. the host\n * shell has not mounted the conversation page-context provider yet). The failure\n * is deterministic per mount, so once tripped we stay on the fallback.\n */\nclass DiscussionBoundary extends Component<DiscussionBoundaryProps, DiscussionBoundaryState> {\n state: DiscussionBoundaryState = { failed: false };\n\n static getDerivedStateFromError(): DiscussionBoundaryState {\n return { failed: true };\n }\n\n componentDidCatch(): void {\n // Intentionally swallowed: absence of the shell conversation provider is an\n // expected degradation, surfaced to the user via the deep-link fallback.\n }\n\n render(): ReactNode {\n return this.state.failed ? this.props.fallback : this.props.children;\n }\n}\n\ninterface DiscussionThreadProps {\n entityType: string;\n entityId: string;\n contextTitle: string;\n widgetKey: string;\n}\n\nfunction DiscussionThread({\n entityType,\n entityId,\n contextTitle,\n widgetKey,\n}: DiscussionThreadProps) {\n // Stable object identity: `useRegisterPageConversationContext` keys its effect\n // on this reference, so a fresh inline object each render would loop the shared\n // provider. Memoize on the primitive inputs.\n const conversationContext = useMemo(\n () => ({ entityType, entityId, contextTitle }),\n [entityType, entityId, contextTitle]\n );\n useRegisterPageConversationContext(conversationContext);\n return <ContextConversationWidget widgetKey={widgetKey} />;\n}\n\nexport interface DiscussionPanelProps {\n /** Stable entity-type discriminator, e.g. `lab-experiment`. */\n entityType: string;\n entityId: string;\n /** Section heading; also used as the conversation context label. */\n title?: string;\n}\n\nexport function DiscussionPanel({\n entityType,\n entityId,\n title = 'Discussion',\n}: DiscussionPanelProps) {\n const { navigate, navigateTo } = useLabsOfScience();\n\n // One widget/thread per entity; `entityType` keeps threads distinct when the\n // same id space collides across domains.\n const widgetKey = `${entityType}:${entityId}`;\n\n const openConversations = useCallback(() => {\n // Prefer the shell's absolute navigate when integrated; fall back to the\n // MFE-relative helper in standalone mode.\n if (navigate) {\n navigate('/conversations');\n } else {\n navigateTo('conversations');\n }\n }, [navigate, navigateTo]);\n\n const fallback = (\n <div className=\"flex flex-wrap items-center gap-2 rounded-card border border-border-seam bg-bg-sunken px-4 py-3 text-sm text-text-secondary\">\n <MessagesSquare className=\"size-4\" aria-hidden=\"true\" />\n <span>Discuss this with your team.</span>\n <Button variant=\"link\" size=\"sm\" className=\"h-auto px-0\" onClick={openConversations}>\n Open conversations\n </Button>\n </div>\n );\n\n return (\n <DetailSection title=\"Discussion\">\n <DiscussionBoundary fallback={fallback}>\n <DiscussionThread\n entityType={entityType}\n entityId={entityId}\n contextTitle={title}\n widgetKey={widgetKey}\n />\n </DiscussionBoundary>\n </DetailSection>\n );\n}\n\nexport default DiscussionPanel;\n"],"mappings":";;;;;;;;;AAyCA,
|
|
1
|
+
{"version":3,"file":"DiscussionPanel.js","names":["_jsxs","DiscussionBoundary","Component","DiscussionThread","conversationContext","useMemo","entityType","entityId","contextTitle","useRegisterPageConversationContext","ContextConversationWidget","DiscussionPanel","useLabsOfScience","widgetKey","openConversations","useCallback","navigate","navigateTo","DetailSection","MessagesSquare","Button","title"],"sources":["../../../src/labsofscience/components/DiscussionPanel.tsx"],"sourcesContent":["/**\n * DiscussionPanel — entity-scoped discussion for a lab record, reusing the\n * platform wspace-conversations-svc widget (no bespoke comment model / UI).\n * @module labsofscience/components\n *\n * The fe-libs `ContextConversationWidget` binds its thread to the page's\n * conversation context. We drive that binding from the MFE via the public\n * `useRegisterPageConversationContext` hook (setting `entityType` + `entityId`),\n * exactly like microfe-cosmicintersection. The widget itself only accepts a\n * `widgetKey`, so the entity is supplied through the register hook rather than\n * props.\n *\n * The widget REQUIRES the host shell's `PageConversationContextProvider` (plus\n * the auth / active-context / gateway providers) to be mounted around the MFE.\n * When the shell has not yet mounted it, those hooks throw during render; the\n * error boundary below catches that and degrades to the working `/conversations`\n * deep-link so a detail page never crashes.\n */\n\nimport { Component, useCallback, useMemo, type ReactNode } from 'react';\nimport { MessagesSquare } from 'lucide-react';\nimport { ContextConversationWidget } from '@burdenoff/fe-libs/shared';\nimport { useRegisterPageConversationContext } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { useLabsOfScience } from '../context/LabsOfScienceContext';\nimport { DetailSection } from '../pages/shared/DetailComponents';\n\ninterface DiscussionBoundaryProps {\n fallback: ReactNode;\n children: ReactNode;\n}\n\ninterface DiscussionBoundaryState {\n failed: boolean;\n}\n\n/**\n * Renders `fallback` if the embedded conversation widget throws (e.g. the host\n * shell has not mounted the conversation page-context provider yet). The failure\n * is deterministic per mount, so once tripped we stay on the fallback.\n */\nclass DiscussionBoundary extends Component<DiscussionBoundaryProps, DiscussionBoundaryState> {\n override state: DiscussionBoundaryState = { failed: false };\n\n static getDerivedStateFromError(): DiscussionBoundaryState {\n return { failed: true };\n }\n\n override componentDidCatch(): void {\n // Intentionally swallowed: absence of the shell conversation provider is an\n // expected degradation, surfaced to the user via the deep-link fallback.\n }\n\n override render(): ReactNode {\n return this.state.failed ? this.props.fallback : this.props.children;\n }\n}\n\ninterface DiscussionThreadProps {\n entityType: string;\n entityId: string;\n contextTitle: string;\n widgetKey: string;\n}\n\nfunction DiscussionThread({\n entityType,\n entityId,\n contextTitle,\n widgetKey,\n}: DiscussionThreadProps) {\n // Stable object identity: `useRegisterPageConversationContext` keys its effect\n // on this reference, so a fresh inline object each render would loop the shared\n // provider. Memoize on the primitive inputs.\n const conversationContext = useMemo(\n () => ({ entityType, entityId, contextTitle }),\n [entityType, entityId, contextTitle]\n );\n useRegisterPageConversationContext(conversationContext);\n return <ContextConversationWidget widgetKey={widgetKey} />;\n}\n\nexport interface DiscussionPanelProps {\n /** Stable entity-type discriminator, e.g. `lab-experiment`. */\n entityType: string;\n entityId: string;\n /** Section heading; also used as the conversation context label. */\n title?: string;\n}\n\nexport function DiscussionPanel({\n entityType,\n entityId,\n title = 'Discussion',\n}: DiscussionPanelProps) {\n const { navigate, navigateTo } = useLabsOfScience();\n\n // One widget/thread per entity; `entityType` keeps threads distinct when the\n // same id space collides across domains.\n const widgetKey = `${entityType}:${entityId}`;\n\n const openConversations = useCallback(() => {\n // Prefer the shell's absolute navigate when integrated; fall back to the\n // MFE-relative helper in standalone mode.\n if (navigate) {\n navigate('/conversations');\n } else {\n navigateTo('conversations');\n }\n }, [navigate, navigateTo]);\n\n const fallback = (\n <div className=\"flex flex-wrap items-center gap-2 rounded-card border border-border-seam bg-bg-sunken px-4 py-3 text-sm text-text-secondary\">\n <MessagesSquare className=\"size-4\" aria-hidden=\"true\" />\n <span>Discuss this with your team.</span>\n <Button variant=\"link\" size=\"sm\" className=\"h-auto px-0\" onClick={openConversations}>\n Open conversations\n </Button>\n </div>\n );\n\n return (\n <DetailSection title=\"Discussion\">\n <DiscussionBoundary fallback={fallback}>\n <DiscussionThread\n entityType={entityType}\n entityId={entityId}\n contextTitle={title}\n widgetKey={widgetKey}\n />\n </DiscussionBoundary>\n </DetailSection>\n );\n}\n\nexport default DiscussionPanel;\n"],"mappings":";;;;;;;;;AAyCA,IAAMC,IAAN,cAAiCC,EAA4D;CAC3F,QAA0C,EAAE,QAAQ,GAAM;CAE1D,OAAO,2BAAoD;EACzD,OAAO,EAAE,QAAQ,GAAK;CACxB;CAEA,oBAAmC,CAGnC;CAEA,SAA6B;EAC3B,OAAO,KAAK,MAAM,SAAS,KAAK,MAAM,WAAW,KAAK,MAAM;CAC9D;AACF;AASA,SAASC,EAAiB,EACxB,eACA,aACA,iBACA,gBACwB;CAIxB,IAAMC,IAAsBC,SACnB;EAAE;EAAY;EAAU;CAAa,IAC5C;EAACC;EAAYC;EAAUC;CAAY,CACrC;CAEA,OADAC,EAAmCL,CAAmB,GAC/C,kBAACM,GAAD,EAAsC,aAAY,CAAA;AAC3D;AAUA,SAAgBC,EAAgB,EAC9B,eACA,aACA,WAAQ,gBACe;CACvB,IAAM,EAAE,aAAU,kBAAeC,EAAiB,GAI5CC,IAAY,GAAGP,EAAW,GAAGC,KAE7BO,IAAoBC,QAAkB;EAG1C,AAAIC,IACFA,EAAS,gBAAgB,IAEzBC,EAAW,eAAe;CAE9B,GAAG,CAACD,GAAUC,CAAU,CAAC;CAYzB,OACE,kBAACC,GAAD;EAAe,OAAM;EACnB,UAAA,kBAACjB,GAAD;GAA8B,UAXhCD,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACE,kBAACmB,GAAD;MAAgB,WAAU;MAAS,eAAY;KAAQ,CAAA;KACvD,kBAAC,QAAD,EAAA,UAAM,+BAAkC,CAAA;KACxC,kBAACC,GAAD;MAAQ,SAAQ;MAAO,MAAK;MAAK,WAAU;MAAc,SAASN;MAAmB,UAAA;KAE7E,CAAA;IACL;G,CAK2B;GAC5B,UAAA,kBAACX,GAAD;IACc;IACF;IACV,cAAckB;IACH;GACZ,CAAA;EACiB,CAAA;CACP,CAAA;AAEnB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
3
2
|
interface EmptyStateProps {
|
|
4
3
|
icon?: ReactNode;
|
|
5
4
|
/** Illustration name → host serves /illustrations/<name>.webp */
|
|
@@ -11,4 +10,3 @@ interface EmptyStateProps {
|
|
|
11
10
|
}
|
|
12
11
|
export declare const EmptyState: FC<EmptyStateProps>;
|
|
13
12
|
export {};
|
|
14
|
-
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn as e } from "../utils/cn.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { IllustratedEmptyState as r } from "@burdenoff/fe-libs/ui";
|
|
4
|
-
|
|
4
|
+
// src/labsofscience/components/EmptyState.tsx
|
|
5
5
|
var i = ({ icon: i, illustration: a, title: o, description: s, action: c, className: l }) => a ? /* @__PURE__ */ t(r, {
|
|
6
6
|
illustration: a,
|
|
7
7
|
title: o,
|
|
@@ -29,7 +29,6 @@ var i = ({ icon: i, illustration: a, title: o, description: s, action: c, classN
|
|
|
29
29
|
})
|
|
30
30
|
]
|
|
31
31
|
});
|
|
32
|
-
//#endregion
|
|
33
32
|
export { i as EmptyState };
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.js","names":[],"sources":["../../../src/labsofscience/components/EmptyState.tsx"],"sourcesContent":["/**\n * Empty State Component\n * @module labsofscience/components\n *\n * Boff UI 2.0: when an `illustration` name is provided, renders the on-brand\n * IllustratedEmptyState from fe-libs. Falls back to the legacy icon layout to\n * preserve every existing call site.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface EmptyStateProps {\n icon?: ReactNode;\n /** Illustration name → host serves /illustrations/<name>.webp */\n illustration?: string;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}\n\nexport const EmptyState: FC<EmptyStateProps> = ({\n icon,\n illustration,\n title,\n description,\n action,\n className,\n}) => {\n if (illustration) {\n return (\n <IllustratedEmptyState\n illustration={illustration}\n title={title}\n description={description}\n action={action}\n className={cn('py-12', className)}\n />\n );\n }\n\n return (\n <div\n className={cn('flex flex-col items-center justify-center px-4 py-12 text-center', className)}\n >\n {icon && <div className=\"mb-4 text-text-secondary opacity-50\">{icon}</div>}\n <h3 className=\"text-lg font-medium text-text-primary\">{title}</h3>\n {description && <p className=\"mt-2 max-w-sm text-sm text-text-secondary\">{description}</p>}\n {action && <div className=\"mt-6\">{action}</div>}\n </div>\n );\n};\n"],"mappings":";;;;AAuBA,
|
|
1
|
+
{"version":3,"file":"EmptyState.js","names":["EmptyState","illustration","IllustratedEmptyState","cn","className","icon","title","description","action"],"sources":["../../../src/labsofscience/components/EmptyState.tsx"],"sourcesContent":["/**\n * Empty State Component\n * @module labsofscience/components\n *\n * Boff UI 2.0: when an `illustration` name is provided, renders the on-brand\n * IllustratedEmptyState from fe-libs. Falls back to the legacy icon layout to\n * preserve every existing call site.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface EmptyStateProps {\n icon?: ReactNode;\n /** Illustration name → host serves /illustrations/<name>.webp */\n illustration?: string;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}\n\nexport const EmptyState: FC<EmptyStateProps> = ({\n icon,\n illustration,\n title,\n description,\n action,\n className,\n}) => {\n if (illustration) {\n return (\n <IllustratedEmptyState\n illustration={illustration}\n title={title}\n description={description}\n action={action}\n className={cn('py-12', className)}\n />\n );\n }\n\n return (\n <div\n className={cn('flex flex-col items-center justify-center px-4 py-12 text-center', className)}\n >\n {icon && <div className=\"mb-4 text-text-secondary opacity-50\">{icon}</div>}\n <h3 className=\"text-lg font-medium text-text-primary\">{title}</h3>\n {description && <p className=\"mt-2 max-w-sm text-sm text-text-secondary\">{description}</p>}\n {action && <div className=\"mt-6\">{action}</div>}\n </div>\n );\n};\n"],"mappings":";;;;AAuBA,IAAaA,KAAmC,EAC9C,SACA,iBACA,UACA,gBACA,WACA,mBAEIC,IAEA,kBAACC,GAAD;CACgB;CACP;CACM;CACL;CACR,WAAWC,EAAG,SAASC,CAAS;AACjC,CAAA,IAKH,kBAAC,OAAD;CACE,WAAWD,EAAG,oEAAoEC,CAAS;CAD7F,UAAA;EAGGC,KAAQ,kBAAC,OAAD;GAAK,WAAU;GAAuC,UAAAA;EAAU,CAAA;EACzE,kBAAC,MAAD;GAAI,WAAU;GAAyC,UAAAC;EAAU,CAAA;EAChEC,KAAe,kBAAC,KAAD;GAAG,WAAU;GAA6C,UAAAA;EAAe,CAAA;EACxFC,KAAU,kBAAC,OAAD;GAAK,WAAU;GAAQ,UAAAA;EAAY,CAAA;CAC3C"}
|
|
@@ -3,7 +3,7 @@ import { formatBytes as t } from "../utils/formatters.js";
|
|
|
3
3
|
import { useFileDownloadUrl as n, useFileMeta as r } from "../utils/uploadFile.js";
|
|
4
4
|
import { Download as i, FileText as a, Loader2 as o } from "lucide-react";
|
|
5
5
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/labsofscience/components/FileAttachment.tsx
|
|
7
7
|
var l = ({ fileId: l, className: u }) => {
|
|
8
8
|
let d = r(l), f = n(l), p = d.data?.name ?? "Attachment", m = d.data ? t(d.data.size) : null, h = f.data ?? void 0;
|
|
9
9
|
return /* @__PURE__ */ c("div", {
|
|
@@ -39,7 +39,6 @@ var l = ({ fileId: l, className: u }) => {
|
|
|
39
39
|
]
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { l as FileAttachment };
|
|
44
43
|
|
|
45
44
|
//# sourceMappingURL=FileAttachment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileAttachment.js","names":[],"sources":["../../../src/labsofscience/components/FileAttachment.tsx"],"sourcesContent":["/**\n * File attachment display\n * @module labsofscience/components\n *\n * Renders a single wspace-files-svc file (resolved by id) as a compact row with\n * its name, size, and a TTL-safe download link. Used on the detail pages to\n * surface attachments produced by the inline upload flow.\n */\n\nimport type { FC } from 'react';\nimport { Download, FileText, Loader2 } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { formatBytes } from '../utils/formatters';\nimport { useFileMeta, useFileDownloadUrl } from '../utils/uploadFile';\n\ninterface FileAttachmentProps {\n fileId: string;\n className?: string;\n}\n\nexport const FileAttachment: FC<FileAttachmentProps> = ({ fileId, className }) => {\n const meta = useFileMeta(fileId);\n const url = useFileDownloadUrl(fileId);\n\n const name = meta.data?.name ?? 'Attachment';\n const size = meta.data ? formatBytes(meta.data.size) : null;\n const href = url.data ?? undefined;\n\n return (\n <div\n className={cn(\n 'flex items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken px-3 py-2',\n className\n )}\n >\n <FileText aria-hidden=\"true\" className=\"h-4 w-4 flex-shrink-0 text-text-tertiary\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm text-text-primary\">\n {meta.isLoading ? 'Loading attachment…' : name}\n </p>\n {size && size !== '—' && <p className=\"text-xs text-text-tertiary\">{size}</p>}\n </div>\n {url.isLoading ? (\n <Loader2 aria-hidden=\"true\" className=\"h-4 w-4 animate-spin text-text-tertiary\" />\n ) : href ? (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-text-link hover:bg-bg-surface\"\n >\n <Download className=\"h-3.5 w-3.5\" />\n Download\n </a>\n ) : (\n <span className=\"text-xs text-text-tertiary\">Unavailable</span>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;AAoBA,
|
|
1
|
+
{"version":3,"file":"FileAttachment.js","names":["FileAttachment","meta","useFileMeta","fileId","url","useFileDownloadUrl","name","size","formatBytes","href","cn","className","FileText","Loader2","Download"],"sources":["../../../src/labsofscience/components/FileAttachment.tsx"],"sourcesContent":["/**\n * File attachment display\n * @module labsofscience/components\n *\n * Renders a single wspace-files-svc file (resolved by id) as a compact row with\n * its name, size, and a TTL-safe download link. Used on the detail pages to\n * surface attachments produced by the inline upload flow.\n */\n\nimport type { FC } from 'react';\nimport { Download, FileText, Loader2 } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { formatBytes } from '../utils/formatters';\nimport { useFileMeta, useFileDownloadUrl } from '../utils/uploadFile';\n\ninterface FileAttachmentProps {\n fileId: string;\n className?: string;\n}\n\nexport const FileAttachment: FC<FileAttachmentProps> = ({ fileId, className }) => {\n const meta = useFileMeta(fileId);\n const url = useFileDownloadUrl(fileId);\n\n const name = meta.data?.name ?? 'Attachment';\n const size = meta.data ? formatBytes(meta.data.size) : null;\n const href = url.data ?? undefined;\n\n return (\n <div\n className={cn(\n 'flex items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken px-3 py-2',\n className\n )}\n >\n <FileText aria-hidden=\"true\" className=\"h-4 w-4 flex-shrink-0 text-text-tertiary\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm text-text-primary\">\n {meta.isLoading ? 'Loading attachment…' : name}\n </p>\n {size && size !== '—' && <p className=\"text-xs text-text-tertiary\">{size}</p>}\n </div>\n {url.isLoading ? (\n <Loader2 aria-hidden=\"true\" className=\"h-4 w-4 animate-spin text-text-tertiary\" />\n ) : href ? (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-text-link hover:bg-bg-surface\"\n >\n <Download className=\"h-3.5 w-3.5\" />\n Download\n </a>\n ) : (\n <span className=\"text-xs text-text-tertiary\">Unavailable</span>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;AAoBA,IAAaA,KAA2C,EAAE,WAAQ,mBAAgB;CAChF,IAAMC,IAAOC,EAAYC,CAAM,GACzBC,IAAMC,EAAmBF,CAAM,GAE/BG,IAAOL,EAAK,MAAM,QAAQ,cAC1BM,IAAON,EAAK,OAAOO,EAAYP,EAAK,KAAK,IAAI,IAAI,MACjDQ,IAAOL,EAAI,QAAQ,KAAA;CAEzB,OACE,kBAAC,OAAD;EACE,WAAWM,EACT,uFACAC,CACF;EAJF,UAAA;GAME,kBAACC,GAAD;IAAU,eAAY;IAAO,WAAU;GAA4C,CAAA;GACnF,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,KAAD;KAAG,WAAU;KACV,UAAAX,EAAK,YAAY,wBAAwBK;IACzC,CAAA,GACFC,KAAQA,MAAS,OAAO,kBAAC,KAAD;KAAG,WAAU;KAA8B,UAAAA;IAAQ,CAAA,CACzE;;GACJH,EAAI,YACH,kBAACS,GAAD;IAAS,eAAY;IAAO,WAAU;GAA2C,CAAA,IAC/EJ,IACF,kBAAC,KAAD;IACQ;IACN,QAAO;IACP,KAAI;IACJ,WAAU;IAJZ,UAAA,CAME,kBAACK,GAAD,EAAU,WAAU,cAAe,CAAA,GAAC,UAEnC;GAEH,CAAA,IAAA,kBAAC,QAAD;IAAM,WAAU;IAA6B,UAAA;GAAiB,CAAA;EAE7D;;AAET"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { UploadedFile } from '../utils/uploadFile';
|
|
3
|
-
|
|
4
3
|
interface FileUploadFieldProps {
|
|
5
4
|
label: string;
|
|
6
5
|
value: UploadedFile[];
|
|
@@ -14,4 +13,3 @@ interface FileUploadFieldProps {
|
|
|
14
13
|
}
|
|
15
14
|
export declare const FileUploadField: FC<FileUploadFieldProps>;
|
|
16
15
|
export {};
|
|
17
|
-
//# sourceMappingURL=FileUploadField.d.ts.map
|
|
@@ -4,7 +4,7 @@ import { useId as n, useRef as r, useState as i } from "react";
|
|
|
4
4
|
import { Loader2 as a, Paperclip as o, X as s } from "lucide-react";
|
|
5
5
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
6
|
import { Label as u } from "@burdenoff/fe-libs/ui";
|
|
7
|
-
|
|
7
|
+
// src/labsofscience/components/FileUploadField.tsx
|
|
8
8
|
var d = ({ label: d, value: f, onChange: p, multiple: m = !1, accept: h, disabled: g = !1, hint: _ }) => {
|
|
9
9
|
let v = n(), y = r(null), { upload: b, isUploading: x, progress: S } = t(), [C, w] = i(null), T = async (e) => {
|
|
10
10
|
if (!e || e.length === 0) return;
|
|
@@ -84,7 +84,6 @@ var d = ({ label: d, value: f, onChange: p, multiple: m = !1, accept: h, disable
|
|
|
84
84
|
]
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
|
-
//#endregion
|
|
88
87
|
export { d as FileUploadField };
|
|
89
88
|
|
|
90
89
|
//# sourceMappingURL=FileUploadField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploadField.js","names":[],"sources":["../../../src/labsofscience/components/FileUploadField.tsx"],"sourcesContent":["/**\n * File upload form control\n * @module labsofscience/components\n *\n * A labelled control that runs the inline wspace-files 3-step upload and hands\n * the resulting `{ fileId, fileName }` back to the form. Supports single-file\n * (dataset version, inventory SDS) and multi-file (notebook attachments) modes.\n */\n\nimport { useId, useRef, useState, type FC } from 'react';\nimport { Paperclip, X, Loader2 } from 'lucide-react';\nimport { Label } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { useFileUpload, type UploadedFile } from '../utils/uploadFile';\n\ninterface FileUploadFieldProps {\n label: string;\n value: UploadedFile[];\n onChange: (files: UploadedFile[]) => void;\n /** Allow attaching more than one file (notebook entries). Defaults to single. */\n multiple?: boolean;\n accept?: string;\n disabled?: boolean;\n /** Optional helper text rendered under the control. */\n hint?: string;\n}\n\nexport const FileUploadField: FC<FileUploadFieldProps> = ({\n label,\n value,\n onChange,\n multiple = false,\n accept,\n disabled = false,\n hint,\n}) => {\n const inputId = useId();\n const inputRef = useRef<HTMLInputElement>(null);\n const { upload, isUploading, progress } = useFileUpload();\n const [error, setError] = useState<string | null>(null);\n\n const handleFiles = async (fileList: FileList | null) => {\n if (!fileList || fileList.length === 0) return;\n setError(null);\n const picked = multiple ? Array.from(fileList) : [fileList[0]];\n try {\n const uploaded: UploadedFile[] = [];\n for (const file of picked) {\n if (!file) continue;\n uploaded.push(await upload(file));\n }\n onChange(multiple ? [...value, ...uploaded] : uploaded);\n } catch (err) {\n setError(err instanceof Error ? err.message : 'The file could not be uploaded.');\n } finally {\n if (inputRef.current) inputRef.current.value = '';\n }\n };\n\n const removeAt = (fileId: string) => {\n onChange(value.filter((file) => file.fileId !== fileId));\n };\n\n return (\n <div className=\"space-y-1.5\">\n <Label htmlFor={inputId}>{label}</Label>\n\n {value.length > 0 && (\n <ul className=\"space-y-1.5\">\n {value.map((file) => (\n <li\n key={file.fileId}\n className=\"flex items-center gap-2 rounded-lg border border-border-seam bg-bg-sunken px-3 py-1.5\"\n >\n <Paperclip\n aria-hidden=\"true\"\n className=\"h-3.5 w-3.5 flex-shrink-0 text-text-tertiary\"\n />\n <span className=\"min-w-0 flex-1 truncate text-sm text-text-primary\">\n {file.fileName}\n </span>\n <button\n type=\"button\"\n onClick={() => removeAt(file.fileId)}\n disabled={disabled || isUploading}\n aria-label={`Remove ${file.fileName}`}\n className=\"rounded p-0.5 text-text-tertiary hover:text-text-primary disabled:opacity-50\"\n >\n <X className=\"h-3.5 w-3.5\" />\n </button>\n </li>\n ))}\n </ul>\n )}\n\n <div className=\"flex items-center gap-3\">\n <input\n ref={inputRef}\n id={inputId}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n disabled={disabled || isUploading}\n onChange={(event) => void handleFiles(event.target.files)}\n className={cn(\n 'block w-full text-sm text-text-secondary',\n 'file:mr-3 file:rounded-md file:border-0 file:bg-bg-sunken file:px-3 file:py-1.5',\n 'file:text-sm file:font-medium file:text-text-primary hover:file:bg-bg-surface',\n 'disabled:opacity-50'\n )}\n />\n {isUploading && (\n <span className=\"inline-flex flex-shrink-0 items-center gap-1.5 text-xs text-text-secondary\">\n <Loader2 className=\"h-3.5 w-3.5 animate-spin\" />\n {progress}%\n </span>\n )}\n </div>\n\n {hint && !error && <p className=\"text-xs text-text-tertiary\">{hint}</p>}\n {error && <p className=\"text-xs text-status-error-text\">{error}</p>}\n </div>\n );\n};\n"],"mappings":";;;;;;;AA2BA,
|
|
1
|
+
{"version":3,"file":"FileUploadField.js","names":["FileUploadField","inputId","useId","inputRef","useRef","useFileUpload","error","setError","useState","handleFiles","fileList","picked","multiple","uploaded","file","upload","value","err","removeAt","fileId","Label","label","Paperclip","disabled","isUploading","X","event","cn","Loader2","progress","hint"],"sources":["../../../src/labsofscience/components/FileUploadField.tsx"],"sourcesContent":["/**\n * File upload form control\n * @module labsofscience/components\n *\n * A labelled control that runs the inline wspace-files 3-step upload and hands\n * the resulting `{ fileId, fileName }` back to the form. Supports single-file\n * (dataset version, inventory SDS) and multi-file (notebook attachments) modes.\n */\n\nimport { useId, useRef, useState, type FC } from 'react';\nimport { Paperclip, X, Loader2 } from 'lucide-react';\nimport { Label } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { useFileUpload, type UploadedFile } from '../utils/uploadFile';\n\ninterface FileUploadFieldProps {\n label: string;\n value: UploadedFile[];\n onChange: (files: UploadedFile[]) => void;\n /** Allow attaching more than one file (notebook entries). Defaults to single. */\n multiple?: boolean;\n accept?: string;\n disabled?: boolean;\n /** Optional helper text rendered under the control. */\n hint?: string;\n}\n\nexport const FileUploadField: FC<FileUploadFieldProps> = ({\n label,\n value,\n onChange,\n multiple = false,\n accept,\n disabled = false,\n hint,\n}) => {\n const inputId = useId();\n const inputRef = useRef<HTMLInputElement>(null);\n const { upload, isUploading, progress } = useFileUpload();\n const [error, setError] = useState<string | null>(null);\n\n const handleFiles = async (fileList: FileList | null) => {\n if (!fileList || fileList.length === 0) return;\n setError(null);\n const picked = multiple ? Array.from(fileList) : [fileList[0]];\n try {\n const uploaded: UploadedFile[] = [];\n for (const file of picked) {\n if (!file) continue;\n uploaded.push(await upload(file));\n }\n onChange(multiple ? [...value, ...uploaded] : uploaded);\n } catch (err) {\n setError(err instanceof Error ? err.message : 'The file could not be uploaded.');\n } finally {\n if (inputRef.current) inputRef.current.value = '';\n }\n };\n\n const removeAt = (fileId: string) => {\n onChange(value.filter((file) => file.fileId !== fileId));\n };\n\n return (\n <div className=\"space-y-1.5\">\n <Label htmlFor={inputId}>{label}</Label>\n\n {value.length > 0 && (\n <ul className=\"space-y-1.5\">\n {value.map((file) => (\n <li\n key={file.fileId}\n className=\"flex items-center gap-2 rounded-lg border border-border-seam bg-bg-sunken px-3 py-1.5\"\n >\n <Paperclip\n aria-hidden=\"true\"\n className=\"h-3.5 w-3.5 flex-shrink-0 text-text-tertiary\"\n />\n <span className=\"min-w-0 flex-1 truncate text-sm text-text-primary\">\n {file.fileName}\n </span>\n <button\n type=\"button\"\n onClick={() => removeAt(file.fileId)}\n disabled={disabled || isUploading}\n aria-label={`Remove ${file.fileName}`}\n className=\"rounded p-0.5 text-text-tertiary hover:text-text-primary disabled:opacity-50\"\n >\n <X className=\"h-3.5 w-3.5\" />\n </button>\n </li>\n ))}\n </ul>\n )}\n\n <div className=\"flex items-center gap-3\">\n <input\n ref={inputRef}\n id={inputId}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n disabled={disabled || isUploading}\n onChange={(event) => void handleFiles(event.target.files)}\n className={cn(\n 'block w-full text-sm text-text-secondary',\n 'file:mr-3 file:rounded-md file:border-0 file:bg-bg-sunken file:px-3 file:py-1.5',\n 'file:text-sm file:font-medium file:text-text-primary hover:file:bg-bg-surface',\n 'disabled:opacity-50'\n )}\n />\n {isUploading && (\n <span className=\"inline-flex flex-shrink-0 items-center gap-1.5 text-xs text-text-secondary\">\n <Loader2 className=\"h-3.5 w-3.5 animate-spin\" />\n {progress}%\n </span>\n )}\n </div>\n\n {hint && !error && <p className=\"text-xs text-text-tertiary\">{hint}</p>}\n {error && <p className=\"text-xs text-status-error-text\">{error}</p>}\n </div>\n );\n};\n"],"mappings":";;;;;;;AA2BA,IAAaA,KAA6C,EACxD,UACA,UACA,aACA,cAAW,IACX,WACA,cAAW,IACX,cACI;CACJ,IAAMC,IAAUC,EAAM,GAChBC,IAAWC,EAAyB,IAAI,GACxC,EAAE,WAAQ,gBAAa,gBAAaC,EAAc,GAClD,CAACC,GAAOC,KAAYC,EAAwB,IAAI,GAEhDC,IAAc,OAAO,MAA8B;EACvD,IAAI,CAACC,K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YiB,EAAM,OAAO,KAAK;KACxD,WAAWC,EACT,4CACA,mFACA,iFACA,qBACF;IACD,CAAA,GACAH,KACC,kBAAC,QAAD;KAAM,WAAU;KAAhB,UAAA;MACE,kBAACI,GAAD,EAAS,WAAU,2BAA4B,CAAA;MAC9CC;MAAS;KACN;IAEL,CAAA,CAAA;;GAEJC,KAAQ,CAACxB,KAAS,kBAAC,KAAD;IAAG,WAAU;IAA8B,UAAAwB;GAAQ,CAAA;GACrExB,KAAS,kBAAC,KAAD;IAAG,WAAU;IAAkC,UAAAA;GAAS,CAAA;EAC/D;;AAET"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
|
|
3
2
|
interface ListSearchInputProps {
|
|
4
3
|
value: string;
|
|
5
4
|
onChange: (value: string) => void;
|
|
@@ -10,4 +9,3 @@ interface ListSearchInputProps {
|
|
|
10
9
|
}
|
|
11
10
|
export declare const ListSearchInput: FC<ListSearchInputProps>;
|
|
12
11
|
export {};
|
|
13
|
-
//# sourceMappingURL=ListSearchInput.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { cn as e } from "../utils/cn.js";
|
|
|
2
2
|
import { Search as t } from "lucide-react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import { Input as i } from "@burdenoff/fe-libs/ui";
|
|
5
|
-
|
|
5
|
+
// src/labsofscience/components/ListSearchInput.tsx
|
|
6
6
|
var a = ({ value: a, onChange: o, ariaLabel: s, placeholder: c = "Search…", className: l }) => /* @__PURE__ */ r("div", {
|
|
7
7
|
className: e("relative w-full min-w-0 flex-1 sm:max-w-xs", l),
|
|
8
8
|
children: [/* @__PURE__ */ n(t, {
|
|
@@ -17,7 +17,6 @@ var a = ({ value: a, onChange: o, ariaLabel: s, placeholder: c = "Search…", cl
|
|
|
17
17
|
className: "h-11 pl-9 md:h-10"
|
|
18
18
|
})]
|
|
19
19
|
});
|
|
20
|
-
//#endregion
|
|
21
20
|
export { a as ListSearchInput };
|
|
22
21
|
|
|
23
22
|
//# sourceMappingURL=ListSearchInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListSearchInput.js","names":[],"sources":["../../../src/labsofscience/components/ListSearchInput.tsx"],"sourcesContent":["/**\n * List search input\n * @module labsofscience/components\n *\n * A labelled, icon-prefixed free-text search box for the list-page filter rows.\n * Debouncing is the caller's responsibility (see `useDebouncedValue`).\n */\n\nimport type { FC } from 'react';\nimport { Search } from 'lucide-react';\nimport { Input } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface ListSearchInputProps {\n value: string;\n onChange: (value: string) => void;\n /** Accessible name for the input (there is no visible label in filter rows). */\n ariaLabel: string;\n placeholder?: string;\n className?: string;\n}\n\nexport const ListSearchInput: FC<ListSearchInputProps> = ({\n value,\n onChange,\n ariaLabel,\n placeholder = 'Search…',\n className,\n}) => (\n <div className={cn('relative w-full min-w-0 flex-1 sm:max-w-xs', className)}>\n <Search\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary\"\n />\n <Input\n type=\"search\"\n aria-label={ariaLabel}\n placeholder={placeholder}\n value={value}\n onChange={(event) => onChange(event.target.value)}\n className=\"h-11 pl-9 md:h-10\"\n />\n </div>\n);\n"],"mappings":";;;;;AAsBA,
|
|
1
|
+
{"version":3,"file":"ListSearchInput.js","names":["ListSearchInput","cn","className","Search","Input","ariaLabel","onChange","event"],"sources":["../../../src/labsofscience/components/ListSearchInput.tsx"],"sourcesContent":["/**\n * List search input\n * @module labsofscience/components\n *\n * A labelled, icon-prefixed free-text search box for the list-page filter rows.\n * Debouncing is the caller's responsibility (see `useDebouncedValue`).\n */\n\nimport type { FC } from 'react';\nimport { Search } from 'lucide-react';\nimport { Input } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface ListSearchInputProps {\n value: string;\n onChange: (value: string) => void;\n /** Accessible name for the input (there is no visible label in filter rows). */\n ariaLabel: string;\n placeholder?: string;\n className?: string;\n}\n\nexport const ListSearchInput: FC<ListSearchInputProps> = ({\n value,\n onChange,\n ariaLabel,\n placeholder = 'Search…',\n className,\n}) => (\n <div className={cn('relative w-full min-w-0 flex-1 sm:max-w-xs', className)}>\n <Search\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary\"\n />\n <Input\n type=\"search\"\n aria-label={ariaLabel}\n placeholder={placeholder}\n value={value}\n onChange={(event) => onChange(event.target.value)}\n className=\"h-11 pl-9 md:h-10\"\n />\n </div>\n);\n"],"mappings":";;;;;AAsBA,IAAaA,KAA6C,EACxD,UACA,aACA,cACA,iBAAc,WACd,mBAEA,kBAAC,OAAD;CAAK,WAAWC,EAAG,8CAA8CC,CAAS;CAA1E,UAAA,CACE,kBAACC,GAAD;EACE,eAAY;EACZ,WAAU;CACX,CAAA,GACD,kBAACC,GAAD;EACE,MAAK;EACL,cAAYC;EACC;EACN;EACP,WAAW,MAAUC,EAASC,EAAM,OAAO,KAAK;EAChD,WAAU;CACX,CAAA,CACE"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { TrendDirection } from '../types';
|
|
3
|
-
|
|
4
3
|
export interface MetricsCardProps {
|
|
5
4
|
icon: ReactNode;
|
|
6
5
|
value: string | number;
|
|
@@ -12,4 +11,3 @@ export interface MetricsCardProps {
|
|
|
12
11
|
className?: string;
|
|
13
12
|
}
|
|
14
13
|
export declare const MetricsCard: FC<MetricsCardProps>;
|
|
15
|
-
//# sourceMappingURL=MetricsCard.d.ts.map
|