@smartsoft001/claude-plugins 2.202.0 → 2.204.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.
Files changed (22) hide show
  1. package/package.json +1 -1
  2. package/plugins/smart-angular/.claude-plugin/plugin.json +1 -1
  3. package/plugins/smart-angular/skills/angular-components-details/SKILL.md +32 -4
  4. package/plugins/smart-angular/skills/angular-components-input/SKILL.md +24 -16
  5. package/plugins/smart-angular/skills/angular-components-list/SKILL.md +79 -36
  6. package/plugins/smart-angular/skills/angular-components-modal/SKILL.md +81 -13
  7. package/plugins/smart-angular/skills/angular-components-notification/SKILL.md +51 -1
  8. package/plugins/smart-angular/skills/angular-components-page/SKILL.md +7 -5
  9. package/plugins/smart-angular/skills/angular-components-vertical-navigation/SKILL.md +3 -3
  10. package/plugins/smart-angular/skills/smart-crud/SKILL.md +5 -2
  11. package/plugins/smart-core/.claude-plugin/plugin.json +1 -1
  12. package/plugins/smart-react/.claude-plugin/plugin.json +1 -1
  13. package/plugins/smart-react/skills/react-components-details/SKILL.md +6 -6
  14. package/plugins/smart-react/skills/react-components-input/SKILL.md +10 -0
  15. package/plugins/smart-react/skills/react-components-list/SKILL.md +66 -33
  16. package/plugins/smart-react/skills/react-components-modal/SKILL.md +24 -12
  17. package/plugins/smart-react/skills/react-components-notification/SKILL.md +1 -1
  18. package/plugins/smart-react/skills/react-components-overlays/SKILL.md +15 -14
  19. package/plugins/smart-react/skills/react-components-page/SKILL.md +5 -5
  20. package/plugins/smart-react/skills/react-components-vertical-navigation/SKILL.md +3 -3
  21. package/plugins/smart-react/skills/react-provider/SKILL.md +1 -1
  22. package/plugins/smart-react/skills/smart-crud-react/SKILL.md +2 -2
@@ -30,26 +30,27 @@ All from `@smartsoft001/react`.
30
30
 
31
31
  ### `ToastService` (`useToastService()`)
32
32
 
33
- | Member | What it does |
34
- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
35
- | `info(options: IToastOptions): Promise<void>` | Queues an info toast. |
36
- | `error(options: IToastOptions): Promise<void>` | Queues an error toast (`aria-live="assertive"`), unless an error lock is held. |
37
- | `dismiss(id: number): void` | Removes a toast. |
38
- | `addLockError()` / `removeLockError()` | Holds / releases the error lock: while held, error toasts are swallowed (e.g. during a sign-out that makes pending requests fail). |
39
- | `toasts: SmartStore<IToast[]>` | The queue the host renders. |
33
+ | Member | What it does |
34
+ | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35
+ | `info(options: IToastOptions): Promise<void>` | Queues an info toast (`aria-live="polite"`). |
36
+ | `error(options: IToastOptions): Promise<void>` | Queues an error toast (`aria-live="assertive"`), unless an error lock is held. |
37
+ | `dismiss(id: number): void` | Removes a toast. |
38
+ | `addLockError()` / `removeLockError()` | Holds / releases an error lock (the count never goes below zero): while one is held, error toasts are swallowed (e.g. during a sign-out that makes pending requests fail). |
39
+ | `toasts: SmartStore<IToast[]>` | The queue the host renders. |
40
40
 
41
41
  ```ts
42
42
  interface IToastOptions {
43
43
  title?: string;
44
44
  message: string;
45
- /** Milliseconds before the toast closes itself (default 2000). */
45
+ /** Milliseconds before the toast closes itself; 2000 when missing, zero or negative. */
46
46
  duration?: number;
47
- // { text: string; position: 'start' | 'end'; handler: () => void }; the host renders them as actions, ignoring `position`
47
+ // { text: string; position: 'start' | 'end'; handler: () => void }; the host renders them as actions in the given order
48
+ // (`position` is kept for compatibility); a click runs `handler`, then closes the toast
48
49
  buttons?: Array<IToastButton>;
49
50
  }
50
51
  ```
