@marimo-team/frontend 0.19.10-dev13 → 0.19.10-dev16
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/assets/{edit-page-jR_zJ6Zm.js → edit-page-duq5mHJr.js} +6 -6
- package/dist/assets/{index-DHn5aPae.js → index-D6GKZ4d6.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +2 -0
- package/src/plugins/impl/chat/ChatPlugin.tsx +2 -0
- package/src/plugins/impl/chat/chat-ui.tsx +10 -1
package/dist/index.html
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<marimo-server-token data-token="{{ server_token }}" hidden></marimo-server-token>
|
|
67
67
|
<!-- /TODO -->
|
|
68
68
|
<title>{{ title }}</title>
|
|
69
|
-
<script type="module" crossorigin src="./assets/index-
|
|
69
|
+
<script type="module" crossorigin src="./assets/index-D6GKZ4d6.js"></script>
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-D2MJg03u.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="./assets/clsx-D8GwTfvk.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="./assets/cn-BKtXLv3a.js">
|
package/package.json
CHANGED
|
@@ -226,6 +226,7 @@ export const AppChrome: React.FC<PropsWithChildren> = ({ children }) => {
|
|
|
226
226
|
|
|
227
227
|
const helperResizeHandle = (
|
|
228
228
|
<PanelResizeHandle
|
|
229
|
+
disabled={!isSidebarOpen}
|
|
229
230
|
onDragging={handleDragging}
|
|
230
231
|
className={cn(
|
|
231
232
|
"border-border print:hidden z-10",
|
|
@@ -237,6 +238,7 @@ export const AppChrome: React.FC<PropsWithChildren> = ({ children }) => {
|
|
|
237
238
|
|
|
238
239
|
const panelResizeHandle = (
|
|
239
240
|
<PanelResizeHandle
|
|
241
|
+
disabled={!isDeveloperPanelOpen}
|
|
240
242
|
onDragging={handleDragging}
|
|
241
243
|
className={cn(
|
|
242
244
|
"border-border print:hidden z-20",
|
|
@@ -47,6 +47,7 @@ export const ChatPlugin = createPlugin<{ messages: UIMessage[] }>(
|
|
|
47
47
|
maxHeight: z.number().optional(),
|
|
48
48
|
config: configSchema,
|
|
49
49
|
allowAttachments: z.union([z.boolean(), z.string().array()]),
|
|
50
|
+
disabled: z.boolean().default(false),
|
|
50
51
|
}),
|
|
51
52
|
)
|
|
52
53
|
.withFunctions<PluginFunctions>({
|
|
@@ -76,6 +77,7 @@ export const ChatPlugin = createPlugin<{ messages: UIMessage[] }>(
|
|
|
76
77
|
showConfigurationControls={props.data.showConfigurationControls}
|
|
77
78
|
maxHeight={props.data.maxHeight}
|
|
78
79
|
allowAttachments={props.data.allowAttachments}
|
|
80
|
+
disabled={props.data.disabled}
|
|
79
81
|
config={props.data.config}
|
|
80
82
|
get_chat_history={props.functions.get_chat_history}
|
|
81
83
|
delete_chat_history={props.functions.delete_chat_history}
|
|
@@ -67,6 +67,7 @@ interface Props extends PluginFunctions {
|
|
|
67
67
|
showConfigurationControls: boolean;
|
|
68
68
|
maxHeight: number | undefined;
|
|
69
69
|
allowAttachments: boolean | string[];
|
|
70
|
+
disabled: boolean;
|
|
70
71
|
value: UIMessage[];
|
|
71
72
|
setValue: (messages: UIMessage[]) => void;
|
|
72
73
|
host: HTMLElement;
|
|
@@ -450,6 +451,9 @@ export const Chatbot: React.FC<Props> = (props) => {
|
|
|
450
451
|
<form
|
|
451
452
|
onSubmit={async (evt) => {
|
|
452
453
|
evt.preventDefault();
|
|
454
|
+
if (props.disabled) {
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
453
457
|
|
|
454
458
|
const fileParts = files
|
|
455
459
|
? await convertToFileUIPart(files)
|
|
@@ -462,7 +466,12 @@ export const Chatbot: React.FC<Props> = (props) => {
|
|
|
462
466
|
resetInput();
|
|
463
467
|
}}
|
|
464
468
|
ref={formRef}
|
|
465
|
-
|
|
469
|
+
// biome-ignore lint/a11y/useSemanticElements: inert is used to disable the entire form
|
|
470
|
+
inert={props.disabled || undefined}
|
|
471
|
+
className={cn(
|
|
472
|
+
"flex w-full border-t border-(--slate-6) px-2 py-1 items-center",
|
|
473
|
+
props.disabled && "opacity-50 cursor-not-allowed",
|
|
474
|
+
)}
|
|
466
475
|
>
|
|
467
476
|
{props.showConfigurationControls && (
|
|
468
477
|
<ConfigPopup config={config} onChange={setConfig} />
|