@happyvertical/smrt-assets 0.40.65 → 0.40.66

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.
@@ -0,0 +1,81 @@
1
+ //#region src/svelte/playground.ts
2
+ function createPreviewAssetUri(label, accent) {
3
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800">
4
+ <defs>
5
+ <linearGradient id="bg" x1="0%" x2="100%" y1="0%" y2="100%">
6
+ <stop offset="0%" stop-color="${accent}" />
7
+ <stop offset="100%" stop-color="#0f172a" />
8
+ </linearGradient>
9
+ </defs>
10
+ <rect width="1200" height="800" fill="url(#bg)" rx="48" />
11
+ <circle cx="260" cy="220" r="110" fill="rgba(255,255,255,0.16)" />
12
+ <path d="M120 620L430 330l210 190 150-120 290 220H120z" fill="rgba(255,255,255,0.22)" />
13
+ <text x="96" y="126" fill="#e2e8f0" font-size="64" font-family="Arial, sans-serif" font-weight="700">${label}</text>
14
+ <text x="96" y="690" fill="#cbd5e1" font-size="34" font-family="Arial, sans-serif">SMRT Assets preview</text>
15
+ </svg>`;
16
+ return `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(svg)}`;
17
+ }
18
+ var sampleAssets = [
19
+ {
20
+ id: "asset-harbor-map",
21
+ name: "Harbor Map",
22
+ description: "Annotated port operations map for logistics planning.",
23
+ sourceUri: createPreviewAssetUri("Harbor Map", "#0891b2"),
24
+ mimeType: "image/png",
25
+ createdAt: "2026-03-11T09:15:00.000Z",
26
+ updatedAt: "2026-03-18T15:44:00.000Z",
27
+ statusSlug: "active",
28
+ alt: "Stylized harbor map with highlighted shipping lanes."
29
+ },
30
+ {
31
+ id: "asset-spring-lookbook",
32
+ name: "Spring Lookbook",
33
+ description: "Photography sheet prepared for the seasonal launch.",
34
+ sourceUri: createPreviewAssetUri("Lookbook", "#7c3aed"),
35
+ mimeType: "image/jpeg",
36
+ createdAt: "2026-03-07T13:22:00.000Z",
37
+ updatedAt: "2026-03-19T08:05:00.000Z",
38
+ statusSlug: "draft",
39
+ alt: ""
40
+ },
41
+ {
42
+ id: "asset-style-guide",
43
+ name: "Brand Style Guide",
44
+ description: "Reference PDF for typography, voice, and image treatment.",
45
+ sourceUri: "",
46
+ mimeType: "application/pdf",
47
+ createdAt: "2026-03-01T18:00:00.000Z",
48
+ updatedAt: "2026-03-10T18:45:00.000Z",
49
+ statusSlug: "published"
50
+ }
51
+ ];
52
+ var loadAssetGrid = () => import("../svelte/AssetGrid.svelte");
53
+ var playground_default = {
54
+ packageName: "@happyvertical/smrt-assets",
55
+ displayName: "Assets",
56
+ description: "Component previews for asset browsing, selection, and media states.",
57
+ entries: [{
58
+ id: "asset-grid",
59
+ title: "Asset Grid",
60
+ description: "Thumbnail grid preview showing selection state and missing-alt warnings.",
61
+ loadComponent: loadAssetGrid,
62
+ order: 1,
63
+ tags: [
64
+ "grid",
65
+ "assets",
66
+ "media"
67
+ ],
68
+ props: {
69
+ assets: sampleAssets,
70
+ selectedIds: /* @__PURE__ */ new Set(["asset-spring-lookbook"]),
71
+ loading: false,
72
+ onSelectionChange: () => void 0,
73
+ onAssetClick: () => void 0
74
+ },
75
+ modes: { mock: { label: "Mock" } }
76
+ }]
77
+ };
78
+ //#endregion
79
+ export { playground_default as t };
80
+
81
+ //# sourceMappingURL=playground-HIASY7_c.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground-HIASY7_c.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: '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,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"}