treege 3.0.0-beta.72 → 3.0.0-beta.73

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-Dy_Ul5Mu.js";
2
- import { n as t, t as n } from "./ThemeContext-BGeTYtnw.js";
1
+ import { t as e } from "./editor-DLXwqtbI.js";
2
+ import { n as t, t as n } from "./ThemeContext-CmyrtNyt.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-Dy_Ul5Mu.js";
2
- import { A as t, B as n, I as r, L as i, R as a, a as o, c as s, g as c, h as l, i as u, k as d, l as f, m as p, n as m, o as h, r as g, s as _, t as v, z as y } from "./ThemeContext-BGeTYtnw.js";
3
- import { C as b, S as x, _ as S, a as C, b as w, c as T, d as E, g as D, h as O, i as k, m as A, n as j, o as M, r as N, u as P, v as F, x as I, y as L } from "./DefaultSubmitButton-C_141kVj.js";
4
- import { a as R, c as z, i as B, l as V, n as H, o as U, r as W, s as G } from "./useRenderNode-eqCek6JX.js";
5
- import { i as K, n as q, r as J, t as Y } from "./renderer-D5xQw7hp.js";
6
- export { b as DefaultAddressInput, x as DefaultAutocompleteInput, I as DefaultCheckboxInput, w as DefaultDateInput, L as DefaultDateRangeInput, F as DefaultFileInput, S as DefaultHiddenInput, D as DefaultHttpInput, O as DefaultNumberInput, A as DefaultPasswordInput, E as DefaultRadioInput, P as DefaultSelectInput, T as DefaultSwitchInput, M as DefaultTextAreaInput, C as DefaultTextInput, k as DefaultTimeInput, N as DefaultTimeRangeInput, q as Divider, v as ThemeProvider, J as Title, e as TreegeEditor, Y as TreegeRenderer, z as TreegeRendererProvider, g as applyReferenceTransformation, u as buildInitialFormValues, o as calculateReferenceFieldUpdates, h as checkFormFieldHasValue, _ as convertFormValuesToNamedFormat, j as defaultInputRenderers, K as defaultUI, U as evaluateCondition, G as evaluateConditions, p as fileToSerializable, l as filesToSerializable, W as findStartNode, B as getFlowRenderState, r as getStaticTranslations, i as getTranslatedText, s as isFieldEmpty, a as isGroupNode, y as isInputNode, R as isStartNode, n as isUINode, f as resolveNodeDefaultValue, d as sanitize, t as sanitizeHttpResponse, c as serializableToFile, m as useTheme, H as useTreegeRenderer, V as useTreegeRendererConfig };
1
+ import { t as e } from "./editor-DLXwqtbI.js";
2
+ import { A as t, B as n, L as r, R as i, V as a, a as o, c as s, g as c, h as l, i as u, j as d, l as f, m as p, n as m, o as h, r as g, s as _, t as v, z as y } from "./ThemeContext-CmyrtNyt.js";
3
+ import { C as b, S as x, _ as S, a as C, b as w, c as T, d as E, g as D, h as O, i as k, m as A, n as j, o as M, r as N, u as P, v as F, x as I, y as L } from "./DefaultSubmitButton-VU_Lwicd.js";
4
+ import { a as R, c as z, i as B, l as V, n as H, o as U, r as W, s as G } from "./useRenderNode-D1d8JGbe.js";
5
+ import { i as K, n as q, r as J, t as Y } from "./renderer-pYP47xsl.js";
6
+ export { b as DefaultAddressInput, x as DefaultAutocompleteInput, I as DefaultCheckboxInput, w as DefaultDateInput, L as DefaultDateRangeInput, F as DefaultFileInput, S as DefaultHiddenInput, D as DefaultHttpInput, O as DefaultNumberInput, A as DefaultPasswordInput, E as DefaultRadioInput, P as DefaultSelectInput, T as DefaultSwitchInput, M as DefaultTextAreaInput, C as DefaultTextInput, k as DefaultTimeInput, N as DefaultTimeRangeInput, q as Divider, v as ThemeProvider, J as Title, e as TreegeEditor, Y as TreegeRenderer, z as TreegeRendererProvider, g as applyReferenceTransformation, u as buildInitialFormValues, o as calculateReferenceFieldUpdates, h as checkFormFieldHasValue, _ as convertFormValuesToNamedFormat, j as defaultInputRenderers, K as defaultUI, U as evaluateCondition, G as evaluateConditions, p as fileToSerializable, l as filesToSerializable, W as findStartNode, B as getFlowRenderState, r as getStaticTranslations, i as getTranslatedText, s as isFieldEmpty, y as isGroupNode, n as isInputNode, R as isStartNode, a as isUINode, f as resolveNodeDefaultValue, t as sanitize, d as sanitizeHttpResponse, c as serializableToFile, m as useTheme, H as useTreegeRenderer, V as useTreegeRendererConfig };
@@ -34,6 +34,22 @@ export declare const appendQueryParams: (url: string, params?: QueryParams) => s
34
34
  * Expects the url to already have its template variables resolved.
35
35
  */
36
36
  export declare const resolveUrl: (url: string, baseUrl?: string) => string;
37
+ /**
38
+ * Parse a response body as JSON without throwing. Returns a discriminated
39
+ * result so callers can branch declaratively instead of wrapping a `let` in
40
+ * try/catch. A relative url resolved against the app origin (no baseUrl) or an
41
+ * auth redirect returns an HTML page, which `JSON.parse` would otherwise reject
42
+ * with a cryptic "Unexpected token '<'".
43
+ *
44
+ * @param text - The raw response body
45
+ * @returns `{ ok: true, value }` on success, `{ ok: false }` on parse failure
46
+ */
47
+ export declare const tryParseJson: (text: string) => {
48
+ ok: true;
49
+ value: unknown;
50
+ } | {
51
+ ok: false;
52
+ };
37
53
  /**
38
54
  * Result of an HTTP request
39
55
  */