@encatch/schema 1.3.0-beta.5 → 1.3.0-beta.7

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
@@ -96,7 +96,18 @@ var videoAudioQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.ex
96
96
  videoIdleHint: z.string().max(200).optional().describe("Translated video idle overlay hint"),
97
97
  photoEmptyHint: z.string().max(200).optional().describe("Translated empty photo area hint"),
98
98
  photoUseCameraButtonLabel: z.string().max(80).optional().describe("Translated Use camera button"),
99
- photoUploadImageButtonLabel: z.string().max(80).optional().describe("Translated Upload image button")
99
+ photoUploadImageButtonLabel: z.string().max(80).optional().describe("Translated Upload image button"),
100
+ capturePhotoButtonLabel: z.string().max(80).optional().describe("Translated Capture photo button"),
101
+ cancelButtonLabel: z.string().max(80).optional().describe("Translated Cancel button in live photo mode"),
102
+ uploadPhotoButtonLabel: z.string().max(80).optional().describe("Translated Upload Photo button"),
103
+ replaceButtonLabel: z.string().max(80).optional().describe("Translated Replace button"),
104
+ removeButtonLabel: z.string().max(80).optional().describe("Translated Remove button"),
105
+ stopRecordingButtonLabel: z.string().max(80).optional().describe("Translated Stop recording button"),
106
+ playButtonLabel: z.string().max(80).optional().describe("Translated Play button"),
107
+ pauseButtonLabel: z.string().max(80).optional().describe("Translated Pause button"),
108
+ uploadButtonLabel: z.string().max(80).optional().describe("Translated Upload button on preview"),
109
+ rerecordButtonLabel: z.string().max(80).optional().describe("Translated Re-record button"),
110
+ dismissErrorButtonLabel: z.string().max(80).optional().describe("Translated dismiss error control label")
100
111
  }).describe("Translation schema for video/audio/photo/text questions");
101
112
  var dateQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
102
113
  type: z.literal("date").describe("Question type identifier"),
@@ -114,7 +125,11 @@ var signatureQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.ext
114
125
  modeTabLabelUpload: z.string().max(80).optional().describe("Translated Upload tab label"),
115
126
  drawCanvasHint: z.string().max(200).optional().describe("Translated empty-canvas hint"),
116
127
  uploadZonePrimary: z.string().max(200).optional().describe("Translated idle upload prompt"),
117
- uploadZoneDrag: z.string().max(120).optional().describe("Translated drag-over upload prompt")
128
+ uploadZoneDrag: z.string().max(120).optional().describe("Translated drag-over upload prompt"),
129
+ uploadSignatureButtonLabel: z.string().max(80).optional().describe("Translated Upload Signature button"),
130
+ uploadButtonLabel: z.string().max(80).optional().describe("Translated Upload button in upload mode"),
131
+ removeButtonLabel: z.string().max(80).optional().describe("Translated Remove button"),
132
+ dismissErrorButtonLabel: z.string().max(80).optional().describe("Translated dismiss error control label")
118
133
  }).describe("Translation schema for signature questions");
119
134
  var schedulerQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
120
135
  type: z.literal("scheduler").describe("Question type identifier"),
@@ -1561,7 +1576,11 @@ var signatureQuestionSchema = questionSchema.extend({
1561
1576
  ),
1562
1577
  uploadZoneDrag: z4.string().max(120).optional().describe(
1563
1578
  "Short prompt when dragging a file over the upload zone; falls back to platform default"
1564
- )
1579
+ ),
1580
+ uploadSignatureButtonLabel: z4.string().max(80).optional().describe("Label for the Upload Signature button in draw mode"),
1581
+ uploadButtonLabel: z4.string().max(80).optional().describe("Label for the Upload button in upload mode preview"),
1582
+ removeButtonLabel: z4.string().max(80).optional().describe("Label for Remove controls in upload mode"),
1583
+ dismissErrorButtonLabel: z4.string().max(80).optional().describe("Accessible label for the dismiss control on upload error overlays")
1565
1584
  }).describe(
1566
1585
  "Schema for a signature question where respondents can type, draw, or upload their electronic signature"
1567
1586
  );
