research-agent-ui 0.1.156 → 0.1.157

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,5 +1,5 @@
1
1
  interface RandomLoadingAnimationProps {
2
- /** Width and height of the SVG spinners, in pixels. */
2
+ /** Width and height of the spinners, in pixels. */
3
3
  size?: number;
4
4
  /** Extra classes for the centering wrapper. */
5
5
  className?: string;
@@ -2,8 +2,9 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import RandomLoadingAnimation from './RandomLoadingAnimation';
3
3
  /**
4
4
  * `RandomLoadingAnimation` is the chat's "thinking" loader. Each mount picks a
5
- * different animation from the GRAB-URL spinner set (`grab-url/animations`)
6
- * plus the quantum orbital sphere, so a new one appears on every response.
5
+ * different animation from the GRAB-URL spinner set — the `grab-url/animations`
6
+ * SVGs and the eight `<Spinner>` variants — plus the quantum orbital sphere, so
7
+ * a new one appears on every response.
7
8
  */
8
9
  declare const meta: Meta<typeof RandomLoadingAnimation>;
9
10
  export default meta;
@@ -12,5 +13,5 @@ type Story = StoryObj<typeof RandomLoadingAnimation>;
12
13
  export declare const Default: Story;
13
14
  /** Four mounts side by side, each picking independently. */
14
15
  export declare const Several: Story;
15
- /** Every SVG spinner in the pool, for reviewing the set as a whole. */
16
+ /** Every spinner in the pool, for reviewing the set as a whole. */
16
17
  export declare const AllVariants: Story;
@@ -1,3 +1,4 @@
1
+ import { type SpinnerVariant } from '../../ui/spinner';
1
2
  /** Options accepted by every `grab-url/animations` spinner factory. */
2
3
  export interface LoadingAnimationOptions {
3
4
  /** Hex colors substituted into the SVG, in order of appearance. */
@@ -18,12 +19,16 @@ export type SvgLoadingAnimation = (options?: LoadingAnimationOptions) => string;
18
19
  * rather than an SVG string and so is kept out of {@link SVG_LOADING_ANIMATIONS}.
19
20
  */
20
21
  export declare const QUANTUM_SPHERE_ANIMATION = "quantumSphere";
22
+ /** Marks the pool names that a {@link Spinner} variant renders. */
23
+ export declare const SPINNER_ANIMATION_PREFIX = "spinner:";
21
24
  /**
22
25
  * Every animated SVG spinner exported by `grab-url/animations`, keyed by its
23
26
  * export name. Read off the module namespace rather than listed by hand, so
24
27
  * spinners added in a later `grab-url` release join the rotation on upgrade.
25
28
  */
26
29
  export declare const SVG_LOADING_ANIMATIONS: Record<string, SvgLoadingAnimation>;
30
+ /** The eight {@link Spinner} variants, as pool names. */
31
+ export declare const SPINNER_LOADING_ANIMATIONS: string[];
27
32
  /** Every loader the chat can show, sorted so the order is deterministic. */
28
33
  export declare const LOADING_ANIMATION_NAMES: string[];
29
34
  /**
@@ -32,6 +37,14 @@ export declare const LOADING_ANIMATION_NAMES: string[];
32
37
  * @returns {string} A name from {@link LOADING_ANIMATION_NAMES}
33
38
  */
34
39
  export declare function getRandomLoadingAnimation(): string;
40
+ /**
41
+ * Reads the {@link Spinner} variant a pool name stands for.
42
+ *
43
+ * @param name - A name from {@link LOADING_ANIMATION_NAMES}
44
+ * @returns {SpinnerVariant | undefined} The variant, or `undefined` when the
45
+ * name is not a spinner pick
46
+ */
47
+ export declare function getSpinnerVariant(name: string): SpinnerVariant | undefined;
35
48
  /**
36
49
  * Renders one spinner to a raw `<svg>` string.
37
50
  *
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./config.cjs"),t=require("./src-Cp0UerpM.cjs");exports.ARTICLE_TOOLBAR_SHORTCUTS=t.S,exports.ArticleAIResponse=t.y,exports.ArticleActionButtons=t.C,exports.ArticleContent=t._,exports.ArticleFollowupQuestions=t.b,exports.ArticlePanelHeader=t.T,exports.ArticlePromptInput=t.x,exports.CategoryDock=t.o,exports.ChatInputBox=t.E,exports.ChatProvider=t.D,exports.ChatWindow=t.f,exports.CookieConsent=t.a,exports.ExtractPanelProvider=t.N,exports.HistoryDialogs=t.m,exports.HistoryDropdown=t.p,exports.KokoroVoiceSelector=t.u,exports.LexicalArticleViewer=t.v,exports.MainViewProvider=t.s,exports.QwkSearchApp=t.n,exports.QwkSearchProviders=t.r,exports.SessionProvider=t.O,exports.UnifiedMarkdown=t.g,exports.VoiceSettingsPanel=t.l,exports.cn=t.F,exports.configureResearchAgentUI=e.configureResearchAgentUI,exports.formatMessageTime=t.I,exports.formatTimeDifference=t.L,exports.formatToolbarShortcut=t.w,exports.researchAgentUIConfig=e.researchAgentUIConfig,exports.useChat=t.A,exports.useChatState=t.j,exports.useChatTabs=t.t,exports.useChunkErrorReload=t.i,exports.useExtractPanel=t.P,exports.useHistoryState=t.h,exports.useKokoroTTS=t.d,exports.useMainView=t.c,exports.useSession=t.k,exports.useTextToSpeech=t.M;
1
+ "use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./config.cjs"),t=require("./src-CIlJeaIT.cjs");exports.ARTICLE_TOOLBAR_SHORTCUTS=t.S,exports.ArticleAIResponse=t.y,exports.ArticleActionButtons=t.C,exports.ArticleContent=t._,exports.ArticleFollowupQuestions=t.b,exports.ArticlePanelHeader=t.T,exports.ArticlePromptInput=t.x,exports.CategoryDock=t.o,exports.ChatInputBox=t.E,exports.ChatProvider=t.D,exports.ChatWindow=t.f,exports.CookieConsent=t.a,exports.ExtractPanelProvider=t.N,exports.HistoryDialogs=t.m,exports.HistoryDropdown=t.p,exports.KokoroVoiceSelector=t.u,exports.LexicalArticleViewer=t.v,exports.MainViewProvider=t.s,exports.QwkSearchApp=t.n,exports.QwkSearchProviders=t.r,exports.SessionProvider=t.O,exports.UnifiedMarkdown=t.g,exports.VoiceSettingsPanel=t.l,exports.cn=t.F,exports.configureResearchAgentUI=e.configureResearchAgentUI,exports.formatMessageTime=t.I,exports.formatTimeDifference=t.L,exports.formatToolbarShortcut=t.w,exports.researchAgentUIConfig=e.researchAgentUIConfig,exports.useChat=t.A,exports.useChatState=t.j,exports.useChatTabs=t.t,exports.useChunkErrorReload=t.i,exports.useExtractPanel=t.P,exports.useHistoryState=t.h,exports.useKokoroTTS=t.d,exports.useMainView=t.c,exports.useSession=t.k,exports.useTextToSpeech=t.M;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
  "use client";
3
3
  import { configureResearchAgentUI as e, researchAgentUIConfig as t } from "./config.mjs";
4
- import { A as n, C as r, D as i, E as a, F as o, I as s, L as c, M as l, N as u, O as d, P as f, S as p, T as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, i as C, j as w, k as T, l as E, m as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P, v as F, w as I, x as L, y as R } from "./src-ZX94CB2B.js";
4
+ import { A as n, C as r, D as i, E as a, F as o, I as s, L as c, M as l, N as u, O as d, P as f, S as p, T as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, i as C, j as w, k as T, l as E, m as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P, v as F, w as I, x as L, y as R } from "./src-CnNezsUY.js";
5
5
  export { p as ARTICLE_TOOLBAR_SHORTCUTS, R as ArticleAIResponse, r as ArticleActionButtons, h as ArticleContent, _ as ArticleFollowupQuestions, m as ArticlePanelHeader, L as ArticlePromptInput, k as CategoryDock, a as ChatInputBox, i as ChatProvider, b as ChatWindow, g as CookieConsent, u as ExtractPanelProvider, D as HistoryDialogs, A as HistoryDropdown, P as KokoroVoiceSelector, F as LexicalArticleViewer, M as MainViewProvider, O as QwkSearchApp, j as QwkSearchProviders, d as SessionProvider, x as UnifiedMarkdown, E as VoiceSettingsPanel, o as cn, e as configureResearchAgentUI, s as formatMessageTime, c as formatTimeDifference, I as formatToolbarShortcut, t as researchAgentUIConfig, n as useChat, w as useChatState, N as useChatTabs, C as useChunkErrorReload, f as useExtractPanel, S as useHistoryState, y as useKokoroTTS, v as useMainView, T as useSession, l as useTextToSpeech };