@movable/ui 4.3.0 → 4.4.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.
@@ -1,8 +1,9 @@
1
1
  import type { MarkdownToJSX } from 'markdown-to-jsx';
2
2
  /**
3
3
  * Mapping passed to <Markdown options={{ overrides }} /> so markdown nodes
4
- * inherit MUI typography/colors instead of browser defaults. Keeps the
5
- * Movable Ink AI assistant brand styling (blue.800 inline link, semi-bold
6
- * strong, body2 paragraphs, disc lists with 4px item gap).
4
+ * inherit MUI typography/colors instead of browser defaults. Mirrors the
5
+ * Movable Ink AI assistant markdown spec (Figma 22-3582): subtitle1/subtitle2
6
+ * semi-bold headings, body2 paragraphs & lists (6px item gap), primary.dark
7
+ * inline links, and compact InkDataGrid-style tables.
7
8
  */
8
9
  export declare const markdownComponents: MarkdownToJSX.Overrides;
@@ -0,0 +1,28 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ export type InkAiPromptInputProps = {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ onSubmit: (value: string) => void;
6
+ isGenerating?: boolean;
7
+ onStop?: () => void;
8
+ disabled?: boolean;
9
+ placeholder?: string;
10
+ autoFocus?: boolean;
11
+ /**
12
+ * Stable name for the input. Generated via `useId()` if omitted — supply
13
+ * explicitly when rendering multiple instances on the same page or when the
14
+ * consumer needs a predictable selector.
15
+ */
16
+ name?: string;
17
+ className?: string;
18
+ sx?: SxProps<Theme>;
19
+ };
20
+ /**
21
+ * Single-line counterpart to {@link InkAiChatInput}: a fixed-height row with
22
+ * just the input and send button. Shares the glow, gradient border, and send
23
+ * button chrome with the chat composer. Use it for compact, single-message
24
+ * prompts (subject lines, quick asks) where chips, scope, and attach / mention
25
+ * are not needed.
26
+ */
27
+ declare const InkAiPromptInput: import("react").ForwardRefExoticComponent<InkAiPromptInputProps & import("react").RefAttributes<HTMLDivElement>>;
28
+ export { InkAiPromptInput };
@@ -0,0 +1 @@
1
+ export { InkAiPromptInput, type InkAiPromptInputProps, } from './InkAiPromptInput';
@@ -0,0 +1 @@
1
+ export declare function AiInputGlobalStyles(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export type SendButtonState = 'active' | 'disabled' | 'generating';
2
+ type SendButtonProps = {
3
+ state: SendButtonState;
4
+ onSubmit: () => void;
5
+ onStop?: () => void;
6
+ };
7
+ export declare function SendButton({ state, onSubmit, onStop }: SendButtonProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,24 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import { SystemStyleObject } from '@mui/system';
3
+ import type { SendButtonState } from './SendButton';
4
+ export declare const INPUT_TEXT_SX: {
5
+ readonly fontSize: "14px";
6
+ readonly lineHeight: 1.43;
7
+ readonly letterSpacing: "0.17px";
8
+ readonly color: "text.primary";
9
+ readonly '&::placeholder': {
10
+ readonly color: "text.disabled";
11
+ readonly opacity: 1;
12
+ };
13
+ };
14
+ export declare const GLOW_HALO_SX: SxProps<Theme>;
15
+ export declare const getBaseContainerSx: (theme: Theme, disabled: boolean) => SystemStyleObject<Theme>;
16
+ export declare const useSubmitGlow: () => {
17
+ glowKey: number;
18
+ triggerGlow: () => void;
19
+ };
20
+ export declare const resolveSendState: ({ isGenerating, disabled, value, }: {
21
+ isGenerating: boolean;
22
+ disabled: boolean;
23
+ value: string;
24
+ }) => SendButtonState;
@@ -0,0 +1,3 @@
1
+ export * from './aiInputShared';
2
+ export { AiInputGlobalStyles } from './AiInputGlobalStyles';
3
+ export { SendButton, type SendButtonState } from './SendButton';
@@ -14,6 +14,7 @@ export { InkToggleIconGroup, type InkToggleIconGroupProps, } from './InkToggleIc
14
14
  export { InkEmptyState } from './InkEmptyState';
15
15
  export { InkAttributeList } from './InkAttributeList';
16
16
  export { InkAiChatInput, type InkAiChatInputProps, type ChatChip, type ScopeOption, } from './InkAiChatInput';
17
+ export { InkAiPromptInput, type InkAiPromptInputProps, } from './InkAiPromptInput';
17
18
  export { InkAiUserMessage, type InkAiUserMessageProps, InkAiAssistantMessage, type InkAiAssistantMessageProps, } from './InkAiMessages';
18
19
  export { InkAiThinkingIndicator, type InkAiThinkingIndicatorProps, InkAiReasoningHeader, type InkAiReasoningHeaderProps, InkAiReasoningContent, type InkAiReasoningContentProps, } from './InkAiReasoning';
19
20
  export { InkImage } from './InkImage';
package/lib/index.d.ts CHANGED
@@ -417,6 +417,34 @@ export declare type InkAiChatInputProps = {
417
417
  sx?: SxProps<Theme_2>;
418
418
  };
419
419
 
420
+ /**
421
+ * Single-line counterpart to {@link InkAiChatInput}: a fixed-height row with
422
+ * just the input and send button. Shares the glow, gradient border, and send
423
+ * button chrome with the chat composer. Use it for compact, single-message
424
+ * prompts (subject lines, quick asks) where chips, scope, and attach / mention
425
+ * are not needed.
426
+ */
427
+ export declare const InkAiPromptInput: ForwardRefExoticComponent<InkAiPromptInputProps & RefAttributes<HTMLDivElement>>;
428
+
429
+ export declare type InkAiPromptInputProps = {
430
+ value: string;
431
+ onChange: (value: string) => void;
432
+ onSubmit: (value: string) => void;
433
+ isGenerating?: boolean;
434
+ onStop?: () => void;
435
+ disabled?: boolean;
436
+ placeholder?: string;
437
+ autoFocus?: boolean;
438
+ /**
439
+ * Stable name for the input. Generated via `useId()` if omitted — supply
440
+ * explicitly when rendering multiple instances on the same page or when the
441
+ * consumer needs a predictable selector.
442
+ */
443
+ name?: string;
444
+ className?: string;
445
+ sx?: SxProps<Theme_2>;
446
+ };
447
+
420
448
  /**
421
449
  * Body slot for CopilotKit's CopilotChatReasoningMessage `contentView`
422
450
  * slot. Renders the streaming/static reasoning text in a left-bordered