@uptime.link/statuspage 1.0.73 → 1.1.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.
Files changed (96) hide show
  1. package/dist_bundle/bundle.js +4096 -504
  2. package/dist_bundle/bundle.js.map +4 -4
  3. package/dist_ts_web/00_commitinfo_data.js +2 -2
  4. package/dist_ts_web/elements/index.d.ts +3 -0
  5. package/dist_ts_web/elements/index.js +6 -1
  6. package/dist_ts_web/elements/internal/uplinternal-miniheading.d.ts +1 -0
  7. package/dist_ts_web/elements/internal/uplinternal-miniheading.js +78 -28
  8. package/dist_ts_web/elements/upl-statuspage-assetsselector.d.ts +14 -0
  9. package/dist_ts_web/elements/upl-statuspage-assetsselector.demo.d.ts +1 -0
  10. package/dist_ts_web/elements/upl-statuspage-assetsselector.demo.js +575 -0
  11. package/dist_ts_web/elements/upl-statuspage-assetsselector.js +605 -43
  12. package/dist_ts_web/elements/upl-statuspage-footer.d.ts +46 -2
  13. package/dist_ts_web/elements/upl-statuspage-footer.demo.d.ts +1 -0
  14. package/dist_ts_web/elements/upl-statuspage-footer.demo.js +679 -0
  15. package/dist_ts_web/elements/upl-statuspage-footer.js +792 -61
  16. package/dist_ts_web/elements/upl-statuspage-header.d.ts +5 -1
  17. package/dist_ts_web/elements/upl-statuspage-header.demo.d.ts +1 -0
  18. package/dist_ts_web/elements/upl-statuspage-header.demo.js +220 -0
  19. package/dist_ts_web/elements/upl-statuspage-header.js +313 -86
  20. package/dist_ts_web/elements/upl-statuspage-incidents.d.ts +22 -4
  21. package/dist_ts_web/elements/upl-statuspage-incidents.demo.d.ts +1 -0
  22. package/dist_ts_web/elements/upl-statuspage-incidents.demo.js +1147 -0
  23. package/dist_ts_web/elements/upl-statuspage-incidents.js +750 -74
  24. package/dist_ts_web/elements/upl-statuspage-pagetitle.d.ts +15 -0
  25. package/dist_ts_web/elements/upl-statuspage-pagetitle.demo.d.ts +1 -0
  26. package/dist_ts_web/elements/upl-statuspage-pagetitle.demo.js +25 -0
  27. package/dist_ts_web/elements/upl-statuspage-pagetitle.js +148 -0
  28. package/dist_ts_web/elements/upl-statuspage-statsgrid.d.ts +23 -0
  29. package/dist_ts_web/elements/upl-statuspage-statsgrid.demo.d.ts +1 -0
  30. package/dist_ts_web/elements/upl-statuspage-statsgrid.demo.js +295 -0
  31. package/dist_ts_web/elements/upl-statuspage-statsgrid.js +374 -0
  32. package/dist_ts_web/elements/upl-statuspage-statusbar.d.ts +4 -0
  33. package/dist_ts_web/elements/upl-statuspage-statusbar.demo.d.ts +1 -0
  34. package/dist_ts_web/elements/upl-statuspage-statusbar.demo.js +365 -0
  35. package/dist_ts_web/elements/upl-statuspage-statusbar.js +357 -44
  36. package/dist_ts_web/elements/upl-statuspage-statusdetails.d.ts +14 -0
  37. package/dist_ts_web/elements/upl-statuspage-statusdetails.demo.d.ts +1 -0
  38. package/dist_ts_web/elements/upl-statuspage-statusdetails.demo.js +706 -0
  39. package/dist_ts_web/elements/upl-statuspage-statusdetails.js +373 -63
  40. package/dist_ts_web/elements/upl-statuspage-statusmonth.d.ts +15 -0
  41. package/dist_ts_web/elements/upl-statuspage-statusmonth.demo.d.ts +1 -0
  42. package/dist_ts_web/elements/upl-statuspage-statusmonth.demo.js +798 -0
  43. package/dist_ts_web/elements/upl-statuspage-statusmonth.js +474 -100
  44. package/dist_ts_web/interfaces/index.d.ts +84 -0
  45. package/dist_ts_web/interfaces/index.js +4 -0
  46. package/dist_ts_web/pages/index.d.ts +4 -1
  47. package/dist_ts_web/pages/index.js +5 -2
  48. package/dist_ts_web/pages/statuspage-allgreen.d.ts +1 -0
  49. package/dist_ts_web/pages/statuspage-allgreen.js +386 -0
  50. package/dist_ts_web/pages/statuspage-demo.d.ts +1 -0
  51. package/dist_ts_web/pages/statuspage-demo.js +616 -0
  52. package/dist_ts_web/pages/statuspage-maintenance.d.ts +1 -0
  53. package/dist_ts_web/pages/statuspage-maintenance.js +544 -0
  54. package/dist_ts_web/pages/statuspage-outage.d.ts +1 -0
  55. package/dist_ts_web/pages/statuspage-outage.js +543 -0
  56. package/dist_ts_web/styles/shared.styles.d.ts +80 -0
  57. package/dist_ts_web/styles/shared.styles.js +351 -0
  58. package/dist_watch/bundle.js +54534 -26433
  59. package/dist_watch/bundle.js.map +4 -4
  60. package/dist_watch/index.html +3 -10
  61. package/npmextra.json +9 -3
  62. package/package.json +19 -19
  63. package/readme.hints.md +292 -0
  64. package/readme.md +326 -149
  65. package/readme.plan.md +261 -0
  66. package/ts_web/00_commitinfo_data.ts +1 -1
  67. package/ts_web/elements/index.ts +6 -0
  68. package/ts_web/elements/internal/uplinternal-miniheading.ts +24 -17
  69. package/ts_web/elements/upl-statuspage-assetsselector.demo.ts +607 -0
  70. package/ts_web/elements/upl-statuspage-assetsselector.ts +526 -18
  71. package/ts_web/elements/upl-statuspage-footer.demo.ts +744 -0
  72. package/ts_web/elements/upl-statuspage-footer.ts +608 -30
  73. package/ts_web/elements/upl-statuspage-header.demo.ts +241 -0
  74. package/ts_web/elements/upl-statuspage-header.ts +220 -52
  75. package/ts_web/elements/upl-statuspage-incidents.demo.ts +1216 -0
  76. package/ts_web/elements/upl-statuspage-incidents.ts +649 -26
  77. package/ts_web/elements/upl-statuspage-pagetitle.demo.ts +25 -0
  78. package/ts_web/elements/upl-statuspage-pagetitle.ts +89 -0
  79. package/ts_web/elements/upl-statuspage-statsgrid.demo.ts +315 -0
  80. package/ts_web/elements/upl-statuspage-statsgrid.ts +306 -0
  81. package/ts_web/elements/upl-statuspage-statusbar.demo.ts +393 -0
  82. package/ts_web/elements/upl-statuspage-statusbar.ts +281 -20
  83. package/ts_web/elements/upl-statuspage-statusdetails.demo.ts +754 -0
  84. package/ts_web/elements/upl-statuspage-statusdetails.ts +297 -38
  85. package/ts_web/elements/upl-statuspage-statusmonth.demo.ts +876 -0
  86. package/ts_web/elements/upl-statuspage-statusmonth.ts +397 -76
  87. package/ts_web/interfaces/index.ts +95 -0
  88. package/ts_web/pages/index.ts +4 -1
  89. package/ts_web/pages/statuspage-allgreen.ts +412 -0
  90. package/ts_web/pages/statuspage-demo.ts +653 -0
  91. package/ts_web/pages/statuspage-maintenance.ts +570 -0
  92. package/ts_web/pages/statuspage-outage.ts +568 -0
  93. package/ts_web/styles/shared.styles.ts +367 -0
  94. package/dist_ts_web/pages/page1.d.ts +0 -1
  95. package/dist_ts_web/pages/page1.js +0 -11
  96. package/ts_web/pages/page1.ts +0 -11
