@marktiderman/genesis-forms 0.6.0 → 0.8.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.
package/dist/index.d.cts CHANGED
@@ -1,68 +1,11 @@
1
- import { a as FieldBlock, J as Json, C as ContentBlock, P as PageBreakBlock, O as OptionsSource, F as FormDefinition, H as HiddenInput, b as FormLayout, L as LogicRule, E as Ending, c as FormSettings, d as Condition, B as Block } from './types-oAckGR_Z.cjs';
2
- export { e as FormEvent, f as Operand, g as Operator } from './types-oAckGR_Z.cjs';
3
- import { F as FormEngine, a as FormState } from './engine-DC4YTPdr.cjs';
4
- export { C as CreateFormOptions, c as createForm, i as isFormEvent, b as isJson, r as replay } from './engine-DC4YTPdr.cjs';
5
- import { F as FieldValidator } from './validate-B5WKHbst.cjs';
6
- export { A as AnswerSnapshot, C as CHOICE_FIELD_TYPES, a as ChoiceOption, b as FieldTypeManifest, H as HostOptions, L as LinkParams, M as MAX_PREFILL_PARAM_LENGTH, O as OPTION_LIMITS, c as OTHER_MAX_LENGTH, d as OptionSnapshot, P as PrefillSetting, e as PrefillState, R as REQUIRED_MESSAGE, f as RestoredAnswers, S as SEARCHABLE_OPTION_COUNT, g as StandardSchemaV1, h as answerSnapshots, i as answersFromSnapshots, j as answersOnPath, k as choiceOptions, l as clearFilteredAnswers, m as dateLimits, n as filteredChoiceError, o as getFieldType, p as hasOptionFilters, q as hiddenByPrefill, r as isEmptyValue, s as isHttpsUrl, t as isIsoDate, u as isOtherValue, v as isPrefillParam, w as isSearchable, x as isSensitive, y as listFieldTypes, z as normalizeValue, B as numberLimits, D as optionFilter, E as optionJson, G as optionMatches, I as optionsSource, J as otherOption, K as prefillFromLink, N as prefillSetting, Q as ratingDisplay, T as readOption, U as registerFieldType, V as respondentPath, W as scaleLabels, X as searchOptions, Y as summarizeValue, Z as validateField, _ as visibleOptions, $ as withHostOptions } from './validate-B5WKHbst.cjs';
7
-
8
- /**
9
- * The `photo` field type: a respondent attaches up to a few photos, such as a
10
- * picture of broken equipment. The answer holds references the host's storage
11
- * handed back (`PhotoRef`), never the bytes: the renderer uploads through the
12
- * host (`onUpload` on genesis-forms-web's `Form`), so the engine and the
13
- * server stay storage-agnostic. A host's server should check that each
14
- * reference is a file it stored for this respondent before saving.
15
- *
16
- * Opt-in in a builder palette (`UPLOAD_FIELD_TYPES`), since a host must be
17
- * able to store the files.
18
- */
19
- declare const PHOTO_TYPE = "photo";
20
- /** Field types that need the host to store files; a builder offers them only when the host names them. */
21
- declare const UPLOAD_FIELD_TYPES: readonly ["photo"];
22
- /** One stored photo, as the host's upload returned it. */
23
- type PhotoRef = {
24
- /** The host's id for the stored file. */
25
- id: string;
26
- /** The file's name on the respondent's device. */
27
- name: string;
28
- /** Its MIME type, such as `image/jpeg`. */
29
- type: string;
30
- /** Bytes. */
31
- size: number;
32
- };
33
- type PhotoFormat = "jpeg" | "png" | "heic" | "webp";
34
- /** The MIME types each format covers. */
35
- declare const PHOTO_FORMATS: Record<PhotoFormat, readonly string[]>;
36
- declare const DEFAULT_PHOTO_FILES = 3;
37
- declare const MAX_PHOTO_FILES = 5;
38
- declare const DEFAULT_PHOTO_SIZE_MB = 10;
39
- declare const MAX_PHOTO_SIZE_MB = 25;
40
- /** The longest reference id and file name a photo answer may carry. */
41
- declare const MAX_PHOTO_ID_LENGTH = 200;
42
- declare const MAX_PHOTO_NAME_LENGTH = 255;
43
- declare const isPhotoFormat: (v: unknown) => v is PhotoFormat;
44
- interface PhotoLimits {
45
- maxFiles: number;
46
- maxSizeMb: number;
47
- maxBytes: number;
48
- formats: PhotoFormat[];
49
- /** Every MIME type the formats cover. */
50
- mimeTypes: string[];
51
- }
52
- /** A photo field's limits; a prop that is missing or out of range uses its default. */
53
- declare function photoLimits(field: FieldBlock): PhotoLimits;
54
- /** Whether `v` has a photo reference's shape (any type and size). */
55
- declare function isPhotoRef(v: unknown): v is PhotoRef;
56
- /** The well-formed references in a photo answer, as `{ id, name, type, size }` only. */
57
- declare function photoRefs(value: Json | undefined): PhotoRef[];
58
- /** "JPEG, PNG or WebP". */
59
- declare function photoFormatList(formats: readonly PhotoFormat[]): string;
60
- /** The message for a file of a type the field doesn't take. */
61
- declare const photoTypeMessage: (field: FieldBlock) => string;
62
- /** The message for a file over the field's size limit. */
63
- declare const photoSizeMessage: (field: FieldBlock) => string;
64
- /** The message for more photos than the field takes. */
65
- declare const photoCountMessage: (field: FieldBlock) => string;
1
+ import { a as FieldBlock, b as ContentBlock, P as PageBreakBlock, O as OptionsSource, F as FormDefinition, H as HiddenInput, c as FormLayout, L as LogicRule, E as Ending, d as FormSettings, J as Json, C as Condition, B as Block } from './types-jqDKcmP4.cjs';
2
+ export { e as FormEvent, f as Operand, g as Operator } from './types-jqDKcmP4.cjs';
3
+ import { P as PhotoFormat, a as PhotoRef } from './upload-protocol-BOe018kL.cjs';
4
+ export { D as DEFAULT_PHOTO_FILES, b as DEFAULT_PHOTO_SIZE_MB, M as MAX_PHOTO_FILES, c as MAX_PHOTO_ID_LENGTH, d as MAX_PHOTO_NAME_LENGTH, e as MAX_PHOTO_SIZE_MB, f as MAX_UPLOAD_REQUEST_BYTES, g as PHOTO_FORMATS, h as PHOTO_TYPE, i as PhotoLimits, S as SignedUpload, U as UPLOAD_FIELD_TYPES, j as UploadGrant, k as UploadRefusal, l as UploadRequest, m as isPhotoFormat, n as isPhotoRef, p as photoCountMessage, o as photoFormatList, q as photoLimits, r as photoRefs, s as photoSizeMessage, t as photoTypeMessage } from './upload-protocol-BOe018kL.cjs';
5
+ import { F as FormEngine, a as FormState } from './engine-Bj23YJlB.cjs';
6
+ export { C as CreateFormOptions, c as createForm, i as isFormEvent, b as isJson, r as replay } from './engine-Bj23YJlB.cjs';
7
+ import { F as FieldValidator } from './validate-irIPubxc.cjs';
8
+ export { A as AnswerSnapshot, C as CHOICE_FIELD_TYPES, a as ChoiceOption, b as FieldTypeManifest, H as HostOptions, L as LinkParams, M as MAX_PREFILL_PARAM_LENGTH, O as OPTION_LIMITS, c as OTHER_MAX_LENGTH, d as OptionSnapshot, P as PrefillSetting, e as PrefillState, R as REQUIRED_MESSAGE, f as RestoredAnswers, S as SEARCHABLE_OPTION_COUNT, g as StandardSchemaV1, h as answerSnapshots, i as answersFromSnapshots, j as answersOnPath, k as choiceOptions, l as clearFilteredAnswers, m as dateLimits, n as filteredChoiceError, o as getFieldType, p as hasOptionFilters, q as hiddenByPrefill, r as isEmptyValue, s as isHttpsUrl, t as isIsoDate, u as isOtherValue, v as isPrefillParam, w as isSearchable, x as isSensitive, y as listFieldTypes, z as normalizeValue, B as numberLimits, D as optionFilter, E as optionJson, G as optionMatches, I as optionsSource, J as otherOption, K as prefillFromLink, N as prefillSetting, Q as ratingDisplay, T as readOption, U as registerFieldType, V as respondentPath, W as scaleLabels, X as searchOptions, Y as summarizeValue, Z as validateField, _ as visibleOptions, $ as withHostOptions } from './validate-irIPubxc.cjs';
66
9
 
