@bravostudioai/react 0.1.31 → 0.1.34
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/cli/commands/download.js +22 -39
- package/dist/cli/commands/download.js.map +1 -1
- package/dist/cli/commands/generate.js +130 -147
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli.js +21 -24
- package/dist/cli.js.map +1 -1
- package/dist/codegen/generator.js +126 -125
- package/dist/codegen/generator.js.map +1 -1
- package/dist/codegen/parser.js +256 -593
- package/dist/codegen/parser.js.map +1 -1
- package/dist/codegen/propQualification.js +117 -0
- package/dist/codegen/propQualification.js.map +1 -0
- package/dist/components/DynamicComponent.js.map +1 -1
- package/dist/components/EncoreApp.js +156 -265
- package/dist/components/EncoreApp.js.map +1 -1
- package/dist/components/EncoreContextProviders.js +24 -0
- package/dist/components/EncoreContextProviders.js.map +1 -0
- package/dist/components.js +179 -174
- package/dist/components.js.map +1 -1
- package/dist/hooks/useFontLoader.js +41 -0
- package/dist/hooks/useFontLoader.js.map +1 -0
- package/dist/hooks/usePusherUpdates.js +41 -45
- package/dist/hooks/usePusherUpdates.js.map +1 -1
- package/dist/hooks/useRepeatingContainers.js +79 -0
- package/dist/hooks/useRepeatingContainers.js.map +1 -0
- package/dist/index.js +13 -14
- package/dist/index.js.map +1 -1
- package/dist/lib/dataPatching.js +24 -0
- package/dist/lib/dataPatching.js.map +1 -0
- package/dist/lib/dynamicModules.js +44 -45
- package/dist/lib/dynamicModules.js.map +1 -1
- package/dist/lib/fetcher.js +6 -13
- package/dist/lib/fetcher.js.map +1 -1
- package/dist/lib/logger.js +35 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/moduleRegistry.js +9 -8
- package/dist/lib/moduleRegistry.js.map +1 -1
- package/dist/src/cli/commands/download.d.ts +1 -1
- package/dist/src/cli/commands/download.d.ts.map +1 -1
- package/dist/src/cli/commands/generate.d.ts +1 -1
- package/dist/src/cli/commands/generate.d.ts.map +1 -1
- package/dist/src/codegen/generator.d.ts +75 -1
- package/dist/src/codegen/generator.d.ts.map +1 -1
- package/dist/src/codegen/parser.d.ts +39 -0
- package/dist/src/codegen/parser.d.ts.map +1 -1
- package/dist/src/codegen/propQualification.d.ts +42 -0
- package/dist/src/codegen/propQualification.d.ts.map +1 -0
- package/dist/src/components/DynamicComponent.d.ts +1 -1
- package/dist/src/components/DynamicComponent.d.ts.map +1 -1
- package/dist/src/components/EncoreApp.d.ts +58 -3
- package/dist/src/components/EncoreApp.d.ts.map +1 -1
- package/dist/src/components/EncoreContextProviders.d.ts +34 -0
- package/dist/src/components/EncoreContextProviders.d.ts.map +1 -0
- package/dist/src/components.d.ts.map +1 -1
- package/dist/src/hooks/useFontLoader.d.ts +17 -0
- package/dist/src/hooks/useFontLoader.d.ts.map +1 -0
- package/dist/src/hooks/usePusherUpdates.d.ts.map +1 -1
- package/dist/src/hooks/useRepeatingContainers.d.ts +31 -0
- package/dist/src/hooks/useRepeatingContainers.d.ts.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/dataPatching.d.ts +18 -0
- package/dist/src/lib/dataPatching.d.ts.map +1 -0
- package/dist/src/lib/dynamicModules.d.ts.map +1 -1
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/logger.d.ts +33 -0
- package/dist/src/lib/logger.d.ts.map +1 -0
- package/dist/src/lib/moduleRegistry.d.ts.map +1 -1
- package/dist/src/stores/useEncoreState.d.ts +43 -1
- package/dist/src/stores/useEncoreState.d.ts.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/stores/useEncoreState.js.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +2 -1
- package/src/cli/commands/download.ts +8 -28
- package/src/cli/commands/generate.ts +44 -45
- package/src/cli/index.ts +49 -32
- package/src/codegen/generator.ts +6 -3
- package/src/components/DynamicComponent.tsx +1 -1
- package/src/components/EncoreApp.tsx +111 -21
- package/src/hooks/useRepeatingContainers.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -1,288 +1,177 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { setLocalModeOverride as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import K from "../node_modules/swr/dist/index/index.js";
|
|
3
|
+
import T from "../lib/fetcher.js";
|
|
4
|
+
import i from "../stores/useEncoreState.js";
|
|
5
|
+
import { useRef as _, useEffect as c, useState as H, useCallback as st, useMemo as nt, Suspense as ct } from "react";
|
|
6
|
+
import { setLocalModeOverride as A, isLocalMode as B } from "../lib/localMode.js";
|
|
7
|
+
import at from "./DynamicComponent.js";
|
|
8
|
+
import { useEncoreRouter as it } from "../contexts/EncoreRouterContext.js";
|
|
9
|
+
import { usePusherUpdates as lt } from "../hooks/usePusherUpdates.js";
|
|
10
|
+
import { useFontLoader as dt } from "../hooks/useFontLoader.js";
|
|
11
|
+
import { useRepeatingContainers as ut } from "../hooks/useRepeatingContainers.js";
|
|
12
|
+
import { EncoreContextProviders as ft } from "./EncoreContextProviders.js";
|
|
13
|
+
import { patchPageData as mt } from "../lib/dataPatching.js";
|
|
14
|
+
import { logger as f } from "../lib/logger.js";
|
|
15
|
+
const ht = ({ to: e, children: o, style: D, ...b }) => {
|
|
16
|
+
const { navigate: l } = it();
|
|
17
|
+
return /* @__PURE__ */ n(
|
|
17
18
|
"a",
|
|
18
19
|
{
|
|
19
|
-
href:
|
|
20
|
-
onClick: (
|
|
21
|
-
|
|
20
|
+
href: e,
|
|
21
|
+
onClick: (m) => {
|
|
22
|
+
m.preventDefault(), l(e);
|
|
22
23
|
},
|
|
23
|
-
style: { cursor: "pointer", ...
|
|
24
|
-
...
|
|
25
|
-
children:
|
|
24
|
+
style: { cursor: "pointer", ...D },
|
|
25
|
+
...b,
|
|
26
|
+
children: o
|
|
26
27
|
}
|
|
27
28
|
);
|
|
28
|
-
},
|
|
29
|
-
appId:
|
|
30
|
-
pageId:
|
|
31
|
-
componentId:
|
|
32
|
-
fallback:
|
|
33
|
-
onSizeChange:
|
|
34
|
-
onContentSizeChange:
|
|
35
|
-
onAction:
|
|
36
|
-
data:
|
|
37
|
-
source:
|
|
38
|
-
repeatingContainerControls:
|
|
39
|
-
inputGroups:
|
|
40
|
-
baseURL:
|
|
41
|
-
appDefinition:
|
|
42
|
-
pageDefinition:
|
|
43
|
-
componentCode:
|
|
29
|
+
}, pt = (e) => e.setApp, yt = (e) => e.setAppId, gt = (e) => e.setPageId, vt = (e) => e.assetsById, Ut = ({
|
|
30
|
+
appId: e,
|
|
31
|
+
pageId: o,
|
|
32
|
+
componentId: D,
|
|
33
|
+
fallback: b,
|
|
34
|
+
onSizeChange: l,
|
|
35
|
+
onContentSizeChange: m,
|
|
36
|
+
onAction: Y,
|
|
37
|
+
data: w,
|
|
38
|
+
source: d,
|
|
39
|
+
repeatingContainerControls: q,
|
|
40
|
+
inputGroups: L,
|
|
41
|
+
baseURL: S,
|
|
42
|
+
appDefinition: h,
|
|
43
|
+
pageDefinition: R,
|
|
44
|
+
componentCode: O,
|
|
45
|
+
mode: P
|
|
44
46
|
}) => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
i(() => {
|
|
50
|
-
if (!y) return;
|
|
47
|
+
f.debug("EncoreApp render", { appId: e, pageId: o, mode: P }), S && i.getState().baseURL !== S && i.getState().setBaseURL(S), d && A(d === "local" ? "local" : "remote");
|
|
48
|
+
const G = !1, C = i(pt), M = i(yt), E = i(gt), p = i(vt), U = _(null), F = _(null);
|
|
49
|
+
c(() => {
|
|
50
|
+
if (!m) return;
|
|
51
51
|
const t = F.current;
|
|
52
52
|
if (!t) return;
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
const r = () => {
|
|
54
|
+
m({
|
|
55
55
|
width: t.scrollWidth,
|
|
56
56
|
height: t.scrollHeight
|
|
57
57
|
});
|
|
58
|
-
},
|
|
59
|
-
|
|
58
|
+
}, s = new ResizeObserver(() => {
|
|
59
|
+
r();
|
|
60
60
|
});
|
|
61
|
-
return
|
|
62
|
-
}, [
|
|
63
|
-
const [
|
|
64
|
-
|
|
61
|
+
return r(), s.observe(t), () => s.disconnect();
|
|
62
|
+
}, [m]);
|
|
63
|
+
const [J, Q] = H(0), X = st(() => {
|
|
64
|
+
Q((t) => typeof t == "number" ? t + 1 : Date.now());
|
|
65
65
|
}, []);
|
|
66
|
-
|
|
67
|
-
appId:
|
|
68
|
-
pageId:
|
|
69
|
-
enabled: !
|
|
70
|
-
onUpdate:
|
|
66
|
+
lt({
|
|
67
|
+
appId: e,
|
|
68
|
+
pageId: o || void 0,
|
|
69
|
+
enabled: !B() && !h,
|
|
70
|
+
onUpdate: X
|
|
71
71
|
});
|
|
72
|
-
const
|
|
73
|
-
suspense: !!
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (!e || !n) return;
|
|
91
|
-
if (o.broken) {
|
|
92
|
-
console.warn(
|
|
93
|
-
`[EncoreApp] Font "${s || e}" is marked as broken in the database. URL: ${n} - SKIPPING DOWNLOAD`
|
|
94
|
-
);
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const c = s || e;
|
|
98
|
-
new FontFace(c, `url(${n})`, {
|
|
99
|
-
weight: "100 900",
|
|
100
|
-
style: "normal"
|
|
101
|
-
}).load().then((G) => {
|
|
102
|
-
document.fonts.add(G), console.log(
|
|
103
|
-
`[AG_DEBUG] [EncoreApp] ✅ Font loaded successfully: "${c}" - Source: ${n}`
|
|
104
|
-
);
|
|
105
|
-
const ae = document.fonts.check(
|
|
106
|
-
`400 12px "${c}"`
|
|
107
|
-
);
|
|
108
|
-
console.log(
|
|
109
|
-
`[AG_DEBUG] [EncoreApp] 🧪 document.fonts.check result for "${c}": ${ae}`
|
|
110
|
-
);
|
|
111
|
-
}).catch((G) => {
|
|
112
|
-
console.warn(
|
|
113
|
-
`[AG_DEBUG] [EncoreApp] ❌ Failed to load font "${s || e}" from ${n}`,
|
|
114
|
-
G
|
|
115
|
-
);
|
|
116
|
-
});
|
|
117
|
-
} catch (e) {
|
|
118
|
-
console.warn("[EncoreApp] Error processing font:", e);
|
|
119
|
-
}
|
|
120
|
-
}));
|
|
121
|
-
}, [u?.data]), i(() => {
|
|
122
|
-
N(r);
|
|
123
|
-
}, [r, N]), i(() => {
|
|
124
|
-
l && I(l);
|
|
125
|
-
}, [l, I]), i(() => {
|
|
126
|
-
Object.keys(E).length !== 0 && (async () => await Promise.allSettled(
|
|
127
|
-
Object.keys(E).map((t) => E[t].url ? new Promise((o) => {
|
|
128
|
-
const e = new Image();
|
|
129
|
-
e.onload = o, e.onerror = o, e.src = E[t].url;
|
|
72
|
+
const j = d === "local" || B(), y = P === "production", u = P === "optimistic", W = !y && !u, N = !y && e ? `/devices/apps/${e}${j ? "?useLocal=1" : ""}` : null, Z = K(N, T, {
|
|
73
|
+
suspense: W && !!N,
|
|
74
|
+
// Suspense only for Dynamic mode
|
|
75
|
+
fallbackData: u && h ? h : void 0,
|
|
76
|
+
revalidateOnMount: !0
|
|
77
|
+
// Ensure we fetch fresh data in optimistic mode
|
|
78
|
+
}), g = y && h ? { data: h } : Z;
|
|
79
|
+
c(() => {
|
|
80
|
+
C(g.data);
|
|
81
|
+
}, [g.data, C]), dt(g?.data), c(() => {
|
|
82
|
+
M(e);
|
|
83
|
+
}, [e, M]), c(() => {
|
|
84
|
+
o && E(o);
|
|
85
|
+
}, [o, E]), c(() => {
|
|
86
|
+
Object.keys(p).length !== 0 && (async () => await Promise.allSettled(
|
|
87
|
+
Object.keys(p).map((t) => p[t].url ? new Promise((r) => {
|
|
88
|
+
const s = new Image();
|
|
89
|
+
s.onload = r, s.onerror = r, s.src = p[t].url;
|
|
130
90
|
}) : Promise.resolve())
|
|
131
91
|
))();
|
|
132
|
-
}, [
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
).substring(0, 1e3)}`
|
|
92
|
+
}, [p]);
|
|
93
|
+
const k = !y && e && o ? `/devices/apps/${e}/node/${o}${j ? "?useLocal=1" : ""}` : null;
|
|
94
|
+
f.debug("Page data fetch", { pageUrl: k, mode: P });
|
|
95
|
+
const z = K(k, T, {
|
|
96
|
+
suspense: W && !!k,
|
|
97
|
+
fallbackData: u && R ? R : void 0,
|
|
98
|
+
revalidateOnMount: !0
|
|
99
|
+
}), $ = y && R ? { data: R } : z, [I, V] = H(
|
|
100
|
+
O
|
|
142
101
|
);
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const o = (e) => {
|
|
151
|
-
if (!(!e || typeof e != "object")) {
|
|
152
|
-
if ((e.componentId || e.type === "component:text") && console.log(
|
|
153
|
-
`[AG_DEBUG] [EncoreApp] 📦 Node ${e.id} (${e.type}) Style:`,
|
|
154
|
-
JSON.stringify(e.style)
|
|
155
|
-
), e.children && Array.isArray(e.children) && e.children.length > 1) {
|
|
156
|
-
let n = 0, s = 0;
|
|
157
|
-
e.children.forEach((S) => {
|
|
158
|
-
S.style?.width && (n += S.style.width, s++);
|
|
159
|
-
}), (Math.abs(n - 100) < 1 || Math.abs(n - 375) < 5) && s >= 2 && (e.style || (e.style = {}), e.style.layout || (e.style.layout = {}), e.style.layout.mode || (console.log(
|
|
160
|
-
`[PATCH] Forcing HORIZONTAL layout for node ${e.id} (${s} children, widths sum: ${n})`
|
|
161
|
-
), e.style.layout.mode = "HORIZONTAL", e.style.layout.primaryAxisAlignItems = "flex-start", e.style.layout.counterAxisAlignItems = "flex-start"));
|
|
102
|
+
c(() => {
|
|
103
|
+
u && e && o && !B() ? (async () => {
|
|
104
|
+
try {
|
|
105
|
+
const { CONST_COMPONENTS_CDN_URL: r } = await import("../packages/encore-lib/constants.js"), s = Math.round(Date.now() / 1e3), x = `${e}/draft/components/${o}`, v = `${r}/${x}.js?cacheBuster=${s}`, a = await fetch(v);
|
|
106
|
+
if (a.ok) {
|
|
107
|
+
const rt = await a.text();
|
|
108
|
+
V(rt), f.debug("Refreshed optimistic component code");
|
|
162
109
|
}
|
|
163
|
-
|
|
110
|
+
} catch (r) {
|
|
111
|
+
f.warn("Failed to background refresh optimistic component", r);
|
|
164
112
|
}
|
|
165
|
-
};
|
|
166
|
-
|
|
113
|
+
})() : V(O);
|
|
114
|
+
}, [O, u, e, o]);
|
|
115
|
+
const tt = u ? I : O;
|
|
116
|
+
f.debug("Page data loaded", {
|
|
117
|
+
hasData: !!$?.data,
|
|
118
|
+
dataType: typeof $?.data
|
|
119
|
+
});
|
|
120
|
+
const et = nt(() => {
|
|
121
|
+
let t = $.data?.clientData;
|
|
122
|
+
return f.debug("Building context", {
|
|
123
|
+
hasClientData: !!t,
|
|
124
|
+
clientDataKeys: Object.keys(t || {}).length
|
|
125
|
+
}), t && mt(t), {
|
|
167
126
|
nodeData: void 0,
|
|
168
127
|
// Allow overriding specific values by element id.
|
|
169
128
|
// For now, this is used to override TextComponent content when the node has the PROP:TEXT_VAR tag.
|
|
170
|
-
textOverridesById:
|
|
129
|
+
textOverridesById: w,
|
|
171
130
|
// Support for encore:data:array tags - provide array data by component ID
|
|
172
|
-
arrayDataById:
|
|
131
|
+
arrayDataById: w,
|
|
173
132
|
// Support for standalone component data binding (encore:data tags at root level)
|
|
174
|
-
rootData:
|
|
133
|
+
rootData: w
|
|
175
134
|
};
|
|
176
|
-
}, [
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
g
|
|
185
|
-
)) {
|
|
186
|
-
const c = t.get(n);
|
|
187
|
-
if (!c) {
|
|
188
|
-
o = !0;
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
|
-
if (c.currentIndex !== s.currentIndex || c.onIndexChange !== s.onIndexChange) {
|
|
192
|
-
o = !0;
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
if (!o) return t;
|
|
197
|
-
const e = /* @__PURE__ */ new Map();
|
|
198
|
-
return Object.entries(g).forEach(([n, s]) => {
|
|
199
|
-
e.set(n, s);
|
|
200
|
-
}), e;
|
|
201
|
-
});
|
|
202
|
-
}, [g]), i(() => {
|
|
203
|
-
if (D) {
|
|
204
|
-
const t = p.getState().setInputGroupValue;
|
|
205
|
-
Object.entries(D).forEach(([o, e]) => {
|
|
206
|
-
t(o, e);
|
|
135
|
+
}, [$.data?.clientData, w]), ot = ut(
|
|
136
|
+
q
|
|
137
|
+
);
|
|
138
|
+
return c(() => {
|
|
139
|
+
if (L) {
|
|
140
|
+
const t = i.getState().setInputGroupValue;
|
|
141
|
+
Object.entries(L).forEach(([r, s]) => {
|
|
142
|
+
t(r, s);
|
|
207
143
|
});
|
|
208
144
|
}
|
|
209
|
-
}, [
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
W((e) => {
|
|
213
|
-
const n = new Map(e);
|
|
214
|
-
return n.set(t, o), n;
|
|
215
|
-
});
|
|
216
|
-
},
|
|
217
|
-
[]
|
|
218
|
-
), V = m((t) => {
|
|
219
|
-
W((o) => {
|
|
220
|
-
const e = new Map(o);
|
|
221
|
-
return e.delete(t), e;
|
|
222
|
-
});
|
|
223
|
-
}, []), H = m(
|
|
224
|
-
(t) => _.get(t),
|
|
225
|
-
[_]
|
|
226
|
-
), K = m(
|
|
227
|
-
(t, o) => {
|
|
228
|
-
j((e) => {
|
|
229
|
-
const n = new Map(e), s = n.get(t) || {}, c = typeof o == "function" ? o(s) : o;
|
|
230
|
-
return n.set(t, c), n;
|
|
231
|
-
});
|
|
232
|
-
},
|
|
233
|
-
[]
|
|
234
|
-
), J = m(
|
|
235
|
-
(t) => R.get(t),
|
|
236
|
-
[R]
|
|
237
|
-
), ce = le.useMemo(
|
|
238
|
-
() => ({
|
|
239
|
-
registerContainer: T,
|
|
240
|
-
unregisterContainer: V,
|
|
241
|
-
getControl: H,
|
|
242
|
-
setControlProps: K,
|
|
243
|
-
getControlProps: J,
|
|
244
|
-
// Include controlPropsMap size in the value to trigger re-renders when it changes
|
|
245
|
-
_propsVersion: R.size
|
|
246
|
-
}),
|
|
247
|
-
[
|
|
248
|
-
T,
|
|
249
|
-
V,
|
|
250
|
-
H,
|
|
251
|
-
K,
|
|
252
|
-
J,
|
|
253
|
-
R.size
|
|
254
|
-
]
|
|
255
|
-
);
|
|
256
|
-
return i(() => {
|
|
257
|
-
if (!d) return;
|
|
258
|
-
const t = M.current;
|
|
145
|
+
}, [L]), c(() => {
|
|
146
|
+
if (!l) return;
|
|
147
|
+
const t = U.current;
|
|
259
148
|
if (!t) return;
|
|
260
|
-
const
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
},
|
|
264
|
-
for (const
|
|
265
|
-
|
|
266
|
-
}),
|
|
267
|
-
return
|
|
268
|
-
|
|
149
|
+
const r = (v) => {
|
|
150
|
+
const a = v.contentRect;
|
|
151
|
+
l({ width: a.width, height: a.height });
|
|
152
|
+
}, s = new ResizeObserver((v) => {
|
|
153
|
+
for (const a of v)
|
|
154
|
+
r(a);
|
|
155
|
+
}), x = t.getBoundingClientRect();
|
|
156
|
+
return l({ width: x.width, height: x.height }), s.observe(t), () => {
|
|
157
|
+
s.disconnect();
|
|
269
158
|
};
|
|
270
|
-
}, [
|
|
271
|
-
if (
|
|
272
|
-
return
|
|
273
|
-
|
|
159
|
+
}, [l]), c(() => {
|
|
160
|
+
if (d)
|
|
161
|
+
return A(d === "local" ? "local" : "remote"), () => {
|
|
162
|
+
A(null);
|
|
274
163
|
};
|
|
275
|
-
}, [
|
|
164
|
+
}, [d]), o ? /* @__PURE__ */ n(
|
|
276
165
|
"div",
|
|
277
166
|
{
|
|
278
|
-
ref:
|
|
167
|
+
ref: U,
|
|
279
168
|
style: {
|
|
280
169
|
width: "100%",
|
|
281
170
|
height: "100%",
|
|
282
171
|
position: "relative",
|
|
283
172
|
overflow: "hidden"
|
|
284
173
|
},
|
|
285
|
-
children: /* @__PURE__ */
|
|
174
|
+
children: /* @__PURE__ */ n(
|
|
286
175
|
"div",
|
|
287
176
|
{
|
|
288
177
|
ref: F,
|
|
@@ -292,34 +181,36 @@ const Ee = ({ to: r, children: l, style: v, ...A }) => {
|
|
|
292
181
|
display: "flex",
|
|
293
182
|
flexDirection: "column"
|
|
294
183
|
},
|
|
295
|
-
children: /* @__PURE__ */
|
|
296
|
-
|
|
184
|
+
children: /* @__PURE__ */ n(ct, { fallback: b || /* @__PURE__ */ n("div", {}), children: /* @__PURE__ */ n(
|
|
185
|
+
ft,
|
|
297
186
|
{
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
187
|
+
componentId: D,
|
|
188
|
+
onAction: Y,
|
|
189
|
+
repeatingContainerContextValue: ot,
|
|
190
|
+
bindingContextValue: et,
|
|
191
|
+
children: /* @__PURE__ */ n(
|
|
192
|
+
at,
|
|
301
193
|
{
|
|
302
|
-
name: `${
|
|
303
|
-
fallback:
|
|
304
|
-
reloadKey:
|
|
305
|
-
componentCode:
|
|
306
|
-
children: " "
|
|
194
|
+
name: `${e}/draft/components/${o}`,
|
|
195
|
+
fallback: b,
|
|
196
|
+
reloadKey: J,
|
|
197
|
+
componentCode: tt
|
|
307
198
|
}
|
|
308
|
-
)
|
|
199
|
+
)
|
|
309
200
|
}
|
|
310
|
-
) })
|
|
201
|
+
) })
|
|
311
202
|
}
|
|
312
203
|
)
|
|
313
204
|
}
|
|
314
|
-
) : /* @__PURE__ */
|
|
205
|
+
) : /* @__PURE__ */ n("div", { style: { padding: "30px" }, children: /* @__PURE__ */ n("div", { style: { overflowY: "auto" }, children: (B() ? (
|
|
315
206
|
// Local mode: app.json provides pages under app.data.pages
|
|
316
|
-
(
|
|
207
|
+
(g?.data?.app?.data?.pages || []).map(
|
|
317
208
|
(t) => t?.id
|
|
318
209
|
)
|
|
319
|
-
) :
|
|
320
|
-
|
|
210
|
+
) : g?.data?.app.pageIds || []).map((t) => /* @__PURE__ */ n(
|
|
211
|
+
ht,
|
|
321
212
|
{
|
|
322
|
-
to: `/apps/${
|
|
213
|
+
to: `/apps/${e}/pages/${t}?noRedirect=${G}`,
|
|
323
214
|
style: {
|
|
324
215
|
fontSize: 20,
|
|
325
216
|
display: "block",
|
|
@@ -331,6 +222,6 @@ const Ee = ({ to: r, children: l, style: v, ...A }) => {
|
|
|
331
222
|
)) }) });
|
|
332
223
|
};
|
|
333
224
|
export {
|
|
334
|
-
|
|
225
|
+
Ut as default
|
|
335
226
|
};
|
|
336
227
|
//# sourceMappingURL=EncoreApp.js.map
|