gentiq 0.8.3 → 0.10.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.
Files changed (45) hide show
  1. package/dist/{checkbox-hWwU3a5K.js → checkbox-BuMyz6YI.js} +1722 -1753
  2. package/dist/gentiq-admin.es.js +4479 -3091
  3. package/dist/gentiq-index.es.js +1975 -1381
  4. package/dist/gentiq.css +1 -1
  5. package/dist/src/App.d.ts +1 -1
  6. package/dist/src/ComponentsContext.d.ts +1 -1
  7. package/dist/src/Part.d.ts +2 -1
  8. package/dist/src/admin/components/ErrorBanner.d.ts +7 -0
  9. package/dist/src/admin/components/I18nPreview.d.ts +6 -0
  10. package/dist/src/admin/components/ModalCloseButton.d.ts +7 -0
  11. package/dist/src/admin/components/SectionHeader.d.ts +8 -0
  12. package/dist/src/admin/lib/api.d.ts +192 -22
  13. package/dist/src/admin/pages/settings/ChatSection.d.ts +12 -0
  14. package/dist/src/admin/pages/settings/FieldModeGrid.d.ts +14 -0
  15. package/dist/src/admin/pages/settings/GeneralSection.d.ts +11 -0
  16. package/dist/src/admin/pages/settings/JobsSection.d.ts +1 -0
  17. package/dist/src/admin/pages/settings/SettingsToggleCard.d.ts +10 -0
  18. package/dist/src/admin/pages/settings/TranslationEditor.d.ts +9 -0
  19. package/dist/src/admin/pages/settings/types.d.ts +12 -0
  20. package/dist/src/admin/pages/users/UserBulkBalanceModal.d.ts +11 -0
  21. package/dist/src/admin/pages/users/UserFormModal.d.ts +13 -0
  22. package/dist/src/admin/pages/users/UserRechargeModal.d.ts +10 -0
  23. package/dist/src/admin/pages/users/UserUsageDialog.d.ts +9 -0
  24. package/dist/src/admin/pages/users/UsersTable.d.ts +21 -0
  25. package/dist/src/components/PromptInputArea.d.ts +1 -1
  26. package/dist/src/components/ai-elements/Conversation.d.ts +10 -0
  27. package/dist/src/hooks/useGentiqAdmin.d.ts +39 -12
  28. package/dist/src/hooks/useGentiqChat.d.ts +3 -2
  29. package/dist/src/index.d.ts +4 -3
  30. package/dist/src/lib/GentiqApiContext.d.ts +12 -0
  31. package/dist/src/lib/api.d.ts +37 -17
  32. package/dist/src/lib/errors.d.ts +6 -5
  33. package/dist/src/lib/messageParts.d.ts +40 -0
  34. package/dist/src/locales/en.json.d.ts +520 -456
  35. package/dist/src/locales/fa.json.d.ts +519 -455
  36. package/dist/src/parts/FilePart.d.ts +1 -1
  37. package/dist/src/parts/ToolPart.d.ts +1 -1
  38. package/dist/src/types.d.ts +188 -14
  39. package/package.json +5 -5
  40. package/dist/src/components/ai-elements/Branch.d.ts +0 -20
  41. package/dist/src/components/ai-elements/Image.d.ts +0 -6
  42. package/dist/src/components/ai-elements/InlineCitation.d.ts +0 -38
  43. package/dist/src/components/ai-elements/Task.d.ts +0 -14
  44. package/dist/src/components/ai-elements/WebPreview.d.ts +0 -34
  45. package/dist/src/components/ui/carousel.d.ts +0 -19
@@ -1,3 +1,3 @@
1
1
  import { FilePartProps } from '../types';
2
2
  export type { FilePartProps } from '../types';
