@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.
Files changed (132) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +4 -1
  3. package/dist/active-sessions-store-Gt1R0rFG.js +262 -0
  4. package/dist/{active-sessions-store-CeOmXgv5.d.ts → active-sessions-store-nl70ZnMC.d.ts} +40 -41
  5. package/dist/artifact-pane-BL_DFWNl.d.ts +32 -0
  6. package/dist/artifact-pane-DMXT9a8U.js +70 -0
  7. package/dist/auth-DOETfnd9.js +154 -0
  8. package/dist/auth.d.ts +2 -74
  9. package/dist/auth.js +2 -16
  10. package/dist/branding-26d5ARIr.d.ts +14 -0
  11. package/dist/button-C87nEe2R.js +78 -0
  12. package/dist/button-yoIv77e2.d.ts +16 -0
  13. package/dist/chat-D4jAfEmj.js +667 -0
  14. package/dist/chat.d.ts +2 -201
  15. package/dist/chat.js +2 -31
  16. package/dist/code-block-B36KVUSN.js +165 -0
  17. package/dist/code-block-B9miUPht.d.ts +23 -0
  18. package/dist/diff-preview-BcK3nRXb.js +533 -0
  19. package/dist/document-editor-pane-BcoABlhn.d.ts +131 -0
  20. package/dist/document-editor-pane-BxlPjaTP.js +1287 -0
  21. package/dist/dropdown-menu-BpcLa5vF.js +101 -0
  22. package/dist/editor.d.ts +76 -78
  23. package/dist/editor.js +2 -34
  24. package/dist/file-format-BgXbr-Ib.js +160 -0
  25. package/dist/files-Bug33qCl.js +743 -0
  26. package/dist/files.d.ts +2 -243
  27. package/dist/files.js +3 -41
  28. package/dist/focus-BcE_SHqz.js +57 -0
  29. package/dist/format-DfcLWqMa.js +54 -0
  30. package/dist/hooks.d.ts +30 -37
  31. package/dist/hooks.js +111 -46
  32. package/dist/index-2UntyjBb.d.ts +52 -0
  33. package/dist/index-BgUHilZm.d.ts +108 -0
  34. package/dist/index-COgqsFAQ.d.ts +42 -0
  35. package/dist/index-CPDET_s1.d.ts +549 -0
  36. package/dist/index-CUhfHT_V.d.ts +204 -0
  37. package/dist/index-Cg6gYAqh.d.ts +73 -0
  38. package/dist/index-Cq-EJzqW.d.ts +16 -0
  39. package/dist/index-DhYmSaLF.d.ts +245 -0
  40. package/dist/index-DjKxO357.d.ts +128 -0
  41. package/dist/index.d.ts +26 -43
  42. package/dist/index.js +35 -472
  43. package/dist/markdown-BGqicV82.js +45 -0
  44. package/dist/markdown.d.ts +3 -18
  45. package/dist/markdown.js +3 -15
  46. package/dist/message-vhUI0c5G.d.ts +16 -0
  47. package/dist/nav.d.ts +6 -8
  48. package/dist/nav.js +29 -11
  49. package/dist/openui-artifact-renderer-D3E5bIAI.d.ts +114 -0
  50. package/dist/openui-artifact-renderer-DrU1AdVk.js +266 -0
  51. package/dist/openui.d.ts +2 -115
  52. package/dist/openui.js +2 -13
  53. package/dist/parts-5mhy9yJ3.d.ts +37 -0
  54. package/dist/primitives-Cb8GGVKr.js +1239 -0
  55. package/dist/primitives.d.ts +5 -525
  56. package/dist/primitives.js +9 -212
  57. package/dist/redaction-CGGB2ENG.js +74 -0
  58. package/dist/redaction.d.ts +2 -42
  59. package/dist/redaction.js +2 -7
  60. package/dist/run-OyWmIDqu.d.ts +41 -0
  61. package/dist/run-ZsIKPA6J.js +17 -0
  62. package/dist/run-group-BACLbCFl.js +410 -0
  63. package/dist/run.d.ts +3 -126
  64. package/dist/run.js +5 -40
  65. package/dist/sdk-hooks.d.ts +2 -285
  66. package/dist/sdk-hooks.js +3 -36
  67. package/dist/stores.d.ts +13 -14
  68. package/dist/stores.js +34 -76
  69. package/dist/table-Bss73DhB.js +146 -0
  70. package/dist/tabs-BVHR6NkO.js +40 -0
  71. package/dist/text-shimmer-BUUo6I-g.js +64 -0
  72. package/dist/tool-call-feed-BeB1_4pX.d.ts +47 -0
  73. package/dist/tool-call-feed-Djt2q11V.js +109 -0
  74. package/dist/tool-call-step-DNebqhmX.js +434 -0
  75. package/dist/tool-display-BAuAVa43.js +158 -0
  76. package/dist/{tool-display-z4JcDmMQ.d.ts → tool-display-DgmL5rIU.d.ts} +16 -16
  77. package/dist/tool-previews.d.ts +2 -48
  78. package/dist/tool-previews.js +2 -23
  79. package/dist/types.d.ts +6 -19
  80. package/dist/types.js +0 -1
  81. package/dist/use-auto-scroll-C5Pjeqon.js +153 -0
  82. package/dist/use-sse-stream-BVgO1QBN.js +884 -0
  83. package/dist/use-sse-stream-Dm6R5YWz.d.ts +282 -0
  84. package/dist/utils-Bl_CZ0Qp.js +37 -0
  85. package/dist/{chunk-RQHJBTEU.js → utils-C_uf36nf.js} +4 -6
  86. package/dist/utils.d.ts +2 -104
  87. package/dist/utils.js +6 -44
  88. package/package.json +39 -41
  89. package/src/lib/focus.ts +2 -1
  90. package/dist/artifact-pane-DpuWcAiF.d.ts +0 -33
  91. package/dist/button-CMQuQEW_.d.ts +0 -17
  92. package/dist/chunk-34A66VBG.js +0 -214
  93. package/dist/chunk-3OI2QKFD.js +0 -0
  94. package/dist/chunk-3XXBZL53.js +0 -174
  95. package/dist/chunk-42PAH5D2.js +0 -112
  96. package/dist/chunk-4CLN43XT.js +0 -45
  97. package/dist/chunk-55WHV7SS.js +0 -1604
  98. package/dist/chunk-565EATZZ.js +0 -156
  99. package/dist/chunk-5Z5ZYMOJ.js +0 -0
  100. package/dist/chunk-6BGQA4BQ.js +0 -0
  101. package/dist/chunk-BEBXZPHW.js +0 -299
  102. package/dist/chunk-C5WF4WMV.js +0 -734
  103. package/dist/chunk-HFL6R6IF.js +0 -37
  104. package/dist/chunk-HGML45QH.js +0 -104
  105. package/dist/chunk-HMAPIH7L.js +0 -595
  106. package/dist/chunk-K5XFRUS4.js +0 -1401
  107. package/dist/chunk-KFQGHD73.js +0 -198
  108. package/dist/chunk-L57WRIND.js +0 -59
  109. package/dist/chunk-LTEKI7YJ.js +0 -59
  110. package/dist/chunk-M3QZK62R.js +0 -233
  111. package/dist/chunk-ND3ZFXQK.js +0 -179
  112. package/dist/chunk-OEX7NZE3.js +0 -321
  113. package/dist/chunk-OL5GYLHV.js +0 -60
  114. package/dist/chunk-QGFYBNSO.js +0 -133
  115. package/dist/chunk-R7B3UWPF.js +0 -550
  116. package/dist/chunk-R7SUY4E3.js +0 -65
  117. package/dist/chunk-REJESC5U.js +0 -117
  118. package/dist/chunk-RQGKSCEZ.js +0 -0
  119. package/dist/chunk-SNLR2AEA.js +0 -40
  120. package/dist/chunk-WKWBTL2V.js +0 -15
  121. package/dist/chunk-X7CU776B.js +0 -1048
  122. package/dist/chunk-XU3HB5QL.js +0 -127
  123. package/dist/chunk-YTO5V6QS.js +0 -19
  124. package/dist/chunk-YU4E5J2N.js +0 -437
  125. package/dist/chunk-YZ6AK25N.js +0 -886
  126. package/dist/code-block-0kSpWMnf.d.ts +0 -25
  127. package/dist/document-editor-pane-IAEQn_Dl.d.ts +0 -128
  128. package/dist/document-editor-pane-QHDOBA43.js +0 -13
  129. package/dist/message-BHWbxBtT.d.ts +0 -15
  130. package/dist/parts-dj7AcUg0.d.ts +0 -36
  131. package/dist/run-PfLmDAox.d.ts +0 -41
  132. package/dist/tool-call-feed-D9iofJgW.d.ts +0 -46