67
10
  /** A field block that remembers its key and value type, for answer inference. */
68
11
  type FieldSpec<K extends string = string, V = unknown> = FieldBlock & {
@@ -743,4 +686,4 @@ declare function describeCondition(condition: Condition, def: FormDefinition, fi
743
686
  */
744
687
  declare function carryAnswers(from: FormDefinition, to: FormDefinition, answers: Record<string, Json>, extra?: Record<string, Json | null | undefined>): Record<string, Json>;
745
688
 
746
- export { type AnswersOf, Block, CALCULATED_TYPE, COMPUTED_FIELD_TYPES, type CalculatedFormat, type CalculatedProps, type ChoiceFieldOptions, type CoerceHiddenOptions, type CoercedHidden, Condition, ContentBlock, DEFAULT_PHOTO_FILES, DEFAULT_PHOTO_SIZE_MB, Ending, type ExplainInput, type ExplainOptions, type Explanation, FORMULA_FUNCTIONS, FieldBlock, type FieldOptions, type FieldSpec, type FieldValidation, FieldValidator, type Form, FormDefinition, FormEngine, type FormInput, type FormIssue, FormLayout, type FormProgress, FormSettings, FormState, type FormulaFunction, type FormulaNode, type FormulaParseResult, type FormulaReader, type FormulaRef, type FormulaValue, HIGHLIGHT_NOTE_MESSAGE, HiddenInput, type Highlight, Json, type JumpTrace, type KeyResolver, LogicRule, MAX_CALCULATED_DECIMALS, MAX_FORMULA_ITEMS, MAX_FORMULA_LENGTH, MAX_FORM_FORMULA_LENGTH, MAX_HIDDEN_STRING_LENGTH, MAX_HIGHLIGHT_NOTE_LENGTH, MAX_HIGHLIGHT_QUOTE_LENGTH, MAX_PHOTO_FILES, MAX_PHOTO_ID_LENGTH, MAX_PHOTO_NAME_LENGTH, MAX_PHOTO_SIZE_MB, MAX_SETTLE_ITEMS, MAX_TABLE_CELL_LENGTH, MAX_TABLE_COLUMNS, MAX_TIMESTAMP_SECONDS, type MediaNote, OptionsSource, PHOTO_FORMATS, PHOTO_TYPE, PageBreakBlock, type ParseResult, type PathResult, type PhotoFormat, type PhotoLimits, type PhotoRef, type RuleSpec, type RuleTrace, STRUCTURED_FIELD_TYPES, type TableColumn, UPLOAD_FIELD_TYPES, calculatedProps, calculatedValue, canonicalJson, carryAnswers, coerceHidden, coerceHiddenValue, computePath, defineForm, describeCondition, evaluate, evaluateFormula, explain, f, fingerprint, formProgress, formatCalculated, formatTimestamp, formulaInput, formulaNumber, formulaRefs, furthestReached, isPhotoFormat, isPhotoRef, listLimits, parseForm, parseFormula, parseTimestamp, photoCountMessage, photoFormatList, photoLimits, photoRefs, photoSizeMessage, photoTypeMessage, recall, renameFormulaKey, ruleVisible, steps, tableColumns, tableLimits, when };
689
+ export { type AnswersOf, Block, CALCULATED_TYPE, COMPUTED_FIELD_TYPES, type CalculatedFormat, type CalculatedProps, type ChoiceFieldOptions, type CoerceHiddenOptions, type CoercedHidden, Condition, ContentBlock, Ending, type ExplainInput, type ExplainOptions, type Explanation, FORMULA_FUNCTIONS, FieldBlock, type FieldOptions, type FieldSpec, type FieldValidation, FieldValidator, type Form, FormDefinition, FormEngine, type FormInput, type FormIssue, FormLayout, type FormProgress, FormSettings, FormState, type FormulaFunction, type FormulaNode, type FormulaParseResult, type FormulaReader, type FormulaRef, type FormulaValue, HIGHLIGHT_NOTE_MESSAGE, HiddenInput, type Highlight, Json, type JumpTrace, type KeyResolver, LogicRule, MAX_CALCULATED_DECIMALS, MAX_FORMULA_ITEMS, MAX_FORMULA_LENGTH, MAX_FORM_FORMULA_LENGTH, MAX_HIDDEN_STRING_LENGTH, MAX_HIGHLIGHT_NOTE_LENGTH, MAX_HIGHLIGHT_QUOTE_LENGTH, MAX_SETTLE_ITEMS, MAX_TABLE_CELL_LENGTH, MAX_TABLE_COLUMNS, MAX_TIMESTAMP_SECONDS, type MediaNote, OptionsSource, PageBreakBlock, type ParseResult, type PathResult, PhotoFormat, PhotoRef, type RuleSpec, type RuleTrace, STRUCTURED_FIELD_TYPES, type TableColumn, calculatedProps, calculatedValue, canonicalJson, carryAnswers, coerceHidden, coerceHiddenValue, computePath, defineForm, describeCondition, evaluate, evaluateFormula, explain, f, fingerprint, formProgress, formatCalculated, formatTimestamp, formulaInput, formulaNumber, formulaRefs, furthestReached, listLimits, parseForm, parseFormula, parseTimestamp, recall, renameFormulaKey, ruleVisible, steps, tableColumns, tableLimits, when };
package/dist/index.d.ts CHANGED
@@ -1,68 +1,11 @@
1
- import { a as FieldBlock, J as Json, C as ContentBlock, P as PageBreakBlock, O as OptionsSource, F as FormDefinition, H as HiddenInput, b as FormLayout, L as LogicRule, E as Ending, c as FormSettings, d as Condition, B as Block } from './types-oAckGR_Z.js';
2
- export { e as FormEvent, f as Operand, g as Operator } from './types-oAckGR_Z.js';
3
- import { F as FormEngine, a as FormState } from './engine-CpfOz8FN.js';
4
- export { C as CreateFormOptions, c as createForm, i as isFormEvent, b as isJson, r as replay } from './engine-CpfOz8FN.js';
5
- import { F as FieldValidator } from './validate-GpTXPwyl.js';
6
- export { A as AnswerSnapshot, C as CHOICE_FIELD_TYPES, a as ChoiceOption, b as FieldTypeManifest, H as HostOptions, L as LinkParams, M as MAX_PREFILL_PARAM_LENGTH, O as OPTION_LIMITS, c as OTHER_MAX_LENGTH, d as OptionSnapshot, P as PrefillSetting, e as PrefillState, R as REQUIRED_MESSAGE, f as RestoredAnswers, S as SEARCHABLE_OPTION_COUNT, g as StandardSchemaV1, h as answerSnapshots, i as answersFromSnapshots, j as answersOnPath, k as choiceOptions, l as clearFilteredAnswers, m as dateLimits, n as filteredChoiceError, o as getFieldType, p as hasOptionFilters, q as hiddenByPrefill, r as isEmptyValue, s as isHttpsUrl, t as isIsoDate, u as isOtherValue, v as isPrefillParam, w as isSearchable, x as isSensitive, y as listFieldTypes, z as normalizeValue, B as numberLimits, D as optionFilter, E as optionJson, G as optionMatches, I as optionsSource, J as otherOption, K as prefillFromLink, N as prefillSetting, Q as ratingDisplay, T as readOption, U as registerFieldType, V as respondentPath, W as scaleLabels, X as searchOptions, Y as summarizeValue, Z as validateField, _ as visibleOptions, $ as withHostOptions } from './validate-GpTXPwyl.js';
7
-
8
- /**
9
- * The `photo` field type: a respondent attaches up to a few photos, such as a
10
- * picture of broken equipment. The answer holds references the host's storage
11
- * handed back (`PhotoRef`), never the bytes: the renderer uploads through the
12
- * host (`onUpload` on genesis-forms-web's `Form`), so the engine and the
13
- * server stay storage-agnostic. A host's server should check that each
14
- * reference is a file it stored for this respondent before saving.
15
- *
16
- * Opt-in in a builder palette (`UPLOAD_FIELD_TYPES`), since a host must be
17
- * able to store the files.
18
- */
19
- declare const PHOTO_TYPE = "photo";
20
- /** Field types that need the host to store files; a builder offers them only when the host names them. */
21
- declare const UPLOAD_FIELD_TYPES: readonly ["photo"];
22
- /** One stored photo, as the host's upload returned it. */
23
- type PhotoRef = {
24
- /** The host's id for the stored file. */
25
- id: string;
26
- /** The file's name on the respondent's device. */
27
- name: string;
28
- /** Its MIME type, such as `image/jpeg`. */
29
- type: string;
30
- /** Bytes. */
31
- size: number;
32
- };
33
- type PhotoFormat = "jpeg" | "png" | "heic" | "webp";
34
- /** The MIME types each format covers. */
35
- declare const PHOTO_FORMATS: Record<PhotoFormat, readonly string[]>;
36
- declare const DEFAULT_PHOTO_FILES = 3;
37
- declare const MAX_PHOTO_FILES = 5;
38
- declare const DEFAULT_PHOTO_SIZE_MB = 10;
39
- declare const MAX_PHOTO_SIZE_MB = 25;
40
- /** The longest reference id and file name a photo answer may carry. */
41
- declare const MAX_PHOTO_ID_LENGTH = 200;
42
- declare const MAX_PHOTO_NAME_LENGTH = 255;
43
- declare const isPhotoFormat: (v: unknown) => v is PhotoFormat;
44
- interface PhotoLimits {
45
- maxFiles: number;
46
- maxSizeMb: number;
47
- maxBytes: number;
48
- formats: PhotoFormat[];
49
- /** Every MIME type the formats cover. */
50
- mimeTypes: string[];
51
- }
52
- /** A photo field's limits; a prop that is missing or out of range uses its default. */
53
- declare function photoLimits(field: FieldBlock): PhotoLimits;
54
- /** Whether `v` has a photo reference's shape (any type and size). */
55
- declare function isPhotoRef(v: unknown): v is PhotoRef;
56
- /** The well-formed references in a photo answer, as `{ id, name, type, size }` only. */
57
- declare function photoRefs(value: Json | undefined): PhotoRef[];
58
- /** "JPEG, PNG or WebP". */
59
- declare function photoFormatList(formats: readonly PhotoFormat[]): string;
60
- /** The message for a file of a type the field doesn't take. */
61
- declare const photoTypeMessage: (field: FieldBlock) => string;
62
- /** The message for a file over the field's size limit. */
63
- declare const photoSizeMessage: (field: FieldBlock) => string;
64
- /** The message for more photos than the field takes. */
65
- declare const photoCountMessage: (field: FieldBlock) => string;
1
+ import { a as FieldBlock, b as ContentBlock, P as PageBreakBlock, O as OptionsSource, F as FormDefinition, H as HiddenInput, c as FormLayout, L as LogicRule, E as Ending, d as FormSettings, J as Json, C as Condition, B as Block } from './types-jqDKcmP4.js';
2
+ export { e as FormEvent, f as Operand, g as Operator } from './types-jqDKcmP4.js';
3
+ import { P as PhotoFormat, a as PhotoRef } from './upload-protocol-BUO74WkS.js';
4
+ export { D as DEFAULT_PHOTO_FILES, b as DEFAULT_PHOTO_SIZE_MB, M as MAX_PHOTO_FILES, c as MAX_PHOTO_ID_LENGTH, d as MAX_PHOTO_NAME_LENGTH, e as MAX_PHOTO_SIZE_MB, f as MAX_UPLOAD_REQUEST_BYTES, g as PHOTO_FORMATS, h as PHOTO_TYPE, i as PhotoLimits, S as SignedUpload, U as UPLOAD_FIELD_TYPES, j as UploadGrant, k as UploadRefusal, l as UploadRequest, m as isPhotoFormat, n as isPhotoRef, p as photoCountMessage, o as photoFormatList, q as photoLimits, r as photoRefs, s as photoSizeMessage, t as photoTypeMessage } from './upload-protocol-BUO74WkS.js';
5
+ import { F as FormEngine, a as FormState } from './engine-CzinTJph.js';
6
+ export { C as CreateFormOptions, c as createForm, i as isFormEvent, b as isJson, r as replay } from './engine-CzinTJph.js';
7
+ import { F as FieldValidator } from './validate-DvfQHYnu.js';
8
+ export { A as AnswerSnapshot, C as CHOICE_FIELD_TYPES, a as ChoiceOption, b as FieldTypeManifest, H as HostOptions, L as LinkParams, M as MAX_PREFILL_PARAM_LENGTH, O as OPTION_LIMITS, c as OTHER_MAX_LENGTH, d as OptionSnapshot, P as PrefillSetting, e as PrefillState, R as REQUIRED_MESSAGE, f as RestoredAnswers, S as SEARCHABLE_OPTION_COUNT, g as StandardSchemaV1, h as answerSnapshots, i as answersFromSnapshots, j as answersOnPath, k as choiceOptions, l as clearFilteredAnswers, m as dateLimits, n as filteredChoiceError, o as getFieldType, p as hasOptionFilters, q as hiddenByPrefill, r as isEmptyValue, s as isHttpsUrl, t as isIsoDate, u as isOtherValue, v as isPrefillParam, w as isSearchable, x as isSensitive, y as listFieldTypes, z as normalizeValue, B as numberLimits, D as optionFilter, E as optionJson, G as optionMatches, I as optionsSource, J as otherOption, K as prefillFromLink, N as prefillSetting, Q as ratingDisplay, T as readOption, U as registerFieldType, V as respondentPath, W as scaleLabels, X as searchOptions, Y as summarizeValue, Z as validateField, _ as visibleOptions, $ as withHostOptions } from './validate-DvfQHYnu.js';
66
9
 
67
10
  /** A field block that remembers its key and value type, for answer inference. */
68
11
  type FieldSpec<K extends string = string, V = unknown> = FieldBlock & {
@@ -743,4 +686,4 @@ declare function describeCondition(condition: Condition, def: FormDefinition, fi
743
686
  */
744
687
  declare function carryAnswers(from: FormDefinition, to: FormDefinition, answers: Record<string, Json>, extra?: Record<string, Json | null | undefined>): Record<string, Json>;
745
688
 
746
- export { type AnswersOf, Block, CALCULATED_TYPE, COMPUTED_FIELD_TYPES, type CalculatedFormat, type CalculatedProps, type ChoiceFieldOptions, type CoerceHiddenOptions, type CoercedHidden, Condition, ContentBlock, DEFAULT_PHOTO_FILES, DEFAULT_PHOTO_SIZE_MB, Ending, type ExplainInput, type ExplainOptions, type Explanation, FORMULA_FUNCTIONS, FieldBlock, type FieldOptions, type FieldSpec, type FieldValidation, FieldValidator, type Form, FormDefinition, FormEngine, type FormInput, type FormIssue, FormLayout, type FormProgress, FormSettings, FormState, type FormulaFunction, type FormulaNode, type FormulaParseResult, type FormulaReader, type FormulaRef, type FormulaValue, HIGHLIGHT_NOTE_MESSAGE, HiddenInput, type Highlight, Json, type JumpTrace, type KeyResolver, LogicRule, MAX_CALCULATED_DECIMALS, MAX_FORMULA_ITEMS, MAX_FORMULA_LENGTH, MAX_FORM_FORMULA_LENGTH, MAX_HIDDEN_STRING_LENGTH, MAX_HIGHLIGHT_NOTE_LENGTH, MAX_HIGHLIGHT_QUOTE_LENGTH, MAX_PHOTO_FILES, MAX_PHOTO_ID_LENGTH, MAX_PHOTO_NAME_LENGTH, MAX_PHOTO_SIZE_MB, MAX_SETTLE_ITEMS, MAX_TABLE_CELL_LENGTH, MAX_TABLE_COLUMNS, MAX_TIMESTAMP_SECONDS, type MediaNote, OptionsSource, PHOTO_FORMATS, PHOTO_TYPE, PageBreakBlock, type ParseResult, type PathResult, type PhotoFormat, type PhotoLimits, type PhotoRef, type RuleSpec, type RuleTrace, STRUCTURED_FIELD_TYPES, type TableColumn, UPLOAD_FIELD_TYPES, calculatedProps, calculatedValue, canonicalJson, carryAnswers, coerceHidden, coerceHiddenValue, computePath, defineForm, describeCondition, evaluate, evaluateFormula, explain, f, fingerprint, formProgress, formatCalculated, formatTimestamp, formulaInput, formulaNumber, formulaRefs, furthestReached, isPhotoFormat, isPhotoRef, listLimits, parseForm, parseFormula, parseTimestamp, photoCountMessage, photoFormatList, photoLimits, photoRefs, photoSizeMessage, photoTypeMessage, recall, renameFormulaKey, ruleVisible, steps, tableColumns, tableLimits, when };
689
+ export { type AnswersOf, Block, CALCULATED_TYPE, COMPUTED_FIELD_TYPES, type CalculatedFormat, type CalculatedProps, type ChoiceFieldOptions, type CoerceHiddenOptions, type CoercedHidden, Condition, ContentBlock, Ending, type ExplainInput, type ExplainOptions, type Explanation, FORMULA_FUNCTIONS, FieldBlock, type FieldOptions, type FieldSpec, type FieldValidation, FieldValidator, type Form, FormDefinition, FormEngine, type FormInput, type FormIssue, FormLayout, type FormProgress, FormSettings, FormState, type FormulaFunction, type FormulaNode, type FormulaParseResult, type FormulaReader, type FormulaRef, type FormulaValue, HIGHLIGHT_NOTE_MESSAGE, HiddenInput, type Highlight, Json, type JumpTrace, type KeyResolver, LogicRule, MAX_CALCULATED_DECIMALS, MAX_FORMULA_ITEMS, MAX_FORMULA_LENGTH, MAX_FORM_FORMULA_LENGTH, MAX_HIDDEN_STRING_LENGTH, MAX_HIGHLIGHT_NOTE_LENGTH, MAX_HIGHLIGHT_QUOTE_LENGTH, MAX_SETTLE_ITEMS, MAX_TABLE_CELL_LENGTH, MAX_TABLE_COLUMNS, MAX_TIMESTAMP_SECONDS, type MediaNote, OptionsSource, PageBreakBlock, type ParseResult, type PathResult, PhotoFormat, PhotoRef, type RuleSpec, type RuleTrace, STRUCTURED_FIELD_TYPES, type TableColumn, calculatedProps, calculatedValue, canonicalJson, carryAnswers, coerceHidden, coerceHiddenValue, computePath, defineForm, describeCondition, evaluate, evaluateFormula, explain, f, fingerprint, formProgress, formatCalculated, formatTimestamp, formulaInput, formulaNumber, formulaRefs, furthestReached, listLimits, parseForm, parseFormula, parseTimestamp, recall, renameFormulaKey, ruleVisible, steps, tableColumns, tableLimits, when };
package/dist/index.js CHANGED
@@ -2906,6 +2906,9 @@ function formProgress(engine) {
2906
2906
  return { step: index + 1, total: state.path.length, fieldId };
2907
2907
  }
2908
2908
 
2909
+ // src/upload-protocol.ts
2910
+ var MAX_UPLOAD_REQUEST_BYTES = 4e3;
2911
+
2909
2912
  // src/explain.ts
2910
2913
  function explain(source, blockId, options = {}) {
2911
2914
  const input = "getState" in source ? { definition: source.definition, values: source.getState().values, hidden: source.getState().hidden } : source;
@@ -3058,6 +3061,6 @@ function carryAnswers(from, to, answers, extra = {}) {
3058
3061
  return out;
3059
3062
  }
3060
3063
 
3061
- export { CALCULATED_TYPE, CHOICE_FIELD_TYPES, COMPUTED_FIELD_TYPES, DEFAULT_PHOTO_FILES, DEFAULT_PHOTO_SIZE_MB, FORMULA_FUNCTIONS, HIGHLIGHT_NOTE_MESSAGE, MAX_CALCULATED_DECIMALS, MAX_FORMULA_ITEMS, MAX_FORMULA_LENGTH, MAX_FORM_FORMULA_LENGTH, MAX_HIDDEN_STRING_LENGTH, MAX_HIGHLIGHT_NOTE_LENGTH, MAX_HIGHLIGHT_QUOTE_LENGTH, MAX_PHOTO_FILES, MAX_PHOTO_ID_LENGTH, MAX_PHOTO_NAME_LENGTH, MAX_PHOTO_SIZE_MB, MAX_PREFILL_PARAM_LENGTH, MAX_SETTLE_ITEMS, MAX_TABLE_CELL_LENGTH, MAX_TABLE_COLUMNS, MAX_TIMESTAMP_SECONDS, OPTION_LIMITS, OTHER_MAX_LENGTH, PHOTO_FORMATS, PHOTO_TYPE, REQUIRED_MESSAGE, SEARCHABLE_OPTION_COUNT, STRUCTURED_FIELD_TYPES, UPLOAD_FIELD_TYPES, answerSnapshots, answersFromSnapshots, answersOnPath, calculatedProps, calculatedValue, canonicalJson, carryAnswers, choiceOptions, clearFilteredAnswers, coerceHidden, coerceHiddenValue, computePath, createForm, dateLimits, defineForm, describeCondition, evaluate, evaluateFormula, explain, f, filteredChoiceError, fingerprint, formProgress, formatCalculated, formatTimestamp, formulaInput, formulaNumber, formulaRefs, furthestReached, getFieldType, hasOptionFilters, hiddenByPrefill, isEmptyValue, isFormEvent, isHttpsUrl, isIsoDate, isJson, isOtherValue, isPhotoFormat, isPhotoRef, isPrefillParam, isSearchable, isSensitive, listFieldTypes, listLimits, normalizeValue, numberLimits, optionFilter, optionJson, optionMatches, optionsSource, otherOption, parseForm, parseFormula, parseTimestamp, photoCountMessage, photoFormatList, photoLimits, photoRefs, photoSizeMessage, photoTypeMessage, prefillFromLink, prefillSetting, ratingDisplay, readOption, recall, registerFieldType, renameFormulaKey, replay, respondentPath, ruleVisible, scaleLabels, searchOptions, steps, summarizeValue, tableColumns, tableLimits, validateField, visibleOptions, when, withHostOptions };
3064
+ export { CALCULATED_TYPE, CHOICE_FIELD_TYPES, COMPUTED_FIELD_TYPES, DEFAULT_PHOTO_FILES, DEFAULT_PHOTO_SIZE_MB, FORMULA_FUNCTIONS, HIGHLIGHT_NOTE_MESSAGE, MAX_CALCULATED_DECIMALS, MAX_FORMULA_ITEMS, MAX_FORMULA_LENGTH, MAX_FORM_FORMULA_LENGTH, MAX_HIDDEN_STRING_LENGTH, MAX_HIGHLIGHT_NOTE_LENGTH, MAX_HIGHLIGHT_QUOTE_LENGTH, MAX_PHOTO_FILES, MAX_PHOTO_ID_LENGTH, MAX_PHOTO_NAME_LENGTH, MAX_PHOTO_SIZE_MB, MAX_PREFILL_PARAM_LENGTH, MAX_SETTLE_ITEMS, MAX_TABLE_CELL_LENGTH, MAX_TABLE_COLUMNS, MAX_TIMESTAMP_SECONDS, MAX_UPLOAD_REQUEST_BYTES, OPTION_LIMITS, OTHER_MAX_LENGTH, PHOTO_FORMATS, PHOTO_TYPE, REQUIRED_MESSAGE, SEARCHABLE_OPTION_COUNT, STRUCTURED_FIELD_TYPES, UPLOAD_FIELD_TYPES, answerSnapshots, answersFromSnapshots, answersOnPath, calculatedProps, calculatedValue, canonicalJson, carryAnswers, choiceOptions, clearFilteredAnswers, coerceHidden, coerceHiddenValue, computePath, createForm, dateLimits, defineForm, describeCondition, evaluate, evaluateFormula, explain, f, filteredChoiceError, fingerprint, formProgress, formatCalculated, formatTimestamp, formulaInput, formulaNumber, formulaRefs, furthestReached, getFieldType, hasOptionFilters, hiddenByPrefill, isEmptyValue, isFormEvent, isHttpsUrl, isIsoDate, isJson, isOtherValue, isPhotoFormat, isPhotoRef, isPrefillParam, isSearchable, isSensitive, listFieldTypes, listLimits, normalizeValue, numberLimits, optionFilter, optionJson, optionMatches, optionsSource, otherOption, parseForm, parseFormula, parseTimestamp, photoCountMessage, photoFormatList, photoLimits, photoRefs, photoSizeMessage, photoTypeMessage, prefillFromLink, prefillSetting, ratingDisplay, readOption, recall, registerFieldType, renameFormulaKey, replay, respondentPath, ruleVisible, scaleLabels, searchOptions, steps, summarizeValue, tableColumns, tableLimits, validateField, visibleOptions, when, withHostOptions };
3062
3065
  //# sourceMappingURL=index.js.map
3063
3066
  //# sourceMappingURL=index.js.map