@happyvertical/smrt-assets 0.55.9 → 0.55.11
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 +18 -0
- package/dist/asset-store.d.ts +4 -0
- package/dist/asset-store.d.ts.map +1 -1
- package/dist/chunks/{playground-CGd8_X0M.js → playground-Du1zCQu7.js} +19 -4
- package/dist/chunks/playground-Du1zCQu7.js.map +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +205 -1
- package/dist/playground.d.ts +1 -1
- package/dist/playground.d.ts.map +1 -1
- package/dist/playground.js +2 -2
- package/dist/recipes.d.ts +159 -0
- package/dist/recipes.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +207 -3
- package/dist/svelte/playground/AttachmentPanelPreview.svelte +2 -1
- package/dist/svelte/playground/AttachmentPanelPreview.svelte.d.ts.map +1 -1
- package/dist/svelte/playground.d.ts +38 -0
- package/dist/svelte/playground.d.ts.map +1 -1
- package/dist/svelte/playground.js +23 -2
- package/dist/workbench.js +1 -1
- package/package.json +8 -8
- package/dist/chunks/playground-CGd8_X0M.js.map +0 -1
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
/** Browser-safe mock data for the Asset Grid playground entry. */
|
|
2
|
+
export declare const assetGridMockAssets: ({
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
sourceUri: string;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
statusSlug: string;
|
|
11
|
+
alt: string;
|
|
12
|
+
} | {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
sourceUri: string;
|
|
17
|
+
mimeType: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
statusSlug: string;
|
|
21
|
+
alt?: undefined;
|
|
22
|
+
})[];
|
|
23
|
+
/** Browser-safe attachment data used by the private attachments preview. */
|
|
24
|
+
export declare const assetAttachmentMockAttachments: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
mimeType: string;
|
|
28
|
+
version: number;
|
|
29
|
+
note: string;
|
|
30
|
+
statusLabel: string;
|
|
31
|
+
versions: {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
mimeType: string;
|
|
35
|
+
version: number;
|
|
36
|
+
note: string;
|
|
37
|
+
}[];
|
|
38
|
+
}[];
|
|
1
39
|
declare const _default: {
|
|
2
40
|
packageName: string;
|
|
3
41
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../../src/svelte/playground.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../../src/svelte/playground.ts"],"names":[],"mappings":"AAkBA,kEAAkE;AAClE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;IAiC/B,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;GAkB1C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIF,wBAqCE"}
|
|
@@ -14,7 +14,8 @@ function createPreviewAssetUri(label, accent) {
|
|
|
14
14
|
</svg>`;
|
|
15
15
|
return `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(svg)}`;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
/** Browser-safe mock data for the Asset Grid playground entry. */
|
|
18
|
+
export const assetGridMockAssets = [
|
|
18
19
|
{
|
|
19
20
|
id: 'asset-harbor-map',
|
|
20
21
|
name: 'Harbor Map',
|
|
@@ -48,6 +49,26 @@ const sampleAssets = [
|
|
|
48
49
|
statusSlug: 'published',
|
|
49
50
|
},
|
|
50
51
|
];
|
|
52
|
+
/** Browser-safe attachment data used by the private attachments preview. */
|
|
53
|
+
export const assetAttachmentMockAttachments = [
|
|
54
|
+
{
|
|
55
|
+
id: 'document-v2',
|
|
56
|
+
name: 'Supplier quote.pdf',
|
|
57
|
+
mimeType: 'application/pdf',
|
|
58
|
+
version: 2,
|
|
59
|
+
note: 'Corrected supplier reference',
|
|
60
|
+
statusLabel: 'Awaiting review',
|
|
61
|
+
versions: [
|
|
62
|
+
{
|
|
63
|
+
id: 'document-v1',
|
|
64
|
+
name: 'Supplier quote.pdf',
|
|
65
|
+
mimeType: 'application/pdf',
|
|
66
|
+
version: 1,
|
|
67
|
+
note: 'Original supplied document',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
];
|
|
51
72
|
const loadAssetGrid = () => import('./AssetGrid.svelte');
|
|
52
73
|
export default {
|
|
53
74
|
packageName: '@happyvertical/smrt-assets',
|
|
@@ -71,7 +92,7 @@ export default {
|
|
|
71
92
|
order: 1,
|
|
72
93
|
tags: ['grid', 'assets', 'media'],
|
|
73
94
|
props: {
|
|
74
|
-
assets:
|
|
95
|
+
assets: assetGridMockAssets,
|
|
75
96
|
selectedIds: new Set(['asset-spring-lookbook']),
|
|
76
97
|
loading: false,
|
|
77
98
|
onSelectionChange: () => undefined,
|
package/dist/workbench.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as playground_default } from "./chunks/playground-Du1zCQu7.js";
|
|
2
2
|
import AssetManagerRoute from "./svelte/routes/AssetManagerRoute.svelte";
|
|
3
3
|
var ASSETS_ROUTE_META = { manager: {
|
|
4
4
|
id: { manager: "@happyvertical/smrt-assets:manager" }.manager,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-assets",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.11",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Asset management system with versioning, metadata, and AI-powered operations for SMRT framework",
|
|
6
6
|
"type": "module",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"@happyvertical/ai": "^0.103.1",
|
|
48
48
|
"@happyvertical/files": "^0.103.1",
|
|
49
49
|
"@happyvertical/logger": "^0.103.1",
|
|
50
|
-
"@happyvertical/smrt-core": "0.55.
|
|
51
|
-
"@happyvertical/smrt-tags": "0.55.
|
|
52
|
-
"@happyvertical/smrt-tenancy": "0.55.
|
|
53
|
-
"@happyvertical/smrt-types": "0.55.
|
|
54
|
-
"@happyvertical/smrt-ui": "0.55.
|
|
50
|
+
"@happyvertical/smrt-core": "0.55.11",
|
|
51
|
+
"@happyvertical/smrt-tags": "0.55.11",
|
|
52
|
+
"@happyvertical/smrt-tenancy": "0.55.11",
|
|
53
|
+
"@happyvertical/smrt-types": "0.55.11",
|
|
54
|
+
"@happyvertical/smrt-ui": "0.55.11",
|
|
55
55
|
"@happyvertical/sql": "^0.103.1",
|
|
56
56
|
"@happyvertical/utils": "^0.103.1"
|
|
57
57
|
},
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@happyvertical/smrt-playground": "0.55.
|
|
68
|
-
"@happyvertical/smrt-vitest": "0.55.
|
|
67
|
+
"@happyvertical/smrt-playground": "0.55.11",
|
|
68
|
+
"@happyvertical/smrt-vitest": "0.55.11",
|
|
69
69
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
70
70
|
"@sveltejs/kit": "2.69.1",
|
|
71
71
|
"@sveltejs/package": "^2.5.8",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"playground-CGd8_X0M.js","names":[],"sources":["../../src/svelte/playground.ts"],"sourcesContent":["function createPreviewAssetUri(label: string, accent: string): string {\n const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1200 800\">\n <defs>\n <linearGradient id=\"bg\" x1=\"0%\" x2=\"100%\" y1=\"0%\" y2=\"100%\">\n <stop offset=\"0%\" stop-color=\"${accent}\" />\n <stop offset=\"100%\" stop-color=\"#0f172a\" />\n </linearGradient>\n </defs>\n <rect width=\"1200\" height=\"800\" fill=\"url(#bg)\" rx=\"48\" />\n <circle cx=\"260\" cy=\"220\" r=\"110\" fill=\"rgba(255,255,255,0.16)\" />\n <path d=\"M120 620L430 330l210 190 150-120 290 220H120z\" fill=\"rgba(255,255,255,0.22)\" />\n <text x=\"96\" y=\"126\" fill=\"#e2e8f0\" font-size=\"64\" font-family=\"Arial, sans-serif\" font-weight=\"700\">${label}</text>\n <text x=\"96\" y=\"690\" fill=\"#cbd5e1\" font-size=\"34\" font-family=\"Arial, sans-serif\">SMRT Assets preview</text>\n </svg>`;\n\n return `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(svg)}`;\n}\n\nconst sampleAssets = [\n {\n id: 'asset-harbor-map',\n name: 'Harbor Map',\n description: 'Annotated port operations map for logistics planning.',\n sourceUri: createPreviewAssetUri('Harbor Map', '#0891b2'),\n mimeType: 'image/png',\n createdAt: '2026-03-11T09:15:00.000Z',\n updatedAt: '2026-03-18T15:44:00.000Z',\n statusSlug: 'active',\n alt: 'Stylized harbor map with highlighted shipping lanes.',\n },\n {\n id: 'asset-spring-lookbook',\n name: 'Spring Lookbook',\n description: 'Photography sheet prepared for the seasonal launch.',\n sourceUri: createPreviewAssetUri('Lookbook', '#7c3aed'),\n mimeType: 'image/jpeg',\n createdAt: '2026-03-07T13:22:00.000Z',\n updatedAt: '2026-03-19T08:05:00.000Z',\n statusSlug: 'draft',\n alt: '',\n },\n {\n id: 'asset-style-guide',\n name: 'Brand Style Guide',\n description: 'Reference PDF for typography, voice, and image treatment.',\n sourceUri: '',\n mimeType: 'application/pdf',\n createdAt: '2026-03-01T18:00:00.000Z',\n updatedAt: '2026-03-10T18:45:00.000Z',\n statusSlug: 'published',\n },\n];\n\nconst loadAssetGrid = () => import('./AssetGrid.svelte');\n\nexport default {\n packageName: '@happyvertical/smrt-assets',\n displayName: 'Assets',\n description:\n 'Component previews for asset browsing, selection, and media states.',\n entries: [\n {\n id: 'private-attachments',\n title: 'Private Attachments',\n description: 'Native upload, retained metadata and version history.',\n loadComponent: () => import('./playground/AttachmentPanelPreview.svelte'),\n order: 8,\n props: {},\n modes: { mock: { label: 'Mock' } },\n },\n {\n id: 'asset-grid',\n title: 'Asset Grid',\n description:\n 'Thumbnail grid preview showing selection state and missing-alt warnings.',\n loadComponent: loadAssetGrid,\n order: 1,\n tags: ['grid', 'assets', 'media'],\n props: {\n assets: sampleAssets,\n selectedIds: new Set(['asset-spring-lookbook']),\n loading: false,\n onSelectionChange: () => undefined,\n onAssetClick: () => undefined,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n ],\n};\n"],"mappings":";AAAA,SAAS,sBAAsB,OAAe,QAAwB;CACpE,MAAM,MAAM;;;wCAG0B,OAAM;;;;;;;2GAO6D,MAAK;;;CAI9G,OAAO,oCAAoC,mBAAmB,GAAG;AACnE;AAEA,IAAM,eAAe;CACnB;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,WAAW,sBAAsB,cAAc,SAAS;EACxD,UAAU;EACV,WAAW;EACX,WAAW;EACX,YAAY;EACZ,KAAK;CACP;CACA;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,WAAW,sBAAsB,YAAY,SAAS;EACtD,UAAU;EACV,WAAW;EACX,WAAW;EACX,YAAY;EACZ,KAAK;CACP;CACA;EACE,IAAI;EACJ,MAAM;EACN,aAAa;EACb,WAAW;EACX,UAAU;EACV,WAAW;EACX,WAAW;EACX,YAAY;CACd;AACF;AAEA,IAAM,sBAAsB,OAAO;AAEnC,IAAA,qBAAe;CACb,aAAa;CACb,aAAa;CACb,aACE;CACF,SAAS,CACP;EACE,IAAI;EACJ,OAAO;EACP,aAAa;EACb,qBAAqB,OAAO;EAC5B,OAAO;EACP,OAAO,CAAC;EACR,OAAO,EAAE,MAAM,EAAE,OAAO,OAAO,EAAE;CACnC,GACA;EACE,IAAI;EACJ,OAAO;EACP,aACE;EACF,eAAe;EACf,OAAO;EACP,MAAM;GAAC;GAAQ;GAAU;EAAO;EAChC,OAAO;GACL,QAAQ;GACR,6BAAa,IAAI,IAAI,CAAC,uBAAuB,CAAC;GAC9C,SAAS;GACT,yBAAyB,KAAA;GACzB,oBAAoB,KAAA;EACtB;EACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;CACF,CACF;AACF"}
|