@lumerahq/ui 0.21.5 → 0.24.5
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/{RecordSheet-1aS1sssQ.js → RecordSheet-9fHBPi_o.js} +415 -76
- package/dist/{audit-log-DW-ts7mh.js → audit-log-QIEvuWf9.js} +1 -1
- package/dist/{automations-4aVNe5uF.js → automations-D4mDAarR.js} +6 -6
- package/dist/components/agent-chat/AgentChat.d.ts.map +1 -1
- package/dist/components/agent-chat/AgentChatComposer.d.ts.map +1 -1
- package/dist/components/agent-chat/lumera-agent-transport.d.ts.map +1 -1
- package/dist/components/agent-chat/types.d.ts +7 -1
- package/dist/components/agent-chat/types.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/dictation-worklet.js +67 -0
- package/dist/{highlighted-body-JLMTFACH-D1NSviFj.js → highlighted-body-JLMTFACH-CFO3t4N6.js} +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/use-agent-chat.d.ts +1 -1
- package/dist/hooks/use-agent-chat.d.ts.map +1 -1
- package/dist/hooks/use-chat-draft.d.ts +1 -1
- package/dist/hooks/use-chat-draft.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/lib/dictation-recording.d.ts +2 -0
- package/dist/lib/dictation-recording.d.ts.map +1 -0
- package/dist/lib/dictation-transcript.d.ts +5 -0
- package/dist/lib/dictation-transcript.d.ts.map +1 -0
- package/dist/lib/dictation.d.ts +24 -0
- package/dist/lib/dictation.d.ts.map +1 -0
- package/dist/lib/draft-hooks.d.ts +4 -3
- package/dist/lib/draft-hooks.d.ts.map +1 -1
- package/dist/lib/drafts.d.ts +6 -3
- package/dist/lib/drafts.d.ts.map +1 -1
- package/dist/lib/index.js +2 -2
- package/dist/mermaid-WFAXDIZX-4tI67A1Y.js +4 -0
- package/dist/ui.css +92 -1
- package/dist/{use-automation-run-udyHkYbG.js → use-automation-run-lhk85ke0.js} +51 -16
- package/dist/{use-sql-table-CgGHt8b8.js → use-sql-table-JkDEPAi_.js} +3 -3
- package/package.json +1 -1
- package/dist/mermaid-WFAXDIZX-f94Zh_PW.js +0 -4
package/dist/ui.css
CHANGED
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
--leading-snug: 1.375;
|
|
134
134
|
--leading-normal: 1.5;
|
|
135
135
|
--radius-xl: calc(var(--radius) * 1.4);
|
|
136
|
+
--ease-out: cubic-bezier(0, 0, .2, 1);
|
|
136
137
|
--ease-in-out: cubic-bezier(.4, 0, .2, 1);
|
|
137
138
|
--animate-spin: spin 1s linear infinite;
|
|
138
139
|
--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
|
|
@@ -642,6 +643,10 @@
|
|
|
642
643
|
margin-inline: calc(var(--spacing) * -1.5);
|
|
643
644
|
}
|
|
644
645
|
|
|
646
|
+
.mx-1 {
|
|
647
|
+
margin-inline: calc(var(--spacing) * 1);
|
|
648
|
+
}
|
|
649
|
+
|
|
645
650
|
.mx-2 {
|
|
646
651
|
margin-inline: calc(var(--spacing) * 2);
|
|
647
652
|
}
|
|
@@ -1162,6 +1167,10 @@
|
|
|
1162
1167
|
width: calc(var(--spacing) * 8);
|
|
1163
1168
|
}
|
|
1164
1169
|
|
|
1170
|
+
.w-9 {
|
|
1171
|
+
width: calc(var(--spacing) * 9);
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1165
1174
|
.w-48 {
|
|
1166
1175
|
width: calc(var(--spacing) * 48);
|
|
1167
1176
|
}
|
|
@@ -1174,6 +1183,10 @@
|
|
|
1174
1183
|
width: calc(var(--spacing) * 60);
|
|
1175
1184
|
}
|
|
1176
1185
|
|
|
1186
|
+
.w-\[30px\] {
|
|
1187
|
+
width: 30px;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1177
1190
|
.w-\[70px\] {
|
|
1178
1191
|
width: 70px;
|
|
1179
1192
|
}
|
|
@@ -1667,6 +1680,10 @@
|
|
|
1667
1680
|
border-radius: 0;
|
|
1668
1681
|
}
|
|
1669
1682
|
|
|
1683
|
+
.rounded-sm {
|
|
1684
|
+
border-radius: calc(var(--radius) * .6);
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1670
1687
|
.rounded-xl {
|
|
1671
1688
|
border-radius: calc(var(--radius) * 1.4);
|
|
1672
1689
|
}
|
|
@@ -1748,6 +1765,16 @@
|
|
|
1748
1765
|
border-color: var(--border);
|
|
1749
1766
|
}
|
|
1750
1767
|
|
|
1768
|
+
.border-current\/15 {
|
|
1769
|
+
border-color: currentColor;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1773
|
+
.border-current\/15 {
|
|
1774
|
+
border-color: color-mix(in oklab, currentcolor 15%, transparent);
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1751
1778
|
.border-destructive\/40 {
|
|
1752
1779
|
border-color: var(--destructive);
|
|
1753
1780
|
}
|
|
@@ -1866,7 +1893,7 @@
|
|
|
1866
1893
|
background-color: currentColor;
|
|
1867
1894
|
}
|
|
1868
1895
|
|
|
1869
|
-
.bg-destructive\/10 {
|
|
1896
|
+
.bg-destructive, .bg-destructive\/10 {
|
|
1870
1897
|
background-color: var(--destructive);
|
|
1871
1898
|
}
|
|
1872
1899
|
|
|
@@ -2276,6 +2303,10 @@
|
|
|
2276
2303
|
font-family: var(--font-mono);
|
|
2277
2304
|
}
|
|
2278
2305
|
|
|
2306
|
+
.font-sans {
|
|
2307
|
+
font-family: Inter Variable, sans-serif;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2279
2310
|
.text-2xl {
|
|
2280
2311
|
font-size: var(--text-2xl);
|
|
2281
2312
|
line-height: var(--tw-leading, var(--text-2xl--line-height));
|
|
@@ -2334,6 +2365,11 @@
|
|
|
2334
2365
|
font-size: 17px;
|
|
2335
2366
|
}
|
|
2336
2367
|
|
|
2368
|
+
.leading-3\.5 {
|
|
2369
|
+
--tw-leading: calc(var(--spacing) * 3.5);
|
|
2370
|
+
line-height: calc(var(--spacing) * 3.5);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2337
2373
|
.leading-\[1\.4\] {
|
|
2338
2374
|
--tw-leading: 1.4;
|
|
2339
2375
|
line-height: 1.4;
|
|
@@ -2765,6 +2801,12 @@
|
|
|
2765
2801
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2766
2802
|
}
|
|
2767
2803
|
|
|
2804
|
+
.transition-\[width\,background-color\] {
|
|
2805
|
+
transition-property: width, background-color;
|
|
2806
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
2807
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2768
2810
|
.transition-\[width\,height\,padding\] {
|
|
2769
2811
|
transition-property: width, height, padding;
|
|
2770
2812
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -2831,6 +2873,11 @@
|
|
|
2831
2873
|
transition-timing-function: linear;
|
|
2832
2874
|
}
|
|
2833
2875
|
|
|
2876
|
+
.ease-out {
|
|
2877
|
+
--tw-ease: var(--ease-out);
|
|
2878
|
+
transition-timing-function: var(--ease-out);
|
|
2879
|
+
}
|
|
2880
|
+
|
|
2834
2881
|
.outline-none {
|
|
2835
2882
|
--tw-outline-style: none;
|
|
2836
2883
|
outline-style: none;
|
|
@@ -3147,6 +3194,16 @@
|
|
|
3147
3194
|
scale: var(--tw-scale-x) var(--tw-scale-y);
|
|
3148
3195
|
}
|
|
3149
3196
|
|
|
3197
|
+
.hover\:bg-destructive\/15:hover {
|
|
3198
|
+
background-color: var(--destructive);
|
|
3199
|
+
}
|
|
3200
|
+
|
|
3201
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3202
|
+
.hover\:bg-destructive\/15:hover {
|
|
3203
|
+
background-color: color-mix(in oklab, var(--destructive) 15%, transparent);
|
|
3204
|
+
}
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3150
3207
|
.hover\:bg-destructive\/20:hover {
|
|
3151
3208
|
background-color: var(--destructive);
|
|
3152
3209
|
}
|
|
@@ -3695,6 +3752,28 @@
|
|
|
3695
3752
|
}
|
|
3696
3753
|
}
|
|
3697
3754
|
|
|
3755
|
+
.aria-pressed\:w-\[7\.5rem\][aria-pressed="true"] {
|
|
3756
|
+
width: 7.5rem;
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3759
|
+
.aria-pressed\:bg-accent[aria-pressed="true"] {
|
|
3760
|
+
background-color: var(--accent);
|
|
3761
|
+
}
|
|
3762
|
+
|
|
3763
|
+
.aria-pressed\:bg-destructive\/10[aria-pressed="true"] {
|
|
3764
|
+
background-color: var(--destructive);
|
|
3765
|
+
}
|
|
3766
|
+
|
|
3767
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3768
|
+
.aria-pressed\:bg-destructive\/10[aria-pressed="true"] {
|
|
3769
|
+
background-color: color-mix(in oklab, var(--destructive) 10%, transparent);
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
.aria-pressed\:text-accent-foreground[aria-pressed="true"] {
|
|
3774
|
+
color: var(--accent-foreground);
|
|
3775
|
+
}
|
|
3776
|
+
|
|
3698
3777
|
.data-empty\:p-0[data-empty] {
|
|
3699
3778
|
padding: calc(var(--spacing) * 0);
|
|
3700
3779
|
}
|
|
@@ -4151,6 +4230,18 @@
|
|
|
4151
4230
|
}
|
|
4152
4231
|
}
|
|
4153
4232
|
|
|
4233
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
4234
|
+
.motion-safe\:animate-pulse {
|
|
4235
|
+
animation: var(--animate-pulse);
|
|
4236
|
+
}
|
|
4237
|
+
}
|
|
4238
|
+
|
|
4239
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4240
|
+
.motion-reduce\:transition-none {
|
|
4241
|
+
transition-property: none;
|
|
4242
|
+
}
|
|
4243
|
+
}
|
|
4244
|
+
|
|
4154
4245
|
@media (min-width: 40rem) {
|
|
4155
4246
|
.sm\:flex {
|
|
4156
4247
|
display: flex;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback, useLayoutEffect, useRef, useSyncExternalStore, useMemo } from "react";
|
|
2
|
-
import { a4 as updateBlockers, a5 as getDraftOwner, a6 as subscribeDraftOwner, i as ensureAutomationRun, g as createAutomationRun, c as cancelAutomationRun, a as automationStatuses, m as getAutomationRun } from "./automations-
|
|
2
|
+
import { a4 as updateBlockers, a5 as getDraftOwner, a6 as subscribeDraftOwner, i as ensureAutomationRun, g as createAutomationRun, c as cancelAutomationRun, a as automationStatuses, m as getAutomationRun } from "./automations-D4mDAarR.js";
|
|
3
3
|
import { useQueryClient, useMutation, useQuery } from "@tanstack/react-query";
|
|
4
4
|
function isActiveStatus(status) {
|
|
5
5
|
return status === "queued" || status === "claimed" || status === "preparing" || status === "submitting" || status === "running";
|
|
@@ -57,14 +57,18 @@ class DraftSession {
|
|
|
57
57
|
listeners = /* @__PURE__ */ new Set();
|
|
58
58
|
value;
|
|
59
59
|
revision;
|
|
60
|
+
generation = 0;
|
|
61
|
+
dictatedCharacters;
|
|
62
|
+
getDictatedCharacters = () => this.dictatedCharacters;
|
|
60
63
|
key;
|
|
61
64
|
empty;
|
|
62
65
|
storage = getStorage();
|
|
63
|
-
constructor(key, initial, empty) {
|
|
66
|
+
constructor(key, initial, empty, initialDictatedCharacters = 0) {
|
|
64
67
|
this.key = key;
|
|
65
68
|
this.empty = empty;
|
|
66
69
|
const saved = read(key, this.storage);
|
|
67
70
|
this.value = saved ? saved.value : initial;
|
|
71
|
+
this.dictatedCharacters = saved?.dictatedCharacters ?? initialDictatedCharacters;
|
|
68
72
|
this.revision = saved?.revision ?? this.newRevision();
|
|
69
73
|
}
|
|
70
74
|
newRevision() {
|
|
@@ -77,13 +81,24 @@ class DraftSession {
|
|
|
77
81
|
};
|
|
78
82
|
};
|
|
79
83
|
getSnapshot = () => this.value;
|
|
80
|
-
set(value) {
|
|
81
|
-
if (Object.is(
|
|
84
|
+
set(value, dictatedCharacters = this.dictatedCharacters) {
|
|
85
|
+
if (Object.is(value, this.empty)) dictatedCharacters = 0;
|
|
86
|
+
if (Object.is(this.value, value) && dictatedCharacters === this.dictatedCharacters) return;
|
|
87
|
+
if (Object.is(value, this.empty)) this.generation++;
|
|
88
|
+
this.dictatedCharacters = dictatedCharacters;
|
|
82
89
|
this.value = value;
|
|
83
90
|
this.revision = this.newRevision();
|
|
84
91
|
if (this.key) {
|
|
85
92
|
try {
|
|
86
|
-
this.storage?.setItem(
|
|
93
|
+
this.storage?.setItem(
|
|
94
|
+
this.key,
|
|
95
|
+
JSON.stringify({
|
|
96
|
+
at: Date.now(),
|
|
97
|
+
value,
|
|
98
|
+
revision: this.revision,
|
|
99
|
+
dictatedCharacters: dictatedCharacters || void 0
|
|
100
|
+
})
|
|
101
|
+
);
|
|
87
102
|
} catch {
|
|
88
103
|
}
|
|
89
104
|
}
|
|
@@ -91,18 +106,25 @@ class DraftSession {
|
|
|
91
106
|
}
|
|
92
107
|
captureAcknowledgement = () => {
|
|
93
108
|
const revision = this.revision;
|
|
109
|
+
const generation = this.generation;
|
|
110
|
+
const submittedCharacters = this.dictatedCharacters;
|
|
111
|
+
let acknowledged = false;
|
|
94
112
|
return () => {
|
|
95
|
-
if (
|
|
113
|
+
if (acknowledged) return;
|
|
114
|
+
acknowledged = true;
|
|
96
115
|
const saved = read(this.key, this.storage);
|
|
97
|
-
if (saved?.revision && saved.revision !== revision) return;
|
|
98
|
-
this.set(this.empty);
|
|
116
|
+
if (saved?.revision && saved.revision !== this.revision) return;
|
|
117
|
+
if (this.revision === revision) this.set(this.empty);
|
|
118
|
+
else if (this.generation === generation && submittedCharacters > 0) {
|
|
119
|
+
this.set(this.value, Math.max(0, this.dictatedCharacters - submittedCharacters));
|
|
120
|
+
}
|
|
99
121
|
};
|
|
100
122
|
};
|
|
101
123
|
}
|
|
102
124
|
const documents = /* @__PURE__ */ new WeakMap();
|
|
103
|
-
function draftSession(identity, key, initial, empty, preferInitial = false) {
|
|
125
|
+
function draftSession(identity, key, initial, empty, preferInitial = false, initialDictatedCharacters = 0) {
|
|
104
126
|
const storage = getStorage();
|
|
105
|
-
if (!key || !storage) return new DraftSession(key, initial, empty);
|
|
127
|
+
if (!key || !storage) return new DraftSession(key, initial, empty, initialDictatedCharacters);
|
|
106
128
|
let sessions = documents.get(storage);
|
|
107
129
|
if (!sessions) {
|
|
108
130
|
sessions = /* @__PURE__ */ new Map();
|
|
@@ -113,7 +135,7 @@ function draftSession(identity, key, initial, empty, preferInitial = false) {
|
|
|
113
135
|
session = new DraftSession(key, initial, empty);
|
|
114
136
|
sessions.set(identity, session);
|
|
115
137
|
}
|
|
116
|
-
if (preferInitial) session.set(initial);
|
|
138
|
+
if (preferInitial) session.set(initial, initialDictatedCharacters);
|
|
117
139
|
return session;
|
|
118
140
|
}
|
|
119
141
|
function createDraftHook({ useCallback: useCallback2, useLayoutEffect: useLayoutEffect2, useRef: useRef2, useState: useState2, useSyncExternalStore: useSyncExternalStore2 }) {
|
|
@@ -127,7 +149,14 @@ function createDraftHook({ useCallback: useCallback2, useLayoutEffect: useLayout
|
|
|
127
149
|
if (state.identity !== identity) {
|
|
128
150
|
const carry = state.identity === carryFrom && !Object.is(state.session.getSnapshot(), empty);
|
|
129
151
|
const seed = carry ? state.session.getSnapshot() : initial;
|
|
130
|
-
session = draftSession(
|
|
152
|
+
session = draftSession(
|
|
153
|
+
identity,
|
|
154
|
+
key,
|
|
155
|
+
seed,
|
|
156
|
+
empty,
|
|
157
|
+
carry || preferInitial,
|
|
158
|
+
carry ? state.session.getDictatedCharacters() : 0
|
|
159
|
+
);
|
|
131
160
|
setState({ identity, session });
|
|
132
161
|
}
|
|
133
162
|
const live = useRef2({ identity, mounted: true });
|
|
@@ -139,13 +168,16 @@ function createDraftHook({ useCallback: useCallback2, useLayoutEffect: useLayout
|
|
|
139
168
|
}, [identity]);
|
|
140
169
|
const value = useSyncExternalStore2(session.subscribe, session.getSnapshot, session.getSnapshot);
|
|
141
170
|
const setValue = useCallback2(
|
|
142
|
-
(next) => {
|
|
171
|
+
(next, addedDictatedCharacters = 0) => {
|
|
143
172
|
if (!live.current.mounted || live.current.identity !== identity) return;
|
|
144
|
-
session.set(
|
|
173
|
+
session.set(
|
|
174
|
+
typeof next === "function" ? next(session.getSnapshot()) : next,
|
|
175
|
+
session.getDictatedCharacters() + addedDictatedCharacters
|
|
176
|
+
);
|
|
145
177
|
},
|
|
146
178
|
[session, identity]
|
|
147
179
|
);
|
|
148
|
-
return [value, setValue, session.captureAcknowledgement];
|
|
180
|
+
return [value, setValue, session.captureAcknowledgement, session.getDictatedCharacters];
|
|
149
181
|
};
|
|
150
182
|
}
|
|
151
183
|
function createUpdateBlockerHook({ useLayoutEffect: useLayoutEffect2, useRef: useRef2 }) {
|
|
@@ -301,7 +333,7 @@ function useAgentChat({
|
|
|
301
333
|
const [messages, setMessagesState] = useState(
|
|
302
334
|
() => trimMessages(initialMessages, maxBufferedMessages)
|
|
303
335
|
);
|
|
304
|
-
const [input, setInput, captureAcknowledgement] = useChatDraft(agentId, sessionId);
|
|
336
|
+
const [input, setInput, captureAcknowledgement, getDictatedCharacters] = useChatDraft(agentId, sessionId);
|
|
305
337
|
const [pendingFiles, setPendingFiles] = useState([]);
|
|
306
338
|
const [page, setPage] = useState(initialPage ?? null);
|
|
307
339
|
const [tokenUsage, setTokenUsage] = useState(null);
|
|
@@ -649,6 +681,7 @@ function useAgentChat({
|
|
|
649
681
|
setError(null);
|
|
650
682
|
const acknowledgeDraft = message === void 0 || content === input.trim() ? captureAcknowledgement() : () => {
|
|
651
683
|
};
|
|
684
|
+
const dictatedCharacters = message === void 0 ? getDictatedCharacters() : 0;
|
|
652
685
|
const submittedIdentity = identityKeyRef.current;
|
|
653
686
|
try {
|
|
654
687
|
const result = await transport.sendMessage({
|
|
@@ -656,6 +689,7 @@ function useAgentChat({
|
|
|
656
689
|
requestId,
|
|
657
690
|
sessionId,
|
|
658
691
|
files: pendingFiles,
|
|
692
|
+
...dictatedCharacters > 0 && { dictatedCharacters },
|
|
659
693
|
...webSearch && webSearchOn !== void 0 && { webSearchEnabled: webSearchOn }
|
|
660
694
|
});
|
|
661
695
|
if (result.accepted) acknowledgeDraft();
|
|
@@ -695,6 +729,7 @@ function useAgentChat({
|
|
|
695
729
|
startSubscription,
|
|
696
730
|
transport,
|
|
697
731
|
webSearch,
|
|
732
|
+
getDictatedCharacters,
|
|
698
733
|
webSearchOn
|
|
699
734
|
]
|
|
700
735
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useQueryClient, useQuery, useMutation, useInfiniteQuery } from "@tanstack/react-query";
|
|
2
2
|
import { useState, useCallback, useEffect, useMemo } from "react";
|
|
3
|
-
import { a as automationStatuses, H as listRunsByAgent, g as createAutomationRun, a2 as uploadFile, K as onInitMessage, U as pbSql, W as pbUpdateRecord } from "./automations-
|
|
4
|
-
import { d as useUpdateBlocker } from "./use-automation-run-
|
|
5
|
-
import { n as normalizeRecordAuditCollections, e as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-
|
|
3
|
+
import { a as automationStatuses, H as listRunsByAgent, g as createAutomationRun, a2 as uploadFile, K as onInitMessage, U as pbSql, W as pbUpdateRecord } from "./automations-D4mDAarR.js";
|
|
4
|
+
import { d as useUpdateBlocker } from "./use-automation-run-lhk85ke0.js";
|
|
5
|
+
import { n as normalizeRecordAuditCollections, e as normalizeRecordAuditPageSize, l as listRecordAuditLog, g as getRecordAuditLogSnapshot } from "./audit-log-QIEvuWf9.js";
|
|
6
6
|
function useAutomationAgent({
|
|
7
7
|
agentId,
|
|
8
8
|
limit = 5,
|
package/package.json
CHANGED