@happyvertical/smrt-analytics 0.37.1 → 0.37.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/dist/index.js +1576 -1669
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +2 -2
- package/dist/playground.js +83 -96
- package/dist/playground.js.map +1 -1
- package/dist/smrt-knowledge.json +10 -10
- package/dist/ui.js +77 -77
- package/dist/ui.js.map +1 -1
- package/package.json +15 -15
package/dist/playground.js
CHANGED
|
@@ -1,99 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
//#region src/svelte/playground.ts
|
|
2
|
+
var sampleStats = {
|
|
3
|
+
todayPageviews: 18240,
|
|
4
|
+
yesterdayPageviews: 15980,
|
|
5
|
+
todayUsers: 3924,
|
|
6
|
+
yesterdayUsers: 3410,
|
|
7
|
+
trend: "up",
|
|
8
|
+
trendPercent: 14.1
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
10
|
+
var sampleEvents = [
|
|
11
|
+
{
|
|
12
|
+
id: "analytics-event-1",
|
|
13
|
+
eventName: "page_view",
|
|
14
|
+
clientId: "client_01HJQ9M4X0A8Q2D",
|
|
15
|
+
pagePath: "/guides/editorial-playbook",
|
|
16
|
+
eventTimestamp: "2026-03-21T16:14:00.000Z",
|
|
17
|
+
status: "sent"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "analytics-event-2",
|
|
21
|
+
eventName: "cta_click",
|
|
22
|
+
clientId: "client_01HJQ9M4X0A8Q2D",
|
|
23
|
+
pagePath: "/pricing",
|
|
24
|
+
eventTimestamp: "2026-03-21T16:10:00.000Z",
|
|
25
|
+
status: "sent"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "analytics-event-3",
|
|
29
|
+
eventName: "form_submit",
|
|
30
|
+
clientId: "client_01HJQ9NGH1J9Q8R",
|
|
31
|
+
pagePath: "/newsletter",
|
|
32
|
+
eventTimestamp: "2026-03-21T15:58:00.000Z",
|
|
33
|
+
status: "pending"
|
|
34
|
+
}
|
|
34
35
|
];
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
propertyId: "properties/348920114",
|
|
82
|
-
measurementId: "G-9A4F2P7Q1C",
|
|
83
|
-
provider: "ga4",
|
|
84
|
-
status: "active",
|
|
85
|
-
lastSyncAt: "2026-03-21T16:05:00.000Z",
|
|
86
|
-
siteDomain: "newsroom.example.com"
|
|
87
|
-
},
|
|
88
|
-
modes: {
|
|
89
|
-
mock: {
|
|
90
|
-
label: "Mock"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
]
|
|
36
|
+
var loadAnalyticsSummary = () => import("./svelte/AnalyticsSummary.svelte");
|
|
37
|
+
var loadEventsTable = () => import("./svelte/EventsTable.svelte");
|
|
38
|
+
var loadPropertyInfo = () => import("./svelte/PropertyInfo.svelte");
|
|
39
|
+
var playground_default = {
|
|
40
|
+
packageName: "@happyvertical/smrt-analytics",
|
|
41
|
+
displayName: "Analytics",
|
|
42
|
+
description: "Dashboard primitives for property health, traffic trends, and recent event delivery.",
|
|
43
|
+
entries: [
|
|
44
|
+
{
|
|
45
|
+
id: "analytics-summary",
|
|
46
|
+
title: "Analytics Summary",
|
|
47
|
+
description: "Traffic summary cards that surface today-vs-yesterday performance at a glance.",
|
|
48
|
+
loadComponent: loadAnalyticsSummary,
|
|
49
|
+
order: 1,
|
|
50
|
+
props: { stats: sampleStats },
|
|
51
|
+
modes: { mock: { label: "Mock" } }
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "events-table",
|
|
55
|
+
title: "Events Table",
|
|
56
|
+
description: "Recent outbound analytics events with delivery status and page context.",
|
|
57
|
+
loadComponent: loadEventsTable,
|
|
58
|
+
order: 2,
|
|
59
|
+
props: {
|
|
60
|
+
events: sampleEvents,
|
|
61
|
+
maxRows: 8
|
|
62
|
+
},
|
|
63
|
+
modes: { mock: { label: "Mock" } }
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "property-info",
|
|
67
|
+
title: "Property Info",
|
|
68
|
+
description: "Connection status and property metadata for a configured analytics destination.",
|
|
69
|
+
loadComponent: loadPropertyInfo,
|
|
70
|
+
order: 3,
|
|
71
|
+
props: {
|
|
72
|
+
propertyId: "properties/348920114",
|
|
73
|
+
measurementId: "G-9A4F2P7Q1C",
|
|
74
|
+
provider: "ga4",
|
|
75
|
+
status: "active",
|
|
76
|
+
lastSyncAt: "2026-03-21T16:05:00.000Z",
|
|
77
|
+
siteDomain: "newsroom.example.com"
|
|
78
|
+
},
|
|
79
|
+
modes: { mock: { label: "Mock" } }
|
|
80
|
+
}
|
|
81
|
+
]
|
|
95
82
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
//# sourceMappingURL=playground.js.map
|
|
83
|
+
//#endregion
|
|
84
|
+
export { playground_default as default };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=playground.js.map
|
package/dist/playground.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground.js","sources":["../src/svelte/playground.ts"],"sourcesContent":["const sampleStats = {\n todayPageviews: 18240,\n yesterdayPageviews: 15980,\n todayUsers: 3924,\n yesterdayUsers: 3410,\n trend: 'up',\n trendPercent: 14.1,\n};\n\nconst sampleEvents = [\n {\n id: 'analytics-event-1',\n eventName: 'page_view',\n clientId: 'client_01HJQ9M4X0A8Q2D',\n pagePath: '/guides/editorial-playbook',\n eventTimestamp: '2026-03-21T16:14:00.000Z',\n status: 'sent',\n },\n {\n id: 'analytics-event-2',\n eventName: 'cta_click',\n clientId: 'client_01HJQ9M4X0A8Q2D',\n pagePath: '/pricing',\n eventTimestamp: '2026-03-21T16:10:00.000Z',\n status: 'sent',\n },\n {\n id: 'analytics-event-3',\n eventName: 'form_submit',\n clientId: 'client_01HJQ9NGH1J9Q8R',\n pagePath: '/newsletter',\n eventTimestamp: '2026-03-21T15:58:00.000Z',\n status: 'pending',\n },\n];\n\nconst loadAnalyticsSummary = () => import('./AnalyticsSummary.svelte');\nconst loadEventsTable = () => import('./EventsTable.svelte');\nconst loadPropertyInfo = () => import('./PropertyInfo.svelte');\n\nexport default {\n packageName: '@happyvertical/smrt-analytics',\n displayName: 'Analytics',\n description:\n 'Dashboard primitives for property health, traffic trends, and recent event delivery.',\n entries: [\n {\n id: 'analytics-summary',\n title: 'Analytics Summary',\n description:\n 'Traffic summary cards that surface today-vs-yesterday performance at a glance.',\n loadComponent: loadAnalyticsSummary,\n order: 1,\n props: {\n stats: sampleStats,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'events-table',\n title: 'Events Table',\n description:\n 'Recent outbound analytics events with delivery status and page context.',\n loadComponent: loadEventsTable,\n order: 2,\n props: {\n events: sampleEvents,\n maxRows: 8,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'property-info',\n title: 'Property Info',\n description:\n 'Connection status and property metadata for a configured analytics destination.',\n loadComponent: loadPropertyInfo,\n order: 3,\n props: {\n propertyId: 'properties/348920114',\n measurementId: 'G-9A4F2P7Q1C',\n provider: 'ga4',\n status: 'active',\n lastSyncAt: '2026-03-21T16:05:00.000Z',\n siteDomain: 'newsroom.example.com',\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n ],\n};\n"],"
|
|
1
|
+
{"version":3,"file":"playground.js","names":[],"sources":["../src/svelte/playground.ts"],"sourcesContent":["const sampleStats = {\n todayPageviews: 18240,\n yesterdayPageviews: 15980,\n todayUsers: 3924,\n yesterdayUsers: 3410,\n trend: 'up',\n trendPercent: 14.1,\n};\n\nconst sampleEvents = [\n {\n id: 'analytics-event-1',\n eventName: 'page_view',\n clientId: 'client_01HJQ9M4X0A8Q2D',\n pagePath: '/guides/editorial-playbook',\n eventTimestamp: '2026-03-21T16:14:00.000Z',\n status: 'sent',\n },\n {\n id: 'analytics-event-2',\n eventName: 'cta_click',\n clientId: 'client_01HJQ9M4X0A8Q2D',\n pagePath: '/pricing',\n eventTimestamp: '2026-03-21T16:10:00.000Z',\n status: 'sent',\n },\n {\n id: 'analytics-event-3',\n eventName: 'form_submit',\n clientId: 'client_01HJQ9NGH1J9Q8R',\n pagePath: '/newsletter',\n eventTimestamp: '2026-03-21T15:58:00.000Z',\n status: 'pending',\n },\n];\n\nconst loadAnalyticsSummary = () => import('./AnalyticsSummary.svelte');\nconst loadEventsTable = () => import('./EventsTable.svelte');\nconst loadPropertyInfo = () => import('./PropertyInfo.svelte');\n\nexport default {\n packageName: '@happyvertical/smrt-analytics',\n displayName: 'Analytics',\n description:\n 'Dashboard primitives for property health, traffic trends, and recent event delivery.',\n entries: [\n {\n id: 'analytics-summary',\n title: 'Analytics Summary',\n description:\n 'Traffic summary cards that surface today-vs-yesterday performance at a glance.',\n loadComponent: loadAnalyticsSummary,\n order: 1,\n props: {\n stats: sampleStats,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'events-table',\n title: 'Events Table',\n description:\n 'Recent outbound analytics events with delivery status and page context.',\n loadComponent: loadEventsTable,\n order: 2,\n props: {\n events: sampleEvents,\n maxRows: 8,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'property-info',\n title: 'Property Info',\n description:\n 'Connection status and property metadata for a configured analytics destination.',\n loadComponent: loadPropertyInfo,\n order: 3,\n props: {\n propertyId: 'properties/348920114',\n measurementId: 'G-9A4F2P7Q1C',\n provider: 'ga4',\n status: 'active',\n lastSyncAt: '2026-03-21T16:05:00.000Z',\n siteDomain: 'newsroom.example.com',\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n ],\n};\n"],"mappings":";AAAA,IAAM,cAAc;CAClB,gBAAgB;CAChB,oBAAoB;CACpB,YAAY;CACZ,gBAAgB;CAChB,OAAO;CACP,cAAc;AAChB;AAEA,IAAM,eAAe;CACnB;EACE,IAAI;EACJ,WAAW;EACX,UAAU;EACV,UAAU;EACV,gBAAgB;EAChB,QAAQ;CACV;CACA;EACE,IAAI;EACJ,WAAW;EACX,UAAU;EACV,UAAU;EACV,gBAAgB;EAChB,QAAQ;CACV;CACA;EACE,IAAI;EACJ,WAAW;EACX,UAAU;EACV,UAAU;EACV,gBAAgB;EAChB,QAAQ;CACV;AACF;AAEA,IAAM,6BAA6B,OAAO;AAC1C,IAAM,wBAAwB,OAAO;AACrC,IAAM,yBAAyB,OAAO;AAEtC,IAAA,qBAAe;CACb,aAAa;CACb,aAAa;CACb,aACE;CACF,SAAS;EACP;GACE,IAAI;GACJ,OAAO;GACP,aACE;GACF,eAAe;GACf,OAAO;GACP,OAAO,EACL,OAAO,YACT;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;EACA;GACE,IAAI;GACJ,OAAO;GACP,aACE;GACF,eAAe;GACf,OAAO;GACP,OAAO;IACL,QAAQ;IACR,SAAS;GACX;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;EACA;GACE,IAAI;GACJ,OAAO;GACP,aACE;GACF,eAAe;GACf,OAAO;GACP,OAAO;IACL,YAAY;IACZ,eAAe;IACf,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,YAAY;GACd;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;CACF;AACF"}
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-07-01T20:03:41.873Z",
|
|
4
4
|
"packageName": "@happyvertical/smrt-analytics",
|
|
5
|
-
"packageVersion": "0.37.
|
|
5
|
+
"packageVersion": "0.37.3",
|
|
6
6
|
"sourceManifestPath": "dist/manifest.json",
|
|
7
7
|
"agentDocPath": "AGENTS.md",
|
|
8
8
|
"sourceHashes": {
|
|
9
|
-
"manifest": "
|
|
10
|
-
"packageJson": "
|
|
9
|
+
"manifest": "dac03cff0c84e71be7c09fbd456069da8fc25ac3115dc2eb28ffe5363744cfa5",
|
|
10
|
+
"packageJson": "32a1c12e779322a146f14581574736ece08468167e6ecd981484af1644f08ce9",
|
|
11
11
|
"agents": "c529837279bd11914a91124b475e177a17fab2a572cc5341589a4d4f122f6b8b"
|
|
12
12
|
},
|
|
13
13
|
"exports": [
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"@happyvertical/smrt-ui": "workspace:*",
|
|
27
27
|
"@happyvertical/smrt-vitest": "workspace:*",
|
|
28
28
|
"@happyvertical/sql": "catalog:",
|
|
29
|
-
"@sveltejs/package": "^2.5.
|
|
30
|
-
"@types/node": "
|
|
29
|
+
"@sveltejs/package": "^2.5.8",
|
|
30
|
+
"@types/node": "24.13.2",
|
|
31
31
|
"fast-glob": "3.3.3",
|
|
32
|
-
"svelte-check": "^4.
|
|
33
|
-
"svelte": "^5.
|
|
32
|
+
"svelte-check": "^4.7.1",
|
|
33
|
+
"svelte": "^5.56.4",
|
|
34
34
|
"typescript": "^5.9.3",
|
|
35
|
-
"vite": "^
|
|
36
|
-
"vitest": "^4.
|
|
35
|
+
"vite": "^8.1.2",
|
|
36
|
+
"vitest": "^4.1.9"
|
|
37
37
|
},
|
|
38
38
|
"smrtDependencies": [
|
|
39
39
|
"@happyvertical/smrt-core",
|
package/dist/ui.js
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
//#region src/ui.ts
|
|
2
|
+
var ANALYTICS_UI_SLOTS = {
|
|
3
|
+
"analytics-summary": {
|
|
4
|
+
id: "analytics-summary",
|
|
5
|
+
label: "Analytics Summary",
|
|
6
|
+
description: "Summary cards for pageviews, users, and trend deltas across today/yesterday",
|
|
7
|
+
icon: "bar-chart-3",
|
|
8
|
+
category: "display",
|
|
9
|
+
order: 1,
|
|
10
|
+
propsInterface: "AnalyticsSummaryProps"
|
|
11
|
+
},
|
|
12
|
+
"events-table": {
|
|
13
|
+
id: "events-table",
|
|
14
|
+
label: "Events Table",
|
|
15
|
+
description: "Tabular display of recent analytics events with filters",
|
|
16
|
+
icon: "list",
|
|
17
|
+
category: "list",
|
|
18
|
+
order: 2,
|
|
19
|
+
propsInterface: "EventsTableProps"
|
|
20
|
+
},
|
|
21
|
+
"property-info": {
|
|
22
|
+
id: "property-info",
|
|
23
|
+
label: "Property Info",
|
|
24
|
+
description: "Display analytics property identifiers and configuration",
|
|
25
|
+
icon: "info",
|
|
26
|
+
category: "display",
|
|
27
|
+
order: 3,
|
|
28
|
+
propsInterface: "PropertyInfoProps"
|
|
29
|
+
},
|
|
30
|
+
"property-status-badge": {
|
|
31
|
+
id: "property-status-badge",
|
|
32
|
+
label: "Property Status Badge",
|
|
33
|
+
description: "Compact status indicator for an analytics property",
|
|
34
|
+
icon: "badge",
|
|
35
|
+
category: "display",
|
|
36
|
+
order: 4,
|
|
37
|
+
propsInterface: "PropertyStatusBadgeProps"
|
|
38
|
+
},
|
|
39
|
+
"stat-card": {
|
|
40
|
+
id: "stat-card",
|
|
41
|
+
label: "Stat Card",
|
|
42
|
+
description: "Single-metric card with label, value, optional trend and subtitle",
|
|
43
|
+
icon: "trending-up",
|
|
44
|
+
category: "display",
|
|
45
|
+
order: 5,
|
|
46
|
+
propsInterface: "StatCardProps"
|
|
47
|
+
},
|
|
48
|
+
"trend-badge": {
|
|
49
|
+
id: "trend-badge",
|
|
50
|
+
label: "Trend Badge",
|
|
51
|
+
description: "Up/down/flat trend indicator with percentage delta",
|
|
52
|
+
icon: "arrow-up-right",
|
|
53
|
+
category: "display",
|
|
54
|
+
order: 6,
|
|
55
|
+
propsInterface: "TrendBadgeProps"
|
|
56
|
+
}
|
|
56
57
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
58
|
+
var ANALYTICS_MODULE_META = {
|
|
59
|
+
name: "@happyvertical/smrt-analytics",
|
|
60
|
+
displayName: "Analytics",
|
|
61
|
+
description: "Analytics integration models for GA4, Plausible, and Matomo with server-side event tracking and AI-powered reporting",
|
|
62
|
+
uiSlots: ANALYTICS_UI_SLOTS,
|
|
63
|
+
models: [
|
|
64
|
+
"AnalyticsProperty",
|
|
65
|
+
"AnalyticsDataStream",
|
|
66
|
+
"AnalyticsEvent",
|
|
67
|
+
"AnalyticsReport"
|
|
68
|
+
],
|
|
69
|
+
collections: [
|
|
70
|
+
"AnalyticsPropertyCollection",
|
|
71
|
+
"AnalyticsDataStreamCollection",
|
|
72
|
+
"AnalyticsEventCollection",
|
|
73
|
+
"AnalyticsReportCollection"
|
|
74
|
+
]
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
//# sourceMappingURL=ui.js.map
|
|
76
|
+
//#endregion
|
|
77
|
+
export { ANALYTICS_MODULE_META, ANALYTICS_UI_SLOTS };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sources":["../src/ui.ts"],"sourcesContent":["/**\n * Analytics Module UI Slot Declarations\n *\n * This file defines the UI extension points for the analytics module.\n * UI components are implemented in the ./svelte subpath and auto-register\n * with `ModuleUIRegistry` when that subpath is imported.\n *\n * @example Usage\n * ```typescript\n * import { ANALYTICS_MODULE_META } from '@happyvertical/smrt-analytics/ui';\n * console.log(ANALYTICS_MODULE_META.uiSlots);\n * ```\n */\n\nimport type { ModuleUISlot, SmrtModuleMeta } from '@happyvertical/smrt-types';\n\n/**\n * Analytics module UI slots\n */\nexport const ANALYTICS_UI_SLOTS: Record<string, ModuleUISlot> = {\n 'analytics-summary': {\n id: 'analytics-summary',\n label: 'Analytics Summary',\n description:\n 'Summary cards for pageviews, users, and trend deltas across today/yesterday',\n icon: 'bar-chart-3',\n category: 'display',\n order: 1,\n propsInterface: 'AnalyticsSummaryProps',\n },\n 'events-table': {\n id: 'events-table',\n label: 'Events Table',\n description: 'Tabular display of recent analytics events with filters',\n icon: 'list',\n category: 'list',\n order: 2,\n propsInterface: 'EventsTableProps',\n },\n 'property-info': {\n id: 'property-info',\n label: 'Property Info',\n description: 'Display analytics property identifiers and configuration',\n icon: 'info',\n category: 'display',\n order: 3,\n propsInterface: 'PropertyInfoProps',\n },\n 'property-status-badge': {\n id: 'property-status-badge',\n label: 'Property Status Badge',\n description: 'Compact status indicator for an analytics property',\n icon: 'badge',\n category: 'display',\n order: 4,\n propsInterface: 'PropertyStatusBadgeProps',\n },\n 'stat-card': {\n id: 'stat-card',\n label: 'Stat Card',\n description:\n 'Single-metric card with label, value, optional trend and subtitle',\n icon: 'trending-up',\n category: 'display',\n order: 5,\n propsInterface: 'StatCardProps',\n },\n 'trend-badge': {\n id: 'trend-badge',\n label: 'Trend Badge',\n description: 'Up/down/flat trend indicator with percentage delta',\n icon: 'arrow-up-right',\n category: 'display',\n order: 6,\n propsInterface: 'TrendBadgeProps',\n },\n};\n\n/**\n * Analytics module metadata\n */\nexport const ANALYTICS_MODULE_META: SmrtModuleMeta = {\n name: '@happyvertical/smrt-analytics',\n displayName: 'Analytics',\n description:\n 'Analytics integration models for GA4, Plausible, and Matomo with server-side event tracking and AI-powered reporting',\n uiSlots: ANALYTICS_UI_SLOTS,\n models: [\n 'AnalyticsProperty',\n 'AnalyticsDataStream',\n 'AnalyticsEvent',\n 'AnalyticsReport',\n ],\n collections: [\n 'AnalyticsPropertyCollection',\n 'AnalyticsDataStreamCollection',\n 'AnalyticsEventCollection',\n 'AnalyticsReportCollection',\n ],\n};\n"],"
|
|
1
|
+
{"version":3,"file":"ui.js","names":[],"sources":["../src/ui.ts"],"sourcesContent":["/**\n * Analytics Module UI Slot Declarations\n *\n * This file defines the UI extension points for the analytics module.\n * UI components are implemented in the ./svelte subpath and auto-register\n * with `ModuleUIRegistry` when that subpath is imported.\n *\n * @example Usage\n * ```typescript\n * import { ANALYTICS_MODULE_META } from '@happyvertical/smrt-analytics/ui';\n * console.log(ANALYTICS_MODULE_META.uiSlots);\n * ```\n */\n\nimport type { ModuleUISlot, SmrtModuleMeta } from '@happyvertical/smrt-types';\n\n/**\n * Analytics module UI slots\n */\nexport const ANALYTICS_UI_SLOTS: Record<string, ModuleUISlot> = {\n 'analytics-summary': {\n id: 'analytics-summary',\n label: 'Analytics Summary',\n description:\n 'Summary cards for pageviews, users, and trend deltas across today/yesterday',\n icon: 'bar-chart-3',\n category: 'display',\n order: 1,\n propsInterface: 'AnalyticsSummaryProps',\n },\n 'events-table': {\n id: 'events-table',\n label: 'Events Table',\n description: 'Tabular display of recent analytics events with filters',\n icon: 'list',\n category: 'list',\n order: 2,\n propsInterface: 'EventsTableProps',\n },\n 'property-info': {\n id: 'property-info',\n label: 'Property Info',\n description: 'Display analytics property identifiers and configuration',\n icon: 'info',\n category: 'display',\n order: 3,\n propsInterface: 'PropertyInfoProps',\n },\n 'property-status-badge': {\n id: 'property-status-badge',\n label: 'Property Status Badge',\n description: 'Compact status indicator for an analytics property',\n icon: 'badge',\n category: 'display',\n order: 4,\n propsInterface: 'PropertyStatusBadgeProps',\n },\n 'stat-card': {\n id: 'stat-card',\n label: 'Stat Card',\n description:\n 'Single-metric card with label, value, optional trend and subtitle',\n icon: 'trending-up',\n category: 'display',\n order: 5,\n propsInterface: 'StatCardProps',\n },\n 'trend-badge': {\n id: 'trend-badge',\n label: 'Trend Badge',\n description: 'Up/down/flat trend indicator with percentage delta',\n icon: 'arrow-up-right',\n category: 'display',\n order: 6,\n propsInterface: 'TrendBadgeProps',\n },\n};\n\n/**\n * Analytics module metadata\n */\nexport const ANALYTICS_MODULE_META: SmrtModuleMeta = {\n name: '@happyvertical/smrt-analytics',\n displayName: 'Analytics',\n description:\n 'Analytics integration models for GA4, Plausible, and Matomo with server-side event tracking and AI-powered reporting',\n uiSlots: ANALYTICS_UI_SLOTS,\n models: [\n 'AnalyticsProperty',\n 'AnalyticsDataStream',\n 'AnalyticsEvent',\n 'AnalyticsReport',\n ],\n collections: [\n 'AnalyticsPropertyCollection',\n 'AnalyticsDataStreamCollection',\n 'AnalyticsEventCollection',\n 'AnalyticsReportCollection',\n ],\n};\n"],"mappings":";AAmBO,IAAM,qBAAmD;CAC9D,qBAAqB;EACnB,IAAI;EACJ,OAAO;EACP,aACE;EACF,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,gBAAgB;EACd,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,iBAAiB;EACf,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,yBAAyB;EACvB,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,aAAa;EACX,IAAI;EACJ,OAAO;EACP,aACE;EACF,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,eAAe;EACb,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;AACF;AAKO,IAAM,wBAAwC;CACnD,MAAM;CACN,aAAa;CACb,aACE;CACF,SAAS;CACT,QAAQ;EACN;EACA;EACA;EACA;CACF;CACA,aAAa;EACX;EACA;EACA;EACA;CACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-analytics",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.3",
|
|
4
4
|
"description": "Analytics integration models for SMRT framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@happyvertical/smrt-
|
|
36
|
-
"@happyvertical/smrt-
|
|
37
|
-
"@happyvertical/smrt-tenancy": "0.37.
|
|
38
|
-
"@happyvertical/smrt-types": "0.37.
|
|
39
|
-
"@happyvertical/smrt-ui": "0.37.
|
|
35
|
+
"@happyvertical/smrt-prompts": "0.37.3",
|
|
36
|
+
"@happyvertical/smrt-core": "0.37.3",
|
|
37
|
+
"@happyvertical/smrt-tenancy": "0.37.3",
|
|
38
|
+
"@happyvertical/smrt-types": "0.37.3",
|
|
39
|
+
"@happyvertical/smrt-ui": "0.37.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"svelte": "^5.
|
|
42
|
+
"svelte": "^5.56.4"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"svelte": {
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@happyvertical/sql": "^0.74.
|
|
51
|
-
"@sveltejs/package": "^2.5.
|
|
52
|
-
"@types/node": "
|
|
50
|
+
"@happyvertical/sql": "^0.74.11",
|
|
51
|
+
"@sveltejs/package": "^2.5.8",
|
|
52
|
+
"@types/node": "24.13.2",
|
|
53
53
|
"fast-glob": "3.3.3",
|
|
54
|
-
"svelte-check": "^4.
|
|
55
|
-
"svelte": "^5.
|
|
54
|
+
"svelte-check": "^4.7.1",
|
|
55
|
+
"svelte": "^5.56.4",
|
|
56
56
|
"typescript": "^5.9.3",
|
|
57
|
-
"vite": "^
|
|
58
|
-
"vitest": "^4.
|
|
59
|
-
"@happyvertical/smrt-vitest": "0.37.
|
|
57
|
+
"vite": "^8.1.2",
|
|
58
|
+
"vitest": "^4.1.9",
|
|
59
|
+
"@happyvertical/smrt-vitest": "0.37.3"
|
|
60
60
|
},
|
|
61
61
|
"keywords": [
|
|
62
62
|
"ai",
|