51
52
 
52
- A toast with a title shows the title as the heading and the message under it; without one, the message is the heading. A toast with buttons renders in the `condensed` notification variant and its buttons as actions.
53
+ A toast with a title shows the title as the heading and the message under it; without one, the message is the heading. Its buttons are the notification's actions: a click runs the button's handler, then closes the toast. A toast without buttons renders in the `simple` notification variant, a message with buttons in `condensed`, and a title with a message and buttons in `with-actions-below`, which keeps the message under the title. A toast closes itself after its duration and on its close button.
53
54
 
54
55
  ### `AlertService` (`useAlertService()`)
55
56
 
@@ -67,9 +68,9 @@ A toast with a title shows the title as the heading and the message under it; wi
67
68
  interface IModalServiceOptions {
68
69
  component: ComponentType<any>; // receives `props` and a `dismiss(data)` prop
69
70
  props?: Record<string, unknown>;
70
- mode?: 'default' | 'bottom'; // not read by SmartModalHost
71
+ mode?: 'default' | 'bottom'; // 'bottom': the bottom-sheet variant, plus the smart-modal-bottom class
71
72
  cssClass?: string[]; // joined into the SmartModal className
72
- backdropDismiss?: boolean; // not read by SmartModalHost
73
+ backdropDismiss?: boolean; // false: the backdrop and Escape leave it open
73
74
  }
74
75
 
