@nivaro/react 0.3.17 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +54 -1
- package/dist/index.js +243 -240
- package/dist/shared/components/CollectionBrowserView.js +439 -438
- package/dist/shared/components/ItemEditForm.js +3758 -3708
- package/dist/shared/components/ProfileView.js +38 -23
- package/dist/shared/components/RecordReadView.js +452 -430
- package/dist/shared/components/bulk/BulkActionButtons.js +113 -106
- package/dist/shared/components/chat/ChannelArchive.js +16 -17
- package/dist/shared/components/chat/ChatPanel.js +992 -930
- package/dist/shared/components/chat/Composer.js +307 -303
- package/dist/shared/components/chat/chat-core.js +8 -4
- package/dist/shared/components/chat/chat-drafts.js +60 -43
- package/dist/shared/components/help-videos/api.js +3 -0
- package/dist/shared/components/help-videos/library/HelpVideoLibrary.js +225 -177
- package/dist/shared/components/item-edit/InlineTableField.js +159 -158
- package/dist/shared/components/item-edit/RecordLiveSync.js +169 -155
- package/dist/shared/components/item-edit/RelationCombobox.js +274 -247
- package/dist/shared/components/item-edit/RowHistorySheet.js +62 -62
- package/dist/shared/components/item-edit/picker-search.js +28 -0
- package/dist/shared/components/panels/RevisionsPanel.js +268 -260
- package/dist/shared/components/profile/BrowserPushCard.js +135 -89
- package/dist/shared/components/profile/push-failure.js +76 -0
- package/dist/shared/lib/display-prefs.js +90 -0
- package/dist/shared/lib/theme-accents.js +21 -16
- package/package.json +1 -1
|
@@ -326,334 +326,338 @@ const es = lt(function({
|
|
|
326
326
|
"data-chat-composer-closed": !0,
|
|
327
327
|
children: P
|
|
328
328
|
}
|
|
329
|
-
) :
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
"
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
329
|
+
) : (
|
|
330
|
+
// `relative`: the slash-command form (absolute, bottom-full) sits just above the composer.
|
|
331
|
+
// Unpositioned, it anchored to the room view and opened above the whole panel, off screen.
|
|
332
|
+
/* @__PURE__ */ c("div", { className: m("relative shrink-0 border-t", x.divider), "data-chat-composer-wrap": !0, children: [
|
|
333
|
+
de && i.trim() && /* @__PURE__ */ r(
|
|
334
|
+
"p",
|
|
335
|
+
{
|
|
336
|
+
className: "px-3 pt-1.5 text-[11px] text-slate-500 dark:text-slate-400",
|
|
337
|
+
"data-chat-off-hours-note": !0,
|
|
338
|
+
children: de
|
|
339
|
+
}
|
|
340
|
+
),
|
|
341
|
+
ee && /* @__PURE__ */ r(
|
|
342
|
+
Ft,
|
|
343
|
+
{
|
|
344
|
+
kind: ee.kind,
|
|
345
|
+
room: d,
|
|
346
|
+
initialText: ee.text,
|
|
347
|
+
parentId: f,
|
|
348
|
+
onClose: () => te(null),
|
|
349
|
+
th: x
|
|
350
|
+
}
|
|
351
|
+
),
|
|
352
|
+
k && /* @__PURE__ */ c("div", { className: "flex items-start gap-2 px-3 pt-2", "data-chat-quote-draft": !0, children: [
|
|
353
|
+
/* @__PURE__ */ r(et, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
354
|
+
/* @__PURE__ */ c("div", { className: "min-w-0 flex-1 text-[11.5px]", children: [
|
|
355
|
+
/* @__PURE__ */ c("span", { className: "font-semibold text-slate-600 dark:text-slate-300", children: [
|
|
356
|
+
"Quoting ",
|
|
357
|
+
k.sender_name ?? "a message"
|
|
358
|
+
] }),
|
|
359
|
+
/* @__PURE__ */ r("p", { className: "truncate text-slate-500 dark:text-slate-400", children: k.deleted_at ? "Message removed" : k.message || "Attachment" })
|
|
355
360
|
] }),
|
|
356
|
-
/* @__PURE__ */ r(
|
|
361
|
+
/* @__PURE__ */ r(
|
|
362
|
+
"button",
|
|
363
|
+
{
|
|
364
|
+
type: "button",
|
|
365
|
+
onClick: v,
|
|
366
|
+
className: "rounded p-0.5 text-slate-400 hover:text-slate-700 dark:hover:text-slate-100",
|
|
367
|
+
"aria-label": "Stop quoting",
|
|
368
|
+
children: /* @__PURE__ */ r(Ae, { className: "h-3.5 w-3.5" })
|
|
369
|
+
}
|
|
370
|
+
)
|
|
357
371
|
] }),
|
|
358
|
-
/* @__PURE__ */ r(
|
|
359
|
-
"
|
|
372
|
+
F.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-1.5 px-3 pt-2", children: F.map((e) => /* @__PURE__ */ c(
|
|
373
|
+
"span",
|
|
360
374
|
{
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
"aria-label": "Stop quoting",
|
|
365
|
-
children: /* @__PURE__ */ r(Ae, { className: "h-3.5 w-3.5" })
|
|
366
|
-
}
|
|
367
|
-
)
|
|
368
|
-
] }),
|
|
369
|
-
F.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-1.5 px-3 pt-2", children: F.map((e) => /* @__PURE__ */ c(
|
|
370
|
-
"span",
|
|
371
|
-
{
|
|
372
|
-
className: m(
|
|
373
|
-
"relative inline-flex max-w-[200px] items-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-[11px]",
|
|
374
|
-
e.error ? "border-red-300 text-red-700 dark:border-red-500/50 dark:text-red-300" : "border-slate-200 bg-slate-50 text-slate-600 dark:border-border dark:bg-muted dark:text-slate-300"
|
|
375
|
-
),
|
|
376
|
-
title: e.error ?? e.name,
|
|
377
|
-
"data-chat-upload": e.id ? "done" : e.error ? "failed" : "uploading",
|
|
378
|
-
children: [
|
|
379
|
-
!e.id && !e.error && /* @__PURE__ */ r(
|
|
380
|
-
"span",
|
|
381
|
-
{
|
|
382
|
-
className: "absolute inset-y-0 left-0 bg-nvr-cyan/15 transition-[width]",
|
|
383
|
-
style: { width: `${Math.round(e.progress * 100)}%` },
|
|
384
|
-
"aria-hidden": !0
|
|
385
|
-
}
|
|
375
|
+
className: m(
|
|
376
|
+
"relative inline-flex max-w-[200px] items-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-[11px]",
|
|
377
|
+
e.error ? "border-red-300 text-red-700 dark:border-red-500/50 dark:text-red-300" : "border-slate-200 bg-slate-50 text-slate-600 dark:border-border dark:bg-muted dark:text-slate-300"
|
|
386
378
|
),
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
/* @__PURE__ */ r(
|
|
417
|
-
"button",
|
|
418
|
-
{
|
|
419
|
-
type: "button",
|
|
420
|
-
onClick: Ve,
|
|
421
|
-
className: "font-medium underline underline-offset-2",
|
|
422
|
-
children: "Paste as plain text instead"
|
|
423
|
-
}
|
|
424
|
-
)
|
|
425
|
-
]
|
|
426
|
-
}
|
|
427
|
-
),
|
|
428
|
-
/* @__PURE__ */ c(
|
|
429
|
-
"form",
|
|
430
|
-
{
|
|
431
|
-
className: m("relative", je ? "p-2" : "p-2.5"),
|
|
432
|
-
onSubmit: (e) => {
|
|
433
|
-
e.preventDefault(), $e();
|
|
379
|
+
title: e.error ?? e.name,
|
|
380
|
+
"data-chat-upload": e.id ? "done" : e.error ? "failed" : "uploading",
|
|
381
|
+
children: [
|
|
382
|
+
!e.id && !e.error && /* @__PURE__ */ r(
|
|
383
|
+
"span",
|
|
384
|
+
{
|
|
385
|
+
className: "absolute inset-y-0 left-0 bg-nvr-cyan/15 transition-[width]",
|
|
386
|
+
style: { width: `${Math.round(e.progress * 100)}%` },
|
|
387
|
+
"aria-hidden": !0
|
|
388
|
+
}
|
|
389
|
+
),
|
|
390
|
+
/* @__PURE__ */ r(Fe, { className: "relative h-3 w-3 shrink-0 opacity-60" }),
|
|
391
|
+
/* @__PURE__ */ r("span", { className: "relative truncate", children: e.error ? `${e.name} — ${e.error}` : e.name }),
|
|
392
|
+
!e.id && !e.error && /* @__PURE__ */ c("span", { className: "relative tabular-nums text-slate-500", children: [
|
|
393
|
+
Math.round(e.progress * 100),
|
|
394
|
+
"%"
|
|
395
|
+
] }),
|
|
396
|
+
/* @__PURE__ */ r(
|
|
397
|
+
"button",
|
|
398
|
+
{
|
|
399
|
+
type: "button",
|
|
400
|
+
onClick: () => Je(e.key),
|
|
401
|
+
className: "relative text-slate-400 hover:text-red-500",
|
|
402
|
+
"aria-label": e.id || e.error ? `Remove ${e.name}` : `Cancel ${e.name}`,
|
|
403
|
+
title: e.id || e.error ? "Remove" : "Cancel upload",
|
|
404
|
+
children: /* @__PURE__ */ r(Ae, { className: "h-3 w-3" })
|
|
405
|
+
}
|
|
406
|
+
)
|
|
407
|
+
]
|
|
434
408
|
},
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
type: "button",
|
|
478
|
-
onMouseDown: (s) => {
|
|
479
|
-
s.preventDefault(), Ne(e);
|
|
480
|
-
},
|
|
481
|
-
className: m(
|
|
482
|
-
"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12.5px]",
|
|
483
|
-
t === C ? x.accentSoft : "text-slate-700 dark:text-slate-200"
|
|
484
|
-
),
|
|
485
|
-
children: [
|
|
486
|
-
/* @__PURE__ */ r(tt, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
487
|
-
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate font-medium", children: e.label }),
|
|
488
|
-
/* @__PURE__ */ r("span", { className: "shrink-0 text-[10.5px] capitalize text-slate-500 dark:text-slate-400", children: e.type })
|
|
489
|
-
]
|
|
490
|
-
},
|
|
491
|
-
`${e.type}:${e.token}`
|
|
492
|
-
))
|
|
493
|
-
}
|
|
494
|
-
),
|
|
495
|
-
/* @__PURE__ */ c(
|
|
496
|
-
"div",
|
|
497
|
-
{
|
|
498
|
-
className: m(
|
|
499
|
-
"rounded-lg border transition-colors focus-within:border-nvr-cyan",
|
|
500
|
-
x.input,
|
|
501
|
-
w && "border-red-400 focus-within:border-red-500 dark:border-red-500"
|
|
502
|
-
),
|
|
503
|
-
"data-chat-composer-box": !0,
|
|
504
|
-
children: [
|
|
505
|
-
/* @__PURE__ */ r(
|
|
506
|
-
"textarea",
|
|
409
|
+
e.key
|
|
410
|
+
)) }),
|
|
411
|
+
q && /* @__PURE__ */ c(
|
|
412
|
+
"p",
|
|
413
|
+
{
|
|
414
|
+
className: "px-3 pt-1.5 text-[11px] text-slate-500 dark:text-slate-400",
|
|
415
|
+
"data-chat-pasted-table": !0,
|
|
416
|
+
children: [
|
|
417
|
+
"Pasted as a table.",
|
|
418
|
+
" ",
|
|
419
|
+
/* @__PURE__ */ r(
|
|
420
|
+
"button",
|
|
421
|
+
{
|
|
422
|
+
type: "button",
|
|
423
|
+
onClick: Ve,
|
|
424
|
+
className: "font-medium underline underline-offset-2",
|
|
425
|
+
children: "Paste as plain text instead"
|
|
426
|
+
}
|
|
427
|
+
)
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
),
|
|
431
|
+
/* @__PURE__ */ c(
|
|
432
|
+
"form",
|
|
433
|
+
{
|
|
434
|
+
className: m("relative", je ? "p-2" : "p-2.5"),
|
|
435
|
+
onSubmit: (e) => {
|
|
436
|
+
e.preventDefault(), $e();
|
|
437
|
+
},
|
|
438
|
+
"data-chat-composer": !0,
|
|
439
|
+
children: [
|
|
440
|
+
we && /* @__PURE__ */ r(
|
|
441
|
+
"div",
|
|
442
|
+
{
|
|
443
|
+
className: m(
|
|
444
|
+
"absolute bottom-full left-2.5 z-20 mb-1 w-[300px] overflow-hidden rounded-xl border shadow-lg",
|
|
445
|
+
x.surface,
|
|
446
|
+
"border-slate-200 dark:border-border"
|
|
447
|
+
),
|
|
448
|
+
"data-chat-picker": E ? "slash" : h !== null ? "mention" : "record",
|
|
449
|
+
children: E ? /* @__PURE__ */ r(
|
|
450
|
+
Et,
|
|
507
451
|
{
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
onKeyDown: Ze,
|
|
513
|
-
onPaste: Ge,
|
|
514
|
-
placeholder: f ? "Reply in thread…" : `Message ${_}…`,
|
|
515
|
-
className: "block min-h-9 w-full resize-none bg-transparent px-3 pb-1 pt-2 text-[12.5px] leading-[19px] outline-none placeholder:text-slate-500 dark:placeholder:text-slate-400",
|
|
516
|
-
"aria-label": f ? "Reply in thread" : `Message ${_}`,
|
|
517
|
-
"data-chat-input": !0
|
|
452
|
+
entries: L,
|
|
453
|
+
index: C,
|
|
454
|
+
onPick: Ce,
|
|
455
|
+
accentSoft: x.accentSoft
|
|
518
456
|
}
|
|
457
|
+
) : h !== null ? K.map((e, t) => /* @__PURE__ */ c(
|
|
458
|
+
"button",
|
|
459
|
+
{
|
|
460
|
+
type: "button",
|
|
461
|
+
onMouseDown: (s) => {
|
|
462
|
+
s.preventDefault(), ve(e);
|
|
463
|
+
},
|
|
464
|
+
className: m(
|
|
465
|
+
"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12.5px]",
|
|
466
|
+
t === C ? x.accentSoft : "text-slate-700 dark:text-slate-200"
|
|
467
|
+
),
|
|
468
|
+
children: [
|
|
469
|
+
e.kind === "person" || e.kind === "bot" ? He(e.user_id, e.display_name) : /* @__PURE__ */ r("span", { className: "flex h-[22px] w-[22px] items-center justify-center rounded-full bg-slate-200 text-[11px] font-bold text-slate-600 dark:bg-muted dark:text-slate-300", children: "@" }),
|
|
470
|
+
/* @__PURE__ */ c("span", { className: "min-w-0 flex-1 truncate", children: [
|
|
471
|
+
e.kind === "here" || e.kind === "channel" ? `@${e.display_name}` : e.display_name,
|
|
472
|
+
e.sub && /* @__PURE__ */ r("span", { className: "ml-1.5 text-[11px] text-slate-500 dark:text-slate-400", children: e.sub })
|
|
473
|
+
] })
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
e.user_id
|
|
477
|
+
)) : J.map((e, t) => /* @__PURE__ */ c(
|
|
478
|
+
"button",
|
|
479
|
+
{
|
|
480
|
+
type: "button",
|
|
481
|
+
onMouseDown: (s) => {
|
|
482
|
+
s.preventDefault(), Ne(e);
|
|
483
|
+
},
|
|
484
|
+
className: m(
|
|
485
|
+
"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12.5px]",
|
|
486
|
+
t === C ? x.accentSoft : "text-slate-700 dark:text-slate-200"
|
|
487
|
+
),
|
|
488
|
+
children: [
|
|
489
|
+
/* @__PURE__ */ r(tt, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
490
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate font-medium", children: e.label }),
|
|
491
|
+
/* @__PURE__ */ r("span", { className: "shrink-0 text-[10.5px] capitalize text-slate-500 dark:text-slate-400", children: e.type })
|
|
492
|
+
]
|
|
493
|
+
},
|
|
494
|
+
`${e.type}:${e.token}`
|
|
495
|
+
))
|
|
496
|
+
}
|
|
497
|
+
),
|
|
498
|
+
/* @__PURE__ */ c(
|
|
499
|
+
"div",
|
|
500
|
+
{
|
|
501
|
+
className: m(
|
|
502
|
+
"rounded-lg border transition-colors focus-within:border-nvr-cyan",
|
|
503
|
+
x.input,
|
|
504
|
+
w && "border-red-400 focus-within:border-red-500 dark:border-red-500"
|
|
519
505
|
),
|
|
520
|
-
|
|
506
|
+
"data-chat-composer-box": !0,
|
|
507
|
+
children: [
|
|
521
508
|
/* @__PURE__ */ r(
|
|
522
|
-
"
|
|
509
|
+
"textarea",
|
|
523
510
|
{
|
|
524
|
-
ref:
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
511
|
+
ref: N,
|
|
512
|
+
rows: 1,
|
|
513
|
+
value: i,
|
|
514
|
+
onChange: (e) => Ye(e.target.value, e.target.selectionStart ?? e.target.value.length),
|
|
515
|
+
onKeyDown: Ze,
|
|
516
|
+
onPaste: Ge,
|
|
517
|
+
placeholder: f ? "Reply in thread…" : `Message ${_}…`,
|
|
518
|
+
className: "block min-h-9 w-full resize-none bg-transparent px-3 pb-1 pt-2 text-[12.5px] leading-[19px] outline-none placeholder:text-slate-500 dark:placeholder:text-slate-400",
|
|
519
|
+
"aria-label": f ? "Reply in thread" : `Message ${_}`,
|
|
520
|
+
"data-chat-input": !0
|
|
531
521
|
}
|
|
532
522
|
),
|
|
533
|
-
/* @__PURE__ */
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
t == null || t.setSelectionRange(u, u);
|
|
545
|
-
});
|
|
523
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-0.5 px-1 pb-1", "data-chat-composer-tools": !0, children: [
|
|
524
|
+
/* @__PURE__ */ r(
|
|
525
|
+
"input",
|
|
526
|
+
{
|
|
527
|
+
ref: fe,
|
|
528
|
+
type: "file",
|
|
529
|
+
multiple: !0,
|
|
530
|
+
className: "hidden",
|
|
531
|
+
onChange: (e) => {
|
|
532
|
+
Q([...e.target.files ?? []]), e.target.value = "";
|
|
533
|
+
}
|
|
546
534
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
"button",
|
|
566
|
-
{
|
|
567
|
-
type: "button",
|
|
568
|
-
onClick: () => pe((e) => !e),
|
|
569
|
-
className: m(
|
|
570
|
-
"flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors",
|
|
571
|
-
w ? "bg-red-50 text-red-600 dark:bg-red-500/15 dark:text-red-300" : "text-slate-500 hover:bg-slate-200/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100"
|
|
572
|
-
),
|
|
573
|
-
"aria-pressed": w,
|
|
574
|
-
"aria-label": "Mark urgent",
|
|
575
|
-
title: w ? "Urgent: reaches people even when they muted the room (5 per hour)" : "Mark urgent — breaks through mute for the people it is addressed to",
|
|
576
|
-
"data-chat-urgent-toggle": w ? "on" : "off",
|
|
577
|
-
children: /* @__PURE__ */ r(st, { className: "h-4 w-4", strokeWidth: 2 })
|
|
578
|
-
}
|
|
579
|
-
),
|
|
580
|
-
/* @__PURE__ */ c(Pe, { open: he, onOpenChange: me, children: [
|
|
581
|
-
/* @__PURE__ */ r(We, { asChild: !0, children: /* @__PURE__ */ r(
|
|
535
|
+
),
|
|
536
|
+
/* @__PURE__ */ r(Wt, { botName: T }),
|
|
537
|
+
/* @__PURE__ */ r(
|
|
538
|
+
Nt,
|
|
539
|
+
{
|
|
540
|
+
label: "Emoji",
|
|
541
|
+
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md p-0 text-slate-500 hover:bg-slate-200/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100 [&>svg]:h-4 [&>svg]:w-4",
|
|
542
|
+
onPick: (e) => {
|
|
543
|
+
const t = N.current, s = (t == null ? void 0 : t.selectionStart) ?? i.length, n = (t == null ? void 0 : t.selectionEnd) ?? i.length, a = e.startsWith(":") && s > 0 && !/\s$/.test(i.slice(0, s)) ? " " : "";
|
|
544
|
+
p(i.slice(0, s) + a + e + i.slice(n)), requestAnimationFrame(() => {
|
|
545
|
+
t == null || t.focus();
|
|
546
|
+
const u = s + a.length + e.length;
|
|
547
|
+
t == null || t.setSelectionRange(u, u);
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
),
|
|
552
|
+
/* @__PURE__ */ r(
|
|
582
553
|
"button",
|
|
583
554
|
{
|
|
584
555
|
type: "button",
|
|
556
|
+
onClick: () => {
|
|
557
|
+
var e;
|
|
558
|
+
return (e = fe.current) == null ? void 0 : e.click();
|
|
559
|
+
},
|
|
585
560
|
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-200/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100",
|
|
586
|
-
"aria-label": "
|
|
587
|
-
title: "
|
|
588
|
-
"
|
|
589
|
-
children: /* @__PURE__ */ r(nt, { className: "h-4 w-4", strokeWidth: 2 })
|
|
561
|
+
"aria-label": "Attach a file",
|
|
562
|
+
title: "Attach a file (or paste / drop one)",
|
|
563
|
+
children: /* @__PURE__ */ r(Fe, { className: "h-4 w-4", strokeWidth: 2 })
|
|
590
564
|
}
|
|
591
|
-
)
|
|
592
|
-
/* @__PURE__ */
|
|
593
|
-
|
|
594
|
-
|
|
565
|
+
),
|
|
566
|
+
/* @__PURE__ */ r($t, { onClip: (e) => void ze(e), disabled: !!P }),
|
|
567
|
+
/* @__PURE__ */ r(
|
|
568
|
+
"button",
|
|
569
|
+
{
|
|
570
|
+
type: "button",
|
|
571
|
+
onClick: () => pe((e) => !e),
|
|
572
|
+
className: m(
|
|
573
|
+
"flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors",
|
|
574
|
+
w ? "bg-red-50 text-red-600 dark:bg-red-500/15 dark:text-red-300" : "text-slate-500 hover:bg-slate-200/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100"
|
|
575
|
+
),
|
|
576
|
+
"aria-pressed": w,
|
|
577
|
+
"aria-label": "Mark urgent",
|
|
578
|
+
title: w ? "Urgent: reaches people even when they muted the room (5 per hour)" : "Mark urgent — breaks through mute for the people it is addressed to",
|
|
579
|
+
"data-chat-urgent-toggle": w ? "on" : "off",
|
|
580
|
+
children: /* @__PURE__ */ r(st, { className: "h-4 w-4", strokeWidth: 2 })
|
|
581
|
+
}
|
|
582
|
+
),
|
|
583
|
+
/* @__PURE__ */ c(Pe, { open: he, onOpenChange: me, children: [
|
|
584
|
+
/* @__PURE__ */ r(We, { asChild: !0, children: /* @__PURE__ */ r(
|
|
595
585
|
"button",
|
|
596
586
|
{
|
|
597
587
|
type: "button",
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
type: "datetime-local",
|
|
609
|
-
value: re,
|
|
610
|
-
onChange: (e) => qe(e.target.value),
|
|
611
|
-
className: m(
|
|
612
|
-
"h-8 min-w-0 flex-1 rounded-md border px-1.5 text-[11.5px] outline-none",
|
|
613
|
-
x.input
|
|
614
|
-
),
|
|
615
|
-
"aria-label": "Send at"
|
|
616
|
-
}
|
|
617
|
-
),
|
|
618
|
-
/* @__PURE__ */ r(
|
|
588
|
+
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-200/70 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-white/10 dark:hover:text-slate-100",
|
|
589
|
+
"aria-label": "Send later",
|
|
590
|
+
title: "Send later",
|
|
591
|
+
"data-chat-schedule": !0,
|
|
592
|
+
children: /* @__PURE__ */ r(nt, { className: "h-4 w-4", strokeWidth: 2 })
|
|
593
|
+
}
|
|
594
|
+
) }),
|
|
595
|
+
/* @__PURE__ */ c(Oe, { align: "end", side: "top", className: "w-[240px] p-2", children: [
|
|
596
|
+
/* @__PURE__ */ r("p", { className: "px-1 pb-1.5 text-[12px] font-semibold text-slate-800 dark:text-slate-100", children: "Send this later" }),
|
|
597
|
+
Xe.map((e) => /* @__PURE__ */ r(
|
|
619
598
|
"button",
|
|
620
599
|
{
|
|
621
600
|
type: "button",
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
601
|
+
onClick: () => De(e.at),
|
|
602
|
+
className: "flex w-full items-center rounded-md px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-muted dark:text-slate-200",
|
|
603
|
+
children: e.label
|
|
604
|
+
},
|
|
605
|
+
e.label
|
|
606
|
+
)),
|
|
607
|
+
/* @__PURE__ */ c("div", { className: "mt-1.5 flex items-center gap-1 border-t border-slate-100 pt-2 dark:border-border", children: [
|
|
608
|
+
/* @__PURE__ */ r(
|
|
609
|
+
"input",
|
|
610
|
+
{
|
|
611
|
+
type: "datetime-local",
|
|
612
|
+
value: re,
|
|
613
|
+
onChange: (e) => qe(e.target.value),
|
|
614
|
+
className: m(
|
|
615
|
+
"h-8 min-w-0 flex-1 rounded-md border px-1.5 text-[11.5px] outline-none",
|
|
616
|
+
x.input
|
|
617
|
+
),
|
|
618
|
+
"aria-label": "Send at"
|
|
619
|
+
}
|
|
620
|
+
),
|
|
621
|
+
/* @__PURE__ */ r(
|
|
622
|
+
"button",
|
|
623
|
+
{
|
|
624
|
+
type: "button",
|
|
625
|
+
disabled: !re,
|
|
626
|
+
onClick: () => De(new Date(re)),
|
|
627
|
+
className: m(
|
|
628
|
+
"h-8 rounded-md px-2 text-[11.5px] font-medium disabled:opacity-40",
|
|
629
|
+
x.action
|
|
630
|
+
),
|
|
631
|
+
children: "Set"
|
|
632
|
+
}
|
|
633
|
+
)
|
|
634
|
+
] })
|
|
631
635
|
] })
|
|
632
|
-
] })
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
)
|
|
649
|
-
]
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
)
|
|
656
|
-
|
|
636
|
+
] }),
|
|
637
|
+
/* @__PURE__ */ r(
|
|
638
|
+
"button",
|
|
639
|
+
{
|
|
640
|
+
type: "submit",
|
|
641
|
+
disabled: !i.trim() && !F.some((e) => e.id) || oe,
|
|
642
|
+
className: m(
|
|
643
|
+
"ml-auto flex h-8 w-8 shrink-0 items-center justify-center rounded-md transition-[filter] hover:brightness-110 disabled:opacity-40",
|
|
644
|
+
w ? "bg-red-600 text-white" : x.action
|
|
645
|
+
),
|
|
646
|
+
"aria-label": w ? "Send urgent" : "Send",
|
|
647
|
+
title: oe ? "Waiting for the upload to finish" : void 0,
|
|
648
|
+
"data-chat-send": !0,
|
|
649
|
+
children: /* @__PURE__ */ r(rt, { className: "h-4 w-4", strokeWidth: 2 })
|
|
650
|
+
}
|
|
651
|
+
)
|
|
652
|
+
] })
|
|
653
|
+
]
|
|
654
|
+
}
|
|
655
|
+
)
|
|
656
|
+
]
|
|
657
|
+
}
|
|
658
|
+
)
|
|
659
|
+
] })
|
|
660
|
+
);
|
|
657
661
|
});
|
|
658
662
|
function Wt({ botName: D }) {
|
|
659
663
|
const d = [
|