@mcp-b/react-components 0.11.0 → 0.13.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/{AgentChat-B9LD_WF1.d.ts → AgentChat-Br6tKEl8.d.ts} +38 -10
- package/dist/{BrowserLiveView-ZktFZiMD.d.ts → BrowserLiveView-BV5qgFgI.d.ts} +11 -10
- package/dist/{BrowserReplay-6G-mnwcn.d.ts → BrowserReplay-xWvRjRAC.d.ts} +2 -1
- package/dist/{Button-Ct5I6aTu.d.ts → Button-FX_hpqxm.d.ts} +8 -11
- package/dist/{CodeBlock-XNQOupQ3.js → CodeBlock-BUFXG8HW.js} +22 -12
- package/dist/{CodeBlock-CxQXv3C4.d.ts → CodeBlock-DUh9WOGo.d.ts} +13 -7
- package/dist/{Combobox-D9anamNr.d.ts → Combobox-B9Fcd6q-.d.ts} +4 -14
- package/dist/{FileTree-wMyZhhHO.js → FileTree-mpEIcfzA.js} +1 -1
- package/dist/{Menu-B5vDqZe_.d.ts → Menu-Bgu-ufb5.d.ts} +29 -65
- package/dist/{ModelSelector-DXtpcRmT.js → ModelSelector-DVgVBdvw.js} +23 -20
- package/dist/{PromptInput-D6-G24p7.d.ts → PromptInput-p5KmOmt1.d.ts} +313 -89
- package/dist/Select-Dl_vF_Bt.d.ts +213 -0
- package/dist/{Tabs-D9EAq09D.d.ts → Tabs-3Zc4tb9D.d.ts} +9 -6
- package/dist/ThinkChat-7DQ2CogF.js +222 -0
- package/dist/{ThinkChatActivity-B2UD95My.d.ts → ThinkChatActivity-Cuk28Js_.d.ts} +4 -4
- package/dist/ThinkChatContext-C3Eb1Xpi.d.ts +16 -0
- package/dist/{ThinkChatToolParts-DnUiZgCC.d.ts → ThinkChatToolParts-Cv4o7j6F.d.ts} +13 -5
- package/dist/{attachment-preview-ChtC3HiU.js → attachment-preview-DIs50Q0h.js} +3 -3
- package/dist/components/Accordion.d.ts +17 -6
- package/dist/components/Accordion.js +23 -36
- package/dist/components/Activity.d.ts +5 -5
- package/dist/components/Activity.js +9 -9
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +354 -132
- package/dist/components/AgentConnection.js +6 -22
- package/dist/components/AlertDialog.d.ts +40 -32
- package/dist/components/AlertDialog.js +46 -39
- package/dist/components/Artifact.d.ts +1 -1
- package/dist/components/Artifact.js +5 -5
- package/dist/components/Autocomplete.js +10 -2
- package/dist/components/Avatar.d.ts +2 -2
- package/dist/components/Avatar.js +3 -3
- package/dist/components/Badge.d.ts +11 -14
- package/dist/components/Badge.js +11 -33
- package/dist/components/BrowserLiveView.d.ts +1 -1
- package/dist/components/BrowserLiveView.js +39 -45
- package/dist/components/BrowserReplay.d.ts +1 -1
- package/dist/components/BrowserReplay.js +4 -4
- package/dist/components/BrowserRunPanel.js +91 -55
- package/dist/components/Button.d.ts +2 -2
- package/dist/components/Button.js +7 -30
- package/dist/components/ChainOfThought.d.ts +5 -5
- package/dist/components/ChainOfThought.js +8 -5
- package/dist/components/ChatGptSignInScreen.js +3 -3
- package/dist/components/Checkbox.d.ts +10 -2
- package/dist/components/Checkbox.js +13 -6
- package/dist/components/CheckboxGroup.d.ts +6 -6
- package/dist/components/CheckboxGroup.js +6 -6
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.d.ts +58 -0
- package/dist/components/CodexModelSelector.js +170 -0
- package/dist/components/Collapsible.d.ts +2 -4
- package/dist/components/Collapsible.js +9 -7
- package/dist/components/Combobox.d.ts +2 -2
- package/dist/components/Combobox.js +20 -22
- package/dist/components/Commit.d.ts +6 -6
- package/dist/components/Commit.js +14 -26
- package/dist/components/Context.js +5 -1
- package/dist/components/ContextMenu.d.ts +20 -72
- package/dist/components/ContextMenu.js +46 -56
- package/dist/components/Conversation.d.ts +3 -7
- package/dist/components/Conversation.js +3 -4
- package/dist/components/Dialog.d.ts +38 -30
- package/dist/components/Dialog.js +46 -34
- package/dist/components/EnvironmentVariables.d.ts +2 -7
- package/dist/components/EnvironmentVariables.js +13 -36
- package/dist/components/Field.d.ts +3 -3
- package/dist/components/Field.js +7 -8
- package/dist/components/Fieldset.d.ts +2 -2
- package/dist/components/Fieldset.js +2 -2
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Label.d.ts +1 -1
- package/dist/components/Label.js +1 -1
- package/dist/components/Marker.js +1 -15
- package/dist/components/McpServerPicker.d.ts +31 -6
- package/dist/components/McpServerPicker.js +136 -72
- package/dist/components/Menu.d.ts +2 -2
- package/dist/components/Menu.js +41 -51
- package/dist/components/Menubar.d.ts +16 -52
- package/dist/components/Menubar.js +44 -56
- package/dist/components/Message.d.ts +4 -3
- package/dist/components/Message.js +16 -9
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/Meter.js +5 -0
- package/dist/components/ModelSelector.d.ts +12 -9
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.d.ts +3 -14
- package/dist/components/NavigationMenu.js +22 -38
- package/dist/components/NumberField.js +6 -0
- package/dist/components/Popover.d.ts +21 -44
- package/dist/components/Popover.js +33 -23
- package/dist/components/PreviewCard.d.ts +20 -18
- package/dist/components/PreviewCard.js +30 -20
- package/dist/components/PricingPage.js +30 -29
- package/dist/components/Progress.d.ts +7 -3
- package/dist/components/Progress.js +9 -4
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +184 -148
- package/dist/components/Queue.d.ts +8 -19
- package/dist/components/Queue.js +6 -6
- package/dist/components/RadioGroup.d.ts +10 -9
- package/dist/components/RadioGroup.js +8 -9
- package/dist/components/Reasoning.d.ts +4 -4
- package/dist/components/Reasoning.js +12 -21
- package/dist/components/ScrollArea.d.ts +2 -9
- package/dist/components/ScrollArea.js +5 -23
- package/dist/components/Select.d.ts +2 -2
- package/dist/components/Select.js +100 -134
- package/dist/components/Slider.d.ts +10 -7
- package/dist/components/Slider.js +12 -11
- package/dist/components/Sources.d.ts +4 -4
- package/dist/components/Sources.js +8 -5
- package/dist/components/Stepper.js +2 -8
- package/dist/components/Switch.d.ts +6 -3
- package/dist/components/Switch.js +7 -4
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +9 -4
- package/dist/components/Task.d.ts +4 -4
- package/dist/components/Task.js +10 -6
- package/dist/components/Terminal.d.ts +2 -2
- package/dist/components/Terminal.js +5 -5
- package/dist/components/TestResults.d.ts +4 -4
- package/dist/components/TestResults.js +5 -5
- package/dist/components/ThinkChat.d.ts +37 -30
- package/dist/components/ThinkChat.js +1 -152
- package/dist/components/ThinkChatActivity.d.ts +2 -2
- package/dist/components/ThinkChatActivity.js +4 -11
- package/dist/components/ThinkChatContext.d.ts +2 -2
- package/dist/components/ThinkChatContext.js +9 -2
- package/dist/components/ThinkChatToolPanels.d.ts +1 -1
- package/dist/components/ThinkChatToolPanels.js +27 -15
- package/dist/components/ThinkChatToolParts.d.ts +1 -1
- package/dist/components/ThinkExecutionWorkbench.d.ts +10 -7
- package/dist/components/ThinkExecutionWorkbench.js +382 -359
- package/dist/components/ThinkFullApp.d.ts +16 -13
- package/dist/components/ThinkFullApp.js +35 -25
- package/dist/components/ThinkThreadPicker.d.ts +1 -31
- package/dist/components/ThinkThreadPicker.js +32 -171
- package/dist/components/ThinkThreadShell.d.ts +35 -0
- package/dist/components/ThinkThreadShell.js +146 -0
- package/dist/components/Toast.js +7 -0
- package/dist/components/ToggleGroup.d.ts +6 -2
- package/dist/components/ToggleGroup.js +6 -2
- package/dist/components/Toolbar.js +6 -0
- package/dist/components/Tooltip.d.ts +36 -27
- package/dist/components/Tooltip.js +45 -29
- package/dist/components/WebPreview.d.ts +1 -1
- package/dist/components/WebPreview.js +3 -3
- package/dist/components/WorkspaceExplorer.d.ts +6 -8
- package/dist/components/WorkspaceExplorer.js +9 -7
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-C6JSKtFE.js → copy-button-DUMLYdsk.js} +7 -6
- package/dist/{copy-button-BKXqGiNm.d.ts → copy-button-DtPMgN7e.d.ts} +3 -2
- package/dist/icons-Ba9THQKz.js +64 -0
- package/dist/icons-CUCz_Sft.d.ts +210 -0
- package/dist/merge-refs-DF_7w2x_.js +18 -0
- package/dist/styles/accessibility.css +14 -0
- package/dist/styles/accordion.css +21 -61
- package/dist/styles/activity.css +23 -58
- package/dist/styles/agent-chat.css +49 -5
- package/dist/styles/agent-connection.css +8 -10
- package/dist/styles/alert-dialog.css +20 -26
- package/dist/styles/artifact.css +6 -6
- package/dist/styles/attachment-preview.css +1 -1
- package/dist/styles/autocomplete.css +5 -170
- package/dist/styles/avatar.css +8 -8
- package/dist/styles/badge.css +8 -10
- package/dist/styles/base-ui-motion.css +176 -0
- package/dist/styles/base.css +19 -25
- package/dist/styles/browser-live-view.css +7 -7
- package/dist/styles/browser-replay.css +5 -5
- package/dist/styles/browser-run-panel.css +59 -112
- package/dist/styles/button.css +48 -43
- package/dist/styles/card.css +3 -5
- package/dist/styles/chain-of-thought.css +14 -70
- package/dist/styles/chatgpt-sign-in-screen.css +3 -3
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox.css +3 -7
- package/dist/styles/code-block.css +10 -10
- package/dist/styles/codex-model-selector.css +186 -0
- package/dist/styles/collapsible.css +11 -27
- package/dist/styles/combobox.css +3 -149
- package/dist/styles/commit.css +19 -35
- package/dist/styles/context-menu.css +1 -77
- package/dist/styles/context.css +12 -12
- package/dist/styles/conversation.css +7 -7
- package/dist/styles/dialog.css +34 -55
- package/dist/styles/environment-variables.css +10 -10
- package/dist/styles/field.css +16 -58
- package/dist/styles/fieldset.css +2 -2
- package/dist/styles/file-tree.css +7 -9
- package/dist/styles/index.css +12 -2
- package/dist/styles/input.css +1 -51
- package/dist/styles/label.css +2 -2
- package/dist/styles/marker.css +2 -4
- package/dist/styles/mcp-server-picker.css +66 -19
- package/dist/styles/menu.css +6 -153
- package/dist/styles/menubar.css +6 -105
- package/dist/styles/message-scroller.css +1 -1
- package/dist/styles/message.css +87 -9
- package/dist/styles/meter.css +4 -20
- package/dist/styles/model-selector.css +32 -20
- package/dist/styles/navigation-menu.css +14 -54
- package/dist/styles/number-field.css +8 -23
- package/dist/styles/popover.css +13 -68
- package/dist/styles/preview-card.css +5 -46
- package/dist/styles/pricing-page.css +43 -43
- package/dist/styles/progress.css +7 -16
- package/dist/styles/prompt-input.css +100 -44
- package/dist/styles/queue.css +12 -28
- package/dist/styles/radio.css +4 -8
- package/dist/styles/reasoning.css +3 -62
- package/dist/styles/recipes.css +475 -0
- package/dist/styles/select.css +7 -103
- package/dist/styles/shell.css +3 -3
- package/dist/styles/slider.css +5 -7
- package/dist/styles/sources.css +9 -66
- package/dist/styles/stepper.css +16 -14
- package/dist/styles/streamdown.css +11 -57
- package/dist/styles/switch.css +4 -7
- package/dist/styles/tabs.css +7 -8
- package/dist/styles/task.css +13 -42
- package/dist/styles/terminal.css +7 -7
- package/dist/styles/test-results.css +21 -37
- package/dist/styles/think-execution-workbench.css +337 -0
- package/dist/styles/think-full-app.css +27 -410
- package/dist/styles/think-resize-handle.css +33 -0
- package/dist/styles/think-thread-picker.css +18 -247
- package/dist/styles/think-thread-shell.css +219 -0
- package/dist/styles/toast.css +14 -25
- package/dist/styles/toggle-group.css +16 -14
- package/dist/styles/toggle.css +14 -15
- package/dist/styles/toolbar.css +13 -25
- package/dist/styles/tooltip.css +6 -16
- package/dist/styles/web-preview.css +15 -15
- package/dist/styles/workspace-explorer.css +21 -14
- package/dist/summarize-tool-input-BUJsENSn.js +12 -0
- package/dist/utils/codex-model-catalog.d.ts +142 -0
- package/dist/utils/codex-model-catalog.js +112 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +8 -2
- package/dist/Select-CRsKCJ9x.d.ts +0 -200
- package/dist/ThinkChatContext-BLAAb8J5.d.ts +0 -28
- package/dist/components/McpServerConnections.d.ts +0 -41
- package/dist/components/McpServerConnections.js +0 -188
- package/dist/components/useStickToBottom.d.ts +0 -33
- package/dist/components/useStickToBottom.js +0 -107
- package/dist/icons-CbjtbIJK.d.ts +0 -51
- package/dist/icons-D2Q5n5C1.js +0 -291
- package/dist/styles/mcp-server-connections.css +0 -145
|
@@ -9,6 +9,9 @@ interface AlertDialogTriggerProps extends Omit<React.ComponentPropsWithRef<typeo
|
|
|
9
9
|
interface AlertDialogBackdropProps extends Omit<React.ComponentPropsWithRef<typeof AlertDialog$1.Backdrop>, "className"> {
|
|
10
10
|
className?: string;
|
|
11
11
|
}
|
|
12
|
+
interface AlertDialogViewportProps extends Omit<React.ComponentPropsWithRef<typeof AlertDialog$1.Viewport>, "className"> {
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
12
15
|
interface AlertDialogPopupProps extends Omit<React.ComponentPropsWithRef<typeof AlertDialog$1.Popup>, "className"> {
|
|
13
16
|
className?: string;
|
|
14
17
|
/**
|
|
@@ -31,10 +34,6 @@ interface AlertDialogCloseProps extends Omit<React.ComponentPropsWithRef<typeof
|
|
|
31
34
|
*/
|
|
32
35
|
variant?: "primary" | "secondary" | "destructive" | "outline" | "ghost";
|
|
33
36
|
}
|
|
34
|
-
type AlertDialogOverlayProps = AlertDialogBackdropProps;
|
|
35
|
-
type AlertDialogContentProps = AlertDialogPopupProps;
|
|
36
|
-
type AlertDialogActionProps = AlertDialogCloseProps;
|
|
37
|
-
type AlertDialogCancelProps = AlertDialogCloseProps;
|
|
38
37
|
interface AlertDialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
39
38
|
interface AlertDialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
40
39
|
interface AlertDialogMediaProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
@@ -44,27 +43,28 @@ interface AlertDialogMediaProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
|
44
43
|
*
|
|
45
44
|
* @example
|
|
46
45
|
* ```tsx
|
|
47
|
-
* <AlertDialog>
|
|
48
|
-
* <
|
|
49
|
-
* <
|
|
50
|
-
* <
|
|
51
|
-
* <
|
|
52
|
-
* <
|
|
53
|
-
* <
|
|
46
|
+
* <AlertDialog.Root>
|
|
47
|
+
* <AlertDialog.Trigger>Delete Account</AlertDialog.Trigger>
|
|
48
|
+
* <AlertDialog.Portal>
|
|
49
|
+
* <AlertDialog.Backdrop />
|
|
50
|
+
* <AlertDialog.Viewport>
|
|
51
|
+
* <AlertDialog.Popup>
|
|
52
|
+
* <AlertDialog.Title>Are you sure?</AlertDialog.Title>
|
|
53
|
+
* <AlertDialog.Description>
|
|
54
54
|
* This action cannot be undone.
|
|
55
|
-
* </
|
|
55
|
+
* </AlertDialog.Description>
|
|
56
56
|
* <div style={{ display: "flex", gap: "0.5rem", justifyContent: "flex-end" }}>
|
|
57
|
-
* <
|
|
58
|
-
* <
|
|
57
|
+
* <AlertDialog.Close>Cancel</AlertDialog.Close>
|
|
58
|
+
* <AlertDialog.Close variant="destructive">Delete</AlertDialog.Close>
|
|
59
59
|
* </div>
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
60
|
+
* </AlertDialog.Popup>
|
|
61
|
+
* </AlertDialog.Viewport>
|
|
62
|
+
* </AlertDialog.Portal>
|
|
63
|
+
* </AlertDialog.Root>
|
|
63
64
|
* ```
|
|
64
65
|
*
|
|
65
66
|
* @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert Dialog}
|
|
66
67
|
*/
|
|
67
|
-
declare const AlertDialog: typeof AlertDialog$1.Root;
|
|
68
68
|
declare function AlertDialogTrigger({
|
|
69
69
|
className,
|
|
70
70
|
ref,
|
|
@@ -72,7 +72,6 @@ declare function AlertDialogTrigger({
|
|
|
72
72
|
}: AlertDialogTriggerProps & {
|
|
73
73
|
ref?: React.Ref<HTMLButtonElement>;
|
|
74
74
|
}): React.JSX.Element;
|
|
75
|
-
declare const AlertDialogPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
76
75
|
declare function AlertDialogBackdrop({
|
|
77
76
|
className,
|
|
78
77
|
ref,
|
|
@@ -80,19 +79,19 @@ declare function AlertDialogBackdrop({
|
|
|
80
79
|
}: AlertDialogBackdropProps & {
|
|
81
80
|
ref?: React.Ref<HTMLDivElement>;
|
|
82
81
|
}): React.JSX.Element;
|
|
83
|
-
declare
|
|
84
|
-
declare function AlertDialogPopup({
|
|
85
|
-
size,
|
|
82
|
+
declare function AlertDialogViewport({
|
|
86
83
|
className,
|
|
87
84
|
ref,
|
|
88
85
|
...props
|
|
89
|
-
}:
|
|
86
|
+
}: AlertDialogViewportProps & {
|
|
90
87
|
ref?: React.Ref<HTMLDivElement>;
|
|
91
88
|
}): React.JSX.Element;
|
|
92
|
-
declare function
|
|
89
|
+
declare function AlertDialogPopup({
|
|
90
|
+
size,
|
|
91
|
+
className,
|
|
93
92
|
ref,
|
|
94
93
|
...props
|
|
95
|
-
}:
|
|
94
|
+
}: AlertDialogPopupProps & {
|
|
96
95
|
ref?: React.Ref<HTMLDivElement>;
|
|
97
96
|
}): React.JSX.Element;
|
|
98
97
|
declare function AlertDialogHeader({
|
|
@@ -138,11 +137,20 @@ declare function AlertDialogClose({
|
|
|
138
137
|
}: AlertDialogCloseProps & {
|
|
139
138
|
ref?: React.Ref<HTMLButtonElement>;
|
|
140
139
|
}): React.JSX.Element;
|
|
141
|
-
declare
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
declare const AlertDialog: {
|
|
141
|
+
Root: typeof AlertDialog$1.Root;
|
|
142
|
+
Trigger: typeof AlertDialogTrigger;
|
|
143
|
+
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
144
|
+
Backdrop: typeof AlertDialogBackdrop;
|
|
145
|
+
Viewport: typeof AlertDialogViewport;
|
|
146
|
+
Popup: typeof AlertDialogPopup;
|
|
147
|
+
Header: typeof AlertDialogHeader;
|
|
148
|
+
Footer: typeof AlertDialogFooter;
|
|
149
|
+
Media: typeof AlertDialogMedia;
|
|
150
|
+
Title: typeof AlertDialogTitle;
|
|
151
|
+
Description: typeof AlertDialogDescription;
|
|
152
|
+
Close: typeof AlertDialogClose;
|
|
153
|
+
createHandle: typeof AlertDialog$1.createHandle;
|
|
154
|
+
};
|
|
147
155
|
//#endregion
|
|
148
|
-
export { AlertDialog,
|
|
156
|
+
export { AlertDialog, AlertDialogBackdropProps, AlertDialogCloseProps, AlertDialogDescriptionProps, AlertDialogFooterProps, AlertDialogHeaderProps, AlertDialogMediaProps, AlertDialogPopupProps, AlertDialogProps, AlertDialogTitleProps, AlertDialogTriggerProps, AlertDialogViewportProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import { jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
4
4
|
//#region src/components/AlertDialog.tsx
|
|
5
5
|
/**
|
|
@@ -8,27 +8,28 @@ import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```tsx
|
|
11
|
-
* <AlertDialog>
|
|
12
|
-
* <
|
|
13
|
-
* <
|
|
14
|
-
* <
|
|
15
|
-
* <
|
|
16
|
-
* <
|
|
17
|
-
* <
|
|
11
|
+
* <AlertDialog.Root>
|
|
12
|
+
* <AlertDialog.Trigger>Delete Account</AlertDialog.Trigger>
|
|
13
|
+
* <AlertDialog.Portal>
|
|
14
|
+
* <AlertDialog.Backdrop />
|
|
15
|
+
* <AlertDialog.Viewport>
|
|
16
|
+
* <AlertDialog.Popup>
|
|
17
|
+
* <AlertDialog.Title>Are you sure?</AlertDialog.Title>
|
|
18
|
+
* <AlertDialog.Description>
|
|
18
19
|
* This action cannot be undone.
|
|
19
|
-
* </
|
|
20
|
+
* </AlertDialog.Description>
|
|
20
21
|
* <div style={{ display: "flex", gap: "0.5rem", justifyContent: "flex-end" }}>
|
|
21
|
-
* <
|
|
22
|
-
* <
|
|
22
|
+
* <AlertDialog.Close>Cancel</AlertDialog.Close>
|
|
23
|
+
* <AlertDialog.Close variant="destructive">Delete</AlertDialog.Close>
|
|
23
24
|
* </div>
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* </AlertDialog.Popup>
|
|
26
|
+
* </AlertDialog.Viewport>
|
|
27
|
+
* </AlertDialog.Portal>
|
|
28
|
+
* </AlertDialog.Root>
|
|
27
29
|
* ```
|
|
28
30
|
*
|
|
29
31
|
* @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert Dialog}
|
|
30
32
|
*/
|
|
31
|
-
const AlertDialog = AlertDialog$1.Root;
|
|
32
33
|
function AlertDialogTrigger({ className = "", ref, ...props }) {
|
|
33
34
|
const classes = ["alert-dialog__trigger", className].filter(Boolean).join(" ");
|
|
34
35
|
return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
|
|
@@ -38,9 +39,12 @@ function AlertDialogTrigger({ className = "", ref, ...props }) {
|
|
|
38
39
|
...props
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
|
-
const AlertDialogPortal = AlertDialog$1.Portal;
|
|
42
42
|
function AlertDialogBackdrop({ className = "", ref, ...props }) {
|
|
43
|
-
const classes = [
|
|
43
|
+
const classes = [
|
|
44
|
+
"alert-dialog__backdrop",
|
|
45
|
+
"base-ui-backdrop",
|
|
46
|
+
className
|
|
47
|
+
].filter(Boolean).join(" ");
|
|
44
48
|
return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
|
|
45
49
|
ref,
|
|
46
50
|
"data-slot": "alert-dialog-overlay",
|
|
@@ -48,7 +52,15 @@ function AlertDialogBackdrop({ className = "", ref, ...props }) {
|
|
|
48
52
|
...props
|
|
49
53
|
});
|
|
50
54
|
}
|
|
51
|
-
|
|
55
|
+
function AlertDialogViewport({ className = "", ref, ...props }) {
|
|
56
|
+
const classes = ["alert-dialog__viewport", className].filter(Boolean).join(" ");
|
|
57
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Viewport, {
|
|
58
|
+
ref,
|
|
59
|
+
"data-slot": "alert-dialog-viewport",
|
|
60
|
+
className: classes,
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
}
|
|
52
64
|
function AlertDialogPopup({ size = "md", className = "", ref, ...props }) {
|
|
53
65
|
const classes = [
|
|
54
66
|
"alert-dialog__popup",
|
|
@@ -62,12 +74,6 @@ function AlertDialogPopup({ size = "md", className = "", ref, ...props }) {
|
|
|
62
74
|
...props
|
|
63
75
|
});
|
|
64
76
|
}
|
|
65
|
-
function AlertDialogContent({ ref, ...props }) {
|
|
66
|
-
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogBackdrop, {}), /* @__PURE__ */ jsx(AlertDialogPopup, {
|
|
67
|
-
ref,
|
|
68
|
-
...props
|
|
69
|
-
})] });
|
|
70
|
-
}
|
|
71
77
|
function AlertDialogHeader({ className = "", ref, ...props }) {
|
|
72
78
|
return /* @__PURE__ */ jsx("div", {
|
|
73
79
|
ref,
|
|
@@ -123,19 +129,20 @@ function AlertDialogClose({ variant = "secondary", className = "", ref, ...props
|
|
|
123
129
|
...props
|
|
124
130
|
});
|
|
125
131
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
const AlertDialog = {
|
|
133
|
+
Root: AlertDialog$1.Root,
|
|
134
|
+
Trigger: AlertDialogTrigger,
|
|
135
|
+
Portal: AlertDialog$1.Portal,
|
|
136
|
+
Backdrop: AlertDialogBackdrop,
|
|
137
|
+
Viewport: AlertDialogViewport,
|
|
138
|
+
Popup: AlertDialogPopup,
|
|
139
|
+
Header: AlertDialogHeader,
|
|
140
|
+
Footer: AlertDialogFooter,
|
|
141
|
+
Media: AlertDialogMedia,
|
|
142
|
+
Title: AlertDialogTitle,
|
|
143
|
+
Description: AlertDialogDescription,
|
|
144
|
+
Close: AlertDialogClose,
|
|
145
|
+
createHandle: AlertDialog$1.createHandle
|
|
146
|
+
};
|
|
140
147
|
//#endregion
|
|
141
|
-
export { AlertDialog
|
|
148
|
+
export { AlertDialog };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { z as XIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Tooltip
|
|
4
|
+
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/Artifact.tsx
|
|
@@ -91,17 +91,17 @@ function ArtifactAction({ className, label, tooltip, icon, children, ...props })
|
|
|
91
91
|
}) : null]
|
|
92
92
|
});
|
|
93
93
|
if (!tooltip) return button;
|
|
94
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
94
|
+
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: button }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: tooltip }) }) })] });
|
|
95
95
|
}
|
|
96
96
|
function ArtifactClose({ className, label = "Close", children, ...props }) {
|
|
97
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
97
|
+
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
98
98
|
variant: "ghost",
|
|
99
99
|
size: "icon",
|
|
100
100
|
"aria-label": label,
|
|
101
101
|
className: cx("artifact__close", className),
|
|
102
102
|
...props,
|
|
103
103
|
children: children ?? /* @__PURE__ */ jsx(XIcon, {})
|
|
104
|
-
}) }), /* @__PURE__ */ jsx(
|
|
104
|
+
}) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: label }) }) })] });
|
|
105
105
|
}
|
|
106
106
|
function ArtifactContent({ className, children, ref, ...props }) {
|
|
107
107
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -30,7 +30,11 @@ function Clear({ className = "", ref, ...props }) {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
function Positioner({ className = "", ref, ...props }) {
|
|
33
|
-
const classes = [
|
|
33
|
+
const classes = [
|
|
34
|
+
"autocomplete__positioner",
|
|
35
|
+
"base-ui-positioner",
|
|
36
|
+
className
|
|
37
|
+
].filter(Boolean).join(" ");
|
|
34
38
|
return /* @__PURE__ */ jsx(Autocomplete$1.Positioner, {
|
|
35
39
|
ref,
|
|
36
40
|
"data-slot": "autocomplete-positioner",
|
|
@@ -39,7 +43,11 @@ function Positioner({ className = "", ref, ...props }) {
|
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
function Popup({ className = "", ref, ...props }) {
|
|
42
|
-
const classes = [
|
|
46
|
+
const classes = [
|
|
47
|
+
"autocomplete__popup",
|
|
48
|
+
"base-ui-popup",
|
|
49
|
+
className
|
|
50
|
+
].filter(Boolean).join(" ");
|
|
43
51
|
return /* @__PURE__ */ jsx(Autocomplete$1.Popup, {
|
|
44
52
|
ref,
|
|
45
53
|
"data-slot": "autocomplete-content",
|
|
@@ -122,7 +122,7 @@ declare function AvatarBadge({
|
|
|
122
122
|
*
|
|
123
123
|
* @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
|
|
124
124
|
*/
|
|
125
|
-
declare const Avatar:
|
|
125
|
+
declare const Avatar: {
|
|
126
126
|
Root: typeof AvatarRoot;
|
|
127
127
|
Image: typeof AvatarImage;
|
|
128
128
|
Fallback: typeof AvatarFallback;
|
|
@@ -131,4 +131,4 @@ declare const Avatar: typeof AvatarRoot & {
|
|
|
131
131
|
Badge: typeof AvatarBadge;
|
|
132
132
|
};
|
|
133
133
|
//#endregion
|
|
134
|
-
export { Avatar,
|
|
134
|
+
export { Avatar, AvatarBadgeProps, AvatarFallbackProps, AvatarGroupCountProps, AvatarGroupProps, AvatarImageProps, AvatarRootProps };
|
|
@@ -106,13 +106,13 @@ function AvatarBadge({ className = "", ref, ...props }) {
|
|
|
106
106
|
*
|
|
107
107
|
* @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
|
|
108
108
|
*/
|
|
109
|
-
const Avatar =
|
|
109
|
+
const Avatar = {
|
|
110
110
|
Root: AvatarRoot,
|
|
111
111
|
Image: AvatarImage,
|
|
112
112
|
Fallback: AvatarFallback,
|
|
113
113
|
Group: AvatarGroup,
|
|
114
114
|
GroupCount: AvatarGroupCount,
|
|
115
115
|
Badge: AvatarBadge
|
|
116
|
-
}
|
|
116
|
+
};
|
|
117
117
|
//#endregion
|
|
118
|
-
export { Avatar
|
|
118
|
+
export { Avatar };
|
|
@@ -3,9 +3,8 @@ import * as React from "react";
|
|
|
3
3
|
//#region src/components/Badge.d.ts
|
|
4
4
|
type BadgeVariant = "normal" | "outline" | "ghost" | "link";
|
|
5
5
|
type BadgeColor = "neutral" | "primary" | "success" | "destructive" | "warning";
|
|
6
|
-
type ShadcnBadgeVariant = "default" | "secondary" | "destructive" | "outline" | "ghost" | "link";
|
|
7
6
|
interface BadgeVariantsOptions {
|
|
8
|
-
variant?:
|
|
7
|
+
variant?: BadgeVariant | null;
|
|
9
8
|
color?: BadgeColor | null;
|
|
10
9
|
size?: "sm" | "md" | null;
|
|
11
10
|
className?: string;
|
|
@@ -16,12 +15,15 @@ declare function badgeVariants({
|
|
|
16
15
|
size,
|
|
17
16
|
className
|
|
18
17
|
}?: BadgeVariantsOptions): string;
|
|
18
|
+
type SlottableBadgeProps = React.HTMLAttributes<HTMLElement> & {
|
|
19
|
+
ref?: React.Ref<HTMLElement>;
|
|
20
|
+
};
|
|
19
21
|
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
20
22
|
/**
|
|
21
23
|
* The visual rendering style of the badge.
|
|
22
|
-
* @default '
|
|
24
|
+
* @default 'normal'
|
|
23
25
|
*/
|
|
24
|
-
variant?:
|
|
26
|
+
variant?: BadgeVariant;
|
|
25
27
|
/**
|
|
26
28
|
* The semantic color intent of the badge.
|
|
27
29
|
* @default 'primary'
|
|
@@ -32,13 +34,8 @@ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
32
34
|
* @default 'md'
|
|
33
35
|
*/
|
|
34
36
|
size?: "sm" | "md";
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
*
|
|
38
|
-
* Mirrors shadcn's `asChild` API for link badges and custom elements.
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
asChild?: boolean;
|
|
37
|
+
/** Replaces the default span while preserving badge props and styles. */
|
|
38
|
+
render?: React.ReactElement<SlottableBadgeProps>;
|
|
42
39
|
}
|
|
43
40
|
/**
|
|
44
41
|
* A badge component for highlighting status, labels, or categories.
|
|
@@ -49,7 +46,7 @@ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
49
46
|
* <Badge color="success">Active</Badge>
|
|
50
47
|
* <Badge color="warning">Pending</Badge>
|
|
51
48
|
* <Badge variant="outline">Info</Badge>
|
|
52
|
-
* <Badge
|
|
49
|
+
* <Badge render={<a href="/docs" />}>Docs</Badge>
|
|
53
50
|
* ```
|
|
54
51
|
*/
|
|
55
52
|
declare function Badge({
|
|
@@ -57,7 +54,7 @@ declare function Badge({
|
|
|
57
54
|
color,
|
|
58
55
|
size,
|
|
59
56
|
className,
|
|
60
|
-
|
|
57
|
+
render,
|
|
61
58
|
children,
|
|
62
59
|
ref,
|
|
63
60
|
...props
|
|
@@ -65,4 +62,4 @@ declare function Badge({
|
|
|
65
62
|
ref?: React.Ref<HTMLSpanElement>;
|
|
66
63
|
}): React.JSX.Element;
|
|
67
64
|
//#endregion
|
|
68
|
-
export { Badge, BadgeColor, BadgeProps, BadgeVariant, BadgeVariantsOptions,
|
|
65
|
+
export { Badge, BadgeColor, BadgeProps, BadgeVariant, BadgeVariantsOptions, badgeVariants };
|
package/dist/components/Badge.js
CHANGED
|
@@ -1,46 +1,23 @@
|
|
|
1
|
+
import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/Badge.tsx
|
|
4
|
-
const SHADCN_BADGE_VARIANT = {
|
|
5
|
-
default: ["normal", "primary"],
|
|
6
|
-
secondary: ["normal", "neutral"],
|
|
7
|
-
destructive: ["normal", "destructive"],
|
|
8
|
-
outline: ["outline", "neutral"],
|
|
9
|
-
ghost: ["ghost", "neutral"],
|
|
10
|
-
link: ["link", "primary"]
|
|
11
|
-
};
|
|
12
5
|
const BADGE_VARIANT_DEFAULT_COLOR = {
|
|
13
6
|
normal: "primary",
|
|
14
7
|
outline: "neutral",
|
|
15
8
|
ghost: "neutral",
|
|
16
9
|
link: "primary"
|
|
17
10
|
};
|
|
18
|
-
function badgeVariants({ variant = "
|
|
19
|
-
const badgeVariant = variant ?? "
|
|
20
|
-
const mapped = badgeVariant === "normal" || badgeVariant === "outline" || badgeVariant === "ghost" || badgeVariant === "link" ? [badgeVariant, color ?? BADGE_VARIANT_DEFAULT_COLOR[badgeVariant]] : SHADCN_BADGE_VARIANT[badgeVariant];
|
|
11
|
+
function badgeVariants({ variant = "normal", color, size = "md", className } = {}) {
|
|
12
|
+
const badgeVariant = variant ?? "normal";
|
|
21
13
|
return [
|
|
22
14
|
"badge",
|
|
23
|
-
`badge--${
|
|
24
|
-
`badge--${color ??
|
|
15
|
+
`badge--${badgeVariant}`,
|
|
16
|
+
`badge--${color ?? BADGE_VARIANT_DEFAULT_COLOR[badgeVariant]}`,
|
|
25
17
|
size !== "md" && `badge--${size}`,
|
|
26
18
|
className
|
|
27
19
|
].filter(Boolean).join(" ");
|
|
28
20
|
}
|
|
29
|
-
function assignRef(ref, value) {
|
|
30
|
-
if (!ref) return;
|
|
31
|
-
if (typeof ref === "function") {
|
|
32
|
-
ref(value);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
ref.current = value;
|
|
36
|
-
}
|
|
37
|
-
function mergeRefs(...refs) {
|
|
38
|
-
const activeRefs = refs.filter(Boolean);
|
|
39
|
-
if (activeRefs.length === 0) return;
|
|
40
|
-
return (value) => {
|
|
41
|
-
for (const activeRef of activeRefs) assignRef(activeRef, value);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
21
|
function isEventHandler(propName, value) {
|
|
45
22
|
return /^on[A-Z]/.test(propName) && typeof value === "function";
|
|
46
23
|
}
|
|
@@ -77,23 +54,24 @@ function mergeSlottedBadgeProps(childProps, badgeProps) {
|
|
|
77
54
|
* <Badge color="success">Active</Badge>
|
|
78
55
|
* <Badge color="warning">Pending</Badge>
|
|
79
56
|
* <Badge variant="outline">Info</Badge>
|
|
80
|
-
* <Badge
|
|
57
|
+
* <Badge render={<a href="/docs" />}>Docs</Badge>
|
|
81
58
|
* ```
|
|
82
59
|
*/
|
|
83
|
-
function Badge({ variant = "
|
|
84
|
-
const badgeVariant = variant ?? "
|
|
60
|
+
function Badge({ variant = "normal", color, size = "md", className, render, children, ref, ...props }) {
|
|
61
|
+
const badgeVariant = variant ?? "normal";
|
|
85
62
|
const classes = badgeVariants({
|
|
86
63
|
variant,
|
|
87
64
|
color,
|
|
88
65
|
size,
|
|
89
66
|
className
|
|
90
67
|
});
|
|
91
|
-
if (
|
|
68
|
+
if (React.isValidElement(render)) return React.cloneElement(render, mergeSlottedBadgeProps(render.props, {
|
|
92
69
|
...props,
|
|
93
70
|
ref,
|
|
94
71
|
className: classes,
|
|
95
72
|
"data-slot": "badge",
|
|
96
|
-
"data-variant": badgeVariant
|
|
73
|
+
"data-variant": badgeVariant,
|
|
74
|
+
children
|
|
97
75
|
}));
|
|
98
76
|
return /* @__PURE__ */ jsx("span", {
|
|
99
77
|
ref,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-
|
|
1
|
+
import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-BV5qgFgI.js";
|
|
2
2
|
export { BrowserLiveView, BrowserLiveViewProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { N as SpinnerIcon, x as MaximizeIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Dialog
|
|
4
|
+
import { Dialog } from "./Dialog.js";
|
|
5
5
|
import { Badge } from "./Badge.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -22,8 +22,8 @@ function EndedState({ title, detail }) {
|
|
|
22
22
|
/**
|
|
23
23
|
* Embeds a Browser Run Live View — a real-time, interactive view of the
|
|
24
24
|
* agent's browser session. Links expire (~5 minutes), so the iframe swaps to
|
|
25
|
-
* `fallback` (e.g. the last screenshot) once `
|
|
26
|
-
* hosted viewer connects, a quiet loading overlay hides the frame; if it
|
|
25
|
+
* `fallback` (e.g. the last screenshot) once `source.expiresInMs` passes.
|
|
26
|
+
* While the hosted viewer connects, a quiet loading overlay hides the frame; if it
|
|
27
27
|
* never loads, the view degrades to `fallback` or an unavailable state. An
|
|
28
28
|
* expand button opens the same view in a fullscreen dialog.
|
|
29
29
|
*
|
|
@@ -39,13 +39,11 @@ function EndedState({ title, detail }) {
|
|
|
39
39
|
* The iframe is unsandboxed by design: the hosted Live View UI needs scripts
|
|
40
40
|
* and its own origin to stream the session. Only pass trusted Live View URLs.
|
|
41
41
|
*/
|
|
42
|
-
function BrowserLiveView({
|
|
43
|
-
const [expired, setExpired] = React.useState(() =>
|
|
42
|
+
function BrowserLiveView({ source, receivedAt, pageTitle, fallback, className, ...props }) {
|
|
43
|
+
const [expired, setExpired] = React.useState(() => receivedAt !== void 0 && receivedAt + source.expiresInMs <= Date.now());
|
|
44
44
|
const [frameState, setFrameState] = React.useState("loading");
|
|
45
|
-
const [expandedOpen, setExpandedOpen] = React.useState(false);
|
|
46
45
|
React.useEffect(() => {
|
|
47
|
-
|
|
48
|
-
const remaining = expiresAt - Date.now();
|
|
46
|
+
const remaining = (receivedAt ?? Date.now()) + source.expiresInMs - Date.now();
|
|
49
47
|
if (remaining <= 0) {
|
|
50
48
|
setExpired(true);
|
|
51
49
|
return;
|
|
@@ -53,10 +51,15 @@ function BrowserLiveView({ url, expiresAt, pageTitle, fallback, className, ...pr
|
|
|
53
51
|
setExpired(false);
|
|
54
52
|
const timer = setTimeout(() => setExpired(true), remaining);
|
|
55
53
|
return () => clearTimeout(timer);
|
|
56
|
-
}, [
|
|
54
|
+
}, [
|
|
55
|
+
receivedAt,
|
|
56
|
+
source.expiresInMs,
|
|
57
|
+
source.targetId,
|
|
58
|
+
source.url
|
|
59
|
+
]);
|
|
57
60
|
React.useEffect(() => {
|
|
58
61
|
setFrameState("loading");
|
|
59
|
-
}, [url]);
|
|
62
|
+
}, [source.url]);
|
|
60
63
|
React.useEffect(() => {
|
|
61
64
|
if (frameState !== "loading") return;
|
|
62
65
|
const timer = setTimeout(() => setFrameState("failed"), FRAME_LOAD_TIMEOUT_MS);
|
|
@@ -77,7 +80,7 @@ function BrowserLiveView({ url, expiresAt, pageTitle, fallback, className, ...pr
|
|
|
77
80
|
}),
|
|
78
81
|
/* @__PURE__ */ jsx("iframe", {
|
|
79
82
|
className: "browser-live-view__frame",
|
|
80
|
-
src: url,
|
|
83
|
+
src: source.url,
|
|
81
84
|
title: frameTitle,
|
|
82
85
|
allow: "clipboard-read; clipboard-write",
|
|
83
86
|
onLoad: () => setFrameState("ready")
|
|
@@ -95,40 +98,31 @@ function BrowserLiveView({ url, expiresAt, pageTitle, fallback, className, ...pr
|
|
|
95
98
|
...props,
|
|
96
99
|
className: cx("browser-live-view", className),
|
|
97
100
|
"data-expired": expired || failed || void 0,
|
|
98
|
-
children: [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
children: live ? /* @__PURE__ */ jsx("iframe", {
|
|
121
|
-
src: url,
|
|
122
|
-
title: frameTitle,
|
|
123
|
-
allow: "clipboard-read; clipboard-write"
|
|
124
|
-
}) : fallback ?? /* @__PURE__ */ jsx(EndedState, {
|
|
125
|
-
title: failed ? "Live view unavailable" : "Live view ended",
|
|
126
|
-
detail: pageTitle
|
|
127
|
-
})
|
|
128
|
-
})]
|
|
101
|
+
children: [view, /* @__PURE__ */ jsxs(Dialog.Root, { children: [/* @__PURE__ */ jsx(Dialog.Trigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
102
|
+
variant: "ghost",
|
|
103
|
+
color: "neutral",
|
|
104
|
+
size: "icon-xs",
|
|
105
|
+
className: "browser-live-view__expand",
|
|
106
|
+
"aria-label": "Expand browser view",
|
|
107
|
+
children: /* @__PURE__ */ jsx(MaximizeIcon, {})
|
|
108
|
+
}) }), /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {}), /* @__PURE__ */ jsx(Dialog.Viewport, { children: /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
109
|
+
size: "fullscreen",
|
|
110
|
+
className: "browser-live-view__dialog",
|
|
111
|
+
children: [/* @__PURE__ */ jsx(Dialog.Title, {
|
|
112
|
+
className: "browser-live-view__dialog-title",
|
|
113
|
+
children: frameTitle
|
|
114
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
115
|
+
className: "browser-live-view__dialog-body",
|
|
116
|
+
children: live ? /* @__PURE__ */ jsx("iframe", {
|
|
117
|
+
src: source.url,
|
|
118
|
+
title: frameTitle,
|
|
119
|
+
allow: "clipboard-read; clipboard-write"
|
|
120
|
+
}) : fallback ?? /* @__PURE__ */ jsx(EndedState, {
|
|
121
|
+
title: failed ? "Live view unavailable" : "Live view ended",
|
|
122
|
+
detail: pageTitle
|
|
129
123
|
})
|
|
130
|
-
})
|
|
131
|
-
]
|
|
124
|
+
})]
|
|
125
|
+
}) })] })] })]
|
|
132
126
|
});
|
|
133
127
|
}
|
|
134
128
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-
|
|
1
|
+
import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-xWvRjRAC.js";
|
|
2
2
|
export { BrowserReplay, BrowserReplayProps };
|