@ea-lab/reactive-json 2.2.0 → 2.3.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.
@@ -1,116 +1,116 @@
1
- import { jsx as p, jsxs as H, Fragment as st } from "react/jsx-runtime";
2
- import { a as G } from "../index-BUPRVmV-.js";
3
- import { useRef as K, useState as Q, useEffect as N, useMemo as it } from "react";
4
- import { r as ct } from "../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
5
- import { coreComponentsPlugin as X } from "../coreComponentsPlugin.js";
6
- import { mergeComponentCollections as lt } from "./ComponentCollector.js";
7
- import { DataStore as pt } from "./DataStore.js";
8
- import { EventDispatcherProvider as dt } from "./EventDispatcherProvider.js";
9
- import { GlobalDataContext as ut } from "./GlobalDataContext.js";
10
- import mt from "./ParsingDebugDisplay/ParsingDebugDisplay.js";
11
- import { StoreContext as ft } from "./StoreContext.js";
12
- import { TemplateContext as gt } from "./TemplateContext.js";
13
- import { dataLocationToPath as ht } from "./TemplateSystem.js";
14
- import { useReactiveData as Pt } from "./hook/useReactiveData.js";
15
- import { alterData as yt } from "./utility/alterData.js";
16
- import { applyDataMapping as Dt } from "./utility/dataMappingSystem.js";
17
- import { parseRjBuild as wt } from "./utility/parseRjBuild.js";
18
- import { interpolateSegments as bt } from "./utility/interpolateSegments.js";
19
- import { stringToBoolean as Ct } from "./utility/stringToBoolean.js";
20
- import { View as St } from "./View.js";
21
- const vt = ({ Wrapper: m }) => {
22
- const E = Pt("");
23
- return /* @__PURE__ */ p(m, { children: JSON.stringify(E, null, " ") });
24
- }, xt = ({
25
- dataOverride: m,
26
- dataFetchMethod: E,
27
- dataUrl: L,
28
- debugMode: Y,
29
- DebugModeContentWrapper: O,
1
+ import { jsx as u, jsxs as Y, Fragment as lt } from "react/jsx-runtime";
2
+ import { a as L } from "../index-BUPRVmV-.js";
3
+ import { useRef as Z, useState as U, useEffect as N, useMemo as pt } from "react";
4
+ import { r as dt } from "../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
5
+ import { coreComponentsPlugin as F } from "../coreComponentsPlugin.js";
6
+ import { mergeComponentCollections as ut } from "./ComponentCollector.js";
7
+ import { DataStore as mt } from "./DataStore.js";
8
+ import { EventDispatcherProvider as ft } from "./EventDispatcherProvider.js";
9
+ import { GlobalDataContext as gt } from "./GlobalDataContext.js";
10
+ import ht from "./ParsingDebugDisplay/ParsingDebugDisplay.js";
11
+ import { StoreContext as yt } from "./StoreContext.js";
12
+ import { TemplateContext as Pt } from "./TemplateContext.js";
13
+ import { dataLocationToPath as Dt } from "./TemplateSystem.js";
14
+ import { useReactiveData as wt } from "./hook/useReactiveData.js";
15
+ import { alterData as bt } from "./utility/alterData.js";
16
+ import { applyDataMapping as St } from "./utility/dataMappingSystem.js";
17
+ import { parseRjBuild as Ct } from "./utility/parseRjBuild.js";
18
+ import { interpolateSegments as vt } from "./utility/interpolateSegments.js";
19
+ import { stringToBoolean as Et } from "./utility/stringToBoolean.js";
20
+ import { View as xt } from "./View.js";
21
+ const kt = ({ Wrapper: g }) => {
22
+ const T = wt("");
23
+ return /* @__PURE__ */ u(g, { children: JSON.stringify(T, null, " ") });
24
+ }, At = ({
25
+ dataOverride: g,
26
+ dataFetchMethod: T,
27
+ dataUrl: O,
28
+ debugMode: tt,
29
+ DebugModeContentWrapper: q,
30
30
  DebugModeDataWrapper: z,
31
- DebugModeRootWrapper: Z,
31
+ DebugModeRootWrapper: et,
32
32
  headersForData: I,
33
33
  headersForRjBuild: s,
34
34
  maybeRawAppData: M,
35
- maybeRawAppRjBuild: w,
35
+ maybeRawAppRjBuild: S,
36
36
  plugins: R,
37
- rjBuildFetchMethod: b,
38
- rjBuildUrl: f,
39
- upstreamUpdateCallbacks: T
37
+ rjBuildFetchMethod: C,
38
+ rjBuildUrl: h,
39
+ upstreamUpdateCallbacks: $
40
40
  }) => {
41
- const g = [];
42
- E && (g.push({
41
+ const y = [];
42
+ T && (y.push({
43
43
  deprecatedProperty: "dataFetchMethod",
44
44
  newProperty: "rjBuildFetchMethod"
45
- }), b = E), L && (g.push({
45
+ }), C = T), O && (y.push({
46
46
  deprecatedProperty: "dataUrl",
47
47
  newProperty: "rjBuildUrl"
48
- }), f = L), I && (g.push({
48
+ }), h = O), I && (y.push({
49
49
  deprecatedProperty: "headersForData",
50
50
  newProperty: "headersForRjBuild"
51
- }), s = I), M && (g.push({
51
+ }), s = I), M && (y.push({
52
52
  deprecatedProperty: "maybeRawAppData",
53
53
  newProperty: "maybeRawAppRjBuild"
54
- }), w = M), g.length > 0 && console.warn(
55
- "A ReactiveJsonRoot component got the following deprecated properties that must be replaced: " + g.map((t) => t.deprecatedProperty + " -> " + t.newProperty).join(", ")
54
+ }), S = M), y.length > 0 && console.warn(
55
+ "A ReactiveJsonRoot component got the following deprecated properties that must be replaced: " + y.map((t) => t.deprecatedProperty + " -> " + t.newProperty).join(", ")
56
56
  );
57
- const o = K(new pt({})).current, [u, C] = Q({
57
+ const o = Z(new mt({})).current, [m, v] = U({
58
58
  templates: {},
59
59
  renderView: {},
60
60
  items: [],
61
61
  rawAppRjBuild: null
62
- }), [j, W] = Q(null), a = K(null);
62
+ }), [j, W] = U(null), a = Z(null);
63
63
  N(() => () => {
64
64
  typeof document < "u" && a.current && a.current.parentNode && (a.current.parentNode.removeChild(a.current), a.current = null);
65
65
  }, []);
66
- const S = it(
67
- () => R ? lt([X, R]) : X,
66
+ const E = pt(
67
+ () => R ? ut([F, R]) : F,
68
68
  [R]
69
69
  );
70
70
  N(() => {
71
- let t = w;
72
- typeof t == "string" || t && (t = JSON.stringify(t)), t && C((r) => ({ ...r, rawAppRjBuild: t }));
73
- }, [w]), N(() => {
74
- if (!f) return;
71
+ let t = S;
72
+ typeof t == "string" || t && (t = JSON.stringify(t)), t && v((r) => ({ ...r, rawAppRjBuild: t }));
73
+ }, [S]), N(() => {
74
+ if (!h) return;
75
75
  const t = {
76
- method: b || "GET",
77
- url: f,
76
+ method: C || "GET",
77
+ url: h,
78
78
  headers: s
79
79
  };
80
- t.method.toLowerCase() === "post" ? G.post(t.url, {}, { headers: t.headers }).then((r) => {
81
- C((i) => ({ ...i, rawAppRjBuild: r.data }));
82
- }) : G.get(t.url, { headers: t.headers }).then((r) => {
83
- C((i) => ({ ...i, rawAppRjBuild: r.data }));
80
+ t.method.toLowerCase() === "post" ? L.post(t.url, {}, { headers: t.headers }).then((r) => {
81
+ v((c) => ({ ...c, rawAppRjBuild: r.data }));
82
+ }) : L.get(t.url, { headers: t.headers }).then((r) => {
83
+ v((c) => ({ ...c, rawAppRjBuild: r.data }));
84
84
  });
85
- }, [f, s, b]), N(() => {
86
- if (!u.rawAppRjBuild) return;
87
- const t = wt(u.rawAppRjBuild);
85
+ }, [h, s, C]), N(() => {
86
+ if (!m.rawAppRjBuild) return;
87
+ const t = Ct(m.rawAppRjBuild);
88
88
  if (!t.success) {
89
89
  if (console.group(
90
90
  `Tried to load the app's RjBuild but the ${t.format} content could not be parsed.`
91
91
  ), console.error(t.error.message), console.debug("Context:", {
92
- rjBuildUrl: f,
93
- rjBuildFetchMethod: b,
92
+ rjBuildUrl: h,
93
+ rjBuildFetchMethod: C,
94
94
  headersForRjBuild: s,
95
- maybeRawAppRjBuild: w,
96
- dataOverride: m
95
+ maybeRawAppRjBuild: S,
96
+ dataOverride: g
97
97
  }), console.debug("Error details:", t.error), console.groupEnd(), typeof document < "u") {
98
98
  let e = document.getElementById("rj-parsing-error-root");
99
99
  if (e || (e = document.createElement("div"), e.id = "rj-parsing-error-root", document.body.appendChild(e)), !a.current) {
100
- const d = document.createElement("div");
101
- e.appendChild(d), a.current = d;
100
+ const i = document.createElement("div");
101
+ e.appendChild(i), a.current = i;
102
102
  }
103
103
  W(
104
- ct.createPortal(
105
- /* @__PURE__ */ p(
106
- mt,
104
+ dt.createPortal(
105
+ /* @__PURE__ */ u(
106
+ ht,
107
107
  {
108
108
  processedRjBuild: t,
109
109
  errorContext: {
110
- rjBuildUrl: f,
111
- rjBuildFetchMethod: b,
110
+ rjBuildUrl: h,
111
+ rjBuildFetchMethod: C,
112
112
  headersForRjBuild: s,
113
- maybeRawAppRjBuild: w
113
+ maybeRawAppRjBuild: S
114
114
  }
115
115
  }
116
116
  ),
@@ -124,165 +124,174 @@ const vt = ({ Wrapper: m }) => {
124
124
  return;
125
125
  }
126
126
  j && (W(null), typeof document < "u" && a.current && a.current.parentNode && (a.current.parentNode.removeChild(a.current), a.current = null));
127
- const r = t.data, i = m !== void 0 ? m : r.data;
128
- o.set("", i);
127
+ const r = t.data, c = g !== void 0 ? g : r.data;
128
+ o.set("", c);
129
129
  const n = {
130
130
  templates: r.templates ?? r.listForms ?? {},
131
131
  renderView: r.renderView ?? {},
132
132
  items: Object.keys(r.renderView ?? {}),
133
- rawAppRjBuild: u.rawAppRjBuild
134
- }, h = r.additionalDataSource;
135
- if (!Array.isArray(h) || h.length === 0) {
136
- C((e) => ({ ...e, ...n }));
133
+ rawAppRjBuild: m.rawAppRjBuild
134
+ }, P = r.additionalDataSource;
135
+ if (!Array.isArray(P) || P.length === 0) {
136
+ v((e) => ({ ...e, ...n }));
137
137
  return;
138
138
  }
139
- const v = h.filter((e) => e.blocking === !0), A = h.filter((e) => e.blocking !== !0), _ = (e) => !e || e === "data" ? "" : e.startsWith("data.") ? e.substring(5) : e, $ = async (e, d) => {
140
- var P;
139
+ const x = P.filter((e) => e.blocking === !0), V = P.filter((e) => e.blocking !== !0), _ = (e) => !e || e === "data" ? "" : e.startsWith("data.") ? e.substring(5) : e, J = async (e, i) => {
140
+ var X;
141
+ const { fallbackDataSource: D, ...l } = e, K = async (p) => {
142
+ D ? (console.warn(`additionalDataSource item ${i}: ${p} — trying fallbackDataSource.`), await J(D, i)) : console.warn(`additionalDataSource item ${i}: ${p}.`, l);
143
+ }, Q = vt(l.src, (p) => o.get(p));
144
+ if (!Q) {
145
+ await K("could not resolve 'src'");
146
+ return;
147
+ }
148
+ const w = {
149
+ method: ((X = l.method) == null ? void 0 : X.toUpperCase()) || "GET",
150
+ url: Q
151
+ };
152
+ s && Object.keys(s).length > 0 && (w.headers = s);
153
+ let k;
141
154
  try {
142
- const k = bt(e.src, (c) => o.get(c));
143
- if (!k) {
144
- console.warn("additionalDataSource item number " + d + ": could not resolve 'src'.", e);
145
- return;
146
- }
147
- const y = {
148
- method: ((P = e.method) == null ? void 0 : P.toUpperCase()) || "GET",
149
- url: k
150
- };
151
- s && Object.keys(s).length > 0 && (y.headers = s);
152
- const V = await G(y), rt = {
153
- url: y.url,
154
- method: y.method,
155
- headers: y.headers || {},
156
- body: y.data
157
- }, ot = {
158
- headers: V.headers || {},
159
- status: V.status,
160
- data: V.data
161
- }, D = yt({
162
- requestContext: rt,
163
- responseContext: ot,
164
- responseBody: V.data,
155
+ k = await L(w);
156
+ } catch (p) {
157
+ await K(`HTTP request failed (${p.message})`);
158
+ return;
159
+ }
160
+ try {
161
+ const p = {
162
+ url: w.url,
163
+ method: w.method,
164
+ headers: w.headers || {},
165
+ body: w.data
166
+ }, st = {
167
+ headers: k.headers || {},
168
+ status: k.status,
169
+ data: k.data
170
+ }, b = bt({
171
+ requestContext: p,
172
+ responseContext: st,
173
+ responseBody: k.data,
165
174
  // additionalDataSource always processes raw data, not RjBuild.
166
175
  isRjBuild: !1,
167
- dataProcessors: (S == null ? void 0 : S.dataProcessor) || {}
176
+ dataProcessors: (E == null ? void 0 : E.dataProcessor) || {}
168
177
  });
169
- if (e.dataMapping) {
170
- const c = {
178
+ if (l.dataMapping) {
179
+ const f = {
171
180
  headersForRjBuild: s,
172
- plugins: S,
181
+ plugins: E,
173
182
  get templateData() {
174
183
  return o.get("");
175
184
  },
176
185
  templatePath: "data",
177
- setData: (l) => o.set("", l),
178
- updateData: (l, J, at) => {
179
- const nt = _(J);
180
- o.set(nt, l, at);
186
+ setData: (d) => o.set("", d),
187
+ updateData: (d, G, ct) => {
188
+ const it = _(G);
189
+ o.set(it, d, ct);
181
190
  }
182
- }, x = {
191
+ }, A = {
183
192
  get templateData() {
184
193
  return o.get("");
185
194
  },
186
195
  templatePath: "data"
187
196
  };
188
197
  try {
189
- Dt({
190
- dataMapping: e.dataMapping,
191
- responseData: D,
192
- globalDataContext: c,
193
- templateContext: x
198
+ St({
199
+ dataMapping: l.dataMapping,
200
+ responseData: b,
201
+ globalDataContext: f,
202
+ templateContext: A
194
203
  });
195
204
  return;
196
- } catch (l) {
197
- console.error("Error applying dataMapping for additionalDataSource:", l);
205
+ } catch (d) {
206
+ console.error("Error applying dataMapping for additionalDataSource:", d);
198
207
  }
199
208
  }
200
- if (!e.path) {
201
- if (typeof D != "object" || Array.isArray(D)) {
209
+ if (!l.path) {
210
+ if (typeof b != "object" || Array.isArray(b)) {
202
211
  console.warn(
203
212
  "additionalDataSource data cannot be merged at root - must be an object:",
204
- D
213
+ b
205
214
  );
206
215
  return;
207
216
  }
208
- Object.entries(D).forEach(([c, x]) => {
209
- o.set(c, x);
217
+ Object.entries(b).forEach(([f, A]) => {
218
+ o.set(f, A);
210
219
  });
211
220
  return;
212
221
  }
213
222
  try {
214
- const c = {
223
+ const f = {
215
224
  templateData: o.get(""),
216
225
  // use current snapshot
217
226
  templatePath: "data"
218
- }, x = {
227
+ }, A = {
219
228
  templateData: o.get(""),
220
229
  // use current snapshot
221
230
  templatePath: "data"
222
- }, l = ht({
223
- dataLocation: e.path,
231
+ }, d = Dt({
232
+ dataLocation: l.path,
224
233
  currentPath: "data",
225
- globalDataContext: c,
226
- templateContext: x
234
+ globalDataContext: f,
235
+ templateContext: A
227
236
  });
228
- if (typeof l != "string") {
237
+ if (typeof d != "string") {
229
238
  console.warn(
230
239
  "additionalDataSource path evaluation did not result in a string:",
231
- e.path,
240
+ l.path,
232
241
  "->",
233
- l
242
+ d
234
243
  );
235
244
  return;
236
245
  }
237
- const J = _(l);
238
- o.set(J, D);
239
- } catch (c) {
240
- console.error("Error evaluating additionalDataSource path:", e.path, c);
246
+ const G = _(d);
247
+ o.set(G, b);
248
+ } catch (f) {
249
+ console.error("Error evaluating additionalDataSource path:", l.path, f);
241
250
  }
242
- } catch (k) {
243
- console.error("Error fetching additional data source:", e.src, k);
251
+ } catch (p) {
252
+ console.error("Error processing additionalDataSource response:", l.src, p);
244
253
  }
245
254
  };
246
255
  (async () => {
247
- if (v.length > 0) {
248
- const e = v.map((d, P) => $(d, P));
256
+ if (x.length > 0) {
257
+ const e = x.map((i, D) => J(i, D));
249
258
  await Promise.allSettled(e);
250
259
  }
251
- if (C((e) => ({ ...e, ...n })), A.length > 0) {
252
- const e = A.map(
253
- (d, P) => $(d, v.length + P)
260
+ if (v((e) => ({ ...e, ...n })), V.length > 0) {
261
+ const e = V.map(
262
+ (i, D) => J(i, x.length + D)
254
263
  );
255
264
  Promise.allSettled(e);
256
265
  }
257
266
  })();
258
- }, [u.rawAppRjBuild, m, o]);
259
- function q(t, r, i) {
260
- if (!T || T.size === 0)
267
+ }, [m.rawAppRjBuild, g, o]);
268
+ function B(t, r, c) {
269
+ if (!$ || $.size === 0)
261
270
  return !1;
262
- for (const [n, h] of T)
271
+ for (const [n, P] of $)
263
272
  if (t === n || t.startsWith(n + ".") || n === "") {
264
- const v = n === "" ? t : t.substring(n.length + 1);
273
+ const x = n === "" ? t : t.substring(n.length + 1);
265
274
  try {
266
- return h(r, v, i), !0;
267
- } catch (A) {
268
- console.warn("Error during upstream update:", A);
275
+ return P(r, x, c), !0;
276
+ } catch (V) {
277
+ console.warn("Error during upstream update:", V);
269
278
  break;
270
279
  }
271
280
  }
272
281
  return !1;
273
282
  }
274
- const U = (t) => {
275
- q("", t, void 0) || o.set("", t);
276
- }, F = (t, r, i) => {
283
+ const rt = (t) => {
284
+ B("", t, void 0) || o.set("", t);
285
+ }, ot = (t, r, c) => {
277
286
  const n = r.startsWith("data.") ? r.substring(5) : r === "data" ? "" : r;
278
- q(n, t, i) || o.set(n, t, i);
279
- }, tt = {
280
- element: u.templates,
287
+ B(n, t, c) || o.set(n, t, c);
288
+ }, at = {
289
+ element: m.templates,
281
290
  headersForRjBuild: s,
282
- plugins: S,
283
- ReactiveJsonRoot: xt,
284
- setData: U,
285
- updateData: F,
291
+ plugins: E,
292
+ ReactiveJsonRoot: At,
293
+ setData: rt,
294
+ updateData: ot,
286
295
  // experimental: expose store for advanced usage
287
296
  store: o,
288
297
  // fallback: get data from store directly (non-reactive access)
@@ -290,30 +299,30 @@ const vt = ({ Wrapper: m }) => {
290
299
  return o.get("");
291
300
  },
292
301
  templatePath: "data"
293
- }, B = u.items.map((t) => /* @__PURE__ */ p(
294
- St,
302
+ }, H = m.items.map((t) => /* @__PURE__ */ u(
303
+ xt,
295
304
  {
296
305
  datafield: t,
297
306
  path: "data." + t,
298
- props: u.renderView[t]
307
+ props: m.renderView[t]
299
308
  },
300
309
  t
301
- )), et = Ct(Y);
302
- return /* @__PURE__ */ p(ft.Provider, { value: o, children: /* @__PURE__ */ p(dt, { children: /* @__PURE__ */ p(ut.Provider, { value: tt, children: /* @__PURE__ */ p(gt.Provider, { value: {
310
+ )), nt = Et(tt);
311
+ return /* @__PURE__ */ u(yt.Provider, { value: o, children: /* @__PURE__ */ u(ft, { children: /* @__PURE__ */ u(gt.Provider, { value: at, children: /* @__PURE__ */ u(Pt.Provider, { value: {
303
312
  // Same here, getter for compatibility, but won't trigger updates
304
313
  get templateData() {
305
314
  return o.get("");
306
315
  },
307
316
  templatePath: "data"
308
- }, children: et && O ? /* @__PURE__ */ H(Z, { children: [
309
- /* @__PURE__ */ p(O, { children: B }),
310
- z && /* @__PURE__ */ p(vt, { Wrapper: z }),
317
+ }, children: nt && q ? /* @__PURE__ */ Y(et, { children: [
318
+ /* @__PURE__ */ u(q, { children: H }),
319
+ z && /* @__PURE__ */ u(kt, { Wrapper: z }),
311
320
  j
312
- ] }) : /* @__PURE__ */ H(st, { children: [
313
- B,
321
+ ] }) : /* @__PURE__ */ Y(lt, { children: [
322
+ H,
314
323
  j
315
324
  ] }) }) }) }) });
316
325
  };
317
326
  export {
318
- xt as ReactiveJsonRoot
327
+ At as ReactiveJsonRoot
319
328
  };
@@ -1,12 +1,63 @@
1
- const e = (r, i) => typeof r == "string" ? r || null : !Array.isArray(r) || r.length === 0 ? null : r.map((t) => {
2
- if (typeof t == "string" && t.startsWith("~~.")) {
3
- const o = t.substring(3), n = i(o);
4
- return n == null ? (console.warn(
5
- `interpolateSegments: reference "${t}" resolved to ${n}.`
6
- ), "") : String(n);
1
+ const i = (e, l) => {
2
+ if (typeof e == "string") {
3
+ let t = null;
4
+ if (e.startsWith("~~.") ? t = e.substring(3) : e.startsWith("~.") && (t = e.substring(2)), t !== null) {
5
+ const r = l(t);
6
+ return r == null ? null : String(r);
7
+ }
8
+ return e;
7
9
  }
8
- return String(t ?? "");
9
- }).join("");
10
+ return e == null ? null : String(e);
11
+ }, p = (e, l) => {
12
+ if (typeof e == "string")
13
+ return e || null;
14
+ if (!Array.isArray(e) || e.length === 0)
15
+ return null;
16
+ const t = [], r = [];
17
+ for (const n of e) {
18
+ if (n !== null && typeof n == "object") {
19
+ if ("param" in n) {
20
+ const o = i(n.param, l), s = i(n.value, l);
21
+ if (!o || !s) {
22
+ if (n.required)
23
+ return console.warn(
24
+ `interpolateSegments: required param "${n.param}" resolved to empty key or value — aborting URL.`
25
+ ), null;
26
+ continue;
27
+ }
28
+ r.push(
29
+ `${encodeURIComponent(o)}=${encodeURIComponent(s)}`
30
+ );
31
+ continue;
32
+ }
33
+ if ("segment" in n) {
34
+ const o = i(n.segment, l);
35
+ if (!o) {
36
+ if (n.required)
37
+ return console.warn(
38
+ `interpolateSegments: required segment "${n.segment}" resolved to empty — aborting URL.`
39
+ ), null;
40
+ t.push("");
41
+ continue;
42
+ }
43
+ t.push(o);
44
+ continue;
45
+ }
46
+ console.warn("interpolateSegments: unrecognized segment object.", n);
47
+ continue;
48
+ }
49
+ if (typeof n == "string") {
50
+ const o = i(n, l);
51
+ o === null ? (console.warn(
52
+ `interpolateSegments: reference "${n}" resolved to null.`
53
+ ), t.push("")) : t.push(o);
54
+ continue;
55
+ }
56
+ t.push(String(n ?? ""));
57
+ }
58
+ const u = t.join(""), a = r.length > 0 ? "?" + r.join("&") : "";
59
+ return u + a || null;
60
+ };
10
61
  export {
11
- e as interpolateSegments
62
+ p as interpolateSegments
12
63
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ea-lab/reactive-json",
3
3
  "private": false,
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",