@smartsoft001/claude-plugins 2.193.0 → 2.194.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartsoft001/claude-plugins",
3
- "version": "2.193.0",
3
+ "version": "2.194.0",
4
4
  "description": "Installs the smart@smartsoft Claude Code plugin into a project: the agents, skills and hooks this workspace develops with.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -38,7 +38,7 @@ providers: [
38
38
  ];
39
39
  ```
40
40
 
41
- Because `ButtonComponent` renders the injected component via `NgComponentOutlet`, inputs are passed by **canonical name** — `ButtonPresetComponent` therefore overrides `cssClass` as a plain `input<string>('')` (dropping the inherited `class` alias). Note that `NgComponentOutlet` does not project `<ng-content>`, so a button label set via content only shows when the preset is used directly through `<smart-button-preset>` (not through the token path).
41
+ Because `ButtonComponent` renders the injected component via `NgComponentOutlet`, inputs are passed by **canonical name** — `ButtonPresetComponent` therefore overrides `cssClass` as a plain `input<string>('')` (dropping the inherited `class` alias). The wrapper passes its projected content (the label) to the injected component's `<ng-content>`, so the label shows through the token path as well as with `<smart-button-preset>` used directly.
42
42
 
43
43
  ### ButtonBaseComponent (abstract)
44
44
 
@@ -67,7 +67,7 @@ Three-layer pattern mirroring `<smart-toggle>`:
67
67
 
68
68
  1. **`ContainerBaseComponent`** (`@Directive()`) — shared signals/inputs (`options`, `cssClass` via `class` alias) and the `smartType = 'container'` discriminator. No outputs, no methods.
69
69
  2. **`ContainerStandardComponent`** (selector: `smart-container-standard`) — default concrete implementation extending the base. Renders a single `<div>` with `[class]`, `[attr.data-mode]`, `[attr.data-padding]`, and `<ng-content />`.
70
- 3. **`ContainerComponent`** (selector: `smart-container`) — wrapper. Uses `inject(CONTAINER_STANDARD_COMPONENT_TOKEN, { optional: true })` + `*ngComponentOutlet` to render the injected component, falling back to `<smart-container-standard>` with `<ng-content />` inside it so default-mode projection works.
70
+ 3. **`ContainerComponent`** (selector: `smart-container`) — wrapper. Uses `inject(CONTAINER_STANDARD_COMPONENT_TOKEN, { optional: true })` + `*ngComponentOutlet` to render the injected component, falling back to `<smart-container-standard>`. The projected content is captured once and reaches whichever renders: the standard component, or the injected component's default `<ng-content />`.
71
71
 
72
72
  ## Overriding with Custom Implementation
73
73
 
@@ -81,7 +81,7 @@ import {
81
81
  @Component({
82
82
  selector: 'smart-container-my-variant',
83
83
  template: `<section [class]="cssClass()">
84
- <!-- NOTE: ng-content does NOT work here when injected via the token -->
84
+ <ng-content />
85
85
  </section>`,
86
86
  })
87
87
  export class ContainerMyVariantComponent extends ContainerBaseComponent {}
@@ -95,15 +95,15 @@ providers: [
95
95
  ];
96
96
  ```
97
97
 
98
- ## Content Projection Limitation (IMPORTANT)
98
+ ## Content Projection
99
99
 
100
- The wrapper uses `*ngComponentOutlet` to render any token-provided implementation. **`NgComponentOutlet` does not forward content projection** — children placed between `<smart-container>...</smart-container>` are dropped when an injected component is active.
100
+ The wrapper uses `*ngComponentOutlet` to render any token-provided implementation and passes the children placed between `<smart-container>...</smart-container>` to it as outlet content, so they render in the injected component's default `<ng-content />` slot.
101
101
 
102
102
  Consequences for custom implementations:
103
103
 
104
- - The default `ContainerStandardComponent` works fine because the wrapper places `<ng-content />` directly inside `<smart-container-standard>` in the default branch.
105
- - A custom component provided via `CONTAINER_STANDARD_COMPONENT_TOKEN` **must not rely on `<ng-content />`**. Instead, drive the rendered content through inputs (e.g. `options`, additional input signals on the custom subclass, or a `TemplateRef` input).
106
- - If you genuinely need projected children with a custom variant, expose a `bodyTpl: input<TemplateRef>()` style input and render it with `<ng-container *ngTemplateOutlet="bodyTpl()" />`.
104
+ - The default `ContainerStandardComponent` receives the children through its `<ng-content />` as before.
105
+ - A custom component provided via `CONTAINER_STANDARD_COMPONENT_TOKEN` gets them in its first `<ng-content />` (put the default slot first if it also has `select` slots).
106
+ - The children arrive wrapped in one `display: contents` element. Layout (flex, grid, `gap`) is unaffected, but selectors on the slot's parent that target its direct children (`space-y-*`, `divide-*`, `> *`) do not reach them.
107
107
 
