@bridge-ui/vue 0.15.0 → 0.16.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/ai/AGENTS.md +1 -1
- package/ai/README.md +1 -1
- package/ai/llms.txt +0 -1
- package/ai/skills/bridge-ui-components/SKILL.md +2 -1
- package/ai/skills/bridge-ui-setup/SKILL.md +8 -8
- package/dist/Actions/Snackbar/BridgeSnackbarItem.vue_vue_type_script_setup_true_lang.js +42 -44
- package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +1 -1
- package/dist/Adapters/index.d.ts +0 -1
- package/dist/Adapters/index.js +1 -2
- package/dist/Components/Accordion/composables/useAccordion.js +1 -1
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +248 -258
- package/dist/Components/Chart/Chart.js +5 -0
- package/dist/Components/Chart/Chart.vue.d.ts +14 -0
- package/dist/Components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/Components/Chart/chart.types.d.ts +126 -0
- package/dist/Components/Chart/chartInjectionKey.d.ts +94 -0
- package/dist/Components/Chart/chartInjectionKey.js +10 -0
- package/dist/Components/Chart/composables/useChart.d.ts +40 -0
- package/dist/Components/Chart/composables/useChart.js +344 -0
- package/dist/Components/Chart/echartsChart.d.ts +14 -0
- package/dist/Components/Chart/echartsChart.js +199 -0
- package/dist/Components/Chart/index.d.ts +4 -0
- package/dist/Components/Chart/index.js +4 -0
- package/dist/Components/ChartAxis/ChartAxis.js +5 -0
- package/dist/Components/ChartAxis/ChartAxis.vue.d.ts +7 -0
- package/dist/Components/ChartAxis/ChartAxis.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/Components/ChartAxis/chartAxis.types.d.ts +56 -0
- package/dist/Components/ChartAxis/composables/useChartAxis.d.ts +5 -0
- package/dist/Components/ChartAxis/composables/useChartAxis.js +28 -0
- package/dist/Components/ChartAxis/index.d.ts +3 -0
- package/dist/Components/ChartAxis/index.js +3 -0
- package/dist/Components/ChartLegend/ChartLegend.js +5 -0
- package/dist/Components/ChartLegend/ChartLegend.vue.d.ts +6 -0
- package/dist/Components/ChartLegend/ChartLegend.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/Components/ChartLegend/chartLegend.types.d.ts +71 -0
- package/dist/Components/ChartLegend/composables/useChartLegend.d.ts +16 -0
- package/dist/Components/ChartLegend/composables/useChartLegend.js +98 -0
- package/dist/Components/ChartLegend/index.d.ts +3 -0
- package/dist/Components/ChartLegend/index.js +3 -0
- package/dist/Components/ChartSeries/ChartSeries.js +5 -0
- package/dist/Components/ChartSeries/ChartSeries.vue.d.ts +4 -0
- package/dist/Components/ChartSeries/ChartSeries.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/Components/ChartSeries/chartSeries.types.d.ts +37 -0
- package/dist/Components/ChartSeries/composables/useChartSeries.d.ts +10 -0
- package/dist/Components/ChartSeries/composables/useChartSeries.js +29 -0
- package/dist/Components/ChartSeries/index.d.ts +3 -0
- package/dist/Components/ChartSeries/index.js +3 -0
- package/dist/Components/ChartTooltip/ChartTooltip.js +5 -0
- package/dist/Components/ChartTooltip/ChartTooltip.vue.d.ts +11 -0
- package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +82 -0
- package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +15 -0
- package/dist/Components/ChartTooltip/composables/useChartTooltip.js +110 -0
- package/dist/Components/ChartTooltip/index.d.ts +3 -0
- package/dist/Components/ChartTooltip/index.js +3 -0
- package/dist/Components/DataTable/DataTableCellContent.vue.d.ts +1 -5
- package/dist/Components/DataTable/DataTableCellContent.vue_vue_type_script_setup_true_lang.js +24 -25
- package/dist/Components/DataTable/composables/useDataTable.d.ts +1 -1
- package/dist/Components/DataTable/composables/useDataTable.js +76 -74
- package/dist/Components/DataTable/composables/useDataTablePagination.js +1 -1
- package/dist/Components/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/Components/Menu/Menu.vue_vue_type_script_setup_true_lang.js +5 -3
- package/dist/Components/Modal/Modal.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/Components/Pagination/composables/usePagination.js +1 -1
- package/dist/Components/RichTextEditor/RichTextEditor.vue.d.ts +1 -1
- package/dist/Components/RichTextEditor/RichTextEditor.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.d.ts +2 -2
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +67 -73
- package/dist/Components/RichTextEditor/richTextEditor.types.d.ts +1 -1
- package/dist/Components/RichTextEditor/tiptapEditor.d.ts +111 -0
- package/dist/Components/RichTextEditor/tiptapEditor.js +121 -0
- package/dist/Components/Select/composables/useSelect.js +147 -157
- package/dist/Components/Snackbar/Snackbar.vue.d.ts +1 -1
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +6 -7
- package/dist/Components/Stepper/composables/useStepper.js +1 -1
- package/dist/Components/Table/composables/useTableCell.d.ts +1 -1
- package/dist/Components/Tabs/composables/useTabs.js +1 -1
- package/dist/Components/ToggleGroup/composables/useToggleGroup.js +3 -3
- package/dist/Components/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +6 -4
- package/dist/augments.d.ts +19 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +180 -183
- package/dist/theme.css +1 -1
- package/docs/README.md +3 -3
- package/docs/components/BridgeUIProvider.md +0 -17
- package/docs/components/Chart.md +252 -0
- package/docs/components/RichTextEditor.md +2 -23
- package/package.json +27 -6
- package/dist/Adapters/RichText/index.d.ts +0 -1
- package/dist/Adapters/RichText/index.js +0 -2
- package/dist/Adapters/RichText/mockRichTextAdapter.d.ts +0 -5
- package/dist/Adapters/RichText/useRichTextAdapter.d.ts +0 -12
- package/dist/Adapters/RichText/useRichTextAdapter.js +0 -13
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Chart
|
|
2
|
+
|
|
3
|
+
Composable line, bar, and area charts. Bridge owns the legend, tooltip, tokens, dark mode, and a11y (summary, keyboard navigation, data table). The plot engine is ECharts.
|
|
4
|
+
|
|
5
|
+
Compose `Chart` with `ChartSeries`, `ChartAxis`, `ChartLegend`, and `ChartTooltip`.
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { Chart } from "@bridge-ui/vue/Components/Chart";
|
|
11
|
+
import { ChartAxis } from "@bridge-ui/vue/Components/ChartAxis";
|
|
12
|
+
import { ChartLegend } from "@bridge-ui/vue/Components/ChartLegend";
|
|
13
|
+
import { ChartSeries } from "@bridge-ui/vue/Components/ChartSeries";
|
|
14
|
+
import { ChartTooltip } from "@bridge-ui/vue/Components/ChartTooltip";
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Install `echarts` next to `@bridge-ui/vue` when you use `Chart`. The import is tree-shaken (line, bar, grid, SVG renderer). `Chart` stays off the `@bridge-ui/vue` root so apps that never import it do not load `echarts`.
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Usage
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"];
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<Chart :categories="months">
|
|
30
|
+
<ChartSeries name="Revenue" :data="[120, 180, 150, 220, 260, 240]" />
|
|
31
|
+
<ChartLegend />
|
|
32
|
+
<ChartTooltip />
|
|
33
|
+
</Chart>
|
|
34
|
+
</template>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Bar
|
|
38
|
+
|
|
39
|
+
```vue
|
|
40
|
+
<Chart :height="320" :categories="months">
|
|
41
|
+
<ChartSeries type="bar" name="Online" :data="online" />
|
|
42
|
+
<ChartSeries type="bar" name="Retail" :data="retail" />
|
|
43
|
+
<ChartLegend align="start" position="top" />
|
|
44
|
+
<ChartTooltip />
|
|
45
|
+
</Chart>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Area
|
|
49
|
+
|
|
50
|
+
```vue
|
|
51
|
+
<Chart :categories="months">
|
|
52
|
+
<ChartSeries type="area" curve="smooth" name="Visitors" :data="visitors" />
|
|
53
|
+
<ChartTooltip />
|
|
54
|
+
</Chart>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Mixed series
|
|
58
|
+
|
|
59
|
+
Bars and lines share the value axis.
|
|
60
|
+
|
|
61
|
+
```vue
|
|
62
|
+
<Chart :categories="months">
|
|
63
|
+
<ChartSeries type="bar" name="Orders" :data="orders" />
|
|
64
|
+
<ChartSeries name="Returns" :data="returns" />
|
|
65
|
+
<ChartLegend />
|
|
66
|
+
<ChartTooltip />
|
|
67
|
+
</Chart>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Gaps
|
|
71
|
+
|
|
72
|
+
`null` values leave a gap in lines and areas and are skipped in the tooltip.
|
|
73
|
+
|
|
74
|
+
```vue
|
|
75
|
+
<ChartSeries name="Costs" :data="[80, 90, null, 140, 150, 170]" />
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Axes
|
|
79
|
+
|
|
80
|
+
```vue
|
|
81
|
+
<Chart :categories="months">
|
|
82
|
+
<ChartSeries name="Revenue" :data="revenue" />
|
|
83
|
+
<ChartAxis position="x" label="Month" />
|
|
84
|
+
<ChartAxis :min="0" position="y" :format-tick="(value) => `$${value}`" />
|
|
85
|
+
</Chart>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`format-tick` receives the category on `x` and the value on `y`. Grid lines are on for `y` and off for `x` by default.
|
|
89
|
+
|
|
90
|
+
### Colors
|
|
91
|
+
|
|
92
|
+
Series take palette colors in order. Override the palette on `Chart`, or pass a token key or any CSS color to `ChartSeries`.
|
|
93
|
+
|
|
94
|
+
```vue
|
|
95
|
+
<Chart :categories="months" :palette="['info', 'warning']">
|
|
96
|
+
<ChartSeries name="Plan" :data="plan" />
|
|
97
|
+
<ChartSeries name="Actual" :data="actual" color="#8b5cf6" />
|
|
98
|
+
</Chart>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Token keys (`primary`, `info`, `success`, `warning`, `error`, `secondary`, `dark`, `black`) follow light and dark mode automatically.
|
|
102
|
+
|
|
103
|
+
### Legend
|
|
104
|
+
|
|
105
|
+
Legend entries are toggle buttons: click to hide or show a series, hover or focus to emphasize it.
|
|
106
|
+
|
|
107
|
+
```vue
|
|
108
|
+
<ChartLegend :interactive="false" />
|
|
109
|
+
<ChartLegend align="end" position="top" />
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Tooltip
|
|
113
|
+
|
|
114
|
+
```vue
|
|
115
|
+
<ChartTooltip :format-value="(value) => currency.format(value)" />
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
```vue
|
|
119
|
+
<ChartTooltip>
|
|
120
|
+
<template #content="{ category, items }">
|
|
121
|
+
<span>{{ category }}: {{ items.length }} series</span>
|
|
122
|
+
</template>
|
|
123
|
+
</ChartTooltip>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Loading and empty
|
|
127
|
+
|
|
128
|
+
```vue
|
|
129
|
+
<Chart :loading="isLoading" :categories="months">
|
|
130
|
+
<ChartSeries name="Revenue" :data="revenue" />
|
|
131
|
+
</Chart>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```vue
|
|
135
|
+
<Chart :categories="months">
|
|
136
|
+
<template #empty>No sales in this period</template>
|
|
137
|
+
</Chart>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Summary
|
|
141
|
+
|
|
142
|
+
`Chart` generates a text summary (series names and category range) for screen readers. Pass `summary` to describe the takeaway instead.
|
|
143
|
+
|
|
144
|
+
```vue
|
|
145
|
+
<Chart :categories="months" summary="Revenue doubled from January to June.">
|
|
146
|
+
<ChartSeries name="Revenue" :data="revenue" />
|
|
147
|
+
</Chart>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Registry defaults
|
|
151
|
+
|
|
152
|
+
```vue
|
|
153
|
+
<BridgeUIProvider
|
|
154
|
+
:components="{
|
|
155
|
+
ChartSeries: { defaultProps: { curve: 'smooth' } },
|
|
156
|
+
ChartLegend: { defaultProps: { position: 'top' } },
|
|
157
|
+
Chart: { defaultProps: { height: 320, palette: ['primary', 'success'] } },
|
|
158
|
+
}"
|
|
159
|
+
>
|
|
160
|
+
<App />
|
|
161
|
+
</BridgeUIProvider>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Theme tokens (`Chart.tokens.theme`) set the grid, axis, and label colors as Tailwind text-color classes:
|
|
165
|
+
|
|
166
|
+
```vue
|
|
167
|
+
<BridgeUIProvider
|
|
168
|
+
:components="{
|
|
169
|
+
Chart: { tokens: { theme: { grid: 'text-dark-100 dark:text-dark-800' } } },
|
|
170
|
+
}"
|
|
171
|
+
>
|
|
172
|
+
<App />
|
|
173
|
+
</BridgeUIProvider>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Accessibility
|
|
177
|
+
|
|
178
|
+
- The root is a `figure`; the plot is a focusable `img` labelled by `summary` (or the generated summary).
|
|
179
|
+
- Arrow keys move between categories, `Home` / `End` jump to the edges, `Escape` clears. The tooltip follows the keyboard, and the values are announced through a live region.
|
|
180
|
+
- A data table with every value is always rendered, visually hidden.
|
|
181
|
+
- The tooltip is decorative (`aria-hidden`); the same information is in the table and announcements.
|
|
182
|
+
- Engine animation is off under `prefers-reduced-motion`.
|
|
183
|
+
|
|
184
|
+
## Props (`Chart`)
|
|
185
|
+
|
|
186
|
+
| Prop | Type | Default | Description |
|
|
187
|
+
| ------------- | -------------------- | ------------------------ | --------------------------------------------------- |
|
|
188
|
+
| `animation` | `boolean` | `true` | Engine transitions (always off for reduced motion). |
|
|
189
|
+
| `categories` | `string[]` | required | Category labels; one value per category per series. |
|
|
190
|
+
| `classes` | `ChartClasses` | — | `root`, `plot`, `loading`, `empty`, `table`. |
|
|
191
|
+
| `height` | `number \| string` | `280` | Plot height. |
|
|
192
|
+
| `loading` | `boolean` | `false` | Shows the loading overlay. |
|
|
193
|
+
| `palette` | `ChartSeriesColor[]` | primary, info, success … | Series colors in order. |
|
|
194
|
+
| `size` | `ChartSize` | `"md"` | Density of labels, legend, and tooltip. |
|
|
195
|
+
| `summary` | `string` | generated | Accessible description of the plot. |
|
|
196
|
+
| `width` | `number \| string` | `"100%"` | Root width. |
|
|
197
|
+
| `customProps` | `ChartCustomProps` | — | Extra props for `root` and `plot`. |
|
|
198
|
+
|
|
199
|
+
### Slots (`Chart`)
|
|
200
|
+
|
|
201
|
+
| Slot | Description |
|
|
202
|
+
| --------- | ---------------------------------------------------------- |
|
|
203
|
+
| `default` | `ChartSeries`, `ChartAxis`, `ChartLegend`, `ChartTooltip`. |
|
|
204
|
+
| `empty` | Content shown when there is nothing to plot. |
|
|
205
|
+
| `loading` | Content shown while `loading` is true. |
|
|
206
|
+
|
|
207
|
+
## Props (`ChartSeries`)
|
|
208
|
+
|
|
209
|
+
| Prop | Type | Default | Description |
|
|
210
|
+
| ------- | --------------------------- | ---------- | ---------------------------------------- |
|
|
211
|
+
| `color` | `ChartSeriesColor` | palette | Token key or CSS color. |
|
|
212
|
+
| `curve` | `"linear" \| "smooth"` | `"linear"` | Line interpolation for `line` / `area`. |
|
|
213
|
+
| `data` | `(number \| null)[]` | required | One value per category; `null` is a gap. |
|
|
214
|
+
| `name` | `string` | required | Legend, tooltip, and table label. |
|
|
215
|
+
| `type` | `"line" \| "bar" \| "area"` | `"line"` | Series family. |
|
|
216
|
+
|
|
217
|
+
## Props (`ChartAxis`)
|
|
218
|
+
|
|
219
|
+
| Prop | Type | Default | Description |
|
|
220
|
+
| ------------ | ------------------------------------- | ----------------------------- | --------------------------------- |
|
|
221
|
+
| `formatTick` | `(value: number \| string) => string` | — | Tick label formatter. |
|
|
222
|
+
| `grid` | `boolean` | `true` on `y`, `false` on `x` | Grid lines. |
|
|
223
|
+
| `hidden` | `boolean` | `false` | Hides the axis line and labels. |
|
|
224
|
+
| `label` | `string` | — | Axis title. |
|
|
225
|
+
| `max` | `number` | auto | Value axis upper bound. |
|
|
226
|
+
| `min` | `number` | auto | Value axis lower bound. |
|
|
227
|
+
| `position` | `"x" \| "y"` | required | Categories (`x`) or values (`y`). |
|
|
228
|
+
| `tickCount` | `number` | auto | Preferred number of ticks. |
|
|
229
|
+
|
|
230
|
+
## Props (`ChartLegend`)
|
|
231
|
+
|
|
232
|
+
| Prop | Type | Default | Description |
|
|
233
|
+
| ------------- | ------------------------------ | ---------- | ------------------------------------------ |
|
|
234
|
+
| `align` | `"start" \| "center" \| "end"` | `"center"` | Horizontal alignment. |
|
|
235
|
+
| `classes` | `ChartLegendClasses` | — | `root`, `item`, `swatch`, `label`. |
|
|
236
|
+
| `interactive` | `boolean` | `true` | Entries toggle and emphasize their series. |
|
|
237
|
+
| `position` | `"top" \| "bottom"` | `"bottom"` | Above or below the plot. |
|
|
238
|
+
| `customProps` | `ChartLegendCustomProps` | — | Extra props for `root` and `item`. |
|
|
239
|
+
|
|
240
|
+
## Props (`ChartTooltip`)
|
|
241
|
+
|
|
242
|
+
| Prop | Type | Default | Description |
|
|
243
|
+
| ------------- | --------------------------------- | -------------------- | ---------------------------------------------------- |
|
|
244
|
+
| `classes` | `ChartTooltipClasses` | — | `root`, `title`, `item`, `swatch`, `label`, `value`. |
|
|
245
|
+
| `formatValue` | `(value: number, item) => string` | locale number format | Value formatter. |
|
|
246
|
+
| `customProps` | `ChartTooltipCustomProps` | — | Extra props for `root`. |
|
|
247
|
+
|
|
248
|
+
### Slots (`ChartTooltip`)
|
|
249
|
+
|
|
250
|
+
| Slot | Props | Description |
|
|
251
|
+
| --------- | ---------------------------- | ---------------------------- |
|
|
252
|
+
| `content` | `{ category, index, items }` | Replaces the title and rows. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RichTextEditor
|
|
2
2
|
|
|
3
|
-
Formatted text input with FormField chrome
|
|
3
|
+
Formatted text input with FormField chrome. Bridge owns the toolbar, tokens, and a11y. The document engine is TipTap.
|
|
4
4
|
|
|
5
5
|
Sanitize HTML before rendering it outside the editor — XSS prevention stays in the app.
|
|
6
6
|
|
|
@@ -10,28 +10,7 @@ Sanitize HTML before rendering it outside the editor — XSS prevention stays in
|
|
|
10
10
|
import { RichTextEditor } from "@bridge-ui/vue/Components/RichTextEditor";
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Provide `global.richText` on `BridgeUIProvider`. Ready adapter:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
import { BridgeUIProvider } from "@bridge-ui/vue";
|
|
19
|
-
import { createTiptapRichTextAdapter } from "@bridge-ui/adapters/vue/rich-text-tiptap";
|
|
20
|
-
|
|
21
|
-
const richText = createTiptapRichTextAdapter();
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
```vue
|
|
25
|
-
<BridgeUIProvider :global="{ richText }">
|
|
26
|
-
<App />
|
|
27
|
-
</BridgeUIProvider>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
| Adapter | Peer(s) | Notes |
|
|
31
|
-
| ------------------------------------------ | ------------------------------------------------------------------------------------ | ---------------- |
|
|
32
|
-
| `@bridge-ui/adapters/vue/rich-text-tiptap` | `@tiptap/core`, `@tiptap/pm`, `@tiptap/starter-kit`, `@tiptap/extension-placeholder` | ProseMirror JSON |
|
|
33
|
-
|
|
34
|
-
Custom engines can implement `RichTextEditorAdapter` and pass them via `global.richText`.
|
|
13
|
+
Install `@tiptap/core`, `@tiptap/pm`, `@tiptap/starter-kit`, and `@tiptap/extension-placeholder` next to `@bridge-ui/vue` when you use `RichTextEditor`.
|
|
35
14
|
|
|
36
15
|
## Examples
|
|
37
16
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.16.0",
|
|
5
5
|
"author": "BridgeUI",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"name": "@bridge-ui/vue",
|
|
@@ -54,10 +54,6 @@
|
|
|
54
54
|
"import": "./dist/Adapters/I18n/index.js",
|
|
55
55
|
"types": "./dist/Adapters/I18n/index.d.ts"
|
|
56
56
|
},
|
|
57
|
-
"./Adapters/RichText": {
|
|
58
|
-
"import": "./dist/Adapters/RichText/index.js",
|
|
59
|
-
"types": "./dist/Adapters/RichText/index.d.ts"
|
|
60
|
-
},
|
|
61
57
|
"./Actions": {
|
|
62
58
|
"import": "./dist/Actions/index.js",
|
|
63
59
|
"types": "./dist/Actions/index.d.ts"
|
|
@@ -85,15 +81,35 @@
|
|
|
85
81
|
],
|
|
86
82
|
"peerDependencies": {
|
|
87
83
|
"@tanstack/vue-table": "^9.2.0",
|
|
84
|
+
"@tiptap/core": "^3.0.0",
|
|
85
|
+
"@tiptap/extension-placeholder": "^3.0.0",
|
|
86
|
+
"@tiptap/pm": "^3.0.0",
|
|
87
|
+
"@tiptap/starter-kit": "^3.0.0",
|
|
88
|
+
"echarts": "^6.0.0",
|
|
88
89
|
"vue": "^3.4.0"
|
|
89
90
|
},
|
|
90
91
|
"peerDependenciesMeta": {
|
|
91
92
|
"@tanstack/vue-table": {
|
|
92
93
|
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"@tiptap/core": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"@tiptap/extension-placeholder": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"@tiptap/pm": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"@tiptap/starter-kit": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"echarts": {
|
|
108
|
+
"optional": true
|
|
93
109
|
}
|
|
94
110
|
},
|
|
95
111
|
"dependencies": {
|
|
96
|
-
"@bridge-ui/core": "^0.
|
|
112
|
+
"@bridge-ui/core": "^0.16.0",
|
|
97
113
|
"@tailwindcss/typography": "^0.5.20",
|
|
98
114
|
"clsx": "^2.1.1",
|
|
99
115
|
"es-toolkit": "^1.52.0",
|
|
@@ -114,9 +130,14 @@
|
|
|
114
130
|
"@tailwindcss/cli": "^4.3.3",
|
|
115
131
|
"@tailwindcss/vite": "^4.3.3",
|
|
116
132
|
"@tanstack/vue-table": "^9.2.4",
|
|
133
|
+
"@tiptap/core": "^3.31.3",
|
|
134
|
+
"@tiptap/extension-placeholder": "^3.31.3",
|
|
135
|
+
"@tiptap/pm": "^3.31.3",
|
|
136
|
+
"@tiptap/starter-kit": "^3.31.3",
|
|
117
137
|
"@types/node": "^26.6.2",
|
|
118
138
|
"@vue/language-core": "^3.3.11",
|
|
119
139
|
"@vue/test-utils": "^2.5.1",
|
|
140
|
+
"echarts": "^6.1.0",
|
|
120
141
|
"tailwindcss": "^4.3.3",
|
|
121
142
|
"typescript": "^6.0.3",
|
|
122
143
|
"vue": "^3.5.43",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { setRichTextAdapterForTests, useRichTextAdapter, } from './useRichTextAdapter';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ComputedRef } from 'vue';
|
|
2
|
-
import { RichTextEditorAdapter } from '@bridge-ui/core/Adapters';
|
|
3
|
-
/**
|
|
4
|
-
* Sets a process-wide rich-text adapter fallback. For tests only.
|
|
5
|
-
*/
|
|
6
|
-
export declare function setRichTextAdapterForTests(adapter: undefined | RichTextEditorAdapter): void;
|
|
7
|
-
/**
|
|
8
|
-
* Returns the active rich-text adapter from {@link BridgeUIProvider}.
|
|
9
|
-
* `RichTextEditor` requires `global.richText` (e.g.
|
|
10
|
-
* `@bridge-ui/adapters/vue/rich-text-tiptap`).
|
|
11
|
-
*/
|
|
12
|
-
export declare function useRichTextAdapter(): ComputedRef<undefined | RichTextEditorAdapter>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useBridgeUI as e } from "../../Provider/useBridgeUI.js";
|
|
2
|
-
import { computed as t } from "vue";
|
|
3
|
-
//#region src/Adapters/RichText/useRichTextAdapter.ts
|
|
4
|
-
var n;
|
|
5
|
-
function r(e) {
|
|
6
|
-
n = e;
|
|
7
|
-
}
|
|
8
|
-
function i() {
|
|
9
|
-
let r = e();
|
|
10
|
-
return t(() => r?.global.value.richText ?? n);
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { r as setRichTextAdapterForTests, i as useRichTextAdapter };
|