@elevasis/ui 2.72.0 → 2.74.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 (100) hide show
  1. package/dist/api/index.js +3 -3
  2. package/dist/app/index.d.ts +172 -20
  3. package/dist/app/index.js +9 -10
  4. package/dist/auth/index.js +5 -6
  5. package/dist/charts/index.js +5 -6
  6. package/dist/chunk-2GIJBHZT.js +60 -0
  7. package/dist/{chunk-2454MK7P.js → chunk-2MRRDF32.js} +115 -8
  8. package/dist/chunk-3LOKYZJC.js +231 -0
  9. package/dist/chunk-3QHX4ZKV.js +224 -0
  10. package/dist/chunk-43LC6XAX.js +69 -0
  11. package/dist/chunk-4M2BSHVT.js +116 -0
  12. package/dist/{chunk-SV4M2BUI.js → chunk-4MXNHJTA.js} +111 -46
  13. package/dist/{chunk-LEQGGX2U.js → chunk-5A6KCFS5.js} +36 -43
  14. package/dist/{chunk-KIDZXZM5.js → chunk-6JN2TLV2.js} +1480 -4200
  15. package/dist/{chunk-UZ5JO5TK.js → chunk-7ARBBELS.js} +1 -1
  16. package/dist/{chunk-DJWIIPKW.js → chunk-7RJ7P6S6.js} +6 -3
  17. package/dist/chunk-ARAFQBNI.js +515 -0
  18. package/dist/{chunk-DKVGO6RJ.js → chunk-BA3AZJUR.js} +1 -1
  19. package/dist/chunk-BRTGCFBH.js +305 -0
  20. package/dist/{chunk-7ESZKTQG.js → chunk-CQPULKKL.js} +5 -3
  21. package/dist/chunk-CRA7WQZH.js +49 -0
  22. package/dist/{chunk-XZIOCB5D.js → chunk-DCQKTDIG.js} +2 -52
  23. package/dist/{chunk-A3JHFZDP.js → chunk-E6YGA5WH.js} +1 -1
  24. package/dist/chunk-FA7LMNQO.js +439 -0
  25. package/dist/chunk-FZSG6M6W.js +45 -0
  26. package/dist/chunk-GDOR57D7.js +165 -0
  27. package/dist/{chunk-RRS2QR3W.js → chunk-GO4XJ5D4.js} +1 -1
  28. package/dist/chunk-GPQQGQGT.js +645 -0
  29. package/dist/chunk-HYQOGRWG.js +54 -0
  30. package/dist/{chunk-LCHL5SM2.js → chunk-LN4UW6S4.js} +1 -1
  31. package/dist/chunk-N6K2Q5BM.js +393 -0
  32. package/dist/{chunk-Z2W5VNN3.js → chunk-O32UQ26A.js} +3 -2
  33. package/dist/{chunk-M7WWRZ5Z.js → chunk-QFGNRKIE.js} +1 -78
  34. package/dist/{chunk-Q3O3WY7Q.js → chunk-R5UGIFYU.js} +74 -18
  35. package/dist/{chunk-753MKWFV.js → chunk-RFNJ2PTO.js} +1 -1
  36. package/dist/chunk-VM2OWOXL.js +24 -0
  37. package/dist/{chunk-ZBXCEWKF.js → chunk-W2QRBQQA.js} +5 -3
  38. package/dist/chunk-WDBNW44Z.js +49 -0
  39. package/dist/{chunk-IXBRUIYI.js → chunk-WZU3MCKI.js} +1 -1
  40. package/dist/chunk-YQQ5GRUR.js +21 -0
  41. package/dist/{chunk-IMZTRDY2.js → chunk-ZFA56VSR.js} +2 -2
  42. package/dist/{chunk-AFBFSXP3.js → chunk-ZWI62BQ6.js} +7 -4
  43. package/dist/chunk-ZYNVCWDZ.js +286 -0
  44. package/dist/components/index.d.ts +490 -22
  45. package/dist/components/index.js +335 -35
  46. package/dist/components/navigation/index.js +6 -7
  47. package/dist/features/auth/index.d.ts +154 -2
  48. package/dist/features/auth/index.js +18 -9
  49. package/dist/features/clients/index.js +7 -7
  50. package/dist/features/content/index.d.ts +718 -34
  51. package/dist/features/content/index.js +1345 -51
  52. package/dist/features/crm/index.d.ts +172 -20
  53. package/dist/features/crm/index.js +10 -8
  54. package/dist/features/dashboard/index.d.ts +19 -10
  55. package/dist/features/dashboard/index.js +9 -8
  56. package/dist/features/delivery/index.d.ts +134 -0
  57. package/dist/features/delivery/index.js +23 -7
  58. package/dist/features/knowledge/index.js +5 -6
  59. package/dist/features/lead-gen/index.d.ts +47 -35
  60. package/dist/features/lead-gen/index.js +12 -8
  61. package/dist/features/monitoring/index.js +11 -9
  62. package/dist/features/monitoring/requests/index.js +8 -7
  63. package/dist/features/operations/index.d.ts +38 -20
  64. package/dist/features/operations/index.js +15 -11
  65. package/dist/features/public-agent-chat/index.js +3 -1
  66. package/dist/features/settings/index.d.ts +134 -0
  67. package/dist/features/settings/index.js +9 -8
  68. package/dist/hooks/access/index.js +5 -6
  69. package/dist/hooks/delivery/index.d.ts +134 -0
  70. package/dist/hooks/delivery/index.js +3 -2
  71. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +20 -11
  72. package/dist/hooks/published.d.ts +1421 -29
  73. package/dist/hooks/published.js +22 -6
  74. package/dist/initialization/index.d.ts +134 -0
  75. package/dist/knowledge/index.d.ts +38 -20
  76. package/dist/knowledge/index.js +167 -11
  77. package/dist/{knowledge-search-index-RZLIVWPJ.js → knowledge-search-index-6GQK55IQ.js} +1 -1
  78. package/dist/layout/index.js +8 -9
  79. package/dist/profile/index.d.ts +134 -0
  80. package/dist/provider/index.d.ts +191 -21
  81. package/dist/provider/index.js +5 -6
  82. package/dist/provider/published.d.ts +219 -21
  83. package/dist/provider/published.js +5 -6
  84. package/dist/test-utils/index.d.ts +16 -5
  85. package/dist/test-utils/index.js +17 -18
  86. package/dist/types/index.d.ts +184 -14
  87. package/dist/utils/index.d.ts +102 -13
  88. package/dist/utils/index.js +1 -1
  89. package/package.json +7 -6
  90. package/dist/chunk-6M6OLGQY.js +0 -36
  91. package/dist/chunk-MKH2KOAO.js +0 -39
  92. package/dist/hooks/index.css +0 -659
  93. package/dist/hooks/index.d.ts +0 -12853
  94. package/dist/hooks/index.js +0 -27
  95. package/dist/supabase/index.d.ts +0 -6969
  96. package/dist/supabase/index.js +0 -3
  97. package/dist/typeform/index.d.ts +0 -462
  98. package/dist/typeform/index.js +0 -2051
  99. package/dist/typeform/schemas.d.ts +0 -67
  100. package/dist/typeform/schemas.js +0 -2