3
- export declare function FilePart({ part, message, }: FilePartProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function FilePart({ part, message }: FilePartProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { ToolPartProps } from '../types';
2
2
  export type { ToolPartProps } from '../types';
3
- export declare function ToolPart({ part, message, chat, toolComponents, showToolCalls, }: ToolPartProps): import("react/jsx-runtime").JSX.Element | null;
3
+ export declare function ToolPart({ part, message, chat, toolComponents, showToolCalls }: ToolPartProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,6 +1,11 @@
1
- import { ComponentType } from 'react';
1
+ import { ComponentProps, ComponentType, ReactNode } from 'react';
2
2
  import { UIMessage, UIMessagePart } from 'ai';
3
3
  import { TFunction } from 'i18next';
4
+ import { LucideIcon } from 'lucide-react';
5
+ import { Streamdown } from 'streamdown';
6
+ /** Props accepted by the markdown renderer (Streamdown), used to type the
7
+ * markdown override slots below without restating their (evolving) shapes. */
8
+ type StreamdownProps = ComponentProps<typeof Streamdown>;
4
9
  /**
5
10
  * Represents a single conversation thread in the history.
6
11
  */
@@ -33,6 +38,172 @@ export interface GentiqUser {
33
38
  } | null;
34
39
  created_at?: string;
35
40
  }
41
+ /**
42
+ * A user's token/request balance as returned by the backend.
43
+ */
44
+ export interface UserBalance {
45
+ tokens: number;
46
+ requests: number;
47
+ token_limit: number;
48
+ request_limit: number;
49
+ updated_at?: string | null;
50
+ }
51
+ /** Cadence unit for an automatic balance-recharge policy. */
52
+ export type RechargeIntervalUnit = 'minute' | 'hour' | 'day' | 'week' | 'month';
53
+ /**
54
+ * A user's automatic balance-recharge policy.
55
+ */
56
+ export interface RechargePolicy {
57
+ enabled: boolean;
58
+ interval_value?: number | null;
59
+ interval_unit?: RechargeIntervalUnit | null;
60
+ anchor_at?: string | null;
61
+ next_recharge_at?: string | null;
62
+ last_recharged_at?: string | null;
63
+ }
64
+ /**
65
+ * Response from the login endpoint.
66
+ */
67
+ export interface AuthResponse {
68
+ user_id: string;
69
+ phone: string;
70
+ name: string;
71
+ surname: string;
72
+ token: string;
73
+ balance?: UserBalance | null;
74
+ recharge_policy?: RechargePolicy | null;
75
+ }
76
+ /**
77
+ * Response from the registration endpoint.
78
+ */
79
+ export interface RegisterResponse {
80
+ user_id: string;
81
+ phone: string;
82
+ name: string;
83
+ surname: string;
84
+ token: string;
85
+ }
86
+ /**
87
+ * Generic `{ status, message }` acknowledgement returned by mutating endpoints.
88
+ */
89
+ export interface StatusResponse {
90
+ status: string;
91
+ message: string;
92
+ }
93
+ /**
94
+ * Response from the feedback endpoint.
95
+ */
96
+ export interface FeedbackResponse {
97
+ status: string;
98
+ }
99
+ /**
100
+ * A single thread summary in the chat history list.
101
+ */
102
+ export interface ThreadSummary {
103
+ id: string;
104
+ title?: string;
105
+ firstMessage?: string;
106
+ created_at: string;
107
+ updated_at?: string | null;
108
+ pinned?: boolean;
109
+ user_info?: {
110
+ name?: string;
111
+ surname?: string;
112
+ phone?: string;
113
+ metadata?: Record<string, unknown>;
114
+ };
115
+ }
116
+ /**
117
+ * Paginated chat-history response.
118
+ */
119
+ export interface ThreadHistoryResponse {
120
+ threads: ThreadSummary[];
121
+ skip: number;
122
+ limit: number;
123
+ count: number;
124
+ total_count: number;
125
+ }
126
+ /**
127
+ * A raw thread message item as persisted by the backend. The `content`/`parts`
128
+ * payload is intentionally loose — it is normalized into UI message parts by
129
+ * the chat hook.
130
+ */
131
+ export interface ThreadMessageItem {
132
+ id?: string;
133
+ role?: string;
134
+ content?: unknown;
135
+ parts?: unknown[];
136
+ feedback?: string;
137
+ created_at?: string;
138
+ }
139
+ /**
140
+ * Response containing the messages of a single thread.
141
+ */
142
+ export interface ThreadMessagesResponse {
143
+ items: ThreadMessageItem[];
144
+ }
145
+ /**
146
+ * Response from sharing a thread.
147
+ */
148
+ export interface ShareThreadResponse {
149
+ status: string;
150
+ share_id: string;
151
+ url: string;
152
+ }
153
+ /**
154
+ * Response containing a publicly shared thread and its messages.
155
+ */
156
+ export interface SharedThreadResponse {
157
+ id: string;
158
+ title: string;
159
+ items: ThreadMessageItem[];
160
+ created_at: string;
161
+ }
162
+ /**
163
+ * The flat application settings model returned by the backend `/config`
164
+ * endpoint and the admin settings API. Also used as the source for layering
165
+ * backend-driven configuration over local {@link GentiqConfig}.
166
+ */
167
+ export interface AppSettings {
168
+ app_name: string;
169
+ admin_title?: string | null;
170
+ default_theme?: 'system' | 'light' | 'dark' | null;
171
+ default_accent?: string | null;
172
+ welcome_greeting?: string | null;
173
+ welcome_subtitle?: string | null;
174
+ disclaimer?: string | null;
175
+ show_tool_details: boolean;
176
+ show_settings: boolean;
177
+ show_version_in_settings: boolean;
178
+ disable_signup: boolean;
179
+ disable_auth_page: boolean;
180
+ composer_attachments: boolean;
181
+ thread_actions_feedback: boolean;
182
+ thread_actions_retry: boolean;
183
+ history_enabled: boolean;
184
+ history_show_delete: boolean;
185
+ history_show_rename: boolean;
186
+ history_show_share: boolean;
187
+ history_show_pin: boolean;
188
+ settings_general_mode: string;
189
+ settings_profile_mode: string;
190
+ settings_account_mode: string;
191
+ settings_general_fields: Record<string, unknown>;
192
+ settings_profile_fields: Record<string, unknown>;
193
+ settings_account_fields: Record<string, unknown>;
194
+ language: string;
195
+ translations: Record<string, unknown>;
196
+ initial_balance_tokens?: number | null;
197
+ initial_balance_requests?: number | null;
198
+ updated_at?: string | null;
199
+ }
200
+ /**
201
+ * Response from the public `/config` endpoint — {@link AppSettings} plus the
202
+ * deployed application version injected by the backend.
203
+ */
204
+ export interface AppConfigResponse extends AppSettings {
205
+ app_version?: string | null;
206
+ }
36
207
  /**
37
208
  * User data available when building a personalized welcome greeting.
38
209
  */
@@ -122,6 +293,8 @@ export interface GentiqEndpoints {
122
293
  updateThreadTitle?: (threadId: string) => string;
123
294
  /** Retrieve attachment metadata/url. */
124
295
  attachments?: (objectName: string) => string;
296
+ /** Retrieve a publicly shared attachment metadata/url. */
297
+ sharedAttachments?: (objectName: string) => string;
125
298
  /** Send feedback for a message. */
126
299
  feedback?: string;
127
300
  /** Chat streaming endpoint. */
@@ -156,7 +329,7 @@ export interface WelcomeSuggestion {
156
329
  /** The text of the suggestion. */
157
330
  text: string;
158
331
  /** Optional icon to display alongside the text. */
159
- icon?: any;
332
+ icon?: LucideIcon;
160
333
  }
161
334
  /**
162
335
  * Configuration for the welcome/empty-state screen.
@@ -172,7 +345,7 @@ export interface WelcomeScreenConfig {
172
345
  /** Optional override for the starter prompt suggestions. */
173
346
  prompts?: (string | WelcomeSuggestion)[];
174
347
  /** Optional override for the icon displayed on the welcome screen. Defaults to null. */
175
- icon?: any;
348
+ icon?: LucideIcon | ReactNode;
176
349
  }
177
350
  /**
178
351
  * Configuration for actions available on individual chat bubbles.
@@ -312,7 +485,7 @@ export interface SettingsConfig {
312
485
  export interface MetadataFieldCondition {
313
486
  field: string;
314
487
  operator?: 'equals' | 'not_equals' | 'in' | 'not_in';
315
- value: any;
488
+ value: unknown;
316
489
  }
317
490
  export interface UserMetadataField {
318
491
  key: string;
@@ -320,13 +493,13 @@ export interface UserMetadataField {
320
493
  type: 'text' | 'number' | 'email' | 'tel' | 'date' | 'select' | 'checkbox';
321
494
  options?: {
322
495
  label: string;
323
- value: any;
496
+ value: string | number | boolean;
324
497
  }[];
325
498
  required?: boolean;
326
499
  showInSignup?: boolean;
327
500
  showInProfile?: boolean;
328
501
  placeholder?: string;
329
- defaultValue?: any;
502
+ defaultValue?: unknown;
330
503
  condition?: MetadataFieldCondition;
331
504
  /** Display mode for the field in the profile settings. */
332
505
  mode?: SettingsFieldMode;
@@ -448,7 +621,7 @@ export interface ReferenceAdapterContext {
448
621
  message: UIMessage;
449
622
  /** Resolved tool name for tool parts, when available. */
450
623
  toolName?: string;
451
- /** Direct access to the chat state if needed. */
624
+ /** Direct access to the chat state if needed (the full AI SDK chat handle). */
452
625
  chat?: any;
453
626
  }
454
627
  export type ReferenceAdapter = (context: ReferenceAdapterContext) => Partial<ChatReferenceInput> | null | undefined;
@@ -520,7 +693,7 @@ export interface ToolPartProps {
520
693
  part: UIMessagePart<any, any>;
521
694
  /** The parent message object. */
522
695
  message: UIMessage;
523
- /** Direct access to the chat state if needed. */
696
+ /** Direct access to the chat state if needed (the full AI SDK chat handle). */
524
697
  chat?: any;
525
698
  /** Per-tool-name component map — resolved from GentiqComponents.toolComponents */
526
699
  toolComponents?: Record<string, ComponentType<ToolCallComponentProps>>;
@@ -545,7 +718,7 @@ export interface WelcomeScreenProps {
545
718
  /** Callback for when a conversation starter is clicked. */
546
719
  onSuggestionClick: (suggestion: string) => void;
547
720
  /** Optional icons to showcase on the screen. */
548
- icons?: any[];
721
+ icons?: LucideIcon[];
549
722
  }
550
723
  /**
551
724
  * Props for the MessageList component, which manages the scrollable list of messages.
@@ -565,7 +738,7 @@ export interface MessageListProps {
565
738
  regen: (id: string) => void;
566
739
  /** Callback for when a suggestion is clicked (e.g. from the empty state). */
567
740
  onSuggestionClick: (suggestion: string) => void;
568
- /** Direct access to the chat state. */
741
+ /** Direct access to the chat state (the full AI SDK chat handle). */
569
742
  chat?: any;
570
743
  /** Custom CSS class names. */
571
744
  className?: string;
@@ -600,7 +773,7 @@ export interface ToolCallComponentProps {
600
773
  part: UIMessagePart<any, any>;
601
774
  /** The parent message object. */
602
775
  message: UIMessage;
603
- /** Direct access to the chat state. */
776
+ /** Direct access to the chat state (the full AI SDK chat handle). */
604
777
  chat?: any;
605
778
  }
606
779
  /**
@@ -658,11 +831,11 @@ export interface GentiqComponents {
658
831
  */
659
832
  referenceAdapters?: Record<string, ReferenceAdapter>;
660
833
  /** Custom components mapping for markdown rendering overrides. */
661
- textComponents?: Record<string, ComponentType<any>>;
834
+ textComponents?: StreamdownProps['components'];
662
835
  /** Custom remark plugins for markdown parsing. */
663
- remarkPlugins?: any[];
836
+ remarkPlugins?: StreamdownProps['remarkPlugins'];
664
837
  /** Custom rehype plugins for markdown parsing. */
665
- rehypePlugins?: any[];
838
+ rehypePlugins?: StreamdownProps['rehypePlugins'];
666
839
  }
667
840
  export interface AdminPage {
668
841
  path: string;
@@ -671,3 +844,4 @@ export interface AdminPage {
671
844
  permission?: string;
672
845
  }
673
846
  export type BuiltInAdminPage = 'analytics' | 'chat_history' | 'user_management' | 'admin_management' | 'settings';
847
+ export {};
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "provenance": true
11
11
  },
12
12
  "description": "React UI library for the Gentiq AI framework.",
13
- "version": "0.8.3",
13
+ "version": "0.10.0",
14
14
  "type": "module",
15
15
  "files": [
16
16
  "dist"
@@ -55,7 +55,6 @@
55
55
  "ai": "^5.0.123",
56
56
  "class-variance-authority": "^0.7.1",
57
57
  "clsx": "^2.1.1",
58
- "embla-carousel-react": "^8.6.0",
59
58
  "i18next": "^25.8.10",
60
59
  "i18next-browser-languagedetector": "^8.2.1",
61
60
  "katex": "^0.16.28",
@@ -108,9 +107,10 @@
108
107
  },
109
108
  "scripts": {
110
109
  "typecheck": "tsc --noEmit",
111
- "format": "prettier --write",
112
- "lint": "eslint",
113
- "lint-fix": "eslint --fix --quiet",
110
+ "format": "prettier --write \"src/**/*.{ts,tsx,css,json}\"",
111
+ "format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\"",
112
+ "lint": "eslint src",
113
+ "lint-fix": "eslint src --fix",
114
114
  "dev": "vite",
115
115
  "dev:server": "cd agent && uv run uvicorn chatbot.server:app --port 8000",
116
116
  "build": "tsc -b && vite build",
@@ -1,20 +0,0 @@
1
- import { Button } from '../ui/button';
2
- import { UIMessage } from 'ai';
3
- import { ComponentProps, HTMLAttributes } from 'react';
4
- export type BranchProps = HTMLAttributes<HTMLDivElement> & {
5
- defaultBranch?: number;
6
- onBranchChange?: (branchIndex: number) => void;
7
- };
8
- export declare const Branch: ({ defaultBranch, onBranchChange, className, ...props }: BranchProps) => import("react/jsx-runtime").JSX.Element;
9
- export type BranchMessagesProps = HTMLAttributes<HTMLDivElement>;
10
- export declare const BranchMessages: ({ children, ...props }: BranchMessagesProps) => import("react/jsx-runtime").JSX.Element[];
11
- export type BranchSelectorProps = HTMLAttributes<HTMLDivElement> & {
12
- from: UIMessage['role'];
13
- };
14
- export declare const BranchSelector: ({ className, from, ...props }: BranchSelectorProps) => import("react/jsx-runtime").JSX.Element | null;
15
- export type BranchPreviousProps = ComponentProps<typeof Button>;
16
- export declare const BranchPrevious: ({ className, children, ...props }: BranchPreviousProps) => import("react/jsx-runtime").JSX.Element;
17
- export type BranchNextProps = ComponentProps<typeof Button>;
18
- export declare const BranchNext: ({ className, children, ...props }: BranchNextProps) => import("react/jsx-runtime").JSX.Element;
19
- export type BranchPageProps = HTMLAttributes<HTMLSpanElement>;
20
- export declare const BranchPage: ({ className, ...props }: BranchPageProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { Experimental_GeneratedImage } from 'ai';
2
- export type ImageProps = Experimental_GeneratedImage & {
3
- className?: string;
4
- alt?: string;
5
- };
6
- export declare const Image: ({ base64, uint8Array, mediaType, ...props }: ImageProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,38 +0,0 @@
1
- import { Badge } from '../ui/badge';
2
- import { Carousel } from '../ui/carousel';
3
- import { HoverCard } from '../ui/hover-card';
4
- import { ComponentProps } from 'react';
5
- export type InlineCitationProps = ComponentProps<'span'>;
6
- export declare const InlineCitation: ({ className, ...props }: InlineCitationProps) => import("react/jsx-runtime").JSX.Element;
7
- export type InlineCitationTextProps = ComponentProps<'span'>;
8
- export declare const InlineCitationText: ({ className, ...props }: InlineCitationTextProps) => import("react/jsx-runtime").JSX.Element;
9
- export type InlineCitationCardProps = ComponentProps<typeof HoverCard>;
10
- export declare const InlineCitationCard: (props: InlineCitationCardProps) => import("react/jsx-runtime").JSX.Element;
11
- export type InlineCitationCardTriggerProps = ComponentProps<typeof Badge> & {
12
- sources: string[];
13
- };
14
- export declare const InlineCitationCardTrigger: ({ sources, className, ...props }: InlineCitationCardTriggerProps) => import("react/jsx-runtime").JSX.Element;
15
- export type InlineCitationCardBodyProps = ComponentProps<'div'>;
16
- export declare const InlineCitationCardBody: ({ className, ...props }: InlineCitationCardBodyProps) => import("react/jsx-runtime").JSX.Element;
17
- export type InlineCitationCarouselProps = ComponentProps<typeof Carousel>;
18
- export declare const InlineCitationCarousel: ({ className, children, ...props }: InlineCitationCarouselProps) => import("react/jsx-runtime").JSX.Element;
19
- export type InlineCitationCarouselContentProps = ComponentProps<'div'>;
20
- export declare const InlineCitationCarouselContent: (props: InlineCitationCarouselContentProps) => import("react/jsx-runtime").JSX.Element;
21
- export type InlineCitationCarouselItemProps = ComponentProps<'div'>;
22
- export declare const InlineCitationCarouselItem: ({ className, ...props }: InlineCitationCarouselItemProps) => import("react/jsx-runtime").JSX.Element;
23
- export type InlineCitationCarouselHeaderProps = ComponentProps<'div'>;
24
- export declare const InlineCitationCarouselHeader: ({ className, ...props }: InlineCitationCarouselHeaderProps) => import("react/jsx-runtime").JSX.Element;
25
- export type InlineCitationCarouselIndexProps = ComponentProps<'div'>;
26
- export declare const InlineCitationCarouselIndex: ({ children, className, ...props }: InlineCitationCarouselIndexProps) => import("react/jsx-runtime").JSX.Element;
27
- export type InlineCitationCarouselPrevProps = ComponentProps<'button'>;
28
- export declare const InlineCitationCarouselPrev: ({ className, ...props }: InlineCitationCarouselPrevProps) => import("react/jsx-runtime").JSX.Element;
29
- export type InlineCitationCarouselNextProps = ComponentProps<'button'>;
30
- export declare const InlineCitationCarouselNext: ({ className, ...props }: InlineCitationCarouselNextProps) => import("react/jsx-runtime").JSX.Element;
31
- export type InlineCitationSourceProps = ComponentProps<'div'> & {
32
- title?: string;
33
- url?: string;
34
- description?: string;
35
- };
36
- export declare const InlineCitationSource: ({ title, url, description, className, children, ...props }: InlineCitationSourceProps) => import("react/jsx-runtime").JSX.Element;
37
- export type InlineCitationQuoteProps = ComponentProps<'blockquote'>;
38
- export declare const InlineCitationQuote: ({ children, className, ...props }: InlineCitationQuoteProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
2
- import { ComponentProps } from 'react';
3
- export type TaskItemFileProps = ComponentProps<'div'>;
4
- export declare const TaskItemFile: ({ children, className, ...props }: TaskItemFileProps) => import("react/jsx-runtime").JSX.Element;
5
- export type TaskItemProps = ComponentProps<'div'>;
6
- export declare const TaskItem: ({ children, className, ...props }: TaskItemProps) => import("react/jsx-runtime").JSX.Element;
7
- export type TaskProps = ComponentProps<typeof Collapsible>;
8
- export declare const Task: ({ defaultOpen, className, ...props }: TaskProps) => import("react/jsx-runtime").JSX.Element;
9
- export type TaskTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
10
- title: string;
11
- };
12
- export declare const TaskTrigger: ({ children, className, title, ...props }: TaskTriggerProps) => import("react/jsx-runtime").JSX.Element;
13
- export type TaskContentProps = ComponentProps<typeof CollapsibleContent>;
14
- export declare const TaskContent: ({ children, className, ...props }: TaskContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,34 +0,0 @@
1
- import { Button } from '../ui/button';
2
- import { Input } from '../ui/input';
3
- import { ComponentProps, ReactNode } from 'react';
4
- export interface WebPreviewContextValue {
5
- url: string;
6
- setUrl: (url: string) => void;
7
- consoleOpen: boolean;
8
- setConsoleOpen: (open: boolean) => void;
9
- }
10
- export type WebPreviewProps = ComponentProps<'div'> & {
11
- defaultUrl?: string;
12
- onUrlChange?: (url: string) => void;
13
- };
14
- export declare const WebPreview: ({ className, children, defaultUrl, onUrlChange, ...props }: WebPreviewProps) => import("react/jsx-runtime").JSX.Element;
15
- export type WebPreviewNavigationProps = ComponentProps<'div'>;
16
- export declare const WebPreviewNavigation: ({ className, children, ...props }: WebPreviewNavigationProps) => import("react/jsx-runtime").JSX.Element;
17
- export type WebPreviewNavigationButtonProps = ComponentProps<typeof Button> & {
18
- tooltip?: string;
19
- };
20
- export declare const WebPreviewNavigationButton: ({ onClick, disabled, tooltip, children, ...props }: WebPreviewNavigationButtonProps) => import("react/jsx-runtime").JSX.Element;
21
- export type WebPreviewUrlProps = ComponentProps<typeof Input>;
22
- export declare const WebPreviewUrl: ({ value, onChange, onKeyDown, ...props }: WebPreviewUrlProps) => import("react/jsx-runtime").JSX.Element;
23
- export type WebPreviewBodyProps = ComponentProps<'iframe'> & {
24
- loading?: ReactNode;
25
- };
26
- export declare const WebPreviewBody: ({ className, loading, src, ...props }: WebPreviewBodyProps) => import("react/jsx-runtime").JSX.Element;
27
- export type WebPreviewConsoleProps = ComponentProps<'div'> & {
28
- logs?: {
29
- level: 'log' | 'warn' | 'error';
30
- message: string;
31
- timestamp: Date;
32
- }[];
33
- };
34
- export declare const WebPreviewConsole: ({ className, logs, children, ...props }: WebPreviewConsoleProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- import { default as useEmblaCarousel, UseEmblaCarouselType } from 'embla-carousel-react';
2
- import { Button } from './button';
3
- import * as React from 'react';
4
- type CarouselApi = UseEmblaCarouselType[1];
5
- type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
6
- type CarouselOptions = UseCarouselParameters[0];
7
- type CarouselPlugin = UseCarouselParameters[1];
8
- interface CarouselProps {
9
- opts?: CarouselOptions;
10
- plugins?: CarouselPlugin;
11
- orientation?: 'horizontal' | 'vertical';
12
- setApi?: (api: CarouselApi) => void;
13
- }
14
- declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<'div'> & CarouselProps): import("react/jsx-runtime").JSX.Element;
15
- declare function CarouselContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
16
- declare function CarouselItem({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
17
- declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
18
- declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
19
- export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext };