@pathscale/ui 0.0.120 → 0.0.121

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.
@@ -32,7 +32,6 @@ export interface ImmersiveLandingContextValue {
32
32
  direction: Accessor<"next" | "prev" | null>;
33
33
  transitionDuration: number;
34
34
  pages: readonly string[];
35
- appVersion?: string;
36
35
  }
37
36
  export interface ImmersiveLandingProps extends IComponentBaseProps {
38
37
  pages: readonly string[];
@@ -43,8 +42,6 @@ export interface ImmersiveLandingProps extends IComponentBaseProps {
43
42
  enableScrollNavigation?: boolean;
44
43
  showNavigation?: boolean;
45
44
  showArrows?: boolean;
46
- appVersion?: string;
47
- overlay?: JSX.Element | ((context: ImmersiveLandingContextValue) => JSX.Element);
48
45
  children: JSX.Element | ((context: ImmersiveLandingContextValue) => JSX.Element);
49
46
  }
50
47
  export interface ImmersiveLandingPageProps extends IComponentBaseProps {
@@ -0,0 +1,31 @@
1
+ import { type Component } from "solid-js";
2
+ import type { IComponentBaseProps } from "../types";
3
+ import type { I18nStore } from "./createI18n";
4
+ export interface LanguageSwitcherProps extends IComponentBaseProps {
5
+ /**
6
+ * The i18n store to use for language state
7
+ */
8
+ i18n: I18nStore;
9
+ /**
10
+ * ARIA label for the dropdown
11
+ */
12
+ "aria-label"?: string;
13
+ /**
14
+ * ARIA label for current language (for screen readers)
15
+ */
16
+ currentLanguageLabel?: string;
17
+ /**
18
+ * ARIA label for language options menu
19
+ */
20
+ optionsLabel?: string;
21
+ /**
22
+ * ARIA label shown while loading
23
+ */
24
+ loadingLabel?: string;
25
+ /**
26
+ * Callback when language changes
27
+ */
28
+ onLanguageChange?: (lang: string) => void;
29
+ }
30
+ declare const LanguageSwitcher: Component<LanguageSwitcherProps>;
31
+ export default LanguageSwitcher;
@@ -0,0 +1,76 @@
1
+ import { type JSX, type FlowComponent } from "solid-js";
2
+ export interface Language {
3
+ code: string;
4
+ name: string;
5
+ }
6
+ export interface I18nOptions {
7
+ /**
8
+ * List of supported languages
9
+ */
10
+ languages: Language[];
11
+ /**
12
+ * Default language code
13
+ * @default first language in the list
14
+ */
15
+ defaultLanguage?: string;
16
+ /**
17
+ * Storage key for persisting locale
18
+ */
19
+ storageKey: string;
20
+ /**
21
+ * Function to load translations for a locale
22
+ * Should return a record of translation keys to values
23
+ */
24
+ loadTranslations?: (locale: string) => Promise<Record<string, unknown>>;
25
+ /**
26
+ * Initial translations (for default language)
27
+ */
28
+ initialTranslations?: Record<string, unknown>;
29
+ }
30
+ export interface I18nStore {
31
+ /**
32
+ * Current locale code
33
+ */
34
+ locale: () => string;
35
+ /**
36
+ * Whether translations are currently loading
37
+ */
38
+ isLoading: () => boolean;
39
+ /**
40
+ * Translation function
41
+ */
42
+ t: (key: string) => string;
43
+ /**
44
+ * Set the current locale
45
+ */
46
+ setLocale: (lang: string) => Promise<void>;
47
+ /**
48
+ * Initialize the store (detect language from URL, storage, browser)
49
+ */
50
+ init: () => Promise<void>;
51
+ /**
52
+ * Available languages
53
+ */
54
+ languages: Language[];
55
+ /**
56
+ * Language names map for quick lookup
57
+ */
58
+ languageNames: Record<string, string>;
59
+ }
60
+ /**
61
+ * Creates an i18n store with configurable options.
62
+ */
63
+ export declare function createI18n(options: I18nOptions): I18nStore;
64
+ export interface I18nContextValue {
65
+ i18n: I18nStore;
66
+ }
67
+ export declare const I18nContext: import("solid-js").Context<I18nContextValue | undefined>;
68
+ export declare function useI18n(): I18nStore;
69
+ export interface I18nProviderProps {
70
+ i18n: I18nStore;
71
+ children: JSX.Element;
72
+ }
73
+ /**
74
+ * Provider component for i18n context
75
+ */
76
+ export declare const I18nProvider: FlowComponent<I18nProviderProps>;
@@ -0,0 +1,3 @@
1
+ export { default as LanguageSwitcher } from "./LanguageSwitcher";
2
+ export type { LanguageSwitcherProps } from "./LanguageSwitcher";
3
+ export { createI18n, I18nProvider, I18nContext, useI18n, type I18nStore, type I18nOptions, type I18nContextValue, type I18nProviderProps, type Language, } from "./createI18n";
@@ -0,0 +1,38 @@
1
+ import { type Component, type JSX } from "solid-js";
2
+ import type { IComponentBaseProps } from "../types";
3
+ import type { LiveChatPanelProps } from "./LiveChatPanel";
4
+ export interface LiveChatBubbleProps extends IComponentBaseProps {
5
+ /**
6
+ * Position of the chat bubble
7
+ * @default "bottom-right"
8
+ */
9
+ position?: "bottom-right" | "bottom-left";
10
+ /**
11
+ * ARIA label for the button
12
+ * @default "Open chat"
13
+ */
14
+ "aria-label"?: string;
15
+ /**
16
+ * Number of unread messages to show in badge
17
+ * @default 0
18
+ */
19
+ unreadCount?: number;
20
+ /**
21
+ * Props to pass to the LiveChatPanel when opened
22
+ */
23
+ panelProps?: Omit<LiveChatPanelProps, "onClose">;
24
+ /**
25
+ * Callback when chat is opened
26
+ */
27
+ onOpen?: () => void;
28
+ /**
29
+ * Callback when chat is closed
30
+ */
31
+ onClose?: () => void;
32
+ /**
33
+ * Custom children to render inside the button (replaces default icons)
34
+ */
35
+ children?: JSX.Element;
36
+ }
37
+ declare const LiveChatBubble: Component<LiveChatBubbleProps>;
38
+ export default LiveChatBubble;
@@ -0,0 +1,54 @@
1
+ import { type Component } from "solid-js";
2
+ import type { IComponentBaseProps } from "../types";
3
+ import type { ChatMessage, SendMessagePayload, SendMessageResponse } from "./types";
4
+ export interface LiveChatPanelProps extends IComponentBaseProps {
5
+ /**
6
+ * Callback when the panel close button is clicked
7
+ */
8
+ onClose: () => void;
9
+ /**
10
+ * Title shown in the header
11
+ * @default "Chat with us"
12
+ */
13
+ title?: string;
14
+ /**
15
+ * Placeholder text for the input field
16
+ * @default "Message support..."
17
+ */
18
+ placeholder?: string;
19
+ /**
20
+ * Label for the close button (for accessibility)
21
+ * @default "Close chat"
22
+ */
23
+ closeLabel?: string;
24
+ /**
25
+ * Label for the send button
26
+ * @default "Send"
27
+ */
28
+ sendLabel?: string;
29
+ /**
30
+ * Empty state message when there are no messages
31
+ * @default "No messages yet. Start a conversation!"
32
+ */
33
+ emptyMessage?: string;
34
+ /**
35
+ * Enable mock mode with demo messages
36
+ * @default false
37
+ */
38
+ mockMode?: boolean;
39
+ /**
40
+ * Initial messages to display (only used if mockMode is false)
41
+ */
42
+ messages?: ChatMessage[];
43
+ /**
44
+ * Callback when a message is sent
45
+ * Should return the message ID and timestamp from the server
46
+ */
47
+ onSendMessage?: (payload: SendMessagePayload) => Promise<SendMessageResponse>;
48
+ /**
49
+ * Whether a message is currently being sent
50
+ */
51
+ isSending?: boolean;
52
+ }
53
+ declare const LiveChatPanel: Component<LiveChatPanelProps>;
54
+ export default LiveChatPanel;
@@ -0,0 +1,5 @@
1
+ export { default as LiveChatBubble } from "./LiveChatBubble";
2
+ export type { LiveChatBubbleProps } from "./LiveChatBubble";
3
+ export { default as LiveChatPanel } from "./LiveChatPanel";
4
+ export type { LiveChatPanelProps } from "./LiveChatPanel";
5
+ export type { ChatMessage, SendMessagePayload, SendMessageResponse } from "./types";
@@ -0,0 +1,13 @@
1
+ export interface ChatMessage {
2
+ messageId: string;
3
+ content: string;
4
+ sender: "user" | "agent";
5
+ timestamp: number;
6
+ }
7
+ export interface SendMessagePayload {
8
+ message: string;
9
+ }
10
+ export interface SendMessageResponse {
11
+ messageId: string;
12
+ timestamp: number;
13
+ }
@@ -0,0 +1,23 @@
1
+ import { type Component, type JSX } from "solid-js";
2
+ import type { IComponentBaseProps } from "../types";
3
+ export interface ThemeColorPickerProps extends IComponentBaseProps {
4
+ /**
5
+ * Prefix for localStorage keys (e.g., "myapp" becomes "myapp_hue_shift")
6
+ * @default "theme"
7
+ */
8
+ storagePrefix?: string;
9
+ /**
10
+ * Callback when color changes
11
+ */
12
+ onColorChange?: (hue: number | null, saturation: number) => void;
13
+ /**
14
+ * ARIA label for the button
15
+ */
16
+ "aria-label"?: string;
17
+ /**
18
+ * Custom button content (defaults to palette icon)
19
+ */
20
+ children?: JSX.Element;
21
+ }
22
+ declare const ThemeColorPicker: Component<ThemeColorPickerProps>;
23
+ export default ThemeColorPicker;
@@ -0,0 +1,14 @@
1
+ declare function resetHueShift(): void;
2
+ export interface HueShiftStore {
3
+ hueShift: () => number | null;
4
+ hueSaturation: () => number;
5
+ setHueShift: (hue: number | null, saturation?: number) => void;
6
+ isAvailable: () => boolean;
7
+ }
8
+ /**
9
+ * Creates a hue shift store with configurable storage prefix.
10
+ * @param storagePrefix - Prefix for localStorage keys (e.g., "myapp" becomes "myapp_hue_shift")
11
+ */
12
+ export declare function createHueShiftStore(storagePrefix: string): HueShiftStore;
13
+ export declare function getDefaultHueShiftStore(): HueShiftStore;
14
+ export { resetHueShift };
@@ -0,0 +1,3 @@
1
+ export { default as ThemeColorPicker } from "./ThemeColorPicker";
2
+ export type { ThemeColorPickerProps } from "./ThemeColorPicker";
3
+ export { createHueShiftStore, getDefaultHueShiftStore, resetHueShift, type HueShiftStore, } from "./hueShift";
package/dist/index.d.ts CHANGED
@@ -47,7 +47,11 @@ export { default as Input } from "./components/input";
47
47
  export { default as Join } from "./components/join";
48
48
  export { default as Kbd } from "./components/kbd";
49
49
  export { default as Link } from "./components/link";
50
+ export { LiveChatBubble, LiveChatPanel, } from "./components/live-chat";
51
+ export type { LiveChatBubbleProps, LiveChatPanelProps, ChatMessage, SendMessagePayload, SendMessageResponse, } from "./components/live-chat";
50
52
  export { default as Loading } from "./components/loading";
53
+ export { LanguageSwitcher, createI18n, I18nProvider, I18nContext, useI18n, } from "./components/language-switcher";
54
+ export type { LanguageSwitcherProps, I18nStore, I18nOptions, I18nContextValue, I18nProviderProps, Language, } from "./components/language-switcher";
51
55
  export { default as Mask } from "./components/mask";
52
56
  export { Menu } from "./components/menu";
53
57
  export { default as Modal } from "./components/modal";
@@ -88,6 +92,8 @@ export type { StreamingTableStore } from "./components/streaming-table";
88
92
  export { default as Tabs } from "./components/tabs";
89
93
  export type { RadioTabProps, TabProps, TabsProps } from "./components/tabs";
90
94
  export { default as Textarea } from "./components/textarea";
95
+ export { ThemeColorPicker, createHueShiftStore, getDefaultHueShiftStore, resetHueShift, } from "./components/theme-color-picker";
96
+ export type { ThemeColorPickerProps, HueShiftStore, } from "./components/theme-color-picker";
91
97
  export { Timeline, TimelineEnd, TimelineItem, TimelineMiddle, TimelineStart, } from "./components/timeline";
92
98
  export { default as Toast } from "./components/toast";
93
99
  export { ToastContainer, ToastStack } from "./components/toastcontainer";