@mastra/playground-ui 41.0.0-alpha.9 → 41.1.0-alpha.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/CHANGELOG.md +128 -0
- package/dist/{Button-5fzdHlD-.cjs → Button-B5RnKrGb.cjs} +9 -9
- package/dist/Button-B5RnKrGb.cjs.map +1 -0
- package/dist/{Button-kvmCIDtU.js → Button-Dh5CZ6Ir.js} +9 -9
- package/dist/Button-Dh5CZ6Ir.js.map +1 -0
- package/dist/Composer.css +25 -0
- package/dist/{Notice-BRlBe-l1.cjs → Notice-WhHdy89l.cjs} +2 -2
- package/dist/{Notice-BRlBe-l1.cjs.map → Notice-WhHdy89l.cjs.map} +1 -1
- package/dist/{Notice-BxU85fW-.js → Notice-jmHNt3gS.js} +2 -2
- package/dist/{Notice-BxU85fW-.js.map → Notice-jmHNt3gS.js.map} +1 -1
- package/dist/{SessionExpired-JOcAj_uC.js → SessionExpired-C0PdcdCr.js} +2 -2
- package/dist/{SessionExpired-JOcAj_uC.js.map → SessionExpired-C0PdcdCr.js.map} +1 -1
- package/dist/{SessionExpired-CO21Bf-6.cjs → SessionExpired-DEJgiQcL.cjs} +2 -2
- package/dist/{SessionExpired-CO21Bf-6.cjs.map → SessionExpired-DEJgiQcL.cjs.map} +1 -1
- package/dist/{combobox-DDPl8dxY.cjs → combobox-54Hywnf9.cjs} +2 -2
- package/dist/{combobox-DDPl8dxY.cjs.map → combobox-54Hywnf9.cjs.map} +1 -1
- package/dist/{combobox-BtsIKo3E.js → combobox-CBvs2ZPx.js} +2 -2
- package/dist/{combobox-BtsIKo3E.js.map → combobox-CBvs2ZPx.js.map} +1 -1
- package/dist/components/AlertDialog.cjs.js +1 -1
- package/dist/components/AlertDialog.es.js +1 -1
- package/dist/components/Button.cjs.js +1 -1
- package/dist/components/Button.es.js +1 -1
- package/dist/components/CodeBlock.cjs.js +2 -2
- package/dist/components/CodeBlock.es.js +2 -2
- package/dist/components/CodeEditor.cjs.js +1 -1
- package/dist/components/CodeEditor.es.js +1 -1
- package/dist/components/Columns.cjs.js +1 -1
- package/dist/components/Columns.es.js +1 -1
- package/dist/components/Combobox.cjs.js +1 -1
- package/dist/components/Combobox.es.js +1 -1
- package/dist/components/Command.cjs.js +1 -1
- package/dist/components/Command.es.js +1 -1
- package/dist/components/Composer.cjs.js +101 -0
- package/dist/components/Composer.cjs.js.map +1 -0
- package/dist/components/Composer.d.ts +2 -0
- package/dist/components/Composer.es.js +93 -0
- package/dist/components/Composer.es.js.map +1 -0
- package/dist/components/CopyButton.cjs.js +1 -1
- package/dist/components/CopyButton.es.js +1 -1
- package/dist/components/DataCodeSection.cjs.js +1 -1
- package/dist/components/DataCodeSection.es.js +1 -1
- package/dist/components/DataDetailsPanel.cjs.js +2 -2
- package/dist/components/DataDetailsPanel.es.js +2 -2
- package/dist/components/DataFilter.cjs.js +1 -1
- package/dist/components/DataFilter.es.js +1 -1
- package/dist/components/DataList.cjs.js +1 -1
- package/dist/components/DataList.es.js +1 -1
- package/dist/components/DataPanel.cjs.js +1 -1
- package/dist/components/DataPanel.es.js +1 -1
- package/dist/components/DateTimePicker.cjs.js +2 -2
- package/dist/components/DateTimePicker.es.js +2 -2
- package/dist/components/DateTimeRangePicker.cjs.js +1 -1
- package/dist/components/DateTimeRangePicker.es.js +1 -1
- package/dist/components/Dialog.cjs.js +1 -1
- package/dist/components/Dialog.es.js +1 -1
- package/dist/components/Drawer.cjs.js +1 -1
- package/dist/components/Drawer.es.js +1 -1
- package/dist/components/EnvironmentVariablesEditor.cjs.js +4 -4
- package/dist/components/EnvironmentVariablesEditor.es.js +4 -4
- package/dist/components/ErrorBoundary.cjs.js +1 -1
- package/dist/components/ErrorBoundary.es.js +1 -1
- package/dist/components/FormFieldBlocks.cjs.js +2 -2
- package/dist/components/FormFieldBlocks.es.js +2 -2
- package/dist/components/InputGroup.cjs.js +1 -1
- package/dist/components/InputGroup.es.js +1 -1
- package/dist/components/JSONSchemaForm.cjs.js +2 -2
- package/dist/components/JSONSchemaForm.es.js +2 -2
- package/dist/components/ListSearch.cjs.js +1 -1
- package/dist/components/ListSearch.es.js +1 -1
- package/dist/components/MainSidebar.cjs.js +1 -1
- package/dist/components/MainSidebar.es.js +1 -1
- package/dist/components/MarkdownRenderer.cjs.js +1 -1
- package/dist/components/MarkdownRenderer.es.js +1 -1
- package/dist/components/Notice.cjs.js +1 -1
- package/dist/components/Notice.es.js +1 -1
- package/dist/components/PrevNextNav.cjs.js +1 -1
- package/dist/components/PrevNextNav.es.js +1 -1
- package/dist/components/PropertyFilter.cjs.js +3 -3
- package/dist/components/PropertyFilter.es.js +4 -4
- package/dist/components/RuleBuilder.cjs.js +2 -2
- package/dist/components/RuleBuilder.es.js +2 -2
- package/dist/components/SankeyChart.cjs.js +362 -0
- package/dist/components/SankeyChart.cjs.js.map +1 -0
- package/dist/components/SankeyChart.d.ts +2 -0
- package/dist/components/SankeyChart.es.js +352 -0
- package/dist/components/SankeyChart.es.js.map +1 -0
- package/dist/components/Select.cjs.js +1 -1
- package/dist/components/Select.es.js +1 -1
- package/dist/components/SessionExpired.cjs.js +1 -1
- package/dist/components/SessionExpired.es.js +1 -1
- package/dist/components/SideDialog.cjs.js +3 -3
- package/dist/components/SideDialog.es.js +3 -3
- package/dist/components/ThreadList.cjs.js +1 -1
- package/dist/components/ThreadList.es.js +1 -1
- package/dist/components/Truncate.cjs.js +1 -1
- package/dist/components/Truncate.es.js +1 -1
- package/dist/components/ai/plan.cjs.js +2 -2
- package/dist/components/ai/plan.es.js +2 -2
- package/dist/{copy-button-B9UiSp_k.js → copy-button-BuIpvUI7.js} +2 -2
- package/dist/{copy-button-B9UiSp_k.js.map → copy-button-BuIpvUI7.js.map} +1 -1
- package/dist/{copy-button-D7DI90kl.cjs → copy-button-DNR760m7.cjs} +2 -2
- package/dist/{copy-button-D7DI90kl.cjs.map → copy-button-DNR760m7.cjs.map} +1 -1
- package/dist/{data-code-section-BymL4M80.js → data-code-section-Crs5wpnX.js} +5 -5
- package/dist/{data-code-section-BymL4M80.js.map → data-code-section-Crs5wpnX.js.map} +1 -1
- package/dist/{data-code-section-Dhn_-HdD.cjs → data-code-section-DYy_n9I1.cjs} +5 -5
- package/dist/{data-code-section-Dhn_-HdD.cjs.map → data-code-section-DYy_n9I1.cjs.map} +1 -1
- package/dist/{data-list-D3lasVFc.cjs → data-list-BwGRWaNd.cjs} +2 -2
- package/dist/{data-list-D3lasVFc.cjs.map → data-list-BwGRWaNd.cjs.map} +1 -1
- package/dist/{data-list-ca5n2iko.js → data-list-By3xmGvT.js} +2 -2
- package/dist/{data-list-ca5n2iko.js.map → data-list-By3xmGvT.js.map} +1 -1
- package/dist/{data-panel-S97UH5_k.cjs → data-panel-CAbxKoPF.cjs} +4 -4
- package/dist/data-panel-CAbxKoPF.cjs.map +1 -0
- package/dist/{data-panel-CjRyBoxZ.js → data-panel-Otc4qdKL.js} +4 -4
- package/dist/data-panel-Otc4qdKL.js.map +1 -0
- package/dist/{date-time-range-picker-5JfHiJet.cjs → date-time-range-picker-BRQx-ox5.cjs} +3 -3
- package/dist/{date-time-range-picker-5JfHiJet.cjs.map → date-time-range-picker-BRQx-ox5.cjs.map} +1 -1
- package/dist/{date-time-range-picker-CibaB1uJ.js → date-time-range-picker-Cw4Ac_rW.js} +3 -3
- package/dist/{date-time-range-picker-CibaB1uJ.js.map → date-time-range-picker-Cw4Ac_rW.js.map} +1 -1
- package/dist/{dialog-DRUb4qxs.js → dialog-DhjOHEDT.js} +2 -2
- package/dist/{dialog-DRUb4qxs.js.map → dialog-DhjOHEDT.js.map} +1 -1
- package/dist/{dialog-ChTWWV3D.cjs → dialog-XVpF4nQ5.cjs} +2 -2
- package/dist/{dialog-ChTWWV3D.cjs.map → dialog-XVpF4nQ5.cjs.map} +1 -1
- package/dist/domains/logs/components/log-details-view.cjs.js +2 -2
- package/dist/domains/logs/components/log-details-view.es.js +2 -2
- package/dist/domains/logs/components/logs-error-content.cjs.js +1 -1
- package/dist/domains/logs/components/logs-error-content.es.js +1 -1
- package/dist/domains/logs/components/logs-toolbar.cjs.js +1 -1
- package/dist/domains/logs/components/logs-toolbar.es.js +1 -1
- package/dist/domains/logs/components/no-logs-info.cjs.js +1 -1
- package/dist/domains/logs/components/no-logs-info.es.js +1 -1
- package/dist/domains/memory/components/flame-graph.cjs.js +1 -1
- package/dist/domains/memory/components/flame-graph.es.js +1 -1
- package/dist/domains/memory/components/memory-studio-panel.cjs.js +1 -1
- package/dist/domains/memory/components/memory-studio-panel.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/date-range-selector.cjs.js +1 -1
- package/dist/domains/metrics/components/date-range-selector.es.js +1 -1
- package/dist/domains/metrics/components/memory-card-view.cjs.js +1 -1
- package/dist/domains/metrics/components/memory-card-view.es.js +1 -1
- package/dist/domains/metrics/components/model-usage-cost-card-view.cjs.js +1 -1
- package/dist/domains/metrics/components/model-usage-cost-card-view.es.js +1 -1
- package/dist/domains/metrics/components/scores-card-view.cjs.js +1 -1
- package/dist/domains/metrics/components/scores-card-view.es.js +1 -1
- package/dist/domains/traces/components/no-traces-info.cjs.js +1 -1
- package/dist/domains/traces/components/no-traces-info.es.js +1 -1
- package/dist/domains/traces/components/span-data-panel-view.cjs.js +2 -2
- package/dist/domains/traces/components/span-data-panel-view.es.js +2 -2
- package/dist/domains/traces/components/trace-data-panel-view.cjs.js +3 -3
- package/dist/domains/traces/components/trace-data-panel-view.es.js +3 -3
- package/dist/domains/traces/components/traces-error-content.cjs.js +1 -1
- package/dist/domains/traces/components/traces-error-content.es.js +1 -1
- package/dist/domains/traces/components/traces-list-mode-toggle.cjs.js +1 -1
- package/dist/domains/traces/components/traces-list-mode-toggle.es.js +1 -1
- package/dist/domains/traces/components/traces-toolbar.cjs.js +1 -1
- package/dist/domains/traces/components/traces-toolbar.es.js +1 -1
- package/dist/{drawer-L7f8okAK.js → drawer-Djerm1Lo.js} +2 -2
- package/dist/{drawer-L7f8okAK.js.map → drawer-Djerm1Lo.js.map} +1 -1
- package/dist/{drawer-Bi8X9kfl.cjs → drawer-DtEZQBXj.cjs} +2 -2
- package/dist/{drawer-Bi8X9kfl.cjs.map → drawer-DtEZQBXj.cjs.map} +1 -1
- package/dist/ee/signals/components/signal-details-page.cjs.js +3 -3
- package/dist/ee/signals/components/signal-details-page.es.js +3 -3
- package/dist/ee/signals/components/signals-entity-filter.cjs.js +1 -1
- package/dist/ee/signals/components/signals-entity-filter.es.js +1 -1
- package/dist/ee/signals/components/signals-overview-page.cjs.js +1 -1
- package/dist/ee/signals/components/signals-overview-page.es.js +1 -1
- package/dist/ee/topics/components/topic-trace-summary-list.cjs.js +3 -3
- package/dist/ee/topics/components/topic-trace-summary-list.es.js +3 -3
- package/dist/{input-group-BsfrvWxb.js → input-group-DZnJcY3U.js} +2 -2
- package/dist/{input-group-BsfrvWxb.js.map → input-group-DZnJcY3U.js.map} +1 -1
- package/dist/{input-group-9m8t2boV.cjs → input-group-QaBen5tC.cjs} +2 -2
- package/dist/{input-group-9m8t2boV.cjs.map → input-group-QaBen5tC.cjs.map} +1 -1
- package/dist/{markdown-renderer-ODBuGR65.cjs → markdown-renderer-DRnUrMmF.cjs} +2 -2
- package/dist/{markdown-renderer-ODBuGR65.cjs.map → markdown-renderer-DRnUrMmF.cjs.map} +1 -1
- package/dist/{markdown-renderer-BTM2Vqkn.js → markdown-renderer-ZzJcwfS3.js} +2 -2
- package/dist/{markdown-renderer-BTM2Vqkn.js.map → markdown-renderer-ZzJcwfS3.js.map} +1 -1
- package/dist/{property-filter-applied-BSsIaf1P.cjs → property-filter-applied-BYKTDczo.cjs} +2 -2
- package/dist/{property-filter-applied-BSsIaf1P.cjs.map → property-filter-applied-BYKTDczo.cjs.map} +1 -1
- package/dist/{property-filter-applied-JbZXAmHn.js → property-filter-applied-Ca0UdU5P.js} +2 -2
- package/dist/{property-filter-applied-JbZXAmHn.js.map → property-filter-applied-Ca0UdU5P.js.map} +1 -1
- package/dist/resize/panel-drawer.cjs.js +1 -1
- package/dist/resize/panel-drawer.es.js +1 -1
- package/dist/{search-field-block-8flkI50d.cjs → search-field-block-C4njnmUx.cjs} +2 -2
- package/dist/{search-field-block-8flkI50d.cjs.map → search-field-block-C4njnmUx.cjs.map} +1 -1
- package/dist/{search-field-block-4aXXVtxT.js → search-field-block-e9qthuwY.js} +2 -2
- package/dist/{search-field-block-4aXXVtxT.js.map → search-field-block-e9qthuwY.js.map} +1 -1
- package/dist/{select-ATiWQ2g_.cjs → select-CUMnhTBS.cjs} +2 -2
- package/dist/{select-ATiWQ2g_.cjs.map → select-CUMnhTBS.cjs.map} +1 -1
- package/dist/{select-H-ACsLRO.js → select-LyQqK1ph.js} +2 -2
- package/dist/{select-H-ACsLRO.js.map → select-LyQqK1ph.js.map} +1 -1
- package/dist/{select-field-block-BKL9EVuJ.js → select-field-block-BWuqWh4k.js} +2 -2
- package/dist/{select-field-block-BKL9EVuJ.js.map → select-field-block-BWuqWh4k.js.map} +1 -1
- package/dist/{select-field-block-DyoOt9Eh.cjs → select-field-block-dq1ZmZVb.cjs} +2 -2
- package/dist/{select-field-block-DyoOt9Eh.cjs.map → select-field-block-dq1ZmZVb.cjs.map} +1 -1
- package/dist/src/ds/components/Composer/composer.d.ts +10 -0
- package/dist/src/ds/components/Composer/composer.stories.d.ts +8 -0
- package/dist/src/ds/components/Composer/index.d.ts +2 -0
- package/dist/src/ds/components/SankeyChart/index.d.ts +6 -0
- package/dist/src/ds/components/SankeyChart/sankey-chart-utils.d.ts +39 -0
- package/dist/src/ds/components/SankeyChart/sankey-chart.d.ts +8 -0
- package/dist/src/ds/components/SankeyChart/sankey-chart.stories.d.ts +9 -0
- package/dist/src/ds/components/SankeyChart/sankey-context.d.ts +29 -0
- package/dist/src/ds/components/SankeyChart/sankeyColor.d.ts +6 -0
- package/dist/style.css +61 -0
- package/dist/{time-picker-Bauf0dJP.js → time-picker-Dg78gQcJ.js} +2 -2
- package/dist/{time-picker-Bauf0dJP.js.map → time-picker-Dg78gQcJ.js.map} +1 -1
- package/dist/{time-picker-D272DZ2I.cjs → time-picker-kYaitcDa.cjs} +2 -2
- package/dist/{time-picker-D272DZ2I.cjs.map → time-picker-kYaitcDa.cjs.map} +1 -1
- package/package.json +9 -9
- package/dist/Button-5fzdHlD-.cjs.map +0 -1
- package/dist/Button-kvmCIDtU.js.map +0 -1
- package/dist/data-panel-CjRyBoxZ.js.map +0 -1
- package/dist/data-panel-S97UH5_k.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,133 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 41.1.0-alpha.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added a composable Sankey provider and chart with customizable controls through the `useSankey` hook, curve selection metadata, deterministic node colors, gradient ribbons, and connected hover feedback. ([#19472](https://github.com/mastra-ai/mastra/pull/19472))
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Added reusable Composer compound components for building controlled chat inputs. ([#19470](https://github.com/mastra-ai/mastra/pull/19470))
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`8a0d145`](https://github.com/mastra-ai/mastra/commit/8a0d145aadbdf7278665aceaaec364b35dd9bd94), [`bd2f1d2`](https://github.com/mastra-ai/mastra/commit/bd2f1d274d05e60e2366f005ea0d94d5cea0d5ff), [`21a0eb8`](https://github.com/mastra-ai/mastra/commit/21a0eb86746ba0b703acea360d4f84c6a5a493f2), [`de86fd7`](https://github.com/mastra-ai/mastra/commit/de86fd7119f0438381d1a642e3d258143c0b9c29), [`2fd1a51`](https://github.com/mastra-ai/mastra/commit/2fd1a510946ede90bd42de32c315f7586bfcfd20), [`2745031`](https://github.com/mastra-ai/mastra/commit/2745031d1d4a4978f037092da371428c32e2842a), [`db650ce`](https://github.com/mastra-ai/mastra/commit/db650ce490348914e85b93651d83acdf8f2a4c31), [`6354eeb`](https://github.com/mastra-ai/mastra/commit/6354eeb32efa9f5f68f51dda394e90e2ee76f1fb), [`21a0eb8`](https://github.com/mastra-ai/mastra/commit/21a0eb86746ba0b703acea360d4f84c6a5a493f2)]:
|
|
14
|
+
- @mastra/core@1.51.1-alpha.0
|
|
15
|
+
- @mastra/react@1.2.6-alpha.0
|
|
16
|
+
- @mastra/memory@1.23.1-alpha.0
|
|
17
|
+
- @mastra/client-js@1.32.1-alpha.0
|
|
18
|
+
|
|
19
|
+
## 41.0.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- Added a shared composable `Plan` component for rendering markdown plan previews with status, copy, action slots, and collapsed-content controls. ([#19155](https://github.com/mastra-ai/mastra/pull/19155))
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import {
|
|
27
|
+
Plan,
|
|
28
|
+
PlanBody,
|
|
29
|
+
PlanContent,
|
|
30
|
+
PlanControls,
|
|
31
|
+
PlanCopyButton,
|
|
32
|
+
PlanHeader,
|
|
33
|
+
PlanHeaderActions,
|
|
34
|
+
PlanIntro,
|
|
35
|
+
PlanLabel,
|
|
36
|
+
PlanMain,
|
|
37
|
+
PlanPath,
|
|
38
|
+
PlanTitle,
|
|
39
|
+
} from '@mastra/playground-ui/components/ai/plan';
|
|
40
|
+
|
|
41
|
+
<Plan>
|
|
42
|
+
<PlanHeader>
|
|
43
|
+
<PlanLabel />
|
|
44
|
+
<PlanHeaderActions>
|
|
45
|
+
<PlanCopyButton content={planMarkdown} />
|
|
46
|
+
</PlanHeaderActions>
|
|
47
|
+
</PlanHeader>
|
|
48
|
+
<PlanBody>
|
|
49
|
+
<PlanIntro>
|
|
50
|
+
<PlanTitle>Review migration plan</PlanTitle>
|
|
51
|
+
<PlanPath>/workspace/.mastracode/plans/migration.md</PlanPath>
|
|
52
|
+
</PlanIntro>
|
|
53
|
+
<PlanMain>
|
|
54
|
+
<PlanContent>{planMarkdown}</PlanContent>
|
|
55
|
+
<PlanControls />
|
|
56
|
+
</PlanMain>
|
|
57
|
+
</PlanBody>
|
|
58
|
+
</Plan>;
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- dependencies updates: ([#19150](https://github.com/mastra-ai/mastra/pull/19150))
|
|
64
|
+
- Updated dependency [`@codemirror/language@^6.12.4` ↗︎](https://www.npmjs.com/package/@codemirror/language/v/6.12.4) (from `^6.12.3`, in `dependencies`)
|
|
65
|
+
- Updated dependency [`@codemirror/search@^6.7.1` ↗︎](https://www.npmjs.com/package/@codemirror/search/v/6.7.1) (from `^6.7.0`, in `dependencies`)
|
|
66
|
+
- Updated dependency [`@codemirror/state@^6.7.1` ↗︎](https://www.npmjs.com/package/@codemirror/state/v/6.7.1) (from `^6.6.0`, in `dependencies`)
|
|
67
|
+
- Updated dependency [`@codemirror/view@^6.43.5` ↗︎](https://www.npmjs.com/package/@codemirror/view/v/6.43.5) (from `^6.43.1`, in `dependencies`)
|
|
68
|
+
|
|
69
|
+
- dependencies updates: ([#19205](https://github.com/mastra-ai/mastra/pull/19205))
|
|
70
|
+
- Updated dependency [`@codemirror/view@^6.43.6` ↗︎](https://www.npmjs.com/package/@codemirror/view/v/6.43.6) (from `^6.43.5`, in `dependencies`)
|
|
71
|
+
|
|
72
|
+
- Add a paste hint to `EnvironmentVariablesEditor` letting users know they can paste a whole `.env` into any field. The hint renders bottom-right by default (hidden in read-only mode, opt out via `hidePasteHint`) and is also exposed as the composable `EnvironmentVariablesEditor.PasteHint` part for custom placement/copy. ([#19061](https://github.com/mastra-ai/mastra/pull/19061))
|
|
73
|
+
|
|
74
|
+
- Improved Tailwind utility consistency across Playground UI components. ([#19318](https://github.com/mastra-ai/mastra/pull/19318))
|
|
75
|
+
|
|
76
|
+
- Added PROVIDER_TOOL_CALL span type rendering so provider-executed tool spans display with a distinct label and color in Studio traces. ([#19261](https://github.com/mastra-ai/mastra/pull/19261))
|
|
77
|
+
|
|
78
|
+
- Improved command dialogs with accessible labels and keyboard wrapping. ([#19229](https://github.com/mastra-ai/mastra/pull/19229))
|
|
79
|
+
|
|
80
|
+
- Fixed scorer data table usability: Score column is now always visible without horizontal scrolling, columns can be shown or hidden via a Columns toggle, and a scrollbar now appears at both the top and bottom of the table ([#19055](https://github.com/mastra-ai/mastra/pull/19055))
|
|
81
|
+
|
|
82
|
+
- Improved side panel resizing so programmatic layout changes animate smoothly and respect reduced-motion preferences. ([#19337](https://github.com/mastra-ai/mastra/pull/19337))
|
|
83
|
+
|
|
84
|
+
- Fixed data panel content so it scrolls correctly inside constrained layouts. ([#19419](https://github.com/mastra-ai/mastra/pull/19419))
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [[`bd6d240`](https://github.com/mastra-ai/mastra/commit/bd6d2402db93dddaef0721667e7e8a030e7c6e16), [`0111486`](https://github.com/mastra-ai/mastra/commit/01114867612593eef5cfa2fda6a1194dfedda841), [`96a3749`](https://github.com/mastra-ai/mastra/commit/96a37492235f5b8076b3e3177d83ed5a5e44a640), [`fe1bda0`](https://github.com/mastra-ai/mastra/commit/fe1bda06f6af92a694a51712db747cda1e7185f0), [`25e7c12`](https://github.com/mastra-ai/mastra/commit/25e7c126a770069ae7fb7ecf1d2adb40e017b009), [`1ce5121`](https://github.com/mastra-ai/mastra/commit/1ce512155d122bb21f47d98383e82ffbf84b39e8), [`fb8aea3`](https://github.com/mastra-ai/mastra/commit/fb8aea384291e77311be3a64ee1717320d5c3c73), [`4adc391`](https://github.com/mastra-ai/mastra/commit/4adc3911075249c352bb4832d2471922826344de), [`a5c6337`](https://github.com/mastra-ai/mastra/commit/a5c6337d23c7686c81a32ce62f550f610543a240), [`031931a`](https://github.com/mastra-ai/mastra/commit/031931a715405fb90759b1903c9c25cbf05994af), [`3cfc47a`](https://github.com/mastra-ai/mastra/commit/3cfc47a6b89940aadd0f46fb01ae9624a73a865d), [`2bb7817`](https://github.com/mastra-ai/mastra/commit/2bb78176112fde628483de2830528f7eee911e56), [`e2d5f37`](https://github.com/mastra-ai/mastra/commit/e2d5f373bd289be534d5f8694d34465010533df6), [`51d9870`](https://github.com/mastra-ai/mastra/commit/51d987032c689c2855374d0f244f5d654da809d1), [`5cab274`](https://github.com/mastra-ai/mastra/commit/5cab2744250e22d12fefa7b32637dce224233cee), [`7fa27d3`](https://github.com/mastra-ai/mastra/commit/7fa27d3b6f5ed68cd34e454a4d3ad9c482a0cfbc), [`8b97958`](https://github.com/mastra-ai/mastra/commit/8b979589f9aa59ba67cac565949475f2ffeb4ac3), [`8410541`](https://github.com/mastra-ai/mastra/commit/84105412c60ecd3bb33a9838146f59c4b588228f), [`a58dcbb`](https://github.com/mastra-ai/mastra/commit/a58dcbb546d7e1d65ebdc1f39e55f0908fcd9391), [`aa38805`](https://github.com/mastra-ai/mastra/commit/aa38805b878b827403be785eb90688d7172f5a40), [`fd13f8e`](https://github.com/mastra-ai/mastra/commit/fd13f8e21990f9904c3eedba3a626bb4a929cdb8), [`153bd3b`](https://github.com/mastra-ai/mastra/commit/153bd3b396bdfed6b74cf43de12db8fd2d83c04a), [`45a8e65`](https://github.com/mastra-ai/mastra/commit/45a8e65e1556d1362cb3f25187023c36de26661d), [`e955965`](https://github.com/mastra-ai/mastra/commit/e955965dce575a903e37cf054d28ea99aa48785e), [`7bf8550`](https://github.com/mastra-ai/mastra/commit/7bf8550aec81984fe16e1a77825ecf0318e27ec1), [`2d22570`](https://github.com/mastra-ai/mastra/commit/2d22570c7dfdd02123d0ecc529efb05ccba2d9fc), [`07bb863`](https://github.com/mastra-ai/mastra/commit/07bb8631919c6f7cf377dccd45b096e0f17fbed0), [`c8ed116`](https://github.com/mastra-ai/mastra/commit/c8ed11699f62bcac70102ab4ec84d80d20541da6), [`01b338c`](https://github.com/mastra-ai/mastra/commit/01b338c56271f0219606710e3e8b26dee27ac6c2), [`aac3e5a`](https://github.com/mastra-ai/mastra/commit/aac3e5a098b08077c7d5020d782d6353b217797c), [`a99eae8`](https://github.com/mastra-ai/mastra/commit/a99eae8908e500c1b2d12f9d277be616b98617a5), [`860ef7e`](https://github.com/mastra-ai/mastra/commit/860ef7e77d92b63469cbe5857aa1e626197e43e9), [`17e818c`](https://github.com/mastra-ai/mastra/commit/17e818c51a958ba90641b1a959dc38faf8c034e9), [`edce8d2`](https://github.com/mastra-ai/mastra/commit/edce8d2769f19e27a05737c627af2d765472a4f8), [`8a586ec`](https://github.com/mastra-ai/mastra/commit/8a586eca9a4914f31dff6140d0d45ac375b00669), [`4451dfe`](https://github.com/mastra-ai/mastra/commit/4451dfe857428e7abcc0261a507a2e186dae6d47), [`8b7361d`](https://github.com/mastra-ai/mastra/commit/8b7361d35de68b80d05d30a74e0c69e7218fd612), [`1d39058`](https://github.com/mastra-ai/mastra/commit/1d39058e548efd691799985d5c8af2737f1c3bd2), [`3927473`](https://github.com/mastra-ai/mastra/commit/392747323ddb10c643d12be7b9ae913159dfaeed), [`25e7c12`](https://github.com/mastra-ai/mastra/commit/25e7c126a770069ae7fb7ecf1d2adb40e017b009), [`dce50dc`](https://github.com/mastra-ai/mastra/commit/dce50dc9a1c1fcd0f427bb5f6250ec74910cb04b), [`02c2bd9`](https://github.com/mastra-ai/mastra/commit/02c2bd906b145ab806287712e1796d92bfc32c2a), [`fd13f8e`](https://github.com/mastra-ai/mastra/commit/fd13f8e21990f9904c3eedba3a626bb4a929cdb8), [`634caff`](https://github.com/mastra-ai/mastra/commit/634caff29a9200ad058b67d53f96d9e5832fb8a2), [`f703f87`](https://github.com/mastra-ai/mastra/commit/f703f878de072d51fda557f9c50867d8252bef05), [`3e26c87`](https://github.com/mastra-ai/mastra/commit/3e26c87de0c5bc2583b795ce6ca5889b6b161acb), [`33f2b88`](https://github.com/mastra-ai/mastra/commit/33f2b88842c09a567f906fac4cb61cd5277ced59), [`177010f`](https://github.com/mastra-ai/mastra/commit/177010ff096d2e4b28d89803be5b1a4cad2a0d6b), [`0ad646f`](https://github.com/mastra-ai/mastra/commit/0ad646f71a530f2454664299e5e01bfd13fa12e5), [`b486abf`](https://github.com/mastra-ai/mastra/commit/b486abfa2a7528c6f527e4015c819ea9fa54aaad), [`54a51e0`](https://github.com/mastra-ai/mastra/commit/54a51e0a484fe1ebad3fb1f7ef5282a075709eb7), [`c43f3a9`](https://github.com/mastra-ai/mastra/commit/c43f3a9d1efde99b38789364ba4d0ba670f430e3), [`a5008f2`](https://github.com/mastra-ai/mastra/commit/a5008f22ae710ad9402ea9f2547d8c02f74d384b), [`e2d5f37`](https://github.com/mastra-ai/mastra/commit/e2d5f373bd289be534d5f8694d34465010533df6), [`1b6e676`](https://github.com/mastra-ai/mastra/commit/1b6e67613c2a019df5920d4273d79bed09555807), [`25e7c12`](https://github.com/mastra-ai/mastra/commit/25e7c126a770069ae7fb7ecf1d2adb40e017b009), [`4ce0163`](https://github.com/mastra-ai/mastra/commit/4ce0163dc86e675a86809685c8ce6c49f1aeb87e), [`4378341`](https://github.com/mastra-ai/mastra/commit/43783412df5ea3dd35f5b1f6e4851e79c346fc89)]:
|
|
87
|
+
- @mastra/core@1.51.0
|
|
88
|
+
- @mastra/memory@1.23.0
|
|
89
|
+
- @mastra/client-js@1.32.0
|
|
90
|
+
- @mastra/react@1.2.5
|
|
91
|
+
|
|
92
|
+
## 41.0.0-alpha.13
|
|
93
|
+
|
|
94
|
+
### Patch Changes
|
|
95
|
+
|
|
96
|
+
- Updated dependencies [[`fd13f8e`](https://github.com/mastra-ai/mastra/commit/fd13f8e21990f9904c3eedba3a626bb4a929cdb8), [`a99eae8`](https://github.com/mastra-ai/mastra/commit/a99eae8908e500c1b2d12f9d277be616b98617a5), [`fd13f8e`](https://github.com/mastra-ai/mastra/commit/fd13f8e21990f9904c3eedba3a626bb4a929cdb8), [`f703f87`](https://github.com/mastra-ai/mastra/commit/f703f878de072d51fda557f9c50867d8252bef05), [`0ad646f`](https://github.com/mastra-ai/mastra/commit/0ad646f71a530f2454664299e5e01bfd13fa12e5)]:
|
|
97
|
+
- @mastra/client-js@1.32.0-alpha.13
|
|
98
|
+
- @mastra/core@1.51.0-alpha.13
|
|
99
|
+
- @mastra/react@1.2.5-alpha.13
|
|
100
|
+
|
|
101
|
+
## 41.0.0-alpha.12
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [[`aa38805`](https://github.com/mastra-ai/mastra/commit/aa38805b878b827403be785eb90688d7172f5a40), [`2d22570`](https://github.com/mastra-ai/mastra/commit/2d22570c7dfdd02123d0ecc529efb05ccba2d9fc), [`4378341`](https://github.com/mastra-ai/mastra/commit/43783412df5ea3dd35f5b1f6e4851e79c346fc89)]:
|
|
106
|
+
- @mastra/core@1.51.0-alpha.12
|
|
107
|
+
- @mastra/client-js@1.32.0-alpha.12
|
|
108
|
+
- @mastra/react@1.2.5-alpha.12
|
|
109
|
+
|
|
110
|
+
## 41.0.0-alpha.11
|
|
111
|
+
|
|
112
|
+
### Patch Changes
|
|
113
|
+
|
|
114
|
+
- Fixed data panel content so it scrolls correctly inside constrained layouts. ([#19419](https://github.com/mastra-ai/mastra/pull/19419))
|
|
115
|
+
|
|
116
|
+
- Updated dependencies [[`45a8e65`](https://github.com/mastra-ai/mastra/commit/45a8e65e1556d1362cb3f25187023c36de26661d), [`7bf8550`](https://github.com/mastra-ai/mastra/commit/7bf8550aec81984fe16e1a77825ecf0318e27ec1), [`c8ed116`](https://github.com/mastra-ai/mastra/commit/c8ed11699f62bcac70102ab4ec84d80d20541da6), [`33f2b88`](https://github.com/mastra-ai/mastra/commit/33f2b88842c09a567f906fac4cb61cd5277ced59)]:
|
|
117
|
+
- @mastra/core@1.51.0-alpha.11
|
|
118
|
+
- @mastra/react@1.2.5-alpha.11
|
|
119
|
+
- @mastra/client-js@1.32.0-alpha.11
|
|
120
|
+
|
|
121
|
+
## 41.0.0-alpha.10
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- Updated dependencies [[`4adc391`](https://github.com/mastra-ai/mastra/commit/4adc3911075249c352bb4832d2471922826344de), [`b486abf`](https://github.com/mastra-ai/mastra/commit/b486abfa2a7528c6f527e4015c819ea9fa54aaad)]:
|
|
126
|
+
- @mastra/core@1.51.0-alpha.10
|
|
127
|
+
- @mastra/client-js@1.32.0-alpha.10
|
|
128
|
+
- @mastra/memory@1.23.0-alpha.4
|
|
129
|
+
- @mastra/react@1.2.5-alpha.10
|
|
130
|
+
|
|
3
131
|
## 41.0.0-alpha.9
|
|
4
132
|
|
|
5
133
|
### Patch Changes
|
|
@@ -11,23 +11,23 @@ const utils_cn = require('./cn-vA5sWo9W.cjs');
|
|
|
11
11
|
|
|
12
12
|
const TEXT_MODE_ADORNMENTS = utils_cn.cn(
|
|
13
13
|
"gap-[.75em] rounded-full",
|
|
14
|
-
"[&>svg]:
|
|
15
|
-
"[
|
|
14
|
+
"[&>svg]:mx-[-.3em] [&>svg]:size-[1.1em]",
|
|
15
|
+
"[&:hover>svg]:opacity-100 [&>svg]:opacity-50"
|
|
16
16
|
);
|
|
17
17
|
const buttonVariants = index.cva(
|
|
18
18
|
utils_cn.cn(
|
|
19
|
-
"inline-flex items-center justify-center leading-0
|
|
20
|
-
"transition-all
|
|
19
|
+
"inline-flex cursor-pointer items-center justify-center leading-0",
|
|
20
|
+
"duration-normal transition-all ease-out-custom",
|
|
21
21
|
primitives_formElement.sharedFormElementDisabledStyle,
|
|
22
22
|
primitives_formElement.controlFocusBorderVisible
|
|
23
23
|
),
|
|
24
24
|
{
|
|
25
25
|
variants: {
|
|
26
26
|
variant: {
|
|
27
|
-
default: "
|
|
28
|
-
primary: "bg-neutral6
|
|
29
|
-
ghost: "
|
|
30
|
-
outline: "
|
|
27
|
+
default: "border border-border2 bg-surface3 text-neutral6 hover:bg-surface5 hover:text-neutral6 active:bg-surface6",
|
|
28
|
+
primary: "border border-transparent bg-neutral6 font-medium text-surface1 hover:bg-neutral6/90 active:bg-neutral6/80",
|
|
29
|
+
ghost: "border border-transparent bg-transparent text-neutral4 hover:bg-neutral6/5 hover:text-neutral6 active:bg-neutral6/10",
|
|
30
|
+
outline: "border border-border1 bg-transparent text-neutral5 hover:bg-surface3 hover:text-neutral6 active:bg-surface4"
|
|
31
31
|
},
|
|
32
32
|
size: {
|
|
33
33
|
xs: utils_cn.cn(primitives_controlSize.controlSizeClasses.xs, "px-[.8em]", TEXT_MODE_ADORNMENTS),
|
|
@@ -105,4 +105,4 @@ Button.displayName = "Button";
|
|
|
105
105
|
|
|
106
106
|
exports.Button = Button;
|
|
107
107
|
exports.buttonVariants = buttonVariants;
|
|
108
|
-
//# sourceMappingURL=Button-
|
|
108
|
+
//# sourceMappingURL=Button-B5RnKrGb.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button-B5RnKrGb.cjs","sources":["../src/ds/components/Button/Button.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\nimport React from 'react';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/ds/components/Tooltip';\nimport { Icon } from '@/ds/icons/Icon';\nimport { controlHeight, controlSizeClasses } from '@/ds/primitives/control-size';\nimport { controlFocusBorderVisible, sharedFormElementDisabledStyle } from '@/ds/primitives/form-element';\nimport { cn } from '@/lib/utils';\n\n// Adornments for text-mode buttons: gap between icon+label, larger radius, and SVG sizing for\n// inline `<svg>` children. Excluded from icon-mode because icon-mode wraps children in `<Icon>`\n// (so `[&>svg]` selectors don't match) and uses its own `rounded-full` (circle).\nconst TEXT_MODE_ADORNMENTS = cn(\n 'gap-[.75em] rounded-full',\n '[&>svg]:mx-[-.3em] [&>svg]:size-[1.1em]',\n '[&:hover>svg]:opacity-100 [&>svg]:opacity-50',\n);\n\n// eslint-disable-next-line react-refresh/only-export-components -- exported variant helper is part of Button's public API\nexport const buttonVariants = cva(\n cn(\n 'inline-flex cursor-pointer items-center justify-center leading-0',\n 'duration-normal transition-all ease-out-custom',\n sharedFormElementDisabledStyle,\n controlFocusBorderVisible,\n ),\n {\n variants: {\n variant: {\n default:\n 'border border-border2 bg-surface3 text-neutral6 hover:bg-surface5 hover:text-neutral6 active:bg-surface6',\n primary:\n 'border border-transparent bg-neutral6 font-medium text-surface1 hover:bg-neutral6/90 active:bg-neutral6/80',\n ghost:\n 'border border-transparent bg-transparent text-neutral4 hover:bg-neutral6/5 hover:text-neutral6 active:bg-neutral6/10',\n outline:\n 'border border-border1 bg-transparent text-neutral5 hover:bg-surface3 hover:text-neutral6 active:bg-surface4',\n },\n size: {\n xs: cn(controlSizeClasses.xs, 'px-[.8em]', TEXT_MODE_ADORNMENTS),\n sm: cn(controlSizeClasses.sm, 'px-[.9em]', TEXT_MODE_ADORNMENTS),\n md: cn(controlSizeClasses.md, 'px-[.9em]', TEXT_MODE_ADORNMENTS),\n lg: cn(controlSizeClasses.default, 'px-[1em]', TEXT_MODE_ADORNMENTS),\n // Icon sizes: square dimensions, fully rounded → circle. Active state inherits from variant\n // (e.g. `active:bg-surface5`) — same press feedback as text-mode for consistency.\n 'icon-xs': cn(controlHeight.xs, 'w-form-xs rounded-full'),\n 'icon-sm': cn(controlHeight.sm, 'w-form-sm rounded-full'),\n 'icon-md': cn(controlHeight.md, 'w-form-md rounded-full'),\n 'icon-lg': cn(controlHeight.lg, 'w-form-lg rounded-full'),\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n },\n);\n\n// Public types derived from cva — single source of truth. Adding a variant or size to\n// `buttonVariants` automatically updates these unions.\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\nexport type ButtonVariant = NonNullable<ButtonVariantsProps['variant']>;\nexport type ButtonSize = NonNullable<ButtonVariantsProps['size']>;\nexport type IconButtonSize = Extract<ButtonSize, `icon-${string}`>;\nexport type TextButtonSize = Exclude<ButtonSize, IconButtonSize>;\n\nexport interface ButtonProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, ButtonVariantsProps {\n as?: React.ElementType;\n className?: string;\n href?: string;\n to?: string;\n prefetch?: boolean | null;\n children: React.ReactNode;\n tooltip?: React.ReactNode;\n target?: string;\n type?: 'button' | 'submit' | 'reset';\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n}\n\n// Button's icon-* sizes don't match `<Icon>`'s own size scale (`sm | default | lg`).\nconst iconChildSizeMap: Record<IconButtonSize, 'sm' | 'default' | 'lg'> = {\n 'icon-xs': 'sm',\n 'icon-sm': 'sm',\n 'icon-md': 'default',\n 'icon-lg': 'lg',\n};\n\n// Walks React children, expanding `<></>` fragments so `isIconOnly` can inspect the real\n// elements inside. `<Button><><Icon/></></Button>` should still count as icon-only.\nfunction flattenChildren(children: React.ReactNode): React.ReactNode[] {\n const result: React.ReactNode[] = [];\n React.Children.forEach(children, child => {\n if (React.isValidElement<{ children?: React.ReactNode }>(child) && child.type === React.Fragment) {\n result.push(...flattenChildren(child.props.children));\n } else {\n result.push(child);\n }\n });\n return result;\n}\n\n// True when every child is a React element (no text/label). Used in text-mode to brighten the\n// SVG of label-less buttons so the glyph reads stronger.\nfunction isIconOnly(children: React.ReactNode): boolean {\n const flat = flattenChildren(children);\n return flat.length > 0 && flat.every(child => React.isValidElement(child));\n}\n\n// Type guard: narrows `ButtonSize` to `IconButtonSize` so consumers (e.g. `iconChildSizeMap`)\n// can index into icon-only structures without a cast.\nfunction isIconButtonSize(size: ButtonSize | null | undefined): size is IconButtonSize {\n return typeof size === 'string' && size.startsWith('icon-');\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n { className, as, size, variant = 'default', disabled, children, tooltip, 'aria-label': ariaLabelProp, ...props },\n ref,\n ) => {\n const Component = as || 'button';\n const iconMode = isIconButtonSize(size);\n const resolvedSize: ButtonSize = size ?? 'md';\n const isLabelless = !iconMode && isIconOnly(children);\n\n // Icon-only buttons need an a11y label. If a string tooltip is provided, reuse it.\n const ariaLabel = ariaLabelProp ?? ((iconMode || isLabelless) && typeof tooltip === 'string' ? tooltip : undefined);\n\n const content = iconMode ? <Icon size={iconChildSizeMap[size as IconButtonSize]}>{children}</Icon> : children;\n\n const button = (\n <Component\n ref={ref}\n disabled={disabled}\n aria-label={ariaLabel}\n // Expose the variant so a parent ButtonsGroup can detect FILLED segments in CSS\n // (filled buttons have an opaque background that hides a border seam, so the group\n // paints their divider as an inset box-shadow instead — see buttons-group.tsx).\n data-variant={variant}\n className={cn(buttonVariants({ variant, size: resolvedSize }), isLabelless && '[&>svg]:opacity-75', className)}\n {...props}\n >\n {content}\n </Component>\n );\n\n if (tooltip) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent>{tooltip}</TooltipContent>\n </Tooltip>\n );\n }\n\n return button;\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["cn","cva","sharedFormElementDisabledStyle","controlFocusBorderVisible","controlSizeClasses","controlHeight","tooltip","jsx","Icon","Tooltip","TooltipTrigger","TooltipContent"],"mappings":";;;;;;;;;;;AAYA,MAAM,oBAAA,GAAuBA,WAAA;AAAA,EAC3B,0BAAA;AAAA,EACA,yCAAA;AAAA,EACA;AACF,CAAA;AAGO,MAAM,cAAA,GAAiBC,SAAA;AAAA,EAC5BD,WAAA;AAAA,IACE,kEAAA;AAAA,IACA,gDAAA;AAAA,IACAE,qDAAA;AAAA,IACAC;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EACE,0GAAA;AAAA,QACF,OAAA,EACE,4GAAA;AAAA,QACF,KAAA,EACE,sHAAA;AAAA,QACF,OAAA,EACE;AAAA,OACJ;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAIH,WAAA,CAAGI,yCAAA,CAAmB,EAAA,EAAI,aAAa,oBAAoB,CAAA;AAAA,QAC/D,EAAA,EAAIJ,WAAA,CAAGI,yCAAA,CAAmB,EAAA,EAAI,aAAa,oBAAoB,CAAA;AAAA,QAC/D,EAAA,EAAIJ,WAAA,CAAGI,y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S,CAAA;AAAA,QAC5G,GAAG,KAAA;AAAA,QAEH,QAAA,EAAA;AAAA;AAAA,KACH;AAGF,IAAA,IAAIM,SAAA,EAAS;AACX,MAAA,uCACGG,eAAA,EAAA,EACC,QAAA,EAAA;AAAA,wBAAAF,cAAA,CAACG,sBAAA,EAAA,EAAe,OAAA,EAAO,IAAA,EAAE,QAAA,EAAA,MAAA,EAAO,CAAA;AAAA,wBAChCH,cAAA,CAACI,0BAAgB,QAAA,EAAAL,SAAA,EAAQ;AAAA,OAAA,EAC3B,CAAA;AAAA,IAEJ;AAEA,IAAA,OAAO,MAAA;AAAA,EACT;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;;"}
|
|
@@ -9,23 +9,23 @@ import { c as cn } from './cn-BakJzhuv.js';
|
|
|
9
9
|
|
|
10
10
|
const TEXT_MODE_ADORNMENTS = cn(
|
|
11
11
|
"gap-[.75em] rounded-full",
|
|
12
|
-
"[&>svg]:
|
|
13
|
-
"[
|
|
12
|
+
"[&>svg]:mx-[-.3em] [&>svg]:size-[1.1em]",
|
|
13
|
+
"[&:hover>svg]:opacity-100 [&>svg]:opacity-50"
|
|
14
14
|
);
|
|
15
15
|
const buttonVariants = cva(
|
|
16
16
|
cn(
|
|
17
|
-
"inline-flex items-center justify-center leading-0
|
|
18
|
-
"transition-all
|
|
17
|
+
"inline-flex cursor-pointer items-center justify-center leading-0",
|
|
18
|
+
"duration-normal transition-all ease-out-custom",
|
|
19
19
|
sharedFormElementDisabledStyle,
|
|
20
20
|
controlFocusBorderVisible
|
|
21
21
|
),
|
|
22
22
|
{
|
|
23
23
|
variants: {
|
|
24
24
|
variant: {
|
|
25
|
-
default: "
|
|
26
|
-
primary: "bg-neutral6
|
|
27
|
-
ghost: "
|
|
28
|
-
outline: "
|
|
25
|
+
default: "border border-border2 bg-surface3 text-neutral6 hover:bg-surface5 hover:text-neutral6 active:bg-surface6",
|
|
26
|
+
primary: "border border-transparent bg-neutral6 font-medium text-surface1 hover:bg-neutral6/90 active:bg-neutral6/80",
|
|
27
|
+
ghost: "border border-transparent bg-transparent text-neutral4 hover:bg-neutral6/5 hover:text-neutral6 active:bg-neutral6/10",
|
|
28
|
+
outline: "border border-border1 bg-transparent text-neutral5 hover:bg-surface3 hover:text-neutral6 active:bg-surface4"
|
|
29
29
|
},
|
|
30
30
|
size: {
|
|
31
31
|
xs: cn(controlSizeClasses.xs, "px-[.8em]", TEXT_MODE_ADORNMENTS),
|
|
@@ -102,4 +102,4 @@ const Button = React__default.forwardRef(
|
|
|
102
102
|
Button.displayName = "Button";
|
|
103
103
|
|
|
104
104
|
export { Button as B, buttonVariants as b };
|
|
105
|
-
//# sourceMappingURL=Button-
|
|
105
|
+
//# sourceMappingURL=Button-Dh5CZ6Ir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button-Dh5CZ6Ir.js","sources":["../src/ds/components/Button/Button.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\nimport React from 'react';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/ds/components/Tooltip';\nimport { Icon } from '@/ds/icons/Icon';\nimport { controlHeight, controlSizeClasses } from '@/ds/primitives/control-size';\nimport { controlFocusBorderVisible, sharedFormElementDisabledStyle } from '@/ds/primitives/form-element';\nimport { cn } from '@/lib/utils';\n\n// Adornments for text-mode buttons: gap between icon+label, larger radius, and SVG sizing for\n// inline `<svg>` children. Excluded from icon-mode because icon-mode wraps children in `<Icon>`\n// (so `[&>svg]` selectors don't match) and uses its own `rounded-full` (circle).\nconst TEXT_MODE_ADORNMENTS = cn(\n 'gap-[.75em] rounded-full',\n '[&>svg]:mx-[-.3em] [&>svg]:size-[1.1em]',\n '[&:hover>svg]:opacity-100 [&>svg]:opacity-50',\n);\n\n// eslint-disable-next-line react-refresh/only-export-components -- exported variant helper is part of Button's public API\nexport const buttonVariants = cva(\n cn(\n 'inline-flex cursor-pointer items-center justify-center leading-0',\n 'duration-normal transition-all ease-out-custom',\n sharedFormElementDisabledStyle,\n controlFocusBorderVisible,\n ),\n {\n variants: {\n variant: {\n default:\n 'border border-border2 bg-surface3 text-neutral6 hover:bg-surface5 hover:text-neutral6 active:bg-surface6',\n primary:\n 'border border-transparent bg-neutral6 font-medium text-surface1 hover:bg-neutral6/90 active:bg-neutral6/80',\n ghost:\n 'border border-transparent bg-transparent text-neutral4 hover:bg-neutral6/5 hover:text-neutral6 active:bg-neutral6/10',\n outline:\n 'border border-border1 bg-transparent text-neutral5 hover:bg-surface3 hover:text-neutral6 active:bg-surface4',\n },\n size: {\n xs: cn(controlSizeClasses.xs, 'px-[.8em]', TEXT_MODE_ADORNMENTS),\n sm: cn(controlSizeClasses.sm, 'px-[.9em]', TEXT_MODE_ADORNMENTS),\n md: cn(controlSizeClasses.md, 'px-[.9em]', TEXT_MODE_ADORNMENTS),\n lg: cn(controlSizeClasses.default, 'px-[1em]', TEXT_MODE_ADORNMENTS),\n // Icon sizes: square dimensions, fully rounded → circle. Active state inherits from variant\n // (e.g. `active:bg-surface5`) — same press feedback as text-mode for consistency.\n 'icon-xs': cn(controlHeight.xs, 'w-form-xs rounded-full'),\n 'icon-sm': cn(controlHeight.sm, 'w-form-sm rounded-full'),\n 'icon-md': cn(controlHeight.md, 'w-form-md rounded-full'),\n 'icon-lg': cn(controlHeight.lg, 'w-form-lg rounded-full'),\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n },\n);\n\n// Public types derived from cva — single source of truth. Adding a variant or size to\n// `buttonVariants` automatically updates these unions.\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\nexport type ButtonVariant = NonNullable<ButtonVariantsProps['variant']>;\nexport type ButtonSize = NonNullable<ButtonVariantsProps['size']>;\nexport type IconButtonSize = Extract<ButtonSize, `icon-${string}`>;\nexport type TextButtonSize = Exclude<ButtonSize, IconButtonSize>;\n\nexport interface ButtonProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, ButtonVariantsProps {\n as?: React.ElementType;\n className?: string;\n href?: string;\n to?: string;\n prefetch?: boolean | null;\n children: React.ReactNode;\n tooltip?: React.ReactNode;\n target?: string;\n type?: 'button' | 'submit' | 'reset';\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n}\n\n// Button's icon-* sizes don't match `<Icon>`'s own size scale (`sm | default | lg`).\nconst iconChildSizeMap: Record<IconButtonSize, 'sm' | 'default' | 'lg'> = {\n 'icon-xs': 'sm',\n 'icon-sm': 'sm',\n 'icon-md': 'default',\n 'icon-lg': 'lg',\n};\n\n// Walks React children, expanding `<></>` fragments so `isIconOnly` can inspect the real\n// elements inside. `<Button><><Icon/></></Button>` should still count as icon-only.\nfunction flattenChildren(children: React.ReactNode): React.ReactNode[] {\n const result: React.ReactNode[] = [];\n React.Children.forEach(children, child => {\n if (React.isValidElement<{ children?: React.ReactNode }>(child) && child.type === React.Fragment) {\n result.push(...flattenChildren(child.props.children));\n } else {\n result.push(child);\n }\n });\n return result;\n}\n\n// True when every child is a React element (no text/label). Used in text-mode to brighten the\n// SVG of label-less buttons so the glyph reads stronger.\nfunction isIconOnly(children: React.ReactNode): boolean {\n const flat = flattenChildren(children);\n return flat.length > 0 && flat.every(child => React.isValidElement(child));\n}\n\n// Type guard: narrows `ButtonSize` to `IconButtonSize` so consumers (e.g. `iconChildSizeMap`)\n// can index into icon-only structures without a cast.\nfunction isIconButtonSize(size: ButtonSize | null | undefined): size is IconButtonSize {\n return typeof size === 'string' && size.startsWith('icon-');\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n { className, as, size, variant = 'default', disabled, children, tooltip, 'aria-label': ariaLabelProp, ...props },\n ref,\n ) => {\n const Component = as || 'button';\n const iconMode = isIconButtonSize(size);\n const resolvedSize: ButtonSize = size ?? 'md';\n const isLabelless = !iconMode && isIconOnly(children);\n\n // Icon-only buttons need an a11y label. If a string tooltip is provided, reuse it.\n const ariaLabel = ariaLabelProp ?? ((iconMode || isLabelless) && typeof tooltip === 'string' ? tooltip : undefined);\n\n const content = iconMode ? <Icon size={iconChildSizeMap[size as IconButtonSize]}>{children}</Icon> : children;\n\n const button = (\n <Component\n ref={ref}\n disabled={disabled}\n aria-label={ariaLabel}\n // Expose the variant so a parent ButtonsGroup can detect FILLED segments in CSS\n // (filled buttons have an opaque background that hides a border seam, so the group\n // paints their divider as an inset box-shadow instead — see buttons-group.tsx).\n data-variant={variant}\n className={cn(buttonVariants({ variant, size: resolvedSize }), isLabelless && '[&>svg]:opacity-75', className)}\n {...props}\n >\n {content}\n </Component>\n );\n\n if (tooltip) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent>{tooltip}</TooltipContent>\n </Tooltip>\n );\n }\n\n return button;\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["React"],"mappings":";;;;;;;;;AAYA,MAAM,oBAAA,GAAuB,EAAA;AAAA,EAC3B,0BAAA;AAAA,EACA,yCAAA;AAAA,EACA;AACF,CAAA;AAGO,MAAM,cAAA,GAAiB,GAAA;AAAA,EAC5B,EAAA;AAAA,IACE,kEAAA;AAAA,IACA,gDAAA;AAAA,IACA,8BAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EACE,0GAAA;AAAA,QACF,OAAA,EACE,4GAAA;AAAA,QACF,KAAA,EACE,sHAAA;AAAA,QACF,OAAA,EACE;AAAA,OACJ;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,EAAA,CAAG,kBAAA,CAAmB,EAAA,EAAI,aAAa,oBAAoB,CAAA;AAAA,QAC/D,EAAA,EAAI,EAAA,CAAG,kBAAA,CAAmB,EAAA,EAAI,aAAa,oBAAoB,CAAA;AAAA,QAC/D,EAAA,EAAI,EAAA,CAAG,kBAAA,CAAmB,EAAA,EAAI,aAAa,oBAAoB,CAAA;AAAA,QAC/D,EAAA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IAAI,OAAA,EAAS;AACX,MAAA,4BACG,OAAA,EAAA,EACC,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,cAAA,EAAA,EAAe,OAAA,EAAO,IAAA,EAAE,QAAA,EAAA,MAAA,EAAO,CAAA;AAAA,wBAChC,GAAA,CAAC,kBAAgB,QAAA,EAAA,OAAA,EAAQ;AAAA,OAAA,EAC3B,CAAA;AAAA,IAEJ;AAEA,IAAA,OAAO,MAAA;AAAA,EACT;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@keyframes composer-sending {
|
|
2
|
+
0% {
|
|
3
|
+
transform: translate3d(0, 300%, 0);
|
|
4
|
+
opacity: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
15% {
|
|
8
|
+
opacity: 0.35;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
85% {
|
|
12
|
+
opacity: 0.35;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
100% {
|
|
16
|
+
transform: translate3d(0, -200%, 0);
|
|
17
|
+
opacity: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.composer-sending {
|
|
22
|
+
animation: composer-sending 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
23
|
+
will-change: transform, opacity;
|
|
24
|
+
backface-visibility: hidden;
|
|
25
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
const Button = require('./Button-
|
|
4
|
+
const Button = require('./Button-B5RnKrGb.cjs');
|
|
5
5
|
const utils_cn = require('./cn-vA5sWo9W.cjs');
|
|
6
6
|
const lucideReact = require('lucide-react');
|
|
7
7
|
|
|
@@ -88,4 +88,4 @@ const Notice = Object.assign(NoticeRoot, {
|
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
exports.Notice = Notice;
|
|
91
|
-
//# sourceMappingURL=Notice-
|
|
91
|
+
//# sourceMappingURL=Notice-WhHdy89l.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notice-
|
|
1
|
+
{"version":3,"file":"Notice-WhHdy89l.cjs","sources":["../src/ds/components/Notice/notice-button.tsx","../src/ds/components/Notice/notice-message.tsx","../src/ds/components/Notice/notice-root.tsx","../src/ds/components/Notice/Notice.tsx"],"sourcesContent":["import type { ButtonProps } from '../Button';\nimport { Button } from '../Button';\n\nexport function NoticeButton(props: ButtonProps) {\n return <Button size=\"sm\" variant=\"ghost\" {...props} />;\n}\n","import { cn } from '@/lib/utils';\n\nexport interface NoticeMessageProps {\n children: React.ReactNode;\n className?: string;\n}\n\nexport function NoticeMessage({ children, className }: NoticeMessageProps) {\n return <div className={cn('text-ui-md leading-ui-md', className)}>{children}</div>;\n}\n","import { FileTextIcon, InfoIcon, LightbulbIcon, OctagonAlertIcon, TriangleAlertIcon } from 'lucide-react';\nimport React from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type NoticeVariant = 'warning' | 'destructive' | 'success' | 'info' | 'note';\n\nconst variantConfig: Record<NoticeVariant, { icon: React.ReactNode; classes: string }> = {\n success: {\n icon: <LightbulbIcon />,\n classes: 'bg-notice-success/20 border-notice-success/20 text-notice-success-fg',\n },\n destructive: {\n icon: <OctagonAlertIcon />,\n classes: 'bg-notice-destructive/20 border-notice-destructive/20 text-notice-destructive-fg',\n },\n warning: {\n icon: <TriangleAlertIcon />,\n classes: 'bg-notice-warning/20 border-notice-warning/20 text-notice-warning-fg',\n },\n info: {\n icon: <InfoIcon />,\n classes: 'bg-notice-info/20 border-notice-info/20 text-notice-info-fg',\n },\n note: {\n icon: <FileTextIcon />,\n classes: 'bg-notice-note border-border1 text-notice-note-fg',\n },\n};\n\nexport interface NoticeRootProps {\n variant: NoticeVariant;\n title?: React.ReactNode;\n icon?: React.ReactNode;\n action?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function NoticeRoot({ variant, title, icon, action, children, className }: NoticeRootProps) {\n const { icon: defaultIcon, classes } = variantConfig[variant];\n const resolvedIcon = icon ?? defaultIcon;\n\n if (!title) {\n return (\n <div\n className={cn(\n '@container relative rounded-2xl border p-3 text-ui-md leading-ui-md',\n 'animate-in duration-200 fade-in-0 slide-in-from-top-2',\n classes,\n className,\n )}\n >\n <div className=\"flex flex-col gap-3 @md:flex-row @md:items-start @md:gap-2\">\n <div className=\"flex flex-1 items-start gap-2 [&>svg]:size-4\">\n <span className=\"flex h-[1lh] shrink-0 items-center [&>svg]:size-4\">{resolvedIcon}</span>\n {children && <div className=\"flex-1\">{children}</div>}\n </div>\n {action && <div className=\"@md:-my-1 [&>button]:w-full @md:[&>button]:w-auto\">{action}</div>}\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={cn(\n '@container relative flex flex-col gap-4 rounded-2xl border p-3',\n 'animate-in duration-200 fade-in-0 slide-in-from-top-2',\n classes,\n className,\n )}\n >\n <div className=\"flex h-4 items-center gap-2 [&>svg]:size-4\">\n {resolvedIcon}\n <span className=\"text-ui-sm leading-none font-medium tracking-wide uppercase\">{title}</span>\n </div>\n {action && <div className=\"absolute top-2 right-2 hidden @md:block\">{action}</div>}\n {(children || action) && (\n <div className=\"flex flex-col gap-5\">\n {children}\n {action && <div className=\"self-start @md:hidden\">{action}</div>}\n </div>\n )}\n </div>\n );\n}\n","import { NoticeButton } from './notice-button';\nimport { NoticeMessage } from './notice-message';\nimport { NoticeRoot } from './notice-root';\n\nexport { type NoticeVariant, type NoticeRootProps } from './notice-root';\nexport { type NoticeMessageProps } from './notice-message';\n\nexport const Notice = Object.assign(NoticeRoot, {\n Message: NoticeMessage,\n Button: NoticeButton,\n});\n"],"names":["Button","cn","LightbulbIcon","OctagonAlertIcon","TriangleAlertIcon","InfoIcon","FileTextIcon","jsx","jsxs"],"mappings":";;;;;;;AAGO,SAAS,aAAa,KAAA,EAAoB;AAC/C,E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A,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,yBAAyB,QAAA,EAAA,MAAA,EAAO;AAAA,SAAA,EAC5D;AAAA;AAAA;AAAA,GAEJ;AAEJ;;AC9EO,MAAM,MAAA,GAAS,MAAA,CAAO,MAAA,CAAO,UAAA,EAAY;AAAA,EAC9C,OAAA,EAAS,aAAA;AAAA,EACT,MAAA,EAAQ;AACV,CAAC;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { B as Button } from './Button-
|
|
2
|
+
import { B as Button } from './Button-Dh5CZ6Ir.js';
|
|
3
3
|
import { c as cn } from './cn-BakJzhuv.js';
|
|
4
4
|
import { FileTextIcon, InfoIcon, TriangleAlertIcon, OctagonAlertIcon, LightbulbIcon } from 'lucide-react';
|
|
5
5
|
|
|
@@ -86,4 +86,4 @@ const Notice = Object.assign(NoticeRoot, {
|
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
export { Notice as N };
|
|
89
|
-
//# sourceMappingURL=Notice-
|
|
89
|
+
//# sourceMappingURL=Notice-jmHNt3gS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notice-
|
|
1
|
+
{"version":3,"file":"Notice-jmHNt3gS.js","sources":["../src/ds/components/Notice/notice-button.tsx","../src/ds/components/Notice/notice-message.tsx","../src/ds/components/Notice/notice-root.tsx","../src/ds/components/Notice/Notice.tsx"],"sourcesContent":["import type { ButtonProps } from '../Button';\nimport { Button } from '../Button';\n\nexport function NoticeButton(props: ButtonProps) {\n return <Button size=\"sm\" variant=\"ghost\" {...props} />;\n}\n","import { cn } from '@/lib/utils';\n\nexport interface NoticeMessageProps {\n children: React.ReactNode;\n className?: string;\n}\n\nexport function NoticeMessage({ children, className }: NoticeMessageProps) {\n return <div className={cn('text-ui-md leading-ui-md', className)}>{children}</div>;\n}\n","import { FileTextIcon, InfoIcon, LightbulbIcon, OctagonAlertIcon, TriangleAlertIcon } from 'lucide-react';\nimport React from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type NoticeVariant = 'warning' | 'destructive' | 'success' | 'info' | 'note';\n\nconst variantConfig: Record<NoticeVariant, { icon: React.ReactNode; classes: string }> = {\n success: {\n icon: <LightbulbIcon />,\n classes: 'bg-notice-success/20 border-notice-success/20 text-notice-success-fg',\n },\n destructive: {\n icon: <OctagonAlertIcon />,\n classes: 'bg-notice-destructive/20 border-notice-destructive/20 text-notice-destructive-fg',\n },\n warning: {\n icon: <TriangleAlertIcon />,\n classes: 'bg-notice-warning/20 border-notice-warning/20 text-notice-warning-fg',\n },\n info: {\n icon: <InfoIcon />,\n classes: 'bg-notice-info/20 border-notice-info/20 text-notice-info-fg',\n },\n note: {\n icon: <FileTextIcon />,\n classes: 'bg-notice-note border-border1 text-notice-note-fg',\n },\n};\n\nexport interface NoticeRootProps {\n variant: NoticeVariant;\n title?: React.ReactNode;\n icon?: React.ReactNode;\n action?: React.ReactNode;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function NoticeRoot({ variant, title, icon, action, children, className }: NoticeRootProps) {\n const { icon: defaultIcon, classes } = variantConfig[variant];\n const resolvedIcon = icon ?? defaultIcon;\n\n if (!title) {\n return (\n <div\n className={cn(\n '@container relative rounded-2xl border p-3 text-ui-md leading-ui-md',\n 'animate-in duration-200 fade-in-0 slide-in-from-top-2',\n classes,\n className,\n )}\n >\n <div className=\"flex flex-col gap-3 @md:flex-row @md:items-start @md:gap-2\">\n <div className=\"flex flex-1 items-start gap-2 [&>svg]:size-4\">\n <span className=\"flex h-[1lh] shrink-0 items-center [&>svg]:size-4\">{resolvedIcon}</span>\n {children && <div className=\"flex-1\">{children}</div>}\n </div>\n {action && <div className=\"@md:-my-1 [&>button]:w-full @md:[&>button]:w-auto\">{action}</div>}\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={cn(\n '@container relative flex flex-col gap-4 rounded-2xl border p-3',\n 'animate-in duration-200 fade-in-0 slide-in-from-top-2',\n classes,\n className,\n )}\n >\n <div className=\"flex h-4 items-center gap-2 [&>svg]:size-4\">\n {resolvedIcon}\n <span className=\"text-ui-sm leading-none font-medium tracking-wide uppercase\">{title}</span>\n </div>\n {action && <div className=\"absolute top-2 right-2 hidden @md:block\">{action}</div>}\n {(children || action) && (\n <div className=\"flex flex-col gap-5\">\n {children}\n {action && <div className=\"self-start @md:hidden\">{action}</div>}\n </div>\n )}\n </div>\n );\n}\n","import { NoticeButton } from './notice-button';\nimport { NoticeMessage } from './notice-message';\nimport { NoticeRoot } from './notice-root';\n\nexport { type NoticeVariant, type NoticeRootProps } from './notice-root';\nexport { type NoticeMessageProps } from './notice-message';\n\nexport const Notice = Object.assign(NoticeRoot, {\n Message: NoticeMessage,\n Button: NoticeButton,\n});\n"],"names":[],"mappings":";;;;;AAGO,SAAS,aAAa,KAAA,EAAoB;AAC/C,EAAA,2BAAQ,MAAA,EAAA,EAAO,IAAA,EAAK,MAAK,OAAA,EAAQ,OAAA,EAAS,GAAG,KAAA,EAAO,CAAA;AACtD;;ACEO,SAAS,aAAA,CAAc,EAAE,QAAA,EAAU,SAAA,EAAU,EAAuB;AACzE,EAAA,2BAAQ,KAAA,EAAA,EAAI,SAAA,EAAW,GAAG,0BAAA,EAA4B,SAAS,GAAI,QAAA,EAAS,CAAA;AAC9E;;ACHA,MAAM,aAAA,GAAmF;AAAA,EACvF,OAAA,EAAS;AAAA,IACP,IAAA,sBAAO,aAAA,EAAA,EAAc,CAAA;AAAA,IACrB,OAAA,EAAS;AAAA,GACX;AAAA,EACA,WAAA,EAAa;AAAA,IACX,IAAA,sBAAO,gBAAA,EAAA,EAAiB,CAAA;AAAA,IACxB,OAAA,EAAS;AAAA,GACX;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,sBAAO,iBAAA,EAAA,EAAkB,CAAA;AAAA,IACzB,OAAA,EAAS;AAAA,GACX;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,IAAA,sBAAO,QAAA,EAAA,E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,OAAA;AAAA,QACA;AAAA,OACF;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,4CAAA,EACZ,QAAA,EAAA;AAAA,UAAA,YAAA;AAAA,0BACD,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,6DAAA,EAA+D,QAAA,EAAA,KAAA,EAAM;AAAA,SAAA,EACvF,CAAA;AAAA,QACC,MAAA,oBAAU,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,2CAA2C,QAAA,EAAA,MAAA,EAAO,CAAA;AAAA,QAAA,CAC1E,QAAA,IAAY,MAAA,qBACZ,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,qBAAA,EACZ,QAAA,EAAA;AAAA,UAAA,QAAA;AAAA,UACA,MAAA,oBAAU,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,yBAAyB,QAAA,EAAA,MAAA,EAAO;AAAA,SAAA,EAC5D;AAAA;AAAA;AAAA,GAEJ;AAEJ;;AC9EO,MAAM,MAAA,GAAS,MAAA,CAAO,MAAA,CAAO,UAAA,EAAY;AAAA,EAC9C,OAAA,EAAS,aAAA;AAAA,EACT,MAAA,EAAQ;AACV,CAAC;;;;"}
|
|
@@ -3,7 +3,7 @@ import { useMastraClient } from '@mastra/react';
|
|
|
3
3
|
import { LogIn } from 'lucide-react';
|
|
4
4
|
import { useState, useCallback } from 'react';
|
|
5
5
|
import { Icon } from './icons/Icon.es.js';
|
|
6
|
-
import { B as Button } from './Button-
|
|
6
|
+
import { B as Button } from './Button-Dh5CZ6Ir.js';
|
|
7
7
|
import { E as EmptyState } from './EmptyState-C0TShKF9.js';
|
|
8
8
|
|
|
9
9
|
function SessionExpired({ title, description, className }) {
|
|
@@ -42,4 +42,4 @@ function SessionExpired({ title, description, className }) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export { SessionExpired as S };
|
|
45
|
-
//# sourceMappingURL=SessionExpired-
|
|
45
|
+
//# sourceMappingURL=SessionExpired-C0PdcdCr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionExpired-
|
|
1
|
+
{"version":3,"file":"SessionExpired-C0PdcdCr.js","sources":["../src/ds/components/SessionExpired/SessionExpired.tsx"],"sourcesContent":["import { useMastraClient } from '@mastra/react';\nimport { LogIn } from 'lucide-react';\nimport { useState, useCallback } from 'react';\n\nimport { Icon } from '../../icons/Icon';\nimport { Button } from '../Button';\nimport { EmptyState } from '../EmptyState';\n\nexport interface SessionExpiredProps {\n /** Custom title override */\n title?: string;\n /** Custom description override */\n description?: string;\n /** Additional CSS classes */\n className?: string;\n}\n\nexport function SessionExpired({ title, description, className }: SessionExpiredProps) {\n const [isPending, setIsPending] = useState(false);\n const client = useMastraClient();\n\n const handleLogin = useCallback(async () => {\n try {\n setIsPending(true);\n const { baseUrl = '', apiPrefix } = (client as any).options || {};\n const raw = (apiPrefix || '/api').trim();\n const prefix = (raw.startsWith('/') ? raw : `/${raw}`).replace(/\\/$/, '');\n const params = new URLSearchParams({ redirect_uri: window.location.href });\n const url = `${baseUrl}${prefix}/auth/sso/login?${params}`;\n\n const response = await fetch(url, {\n credentials: 'include',\n headers: { 'Content-Type': 'application/json' },\n });\n\n if (response.ok) {\n const data = await response.json();\n window.location.href = data.url;\n }\n } finally {\n setIsPending(false);\n }\n }, [client]);\n\n return (\n <EmptyState\n className={className}\n iconSlot={\n <Icon size=\"lg\" className=\"text-neutral3\">\n <LogIn />\n </Icon>\n }\n titleSlot={title ?? 'Session Expired'}\n descriptionSlot={description ?? 'Your session has expired. Please log in again to continue.'}\n actionSlot={\n <Button variant=\"default\" onClick={handleLogin} disabled={isPending}>\n {isPending ? 'Redirecting...' : 'Log in'}\n </Button>\n }\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;;AAiBO,SAAS,cAAA,CAAe,EAAE,KAAA,EAAO,WAAA,EAAa,WAAU,EAAwB;AACrF,EAAA,MAAM,CAAC,SAA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A,EAAA,EAAK,IAAA,EAAK,MAAK,SAAA,EAAU,eAAA,EACxB,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,CAAA,EACT,CAAA;AAAA,MAEF,WAAW,KAAA,IAAS,iBAAA;AAAA,MACpB,iBAAiB,WAAA,IAAe,4DAAA;AAAA,MAChC,UAAA,kBACE,GAAA,CAAC,MAAA,EAAA,EAAO,OAAA,EAAQ,SAAA,EAAU,OAAA,EAAS,WAAA,EAAa,QAAA,EAAU,SAAA,EACvD,QAAA,EAAA,SAAA,GAAY,gBAAA,GAAmB,QAAA,EAClC;AAAA;AAAA,GAEJ;AAEJ;;;;"}
|
|
@@ -5,7 +5,7 @@ const react = require('@mastra/react');
|
|
|
5
5
|
const lucideReact = require('lucide-react');
|
|
6
6
|
const React = require('react');
|
|
7
7
|
const icons_Icon = require('./icons/Icon.cjs.js');
|
|
8
|
-
const Button = require('./Button-
|
|
8
|
+
const Button = require('./Button-B5RnKrGb.cjs');
|
|
9
9
|
const EmptyState = require('./EmptyState-CDPLdgbs.cjs');
|
|
10
10
|
|
|
11
11
|
function SessionExpired({ title, description, className }) {
|
|
@@ -44,4 +44,4 @@ function SessionExpired({ title, description, className }) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
exports.SessionExpired = SessionExpired;
|
|
47
|
-
//# sourceMappingURL=SessionExpired-
|
|
47
|
+
//# sourceMappingURL=SessionExpired-DEJgiQcL.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionExpired-
|
|
1
|
+
{"version":3,"file":"SessionExpired-DEJgiQcL.cjs","sources":["../src/ds/components/SessionExpired/SessionExpired.tsx"],"sourcesContent":["import { useMastraClient } from '@mastra/react';\nimport { LogIn } from 'lucide-react';\nimport { useState, useCallback } from 'react';\n\nimport { Icon } from '../../icons/Icon';\nimport { Button } from '../Button';\nimport { EmptyState } from '../EmptyState';\n\nexport interface SessionExpiredProps {\n /** Custom title override */\n title?: string;\n /** Custom description override */\n description?: string;\n /** Additional CSS classes */\n className?: string;\n}\n\nexport function SessionExpired({ title, description, className }: SessionExpiredProps) {\n const [isPending, setIsPending] = useState(false);\n const client = useMastraClient();\n\n const handleLogin = useCallback(async () => {\n try {\n setIsPending(true);\n const { baseUrl = '', apiPrefix } = (client as any).options || {};\n const raw = (apiPrefix || '/api').trim();\n const prefix = (raw.startsWith('/') ? raw : `/${raw}`).replace(/\\/$/, '');\n const params = new URLSearchParams({ redirect_uri: window.location.href });\n const url = `${baseUrl}${prefix}/auth/sso/login?${params}`;\n\n const response = await fetch(url, {\n credentials: 'include',\n headers: { 'Content-Type': 'application/json' },\n });\n\n if (response.ok) {\n const data = await response.json();\n window.location.href = data.url;\n }\n } finally {\n setIsPending(false);\n }\n }, [client]);\n\n return (\n <EmptyState\n className={className}\n iconSlot={\n <Icon size=\"lg\" className=\"text-neutral3\">\n <LogIn />\n </Icon>\n }\n titleSlot={title ?? 'Session Expired'}\n descriptionSlot={description ?? 'Your session has expired. Please log in again to continue.'}\n actionSlot={\n <Button variant=\"default\" onClick={handleLogin} disabled={isPending}>\n {isPending ? 'Redirecting...' : 'Log in'}\n </Button>\n }\n />\n );\n}\n"],"names":["useState","useMastraClient","useCallback","jsx","EmptyState","Icon","LogIn","Button"],"mappings":";;;;;;;;;;AAiBO,SAAS,cAAA,CAAe,EAAE,KAAA,EAAO,WAAA,EAAa,WAAU,EAAwB;AACrF,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAIA,eAAS,KAAK,CAAA;AAChD,EAAA,MAAM,SAASC,qBAAA,EAAgB;AAE/B,EAAA,MAAM,WAAA,GAAcC,kBAAY,YAAY;AAC1C,IAAA,IAAI;AACF,MAAA,YAAA,CAAa,IAAI,CAAA;AACjB,MAAA,MAAM,EAAE,OAAA,GAAU,EAAA,EAAI,WAAU,GAAK,MAAA,CAAe,WAAW,EAAC;AAChE,MAAA,MAAM,GAAA,GAAA,CAAO,SAAA,IAAa,MAAA,EAAQ,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vD,QAAA,EAAA,SAAA,GAAY,gBAAA,GAAmB,QAAA,EAClC;AAAA;AAAA,GAEJ;AAEJ;;;;"}
|
|
@@ -5,7 +5,7 @@ const combobox = require('@base-ui/react/combobox');
|
|
|
5
5
|
const lucideReact = require('lucide-react');
|
|
6
6
|
const React = require('react');
|
|
7
7
|
const index = require('./index-C-Lt4Bx_.cjs');
|
|
8
|
-
const Button = require('./Button-
|
|
8
|
+
const Button = require('./Button-B5RnKrGb.cjs');
|
|
9
9
|
const primitives_controlSize = require('./primitives/control-size.cjs.js');
|
|
10
10
|
const primitives_transitions = require('./primitives/transitions.cjs.js');
|
|
11
11
|
const utils_cn = require('./cn-vA5sWo9W.cjs');
|
|
@@ -242,4 +242,4 @@ function Combobox(props) {
|
|
|
242
242
|
|
|
243
243
|
exports.Combobox = Combobox;
|
|
244
244
|
exports.comboboxStyles = comboboxStyles;
|
|
245
|
-
//# sourceMappingURL=combobox-
|
|
245
|
+
//# sourceMappingURL=combobox-54Hywnf9.cjs.map
|