@encatch/schema 1.2.0-beta.7 → 1.2.0-beta.9

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.
package/dist/esm/index.js CHANGED
@@ -76,8 +76,32 @@ var videoAudioQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.ex
76
76
  modeTabLabelVideo: z.string().max(80).optional().describe("Translated tab label for video mode"),
77
77
  modeTabLabelAudio: z.string().max(80).optional().describe("Translated tab label for audio mode"),
78
78
  modeTabLabelPhoto: z.string().max(80).optional().describe("Translated tab label for photo mode"),
79
- modeTabLabelText: z.string().max(80).optional().describe("Translated tab label for text mode")
79
+ modeTabLabelText: z.string().max(80).optional().describe("Translated tab label for text mode"),
80
+ recordButtonLabel: z.string().max(80).optional().describe("Translated Record button label"),
81
+ uploadMediaButtonLabel: z.string().max(80).optional().describe("Translated upload button (video/audio)"),
82
+ videoIdleHint: z.string().max(200).optional().describe("Translated video idle overlay hint"),
83
+ photoEmptyHint: z.string().max(200).optional().describe("Translated empty photo area hint"),
84
+ photoUseCameraButtonLabel: z.string().max(80).optional().describe("Translated Use camera button"),
85
+ photoUploadImageButtonLabel: z.string().max(80).optional().describe("Translated Upload image button")
80
86
  }).describe("Translation schema for video/audio/photo/text questions");
87
+ var dateQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
88
+ type: z.literal("date").describe("Question type identifier"),
89
+ placeholder: translationEntrySchema.optional().describe("Placeholder for the date field"),
90
+ segmentLabelDD: z.string().max(40).optional().describe("Label above the day digits"),
91
+ segmentLabelMM: z.string().max(40).optional().describe("Label above the month digits"),
92
+ segmentLabelYYYY: z.string().max(40).optional().describe("Label above the year digits")
93
+ }).describe("Translation schema for date questions");
94
+ var signatureQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
95
+ type: z.literal("signature").describe("Question type identifier"),
96
+ clearButtonLabel: z.string().max(50).optional().describe("Translated clear button in draw mode"),
97
+ placeholder: z.string().max(200).optional().describe("Shared fallback for draw/upload hints"),
98
+ modeTabLabelType: z.string().max(80).optional().describe("Translated Type tab label"),
99
+ modeTabLabelDraw: z.string().max(80).optional().describe("Translated Draw tab label"),
100
+ modeTabLabelUpload: z.string().max(80).optional().describe("Translated Upload tab label"),
101
+ drawCanvasHint: z.string().max(200).optional().describe("Translated empty-canvas hint"),
102
+ uploadZonePrimary: z.string().max(200).optional().describe("Translated idle upload prompt"),
103
+ uploadZoneDrag: z.string().max(120).optional().describe("Translated drag-over upload prompt")
104
+ }).describe("Translation schema for signature questions");
81
105
  var nestedSelectionQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
82
106
  type: z.literal("nested_selection").describe("Question type identifier"),
83
107
  placeholder: translationEntrySchema.optional().describe("Dropdown placeholder translation")