108
108
  ## Preset
109
109
 
@@ -134,7 +134,7 @@ providers: [
134
134
  ];
135
135
  ```
136
136
 
137
- Documented gap: because `NgComponentOutlet` does not forward content projection, projected children only render when `<smart-container-preset>` is used directly, not through `<smart-container>` (see the projection limitation above). Story: `container.component.stories.ts` → `Preset`.
137
+ Projected children render both through `<smart-container>` with the preset registered on the token and with `<smart-container-preset>` used directly (see "Content Projection" above). Story: `container.component.stories.ts` → `Preset`.
138
138
 
139
139
  ## File Locations
140
140
 
@@ -29,7 +29,7 @@ Fully-styled variation that extends `DrawerBaseComponent` and is a drop-in repla
29
29
 
30
30
  > Because `DrawerComponent` renders injected components via `NgComponentOutlet` (which passes inputs by canonical name), `DrawerPresetComponent` overrides `cssClass` as `input<string>('')` **without** the `class` alias. Bind it as `[cssClass]` when using the `<smart-drawer-preset>` selector directly, or just pass `class` on `<smart-drawer>` (the wrapper forwards it).
31
31
  >
32
- > The preset uses `<ng-content />` for its body, which works with the `<smart-drawer-preset>` selector directly but is **not** propagated when rendered through `DRAWER_STANDARD_COMPONENT_TOKEN` (see "Content Projection Limitation"). It does not consume `options.stickyFooter` (no footer slot in the base API) or `options.variant` (content-type variants are projected via `<ng-content />`, not built into the offcanvas shell). Top/bottom placements from the Preline reference are not expressible — `IDrawerOptions.position` is `left | right` only.
32
+ > The preset uses `<ng-content />` for its body, which receives the content projected into `<smart-drawer>` when the preset is registered through `DRAWER_STANDARD_COMPONENT_TOKEN`, as well as with the `<smart-drawer-preset>` selector directly (see "Content Projection"). It does not consume `options.stickyFooter` (no footer slot in the base API) or `options.variant` (content-type variants are projected via `<ng-content />`, not built into the offcanvas shell). Top/bottom placements from the Preline reference are not expressible — `IDrawerOptions.position` is `left | right` only.
33
33
 
34
34
  ### DrawerBaseComponent (abstract)
35
35
 
@@ -65,11 +65,7 @@ interface IDrawerOptions {
65
65
  }
66
66
 
67
67
  type SmartDrawerVariant =
68
- | 'empty'
69
- | 'create-form'
70
- | 'user-profile'
71
- | 'contact-list'
72
- | 'file-details';
68
+ 'empty' | 'create-form' | 'user-profile' | 'contact-list' | 'file-details';
73
69
  ```
74
70
 
75
71
  The standard component only consumes `position` (mapped to the `data-position` attribute on the aside, default `'right'`) and `withOverlay` (toggles the backdrop overlay). The remaining properties — `wide`, `brandedHeader`, `stickyFooter`, and `variant` — are reserved for custom implementations registered through `DRAWER_STANDARD_COMPONENT_TOKEN` and are ignored by `DrawerStandardComponent`.
@@ -126,7 +122,7 @@ import { DrawerBaseComponent } from '@smartsoft001/angular';
126
122
  </button>
127
123
  </header>
128
124
  }
129
- <!-- Custom implementations should expose data inputs instead of ng-content -->
125
+ <ng-content />
130
126
  </aside>
131
127
  }
