@smartsoft001/claude-plugins 2.183.0 → 2.185.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.183.0",
3
+ "version": "2.185.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"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "smart",
3
3
  "description": "Smartsoft integration - safety validation, audit logging, and auto-formatting hooks",
4
- "version": "2.182.0"
4
+ "version": "2.184.0"
5
5
  }
@@ -31,23 +31,23 @@ Abstract base directive for all detail sub-components. Provides:
31
31
 
32
32
  ### Default Sub-Components
33
33
 
34
- | FieldType | Sub-component | Selector | Description |
35
- | --------------- | ------------------------------ | ------------------------------ | --------------------------------------------------------------------- |
36
- | `text` | `DetailTextComponent` | `smart-detail-text` | Text via `ListCellPipe` + `TrustHtmlPipe`, fallback for unknown types |
37
- | `email` | `DetailEmailComponent` | `smart-detail-email` | Link `mailto:` |
38
- | `enum` | `DetailEnumComponent` | `smart-detail-enum` | Single value or array with `translate` |
39
- | `flag` | `DetailFlagComponent` | `smart-detail-flag` | Inline SVG ✓ / ✗ |
40
- | `color` | `DetailColorComponent` | `smart-detail-color` | Rectangle with `background-color` |
41
- | `address` | `DetailAddressComponent` | `smart-detail-address` | `IAddress` (street, number, zip, city) |
42
- | `object` | `DetailObjectComponent` | `smart-detail-object` | Nested model via `DETAILS_COMPONENT_TOKEN` |
43
- | `array` | `DetailArrayComponent` | `smart-detail-array` | Array of nested models |
44
- | `dateRange` | `DetailDateRangeComponent` | `smart-detail-date-range` | `start – end` |
45
- | `phoneNumberPl` | `DetailPhoneNumberPlComponent` | `smart-detail-phone-number-pl` | Link `tel:48...` as badge |
46
- | `image` | `DetailImageComponent` | `smart-detail-image` | `<img>` via `FileService.getUrl(item[key].id)` |
47
- | `logo` | `DetailLogoComponent` | `smart-detail-logo` | `<img>` with `item[key]` as URL |
48
- | `video` | `DetailVideoComponent` | `smart-detail-video` | `<video controls>` via `FileService` |
49
- | `attachment` | `DetailAttachmentComponent` | `smart-detail-attachment` | Native `<button>` Tailwind — download via `FileService` |
50
- | `pdf` | `DetailPdfComponent` | `smart-detail-pdf` | Native `<button>` Tailwind — show via `FileService` |
34
+ | FieldType | Sub-component | Selector | Description |
35
+ | --------------- | ------------------------------ | ------------------------------ | ------------------------------------------------------------- |
36
+ | `text` | `DetailTextComponent` | `smart-detail-text` | Sanitized HTML via `ListCellPipe`, fallback for unknown types |
37
+ | `email` | `DetailEmailComponent` | `smart-detail-email` | Link `mailto:` |
38
+ | `enum` | `DetailEnumComponent` | `smart-detail-enum` | Single value or array with `translate` |
39
+ | `flag` | `DetailFlagComponent` | `smart-detail-flag` | Inline SVG ✓ / ✗ |
40
+ | `color` | `DetailColorComponent` | `smart-detail-color` | Rectangle with `background-color` |
41
+ | `address` | `DetailAddressComponent` | `smart-detail-address` | `IAddress` (street, number, zip, city) |
42
+ | `object` | `DetailObjectComponent` | `smart-detail-object` | Nested model via `DETAILS_COMPONENT_TOKEN` |
43
+ | `array` | `DetailArrayComponent` | `smart-detail-array` | Array of nested models |
44
+ | `dateRange` | `DetailDateRangeComponent` | `smart-detail-date-range` | `start – end` |
45
+ | `phoneNumberPl` | `DetailPhoneNumberPlComponent` | `smart-detail-phone-number-pl` | Link `tel:48...` as badge |
46
+ | `image` | `DetailImageComponent` | `smart-detail-image` | `<img>` via `FileService.getUrl(item[key].id)` |
47
+ | `logo` | `DetailLogoComponent` | `smart-detail-logo` | `<img>` with `item[key]` as URL |
48
+ | `video` | `DetailVideoComponent` | `smart-detail-video` | `<video controls>` via `FileService` |
49
+ | `attachment` | `DetailAttachmentComponent` | `smart-detail-attachment` | Native `<button>` Tailwind — download via `FileService` |
50
+ | `pdf` | `DetailPdfComponent` | `smart-detail-pdf` | Native `<button>` Tailwind — show via `FileService` |
51
51
 
52
52
  ## API
53
53
 
@@ -95,6 +95,33 @@ providers: [
95
95
 
96
96
  Maps are merged (`{ ...baseMap, ...extendMap }`), so only selected types need to be overridden.
97
97
 
98
+ ### HTML in text fields
99
+
100
+ The `text` sub-component and its preset bind the value through `[innerHTML]` WITHOUT
101
+ `TrustHtmlPipe`, so Angular's sanitizer runs on every value, including one returned by a
102
+ `cellPipe`. Scripts, event handlers (`onerror`, `onload`), `<iframe>`, `<svg>` and `javascript:`
103
+ URLs are removed, while basic formatting (`<b>`, `<em>`, `<a href="https://...">`) survives.
104
+
105
+ The sanitizer also strips inline `style` attributes, for example the colours and alignment the
106
+ rich-text editor writes. A consumer who needs raw HTML for a field it trusts can return `SafeHtml`
107
+ from its own `cellPipe` (`ICellPipe.transform` is typed as `string`, so cast the result). A
108
+ tested version lives in `docs/examples/angular/src/components/detail/trusted-html.example.ts`:
109
+
110
+ ```typescript
111
+ @Injectable()
112
+ export class TrustedDescriptionCellPipe implements ICellPipe<Product> {
113
+ private readonly sanitizer = inject(DomSanitizer);
114
+
115
+ transform(item: Product, key: string): string {
116
+ if (key !== 'description') return item[key];
117
+ // Only for HTML you produce or have sanitized yourself.
118
+ return this.sanitizer.bypassSecurityTrustHtml(
119
+ item.description,
120
+ ) as unknown as string;
121
+ }
122
+ }
123
+ ```
124
+
98
125
  ## Preline field presets
99
126
 
100
127
  Fifteen field types ship a Preline-styled **preset** (`Detail<Field>PresetComponent`, selector