package/dist/auth.d.ts CHANGED
@@ -1,74 +1,2 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import { a as ButtonProps } from './button-CMQuQEW_.js';
4
- import 'class-variance-authority/types';
5
-
6
- interface SessionUser {
7
- customer_id: string;
8
- email: string;
9
- name?: string;
10
- tier?: string;
11
- github?: {
12
- login: string;
13
- connected: boolean;
14
- } | null;
15
- session_expires_at: string;
16
- }
17
- interface GitHubLoginButtonProps extends Omit<ButtonProps, "onClick"> {
18
- /** API base URL (defaults to /auth/github) */
19
- authUrl?: string;
20
- /** Product variant for styling */
21
- variant?: "sandbox" | "default" | "outline";
22
- }
23
- declare function GitHubLoginButton({ authUrl, variant, className, children, ...props }: GitHubLoginButtonProps): react_jsx_runtime.JSX.Element;
24
- interface UserMenuProps {
25
- user: SessionUser;
26
- /** API base URL for logout */
27
- logoutUrl?: string;
28
- /** Links to show in menu */
29
- links?: Array<{
30
- href: string;
31
- label: string;
32
- icon?: React.ReactNode;
33
- }>;
34
- /** Product variant for styling */
35
- variant?: "sandbox";
36
- /** Callback when logout is clicked */
37
- onLogout?: () => void;
38
- }
39
- declare function UserMenu({ user, logoutUrl, links, variant, onLogout, }: UserMenuProps): react_jsx_runtime.JSX.Element;
40
- interface AuthHeaderProps {
41
- /** Current session user (null if not logged in) */
42
- user: SessionUser | null;
43
- /** Whether session is loading */
44
- loading?: boolean;
45
- /** Product variant */
46
- variant?: "sandbox";
47
- /** API base URL */
48
- apiBaseUrl?: string;
49
- /** Links for user menu */
50
- menuLinks?: UserMenuProps["links"];
51
- /** Custom className */
52
- className?: string;
53
- }
54
- declare function AuthHeader({ user, loading, variant, apiBaseUrl, menuLinks, className, }: AuthHeaderProps): react_jsx_runtime.JSX.Element;
55
-
56
- interface LoginLayoutProps {
57
- title?: React.ReactNode;
58
- subtitle?: React.ReactNode;
59
- brandIcon?: React.ReactNode;
60
- children: React.ReactNode;
61
- className?: string;
62
- /** (Deprecated) terminal lines from legacy layout, kept for backwards compatibility */
63
- terminalLines?: string[];
64
- /** (Deprecated) tagline, kept for backwards compatibility */
65
- tagline?: React.ReactNode;
66
- /** (Deprecated) footerLinks, kept for backwards compatibility */
67
- footerLinks?: {
68
- label: string;
69
- href: string;
70
- }[];
71
- }
72
- declare function LoginLayout({ title, subtitle, brandIcon, children, className, }: LoginLayoutProps): react_jsx_runtime.JSX.Element;
73
-
74
- export { AuthHeader, type AuthHeaderProps, GitHubLoginButton, type GitHubLoginButtonProps, LoginLayout, type LoginLayoutProps, type SessionUser, UserMenu, type UserMenuProps };
1
+ import { a as GitHubLoginButton, c as UserMenu, i as AuthHeaderProps, l as UserMenuProps, n as LoginLayoutProps, o as GitHubLoginButtonProps, r as AuthHeader, s as SessionUser, t as LoginLayout } from "./index-Cg6gYAqh.js";
2
+ export { AuthHeader, type AuthHeaderProps, GitHubLoginButton, type GitHubLoginButtonProps, LoginLayout, type LoginLayoutProps, type SessionUser, UserMenu, type UserMenuProps };
package/dist/auth.js CHANGED
@@ -1,16 +1,2 @@
1
- import {
2
- AuthHeader,
3
- GitHubLoginButton,
4
- LoginLayout,
5
- UserMenu
6
- } from "./chunk-KFQGHD73.js";
7
- import "./chunk-34A66VBG.js";
8
- import "./chunk-42PAH5D2.js";
9
- import "./chunk-WKWBTL2V.js";
10
- import "./chunk-RQHJBTEU.js";
11
- export {
12
- AuthHeader,
13
- GitHubLoginButton,
14
- LoginLayout,
15
- UserMenu
16
- };
1
+ import { i as UserMenu, n as AuthHeader, r as GitHubLoginButton, t as LoginLayout } from "./auth-DOETfnd9.js";
2
+ export { AuthHeader, GitHubLoginButton, LoginLayout, UserMenu };
@@ -0,0 +1,14 @@
1
+ //#region src/types/branding.d.ts
2
+ /** Visual branding for a run group header — injected by consuming app. */
3
+ interface AgentBranding {
4
+ label: string;
5
+ accentClass: string;
6
+ bgClass: string;
7
+ containerBgClass: string;
8
+ borderClass: string;
9
+ /** CSS class for the agent icon (legacy). Ignored when using lucide-react icons. */
10
+ iconClass: string;
11
+ textClass: string;
12
+ }
13
+ //#endregion
14
+ export { AgentBranding as t };
@@ -0,0 +1,78 @@
1
+ import { i as focusRing } from "./focus-BcE_SHqz.js";
2
+ import { t as cn } from "./utils-C_uf36nf.js";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+ import * as React from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/primitives/button.tsx
8
+ const buttonVariants = cva(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg font-medium text-sm transition-all ${focusRing} disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`, {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-primary text-primary-foreground hover:bg-primary/90 active:scale-[0.97] duration-[var(--transition-fast)]",
12
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 active:scale-[0.97] duration-[var(--transition-fast)]",
13
+ outline: "border border-border bg-card hover:bg-muted active:scale-[0.97] duration-[var(--transition-fast)] text-foreground",
14
+ secondary: "bg-muted border border-border text-foreground hover:bg-muted/80 active:scale-[0.97] duration-[var(--transition-fast)]",
15
+ ghost: "hover:bg-muted hover:text-foreground duration-[var(--transition-fast)] text-muted-foreground border border-transparent",
16
+ link: "text-primary underline-offset-4 hover:underline",
17
+ sandbox: "bg-[var(--btn-primary-bg)] text-[var(--btn-primary-text)] border border-[var(--border-accent)] hover:bg-[var(--btn-primary-hover)] active:scale-[0.97] duration-[var(--transition-fast)]"
18
+ },
19
+ size: {
20
+ default: "h-[var(--control-height)] px-4 py-2",
21
+ sm: "h-8 rounded-md px-3 text-xs",
22
+ lg: "h-11 rounded-lg px-7 text-sm",
23
+ xl: "h-13 rounded-xl px-9 text-base",
24
+ icon: "h-[var(--control-height)] w-[var(--control-height)]"
25
+ }
26
+ },
27
+ defaultVariants: {
28
+ variant: "default",
29
+ size: "default"
30
+ }
31
+ });
32
+ const Button = React.forwardRef(({ className, variant, size, asChild = false, loading = false, disabled, children, ...props }, ref) => {
33
+ const Comp = asChild ? Slot : "button";
34
+ if (asChild) return /* @__PURE__ */ jsx(Comp, {
35
+ className: cn(buttonVariants({
36
+ variant,
37
+ size,
38
+ className
39
+ })),
40
+ ref,
41
+ ...props,
42
+ children
43
+ });
44
+ return /* @__PURE__ */ jsxs(Comp, {
45
+ className: cn(buttonVariants({
46
+ variant,
47
+ size,
48
+ className
49
+ })),
50
+ ref,
51
+ disabled: disabled || loading,
52
+ ...props,
53
+ children: [loading && /* @__PURE__ */ jsxs("svg", {
54
+ className: "mr-2 -ml-1 h-4 w-4 animate-spin",
55
+ fill: "none",
56
+ viewBox: "0 0 24 24",
57
+ children: [
58
+ /* @__PURE__ */ jsx("title", { children: "Loading spinner" }),
59
+ /* @__PURE__ */ jsx("circle", {
60
+ className: "opacity-25",
61
+ cx: "12",
62
+ cy: "12",
63
+ r: "10",
64
+ stroke: "currentColor",
65
+ strokeWidth: "4"
66
+ }),
67
+ /* @__PURE__ */ jsx("path", {
68
+ className: "opacity-75",
69
+ fill: "currentColor",
70
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
71
+ })
72
+ ]
73
+ }), children]
74
+ });
75
+ });
76
+ Button.displayName = "Button";
77
+ //#endregion
78
+ export { buttonVariants as n, Button as t };
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ //#region src/primitives/button.d.ts
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "sandbox" | "secondary" | null | undefined;
5
+ size?: "default" | "icon" | "lg" | "sm" | "xl" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
8
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "sandbox" | null;
9
+ size?: "default" | "sm" | "lg" | "xl" | "icon" | null;
10
+ asChild?: boolean;
11
+ loading?: boolean;
12
+ children?: React.ReactNode;
13
+ }
14
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
15
+ //#endregion
16
+ export { ButtonProps as n, buttonVariants as r, Button as t };