camox 0.63.0 → 0.66.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/dist/core/createApp.d.ts +28 -28
- package/dist/core/createLayout.d.ts +1 -1
- package/dist/core/derivedRoutes.js +3 -30
- package/dist/core/editing/createEditableBlock.d.ts +604 -604
- package/dist/features/canvas/CamoxCanvas.js +195 -173
- package/dist/features/canvas/canvasCamera.js +11 -2
- package/dist/features/canvas/canvasFrameCapture.js +5 -12
- package/dist/features/canvas/canvasFrameDocument.js +90 -29
- package/dist/features/canvas/canvasItems.js +22 -6
- package/dist/features/canvas/sidebar/ContentSidebar.js +19 -21
- package/dist/features/canvas/sidebar/LayoutPageOverview.js +22 -49
- package/dist/features/canvas/sidebar/LayoutPageSeo.js +73 -76
- package/dist/features/canvas/sidebar/PageInspector.js +61 -50
- package/dist/features/canvas/sidebar/PageInspectorSkeleton.js +4 -4
- package/dist/features/canvas/useCanvasCamera.js +36 -15
- package/dist/features/page/CuratedPageContent.js +2 -1
- package/dist/features/page/UnplacedBlockContent.js +52 -0
- package/dist/features/preview/components/PageInfo.js +103 -100
- package/dist/features/preview/components/PreviewPanel.js +40 -12
- package/dist/features/preview/components/SidebarStack.js +78 -9
- package/dist/features/preview/strayCaretGuard.js +34 -0
- package/dist/features/provider/CoreCamoxProvider.js +5 -3
- package/dist/features/routes/pageRuntime.d.ts +2 -0
- package/dist/features/routes/pageRuntime.js +8 -5
- package/dist/features/runtime/RuntimeChrome.js +66 -40
- package/dist/features/runtime/pageApp.js +111 -74
- package/dist/features/runtime/pageClient.js +22 -2
- package/dist/features/runtime/runtime.d.ts +10 -0
- package/dist/features/runtime/runtime.js +314 -4
- package/dist/features/runtime/runtimeRoutes.d.ts +5 -0
- package/dist/features/runtime/runtimeRoutes.js +5 -0
- package/dist/features/studio/components/AgentSidebar.js +3 -3
- package/dist/features/studio/components/ChatWidget.js +106 -75
- package/dist/features/studio/components/ConnectAgent.js +313 -0
- package/dist/features/studio/components/DraftsControl.js +172 -159
- package/dist/features/studio/components/Patrol.js +605 -350
- package/dist/features/studio/components/ReviewDraftSheet.js +566 -430
- package/dist/features/studio/components/Squareling.js +74 -41
- package/dist/features/studio/components/ThreadComposer.js +192 -107
- package/dist/features/studio/components/ThreadMessages.js +95 -18
- package/dist/features/studio/components/UnnamedDraftBar.js +349 -0
- package/dist/features/studio/components/clientLogoPaths.js +10 -0
- package/dist/features/studio/findingSentence.js +37 -0
- package/dist/features/studio/patrollerBio.js +40 -0
- package/dist/features/studio/reportSentence.js +15 -0
- package/dist/features/studio/studioStore.js +36 -1
- package/dist/features/studio/workingSentence.js +10 -7
- package/dist/lib/api-client.d.ts +1 -0
- package/dist/lib/auth.js +34 -32
- package/dist/lib/queries.js +9 -1
- package/dist/lib/revisions.js +25 -3
- package/dist/lib/server-auth-cookie.js +17 -4
- package/dist/lib/studio-reads.d.ts +1 -1
- package/dist/lib/studio-reads.js +5 -1
- package/dist/lib/use-thread.js +1 -1
- package/dist/package.js +1 -1
- package/dist/studio.css +1 -1
- package/package.json +15 -4
- package/dist/features/canvas/sidebar/DerivedPageInspector.js +0 -49
- package/dist/features/canvas/sidebar/SingletonPageInspector.js +0 -39
|
@@ -14,6 +14,8 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
* while it works; the SEO manager is a tall block with the small shape's soft corner, in amber,
|
|
15
15
|
* scanning down while it works.
|
|
16
16
|
*
|
|
17
|
+
* A patroller off duty where the editor is sleeps, eyes closed, breathing slowly.
|
|
18
|
+
*
|
|
17
19
|
* One face flows into the next: its eyes glide to where the next face holds them, opening or
|
|
18
20
|
* narrowing, and a looping motion settles before the next one starts (`useFaceChange`).
|
|
19
21
|
*/
|
|
@@ -67,7 +69,8 @@ function Squareling(props) {
|
|
|
67
69
|
status: props.status
|
|
68
70
|
}) : /* @__PURE__ */ jsx(PatrollerEyes, {
|
|
69
71
|
eyes: look.eyes,
|
|
70
|
-
working: props.status === "working"
|
|
72
|
+
working: props.status === "working",
|
|
73
|
+
asleep: props.status === "asleep"
|
|
71
74
|
})
|
|
72
75
|
})
|
|
73
76
|
});
|
|
@@ -183,6 +186,24 @@ const LOOKS = {
|
|
|
183
186
|
x: [44, 63],
|
|
184
187
|
y: 28
|
|
185
188
|
}
|
|
189
|
+
},
|
|
190
|
+
linkChecker: {
|
|
191
|
+
body: "M32 14H68Q86 14 86 32V68Q86 86 68 86H32Q14 86 14 68V32Q14 14 32 14Z",
|
|
192
|
+
middle: 50,
|
|
193
|
+
fill: "fill-sky-500",
|
|
194
|
+
eyes: {
|
|
195
|
+
x: [40, 59],
|
|
196
|
+
y: 32
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
proofreader: {
|
|
200
|
+
body: "M20 10H64L88 34V82Q88 90 80 90H20Q12 90 12 82V18Q12 10 20 10Z",
|
|
201
|
+
middle: 50,
|
|
202
|
+
fill: "fill-rose-500",
|
|
203
|
+
eyes: {
|
|
204
|
+
x: [34, 53],
|
|
205
|
+
y: 38
|
|
206
|
+
}
|
|
186
207
|
}
|
|
187
208
|
};
|
|
188
209
|
const EYE_WIDTH = 11;
|
|
@@ -192,60 +213,68 @@ const OPEN = 17;
|
|
|
192
213
|
const NARROWED = 6;
|
|
193
214
|
/** How far down a narrowed eye's middle sits, from the open one's. */
|
|
194
215
|
const NARROWED_SHIFT = 2.5;
|
|
216
|
+
const CLOSED = 2;
|
|
217
|
+
/** How far down a closed eye's middle sits, from the open one's: near its lower lid. */
|
|
218
|
+
const CLOSED_SHIFT = 5;
|
|
195
219
|
/**
|
|
196
|
-
* One eye, its left edge at `x` and its top at `y`: open,
|
|
197
|
-
* It narrows by scaling, which `studio.css` eases. Only an eye that blinks
|
|
198
|
-
* `studio.css` blinks.
|
|
220
|
+
* One eye, its left edge at `x` and its top at `y`: open, narrowed on the work, or closed, each
|
|
221
|
+
* lower down. It narrows and closes by scaling, which `studio.css` eases. Only an eye that blinks
|
|
222
|
+
* carries the class `studio.css` blinks.
|
|
199
223
|
*/
|
|
200
224
|
function Eye(t0) {
|
|
201
|
-
const $ = c(
|
|
202
|
-
const { x, y, narrowed, blinks } = t0;
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
if ($[0] !== t1) {
|
|
206
|
-
t2 = cn("squareling-eye", t1);
|
|
207
|
-
$[0] = t1;
|
|
208
|
-
$[1] = t2;
|
|
209
|
-
} else t2 = $[1];
|
|
225
|
+
const $ = c(7);
|
|
226
|
+
const { x, y, narrowed, closed: t1, blinks } = t0;
|
|
227
|
+
const openness = (t1 === void 0 ? false : t1) ? "closed" : narrowed ? "narrowed" : "open";
|
|
228
|
+
const t2 = blinks && "squareling-blinks";
|
|
210
229
|
let t3;
|
|
211
|
-
if ($[
|
|
212
|
-
t3 =
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
} else t3 = $[3];
|
|
222
|
-
let t4;
|
|
223
|
-
if ($[4] !== t2 || $[5] !== t3 || $[6] !== x || $[7] !== y) {
|
|
224
|
-
t4 = /* @__PURE__ */ jsx("rect", {
|
|
225
|
-
className: t2,
|
|
230
|
+
if ($[0] !== t2) {
|
|
231
|
+
t3 = cn("squareling-eye", t2);
|
|
232
|
+
$[0] = t2;
|
|
233
|
+
$[1] = t3;
|
|
234
|
+
} else t3 = $[1];
|
|
235
|
+
const t4 = EYE_STYLES[openness];
|
|
236
|
+
let t5;
|
|
237
|
+
if ($[2] !== t3 || $[3] !== t4 || $[4] !== x || $[5] !== y) {
|
|
238
|
+
t5 = /* @__PURE__ */ jsx("rect", {
|
|
239
|
+
className: t3,
|
|
226
240
|
x,
|
|
227
241
|
y,
|
|
228
242
|
width: EYE_WIDTH,
|
|
229
243
|
height: OPEN,
|
|
230
|
-
style:
|
|
244
|
+
style: t4
|
|
231
245
|
});
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
} else
|
|
238
|
-
return
|
|
246
|
+
$[2] = t3;
|
|
247
|
+
$[3] = t4;
|
|
248
|
+
$[4] = x;
|
|
249
|
+
$[5] = y;
|
|
250
|
+
$[6] = t5;
|
|
251
|
+
} else t5 = $[6];
|
|
252
|
+
return t5;
|
|
239
253
|
}
|
|
254
|
+
const EYE_STYLES = {
|
|
255
|
+
open: {
|
|
256
|
+
scale: "1",
|
|
257
|
+
translate: "0"
|
|
258
|
+
},
|
|
259
|
+
narrowed: {
|
|
260
|
+
scale: `1 ${NARROWED / OPEN}`,
|
|
261
|
+
translate: `0 ${NARROWED_SHIFT}px`
|
|
262
|
+
},
|
|
263
|
+
closed: {
|
|
264
|
+
scale: `1 ${CLOSED / OPEN}`,
|
|
265
|
+
translate: `0 ${CLOSED_SHIFT}px`
|
|
266
|
+
}
|
|
267
|
+
};
|
|
240
268
|
/**
|
|
241
269
|
* The agent's eyes: both narrowed on the work while making changes, the right one while fixing,
|
|
242
|
-
* open otherwise, blinking unless it looks around
|
|
270
|
+
* open otherwise, blinking unless it looks around, makes changes, or checks the design, its eyes
|
|
271
|
+
* fixed on it.
|
|
243
272
|
*/
|
|
244
273
|
function AgentEyes(t0) {
|
|
245
274
|
const $ = c(13);
|
|
246
275
|
const { eyes, status } = t0;
|
|
247
276
|
const [left, right] = eyes.x;
|
|
248
|
-
const blinks = status !== "exploring" && status !== "changing";
|
|
277
|
+
const blinks = status !== "exploring" && status !== "changing" && status !== "checking";
|
|
249
278
|
const t1 = status === "changing";
|
|
250
279
|
let t2;
|
|
251
280
|
if ($[0] !== blinks || $[1] !== eyes.y || $[2] !== left || $[3] !== t1) {
|
|
@@ -285,13 +314,17 @@ function AgentEyes(t0) {
|
|
|
285
314
|
} else t5 = $[12];
|
|
286
315
|
return t5;
|
|
287
316
|
}
|
|
288
|
-
/**
|
|
289
|
-
|
|
317
|
+
/**
|
|
318
|
+
* A patroller's eyes: open while idle, narrowed on the work while working, closed while asleep,
|
|
319
|
+
* when they don't blink.
|
|
320
|
+
*/
|
|
321
|
+
function PatrollerEyes({ eyes, working, asleep }) {
|
|
290
322
|
return eyes.x.map((x) => /* @__PURE__ */ jsx(Eye, {
|
|
291
323
|
x,
|
|
292
324
|
y: eyes.y,
|
|
293
325
|
narrowed: working,
|
|
294
|
-
|
|
326
|
+
closed: asleep,
|
|
327
|
+
blinks: !asleep
|
|
295
328
|
}, x));
|
|
296
329
|
}
|
|
297
330
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
2
|
+
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { ArrowUp, Square, SquareDashedMousePointer, X } from "lucide-react";
|
|
5
5
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupTextarea } from "@camox/ui/input-group";
|
|
@@ -8,47 +8,117 @@ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupTextarea } fro
|
|
|
8
8
|
/**
|
|
9
9
|
* Where an editor writes to the agent: Enter sends, Shift+Enter adds a line. While a run is
|
|
10
10
|
* going, sending steers it, and a Stop button sits beside Send. Over the message, what the
|
|
11
|
-
* editor has selected, which their messages carry to the agent until they clear it.
|
|
11
|
+
* editor has selected, which their messages carry to the agent until they clear it. A message
|
|
12
|
+
* filled in from elsewhere in the studio replaces what the editor wrote, for them to send. Given a
|
|
13
|
+
* `carry`, the composer of the next thread goes on from this one, as when the studio enters the
|
|
14
|
+
* draft the editor's request was handed off to: with what they were writing, focused if it was.
|
|
12
15
|
*/
|
|
13
16
|
function ThreadComposer(t0) {
|
|
14
|
-
const $ = c(
|
|
15
|
-
const { onSend, onStop, selection, onClearSelection, running: t1, disabled: t2 } = t0;
|
|
17
|
+
const $ = c(48);
|
|
18
|
+
const { onSend, onStop, selection, onClearSelection, running: t1, disabled: t2, filled, carry } = t0;
|
|
16
19
|
const running = t1 === void 0 ? false : t1;
|
|
17
20
|
const disabled = t2 === void 0 ? false : t2;
|
|
18
|
-
const [text, setText] = useState("");
|
|
19
21
|
let t3;
|
|
20
|
-
if ($[0] !==
|
|
21
|
-
t3 =
|
|
22
|
-
$[0] =
|
|
22
|
+
if ($[0] !== carry) {
|
|
23
|
+
t3 = () => carry?.held()?.text ?? "";
|
|
24
|
+
$[0] = carry;
|
|
23
25
|
$[1] = t3;
|
|
24
26
|
} else t3 = $[1];
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
+
const [text, setText] = useState(t3);
|
|
28
|
+
const [filledId, setFilledId] = useState();
|
|
29
|
+
if (filled && filled.id !== filledId) {
|
|
30
|
+
setFilledId(filled.id);
|
|
31
|
+
setText(filled.text);
|
|
32
|
+
}
|
|
33
|
+
const box = useRef(null);
|
|
27
34
|
let t4;
|
|
28
|
-
|
|
35
|
+
let t5;
|
|
36
|
+
if ($[2] !== carry || $[3] !== text) {
|
|
29
37
|
t4 = () => {
|
|
38
|
+
carry?.hold({
|
|
39
|
+
text,
|
|
40
|
+
focused: carry.held()?.focused ?? false
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
t5 = [carry, text];
|
|
44
|
+
$[2] = carry;
|
|
45
|
+
$[3] = text;
|
|
46
|
+
$[4] = t4;
|
|
47
|
+
$[5] = t5;
|
|
48
|
+
} else {
|
|
49
|
+
t4 = $[4];
|
|
50
|
+
t5 = $[5];
|
|
51
|
+
}
|
|
52
|
+
useEffect(t4, t5);
|
|
53
|
+
let t6;
|
|
54
|
+
let t7;
|
|
55
|
+
if ($[6] !== carry) {
|
|
56
|
+
t6 = () => {
|
|
57
|
+
const element = box.current;
|
|
58
|
+
if (!carry || !element) return;
|
|
59
|
+
if (carry.held()?.focused) element.focus();
|
|
60
|
+
return () => carry.hold({
|
|
61
|
+
text: element.value,
|
|
62
|
+
focused: element.ownerDocument.activeElement === element
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
t7 = [carry];
|
|
66
|
+
$[6] = carry;
|
|
67
|
+
$[7] = t6;
|
|
68
|
+
$[8] = t7;
|
|
69
|
+
} else {
|
|
70
|
+
t6 = $[7];
|
|
71
|
+
t7 = $[8];
|
|
72
|
+
}
|
|
73
|
+
useLayoutEffect(t6, t7);
|
|
74
|
+
let t8;
|
|
75
|
+
let t9;
|
|
76
|
+
if ($[9] !== filledId) {
|
|
77
|
+
t8 = () => {
|
|
78
|
+
if (filledId !== void 0) box.current?.focus();
|
|
79
|
+
};
|
|
80
|
+
t9 = [filledId];
|
|
81
|
+
$[9] = filledId;
|
|
82
|
+
$[10] = t8;
|
|
83
|
+
$[11] = t9;
|
|
84
|
+
} else {
|
|
85
|
+
t8 = $[10];
|
|
86
|
+
t9 = $[11];
|
|
87
|
+
}
|
|
88
|
+
useEffect(t8, t9);
|
|
89
|
+
let t10;
|
|
90
|
+
if ($[12] !== text) {
|
|
91
|
+
t10 = text.trim();
|
|
92
|
+
$[12] = text;
|
|
93
|
+
$[13] = t10;
|
|
94
|
+
} else t10 = $[13];
|
|
95
|
+
const message = t10;
|
|
96
|
+
const canSend = !disabled && message !== "" && onSend !== void 0;
|
|
97
|
+
let t11;
|
|
98
|
+
if ($[14] !== canSend || $[15] !== message || $[16] !== onSend) {
|
|
99
|
+
t11 = () => {
|
|
30
100
|
if (!canSend) return;
|
|
31
101
|
onSend(message);
|
|
32
102
|
setText("");
|
|
33
103
|
};
|
|
34
|
-
$[
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
37
|
-
$[
|
|
38
|
-
} else
|
|
39
|
-
const submit =
|
|
40
|
-
let
|
|
41
|
-
if ($[
|
|
42
|
-
|
|
104
|
+
$[14] = canSend;
|
|
105
|
+
$[15] = message;
|
|
106
|
+
$[16] = onSend;
|
|
107
|
+
$[17] = t11;
|
|
108
|
+
} else t11 = $[17];
|
|
109
|
+
const submit = t11;
|
|
110
|
+
let t12;
|
|
111
|
+
if ($[18] !== submit) {
|
|
112
|
+
t12 = (event) => {
|
|
43
113
|
event.preventDefault();
|
|
44
114
|
submit();
|
|
45
115
|
};
|
|
46
|
-
$[
|
|
47
|
-
$[
|
|
48
|
-
} else
|
|
49
|
-
let
|
|
50
|
-
if ($[
|
|
51
|
-
|
|
116
|
+
$[18] = submit;
|
|
117
|
+
$[19] = t12;
|
|
118
|
+
} else t12 = $[19];
|
|
119
|
+
let t13;
|
|
120
|
+
if ($[20] !== onClearSelection || $[21] !== selection) {
|
|
121
|
+
t13 = selection && /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
52
122
|
align: "block-start",
|
|
53
123
|
className: "border-input border-b",
|
|
54
124
|
children: /* @__PURE__ */ jsx(SelectionChip, {
|
|
@@ -56,44 +126,45 @@ function ThreadComposer(t0) {
|
|
|
56
126
|
onClear: onClearSelection
|
|
57
127
|
})
|
|
58
128
|
});
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
} else
|
|
63
|
-
let
|
|
64
|
-
if ($[
|
|
65
|
-
|
|
66
|
-
$[
|
|
67
|
-
} else
|
|
68
|
-
let
|
|
69
|
-
if ($[
|
|
70
|
-
|
|
129
|
+
$[20] = onClearSelection;
|
|
130
|
+
$[21] = selection;
|
|
131
|
+
$[22] = t13;
|
|
132
|
+
} else t13 = $[22];
|
|
133
|
+
let t14;
|
|
134
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
135
|
+
t14 = (event_0) => setText(event_0.target.value);
|
|
136
|
+
$[23] = t14;
|
|
137
|
+
} else t14 = $[23];
|
|
138
|
+
let t15;
|
|
139
|
+
if ($[24] !== submit) {
|
|
140
|
+
t15 = (event_1) => {
|
|
71
141
|
if (event_1.key !== "Enter" || event_1.shiftKey || event_1.nativeEvent.isComposing) return;
|
|
72
142
|
event_1.preventDefault();
|
|
73
143
|
submit();
|
|
74
144
|
};
|
|
75
|
-
$[
|
|
76
|
-
$[
|
|
77
|
-
} else
|
|
78
|
-
let
|
|
79
|
-
if ($[
|
|
80
|
-
|
|
145
|
+
$[24] = submit;
|
|
146
|
+
$[25] = t15;
|
|
147
|
+
} else t15 = $[25];
|
|
148
|
+
let t16;
|
|
149
|
+
if ($[26] !== disabled || $[27] !== t15 || $[28] !== text) {
|
|
150
|
+
t16 = /* @__PURE__ */ jsx(InputGroupTextarea, {
|
|
151
|
+
ref: box,
|
|
81
152
|
"aria-label": "Message",
|
|
82
153
|
placeholder: "Message Camox…",
|
|
83
154
|
value: text,
|
|
84
155
|
disabled,
|
|
85
|
-
onChange:
|
|
86
|
-
onKeyDown:
|
|
156
|
+
onChange: t14,
|
|
157
|
+
onKeyDown: t15,
|
|
87
158
|
className: "max-h-48 min-h-14"
|
|
88
159
|
});
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
} else
|
|
94
|
-
let
|
|
95
|
-
if ($[
|
|
96
|
-
|
|
160
|
+
$[26] = disabled;
|
|
161
|
+
$[27] = t15;
|
|
162
|
+
$[28] = text;
|
|
163
|
+
$[29] = t16;
|
|
164
|
+
} else t16 = $[29];
|
|
165
|
+
let t17;
|
|
166
|
+
if ($[30] !== disabled || $[31] !== onStop || $[32] !== running) {
|
|
167
|
+
t17 = running && onStop && /* @__PURE__ */ jsxs(InputGroupButton, {
|
|
97
168
|
type: "button",
|
|
98
169
|
variant: "outline",
|
|
99
170
|
size: "icon-sm",
|
|
@@ -104,73 +175,87 @@ function ThreadComposer(t0) {
|
|
|
104
175
|
children: "Stop"
|
|
105
176
|
})]
|
|
106
177
|
});
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
} else
|
|
112
|
-
const
|
|
113
|
-
let
|
|
114
|
-
let
|
|
115
|
-
if ($[
|
|
116
|
-
|
|
117
|
-
|
|
178
|
+
$[30] = disabled;
|
|
179
|
+
$[31] = onStop;
|
|
180
|
+
$[32] = running;
|
|
181
|
+
$[33] = t17;
|
|
182
|
+
} else t17 = $[33];
|
|
183
|
+
const t18 = !canSend;
|
|
184
|
+
let t19;
|
|
185
|
+
let t20;
|
|
186
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
187
|
+
t19 = /* @__PURE__ */ jsx(ArrowUp, {});
|
|
188
|
+
t20 = /* @__PURE__ */ jsx("span", {
|
|
118
189
|
className: "sr-only",
|
|
119
190
|
children: "Send"
|
|
120
191
|
});
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
192
|
+
$[34] = t19;
|
|
193
|
+
$[35] = t20;
|
|
123
194
|
} else {
|
|
124
|
-
|
|
125
|
-
|
|
195
|
+
t19 = $[34];
|
|
196
|
+
t20 = $[35];
|
|
126
197
|
}
|
|
127
|
-
let
|
|
128
|
-
if ($[
|
|
129
|
-
|
|
198
|
+
let t21;
|
|
199
|
+
if ($[36] !== t18) {
|
|
200
|
+
t21 = /* @__PURE__ */ jsxs(InputGroupButton, {
|
|
130
201
|
type: "submit",
|
|
131
202
|
variant: "default",
|
|
132
203
|
size: "icon-sm",
|
|
133
|
-
disabled:
|
|
134
|
-
children: [
|
|
204
|
+
disabled: t18,
|
|
205
|
+
children: [t19, t20]
|
|
135
206
|
});
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
} else
|
|
139
|
-
let
|
|
140
|
-
if ($[
|
|
141
|
-
|
|
207
|
+
$[36] = t18;
|
|
208
|
+
$[37] = t21;
|
|
209
|
+
} else t21 = $[37];
|
|
210
|
+
let t22;
|
|
211
|
+
if ($[38] !== t17 || $[39] !== t21) {
|
|
212
|
+
t22 = /* @__PURE__ */ jsxs(InputGroupAddon, {
|
|
142
213
|
align: "block-end",
|
|
143
214
|
className: "justify-end",
|
|
144
|
-
children: [
|
|
215
|
+
children: [t17, t21]
|
|
145
216
|
});
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
} else
|
|
150
|
-
let
|
|
151
|
-
if ($[
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
217
|
+
$[38] = t17;
|
|
218
|
+
$[39] = t21;
|
|
219
|
+
$[40] = t22;
|
|
220
|
+
} else t22 = $[40];
|
|
221
|
+
let t23;
|
|
222
|
+
if ($[41] !== t13 || $[42] !== t16 || $[43] !== t22) {
|
|
223
|
+
t23 = /* @__PURE__ */ jsxs(InputGroup, { children: [
|
|
224
|
+
t13,
|
|
225
|
+
t16,
|
|
226
|
+
t22
|
|
156
227
|
] });
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
} else
|
|
162
|
-
let
|
|
163
|
-
if ($[
|
|
164
|
-
|
|
228
|
+
$[41] = t13;
|
|
229
|
+
$[42] = t16;
|
|
230
|
+
$[43] = t22;
|
|
231
|
+
$[44] = t23;
|
|
232
|
+
} else t23 = $[44];
|
|
233
|
+
let t24;
|
|
234
|
+
if ($[45] !== t12 || $[46] !== t23) {
|
|
235
|
+
t24 = /* @__PURE__ */ jsx("form", {
|
|
165
236
|
className: "p-2",
|
|
166
|
-
onSubmit:
|
|
167
|
-
children:
|
|
237
|
+
onSubmit: t12,
|
|
238
|
+
children: t23
|
|
168
239
|
});
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
} else
|
|
173
|
-
return
|
|
240
|
+
$[45] = t12;
|
|
241
|
+
$[46] = t23;
|
|
242
|
+
$[47] = t24;
|
|
243
|
+
} else t24 = $[47];
|
|
244
|
+
return t24;
|
|
245
|
+
}
|
|
246
|
+
/** A carrier that lasts as long as the component that keeps it. */
|
|
247
|
+
function useComposerCarrier() {
|
|
248
|
+
const [carrier] = useState(_temp);
|
|
249
|
+
return carrier;
|
|
250
|
+
}
|
|
251
|
+
function _temp() {
|
|
252
|
+
let held = null;
|
|
253
|
+
return {
|
|
254
|
+
held: () => held,
|
|
255
|
+
hold: (carry) => {
|
|
256
|
+
held = carry;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
174
259
|
}
|
|
175
260
|
/** The selection the editor's messages carry, by its name. */
|
|
176
261
|
function SelectionChip(t0) {
|
|
@@ -224,4 +309,4 @@ function SelectionChip(t0) {
|
|
|
224
309
|
}
|
|
225
310
|
|
|
226
311
|
//#endregion
|
|
227
|
-
export { ThreadComposer };
|
|
312
|
+
export { ThreadComposer, useComposerCarrier };
|