@tangle-network/ui 11.10.0 → 11.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +4 -1
- package/dist/active-sessions-store-Gt1R0rFG.js +262 -0
- package/dist/{active-sessions-store-CeOmXgv5.d.ts → active-sessions-store-nl70ZnMC.d.ts} +40 -41
- package/dist/artifact-pane-BL_DFWNl.d.ts +32 -0
- package/dist/artifact-pane-DMXT9a8U.js +70 -0
- package/dist/auth-DOETfnd9.js +154 -0
- package/dist/auth.d.ts +2 -74
- package/dist/auth.js +2 -16
- package/dist/branding-26d5ARIr.d.ts +14 -0
- package/dist/button-C87nEe2R.js +78 -0
- package/dist/button-yoIv77e2.d.ts +16 -0
- package/dist/chat-D4jAfEmj.js +667 -0
- package/dist/chat.d.ts +2 -201
- package/dist/chat.js +2 -31
- package/dist/code-block-B36KVUSN.js +165 -0
- package/dist/code-block-B9miUPht.d.ts +23 -0
- package/dist/diff-preview-BcK3nRXb.js +533 -0
- package/dist/document-editor-pane-BcoABlhn.d.ts +131 -0
- package/dist/document-editor-pane-BxlPjaTP.js +1287 -0
- package/dist/dropdown-menu-BpcLa5vF.js +101 -0
- package/dist/editor.d.ts +76 -78
- package/dist/editor.js +2 -34
- package/dist/file-format-BgXbr-Ib.js +160 -0
- package/dist/files-Bug33qCl.js +743 -0
- package/dist/files.d.ts +2 -243
- package/dist/files.js +3 -41
- package/dist/focus-BcE_SHqz.js +57 -0
- package/dist/format-DfcLWqMa.js +54 -0
- package/dist/hooks.d.ts +30 -37
- package/dist/hooks.js +111 -46
- package/dist/index-2UntyjBb.d.ts +52 -0
- package/dist/index-BgUHilZm.d.ts +108 -0
- package/dist/index-COgqsFAQ.d.ts +42 -0
- package/dist/index-CPDET_s1.d.ts +549 -0
- package/dist/index-CUhfHT_V.d.ts +204 -0
- package/dist/index-Cg6gYAqh.d.ts +73 -0
- package/dist/index-Cq-EJzqW.d.ts +16 -0
- package/dist/index-DhYmSaLF.d.ts +245 -0
- package/dist/index-DjKxO357.d.ts +128 -0
- package/dist/index.d.ts +26 -43
- package/dist/index.js +35 -472
- package/dist/markdown-BGqicV82.js +45 -0
- package/dist/markdown.d.ts +3 -18
- package/dist/markdown.js +3 -15
- package/dist/message-vhUI0c5G.d.ts +16 -0
- package/dist/nav.d.ts +6 -8
- package/dist/nav.js +29 -11
- package/dist/openui-artifact-renderer-D3E5bIAI.d.ts +114 -0
- package/dist/openui-artifact-renderer-DrU1AdVk.js +266 -0
- package/dist/openui.d.ts +2 -115
- package/dist/openui.js +2 -13
- package/dist/parts-5mhy9yJ3.d.ts +37 -0
- package/dist/primitives-Cb8GGVKr.js +1239 -0
- package/dist/primitives.d.ts +5 -525
- package/dist/primitives.js +9 -212
- package/dist/redaction-CGGB2ENG.js +74 -0
- package/dist/redaction.d.ts +2 -42
- package/dist/redaction.js +2 -7
- package/dist/run-OyWmIDqu.d.ts +41 -0
- package/dist/run-ZsIKPA6J.js +17 -0
- package/dist/run-group-BACLbCFl.js +410 -0
- package/dist/run.d.ts +3 -126
- package/dist/run.js +5 -40
- package/dist/sdk-hooks.d.ts +2 -285
- package/dist/sdk-hooks.js +3 -36
- package/dist/stores.d.ts +13 -14
- package/dist/stores.js +34 -76
- package/dist/table-Bss73DhB.js +146 -0
- package/dist/tabs-BVHR6NkO.js +40 -0
- package/dist/text-shimmer-BUUo6I-g.js +64 -0
- package/dist/tool-call-feed-BeB1_4pX.d.ts +47 -0
- package/dist/tool-call-feed-Djt2q11V.js +109 -0
- package/dist/tool-call-step-DNebqhmX.js +434 -0
- package/dist/tool-display-BAuAVa43.js +158 -0
- package/dist/{tool-display-z4JcDmMQ.d.ts → tool-display-DgmL5rIU.d.ts} +16 -16
- package/dist/tool-previews.d.ts +2 -48
- package/dist/tool-previews.js +2 -23
- package/dist/types.d.ts +6 -19
- package/dist/types.js +0 -1
- package/dist/use-auto-scroll-C5Pjeqon.js +153 -0
- package/dist/use-sse-stream-BVgO1QBN.js +884 -0
- package/dist/use-sse-stream-Dm6R5YWz.d.ts +282 -0
- package/dist/utils-Bl_CZ0Qp.js +37 -0
- package/dist/{chunk-RQHJBTEU.js → utils-C_uf36nf.js} +4 -6
- package/dist/utils.d.ts +2 -104
- package/dist/utils.js +6 -44
- package/package.json +39 -41
- package/src/lib/focus.ts +2 -1
- package/dist/artifact-pane-DpuWcAiF.d.ts +0 -33
- package/dist/button-CMQuQEW_.d.ts +0 -17
- package/dist/chunk-34A66VBG.js +0 -214
- package/dist/chunk-3OI2QKFD.js +0 -0
- package/dist/chunk-3XXBZL53.js +0 -174
- package/dist/chunk-42PAH5D2.js +0 -112
- package/dist/chunk-4CLN43XT.js +0 -45
- package/dist/chunk-55WHV7SS.js +0 -1604
- package/dist/chunk-565EATZZ.js +0 -156
- package/dist/chunk-5Z5ZYMOJ.js +0 -0
- package/dist/chunk-6BGQA4BQ.js +0 -0
- package/dist/chunk-BEBXZPHW.js +0 -299
- package/dist/chunk-C5WF4WMV.js +0 -734
- package/dist/chunk-HFL6R6IF.js +0 -37
- package/dist/chunk-HGML45QH.js +0 -104
- package/dist/chunk-HMAPIH7L.js +0 -595
- package/dist/chunk-K5XFRUS4.js +0 -1401
- package/dist/chunk-KFQGHD73.js +0 -198
- package/dist/chunk-L57WRIND.js +0 -59
- package/dist/chunk-LTEKI7YJ.js +0 -59
- package/dist/chunk-M3QZK62R.js +0 -233
- package/dist/chunk-ND3ZFXQK.js +0 -179
- package/dist/chunk-OEX7NZE3.js +0 -321
- package/dist/chunk-OL5GYLHV.js +0 -60
- package/dist/chunk-QGFYBNSO.js +0 -133
- package/dist/chunk-R7B3UWPF.js +0 -550
- package/dist/chunk-R7SUY4E3.js +0 -65
- package/dist/chunk-REJESC5U.js +0 -117
- package/dist/chunk-RQGKSCEZ.js +0 -0
- package/dist/chunk-SNLR2AEA.js +0 -40
- package/dist/chunk-WKWBTL2V.js +0 -15
- package/dist/chunk-X7CU776B.js +0 -1048
- package/dist/chunk-XU3HB5QL.js +0 -127
- package/dist/chunk-YTO5V6QS.js +0 -19
- package/dist/chunk-YU4E5J2N.js +0 -437
- package/dist/chunk-YZ6AK25N.js +0 -886
- package/dist/code-block-0kSpWMnf.d.ts +0 -25
- package/dist/document-editor-pane-IAEQn_Dl.d.ts +0 -128
- package/dist/document-editor-pane-QHDOBA43.js +0 -13
- package/dist/message-BHWbxBtT.d.ts +0 -15
- package/dist/parts-dj7AcUg0.d.ts +0 -36
- package/dist/run-PfLmDAox.d.ts +0 -41
- package/dist/tool-call-feed-D9iofJgW.d.ts +0 -46
package/dist/chunk-HFL6R6IF.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// src/stores/chat-store.ts
|
|
2
|
-
import { atom, map } from "nanostores";
|
|
3
|
-
var messagesAtom = atom([]);
|
|
4
|
-
var partMapAtom = map({});
|
|
5
|
-
var isStreamingAtom = atom(false);
|
|
6
|
-
var insertionCounter = 0;
|
|
7
|
-
function addMessage(msg) {
|
|
8
|
-
const withIndex = { ...msg, _insertionIndex: insertionCounter++ };
|
|
9
|
-
messagesAtom.set([...messagesAtom.get(), withIndex]);
|
|
10
|
-
}
|
|
11
|
-
function addParts(messageId, parts) {
|
|
12
|
-
const current = partMapAtom.get();
|
|
13
|
-
const existing = current[messageId] ?? [];
|
|
14
|
-
partMapAtom.setKey(messageId, [...existing, ...parts]);
|
|
15
|
-
}
|
|
16
|
-
function updatePart(messageId, partIndex, part) {
|
|
17
|
-
const current = partMapAtom.get();
|
|
18
|
-
const existing = [...current[messageId] ?? []];
|
|
19
|
-
existing[partIndex] = part;
|
|
20
|
-
partMapAtom.setKey(messageId, existing);
|
|
21
|
-
}
|
|
22
|
-
function clearChat() {
|
|
23
|
-
messagesAtom.set([]);
|
|
24
|
-
partMapAtom.set({});
|
|
25
|
-
isStreamingAtom.set(false);
|
|
26
|
-
insertionCounter = 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
messagesAtom,
|
|
31
|
-
partMapAtom,
|
|
32
|
-
isStreamingAtom,
|
|
33
|
-
addMessage,
|
|
34
|
-
addParts,
|
|
35
|
-
updatePart,
|
|
36
|
-
clearChat
|
|
37
|
-
};
|
package/dist/chunk-HGML45QH.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-RQHJBTEU.js";
|
|
4
|
-
|
|
5
|
-
// src/redaction/redacted-document.tsx
|
|
6
|
-
import { useCallback, useState } from "react";
|
|
7
|
-
import { Eye, EyeOff, Loader2, ShieldAlert } from "lucide-react";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
var defaultLabel = (kind) => kind.replace(/[-_]/g, " ").toUpperCase();
|
|
10
|
-
function RedactedChip({
|
|
11
|
-
kind,
|
|
12
|
-
label,
|
|
13
|
-
onReveal
|
|
14
|
-
}) {
|
|
15
|
-
const [state, setState] = useState({ status: "masked" });
|
|
16
|
-
const reveal = useCallback(async () => {
|
|
17
|
-
setState({ status: "loading" });
|
|
18
|
-
try {
|
|
19
|
-
const r = await onReveal();
|
|
20
|
-
setState(
|
|
21
|
-
r.ok && r.value !== void 0 ? { status: "revealed", value: r.value } : { status: "denied", reason: r.reason }
|
|
22
|
-
);
|
|
23
|
-
} catch {
|
|
24
|
-
setState({ status: "denied", reason: "error" });
|
|
25
|
-
}
|
|
26
|
-
}, [onReveal]);
|
|
27
|
-
if (state.status === "revealed") {
|
|
28
|
-
return /* @__PURE__ */ jsxs(
|
|
29
|
-
"button",
|
|
30
|
-
{
|
|
31
|
-
type: "button",
|
|
32
|
-
onClick: () => setState({ status: "masked" }),
|
|
33
|
-
title: "Revealed \u2014 click to hide",
|
|
34
|
-
"aria-label": `${label}: revealed, click to hide`,
|
|
35
|
-
className: cn(
|
|
36
|
-
"inline-flex items-center gap-1 rounded-[var(--radius-sm)] px-1 font-medium",
|
|
37
|
-
"bg-[color-mix(in_oklch,var(--color-warning,orange)_18%,transparent)] text-foreground ring-1 ring-warning/40"
|
|
38
|
-
),
|
|
39
|
-
children: [
|
|
40
|
-
state.value,
|
|
41
|
-
/* @__PURE__ */ jsx(EyeOff, { className: "size-3 opacity-60" })
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
if (state.status === "denied") {
|
|
47
|
-
return /* @__PURE__ */ jsxs(
|
|
48
|
-
"span",
|
|
49
|
-
{
|
|
50
|
-
title: `Restricted${state.reason ? ` (${state.reason})` : ""}`,
|
|
51
|
-
"aria-label": `${label}: restricted`,
|
|
52
|
-
className: "inline-flex items-center gap-1 rounded-[var(--radius-sm)] bg-muted px-1 text-muted-foreground",
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ jsx(ShieldAlert, { className: "size-3" }),
|
|
55
|
-
" ",
|
|
56
|
-
label
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
return /* @__PURE__ */ jsxs(
|
|
62
|
-
"button",
|
|
63
|
-
{
|
|
64
|
-
type: "button",
|
|
65
|
-
disabled: state.status === "loading",
|
|
66
|
-
onClick: reveal,
|
|
67
|
-
title: `${label} \u2014 click to reveal`,
|
|
68
|
-
"aria-label": `${label} redacted, click to reveal`,
|
|
69
|
-
className: cn(
|
|
70
|
-
"inline-flex items-center gap-1 rounded-[var(--radius-sm)] px-1 font-medium tracking-wide",
|
|
71
|
-
"bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground transition-colors",
|
|
72
|
-
"cursor-pointer select-none"
|
|
73
|
-
),
|
|
74
|
-
children: [
|
|
75
|
-
state.status === "loading" ? /* @__PURE__ */ jsx(Loader2, { className: "size-3 animate-spin" }) : /* @__PURE__ */ jsx(Eye, { className: "size-3 opacity-60" }),
|
|
76
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "\u2588\u2588\u2588" }),
|
|
77
|
-
" ",
|
|
78
|
-
label
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
function RedactedDocument({
|
|
84
|
-
document,
|
|
85
|
-
onReveal,
|
|
86
|
-
labelForKind = defaultLabel,
|
|
87
|
-
className
|
|
88
|
-
}) {
|
|
89
|
-
return /* @__PURE__ */ jsx("div", { className: cn("whitespace-pre-wrap break-words leading-relaxed", className), children: document.segments.map(
|
|
90
|
-
(seg, i) => seg.type === "text" ? /* @__PURE__ */ jsx("span", { children: seg.text }, i) : /* @__PURE__ */ jsx(
|
|
91
|
-
RedactedChip,
|
|
92
|
-
{
|
|
93
|
-
kind: seg.kind,
|
|
94
|
-
label: labelForKind(seg.kind),
|
|
95
|
-
onReveal: () => onReveal(seg.id)
|
|
96
|
-
},
|
|
97
|
-
seg.id
|
|
98
|
-
)
|
|
99
|
-
) });
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export {
|
|
103
|
-
RedactedDocument
|
|
104
|
-
};
|