package/readme.md CHANGED
@@ -1,205 +1,382 @@
1
1
  # @uptime.link/statuspage
2
- a catalog with webcomponents for uptimelink dashboard
3
2
 
4
- ## Install
3
+ 🚀 **A powerful collection of web components for building stunning status pages** — because your users deserve to know what's happening, and you deserve to look good while telling them.
5
4
 
6
- To install the `@uptime.link/statuspage` module, you can use npm. Make sure you have Node.js and npm installed, then run:
5
+ Built with [Lit](https://lit.dev/) and TypeScript, these components are designed to be composable, customizable, and production-ready out of the box.
7
6
 
8
- ```sh
9
- npm install @uptime.link/statuspage
10
- ```
7
+ ## Issue Reporting and Security
11
8
 
12
- ## Usage
9
+ For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
13
10
 
14
- The `@uptime.link/statuspage` module provides a collection of web components to build a comprehensive status page for Uptime.link dashboards. This includes headers, status bars, asset selectors, status details, incident lists, and more.
11
+ ---
15
12
 
16
- Here’s a detailed guide on how to use each component in your TypeScript project with ESM syntax. We will walk through creating a complete status page using the provided components.
13
+ ## Features
17
14
 
18
- ### Step-by-Step Example
15
+ - 🎨 **Themeable** — Automatic light/dark mode support with CSS custom properties
16
+ - 📱 **Responsive** — Looks great on everything from mobile to ultrawide
17
+ - 🔌 **Composable** — Use components individually or build complete status pages
18
+ - 🎯 **Type-Safe** — Full TypeScript support with exported interfaces
19
+ - ⚡ **Performant** — Lit-based components with minimal overhead
20
+ - 🎭 **Pre-built Pages** — Demo, all-green, outage, and maintenance page templates included
19
21
 
20
- 1. **Setup Your Project:**
22
+ ---
21
23
 
22
- Ensure you have a TypeScript project setup. Here's a minimal `tsconfig.json` to get started:
24
+ ## 📦 Installation
23
25
 
24
- ```json
25
- {
26
- "compilerOptions": {
27
- "target": "ES2020",
28
- "module": "ESNext",
29
- "moduleResolution": "node",
30
- "experimentalDecorators": true,
31
- "emitDecoratorMetadata": true,
32
- "strict": true,
33
- "esModuleInterop": true,
34
- "skipLibCheck": true
35
- }
36
- }
26
+ ```bash
27
+ npm install @uptime.link/statuspage
37
28
  ```
38
29
 
39
- 2. **Import Components:**
30
+ Or with pnpm:
40
31
 
41
- Create an `index.ts` file, and import the components you need:
42
-
43
- ```typescript
44
- import './elements/index.js';
45
- import { page1 } from './pages/index.js';
32
+ ```bash
33
+ pnpm add @uptime.link/statuspage
46
34
  ```
47
35
 
48
- 3. **Creating a Status Page:**
36
+ ---
49
37
 
50
- Here, we'll create a simple status page using the imported components. We'll create individual components like headers, status bars, footers, etc., and combine them into a single page.
38
+ ## 🚀 Quick Start
51
39
 
52
- ### UplStatuspageHeader
40
+ Import the components and start building:
53
41
 
54
42
  ```typescript
55
- import { UplStatuspageHeader } from './elements/upl-statuspage-header.js';
43
+ import '@uptime.link/statuspage';
44
+ ```
56
45
 
57
- const header: UplStatuspageHeader = document.createElement('upl-statuspage-header');
58
- header.pageTitle = "Uptime Link Status Page";
59
- document.body.appendChild(header);
46
+ Then use them in your HTML:
47
+
48
+ ```html
49
+ <upl-statuspage-header></upl-statuspage-header>
50
+ <upl-statuspage-statusbar></upl-statuspage-statusbar>
51
+ <upl-statuspage-incidents></upl-statuspage-incidents>
52
+ <upl-statuspage-footer></upl-statuspage-footer>
60
53
  ```
61
54
 
62
- ### UplStatuspageStatusbar
55
+ ---
63
56
 
64
- ```typescript
65
- import { UplStatuspageStatusbar } from './elements/upl-statuspage-statusbar.js';
57
+ ## 🧩 Components
66
58
 
67
- const statusBar: UplStatuspageStatusbar = document.createElement('upl-statuspage-statusbar');
68
- document.body.appendChild(statusBar);
69
- ```
59
+ ### `<upl-statuspage-header>`
70
60
 
71
- ### UplStatuspageAssetsselector
61
+ The main navigation header with branding and action buttons.
72
62
 
73
- ```typescript
74
- import { UplStatuspageAssetsselector } from './elements/upl-statuspage-assetsselector.js';
63
+ | Property | Type | Default | Description |
64
+ |----------|------|---------|-------------|
65
+ | `pageTitle` | `string` | `'Status'` | Title displayed in the header |
66
+ | `logoUrl` | `string` | `''` | URL to your logo image |
67
+ | `showReportButton` | `boolean` | `false` | Show "Report Incident" button |
68
+ | `showSubscribeButton` | `boolean` | `false` | Show "Subscribe" button |
75
69
 
76
- const assetsSelector: UplStatuspageAssetsselector = document.createElement('upl-statuspage-assetsselector');
77
- document.body.appendChild(assetsSelector);
78
- ```
70
+ **Events:**
71
+ - `reportNewIncident` — Fired when report button is clicked
72
+ - `statusSubscribe` — Fired when subscribe button is clicked
79
73
 
80
- ### UplStatuspageStatusdetails
74
+ ---
81
75
 
82
- ```typescript
83
- import { UplStatuspageStatusdetails } from './elements/upl-statuspage-statusdetails.js';
76
+ ### `<upl-statuspage-pagetitle>`
84
77
 
85
- const statusDetails: UplStatuspageStatusdetails = document.createElement('upl-statuspage-statusdetails');
86
- document.body.appendChild(statusDetails);
87
- ```
78
+ A hero section with title and subtitle.
88
79
 
89
- ### UplStatuspageStatusmonth
80
+ | Property | Type | Default | Description |
81
+ |----------|------|---------|-------------|
82
+ | `pageTitle` | `string` | `'System Status'` | Main heading |
83
+ | `pageSubtitle` | `string` | `''` | Optional description text |
84
+ | `centered` | `boolean` | `false` | Center-align the content |
90
85
 
91
- ```typescript
92
- import { UplStatuspageStatusmonth } from './elements/upl-statuspage-statusmonth.js';
86
+ ---
93
87
 
94
- const statusMonth: UplStatuspageStatusmonth = document.createElement('upl-statuspage-statusmonth');
95
- document.body.appendChild(statusMonth);
96
- ```
88
+ ### `<upl-statuspage-statusbar>`
97
89
 
98
- ### UplStatuspageIncidents
90
+ The overall status indicator — the heart of any status page.
99
91
 
100
- ```typescript
101
- import { UplStatuspageIncidents } from './elements/upl-statuspage-incidents.js';
102
- import { uplInterfaces } from './plugins.js';
92
+ | Property | Type | Default | Description |
93
+ |----------|------|---------|-------------|
94
+ | `overallStatus` | `IOverallStatus` | — | Current system status object |
95
+ | `loading` | `boolean` | `false` | Show loading skeleton |
103
96
 
104
- const incidents: UplStatuspageIncidents = document.createElement('upl-statuspage-incidents');
105
- incidents.currentIncidences = [
106
- // Example incident data
107
- {
108
- id: "incident1",
109
- title: "Server Outage",
110
- description: "There was an outage on the main server.",
111
- status: "resolved",
112
- createdAt: new Date().toISOString(),
113
- updatedAt: new Date().toISOString()
114
- }
115
- ] as uplInterfaces.IIncident[];
97
+ The status object supports: `operational`, `degraded`, `partial_outage`, `major_outage`, `maintenance`
116
98
 
117
- incidents.pastIncidences = [
118
- // Example past incident data
119
- {
120
- id: "incident2",
121
- title: "Database Maintenance",
122
- description: "Scheduled maintenance on the database.",
123
- status: "completed",
124
- createdAt: new Date().toISOString(),
125
- updatedAt: new Date().toISOString()
126
- }
127
- ] as uplInterfaces.IIncident[];
99
+ ---
100
+
101
+ ### `<upl-statuspage-statsgrid>`
102
+
103
+ Key metrics at a glance — uptime, response time, incidents.
104
+
105
+ | Property | Type | Default | Description |
106
+ |----------|------|---------|-------------|
107
+ | `currentStatus` | `string` | `'operational'` | Current status indicator |
108
+ | `uptime` | `number` | `100` | Uptime percentage |
109
+ | `avgResponseTime` | `number` | `0` | Average response time (ms) |
110
+ | `totalIncidents` | `number` | `0` | Incident count |
111
+ | `affectedServices` | `number` | `0` | Currently affected services |
112
+ | `totalServices` | `number` | `0` | Total monitored services |
113
+ | `timePeriod` | `string` | `'30 days'` | Time range label |
114
+ | `loading` | `boolean` | `false` | Show loading skeleton |
115
+
116
+ ---
117
+
118
+ ### `<upl-statuspage-assetsselector>`
119
+
120
+ Interactive service selector with filtering and search.
121
+
122
+ | Property | Type | Default | Description |
123
+ |----------|------|---------|-------------|
124
+ | `services` | `IServiceStatus[]` | `[]` | Array of service objects |
125
+ | `filterText` | `string` | `''` | Search filter text |
126
+ | `filterCategory` | `string` | `'all'` | Category filter |
127
+ | `showOnlySelected` | `boolean` | `false` | Show only selected services |
128
+ | `loading` | `boolean` | `false` | Show loading state |
129
+ | `expanded` | `boolean` | `false` | Expand the selector panel |
130
+
131
+ **Events:**
132
+ - `selectionChanged` — Fired with `{ selectedServices: string[] }` when selection changes
133
+
134
+ ---
135
+
136
+ ### `<upl-statuspage-statusdetails>`
137
+
138
+ Hourly status timeline visualization.
139
+
140
+ | Property | Type | Default | Description |
141
+ |----------|------|---------|-------------|
142
+ | `dataPoints` | `IStatusHistoryPoint[]` | `[]` | Hourly status data |
143
+ | `historyData` | `IStatusHistoryPoint[]` | `[]` | Alternative data property |
144
+ | `serviceId` | `string` | `''` | Service identifier |
145
+ | `serviceName` | `string` | `'Service'` | Display name |
146
+ | `hoursToShow` | `number` | `48` | Number of hours to display |
147
+ | `loading` | `boolean` | `false` | Show loading skeleton |
148
+
149
+ **Events:**
150
+ - `barClick` — Fired with `{ timestamp, status, responseTime, serviceId }` on bar click
151
+
152
+ ---
153
+
154
+ ### `<upl-statuspage-statusmonth>`
155
+
156
+ Calendar-style monthly uptime visualization.
157
+
158
+ | Property | Type | Default | Description |
159
+ |----------|------|---------|-------------|
160
+ | `monthlyData` | `IMonthlyUptime[]` | `[]` | Monthly uptime data |
161
+ | `serviceId` | `string` | `'all'` | Service identifier |
162
+ | `serviceName` | `string` | `'All Services'` | Display name |
163
+ | `loading` | `boolean` | `false` | Show loading skeleton |
164
+
165
+ **Events:**
166
+ - `dayClick` — Fired with day details when a day cell is clicked
128
167
 
129
- document.body.appendChild(incidents);
168
+ ---
169
+
170
+ ### `<upl-statuspage-incidents>`
171
+
172
+ Incident feed with expandable details and status updates.
173
+
174
+ | Property | Type | Default | Description |
175
+ |----------|------|---------|-------------|
176
+ | `currentIncidents` | `IIncidentDetails[]` | `[]` | Active incidents |
177
+ | `pastIncidents` | `IIncidentDetails[]` | `[]` | Resolved incidents |
178
+ | `maxPastIncidents` | `number` | `10` | Max past incidents to show |
179
+ | `loading` | `boolean` | `false` | Show loading skeleton |
180
+ | `enableSubscription` | `boolean` | `false` | Allow incident subscriptions |
181
+ | `subscribedIncidentIds` | `string[]` | `[]` | Pre-subscribed incident IDs |
182
+
183
+ **Events:**
184
+ - `subscribeToIncident` — Fired with incident ID on subscription toggle
185
+
186
+ ---
187
+
188
+ ### `<upl-statuspage-footer>`
189
+
190
+ Full-featured footer with links, social icons, and subscription.
191
+
192
+ | Property | Type | Default | Description |
193
+ |----------|------|---------|-------------|
194
+ | `companyName` | `string` | `''` | Company name |
195
+ | `legalUrl` | `string` | `''` | Terms/legal page URL |
196
+ | `supportEmail` | `string` | `''` | Support email address |
197
+ | `statusPageUrl` | `string` | `''` | Status page URL |
198
+ | `lastUpdated` | `number` | — | Last update timestamp |
199
+ | `currentYear` | `number` | `2024` | Copyright year |
200
+ | `socialLinks` | `ISocialLink[]` | `[]` | Social media links |
201
+ | `rssFeedUrl` | `string` | `''` | RSS feed URL |
202
+ | `apiStatusUrl` | `string` | `''` | Status API URL |
203
+ | `enableSubscribe` | `boolean` | `false` | Show subscribe button |
204
+ | `subscriberCount` | `number` | `0` | Display subscriber count |
205
+ | `additionalLinks` | `IFooterLink[]` | `[]` | Extra footer links |
206
+
207
+ **Events:**
208
+ - `subscribeClick` — Fired when subscribe button is clicked
209
+
210
+ ---
211
+
212
+ ## 📐 Interfaces
213
+
214
+ All TypeScript interfaces are exported for type safety:
215
+
216
+ ```typescript
217
+ import type {
218
+ IServiceStatus,
219
+ IStatusHistoryPoint,
220
+ IIncidentDetails,
221
+ IIncidentUpdate,
222
+ IMonthlyUptime,
223
+ IUptimeDay,
224
+ IOverallStatus,
225
+ IStatusPageConfig,
226
+ ISubscription
227
+ } from '@uptime.link/statuspage';
130
228
  ```
131
229
 
132
- ### UplStatuspageFooter
230
+ ### Key Interfaces
133
231
 
134
232
  ```typescript
135
- import { UplStatuspageFooter } from './elements/upl-statuspage-footer.js';
233
+ interface IServiceStatus {
234
+ id: string;
235
+ name: string;
236
+ displayName: string;
237
+ description?: string;
238
+ currentStatus: 'operational' | 'degraded' | 'partial_outage' | 'major_outage' | 'maintenance';
239
+ lastChecked: number;
240
+ uptime30d: number;
241
+ uptime90d: number;
242
+ responseTime: number;
243
+ category?: string;
244
+ selected?: boolean;
245
+ }
136
246
 
137
- const footer: UplStatuspageFooter = document.createElement('upl-statuspage-footer');
138
- footer.legalInfo = "https://example.com/legal";
139
- document.body.appendChild(footer);
247
+ interface IIncidentDetails {
248
+ id: string;
249
+ title: string;
250
+ status: 'investigating' | 'identified' | 'monitoring' | 'resolved' | 'postmortem';
251
+ severity: 'critical' | 'major' | 'minor' | 'maintenance';
252
+ affectedServices: string[];
253
+ startTime: number;
254
+ endTime?: number;
255
+ updates: IIncidentUpdate[];
256
+ impact: string;
257
+ rootCause?: string;
258
+ resolution?: string;
259
+ }
260
+
261
+ interface IOverallStatus {
262
+ status: 'operational' | 'degraded' | 'partial_outage' | 'major_outage' | 'maintenance';
263
+ message: string;
264
+ lastUpdated: number;
265
+ affectedServices: number;
266
+ totalServices: number;
267
+ }
140
268
  ```
141
269
 
142
- ### Full Example
270
+ ---
143
271
 
144
- Here’s how you can put it all together to create a full status page:
272
+ ## 🎬 Complete Example
273
+
274
+ Build a full status page in minutes:
145
275
 
146
276
  ```typescript
147
- import './elements/index.js';
148
- import { page1 } from './pages/index.js';
149
- import { UplStatuspageHeader } from './elements/upl-statuspage-header.js';
150
- import { UplStatuspageStatusbar } from './elements/upl-statuspage-statusbar.js';
151
- import { UplStatuspageAssetsselector } from './elements/upl-statuspage-assetsselector.js';
152
- import { UplStatuspageStatusdetails } from './elements/upl-statuspage-statusdetails.js';
153
- import { UplStatuspageStatusmonth } from './elements/upl-statuspage-statusmonth.js';
154
- import { UplStatuspageIncidents } from './elements/upl-statuspage-incidents.js';
155
- import { UplStatuspageFooter } from './elements/upl-statuspage-footer.js';
156
- import { uplInterfaces } from './plugins.js';
157
-
158
- const header: UplStatuspageHeader = document.createElement('upl-statuspage-header');
159
- header.pageTitle = "Uptime Link Status Page";
160
- document.body.appendChild(header);
161
-
162
- const statusBar: UplStatuspageStatusbar = document.createElement('upl-statuspage-statusbar');
163
- document.body.appendChild(statusBar);
164
-
165
- const assetsSelector: UplStatuspageAssetsselector = document.createElement('upl-statuspage-assetsselector');
166
- document.body.appendChild(assetsSelector);
167
-
168
- const statusDetails: UplStatuspageStatusdetails = document.createElement('upl-statuspage-statusdetails');
169
- document.body.appendChild(statusDetails);
170
-
171
- const statusMonth: UplStatuspageStatusmonth = document.createElement('upl-statuspage-statusmonth');
172
- document.body.appendChild(statusMonth);
173
-
174
- const incidents: UplStatuspageIncidents = document.createElement('upl-statuspage-incidents');
175
- incidents.currentIncidences = [
277
+ import '@uptime.link/statuspage';
278
+ import type { IServiceStatus, IOverallStatus, IIncidentDetails } from '@uptime.link/statuspage';
279
+
280
+ // Get your components
281
+ const header = document.querySelector('upl-statuspage-header');
282
+ const statusBar = document.querySelector('upl-statuspage-statusbar');
283
+ const statsGrid = document.querySelector('upl-statuspage-statsgrid');
284
+ const incidents = document.querySelector('upl-statuspage-incidents');
285
+ const footer = document.querySelector('upl-statuspage-footer');
286
+
287
+ // Configure the header
288
+ header.pageTitle = 'Acme Cloud';
289
+ header.logoUrl = '/logo.svg';
290
+ header.showSubscribeButton = true;
291
+
292
+ // Set overall status
293
+ statusBar.overallStatus = {
294
+ status: 'operational',
295
+ message: 'All systems operational',
296
+ lastUpdated: Date.now(),
297
+ affectedServices: 0,
298
+ totalServices: 12
299
+ };
300
+
301
+ // Configure stats
302
+ statsGrid.uptime = 99.98;
303
+ statsGrid.avgResponseTime = 45;
304
+ statsGrid.totalServices = 12;
305
+
306
+ // Add incidents
307
+ incidents.currentIncidents = []; // No current incidents
308
+ incidents.pastIncidents = [
176
309
  {
177
- id: "incident1",
178
- title: "Server Outage",
179
- description: "There was an outage on the main server.",
180
- status: "resolved",
181
- createdAt: new Date().toISOString(),
182
- updatedAt: new Date().toISOString()
310
+ id: 'inc-001',
311
+ title: 'Scheduled Maintenance Complete',
312
+ status: 'resolved',
313
+ severity: 'maintenance',
314
+ impact: 'Database maintenance window',
315
+ affectedServices: ['Database'],
316
+ startTime: Date.now() - 86400000,
317
+ endTime: Date.now() - 82800000,
318
+ updates: [
319
+ {
320
+ id: 'upd-1',
321
+ timestamp: Date.now() - 82800000,
322
+ status: 'resolved',
323
+ message: 'Maintenance completed successfully'
324
+ }
325
+ ]
183
326
  }
184
- ] as uplInterfaces.IIncident[];
327
+ ];
185
328
 
186
- incidents.pastIncidences = [
187
- {
188
- id: "incident2",
189
- title: "Database Maintenance",
190
- description: "Scheduled maintenance on the database.",
191
- status: "completed",
192
- createdAt: new Date().toISOString(),
193
- updatedAt: new Date().toISOString()
194
- }
195
- ] as uplInterfaces.IIncident[];
329
+ // Configure footer
330
+ footer.companyName = 'Acme Cloud';
331
+ footer.supportEmail = 'support@acme.cloud';
332
+ footer.enableSubscribe = true;
333
+ ```
334
+
335
+ ---
196
336
 
197
- document.body.appendChild(incidents);
337
+ ## 📄 Pre-built Page Templates
198
338
 
199
- const footer: UplStatuspageFooter = document.createElement('upl-statuspage-footer');
200
- footer.legalInfo = "https://example.com/legal";
201
- document.body.appendChild(footer);
339
+ The package includes ready-to-use page templates:
340
+
341
+ ```typescript
342
+ import {
343
+ statuspageDemo, // Full demo with sample data
344
+ statuspageAllgreen, // All systems operational
345
+ statuspageOutage, // Major outage scenario
346
+ statuspageMaintenance // Scheduled maintenance
347
+ } from '@uptime.link/statuspage/pages';
202
348
  ```
203
349
 
204
- This example uses all the components provided by `@uptime.link/statuspage` to create a functional status page. Modify the data, styles, and structure to suit your requirements.
205
- undefined
350
+ ---
351
+
352
+ ## 🎨 Theming
353
+
354
+ Components automatically adapt to light/dark mode using `cssManager.bdTheme()`. The design follows a modern, minimal aesthetic with:
355
+
356
+ - Clean typography with `-apple-system, BlinkMacSystemFont, 'Segoe UI'` font stack
357
+ - Subtle shadows and borders
358
+ - Semantic status colors (green, yellow, orange, red, blue)
359
+ - Smooth transitions and hover states
360
+
361
+ ---
362
+
363
+ ## License and Legal Information
364
+
365
+ This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file.
366
+
367
+ **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
368
+
369
+ ### Trademarks
370
+
371
+ This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
372
+
373
+ Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
374
+
375
+ ### Company Information
376
+
377
+ Task Venture Capital GmbH
378
+ Registered at District Court Bremen HRB 35230 HB, Germany
379
+
380
+ For any legal inquiries or further information, please contact us via email at hello@task.vc.
381
+
382
+ By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.