@adminide-stack/clock-tik-browser 12.0.34-alpha.0 → 12.0.34-alpha.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/lib/pages/Home/AreaShots.d.ts +5 -0
- package/lib/pages/Home/AreaShots.d.ts.map +1 -0
- package/lib/pages/Home/AreaShots.js +209 -0
- package/lib/pages/Home/AreaShots.js.map +1 -0
- package/lib/pages/Home/HomePage.d.ts.map +1 -1
- package/lib/pages/Home/HomePage.js +22 -38
- package/lib/pages/Home/HomePage.js.map +1 -1
- package/lib/pages/Home/YantraMark.d.ts +11 -0
- package/lib/pages/Home/YantraMark.d.ts.map +1 -0
- package/lib/pages/Home/YantraMark.js +42 -0
- package/lib/pages/Home/YantraMark.js.map +1 -0
- package/lib/pages/Home/__tests__/chores.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/chores.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/media.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/media.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/placement.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/placement.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/stop.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/stop.test.d.ts.map +1 -0
- package/lib/pages/Home/chat/ChoresChat.d.ts.map +1 -1
- package/lib/pages/Home/chat/ChoresChat.js +317 -47
- package/lib/pages/Home/chat/ChoresChat.js.map +1 -1
- package/lib/pages/Home/chat/ChoresPanel.d.ts +35 -0
- package/lib/pages/Home/chat/ChoresPanel.d.ts.map +1 -0
- package/lib/pages/Home/chat/ChoresPanel.js +323 -0
- package/lib/pages/Home/chat/ChoresPanel.js.map +1 -0
- package/lib/pages/Home/chat/chatTheme.d.ts +2 -1
- package/lib/pages/Home/chat/chatTheme.d.ts.map +1 -1
- package/lib/pages/Home/chat/chatTheme.js +475 -1
- package/lib/pages/Home/chat/chatTheme.js.map +1 -1
- package/lib/pages/Home/chat/chores.d.ts +143 -0
- package/lib/pages/Home/chat/chores.d.ts.map +1 -0
- package/lib/pages/Home/chat/chores.js +269 -0
- package/lib/pages/Home/chat/chores.js.map +1 -0
- package/lib/pages/Home/chat/lucy.d.ts.map +1 -1
- package/lib/pages/Home/chat/lucy.js +1 -1
- package/lib/pages/Home/chat/lucy.js.map +1 -1
- package/lib/pages/Home/chat/media.d.ts +15 -0
- package/lib/pages/Home/chat/media.d.ts.map +1 -0
- package/lib/pages/Home/chat/media.js +57 -0
- package/lib/pages/Home/chat/media.js.map +1 -0
- package/lib/pages/Home/chat/placement.d.ts +63 -0
- package/lib/pages/Home/chat/placement.d.ts.map +1 -0
- package/lib/pages/Home/chat/placement.js +87 -0
- package/lib/pages/Home/chat/placement.js.map +1 -0
- package/lib/pages/Home/chat/stop.d.ts +47 -0
- package/lib/pages/Home/chat/stop.d.ts.map +1 -0
- package/lib/pages/Home/chat/stop.js +101 -0
- package/lib/pages/Home/chat/stop.js.map +1 -0
- package/lib/pages/Home/chat/thread.d.ts +10 -1
- package/lib/pages/Home/chat/thread.d.ts.map +1 -1
- package/lib/pages/Home/chat/thread.js.map +1 -1
- package/lib/pages/Home/chat/tour/tourSteps.d.ts +3 -3
- package/lib/pages/Home/chat/tour/tourSteps.d.ts.map +1 -1
- package/lib/pages/Home/chat/tour/tourSteps.js +10 -2
- package/lib/pages/Home/chat/tour/tourSteps.js.map +1 -1
- package/lib/pages/Home/chat/useChores.d.ts +35 -0
- package/lib/pages/Home/chat/useChores.d.ts.map +1 -0
- package/lib/pages/Home/chat/useChores.js +145 -0
- package/lib/pages/Home/chat/useChores.js.map +1 -0
- package/lib/pages/Home/homeStyles.d.ts.map +1 -1
- package/lib/pages/Home/homeStyles.js +150 -23
- package/lib/pages/Home/homeStyles.js.map +1 -1
- package/package.json +2 -2
|
@@ -293,6 +293,476 @@ import {jsx}from'react/jsx-runtime';const CHAT_CSS = `
|
|
|
293
293
|
display: none;
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
+
/* what Lucy made: videos and sound clips under her reply (media.ts); images are the kit's own figures */
|
|
297
|
+
.cbh-chat .cbh-chat-media {
|
|
298
|
+
display: grid;
|
|
299
|
+
gap: 10px;
|
|
300
|
+
max-width: 560px;
|
|
301
|
+
padding: 0 12px;
|
|
302
|
+
}
|
|
303
|
+
.cbh-chat .cbh-chat-media figure {
|
|
304
|
+
margin: 0;
|
|
305
|
+
}
|
|
306
|
+
.cbh-chat .cbh-chat-media video {
|
|
307
|
+
display: block;
|
|
308
|
+
width: 100%;
|
|
309
|
+
max-height: 420px;
|
|
310
|
+
border-radius: 14px;
|
|
311
|
+
background: #1a1714;
|
|
312
|
+
}
|
|
313
|
+
.cbh-chat .cbh-chat-media audio {
|
|
314
|
+
display: block;
|
|
315
|
+
width: 100%;
|
|
316
|
+
}
|
|
317
|
+
.cbh-chat .cbh-chat-media figcaption {
|
|
318
|
+
margin-top: 6px;
|
|
319
|
+
font-size: 12.5px;
|
|
320
|
+
color: hsl(var(--muted-foreground));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* Lucy's chores (ChoresPanel): the header button's count, then the panel - a sheet from the bottom
|
|
324
|
+
on a phone, a card hanging under its button on a wider screen (the button's place comes in as
|
|
325
|
+
--cbh-chores-top / --cbh-chores-right). */
|
|
326
|
+
.cbh-chat .cbh-chores-count {
|
|
327
|
+
position: absolute;
|
|
328
|
+
top: -3px;
|
|
329
|
+
right: -5px;
|
|
330
|
+
min-width: 16px;
|
|
331
|
+
height: 16px;
|
|
332
|
+
padding: 0 4px;
|
|
333
|
+
border-radius: 999px;
|
|
334
|
+
background: #b84100;
|
|
335
|
+
box-shadow: 0 0 0 2px hsl(var(--background));
|
|
336
|
+
color: #fff;
|
|
337
|
+
font-size: 10px;
|
|
338
|
+
font-weight: 600;
|
|
339
|
+
line-height: 16px;
|
|
340
|
+
text-align: center;
|
|
341
|
+
font-variant-numeric: tabular-nums;
|
|
342
|
+
}
|
|
343
|
+
/* The narrowest phones: New chat keeps its icon and gives its word up to Lucy's name (screen readers
|
|
344
|
+
still read it). */
|
|
345
|
+
@media (max-width: 359px) {
|
|
346
|
+
.cbh-chat .cbh-chat-newchat {
|
|
347
|
+
position: absolute;
|
|
348
|
+
width: 1px;
|
|
349
|
+
height: 1px;
|
|
350
|
+
overflow: hidden;
|
|
351
|
+
clip: rect(0 0 0 0);
|
|
352
|
+
white-space: nowrap;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
@media (min-width: 640px) {
|
|
356
|
+
.cbh-chat .cbh-chores-count {
|
|
357
|
+
position: static;
|
|
358
|
+
min-width: 18px;
|
|
359
|
+
height: 18px;
|
|
360
|
+
padding: 0 5px;
|
|
361
|
+
box-shadow: none;
|
|
362
|
+
font-size: 11px;
|
|
363
|
+
line-height: 18px;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
.cbh-chat .cbh-chores-scrim {
|
|
367
|
+
position: fixed;
|
|
368
|
+
inset: 0;
|
|
369
|
+
z-index: 40;
|
|
370
|
+
background: rgba(26, 23, 20, 0.32);
|
|
371
|
+
animation: cbh-chores-fade 0.2s ease both;
|
|
372
|
+
}
|
|
373
|
+
.cbh-chat .cbh-chores {
|
|
374
|
+
position: fixed;
|
|
375
|
+
z-index: 41;
|
|
376
|
+
left: 0;
|
|
377
|
+
right: 0;
|
|
378
|
+
bottom: 0;
|
|
379
|
+
display: flex;
|
|
380
|
+
flex-direction: column;
|
|
381
|
+
max-height: 82vh;
|
|
382
|
+
max-height: min(82dvh, 680px);
|
|
383
|
+
border: 1px solid hsl(var(--border));
|
|
384
|
+
border-bottom: 0;
|
|
385
|
+
border-radius: 22px 22px 0 0;
|
|
386
|
+
background: hsl(var(--card));
|
|
387
|
+
color: hsl(var(--foreground));
|
|
388
|
+
box-shadow: 0 -18px 48px -24px rgba(48, 28, 8, 0.35);
|
|
389
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
390
|
+
outline: none;
|
|
391
|
+
animation: cbh-chores-up 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
|
|
392
|
+
}
|
|
393
|
+
/* the sheet's grab bar */
|
|
394
|
+
.cbh-chat .cbh-chores::before {
|
|
395
|
+
content: '';
|
|
396
|
+
flex: none;
|
|
397
|
+
width: 36px;
|
|
398
|
+
height: 4px;
|
|
399
|
+
margin: 8px auto 0;
|
|
400
|
+
border-radius: 4px;
|
|
401
|
+
background: hsl(var(--border));
|
|
402
|
+
}
|
|
403
|
+
@media (min-width: 640px) {
|
|
404
|
+
.cbh-chat .cbh-chores-scrim {
|
|
405
|
+
background: transparent;
|
|
406
|
+
animation: none;
|
|
407
|
+
}
|
|
408
|
+
.cbh-chat .cbh-chores {
|
|
409
|
+
top: var(--cbh-chores-top, 64px);
|
|
410
|
+
right: var(--cbh-chores-right, 16px);
|
|
411
|
+
bottom: auto;
|
|
412
|
+
left: auto;
|
|
413
|
+
width: 380px;
|
|
414
|
+
max-height: min(72vh, 620px);
|
|
415
|
+
border-bottom: 1px solid hsl(var(--border));
|
|
416
|
+
border-radius: 18px;
|
|
417
|
+
padding-bottom: 0;
|
|
418
|
+
box-shadow: 0 1px 2px rgba(48, 28, 8, 0.06), 0 24px 48px -20px rgba(48, 28, 8, 0.35);
|
|
419
|
+
animation: cbh-chores-drop 0.18s ease both;
|
|
420
|
+
}
|
|
421
|
+
.cbh-chat .cbh-chores::before {
|
|
422
|
+
display: none;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
.cbh-chat .cbh-chores-head {
|
|
426
|
+
display: flex;
|
|
427
|
+
align-items: flex-start;
|
|
428
|
+
justify-content: space-between;
|
|
429
|
+
gap: 12px;
|
|
430
|
+
padding: 12px 16px 8px;
|
|
431
|
+
}
|
|
432
|
+
.cbh-chat .cbh-chores-head h2 {
|
|
433
|
+
margin: 0;
|
|
434
|
+
font-size: 16px;
|
|
435
|
+
font-weight: 600;
|
|
436
|
+
}
|
|
437
|
+
.cbh-chat .cbh-chores-head p {
|
|
438
|
+
margin: 2px 0 0;
|
|
439
|
+
font-size: 12.5px;
|
|
440
|
+
color: hsl(var(--muted-foreground));
|
|
441
|
+
}
|
|
442
|
+
.cbh-chat .cbh-chores-close {
|
|
443
|
+
flex: none;
|
|
444
|
+
display: grid;
|
|
445
|
+
place-items: center;
|
|
446
|
+
width: 32px;
|
|
447
|
+
height: 32px;
|
|
448
|
+
margin: -2px -6px 0 0;
|
|
449
|
+
border: 0;
|
|
450
|
+
border-radius: 999px;
|
|
451
|
+
background: transparent;
|
|
452
|
+
color: hsl(var(--muted-foreground));
|
|
453
|
+
cursor: pointer;
|
|
454
|
+
}
|
|
455
|
+
.cbh-chat .cbh-chores-close:hover {
|
|
456
|
+
background: hsl(var(--muted));
|
|
457
|
+
color: hsl(var(--foreground));
|
|
458
|
+
}
|
|
459
|
+
.cbh-chat .cbh-chores-body {
|
|
460
|
+
min-height: 0;
|
|
461
|
+
overflow-y: auto;
|
|
462
|
+
overscroll-behavior: contain;
|
|
463
|
+
padding: 0 8px 12px;
|
|
464
|
+
}
|
|
465
|
+
.cbh-chat .cbh-chores-section h3,
|
|
466
|
+
.cbh-chat .cbh-chores-label {
|
|
467
|
+
margin: 10px 8px 4px;
|
|
468
|
+
font-size: 11.5px;
|
|
469
|
+
font-weight: 600;
|
|
470
|
+
letter-spacing: 0.04em;
|
|
471
|
+
text-transform: uppercase;
|
|
472
|
+
color: hsl(var(--muted-foreground));
|
|
473
|
+
}
|
|
474
|
+
.cbh-chat .cbh-chores-section ul {
|
|
475
|
+
margin: 0;
|
|
476
|
+
padding: 0;
|
|
477
|
+
list-style: none;
|
|
478
|
+
}
|
|
479
|
+
.cbh-chat .cbh-chores-row {
|
|
480
|
+
display: flex;
|
|
481
|
+
align-items: center;
|
|
482
|
+
gap: 12px;
|
|
483
|
+
width: 100%;
|
|
484
|
+
min-height: 56px;
|
|
485
|
+
padding: 8px;
|
|
486
|
+
border: 0;
|
|
487
|
+
border-radius: 14px;
|
|
488
|
+
background: transparent;
|
|
489
|
+
color: hsl(var(--foreground));
|
|
490
|
+
font: inherit;
|
|
491
|
+
text-align: left;
|
|
492
|
+
cursor: pointer;
|
|
493
|
+
}
|
|
494
|
+
.cbh-chat .cbh-chores-row:hover {
|
|
495
|
+
background: hsl(var(--muted));
|
|
496
|
+
}
|
|
497
|
+
.cbh-chat .cbh-chores-row:focus-visible,
|
|
498
|
+
.cbh-chat .cbh-chores-close:focus-visible,
|
|
499
|
+
.cbh-chat .cbh-chores-back:focus-visible,
|
|
500
|
+
.cbh-chat .cbh-chores-primary:focus-visible,
|
|
501
|
+
.cbh-chat .cbh-chores-still:focus-visible {
|
|
502
|
+
outline: 2px solid hsl(var(--ring));
|
|
503
|
+
outline-offset: 2px;
|
|
504
|
+
}
|
|
505
|
+
.cbh-chat .cbh-chores-icon {
|
|
506
|
+
flex: none;
|
|
507
|
+
display: grid;
|
|
508
|
+
place-items: center;
|
|
509
|
+
width: 34px;
|
|
510
|
+
height: 34px;
|
|
511
|
+
border-radius: 11px;
|
|
512
|
+
background: linear-gradient(160deg, #fff1e6, #ffe0cc);
|
|
513
|
+
color: #b84100;
|
|
514
|
+
}
|
|
515
|
+
.cbh-chat .cbh-chores-icon[data-status='asking'] {
|
|
516
|
+
background: #b84100;
|
|
517
|
+
color: #fff;
|
|
518
|
+
}
|
|
519
|
+
.cbh-chat .cbh-chores-icon[data-status='queued'] {
|
|
520
|
+
background: hsl(var(--muted));
|
|
521
|
+
color: hsl(var(--muted-foreground));
|
|
522
|
+
}
|
|
523
|
+
.cbh-chat .cbh-chores-icon[data-status='done'] {
|
|
524
|
+
background: #eaf5ea;
|
|
525
|
+
color: #2b7a36;
|
|
526
|
+
}
|
|
527
|
+
.cbh-chat .cbh-chores-icon[data-status='failed'] {
|
|
528
|
+
background: #fdecea;
|
|
529
|
+
color: #b42318;
|
|
530
|
+
}
|
|
531
|
+
.cbh-chat .cbh-chores-spin {
|
|
532
|
+
animation: cbh-chores-spin 1.1s linear infinite;
|
|
533
|
+
}
|
|
534
|
+
.cbh-chat .cbh-chores-row-text {
|
|
535
|
+
flex: 1;
|
|
536
|
+
min-width: 0;
|
|
537
|
+
}
|
|
538
|
+
.cbh-chat .cbh-chores-row-text b,
|
|
539
|
+
.cbh-chat .cbh-chores-row-text small {
|
|
540
|
+
display: block;
|
|
541
|
+
overflow: hidden;
|
|
542
|
+
white-space: nowrap;
|
|
543
|
+
text-overflow: ellipsis;
|
|
544
|
+
}
|
|
545
|
+
.cbh-chat .cbh-chores-row-text b {
|
|
546
|
+
font-size: 14px;
|
|
547
|
+
font-weight: 600;
|
|
548
|
+
}
|
|
549
|
+
.cbh-chat .cbh-chores-row-text small {
|
|
550
|
+
margin-top: 1px;
|
|
551
|
+
font-size: 12.5px;
|
|
552
|
+
color: hsl(var(--muted-foreground));
|
|
553
|
+
}
|
|
554
|
+
.cbh-chat .cbh-chores-chevron {
|
|
555
|
+
flex: none;
|
|
556
|
+
width: 16px;
|
|
557
|
+
height: 16px;
|
|
558
|
+
color: hsl(var(--muted-foreground));
|
|
559
|
+
}
|
|
560
|
+
.cbh-chat .cbh-chores-empty {
|
|
561
|
+
display: flex;
|
|
562
|
+
flex-direction: column;
|
|
563
|
+
align-items: center;
|
|
564
|
+
gap: 6px;
|
|
565
|
+
padding: 22px 24px 28px;
|
|
566
|
+
text-align: center;
|
|
567
|
+
font-size: 13.5px;
|
|
568
|
+
color: hsl(var(--muted-foreground));
|
|
569
|
+
}
|
|
570
|
+
.cbh-chat .cbh-chores-empty p {
|
|
571
|
+
margin: 0;
|
|
572
|
+
max-width: 26em;
|
|
573
|
+
}
|
|
574
|
+
.cbh-chat .cbh-chores-empty b {
|
|
575
|
+
color: hsl(var(--foreground));
|
|
576
|
+
font-size: 14.5px;
|
|
577
|
+
}
|
|
578
|
+
.cbh-chat .cbh-chores-empty .cbh-chores-icon {
|
|
579
|
+
margin-bottom: 6px;
|
|
580
|
+
}
|
|
581
|
+
/* one chore, opened */
|
|
582
|
+
.cbh-chat .cbh-chores-detail {
|
|
583
|
+
padding: 0 8px 4px;
|
|
584
|
+
}
|
|
585
|
+
.cbh-chat .cbh-chores-back {
|
|
586
|
+
display: inline-flex;
|
|
587
|
+
align-items: center;
|
|
588
|
+
gap: 6px;
|
|
589
|
+
height: 32px;
|
|
590
|
+
margin-left: -8px;
|
|
591
|
+
padding: 0 8px;
|
|
592
|
+
border: 0;
|
|
593
|
+
border-radius: 10px;
|
|
594
|
+
background: transparent;
|
|
595
|
+
color: hsl(var(--muted-foreground));
|
|
596
|
+
font: inherit;
|
|
597
|
+
font-size: 13px;
|
|
598
|
+
font-weight: 500;
|
|
599
|
+
cursor: pointer;
|
|
600
|
+
}
|
|
601
|
+
.cbh-chat .cbh-chores-back:hover {
|
|
602
|
+
background: hsl(var(--muted));
|
|
603
|
+
color: hsl(var(--foreground));
|
|
604
|
+
}
|
|
605
|
+
.cbh-chat .cbh-chores-chip {
|
|
606
|
+
display: flex;
|
|
607
|
+
align-items: center;
|
|
608
|
+
gap: 8px;
|
|
609
|
+
margin: 8px 0 0;
|
|
610
|
+
font-size: 12.5px;
|
|
611
|
+
font-weight: 500;
|
|
612
|
+
color: hsl(var(--muted-foreground));
|
|
613
|
+
}
|
|
614
|
+
.cbh-chat .cbh-chores-chip .cbh-chores-icon {
|
|
615
|
+
width: 24px;
|
|
616
|
+
height: 24px;
|
|
617
|
+
border-radius: 8px;
|
|
618
|
+
}
|
|
619
|
+
.cbh-chat .cbh-chores-chip .cbh-chores-icon svg {
|
|
620
|
+
width: 14px;
|
|
621
|
+
height: 14px;
|
|
622
|
+
}
|
|
623
|
+
.cbh-chat .cbh-chores-detail h3 {
|
|
624
|
+
margin: 10px 0 0;
|
|
625
|
+
--font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
|
|
626
|
+
font-family: var(--font-family);
|
|
627
|
+
font-size: 25px;
|
|
628
|
+
font-weight: 400;
|
|
629
|
+
line-height: 1.15;
|
|
630
|
+
letter-spacing: -0.01em;
|
|
631
|
+
text-wrap: balance;
|
|
632
|
+
}
|
|
633
|
+
.cbh-chat .cbh-chores-asked {
|
|
634
|
+
margin: 10px 0 0;
|
|
635
|
+
padding: 10px 12px;
|
|
636
|
+
border-radius: 12px;
|
|
637
|
+
background: hsl(var(--muted));
|
|
638
|
+
font-size: 13.5px;
|
|
639
|
+
line-height: 1.5;
|
|
640
|
+
white-space: pre-wrap;
|
|
641
|
+
overflow-wrap: anywhere;
|
|
642
|
+
}
|
|
643
|
+
.cbh-chat .cbh-chores-answer .cbh-chores-label {
|
|
644
|
+
margin: 16px 0 6px;
|
|
645
|
+
}
|
|
646
|
+
.cbh-chat .cbh-chores-answer > p:not(.cbh-chores-label) {
|
|
647
|
+
margin: 0;
|
|
648
|
+
font-size: 14px;
|
|
649
|
+
line-height: 1.55;
|
|
650
|
+
white-space: pre-wrap;
|
|
651
|
+
overflow-wrap: anywhere;
|
|
652
|
+
}
|
|
653
|
+
.cbh-chat .cbh-chores-media {
|
|
654
|
+
display: grid;
|
|
655
|
+
gap: 8px;
|
|
656
|
+
margin-top: 10px;
|
|
657
|
+
}
|
|
658
|
+
.cbh-chat .cbh-chores-media img,
|
|
659
|
+
.cbh-chat .cbh-chores-media video {
|
|
660
|
+
display: block;
|
|
661
|
+
width: 100%;
|
|
662
|
+
max-height: 240px;
|
|
663
|
+
border-radius: 12px;
|
|
664
|
+
object-fit: cover;
|
|
665
|
+
background: #1a1714;
|
|
666
|
+
}
|
|
667
|
+
.cbh-chat .cbh-chores-media audio {
|
|
668
|
+
display: block;
|
|
669
|
+
width: 100%;
|
|
670
|
+
}
|
|
671
|
+
.cbh-chat .cbh-chores-note {
|
|
672
|
+
margin: 14px 0 0;
|
|
673
|
+
font-size: 13.5px;
|
|
674
|
+
line-height: 1.5;
|
|
675
|
+
color: hsl(var(--muted-foreground));
|
|
676
|
+
}
|
|
677
|
+
.cbh-chat .cbh-chores-primary {
|
|
678
|
+
width: 100%;
|
|
679
|
+
height: 44px;
|
|
680
|
+
margin-top: 16px;
|
|
681
|
+
border: 0;
|
|
682
|
+
border-radius: 12px;
|
|
683
|
+
background: hsl(var(--primary));
|
|
684
|
+
color: hsl(var(--primary-foreground));
|
|
685
|
+
font: inherit;
|
|
686
|
+
font-size: 14px;
|
|
687
|
+
font-weight: 600;
|
|
688
|
+
cursor: pointer;
|
|
689
|
+
}
|
|
690
|
+
/* above the composer, after the page was closed and opened again mid-chore */
|
|
691
|
+
.cbh-chat .cbh-chores-still {
|
|
692
|
+
display: flex;
|
|
693
|
+
align-items: center;
|
|
694
|
+
gap: 10px;
|
|
695
|
+
width: 100%;
|
|
696
|
+
padding: 9px 12px;
|
|
697
|
+
border: 1px solid hsl(var(--border));
|
|
698
|
+
border-radius: 14px;
|
|
699
|
+
background: hsl(var(--card));
|
|
700
|
+
color: hsl(var(--foreground));
|
|
701
|
+
font: inherit;
|
|
702
|
+
font-size: 13px;
|
|
703
|
+
text-align: left;
|
|
704
|
+
cursor: pointer;
|
|
705
|
+
box-shadow: 0 6px 18px -14px rgba(48, 28, 8, 0.4);
|
|
706
|
+
}
|
|
707
|
+
.cbh-chat .cbh-chores-still-text {
|
|
708
|
+
flex: 1;
|
|
709
|
+
min-width: 0;
|
|
710
|
+
overflow: hidden;
|
|
711
|
+
white-space: nowrap;
|
|
712
|
+
text-overflow: ellipsis;
|
|
713
|
+
color: hsl(var(--muted-foreground));
|
|
714
|
+
}
|
|
715
|
+
.cbh-chat .cbh-chores-still-text b {
|
|
716
|
+
font-weight: 600;
|
|
717
|
+
color: hsl(var(--foreground));
|
|
718
|
+
}
|
|
719
|
+
.cbh-chat .cbh-chores-still-view {
|
|
720
|
+
flex: none;
|
|
721
|
+
display: inline-flex;
|
|
722
|
+
align-items: center;
|
|
723
|
+
gap: 2px;
|
|
724
|
+
font-weight: 600;
|
|
725
|
+
color: #b84100;
|
|
726
|
+
}
|
|
727
|
+
.cbh-chat .cbh-chores-pulse {
|
|
728
|
+
flex: none;
|
|
729
|
+
width: 8px;
|
|
730
|
+
height: 8px;
|
|
731
|
+
border-radius: 50%;
|
|
732
|
+
background: #ff5a00;
|
|
733
|
+
animation: cbh-chores-pulse 1.8s ease-out infinite;
|
|
734
|
+
}
|
|
735
|
+
@keyframes cbh-chores-up {
|
|
736
|
+
from {
|
|
737
|
+
opacity: 0;
|
|
738
|
+
transform: translateY(24px);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
@keyframes cbh-chores-drop {
|
|
742
|
+
from {
|
|
743
|
+
opacity: 0;
|
|
744
|
+
transform: translateY(-6px);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
@keyframes cbh-chores-fade {
|
|
748
|
+
from {
|
|
749
|
+
opacity: 0;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
@keyframes cbh-chores-spin {
|
|
753
|
+
to {
|
|
754
|
+
transform: rotate(360deg);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
@keyframes cbh-chores-pulse {
|
|
758
|
+
0% {
|
|
759
|
+
box-shadow: 0 0 0 0 rgba(255, 90, 0, 0.45);
|
|
760
|
+
}
|
|
761
|
+
70%,
|
|
762
|
+
100% {
|
|
763
|
+
box-shadow: 0 0 0 8px rgba(255, 90, 0, 0);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
296
766
|
@keyframes cbh-chat-rise {
|
|
297
767
|
from {
|
|
298
768
|
opacity: 0;
|
|
@@ -306,7 +776,11 @@ import {jsx}from'react/jsx-runtime';const CHAT_CSS = `
|
|
|
306
776
|
}
|
|
307
777
|
@media (prefers-reduced-motion: reduce) {
|
|
308
778
|
.cbh-chat .cbh-chat-welcome > *,
|
|
309
|
-
.cbh-chat .cbh-chat-halo::before
|
|
779
|
+
.cbh-chat .cbh-chat-halo::before,
|
|
780
|
+
.cbh-chat .cbh-chores,
|
|
781
|
+
.cbh-chat .cbh-chores-scrim,
|
|
782
|
+
.cbh-chat .cbh-chores-spin,
|
|
783
|
+
.cbh-chat .cbh-chores-pulse {
|
|
310
784
|
animation: none;
|
|
311
785
|
}
|
|
312
786
|
.cbh-chat .cbh-chat-starter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatTheme.js","sources":["../../../../src/pages/Home/chat/chatTheme.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"chatTheme.js","sources":["../../../../src/pages/Home/chat/chatTheme.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"oCASA,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsxBhB;SAEe,SAAS,GAAA;;SAEdA,GAAA,CAAA,OAAA,EAAA;AACX,IAAC,qBAAA,EAAA,IAAA;;;;;"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lucy's chores as the person sees them: what she is on, what waits its turn, what needs their
|
|
3
|
+
* answer, and what she finished. The chat's Chores panel draws this (ChoresPanel); nothing here
|
|
4
|
+
* touches the network or storage.
|
|
5
|
+
*
|
|
6
|
+
* A chore is what the person hands over. Each message they send runs as one task in the kit's task
|
|
7
|
+
* store (`@yantra/surface-kit/tasks`), recorded on Yantra's Task API so the agent reports back on it
|
|
8
|
+
* even with the page closed (useChores). An answer to one of Lucy's question cards runs as a task
|
|
9
|
+
* of its own, filed under the chore it answers (the task's `boardId`), so a chore stays one row
|
|
10
|
+
* however many turns it takes. Chores this account ran in another browser come in as the Task API's
|
|
11
|
+
* records.
|
|
12
|
+
*/
|
|
13
|
+
import type { JobRecord, SurfaceTask } from '@yantra/surface-kit/tasks';
|
|
14
|
+
/** The slug every Clockbook chore is recorded under, on the Task API too (`surface:clockbook`). */
|
|
15
|
+
export declare const CLOCKBOOK_SURFACE = "clockbook";
|
|
16
|
+
/** The lane a chore's turns are recorded in. */
|
|
17
|
+
export declare const CHORE_LANE = "chore";
|
|
18
|
+
/**
|
|
19
|
+
* How long one turn may run on the agent before the agent cuts it off. A turn's record adds the
|
|
20
|
+
* kit's grace to this before it reads as stopped responding.
|
|
21
|
+
*/
|
|
22
|
+
export declare const CHORE_TURN_BUDGET_MS: number;
|
|
23
|
+
/** How much of Lucy's answer a turn keeps for the panel; all of it is in the chat. */
|
|
24
|
+
export declare const ANSWER_KEPT = 2000;
|
|
25
|
+
/** Finished chores the panel lists, newest first. */
|
|
26
|
+
export declare const DONE_SHOWN = 8;
|
|
27
|
+
/** And for how long after they finished. */
|
|
28
|
+
export declare const DONE_FOR_MS: number;
|
|
29
|
+
/**
|
|
30
|
+
* A chore done this fast was a quick answer ("thanks!", a phone number) the person watched arrive:
|
|
31
|
+
* the chat has it, and the list of what Lucy did is better without it.
|
|
32
|
+
*/
|
|
33
|
+
export declare const QUICK_ANSWER_MS = 20000;
|
|
34
|
+
export type ChoreTurnState = 'running' | 'succeeded' | 'failed';
|
|
35
|
+
/** One turn of a chore: a task in this browser, or the record of one run in another. */
|
|
36
|
+
export interface ChoreTurn {
|
|
37
|
+
id: string;
|
|
38
|
+
/** The chore it is filed under; a chore's first turn and its answers share it. */
|
|
39
|
+
chore: string;
|
|
40
|
+
title: string;
|
|
41
|
+
brief: string;
|
|
42
|
+
state: ChoreTurnState;
|
|
43
|
+
createdAt: number;
|
|
44
|
+
endedAt?: number;
|
|
45
|
+
/** What Lucy says she is doing, while it runs. */
|
|
46
|
+
progress?: string;
|
|
47
|
+
/** What came back. */
|
|
48
|
+
text?: string;
|
|
49
|
+
error?: string;
|
|
50
|
+
/** This page is streaming it. */
|
|
51
|
+
live?: boolean;
|
|
52
|
+
/** Run in another browser: only its record is here. */
|
|
53
|
+
remote?: boolean;
|
|
54
|
+
/** Past this, a turn still running has stopped responding. */
|
|
55
|
+
deadlineAt?: number;
|
|
56
|
+
}
|
|
57
|
+
export declare function turnFromTask(task: SurfaceTask, live: boolean): ChoreTurn;
|
|
58
|
+
export declare function turnFromJob(job: JobRecord): ChoreTurn;
|
|
59
|
+
export interface ChoreTurnsOptions {
|
|
60
|
+
/** Whether this page is streaming a task. */
|
|
61
|
+
isLive: (id: string) => boolean;
|
|
62
|
+
/** Who is looking (the token's subject): a record of anyone else's is never listed. */
|
|
63
|
+
owner?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Every turn the panel knows of: this browser's tasks, then the records of turns that ran in
|
|
67
|
+
* another browser and have no task here. A record the mirror wrote for one of this browser's tasks
|
|
68
|
+
* is that task, by its id or its server id.
|
|
69
|
+
*/
|
|
70
|
+
export declare function choreTurns(tasks: readonly SurfaceTask[], jobs: readonly JobRecord[], { isLive, owner }: ChoreTurnsOptions): ChoreTurn[];
|
|
71
|
+
/** Where a chore stands, in the person's terms. */
|
|
72
|
+
export type ChoreStatus = 'asking' | 'working' | 'queued' | 'done' | 'failed';
|
|
73
|
+
export interface Chore {
|
|
74
|
+
/** The chore's id, shared by its turns. */
|
|
75
|
+
id: string;
|
|
76
|
+
title: string;
|
|
77
|
+
/** What the person asked, in their own words. */
|
|
78
|
+
brief: string;
|
|
79
|
+
status: ChoreStatus;
|
|
80
|
+
/** When it was handed over. */
|
|
81
|
+
startedAt: number;
|
|
82
|
+
/** When it finished, for a done or failed one. */
|
|
83
|
+
endedAt?: number;
|
|
84
|
+
/** What Lucy is doing now, for one she is on. */
|
|
85
|
+
progress?: string;
|
|
86
|
+
/** Her latest answer on it. */
|
|
87
|
+
answer?: string;
|
|
88
|
+
/** Why it did not finish, for a failed one. */
|
|
89
|
+
error?: string;
|
|
90
|
+
/** Under way with nothing in this page streaming it: it carries on with the page closed. */
|
|
91
|
+
background?: boolean;
|
|
92
|
+
/** Handed over in another browser: its conversation is not in this one. */
|
|
93
|
+
remote?: boolean;
|
|
94
|
+
/** Still running long past its deadline: nothing will finish it now. */
|
|
95
|
+
stale?: boolean;
|
|
96
|
+
/** Its turns' ids, oldest first. */
|
|
97
|
+
turns: string[];
|
|
98
|
+
}
|
|
99
|
+
export interface ChoreList {
|
|
100
|
+
/** Lucy asked something and waits for the answer. */
|
|
101
|
+
asking: Chore[];
|
|
102
|
+
/** What she is on. */
|
|
103
|
+
working: Chore[];
|
|
104
|
+
/** Handed over while she was on another: she starts on it next. */
|
|
105
|
+
queued: Chore[];
|
|
106
|
+
/** Finished, stopped or given up on, newest first. */
|
|
107
|
+
done: Chore[];
|
|
108
|
+
/** How many are under way (asking, working and queued): the header's count. */
|
|
109
|
+
active: number;
|
|
110
|
+
}
|
|
111
|
+
export interface ChoreListOptions {
|
|
112
|
+
/** The turn whose reply holds the question still waiting for an answer (askingTurn). */
|
|
113
|
+
asking?: string;
|
|
114
|
+
now?: number;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The panel's chores from their turns.
|
|
118
|
+
*
|
|
119
|
+
* The agent runs one turn at a time, so a turn handed over while another of this browser's turns
|
|
120
|
+
* runs waits for it: until anything at all is heard of it, its chore is queued. A question waiting
|
|
121
|
+
* for an answer puts its chore first, whatever else its turns are doing. A finished chore ended the
|
|
122
|
+
* way its last turn to end did: an answer can be done before the turn it let carry on.
|
|
123
|
+
*/
|
|
124
|
+
export declare function choreList(turns: readonly ChoreTurn[], options?: ChoreListOptions): ChoreList;
|
|
125
|
+
/** A chore's name in the list: the first line of what the person typed, kept short. */
|
|
126
|
+
export declare function choreTitle(text: string, max?: number): string;
|
|
127
|
+
/** How long Lucy has been on one: "just now", "4 min", "1 hr 20 min". */
|
|
128
|
+
export declare function elapsedLabel(ms: number): string;
|
|
129
|
+
/**
|
|
130
|
+
* What a run the person stopped is settled with: the kit's `STOPPED_ERROR` (tasks/reconcile), which
|
|
131
|
+
* no later verdict revives. Repeated here because this file imports nothing at run time.
|
|
132
|
+
*/
|
|
133
|
+
export declare const STOPPED = "Stopped";
|
|
134
|
+
/** The line under a chore's name in the list: where it stands, and since when. */
|
|
135
|
+
export declare function choreLine(chore: Chore, now?: number): string;
|
|
136
|
+
/** When one finished: "just now", "5 min ago", "2 hr ago", "yesterday", "3 days ago". */
|
|
137
|
+
export declare function agoLabel(at: number, now?: number): string;
|
|
138
|
+
/**
|
|
139
|
+
* A reply as plain sentences, for the panel's look at a chore: no markdown marks, a link by its
|
|
140
|
+
* label, pictures left out (the panel draws them on their own), short enough to read at a glance.
|
|
141
|
+
*/
|
|
142
|
+
export declare function plainText(markdown: string, max?: number): string;
|
|
143
|
+
//# sourceMappingURL=chores.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chores.d.ts","sourceRoot":"","sources":["../../../../src/pages/Home/chat/chores.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH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