@@ -1,3 +0,0 @@
1
- export { useSupabase } from '../chunk-MKH2KOAO.js';
2
- import '../chunk-BRJ3QZ4E.js';
3
- import '../chunk-I2KLQ2HA.js';
@@ -1,462 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode, CSSProperties } from 'react';
3
- import { ZodSchema, z } from 'zod';
4
-
5
- /**
6
- * Discriminated union for single-value answers.
7
- * 'preset' = selected from predefined options
8
- * 'custom' = user-entered value via "Other" option
9
- */
10
- type AnswerValue = {
11
- type: 'preset';
12
- value: string;
13
- } | {
14
- type: 'custom';
15
- value: string;
16
- };
17
- /**
18
- * Multi-value answer (checkbox/multi-select).
19
- * Array of AnswerValue objects, can mix preset and custom.
20
- */
21
- type MultiAnswerValue = AnswerValue[];
22
- /**
23
- * Factory helper for creating preset answer values.
24
- */
25
- declare function createPresetValue(value: string): AnswerValue;
26
- /**
27
- * Factory helper for creating custom answer values.
28
- */
29
- declare function createCustomValue(value: string): AnswerValue;
30
- /**
31
- * Type guard to check if an answer is custom (user-entered).
32
- */
33
- declare function isCustomValue(answer: AnswerValue): answer is {
34
- type: 'custom';
35
- value: string;
36
- };
37
- /**
38
- * Type guard to check if an answer is preset (from options).
39
- */
40
- declare function isPresetValue(answer: AnswerValue): answer is {
41
- type: 'preset';
42
- value: string;
43
- };
44
- /**
45
- * Extract the raw string value from an AnswerValue.
46
- * Useful for display or simple comparisons.
47
- */
48
- declare function getAnswerString(answer: AnswerValue | undefined): string;
49
- /**
50
- * Extract all raw string values from MultiAnswerValue.
51
- */
52
- declare function getMultiAnswerStrings(answers: MultiAnswerValue): string[];
53
- /**
54
- * Check if a MultiAnswerValue contains any custom value.
55
- */
56
- declare function hasCustomValue(answers: MultiAnswerValue): boolean;
57
- /**
58
- * Get the custom value text from a MultiAnswerValue, if present.
59
- */
60
- declare function getCustomValueText(answers: MultiAnswerValue): string | undefined;
61
- /**
62
- * Check if a MultiAnswerValue contains a specific preset value.
63
- */
64
- declare function hasPresetValue(answers: MultiAnswerValue, value: string): boolean;
65
- /**
66
- * Extract the raw string value from an AnswerValue for display or storage.
67
- * For custom values, returns the user-entered text.
68
- * For preset values, returns the preset value.
69
- */
70
- declare function extractAnswerValue(answer: AnswerValue): string;
71
- /**
72
- * Extract all raw string values from a MultiAnswerValue.
73
- */
74
- declare function extractMultiAnswerValues(answers: MultiAnswerValue): string[];
75
- interface TypeformStyles {
76
- container?: React.CSSProperties;
77
- question?: React.CSSProperties;
78
- questionNumber?: React.CSSProperties;
79
- questionTitle?: React.CSSProperties;
80
- questionDescription?: React.CSSProperties;
81
- card?: React.CSSProperties;
82
- cardSelected?: React.CSSProperties;
83
- cardHovered?: React.CSSProperties;
84
- cardLabel?: React.CSSProperties;
85
- cardDescription?: React.CSSProperties;
86
- cardKey?: React.CSSProperties;
87
- cardCheckmark?: React.CSSProperties;
88
- input?: React.CSSProperties;
89
- textarea?: React.CSSProperties;
90
- progress?: React.CSSProperties;
91
- progressBar?: React.CSSProperties;
92
- progressText?: React.CSSProperties;
93
- navigation?: React.CSSProperties;
94
- buttonBack?: React.CSSProperties;
95
- buttonNext?: React.CSSProperties;
96
- buttonSubmit?: React.CSSProperties;
97
- buttonTerminate?: React.CSSProperties;
98
- completion?: React.CSSProperties;
99
- completionIcon?: React.CSSProperties;
100
- completionTitle?: React.CSSProperties;
101
- completionText?: React.CSSProperties;
102
- error?: React.CSSProperties;
103
- }
104
- interface TypeformTheme {
105
- colors?: {
106
- primary?: string;
107
- background?: string;
108
- card?: string;
109
- cardBorder?: string;
110
- text?: string;
111
- textMuted?: string;
112
- };
113
- spacing?: {
114
- questionGap?: number;
115
- contentMaxWidth?: number;
116
- pageGap?: number;
117
- };
118
- animation?: {
119
- duration?: number;
120
- easing?: string;
121
- };
122
- options?: {
123
- autoAdvance?: boolean;
124
- compact?: boolean;
125
- };
126
- }
127
- interface TypeformOption {
128
- value: string;
129
- label: string;
130
- description?: string;
131
- }
132
- interface BaseQuestion {
133
- id: string;
134
- question: string;
135
- description?: string;
136
- required?: boolean;
137
- }
138
- interface RadioQuestion extends BaseQuestion {
139
- type: 'radio';
140
- options: TypeformOption[];
141
- }
142
- interface CheckboxQuestion extends BaseQuestion {
143
- type: 'checkbox';
144
- options: TypeformOption[];
145
- minSelect?: number;
146
- maxSelect?: number;
147
- }
148
- interface TextQuestion extends BaseQuestion {
149
- type: 'text' | 'email';
150
- placeholder?: string;
151
- inputType?: 'text' | 'email' | 'tel' | 'url' | 'number';
152
- }
153
- interface TextareaQuestion extends BaseQuestion {
154
- type: 'textarea';
155
- placeholder?: string;
156
- rows?: number;
157
- }
158
- type PageCondition = {
159
- field: string;
160
- operator: 'equals' | 'notEquals';
161
- value: string;
162
- } | {
163
- field: string;
164
- operator: 'includes' | 'notIncludes';
165
- value: string;
166
- } | {
167
- field: string;
168
- operator: 'isEmpty' | 'isNotEmpty';
169
- } | ((answers: TypeformAnswers) => boolean);
170
- interface ContentQuestion {
171
- id: string;
172
- type: 'content';
173
- content: string;
174
- style?: 'default' | 'callout' | 'script' | 'info' | 'warning';
175
- condition?: PageCondition;
176
- question?: string;
177
- description?: string;
178
- }
179
- interface ArrayQuestion extends BaseQuestion {
180
- type: 'array';
181
- itemTemplate: {
182
- fields: TypeformQuestion[];
183
- };
184
- minItems?: number;
185
- maxItems?: number;
186
- addLabel?: string;
187
- removeLabel?: string;
188
- itemLabel?: (index: number) => string;
189
- summaryFields?: string[];
190
- }
191
- type TypeformInputQuestion = RadioQuestion | CheckboxQuestion | TextQuestion | TextareaQuestion | ArrayQuestion;
192
- type TypeformQuestion = TypeformInputQuestion | ContentQuestion;
193
- interface TypeformPage {
194
- id: string;
195
- title?: string;
196
- description?: string;
197
- questions: TypeformQuestion[];
198
- condition?: PageCondition;
199
- }
200
- interface TypeformConfig<T extends Record<string, unknown> = Record<string, unknown>> {
201
- questions?: TypeformQuestion[];
202
- pages?: TypeformPage[];
203
- schema?: ZodSchema<T>;
204
- onSubmit: (data: T) => void | Promise<void>;
205
- onStepChange?: (step: number, question: TypeformQuestion) => void;
206
- onPageChange?: (pageIndex: number, page: TypeformPage) => void;
207
- theme?: TypeformTheme;
208
- terminationAction?: {
209
- label: string;
210
- confirmText?: string;
211
- variant?: 'subtle' | 'outline' | 'filled';
212
- color?: string;
213
- onTerminate: (data: {
214
- partialData: Partial<T>;
215
- lastPageIndex: number;
216
- reason?: string;
217
- }) => void | Promise<void>;
218
- };
219
- initialValues?: Partial<T>;
220
- }
221
- type ArrayItemStatus = 'editing' | 'completed';
222
- interface ArrayItemAnswer {
223
- _status: ArrayItemStatus;
224
- [key: string]: string | string[] | ArrayItemStatus;
225
- }
226
- type TypeformAnswerValue = AnswerValue | MultiAnswerValue | ArrayItemAnswer[] | string | string[];
227
- type TypeformAnswers = Record<string, TypeformAnswerValue>;
228
- type TypeformErrors = Record<string, string>;
229
- interface TypeformState {
230
- currentIndex: number;
231
- answers: TypeformAnswers;
232
- errors: TypeformErrors;
233
- isSubmitting: boolean;
234
- isComplete: boolean;
235
- }
236
- interface TypeformActions {
237
- next: () => void;
238
- back: () => void;
239
- goTo: (index: number) => void;
240
- setAnswer: (questionId: string, value: TypeformAnswerValue) => void;
241
- setArrayItemAnswer: (questionId: string, itemIndex: number, fieldId: string, value: string | string[]) => void;
242
- submit: () => Promise<void>;
243
- reset: () => void;
244
- }
245
- interface UseTypeformReturn extends TypeformState, TypeformActions {
246
- currentQuestion: TypeformQuestion | null;
247
- currentPage: TypeformPage | null;
248
- currentPageIndex: number;
249
- pages: TypeformPage[];
250
- progress: number;
251
- isFirstQuestion: boolean;
252
- isLastQuestion: boolean;
253
- isFirstPage: boolean;
254
- isLastPage: boolean;
255
- canProceed: boolean;
256
- direction: 'forward' | 'backward';
257
- terminateAndSubmit: (reason?: string) => Promise<void>;
258
- }
259
- interface TypeformContextValue extends UseTypeformReturn {
260
- config: TypeformConfig;
261
- styles?: TypeformStyles;
262
- }
263
- interface TypeformSurveyProps {
264
- config: TypeformConfig;
265
- className?: string;
266
- styles?: TypeformStyles;
267
- children?: ReactNode;
268
- hideProgress?: boolean;
269
- /** Display mode: 'paginated' (default, one page at a time) or 'all' (all pages stacked) */
270
- mode?: 'paginated' | 'all';
271
- /** Optional wrapper per page section in 'all' mode. Receives the page and the rendered content. */
272
- renderPageSection?: (page: TypeformPage, content: ReactNode) => ReactNode;
273
- }
274
- interface TypeformRadioGroupProps {
275
- question: RadioQuestion;
276
- value: AnswerValue | undefined;
277
- onChange: (value: AnswerValue) => void;
278
- error?: string;
279
- }
280
- interface TypeformCheckboxGroupProps {
281
- question: CheckboxQuestion;
282
- value: MultiAnswerValue;
283
- onChange: (value: MultiAnswerValue) => void;
284
- error?: string;
285
- }
286
- interface TypeformTextInputProps {
287
- question: TextQuestion | TextareaQuestion;
288
- value: string;
289
- onChange: (value: string) => void;
290
- error?: string;
291
- onSubmit?: () => void;
292
- }
293
- interface TypeformProgressProps {
294
- current: number;
295
- total: number;
296
- showPercentage?: boolean;
297
- }
298
- interface TypeformNavigationProps {
299
- onBack: () => void;
300
- onNext: () => void;
301
- onSubmit: () => void;
302
- canGoBack: boolean;
303
- canGoNext: boolean;
304
- isLastQuestion: boolean;
305
- isSubmitting: boolean;
306
- terminationAction?: TypeformConfig['terminationAction'];
307
- onTerminate?: (reason?: string) => Promise<void>;
308
- }
309
- declare function createSurveyConfig<T extends Record<string, unknown>>(config: TypeformConfig<T>): TypeformConfig<T>;
310
-
311
- declare function useTypeformContext(): TypeformContextValue;
312
- declare function TypeformSurvey({ config, className, styles, hideProgress, mode, renderPageSection }: TypeformSurveyProps): react_jsx_runtime.JSX.Element;
313
-
314
- declare function TypeformProgress({ current, total, showPercentage, usePortal, }: TypeformProgressProps & {
315
- usePortal?: boolean;
316
- }): react_jsx_runtime.JSX.Element;
317
-
318
- declare function TypeformNavigation({ onBack, onNext, onSubmit, canGoBack, canGoNext, isLastQuestion, isSubmitting, terminationAction, onTerminate }: TypeformNavigationProps): react_jsx_runtime.JSX.Element;
319
-
320
- interface TypeformQuestionWrapperProps {
321
- question: string;
322
- description?: string;
323
- questionNumber: number;
324
- isActive: boolean;
325
- children: ReactNode;
326
- error?: string;
327
- direction?: 'forward' | 'backward';
328
- theme?: {
329
- animation?: {
330
- duration?: number;
331
- easing?: string;
332
- };
333
- spacing?: {
334
- contentMaxWidth?: number;
335
- };
336
- };
337
- compact?: boolean;
338
- styles?: {
339
- question?: CSSProperties;
340
- questionNumber?: CSSProperties;
341
- questionTitle?: CSSProperties;
342
- questionDescription?: CSSProperties;
343
- error?: CSSProperties;
344
- };
345
- }
346
- /**
347
- * Wrapper for a single question (legacy, for backwards compatibility)
348
- */
349
- declare function TypeformQuestionWrapper({ question, description, questionNumber, isActive, children, error, direction, theme, compact, styles: customStyles, }: TypeformQuestionWrapperProps): react_jsx_runtime.JSX.Element;
350
-
351
- declare function TypeformRadioGroup({ question, value, onChange, error }: TypeformRadioGroupProps): react_jsx_runtime.JSX.Element;
352
-
353
- declare function TypeformCheckboxGroup({ question, value, onChange, error }: TypeformCheckboxGroupProps): react_jsx_runtime.JSX.Element;
354
-
355
- declare function TypeformTextInput({ question, value, onChange, error, onSubmit }: TypeformTextInputProps): react_jsx_runtime.JSX.Element;
356
-
357
- interface TypeformArrayFieldProps {
358
- question: ArrayQuestion;
359
- value: ArrayItemAnswer[];
360
- onChange: (value: ArrayItemAnswer[]) => void;
361
- errors?: TypeformErrors;
362
- renderField: (question: TypeformQuestion, itemIndex: number, fieldId: string, value: string | string[], onFieldChange: (value: string | string[]) => void, error?: string) => React.ReactNode;
363
- theme?: TypeformTheme;
364
- }
365
- declare function TypeformArrayField({ question, value, onChange, errors, renderField, theme: _theme }: TypeformArrayFieldProps): react_jsx_runtime.JSX.Element;
366
-
367
- declare function useTypeform(config: TypeformConfig): UseTypeformReturn;
368
-
369
- /**
370
- * Shared hook for card styling used by RadioGroup and CheckboxGroup.
371
- * Ensures consistent styling and avoids duplication.
372
- */
373
- declare function useCardStyle(): {
374
- getCardStyle: (isSelected: boolean, isHovered: boolean) => CSSProperties;
375
- getKeyStyle: (isSelected: boolean, isHovered: boolean) => CSSProperties;
376
- theme: TypeformTheme | undefined;
377
- styles: TypeformStyles | undefined;
378
- };
379
-
380
- declare const defaultTheme: TypeformTheme;
381
- declare function mergeTheme(theme?: TypeformTheme): Required<TypeformTheme>;
382
-
383
- /**
384
- * Brochure-style theme preset
385
- * Emulates the Black Tap brochure aesthetic with glass cards, dark background, and blue accent
386
- */
387
- declare const brochureTheme: TypeformTheme;
388
- /**
389
- * Brochure-style styles preset
390
- * Glass morphism cards with subtle borders and backdrop blur
391
- *
392
- * NOTE: Use backgroundColor for solid colors to avoid conflicts with Mantine's internal styles.
393
- * Only use background shorthand for gradients or complex backgrounds.
394
- */
395
- declare const brochureStyles: TypeformStyles;
396
-
397
- /**
398
- * Zod schemas for Typeform answer validation.
399
- * Separated from types.ts to avoid Next.js server/client boundary issues.
400
- */
401
-
402
- /**
403
- * Zod schema for a single AnswerValue (preset or custom).
404
- */
405
- declare const answerValueSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
406
- type: z.ZodLiteral<"preset">;
407
- value: z.ZodString;
408
- }, z.core.$strip>, z.ZodObject<{
409
- type: z.ZodLiteral<"custom">;
410
- value: z.ZodString;
411
- }, z.core.$strip>], "type">;
412
- /**
413
- * Zod schema for MultiAnswerValue (array of AnswerValue).
414
- */
415
- declare const multiAnswerValueSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
416
- type: z.ZodLiteral<"preset">;
417
- value: z.ZodString;
418
- }, z.core.$strip>, z.ZodObject<{
419
- type: z.ZodLiteral<"custom">;
420
- value: z.ZodString;
421
- }, z.core.$strip>], "type">>;
422
- /**
423
- * Create a Zod schema for a radio field with "Other" option.
424
- * Accepts either a preset value from the enum OR a custom value.
425
- *
426
- * @param presetValues - Array of valid preset values (e.g., ['hubspot', 'salesforce'])
427
- * @returns Zod schema that validates AnswerValue with preset constraint
428
- *
429
- * @example
430
- * const crmSchema = radioWithOtherSchema(['hubspot', 'salesforce', 'pipedrive'])
431
- * // Accepts: { type: 'preset', value: 'hubspot' }
432
- * // Accepts: { type: 'custom', value: 'Freshsales' }
433
- * // Rejects: { type: 'preset', value: 'invalid' }
434
- */
435
- declare function radioWithOtherSchema<T extends string>(presetValues: readonly T[]): z.ZodDiscriminatedUnion<[z.ZodObject<{
436
- type: z.ZodLiteral<"preset">;
437
- value: z.ZodEnum<{ [k_1 in T]: k_1; } extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never>;
438
- }, z.core.$strip>, z.ZodObject<{
439
- type: z.ZodLiteral<"custom">;
440
- value: z.ZodString;
441
- }, z.core.$strip>], "type">;
442
- /**
443
- * Create a Zod schema for a checkbox field with "Other" option.
444
- * Each selected value is either a preset or custom AnswerValue.
445
- *
446
- * @param presetValues - Array of valid preset values
447
- * @returns Zod schema that validates MultiAnswerValue with preset constraint
448
- *
449
- * @example
450
- * const toolsSchema = checkboxWithOtherSchema(['zapier', 'make', 'n8n'])
451
- * // Accepts: [{ type: 'preset', value: 'zapier' }, { type: 'custom', value: 'Tray.io' }]
452
- */
453
- declare function checkboxWithOtherSchema<T extends string>(presetValues: readonly T[]): z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
454
- type: z.ZodLiteral<"preset">;
455
- value: z.ZodEnum<{ [k_1 in T]: k_1; } extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never>;
456
- }, z.core.$strip>, z.ZodObject<{
457
- type: z.ZodLiteral<"custom">;
458
- value: z.ZodString;
459
- }, z.core.$strip>], "type">>;
460
-
461
- export { TypeformArrayField, TypeformCheckboxGroup, TypeformNavigation, TypeformProgress, TypeformQuestionWrapper, TypeformRadioGroup, TypeformSurvey, TypeformTextInput, answerValueSchema, brochureStyles, brochureTheme, checkboxWithOtherSchema, createCustomValue, createPresetValue, createSurveyConfig, defaultTheme, extractAnswerValue, extractMultiAnswerValues, getAnswerString, getCustomValueText, getMultiAnswerStrings, hasCustomValue, hasPresetValue, isCustomValue, isPresetValue, mergeTheme, multiAnswerValueSchema, radioWithOtherSchema, useCardStyle, useTypeform, useTypeformContext };
462
- export type { AnswerValue, ArrayItemAnswer, ArrayQuestion, BaseQuestion, CheckboxQuestion, ContentQuestion, MultiAnswerValue, PageCondition, RadioQuestion, TextQuestion, TextareaQuestion, TypeformActions, TypeformAnswerValue, TypeformAnswers, TypeformArrayFieldProps, TypeformCheckboxGroupProps, TypeformConfig, TypeformContextValue, TypeformErrors, TypeformInputQuestion, TypeformNavigationProps, TypeformOption, TypeformPage, TypeformProgressProps, TypeformQuestion, TypeformRadioGroupProps, TypeformState, TypeformStyles, TypeformSurveyProps, TypeformTextInputProps, TypeformTheme, UseTypeformReturn };