75
76
  interface IModal {
@@ -78,7 +79,7 @@ interface IModal {
78
79
  }
79
80
  ```
80
81
 
81
- `SmartModalHost` renders each request as `<SmartModal open className={cssClass.join(' ')} onClosed={() => dismiss()}>` around `<component {...props} dismiss={dismiss} />`, so closing the modal by its own controls resolves `onDidDismiss()` with `{ data: null }`.
82
+ `SmartModalHost` renders each request in a `<div data-role="modal" data-mode={mode}>` as `<SmartModal open className options={{ withDismiss: true }} onClosed={() => dismiss()}>` around `<component {...props} dismiss={dismiss} />`, its `className` being `cssClass` plus `smart-modal-bottom` for `mode: 'bottom'`, and its `options` adding `variant: 'bottom-sheet'` for that mode. So every modal shows its close button, and closing the modal by its own controls (close button, backdrop, Escape) resolves `onDidDismiss()` with `{ data: null }`. The modals stack in opening order, the last one on top. With `backdropDismiss: false` a click on the backdrop (outside the `role="dialog"` element) is stopped before the modal sees it, and `ModalService` stops Escape at the document while that modal is on top; the close button and `dismiss()` still close it. `mode: 'bottom'` is a bottom sheet: both `SmartModalStandard` and `SmartModalPreset` dock the `bottom-sheet` variant to the bottom of the viewport, full width up to a max width, with a max height and a scrolling body (see `react-components-modal`); the backdrop, Escape and close button behave as in the other variants. `smart-modal-bottom` stays on the modal for an application's own styling.
82
83
 
83
84
  ## Usage
84
85
 
@@ -172,7 +173,7 @@ A host renders nothing during server-side rendering and until it has mounted, th
172
173
 
173
174
  ## Styling
174
175
 
175
- - The toast stack is fixed to the bottom of the screen (centred, right-aligned from `sm`), with each toast `max-w-sm`.
176
+ - The toast stack is fixed to the bottom of the screen (centred, right-aligned from `sm`) above the modals (`z-[100]`), with each toast `max-w-sm` and its type in `data-type` (`error` or `info`).
176
177
  - Looks come from the registered `notification` / `alert` / `modal` implementations, with their dark-mode variants.
177
178
 
178
179
  ## File Locations
@@ -45,10 +45,10 @@ Extends `SmartPageVariantProps`.
45
45
 
46
46
  The props of a page variant (what `<SmartPage>` hands to the resolved component): the options, with `bodyTpl` already merged with the wrapper's children, and the CSS class.
47
47
 
48
- | Prop | Type | Default | Description |
49
- | ------------ | ---------------------- | ------- | ----------------------------------------------------------------------------- |
50
- | `options?` | `IPageOptions \| null` | — | The page options, with `bodyTpl` already set from `children`. |
51
- | `className?` | `string` | — | Classes of the page root (the standard rendering has no root and ignores it). |
48
+ | Prop | Type | Default | Description |
49
+ | ------------ | ---------------------- | ------- | ------------------------------------------------------------- |
50
+ | `options?` | `IPageOptions \| null` | — | The page options, with `bodyTpl` already set from `children`. |
51
+ | `className?` | `string` | — | Classes of the page root (`data-role="page"`). |
52
52
 
53
53
  ### `IPageOptions`
54
54
 
@@ -208,7 +208,7 @@ function usePage();
208
208
 
209
209
  ## Styling
210
210
 
211
- - `SmartPageStandard` renders no wrapper element (header and body are siblings) and does not apply `className`.
211
+ - `SmartPageStandard` renders the header and the body in one root element (`data-role="page"`) and puts `className` on it.
212
212
  - `SmartPagePreset` appends `className` to its root and renders a gray page body with the content in a card, with `smart:dark:` variants.
213
213
 
214
214
  ## File Locations
@@ -27,7 +27,7 @@ All from `@smartsoft001/react`.
27
27
  | `SmartVerticalNavigationStandard` | component | The default vertical navigation rendering. |
28
28
  | `useVerticalNavigation` | hook | The behaviour every vertical navigation variant shares: `options.items` normalised into a first, untitled group followed by `options.groups`, and the item click. |
29
29
 
30
- The preset's class helpers (`getVerticalNavContainerClasses`, `getVerticalNavNavClasses`, `getVerticalNavGroupTitleClasses`, `getVerticalNavItemClasses`, `getVerticalNavIconClasses`, `getVerticalNavInitialClasses`, `getVerticalNavBadgeClasses`) are exported too, for a custom implementation that wants the preset look.
30
+ The preset's class helpers (`getVerticalNavContainerClasses` for the `<nav>`, `getVerticalNavNavClasses` for a group's list, `getVerticalNavListItemClasses`, `getVerticalNavGroupTitleClasses`, `getVerticalNavItemClasses`, `getVerticalNavIconClasses`, `getVerticalNavInitialClasses`, `getVerticalNavBadgeClasses`) are exported too, for a custom implementation that wants the preset look.
31
31
 
32
32
  ## Props and Types
33
33
 
@@ -44,7 +44,7 @@ The preset's class helpers (`getVerticalNavContainerClasses`, `getVerticalNavNav
44
44
  | Field | Type | Default | Description |
45
45
  | ------------ | ------------------------ | ----------- | ----------------------------------------------------------------------------------------------------- |
46
46
  | `layout?` | `SmartVerticalNavLayout` | — | Not read by the built-in implementations (standard and preset); available to a custom implementation. |
47
- | `ariaLabel?` | `string` | `'Sidebar'` | Accessible name of the `nav`. |
47
+ | `ariaLabel?` | `string` | `'Sidebar'` | Accessible name of the one `nav` landmark (the groups are lists named by their title). |
48
48
  | `items?` | `IVerticalNavItem[]` | — | The first, untitled group. |
49
49
  | `groups?` | `IVerticalNavGroup[]` | — | Further groups, each with a title. |
50
50
 
@@ -198,7 +198,7 @@ export function PlainVerticalNav(props: SmartVerticalNavigationProps) {
198
198
 
199
199
  ## Styling
200
200
 
201
- - The standard rendering is unstyled; the preset renders every group as its own `<nav>` after its title, with `smart:dark:` variants.
201
+ - Both renderings put every group in one `<nav>` landmark (named by `options.ariaLabel`, `'Sidebar'` by default); a group is a list (`role="list"`) of its items, named by its title through `aria-labelledby`. The standard rendering is unstyled; the preset renders the vertical tabs, each group's title before its list, with `smart:dark:` variants.
202
202
 
203
203
  ## File Locations
204
204
 
@@ -84,7 +84,7 @@ The provider creates its services **once** and keeps them for its lifetime. Pass
84
84
  | `authInterceptor` | `boolean` | `true` | Adds the bearer token to the default HTTP client's requests. |
85
85
  | `storageService`, `authService`, `toastService`, `alertService`, `modalService`, `menuService`, `appService` | the service classes | created by the provider | Services of your own (e.g. subclasses). |
86
86
  | `modelLabelProvider` | `IModelLabelProvider \| null` | `null` | Field labels from code. |
87
- | `modelPossibilitiesProvider` | `IModelPossibilitiesProvider \| null` | `null` | Options of `enum` / `radio` / `check` / `strings` fields from code. |
87
+ | `modelPossibilitiesProvider` | `IModelPossibilitiesProvider \| null` | `null` | Options of `radio` / `check` fields and of the preset `enum` field, from code. |
88
88
  | `modelValidatorsProvider` | `IModelValidatorsProvider \| null` | `null` | Validators of model fields from code (`react-forms`). |
89
89
  | `modelExportProvider`, `modelImportProvider`, `appProvider` | provider interfaces | `null` | Held in the context (`useSmart()`) for components of your own; no library component reads them. |
90
90
  | `children` | `ReactNode` | — | The application. |
@@ -53,14 +53,14 @@ Enough for the store, the facade and components of your own.
53
53
  | Field | Type | What it does |
54
54
  | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
55
55
  | `title` | `string` | Required. The list page heading (translated). |
56
- | `details` | `boolean \| { cellPipe?: ICellPipe<T>; components?: { top?; bottom? } }` | Rows link to the item page, which opens read-only with `SmartDetails`; `components` render above / below the details. |
56
+ | `details` | `boolean \| { cellPipe?: ICellPipe<T>; components?: { top?; bottom? } }` | Rows link to the item page, which opens read-only with `SmartDetails`, and get a details action that opens the record in a modal (`SmartDetailsPage`); `components` render above / below the details. |
57
57
  | `edit` | `boolean \| { cellPipe?; components?: { top?; bottom? } }` | A record can be edited; `components` render above / below the form while editing. |
58
58
  | `add` | `boolean \| { components?: { top?; bottom? } }` | The add button (navigates to `<basePath>/add`); `components` render above / below the form while creating. |
59
59
  | `remove` | `boolean` | A remove action per row, confirmed by the list, offered only where the model's `remove.enabled` allows it. |
60
60
  | `search` | `boolean` | The search box of the page header; a search reads the first page with `searchText`. |
61
61
  | `export` | `boolean` | The export button: `SmartCrudExport` in a modal (CSV or XLSX of the current filter, without paging). |
62
62
  | `pagination` | `{ limit: number }` | Page size; the first read starts at offset 0. The backend caps a page (100 by default). |
63
- | `sort` | `boolean \| { default?: string; defaultDesc?: boolean }` | Whether sorting is offered, and the column the first read sorts by. |
63
+ | `sort` | `boolean \| { default?: string; defaultDesc?: boolean }` | Whether sorting is offered, and the column the first read sorts by. The desktop list headers sort the list: a click reads again with `sortBy` / `sortDesc` from the first page. |
64
64
  | `list` | `{ cellPipe?; components?: { top?; multi? }; mode?: ListMode; paginationMode?: PaginationMode; resetQuery?: 'beforeInit'; groups?: Array<ICrudListGroup> }` | Cell formatting, a component above the list and one in the multiselect panel, the list layout and paging mode, grouping, and with `resetQuery` a first read from the configured defaults instead of the filter the feature already has. |
65
65
  | `buttons` | `Array<IIconButtonOptions>` | Extra buttons appended to the list page header. |
66
66
  | `inputComponents` | `{ [key: string]: ComponentType<any> }` | Field components for named fields of the form (see `react-components-input`). |