@gentiq/ui 1.0.0-alpha.2 → 1.0.0-alpha.4

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,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
3
3
  import { useGentiqTranslation as a, MessageEdit as t } from "@gentiq/react";
4
- import { B as s } from "./shared-BNCHeyvj.js";
4
+ import { B as s } from "./shared-MFlvTavE.js";
5
5
  function d() {
6
6
  const { t: n } = a(["chat"]);
7
7
  return /* @__PURE__ */ r(t.Root, { className: "ms-auto flex w-full max-w-[88%] flex-col gap-2 rounded-lg border border-border bg-background p-3 md:max-w-[78%]", children: [
@@ -3,7 +3,7 @@ import { jsxs as z, jsx as e, Fragment as k } from "react/jsx-runtime";
3
3
  import { useState as L, useRef as P, useEffect as U } from "react";
4
4
  import { XIcon as X, Loader2Icon as V, SquareIcon as J } from "lucide-react";
5
5
  import { useGentiqTranslation as q, useComposerVoice as y, Composer as S, useComposer as K } from "@gentiq/react";
6
- import { a8 as H, as as O, c as Q } from "./shared-BNCHeyvj.js";
6
+ import { a8 as H, as as O, c as Q } from "./shared-MFlvTavE.js";
7
7
  function ce() {
8
8
  const { t: n } = q("chat"), i = y(), r = i.status === "transcribing";
9
9
  return /* @__PURE__ */ z("div", { className: "flex min-h-[40px] min-w-0 flex-1 items-center gap-2 md:min-h-[44px]", children: [
package/dist/index.d.ts CHANGED
@@ -68,7 +68,7 @@ export declare const Chat: ({ threadId, onThreadChange, components: localCompone
68
68
  * e.g. to offer an upgrade when `error.code` is `quota_exceeded`, and render this one for the
69
69
  * rest.
70
70
  */
71
- export declare function ChatError({ error }: ChatErrorProps): JSX.Element;
71
+ export declare function ChatError({ error, code }: ChatErrorProps): JSX.Element;
72
72
 
73
73
  /**
74
74
  * Props for the ChatError component, the notice under the transcript when a turn fails. Dismiss
@@ -429,6 +429,13 @@ export declare interface FollowUpSuggestionsProps extends FollowUpSuggestions_2
429
429
  className?: string;
430
430
  }
431
431
 
432
+ /** Fields available in the General section. */
433
+ declare interface GeneralSettingsFields {
434
+ theme?: SettingsFieldMode;
435
+ language?: SettingsFieldMode;
436
+ [key: string]: SettingsFieldMode | undefined;
437
+ }
438
+
432
439
  /**
433
440
  * A whole chat app on the browser's URL: sign-in, the chat with its sidebar, shared
434
441
  * conversations and, when given, the admin panel. It owns the page, so it also keeps the
@@ -498,6 +505,10 @@ export declare interface GentiqComponents {
498
505
  PromptInput?: ComponentType<PromptInputProps>;
499
506
  /** Replaces the welcome / empty-state screen */
500
507
  WelcomeScreen?: ComponentType<WelcomeScreenProps>;
508
+ /**
509
+ * Replaces the pending-reply and thread-loading indicator with a custom loader component.
510
+ */
511
+ Loader?: ComponentType<LoaderProps>;
501
512
  /**
502
513
  * The component for each part type, over Gentiq's: `text`, `reasoning`, `file`, `tool` (any tool
503
514
  * call without its own), `tool-<name>` (one tool's calls), `data-<name>` (a part the backend
@@ -780,6 +791,15 @@ export declare interface HistoryConfig {
780
791
  showPin?: boolean;
781
792
  }
782
793
 
794
+ declare type LoaderProps = HTMLAttributes<HTMLDivElement> & {
795
+ size?: number;
796
+ /**
797
+ * Indicator variant. Retained for compatibility with custom renderers;
798
+ * Gentiq's built-in loader renders the clean 3-dot pulse.
799
+ */
800
+ variant?: string;
801
+ };
802
+
783
803
  /**
784
804
  * The strip shown above the chat while maintenance is on. Replace it with
785
805
  * `components.MaintenanceBanner`.
@@ -964,6 +984,8 @@ declare function ScrollArea({ className, children, ...props }: React_2.Component
964
984
  export declare interface SettingsConfig {
965
985
  /** Section-specific configurations. */
966
986
  sections?: {
987
+ /** General settings section (Theme, Language) */
988
+ general?: SettingsSectionConfig<GeneralSettingsFields>;
967
989
  /** Profile settings section (Name, Phone, etc.) */
968
990
  profile?: SettingsSectionConfig<ProfileSettingsFields>;
969
991
  /** Account settings section (Balance, Logout, etc.) */