@@ -1723,7 +1742,18 @@ var videoAudioQuestionSchema = questionSchema.extend({
1723
1742
  "Hint in the empty photo preview area; falls back to placeholder then built-in copy"
1724
1743
  ),
1725
1744
  photoUseCameraButtonLabel: z4.string().max(80).optional().describe("Label for the Use camera button in photo mode"),
1726
- photoUploadImageButtonLabel: z4.string().max(80).optional().describe("Label for the upload image button in photo mode")
1745
+ photoUploadImageButtonLabel: z4.string().max(80).optional().describe("Label for the upload image button in photo mode"),
1746
+ capturePhotoButtonLabel: z4.string().max(80).optional().describe("Label for the Capture photo button in live photo mode"),
1747
+ cancelButtonLabel: z4.string().max(80).optional().describe("Label for the Cancel button when live photo camera is open"),
1748
+ uploadPhotoButtonLabel: z4.string().max(80).optional().describe("Label for the Upload Photo button on photo preview"),
1749
+ replaceButtonLabel: z4.string().max(80).optional().describe("Label for the Replace button on photo preview"),
1750
+ removeButtonLabel: z4.string().max(80).optional().describe("Label for Remove controls across media modes"),
1751
+ stopRecordingButtonLabel: z4.string().max(80).optional().describe("Label for the Stop recording button while recording"),
1752
+ playButtonLabel: z4.string().max(80).optional().describe("Label for the Play button on recording preview"),
1753
+ pauseButtonLabel: z4.string().max(80).optional().describe("Label for the Pause button on recording preview"),
1754
+ uploadButtonLabel: z4.string().max(80).optional().describe("Label for the Upload button on recording preview"),
1755
+ rerecordButtonLabel: z4.string().max(80).optional().describe("Label for the Re-record button on recording preview"),
1756
+ dismissErrorButtonLabel: z4.string().max(80).optional().describe("Accessible label for dismiss on media upload error overlays")
1727
1757
  }).describe(
1728
1758
  "Schema for a video, audio, and photo question where respondents can record or upload media or enter a text answer"
1729
1759
  );
@@ -1995,6 +2025,14 @@ var PreviousButtonModes = {
1995
2025
  ALWAYS: "always",
1996
2026
  AUTO: "auto"
1997
2027
  };
2028
+ var inAppDisplayTypeSchema = z7.enum(["auto", "modal", "selector"]).describe(
2029
+ "How the form is presented on in-app surfaces: auto (#encatch host or modal), modal (always modal), or selector (render into inAppSelector)"
2030
+ );
2031
+ var InAppDisplayTypes = {
2032
+ AUTO: "auto",
2033
+ MODAL: "modal",
2034
+ SELECTOR: "selector"
2035
+ };
1998
2036
  var logoPlacementSchema = z7.enum(["top-left", "top-center", "top-right"]).describe("Where the logo is anchored in the form header");
1999
2037
  var logoSizeSchema = z7.enum(["small", "medium", "large"]).describe("Rendered display size of the logo within the 96\xD740 px container");
2000
2038
  var logoSurfaceOverrideSchema = z7.object({
@@ -2036,6 +2074,10 @@ var featureSettingsSchema = z7.object({
2036
2074
  rtl: z7.boolean().default(false).describe("Whether right-to-left text direction is enabled"),
2037
2075
  previousButton: previousButtonModeSchema.default(PreviousButtonModes.ALWAYS).describe("Previous button: never (hidden) or always (shown)"),
2038
2076
  maxDialogHeightPercentInApp: z7.number().int().min(10).max(100).optional().describe("Maximum height of the in-app dialog as a percentage of the viewport height (10\u2013100); when absent the dialog uses its default height"),
2077
+ inAppDisplayType: inAppDisplayTypeSchema.default(InAppDisplayTypes.AUTO).describe(
2078
+ "How the form is presented on in-app surfaces: auto (#encatch host or modal), modal (always modal), or selector (render into inAppSelector)"
2079
+ ),
2080
+ inAppSelector: z7.string().optional().describe("CSS selector for the host element to render the form into when inAppDisplayType is 'selector'; if it matches nothing the form falls back to the modal"),
2039
2081
  faviconUrl: z7.string().optional().describe("URL of a custom favicon image to display in the browser tab; when absent the platform default favicon is used"),
2040
2082
  logo: logoSchema.optional().describe("Optional form-level logo shown in the header on link/shareable surfaces; omit to show no logo")
2041
2083
  }).describe("Feature settings controlling widget UI behavior and appearance");
@@ -2686,6 +2728,7 @@ export {
2686
2728
  DeviceThemes,
2687
2729
  FileUploadAnswerItemSchema,
2688
2730
  FileUploadAnswerSchema,
2731
+ InAppDisplayTypes,
2689
2732
  LanguageFieldSchema,
2690
2733
  LanguagesSchema,
2691
2734
  LayoutAttachmentTypes,
@@ -2775,6 +2818,7 @@ export {
2775
2818
  formPropertiesSchema,
2776
2819
  gradientAttachmentSchema,
2777
2820
  imageAttachmentSchema,
2821
+ inAppDisplayTypeSchema,
2778
2822
  layoutAttachmentSchema,
2779
2823
  layoutSurfaceSchema,
2780
2824
  logicJumpRuleSchema,