@theholocron/react-template 0.3.0 → 0.4.1
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 +50 -15
- package/dist/mockServiceWorker.js +286 -301
- package/dist/react-template.cjs.js +1 -1
- package/dist/react-template.cjs.js.map +1 -1
- package/dist/react-template.es.js +8 -5
- package/dist/react-template.es.js.map +1 -1
- package/package.json +29 -18
package/README.md
CHANGED
|
@@ -1,25 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@theholocron/react-template`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- holocron:description -->
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A modern React template with pre-configured tools, best practices, and CI/CD setup for rapid project development.
|
|
6
|
+
|
|
7
|
+
<!-- /holocron:description -->
|
|
8
|
+
|
|
9
|
+
## Getting Started
|
|
10
|
+
|
|
11
|
+
Use the [Holocron CLI](https://github.com/theholocron/holocron) to scaffold a new React project. It clones the template, renames all placeholder references, wires up your vault provider, and runs `holocron setup` in one step:
|
|
6
12
|
|
|
7
13
|
```bash
|
|
8
|
-
|
|
14
|
+
npx @theholocron/cli new react my-app \
|
|
15
|
+
--description "My app description" \
|
|
16
|
+
--homepage "https://my-app.example.com" \
|
|
17
|
+
--vault doppler \
|
|
18
|
+
--agent claude
|
|
9
19
|
```
|
|
10
20
|
|
|
11
|
-
|
|
21
|
+
This will:
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
1. Create `theholocron/my-app` from this template on GitHub
|
|
24
|
+
2. Replace all `react-template` references with `my-app` throughout the repo
|
|
25
|
+
3. Run `pnpm install` (including Playwright browser download)
|
|
26
|
+
4. Run `holocron setup` to configure branch protection, labels, workflows, and repo settings
|
|
15
27
|
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<Component {...props} />
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
```
|
|
28
|
+
## Development
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
This repo uses [pnpm workspaces](https://pnpm.io/workspaces).
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm dev # start dev server
|
|
34
|
+
pnpm build # production build
|
|
35
|
+
pnpm preview # serve production build locally
|
|
36
|
+
pnpm test # run Storybook interaction tests
|
|
37
|
+
pnpm test:coverage # run tests with coverage
|
|
38
|
+
pnpm typecheck # tsc --noEmit
|
|
39
|
+
pnpm lint # lint via super-linter (Docker)
|
|
40
|
+
```
|
|
24
41
|
|
|
25
|
-
|
|
42
|
+
## What's Included
|
|
43
|
+
|
|
44
|
+
| Tool | Purpose |
|
|
45
|
+
| ------------------------------------------------------- | --------------------------------------------- |
|
|
46
|
+
| [React 19](https://react.dev) | UI framework |
|
|
47
|
+
| [Vite](https://vite.dev) | Build tool and dev server |
|
|
48
|
+
| [TypeScript](https://www.typescriptlang.org) | Type safety |
|
|
49
|
+
| [Storybook](https://storybook.js.org) | Component development and interaction testing |
|
|
50
|
+
| [Vitest](https://vitest.dev) | Test runner with browser mode |
|
|
51
|
+
| [Playwright](https://playwright.dev) | Browser automation for play tests |
|
|
52
|
+
| [MSW](https://mswjs.io) | API mocking |
|
|
53
|
+
| [ESLint](https://eslint.org) | Linting |
|
|
54
|
+
| [Stylelint](https://stylelint.io) | CSS linting |
|
|
55
|
+
| [Prettier](https://prettier.io) | Formatting |
|
|
56
|
+
| [semantic-release](https://semantic-release.gitbook.io) | Automated releases |
|
|
57
|
+
|
|
58
|
+
## Releases
|
|
59
|
+
|
|
60
|
+
Releases are automated via [semantic-release](https://semantic-release.gitbook.io) on push to `main`. See [CHANGELOG.md](CHANGELOG.md) for the release history.
|
|
@@ -7,114 +7,111 @@
|
|
|
7
7
|
* - Please do NOT modify this file.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
const PACKAGE_VERSION =
|
|
11
|
-
const INTEGRITY_CHECKSUM =
|
|
12
|
-
const IS_MOCKED_RESPONSE = Symbol(
|
|
13
|
-
const activeClientIds = new Set()
|
|
14
|
-
|
|
15
|
-
addEventListener(
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
addEventListener(
|
|
20
|
-
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
addEventListener(
|
|
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
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
addEventListener(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const requestId = crypto.randomUUID()
|
|
116
|
-
event.respondWith(handleRequest(event, requestId, requestInterceptedAt))
|
|
117
|
-
})
|
|
10
|
+
const PACKAGE_VERSION = "2.15.0";
|
|
11
|
+
const INTEGRITY_CHECKSUM = "03cb67ac84128e63d7cd722a6e5b7f1e";
|
|
12
|
+
const IS_MOCKED_RESPONSE = Symbol("isMockedResponse");
|
|
13
|
+
const activeClientIds = new Set();
|
|
14
|
+
|
|
15
|
+
addEventListener("install", function () {
|
|
16
|
+
self.skipWaiting();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
addEventListener("activate", function (event) {
|
|
20
|
+
event.waitUntil(self.clients.claim());
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
addEventListener("message", async function (event) {
|
|
24
|
+
const clientId = Reflect.get(event.source || {}, "id");
|
|
25
|
+
|
|
26
|
+
if (!clientId || !self.clients) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const client = await self.clients.get(clientId);
|
|
31
|
+
|
|
32
|
+
if (!client) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const allClients = await self.clients.matchAll({
|
|
37
|
+
type: "window",
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
switch (event.data) {
|
|
41
|
+
case "KEEPALIVE_REQUEST": {
|
|
42
|
+
sendToClient(client, {
|
|
43
|
+
type: "KEEPALIVE_RESPONSE",
|
|
44
|
+
});
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
case "INTEGRITY_CHECK_REQUEST": {
|
|
49
|
+
sendToClient(client, {
|
|
50
|
+
type: "INTEGRITY_CHECK_RESPONSE",
|
|
51
|
+
payload: {
|
|
52
|
+
packageVersion: PACKAGE_VERSION,
|
|
53
|
+
checksum: INTEGRITY_CHECKSUM,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
case "MOCK_ACTIVATE": {
|
|
60
|
+
activeClientIds.add(clientId);
|
|
61
|
+
|
|
62
|
+
sendToClient(client, {
|
|
63
|
+
type: "MOCKING_ENABLED",
|
|
64
|
+
payload: {
|
|
65
|
+
client: {
|
|
66
|
+
id: client.id,
|
|
67
|
+
frameType: client.frameType,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
case "CLIENT_CLOSED": {
|
|
75
|
+
activeClientIds.delete(clientId);
|
|
76
|
+
|
|
77
|
+
const remainingClients = allClients.filter((client) => {
|
|
78
|
+
return client.id !== clientId;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// Unregister itself when there are no more clients
|
|
82
|
+
if (remainingClients.length === 0) {
|
|
83
|
+
self.registration.unregister();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
addEventListener("fetch", function (event) {
|
|
92
|
+
const requestInterceptedAt = Date.now();
|
|
93
|
+
|
|
94
|
+
// Bypass navigation requests.
|
|
95
|
+
if (event.request.mode === "navigate") {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Opening the DevTools triggers the "only-if-cached" request
|
|
100
|
+
// that cannot be handled by the worker. Bypass such requests.
|
|
101
|
+
if (event.request.cache === "only-if-cached" && event.request.mode !== "same-origin") {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Bypass all requests when there are no active clients.
|
|
106
|
+
// Prevents the self-unregistered worked from handling requests
|
|
107
|
+
// after it's been terminated (still remains active until the next reload).
|
|
108
|
+
if (activeClientIds.size === 0) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const requestId = crypto.randomUUID();
|
|
113
|
+
event.respondWith(handleRequest(event, requestId, requestInterceptedAt));
|
|
114
|
+
});
|
|
118
115
|
|
|
119
116
|
/**
|
|
120
117
|
* @param {FetchEvent} event
|
|
@@ -122,60 +119,53 @@ addEventListener('fetch', function (event) {
|
|
|
122
119
|
* @param {number} requestInterceptedAt
|
|
123
120
|
*/
|
|
124
121
|
async function handleRequest(event, requestId, requestInterceptedAt) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
responseClone && responseClone.body
|
|
173
|
-
? [serializedRequest.body, responseClone.body]
|
|
174
|
-
: [],
|
|
175
|
-
)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return response
|
|
122
|
+
const client = await resolveMainClient(event);
|
|
123
|
+
const requestCloneForEvents = event.request.clone();
|
|
124
|
+
const response = await getResponse(event, client, requestId, requestInterceptedAt);
|
|
125
|
+
|
|
126
|
+
// Send back the response clone for the "response:*" life-cycle events.
|
|
127
|
+
// Ensure MSW is active and ready to handle the message, otherwise
|
|
128
|
+
// this message will pend indefinitely.
|
|
129
|
+
if (client && activeClientIds.has(client.id)) {
|
|
130
|
+
const serializedRequest = await serializeRequest(requestCloneForEvents);
|
|
131
|
+
|
|
132
|
+
// Omit the body of server-sent event stream responses.
|
|
133
|
+
// Cloning such responses would prevent client-side stream cancelations
|
|
134
|
+
// from reaching the original stream (a teed stream only cancels its
|
|
135
|
+
// source once both of its branches cancel) and would buffer the
|
|
136
|
+
// entire stream into the unconsumed clone indefinitely.
|
|
137
|
+
const isEventStreamResponse = response.headers
|
|
138
|
+
.get("content-type")
|
|
139
|
+
?.toLowerCase()
|
|
140
|
+
.startsWith("text/event-stream");
|
|
141
|
+
|
|
142
|
+
// Clone the response so both the client and the library could consume it.
|
|
143
|
+
const responseClone = isEventStreamResponse ? null : response.clone();
|
|
144
|
+
|
|
145
|
+
sendToClient(
|
|
146
|
+
client,
|
|
147
|
+
{
|
|
148
|
+
type: "RESPONSE",
|
|
149
|
+
payload: {
|
|
150
|
+
isMockedResponse: IS_MOCKED_RESPONSE in response,
|
|
151
|
+
request: {
|
|
152
|
+
id: requestId,
|
|
153
|
+
...serializedRequest,
|
|
154
|
+
},
|
|
155
|
+
response: {
|
|
156
|
+
type: response.type,
|
|
157
|
+
status: response.status,
|
|
158
|
+
statusText: response.statusText,
|
|
159
|
+
headers: Object.fromEntries(response.headers.entries()),
|
|
160
|
+
body: responseClone ? responseClone.body : null,
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
responseClone && responseClone.body ? [serializedRequest.body, responseClone.body] : []
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return response;
|
|
179
169
|
}
|
|
180
170
|
|
|
181
171
|
/**
|
|
@@ -187,30 +177,30 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
|
|
|
187
177
|
* @returns {Promise<Client | undefined>}
|
|
188
178
|
*/
|
|
189
179
|
async function resolveMainClient(event) {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
180
|
+
const client = await self.clients.get(event.clientId);
|
|
181
|
+
|
|
182
|
+
if (activeClientIds.has(event.clientId)) {
|
|
183
|
+
return client;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (client?.frameType === "top-level") {
|
|
187
|
+
return client;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const allClients = await self.clients.matchAll({
|
|
191
|
+
type: "window",
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
return allClients
|
|
195
|
+
.filter((client) => {
|
|
196
|
+
// Get only those clients that are currently visible.
|
|
197
|
+
return client.visibilityState === "visible";
|
|
198
|
+
})
|
|
199
|
+
.find((client) => {
|
|
200
|
+
// Find the client ID that's recorded in the
|
|
201
|
+
// set of clients that have registered the worker.
|
|
202
|
+
return activeClientIds.has(client.id);
|
|
203
|
+
});
|
|
214
204
|
}
|
|
215
205
|
|
|
216
206
|
/**
|
|
@@ -221,74 +211,72 @@ async function resolveMainClient(event) {
|
|
|
221
211
|
* @returns {Promise<Response>}
|
|
222
212
|
*/
|
|
223
213
|
async function getResponse(event, client, requestId, requestInterceptedAt) {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return passthrough()
|
|
214
|
+
// Clone the request because it might've been already used
|
|
215
|
+
// (i.e. its body has been read and sent to the client).
|
|
216
|
+
const requestClone = event.request.clone();
|
|
217
|
+
|
|
218
|
+
function passthrough() {
|
|
219
|
+
// Cast the request headers to a new Headers instance
|
|
220
|
+
// so the headers can be manipulated with.
|
|
221
|
+
const headers = new Headers(requestClone.headers);
|
|
222
|
+
|
|
223
|
+
// Remove the "accept" header value that marked this request as passthrough.
|
|
224
|
+
// This prevents request alteration and also keeps it compliant with the
|
|
225
|
+
// user-defined CORS policies.
|
|
226
|
+
const acceptHeader = headers.get("accept");
|
|
227
|
+
if (acceptHeader) {
|
|
228
|
+
const values = acceptHeader.split(",").map((value) => value.trim());
|
|
229
|
+
const filteredValues = values.filter((value) => value !== "msw/passthrough");
|
|
230
|
+
|
|
231
|
+
if (filteredValues.length > 0) {
|
|
232
|
+
headers.set("accept", filteredValues.join(", "));
|
|
233
|
+
} else {
|
|
234
|
+
headers.delete("accept");
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return fetch(requestClone, { headers });
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Bypass mocking when the client is not active.
|
|
242
|
+
if (!client) {
|
|
243
|
+
return passthrough();
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Bypass initial page load requests (i.e. static assets).
|
|
247
|
+
// The absence of the immediate/parent client in the map of the active clients
|
|
248
|
+
// means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
|
|
249
|
+
// and is not ready to handle requests.
|
|
250
|
+
if (!activeClientIds.has(client.id)) {
|
|
251
|
+
return passthrough();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Notify the client that a request has been intercepted.
|
|
255
|
+
const serializedRequest = await serializeRequest(event.request);
|
|
256
|
+
const clientMessage = await sendToClient(
|
|
257
|
+
client,
|
|
258
|
+
{
|
|
259
|
+
type: "REQUEST",
|
|
260
|
+
payload: {
|
|
261
|
+
id: requestId,
|
|
262
|
+
interceptedAt: requestInterceptedAt,
|
|
263
|
+
...serializedRequest,
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
[serializedRequest.body]
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
switch (clientMessage.type) {
|
|
270
|
+
case "MOCK_RESPONSE": {
|
|
271
|
+
return respondWithMock(clientMessage.data);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
case "PASSTHROUGH": {
|
|
275
|
+
return passthrough();
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return passthrough();
|
|
292
280
|
}
|
|
293
281
|
|
|
294
282
|
/**
|
|
@@ -298,22 +286,19 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
|
|
|
298
286
|
* @returns {Promise<any>}
|
|
299
287
|
*/
|
|
300
288
|
function sendToClient(client, message, transferrables = []) {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
...transferrables.filter(Boolean),
|
|
315
|
-
])
|
|
316
|
-
})
|
|
289
|
+
return new Promise((resolve, reject) => {
|
|
290
|
+
const channel = new MessageChannel();
|
|
291
|
+
|
|
292
|
+
channel.port1.onmessage = (event) => {
|
|
293
|
+
if (event.data && event.data.error) {
|
|
294
|
+
return reject(event.data.error);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
resolve(event.data);
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
client.postMessage(message, [channel.port2, ...transferrables.filter(Boolean)]);
|
|
301
|
+
});
|
|
317
302
|
}
|
|
318
303
|
|
|
319
304
|
/**
|
|
@@ -321,41 +306,41 @@ function sendToClient(client, message, transferrables = []) {
|
|
|
321
306
|
* @returns {Response}
|
|
322
307
|
*/
|
|
323
308
|
function respondWithMock(response) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
309
|
+
// Setting response status code to 0 is a no-op.
|
|
310
|
+
// However, when responding with a "Response.error()", the produced Response
|
|
311
|
+
// instance will have status code set to 0. Since it's not possible to create
|
|
312
|
+
// a Response instance with status code 0, handle that use-case separately.
|
|
313
|
+
if (response.status === 0) {
|
|
314
|
+
return Response.error();
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const mockedResponse = new Response(response.body, response);
|
|
318
|
+
|
|
319
|
+
Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
|
|
320
|
+
value: true,
|
|
321
|
+
enumerable: true,
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
return mockedResponse;
|
|
340
325
|
}
|
|
341
326
|
|
|
342
327
|
/**
|
|
343
328
|
* @param {Request} request
|
|
344
329
|
*/
|
|
345
330
|
async function serializeRequest(request) {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
331
|
+
return {
|
|
332
|
+
url: request.url,
|
|
333
|
+
mode: request.mode,
|
|
334
|
+
method: request.method,
|
|
335
|
+
headers: Object.fromEntries(request.headers.entries()),
|
|
336
|
+
cache: request.cache,
|
|
337
|
+
credentials: request.credentials,
|
|
338
|
+
destination: request.destination,
|
|
339
|
+
integrity: request.integrity,
|
|
340
|
+
redirect: request.redirect,
|
|
341
|
+
referrer: request.referrer,
|
|
342
|
+
referrerPolicy: request.referrerPolicy,
|
|
343
|
+
body: await request.arrayBuffer(),
|
|
344
|
+
keepalive: request.keepalive,
|
|
345
|
+
};
|
|
361
346
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let l=require("react");l=c(l,1);function u(e){return fetch(`/authenticate`,{method:`POST`,...e}).then(e=>e.json())}function d(e,t){switch(t.type){case`LOG_IN`:return t.user;case`LOG_OUT`:return null;default:return e}}function f(){let[e,t]=l.useReducer(d,null);return[e,({username:e,password:n})=>{u({body:JSON.stringify({username:e,password:n})}).then(({user:e})=>{t({type:`LOG_IN`,user:e})}).catch(e=>{console.log(e)})}]}var p=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),m=o((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case E:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===E)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=k.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(A.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){N||(N=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function l(){var e=t(this.type);return P[e]||(P[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0)if(o)if(j(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`)
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let l=require("react");l=c(l,1);function u(e){return fetch(`/authenticate`,{method:`POST`,...e}).then(e=>e.json())}function d(e,t){switch(t.type){case`LOG_IN`:return t.user;case`LOG_OUT`:return null;default:return e}}function f(){let[e,t]=l.useReducer(d,null);return[e,({username:e,password:n})=>{u({body:JSON.stringify({username:e,password:n})}).then(({user:e})=>{t({type:`LOG_IN`,user:e})}).catch(e=>{console.log(e)})}]}var p=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),m=o((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case E:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===E)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=k.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(A.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){N||(N=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function l(){var e=t(this.type);return P[e]||(P[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0){if(o){if(j(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`)}else f(p)}if(A.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,L[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-template.cjs.js","names":[],"sources":["../src/auth/use-auth.ts","../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/.pnpm/react@19.2.8/node_modules/react/jsx-runtime.js","../src/tasks/task.tsx","../src/tasks/task-list.tsx","../src/tasks/use-tasks.ts","../src/inbox/inbox.tsx","../src/login/login.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nexport interface AuthOptions {\n\theaders?: { [key: string]: string };\n\tbody?: string;\n}\n\nexport interface User {\n\tid: string;\n\tname: string;\n\ttoken?: string;\n\t// [key: string]: any; // Allow any additional user properties\n}\n\nexport interface AuthResponse {\n\tuser: User;\n}\n\nfunction authenticate(options: AuthOptions): Promise<AuthResponse> {\n\treturn fetch(\"/authenticate\", {\n\t\tmethod: \"POST\",\n\t\t...options,\n\t}).then((res) => res.json());\n}\n\n// Define the action type for the reducer\ntype AuthAction = { type: \"LOG_IN\"; user: User } | { type: \"LOG_OUT\" };\n\n// Reducer function for managing user state\nfunction reducer(user: User | null, action: AuthAction): User | null {\n\tswitch (action.type) {\n\t\tcase \"LOG_IN\":\n\t\t\treturn action.user;\n\t\tcase \"LOG_OUT\":\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn user;\n\t}\n}\n\n// Define the credentials type for login\nexport interface Credentials {\n\tusername: string;\n\tpassword: string;\n}\n\nexport function useAuth(): [User | null, (credentials: Credentials) => void] {\n\tconst [user, dispatch] = React.useReducer(reducer, null);\n\n\tconst logIn = ({ username, password }: Credentials) => {\n\t\tauthenticate({ body: JSON.stringify({ username, password }) })\n\t\t\t.then(({ user }) => {\n\t\t\t\tdispatch({ type: \"LOG_IN\", user });\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.log(error);\n\t\t\t});\n\t};\n\n\treturn [user, logIn];\n}\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export interface TaskProps {\n\ttask: {\n\t\tid: string;\n\t\ttitle: string;\n\t\tstate: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\";\n\t};\n\tonArchiveTask: (archive: \"ARCHIVE_TASK\", id: string) => void;\n\tonTogglePinTask: (state: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\", id: string) => void;\n\tonEditTitle: (title: string, id: string) => void;\n\tonDeleteTask: (id: string) => void;\n}\n\nexport function Task (props: TaskProps) {\n\tconst {\n\t\ttask: { id, title, state },\n\t\tonArchiveTask,\n\t\tonTogglePinTask,\n\t\tonEditTitle,\n\t\tonDeleteTask,\n\t} = props;\n\n\treturn (\n\t\t<div className={`list-item ${state}`} role=\"listitem\" aria-label={`task-${id}`}>\n\t\t\t<label htmlFor=\"checked\" aria-label={`archiveTask-${id}`} className=\"checkbox\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tdisabled={true}\n\t\t\t\t\tname=\"checked\"\n\t\t\t\t\tid={`archiveTask-${id}`}\n\t\t\t\t\tchecked={state === \"TASK_ARCHIVED\"}\n\t\t\t\t/>\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"checkbox-custom\"\n\t\t\t\t\tonClick={() => onArchiveTask(\"ARCHIVE_TASK\", id)}\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\taria-label={`archiveButton-${id}`}\n\t\t\t\t/>\n\t\t\t</label>\n\n\t\t\t<label htmlFor=\"title\" aria-label={title} className=\"title\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tvalue={title}\n\t\t\t\t\tname=\"title\"\n\t\t\t\t\tplaceholder=\"Input title\"\n\t\t\t\t\tstyle={{ textOverflow: \"ellipsis\" }}\n\t\t\t\t\tonChange={(e) => onEditTitle(e.target.value, id)}\n\t\t\t\t/>\n\t\t\t</label>\n\t\t\t<button\n\t\t\t\taria-label=\"delete\"\n\t\t\t\tclassName=\"delete-button\"\n\t\t\t\tonClick={() => onDeleteTask(id)}\n\t\t\t>\n\t\t\t\t<span className=\"icon-trash\" />\n\t\t\t</button>\n\t\t\t{state !== \"TASK_ARCHIVED\" && (\n\t\t\t\t<button\n\t\t\t\t\tclassName=\"pin-button\"\n\t\t\t\t\tonClick={() => onTogglePinTask(state, id)}\n\t\t\t\t\tid={`pinTask-${id}`}\n\t\t\t\t\taria-label={state === \"TASK_PINNED\" ? \"unpin\" : \"pin\"}\n\t\t\t\t\tkey={`pinTask-${id}`}\n\t\t\t\t>\n\t\t\t\t\t<span className={`icon-star`} />\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import { Task, type TaskProps } from \"./task\";\n\nexport interface TaskListProps {\n\tloading?: boolean;\n\ttasks: TaskProps[\"task\"][];\n\tonTogglePinTask: TaskProps[\"onTogglePinTask\"];\n\tonArchiveTask: TaskProps[\"onArchiveTask\"];\n\tonEditTitle: TaskProps[\"onEditTitle\"];\n\tonDeleteTask: TaskProps[\"onDeleteTask\"];\n}\n\nexport function TaskList(props: TaskListProps) {\n\tconst { loading = false, tasks, onTogglePinTask, onArchiveTask, onEditTitle, onDeleteTask } = props;\n\n\tconst events = {\n\t\tonTogglePinTask,\n\t\tonArchiveTask,\n\t\tonEditTitle,\n\t\tonDeleteTask,\n\t};\n\n\tconst LoadingRow = (\n\t\t<div className=\"loading-item\" data-testid=\"loading-item\">\n\t\t\t<span className=\"glow-checkbox\" />\n\t\t\t<span className=\"glow-text\">\n\t\t\t\t<span>Loading</span> <span>cool</span> <span>state</span>\n\t\t\t</span>\n\t\t</div>\n\t);\n\n\tif (loading) {\n\t\treturn (\n\t\t\t<div className=\"list-items\" data-testid=\"loading\" key=\"loading\">\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (tasks.length === 0) {\n\t\treturn (\n\t\t\t<div className=\"list-items\" key={\"empty\"} data-testid=\"empty\">\n\t\t\t\t<div className=\"wrapper-message\">\n\t\t\t\t\t<span className=\"icon-check\" />\n\t\t\t\t\t<p className=\"title-message\">You have no tasks</p>\n\t\t\t\t\t<p className=\"subtitle-message\">Sit back and relax</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst tasksInOrder = [\n\t\t...tasks.filter((t) => t.state === \"TASK_PINNED\"),\n\t\t...tasks.filter((t) => t.state !== \"TASK_PINNED\"),\n\t];\n\n\treturn (\n\t\t<div className=\"list-items\" data-testid=\"success\" key={\"success\"} role=\"list\" aria-label=\"tasks\">\n\t\t\t{tasksInOrder.map((task) => (\n\t\t\t\t<Task key={task.id} task={task} {...events} />\n\t\t\t))}\n\t\t</div>\n\t);\n}\n","import * as React from \"react\";\n\ninterface Task {\n\tid: string;\n\ttitle: string;\n\tstate: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\";\n\t// [key: string]: any; // Allow any additional properties\n}\n\nexport interface TaskResponse {\n\ttasks: Task[];\n}\n\nconst getTasks = (options: RequestInit): Promise<TaskResponse> => fetch(\"/tasks\", options).then((res) => res.json());\n\nconst updateTask = (tasks: Task[], id: string, updatedTask: Partial<Task>): Task[] =>\n\ttasks.map((task) => (task.id === id ? { ...task, ...updatedTask } : task));\n\nconst deleteTask = (tasks: Task[], id: string): Task[] => tasks.filter((task) => task.id !== id);\n\nexport type TaskAction =\n\t| { type: \"UPDATE_TASKS\"; tasks: Task[] }\n\t| { type: \"ARCHIVE_TASK\"; id: string }\n\t| { type: \"PIN_TASK\"; id: string }\n\t| { type: \"INBOX_TASK\"; id: string }\n\t| { type: \"DELETE_TASK\"; id: string }\n\t| { type: \"EDIT_TITLE\"; id: string; title: string };\n\nexport function reducer(tasks: Task[], action: TaskAction): Task[] {\n\tswitch (action.type) {\n\t\tcase \"UPDATE_TASKS\":\n\t\t\treturn action.tasks;\n\t\tcase \"ARCHIVE_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_ARCHIVED\" });\n\t\tcase \"PIN_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_PINNED\" });\n\t\tcase \"INBOX_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_INBOX\" });\n\t\tcase \"DELETE_TASK\":\n\t\t\treturn deleteTask(tasks, action.id);\n\t\tcase \"EDIT_TITLE\":\n\t\t\treturn updateTask(tasks, action.id, { title: action.title });\n\t\tdefault:\n\t\t\t// c8 ignore next\n\t\t\treturn tasks;\n\t}\n}\n\nexport function useTasks(): [Task[], React.Dispatch<TaskAction>] {\n\tconst [tasks, dispatch] = React.useReducer(reducer, []);\n\n\tReact.useEffect(() => {\n\t\tconst abortController = new AbortController();\n\t\tconst signal = abortController.signal;\n\n\t\tgetTasks({ signal })\n\t\t\t.then(({ tasks }) => {\n\t\t\t\tdispatch({ type: \"UPDATE_TASKS\", tasks });\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\t// c8 ignore next 3 — requires a network-level fetch rejection, not an HTTP error response\n\t\t\t\tif (!abortController.signal.aborted) {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn () => {\n\t\t\tabortController.abort();\n\t\t};\n\t}, []);\n\n\treturn [tasks, dispatch];\n}\n","import { TaskList, useTasks } from \"../tasks\";\n\nexport interface InboxProps {\n\terror?: string;\n}\n\ntype TaskState = \"TASK_PINNED\" | \"TASK_INBOX\" | \"TASK_ARCHIVED\";\n\nexport function Inbox(props: InboxProps) {\n\tconst { error = \"\" } = props;\n\n\tconst [tasks, dispatch] = useTasks();\n\n\t// Archive or move the task back to inbox\n\tconst archiveTask = (actionType: \"ARCHIVE_TASK\" | \"INBOX_TASK\", id: string) => {\n\t\tdispatch({ type: actionType, id });\n\t};\n\n\t// Delete task by id\n\tconst deleteTask = (id: string) => {\n\t\tdispatch({ type: \"DELETE_TASK\", id });\n\t};\n\n\t// Toggle between pinning and unpinning the task\n\tconst togglePinTask = (state: TaskState, id: string) => {\n\t\tdispatch({\n\t\t\ttype: state === \"TASK_PINNED\" ? \"INBOX_TASK\" : \"PIN_TASK\",\n\t\t\tid,\n\t\t});\n\t};\n\n\t// Edit task title\n\tconst editTitle = (title: string, id: string) => {\n\t\tdispatch({ type: \"EDIT_TITLE\", id, title });\n\t};\n\n\tif (error) {\n\t\treturn (\n\t\t\t<div className=\"page lists-show\">\n\t\t\t\t<div className=\"wrapper-message\">\n\t\t\t\t\t<span className=\"icon-face-sad\" />\n\t\t\t\t\t<p className=\"title-message\">Oh no!</p>\n\t\t\t\t\t<p className=\"subtitle-message\">Something went wrong</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"page lists-show\">\n\t\t\t<nav>\n\t\t\t\t<h1 className=\"title-page\">Taskbox</h1>\n\t\t\t</nav>\n\t\t\t<TaskList\n\t\t\t\ttasks={tasks}\n\t\t\t\tonArchiveTask={archiveTask}\n\t\t\t\tonTogglePinTask={togglePinTask}\n\t\t\t\tonEditTitle={editTitle}\n\t\t\t\tonDeleteTask={deleteTask}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","import \"./login.css\";\n\nimport type { Credentials } from \"../auth\";\n\nexport interface LoginFormProps {\n\tonSubmit: (formData: Credentials) => void;\n}\n\nexport function LoginForm(props: LoginFormProps) {\n\tconst { onSubmit, ...rest } = props;\n\n\treturn (\n\t\t<form\n\t\t\tclassName=\"login-form-container\"\n\t\t\tonSubmit={(event) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst elementsArray = Array.from(event.currentTarget.elements) as HTMLInputElement[];\n\t\t\t\tconst formData = elementsArray.reduce((acc: Partial<Credentials>, elem: HTMLInputElement) => {\n\t\t\t\t\tif (elem.name) {\n\t\t\t\t\t\tacc[elem.name as keyof Credentials] = elem.value;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} as Partial<Credentials>);\n\n\t\t\t\t// Ensure `formData` includes both `username` and `password` before calling `onSubmit`\n\t\t\t\tif (formData.username && formData.password) {\n\t\t\t\t\tonSubmit(formData as Credentials); // Type assertion to `Credentials`\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error(\"Both username and password are required.\");\n\t\t\t\t}\n\t\t\t}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<div className=\"login-form-wrapper\">\n\t\t\t\t<div role=\"group\" className=\"login-form-group\">\n\t\t\t\t\t<label htmlFor=\"email\" id=\"email-label\" className=\"login-form-label\">\n\t\t\t\t\t\tEmail address\n\t\t\t\t\t</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\tid=\"username\"\n\t\t\t\t\t\tautoComplete=\"email\"\n\t\t\t\t\t\trequired\n\t\t\t\t\t\taria-required=\"true\"\n\t\t\t\t\t\tclassName=\"login-form-input\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div role=\"group\" className=\"login-form-group\">\n\t\t\t\t<label id=\"password-label\" htmlFor=\"password\" className=\"login-form-label\">\n\t\t\t\t\tPassword\n\t\t\t\t</label>\n\t\t\t\t<input\n\t\t\t\t\tname=\"password\"\n\t\t\t\t\ttype=\"password\"\n\t\t\t\t\tid=\"password\"\n\t\t\t\t\trequired\n\t\t\t\t\taria-required=\"true\"\n\t\t\t\t\tclassName=\"login-form-input\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<button type=\"submit\" className=\"submit-button\">\n\t\t\t\tSign in\n\t\t\t</button>\n\t\t</form>\n\t);\n}\n\nexport interface LoginProps {\n\tonLogIn: (credentials: Credentials) => void;\n}\n\nexport function Login(props: LoginProps) {\n\treturn (\n\t\t<div className=\"page lists-show\">\n\t\t\t<div className=\"loginscreen\">\n\t\t\t\t<div className=\"login-screen-container\">\n\t\t\t\t\t<header className=\"loginscreen-header\">\n\t\t\t\t\t\t<h1 className=\"loginscreen-heading\">Taskbox</h1>\n\t\t\t\t\t\t<p className=\"loginscreen-text\">Sign in to your account</p>\n\t\t\t\t\t</header>\n\t\t\t\t\t<LoginForm onSubmit={props.onLogIn} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"x_google_ignoreList":[1,2,3],"mappings":"0pBAoBA,SAAS,EAAa,EAA6C,CAClE,OAAO,MAAM,gBAAiB,CAC7B,OAAQ,OACR,GAAG,CACJ,CAAC,CAAC,CAAC,KAAM,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UAAU,mBAAmB,SAAA,eAE9D,CAAA,GACP,EAAA,EAAA,IAAA,CAAC,QAAD,CACC,KAAK,WACL,KAAK,QACL,GAAG,WACH,aAAa,QACb,SAAA,GACA,gBAAc,OACd,UAAU,kBACV,CAAA,CACG,GACD,CAAA,GACL,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,KAAK,QAAQ,UAAU,mBAA5B,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,QAAD,CAAO,GAAG,iBAAiB,QAAQ,WAAW,UAAU,mBAAmB,SAAA,UAEpE,CAAA,GACP,EAAA,EAAA,IAAA,CAAC,QAAD,CACC,KAAK,WACL,KAAK,WACL,GAAG,WACH,SAAA,GACA,gBAAc,OACd,UAAU,kBACV,CAAA,CACG,KACL,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,UAAU,gBAAgB,SAAA,SAExC,CAAA,CACH,GAER,CAMA,SAAgB,EAAM,EAAmB,CACxC,OACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kBACd,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,cACd,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,yBAAf,SAAA,EACC,EAAA,EAAA,KAAA,CAAC,SAAD,CAAQ,UAAU,qBAAlB,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,sBAAsB,SAAA,SAAW,CAAA,GAC/C,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,mBAAmB,SAAA,yBAA0B,CAAA,CACnD,CACR,CAAA,GAAA,EAAA,EAAA,IAAA,CAAC,EAAD,CAAW,SAAU,EAAM,OAAU,CAAA,CACjC,GACD,CAAA,CACD,CAAA,CAEP"}
|
|
1
|
+
{"version":3,"file":"react-template.cjs.js","names":[],"sources":["../src/auth/use-auth.ts","../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/.pnpm/react@19.2.8/node_modules/react/jsx-runtime.js","../src/tasks/task.tsx","../src/tasks/task-list.tsx","../src/tasks/use-tasks.ts","../src/inbox/inbox.tsx","../src/login/login.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nexport interface AuthOptions {\n\theaders?: { [key: string]: string };\n\tbody?: string;\n}\n\nexport interface User {\n\tid: string;\n\tname: string;\n\ttoken?: string;\n\t// [key: string]: any; // Allow any additional user properties\n}\n\nexport interface AuthResponse {\n\tuser: User;\n}\n\nfunction authenticate(options: AuthOptions): Promise<AuthResponse> {\n\treturn fetch(\"/authenticate\", {\n\t\tmethod: \"POST\",\n\t\t...options,\n\t}).then((res) => res.json());\n}\n\n// Define the action type for the reducer\ntype AuthAction = { type: \"LOG_IN\"; user: User } | { type: \"LOG_OUT\" };\n\n// Reducer function for managing user state\nfunction reducer(user: User | null, action: AuthAction): User | null {\n\tswitch (action.type) {\n\t\tcase \"LOG_IN\":\n\t\t\treturn action.user;\n\t\tcase \"LOG_OUT\":\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn user;\n\t}\n}\n\n// Define the credentials type for login\nexport interface Credentials {\n\tusername: string;\n\tpassword: string;\n}\n\nexport function useAuth(): [User | null, (credentials: Credentials) => void] {\n\tconst [user, dispatch] = React.useReducer(reducer, null);\n\n\tconst logIn = ({ username, password }: Credentials) => {\n\t\tauthenticate({ body: JSON.stringify({ username, password }) })\n\t\t\t.then(({ user }) => {\n\t\t\t\tdispatch({ type: \"LOG_IN\", user });\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.log(error);\n\t\t\t});\n\t};\n\n\treturn [user, logIn];\n}\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export interface TaskProps {\n\ttask: {\n\t\tid: string;\n\t\ttitle: string;\n\t\tstate: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\";\n\t};\n\tonArchiveTask: (archive: \"ARCHIVE_TASK\", id: string) => void;\n\tonTogglePinTask: (state: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\", id: string) => void;\n\tonEditTitle: (title: string, id: string) => void;\n\tonDeleteTask: (id: string) => void;\n}\n\nexport function Task (props: TaskProps) {\n\tconst {\n\t\ttask: { id, title, state },\n\t\tonArchiveTask,\n\t\tonTogglePinTask,\n\t\tonEditTitle,\n\t\tonDeleteTask,\n\t} = props;\n\n\treturn (\n\t\t<div className={`list-item ${state}`} role=\"listitem\" aria-label={`task-${id}`}>\n\t\t\t<label htmlFor=\"checked\" aria-label={`archiveTask-${id}`} className=\"checkbox\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tdisabled={true}\n\t\t\t\t\tname=\"checked\"\n\t\t\t\t\tid={`archiveTask-${id}`}\n\t\t\t\t\tchecked={state === \"TASK_ARCHIVED\"}\n\t\t\t\t/>\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"checkbox-custom\"\n\t\t\t\t\tonClick={() => onArchiveTask(\"ARCHIVE_TASK\", id)}\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\taria-label={`archiveButton-${id}`}\n\t\t\t\t/>\n\t\t\t</label>\n\n\t\t\t<label htmlFor=\"title\" aria-label={title} className=\"title\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tvalue={title}\n\t\t\t\t\tname=\"title\"\n\t\t\t\t\tplaceholder=\"Input title\"\n\t\t\t\t\tstyle={{ textOverflow: \"ellipsis\" }}\n\t\t\t\t\tonChange={(e) => onEditTitle(e.target.value, id)}\n\t\t\t\t/>\n\t\t\t</label>\n\t\t\t<button\n\t\t\t\taria-label=\"delete\"\n\t\t\t\tclassName=\"delete-button\"\n\t\t\t\tonClick={() => onDeleteTask(id)}\n\t\t\t>\n\t\t\t\t<span className=\"icon-trash\" />\n\t\t\t</button>\n\t\t\t{state !== \"TASK_ARCHIVED\" && (\n\t\t\t\t<button\n\t\t\t\t\tclassName=\"pin-button\"\n\t\t\t\t\tonClick={() => onTogglePinTask(state, id)}\n\t\t\t\t\tid={`pinTask-${id}`}\n\t\t\t\t\taria-label={state === \"TASK_PINNED\" ? \"unpin\" : \"pin\"}\n\t\t\t\t\tkey={`pinTask-${id}`}\n\t\t\t\t>\n\t\t\t\t\t<span className={`icon-star`} />\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import { Task, type TaskProps } from \"./task\";\n\nexport interface TaskListProps {\n\tloading?: boolean;\n\ttasks: TaskProps[\"task\"][];\n\tonTogglePinTask: TaskProps[\"onTogglePinTask\"];\n\tonArchiveTask: TaskProps[\"onArchiveTask\"];\n\tonEditTitle: TaskProps[\"onEditTitle\"];\n\tonDeleteTask: TaskProps[\"onDeleteTask\"];\n}\n\nexport function TaskList(props: TaskListProps) {\n\tconst { loading = false, tasks, onTogglePinTask, onArchiveTask, onEditTitle, onDeleteTask } = props;\n\n\tconst events = {\n\t\tonTogglePinTask,\n\t\tonArchiveTask,\n\t\tonEditTitle,\n\t\tonDeleteTask,\n\t};\n\n\tconst LoadingRow = (\n\t\t<div className=\"loading-item\" data-testid=\"loading-item\">\n\t\t\t<span className=\"glow-checkbox\" />\n\t\t\t<span className=\"glow-text\">\n\t\t\t\t<span>Loading</span> <span>cool</span> <span>state</span>\n\t\t\t</span>\n\t\t</div>\n\t);\n\n\tif (loading) {\n\t\treturn (\n\t\t\t<div className=\"list-items\" data-testid=\"loading\" key=\"loading\">\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (tasks.length === 0) {\n\t\treturn (\n\t\t\t<div className=\"list-items\" key={\"empty\"} data-testid=\"empty\">\n\t\t\t\t<div className=\"wrapper-message\">\n\t\t\t\t\t<span className=\"icon-check\" />\n\t\t\t\t\t<p className=\"title-message\">You have no tasks</p>\n\t\t\t\t\t<p className=\"subtitle-message\">Sit back and relax</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst tasksInOrder = [\n\t\t...tasks.filter((t) => t.state === \"TASK_PINNED\"),\n\t\t...tasks.filter((t) => t.state !== \"TASK_PINNED\"),\n\t];\n\n\treturn (\n\t\t<div className=\"list-items\" data-testid=\"success\" key={\"success\"} role=\"list\" aria-label=\"tasks\">\n\t\t\t{tasksInOrder.map((task) => (\n\t\t\t\t<Task key={task.id} task={task} {...events} />\n\t\t\t))}\n\t\t</div>\n\t);\n}\n","import * as React from \"react\";\n\ninterface Task {\n\tid: string;\n\ttitle: string;\n\tstate: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\";\n\t// [key: string]: any; // Allow any additional properties\n}\n\nexport interface TaskResponse {\n\ttasks: Task[];\n}\n\nconst getTasks = (options: RequestInit): Promise<TaskResponse> => fetch(\"/tasks\", options).then((res) => res.json());\n\nconst updateTask = (tasks: Task[], id: string, updatedTask: Partial<Task>): Task[] =>\n\ttasks.map((task) => (task.id === id ? { ...task, ...updatedTask } : task));\n\nconst deleteTask = (tasks: Task[], id: string): Task[] => tasks.filter((task) => task.id !== id);\n\nexport type TaskAction =\n\t| { type: \"UPDATE_TASKS\"; tasks: Task[] }\n\t| { type: \"ARCHIVE_TASK\"; id: string }\n\t| { type: \"PIN_TASK\"; id: string }\n\t| { type: \"INBOX_TASK\"; id: string }\n\t| { type: \"DELETE_TASK\"; id: string }\n\t| { type: \"EDIT_TITLE\"; id: string; title: string };\n\nexport function reducer(tasks: Task[], action: TaskAction): Task[] {\n\tswitch (action.type) {\n\t\tcase \"UPDATE_TASKS\":\n\t\t\treturn action.tasks;\n\t\tcase \"ARCHIVE_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_ARCHIVED\" });\n\t\tcase \"PIN_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_PINNED\" });\n\t\tcase \"INBOX_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_INBOX\" });\n\t\tcase \"DELETE_TASK\":\n\t\t\treturn deleteTask(tasks, action.id);\n\t\tcase \"EDIT_TITLE\":\n\t\t\treturn updateTask(tasks, action.id, { title: action.title });\n\t\tdefault:\n\t\t\t// c8 ignore next\n\t\t\treturn tasks;\n\t}\n}\n\nexport function useTasks(): [Task[], React.Dispatch<TaskAction>] {\n\tconst [tasks, dispatch] = React.useReducer(reducer, []);\n\n\tReact.useEffect(() => {\n\t\tconst abortController = new AbortController();\n\t\tconst signal = abortController.signal;\n\n\t\tgetTasks({ signal })\n\t\t\t.then(({ tasks }) => {\n\t\t\t\tdispatch({ type: \"UPDATE_TASKS\", tasks });\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\t// c8 ignore next 3 — requires a network-level fetch rejection, not an HTTP error response\n\t\t\t\tif (!abortController.signal.aborted) {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn () => {\n\t\t\tabortController.abort();\n\t\t};\n\t}, []);\n\n\treturn [tasks, dispatch];\n}\n","import { TaskList, useTasks } from \"../tasks\";\n\nexport interface InboxProps {\n\terror?: string;\n}\n\ntype TaskState = \"TASK_PINNED\" | \"TASK_INBOX\" | \"TASK_ARCHIVED\";\n\nexport function Inbox(props: InboxProps) {\n\tconst { error = \"\" } = props;\n\n\tconst [tasks, dispatch] = useTasks();\n\n\t// Archive or move the task back to inbox\n\tconst archiveTask = (actionType: \"ARCHIVE_TASK\" | \"INBOX_TASK\", id: string) => {\n\t\tdispatch({ type: actionType, id });\n\t};\n\n\t// Delete task by id\n\tconst deleteTask = (id: string) => {\n\t\tdispatch({ type: \"DELETE_TASK\", id });\n\t};\n\n\t// Toggle between pinning and unpinning the task\n\tconst togglePinTask = (state: TaskState, id: string) => {\n\t\tdispatch({\n\t\t\ttype: state === \"TASK_PINNED\" ? \"INBOX_TASK\" : \"PIN_TASK\",\n\t\t\tid,\n\t\t});\n\t};\n\n\t// Edit task title\n\tconst editTitle = (title: string, id: string) => {\n\t\tdispatch({ type: \"EDIT_TITLE\", id, title });\n\t};\n\n\tif (error) {\n\t\treturn (\n\t\t\t<div className=\"page lists-show\">\n\t\t\t\t<div className=\"wrapper-message\">\n\t\t\t\t\t<span className=\"icon-face-sad\" />\n\t\t\t\t\t<p className=\"title-message\">Oh no!</p>\n\t\t\t\t\t<p className=\"subtitle-message\">Something went wrong</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"page lists-show\">\n\t\t\t<nav>\n\t\t\t\t<h1 className=\"title-page\">Taskbox</h1>\n\t\t\t</nav>\n\t\t\t<TaskList\n\t\t\t\ttasks={tasks}\n\t\t\t\tonArchiveTask={archiveTask}\n\t\t\t\tonTogglePinTask={togglePinTask}\n\t\t\t\tonEditTitle={editTitle}\n\t\t\t\tonDeleteTask={deleteTask}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","import \"./login.css\";\n\nimport type { Credentials } from \"../auth\";\n\nexport interface LoginFormProps {\n\tonSubmit: (formData: Credentials) => void;\n}\n\nexport function LoginForm(props: LoginFormProps) {\n\tconst { onSubmit, ...rest } = props;\n\n\treturn (\n\t\t<form\n\t\t\tclassName=\"login-form-container\"\n\t\t\tonSubmit={(event) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst elementsArray = Array.from(event.currentTarget.elements) as HTMLInputElement[];\n\t\t\t\tconst formData = elementsArray.reduce((acc: Partial<Credentials>, elem: HTMLInputElement) => {\n\t\t\t\t\tif (elem.name) {\n\t\t\t\t\t\tacc[elem.name as keyof Credentials] = elem.value;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} as Partial<Credentials>);\n\n\t\t\t\t// Ensure `formData` includes both `username` and `password` before calling `onSubmit`\n\t\t\t\tif (formData.username && formData.password) {\n\t\t\t\t\tonSubmit(formData as Credentials); // Type assertion to `Credentials`\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error(\"Both username and password are required.\");\n\t\t\t\t}\n\t\t\t}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<div className=\"login-form-wrapper\">\n\t\t\t\t<div role=\"group\" className=\"login-form-group\">\n\t\t\t\t\t<label htmlFor=\"email\" id=\"email-label\" className=\"login-form-label\">\n\t\t\t\t\t\tEmail address\n\t\t\t\t\t</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\tid=\"username\"\n\t\t\t\t\t\tautoComplete=\"email\"\n\t\t\t\t\t\trequired\n\t\t\t\t\t\taria-required=\"true\"\n\t\t\t\t\t\tclassName=\"login-form-input\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div role=\"group\" className=\"login-form-group\">\n\t\t\t\t<label id=\"password-label\" htmlFor=\"password\" className=\"login-form-label\">\n\t\t\t\t\tPassword\n\t\t\t\t</label>\n\t\t\t\t<input\n\t\t\t\t\tname=\"password\"\n\t\t\t\t\ttype=\"password\"\n\t\t\t\t\tid=\"password\"\n\t\t\t\t\trequired\n\t\t\t\t\taria-required=\"true\"\n\t\t\t\t\tclassName=\"login-form-input\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<button type=\"submit\" className=\"submit-button\">\n\t\t\t\tSign in\n\t\t\t</button>\n\t\t</form>\n\t);\n}\n\nexport interface LoginProps {\n\tonLogIn: (credentials: Credentials) => void;\n}\n\nexport function Login(props: LoginProps) {\n\treturn (\n\t\t<div className=\"page lists-show\">\n\t\t\t<div className=\"loginscreen\">\n\t\t\t\t<div className=\"login-screen-container\">\n\t\t\t\t\t<header className=\"loginscreen-header\">\n\t\t\t\t\t\t<h1 className=\"loginscreen-heading\">Taskbox</h1>\n\t\t\t\t\t\t<p className=\"loginscreen-text\">Sign in to your account</p>\n\t\t\t\t\t</header>\n\t\t\t\t\t<LoginForm onSubmit={props.onLogIn} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"x_google_ignoreList":[1,2,3],"mappings":"0pBAoBA,SAAS,EAAa,EAA6C,CAClE,OAAO,MAAM,gBAAiB,CAC7B,OAAQ,OACR,GAAG,CACJ,CAAC,CAAC,CAAC,KAAM,GAAQ,EAAI,KAAK,CAAC,CAC5B,CAMA,SAAS,EAAQ,EAAmB,EAAiC,CACpE,OAAQ,EAAO,KAAf,CACC,IAAK,SACJ,OAAO,EAAO,KACf,IAAK,UACJ,OAAO,KACR,QACC,OAAO,CACT,CACD,CAQA,SAAgB,GAA6D,CAC5E,GAAM,CAAC,EAAM,GAAY,EAAM,WAAW,EAAS,IAAI,EAYvD,MAAO,CAAC,GAVO,CAAE,WAAU,cAA4B,CACtD,EAAa,CAAE,KAAM,KAAK,UAAU,CAAE,WAAU,UAAS,CAAC,CAAE,CAAC,CAAC,CAC5D,MAAM,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AAA,CAAC,QAAD,CACC,KAAK,WACL,KAAK,WACL,GAAG,WACH,SAAA,GACA,gBAAc,OACd,UAAU,kBACV,CAAA,CACG,KACL,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,UAAU,gBAAgB,SAAA,SAExC,CAAA,CACH,GAER,CAMA,SAAgB,EAAM,EAAmB,CACxC,OACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kBACd,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,cACd,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,yBAAf,SAAA,EACC,EAAA,EAAA,KAAA,CAAC,SAAD,CAAQ,UAAU,qBAAlB,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,sBAAsB,SAAA,SAAW,CAAA,GAC/C,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,mBAAmB,SAAA,yBAA0B,CAAA,CACnD,CACR,CAAA,GAAA,EAAA,EAAA,IAAA,CAAC,EAAD,CAAW,SAAU,EAAM,OAAU,CAAA,CACjC,GACD,CAAA,CACD,CAAA,CAEP"}
|
|
@@ -173,11 +173,14 @@ var o = /* @__PURE__ */ t(((e) => {
|
|
|
173
173
|
}
|
|
174
174
|
function f(e, n, r, a, s, u) {
|
|
175
175
|
var f = n.children;
|
|
176
|
-
if (f !== void 0)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
176
|
+
if (f !== void 0) {
|
|
177
|
+
if (a) {
|
|
178
|
+
if (M(f)) {
|
|
179
|
+
for (a = 0; a < f.length; a++) p(f[a]);
|
|
180
|
+
Object.freeze && Object.freeze(f);
|
|
181
|
+
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
182
|
+
} else p(f);
|
|
183
|
+
}
|
|
181
184
|
if (j.call(n, "key")) {
|
|
182
185
|
f = t(e);
|
|
183
186
|
var m = Object.keys(n).filter(function(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-template.es.js","names":[],"sources":["../src/auth/use-auth.ts","../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/.pnpm/react@19.2.8/node_modules/react/jsx-runtime.js","../src/tasks/task.tsx","../src/tasks/task-list.tsx","../src/tasks/use-tasks.ts","../src/inbox/inbox.tsx","../src/login/login.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nexport interface AuthOptions {\n\theaders?: { [key: string]: string };\n\tbody?: string;\n}\n\nexport interface User {\n\tid: string;\n\tname: string;\n\ttoken?: string;\n\t// [key: string]: any; // Allow any additional user properties\n}\n\nexport interface AuthResponse {\n\tuser: User;\n}\n\nfunction authenticate(options: AuthOptions): Promise<AuthResponse> {\n\treturn fetch(\"/authenticate\", {\n\t\tmethod: \"POST\",\n\t\t...options,\n\t}).then((res) => res.json());\n}\n\n// Define the action type for the reducer\ntype AuthAction = { type: \"LOG_IN\"; user: User } | { type: \"LOG_OUT\" };\n\n// Reducer function for managing user state\nfunction reducer(user: User | null, action: AuthAction): User | null {\n\tswitch (action.type) {\n\t\tcase \"LOG_IN\":\n\t\t\treturn action.user;\n\t\tcase \"LOG_OUT\":\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn user;\n\t}\n}\n\n// Define the credentials type for login\nexport interface Credentials {\n\tusername: string;\n\tpassword: string;\n}\n\nexport function useAuth(): [User | null, (credentials: Credentials) => void] {\n\tconst [user, dispatch] = React.useReducer(reducer, null);\n\n\tconst logIn = ({ username, password }: Credentials) => {\n\t\tauthenticate({ body: JSON.stringify({ username, password }) })\n\t\t\t.then(({ user }) => {\n\t\t\t\tdispatch({ type: \"LOG_IN\", user });\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.log(error);\n\t\t\t});\n\t};\n\n\treturn [user, logIn];\n}\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export interface TaskProps {\n\ttask: {\n\t\tid: string;\n\t\ttitle: string;\n\t\tstate: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\";\n\t};\n\tonArchiveTask: (archive: \"ARCHIVE_TASK\", id: string) => void;\n\tonTogglePinTask: (state: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\", id: string) => void;\n\tonEditTitle: (title: string, id: string) => void;\n\tonDeleteTask: (id: string) => void;\n}\n\nexport function Task (props: TaskProps) {\n\tconst {\n\t\ttask: { id, title, state },\n\t\tonArchiveTask,\n\t\tonTogglePinTask,\n\t\tonEditTitle,\n\t\tonDeleteTask,\n\t} = props;\n\n\treturn (\n\t\t<div className={`list-item ${state}`} role=\"listitem\" aria-label={`task-${id}`}>\n\t\t\t<label htmlFor=\"checked\" aria-label={`archiveTask-${id}`} className=\"checkbox\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tdisabled={true}\n\t\t\t\t\tname=\"checked\"\n\t\t\t\t\tid={`archiveTask-${id}`}\n\t\t\t\t\tchecked={state === \"TASK_ARCHIVED\"}\n\t\t\t\t/>\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"checkbox-custom\"\n\t\t\t\t\tonClick={() => onArchiveTask(\"ARCHIVE_TASK\", id)}\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\taria-label={`archiveButton-${id}`}\n\t\t\t\t/>\n\t\t\t</label>\n\n\t\t\t<label htmlFor=\"title\" aria-label={title} className=\"title\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tvalue={title}\n\t\t\t\t\tname=\"title\"\n\t\t\t\t\tplaceholder=\"Input title\"\n\t\t\t\t\tstyle={{ textOverflow: \"ellipsis\" }}\n\t\t\t\t\tonChange={(e) => onEditTitle(e.target.value, id)}\n\t\t\t\t/>\n\t\t\t</label>\n\t\t\t<button\n\t\t\t\taria-label=\"delete\"\n\t\t\t\tclassName=\"delete-button\"\n\t\t\t\tonClick={() => onDeleteTask(id)}\n\t\t\t>\n\t\t\t\t<span className=\"icon-trash\" />\n\t\t\t</button>\n\t\t\t{state !== \"TASK_ARCHIVED\" && (\n\t\t\t\t<button\n\t\t\t\t\tclassName=\"pin-button\"\n\t\t\t\t\tonClick={() => onTogglePinTask(state, id)}\n\t\t\t\t\tid={`pinTask-${id}`}\n\t\t\t\t\taria-label={state === \"TASK_PINNED\" ? \"unpin\" : \"pin\"}\n\t\t\t\t\tkey={`pinTask-${id}`}\n\t\t\t\t>\n\t\t\t\t\t<span className={`icon-star`} />\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import { Task, type TaskProps } from \"./task\";\n\nexport interface TaskListProps {\n\tloading?: boolean;\n\ttasks: TaskProps[\"task\"][];\n\tonTogglePinTask: TaskProps[\"onTogglePinTask\"];\n\tonArchiveTask: TaskProps[\"onArchiveTask\"];\n\tonEditTitle: TaskProps[\"onEditTitle\"];\n\tonDeleteTask: TaskProps[\"onDeleteTask\"];\n}\n\nexport function TaskList(props: TaskListProps) {\n\tconst { loading = false, tasks, onTogglePinTask, onArchiveTask, onEditTitle, onDeleteTask } = props;\n\n\tconst events = {\n\t\tonTogglePinTask,\n\t\tonArchiveTask,\n\t\tonEditTitle,\n\t\tonDeleteTask,\n\t};\n\n\tconst LoadingRow = (\n\t\t<div className=\"loading-item\" data-testid=\"loading-item\">\n\t\t\t<span className=\"glow-checkbox\" />\n\t\t\t<span className=\"glow-text\">\n\t\t\t\t<span>Loading</span> <span>cool</span> <span>state</span>\n\t\t\t</span>\n\t\t</div>\n\t);\n\n\tif (loading) {\n\t\treturn (\n\t\t\t<div className=\"list-items\" data-testid=\"loading\" key=\"loading\">\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (tasks.length === 0) {\n\t\treturn (\n\t\t\t<div className=\"list-items\" key={\"empty\"} data-testid=\"empty\">\n\t\t\t\t<div className=\"wrapper-message\">\n\t\t\t\t\t<span className=\"icon-check\" />\n\t\t\t\t\t<p className=\"title-message\">You have no tasks</p>\n\t\t\t\t\t<p className=\"subtitle-message\">Sit back and relax</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst tasksInOrder = [\n\t\t...tasks.filter((t) => t.state === \"TASK_PINNED\"),\n\t\t...tasks.filter((t) => t.state !== \"TASK_PINNED\"),\n\t];\n\n\treturn (\n\t\t<div className=\"list-items\" data-testid=\"success\" key={\"success\"} role=\"list\" aria-label=\"tasks\">\n\t\t\t{tasksInOrder.map((task) => (\n\t\t\t\t<Task key={task.id} task={task} {...events} />\n\t\t\t))}\n\t\t</div>\n\t);\n}\n","import * as React from \"react\";\n\ninterface Task {\n\tid: string;\n\ttitle: string;\n\tstate: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\";\n\t// [key: string]: any; // Allow any additional properties\n}\n\nexport interface TaskResponse {\n\ttasks: Task[];\n}\n\nconst getTasks = (options: RequestInit): Promise<TaskResponse> => fetch(\"/tasks\", options).then((res) => res.json());\n\nconst updateTask = (tasks: Task[], id: string, updatedTask: Partial<Task>): Task[] =>\n\ttasks.map((task) => (task.id === id ? { ...task, ...updatedTask } : task));\n\nconst deleteTask = (tasks: Task[], id: string): Task[] => tasks.filter((task) => task.id !== id);\n\nexport type TaskAction =\n\t| { type: \"UPDATE_TASKS\"; tasks: Task[] }\n\t| { type: \"ARCHIVE_TASK\"; id: string }\n\t| { type: \"PIN_TASK\"; id: string }\n\t| { type: \"INBOX_TASK\"; id: string }\n\t| { type: \"DELETE_TASK\"; id: string }\n\t| { type: \"EDIT_TITLE\"; id: string; title: string };\n\nexport function reducer(tasks: Task[], action: TaskAction): Task[] {\n\tswitch (action.type) {\n\t\tcase \"UPDATE_TASKS\":\n\t\t\treturn action.tasks;\n\t\tcase \"ARCHIVE_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_ARCHIVED\" });\n\t\tcase \"PIN_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_PINNED\" });\n\t\tcase \"INBOX_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_INBOX\" });\n\t\tcase \"DELETE_TASK\":\n\t\t\treturn deleteTask(tasks, action.id);\n\t\tcase \"EDIT_TITLE\":\n\t\t\treturn updateTask(tasks, action.id, { title: action.title });\n\t\tdefault:\n\t\t\t// c8 ignore next\n\t\t\treturn tasks;\n\t}\n}\n\nexport function useTasks(): [Task[], React.Dispatch<TaskAction>] {\n\tconst [tasks, dispatch] = React.useReducer(reducer, []);\n\n\tReact.useEffect(() => {\n\t\tconst abortController = new AbortController();\n\t\tconst signal = abortController.signal;\n\n\t\tgetTasks({ signal })\n\t\t\t.then(({ tasks }) => {\n\t\t\t\tdispatch({ type: \"UPDATE_TASKS\", tasks });\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\t// c8 ignore next 3 — requires a network-level fetch rejection, not an HTTP error response\n\t\t\t\tif (!abortController.signal.aborted) {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn () => {\n\t\t\tabortController.abort();\n\t\t};\n\t}, []);\n\n\treturn [tasks, dispatch];\n}\n","import { TaskList, useTasks } from \"../tasks\";\n\nexport interface InboxProps {\n\terror?: string;\n}\n\ntype TaskState = \"TASK_PINNED\" | \"TASK_INBOX\" | \"TASK_ARCHIVED\";\n\nexport function Inbox(props: InboxProps) {\n\tconst { error = \"\" } = props;\n\n\tconst [tasks, dispatch] = useTasks();\n\n\t// Archive or move the task back to inbox\n\tconst archiveTask = (actionType: \"ARCHIVE_TASK\" | \"INBOX_TASK\", id: string) => {\n\t\tdispatch({ type: actionType, id });\n\t};\n\n\t// Delete task by id\n\tconst deleteTask = (id: string) => {\n\t\tdispatch({ type: \"DELETE_TASK\", id });\n\t};\n\n\t// Toggle between pinning and unpinning the task\n\tconst togglePinTask = (state: TaskState, id: string) => {\n\t\tdispatch({\n\t\t\ttype: state === \"TASK_PINNED\" ? \"INBOX_TASK\" : \"PIN_TASK\",\n\t\t\tid,\n\t\t});\n\t};\n\n\t// Edit task title\n\tconst editTitle = (title: string, id: string) => {\n\t\tdispatch({ type: \"EDIT_TITLE\", id, title });\n\t};\n\n\tif (error) {\n\t\treturn (\n\t\t\t<div className=\"page lists-show\">\n\t\t\t\t<div className=\"wrapper-message\">\n\t\t\t\t\t<span className=\"icon-face-sad\" />\n\t\t\t\t\t<p className=\"title-message\">Oh no!</p>\n\t\t\t\t\t<p className=\"subtitle-message\">Something went wrong</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"page lists-show\">\n\t\t\t<nav>\n\t\t\t\t<h1 className=\"title-page\">Taskbox</h1>\n\t\t\t</nav>\n\t\t\t<TaskList\n\t\t\t\ttasks={tasks}\n\t\t\t\tonArchiveTask={archiveTask}\n\t\t\t\tonTogglePinTask={togglePinTask}\n\t\t\t\tonEditTitle={editTitle}\n\t\t\t\tonDeleteTask={deleteTask}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","import \"./login.css\";\n\nimport type { Credentials } from \"../auth\";\n\nexport interface LoginFormProps {\n\tonSubmit: (formData: Credentials) => void;\n}\n\nexport function LoginForm(props: LoginFormProps) {\n\tconst { onSubmit, ...rest } = props;\n\n\treturn (\n\t\t<form\n\t\t\tclassName=\"login-form-container\"\n\t\t\tonSubmit={(event) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst elementsArray = Array.from(event.currentTarget.elements) as HTMLInputElement[];\n\t\t\t\tconst formData = elementsArray.reduce((acc: Partial<Credentials>, elem: HTMLInputElement) => {\n\t\t\t\t\tif (elem.name) {\n\t\t\t\t\t\tacc[elem.name as keyof Credentials] = elem.value;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} as Partial<Credentials>);\n\n\t\t\t\t// Ensure `formData` includes both `username` and `password` before calling `onSubmit`\n\t\t\t\tif (formData.username && formData.password) {\n\t\t\t\t\tonSubmit(formData as Credentials); // Type assertion to `Credentials`\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error(\"Both username and password are required.\");\n\t\t\t\t}\n\t\t\t}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<div className=\"login-form-wrapper\">\n\t\t\t\t<div role=\"group\" className=\"login-form-group\">\n\t\t\t\t\t<label htmlFor=\"email\" id=\"email-label\" className=\"login-form-label\">\n\t\t\t\t\t\tEmail address\n\t\t\t\t\t</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\tid=\"username\"\n\t\t\t\t\t\tautoComplete=\"email\"\n\t\t\t\t\t\trequired\n\t\t\t\t\t\taria-required=\"true\"\n\t\t\t\t\t\tclassName=\"login-form-input\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div role=\"group\" className=\"login-form-group\">\n\t\t\t\t<label id=\"password-label\" htmlFor=\"password\" className=\"login-form-label\">\n\t\t\t\t\tPassword\n\t\t\t\t</label>\n\t\t\t\t<input\n\t\t\t\t\tname=\"password\"\n\t\t\t\t\ttype=\"password\"\n\t\t\t\t\tid=\"password\"\n\t\t\t\t\trequired\n\t\t\t\t\taria-required=\"true\"\n\t\t\t\t\tclassName=\"login-form-input\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<button type=\"submit\" className=\"submit-button\">\n\t\t\t\tSign in\n\t\t\t</button>\n\t\t</form>\n\t);\n}\n\nexport interface LoginProps {\n\tonLogIn: (credentials: Credentials) => void;\n}\n\nexport function Login(props: LoginProps) {\n\treturn (\n\t\t<div className=\"page lists-show\">\n\t\t\t<div className=\"loginscreen\">\n\t\t\t\t<div className=\"login-screen-container\">\n\t\t\t\t\t<header className=\"loginscreen-header\">\n\t\t\t\t\t\t<h1 className=\"loginscreen-heading\">Taskbox</h1>\n\t\t\t\t\t\t<p className=\"loginscreen-text\">Sign in to your account</p>\n\t\t\t\t\t</header>\n\t\t\t\t\t<LoginForm onSubmit={props.onLogIn} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"x_google_ignoreList":[1,2,3],"mappings":";;;;;;;;AAoBA,SAAS,EAAa,GAA6C;CAClE,OAAO,MAAM,iBAAiB;EAC7B,QAAQ;EACR,GAAG;CACJ,CAAC,CAAC,CAAC,MAAM,MAAQ,EAAI,KAAK,CAAC;AAC5B;AAMA,SAAS,EAAQ,GAAmB,GAAiC;CACpE,QAAQ,EAAO,MAAf;EACC,KAAK,UACJ,OAAO,EAAO;EACf,KAAK,WACJ,OAAO;EACR,SACC,OAAO;CACT;AACD;AAQA,SAAgB,IA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AAA,GAAA,iBAAA,GAAA,EAAA,IAAA,CAAC,GAAD,EAAW,UAAU,EAAM,QAAU,CAAA,CACjC;;EACD,CAAA;CACD,CAAA;AAEP"}
|
|
1
|
+
{"version":3,"file":"react-template.es.js","names":[],"sources":["../src/auth/use-auth.ts","../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/.pnpm/react@19.2.8/node_modules/react/jsx-runtime.js","../src/tasks/task.tsx","../src/tasks/task-list.tsx","../src/tasks/use-tasks.ts","../src/inbox/inbox.tsx","../src/login/login.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nexport interface AuthOptions {\n\theaders?: { [key: string]: string };\n\tbody?: string;\n}\n\nexport interface User {\n\tid: string;\n\tname: string;\n\ttoken?: string;\n\t// [key: string]: any; // Allow any additional user properties\n}\n\nexport interface AuthResponse {\n\tuser: User;\n}\n\nfunction authenticate(options: AuthOptions): Promise<AuthResponse> {\n\treturn fetch(\"/authenticate\", {\n\t\tmethod: \"POST\",\n\t\t...options,\n\t}).then((res) => res.json());\n}\n\n// Define the action type for the reducer\ntype AuthAction = { type: \"LOG_IN\"; user: User } | { type: \"LOG_OUT\" };\n\n// Reducer function for managing user state\nfunction reducer(user: User | null, action: AuthAction): User | null {\n\tswitch (action.type) {\n\t\tcase \"LOG_IN\":\n\t\t\treturn action.user;\n\t\tcase \"LOG_OUT\":\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn user;\n\t}\n}\n\n// Define the credentials type for login\nexport interface Credentials {\n\tusername: string;\n\tpassword: string;\n}\n\nexport function useAuth(): [User | null, (credentials: Credentials) => void] {\n\tconst [user, dispatch] = React.useReducer(reducer, null);\n\n\tconst logIn = ({ username, password }: Credentials) => {\n\t\tauthenticate({ body: JSON.stringify({ username, password }) })\n\t\t\t.then(({ user }) => {\n\t\t\t\tdispatch({ type: \"LOG_IN\", user });\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.log(error);\n\t\t\t});\n\t};\n\n\treturn [user, logIn];\n}\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export interface TaskProps {\n\ttask: {\n\t\tid: string;\n\t\ttitle: string;\n\t\tstate: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\";\n\t};\n\tonArchiveTask: (archive: \"ARCHIVE_TASK\", id: string) => void;\n\tonTogglePinTask: (state: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\", id: string) => void;\n\tonEditTitle: (title: string, id: string) => void;\n\tonDeleteTask: (id: string) => void;\n}\n\nexport function Task (props: TaskProps) {\n\tconst {\n\t\ttask: { id, title, state },\n\t\tonArchiveTask,\n\t\tonTogglePinTask,\n\t\tonEditTitle,\n\t\tonDeleteTask,\n\t} = props;\n\n\treturn (\n\t\t<div className={`list-item ${state}`} role=\"listitem\" aria-label={`task-${id}`}>\n\t\t\t<label htmlFor=\"checked\" aria-label={`archiveTask-${id}`} className=\"checkbox\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tdisabled={true}\n\t\t\t\t\tname=\"checked\"\n\t\t\t\t\tid={`archiveTask-${id}`}\n\t\t\t\t\tchecked={state === \"TASK_ARCHIVED\"}\n\t\t\t\t/>\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"checkbox-custom\"\n\t\t\t\t\tonClick={() => onArchiveTask(\"ARCHIVE_TASK\", id)}\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\taria-label={`archiveButton-${id}`}\n\t\t\t\t/>\n\t\t\t</label>\n\n\t\t\t<label htmlFor=\"title\" aria-label={title} className=\"title\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tvalue={title}\n\t\t\t\t\tname=\"title\"\n\t\t\t\t\tplaceholder=\"Input title\"\n\t\t\t\t\tstyle={{ textOverflow: \"ellipsis\" }}\n\t\t\t\t\tonChange={(e) => onEditTitle(e.target.value, id)}\n\t\t\t\t/>\n\t\t\t</label>\n\t\t\t<button\n\t\t\t\taria-label=\"delete\"\n\t\t\t\tclassName=\"delete-button\"\n\t\t\t\tonClick={() => onDeleteTask(id)}\n\t\t\t>\n\t\t\t\t<span className=\"icon-trash\" />\n\t\t\t</button>\n\t\t\t{state !== \"TASK_ARCHIVED\" && (\n\t\t\t\t<button\n\t\t\t\t\tclassName=\"pin-button\"\n\t\t\t\t\tonClick={() => onTogglePinTask(state, id)}\n\t\t\t\t\tid={`pinTask-${id}`}\n\t\t\t\t\taria-label={state === \"TASK_PINNED\" ? \"unpin\" : \"pin\"}\n\t\t\t\t\tkey={`pinTask-${id}`}\n\t\t\t\t>\n\t\t\t\t\t<span className={`icon-star`} />\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import { Task, type TaskProps } from \"./task\";\n\nexport interface TaskListProps {\n\tloading?: boolean;\n\ttasks: TaskProps[\"task\"][];\n\tonTogglePinTask: TaskProps[\"onTogglePinTask\"];\n\tonArchiveTask: TaskProps[\"onArchiveTask\"];\n\tonEditTitle: TaskProps[\"onEditTitle\"];\n\tonDeleteTask: TaskProps[\"onDeleteTask\"];\n}\n\nexport function TaskList(props: TaskListProps) {\n\tconst { loading = false, tasks, onTogglePinTask, onArchiveTask, onEditTitle, onDeleteTask } = props;\n\n\tconst events = {\n\t\tonTogglePinTask,\n\t\tonArchiveTask,\n\t\tonEditTitle,\n\t\tonDeleteTask,\n\t};\n\n\tconst LoadingRow = (\n\t\t<div className=\"loading-item\" data-testid=\"loading-item\">\n\t\t\t<span className=\"glow-checkbox\" />\n\t\t\t<span className=\"glow-text\">\n\t\t\t\t<span>Loading</span> <span>cool</span> <span>state</span>\n\t\t\t</span>\n\t\t</div>\n\t);\n\n\tif (loading) {\n\t\treturn (\n\t\t\t<div className=\"list-items\" data-testid=\"loading\" key=\"loading\">\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t\t{LoadingRow}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (tasks.length === 0) {\n\t\treturn (\n\t\t\t<div className=\"list-items\" key={\"empty\"} data-testid=\"empty\">\n\t\t\t\t<div className=\"wrapper-message\">\n\t\t\t\t\t<span className=\"icon-check\" />\n\t\t\t\t\t<p className=\"title-message\">You have no tasks</p>\n\t\t\t\t\t<p className=\"subtitle-message\">Sit back and relax</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst tasksInOrder = [\n\t\t...tasks.filter((t) => t.state === \"TASK_PINNED\"),\n\t\t...tasks.filter((t) => t.state !== \"TASK_PINNED\"),\n\t];\n\n\treturn (\n\t\t<div className=\"list-items\" data-testid=\"success\" key={\"success\"} role=\"list\" aria-label=\"tasks\">\n\t\t\t{tasksInOrder.map((task) => (\n\t\t\t\t<Task key={task.id} task={task} {...events} />\n\t\t\t))}\n\t\t</div>\n\t);\n}\n","import * as React from \"react\";\n\ninterface Task {\n\tid: string;\n\ttitle: string;\n\tstate: \"TASK_INBOX\" | \"TASK_PINNED\" | \"TASK_ARCHIVED\";\n\t// [key: string]: any; // Allow any additional properties\n}\n\nexport interface TaskResponse {\n\ttasks: Task[];\n}\n\nconst getTasks = (options: RequestInit): Promise<TaskResponse> => fetch(\"/tasks\", options).then((res) => res.json());\n\nconst updateTask = (tasks: Task[], id: string, updatedTask: Partial<Task>): Task[] =>\n\ttasks.map((task) => (task.id === id ? { ...task, ...updatedTask } : task));\n\nconst deleteTask = (tasks: Task[], id: string): Task[] => tasks.filter((task) => task.id !== id);\n\nexport type TaskAction =\n\t| { type: \"UPDATE_TASKS\"; tasks: Task[] }\n\t| { type: \"ARCHIVE_TASK\"; id: string }\n\t| { type: \"PIN_TASK\"; id: string }\n\t| { type: \"INBOX_TASK\"; id: string }\n\t| { type: \"DELETE_TASK\"; id: string }\n\t| { type: \"EDIT_TITLE\"; id: string; title: string };\n\nexport function reducer(tasks: Task[], action: TaskAction): Task[] {\n\tswitch (action.type) {\n\t\tcase \"UPDATE_TASKS\":\n\t\t\treturn action.tasks;\n\t\tcase \"ARCHIVE_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_ARCHIVED\" });\n\t\tcase \"PIN_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_PINNED\" });\n\t\tcase \"INBOX_TASK\":\n\t\t\treturn updateTask(tasks, action.id, { state: \"TASK_INBOX\" });\n\t\tcase \"DELETE_TASK\":\n\t\t\treturn deleteTask(tasks, action.id);\n\t\tcase \"EDIT_TITLE\":\n\t\t\treturn updateTask(tasks, action.id, { title: action.title });\n\t\tdefault:\n\t\t\t// c8 ignore next\n\t\t\treturn tasks;\n\t}\n}\n\nexport function useTasks(): [Task[], React.Dispatch<TaskAction>] {\n\tconst [tasks, dispatch] = React.useReducer(reducer, []);\n\n\tReact.useEffect(() => {\n\t\tconst abortController = new AbortController();\n\t\tconst signal = abortController.signal;\n\n\t\tgetTasks({ signal })\n\t\t\t.then(({ tasks }) => {\n\t\t\t\tdispatch({ type: \"UPDATE_TASKS\", tasks });\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\t// c8 ignore next 3 — requires a network-level fetch rejection, not an HTTP error response\n\t\t\t\tif (!abortController.signal.aborted) {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn () => {\n\t\t\tabortController.abort();\n\t\t};\n\t}, []);\n\n\treturn [tasks, dispatch];\n}\n","import { TaskList, useTasks } from \"../tasks\";\n\nexport interface InboxProps {\n\terror?: string;\n}\n\ntype TaskState = \"TASK_PINNED\" | \"TASK_INBOX\" | \"TASK_ARCHIVED\";\n\nexport function Inbox(props: InboxProps) {\n\tconst { error = \"\" } = props;\n\n\tconst [tasks, dispatch] = useTasks();\n\n\t// Archive or move the task back to inbox\n\tconst archiveTask = (actionType: \"ARCHIVE_TASK\" | \"INBOX_TASK\", id: string) => {\n\t\tdispatch({ type: actionType, id });\n\t};\n\n\t// Delete task by id\n\tconst deleteTask = (id: string) => {\n\t\tdispatch({ type: \"DELETE_TASK\", id });\n\t};\n\n\t// Toggle between pinning and unpinning the task\n\tconst togglePinTask = (state: TaskState, id: string) => {\n\t\tdispatch({\n\t\t\ttype: state === \"TASK_PINNED\" ? \"INBOX_TASK\" : \"PIN_TASK\",\n\t\t\tid,\n\t\t});\n\t};\n\n\t// Edit task title\n\tconst editTitle = (title: string, id: string) => {\n\t\tdispatch({ type: \"EDIT_TITLE\", id, title });\n\t};\n\n\tif (error) {\n\t\treturn (\n\t\t\t<div className=\"page lists-show\">\n\t\t\t\t<div className=\"wrapper-message\">\n\t\t\t\t\t<span className=\"icon-face-sad\" />\n\t\t\t\t\t<p className=\"title-message\">Oh no!</p>\n\t\t\t\t\t<p className=\"subtitle-message\">Something went wrong</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"page lists-show\">\n\t\t\t<nav>\n\t\t\t\t<h1 className=\"title-page\">Taskbox</h1>\n\t\t\t</nav>\n\t\t\t<TaskList\n\t\t\t\ttasks={tasks}\n\t\t\t\tonArchiveTask={archiveTask}\n\t\t\t\tonTogglePinTask={togglePinTask}\n\t\t\t\tonEditTitle={editTitle}\n\t\t\t\tonDeleteTask={deleteTask}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","import \"./login.css\";\n\nimport type { Credentials } from \"../auth\";\n\nexport interface LoginFormProps {\n\tonSubmit: (formData: Credentials) => void;\n}\n\nexport function LoginForm(props: LoginFormProps) {\n\tconst { onSubmit, ...rest } = props;\n\n\treturn (\n\t\t<form\n\t\t\tclassName=\"login-form-container\"\n\t\t\tonSubmit={(event) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst elementsArray = Array.from(event.currentTarget.elements) as HTMLInputElement[];\n\t\t\t\tconst formData = elementsArray.reduce((acc: Partial<Credentials>, elem: HTMLInputElement) => {\n\t\t\t\t\tif (elem.name) {\n\t\t\t\t\t\tacc[elem.name as keyof Credentials] = elem.value;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} as Partial<Credentials>);\n\n\t\t\t\t// Ensure `formData` includes both `username` and `password` before calling `onSubmit`\n\t\t\t\tif (formData.username && formData.password) {\n\t\t\t\t\tonSubmit(formData as Credentials); // Type assertion to `Credentials`\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error(\"Both username and password are required.\");\n\t\t\t\t}\n\t\t\t}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<div className=\"login-form-wrapper\">\n\t\t\t\t<div role=\"group\" className=\"login-form-group\">\n\t\t\t\t\t<label htmlFor=\"email\" id=\"email-label\" className=\"login-form-label\">\n\t\t\t\t\t\tEmail address\n\t\t\t\t\t</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\tid=\"username\"\n\t\t\t\t\t\tautoComplete=\"email\"\n\t\t\t\t\t\trequired\n\t\t\t\t\t\taria-required=\"true\"\n\t\t\t\t\t\tclassName=\"login-form-input\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div role=\"group\" className=\"login-form-group\">\n\t\t\t\t<label id=\"password-label\" htmlFor=\"password\" className=\"login-form-label\">\n\t\t\t\t\tPassword\n\t\t\t\t</label>\n\t\t\t\t<input\n\t\t\t\t\tname=\"password\"\n\t\t\t\t\ttype=\"password\"\n\t\t\t\t\tid=\"password\"\n\t\t\t\t\trequired\n\t\t\t\t\taria-required=\"true\"\n\t\t\t\t\tclassName=\"login-form-input\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<button type=\"submit\" className=\"submit-button\">\n\t\t\t\tSign in\n\t\t\t</button>\n\t\t</form>\n\t);\n}\n\nexport interface LoginProps {\n\tonLogIn: (credentials: Credentials) => void;\n}\n\nexport function Login(props: LoginProps) {\n\treturn (\n\t\t<div className=\"page lists-show\">\n\t\t\t<div className=\"loginscreen\">\n\t\t\t\t<div className=\"login-screen-container\">\n\t\t\t\t\t<header className=\"loginscreen-header\">\n\t\t\t\t\t\t<h1 className=\"loginscreen-heading\">Taskbox</h1>\n\t\t\t\t\t\t<p className=\"loginscreen-text\">Sign in to your account</p>\n\t\t\t\t\t</header>\n\t\t\t\t\t<LoginForm onSubmit={props.onLogIn} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"x_google_ignoreList":[1,2,3],"mappings":";;;;;;;;AAoBA,SAAS,EAAa,GAA6C;CAClE,OAAO,MAAM,iBAAiB;EAC7B,QAAQ;EACR,GAAG;CACJ,CAAC,CAAC,CAAC,MAAM,MAAQ,EAAI,KAAK,CAAC;AAC5B;AAMA,SAAS,EAAQ,GAAmB,GAAiC;CACpE,QAAQ,EAAO,MAAf;EACC,KAAK,UACJ,OAAO,EAAO;EACf,K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,IAAA,CAAC,KAAD;MAAG,WAAU;MAAmB,UAAA;KAA0B,CAAA,CACnD;IACR,CAAA,GAAA,iBAAA,GAAA,EAAA,IAAA,CAAC,GAAD,EAAW,UAAU,EAAM,QAAU,CAAA,CACjC;;EACD,CAAA;CACD,CAAA;AAEP"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/react-template",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "A modern React template with pre-configured tools, best practices, and CI/CD setup for rapid project development.",
|
|
5
5
|
"homepage": "https://docs.theholocron.dev/react-template/",
|
|
6
6
|
"bugs": "https://github.com/theholocron/react-template/issues",
|
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
"build": "vite build",
|
|
30
30
|
"build:storybook": "storybook build",
|
|
31
31
|
"dev": "vite",
|
|
32
|
+
"docs:build": "astro build",
|
|
33
|
+
"docs:dev": "astro dev",
|
|
34
|
+
"docs:preview": "astro preview",
|
|
32
35
|
"lint": "docker run -e LOG_LEVEL=DEBUG -e RUN_LOCAL=true -v .:/tmp/lint --rm ghcr.io/super-linter/super-linter:latest",
|
|
33
36
|
"prepare": "husky && playwright install chromium",
|
|
34
37
|
"prepreview": "pnpm build --config vite.app.config.ts",
|
|
@@ -42,9 +45,10 @@
|
|
|
42
45
|
"typecheck": "tsc --noEmit"
|
|
43
46
|
},
|
|
44
47
|
"devDependencies": {
|
|
48
|
+
"@astrojs/starlight": "^0.41.7",
|
|
45
49
|
"@chromatic-com/storybook": "^5.2.1",
|
|
46
|
-
"@commitlint/cli": "^
|
|
47
|
-
"@commitlint/config-conventional": "^
|
|
50
|
+
"@commitlint/cli": "^21.2.1",
|
|
51
|
+
"@commitlint/config-conventional": "^21.2.0",
|
|
48
52
|
"@eslint/js": "^10.0.1",
|
|
49
53
|
"@semantic-release/changelog": "^7.0.0",
|
|
50
54
|
"@semantic-release/exec": "^7.1.0",
|
|
@@ -62,21 +66,23 @@
|
|
|
62
66
|
"@storybook/react-vite": "^10.5.6",
|
|
63
67
|
"@testing-library/jest-dom": "^7.0.0",
|
|
64
68
|
"@testing-library/react": "^16.3.0",
|
|
65
|
-
"@theholocron/
|
|
66
|
-
"@theholocron/
|
|
67
|
-
"@theholocron/
|
|
68
|
-
"@theholocron/
|
|
69
|
-
"@theholocron/
|
|
70
|
-
"@theholocron/
|
|
71
|
-
"@theholocron/
|
|
72
|
-
"@theholocron/
|
|
73
|
-
"@theholocron/
|
|
69
|
+
"@theholocron/astro-config": "^7.19.1",
|
|
70
|
+
"@theholocron/cli": "^3.24.3",
|
|
71
|
+
"@theholocron/commitlint-config": "^7.19.1",
|
|
72
|
+
"@theholocron/docs-theme": "^1.3.5",
|
|
73
|
+
"@theholocron/eslint-config": "^7.19.1",
|
|
74
|
+
"@theholocron/holocron-config": "^7.19.1",
|
|
75
|
+
"@theholocron/holocron-plugin-github": "^3.24.3",
|
|
76
|
+
"@theholocron/lighthouse-config": "^7.19.1",
|
|
77
|
+
"@theholocron/lint-staged-config": "^7.19.1",
|
|
78
|
+
"@theholocron/prettier-config": "^7.19.1",
|
|
79
|
+
"@theholocron/semantic-release-config": "^7.19.1",
|
|
74
80
|
"@theholocron/skills": "^1.3.2",
|
|
75
|
-
"@theholocron/storybook-config": "^7.
|
|
76
|
-
"@theholocron/stylelint-config": "^7.
|
|
77
|
-
"@theholocron/tsconfig": "^7.
|
|
78
|
-
"@theholocron/vite-config": "^7.
|
|
79
|
-
"@theholocron/vitest-config": "^7.
|
|
81
|
+
"@theholocron/storybook-config": "^7.19.1",
|
|
82
|
+
"@theholocron/stylelint-config": "^7.19.1",
|
|
83
|
+
"@theholocron/tsconfig": "^7.19.1",
|
|
84
|
+
"@theholocron/vite-config": "^7.19.1",
|
|
85
|
+
"@theholocron/vitest-config": "^7.19.1",
|
|
80
86
|
"@types/react": "^19.2.18",
|
|
81
87
|
"@types/react-dom": "^19.2.4",
|
|
82
88
|
"@vitejs/plugin-react": "^6.0.5",
|
|
@@ -84,6 +90,7 @@
|
|
|
84
90
|
"@vitest/coverage-v8": "^4.1.10",
|
|
85
91
|
"@vitest/eslint-plugin": "^1.6.26",
|
|
86
92
|
"alex": "^11.0.1",
|
|
93
|
+
"astro": "^7.2.0",
|
|
87
94
|
"axe-playwright": "^2.1.0",
|
|
88
95
|
"conventional-changelog-conventionalcommits": "^10.2.1",
|
|
89
96
|
"cypress": "^15.19.0",
|
|
@@ -130,7 +137,11 @@
|
|
|
130
137
|
"cypress",
|
|
131
138
|
"esbuild",
|
|
132
139
|
"msw"
|
|
133
|
-
]
|
|
140
|
+
],
|
|
141
|
+
"overrides": {
|
|
142
|
+
"@commitlint/config-conventional>conventional-changelog-conventionalcommits": "7",
|
|
143
|
+
"conventional-changelog-conventionalcommits": "10.2.1"
|
|
144
|
+
}
|
|
134
145
|
},
|
|
135
146
|
"msw": {
|
|
136
147
|
"workerDirectory": [
|