@coreframe/dashboard 0.4.0-next.4 → 3.0.0-beta.2

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.
Files changed (119) hide show
  1. package/README.md +23 -21
  2. package/dist/browser/api/client.js +1 -0
  3. package/dist/browser/api/contract.js +1 -0
  4. package/dist/browser/api/error-mapping.js +1 -0
  5. package/dist/browser/api/errors.js +1 -0
  6. package/dist/browser/api/paths.js +1 -0
  7. package/dist/browser/api/rouzer.js +1 -0
  8. package/dist/browser/api/validation.js +1 -0
  9. package/dist/{package → browser}/app-client.d.ts +4 -4
  10. package/dist/browser/app-client.js +1 -0
  11. package/dist/browser/plugins/diagnostics/api/contract.js +1 -0
  12. package/dist/browser/plugins/diagnostics/web/queries.js +1 -0
  13. package/dist/browser/plugins/diagnostics/web.d.ts +4 -0
  14. package/dist/browser/plugins/diagnostics/web.js +1 -0
  15. package/dist/browser/web/dashboard/dashboard-page.js +1 -0
  16. package/dist/browser/web/dashboard/dashboard-section.js +1 -0
  17. package/dist/browser/web/dashboard/dashboard.style.js +1 -0
  18. package/dist/browser/web/dashboard/deployed-dashboard-page.js +1 -0
  19. package/dist/browser/web/dashboard/findings.js +1 -0
  20. package/dist/browser/web/dashboard/worker-environment.js +1 -0
  21. package/dist/browser/web/root.style.js +1 -0
  22. package/dist/browser/web/styled-system/css/css.js +1 -0
  23. package/dist/browser/web/styled-system/css/cx.js +1 -0
  24. package/dist/browser/web/styled-system/css/merge-css.js +1 -0
  25. package/dist/browser/web/styled-system/helpers.js +1 -0
  26. package/dist/browser/web/styled-system/recipes/dashboard-button.js +1 -0
  27. package/dist/browser/web/styled-system/recipes/dashboard-confirm-dialog.js +1 -0
  28. package/dist/browser/web/styled-system/recipes/dashboard-empty-state.js +1 -0
  29. package/dist/browser/web/styled-system/recipes/dashboard-error-state.js +1 -0
  30. package/dist/browser/web/styled-system/recipes/dashboard-field.js +1 -0
  31. package/dist/browser/web/styled-system/recipes/dashboard-page.js +1 -0
  32. package/dist/browser/web/styled-system/recipes/dashboard-section.js +1 -0
  33. package/dist/browser/web/styled-system/recipes/dashboard-status.js +1 -0
  34. package/dist/browser/web/styled-system/recipes/dashboard-tabs.js +1 -0
  35. package/dist/{package → browser}/web/ui/index.d.ts +28 -14
  36. package/dist/browser/web/ui/index.js +1 -0
  37. package/dist/compiled/api/client.js +23 -0
  38. package/dist/compiled/api/contract.js +13 -0
  39. package/dist/compiled/api/error-mapping.js +12 -0
  40. package/dist/compiled/api/errors.js +18 -0
  41. package/dist/compiled/api/paths.js +9 -0
  42. package/dist/compiled/api/rouzer.js +22 -0
  43. package/dist/compiled/api/validation.js +22 -0
  44. package/dist/compiled/app/main.js +17 -0
  45. package/dist/compiled/app-client.js +179 -0
  46. package/dist/compiled/bamboo.css +2 -0
  47. package/dist/compiled/compiled-styles.js +1 -0
  48. package/dist/compiled/octane-client-build.json +8 -0
  49. package/dist/compiled/plugins/diagnostics/api/contract.js +10 -0
  50. package/dist/compiled/plugins/diagnostics/web/queries.js +12 -0
  51. package/dist/compiled/plugins/diagnostics/web.js +56 -0
  52. package/dist/compiled/web/dashboard/dashboard-page.js +356 -0
  53. package/dist/compiled/web/dashboard/dashboard-section.js +61 -0
  54. package/dist/compiled/web/dashboard/dashboard.style.js +50 -0
  55. package/dist/compiled/web/dashboard/deployed-dashboard-page.js +376 -0
  56. package/dist/compiled/web/dashboard/findings.js +393 -0
  57. package/dist/compiled/web/dashboard/worker-environment.js +187 -0
  58. package/dist/compiled/web/root.style.js +9 -0
  59. package/dist/compiled/web/styled-system/css/cx.js +41 -0
  60. package/dist/compiled/web/ui/index.js +1825 -0
  61. package/dist/compiled/web-shell/index.js +2 -0
  62. package/dist/compiled/web-shell/shell.js +335 -0
  63. package/dist/package/app/main.js +1 -0
  64. package/dist/package/build.d.ts +6 -23
  65. package/dist/package/build.js +3 -2
  66. package/dist/package/config.d.ts +3 -10
  67. package/dist/package/plugins/diagnostics/api/contract.d.ts +1 -1
  68. package/dist/package/plugins/diagnostics/api/contract.js +1 -1
  69. package/dist/package/shell.css +1 -0
  70. package/dist/package/web-shell/index.d.ts +2 -2
  71. package/dist/package/web-shell/index.js +1 -1
  72. package/dist/package/web-shell/shell.d.ts +12 -7
  73. package/dist/package/web-shell/shell.js +1 -1
  74. package/dist/package/worker.js +1 -1
  75. package/package.json +27 -26
  76. package/dist/package/app/empty.d.ts +0 -2
  77. package/dist/package/app/empty.js +0 -1
  78. package/dist/package/app/entry.client.js +0 -1
  79. package/dist/package/app/index-route.d.ts +0 -4
  80. package/dist/package/app/index-route.js +0 -1
  81. package/dist/package/app/index.d.ts +0 -5
  82. package/dist/package/app/index.js +0 -1
  83. package/dist/package/app/not-found.d.ts +0 -4
  84. package/dist/package/app/not-found.js +0 -1
  85. package/dist/package/app/root.d.ts +0 -12
  86. package/dist/package/app/root.js +0 -1
  87. package/dist/package/app/routes.d.ts +0 -6
  88. package/dist/package/app/routes.js +0 -1
  89. package/dist/package/app/shell.d.ts +0 -6
  90. package/dist/package/app/shell.js +0 -1
  91. package/dist/package/app-client.js +0 -1
  92. package/dist/package/plugins/diagnostics/web/queries.js +0 -1
  93. package/dist/package/plugins/diagnostics/web.d.ts +0 -4
  94. package/dist/package/plugins/diagnostics/web.js +0 -1
  95. package/dist/package/styled-css.js +0 -1
  96. package/dist/package/web/dashboard/dashboard-page.js +0 -1
  97. package/dist/package/web/dashboard/dashboard-section.js +0 -1
  98. package/dist/package/web/dashboard/dashboard.style.js +0 -1
  99. package/dist/package/web/dashboard/deployed-dashboard-page.js +0 -1
  100. package/dist/package/web/dashboard/findings.js +0 -1
  101. package/dist/package/web/dashboard/worker-environment.js +0 -1
  102. package/dist/package/web/root.style.js +0 -1
  103. package/dist/package/web/styled-system/css/conditions.js +0 -1
  104. package/dist/package/web/styled-system/css/css.js +0 -1
  105. package/dist/package/web/styled-system/css/cx.js +0 -1
  106. package/dist/package/web/styled-system/helpers.js +0 -1
  107. package/dist/package/web/styled-system/recipes/dashboard-button.js +0 -1
  108. package/dist/package/web/styled-system/recipes/dashboard-confirm-dialog.js +0 -1
  109. package/dist/package/web/styled-system/recipes/dashboard-empty-state.js +0 -1
  110. package/dist/package/web/styled-system/recipes/dashboard-error-state.js +0 -1
  111. package/dist/package/web/styled-system/recipes/dashboard-field.js +0 -1
  112. package/dist/package/web/styled-system/recipes/dashboard-page.js +0 -1
  113. package/dist/package/web/styled-system/recipes/dashboard-section.js +0 -1
  114. package/dist/package/web/styled-system/recipes/dashboard-status.js +0 -1
  115. package/dist/package/web/styled-system/recipes/dashboard-tabs.js +0 -1
  116. package/dist/package/web/styled-system/recipes/runtime.js +0 -1
  117. package/dist/package/web/ui/index.js +0 -1
  118. package/dist/package/web/ui/styles.js +0 -1
  119. /package/dist/package/app/{entry.client.d.ts → main.d.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ import { DashboardEmptyState as e, DashboardErrorBoundary as t, DashboardNotFound as n, DashboardShell as r } from "./shell.js";
2
+ export { e as DashboardEmptyState, t as DashboardErrorBoundary, n as DashboardNotFound, r as DashboardShell };
@@ -0,0 +1,335 @@
1
+ import { __s as e, bag10 as t, bag2 as n, bag4 as r, bagOf as i, child as a, clone as o, createScopedElement as s, createScopedValue as c, hookSlots as l, htext as u, htextSwap as d, positionalChildren as f, queueRefAttach as p, queueRefDetach as m, setAriaAttribute as h, setBooleanAttribute as g, setEventHandler as _, setStringData as v, setText as y, sibling as b, template as x, useEffect as S, useRef as C, useState as w, withSlot as T } from "octane";
2
+ import { __delegateEvents as E, bagChildHole as D, bagDone as O, bagHole as k, bagRecord as A, commitHole as j, createElementFromConfig as M, createHostElement as N, deferRecord as P, enableHostDescriptors as ee, isRenderCall as F, replaceRef as I, setEventSlot as L, setPlainAttribute as R, signalOwnerUse as z } from "octane/internal/client";
3
+ import { NavLink as B } from "@octane-xplat/ui";
4
+ import { RouteResourceNotFound as te, useNavigation as V, useRouteMatch as ne } from "@octane-xplat/ui/routing";
5
+ ee(), E(["click"], [112]);
6
+ var re = /* @__PURE__ */ x("<div class=coreframe-dashboard><button type=button class=coreframe-dashboard__toggle aria-controls=coreframe-dashboard-navigation><span aria-hidden=true> </span></button><button type=button class=coreframe-dashboard__backdrop aria-label=\"Close dashboard navigation\"></button><aside class=coreframe-dashboard__sidebar><nav id=coreframe-dashboard-navigation class=coreframe-dashboard__navigation aria-label=Dashboard><div class=coreframe-dashboard__brand aria-label=\"Coreframe Dashboard\"><span aria-hidden=true class=coreframe-dashboard__mark>C</span><span class=coreframe-dashboard__navigation-text>Coreframe</span></div><!></nav></aside><main class=coreframe-dashboard__main><!><!><div class=coreframe-dashboard__content>"), ie = /* @__PURE__ */ x("<section class=coreframe-dashboard__state aria-labelledby=dashboard-empty-title><p class=coreframe-dashboard__eyebrow>Dashboard</p><h1 id=dashboard-empty-title>No dashboard pages yet</h1><p>Add a page under <code>dashboard/pages/</code> or register a plugin in<!><code>dashboard.config.ts</code>."), ae = /* @__PURE__ */ x("<section class=coreframe-dashboard__state aria-labelledby=dashboard-not-found-title><p class=coreframe-dashboard__eyebrow>Coreframe Dashboard</p><h1 id=dashboard-not-found-title>Page not found</h1><p>The requested dashboard page does not exist.</p><!>"), oe = /* @__PURE__ */ x("<main class=coreframe-dashboard__state><p class=coreframe-dashboard__eyebrow>Coreframe Dashboard</p><h1> </h1><p></p><button class=coreframe-dashboard__button type=button>Try again</button> <!>"), H = /* @__PURE__ */ l(11), se = /* @__PURE__ */ Symbol(H), ce = /* @__PURE__ */ Symbol(H + 1), le = /* @__PURE__ */ Symbol(H + 2), U = /* @__PURE__ */ Symbol(H + 3), ue = /* @__PURE__ */ Symbol(H + 4), de = /* @__PURE__ */ Symbol(H + 5), fe = /* @__PURE__ */ Symbol(H + 6), pe = /* @__PURE__ */ Symbol(H + 7), W = /* @__PURE__ */ Symbol(H + 8), me = /* @__PURE__ */ Symbol(H + 9), he = /* @__PURE__ */ Symbol(H + 10), ge = [
7
+ "r",
8
+ "e",
9
+ "d",
10
+ "r",
11
+ "s",
12
+ "r"
13
+ ];
14
+ function _e(e, t, n) {
15
+ let r;
16
+ (r = t[0]) !== e && (v(e.b, "data-collapsed", r), e.a = r), (r = t[1]) !== e && (v(e.b, "data-drawer-open", r), e.c = r), (r = t[2]) !== e && (h(e.d, "aria-expanded", r), e.f = r), (r = t[3]) !== e && (h(e.d, "aria-label", r), e.g = r), (r = t[4]) !== e && (n ? L(e.d, "$oclick", r) : e.d.$oclick = r), (r = t[5]) !== e && (y(e.h, r), e.i = r), (r = t[6]) !== e && (R(e.k, "tabindex", r), e.j = r), (r = t[7]) !== e && (n ? L(e.k, "$oclick", r) : e.k.$oclick = r), (r = t[8]) !== e && (R(e.m, "role", r), e.l = r), (r = t[9]) !== e && (h(e.m, "aria-label", r), e.n = r), (r = t[10]) !== e && (h(e.m, "aria-modal", r), e.o = r), (r = t[11]) !== e && (h(e.m, "aria-hidden", r), e.p = r), (r = t[12]) !== e && (g(e.m, "inert", r), e.q = r), (r = t[13]) !== e && (R(e.r, "tabindex", r), e.t = r), (r = t[14]) !== e && (e.v = j(e, t[15], e.v, r), e.w = r), (r = t[16]) !== e && (e.z = j(e, t[17], e.z, r), e.A = r), (r = t[18]) !== e && (e.C = j(e, t[19], e.C, r), e.D = r), (r = t[20]) !== e && (e.F = j(e, t[21], e.F, r), e.G = r);
17
+ }
18
+ var ve = /* @__PURE__ */ e(function(e, t, n) {
19
+ let r = t.slots[0], s = null;
20
+ if (r === void 0) {
21
+ let n, s, c, l, d, f, y, x = o(re), S = a(x);
22
+ p(t, n = e.h2, S), (t.cleanups ??= []).push(() => r && m(r.e, r.d)), _(S, "$oclick", e.h5), s = u(a(S), c = e.h6, 1);
23
+ let C = b(S);
24
+ _(C, "$oclick", e.h8);
25
+ let w = b(C), T = a(w);
26
+ p(t, l = e.h14, T), (t.cleanups ??= []).push(() => r && m(r.s, r.r)), d = b(a(T));
27
+ let E = b(w), D = a(E);
28
+ f = D;
29
+ let O = b(D);
30
+ y = O;
31
+ let k = b(O);
32
+ r = i(t, x, {
33
+ a: void 0,
34
+ b: x,
35
+ c: void 0,
36
+ d: S,
37
+ e: n,
38
+ f: void 0,
39
+ g: void 0,
40
+ h: s,
41
+ i: c,
42
+ j: void 0,
43
+ k: C,
44
+ l: void 0,
45
+ m: w,
46
+ n: void 0,
47
+ o: void 0,
48
+ p: void 0,
49
+ q: void 0,
50
+ r: T,
51
+ s: l,
52
+ t: void 0,
53
+ u: d,
54
+ v: null,
55
+ w: t,
56
+ x: E,
57
+ y: f,
58
+ z: null,
59
+ A: t,
60
+ B: y,
61
+ C: null,
62
+ D: t,
63
+ E: k,
64
+ F: null,
65
+ G: t,
66
+ $: 22,
67
+ next: _e
68
+ }), t.refFields = ge;
69
+ {
70
+ let t = e.h0;
71
+ v(r.b, "data-collapsed", t), r.a = t;
72
+ }
73
+ {
74
+ let t = e.h1;
75
+ v(r.b, "data-drawer-open", t), r.c = t;
76
+ }
77
+ {
78
+ let t = e.h3;
79
+ h(r.d, "aria-expanded", t), r.f = t;
80
+ }
81
+ {
82
+ let t = e.h4;
83
+ h(r.d, "aria-label", t), r.g = t;
84
+ }
85
+ {
86
+ let t = e.h7;
87
+ R(r.k, "tabindex", t), r.j = t;
88
+ }
89
+ {
90
+ let t = e.h9;
91
+ R(r.m, "role", t), r.l = t;
92
+ }
93
+ {
94
+ let t = e.h10;
95
+ h(r.m, "aria-label", t), r.n = t;
96
+ }
97
+ {
98
+ let t = e.h11;
99
+ h(r.m, "aria-modal", t), r.o = t;
100
+ }
101
+ {
102
+ let t = e.h12;
103
+ h(r.m, "aria-hidden", t), r.p = t;
104
+ }
105
+ {
106
+ let t = e.h13;
107
+ g(r.m, "inert", t), r.q = t;
108
+ }
109
+ {
110
+ let t = e.h15;
111
+ R(r.r, "tabindex", t), r.t = t;
112
+ }
113
+ } else {
114
+ let n = r.$ > 255, i = z.active;
115
+ {
116
+ let n = e.h2;
117
+ n !== r.e && (r.e = I(t, r.e, n, r.d));
118
+ }
119
+ {
120
+ let a = e.h5;
121
+ i && _(r.d), (n || a !== r.d.$oclick) && (s = A(t, s, 4, a, r.d.$oclick));
122
+ }
123
+ {
124
+ let i = e.h6;
125
+ (i !== r.i || n) && (s = A(t, s, 5, i, r.i));
126
+ }
127
+ {
128
+ let a = e.h8;
129
+ i && _(r.k), (n || a !== r.k.$oclick) && (s = A(t, s, 7, a, r.k.$oclick));
130
+ }
131
+ {
132
+ let n = e.h14;
133
+ n !== r.s && (r.s = I(t, r.s, n, r.r));
134
+ }
135
+ {
136
+ let i = e.h0;
137
+ (i !== r.a || n) && (s = A(t, s, 0, i, r.a));
138
+ }
139
+ {
140
+ let i = e.h1;
141
+ (i !== r.c || n) && (s = A(t, s, 1, i, r.c));
142
+ }
143
+ {
144
+ let i = e.h3;
145
+ (i !== r.f || n) && (s = A(t, s, 2, i, r.f));
146
+ }
147
+ {
148
+ let i = e.h4;
149
+ (i !== r.g || n) && (s = A(t, s, 3, i, r.g));
150
+ }
151
+ {
152
+ let i = e.h7;
153
+ (i !== r.j || n) && (s = A(t, s, 6, i, r.j));
154
+ }
155
+ {
156
+ let i = e.h9;
157
+ (i !== r.l || n) && (s = A(t, s, 8, i, r.l));
158
+ }
159
+ {
160
+ let i = e.h10;
161
+ (i !== r.n || n) && (s = A(t, s, 9, i, r.n));
162
+ }
163
+ {
164
+ let i = e.h11;
165
+ (i !== r.o || n) && (s = A(t, s, 10, i, r.o));
166
+ }
167
+ {
168
+ let i = e.h12;
169
+ (i !== r.p || n) && (s = A(t, s, 11, i, r.p));
170
+ }
171
+ {
172
+ let i = e.h13;
173
+ (i !== r.q || n) && (s = A(t, s, 12, i, r.q));
174
+ }
175
+ {
176
+ let i = e.h15;
177
+ (i !== r.t || n) && (s = A(t, s, 13, i, r.t));
178
+ }
179
+ }
180
+ r.$ >> 8 == 1 && (O(t, r), r.$ < 256 && (s = null)), s = k(r, s, 14, e.h16, r.w, r.v, t, 1, r.r, r.u, !0), s = k(r, s, 16, e.h17, r.A, r.z, t, 2, r.x, r.y, !0), s = k(r, s, 18, e.h18, r.D, r.C, t, 3, r.x, r.B, !0), s = D(r, s, 20, e.h19, r.G, r.F, t, 4, r.E), r.$ >> 8 == 1 && O(t, r);
181
+ });
182
+ function G(e, t, n, r, i, a, o, l, u, d, p, m) {
183
+ return M("r:", ve, {
184
+ h0: !i && r ? "true" : "false",
185
+ h1: i && a ? "true" : "false",
186
+ h2: m,
187
+ h3: n,
188
+ h4: n ? "Collapse dashboard navigation" : "Expand dashboard navigation",
189
+ h5: p,
190
+ h6: n ? "←" : "☰",
191
+ h7: i && a ? 0 : -1,
192
+ h8: () => d(!1),
193
+ h9: i ? "dialog" : void 0,
194
+ h10: i ? "Dashboard navigation" : void 0,
195
+ h11: i && a ? !0 : void 0,
196
+ h12: i && !a ? !0 : void 0,
197
+ h13: i && !a ? !0 : void 0,
198
+ h14: l,
199
+ h15: i ? -1 : void 0,
200
+ h16: u.length > 0 ? s("ul", { className: "coreframe-dashboard__navigation-list" }, () => u.map((e) => s("li", { key: e.id }, () => c(() => s(B, {
201
+ className: "coreframe-dashboard__navigation-link",
202
+ activeClassName: "coreframe-dashboard__navigation-link--active",
203
+ to: $(`/${e.path}`),
204
+ onPress: () => d(!1)
205
+ }, () => f([N("span", {
206
+ "aria-hidden": "true",
207
+ className: "coreframe-dashboard__navigation-dot"
208
+ }), s("span", { className: "coreframe-dashboard__navigation-text" }, () => e.title)]), "c:57ef223a"))))) : N("p", { className: "coreframe-dashboard__navigation-empty" }, "No pages"),
209
+ h17: e ? s("header", { className: "coreframe-dashboard__page-header" }, () => f([
210
+ N("p", { className: "coreframe-dashboard__eyebrow" }, "Dashboard"),
211
+ s("h1", {}, () => e.title),
212
+ e.description ? s("p", {}, () => e.description) : null
213
+ ])) : null,
214
+ h18: o.status === "pending" ? N("div", {
215
+ className: "coreframe-dashboard__pending",
216
+ role: "status"
217
+ }, "Loading page…") : null,
218
+ h19: t
219
+ });
220
+ }
221
+ function ye(e, t) {
222
+ let n;
223
+ (n = t[0]) !== e && (y(e.a, n), e.b = n);
224
+ }
225
+ var be = /* @__PURE__ */ e(function(e, t, r) {
226
+ let i = t.slots[0], s = null;
227
+ if (i === void 0) {
228
+ let r, s, c = o(ie);
229
+ r = d(b(a(b(a(c), 2)), 3), s = e.h0), i = n(t, c, r, s, 1, ye);
230
+ } else {
231
+ let n = i.$ > 255;
232
+ {
233
+ let r = e.h0;
234
+ (r !== i.b || n) && (s = A(t, s, 0, r, i.b));
235
+ }
236
+ }
237
+ i.$ >> 8 == 1 && O(t, i);
238
+ });
239
+ function K() {
240
+ return M("r:", be, { h0: " " });
241
+ }
242
+ function xe(e, t) {
243
+ let n;
244
+ (n = t[0]) !== e && (e.c = j(e, t[1], e.c, n), e.d = n);
245
+ }
246
+ var Se = /* @__PURE__ */ e(function(e, t, n) {
247
+ let i = t.slots[0], s = null;
248
+ if (i === void 0) {
249
+ let e, n = o(ae);
250
+ e = b(a(n), 3), i = r(t, n, n, e, null, t, 2, xe);
251
+ }
252
+ s = k(i, s, 0, e.h0, i.d, i.c, t, 1, i.a, i.b, !0), i.$ >> 8 == 1 && O(t, i);
253
+ });
254
+ function q() {
255
+ return M("r:", Se, { h0: M("c:10f1ee08", B, {
256
+ className: "coreframe-dashboard__button",
257
+ to: $("/")
258
+ }, ["Go to dashboard"]) });
259
+ }
260
+ function Ce(e, t, n) {
261
+ let r;
262
+ (r = t[0]) !== e && (y(e.a, r), e.b = r), (r = t[1]) !== e && (n ? L(e.c, "$oclick", r) : e.c.$oclick = r), (r = t[2]) !== e && (e.e = j(e, t[3], e.e, r), e.f = r), (r = t[4]) !== e && (e.i = j(e, t[5], e.i, r), e.j = r);
263
+ }
264
+ var we = /* @__PURE__ */ e(function(e, n, r) {
265
+ let i = n.slots[0], s = null;
266
+ if (i === void 0) {
267
+ let r, s, c, l = o(oe), d = b(a(l));
268
+ r = u(d, s = e.h0, 1);
269
+ let f = b(d, 2);
270
+ _(f, "$oclick", e.h2);
271
+ let p = b(d);
272
+ c = b(f, 2), i = t(n, l, r, s, f, p, null, n, l, c, null, n, 6, Ce);
273
+ } else {
274
+ let t = i.$ > 255, r = z.active;
275
+ {
276
+ let r = e.h0;
277
+ (r !== i.b || t) && (s = A(n, s, 0, r, i.b));
278
+ }
279
+ {
280
+ let a = e.h2;
281
+ r && _(i.c), (t || a !== i.c.$oclick) && (s = A(n, s, 1, a, i.c.$oclick));
282
+ }
283
+ }
284
+ i.$ >> 8 == 1 && (O(n, i), i.$ < 256 && (s = null)), s = D(i, s, 2, e.h1, i.f, i.e, n, 1, i.d), s = k(i, s, 4, e.h3, i.j, i.i, n, 2, i.g, i.h, !0), i.$ >> 8 == 1 && O(n, i);
285
+ });
286
+ function J(e, t, n) {
287
+ return M("r:", we, {
288
+ h0: t ? "Page not found" : "Dashboard unavailable",
289
+ h1: e,
290
+ h2: () => n(),
291
+ h3: M("c:f177f408", B, {
292
+ className: "coreframe-dashboard__button",
293
+ to: $("/")
294
+ }, ["Go to dashboard"])
295
+ });
296
+ }
297
+ function Y({ children: e, pages: t }, n = void 0) {
298
+ let r = T(se, ne), i = T(ce, V), [a, o] = w(() => globalThis.window !== void 0 && globalThis.matchMedia("(max-width: 47.999rem)").matches, le), [s, c] = w(!1, U), [l, u] = w(!1, ue), d = C(null, de), f = C(null, fe), p = C(!1, pe), m = Te(t, r?.to);
299
+ S(() => {
300
+ let e = globalThis.matchMedia("(max-width: 47.999rem)"), t = () => o(e.matches);
301
+ return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
302
+ }, [], W), S(() => {
303
+ a && (s ? f.current?.focus() : p.current && d.current?.focus(), p.current = s);
304
+ }, [a, s], me), S(() => {
305
+ if (!s) return;
306
+ let e = (e) => {
307
+ e.key === "Escape" && c(!1);
308
+ };
309
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
310
+ }, [s], he);
311
+ let h = a ? s : !l, g = () => {
312
+ a ? c((e) => !e) : u((e) => !e);
313
+ };
314
+ return F(n) ? G(m, e, h, l, a, s, i, f, t, c, g, d) : P(G, m, e, h, l, a, s, i, f, t, c, g, d);
315
+ }
316
+ function X(e = void 0, t = void 0) {
317
+ return F(t) ? K() : P(K);
318
+ }
319
+ function Z(e = void 0, t = void 0) {
320
+ return F(t) ? q() : P(q);
321
+ }
322
+ function Q({ error: e, reset: t }, n = void 0) {
323
+ let r = e instanceof te, i = r ? "The requested dashboard page does not exist." : "The dashboard hit an unexpected error.";
324
+ return F(n) ? J(i, r, t) : P(J, i, r, t);
325
+ }
326
+ function $(e) {
327
+ return e;
328
+ }
329
+ function Te(e, t) {
330
+ let n = t?.split("/").filter(Boolean)[0];
331
+ return e.find((e) => e.path === n) ?? (n ? void 0 : e[0]);
332
+ }
333
+ Y.$$singleRoot = !0, X.$$singleRoot = !0, Z.$$singleRoot = !0, Q.$$singleRoot = !0;
334
+ //#endregion
335
+ export { X as DashboardEmptyState, Q as DashboardErrorBoundary, Z as DashboardNotFound, Y as DashboardShell };
@@ -0,0 +1 @@
1
+ import{DashboardNotFound as e,DashboardShell as t}from"../web-shell/shell.js";import"../web-shell/index.js";import{__createRootDefaultOptions as n,createElementFromConfig as r,enableHostDescriptors as i}from"octane/internal/client";import{createScopedElement as a,createScopedValue as o}from"octane";import{RouteOutlet as s}from"@octane-xplat/ui";import{RouterProvider as c,configureRouter as l,router as u}from"@octane-xplat/ui/routing";import{dashboardManifest as d}from"virtual:coreframe-internal/dashboard/manifest";import{dashboardRoutes as f}from"virtual:coreframe-internal/dashboard/routes";import"virtual:coreframe-internal/dashboard/styles";i(),l({catalog:f,base:`/__dashboard`});const p=document.getElementById(`root`);if(!p)throw Error(`Dashboard root element is missing.`);n(p).render(o(()=>a(c,{router:u},()=>o(()=>a(t,{pages:d},()=>a(s,{},()=>r(`c:171be646`,e,{}),`c:76b85529`),`c:e325a9e9`)),`c:0b0a7fac`)));export{};
@@ -8,30 +8,12 @@ interface DiscoverDashboardPagesOptions {
8
8
  interface ComposeDashboardManifestOptions {
9
9
  environment?: DashboardEnvironment;
10
10
  }
11
- interface DashboardRouteCompositionOptions {
12
- /** App-owned route module that renders `DashboardShell`. */
13
- shellRoute: string;
14
- /** App-owned index route that redirects to the manifest's first page. */
15
- indexRoute: string;
16
- /** App-owned route shown when the manifest has no pages. */
17
- emptyRoute: string;
18
- /** Optional app-owned catch-all route. */
19
- notFoundRoute?: string;
20
- }
21
11
  interface ResolveDashboardRouteModulesOptions {
22
12
  /** App-owned dashboard directory containing `dashboard.config.ts` and `pages/`. */
23
13
  dashboardDirectory?: string;
24
14
  /** Project root used to resolve package-owned plugin route modules. */
25
15
  projectRoot?: string;
26
16
  }
27
- /** Structural subset accepted by React Router's framework `RouteConfig`. */
28
- interface DashboardRouteConfigEntry {
29
- id?: string;
30
- path?: string;
31
- index?: boolean;
32
- file: string;
33
- children?: DashboardRouteConfigEntry[];
34
- }
35
17
  type DashboardPluginTarget = "local" | "deployed";
36
18
  interface DashboardPluginTargetEntry {
37
19
  pluginId: string;
@@ -50,11 +32,12 @@ declare function composeDashboardPluginTarget(config: DashboardConfig, target: D
50
32
  /** Renders a virtual module for exactly one runtime target. */
51
33
  declare function renderDashboardPluginTargetModule(entries: readonly DashboardPluginTargetEntry[]): string;
52
34
  /**
53
- * Creates ordinary React Router framework-mode route config for an app-owned dashboard. All file
54
- * references remain app-controlled route modules.
35
+ * Renders the browser route catalog module for the composed dashboard pages. Each page module is
36
+ * code-split through `lazy`; the index route redirects to the first page or renders the empty
37
+ * state when the manifest has none. Generated code is plain JavaScript — no type annotations.
55
38
  */
56
- declare function composeDashboardRoutes(pages: readonly DashboardPageManifestEntry[], options: DashboardRouteCompositionOptions): DashboardRouteConfigEntry[];
57
- /** Resolves manifest route references to files that React Router can import from its route graph. */
39
+ declare function renderDashboardRoutesModule(pages: readonly DashboardPageManifestEntry[]): string;
40
+ /** Resolves manifest route references to files the dashboard Vite build can import. */
58
41
  declare function resolveDashboardRouteModules(pages: readonly DashboardPageManifestEntry[], options?: ResolveDashboardRouteModulesOptions): DashboardPageManifestEntry[];
59
42
  /** Resolves a dashboard module from the app directory or the project's installed packages. */
60
43
  declare function resolveDashboardModuleReference(moduleReference: string, options?: ResolveDashboardRouteModulesOptions): string;
@@ -63,4 +46,4 @@ declare class DashboardCompositionError extends Error {
63
46
  constructor(file: string, message: string, cause?: unknown);
64
47
  }
65
48
  //#endregion
66
- export { ComposeDashboardManifestOptions, DashboardCompositionError, type DashboardPageManifestEntry, DashboardPluginTarget, DashboardPluginTargetEntry, DashboardRouteCompositionOptions, DashboardRouteConfigEntry, DiscoverDashboardPagesOptions, ResolveDashboardRouteModulesOptions, composeDashboardManifest, composeDashboardPluginTarget, composeDashboardRoutes, discoverDashboardPages, renderDashboardPluginTargetModule, resolveDashboardModuleReference, resolveDashboardRouteModules };
49
+ export { ComposeDashboardManifestOptions, DashboardCompositionError, type DashboardPageManifestEntry, DashboardPluginTarget, DashboardPluginTargetEntry, DiscoverDashboardPagesOptions, ResolveDashboardRouteModulesOptions, composeDashboardManifest, composeDashboardPluginTarget, discoverDashboardPages, renderDashboardPluginTargetModule, renderDashboardRoutesModule, resolveDashboardModuleReference, resolveDashboardRouteModules };
@@ -1,3 +1,4 @@
1
- import{getDashboardPluginBuild as e}from"./config.js";import{createRequire as t}from"node:module";import{readFile as n,readdir as r}from"node:fs/promises";import{isAbsolute as i,join as a,resolve as o}from"node:path";import{parseDocument as s}from"yaml";import{z as c}from"zod";const l=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,u=c.object({title:c.string().trim().min(1,`title must not be empty`).optional(),description:c.string().trim().min(1,`description must not be empty`).optional(),layout:c.enum([`default`,`standalone`]).optional()}).strict(),d=c.object({id:c.string(),path:c.string(),title:c.string(),description:c.string().optional(),layout:c.enum([`default`,`standalone`]).optional(),routeModule:c.string(),environments:c.array(c.enum([`local`,`deployed`])).optional()}).strict(),f=c.string().trim().min(1,`module reference must not be empty`),p=c.object({path:c.string(),title:c.string(),description:c.string().optional(),environments:c.array(c.enum([`local`,`deployed`])).optional()}).strict(),m=c.object({document:f.optional(),plugins:c.array(c.object({id:c.string(),navigation:p,pageModule:f,api:c.unknown().optional()}).strict()).optional()}).strict();async function h(e={}){let t=a(o(e.dashboardDirectory??a(process.cwd(),`dashboard`)),`pages`),i;try{i=await r(t,{withFileTypes:!0})}catch(e){if(N(e)&&e.code===`ENOENT`)return[];throw new S(t,`could not read the pages directory`,e)}let s=i.filter(e=>e.isDirectory()&&!e.name.startsWith(`.`)).sort((e,t)=>M(e.name,t.name));return Promise.all(s.map(async({name:e})=>{let r=a(t,e);A(e,r,`page directory`);let i=a(r,`route.tsx`);try{await n(i)}catch(e){throw N(e)&&e.code===`ENOENT`?new S(i,`missing required React Router route.tsx`):new S(i,`could not read route.tsx`,e)}let o=await C(a(r,`page.yaml`));return{id:e,path:e,title:o?.title??j(e),...o?.description?{description:o.description}:{},...o?.layout?{layout:o.layout}:{},routeModule:`pages/${e}/route.tsx`}}))}function g(e,t,n={}){let r=n.environment??`local`,i=new Set,a=[],o=O(e);for(let e of o.plugins??[]){if(A(e.id,`dashboard.config.ts plugin "${e.id}"`,`plugin id`),i.has(e.id))throw new S(`dashboard.config.ts`,`duplicate plugin id "${e.id}"`);i.add(e.id);let t=T(e,`plugin`,r);t&&a.push(t)}let s=t.map(e=>({page:e,normalizedPage:w(e,`app`)})).sort((e,t)=>M(e.normalizedPage.path,t.normalizedPage.path));for(let{page:e,normalizedPage:t}of s)D(e,r)&&a.push(t);return E(a),a}function _(e,t){let n=O(e),r=new Set,i=[];for(let e of n.plugins??[]){if(A(e.id,`dashboard.config.ts plugin "${e.id}"`,`plugin id`),r.has(e.id))throw new S(`dashboard.config.ts`,`duplicate plugin id "${e.id}"`);if(r.add(e.id),!e.api)continue;let n=k(e,`dashboard API`),a=t===`local`?n.localImplementationModule:n.deployedImplementationModule;a&&i.push({pluginId:e.id,apiModule:n.apiModule,implementationModule:a})}return i}function v(e){let t=[],n=[];for(let[r,i]of e.entries())t.push(`import api${r} from ${JSON.stringify(i.apiModule)}`,`import { createImplementation as createImplementation${r} } from ${JSON.stringify(i.implementationModule)}`),n.push(`{ api: api${r}, createImplementation: createImplementation${r} }`);return`${t.join(`
1
+ import{getDashboardPluginBuild as e}from"./config.js";import{createRequire as t}from"node:module";import{readFile as n,readdir as r}from"node:fs/promises";import{isAbsolute as i,join as a,resolve as o}from"node:path";import{parseDocument as s}from"yaml";import{z as c}from"zod";const l=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,u=c.object({title:c.string().trim().min(1,`title must not be empty`).optional(),description:c.string().trim().min(1,`description must not be empty`).optional()}).strict(),d=c.object({id:c.string(),path:c.string(),title:c.string(),description:c.string().optional(),routeModule:c.string(),environments:c.array(c.enum([`local`,`deployed`])).optional()}).strict(),f=c.string().trim().min(1,`module reference must not be empty`),p=c.object({path:c.string(),title:c.string(),description:c.string().optional(),environments:c.array(c.enum([`local`,`deployed`])).optional()}).strict(),m=c.object({plugins:c.array(c.object({id:c.string(),navigation:p,pageModule:f,api:c.unknown().optional()}).strict()).optional()}).strict();async function h(e={}){let t=a(o(e.dashboardDirectory??a(process.cwd(),`dashboard`)),`pages`),i;try{i=await r(t,{withFileTypes:!0})}catch(e){if(P(e)&&e.code===`ENOENT`)return[];throw new S(t,`could not read the pages directory`,e)}let s=i.filter(e=>e.isDirectory()&&!e.name.startsWith(`.`)).sort((e,t)=>N(e.name,t.name));return Promise.all(s.map(async({name:e})=>{let r=a(t,e);A(e,r,`page directory`);let i=a(r,`route.tsx`);try{await n(i)}catch(e){throw P(e)&&e.code===`ENOENT`?new S(i,`missing required route.tsx page module`):new S(i,`could not read route.tsx`,e)}let o=await C(a(r,`page.yaml`));return{id:e,path:e,title:o?.title??M(e),...o?.description?{description:o.description}:{},routeModule:`pages/${e}/route.tsx`}}))}function g(e,t,n={}){let r=n.environment??`local`,i=new Set,a=[],o=O(e);for(let e of o.plugins??[]){if(A(e.id,`dashboard.config.ts plugin "${e.id}"`,`plugin id`),i.has(e.id))throw new S(`dashboard.config.ts`,`duplicate plugin id "${e.id}"`);i.add(e.id);let t=T(e,`plugin`,r);t&&a.push(t)}let s=t.map(e=>({page:e,normalizedPage:w(e,`app`)})).sort((e,t)=>N(e.normalizedPage.path,t.normalizedPage.path));for(let{page:e,normalizedPage:t}of s)D(e,r)&&a.push(t);return E(a),a}function _(e,t){let n=O(e),r=new Set,i=[];for(let e of n.plugins??[]){if(A(e.id,`dashboard.config.ts plugin "${e.id}"`,`plugin id`),r.has(e.id))throw new S(`dashboard.config.ts`,`duplicate plugin id "${e.id}"`);if(r.add(e.id),!e.api)continue;let n=k(e,`dashboard API`),a=t===`local`?n.localImplementationModule:n.deployedImplementationModule;a&&i.push({pluginId:e.id,apiModule:n.apiModule,implementationModule:a})}return i}function v(e){let t=[],n=[];for(let[r,i]of e.entries())t.push(`import api${r} from ${JSON.stringify(i.apiModule)}`,`import { createImplementation as createImplementation${r} } from ${JSON.stringify(i.implementationModule)}`),n.push(`{ api: api${r}, createImplementation: createImplementation${r} }`);return`${t.join(`
2
2
  `)}\n\nexport const dashboardPlugins = [\n${n.map(e=>` ${e},`).join(`
3
- `)}\n]\n`}function y(e,t){let n=[e.length>0?{index:!0,file:t.indexRoute}:{index:!0,file:t.emptyRoute},...e.map(e=>({id:`dashboard-page-${e.id}`,path:e.path,file:e.routeModule})),...t.notFoundRoute?[{path:`*`,file:t.notFoundRoute}]:[]];return[{id:`dashboard-shell`,file:t.shellRoute,children:n}]}function b(e,t={}){let n=o(t.dashboardDirectory??a(process.cwd(),`dashboard`));return e.map(e=>({...e,routeModule:e.source===`app`?o(n,e.routeModule):x(e.routeModule,t)}))}function x(e,n={}){let r=o(n.dashboardDirectory??a(process.cwd(),`dashboard`)),s=t(a(o(n.projectRoot??a(r,`..`)),`package.json`));if(i(e)||e.startsWith(`.`))return o(r,e);try{return s.resolve(e)}catch(t){throw new S(e,`could not resolve dashboard module`,t)}}var S=class extends Error{file;constructor(e,t,n){super(`${e}: ${t}`,{cause:n}),this.name=`DashboardCompositionError`,this.file=e}};async function C(e){let t;try{t=await n(e,`utf8`)}catch(t){if(N(t)&&t.code===`ENOENT`)return;throw new S(e,`could not read page metadata`,t)}let r=s(t,{prettyErrors:!0,strict:!0,uniqueKeys:!0});if(r.errors.length>0)throw new S(e,r.errors[0]?.message??`invalid YAML`);let i=u.safeParse(r.toJS());if(!i.success)throw new S(e,c.prettifyError(i.error));return i.data}function w(e,t,n){let r=t===`plugin`?`dashboard.config.ts plugin "${n??`unknown`}" page "${e.id}"`:e.routeModule,i=d.safeParse(e);if(!i.success)throw new S(r,c.prettifyError(i.error));let a=i.data;A(a.id,r,`page id`),A(a.path,r,`page path`);let o=a.title.trim();if(!o)throw new S(r,`page title must not be empty`);if(!a.routeModule.trim())throw new S(r,`page routeModule must not be empty`);let s=a.description?.trim();if(a.description!==void 0&&!s)throw new S(r,`page description must not be empty`);return{id:a.id,path:a.path,title:o,...s?{description:s}:{},...a.layout?{layout:a.layout}:{},routeModule:a.routeModule,source:t,...n?{pluginId:n}:{}}}function T(e,t,n){let r=`dashboard.config.ts plugin "${e.id}"`,i=p.safeParse(e.navigation);if(!i.success)throw new S(r,c.prettifyError(i.error));let a=i.data;if(A(e.id,r,`plugin id`),A(a.path,r,`navigation path`),!a.title.trim())throw new S(r,`navigation title must not be empty`);if(a.description!==void 0&&!a.description.trim())throw new S(r,`navigation description must not be empty`);if(!e.pageModule.trim())throw new S(r,`pageModule must not be empty`);if(!(a.environments&&!a.environments.includes(n))){if(e.api){let t=k(e,`dashboard API`);if(n===`local`&&!t.localImplementationModule||n===`deployed`&&!t.deployedImplementationModule)return}return w({id:e.id,path:a.path,title:a.title,...a.description?{description:a.description}:{},routeModule:e.pageModule,...a.environments?{environments:a.environments}:{}},t,e.id)}}function E(e){let t=new Map,n=new Map;for(let r of e){let e=t.get(r.id);if(e)throw new S(r.routeModule,`duplicate page id "${r.id}" also contributed by ${e.routeModule}`);t.set(r.id,r);let i=n.get(r.path);if(i)throw new S(r.routeModule,`duplicate page path "${r.path}" also contributed by ${i.routeModule}`);n.set(r.path,r)}}function D(e,t){return e.environments?e.environments.includes(t):!0}function O(e){let t=m.safeParse(e);if(!t.success)throw new S(`dashboard.config.ts`,c.prettifyError(t.error));return e}function k(t,n){let r=e(t);if(!r)throw new S(`dashboard.config.ts plugin "${t.id}"`,`${n} is missing its package-owned build descriptor`);if(t.api&&t.api.id!==t.id)throw new S(`dashboard.config.ts plugin "${t.id}"`,`API id "${t.api.id}" does not match the plugin id`);for(let e of[`apiModule`,`localImplementationModule`]){let n=r[e];if(typeof n!=`string`||!n.trim())throw new S(`dashboard.config.ts plugin "${t.id}"`,`build descriptor field "${e}" must be a non-empty module reference`)}if(r.deployedImplementationModule!==void 0&&(typeof r.deployedImplementationModule!=`string`||!r.deployedImplementationModule.trim()))throw new S(`dashboard.config.ts plugin "${t.id}"`,`build descriptor field "deployedImplementationModule" must be a non-empty module reference`);return r}function A(e,t,n){if(!l.test(e))throw new S(t,`${n} "${e}" must contain only lowercase letters, numbers, and single hyphens`)}function j(e){let t=e.split(`-`).join(` `);return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function M(e,t){return e<t?-1:+(e>t)}function N(e){return e instanceof Error&&`code`in e}export{S as DashboardCompositionError,g as composeDashboardManifest,_ as composeDashboardPluginTarget,y as composeDashboardRoutes,h as discoverDashboardPages,v as renderDashboardPluginTargetModule,x as resolveDashboardModuleReference,b as resolveDashboardRouteModules};
3
+ `)}\n]\n`}function y(e){return[`import { lazy } from "octane"`,`import { defineRoute, defineRoutes, redirect } from "@octane-xplat/ui/routing"`,`import { DashboardEmptyState, DashboardErrorBoundary, DashboardNotFound } from "@coreframe/dashboard/web"`,``,`export const dashboardRoutes = defineRoutes({`,` routes: [`,...[e.length>0?`defineRoute({ path: "", beforeLoad: () => redirect({ to: ${JSON.stringify(`/${e[0].path}`)} }) }).screen(DashboardNotFound)`:`defineRoute({ path: "", head: { title: "Dashboard" } }).screen(DashboardEmptyState)`,...e.map(e=>`defineRoute({ path: ${JSON.stringify(e.path)}, head: { title: ${JSON.stringify(e.title)} }, errorBoundary: DashboardErrorBoundary }).screen(lazy(() => import(${JSON.stringify(j(e.routeModule))})))`)].map(e=>` ${e},`),` ],`,`})`,``].join(`
4
+ `)}function b(e,t={}){let n=o(t.dashboardDirectory??a(process.cwd(),`dashboard`));return e.map(e=>({...e,routeModule:e.source===`app`?o(n,e.routeModule):x(e.routeModule,t)}))}function x(e,n={}){let r=o(n.dashboardDirectory??a(process.cwd(),`dashboard`)),s=t(a(o(n.projectRoot??a(r,`..`)),`package.json`));if(i(e)||e.startsWith(`.`))return o(r,e);try{return s.resolve(e)}catch(t){throw new S(e,`could not resolve dashboard module`,t)}}var S=class extends Error{file;constructor(e,t,n){super(`${e}: ${t}`,{cause:n}),this.name=`DashboardCompositionError`,this.file=e}};async function C(e){let t;try{t=await n(e,`utf8`)}catch(t){if(P(t)&&t.code===`ENOENT`)return;throw new S(e,`could not read page metadata`,t)}let r=s(t,{prettyErrors:!0,strict:!0,uniqueKeys:!0});if(r.errors.length>0)throw new S(e,r.errors[0]?.message??`invalid YAML`);let i=u.safeParse(r.toJS());if(!i.success)throw new S(e,c.prettifyError(i.error));return i.data}function w(e,t,n){let r=t===`plugin`?`dashboard.config.ts plugin "${n??`unknown`}" page "${e.id}"`:e.routeModule,i=d.safeParse(e);if(!i.success)throw new S(r,c.prettifyError(i.error));let a=i.data;A(a.id,r,`page id`),A(a.path,r,`page path`);let o=a.title.trim();if(!o)throw new S(r,`page title must not be empty`);if(!a.routeModule.trim())throw new S(r,`page routeModule must not be empty`);let s=a.description?.trim();if(a.description!==void 0&&!s)throw new S(r,`page description must not be empty`);return{id:a.id,path:a.path,title:o,...s?{description:s}:{},routeModule:a.routeModule,source:t,...n?{pluginId:n}:{}}}function T(e,t,n){let r=`dashboard.config.ts plugin "${e.id}"`,i=p.safeParse(e.navigation);if(!i.success)throw new S(r,c.prettifyError(i.error));let a=i.data;if(A(e.id,r,`plugin id`),A(a.path,r,`navigation path`),!a.title.trim())throw new S(r,`navigation title must not be empty`);if(a.description!==void 0&&!a.description.trim())throw new S(r,`navigation description must not be empty`);if(!e.pageModule.trim())throw new S(r,`pageModule must not be empty`);if(!(a.environments&&!a.environments.includes(n))){if(e.api){let t=k(e,`dashboard API`);if(n===`local`&&!t.localImplementationModule||n===`deployed`&&!t.deployedImplementationModule)return}return w({id:e.id,path:a.path,title:a.title,...a.description?{description:a.description}:{},routeModule:e.pageModule,...a.environments?{environments:a.environments}:{}},t,e.id)}}function E(e){let t=new Map,n=new Map;for(let r of e){let e=t.get(r.id);if(e)throw new S(r.routeModule,`duplicate page id "${r.id}" also contributed by ${e.routeModule}`);t.set(r.id,r);let i=n.get(r.path);if(i)throw new S(r.routeModule,`duplicate page path "${r.path}" also contributed by ${i.routeModule}`);n.set(r.path,r)}}function D(e,t){return e.environments?e.environments.includes(t):!0}function O(e){let t=m.safeParse(e);if(!t.success)throw new S(`dashboard.config.ts`,c.prettifyError(t.error));return e}function k(t,n){let r=e(t);if(!r)throw new S(`dashboard.config.ts plugin "${t.id}"`,`${n} is missing its package-owned build descriptor`);if(t.api&&t.api.id!==t.id)throw new S(`dashboard.config.ts plugin "${t.id}"`,`API id "${t.api.id}" does not match the plugin id`);for(let e of[`apiModule`,`localImplementationModule`]){let n=r[e];if(typeof n!=`string`||!n.trim())throw new S(`dashboard.config.ts plugin "${t.id}"`,`build descriptor field "${e}" must be a non-empty module reference`)}if(r.deployedImplementationModule!==void 0&&(typeof r.deployedImplementationModule!=`string`||!r.deployedImplementationModule.trim()))throw new S(`dashboard.config.ts plugin "${t.id}"`,`build descriptor field "deployedImplementationModule" must be a non-empty module reference`);return r}function A(e,t,n){if(!l.test(e))throw new S(t,`${n} "${e}" must contain only lowercase letters, numbers, and single hyphens`)}function j(e){return`/@fs/${e.replace(/\\/g,`/`)}`}function M(e){let t=e.split(`-`).join(` `);return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function N(e,t){return e<t?-1:+(e>t)}function P(e){return e instanceof Error&&`code`in e}export{S as DashboardCompositionError,g as composeDashboardManifest,_ as composeDashboardPluginTarget,h as discoverDashboardPages,v as renderDashboardPluginTargetModule,y as renderDashboardRoutesModule,x as resolveDashboardModuleReference,b as resolveDashboardRouteModules};
@@ -2,8 +2,6 @@ import { DashboardPluginApi } from "./api/contract.js";
2
2
 
3
3
  //#region src/config.d.ts
4
4
  type DashboardEnvironment = "local" | "deployed";
5
- /** Presentation supplied around a dashboard page route. */
6
- type DashboardPageLayout = "default" | "standalone";
7
5
  interface DashboardPageContribution {
8
6
  /** Stable page identity. It must be a lowercase, URL-safe slug. */
9
7
  id: string;
@@ -11,9 +9,7 @@ interface DashboardPageContribution {
11
9
  path: string;
12
10
  title: string;
13
11
  description?: string;
14
- /** Presentation supplied around the route. Defaults to the dashboard shell. */
15
- layout?: DashboardPageLayout;
16
- /** React Router framework route module, resolved by the dashboard build. */
12
+ /** Octane route page module, resolved by the dashboard build. */
17
13
  routeModule: string;
18
14
  /** Environments where the page can be included. Defaults to both. */
19
15
  environments?: readonly DashboardEnvironment[];
@@ -33,7 +29,7 @@ interface DashboardPluginNavigation {
33
29
  * than a public list of target-specific module paths.
34
30
  */
35
31
  interface DashboardPluginBuild {
36
- /** Module exporting the plugin's operation contract as its default export. */
32
+ /** Module default-exporting the plugin's operation contract. */
37
33
  apiModule: string;
38
34
  /** Module exporting the local implementation factory as `createImplementation`. */
39
35
  localImplementationModule: string;
@@ -52,8 +48,6 @@ interface DashboardPlugin {
52
48
  }
53
49
  interface DashboardConfig {
54
50
  plugins?: readonly DashboardPlugin[];
55
- /** Optional app-owned document module that overrides the default dashboard document. */
56
- document?: string;
57
51
  }
58
52
  /** Validated page metadata shared by build-time composition and the browser shell. */
59
53
  interface DashboardPageManifestEntry {
@@ -61,7 +55,6 @@ interface DashboardPageManifestEntry {
61
55
  path: string;
62
56
  title: string;
63
57
  description?: string;
64
- layout?: DashboardPageLayout;
65
58
  routeModule: string;
66
59
  source: "app" | "plugin";
67
60
  pluginId?: string;
@@ -77,4 +70,4 @@ declare function definePlugin<const Plugin extends DashboardPlugin>(plugin: Plug
77
70
  /** @internal Used by the dashboard build composer to read package-owned target metadata. */
78
71
  declare function getDashboardPluginBuild(plugin: DashboardPlugin): DashboardPluginBuild | undefined;
79
72
  //#endregion
80
- export { DashboardConfig, DashboardEnvironment, DashboardPageContribution, DashboardPageLayout, DashboardPageManifestEntry, DashboardPlugin, DashboardPluginBuild, DashboardPluginNavigation, defineConfig, definePlugin, getDashboardPluginBuild };
73
+ export { DashboardConfig, DashboardEnvironment, DashboardPageContribution, DashboardPageManifestEntry, DashboardPlugin, DashboardPluginBuild, DashboardPluginNavigation, defineConfig, definePlugin, getDashboardPluginBuild };
@@ -7,4 +7,4 @@ declare const diagnosticsApi: DashboardPluginApi<"diagnostics", {
7
7
  }, {}>;
8
8
  type DiagnosticsApi = typeof diagnosticsApi;
9
9
  //#endregion
10
- export { DiagnosticsApi, diagnosticsApi as default };
10
+ export { DiagnosticsApi, diagnosticsApi as default, diagnosticsApi };
@@ -1 +1 @@
1
- import{api as e,query as t}from"../../../api/contract.js";import{z as n}from"zod";const r=e({id:`diagnostics`,queries:{overview:t({output:n.custom()})},commands:{}});export{r as default};
1
+ import{api as e,query as t}from"../../../api/contract.js";import{z as n}from"zod";const r=e({id:`diagnostics`,queries:{overview:t({output:n.custom()})},commands:{}});export{r as default,r as diagnosticsApi};
@@ -1,3 +1,4 @@
1
+ @import "../compiled/bamboo.css";
1
2
  @import "@fontsource-variable/inter";
2
3
 
3
4
  @layer reset, base, tokens, recipes, utilities;
@@ -1,2 +1,2 @@
1
- import { DashboardEmptyState, DashboardErrorBoundary, DashboardIndexRedirect, DashboardShell, DashboardShellProps } from "./shell.js";
2
- export { DashboardEmptyState, DashboardErrorBoundary, DashboardIndexRedirect, DashboardShell, type DashboardShellProps };
1
+ import { DashboardEmptyState, DashboardErrorBoundary, DashboardNotFound, DashboardShell, DashboardShellProps } from "./shell.js";
2
+ export { DashboardEmptyState, DashboardErrorBoundary, DashboardNotFound, DashboardShell, type DashboardShellProps };
@@ -1 +1 @@
1
- import{DashboardEmptyState as e,DashboardErrorBoundary as t,DashboardIndexRedirect as n,DashboardShell as r}from"./shell.js";export{e as DashboardEmptyState,t as DashboardErrorBoundary,n as DashboardIndexRedirect,r as DashboardShell};
1
+ import{DashboardEmptyState as e,DashboardErrorBoundary as t,DashboardNotFound as n,DashboardShell as r}from"./shell.js";export{e as DashboardEmptyState,t as DashboardErrorBoundary,n as DashboardNotFound,r as DashboardShell};
@@ -1,16 +1,21 @@
1
1
  import { DashboardPageManifestEntry } from "../config.js";
2
+ import { OctaneNode } from "octane";
3
+ import { RouteErrorBoundaryProps } from "@octane-xplat/ui/routing";
2
4
 
3
5
  //#region src/web-shell/shell.d.ts
4
6
  interface DashboardShellProps {
7
+ children?: OctaneNode;
5
8
  pages: readonly DashboardPageManifestEntry[];
6
9
  }
7
10
  declare function DashboardShell({
11
+ children,
8
12
  pages
9
- }: DashboardShellProps): import("react").JSX.Element;
10
- declare function DashboardIndexRedirect({
11
- pages
12
- }: DashboardShellProps): import("react").JSX.Element;
13
- declare function DashboardEmptyState(): import("react").JSX.Element;
14
- declare function DashboardErrorBoundary(): import("react").JSX.Element;
13
+ }: DashboardShellProps): import("octane/jsx-runtime").JSX.Element;
14
+ declare function DashboardEmptyState(): import("octane/jsx-runtime").JSX.Element;
15
+ declare function DashboardNotFound(): import("octane/jsx-runtime").JSX.Element;
16
+ declare function DashboardErrorBoundary({
17
+ error,
18
+ reset
19
+ }: RouteErrorBoundaryProps): import("octane/jsx-runtime").JSX.Element;
15
20
  //#endregion
16
- export { DashboardEmptyState, DashboardErrorBoundary, DashboardIndexRedirect, DashboardShell, DashboardShellProps };
21
+ export { DashboardEmptyState, DashboardErrorBoundary, DashboardNotFound, DashboardShell, DashboardShellProps };
@@ -1 +1 @@
1
- import{useEffect as e,useRef as t,useState as n}from"react";import{Link as r,NavLink as i,Navigate as a,Outlet as o,isRouteErrorResponse as s,useLocation as c,useNavigation as l,useRouteError as u}from"react-router";import{jsx as d,jsxs as f}from"react/jsx-runtime";function p({pages:e}){let t=v(e,c().pathname);return t?.layout===`standalone`?d(o,{}):d(m,{activePage:t,pages:e})}function m({activePage:r,pages:a}){let s=l(),[c,u]=n(()=>globalThis.window!==void 0&&globalThis.matchMedia(`(max-width: 47.999rem)`).matches),[p,m]=n(!1),[h,g]=n(!1),_=t(null),v=t(null),y=t(!1);e(()=>{let e=globalThis.matchMedia(`(max-width: 47.999rem)`),t=()=>u(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),e(()=>{c&&(p?v.current?.focus():y.current&&_.current?.focus(),y.current=p)},[c,p]),e(()=>{if(!p)return;let e=e=>{e.key===`Escape`&&m(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[p]);let b=c?p:!h;return f(`div`,{className:`coreframe-dashboard`,"data-collapsed":!c&&h?`true`:`false`,"data-drawer-open":c&&p?`true`:`false`,children:[d(`button`,{ref:_,type:`button`,className:`coreframe-dashboard__toggle`,"aria-controls":`coreframe-dashboard-navigation`,"aria-expanded":b,"aria-label":b?`Collapse dashboard navigation`:`Expand dashboard navigation`,onClick:()=>{c?m(e=>!e):g(e=>!e)},children:d(`span`,{"aria-hidden":`true`,children:b?`←`:`☰`})}),d(`button`,{type:`button`,className:`coreframe-dashboard__backdrop`,"aria-label":`Close dashboard navigation`,tabIndex:c&&p?0:-1,onClick:()=>m(!1)}),d(`aside`,{className:`coreframe-dashboard__sidebar`,role:c?`dialog`:void 0,"aria-label":c?`Dashboard navigation`:void 0,"aria-modal":c&&p?!0:void 0,"aria-hidden":c&&!p?!0:void 0,inert:c&&!p?!0:void 0,children:f(`nav`,{ref:v,id:`coreframe-dashboard-navigation`,className:`coreframe-dashboard__navigation`,"aria-label":`Dashboard`,tabIndex:c?-1:void 0,children:[f(`div`,{className:`coreframe-dashboard__brand`,"aria-label":`Coreframe Dashboard`,children:[d(`span`,{"aria-hidden":`true`,className:`coreframe-dashboard__mark`,children:`C`}),d(`span`,{className:`coreframe-dashboard__navigation-text`,children:`Coreframe`})]}),a.length>0?d(`ul`,{className:`coreframe-dashboard__navigation-list`,children:a.map(e=>d(`li`,{children:f(i,{className:`coreframe-dashboard__navigation-link`,to:`/${e.path}`,onClick:()=>m(!1),children:[d(`span`,{"aria-hidden":`true`,className:`coreframe-dashboard__navigation-dot`}),d(`span`,{className:`coreframe-dashboard__navigation-text`,children:e.title})]})},e.id))}):d(`p`,{className:`coreframe-dashboard__navigation-empty`,children:`No pages`})]})}),f(`main`,{className:`coreframe-dashboard__main`,children:[r?f(`header`,{className:`coreframe-dashboard__page-header`,children:[d(`p`,{className:`coreframe-dashboard__eyebrow`,children:`Dashboard`}),d(`h1`,{children:r.title}),r.description?d(`p`,{children:r.description}):null]}):null,s.state===`idle`?null:d(`div`,{className:`coreframe-dashboard__pending`,role:`status`,children:`Loading page…`}),d(`div`,{className:`coreframe-dashboard__content`,children:d(o,{})})]})]})}function h({pages:e}){let t=e[0];return t?d(a,{replace:!0,to:`/${t.path}`}):d(g,{})}function g(){return f(`section`,{className:`coreframe-dashboard__state`,"aria-labelledby":`dashboard-empty-title`,children:[d(`p`,{className:`coreframe-dashboard__eyebrow`,children:`Dashboard`}),d(`h1`,{id:`dashboard-empty-title`,children:`No dashboard pages yet`}),f(`p`,{children:[`Add a page under `,d(`code`,{children:`dashboard/pages/`}),` or register a plugin in`,` `,d(`code`,{children:`dashboard.config.ts`}),`.`]})]})}function _(){let e=u(),t=s(e)&&e.status===404,n=import.meta.env.DEV&&e instanceof Error?e.message:t?`The requested dashboard page does not exist.`:`The dashboard hit an unexpected error.`;return f(`main`,{className:`coreframe-dashboard__state`,children:[d(`p`,{className:`coreframe-dashboard__eyebrow`,children:`Coreframe Dashboard`}),d(`h1`,{children:t?`Page not found`:`Dashboard unavailable`}),d(`p`,{children:n}),d(r,{className:`coreframe-dashboard__button`,to:`/`,children:`Go to dashboard`})]})}function v(e,t){let n=t.split(`/`).filter(Boolean)[0];return e.find(e=>e.path===n)??(n?void 0:e[0])}export{g as DashboardEmptyState,_ as DashboardErrorBoundary,h as DashboardIndexRedirect,p as DashboardShell};
1
+ import{__delegateEvents as e,bagChildHole as t,bagDone as n,bagHole as r,bagRecord as i,commitHole as a,createElementFromConfig as o,createHostElement as s,deferRecord as c,enableHostDescriptors as l,isRenderCall as u,replaceRef as d,setEventSlot as f,setPlainAttribute as p,signalOwnerUse as m}from"octane/internal/client";import{__s as h,bag10 as g,bag2 as _,bag4 as v,bagOf as ee,child as y,clone as b,createScopedElement as x,createScopedValue as S,hookSlots as te,htext as C,htextSwap as ne,positionalChildren as w,queueRefAttach as T,queueRefDetach as E,setAriaAttribute as D,setBooleanAttribute as O,setEventHandler as k,setStringData as A,setText as j,sibling as M,template as N,useEffect as P,useRef as F,useState as I,withSlot as L}from"octane";import{NavLink as R}from"@octane-xplat/ui";import{RouteResourceNotFound as re,useNavigation as ie,useRouteMatch as ae}from"@octane-xplat/ui/routing";l(),e([`click`],[112]);const oe=N(`<div class=coreframe-dashboard><button type=button class=coreframe-dashboard__toggle aria-controls=coreframe-dashboard-navigation><span aria-hidden=true> </span></button><button type=button class=coreframe-dashboard__backdrop aria-label="Close dashboard navigation"></button><aside class=coreframe-dashboard__sidebar><nav id=coreframe-dashboard-navigation class=coreframe-dashboard__navigation aria-label=Dashboard><div class=coreframe-dashboard__brand aria-label="Coreframe Dashboard"><span aria-hidden=true class=coreframe-dashboard__mark>C</span><span class=coreframe-dashboard__navigation-text>Coreframe</span></div><!></nav></aside><main class=coreframe-dashboard__main><!><!><div class=coreframe-dashboard__content>`),se=N(`<section class=coreframe-dashboard__state aria-labelledby=dashboard-empty-title><p class=coreframe-dashboard__eyebrow>Dashboard</p><h1 id=dashboard-empty-title>No dashboard pages yet</h1><p>Add a page under <code>dashboard/pages/</code> or register a plugin in<!><code>dashboard.config.ts</code>.`),ce=N(`<section class=coreframe-dashboard__state aria-labelledby=dashboard-not-found-title><p class=coreframe-dashboard__eyebrow>Coreframe Dashboard</p><h1 id=dashboard-not-found-title>Page not found</h1><p>The requested dashboard page does not exist.</p><!>`),le=N(`<main class=coreframe-dashboard__state><p class=coreframe-dashboard__eyebrow>Coreframe Dashboard</p><h1> </h1><p></p><button class=coreframe-dashboard__button type=button>Try again</button> <!>`),z=te(11),B=Symbol(z),V=Symbol(z+1),H=Symbol(z+2),U=Symbol(z+3),ue=Symbol(z+4),W=Symbol(z+5),de=Symbol(z+6),fe=Symbol(z+7),pe=Symbol(z+8),me=Symbol(z+9),he=Symbol(z+10),ge=[`r`,`e`,`d`,`r`,`s`,`r`];function _e(e,t,n){let r;(r=t[0])!==e&&(A(e.b,`data-collapsed`,r),e.a=r),(r=t[1])!==e&&(A(e.b,`data-drawer-open`,r),e.c=r),(r=t[2])!==e&&(D(e.d,`aria-expanded`,r),e.f=r),(r=t[3])!==e&&(D(e.d,`aria-label`,r),e.g=r),(r=t[4])!==e&&(n?f(e.d,`$oclick`,r):e.d.$oclick=r),(r=t[5])!==e&&(j(e.h,r),e.i=r),(r=t[6])!==e&&(p(e.k,`tabindex`,r),e.j=r),(r=t[7])!==e&&(n?f(e.k,`$oclick`,r):e.k.$oclick=r),(r=t[8])!==e&&(p(e.m,`role`,r),e.l=r),(r=t[9])!==e&&(D(e.m,`aria-label`,r),e.n=r),(r=t[10])!==e&&(D(e.m,`aria-modal`,r),e.o=r),(r=t[11])!==e&&(D(e.m,`aria-hidden`,r),e.p=r),(r=t[12])!==e&&(O(e.m,`inert`,r),e.q=r),(r=t[13])!==e&&(p(e.r,`tabindex`,r),e.t=r),(r=t[14])!==e&&(e.v=a(e,t[15],e.v,r),e.w=r),(r=t[16])!==e&&(e.z=a(e,t[17],e.z,r),e.A=r),(r=t[18])!==e&&(e.C=a(e,t[19],e.C,r),e.D=r),(r=t[20])!==e&&(e.F=a(e,t[21],e.F,r),e.G=r)}const ve=h(function(e,a,o){let s=a.slots[0],c=null;if(s===void 0){let t,n,r,i,o,c,l,u=b(oe),d=y(u);T(a,t=e.h2,d),(a.cleanups??=[]).push(()=>s&&E(s.e,s.d)),k(d,`$oclick`,e.h5),n=C(y(d),r=e.h6,1);let f=M(d);k(f,`$oclick`,e.h8);let m=M(f),h=y(m);T(a,i=e.h14,h),(a.cleanups??=[]).push(()=>s&&E(s.s,s.r)),o=M(y(h));let g=M(m),_=y(g);c=_;let v=M(_);l=v;let x=M(v);s=ee(a,u,{a:void 0,b:u,c:void 0,d,e:t,f:void 0,g:void 0,h:n,i:r,j:void 0,k:f,l:void 0,m,n:void 0,o:void 0,p:void 0,q:void 0,r:h,s:i,t:void 0,u:o,v:null,w:a,x:g,y:c,z:null,A:a,B:l,C:null,D:a,E:x,F:null,G:a,$:22,next:_e}),a.refFields=ge;{let t=e.h0;A(s.b,`data-collapsed`,t),s.a=t}{let t=e.h1;A(s.b,`data-drawer-open`,t),s.c=t}{let t=e.h3;D(s.d,`aria-expanded`,t),s.f=t}{let t=e.h4;D(s.d,`aria-label`,t),s.g=t}{let t=e.h7;p(s.k,`tabindex`,t),s.j=t}{let t=e.h9;p(s.m,`role`,t),s.l=t}{let t=e.h10;D(s.m,`aria-label`,t),s.n=t}{let t=e.h11;D(s.m,`aria-modal`,t),s.o=t}{let t=e.h12;D(s.m,`aria-hidden`,t),s.p=t}{let t=e.h13;O(s.m,`inert`,t),s.q=t}{let t=e.h15;p(s.r,`tabindex`,t),s.t=t}}else{let t=s.$>255,n=m.active;{let t=e.h2;t!==s.e&&(s.e=d(a,s.e,t,s.d))}{let r=e.h5;n&&k(s.d),(t||r!==s.d.$oclick)&&(c=i(a,c,4,r,s.d.$oclick))}{let n=e.h6;(n!==s.i||t)&&(c=i(a,c,5,n,s.i))}{let r=e.h8;n&&k(s.k),(t||r!==s.k.$oclick)&&(c=i(a,c,7,r,s.k.$oclick))}{let t=e.h14;t!==s.s&&(s.s=d(a,s.s,t,s.r))}{let n=e.h0;(n!==s.a||t)&&(c=i(a,c,0,n,s.a))}{let n=e.h1;(n!==s.c||t)&&(c=i(a,c,1,n,s.c))}{let n=e.h3;(n!==s.f||t)&&(c=i(a,c,2,n,s.f))}{let n=e.h4;(n!==s.g||t)&&(c=i(a,c,3,n,s.g))}{let n=e.h7;(n!==s.j||t)&&(c=i(a,c,6,n,s.j))}{let n=e.h9;(n!==s.l||t)&&(c=i(a,c,8,n,s.l))}{let n=e.h10;(n!==s.n||t)&&(c=i(a,c,9,n,s.n))}{let n=e.h11;(n!==s.o||t)&&(c=i(a,c,10,n,s.o))}{let n=e.h12;(n!==s.p||t)&&(c=i(a,c,11,n,s.p))}{let n=e.h13;(n!==s.q||t)&&(c=i(a,c,12,n,s.q))}{let n=e.h15;(n!==s.t||t)&&(c=i(a,c,13,n,s.t))}}s.$>>8==1&&(n(a,s),s.$<256&&(c=null)),c=r(s,c,14,e.h16,s.w,s.v,a,1,s.r,s.u,!0),c=r(s,c,16,e.h17,s.A,s.z,a,2,s.x,s.y,!0),c=r(s,c,18,e.h18,s.D,s.C,a,3,s.x,s.B,!0),c=t(s,c,20,e.h19,s.G,s.F,a,4,s.E),s.$>>8==1&&n(a,s)});function G(e,t,n,r,i,a,c,l,u,d,f,p){return o(`r:`,ve,{h0:!i&&r?`true`:`false`,h1:i&&a?`true`:`false`,h2:p,h3:n,h4:n?`Collapse dashboard navigation`:`Expand dashboard navigation`,h5:f,h6:n?`←`:`☰`,h7:i&&a?0:-1,h8:()=>d(!1),h9:i?`dialog`:void 0,h10:i?`Dashboard navigation`:void 0,h11:i&&a?!0:void 0,h12:i&&!a?!0:void 0,h13:i&&!a?!0:void 0,h14:l,h15:i?-1:void 0,h16:u.length>0?x(`ul`,{className:`coreframe-dashboard__navigation-list`},()=>u.map(e=>x(`li`,{key:e.id},()=>S(()=>x(R,{className:`coreframe-dashboard__navigation-link`,activeClassName:`coreframe-dashboard__navigation-link--active`,to:$(`/${e.path}`),onPress:()=>d(!1)},()=>w([s(`span`,{"aria-hidden":`true`,className:`coreframe-dashboard__navigation-dot`}),x(`span`,{className:`coreframe-dashboard__navigation-text`},()=>e.title)]),`c:db92d75f`))))):s(`p`,{className:`coreframe-dashboard__navigation-empty`},`No pages`),h17:e?x(`header`,{className:`coreframe-dashboard__page-header`},()=>w([s(`p`,{className:`coreframe-dashboard__eyebrow`},`Dashboard`),x(`h1`,{},()=>e.title),e.description?x(`p`,{},()=>e.description):null])):null,h18:c.status===`pending`?s(`div`,{className:`coreframe-dashboard__pending`,role:`status`},`Loading page…`):null,h19:t})}function ye(e,t){let n;(n=t[0])!==e&&(j(e.a,n),e.b=n)}const be=h(function(e,t,r){let a=t.slots[0],o=null;if(a===void 0){let n,r,i=b(se);n=ne(M(y(M(y(i),2)),3),r=e.h0),a=_(t,i,n,r,1,ye)}else{let n=a.$>255;{let r=e.h0;(r!==a.b||n)&&(o=i(t,o,0,r,a.b))}}a.$>>8==1&&n(t,a)});function K(){return o(`r:`,be,{h0:` `})}function xe(e,t){let n;(n=t[0])!==e&&(e.c=a(e,t[1],e.c,n),e.d=n)}const Se=h(function(e,t,i){let a=t.slots[0],o=null;if(a===void 0){let e,n=b(ce);e=M(y(n),3),a=v(t,n,n,e,null,t,2,xe)}o=r(a,o,0,e.h0,a.d,a.c,t,1,a.a,a.b,!0),a.$>>8==1&&n(t,a)});function q(){return o(`r:`,Se,{h0:o(`c:e0244a3e`,R,{className:`coreframe-dashboard__button`,to:$(`/`)},[`Go to dashboard`])})}function Ce(e,t,n){let r;(r=t[0])!==e&&(j(e.a,r),e.b=r),(r=t[1])!==e&&(n?f(e.c,`$oclick`,r):e.c.$oclick=r),(r=t[2])!==e&&(e.e=a(e,t[3],e.e,r),e.f=r),(r=t[4])!==e&&(e.i=a(e,t[5],e.i,r),e.j=r)}const we=h(function(e,a,o){let s=a.slots[0],c=null;if(s===void 0){let t,n,r,i=b(le),o=M(y(i));t=C(o,n=e.h0,1);let c=M(o,2);k(c,`$oclick`,e.h2);let l=M(o);r=M(c,2),s=g(a,i,t,n,c,l,null,a,i,r,null,a,6,Ce)}else{let t=s.$>255,n=m.active;{let n=e.h0;(n!==s.b||t)&&(c=i(a,c,0,n,s.b))}{let r=e.h2;n&&k(s.c),(t||r!==s.c.$oclick)&&(c=i(a,c,1,r,s.c.$oclick))}}s.$>>8==1&&(n(a,s),s.$<256&&(c=null)),c=t(s,c,2,e.h1,s.f,s.e,a,1,s.d),c=r(s,c,4,e.h3,s.j,s.i,a,2,s.g,s.h,!0),s.$>>8==1&&n(a,s)});function J(e,t,n){return o(`r:`,we,{h0:t?`Page not found`:`Dashboard unavailable`,h1:e,h2:()=>n(),h3:o(`c:bde9b23f`,R,{className:`coreframe-dashboard__button`,to:$(`/`)},[`Go to dashboard`])})}function Y({children:e,pages:t},n=void 0){let r=L(B,ae),i=L(V,ie),[a,o]=I(()=>globalThis.window!==void 0&&globalThis.matchMedia(`(max-width: 47.999rem)`).matches,H),[s,l]=I(!1,U),[d,f]=I(!1,ue),p=F(null,W),m=F(null,de),h=F(!1,fe),g=Te(t,r?.to);P(()=>{let e=globalThis.matchMedia(`(max-width: 47.999rem)`),t=()=>o(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[],pe),P(()=>{a&&(s?m.current?.focus():h.current&&p.current?.focus(),h.current=s)},[a,s],me),P(()=>{if(!s)return;let e=e=>{e.key===`Escape`&&l(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s],he);let _=a?s:!d,v=()=>{a?l(e=>!e):f(e=>!e)};return u(n)?G(g,e,_,d,a,s,i,m,t,l,v,p):c(G,g,e,_,d,a,s,i,m,t,l,v,p)}function X(e=void 0,t=void 0){return u(t)?K():c(K)}function Z(e=void 0,t=void 0){return u(t)?q():c(q)}function Q({error:e,reset:t},n=void 0){let r=e instanceof re,i=import.meta.env.DEV&&e instanceof Error?e.message:r?`The requested dashboard page does not exist.`:`The dashboard hit an unexpected error.`;return u(n)?J(i,r,t):c(J,i,r,t)}function $(e){return e}function Te(e,t){let n=t?.split(`/`).filter(Boolean)[0];return e.find(e=>e.path===n)??(n?void 0:e[0])}Y.$$singleRoot=!0,X.$$singleRoot=!0,Z.$$singleRoot=!0,Q.$$singleRoot=!0;export{X as DashboardEmptyState,Q as DashboardErrorBoundary,Z as DashboardNotFound,Y as DashboardShell};
@@ -1 +1 @@
1
- import{createDashboardPluginDispatcher as e}from"./api/dispatcher.js";import{getDashboardRequestId as t,isSameOriginDashboardMutation as n}from"./host-policy.js";const r=`/__dashboard`,i=`${r}/api`,a=new WeakMap;function o(n){let r=e(n.plugins,{getRequestId:t});return(e,t)=>{let n=new URL(e.url);return!d(n.pathname)||!t.DEPLOY_ENV?null:c(e,t,n,t.DEPLOY_ENV,r)}}function s(e,t,n){if(!d(new URL(e.url).pathname)||!t.DEPLOY_ENV)return null;let r=n.plugins,i=a.get(r);return i||(i=o(n),a.set(r,i)),i(e,t)}async function c(e,t,a,o,s){if(!t.DASHBOARD_PASSWORD)return new Response(`Dashboard unavailable`,{headers:{"cache-control":`no-store`},status:503});let c=m(e.headers.get(`authorization`));if(!c||!await h(c,t.DASHBOARD_PASSWORD))return new Response(`Authentication required`,{headers:{"cache-control":`no-store`,"www-authenticate":`Basic realm="Coreframe dashboard", charset="UTF-8"`},status:401});if(a.pathname.startsWith(`${i}/plugins/`))return n(e.method,e.headers.get(`origin`),a.origin)?s(e,l(e,t,o)):p({error:{code:`invalid_input`}},403);if(a.pathname===i||a.pathname.startsWith(`${i}/`))return p({error:`Not found`},404);if(a.pathname===r)return a.pathname=`${r}/`,Response.redirect(a,302);if(e.method!==`GET`&&e.method!==`HEAD`)return new Response(`Method not allowed`,{headers:{"cache-control":`no-store`},status:405});if(!t.ASSETS)return new Response(`Dashboard unavailable`,{headers:{"cache-control":`no-store`},status:503});(a.pathname===`${r}/`||!a.pathname.slice(13).includes(`.`))&&(a.pathname=`${r}/index.html`);let u=await t.ASSETS.fetch(new Request(a,e)),d=new Headers(u.headers);return d.set(`cache-control`,a.pathname.endsWith(`/index.html`)?`no-store`:`public, max-age=31536000, immutable`),new Response(e.method===`HEAD`?null:u.body,{headers:d,status:u.status,statusText:u.statusText})}function l(e,t,n){let r=u(),i=t,a=r.configuration.filter(e=>e.requiredIn.includes(n)).map(e=>({description:e.description,kind:e.kind,name:e.name,status:f(i[e.name])?`configured`:`missing`})),o=[],s=r.deployUrls[n];return s?o.push({href:s,id:`application`,label:`Application`}):o.push({href:new URL(`/`,e.url).href,id:`application`,label:`Application`}),{environment:n,release:{applicationName:r.applicationName,applicationVersion:r.applicationVersion,cloudflareVersionId:t.CF_VERSION_METADATA?.id,cloudflareVersionTag:t.CF_VERSION_METADATA?.tag,cloudflareVersionTimestamp:t.CF_VERSION_METADATA?.timestamp,commit:r.commit,coreframeVersion:r.coreframeVersion,releaseName:t.POSTHOG_RELEASE},configuration:a,links:o}}function u(){return typeof __COREFRAME_DASHBOARD_BUILD__<`u`?__COREFRAME_DASHBOARD_BUILD__:{applicationName:`Coreframe application`,configuration:[],deployUrls:{}}}function d(e){return e===r||e.startsWith(`${r}/`)}function f(e){return typeof e==`string`?e.trim().length>0:e!=null}function p(e,t=200){return Response.json(e,{headers:{"cache-control":`no-store`},status:t})}function m(e){if(e?.startsWith(`Basic `))try{let t=Uint8Array.from(atob(e.slice(6)),e=>e.charCodeAt(0)),n=new TextDecoder().decode(t),r=n.indexOf(`:`);return r===-1||n.slice(0,r)!==`coreframe`?void 0:n.slice(r+1)}catch{return}}async function h(e,t){let n=new TextEncoder,[r,i]=await Promise.all([crypto.subtle.digest(`SHA-256`,n.encode(e)),crypto.subtle.digest(`SHA-256`,n.encode(t))]),a=new Uint8Array(r),o=new Uint8Array(i),s=0;for(let e=0;e<a.length;e+=1)s|=a[e]^o[e];return s===0}export{o as createWorkerHandler,s as handleDashboardRequest};
1
+ import{createDashboardPluginDispatcher as e}from"./api/dispatcher.js";import{getDashboardRequestId as t,isSameOriginDashboardMutation as n}from"./host-policy.js";const r=`/__dashboard`,i=`${r}/api`,a=new WeakMap;function o(n){let r=e(n.plugins,{getRequestId:t});return(e,t)=>{let n=new URL(e.url);return!d(n.pathname)||!t.DEPLOY_ENV?null:c(e,t,n,t.DEPLOY_ENV,r)}}function s(e,t,n){if(!d(new URL(e.url).pathname)||!t.DEPLOY_ENV)return null;let r=n.plugins,i=a.get(r);return i||(i=o(n),a.set(r,i)),i(e,t)}async function c(e,t,a,o,s){if(!t.DASHBOARD_PASSWORD)return new Response(`Dashboard unavailable`,{headers:{"cache-control":`no-store`},status:503});let c=m(e.headers.get(`authorization`));if(!c||!await h(c,t.DASHBOARD_PASSWORD))return new Response(`Authentication required`,{headers:{"cache-control":`no-store`,"www-authenticate":`Basic realm="Coreframe dashboard", charset="UTF-8"`},status:401});if(a.pathname.startsWith(`${i}/plugins/`))return n(e.method,e.headers.get(`origin`),a.origin)?s(e,l(e,t,o)):p({error:{code:`invalid_input`}},403);if(a.pathname===i||a.pathname.startsWith(`${i}/`))return p({error:`Not found`},404);if(a.pathname===r)return a.pathname=`${r}/`,Response.redirect(a,302);if(e.method!==`GET`&&e.method!==`HEAD`)return new Response(`Method not allowed`,{headers:{"cache-control":`no-store`},status:405});if(!t.ASSETS)return new Response(`Dashboard unavailable`,{headers:{"cache-control":`no-store`},status:503});(a.pathname===`${r}/`||!a.pathname.slice(13).includes(`.`))&&(a.pathname=`${r}/index.html`);let u=await t.ASSETS.fetch(new Request(a,e));if(a.pathname===`${r}/index.html`&&u.status===307){let n=u.headers.get(`location`),i=n?new URL(n,a):void 0;i?.origin===a.origin&&(i.pathname===r||i.pathname===`${r}/`)&&(await u.body?.cancel(),u=await t.ASSETS.fetch(new Request(i,e)))}let d=new Headers(u.headers);return d.set(`cache-control`,a.pathname.endsWith(`/index.html`)?`no-store`:`public, max-age=31536000, immutable`),new Response(e.method===`HEAD`?null:u.body,{headers:d,status:u.status,statusText:u.statusText})}function l(e,t,n){let r=u(),i=t,a=r.configuration.filter(e=>e.requiredIn.includes(n)).map(e=>({description:e.description,kind:e.kind,name:e.name,status:f(i[e.name])?`configured`:`missing`})),o=[],s=r.deployUrls[n];return s?o.push({href:s,id:`application`,label:`Application`}):o.push({href:new URL(`/`,e.url).href,id:`application`,label:`Application`}),{environment:n,release:{applicationName:r.applicationName,applicationVersion:r.applicationVersion,cloudflareVersionId:t.CF_VERSION_METADATA?.id,cloudflareVersionTag:t.CF_VERSION_METADATA?.tag,cloudflareVersionTimestamp:t.CF_VERSION_METADATA?.timestamp,commit:r.commit,coreframeVersion:r.coreframeVersion,releaseName:t.POSTHOG_RELEASE},configuration:a,links:o}}function u(){return typeof __COREFRAME_DASHBOARD_BUILD__<`u`?__COREFRAME_DASHBOARD_BUILD__:{applicationName:`Coreframe application`,configuration:[],deployUrls:{}}}function d(e){return e===r||e.startsWith(`${r}/`)}function f(e){return typeof e==`string`?e.trim().length>0:e!=null}function p(e,t=200){return Response.json(e,{headers:{"cache-control":`no-store`},status:t})}function m(e){if(e?.startsWith(`Basic `))try{let t=Uint8Array.from(atob(e.slice(6)),e=>e.charCodeAt(0)),n=new TextDecoder().decode(t),r=n.indexOf(`:`);return r===-1||n.slice(0,r)!==`coreframe`?void 0:n.slice(r+1)}catch{return}}async function h(e,t){let n=new TextEncoder,[r,i]=await Promise.all([crypto.subtle.digest(`SHA-256`,n.encode(e)),crypto.subtle.digest(`SHA-256`,n.encode(t))]),a=new Uint8Array(r),o=new Uint8Array(i),s=0;for(let e=0;e<a.length;e+=1)s|=a[e]^o[e];return s===0}export{o as createWorkerHandler,s as handleDashboardRequest};