@khsura/sui-mcp 0.3.0 → 0.4.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/README.md +9 -2
- package/dist/index.js +485 -47
- package/dist/recipes/filter-bar.md +1 -0
- package/dist/recipes/responsive-grid.md +1 -0
- package/dist/recipes/responsive-grid.vue +10 -4
- package/dist/recipes/tabbed-sections.md +11 -0
- package/dist/recipes/tabbed-sections.vue +30 -0
- package/dist/recipes/theme-setup.md +1 -0
- package/dist/recipes/theme-setup.vue +2 -1
- package/dist/sui-api.json +1208 -235
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ The server sends these instructions when a client connects:
|
|
|
86
86
|
| `get_guide` | One setup guide as markdown: `installation` (Vue and Nuxt, styles, `@mdi/font`), `theming` (theme colors, dark mode), `component-defaults`, `display` (`useDisplay` breakpoints), `i18n`, `common-mistakes`. Unknown topics return an error with the topic list. |
|
|
87
87
|
| `validate_sui_template` | Checks a `.vue` SFC or bare template fragment against the API and the composition rules below. Returns a summary line, then `line:col [rule] message — fix: hint — recipe: name` per issue (the recipe part only when one applies). Issues are a normal result, not a tool error. |
|
|
88
88
|
| `list_recipes` | The tested, copy-ready recipes with when to use each. |
|
|
89
|
-
| `get_recipe` | One recipe: its notes, the full Vue SFC in a ```` ```vue ```` block and the link to its live Storybook story. Names: `app-shell`, `validated-form`, `activator-overlays`, `data-table`, `responsive-grid`, `theme-setup`, `filter-bar`, `centered-page`. Unknown names return an error with the name list. |
|
|
89
|
+
| `get_recipe` | One recipe: its notes, the full Vue SFC in a ```` ```vue ```` block and the link to its live Storybook story. Names: `app-shell`, `validated-form`, `activator-overlays`, `data-table`, `responsive-grid`, `theme-setup`, `filter-bar`, `centered-page`, `tabbed-sections`. Unknown names return an error with the name list. |
|
|
90
90
|
| `ping` | Health check. |
|
|
91
91
|
|
|
92
92
|
## Example prompts
|
|
@@ -113,16 +113,23 @@ The server sends these instructions when a client connects:
|
|
|
113
113
|
| `no-raw-replacement` | warning | Raw `<button>`, `<input>` (not `type="hidden"`), `<select>`, `<textarea>` or `<dialog>`, with the SUI component to use (`<input type="checkbox">` → SCheckbox, `radio` → SRadioGroup). | `validated-form`, `activator-overlays` for `<dialog>` |
|
|
114
114
|
| `native-validation-in-form` | warning | `type="email"`, `url` or `number` on an `S*` input inside an SForm without `novalidate`: the browser validates on submit and its bubble covers SUI's error text. The fix hint suggests `type="text" inputmode="email"` (or `novalidate` for numbers). Only before 1.20.0 (`fixedIn`). | `validated-form` |
|
|
115
115
|
| `hide-details-hides-label` | warning | `hide-details` on an SCheckbox that has a `label`: it hides the label too, so the checkbox shows no text. Use `hide-error`. Only before 1.20.0 (`fixedIn`). | `validated-form` |
|
|
116
|
+
| `hidden-label-no-visible-name` | warning | `hide-details` on a text field (SInput, SSelect, STextarea, SAutocomplete, SDatePickerInput) hides its `label` by design (it becomes the `aria-label`); warns when no placeholder, or one sharing no word with the label, says on screen what the field is for. | `filter-bar` |
|
|
116
117
|
| `snackbar-action-contrast` | warning | A `variant="text"` or `variant="icon"` SButton in an SSnackbar `#action` slot with a hex CSS `color` below 4.5:1 on the dark `#424242` snackbar (a CSS colour is used as is). Before 1.20.0 it also reports a `variant="text"` action with `color="primary"` (or `secondary`, `success`, `info`, `error`) and a text or icon action with no `color`, which kept the page's dark text colour there; from 1.20.0 an action without `color` takes the snackbar text colour and preset colours use a variant tuned to the snackbar. | `activator-overlays` |
|
|
117
118
|
| `block-buttons-in-row` | warning | Two or more `block` SButtons as siblings in a flex row (`s_display__flex` / `s_display--*__flex`, an inline `display: flex`, or SCardActions): `block` does not shrink, so later buttons are pushed off screen. | `responsive-grid` |
|
|
118
119
|
| `field-button-row` | warning | A text field (`SInput`, `SSelect`, `SDatePickerInput`, `SAutocomplete`, `STextarea`) without `hide-details` and an `SButton` as siblings in a flex row: the button lines up with the field's label, not its box. Use `SFormRow` (1.20.0+); recipe `filter-bar`. |
|
|
119
120
|
| `card-title-text-align` | warning | An `s_textAlign__*` class on SCardTitle, which is a flex container, so the class has no effect. The fix hint names the matching `s_justify__*` class. Only before 1.20.0 (`fixedIn`). | — |
|
|
120
121
|
| `date-picker-empty-string` | warning | An SDatePickerInput whose `v-model` / `:model-value` is `''`, or whose model starts as `''` in the SFC script (`x = ref('')`, `{ x: '' }`): the picker opens on "Invalid date". Start it as `null`. Only before 1.20.0 (`fixedIn`). | `validated-form` |
|
|
121
122
|
| `fill-height-under-app` | warning | `s_height--fill` on a direct child of `SApp`: before 1.20.0 it resolves to the content height (SApp only has a min-height), so a card centred inside it sticks to the top. Points to the `centered-page` recipe. Skipped from `@khsura/sui` 1.20.0, where that child grows to fill SApp. |
|
|
123
|
+
| `pagination-length-rows` | warning | `SPagination`'s `:length` bound to a row count (`items.length`, `totalItems`, `itemsCount`, …) with no division: `length` is the number of pages, so it would show one page per row. |
|
|
124
|
+
| `pagination-zero-based` | warning | `SPagination`'s `v-model` bound to a name ending in `index` (such as STable's `pageIndex`): SPagination's page starts at 1. |
|
|
125
|
+
| `skeleton-loader-unknown-preset` | error | A static `SSkeletonLoader` `type` with a preset SUI does not have (Vuetify's `paragraph`, `sentences`, `list-item-two-line`, …, or `text*3` instead of `text@3`): the part is ignored. The hint names the SUI preset to use. |
|
|
126
|
+
| `skeleton-loader-never-hides` | warning | `SSkeletonLoader` with a bound `:loading` but no content inside: with nothing to swap in, the skeleton stays on screen after loading ends. |
|
|
127
|
+
| `tabs-in-slide-group` | warning | `STabs` with an `SSlideGroup` ancestor: STabs already scrolls its own row, with an edge fade (or `wrap` for several rows), so the wrapper only adds a second scroller. | `tabbed-sections` |
|
|
128
|
+
| `row-inset-from-text` | warning | An `SRow` beside a native heading or paragraph (or `SBreadcrumbs`), directly or through an `SForm` / `<form>`, without `no-outer-gutters` + `gap` (or `no-gutters`): the row and its columns pad by 8px each, so the grid starts 16px inside the text. Siblings with their own horizontal padding / margin class are skipped. | `responsive-grid` |
|
|
122
129
|
|
|
123
130
|
Rules for behaviours that a component fix removed carry a `fixedIn` version: the engine skips them when the resolved `sui-api.json` version is that version or newer, so a project on an older `@khsura/sui` still gets the warning. A `version` that is not semver keeps every rule on.
|
|
124
131
|
|
|
125
|
-
Recipe names are stable (`app-shell`, `validated-form`, `activator-overlays`, `data-table`, `responsive-grid`, `theme-setup`, `filter-bar`, `centered-page`); `get_recipe` serves the recipes under these names.
|
|
132
|
+
Recipe names are stable (`app-shell`, `validated-form`, `activator-overlays`, `data-table`, `responsive-grid`, `theme-setup`, `filter-bar`, `centered-page`, `tabbed-sections`); `get_recipe` serves the recipes under these names.
|
|
126
133
|
|
|
127
134
|
Future work: a `table-structure` rule (STable column keys and `item.<column>` slot names, per `packages/app/docs/components/table.md`) is waiting on complete STable slot data in `sui-api.json`.
|
|
128
135
|
|