@vc-shell/vc-app-skill 2.10.2 → 2.10.3

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": "@vc-shell/vc-app-skill",
3
- "version": "2.10.2",
3
+ "version": "2.10.3",
4
4
  "description": "AI coding skill for scaffolding and generating VirtoCommerce Shell applications. Works with Claude Code, OpenCode, Gemini, Codex, Cursor.",
5
5
  "bin": "./bin/install.cjs",
6
6
  "files": [
package/runtime/VERSION CHANGED
@@ -1 +1 @@
1
- 2.10.2
1
+ 2.10.3
@@ -1 +1 @@
1
- Synced from framework at commit 5d902072a on 2026-11-02T12:30:36.729Z
1
+ Synced from framework at commit 2e784ea6e on 2026-11-02T13:01:07.305Z
@@ -77,6 +77,25 @@ getBestThumbnailSize(200); // → "216x216"
77
77
  getBestThumbnailSize(500); // → "lg"
78
78
  ```
79
79
 
80
+ ### `isExternalImage(image)`
81
+
82
+ Returns `true` for an image linked from another host. Thumbnails exist only for files the platform stores: for an image on another host the guessed thumbnail URL gets a 404, or a CDN answers with a placeholder or an unrelated image. The platform keeps a storage path in `relativeUrl` for a stored file and the full URL for a linked one.
83
+
84
+ ```ts
85
+ import { isExternalImage } from "@vc-shell/framework";
86
+
87
+ isExternalImage({ relativeUrl: "/catalog/a.jpg" }); // → false
88
+ isExternalImage({ relativeUrl: "//catalog/a.jpg" }); // → false
89
+ isExternalImage({ relativeUrl: "https://cdn.example.com/a.jpg" }); // → true
90
+ isExternalImage({ url: "https://cdn.example.com/a.jpg" }); // → false (no relativeUrl: unknown)
91
+ ```
92
+
93
+ Use it when you pass `thumbnailSize` to `VcImage` yourself:
94
+
95
+ ```vue
96
+ <VcImage :src="image.url" :thumbnail-size="isExternalImage(image) ? undefined : 'sm'" size="s" />
97
+ ```
98
+
80
99
  ## Usage in Components
81
100
 
82
101
  ### VcImage
@@ -97,11 +116,15 @@ Gallery auto-maps `size` prop to thumbnail size. Override with `thumbnailSize`:
97
116
  <VcGallery :images="images" thumbnail-size="128x128" />
98
117
  ```
99
118
 
100
- Gallery preview uses `64x64` for the thumbnail strip and full-size for the main image automatically.
119
+ Gallery preview uses `64x64` for the thumbnail strip and full-size for the main image automatically. Gallery tiles and the preview strip show the original of an image linked from another host.
101
120
 
102
121
  ### VcDataTable (CellImage)
103
122
 
104
- Table image cells use `sm` thumbnail by default — no action needed.
123
+ Table image cells use the `sm` thumbnail. A URL string cannot tell a stored image from a linked one, so when images can come from another host, point the column at the image object; the cell then shows the original of a linked image:
124
+
125
+ ```vue
126
+ <VcColumn id="image" field="images[0]" type="image" width="60px" />
127
+ ```
105
128
 
106
129
  ## Types
107
130
 
@@ -114,7 +137,7 @@ type ThumbnailSize = ThumbnailPreset | ThumbnailPixelSize;
114
137
  ## Notes
115
138
 
116
139
  - The utility only transforms the URL — the backend must have generated the thumbnail for the URL to resolve
117
- - If a thumbnail doesn't exist on the server, the browser will show a broken image. Ensure your asset pipeline generates all required sizes.
140
+ - If a thumbnail doesn't exist on the server, `VcImage` falls back to the original only when the request fails. A host that answers a missing file with an image (some CDNs send a placeholder with the 404, or an unrelated image with 200) shows that image instead, so skip thumbnails for linked images with `isExternalImage`.
118
141
  - The suffix is inserted before the file extension: `photo.jpg` → `photo_sm.jpg`
119
142
  - URLs without a file extension are returned unchanged
120
143
  - Already-suffixed URLs are not double-transformed
@@ -19,23 +19,23 @@ A responsive multi-image gallery with drag-and-drop reorder, file upload, lightb
19
19
 
20
20
  ## Props
21
21
 
22
- | Prop | Type | Default | Description |
23
- | --------------- | --------------------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
- | `layout` | `"filmstrip" \| "grid"` | `"filmstrip"` | Layout mode — filmstrip shows a single scrollable row with expand/collapse; grid shows the classic multi-row auto-fill layout. |
25
- | `label` | `string` | `undefined` | Label text displayed in the gallery header. |
26
- | `required` | `boolean` | `false` | Shows a required indicator (`*`) on the label. |
27
- | `images` | `ICommonAsset[]` | `[]` | Array of image assets to display. |
28
- | `disabled` | `boolean` | `false` | Disables all interactive actions. |
29
- | `multiple` | `boolean` | `false` | Allow selecting multiple files in upload dialog. |
30
- | `loading` | `boolean` | `false` | Shows a loading overlay with spinner on the gallery. |
31
- | `itemActions` | `{ preview?: boolean; edit?: boolean; remove?: boolean }` | `{ preview: true, edit: true, remove: true }` | Per-tile action visibility. |
32
- | `rules` | `keyof IValidationRules \| IValidationRules` | `undefined` | Validation rules for uploaded files. |
33
- | `name` | `string` | `"Gallery"` | Field name for validation messages. |
34
- | `accept` | `string` | `"image/*"` | Accepted file MIME types / extensions. Gallery is image-only by default — non-image files dropped from the OS are filtered out. Override (e.g. `"image/png,image/jpeg"`) to narrow further. |
35
- | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Tile size preset. Sizes are smaller on mobile. |
36
- | `gap` | `number` | `8` | Gap between tiles in pixels. |
37
- | `imagefit` | `"contain" \| "cover"` | `"contain"` | How images fit within tiles. |
38
- | `thumbnailSize` | `ThumbnailSize` | auto from `size` | Thumbnail size for tile images. Auto-mapped: sm→128x128, md→216x216, lg→348x348. Preview thumbnails use 64x64. |
22
+ | Prop | Type | Default | Description |
23
+ | --------------- | --------------------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
+ | `layout` | `"filmstrip" \| "grid"` | `"filmstrip"` | Layout mode — filmstrip shows a single scrollable row with expand/collapse; grid shows the classic multi-row auto-fill layout. |
25
+ | `label` | `string` | `undefined` | Label text displayed in the gallery header. |
26
+ | `required` | `boolean` | `false` | Shows a required indicator (`*`) on the label. |
27
+ | `images` | `ICommonAsset[]` | `[]` | Array of image assets to display. |
28
+ | `disabled` | `boolean` | `false` | Disables all interactive actions. |
29
+ | `multiple` | `boolean` | `false` | Allow selecting multiple files in upload dialog. |
30
+ | `loading` | `boolean` | `false` | Shows a loading overlay with spinner on the gallery. |
31
+ | `itemActions` | `{ preview?: boolean; edit?: boolean; remove?: boolean }` | `{ preview: true, edit: true, remove: true }` | Per-tile action visibility. |
32
+ | `rules` | `keyof IValidationRules \| IValidationRules` | `undefined` | Validation rules for uploaded files. |
33
+ | `name` | `string` | `"Gallery"` | Field name for validation messages. |
34
+ | `accept` | `string` | `"image/*"` | Accepted file MIME types / extensions. Gallery is image-only by default — non-image files dropped from the OS are filtered out. Override (e.g. `"image/png,image/jpeg"`) to narrow further. |
35
+ | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Tile size preset. Sizes are smaller on mobile. |
36
+ | `gap` | `number` | `8` | Gap between tiles in pixels. |
37
+ | `imagefit` | `"contain" \| "cover"` | `"contain"` | How images fit within tiles. |
38
+ | `thumbnailSize` | `ThumbnailSize` | auto from `size` | Thumbnail size for tile images. Auto-mapped: sm→128x128, md→216x216, lg→348x348. Preview thumbnails use 64x64. An image linked from another host (an absolute URL in `relativeUrl`) shows the original. |
39
39
 
40
40
  ## Events
41
41