@mastra/playground-ui 69.1.0-alpha.6 → 70.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Card-ClDoUQNb.js → Card-D39faFV5.js} +8 -2
- package/dist/{Card-ClDoUQNb.js.map → Card-D39faFV5.js.map} +1 -1
- package/dist/{Card-C9oCXvxU.cjs → Card-Dpbp8UES.cjs} +13 -1
- package/dist/{Card-C9oCXvxU.cjs.map → Card-Dpbp8UES.cjs.map} +1 -1
- package/dist/CodeDiff.css +7 -0
- package/dist/{FilterBar-C45XUaGQ.cjs → FilterBar-ClC8g6BI.cjs} +3 -3
- package/dist/{FilterBar-C45XUaGQ.cjs.map → FilterBar-ClC8g6BI.cjs.map} +1 -1
- package/dist/{FilterBar-BpzIDXzf.js → FilterBar-D-s_CeSD.js} +3 -3
- package/dist/{FilterBar-BpzIDXzf.js.map → FilterBar-D-s_CeSD.js.map} +1 -1
- package/dist/{MetricsCard-B6LYF3at.js → MetricsCard-CdOaKjmX.js} +3 -3
- package/dist/{MetricsCard-B6LYF3at.js.map → MetricsCard-CdOaKjmX.js.map} +1 -1
- package/dist/{MetricsCard-QHp7KWVf.cjs → MetricsCard-tXPRK8vr.cjs} +3 -3
- package/dist/{MetricsCard-QHp7KWVf.cjs.map → MetricsCard-tXPRK8vr.cjs.map} +1 -1
- package/dist/{MetricsKpiCard-C_hgVziQ.js → MetricsKpiCard-DmgIgvCg.js} +2 -2
- package/dist/{MetricsKpiCard-C_hgVziQ.js.map → MetricsKpiCard-DmgIgvCg.js.map} +1 -1
- package/dist/{MetricsKpiCard-2LpywZFr.cjs → MetricsKpiCard-PGMfg5AE.cjs} +2 -2
- package/dist/{MetricsKpiCard-2LpywZFr.cjs.map → MetricsKpiCard-PGMfg5AE.cjs.map} +1 -1
- package/dist/components/Card.cjs.js +2 -1
- package/dist/components/Card.es.js +1 -1
- package/dist/components/CodeDiff.cjs.js +1 -0
- package/dist/components/CodeDiff.cjs.js.map +1 -1
- package/dist/components/CodeDiff.es.js +1 -0
- package/dist/components/CodeDiff.es.js.map +1 -1
- package/dist/components/FilterBar.cjs.js +3 -3
- package/dist/components/FilterBar.es.js +3 -3
- package/dist/components/FormLayout.cjs.js +41 -0
- package/dist/components/FormLayout.cjs.js.map +1 -0
- package/dist/components/FormLayout.d.ts +1 -0
- package/dist/components/FormLayout.es.js +40 -0
- package/dist/components/FormLayout.es.js.map +1 -0
- package/dist/components/MetricsCard.cjs.js +1 -1
- package/dist/components/MetricsCard.es.js +1 -1
- package/dist/components/MetricsKpiCard.cjs.js +1 -1
- package/dist/components/MetricsKpiCard.es.js +1 -1
- package/dist/components/PageLayout.cjs.js +2 -2
- package/dist/components/PageLayout.es.js +1 -1
- package/dist/components/SavedViews.cjs.js +1 -1
- package/dist/components/SavedViews.es.js +1 -1
- package/dist/domains/dashboards/components/dashboard-renderer.cjs.js +1 -1
- package/dist/domains/dashboards/components/dashboard-renderer.es.js +1 -1
- package/dist/domains/dashboards/components/widget-chrome.cjs.js +1 -1
- package/dist/domains/dashboards/components/widget-chrome.es.js +1 -1
- package/dist/domains/dashboards/components/widget-controls.cjs.js +1 -1
- package/dist/domains/dashboards/components/widget-controls.es.js +1 -1
- package/dist/domains/dashboards/components/widget-error.cjs.js +1 -1
- package/dist/domains/dashboards/components/widget-error.es.js +1 -1
- package/dist/domains/dashboards/kinds/kpis/kpis-widget.cjs.js +2 -2
- package/dist/domains/dashboards/kinds/kpis/kpis-widget.es.js +2 -2
- package/dist/domains/dashboards/kinds/table/table-tabs.cjs.js +1 -1
- package/dist/domains/dashboards/kinds/table/table-tabs.es.js +1 -1
- package/dist/domains/dashboards/kinds/table/table-widget.cjs.js +1 -1
- package/dist/domains/dashboards/kinds/table/table-widget.es.js +1 -1
- package/dist/domains/dashboards/kinds/timeseries/timeseries-widget.cjs.js +1 -1
- package/dist/domains/dashboards/kinds/timeseries/timeseries-widget.es.js +1 -1
- package/dist/domains/datasets/components/add-dataset-item-dialog/add-dataset-item-dialog.cjs.js +1 -1
- package/dist/domains/datasets/components/add-dataset-item-dialog/add-dataset-item-dialog.es.js +1 -1
- package/dist/domains/knowledge/components/KnowledgePageDetail.cjs.js +213 -53
- package/dist/domains/knowledge/components/KnowledgePageDetail.cjs.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageDetail.es.js +214 -54
- package/dist/domains/knowledge/components/KnowledgePageDetail.es.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageExplorer.cjs.js +45 -5
- package/dist/domains/knowledge/components/KnowledgePageExplorer.cjs.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageExplorer.es.js +45 -5
- package/dist/domains/knowledge/components/KnowledgePageExplorer.es.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageGraph.cjs.js +1 -1
- package/dist/domains/knowledge/components/KnowledgePageGraph.cjs.js.map +1 -1
- package/dist/domains/knowledge/components/KnowledgePageGraph.es.js +1 -1
- package/dist/domains/knowledge/components/KnowledgePageGraph.es.js.map +1 -1
- package/dist/domains/knowledge/lib/bodyHeadings.cjs.js +13 -0
- package/dist/domains/knowledge/lib/bodyHeadings.cjs.js.map +1 -0
- package/dist/domains/knowledge/lib/bodyHeadings.d.ts +1 -0
- package/dist/domains/knowledge/lib/bodyHeadings.es.js +12 -0
- package/dist/domains/knowledge/lib/bodyHeadings.es.js.map +1 -0
- package/dist/domains/logs/components/log-data-panel.cjs.js +3 -3
- package/dist/domains/logs/components/log-data-panel.cjs.js.map +1 -1
- package/dist/domains/logs/components/log-data-panel.es.js +3 -3
- package/dist/domains/logs/components/log-data-panel.es.js.map +1 -1
- package/dist/domains/metrics/components/agent-runs-card.cjs.js +1 -1
- package/dist/domains/metrics/components/agent-runs-card.es.js +1 -1
- package/dist/domains/metrics/components/breakdown/breakdown-tab-body.cjs.js +1 -1
- package/dist/domains/metrics/components/breakdown/breakdown-tab-body.es.js +1 -1
- package/dist/domains/metrics/components/breakdown-card.cjs.js +1 -1
- package/dist/domains/metrics/components/breakdown-card.es.js +1 -1
- package/dist/domains/metrics/components/card-action-buttons.cjs.js +1 -1
- package/dist/domains/metrics/components/card-action-buttons.es.js +1 -1
- package/dist/domains/metrics/components/chart-card-error.cjs.js +1 -1
- package/dist/domains/metrics/components/chart-card-error.es.js +1 -1
- package/dist/domains/metrics/components/chart-card.cjs.js +1 -1
- package/dist/domains/metrics/components/chart-card.es.js +1 -1
- package/dist/domains/metrics/components/distinct-ids/distinct-ids-chart.cjs.js +1 -1
- package/dist/domains/metrics/components/distinct-ids/distinct-ids-chart.es.js +1 -1
- package/dist/domains/metrics/components/failure-rate-card.cjs.js +1 -1
- package/dist/domains/metrics/components/failure-rate-card.es.js +1 -1
- package/dist/domains/metrics/components/kpi-card.cjs.js +1 -1
- package/dist/domains/metrics/components/kpi-card.es.js +1 -1
- package/dist/domains/metrics/components/latency-card.cjs.js +1 -1
- package/dist/domains/metrics/components/latency-card.es.js +1 -1
- package/dist/domains/metrics/components/metrics-time-range-chip.cjs.js +1 -1
- package/dist/domains/metrics/components/metrics-time-range-chip.es.js +1 -1
- package/dist/domains/metrics/components/token-usage-card.cjs.js +1 -1
- package/dist/domains/metrics/components/token-usage-card.es.js +1 -1
- package/dist/domains/metrics/components/trace-aggregate-card.cjs.js +1 -1
- package/dist/domains/metrics/components/trace-aggregate-card.es.js +1 -1
- package/dist/domains/metrics/drilldown.cjs.js +13 -1
- package/dist/domains/metrics/drilldown.cjs.js.map +1 -1
- package/dist/domains/metrics/drilldown.es.js +13 -1
- package/dist/domains/metrics/drilldown.es.js.map +1 -1
- package/dist/domains/metrics/metrics-filters.cjs.js +1 -1
- package/dist/domains/metrics/metrics-filters.es.js +1 -1
- package/dist/domains/observability/components/observability-page-layout.cjs.js +2 -2
- package/dist/domains/observability/components/observability-page-layout.cjs.js.map +1 -1
- package/dist/domains/observability/components/observability-page-layout.es.js +1 -1
- package/dist/domains/observability/hooks/use-observability-list-filters.cjs.js +10 -17
- package/dist/domains/observability/hooks/use-observability-list-filters.cjs.js.map +1 -1
- package/dist/domains/observability/hooks/use-observability-list-filters.es.js +10 -17
- package/dist/domains/observability/hooks/use-observability-list-filters.es.js.map +1 -1
- package/dist/domains/observability/lib/token-search-predicate.cjs.js +56 -0
- package/dist/domains/observability/lib/token-search-predicate.cjs.js.map +1 -0
- package/dist/domains/observability/lib/token-search-predicate.d.ts +1 -0
- package/dist/domains/observability/lib/token-search-predicate.es.js +51 -0
- package/dist/domains/observability/lib/token-search-predicate.es.js.map +1 -0
- package/dist/domains/observability/observability-list-url-state.cjs.js +1 -1
- package/dist/domains/observability/observability-list-url-state.es.js +1 -1
- package/dist/domains/observability/saved-view-state.cjs.js +10 -22
- package/dist/domains/observability/saved-view-state.cjs.js.map +1 -1
- package/dist/domains/observability/saved-view-state.es.js +10 -22
- package/dist/domains/observability/saved-view-state.es.js.map +1 -1
- package/dist/domains/scores/components/trace-scores-tab.cjs.js +1 -1
- package/dist/domains/scores/components/trace-scores-tab.es.js +1 -1
- package/dist/domains/spans/components/spans-explorer-body.cjs.js +7 -10
- package/dist/domains/spans/components/spans-explorer-body.cjs.js.map +1 -1
- package/dist/domains/spans/components/spans-explorer-body.es.js +7 -10
- package/dist/domains/spans/components/spans-explorer-body.es.js.map +1 -1
- package/dist/domains/spans/components/spans-explorer-histogram.cjs.js +2 -2
- package/dist/domains/spans/components/spans-explorer-histogram.cjs.js.map +1 -1
- package/dist/domains/spans/components/spans-explorer-histogram.es.js +2 -2
- package/dist/domains/spans/components/spans-explorer-histogram.es.js.map +1 -1
- package/dist/domains/spans/components/spans-filter-bar.cjs.js +6 -8
- package/dist/domains/spans/components/spans-filter-bar.cjs.js.map +1 -1
- package/dist/domains/spans/components/spans-filter-bar.es.js +6 -8
- package/dist/domains/spans/components/spans-filter-bar.es.js.map +1 -1
- package/dist/domains/spans/hooks/use-spans-filter-bar.cjs.js +20 -38
- package/dist/domains/spans/hooks/use-spans-filter-bar.cjs.js.map +1 -1
- package/dist/domains/spans/hooks/use-spans-filter-bar.es.js +20 -38
- package/dist/domains/spans/hooks/use-spans-filter-bar.es.js.map +1 -1
- package/dist/domains/spans/span-filters.cjs.js +8 -6
- package/dist/domains/spans/span-filters.cjs.js.map +1 -1
- package/dist/domains/spans/span-filters.es.js +8 -6
- package/dist/domains/spans/span-filters.es.js.map +1 -1
- package/dist/domains/threads/components/threads-filter-bar.cjs.js +3 -3
- package/dist/domains/threads/components/threads-filter-bar.es.js +3 -3
- package/dist/domains/threads/hooks/use-threads-filter-bar.cjs.js +2 -2
- package/dist/domains/threads/hooks/use-threads-filter-bar.es.js +2 -2
- package/dist/domains/threads/thread-filters.cjs.js +1 -1
- package/dist/domains/threads/thread-filters.es.js +1 -1
- package/dist/domains/traces/components/columns-menu/columns-menu.cjs.js +1 -1
- package/dist/domains/traces/components/columns-menu/columns-menu.es.js +1 -1
- package/dist/domains/traces/components/span-payload/span-payload-section.cjs.js +1 -1
- package/dist/domains/traces/components/span-payload/span-payload-section.es.js +1 -1
- package/dist/domains/traces/components/thread-trace/thread-trace-details.cjs.js +1 -1
- package/dist/domains/traces/components/thread-trace/thread-trace-details.es.js +1 -1
- package/dist/domains/traces/components/thread-view-skeleton.cjs.js +1 -1
- package/dist/domains/traces/components/thread-view-skeleton.es.js +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.cjs.js +3 -3
- package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.cjs.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.es.js +3 -3
- package/dist/domains/traces/components/traces-explorer/traces-explorer-actions.es.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-context.cjs.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-context.es.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-filter-bar.cjs.js +3 -3
- package/dist/domains/traces/components/traces-explorer/traces-explorer-filter-bar.es.js +3 -3
- package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.cjs.js +6 -3
- package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.cjs.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.es.js +6 -3
- package/dist/domains/traces/components/traces-explorer/traces-explorer-histogram.es.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-layout.cjs.js +2 -2
- package/dist/domains/traces/components/traces-explorer/traces-explorer-layout.cjs.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-layout.es.js +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.cjs.js +19 -17
- package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.cjs.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.es.js +19 -17
- package/dist/domains/traces/components/traces-explorer/traces-explorer-list-provider.es.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-root.cjs.js +12 -24
- package/dist/domains/traces/components/traces-explorer/traces-explorer-root.cjs.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/traces-explorer-root.es.js +12 -24
- package/dist/domains/traces/components/traces-explorer/traces-explorer-root.es.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.cjs.js +22 -29
- package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.cjs.js.map +1 -1
- package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.es.js +22 -29
- package/dist/domains/traces/components/traces-explorer/use-traces-filter-bar.es.js.map +1 -1
- package/dist/domains/traces/trace-filters.cjs.js +1 -1
- package/dist/domains/traces/trace-filters.es.js +1 -1
- package/dist/domains/traces/trace-query-filters.cjs.js +1 -1
- package/dist/domains/traces/trace-query-filters.es.js +1 -1
- package/dist/domains/traces.cjs.js +1 -1
- package/dist/domains/traces.es.js +1 -1
- package/dist/ee/signals/components/entity-index-compact-grid.cjs.js +1 -1
- package/dist/ee/signals/components/entity-index-compact-grid.es.js +1 -1
- package/dist/ee/signals/components/signals-empty-state.cjs.js +1 -1
- package/dist/ee/signals/components/signals-empty-state.es.js +1 -1
- package/dist/ee/signals/flow-card.cjs.js +1 -1
- package/dist/ee/signals/flow-card.es.js +1 -1
- package/dist/{filter-bar-chip-Db5_6Aup.js → filter-bar-chip-CITrW7zy.js} +5 -5
- package/dist/{filter-bar-chip-Db5_6Aup.js.map → filter-bar-chip-CITrW7zy.js.map} +1 -1
- package/dist/{filter-bar-chip-BjWp3bda.cjs → filter-bar-chip-CKhMTHsc.cjs} +5 -5
- package/dist/{filter-bar-chip-BjWp3bda.cjs.map → filter-bar-chip-CKhMTHsc.cjs.map} +1 -1
- package/dist/{filter-bar-time-range-DeQ4XZlp.js → filter-bar-time-range-DwFHxQ3H.js} +2 -2
- package/dist/{filter-bar-time-range-DeQ4XZlp.js.map → filter-bar-time-range-DwFHxQ3H.js.map} +1 -1
- package/dist/{filter-bar-time-range-NPcQG2-q.cjs → filter-bar-time-range-Xf3SxrjY.cjs} +2 -2
- package/dist/{filter-bar-time-range-NPcQG2-q.cjs.map → filter-bar-time-range-Xf3SxrjY.cjs.map} +1 -1
- package/dist/new/settings.cjs.js +3 -2
- package/dist/new/settings.es.js +2 -1
- package/dist/{PageLayout-1mI4bnlW.cjs → page-layout-1mI4bnlW.cjs} +1 -1
- package/dist/page-layout-1mI4bnlW.cjs.map +1 -0
- package/dist/{PageLayout-nvAs_Fis.js → page-layout-nvAs_Fis.js} +1 -1
- package/dist/page-layout-nvAs_Fis.js.map +1 -0
- package/dist/{settings-B7_T_GkZ.cjs → settings-5PdsNlhV.cjs} +1 -43
- package/dist/settings-5PdsNlhV.cjs.map +1 -0
- package/dist/{settings-DmdIP3xB.js → settings-DIrzLcgE.js} +2 -38
- package/dist/settings-DIrzLcgE.js.map +1 -0
- package/dist/settings-layout-BxtShpY6.cjs +46 -0
- package/dist/settings-layout-BxtShpY6.cjs.map +1 -0
- package/dist/settings-layout-UPnWI3FZ.js +41 -0
- package/dist/settings-layout-UPnWI3FZ.js.map +1 -0
- package/dist/src/domains/knowledge/components/KnowledgePageDetail.d.ts +2 -1
- package/dist/src/domains/knowledge/lib/bodyHeadings.d.ts +4 -0
- package/dist/src/domains/logs/components/log-data-panel.d.ts +4 -1
- package/dist/src/domains/observability/hooks/use-observability-list-filters.d.ts +2 -5
- package/dist/src/domains/observability/lib/token-search-predicate.d.ts +8 -0
- package/dist/src/domains/spans/components/spans-explorer-histogram.d.ts +1 -3
- package/dist/src/domains/spans/components/spans-filter-bar.d.ts +2 -4
- package/dist/src/domains/spans/hooks/use-spans-filter-bar.d.ts +3 -5
- package/dist/src/domains/spans/span-filters.d.ts +2 -1
- package/dist/src/domains/traces/components/traces-explorer/traces-explorer-actions.d.ts +0 -1
- package/dist/src/domains/traces/components/traces-explorer/traces-explorer-context.d.ts +2 -4
- package/dist/src/domains/traces/trace-filters.d.ts +7 -0
- package/dist/src/domains/traces/trace-query-filters.d.ts +3 -2
- package/dist/src/ds/components/Card/Card.d.ts +6 -0
- package/dist/src/ds/components/Card/index.d.ts +2 -2
- package/dist/src/ds/components/FilterBar/types.d.ts +2 -0
- package/dist/src/ds/components/FormLayout/form-layout.d.ts +24 -0
- package/dist/src/ds/components/FormLayout/index.d.ts +2 -0
- package/dist/style.css +12 -0
- package/dist/{trace-filters-BOifV1nw.js → trace-filters-BFLQFBdW.js} +40 -14
- package/dist/trace-filters-BFLQFBdW.js.map +1 -0
- package/dist/{trace-filters-B6SW5YFA.cjs → trace-filters-CoGtUnB1.cjs} +40 -14
- package/dist/trace-filters-CoGtUnB1.cjs.map +1 -0
- package/dist/types-CP7wbYua.cjs.map +1 -1
- package/dist/types-DiiL5mTO.js.map +1 -1
- package/package.json +8 -8
- package/dist/PageLayout-1mI4bnlW.cjs.map +0 -1
- package/dist/PageLayout-nvAs_Fis.js.map +0 -1
- package/dist/components/SectionCard.cjs.js +0 -49
- package/dist/components/SectionCard.cjs.js.map +0 -1
- package/dist/components/SectionCard.d.ts +0 -1
- package/dist/components/SectionCard.es.js +0 -47
- package/dist/components/SectionCard.es.js.map +0 -1
- package/dist/domains/observability/lib/text-search-filter.cjs.js +0 -24
- package/dist/domains/observability/lib/text-search-filter.cjs.js.map +0 -1
- package/dist/domains/observability/lib/text-search-filter.d.ts +0 -1
- package/dist/domains/observability/lib/text-search-filter.es.js +0 -23
- package/dist/domains/observability/lib/text-search-filter.es.js.map +0 -1
- package/dist/domains/observability/lib/text-search.cjs.js +0 -12
- package/dist/domains/observability/lib/text-search.cjs.js.map +0 -1
- package/dist/domains/observability/lib/text-search.d.ts +0 -1
- package/dist/domains/observability/lib/text-search.es.js +0 -11
- package/dist/domains/observability/lib/text-search.es.js.map +0 -1
- package/dist/settings-B7_T_GkZ.cjs.map +0 -1
- package/dist/settings-DmdIP3xB.js.map +0 -1
- package/dist/src/domains/observability/lib/text-search-filter.d.ts +0 -3
- package/dist/src/domains/observability/lib/text-search.d.ts +0 -2
- package/dist/src/ds/components/SectionCard/card-heading.d.ts +0 -10
- package/dist/src/ds/components/SectionCard/index.d.ts +0 -2
- package/dist/src/ds/components/SectionCard/section-card.d.ts +0 -13
- package/dist/trace-filters-B6SW5YFA.cjs.map +0 -1
- package/dist/trace-filters-BOifV1nw.js.map +0 -1
package/dist/{filter-bar-time-range-DeQ4XZlp.js.map → filter-bar-time-range-DwFHxQ3H.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-bar-time-range-
|
|
1
|
+
{"version":3,"file":"filter-bar-time-range-DwFHxQ3H.js","names":[],"sources":["../src/ds/components/FilterBar/filter-bar-time-range.tsx"],"sourcesContent":["/* eslint-disable react-refresh/only-export-components */\nimport { useRef } from 'react';\nimport { FILTER_BAR_CONTROL_SIZE } from './filter-bar-chip';\nimport { useFilterBarContext } from './filter-bar-context';\nimport type { FilterBarField, FilterBarItem } from './types';\nimport { useFilterBarItemKeys } from './use-filter-bar-item-keys';\nimport { DateTimeRangePicker } from '@/ds/components/DateTimeRangePicker/date-time-range-picker';\nimport type { DateTimeRangePickerProps } from '@/ds/components/DateTimeRangePicker/date-time-range-picker';\nimport { IconCalendar1 } from '@/ds/icons/central/IconCalendar1';\n\nexport const FILTER_BAR_TIME_RANGE_FIELD_ID = 'timeRange';\n\n/**\n * Synthetic field backing the time range control. Hidden from the input's field step (the\n * range cannot be added twice) but registered so the bar resolves its label and takes it into\n * keyboard navigation. Add it to the bar's `fields` and `FILTER_BAR_TIME_RANGE_ITEM` to its\n * `items`, then render `FilterBar.TimeRange` for that item from `FilterBar.Chips`.\n */\nexport const FILTER_BAR_TIME_RANGE_FIELD: FilterBarField = {\n id: FILTER_BAR_TIME_RANGE_FIELD_ID,\n label: 'Time',\n icon: IconCalendar1,\n type: 'text',\n operators: ['is'],\n hidden: true,\n};\n\nexport const FILTER_BAR_TIME_RANGE_ITEM: FilterBarItem = {\n id: FILTER_BAR_TIME_RANGE_FIELD_ID,\n fieldId: FILTER_BAR_TIME_RANGE_FIELD_ID,\n operatorId: 'is',\n value: '',\n};\n\nexport type FilterBarTimeRangeProps = Omit<DateTimeRangePickerProps, 'size' | 'ref'>;\n\n/**\n * A filter bar's time range: the `DateTimeRangePicker` itself at the bar's rung, so it looks and\n * behaves exactly as it does anywhere else, reset × included. It scopes the bar rather than\n * filtering it, so it is not a removable chip; the wrapper only joins it to the bar's arrow-key\n * order.\n */\nexport function FilterBarTimeRange(props: FilterBarTimeRangeProps) {\n const ctx = useFilterBarContext();\n const rootRef = useRef<HTMLDivElement>(null);\n const { onKeyDown } = useFilterBarItemKeys({\n item: FILTER_BAR_TIME_RANGE_ITEM,\n rootRef,\n pinned: true,\n removable: false,\n segmentSelector: 'button',\n });\n\n return (\n <div\n ref={rootRef}\n role=\"group\"\n aria-label=\"Time range\"\n data-slot=\"filter-bar-time-range\"\n className=\"flex\"\n onKeyDown={onKeyDown}\n >\n <DateTimeRangePicker\n {...props}\n size={FILTER_BAR_CONTROL_SIZE}\n ref={el => ctx.registerSegment(FILTER_BAR_TIME_RANGE_ITEM.id, 'value', el)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;AAUA,IAAa,iCAAiC;;;;;;;AAQ9C,IAAa,8BAA8C;CACzD,IAAI;CACJ,OAAO;CACP,MAAM;CACN,MAAM;CACN,WAAW,CAAC,IAAI;CAChB,QAAQ;AACV;AAEA,IAAa,6BAA4C;CACvD,IAAI;CACJ,SAAS;CACT,YAAY;CACZ,OAAO;AACT;;;;;;;AAUA,SAAgB,mBAAmB,OAAgC;CACjE,MAAM,MAAM,oBAAoB;CAChC,MAAM,UAAU,OAAuB,IAAI;CAC3C,MAAM,EAAE,cAAc,qBAAqB;EACzC,MAAM;EACN;EACA,QAAQ;EACR,WAAW;EACX,iBAAiB;CACnB,CAAC;CAED,OACE,oBAAC,OAAD;EACE,KAAK;EACL,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAU;EACC;EAEX,UAAA,oBAAC,qBAAD;GACE,GAAI;GACJ,MAAA;GACA,MAAK,OAAM,IAAI,gBAAgB,2BAA2B,IAAI,SAAS,EAAE;EAC1E,CAAA;CACE,CAAA;AAET"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_filter_bar_chip = require("./filter-bar-chip-
|
|
1
|
+
const require_filter_bar_chip = require("./filter-bar-chip-CKhMTHsc.cjs");
|
|
2
2
|
const require_date_time_range_picker = require("./date-time-range-picker-D9sg8nvh.cjs");
|
|
3
3
|
const require_icons_central_IconCalendar1 = require("./icons/central/IconCalendar1.cjs.js");
|
|
4
4
|
let react = require("react");
|
|
@@ -80,4 +80,4 @@ Object.defineProperty(exports, "FilterBarTimeRange", {
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
-
//# sourceMappingURL=filter-bar-time-range-
|
|
83
|
+
//# sourceMappingURL=filter-bar-time-range-Xf3SxrjY.cjs.map
|
package/dist/{filter-bar-time-range-NPcQG2-q.cjs.map → filter-bar-time-range-Xf3SxrjY.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-bar-time-range-
|
|
1
|
+
{"version":3,"file":"filter-bar-time-range-Xf3SxrjY.cjs","names":["IconCalendar1","useFilterBarContext","useRef","useFilterBarItemKeys","DateTimeRangePicker"],"sources":["../src/ds/components/FilterBar/filter-bar-time-range.tsx"],"sourcesContent":["/* eslint-disable react-refresh/only-export-components */\nimport { useRef } from 'react';\nimport { FILTER_BAR_CONTROL_SIZE } from './filter-bar-chip';\nimport { useFilterBarContext } from './filter-bar-context';\nimport type { FilterBarField, FilterBarItem } from './types';\nimport { useFilterBarItemKeys } from './use-filter-bar-item-keys';\nimport { DateTimeRangePicker } from '@/ds/components/DateTimeRangePicker/date-time-range-picker';\nimport type { DateTimeRangePickerProps } from '@/ds/components/DateTimeRangePicker/date-time-range-picker';\nimport { IconCalendar1 } from '@/ds/icons/central/IconCalendar1';\n\nexport const FILTER_BAR_TIME_RANGE_FIELD_ID = 'timeRange';\n\n/**\n * Synthetic field backing the time range control. Hidden from the input's field step (the\n * range cannot be added twice) but registered so the bar resolves its label and takes it into\n * keyboard navigation. Add it to the bar's `fields` and `FILTER_BAR_TIME_RANGE_ITEM` to its\n * `items`, then render `FilterBar.TimeRange` for that item from `FilterBar.Chips`.\n */\nexport const FILTER_BAR_TIME_RANGE_FIELD: FilterBarField = {\n id: FILTER_BAR_TIME_RANGE_FIELD_ID,\n label: 'Time',\n icon: IconCalendar1,\n type: 'text',\n operators: ['is'],\n hidden: true,\n};\n\nexport const FILTER_BAR_TIME_RANGE_ITEM: FilterBarItem = {\n id: FILTER_BAR_TIME_RANGE_FIELD_ID,\n fieldId: FILTER_BAR_TIME_RANGE_FIELD_ID,\n operatorId: 'is',\n value: '',\n};\n\nexport type FilterBarTimeRangeProps = Omit<DateTimeRangePickerProps, 'size' | 'ref'>;\n\n/**\n * A filter bar's time range: the `DateTimeRangePicker` itself at the bar's rung, so it looks and\n * behaves exactly as it does anywhere else, reset × included. It scopes the bar rather than\n * filtering it, so it is not a removable chip; the wrapper only joins it to the bar's arrow-key\n * order.\n */\nexport function FilterBarTimeRange(props: FilterBarTimeRangeProps) {\n const ctx = useFilterBarContext();\n const rootRef = useRef<HTMLDivElement>(null);\n const { onKeyDown } = useFilterBarItemKeys({\n item: FILTER_BAR_TIME_RANGE_ITEM,\n rootRef,\n pinned: true,\n removable: false,\n segmentSelector: 'button',\n });\n\n return (\n <div\n ref={rootRef}\n role=\"group\"\n aria-label=\"Time range\"\n data-slot=\"filter-bar-time-range\"\n className=\"flex\"\n onKeyDown={onKeyDown}\n >\n <DateTimeRangePicker\n {...props}\n size={FILTER_BAR_CONTROL_SIZE}\n ref={el => ctx.registerSegment(FILTER_BAR_TIME_RANGE_ITEM.id, 'value', el)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;AAUA,IAAa,iCAAiC;;;;;;;AAQ9C,IAAa,8BAA8C;CACzD,IAAI;CACJ,OAAO;CACP,MAAMA,oCAAAA;CACN,MAAM;CACN,WAAW,CAAC,IAAI;CAChB,QAAQ;AACV;AAEA,IAAa,6BAA4C;CACvD,IAAI;CACJ,SAAS;CACT,YAAY;CACZ,OAAO;AACT;;;;;;;AAUA,SAAgB,mBAAmB,OAAgC;CACjE,MAAM,MAAMC,wBAAAA,oBAAoB;CAChC,MAAM,WAAA,GAAUC,MAAAA,OAAAA,CAAuB,IAAI;CAC3C,MAAM,EAAE,cAAcC,wBAAAA,qBAAqB;EACzC,MAAM;EACN;EACA,QAAQ;EACR,WAAW;EACX,iBAAiB;CACnB,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,KAAK;EACL,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAU;EACC;EAEX,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,+BAAAA,qBAAD;GACE,GAAI;GACJ,MAAA;GACA,MAAK,OAAM,IAAI,gBAAgB,2BAA2B,IAAI,SAAS,EAAE;EAC1E,CAAA;CACE,CAAA;AAET"}
|
package/dist/new/settings.cjs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_settings = require("../settings-
|
|
2
|
+
const require_settings = require("../settings-5PdsNlhV.cjs");
|
|
3
|
+
const require_settings_layout = require("../settings-layout-BxtShpY6.cjs");
|
|
3
4
|
const require_settings_row = require("../settings-row-Dfi4pLnl.cjs");
|
|
4
5
|
exports.SettingsContainer = require_settings.SettingsContainer;
|
|
5
6
|
exports.SettingsDescription = require_settings.SettingsDescription;
|
|
@@ -9,7 +10,7 @@ exports.SettingsGroup = require_settings.SettingsGroup;
|
|
|
9
10
|
exports.SettingsHeader = require_settings.SettingsHeader;
|
|
10
11
|
exports.SettingsItem = require_settings.SettingsItem;
|
|
11
12
|
exports.SettingsItemIcon = require_settings.SettingsItemIcon;
|
|
12
|
-
exports.SettingsLayout =
|
|
13
|
+
exports.SettingsLayout = require_settings_layout.SettingsLayout;
|
|
13
14
|
exports.SettingsListHeader = require_settings.SettingsListHeader;
|
|
14
15
|
exports.SettingsNoticeRow = require_settings.SettingsNoticeRow;
|
|
15
16
|
exports.SettingsRow = require_settings_row.SettingsRow;
|
package/dist/new/settings.es.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { a as SettingsListHeader, c as
|
|
1
|
+
import { a as SettingsListHeader, c as SettingsGroup, d as SettingsContainer, i as SettingsItemIcon, l as SettingsHeader, n as SettingsEmptyRow, o as SettingsNoticeRow, r as SettingsItem, s as SettingsDescription, t as SettingsSkeleton, u as SettingsTitle } from "../settings-DIrzLcgE.js";
|
|
2
|
+
import { t as SettingsLayout } from "../settings-layout-UPnWI3FZ.js";
|
|
2
3
|
import { n as SettingsRow, t as SettingsFieldsetRow } from "../settings-row-C2HTuwjN.js";
|
|
3
4
|
export { SettingsContainer, SettingsDescription, SettingsEmptyRow, SettingsFieldsetRow, SettingsGroup, SettingsHeader, SettingsItem, SettingsItemIcon, SettingsLayout, SettingsListHeader, SettingsNoticeRow, SettingsRow, SettingsSkeleton, SettingsTitle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-layout-1mI4bnlW.cjs","names":["cn","Header","ScrollArea","ScrollAreaViewport","_Fragment"],"sources":["../src/ds/components/PageLayout/page-layout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Header } from '../Header';\nimport { ScrollArea, ScrollAreaViewport } from '../ScrollArea';\nimport type { ScrollAreaMask } from '../ScrollArea';\nimport { cn } from '@/lib/utils';\n\nexport interface PageLayoutProps {\n children: ReactNode;\n /** Left side of the page header row. */\n breadcrumbs?: ReactNode;\n /** Right side of the page header row. */\n headerActions?: ReactNode;\n /** Controls pinned between the header and the scrollable body (search, filters, toggles…). */\n actionRow?: ReactNode;\n /** Page-level header (e.g. `PageHeader`) rendered inside the body container, above children. */\n header?: ReactNode;\n /**\n * `container` pads the body (default); `narrow` centers the body in a max-width column;\n * `fit` lets the body fill the page edge to edge.\n */\n variant?: 'container' | 'fit' | 'narrow';\n /**\n * Fade the body's scrolled edges, using the same values as `ScrollArea`'s `mask`. Off by default.\n * `{ y: true }` fades the top and bottom; `{ bottom: '3rem' }` sets one side's depth.\n * A fade covers whatever sits at that edge, so leave it off for `fit` bodies that hold tables with sticky headers.\n */\n mask?: ScrollAreaMask;\n}\n\nexport function PageLayout({\n children,\n breadcrumbs,\n headerActions,\n actionRow,\n header,\n variant = 'container',\n mask = false,\n}: PageLayoutProps) {\n const headerSlot = header ? (\n <div data-slot=\"page-layout-header\" className={cn(variant === 'fit' && 'p-4')}>\n {header}\n </div>\n ) : null;\n\n return (\n <div data-slot=\"page-layout\" className=\"flex h-full min-h-0 flex-col\">\n {(breadcrumbs || headerActions) && (\n <Header className=\"min-h-header-default shrink-0 gap-2 overflow-hidden px-2\">\n {breadcrumbs}\n {headerActions && (\n <div className=\"ml-auto flex shrink-0 items-center gap-2 overflow-hidden\">{headerActions}</div>\n )}\n </Header>\n )}\n {actionRow && (\n <div data-slot=\"page-layout-action-row\" className=\"flex shrink-0 flex-col gap-2 px-4 pt-4\">\n {actionRow}\n </div>\n )}\n <main className=\"flex min-h-0 flex-1 flex-col\">\n <ScrollArea mask={mask} className=\"min-h-0 flex-1\">\n <ScrollAreaViewport\n className={cn(variant === 'container' && 'p-4')}\n contentClassName={cn(\n variant === 'container' && 'h-full min-h-min',\n variant === 'narrow' && 'grid min-h-full grid-cols-1',\n // `fit` hands the remaining body height to its child (panels, graphs, tables that own their scroll).\n variant === 'fit' &&\n (header\n ? 'grid h-full grid-cols-1 grid-rows-[auto_minmax(0,1fr)]'\n : 'grid h-full grid-cols-1 grid-rows-1'),\n )}\n >\n {variant === 'narrow' ? (\n // Horizontal gutter is the variant's contract; keep px/py explicit rather than the `p-4` shorthand.\n // eslint-disable-next-line tailwindcss/enforces-shorthand\n <div\n data-slot=\"page-layout-container\"\n className={cn(\n 'mx-auto grid min-h-full w-full max-w-5xl grid-cols-1 p-4',\n header ? 'grid-rows-[auto_1fr]' : 'grid-rows-[1fr]',\n )}\n >\n {headerSlot}\n {children}\n </div>\n ) : (\n <>\n {headerSlot}\n {children}\n </>\n )}\n </ScrollAreaViewport>\n </ScrollArea>\n </main>\n </div>\n );\n}\n"],"mappings":";;;;;AA6BA,SAAgB,WAAW,EACzB,UACA,aACA,eACA,WACA,QACA,UAAU,aACV,OAAO,SACW;CAClB,MAAM,aAAa,SACjB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,aAAU;EAAqB,WAAWA,cAAAA,GAAG,YAAY,SAAS,KAAK;EACzE,UAAA;CACE,CAAA,IACH;CAEJ,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,aAAU;EAAc,WAAU;EAAvC,UAAA;IACI,eAAe,kBACf,iBAAA,GAAA,kBAAA,KAAA,CAACC,0BAAAA,QAAD;IAAQ,WAAU;IAAlB,UAAA,CACG,aACA,iBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAU;KAA4D,UAAA;IAAmB,CAAA,CAE1F;;GAET,aACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IAAK,aAAU;IAAyB,WAAU;IAC/C,UAAA;GACE,CAAA;GAEP,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,WAAU;IACd,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,YAAD;KAAkB;KAAM,WAAU;KAChC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,oBAAD;MACE,WAAWH,cAAAA,GAAG,YAAY,eAAe,KAAK;MAC9C,kBAAkBA,cAAAA,GAChB,YAAY,eAAe,oBAC3B,YAAY,YAAY,+BAExB,YAAY,UACT,SACG,2DACA,sCACR;MAEC,UAAA,YAAY,WAGX,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;OACE,aAAU;OACV,WAAWA,cAAAA,GACT,4DACA,SAAS,yBAAyB,iBACpC;OALF,UAAA,CAOG,YACA,QACE;MAEL,CAAA,IAAA,iBAAA,GAAA,kBAAA,KAAA,CAAAI,kBAAAA,UAAA,EAAA,UAAA,CACG,YACA,QACD,EAAA,CAAA;KAEc,CAAA;IACV,CAAA;GACR,CAAA;EACH;;AAET"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-layout-nvAs_Fis.js","names":["_Fragment"],"sources":["../src/ds/components/PageLayout/page-layout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Header } from '../Header';\nimport { ScrollArea, ScrollAreaViewport } from '../ScrollArea';\nimport type { ScrollAreaMask } from '../ScrollArea';\nimport { cn } from '@/lib/utils';\n\nexport interface PageLayoutProps {\n children: ReactNode;\n /** Left side of the page header row. */\n breadcrumbs?: ReactNode;\n /** Right side of the page header row. */\n headerActions?: ReactNode;\n /** Controls pinned between the header and the scrollable body (search, filters, toggles…). */\n actionRow?: ReactNode;\n /** Page-level header (e.g. `PageHeader`) rendered inside the body container, above children. */\n header?: ReactNode;\n /**\n * `container` pads the body (default); `narrow` centers the body in a max-width column;\n * `fit` lets the body fill the page edge to edge.\n */\n variant?: 'container' | 'fit' | 'narrow';\n /**\n * Fade the body's scrolled edges, using the same values as `ScrollArea`'s `mask`. Off by default.\n * `{ y: true }` fades the top and bottom; `{ bottom: '3rem' }` sets one side's depth.\n * A fade covers whatever sits at that edge, so leave it off for `fit` bodies that hold tables with sticky headers.\n */\n mask?: ScrollAreaMask;\n}\n\nexport function PageLayout({\n children,\n breadcrumbs,\n headerActions,\n actionRow,\n header,\n variant = 'container',\n mask = false,\n}: PageLayoutProps) {\n const headerSlot = header ? (\n <div data-slot=\"page-layout-header\" className={cn(variant === 'fit' && 'p-4')}>\n {header}\n </div>\n ) : null;\n\n return (\n <div data-slot=\"page-layout\" className=\"flex h-full min-h-0 flex-col\">\n {(breadcrumbs || headerActions) && (\n <Header className=\"min-h-header-default shrink-0 gap-2 overflow-hidden px-2\">\n {breadcrumbs}\n {headerActions && (\n <div className=\"ml-auto flex shrink-0 items-center gap-2 overflow-hidden\">{headerActions}</div>\n )}\n </Header>\n )}\n {actionRow && (\n <div data-slot=\"page-layout-action-row\" className=\"flex shrink-0 flex-col gap-2 px-4 pt-4\">\n {actionRow}\n </div>\n )}\n <main className=\"flex min-h-0 flex-1 flex-col\">\n <ScrollArea mask={mask} className=\"min-h-0 flex-1\">\n <ScrollAreaViewport\n className={cn(variant === 'container' && 'p-4')}\n contentClassName={cn(\n variant === 'container' && 'h-full min-h-min',\n variant === 'narrow' && 'grid min-h-full grid-cols-1',\n // `fit` hands the remaining body height to its child (panels, graphs, tables that own their scroll).\n variant === 'fit' &&\n (header\n ? 'grid h-full grid-cols-1 grid-rows-[auto_minmax(0,1fr)]'\n : 'grid h-full grid-cols-1 grid-rows-1'),\n )}\n >\n {variant === 'narrow' ? (\n // Horizontal gutter is the variant's contract; keep px/py explicit rather than the `p-4` shorthand.\n // eslint-disable-next-line tailwindcss/enforces-shorthand\n <div\n data-slot=\"page-layout-container\"\n className={cn(\n 'mx-auto grid min-h-full w-full max-w-5xl grid-cols-1 p-4',\n header ? 'grid-rows-[auto_1fr]' : 'grid-rows-[1fr]',\n )}\n >\n {headerSlot}\n {children}\n </div>\n ) : (\n <>\n {headerSlot}\n {children}\n </>\n )}\n </ScrollAreaViewport>\n </ScrollArea>\n </main>\n </div>\n );\n}\n"],"mappings":";;;;;AA6BA,SAAgB,WAAW,EACzB,UACA,aACA,eACA,WACA,QACA,UAAU,aACV,OAAO,SACW;CAClB,MAAM,aAAa,SACjB,oBAAC,OAAD;EAAK,aAAU;EAAqB,WAAW,GAAG,YAAY,SAAS,KAAK;EACzE,UAAA;CACE,CAAA,IACH;CAEJ,OACE,qBAAC,OAAD;EAAK,aAAU;EAAc,WAAU;EAAvC,UAAA;IACI,eAAe,kBACf,qBAAC,QAAD;IAAQ,WAAU;IAAlB,UAAA,CACG,aACA,iBACC,oBAAC,OAAD;KAAK,WAAU;KAA4D,UAAA;IAAmB,CAAA,CAE1F;;GAET,aACC,oBAAC,OAAD;IAAK,aAAU;IAAyB,WAAU;IAC/C,UAAA;GACE,CAAA;GAEP,oBAAC,QAAD;IAAM,WAAU;IACd,UAAA,oBAAC,YAAD;KAAkB;KAAM,WAAU;KAChC,UAAA,oBAAC,oBAAD;MACE,WAAW,GAAG,YAAY,eAAe,KAAK;MAC9C,kBAAkB,GAChB,YAAY,eAAe,oBAC3B,YAAY,YAAY,+BAExB,YAAY,UACT,SACG,2DACA,sCACR;MAEC,UAAA,YAAY,WAGX,qBAAC,OAAD;OACE,aAAU;OACV,WAAW,GACT,4DACA,SAAS,yBAAyB,iBACpC;OALF,UAAA,CAOG,YACA,QACE;MAEL,CAAA,IAAA,qBAAAA,UAAA,EAAA,UAAA,CACG,YACA,QACD,EAAA,CAAA;KAEc,CAAA;IACV,CAAA;GACR,CAAA;EACH;;AAET"}
|
|
@@ -2,7 +2,6 @@ const require_primitives_raised_surface = require("./primitives/raised-surface.c
|
|
|
2
2
|
const require_utils = require("./utils-uDc1ofX1.cjs");
|
|
3
3
|
const require_tooltip = require("./tooltip-BsExuMO8.cjs");
|
|
4
4
|
const require_Txt = require("./Txt-_00wWxTd.cjs");
|
|
5
|
-
const require_page_header = require("./page-header-pZCts_WC.cjs");
|
|
6
5
|
const require_settings_row = require("./settings-row-Dfi4pLnl.cjs");
|
|
7
6
|
const require_skeleton_text = require("./skeleton-text-Bi4d2-D8.cjs");
|
|
8
7
|
let react = require("react");
|
|
@@ -95,41 +94,6 @@ function SettingsDescription({ className, ...props }) {
|
|
|
95
94
|
...props
|
|
96
95
|
});
|
|
97
96
|
}
|
|
98
|
-
// src/ds/new/settings/settings-layout.tsx
|
|
99
|
-
/**
|
|
100
|
-
* A settings page: a centered 640px column with the title, inset like the section titles, above its sections.
|
|
101
|
-
* The app's page around it gives the side gutter (`PageLayout`, Factory's settings panel, Platform's page).
|
|
102
|
-
*/
|
|
103
|
-
function SettingsLayout({ title, titleAccessory, action, header, children }) {
|
|
104
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
105
|
-
"data-slot": "settings-layout",
|
|
106
|
-
className: require_utils.cn("mx-auto grid min-h-full w-full max-w-160 min-w-0 gap-8 py-6", header != null || title != null ? "grid-rows-[auto_1fr]" : "grid-rows-[1fr]"),
|
|
107
|
-
children: [
|
|
108
|
-
header != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
109
|
-
"data-slot": "settings-page-header",
|
|
110
|
-
className: "ps-2.5",
|
|
111
|
-
children: header
|
|
112
|
-
}),
|
|
113
|
-
header == null && title != null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_page_header.PageHeader, {
|
|
114
|
-
"data-slot": "settings-page-header",
|
|
115
|
-
className: "ps-2.5",
|
|
116
|
-
children: [
|
|
117
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_page_header.PageHeader.Title, { children: title }),
|
|
118
|
-
titleAccessory != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_page_header.PageHeader.Meta, {
|
|
119
|
-
beside: true,
|
|
120
|
-
children: titleAccessory
|
|
121
|
-
}),
|
|
122
|
-
action != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_page_header.PageHeader.Action, { children: action })
|
|
123
|
-
]
|
|
124
|
-
}),
|
|
125
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
126
|
-
"data-slot": "settings-layout-content",
|
|
127
|
-
className: "grid min-w-0 content-start gap-7 has-[>[data-slot=empty-state-fill]:only-child]:content-stretch",
|
|
128
|
-
children
|
|
129
|
-
})
|
|
130
|
-
]
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
97
|
// src/ds/new/settings/settings-list.tsx
|
|
134
98
|
/** A list's count or caption on the left and its one action ("Add account", "Invite member") on the right. */
|
|
135
99
|
function SettingsListBar({ tone, action, className, children, ...props }) {
|
|
@@ -297,12 +261,6 @@ Object.defineProperty(exports, "SettingsItemIcon", {
|
|
|
297
261
|
return SettingsItemIcon;
|
|
298
262
|
}
|
|
299
263
|
});
|
|
300
|
-
Object.defineProperty(exports, "SettingsLayout", {
|
|
301
|
-
enumerable: true,
|
|
302
|
-
get: function() {
|
|
303
|
-
return SettingsLayout;
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
264
|
Object.defineProperty(exports, "SettingsListHeader", {
|
|
307
265
|
enumerable: true,
|
|
308
266
|
get: function() {
|
|
@@ -328,4 +286,4 @@ Object.defineProperty(exports, "SettingsTitle", {
|
|
|
328
286
|
}
|
|
329
287
|
});
|
|
330
288
|
|
|
331
|
-
//# sourceMappingURL=settings-
|
|
289
|
+
//# sourceMappingURL=settings-5PdsNlhV.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-5PdsNlhV.cjs","names":["cn","fieldsOnSurface","createContext","useId","cn","useContext","Txt","Tooltip","TooltipTrigger","TooltipContent","cn","cn","Skeleton","SkeletonText","SettingsRow"],"sources":["../src/ds/new/settings/settings-container.tsx","../src/ds/new/settings/settings-header.tsx","../src/ds/new/settings/settings-list.tsx","../src/ds/new/settings/settings-skeleton.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport { fieldsOnSurface } from '@/ds/primitives/raised-surface';\nimport { cn } from '@/lib/utils';\n\n/**\n * A settings card: the card fill with no rim, 14px from its edge to the content, and hairlines between rows that\n * stop at that inset. The card owns its rows' spacing: each direct child gets 13px above and below, and the card\n * adds the last 1px at its edges. Children with nothing in them (an empty `SettingsNoticeRow`) take no space and\n * draw no hairline, so a list can always render its notice row.\n */\nconst settingsCardStyle = cn(\n // `!`: the card owns row spacing, so a row's own reset (`Fieldset`'s `p-0`) can't remove it.\n 'flex min-w-0 flex-col rounded-xl bg-card px-3.5 py-px *:py-3.25! *:empty:hidden',\n '[&>:not(:empty)~:not(:empty)]:border-t [&>:not(:empty)~:not(:empty)]:border-border',\n fieldsOnSurface,\n);\n\nexport type SettingsContainerProps = ComponentProps<'div'>;\n\n/** One settings card. Holds `SettingsRow`s, `SettingsItem`s, a `SettingsListHeader` or a `SettingsEmptyRow`. */\nexport function SettingsContainer({ className, ...props }: SettingsContainerProps) {\n return <div data-slot=\"settings-container\" className={cn(settingsCardStyle, className)} {...props} />;\n}\n","import { createContext, useContext, useId } from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/ds/components/Tooltip';\nimport { Txt } from '@/ds/components/Txt';\nimport { cn } from '@/lib/utils';\n\nconst SettingsTitleIdContext = createContext<string | undefined>(undefined);\n\n/** One section of a settings page: a `SettingsTitle` (or `SettingsHeader`) above its `SettingsContainer`. */\nexport function SettingsGroup({ className, ...props }: ComponentProps<'section'>) {\n const titleId = useId();\n\n return (\n <SettingsTitleIdContext.Provider value={titleId}>\n <section\n aria-labelledby={titleId}\n className={cn('flex min-w-0 scroll-mt-4 flex-col gap-2', className)}\n {...props}\n />\n </SettingsTitleIdContext.Provider>\n );\n}\n\n/** A section title with something beside it. A list's actions go in its card (`SettingsListHeader`), not here. */\nexport function SettingsHeader({\n action,\n children,\n className,\n ...props\n}: ComponentProps<'header'> & { action?: ReactNode }) {\n return (\n <header\n className={cn('flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4', className)}\n {...props}\n >\n <div className=\"flex min-w-0 flex-col gap-1\">{children}</div>\n {action != null && <div className=\"shrink-0\">{action}</div>}\n </header>\n );\n}\n\nexport function SettingsTitle({\n accessory,\n info,\n className,\n children,\n ...props\n}: Omit<ComponentProps<'h2'>, 'id'> & {\n accessory?: ReactNode;\n /** What the section is for, shown in a tooltip on the title. For sections whose name isn't self-explanatory. */\n info?: ReactNode;\n}) {\n const titleId = useContext(SettingsTitleIdContext);\n\n return (\n // Inset by 10px, so the title sits a little inside the card's edge below it.\n <div className=\"flex min-w-0 flex-wrap items-center gap-2 ps-2.5\">\n <Txt as=\"h2\" id={titleId} variant=\"subheading\" tone=\"muted\" className={className} {...props}>\n {info == null ? children : <SettingsTitleInfo info={info}>{children}</SettingsTitleInfo>}\n </Txt>\n {accessory}\n </div>\n );\n}\n\n/** The title's text as a tooltip trigger, described by `info`. */\nfunction SettingsTitleInfo({ info, children }: { info: ReactNode; children: ReactNode }) {\n const infoId = useId();\n\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <span\n tabIndex={0}\n aria-describedby={infoId}\n className=\"cursor-help underline decoration-transparent decoration-dotted underline-offset-4 hover:decoration-current focus-visible:decoration-current focus-visible:outline-none\"\n />\n }\n >\n {children}\n </TooltipTrigger>\n <TooltipContent id={infoId} keepMounted className=\"max-w-64\">\n {info}\n </TooltipContent>\n </Tooltip>\n );\n}\n\nexport function SettingsDescription({ className, ...props }: ComponentProps<'p'>) {\n return <Txt as=\"p\" variant=\"caption\" tone=\"muted\" className={cn('ps-2.5', className)} {...props} />;\n}\n","import type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '@/lib/utils';\n\n/** A list's count or caption on the left and its one action (\"Add account\", \"Invite member\") on the right. */\nfunction SettingsListBar({\n tone,\n action,\n className,\n children,\n ...props\n}: ComponentProps<'div'> & { tone: 'title' | 'muted'; action?: ReactNode }) {\n return (\n <div className={cn('flex min-h-8 items-center justify-between gap-3', className)} {...props}>\n <div\n className={cn(\n 'min-w-0 truncate',\n tone === 'title' ? 'text-label text-foreground' : 'text-body-sm text-muted-foreground',\n )}\n >\n {children}\n </div>\n {action != null && <div className=\"flex shrink-0 items-center gap-2\">{action}</div>}\n </div>\n );\n}\n\nexport type SettingsListHeaderProps = ComponentProps<'div'> & {\n /** The list's action, on the right. Refresh and other list controls can sit beside it. */\n action?: ReactNode;\n};\n\n/** The first row of a list's `SettingsContainer`: a count (\"2 accounts\") and the list's action. */\nexport function SettingsListHeader(props: SettingsListHeaderProps) {\n return <SettingsListBar data-slot=\"settings-list-header\" tone=\"title\" {...props} />;\n}\n\nexport type SettingsEmptyRowProps = ComponentProps<'div'> & {\n /** The same action the list's header would hold, so an empty list still offers it. */\n action?: ReactNode;\n};\n\n/** An empty list's only row: what's missing on the left (\"No join links\"), the list's action on the right. */\nexport function SettingsEmptyRow(props: SettingsEmptyRowProps) {\n return <SettingsListBar data-slot=\"settings-empty-row\" tone=\"muted\" {...props} />;\n}\n\n/** A list's notices and errors, as a row of its `SettingsContainer`. Takes no space while it has nothing in it. */\nexport function SettingsNoticeRow({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"settings-notice-row\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\n/** The square on the left of a `SettingsItem` holding an icon or logo. Avatars use `Avatar size=\"md\"`, the\n * same size, so every list's text starts at the same place. */\nexport function SettingsItemIcon({ className, ...props }: ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"settings-item-icon\"\n aria-hidden\n className={cn(\n 'flex size-avatar-md shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground [&>svg]:size-icon-md',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport type SettingsItemProps = Omit<ComponentProps<'div'>, 'title'> & {\n /** A `SettingsItemIcon` or an `Avatar size=\"md\"`. */\n media?: ReactNode;\n title: ReactNode;\n /** One line under the title: \"GitHub · Connected 3 weeks ago\". */\n description?: ReactNode;\n /** The item's status or actions, on the right. */\n children?: ReactNode;\n};\n\n/** One thing in a settings list (an account, a member, a session, a source). Goes in a `SettingsContainer`. */\nexport function SettingsItem({ media, title, description, children, className, ...props }: SettingsItemProps) {\n return (\n <div data-slot=\"settings-item\" className={cn('flex min-w-0 items-center gap-3', className)} {...props}>\n {media}\n <div className=\"flex min-w-0 flex-1 flex-col gap-px\">\n {/* A string title truncates, so it also goes in the hover title to stay readable in full. */}\n <div className=\"truncate text-label text-foreground\" title={typeof title === 'string' ? title : undefined}>\n {title}\n </div>\n {description != null && <div className=\"truncate text-caption text-muted-foreground\">{description}</div>}\n </div>\n {children != null && <div className=\"flex shrink-0 items-center gap-2\">{children}</div>}\n </div>\n );\n}\n","import { SettingsItem } from './settings-list';\nimport { SettingsRow } from './settings-row';\nimport { Skeleton } from '@/ds/components/Skeleton/skeleton';\nimport { SkeletonText } from '@/ds/components/Skeleton/skeleton-text';\nimport { cn } from '@/lib/utils';\n\nconst bar = 'motion-reduce:before:animate-none';\n\nexport type SettingsSkeletonProps = {\n /** Announced while loading, e.g. \"Loading members\". */\n label: string;\n /** Placeholder rows, matching how many the loaded list usually has. */\n rows?: number;\n /** `row` stands in for `SettingsRow`s (label left, control right); `item` for `SettingsItem`s (icon, title, description). */\n variant?: 'row' | 'item';\n className?: string;\n};\n\n/**\n * The loading state for anything inside a `SettingsContainer`. Placeholders are built from the real `SettingsRow` and\n * `SettingsItem`, so they sit exactly where the loaded rows will.\n *\n * ```tsx\n * <SettingsContainer>\n * {isLoading ? <SettingsSkeleton label=\"Loading members\" variant=\"item\" rows={3} /> : members.map(...)}\n * </SettingsContainer>\n * ```\n */\nexport function SettingsSkeleton({ label, rows = 2, variant = 'row', className }: SettingsSkeletonProps) {\n const Placeholder = variant === 'item' ? ItemPlaceholder : RowPlaceholder;\n\n return (\n // One child of the card, so it takes the card's row padding; inside, rows repeat that rhythm with hairlines.\n <div\n role=\"status\"\n aria-label={label}\n data-slot=\"settings-skeleton\"\n className={cn('grid divide-y divide-border *:py-3.25 *:first:pt-0 *:last:pb-0', className)}\n >\n {Array.from({ length: rows }, (_, index) => (\n <Placeholder key={index} />\n ))}\n </div>\n );\n}\n\nfunction ItemPlaceholder() {\n return (\n <SettingsItem\n aria-hidden\n media={<Skeleton className={cn('size-avatar-md shrink-0 rounded-lg', bar)} />}\n title={<SkeletonText line=\"text-label\" className={cn('w-32', bar)} />}\n description={<SkeletonText line=\"text-caption\" className={cn('w-48 max-w-full', bar)} />}\n />\n );\n}\n\nfunction RowPlaceholder() {\n return (\n <SettingsRow\n aria-hidden\n label={<SkeletonText line=\"text-label\" className={cn('w-28', bar)} />}\n description={<SkeletonText line=\"text-caption\" className={cn('w-48 max-w-full', bar)} />}\n >\n <Skeleton className={cn('h-control-sm w-28 max-w-full rounded-full', bar)} />\n </SettingsRow>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAUA,IAAM,oBAAoBA,cAAAA,GAExB,mFACA,sFACAC,kCAAAA,eACF;;AAKA,SAAgB,kBAAkB,EAAE,WAAW,GAAG,SAAiC;CACjF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,aAAU;EAAqB,WAAWD,cAAAA,GAAG,mBAAmB,SAAS;EAAG,GAAI;CAAQ,CAAA;AACtG;;AChBA,IAAM,0BAAA,GAAyBE,MAAAA,cAAAA,CAAkC,KAAA,CAAS;;AAG1E,SAAgB,cAAc,EAAE,WAAW,GAAG,SAAoC;CAChF,MAAM,WAAA,GAAUC,MAAAA,MAAAA,CAAM;CAEtB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAuB,UAAxB;EAAiC,OAAO;EACtC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;GACE,mBAAiB;GACjB,WAAWC,cA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AA,IAAA,CAACC,sBAAAA,UAAD,EAAU,WAAWD,cAAAA,GAAG,sCAAsC,GAAG,EAAI,CAAA;EAC5E,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACE,sBAAAA,cAAD;GAAc,MAAK;GAAa,WAAWF,cAAAA,GAAG,QAAQ,GAAG;EAAI,CAAA;EACpE,aAAa,iBAAA,GAAA,kBAAA,IAAA,CAACE,sBAAAA,cAAD;GAAc,MAAK;GAAe,WAAWF,cAAAA,GAAG,mBAAmB,GAAG;EAAI,CAAA;CACxF,CAAA;AAEL;AAEA,SAAS,iBAAiB;CACxB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACG,qBAAAA,aAAD;EACE,eAAA;EACA,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACD,sBAAAA,cAAD;GAAc,MAAK;GAAa,WAAWF,cAAAA,GAAG,QAAQ,GAAG;EAAI,CAAA;EACpE,aAAa,iBAAA,GAAA,kBAAA,IAAA,CAACE,sBAAAA,cAAD;GAAc,MAAK;GAAe,WAAWF,cAAAA,GAAG,mBAAmB,GAAG;EAAI,CAAA;EAEvF,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,UAAD,EAAU,WAAWD,cAAAA,GAAG,6CAA6C,GAAG,EAAI,CAAA;CACjE,CAAA;AAEjB"}
|
|
@@ -2,7 +2,6 @@ import { fieldsOnSurface } from "./primitives/raised-surface.es.js";
|
|
|
2
2
|
import { t as cn } from "./utils-DQx8TpNT.js";
|
|
3
3
|
import { i as TooltipTrigger, n as TooltipContent, t as Tooltip } from "./tooltip-DJcze2VZ.js";
|
|
4
4
|
import { t as Txt } from "./Txt-5efBsb2p.js";
|
|
5
|
-
import { t as PageHeader } from "./page-header-Maytcmgh.js";
|
|
6
5
|
import { n as SettingsRow } from "./settings-row-C2HTuwjN.js";
|
|
7
6
|
import { n as Skeleton, t as SkeletonText } from "./skeleton-text-BPa4Tg4u.js";
|
|
8
7
|
import { createContext, useContext, useId } from "react";
|
|
@@ -95,41 +94,6 @@ function SettingsDescription({ className, ...props }) {
|
|
|
95
94
|
...props
|
|
96
95
|
});
|
|
97
96
|
}
|
|
98
|
-
// src/ds/new/settings/settings-layout.tsx
|
|
99
|
-
/**
|
|
100
|
-
* A settings page: a centered 640px column with the title, inset like the section titles, above its sections.
|
|
101
|
-
* The app's page around it gives the side gutter (`PageLayout`, Factory's settings panel, Platform's page).
|
|
102
|
-
*/
|
|
103
|
-
function SettingsLayout({ title, titleAccessory, action, header, children }) {
|
|
104
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
105
|
-
"data-slot": "settings-layout",
|
|
106
|
-
className: cn("mx-auto grid min-h-full w-full max-w-160 min-w-0 gap-8 py-6", header != null || title != null ? "grid-rows-[auto_1fr]" : "grid-rows-[1fr]"),
|
|
107
|
-
children: [
|
|
108
|
-
header != null && /* @__PURE__ */ jsx("div", {
|
|
109
|
-
"data-slot": "settings-page-header",
|
|
110
|
-
className: "ps-2.5",
|
|
111
|
-
children: header
|
|
112
|
-
}),
|
|
113
|
-
header == null && title != null && /* @__PURE__ */ jsxs(PageHeader, {
|
|
114
|
-
"data-slot": "settings-page-header",
|
|
115
|
-
className: "ps-2.5",
|
|
116
|
-
children: [
|
|
117
|
-
/* @__PURE__ */ jsx(PageHeader.Title, { children: title }),
|
|
118
|
-
titleAccessory != null && /* @__PURE__ */ jsx(PageHeader.Meta, {
|
|
119
|
-
beside: true,
|
|
120
|
-
children: titleAccessory
|
|
121
|
-
}),
|
|
122
|
-
action != null && /* @__PURE__ */ jsx(PageHeader.Action, { children: action })
|
|
123
|
-
]
|
|
124
|
-
}),
|
|
125
|
-
/* @__PURE__ */ jsx("div", {
|
|
126
|
-
"data-slot": "settings-layout-content",
|
|
127
|
-
className: "grid min-w-0 content-start gap-7 has-[>[data-slot=empty-state-fill]:only-child]:content-stretch",
|
|
128
|
-
children
|
|
129
|
-
})
|
|
130
|
-
]
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
97
|
// src/ds/new/settings/settings-list.tsx
|
|
134
98
|
/** A list's count or caption on the left and its one action ("Add account", "Invite member") on the right. */
|
|
135
99
|
function SettingsListBar({ tone, action, className, children, ...props }) {
|
|
@@ -255,6 +219,6 @@ function RowPlaceholder() {
|
|
|
255
219
|
children: /* @__PURE__ */ jsx(Skeleton, { className: cn("h-control-sm w-28 max-w-full rounded-full", bar) })
|
|
256
220
|
});
|
|
257
221
|
}
|
|
258
|
-
export { SettingsListHeader as a,
|
|
222
|
+
export { SettingsListHeader as a, SettingsGroup as c, SettingsContainer as d, SettingsItemIcon as i, SettingsHeader as l, SettingsEmptyRow as n, SettingsNoticeRow as o, SettingsItem as r, SettingsDescription as s, SettingsSkeleton as t, SettingsTitle as u };
|
|
259
223
|
|
|
260
|
-
//# sourceMappingURL=settings-
|
|
224
|
+
//# sourceMappingURL=settings-DIrzLcgE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-DIrzLcgE.js","names":[],"sources":["../src/ds/new/settings/settings-container.tsx","../src/ds/new/settings/settings-header.tsx","../src/ds/new/settings/settings-list.tsx","../src/ds/new/settings/settings-skeleton.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport { fieldsOnSurface } from '@/ds/primitives/raised-surface';\nimport { cn } from '@/lib/utils';\n\n/**\n * A settings card: the card fill with no rim, 14px from its edge to the content, and hairlines between rows that\n * stop at that inset. The card owns its rows' spacing: each direct child gets 13px above and below, and the card\n * adds the last 1px at its edges. Children with nothing in them (an empty `SettingsNoticeRow`) take no space and\n * draw no hairline, so a list can always render its notice row.\n */\nconst settingsCardStyle = cn(\n // `!`: the card owns row spacing, so a row's own reset (`Fieldset`'s `p-0`) can't remove it.\n 'flex min-w-0 flex-col rounded-xl bg-card px-3.5 py-px *:py-3.25! *:empty:hidden',\n '[&>:not(:empty)~:not(:empty)]:border-t [&>:not(:empty)~:not(:empty)]:border-border',\n fieldsOnSurface,\n);\n\nexport type SettingsContainerProps = ComponentProps<'div'>;\n\n/** One settings card. Holds `SettingsRow`s, `SettingsItem`s, a `SettingsListHeader` or a `SettingsEmptyRow`. */\nexport function SettingsContainer({ className, ...props }: SettingsContainerProps) {\n return <div data-slot=\"settings-container\" className={cn(settingsCardStyle, className)} {...props} />;\n}\n","import { createContext, useContext, useId } from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/ds/components/Tooltip';\nimport { Txt } from '@/ds/components/Txt';\nimport { cn } from '@/lib/utils';\n\nconst SettingsTitleIdContext = createContext<string | undefined>(undefined);\n\n/** One section of a settings page: a `SettingsTitle` (or `SettingsHeader`) above its `SettingsContainer`. */\nexport function SettingsGroup({ className, ...props }: ComponentProps<'section'>) {\n const titleId = useId();\n\n return (\n <SettingsTitleIdContext.Provider value={titleId}>\n <section\n aria-labelledby={titleId}\n className={cn('flex min-w-0 scroll-mt-4 flex-col gap-2', className)}\n {...props}\n />\n </SettingsTitleIdContext.Provider>\n );\n}\n\n/** A section title with something beside it. A list's actions go in its card (`SettingsListHeader`), not here. */\nexport function SettingsHeader({\n action,\n children,\n className,\n ...props\n}: ComponentProps<'header'> & { action?: ReactNode }) {\n return (\n <header\n className={cn('flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4', className)}\n {...props}\n >\n <div className=\"flex min-w-0 flex-col gap-1\">{children}</div>\n {action != null && <div className=\"shrink-0\">{action}</div>}\n </header>\n );\n}\n\nexport function SettingsTitle({\n accessory,\n info,\n className,\n children,\n ...props\n}: Omit<ComponentProps<'h2'>, 'id'> & {\n accessory?: ReactNode;\n /** What the section is for, shown in a tooltip on the title. For sections whose name isn't self-explanatory. */\n info?: ReactNode;\n}) {\n const titleId = useContext(SettingsTitleIdContext);\n\n return (\n // Inset by 10px, so the title sits a little inside the card's edge below it.\n <div className=\"flex min-w-0 flex-wrap items-center gap-2 ps-2.5\">\n <Txt as=\"h2\" id={titleId} variant=\"subheading\" tone=\"muted\" className={className} {...props}>\n {info == null ? children : <SettingsTitleInfo info={info}>{children}</SettingsTitleInfo>}\n </Txt>\n {accessory}\n </div>\n );\n}\n\n/** The title's text as a tooltip trigger, described by `info`. */\nfunction SettingsTitleInfo({ info, children }: { info: ReactNode; children: ReactNode }) {\n const infoId = useId();\n\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <span\n tabIndex={0}\n aria-describedby={infoId}\n className=\"cursor-help underline decoration-transparent decoration-dotted underline-offset-4 hover:decoration-current focus-visible:decoration-current focus-visible:outline-none\"\n />\n }\n >\n {children}\n </TooltipTrigger>\n <TooltipContent id={infoId} keepMounted className=\"max-w-64\">\n {info}\n </TooltipContent>\n </Tooltip>\n );\n}\n\nexport function SettingsDescription({ className, ...props }: ComponentProps<'p'>) {\n return <Txt as=\"p\" variant=\"caption\" tone=\"muted\" className={cn('ps-2.5', className)} {...props} />;\n}\n","import type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '@/lib/utils';\n\n/** A list's count or caption on the left and its one action (\"Add account\", \"Invite member\") on the right. */\nfunction SettingsListBar({\n tone,\n action,\n className,\n children,\n ...props\n}: ComponentProps<'div'> & { tone: 'title' | 'muted'; action?: ReactNode }) {\n return (\n <div className={cn('flex min-h-8 items-center justify-between gap-3', className)} {...props}>\n <div\n className={cn(\n 'min-w-0 truncate',\n tone === 'title' ? 'text-label text-foreground' : 'text-body-sm text-muted-foreground',\n )}\n >\n {children}\n </div>\n {action != null && <div className=\"flex shrink-0 items-center gap-2\">{action}</div>}\n </div>\n );\n}\n\nexport type SettingsListHeaderProps = ComponentProps<'div'> & {\n /** The list's action, on the right. Refresh and other list controls can sit beside it. */\n action?: ReactNode;\n};\n\n/** The first row of a list's `SettingsContainer`: a count (\"2 accounts\") and the list's action. */\nexport function SettingsListHeader(props: SettingsListHeaderProps) {\n return <SettingsListBar data-slot=\"settings-list-header\" tone=\"title\" {...props} />;\n}\n\nexport type SettingsEmptyRowProps = ComponentProps<'div'> & {\n /** The same action the list's header would hold, so an empty list still offers it. */\n action?: ReactNode;\n};\n\n/** An empty list's only row: what's missing on the left (\"No join links\"), the list's action on the right. */\nexport function SettingsEmptyRow(props: SettingsEmptyRowProps) {\n return <SettingsListBar data-slot=\"settings-empty-row\" tone=\"muted\" {...props} />;\n}\n\n/** A list's notices and errors, as a row of its `SettingsContainer`. Takes no space while it has nothing in it. */\nexport function SettingsNoticeRow({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot=\"settings-notice-row\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\n/** The square on the left of a `SettingsItem` holding an icon or logo. Avatars use `Avatar size=\"md\"`, the\n * same size, so every list's text starts at the same place. */\nexport function SettingsItemIcon({ className, ...props }: ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"settings-item-icon\"\n aria-hidden\n className={cn(\n 'flex size-avatar-md shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground [&>svg]:size-icon-md',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport type SettingsItemProps = Omit<ComponentProps<'div'>, 'title'> & {\n /** A `SettingsItemIcon` or an `Avatar size=\"md\"`. */\n media?: ReactNode;\n title: ReactNode;\n /** One line under the title: \"GitHub · Connected 3 weeks ago\". */\n description?: ReactNode;\n /** The item's status or actions, on the right. */\n children?: ReactNode;\n};\n\n/** One thing in a settings list (an account, a member, a session, a source). Goes in a `SettingsContainer`. */\nexport function SettingsItem({ media, title, description, children, className, ...props }: SettingsItemProps) {\n return (\n <div data-slot=\"settings-item\" className={cn('flex min-w-0 items-center gap-3', className)} {...props}>\n {media}\n <div className=\"flex min-w-0 flex-1 flex-col gap-px\">\n {/* A string title truncates, so it also goes in the hover title to stay readable in full. */}\n <div className=\"truncate text-label text-foreground\" title={typeof title === 'string' ? title : undefined}>\n {title}\n </div>\n {description != null && <div className=\"truncate text-caption text-muted-foreground\">{description}</div>}\n </div>\n {children != null && <div className=\"flex shrink-0 items-center gap-2\">{children}</div>}\n </div>\n );\n}\n","import { SettingsItem } from './settings-list';\nimport { SettingsRow } from './settings-row';\nimport { Skeleton } from '@/ds/components/Skeleton/skeleton';\nimport { SkeletonText } from '@/ds/components/Skeleton/skeleton-text';\nimport { cn } from '@/lib/utils';\n\nconst bar = 'motion-reduce:before:animate-none';\n\nexport type SettingsSkeletonProps = {\n /** Announced while loading, e.g. \"Loading members\". */\n label: string;\n /** Placeholder rows, matching how many the loaded list usually has. */\n rows?: number;\n /** `row` stands in for `SettingsRow`s (label left, control right); `item` for `SettingsItem`s (icon, title, description). */\n variant?: 'row' | 'item';\n className?: string;\n};\n\n/**\n * The loading state for anything inside a `SettingsContainer`. Placeholders are built from the real `SettingsRow` and\n * `SettingsItem`, so they sit exactly where the loaded rows will.\n *\n * ```tsx\n * <SettingsContainer>\n * {isLoading ? <SettingsSkeleton label=\"Loading members\" variant=\"item\" rows={3} /> : members.map(...)}\n * </SettingsContainer>\n * ```\n */\nexport function SettingsSkeleton({ label, rows = 2, variant = 'row', className }: SettingsSkeletonProps) {\n const Placeholder = variant === 'item' ? ItemPlaceholder : RowPlaceholder;\n\n return (\n // One child of the card, so it takes the card's row padding; inside, rows repeat that rhythm with hairlines.\n <div\n role=\"status\"\n aria-label={label}\n data-slot=\"settings-skeleton\"\n className={cn('grid divide-y divide-border *:py-3.25 *:first:pt-0 *:last:pb-0', className)}\n >\n {Array.from({ length: rows }, (_, index) => (\n <Placeholder key={index} />\n ))}\n </div>\n );\n}\n\nfunction ItemPlaceholder() {\n return (\n <SettingsItem\n aria-hidden\n media={<Skeleton className={cn('size-avatar-md shrink-0 rounded-lg', bar)} />}\n title={<SkeletonText line=\"text-label\" className={cn('w-32', bar)} />}\n description={<SkeletonText line=\"text-caption\" className={cn('w-48 max-w-full', bar)} />}\n />\n );\n}\n\nfunction RowPlaceholder() {\n return (\n <SettingsRow\n aria-hidden\n label={<SkeletonText line=\"text-label\" className={cn('w-28', bar)} />}\n description={<SkeletonText line=\"text-caption\" className={cn('w-48 max-w-full', bar)} />}\n >\n <Skeleton className={cn('h-control-sm w-28 max-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AG;EAAI,CAAA;EACpE,aAAa,oBAAC,cAAD;GAAc,MAAK;GAAe,WAAW,GAAG,mBAAmB,GAAG;EAAI,CAAA;EAEvF,UAAA,oBAAC,UAAD,EAAU,WAAW,GAAG,6CAA6C,GAAG,EAAI,CAAA;CACjE,CAAA;AAEjB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const require_page_header = require("./page-header-pZCts_WC.cjs");
|
|
2
|
+
const require_utils = require("./utils-uDc1ofX1.cjs");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
// src/ds/new/settings/settings-layout.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A settings page: a centered 640px column with the title, inset like the section titles, above its sections.
|
|
7
|
+
* The app's page around it gives the side gutter (`PageLayout`, Factory's settings panel, Platform's page).
|
|
8
|
+
*/
|
|
9
|
+
function SettingsLayout({ title, titleAccessory, action, header, children }) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11
|
+
"data-slot": "settings-layout",
|
|
12
|
+
className: require_utils.cn("mx-auto grid min-h-full w-full max-w-160 min-w-0 gap-8 py-6", header != null || title != null ? "grid-rows-[auto_1fr]" : "grid-rows-[1fr]"),
|
|
13
|
+
children: [
|
|
14
|
+
header != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15
|
+
"data-slot": "settings-page-header",
|
|
16
|
+
className: "ps-2.5",
|
|
17
|
+
children: header
|
|
18
|
+
}),
|
|
19
|
+
header == null && title != null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_page_header.PageHeader, {
|
|
20
|
+
"data-slot": "settings-page-header",
|
|
21
|
+
className: "ps-2.5",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_page_header.PageHeader.Title, { children: title }),
|
|
24
|
+
titleAccessory != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_page_header.PageHeader.Meta, {
|
|
25
|
+
beside: true,
|
|
26
|
+
children: titleAccessory
|
|
27
|
+
}),
|
|
28
|
+
action != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_page_header.PageHeader.Action, { children: action })
|
|
29
|
+
]
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
32
|
+
"data-slot": "settings-layout-content",
|
|
33
|
+
className: "grid min-w-0 content-start gap-7 has-[>[data-slot=empty-state-fill]:only-child]:content-stretch",
|
|
34
|
+
children
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
Object.defineProperty(exports, "SettingsLayout", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function() {
|
|
42
|
+
return SettingsLayout;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=settings-layout-BxtShpY6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-layout-BxtShpY6.cjs","names":["cn","PageHeader"],"sources":["../src/ds/new/settings/settings-layout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { PageHeader } from '@/ds/new/layout/page-header';\nimport { cn } from '@/lib/utils';\n\nexport interface SettingsLayoutProps {\n /** The page title. Leave it out when the app's own header already names the page. */\n title?: ReactNode;\n titleAccessory?: ReactNode;\n action?: ReactNode;\n /** A header of the app's own in place of `title` (a `PageHeader` whose title takes focus), with the same inset. */\n header?: ReactNode;\n /** `SettingsGroup`s, 28px apart. */\n children: ReactNode;\n}\n\n/**\n * A settings page: a centered 640px column with the title, inset like the section titles, above its sections.\n * The app's page around it gives the side gutter (`PageLayout`, Factory's settings panel, Platform's page).\n */\nexport function SettingsLayout({ title, titleAccessory, action, header, children }: SettingsLayoutProps) {\n return (\n // The content row takes the rest of the page's height, so a lone `EmptyState variant=\"fill\"` centers in it.\n <div\n data-slot=\"settings-layout\"\n className={cn(\n 'mx-auto grid min-h-full w-full max-w-160 min-w-0 gap-8 py-6',\n header != null || title != null ? 'grid-rows-[auto_1fr]' : 'grid-rows-[1fr]',\n )}\n >\n {header != null && (\n <div data-slot=\"settings-page-header\" className=\"ps-2.5\">\n {header}\n </div>\n )}\n {header == null && title != null && (\n <PageHeader data-slot=\"settings-page-header\" className=\"ps-2.5\">\n <PageHeader.Title>{title}</PageHeader.Title>\n {titleAccessory != null && <PageHeader.Meta beside>{titleAccessory}</PageHeader.Meta>}\n {action != null && <PageHeader.Action>{action}</PageHeader.Action>}\n </PageHeader>\n )}\n <div\n data-slot=\"settings-layout-content\"\n className=\"grid min-w-0 content-start gap-7 has-[>[data-slot=empty-state-fill]:only-child]:content-stretch\"\n >\n {children}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAmBA,SAAgB,eAAe,EAAE,OAAO,gBAAgB,QAAQ,QAAQ,YAAiC;CACvG,OAEE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EACE,aAAU;EACV,WAAWA,cAAAA,GACT,+DACA,UAAU,QAAQ,SAAS,OAAO,yBAAyB,iBAC7D;EALF,UAAA;GAOG,UAAU,QACT,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IAAK,aAAU;IAAuB,WAAU;IAC7C,UAAA;GACE,CAAA;GAEN,UAAU,QAAQ,SAAS,QAC1B,iBAAA,GAAA,kBAAA,KAAA,CAACC,oBAAAA,YAAD;IAAY,aAAU;IAAuB,WAAU;IAAvD,UAAA;KACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,oBAAAA,WAAW,OAAZ,EAAA,UAAmB,MAAwB,CAAA;KAC1C,kBAAkB,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAACA,oBAAAA,WAAW,MAAZ;MAAiB,QAAA;MAAQ,UAAA;KAAgC,CAAA;KACnF,UAAU,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAACA,oBAAAA,WAAW,QAAZ,EAAA,UAAoB,OAA0B,CAAA;IACvD;;GAEd,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IACE,aAAU;IACV,WAAU;IAET;GACE,CAAA;EACF;;AAET"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { t as PageHeader } from "./page-header-Maytcmgh.js";
|
|
2
|
+
import { t as cn } from "./utils-DQx8TpNT.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
// src/ds/new/settings/settings-layout.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A settings page: a centered 640px column with the title, inset like the section titles, above its sections.
|
|
7
|
+
* The app's page around it gives the side gutter (`PageLayout`, Factory's settings panel, Platform's page).
|
|
8
|
+
*/
|
|
9
|
+
function SettingsLayout({ title, titleAccessory, action, header, children }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
"data-slot": "settings-layout",
|
|
12
|
+
className: cn("mx-auto grid min-h-full w-full max-w-160 min-w-0 gap-8 py-6", header != null || title != null ? "grid-rows-[auto_1fr]" : "grid-rows-[1fr]"),
|
|
13
|
+
children: [
|
|
14
|
+
header != null && /* @__PURE__ */ jsx("div", {
|
|
15
|
+
"data-slot": "settings-page-header",
|
|
16
|
+
className: "ps-2.5",
|
|
17
|
+
children: header
|
|
18
|
+
}),
|
|
19
|
+
header == null && title != null && /* @__PURE__ */ jsxs(PageHeader, {
|
|
20
|
+
"data-slot": "settings-page-header",
|
|
21
|
+
className: "ps-2.5",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsx(PageHeader.Title, { children: title }),
|
|
24
|
+
titleAccessory != null && /* @__PURE__ */ jsx(PageHeader.Meta, {
|
|
25
|
+
beside: true,
|
|
26
|
+
children: titleAccessory
|
|
27
|
+
}),
|
|
28
|
+
action != null && /* @__PURE__ */ jsx(PageHeader.Action, { children: action })
|
|
29
|
+
]
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ jsx("div", {
|
|
32
|
+
"data-slot": "settings-layout-content",
|
|
33
|
+
className: "grid min-w-0 content-start gap-7 has-[>[data-slot=empty-state-fill]:only-child]:content-stretch",
|
|
34
|
+
children
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export { SettingsLayout as t };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=settings-layout-UPnWI3FZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-layout-UPnWI3FZ.js","names":[],"sources":["../src/ds/new/settings/settings-layout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { PageHeader } from '@/ds/new/layout/page-header';\nimport { cn } from '@/lib/utils';\n\nexport interface SettingsLayoutProps {\n /** The page title. Leave it out when the app's own header already names the page. */\n title?: ReactNode;\n titleAccessory?: ReactNode;\n action?: ReactNode;\n /** A header of the app's own in place of `title` (a `PageHeader` whose title takes focus), with the same inset. */\n header?: ReactNode;\n /** `SettingsGroup`s, 28px apart. */\n children: ReactNode;\n}\n\n/**\n * A settings page: a centered 640px column with the title, inset like the section titles, above its sections.\n * The app's page around it gives the side gutter (`PageLayout`, Factory's settings panel, Platform's page).\n */\nexport function SettingsLayout({ title, titleAccessory, action, header, children }: SettingsLayoutProps) {\n return (\n // The content row takes the rest of the page's height, so a lone `EmptyState variant=\"fill\"` centers in it.\n <div\n data-slot=\"settings-layout\"\n className={cn(\n 'mx-auto grid min-h-full w-full max-w-160 min-w-0 gap-8 py-6',\n header != null || title != null ? 'grid-rows-[auto_1fr]' : 'grid-rows-[1fr]',\n )}\n >\n {header != null && (\n <div data-slot=\"settings-page-header\" className=\"ps-2.5\">\n {header}\n </div>\n )}\n {header == null && title != null && (\n <PageHeader data-slot=\"settings-page-header\" className=\"ps-2.5\">\n <PageHeader.Title>{title}</PageHeader.Title>\n {titleAccessory != null && <PageHeader.Meta beside>{titleAccessory}</PageHeader.Meta>}\n {action != null && <PageHeader.Action>{action}</PageHeader.Action>}\n </PageHeader>\n )}\n <div\n data-slot=\"settings-layout-content\"\n className=\"grid min-w-0 content-start gap-7 has-[>[data-slot=empty-state-fill]:only-child]:content-stretch\"\n >\n {children}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAmBA,SAAgB,eAAe,EAAE,OAAO,gBAAgB,QAAQ,QAAQ,YAAiC;CACvG,OAEE,qBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,+DACA,UAAU,QAAQ,SAAS,OAAO,yBAAyB,iBAC7D;EALF,UAAA;GAOG,UAAU,QACT,oBAAC,OAAD;IAAK,aAAU;IAAuB,WAAU;IAC7C,UAAA;GACE,CAAA;GAEN,UAAU,QAAQ,SAAS,QAC1B,qBAAC,YAAD;IAAY,aAAU;IAAuB,WAAU;IAAvD,UAAA;KACE,oBAAC,WAAW,OAAZ,EAAA,UAAmB,MAAwB,CAAA;KAC1C,kBAAkB,QAAQ,oBAAC,WAAW,MAAZ;MAAiB,QAAA;MAAQ,UAAA;KAAgC,CAAA;KACnF,UAAU,QAAQ,oBAAC,WAAW,QAAZ,EAAA,UAAoB,OAA0B,CAAA;IACvD;;GAEd,oBAAC,OAAD;IACE,aAAU;IACV,WAAU;IAET;GACE,CAAA;EACF;;AAET"}
|
|
@@ -26,8 +26,9 @@ export declare function KnowledgeNoteItem({ note, pagesById, onPageClick, highli
|
|
|
26
26
|
*
|
|
27
27
|
* Paged lists take a `…More` slot the host fills with the next page's loader.
|
|
28
28
|
*/
|
|
29
|
-
export declare function KnowledgePageDetail({ page, notes, pin, pagesById, onPageClick, highlightMentionOf, ancestors, mentionedBy, notesMore, childPages, activity, compact, }: {
|
|
29
|
+
export declare function KnowledgePageDetail({ page, notes, pin, pagesById, onPageClick, highlightMentionOf, ancestors, mentionedBy, notesMore, childPages, activity, onOpenPage, compact, }: {
|
|
30
30
|
compact?: boolean;
|
|
31
|
+
onOpenPage?: () => void;
|
|
31
32
|
page: KnowledgePagePayload;
|
|
32
33
|
notes: KnowledgeNotePayload[];
|
|
33
34
|
pin?: KnowledgePinPayload;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { LogRecord } from '../types';
|
|
2
3
|
export interface LogDataPanelProps {
|
|
3
4
|
/** Always mount the panel and pass `undefined` to close it, so the drawer can animate out. */
|
|
@@ -8,5 +9,7 @@ export interface LogDataPanelProps {
|
|
|
8
9
|
onPrevious?: () => void;
|
|
9
10
|
onNext?: () => void;
|
|
10
11
|
depth?: 1 | 2 | 3;
|
|
12
|
+
/** Extra controls in the header, before the previous/next buttons. */
|
|
13
|
+
actions?: ReactNode;
|
|
11
14
|
}
|
|
12
|
-
export declare function LogDataPanel({ log, onClose, onTraceClick, onSpanClick, onPrevious, onNext, depth, }: LogDataPanelProps): import("react").JSX.Element;
|
|
15
|
+
export declare function LogDataPanel({ log, onClose, onTraceClick, onSpanClick, onPrevious, onNext, depth, actions, }: LogDataPanelProps): import("react").JSX.Element;
|
|
@@ -25,14 +25,11 @@ export type ObservabilityListUrlState = {
|
|
|
25
25
|
* `defaultDatePreset` is the range shown when the URL names none (last 7 days unless the host differs);
|
|
26
26
|
* it is left out of the URL like any default.
|
|
27
27
|
*/
|
|
28
|
-
export declare function useObservabilityListFilters<F extends string = 'startedAt'>(url?: ObservabilityListUrlState, { sortFields,
|
|
28
|
+
export declare function useObservabilityListFilters<F extends string = 'startedAt'>(url?: ObservabilityListUrlState, { sortFields, withTokenSearch, defaultDatePreset, }?: {
|
|
29
29
|
sortFields?: readonly F[];
|
|
30
|
+
withTokenSearch?: boolean;
|
|
30
31
|
defaultDatePreset?: TraceDatePreset;
|
|
31
|
-
withTextSearch?: boolean;
|
|
32
32
|
}): {
|
|
33
|
-
searchValue: string | undefined;
|
|
34
|
-
textSearch: string | undefined;
|
|
35
|
-
setTextSearch: (value: string | undefined) => void;
|
|
36
33
|
datePreset: TraceDatePreset;
|
|
37
34
|
dateFrom: Date | undefined;
|
|
38
35
|
dateTo: Date | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TraceQueryScalarPredicate, TraceQueryTokenField } from '@mastra/core/storage';
|
|
2
|
+
import type { TraceFilterNode } from '../../traces/trace-query-filters';
|
|
3
|
+
import type { FilterBarField } from '../../../ds/components/FilterBar/types';
|
|
4
|
+
export declare const isTokenSearchField: (path: string) => path is TraceQueryTokenField;
|
|
5
|
+
export declare function tokenSearchValue(value: unknown): string | undefined;
|
|
6
|
+
export declare function tokenSearchPredicate(path: string, value: unknown): TraceQueryScalarPredicate | undefined;
|
|
7
|
+
export declare function withTokenSearchFields(fields: FilterBarField[], enabled: boolean, prefix?: string): FilterBarField[];
|
|
8
|
+
export declare function hasTokenSearchFilter(node: TraceFilterNode): boolean;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { TraceQueryScalarPredicate } from '@mastra/core/storage';
|
|
2
2
|
import type { SpanQueryArgs } from '@mastra/react/hooks/traces';
|
|
3
3
|
export type SpansExplorerHistogramProps = {
|
|
4
|
-
/** Applied list search; aggregates do not yet support text search (OBS-936). */
|
|
5
|
-
textSearch?: string;
|
|
6
4
|
/** The span list's resolved time range. */
|
|
7
5
|
timeRange: SpanQueryArgs['timeRange'];
|
|
8
6
|
/** The span list's filter predicate, from `buildSpanQueryWhere`. */
|
|
@@ -17,4 +15,4 @@ export type SpansExplorerHistogramProps = {
|
|
|
17
15
|
* Span and error counts over the span list's time range and filters.
|
|
18
16
|
* Renders nothing when the server can't aggregate spans or the window is wider than it aggregates.
|
|
19
17
|
*/
|
|
20
|
-
export declare function SpansExplorerHistogram({ timeRange, where,
|
|
18
|
+
export declare function SpansExplorerHistogram({ timeRange, where, onZoom }: SpansExplorerHistogramProps): import("react").JSX.Element | null;
|
|
@@ -2,9 +2,7 @@ import type { TraceQueryDiscoveryTimeRange } from '@mastra/react/hooks/traces';
|
|
|
2
2
|
import type { TraceFilterGroup, TraceFilterToken } from '../../traces/trace-query-filters';
|
|
3
3
|
import type { TraceDatePreset } from '../../traces/types';
|
|
4
4
|
export type SpansFilterBarProps = {
|
|
5
|
-
|
|
6
|
-
textSearch?: string;
|
|
7
|
-
onTextSearchChange?: (value: string | undefined) => void;
|
|
5
|
+
withTokenSearch?: boolean;
|
|
8
6
|
datePreset: TraceDatePreset;
|
|
9
7
|
dateFrom?: Date;
|
|
10
8
|
dateTo?: Date;
|
|
@@ -25,4 +23,4 @@ export type SpansFilterBarProps = {
|
|
|
25
23
|
disabled?: boolean;
|
|
26
24
|
};
|
|
27
25
|
/** The spans filter bar: the time range plus the fields `querySpans()` accepts. */
|
|
28
|
-
export declare function SpansFilterBar({
|
|
26
|
+
export declare function SpansFilterBar({ withTokenSearch, datePreset, dateFrom, dateTo, minDate, timeRange, tokens, groups, onDatePresetChange, onDateChange, onDateRangeChange, onDateReset, onFiltersChange, describeSuggestionsError, disabled, }: SpansFilterBarProps): import("react").JSX.Element;
|
|
@@ -7,16 +7,14 @@ export declare const SPAN_TIME_RANGE_PRESETS: readonly TraceDatePreset[];
|
|
|
7
7
|
export type UseSpansFilterBarFieldsOptions = {
|
|
8
8
|
/** Window the value suggestions are looked up in. */
|
|
9
9
|
timeRange: TraceQueryDiscoveryTimeRange;
|
|
10
|
-
|
|
10
|
+
withTokenSearch?: boolean;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* The fields the spans filter bar offers: the time range plus the fields `querySpans()` accepts.
|
|
14
14
|
* Context, model and outcome fields and streaming timings are only included when the store declares them.
|
|
15
15
|
*/
|
|
16
|
-
export declare function useSpansFilterBarFields({ timeRange,
|
|
16
|
+
export declare function useSpansFilterBarFields({ timeRange, withTokenSearch, }: UseSpansFilterBarFieldsOptions): FilterBarField[];
|
|
17
17
|
export type UseSpansFilterBarOptions = {
|
|
18
|
-
textSearch?: string;
|
|
19
|
-
onTextSearchChange?: (value: string | undefined) => void;
|
|
20
18
|
tokens: TraceFilterToken[];
|
|
21
19
|
groups: TraceFilterGroup[];
|
|
22
20
|
onFiltersChange: (tokens: TraceFilterToken[], groups: TraceFilterGroup[]) => void;
|
|
@@ -25,7 +23,7 @@ export type UseSpansFilterBarOptions = {
|
|
|
25
23
|
* The span filters as a filter bar value, and the handlers that write bar edits back.
|
|
26
24
|
* The time range is a synthetic, always-present item; it never round-trips to tokens.
|
|
27
25
|
*/
|
|
28
|
-
export declare function useSpansFilterBar({ tokens, groups, onFiltersChange
|
|
26
|
+
export declare function useSpansFilterBar({ tokens, groups, onFiltersChange }: UseSpansFilterBarOptions): {
|
|
29
27
|
filterBarValue: FilterBarExpression;
|
|
30
28
|
onFilterBarChange: (expression: FilterBarExpression) => void;
|
|
31
29
|
/** Replaces any filter on `fieldId` with `is value`, e.g. from a list cell. */
|
|
@@ -28,7 +28,8 @@ export declare function createSpanFilterBarFields({ withContextFields, withTimeT
|
|
|
28
28
|
* Conditions the span query can't run (unknown fields, context, model or outcome fields or streaming timings without
|
|
29
29
|
* the capability, unusable values) are left out instead of failing the request.
|
|
30
30
|
*/
|
|
31
|
-
export declare function buildSpanQueryWhere(tokens: TraceFilterToken[], groups: TraceFilterGroup[], { withContextFields, withOutcomeFields, withModelFields, ...support }: StreamingTimingSupport & {
|
|
31
|
+
export declare function buildSpanQueryWhere(tokens: TraceFilterToken[], groups: TraceFilterGroup[], { withContextFields, withTokenSearch, withOutcomeFields, withModelFields, ...support }: StreamingTimingSupport & {
|
|
32
|
+
withTokenSearch?: boolean;
|
|
32
33
|
withContextFields: boolean;
|
|
33
34
|
withOutcomeFields?: boolean;
|
|
34
35
|
withModelFields?: boolean;
|