132
128
  `,
@@ -152,9 +148,9 @@ When extending the base directly, remember to:
152
148
  - declare `cssClass = input<string>('')` explicitly (no `class` alias) if the component is used via `NgComponentOutlet` through `DRAWER_STANDARD_COMPONENT_TOKEN`, because `NgComponentOutlet` passes inputs by canonical name (not by alias),
153
149
  - call `this.close()` from your close affordances — it sets `open` to `false` and emits `closed` for you.
154
150
 
155
- ### Content Projection Limitation
151
+ ### Content Projection
156
152
 
157
- `DrawerStandardComponent` uses `<ng-content />` to project arbitrary children, but **`NgComponentOutlet` does not propagate projected content** to dynamically rendered components. When supplying a custom implementation via `DRAWER_STANDARD_COMPONENT_TOKEN`, do **not** rely on `<ng-content />`. Instead, expose data inputs (e.g. additional `input()` properties) on your subclass and render them inside the component template. Consumers then pass structured data to `<smart-drawer>` rather than projected DOM nodes.
153
+ `DrawerStandardComponent` uses `<ng-content />` to project arbitrary children. A custom implementation registered via `DRAWER_STANDARD_COMPONENT_TOKEN` receives the same content in its default `<ng-content />` slot, so it can show or hide the slot with `@if (open())` like the standard drawer, and control flow at the root of the projected content keeps working. The content arrives wrapped in one `display: contents` element: selectors on the slot's parent that target its direct children (`space-y-*`, `divide-*`, `> *`) do not reach the projected nodes.
158
154
 
159
155
  ## Accessibility
160
156
 
@@ -17,7 +17,7 @@ The `<smart-list-container>` component is a presentational layout wrapper that g
17
17
 
18
18
  ### ListContainerComponent (`<smart-list-container>`)
19
19
 
20
- Main wrapper component. Renders `ListContainerStandardComponent` by default. When `LIST_CONTAINER_STANDARD_COMPONENT_TOKEN` is provided, renders the injected component via `NgComponentOutlet`. Supports content projection through `<ng-content />` in the default branch, so children placed inside `<smart-list-container>` are rendered inside the standard list container.
20
+ Main wrapper component. Renders `ListContainerStandardComponent` by default. When `LIST_CONTAINER_STANDARD_COMPONENT_TOKEN` is provided, renders the injected component via `NgComponentOutlet`. Children placed inside `<smart-list-container>` are projected into the standard list container or, when the token is provided, into the injected component's default `<ng-content />`.
21
21
 
22
22
  ### ListContainerStandardComponent (`<smart-list-container-standard>`)
23
23
 
@@ -51,10 +51,7 @@ interface IListContainerOptions {
51
51
  }
52
52
 
53
53
  type SmartListContainerVariant =
54
- | 'simple'
55
- | 'card'
56
- | 'separate-cards'
57
- | 'flat-card-dividers';
54
+ 'simple' | 'card' | 'separate-cards' | 'flat-card-dividers';
58
55
  ```
59
56
 
60
57
  The standard component only consumes `variant` (placeholder behavior — applied as the `data-variant` attribute on the list root). The `fullWidthOnMobile` flag is reserved for custom implementations registered through `LIST_CONTAINER_STANDARD_COMPONENT_TOKEN` and is ignored by `ListContainerStandardComponent`.
@@ -41,7 +41,7 @@ Abstract base directive for extending custom media-object implementations. Decla
41
41
 
42
42
  ### Content Projection
43
43
 
44
- The wrapper projects body content via `<ng-content />` into the `.smart-media-object-body` slot of the standard component.
44
+ The wrapper projects body content via `<ng-content />` into the `.smart-media-object-body` slot of the standard component, or into the default `<ng-content />` of a component registered through `MEDIA_OBJECT_STANDARD_COMPONENT_TOKEN` (`MediaObjectPresetComponent` renders it in its body).
45
45
 
46
46
  ### IMediaObjectOptions
47
47
 
@@ -97,7 +97,7 @@ providers: [
97
97
 
98
98
  ## Content projection
99
99
 
100
- `ModalStandardComponent` accepts arbitrary body content via `<ng-content>` and the wrapper forwards its own `<ng-content>` into the standard. **However, `NgComponentOutlet` does not propagate projected content** — when a custom component is registered via the token, the wrapper renders the custom component as a sibling and the consumer's `<ng-content>` is dropped. Custom implementations should rely on inputs (`title`, `description`, structured `data` extension) or expose their own template inputs rather than `<ng-content>`.
100
+ `ModalStandardComponent` accepts arbitrary body content via `<ng-content>` and the wrapper forwards its own `<ng-content>` into the standard. When a custom component is registered via the token, the wrapper passes the same content to the custom component's default `<ng-content>` slot (`ModalPresetComponent` renders it in its body), wrapped in one `display: contents` element: selectors on the slot's parent that target its direct children (`space-y-*`, `divide-*`, `> *`) do not reach the projected nodes.
101
101
 
102
102
  ## Extending the Base Class
103
103