@uplifted/react 0.23.0 → 0.25.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.
- package/CHANGELOG.md +55 -0
- package/dist/AddClientSheet.d.ts +10 -1
- package/dist/AddClientSheet.d.ts.map +1 -1
- package/dist/AddClientSheet.js +26 -21
- package/dist/AddClientSheet.js.map +1 -1
- package/dist/AiSettingsSheet.d.ts +2 -2
- package/dist/AiSettingsSheet.d.ts.map +1 -1
- package/dist/AiSettingsSheet.js +30 -97
- package/dist/AiSettingsSheet.js.map +1 -1
- package/dist/AssistantGrid.d.ts +10 -8
- package/dist/AssistantGrid.d.ts.map +1 -1
- package/dist/AssistantGrid.js +90 -16
- package/dist/AssistantGrid.js.map +1 -1
- package/dist/BulkGenerateSheet.d.ts +13 -5
- package/dist/BulkGenerateSheet.d.ts.map +1 -1
- package/dist/BulkGenerateSheet.js +25 -11
- package/dist/BulkGenerateSheet.js.map +1 -1
- package/dist/ClientList.d.ts.map +1 -1
- package/dist/ClientList.js +8 -8
- package/dist/ClientList.js.map +1 -1
- package/dist/Composer.d.ts +4 -0
- package/dist/Composer.d.ts.map +1 -1
- package/dist/Composer.js +5 -9
- package/dist/Composer.js.map +1 -1
- package/dist/ConnectClientSheet.d.ts +26 -0
- package/dist/ConnectClientSheet.d.ts.map +1 -0
- package/dist/ConnectClientSheet.js +67 -0
- package/dist/ConnectClientSheet.js.map +1 -0
- package/dist/ConversationPane.d.ts +3 -1
- package/dist/ConversationPane.d.ts.map +1 -1
- package/dist/ConversationPane.js +30 -7
- package/dist/ConversationPane.js.map +1 -1
- package/dist/HostLinkAction.d.ts +10 -0
- package/dist/HostLinkAction.d.ts.map +1 -0
- package/dist/HostLinkAction.js +14 -0
- package/dist/HostLinkAction.js.map +1 -0
- package/dist/HostPreviewPane.d.ts +4 -2
- package/dist/HostPreviewPane.d.ts.map +1 -1
- package/dist/HostPreviewPane.js +6 -6
- package/dist/HostPreviewPane.js.map +1 -1
- package/dist/ItemActions.d.ts +7 -3
- package/dist/ItemActions.d.ts.map +1 -1
- package/dist/ItemActions.js +4 -3
- package/dist/ItemActions.js.map +1 -1
- package/dist/OfferSheet.d.ts +2 -0
- package/dist/OfferSheet.d.ts.map +1 -1
- package/dist/OfferSheet.js +3 -1
- package/dist/OfferSheet.js.map +1 -1
- package/dist/QuickSend.d.ts +3 -1
- package/dist/QuickSend.d.ts.map +1 -1
- package/dist/QuickSend.js +10 -3
- package/dist/QuickSend.js.map +1 -1
- package/dist/SegmentEditor.d.ts +11 -4
- package/dist/SegmentEditor.d.ts.map +1 -1
- package/dist/SegmentEditor.js +96 -11
- package/dist/SegmentEditor.js.map +1 -1
- package/dist/ThreadFeed.d.ts +7 -1
- package/dist/ThreadFeed.d.ts.map +1 -1
- package/dist/ThreadFeed.js +4 -4
- package/dist/ThreadFeed.js.map +1 -1
- package/dist/UpliftPanel.d.ts +10 -2
- package/dist/UpliftPanel.d.ts.map +1 -1
- package/dist/UpliftPanel.js +142 -24
- package/dist/UpliftPanel.js.map +1 -1
- package/dist/UpliftProvider.d.ts.map +1 -1
- package/dist/UpliftProvider.js +16 -2
- package/dist/UpliftProvider.js.map +1 -1
- package/dist/build-info.json +3 -3
- package/dist/channels.d.ts +2 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +4 -0
- package/dist/channels.js.map +1 -1
- package/dist/draftContext.d.ts +34 -0
- package/dist/draftContext.d.ts.map +1 -0
- package/dist/draftContext.js +48 -0
- package/dist/draftContext.js.map +1 -0
- package/dist/host.d.ts +19 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js.map +1 -1
- package/dist/icons.d.ts +4 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +5 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/segments.d.ts.map +1 -1
- package/dist/segments.js +2 -1
- package/dist/segments.js.map +1 -1
- package/dist/styles.d.ts +1 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +63 -25
- package/dist/styles.js.map +1 -1
- package/dist/usePreviewDrafts.d.ts +1 -1
- package/dist/usePreviewDrafts.d.ts.map +1 -1
- package/dist/usePreviewDrafts.js +8 -1
- package/dist/usePreviewDrafts.js.map +1 -1
- package/dist/useSend.d.ts +7 -2
- package/dist/useSend.d.ts.map +1 -1
- package/dist/useSend.js +7 -2
- package/dist/useSend.js.map +1 -1
- package/package.json +3 -3
- package/dist/ComposerExtras.d.ts +0 -15
- package/dist/ComposerExtras.d.ts.map +0 -1
- package/dist/ComposerExtras.js +0 -14
- package/dist/ComposerExtras.js.map +0 -1
package/dist/styles.js
CHANGED
|
@@ -50,7 +50,7 @@ export const upliftStyles = `
|
|
|
50
50
|
.u-iconbtn .u-ai-spark svg{width:14px;height:14px}
|
|
51
51
|
.u-iconbtn svg{width:16px;height:16px}
|
|
52
52
|
.u-iconbtn[aria-pressed="true"]{color:var(--u-text);background:var(--u-surface-2)}
|
|
53
|
-
.u-bulkbtn svg{width:
|
|
53
|
+
.u-bulkbtn svg{width:16px;height:16px}
|
|
54
54
|
.uplift.u-full{position:fixed;inset:0;z-index:2147483000;border-radius:0;border:0;display:flex;flex-direction:column}
|
|
55
55
|
.uplift.u-full .u-split{flex:1;height:auto;min-height:0}
|
|
56
56
|
.u-back{display:none;border:1px solid var(--u-border);background:var(--u-bg);border-radius:8px;padding:6px 10px;font-size:16px;min-height:36px;align-items:center;flex:none}
|
|
@@ -69,10 +69,17 @@ export const upliftStyles = `
|
|
|
69
69
|
.u-sortgroup button{border:0;background:none;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:600;color:var(--u-muted);min-height:28px;white-space:nowrap}
|
|
70
70
|
.u-sortgroup button:hover{color:var(--u-text)}
|
|
71
71
|
.u-sortgroup button[aria-pressed="true"]{background:var(--u-bg);color:var(--u-text);box-shadow:0 1px 2px rgba(0,0,0,.08),0 0 0 1px var(--u-border)}
|
|
72
|
-
|
|
73
|
-
.u-
|
|
74
|
-
.u-
|
|
75
|
-
.u-
|
|
72
|
+
/* Bulk generate is a frozen row: it stays at the bottom of the list while the clients scroll above it. */
|
|
73
|
+
.u-rows li.u-bulkrow{position:sticky;bottom:0;z-index:1;margin-top:auto;border-bottom:0;border-top:1px solid var(--u-border);background:var(--u-bg);padding:10px 12px}
|
|
74
|
+
.u-bulkrow .u-bulkbtn{display:inline-flex;align-items:center;justify-content:center;gap:2px;width:100%;border:1px dashed var(--u-border);border-radius:10px;background:none;color:var(--u-muted);padding:10px 12px;min-height:44px;font:inherit;font-size:15px;font-weight:600;cursor:pointer}
|
|
75
|
+
.u-bulkrow .u-bulkbtn span{margin-left:6px}
|
|
76
|
+
.u-bulkrow .u-bulkbtn:hover:not(:disabled){color:var(--u-accent);border-color:var(--u-accent);background:var(--u-surface-2)}
|
|
77
|
+
.u-bulkrow .u-bulkbtn:disabled{opacity:.45;cursor:not-allowed}
|
|
78
|
+
.u-clear-btn{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-height:0;padding:0;flex:none;border-radius:999px;border:0;background:none;color:var(--u-muted);cursor:pointer}
|
|
79
|
+
.u-clear-btn svg{width:15px;height:15px}
|
|
80
|
+
.u-clear-btn:hover:not(:disabled){color:var(--u-text);background:var(--u-surface-2)}
|
|
81
|
+
.u-clear-btn:disabled{opacity:.4;cursor:not-allowed}
|
|
82
|
+
.u-rows{list-style:none;margin:0;padding:0;overflow:auto;flex:1;min-height:0;display:flex;flex-direction:column}
|
|
76
83
|
.u-rows li{display:flex;flex-wrap:wrap;align-items:stretch;border-bottom:1px solid var(--u-border)}
|
|
77
84
|
.u-row-open{flex:1;min-width:0;text-align:left;border:0;background:transparent;padding:11px 12px;display:grid;grid-template-columns:36px minmax(0,1fr);gap:2px 10px;min-height:64px}
|
|
78
85
|
.u-av{grid-row:span 3;width:36px;height:36px;border-radius:999px;display:grid;place-items:center;font-size:13px;font-weight:700;color:#fff}
|
|
@@ -80,6 +87,7 @@ export const upliftStyles = `
|
|
|
80
87
|
.u-r-top{display:flex;gap:6px;align-items:baseline;min-width:0}
|
|
81
88
|
.u-r-name{font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
82
89
|
.u-r-time{margin-left:auto;font-size:12.5px;color:var(--u-muted);flex:none}
|
|
90
|
+
.u-r-chev{display:none;flex:none;align-self:center;margin-left:-2px;color:var(--u-muted)}.u-r-chev svg{width:15px;height:15px}
|
|
83
91
|
.u-r-line{font-size:13.5px;color:var(--u-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
84
92
|
.u-r-tags{display:flex;flex-wrap:wrap;gap:4px}
|
|
85
93
|
.u-tag{font-size:12px;font-weight:600;border-radius:999px;padding:1px 8px;border:1px solid var(--u-border);color:var(--u-muted);background:var(--u-surface-2)}
|
|
@@ -115,15 +123,8 @@ export const upliftStyles = `
|
|
|
115
123
|
/* ---- Composer footer (port of native ChatPage footer) ---- */
|
|
116
124
|
.u-composer{display:flex;flex-direction:column;gap:8px;padding:10px 16px 12px;background:var(--u-surface-2);border-top:1px solid var(--u-border)}
|
|
117
125
|
.u-composer>*:empty{display:none}
|
|
118
|
-
|
|
119
|
-
.u-
|
|
120
|
-
.u-rail svg{width:14px;height:14px}
|
|
121
|
-
.u-extras-wrap{position:relative;display:flex;flex-direction:column}
|
|
122
|
-
.u-extras-wrap>.u-rail{align-self:flex-end}
|
|
123
|
-
.u-extras-wrap>.u-rail[aria-expanded="true"]{position:absolute;top:0;right:0;z-index:1}
|
|
124
|
-
.u-extras-wrap:has(>.u-rail[aria-expanded="true"]) .u-ag-h{padding-right:34px}
|
|
125
|
-
.u-extras{display:contents}
|
|
126
|
-
.u-extras-off{display:none}
|
|
126
|
+
/* Its menus open upward, over the conversation: a host that makes the composer scroll must not clip them. */
|
|
127
|
+
.uplift .u-composer.u-composer-menu{overflow:visible!important}
|
|
127
128
|
/* draft grid (ComposerAssistant) */
|
|
128
129
|
.u-ag{display:flex;flex-direction:column;gap:6px}
|
|
129
130
|
.u-ag-h{display:flex;align-items:center;gap:2px}
|
|
@@ -141,6 +142,19 @@ export const upliftStyles = `
|
|
|
141
142
|
.u-ag-spinning svg{animation:u-spin 1s linear infinite}
|
|
142
143
|
@keyframes u-spin{to{transform:rotate(360deg)}}
|
|
143
144
|
.u-ag-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
|
|
145
|
+
.u-ag-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
|
|
146
|
+
.u-ag-tile{display:flex;align-items:center;gap:5px;min-height:30px;padding:6px 8px;border:1px solid var(--u-border);border-radius:8px;background:var(--u-bg);color:var(--u-muted);min-width:0;overflow:hidden;text-align:left;cursor:pointer;transition:border-color .15s,background .15s}
|
|
147
|
+
.u-ag-tile:hover{border-color:var(--u-muted)}
|
|
148
|
+
.u-ag-tile-ic{display:inline-flex;flex:none}.u-ag-tile-ic svg{width:12px;height:12px}
|
|
149
|
+
.u-ag-tile-txt{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:1.2;font-weight:600;color:var(--u-muted)}
|
|
150
|
+
.u-ag-tile-txt.u-ag-tile-on{color:var(--u-text)}
|
|
151
|
+
.u-ag-tile-shimmer{height:30px;border-radius:8px;background:linear-gradient(90deg,var(--u-surface-2) 25%,var(--u-border) 50%,var(--u-surface-2) 75%);background-size:300% 100%;animation:u-ag-tiles 1.4s ease-in-out infinite}
|
|
152
|
+
@keyframes u-ag-tiles{0%{background-position:200% 0}100%{background-position:-200% 0}}
|
|
153
|
+
.u-ag-lab svg{width:12px;height:12px}
|
|
154
|
+
.u-pill-gen .u-pill-grow{position:relative}
|
|
155
|
+
.u-pill-gen .u-pill-grow::after{content:"";position:absolute;inset:8px 6px;border-radius:6px;pointer-events:none;background:linear-gradient(var(--u-surface-2),var(--u-surface-2)) 0 0/100% 9px no-repeat,linear-gradient(var(--u-surface-2),var(--u-surface-2)) 0 15px/88% 9px no-repeat,linear-gradient(var(--u-surface-2),var(--u-surface-2)) 0 30px/60% 9px no-repeat;animation:u-pill-gen 1.4s ease-in-out infinite}
|
|
156
|
+
@keyframes u-pill-gen{0%,100%{opacity:.5}50%{opacity:1}}
|
|
157
|
+
@media (prefers-reduced-motion: reduce){.u-ag-tile-shimmer,.u-pill-gen .u-pill-grow::after{animation:none}}
|
|
144
158
|
.u-ag-cell{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;min-height:56px;padding:10px 12px;background:var(--u-surface-2);border:1px solid transparent;border-radius:var(--u-radius);color:var(--u-text);text-align:left;transition:background .15s,transform .15s}
|
|
145
159
|
.u-ag-cell:hover:not(:disabled){background:var(--u-bg)}
|
|
146
160
|
/* Gold shimmer ring on finished drafts (Ian, 2026-10-11): a gradient pseudo-element masked to the edge. Reduced motion leaves a still ring. */
|
|
@@ -150,7 +164,7 @@ export const upliftStyles = `
|
|
|
150
164
|
.u-ag-cell[aria-checked="true"]::before{display:none}
|
|
151
165
|
.u-ag-lab{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;color:var(--u-highlight);text-transform:uppercase;letter-spacing:.04em}
|
|
152
166
|
.u-ag-pencil{display:inline-flex;opacity:.6}.u-ag-pencil svg{width:10px;height:10px}
|
|
153
|
-
.u-ag-txt{font-size:14px;line-height:1.35;color:var(--u-text);display:-webkit-box;-webkit-line-clamp:
|
|
167
|
+
.u-ag-txt{font-size:14px;line-height:1.35;color:var(--u-text);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}
|
|
154
168
|
.u-ag-loading{overflow:hidden;cursor:default;pointer-events:none;justify-content:center;align-items:center;border-color:var(--u-border)}
|
|
155
169
|
.u-ag-loading-txt{position:relative;z-index:1;font-size:12px;color:var(--u-muted)}
|
|
156
170
|
.u-ag-shimmer{position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.55) 50%,transparent 100%);animation:u-ag-sheen 1.4s infinite;transform:translateX(-100%)}
|
|
@@ -199,6 +213,7 @@ export const upliftStyles = `
|
|
|
199
213
|
.u-send-btn svg{width:15px;height:15px;stroke:var(--u-accent-ink)}
|
|
200
214
|
.u-send-btn:hover:not(:disabled){transform:translateY(-1px)}
|
|
201
215
|
.u-send-btn:disabled{opacity:.4;cursor:not-allowed}
|
|
216
|
+
.u-send-btn-text{width:auto;padding:0 10px 0 12px;gap:6px;font-size:12.5px;font-weight:600;white-space:nowrap}
|
|
202
217
|
.u-gen-btn{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-height:0;padding:0;flex:none;border:0;border-radius:999px;background:transparent;color:var(--u-highlight);transition:background .15s}
|
|
203
218
|
.u-gen-btn svg{width:16px;height:16px}
|
|
204
219
|
.u-gen-btn:hover:not(:disabled){background:var(--u-highlight-soft)}
|
|
@@ -378,18 +393,17 @@ export const upliftStyles = `
|
|
|
378
393
|
.u-ai-sec h4{margin:0;font-size:14px}
|
|
379
394
|
.u-ai-area,.u-ai-input{font:inherit;font-size:13.5px;color:var(--u-text);background:var(--u-surface-2);border:1px solid var(--u-border);border-radius:8px;padding:8px 10px;width:100%;box-sizing:border-box}
|
|
380
395
|
.u-ai-area{resize:vertical}
|
|
381
|
-
.u-ai-hr{border:0;border-top:1px solid var(--u-border);margin:8px 0}
|
|
382
396
|
.u-ai-form{display:flex;flex-direction:column;gap:6px;border:1px solid var(--u-border);border-radius:10px;padding:10px}
|
|
383
397
|
.u-ai-form label{font-size:12.5px;font-weight:700}
|
|
384
398
|
.u-ai-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
|
|
385
399
|
.u-ai-list li{border:1px solid var(--u-border);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:3px}
|
|
386
400
|
.u-ai-item-head{display:flex;align-items:center;gap:6px;font-size:13px}
|
|
387
|
-
.u-ai-check{color:var(--u-accent);display:inline-flex}
|
|
388
|
-
.u-ai-check svg{width:14px;height:14px}
|
|
389
401
|
.u-ai-tags{display:flex;flex-wrap:wrap;gap:4px}
|
|
402
|
+
.u-ai-learned{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:8px 0 0;font-size:13.5px}
|
|
403
|
+
.u-ai-learned dt{font-weight:700;color:var(--u-muted)}
|
|
404
|
+
.u-ai-learned dd{margin:0}
|
|
390
405
|
.u-ai-k{font-size:11.5px;font-weight:700;color:var(--u-muted);text-transform:uppercase;letter-spacing:.04em}
|
|
391
406
|
.u-ai-v{font-size:13.5px;white-space:pre-wrap}
|
|
392
|
-
.u-ai-voice{display:flex;flex-direction:column;gap:6px}
|
|
393
407
|
.u-ai-locked{border:1px dashed var(--u-border);border-radius:10px;padding:12px;font-size:13px;color:var(--u-muted)}
|
|
394
408
|
.u-ai-locked strong{color:var(--u-text)}
|
|
395
409
|
.u-ai-field{display:flex;flex-direction:column;gap:3px;margin-top:10px}
|
|
@@ -442,13 +456,22 @@ export const upliftStyles = `
|
|
|
442
456
|
.u-editor-rich:empty::before{content:attr(data-placeholder);color:var(--u-muted);pointer-events:none}
|
|
443
457
|
.u-editor-rich[aria-disabled="true"]{opacity:.6}
|
|
444
458
|
/* Draft pills, ported from native: one per clause, hue hashed from the text, × drops it. */
|
|
445
|
-
|
|
446
|
-
.u-seg:
|
|
459
|
+
/* Pills keep the suggested draft's greyed text until the coach touches one: clicked or typed-in pills turn white (native #633). */
|
|
460
|
+
.u-seg{display:inline;padding:1px 3px;margin:0 2px 0 0;border-radius:6px;border:1px solid var(--u-highlight-soft);background:var(--u-surface-2);color:var(--u-muted);line-height:1.9;-webkit-box-decoration-break:clone;box-decoration-break:clone;transition:background .15s,color .15s,border-color .15s}
|
|
461
|
+
.u-seg.touched{background:var(--u-bg);color:var(--u-text)}
|
|
462
|
+
.u-seg.active{background:var(--u-bg);color:var(--u-text);border-color:var(--u-highlight)}
|
|
463
|
+
/* Suggested draft: Uplift's words, softened, until the coach engages. */
|
|
464
|
+
.u-editor-sugg{cursor:text;display:flex;flex-direction:column;gap:2px}
|
|
465
|
+
.u-pill .u-editor-sugg,.u-editor-sugg{background:var(--u-surface-2);border-radius:10px}
|
|
466
|
+
.u-editor-sugg:focus-visible{outline:2px solid var(--u-highlight);outline-offset:1px}
|
|
467
|
+
.u-sugg-label{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--u-highlight)}
|
|
468
|
+
.u-sugg-label svg{width:13px;height:13px;flex:none}
|
|
469
|
+
.u-sugg-text{color:var(--u-muted)}
|
|
447
470
|
/* Stock intro: no pill highlight, the text itself shimmers gold (gradient clipped to the glyphs). Reduced motion leaves a still gold gradient. */
|
|
448
|
-
.u-seg-lock{cursor:default;user-select:text;padding:0;margin:0;border-radius:0;font-weight:600;background:linear-gradient(110deg,var(--u-gold-ink) 0%,var(--u-gold-ink-hi) 30%,var(--u-gold-ink) 50%,var(--u-gold-ink-hi) 70%,var(--u-gold-ink) 100%);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:u-shimmer 4s linear infinite}
|
|
471
|
+
.u-seg-lock{cursor:default;user-select:text;padding:0;margin:0;border:0;border-radius:0;font-weight:600;background:linear-gradient(110deg,var(--u-gold-ink) 0%,var(--u-gold-ink-hi) 30%,var(--u-gold-ink) 50%,var(--u-gold-ink-hi) 70%,var(--u-gold-ink) 100%);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:u-shimmer 4s linear infinite}
|
|
449
472
|
.u-seg-lock:hover{opacity:1}
|
|
450
|
-
.u-seg-x{display:inline-flex;align-items:center;justify-content:center;margin-left:
|
|
451
|
-
.u-seg-x:hover,.u-seg-x:active,.u-seg-x:focus-visible{color
|
|
473
|
+
.u-seg-x{display:inline-flex;align-items:center;justify-content:center;margin-left:2px;min-width:24px;min-height:24px;cursor:pointer;font-size:14px;color:var(--u-muted);border-radius:6px;line-height:1;vertical-align:middle;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
|
|
474
|
+
.u-seg-x:hover,.u-seg-x:active,.u-seg-x:focus-visible{color:var(--u-text);background:var(--u-border);outline:none}
|
|
452
475
|
.u-editor:disabled{opacity:.6}
|
|
453
476
|
.u-send{border:0;background:var(--u-accent);color:var(--u-accent-ink);font-weight:700;border-radius:9px;padding:8px 16px;min-height:40px}
|
|
454
477
|
.u-send:disabled{opacity:.45}
|
|
@@ -462,13 +485,21 @@ export const upliftStyles = `
|
|
|
462
485
|
.u-headbtn{border:1px solid var(--u-border);background:var(--u-bg);border-radius:8px;padding:6px 11px;font-size:14px;font-weight:600;min-height:34px}
|
|
463
486
|
.u-headbtn:disabled{opacity:.5}
|
|
464
487
|
.u-connect{margin-left:4px;display:inline-flex;align-items:center;gap:7px;flex:none}
|
|
488
|
+
.u-hostlink{margin-left:4px;display:inline-flex;align-items:center;gap:6px;flex:none;text-decoration:none;color:var(--u-text);white-space:nowrap}
|
|
489
|
+
.u-hostlink-icon{width:18px;height:18px;object-fit:contain;flex:none}
|
|
490
|
+
.u-ev-open{margin-top:8px;display:flex}
|
|
491
|
+
.u-ev-open .u-hostlink{margin-left:0}
|
|
492
|
+
.u-ia-extra{display:inline-flex;margin-left:4px}
|
|
493
|
+
.u-ia-extra .u-hostlink{margin-left:0;border:0;background:transparent;color:var(--u-muted);font-size:12px;font-weight:600;padding:2px 6px;border-radius:6px;min-height:24px;gap:5px}
|
|
494
|
+
.u-ia-extra .u-hostlink:hover{background:var(--u-surface-3);color:var(--u-text)}
|
|
495
|
+
.u-ia-extra .u-hostlink-icon{width:14px;height:14px}
|
|
465
496
|
/* AI settings + full screen: the right end of the conversation header (no panel header row). */
|
|
466
497
|
.u-head-acts{margin-left:auto;display:inline-flex;align-items:center;gap:6px;flex:none}
|
|
467
498
|
.u-chan ~ .u-head-acts{margin-left:6px}
|
|
468
499
|
.u-pane-head-empty{justify-content:flex-end;min-height:62px;box-sizing:border-box}
|
|
469
500
|
/* On wide panels the toolbar leaves them to the conversation header. */
|
|
470
501
|
.u-toolbar-acts{display:none}
|
|
471
|
-
.u-toolbar .u-addbtn{flex:none}
|
|
502
|
+
.u-toolbar .u-addbtn{flex:none;margin-left:auto}
|
|
472
503
|
.u-connect svg{flex:none}
|
|
473
504
|
.u-example{width:100%;border:1px dashed var(--u-border);border-radius:12px;padding:12px;background:var(--u-surface-2);display:flex;flex-direction:column}
|
|
474
505
|
.u-ex-lab{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--u-muted);margin-bottom:6px}
|
|
@@ -515,6 +546,8 @@ export const upliftStyles = `
|
|
|
515
546
|
.u-split.u-show-thread .u-list{display:none}
|
|
516
547
|
.u-split:not(.u-show-thread) .u-pane{display:none}
|
|
517
548
|
.u-back{display:inline-flex}
|
|
549
|
+
/* A row opens its thread full screen here, so it says so. */
|
|
550
|
+
.u-r-chev{display:inline-flex}
|
|
518
551
|
.u-toolbar-acts{display:inline-flex;flex:none;margin-left:auto}
|
|
519
552
|
.u-toolbar-acts .u-head-acts{margin-left:0}
|
|
520
553
|
/* Phone widths: the toolbar wraps its buttons rather than cutting them off; the conversation header
|
|
@@ -527,6 +560,11 @@ export const upliftStyles = `
|
|
|
527
560
|
.u-who strong,.u-who small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
528
561
|
.u-connect{padding:6px 9px}
|
|
529
562
|
.u-connect span{display:none}
|
|
563
|
+
/* The host link stays, compact; the name keeps room to show. */
|
|
564
|
+
.u-who{min-width:72px}
|
|
565
|
+
.u-pane-head .u-hostlink{padding:6px 9px;font-size:13px}
|
|
566
|
+
/* With a host link there may not be room for everything: the panel's buttons wrap to a second line rather than run off the edge. */
|
|
567
|
+
.u-pane-head{flex-wrap:wrap;row-gap:6px}
|
|
530
568
|
.u-ag-grid{grid-template-columns:1fr}
|
|
531
569
|
.u-c-actions .u-meta{flex-basis:100%}
|
|
532
570
|
.u-sheet-wrap{padding:0}
|
package/dist/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAExD,MAAM,CAAC,MAAM,YAAY,GAAG
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAExD,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAijB3B,CAAC;AAEF,4EAA4E;AAC5E,MAAM,UAAU,YAAY,CAAC,MAA4B,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ;IAC7G,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,gBAAgB,CAAC;QAAE,OAAO;IACzD,MAAM,EAAE,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACtC,EAAE,CAAC,EAAE,GAAG,gBAAgB,CAAC;IACzB,EAAE,CAAC,WAAW,GAAG,YAAY,CAAC;IAC9B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -11,5 +11,5 @@ export declare function usePreviewDrafts(input: {
|
|
|
11
11
|
events: ReadonlyArray<PreviewEvent>;
|
|
12
12
|
} | null): DraftsState;
|
|
13
13
|
/** Only the fields the preview endpoint accepts (it rejects unknown keys such as a host's own id). */
|
|
14
|
-
export declare function toPreviewEvent({ type, occurredAt, exercise, sets, reps, weight, unit, sessionName }: PreviewEvent): PreviewEvent;
|
|
14
|
+
export declare function toPreviewEvent({ type, occurredAt, exercise, sets, reps, weight, unit, sessionName, channel, text }: PreviewEvent): PreviewEvent;
|
|
15
15
|
//# sourceMappingURL=usePreviewDrafts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePreviewDrafts.d.ts","sourceRoot":"","sources":["../src/usePreviewDrafts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,YAAY,EAAe,MAAM,eAAe,CAAC;AAGtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;CAAE,GAAG,IAAI,GAAG,WAAW,CAgDvJ;AAED,sGAAsG;AACtG,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,YAAY,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"usePreviewDrafts.d.ts","sourceRoot":"","sources":["../src/usePreviewDrafts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,YAAY,EAAe,MAAM,eAAe,CAAC;AAGtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;CAAE,GAAG,IAAI,GAAG,WAAW,CAgDvJ;AAED,sGAAsG;AACtG,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,YAAY,GAAG,YAAY,CAc/I"}
|
package/dist/usePreviewDrafts.js
CHANGED
|
@@ -58,7 +58,7 @@ export function usePreviewDrafts(input) {
|
|
|
58
58
|
return { status, drafts, error, retryIn, generate, clear, seed };
|
|
59
59
|
}
|
|
60
60
|
/** Only the fields the preview endpoint accepts (it rejects unknown keys such as a host's own id). */
|
|
61
|
-
export function toPreviewEvent({ type, occurredAt, exercise, sets, reps, weight, unit, sessionName }) {
|
|
61
|
+
export function toPreviewEvent({ type, occurredAt, exercise, sets, reps, weight, unit, sessionName, channel, text }) {
|
|
62
62
|
const e = { type, occurredAt };
|
|
63
63
|
if (exercise)
|
|
64
64
|
e.exercise = exercise;
|
|
@@ -72,6 +72,13 @@ export function toPreviewEvent({ type, occurredAt, exercise, sets, reps, weight,
|
|
|
72
72
|
e.unit = unit;
|
|
73
73
|
if (sessionName)
|
|
74
74
|
e.sessionName = sessionName;
|
|
75
|
+
// Only a message the client sent in the host's own app carries these; Uplift rejects them elsewhere.
|
|
76
|
+
if (type === "externalMessage") {
|
|
77
|
+
if (channel)
|
|
78
|
+
e.channel = channel;
|
|
79
|
+
if (text)
|
|
80
|
+
e.text = text.slice(0, 500);
|
|
81
|
+
}
|
|
75
82
|
return e;
|
|
76
83
|
}
|
|
77
84
|
//# sourceMappingURL=usePreviewDrafts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePreviewDrafts.js","sourceRoot":"","sources":["../src/usePreviewDrafts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG/D;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAyG;IACxI,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IAC/B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAwB,MAAM,CAAC,CAAC;IACpE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAkB,IAAI,CAAC,CAAC;IAC5D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAqB,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAE5B,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,SAAS,CAAC,OAAO,EAAE,CAAC;QACpB,SAAS,CAAC,MAAM,CAAC,CAAC;QAClB,SAAS,CAAC,IAAI,CAAC,CAAC;QAChB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AAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACnE,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAgB;IAC/H,MAAM,CAAC,GAAiB,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC7C,IAAI,QAAQ;QAAE,CAAC,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACpC,IAAI,IAAI,IAAI,IAAI;QAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;IAChC,IAAI,IAAI,IAAI,IAAI;QAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;IAChC,IAAI,MAAM,IAAI,IAAI;QAAE,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;IACtC,IAAI,IAAI;QAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;IACxB,IAAI,WAAW;QAAE,CAAC,CAAC,WAAW,GAAG,WAAW,CAAC;IAC7C,qGAAqG;IACrG,IAAI,IAAI,KAAK,iBAAiB,EAAE,CAAC;QAC/B,IAAI,OAAO;YAAE,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC;QACjC,IAAI,IAAI;YAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/dist/useSend.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import type { Attachment, SendResult, UpliftError } from "@uplifted/sdk";
|
|
1
|
+
import type { Attachment, DraftContext, SendOrigin, SendResult, UpliftError } from "@uplifted/sdk";
|
|
2
2
|
export type SendStatus = "idle" | "sending" | "sent" | "error";
|
|
3
|
+
/** How the coach produced the text and what drafts were on screen (draftContext.ts); teaches Uplift their voice. */
|
|
4
|
+
export interface SendVoice {
|
|
5
|
+
origin: SendOrigin;
|
|
6
|
+
draftContext: DraftContext | null;
|
|
7
|
+
}
|
|
3
8
|
export interface SendState {
|
|
4
9
|
status: SendStatus;
|
|
5
10
|
error: UpliftError | null;
|
|
@@ -8,7 +13,7 @@ export interface SendState {
|
|
|
8
13
|
* Send `body`. Resolves with the result, or null on failure (read `error`). The same text
|
|
9
14
|
* keeps the same Idempotency-Key until it succeeds, so Retry can never double send (C21, T24).
|
|
10
15
|
*/
|
|
11
|
-
send: (body: string, attachments?: Attachment[]) => Promise<SendResult | null>;
|
|
16
|
+
send: (body: string, attachments?: Attachment[], voice?: SendVoice) => Promise<SendResult | null>;
|
|
12
17
|
/** Back to idle; the key for the current text is kept. */
|
|
13
18
|
reset: () => void;
|
|
14
19
|
}
|
package/dist/useSend.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSend.d.ts","sourceRoot":"","sources":["../src/useSend.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useSend.d.ts","sourceRoot":"","sources":["../src/useSend.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAInG,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/D,oHAAoH;AACpH,MAAM,WAAW,SAAS;IAAG,MAAM,EAAE,UAAU,CAAC;IAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE;AAEpF,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,CAAC,EAAE,SAAS,KAAK,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IAClG,0DAA0D;IAC1D,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAQD,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CA4C1D"}
|
package/dist/useSend.js
CHANGED
|
@@ -19,7 +19,7 @@ export function useSend(clientId) {
|
|
|
19
19
|
setError(null);
|
|
20
20
|
setResult(null);
|
|
21
21
|
}, [clientId]);
|
|
22
|
-
const send = useCallback(async (body, attachments = []) => {
|
|
22
|
+
const send = useCallback(async (body, attachments = [], voice) => {
|
|
23
23
|
if (!clientId || status === "sending")
|
|
24
24
|
return null;
|
|
25
25
|
const text = body.trim();
|
|
@@ -32,7 +32,12 @@ export function useSend(clientId) {
|
|
|
32
32
|
setStatus("sending");
|
|
33
33
|
setError(null);
|
|
34
34
|
try {
|
|
35
|
-
const res = await client.send(clientId, {
|
|
35
|
+
const res = await client.send(clientId, {
|
|
36
|
+
body: text,
|
|
37
|
+
...(attachments.length ? { attachments } : {}),
|
|
38
|
+
...(voice ? { origin: voice.origin, draftContext: voice.draftContext } : {}),
|
|
39
|
+
idempotencyKey: keyFor.current.key,
|
|
40
|
+
});
|
|
36
41
|
keyFor.current = null;
|
|
37
42
|
setResult(res);
|
|
38
43
|
setStatus("sent");
|
package/dist/useSend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSend.js","sourceRoot":"","sources":["../src/useSend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MA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O,CAAC,GAAG;aACnC,CAAC,CAAC;YACH,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;YACtB,SAAS,CAAC,GAAG,CAAC,CAAC;YACf,SAAS,CAAC,MAAM,CAAC,CAAC;YAClB,OAAO,GAAG,CAAC;QACb,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7B,SAAS,CAAC,OAAO,CAAC,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAE/B,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAE7F,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uplifted/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Uplift messaging screens as host-agnostic React components and hooks.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
],
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@uplifted/sdk": "^0.
|
|
22
|
+
"@uplifted/sdk": "^0.11.0",
|
|
23
23
|
"react": "^18.3.0 || ^19.0.0",
|
|
24
24
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@uplifted/sdk": "0.
|
|
27
|
+
"@uplifted/sdk": "0.11.0"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "restricted"
|
package/dist/ComposerExtras.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Collapsible wrapper for everything that stacks above the editor (the draft grid), a port of
|
|
4
|
-
* native Uplift's ComposerExtras (GH #512/#513): one control that drops the whole stack down to
|
|
5
|
-
* just the input. Collapse is CSS-only so children stay mounted. The rail only renders when there
|
|
6
|
-
* is something to collapse, or the stack is already collapsed. Open, it sits at the right end of the
|
|
7
|
-
* drafts header row; collapsed, it is the only row left, right-aligned.
|
|
8
|
-
*/
|
|
9
|
-
export declare function ComposerExtras({ collapsed, onToggle, hasContent, children }: {
|
|
10
|
-
collapsed: boolean;
|
|
11
|
-
onToggle: (next: boolean) => void;
|
|
12
|
-
hasContent: boolean;
|
|
13
|
-
children: ReactNode;
|
|
14
|
-
}): import("react").JSX.Element;
|
|
15
|
-
//# sourceMappingURL=ComposerExtras.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerExtras.d.ts","sourceRoot":"","sources":["../src/ComposerExtras.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAoBhL"}
|
package/dist/ComposerExtras.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { IconChevronDown, IconChevronUp } from "./icons.js";
|
|
3
|
-
/**
|
|
4
|
-
* Collapsible wrapper for everything that stacks above the editor (the draft grid), a port of
|
|
5
|
-
* native Uplift's ComposerExtras (GH #512/#513): one control that drops the whole stack down to
|
|
6
|
-
* just the input. Collapse is CSS-only so children stay mounted. The rail only renders when there
|
|
7
|
-
* is something to collapse, or the stack is already collapsed. Open, it sits at the right end of the
|
|
8
|
-
* drafts header row; collapsed, it is the only row left, right-aligned.
|
|
9
|
-
*/
|
|
10
|
-
export function ComposerExtras({ collapsed, onToggle, hasContent, children }) {
|
|
11
|
-
const showRail = collapsed || hasContent;
|
|
12
|
-
return (_jsxs("div", { className: "u-extras-wrap", children: [showRail && (_jsxs("button", { type: "button", className: "u-rail", onClick: () => onToggle(!collapsed), "aria-expanded": !collapsed, "aria-label": collapsed ? "Show drafts & tools" : "Hide drafts & tools", title: collapsed ? "Show drafts & tools" : "Hide drafts & tools to see more of the chat", children: [collapsed ? _jsx(IconChevronUp, {}) : _jsx(IconChevronDown, {}), collapsed && _jsx("span", { className: "u-rail-label", children: "Show drafts & tools" })] })), _jsx("div", { className: collapsed ? "u-extras u-extras-off" : "u-extras", "data-testid": "composer-extras", children: children })] }));
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=ComposerExtras.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerExtras.js","sourceRoot":"","sources":["../src/ComposerExtras.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAuG;IAC/K,MAAM,QAAQ,GAAG,SAAS,IAAI,UAAU,CAAC;IACzC,OAAO,CACL,eAAK,SAAS,EAAC,eAAe,aAC3B,QAAQ,IAAI,CACX,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,mBACpB,CAAC,SAAS,gBACb,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,EACrE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,6CAA6C,aAEvF,SAAS,CAAC,CAAC,CAAC,KAAC,aAAa,KAAG,CAAC,CAAC,CAAC,KAAC,eAAe,KAAG,EACnD,SAAS,IAAI,eAAM,SAAS,EAAC,cAAc,oCAA+B,IACpE,CACV,EACD,cAAK,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,UAAU,iBAAc,iBAAiB,YAAE,QAAQ,GAAO,IAC5G,CACP,CAAC;AACJ,CAAC"}
|