treege 3.0.0-beta.95 → 3.0.0-beta.96

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/editor.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as e } from "./editor-BzhBNy8O.js";
2
- import { n as t, t as n } from "./ThemeContext-CDewydK5.js";
1
+ import { t as e } from "./editor-CSc1Ygb5.js";
2
+ import { n as t, t as n } from "./ThemeContext-B9-cptw0.js";
3
3
  export { n as ThemeProvider, e as TreegeEditor, t as useTheme };
package/dist/main.js CHANGED
@@ -1,6 +1,6 @@
1
- import { t as e } from "./editor-BzhBNy8O.js";
2
- import { $ as t, I as n, J as r, L as i, Q as a, X as o, Y as s, Z as c, _ as l, a as u, b as d, c as f, g as p, h as m, i as h, l as g, m as _, n as v, o as y, q as b, r as x, s as S, t as C, v as w, y as T } from "./ThemeContext-CDewydK5.js";
3
- import { C as E, L as D, S as O, _ as k, a as A, b as j, c as M, d as N, g as P, h as F, i as I, m as L, n as R, o as z, r as B, u as V, v as H, x as U, y as W } from "./DefaultSubmitButton-D4Hqyara.js";
4
- import { a as G, c as K, i as q, l as J, n as Y, o as X, r as Z, s as Q } from "./useRenderNode-BaBKq6Ed.js";
5
- import { a as $, c as ee, i as te, l as ne, n as re, o as ie, r as ae, s as oe, t as se } from "./renderer-Cd2P21x9.js";
6
- export { E as DefaultAddressInput, O as DefaultAutocompleteInput, U as DefaultCheckboxInput, j as DefaultDateInput, W as DefaultDateRangeInput, H as DefaultFileInput, k as DefaultHiddenInput, P as DefaultHttpInput, D as DefaultInputLabel, F as DefaultNumberInput, L as DefaultPasswordInput, N as DefaultRadioInput, V as DefaultSelectInput, M as DefaultSwitchInput, z as DefaultTextAreaInput, A as DefaultTextInput, I as DefaultTimeInput, B as DefaultTimeRangeInput, ie as Divider, C as ThemeProvider, oe as Title, e as TreegeEditor, $ as TreegeRenderer, K as TreegeRendererProvider, se as TreegeViewer, ne as TreegeViewerProvider, x as applyReferenceTransformation, h as buildInitialFormValues, u as calculateReferenceFieldUpdates, y as checkFormFieldHasValue, S as convertFormValuesToNamedFormat, R as defaultInputRenderers, ee as defaultUI, X as evaluateCondition, Q as evaluateConditions, _ as fileNameFromUrl, m as fileToSerializable, p as filesToSerializable, Z as findStartNode, l as formatFileSize, q as getFlowRenderState, b as getStaticTranslations, r as getTranslatableValue, s as getTranslatedText, re as getViewerFields, f as isFieldEmpty, c as isGroupNode, ae as isImageFile, a as isInputNode, w as isRemoteFileData, G as isStartNode, t as isUINode, T as normalizeSerializableFiles, g as resolveNodeDefaultValue, n as sanitize, i as sanitizeHttpResponse, d as serializableToFile, o as setTranslatableValue, v as useTheme, Y as useTreegeRenderer, J as useTreegeRendererConfig, te as viewerFieldsFromResponse };
1
+ import { t as e } from "./editor-CSc1Ygb5.js";
2
+ import { $ as t, J as n, L as r, Q as i, R as a, X as o, Y as s, Z as c, _ as l, a as u, b as d, c as f, et as p, g as m, h, i as g, l as _, n as v, o as y, r as b, s as x, t as S, u as C, v as w, x as T, y as E } from "./ThemeContext-B9-cptw0.js";
3
+ import { C as D, L as O, S as k, _ as A, a as j, b as M, c as N, d as P, g as F, h as I, i as L, m as R, n as z, o as B, r as V, u as H, v as U, x as W, y as G } from "./DefaultSubmitButton-CAOTg3w7.js";
4
+ import { a as K, c as q, i as J, l as Y, n as X, o as Z, r as Q, s as $ } from "./useRenderNode-C9RSQFX3.js";
5
+ import { a as ee, c as te, i as ne, l as re, n as ie, o as ae, r as oe, s as se, t as ce } from "./renderer-DX3WeZtk.js";
6
+ export { D as DefaultAddressInput, k as DefaultAutocompleteInput, W as DefaultCheckboxInput, M as DefaultDateInput, G as DefaultDateRangeInput, U as DefaultFileInput, A as DefaultHiddenInput, F as DefaultHttpInput, O as DefaultInputLabel, I as DefaultNumberInput, R as DefaultPasswordInput, P as DefaultRadioInput, H as DefaultSelectInput, N as DefaultSwitchInput, B as DefaultTextAreaInput, j as DefaultTextInput, L as DefaultTimeInput, V as DefaultTimeRangeInput, ae as Divider, S as ThemeProvider, se as Title, e as TreegeEditor, ee as TreegeRenderer, q as TreegeRendererProvider, ce as TreegeViewer, re as TreegeViewerProvider, b as applyReferenceTransformation, g as buildInitialFormValues, u as calculateReferenceFieldUpdates, y as checkFormFieldHasValue, x as convertFormValuesToNamedFormat, z as defaultInputRenderers, te as defaultUI, Z as evaluateCondition, $ as evaluateConditions, h as fileNameFromUrl, m as fileToSerializable, l as filesToSerializable, Q as findStartNode, w as formatFileSize, J as getFlowRenderState, n as getStaticTranslations, s as getTranslatableValue, o as getTranslatedText, ie as getViewerFields, f as isFieldEmpty, i as isGroupNode, oe as isImageFile, t as isInputNode, E as isRemoteFileData, K as isStartNode, p as isUINode, d as normalizeSerializableFiles, _ as resolveEmptyInputValue, C as resolveNodeDefaultValue, r as sanitize, a as sanitizeHttpResponse, T as serializableToFile, c as setTranslatableValue, v as useTheme, X as useTreegeRenderer, Y as useTreegeRendererConfig, ne as viewerFieldsFromResponse };
@@ -277,7 +277,7 @@ export type StepRenderProps = {
277
277
  label?: string;
278
278
  /**
279
279
  * When true, the step container should be rendered without its default
280
- * border (`disableSectionBorder` renderer prop). Web only.
280
+ * border and padding (`disableSectionBorder` renderer prop). Web only.
281
281
  */
282
282
  disableSectionBorder?: boolean;
283
283
  /** The rendered child nodes belonging to this step. */
@@ -419,8 +419,8 @@ export interface TreegeRendererProps extends TreegeRendererConfig {
419
419
  */
420
420
  className?: string;
421
421
  /**
422
- * Removes the default border of the `<section>` wrapping each step (padding
423
- * and layout are kept, only the border disappears). Web only.
422
+ * Removes the default border and padding of the `<section>` wrapping each
423
+ * step. Web only.
424
424
  *
425
425
  * @example
426
426
  * <TreegeRenderer flow={tree} disableSectionBorder />
@@ -1,5 +1,5 @@
1
1
  import { Node } from '@xyflow/react';
2
- import { FormValues } from '../types/renderer';
2
+ import { FormValues, InputValue } from '../types/renderer';
3
3
  import { InputNodeData } from '../../shared/types/node';
4
4
  /**
5
5
  * Check if a form field value is considered empty for validation purposes
@@ -8,6 +8,18 @@ import { InputNodeData } from '../../shared/types/node';
8
8
  * @returns True if the value is empty (undefined, null, empty string, or empty array)
9
9
  */
10
10
  export declare const isFieldEmpty: (value: unknown) => boolean;
11
+ /**
12
+ * Type-correct empty value for an input node, per `InputValueTypeMap`. Used at
13
+ * the render boundary (`useRenderNode`) when the field has no entry in
14
+ * `formValues` yet — an untouched field would otherwise surface as `undefined`,
15
+ * which both violates the declared `InputFieldProps.value` type and makes
16
+ * controlled DOM/Radix inputs mount as uncontrolled, then flip to controlled on
17
+ * the first edit (React warns).
18
+ *
19
+ * The store itself is left untouched: an untouched field stays absent from
20
+ * `formValues` and from the exported/submitted values.
21
+ */
22
+ export declare const resolveEmptyInputValue: (node: Node<InputNodeData>) => InputValue;
11
23
  /**
12
24
  * Check if a form field has been filled by the user (presence check)
13
25
  * Considers false, 0, and "" as valid filled values