@theholocron/react-template 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,361 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+
4
+ /**
5
+ * Mock Service Worker.
6
+ * @see https://github.com/mswjs/msw
7
+ * - Please do NOT modify this file.
8
+ */
9
+
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 (
102
+ event.request.cache === 'only-if-cached' &&
103
+ event.request.mode !== 'same-origin'
104
+ ) {
105
+ return
106
+ }
107
+
108
+ // Bypass all requests when there are no active clients.
109
+ // Prevents the self-unregistered worked from handling requests
110
+ // after it's been terminated (still remains active until the next reload).
111
+ if (activeClientIds.size === 0) {
112
+ return
113
+ }
114
+
115
+ const requestId = crypto.randomUUID()
116
+ event.respondWith(handleRequest(event, requestId, requestInterceptedAt))
117
+ })
118
+
119
+ /**
120
+ * @param {FetchEvent} event
121
+ * @param {string} requestId
122
+ * @param {number} requestInterceptedAt
123
+ */
124
+ async function handleRequest(event, requestId, requestInterceptedAt) {
125
+ const client = await resolveMainClient(event)
126
+ const requestCloneForEvents = event.request.clone()
127
+ const response = await getResponse(
128
+ event,
129
+ client,
130
+ requestId,
131
+ requestInterceptedAt,
132
+ )
133
+
134
+ // Send back the response clone for the "response:*" life-cycle events.
135
+ // Ensure MSW is active and ready to handle the message, otherwise
136
+ // this message will pend indefinitely.
137
+ if (client && activeClientIds.has(client.id)) {
138
+ const serializedRequest = await serializeRequest(requestCloneForEvents)
139
+
140
+ // Omit the body of server-sent event stream responses.
141
+ // Cloning such responses would prevent client-side stream cancelations
142
+ // from reaching the original stream (a teed stream only cancels its
143
+ // source once both of its branches cancel) and would buffer the
144
+ // entire stream into the unconsumed clone indefinitely.
145
+ const isEventStreamResponse = response.headers
146
+ .get('content-type')
147
+ ?.toLowerCase()
148
+ .startsWith('text/event-stream')
149
+
150
+ // Clone the response so both the client and the library could consume it.
151
+ const responseClone = isEventStreamResponse ? null : response.clone()
152
+
153
+ sendToClient(
154
+ client,
155
+ {
156
+ type: 'RESPONSE',
157
+ payload: {
158
+ isMockedResponse: IS_MOCKED_RESPONSE in response,
159
+ request: {
160
+ id: requestId,
161
+ ...serializedRequest,
162
+ },
163
+ response: {
164
+ type: response.type,
165
+ status: response.status,
166
+ statusText: response.statusText,
167
+ headers: Object.fromEntries(response.headers.entries()),
168
+ body: responseClone ? responseClone.body : null,
169
+ },
170
+ },
171
+ },
172
+ responseClone && responseClone.body
173
+ ? [serializedRequest.body, responseClone.body]
174
+ : [],
175
+ )
176
+ }
177
+
178
+ return response
179
+ }
180
+
181
+ /**
182
+ * Resolve the main client for the given event.
183
+ * Client that issues a request doesn't necessarily equal the client
184
+ * that registered the worker. It's with the latter the worker should
185
+ * communicate with during the response resolving phase.
186
+ * @param {FetchEvent} event
187
+ * @returns {Promise<Client | undefined>}
188
+ */
189
+ async function resolveMainClient(event) {
190
+ const client = await self.clients.get(event.clientId)
191
+
192
+ if (activeClientIds.has(event.clientId)) {
193
+ return client
194
+ }
195
+
196
+ if (client?.frameType === 'top-level') {
197
+ return client
198
+ }
199
+
200
+ const allClients = await self.clients.matchAll({
201
+ type: 'window',
202
+ })
203
+
204
+ return allClients
205
+ .filter((client) => {
206
+ // Get only those clients that are currently visible.
207
+ return client.visibilityState === 'visible'
208
+ })
209
+ .find((client) => {
210
+ // Find the client ID that's recorded in the
211
+ // set of clients that have registered the worker.
212
+ return activeClientIds.has(client.id)
213
+ })
214
+ }
215
+
216
+ /**
217
+ * @param {FetchEvent} event
218
+ * @param {Client | undefined} client
219
+ * @param {string} requestId
220
+ * @param {number} requestInterceptedAt
221
+ * @returns {Promise<Response>}
222
+ */
223
+ async function getResponse(event, client, requestId, requestInterceptedAt) {
224
+ // Clone the request because it might've been already used
225
+ // (i.e. its body has been read and sent to the client).
226
+ const requestClone = event.request.clone()
227
+
228
+ function passthrough() {
229
+ // Cast the request headers to a new Headers instance
230
+ // so the headers can be manipulated with.
231
+ const headers = new Headers(requestClone.headers)
232
+
233
+ // Remove the "accept" header value that marked this request as passthrough.
234
+ // This prevents request alteration and also keeps it compliant with the
235
+ // user-defined CORS policies.
236
+ const acceptHeader = headers.get('accept')
237
+ if (acceptHeader) {
238
+ const values = acceptHeader.split(',').map((value) => value.trim())
239
+ const filteredValues = values.filter(
240
+ (value) => value !== 'msw/passthrough',
241
+ )
242
+
243
+ if (filteredValues.length > 0) {
244
+ headers.set('accept', filteredValues.join(', '))
245
+ } else {
246
+ headers.delete('accept')
247
+ }
248
+ }
249
+
250
+ return fetch(requestClone, { headers })
251
+ }
252
+
253
+ // Bypass mocking when the client is not active.
254
+ if (!client) {
255
+ return passthrough()
256
+ }
257
+
258
+ // Bypass initial page load requests (i.e. static assets).
259
+ // The absence of the immediate/parent client in the map of the active clients
260
+ // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
261
+ // and is not ready to handle requests.
262
+ if (!activeClientIds.has(client.id)) {
263
+ return passthrough()
264
+ }
265
+
266
+ // Notify the client that a request has been intercepted.
267
+ const serializedRequest = await serializeRequest(event.request)
268
+ const clientMessage = await sendToClient(
269
+ client,
270
+ {
271
+ type: 'REQUEST',
272
+ payload: {
273
+ id: requestId,
274
+ interceptedAt: requestInterceptedAt,
275
+ ...serializedRequest,
276
+ },
277
+ },
278
+ [serializedRequest.body],
279
+ )
280
+
281
+ switch (clientMessage.type) {
282
+ case 'MOCK_RESPONSE': {
283
+ return respondWithMock(clientMessage.data)
284
+ }
285
+
286
+ case 'PASSTHROUGH': {
287
+ return passthrough()
288
+ }
289
+ }
290
+
291
+ return passthrough()
292
+ }
293
+
294
+ /**
295
+ * @param {Client} client
296
+ * @param {any} message
297
+ * @param {Array<Transferable>} transferrables
298
+ * @returns {Promise<any>}
299
+ */
300
+ function sendToClient(client, message, transferrables = []) {
301
+ return new Promise((resolve, reject) => {
302
+ const channel = new MessageChannel()
303
+
304
+ channel.port1.onmessage = (event) => {
305
+ if (event.data && event.data.error) {
306
+ return reject(event.data.error)
307
+ }
308
+
309
+ resolve(event.data)
310
+ }
311
+
312
+ client.postMessage(message, [
313
+ channel.port2,
314
+ ...transferrables.filter(Boolean),
315
+ ])
316
+ })
317
+ }
318
+
319
+ /**
320
+ * @param {Response} response
321
+ * @returns {Response}
322
+ */
323
+ function respondWithMock(response) {
324
+ // Setting response status code to 0 is a no-op.
325
+ // However, when responding with a "Response.error()", the produced Response
326
+ // instance will have status code set to 0. Since it's not possible to create
327
+ // a Response instance with status code 0, handle that use-case separately.
328
+ if (response.status === 0) {
329
+ return Response.error()
330
+ }
331
+
332
+ const mockedResponse = new Response(response.body, response)
333
+
334
+ Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
335
+ value: true,
336
+ enumerable: true,
337
+ })
338
+
339
+ return mockedResponse
340
+ }
341
+
342
+ /**
343
+ * @param {Request} request
344
+ */
345
+ async function serializeRequest(request) {
346
+ return {
347
+ url: request.url,
348
+ mode: request.mode,
349
+ method: request.method,
350
+ headers: Object.fromEntries(request.headers.entries()),
351
+ cache: request.cache,
352
+ credentials: request.credentials,
353
+ destination: request.destination,
354
+ integrity: request.integrity,
355
+ redirect: request.redirect,
356
+ referrer: request.referrer,
357
+ referrerPolicy: request.referrerPolicy,
358
+ body: await request.arrayBuffer(),
359
+ keepalive: request.keepalive,
360
+ }
361
+ }
@@ -0,0 +1,7 @@
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
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require("react"),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),h=o(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?p():m()}))();function g(e){let{task:{id:t,title:n,state:r},onArchiveTask:i,onTogglePinTask:a,onEditTitle:o,onDeleteTask:s}=e;return(0,h.jsxs)(`div`,{className:`list-item ${r}`,role:`listitem`,"aria-label":`task-${t}`,children:[(0,h.jsxs)(`label`,{htmlFor:`checked`,"aria-label":`archiveTask-${t}`,className:`checkbox`,children:[(0,h.jsx)(`input`,{type:`checkbox`,disabled:!0,name:`checked`,id:`archiveTask-${t}`,checked:r===`TASK_ARCHIVED`}),(0,h.jsx)(`span`,{className:`checkbox-custom`,onClick:()=>i(`ARCHIVE_TASK`,t),role:`button`,"aria-label":`archiveButton-${t}`})]}),(0,h.jsx)(`label`,{htmlFor:`title`,"aria-label":n,className:`title`,children:(0,h.jsx)(`input`,{type:`text`,value:n,name:`title`,placeholder:`Input title`,style:{textOverflow:`ellipsis`},onChange:e=>o(e.target.value,t)})}),(0,h.jsx)(`button`,{"aria-label":`delete`,className:`delete-button`,onClick:()=>s(t),children:(0,h.jsx)(`span`,{className:`icon-trash`})}),r!==`TASK_ARCHIVED`&&(0,h.jsx)(`button`,{className:`pin-button`,onClick:()=>a(r,t),id:`pinTask-${t}`,"aria-label":r===`TASK_PINNED`?`unpin`:`pin`,children:(0,h.jsx)(`span`,{className:`icon-star`})},`pinTask-${t}`)]})}function _(e){let{loading:t=!1,tasks:n,onTogglePinTask:r,onArchiveTask:i,onEditTitle:a,onDeleteTask:o}=e,s={onTogglePinTask:r,onArchiveTask:i,onEditTitle:a,onDeleteTask:o},c=(0,h.jsxs)(`div`,{className:`loading-item`,"data-testid":`loading-item`,children:[(0,h.jsx)(`span`,{className:`glow-checkbox`}),(0,h.jsxs)(`span`,{className:`glow-text`,children:[(0,h.jsx)(`span`,{children:`Loading`}),` `,(0,h.jsx)(`span`,{children:`cool`}),` `,(0,h.jsx)(`span`,{children:`state`})]})]});if(t)return(0,h.jsxs)(`div`,{className:`list-items`,"data-testid":`loading`,children:[c,c,c,c,c,c]},`loading`);if(n.length===0)return(0,h.jsx)(`div`,{className:`list-items`,"data-testid":`empty`,children:(0,h.jsxs)(`div`,{className:`wrapper-message`,children:[(0,h.jsx)(`span`,{className:`icon-check`}),(0,h.jsx)(`p`,{className:`title-message`,children:`You have no tasks`}),(0,h.jsx)(`p`,{className:`subtitle-message`,children:`Sit back and relax`})]})},`empty`);let l=[...n.filter(e=>e.state===`TASK_PINNED`),...n.filter(e=>e.state!==`TASK_PINNED`)];return(0,h.jsx)(`div`,{className:`list-items`,"data-testid":`success`,role:`list`,"aria-label":`tasks`,children:l.map(e=>(0,h.jsx)(g,{task:e,...s},e.id))},`success`)}var v=e=>fetch(`/tasks`,e).then(e=>e.json()),y=(e,t,n)=>e.map(e=>e.id===t?{...e,...n}:e),b=(e,t)=>e.filter(e=>e.id!==t);function x(e,t){switch(t.type){case`UPDATE_TASKS`:return t.tasks;case`ARCHIVE_TASK`:return y(e,t.id,{state:`TASK_ARCHIVED`});case`PIN_TASK`:return y(e,t.id,{state:`TASK_PINNED`});case`INBOX_TASK`:return y(e,t.id,{state:`TASK_INBOX`});case`DELETE_TASK`:return b(e,t.id);case`EDIT_TITLE`:return y(e,t.id,{title:t.title});default:return e}}function S(){let[e,t]=l.useReducer(x,[]);return l.useEffect(()=>{let e=new AbortController,n=e.signal;return v({signal:n}).then(({tasks:e})=>{t({type:`UPDATE_TASKS`,tasks:e})}).catch(t=>{e.signal.aborted||console.log(t)}),()=>{e.abort()}},[]),[e,t]}function C(e){let{error:t=``}=e,[n,r]=S();return t?(0,h.jsx)(`div`,{className:`page lists-show`,children:(0,h.jsxs)(`div`,{className:`wrapper-message`,children:[(0,h.jsx)(`span`,{className:`icon-face-sad`}),(0,h.jsx)(`p`,{className:`title-message`,children:`Oh no!`}),(0,h.jsx)(`p`,{className:`subtitle-message`,children:`Something went wrong`})]})}):(0,h.jsxs)(`div`,{className:`page lists-show`,children:[(0,h.jsx)(`nav`,{children:(0,h.jsx)(`h1`,{className:`title-page`,children:`Taskbox`})}),(0,h.jsx)(_,{tasks:n,onArchiveTask:(e,t)=>{r({type:e,id:t})},onTogglePinTask:(e,t)=>{r({type:e===`TASK_PINNED`?`INBOX_TASK`:`PIN_TASK`,id:t})},onEditTitle:(e,t)=>{r({type:`EDIT_TITLE`,id:t,title:e})},onDeleteTask:e=>{r({type:`DELETE_TASK`,id:e})}})]})}function w(e){let{onSubmit:t,...n}=e;return(0,h.jsxs)(`form`,{className:`login-form-container`,onSubmit:e=>{e.preventDefault();let n=Array.from(e.currentTarget.elements).reduce((e,t)=>(t.name&&(e[t.name]=t.value),e),{});n.username&&n.password?t(n):console.error(`Both username and password are required.`)},...n,children:[(0,h.jsx)(`div`,{className:`login-form-wrapper`,children:(0,h.jsxs)(`div`,{role:`group`,className:`login-form-group`,children:[(0,h.jsx)(`label`,{htmlFor:`email`,id:`email-label`,className:`login-form-label`,children:`Email address`}),(0,h.jsx)(`input`,{name:`username`,type:`email`,id:`username`,autoComplete:`email`,required:!0,"aria-required":`true`,className:`login-form-input`})]})}),(0,h.jsxs)(`div`,{role:`group`,className:`login-form-group`,children:[(0,h.jsx)(`label`,{id:`password-label`,htmlFor:`password`,className:`login-form-label`,children:`Password`}),(0,h.jsx)(`input`,{name:`password`,type:`password`,id:`password`,required:!0,"aria-required":`true`,className:`login-form-input`})]}),(0,h.jsx)(`button`,{type:`submit`,className:`submit-button`,children:`Sign in`})]})}function T(e){return(0,h.jsx)(`div`,{className:`page lists-show`,children:(0,h.jsx)(`div`,{className:`loginscreen`,children:(0,h.jsxs)(`div`,{className:`login-screen-container`,children:[(0,h.jsxs)(`header`,{className:`loginscreen-header`,children:[(0,h.jsx)(`h1`,{className:`loginscreen-heading`,children:`Taskbox`}),(0,h.jsx)(`p`,{className:`loginscreen-text`,children:`Sign in to your account`})]}),(0,h.jsx)(w,{onSubmit:e.onLogIn})]})})})}exports.Inbox=C,exports.Login=T,exports.LoginForm=w,exports.Task=g,exports.TaskList=_,exports.reducer=x,exports.useAuth=f,exports.useTasks=S;
7
+ //# sourceMappingURL=react-template.cjs.js.map
@@ -0,0 +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,GA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,CAAO,QAAQ,QAAQ,GAAG,cAAc,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"}
@@ -0,0 +1,2 @@
1
+ .login-form-container{padding-top:1.5rem;padding-bottom:1.5rem;background:#fff;padding-inline:1.25rem}.login-form-container .login-form-wrapper{display:flex}.login-form-container .login-form-group{width:100%;position:relative}.login-form-container .login-form-group .login-form-label{text-align:start;margin-inline-end:.75rem;margin-bottom:.5rem;font-size:1rem;font-weight:400;display:block}.login-form-container .login-form-group .login-form-input{appearance:none;border:1px solid;border-color:inherit;background:inherit;border-radius:.375rem;outline:none;width:100%;min-width:0;height:2.5rem;padding-inline:1rem;font-size:1rem;position:relative}.submit-button{appearance:none;-webkit-user-select:none;user-select:none;white-space:nowrap;vertical-align:middle;color:#fff;padding-inline:1.5rem;background-color:#1c3f53;border-radius:.375rem;outline:none;justify-content:center;align-items:center;width:100%;height:3rem;min-height:3rem;margin:24px 0 0;padding:0 24px;font-size:1rem;font-weight:600;line-height:1.2rem;display:inline-flex;position:relative}.loginscreen{align-items:center;height:100vh;display:flex}.login-screen-container{border:1px solid #e2e8f0;width:100%;max-width:28rem;margin-inline:auto}.loginscreen-header{padding-top:1.5rem;padding-bottom:1.5rem;background-color:#d3edf4;padding-inline:1.25rem}.loginscreen-heading{color:#1c3f53;font-size:1.5rem;font-weight:700;line-height:2rem}.loginscreen-text{color:#4a5568;font-size:.875rem;line-height:1.25rem}
2
+ /*$vite$:1*/