@@ -173,6 +197,8 @@ var questionTranslationSchema = z.union([
173
197
  shortAnswerQuestionTranslationSchema,
174
198
  longAnswerQuestionTranslationSchema,
175
199
  videoAudioQuestionTranslationSchema,
200
+ dateQuestionTranslationSchema,
201
+ signatureQuestionTranslationSchema,
176
202
  nestedSelectionQuestionTranslationSchema,
177
203
  annotationQuestionTranslationSchema,
178
204
  welcomeQuestionTranslationSchema,
@@ -534,7 +560,9 @@ var questionSchema = z2.object({
534
560
  nextButtonLabel: z2.string().min(1).max(50).default("Next").describe(
535
561
  "Label for the next button when advancing past this question (overrides section or form defaults when set)"
536
562
  ),
537
- showQuestionTitle: z2.boolean().default(true).describe("Whether to display the question title; defaults to true")
563
+ showQuestionTitle: z2.boolean().default(true).describe("Whether to display the question title; defaults to true"),
564
+ questionMediaUrl: z2.string().url().optional().describe("Optional URL for media (image or video) displayed alongside the question"),
565
+ questionMediaType: z2.enum(["image", "video", "youtube", "vimeo"]).optional().describe("Type of media referenced by questionMediaUrl; one of 'image', 'video', 'youtube', or 'vimeo'")
538
566
  }).describe("Base schema for all question types with common properties");
539
567
  var ratingQuestionSchema = questionSchema.extend({
540
568
  type: z2.literal("rating").describe("Must be exactly 'rating'"),
@@ -915,6 +943,9 @@ var dateQuestionSchema = questionSchema.extend({
915
943
  minDate: z2.string().optional().describe("Earliest allowed date in ISO 8601 format (YYYY-MM-DD); when absent no lower bound is enforced"),
916
944
  maxDate: z2.string().optional().describe("Latest allowed date in ISO 8601 format (YYYY-MM-DD); when absent no upper bound is enforced"),
917
945
  placeholder: z2.string().max(50).optional().describe("Placeholder text shown in the date input"),
946
+ segmentLabelDD: z2.string().max(40).optional().describe("Visible label above the day segment; when absent a locale default is used"),
947
+ segmentLabelMM: z2.string().max(40).optional().describe("Visible label above the month segment"),
948
+ segmentLabelYYYY: z2.string().max(40).optional().describe("Visible label above the year segment"),
918
949
  prepopulatedValue: z2.string().optional().describe("Default date value in ISO 8601 format (YYYY-MM-DD) to pre-fill the input")
919
950
  }).describe("Schema for a date question that collects a structured date (and optionally time) from the respondent");
920
951
  var csatScaleSchema = z2.union([
@@ -1015,7 +1046,16 @@ var signatureQuestionSchema = questionSchema.extend({
1015
1046
  penWidth: z2.number().int().min(1).max(20).optional().describe("Pen stroke thickness in pixels for the draw canvas (1\u201320); when absent the renderer default (typically 2) is used"),
1016
1047
  backgroundColor: z2.string().max(50).optional().describe("Background color of the draw canvas; any valid CSS color; when absent the canvas is transparent and inherits the form background"),
1017
1048
  canvasHeight: z2.number().int().min(60).max(600).optional().describe("Draw canvas height in logical pixels (60\u2013600); width always fills the container; when absent the renderer chooses a sensible default (typically 200)"),
1018
- clearButtonLabel: z2.string().max(50).optional().describe("Label for the clear/redo button in draw mode; when absent the platform default label or icon is shown")
1049
+ clearButtonLabel: z2.string().max(50).optional().describe("Label for the clear/redo button in draw mode; when absent the platform default label or icon is shown"),
1050
+ placeholder: z2.string().max(200).optional().describe(
1051
+ "Optional shared fallback copy for draw-canvas and upload-zone hints when their dedicated fields are unset"
1052
+ ),
1053
+ modeTabLabelType: z2.string().max(80).optional().describe("Custom visible label for the Type tab; when absent only the tab icon is shown (use aria-label on the client)"),
1054
+ modeTabLabelDraw: z2.string().max(80).optional().describe("Custom visible label for the Draw tab; when absent only the tab icon is shown"),
1055
+ modeTabLabelUpload: z2.string().max(80).optional().describe("Custom visible label for the Upload tab; when absent only the tab icon is shown"),
1056
+ drawCanvasHint: z2.string().max(200).optional().describe("Hint shown on the empty draw canvas (e.g. 'Draw your signature here'); falls back to placeholder then platform default"),
1057
+ uploadZonePrimary: z2.string().max(200).optional().describe("Main prompt on the upload drop zone when idle (e.g. click to upload); falls back to placeholder then default"),
1058
+ uploadZoneDrag: z2.string().max(120).optional().describe("Short prompt when dragging a file over the upload zone; falls back to platform default")
1019
1059
  }).describe("Schema for a signature question where respondents can type, draw, or upload their electronic signature");
1020
1060
  var fileUploadQuestionSchema = questionSchema.extend({
1021
1061
  type: z2.literal("file_upload").describe("Must be exactly 'file_upload'"),
@@ -1092,7 +1132,13 @@ var videoAudioQuestionSchema = questionSchema.extend({
1092
1132
  modeTabLabelVideo: z2.string().max(80).optional().describe("Custom tab label for video mode in the respondent UI; when absent defaults to 'Video'"),
1093
1133
  modeTabLabelAudio: z2.string().max(80).optional().describe("Custom tab label for audio mode; when absent defaults to 'Audio'"),
1094
1134
  modeTabLabelPhoto: z2.string().max(80).optional().describe("Custom tab label for photo mode; when absent defaults to 'Photo'"),
1095
- modeTabLabelText: z2.string().max(80).optional().describe("Custom tab label for text mode; when absent defaults to 'Text'")
1135
+ modeTabLabelText: z2.string().max(80).optional().describe("Custom tab label for text mode; when absent defaults to 'Text'"),
1136
+ recordButtonLabel: z2.string().max(80).optional().describe("Label for the Record button in video/audio modes"),
1137
+ uploadMediaButtonLabel: z2.string().max(80).optional().describe("Label for the upload control in video/audio modes when uploads are allowed"),
1138
+ videoIdleHint: z2.string().max(200).optional().describe("Hint shown over the video preview when idle; falls back to placeholder then built-in copy"),
1139
+ photoEmptyHint: z2.string().max(200).optional().describe("Hint in the empty photo preview area; falls back to placeholder then built-in copy"),
1140
+ photoUseCameraButtonLabel: z2.string().max(80).optional().describe("Label for the Use camera button in photo mode"),
1141
+ photoUploadImageButtonLabel: z2.string().max(80).optional().describe("Label for the upload image button in photo mode")
1096
1142
  }).describe("Schema for a video, audio, and photo question where respondents can record or upload media or enter a text answer");
1097
1143
  var schedulerProviderSchema = z2.enum(["google_calendar", "calendly"]);
1098
1144
  var SchedulerProviders = {
@@ -2078,6 +2124,7 @@ export {
2078
2124
  customEventFieldSchema,
2079
2125
  dateFormatSchema,
2080
2126
  dateQuestionSchema,
2127
+ dateQuestionTranslationSchema,
2081
2128
  dateSeparatorSchema,
2082
2129
  deviceInfoSchema,
2083
2130
  deviceSessionInfoSchema,
@@ -2180,6 +2227,7 @@ export {
2180
2227
  shortAnswerQuestionTranslationSchema,
2181
2228
  signatureModeSchema,
2182
2229
  signatureQuestionSchema,
2230
+ signatureQuestionTranslationSchema,
2183
2231
  singleChoiceQuestionTranslationSchema,
2184
2232
  splitLayoutSchema,
2185
2233
  stackLayoutSchema,