@meddleware/ui 0.1.33 → 0.1.35
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/index.d.ts +2 -0
- package/dist/runtime-config.d.ts +52 -0
- package/dist/ui.js +278 -206
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -48,3 +48,5 @@ export { isStatusLevel, parseSnapshot } from './status.js';
|
|
|
48
48
|
export { safeHref, safePath } from './safe-href.js';
|
|
49
49
|
export { truncateMiddle, DEFAULT_TRUNCATE_CHARS } from './truncate.js';
|
|
50
50
|
export type { StatusLevel, StatusComponent, StatusGroup, StatusSnapshot } from './status.js';
|
|
51
|
+
export { loadRuntimeConfig, runtimeEndpoints, withRuntimeEnv, parseRuntimeConfig, parseEndpoint, resetRuntimeConfigForTesting, RUNTIME_ENDPOINT_KEYS, RUNTIME_CONFIG_PATH, } from './runtime-config.js';
|
|
52
|
+
export type { RuntimeEndpointKey, RuntimeEndpoints } from './runtime-config.js';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime endpoint configuration (ADR-0005; Series C step C1z).
|
|
3
|
+
*
|
|
4
|
+
* A static app is built once and configured per deployment: the operator serves a same-origin
|
|
5
|
+
* `/runtime-config.json` (static-server mounts it from a ConfigMap) that overrides the build-time
|
|
6
|
+
* endpoint variables. Only ENDPOINTS can be overridden — the hosts of machine-facing services (the
|
|
7
|
+
* read-indexer and the Walrus upload relays) — never ids, fees, addresses or anything that moves money,
|
|
8
|
+
* which stay build-time `VITE_*` values. A missing, non-JSON (an SPA fallback page) or invalid file
|
|
9
|
+
* leaves the build-time values in force.
|
|
10
|
+
*
|
|
11
|
+
* Load it once, before the app's modules are imported, then read every endpoint through
|
|
12
|
+
* {@link withRuntimeEnv}:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* // main.ts
|
|
16
|
+
* import { loadRuntimeConfig } from '@meddleware/ui'
|
|
17
|
+
* await loadRuntimeConfig()
|
|
18
|
+
* await import('./boot')
|
|
19
|
+
*
|
|
20
|
+
* // config.ts
|
|
21
|
+
* const env = withRuntimeEnv(import.meta.env)
|
|
22
|
+
* export const INDEXER_URL = env.VITE_INDEXER_URL || ''
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
/** The only keys a runtime config may set: machine-zone endpoints. */
|
|
26
|
+
export declare const RUNTIME_ENDPOINT_KEYS: readonly ["VITE_INDEXER_URL", "VITE_WALRUS_RELAY_TESTNET", "VITE_WALRUS_RELAY_MAINNET"];
|
|
27
|
+
export type RuntimeEndpointKey = (typeof RUNTIME_ENDPOINT_KEYS)[number];
|
|
28
|
+
export type RuntimeEndpoints = Partial<Record<RuntimeEndpointKey, string>>;
|
|
29
|
+
/** Default location: same origin, so it is the operator's own file and needs no CORS. */
|
|
30
|
+
export declare const RUNTIME_CONFIG_PATH = "/runtime-config.json";
|
|
31
|
+
/** An endpoint value: `https:` (or `http:` on localhost / 127.0.0.1 for development), no credentials,
|
|
32
|
+
* no query or fragment. Returns the value without a trailing slash, or undefined. */
|
|
33
|
+
export declare function parseEndpoint(value: unknown): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Validate a parsed runtime config. Unknown keys and invalid values are dropped (and reported), so a
|
|
36
|
+
* typo can never inject anything; the result holds only valid endpoint overrides.
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseRuntimeConfig(input: unknown): {
|
|
39
|
+
endpoints: RuntimeEndpoints;
|
|
40
|
+
rejected: string[];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Fetch and apply the runtime config. Never throws: on any failure the build-time values stay in force.
|
|
44
|
+
* Resolves to the endpoints that were applied.
|
|
45
|
+
*/
|
|
46
|
+
export declare function loadRuntimeConfig(path?: string, fetchImpl?: typeof fetch): Promise<Readonly<RuntimeEndpoints>>;
|
|
47
|
+
/** The endpoints applied by {@link loadRuntimeConfig} (empty before it ran or when nothing applied). */
|
|
48
|
+
export declare function runtimeEndpoints(): Readonly<RuntimeEndpoints>;
|
|
49
|
+
/** The build-time environment with the runtime endpoint overrides applied on top. */
|
|
50
|
+
export declare function withRuntimeEnv<T extends Record<string, unknown>>(buildEnv: T): T & RuntimeEndpoints;
|
|
51
|
+
/** Test hook: forget the loaded overrides. */
|
|
52
|
+
export declare function resetRuntimeConfigForTesting(): void;
|
package/dist/ui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, effectScope as l, mergeModels as u, normalizeClass as d, onBeforeUnmount as f, onMounted as p, onUnmounted as m, openBlock as h, ref as g, renderList as _, renderSlot as v, resolveDynamicComponent as y, toDisplayString as b, unref as x, useCssVars as S, useId as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, effectScope as l, mergeModels as u, normalizeClass as d, onBeforeUnmount as f, onMounted as p, onUnmounted as m, openBlock as h, ref as g, renderList as _, renderSlot as v, resolveDynamicComponent as y, toDisplayString as b, unref as x, useCssVars as S, useId as ee, useModel as C, useSlots as w, vModelSelect as T, watch as E, withCtx as D, withDirectives as O } from "vue";
|
|
2
2
|
//#region src/internal/panel.ts
|
|
3
|
-
function
|
|
3
|
+
function k(e, t) {
|
|
4
4
|
let n;
|
|
5
5
|
return n = e === "transparent" ? {
|
|
6
6
|
"--_bg": "transparent",
|
|
@@ -33,7 +33,7 @@ function A(e, t) {
|
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/components/AppHeader.vue?vue&type=script&setup=true&lang.ts
|
|
36
|
-
var
|
|
36
|
+
var A = /*@__PURE__*/ c({
|
|
37
37
|
__name: "AppHeader",
|
|
38
38
|
props: {
|
|
39
39
|
variant: { default: "dark" },
|
|
@@ -58,7 +58,7 @@ var j = /*@__PURE__*/ c({
|
|
|
58
58
|
v893937cc: r.value["--_danger"],
|
|
59
59
|
ca3eca36: r.value["--_info"]
|
|
60
60
|
}));
|
|
61
|
-
let n = e, r = t(() =>
|
|
61
|
+
let n = e, r = t(() => k(n.variant, n.colors)), a = g(!1), o = null;
|
|
62
62
|
return p(() => {
|
|
63
63
|
n.solidifyOnScroll && typeof window < "u" && (o = () => {
|
|
64
64
|
a.value = window.scrollY > 8;
|
|
@@ -74,14 +74,14 @@ var j = /*@__PURE__*/ c({
|
|
|
74
74
|
v(t.$slots, "actions")
|
|
75
75
|
], 2));
|
|
76
76
|
}
|
|
77
|
-
}),
|
|
77
|
+
}), j = (e, t) => {
|
|
78
78
|
let n = e.__vccOpts || e;
|
|
79
79
|
for (let [e, r] of t) n[e] = r;
|
|
80
80
|
return n;
|
|
81
|
-
},
|
|
81
|
+
}, te = /*#__PURE__*/ j(A, [["__scopeId", "data-v-384786e1"]]), ne = {
|
|
82
82
|
class: "mw-sidebar__nav",
|
|
83
83
|
"aria-label": "Primary"
|
|
84
|
-
},
|
|
84
|
+
}, re = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
85
85
|
__name: "AppSidebar",
|
|
86
86
|
props: {
|
|
87
87
|
variant: { default: "dark" },
|
|
@@ -100,38 +100,38 @@ var j = /*@__PURE__*/ c({
|
|
|
100
100
|
v58624844: r.value["--_info"],
|
|
101
101
|
d1940a6a: o.value
|
|
102
102
|
}));
|
|
103
|
-
let n = e, r = t(() =>
|
|
103
|
+
let n = e, r = t(() => k(n.variant, n.colors)), o = t(() => n.width ?? "var(--mw-sidebar-width, 240px)");
|
|
104
104
|
return (t, n) => (h(), i("aside", { class: d(["mw-sidebar", `mw-sidebar--${e.variant}`]) }, [
|
|
105
105
|
v(t.$slots, "head"),
|
|
106
|
-
a("nav",
|
|
106
|
+
a("nav", ne, [v(t.$slots, "default")]),
|
|
107
107
|
v(t.$slots, "body"),
|
|
108
108
|
v(t.$slots, "foot")
|
|
109
109
|
], 2));
|
|
110
110
|
}
|
|
111
|
-
}), [["__scopeId", "data-v-e5506501"]]),
|
|
112
|
-
function
|
|
113
|
-
if (e && !
|
|
111
|
+
}), [["__scopeId", "data-v-e5506501"]]), M = /[\u0000-\u0020\u007f\\]/;
|
|
112
|
+
function N(e) {
|
|
113
|
+
if (e && !M.test(e)) try {
|
|
114
114
|
let t = new URL(e);
|
|
115
115
|
if (t.username || t.password) return;
|
|
116
116
|
if (t.protocol === "https:" || t.protocol === "http:" && (t.hostname === "localhost" || t.hostname === "127.0.0.1")) return t.href;
|
|
117
117
|
} catch {}
|
|
118
118
|
}
|
|
119
|
-
var
|
|
120
|
-
function
|
|
121
|
-
if (e && !
|
|
122
|
-
let t = new URL(e,
|
|
123
|
-
return t.origin ===
|
|
119
|
+
var P = "https://site.invalid";
|
|
120
|
+
function F(e) {
|
|
121
|
+
if (e && !M.test(e) && e.startsWith("/") && !e.startsWith("//")) try {
|
|
122
|
+
let t = new URL(e, P);
|
|
123
|
+
return t.origin === P ? t.pathname + t.search + t.hash : void 0;
|
|
124
124
|
} catch {
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region src/components/AppFooter.vue?vue&type=script&setup=true&lang.ts
|
|
130
|
-
var
|
|
130
|
+
var ie = {
|
|
131
131
|
key: 0,
|
|
132
132
|
class: "mw-footer__docs",
|
|
133
133
|
"aria-label": "Documentation"
|
|
134
|
-
},
|
|
134
|
+
}, ae = ["href"], oe = ["href"], se = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
135
135
|
__name: "AppFooter",
|
|
136
136
|
props: {
|
|
137
137
|
variant: { default: "transparent" },
|
|
@@ -150,29 +150,29 @@ var re = {
|
|
|
150
150
|
v589bf337: a.value["--_danger"],
|
|
151
151
|
v203c4d42: a.value["--_info"]
|
|
152
152
|
}));
|
|
153
|
-
let n = e, a = t(() =>
|
|
153
|
+
let n = e, a = t(() => k(n.variant, n.colors));
|
|
154
154
|
return (t, n) => (h(), i("footer", { class: d(["mw-footer", `mw-footer--${e.variant}`]) }, [
|
|
155
155
|
v(t.$slots, "start"),
|
|
156
156
|
v(t.$slots, "default"),
|
|
157
157
|
v(t.$slots, "end"),
|
|
158
|
-
e.docsUrl || e.devUrl ? (h(), i("nav",
|
|
158
|
+
e.docsUrl || e.devUrl ? (h(), i("nav", ie, [e.docsUrl ? (h(), i("a", {
|
|
159
159
|
key: 0,
|
|
160
|
-
href: x(
|
|
160
|
+
href: x(N)(e.docsUrl),
|
|
161
161
|
target: "_blank",
|
|
162
162
|
rel: "noopener noreferrer"
|
|
163
|
-
}, "Documentation", 8,
|
|
163
|
+
}, "Documentation", 8, ae)) : r("", !0), e.devUrl ? (h(), i("a", {
|
|
164
164
|
key: 1,
|
|
165
|
-
href: x(
|
|
165
|
+
href: x(N)(e.devUrl),
|
|
166
166
|
target: "_blank",
|
|
167
167
|
rel: "noopener noreferrer"
|
|
168
|
-
}, "Developer docs", 8,
|
|
168
|
+
}, "Developer docs", 8, oe)) : r("", !0)])) : r("", !0)
|
|
169
169
|
], 2));
|
|
170
170
|
}
|
|
171
|
-
}), [["__scopeId", "data-v-42cde159"]]),
|
|
171
|
+
}), [["__scopeId", "data-v-42cde159"]]), ce = { class: "mw-mode" }, le = [
|
|
172
172
|
"aria-pressed",
|
|
173
173
|
"title",
|
|
174
174
|
"onClick"
|
|
175
|
-
],
|
|
175
|
+
], ue = { "aria-hidden": "true" }, de = { class: "mw-mode__label" }, fe = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
176
176
|
__name: "ColorModeControl",
|
|
177
177
|
props: {
|
|
178
178
|
modelValue: {},
|
|
@@ -193,16 +193,16 @@ var re = {
|
|
|
193
193
|
dark: "☾",
|
|
194
194
|
system: "🖵"
|
|
195
195
|
};
|
|
196
|
-
return (o, s) => (h(), i("fieldset",
|
|
196
|
+
return (o, s) => (h(), i("fieldset", ce, [s[0] ||= a("legend", { class: "mw-visually-hidden" }, "Colour mode", -1), (h(!0), i(e, null, _(t.modes, (e) => (h(), i("button", {
|
|
197
197
|
key: e,
|
|
198
198
|
type: "button",
|
|
199
199
|
class: d(["mw-mode__btn", { "is-active": t.modelValue === e }]),
|
|
200
200
|
"aria-pressed": t.modelValue === e,
|
|
201
201
|
title: n[e],
|
|
202
202
|
onClick: (t) => o.$emit("update:modelValue", e)
|
|
203
|
-
}, [a("span",
|
|
203
|
+
}, [a("span", ue, b(r[e]), 1), a("span", de, b(n[e]), 1)], 10, le))), 128))]));
|
|
204
204
|
}
|
|
205
|
-
}), [["__scopeId", "data-v-e5cba7a7"]]),
|
|
205
|
+
}), [["__scopeId", "data-v-e5cba7a7"]]), pe = ["type", "disabled"], me = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
206
206
|
__name: "UiButton",
|
|
207
207
|
props: {
|
|
208
208
|
variant: { default: "primary" },
|
|
@@ -217,25 +217,25 @@ var re = {
|
|
|
217
217
|
type: e.type,
|
|
218
218
|
disabled: e.disabled,
|
|
219
219
|
class: d(["mw-btn", `mw-btn--${e.variant}`])
|
|
220
|
-
}, [v(t.$slots, "default", {}, void 0, !0)], 10,
|
|
220
|
+
}, [v(t.$slots, "default", {}, void 0, !0)], 10, pe));
|
|
221
221
|
}
|
|
222
|
-
}), [["__scopeId", "data-v-bc33cc23"]]),
|
|
222
|
+
}), [["__scopeId", "data-v-bc33cc23"]]), he = { class: "mw-card" }, ge = {
|
|
223
223
|
key: 0,
|
|
224
224
|
class: "mw-card__header"
|
|
225
|
-
},
|
|
225
|
+
}, _e = { class: "mw-card__title" }, ve = {
|
|
226
226
|
key: 1,
|
|
227
227
|
class: "mw-card__footer"
|
|
228
|
-
},
|
|
228
|
+
}, ye = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
229
229
|
__name: "UiCard",
|
|
230
230
|
props: { title: {} },
|
|
231
231
|
setup(e) {
|
|
232
|
-
return (t, n) => (h(), i("section",
|
|
233
|
-
e.title || t.$slots.header ? (h(), i("header",
|
|
232
|
+
return (t, n) => (h(), i("section", he, [
|
|
233
|
+
e.title || t.$slots.header ? (h(), i("header", ge, [v(t.$slots, "header", {}, () => [a("h3", _e, b(e.title), 1)], !0)])) : r("", !0),
|
|
234
234
|
v(t.$slots, "default", {}, void 0, !0),
|
|
235
|
-
t.$slots.footer ? (h(), i("footer",
|
|
235
|
+
t.$slots.footer ? (h(), i("footer", ve, [v(t.$slots, "footer", {}, void 0, !0)])) : r("", !0)
|
|
236
236
|
]));
|
|
237
237
|
}
|
|
238
|
-
}), [["__scopeId", "data-v-384b36cf"]]),
|
|
238
|
+
}), [["__scopeId", "data-v-384b36cf"]]), be = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
239
239
|
__name: "UiSelect",
|
|
240
240
|
props: {
|
|
241
241
|
modelValue: {},
|
|
@@ -243,13 +243,13 @@ var re = {
|
|
|
243
243
|
},
|
|
244
244
|
emits: ["update:modelValue"],
|
|
245
245
|
setup(e) {
|
|
246
|
-
let t =
|
|
247
|
-
return (e, n) =>
|
|
246
|
+
let t = C(e, "modelValue");
|
|
247
|
+
return (e, n) => O((h(), i("select", {
|
|
248
248
|
"onUpdate:modelValue": n[0] ||= (e) => t.value = e,
|
|
249
249
|
class: "mw-select"
|
|
250
|
-
}, [v(e.$slots, "default", {}, void 0, !0)], 512)), [[
|
|
250
|
+
}, [v(e.$slots, "default", {}, void 0, !0)], 512)), [[T, t.value]]);
|
|
251
251
|
}
|
|
252
|
-
}), [["__scopeId", "data-v-38fbd9b5"]]),
|
|
252
|
+
}), [["__scopeId", "data-v-38fbd9b5"]]), xe = ["role"], Se = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
253
253
|
__name: "UiNotice",
|
|
254
254
|
props: { type: {} },
|
|
255
255
|
setup(e) {
|
|
@@ -260,13 +260,13 @@ var re = {
|
|
|
260
260
|
return (t, n) => (h(), i("p", {
|
|
261
261
|
class: d(["mw-notice", e.type && e.type !== "info" ? `mw-notice--${e.type}` : ""]),
|
|
262
262
|
role: r.value
|
|
263
|
-
}, [v(t.$slots, "default", {}, void 0, !0)], 10,
|
|
263
|
+
}, [v(t.$slots, "default", {}, void 0, !0)], 10, xe));
|
|
264
264
|
}
|
|
265
|
-
}), [["__scopeId", "data-v-ee7fffb1"]]),
|
|
265
|
+
}), [["__scopeId", "data-v-ee7fffb1"]]), Ce = ["disabled", "aria-current"], we = {
|
|
266
266
|
key: 0,
|
|
267
267
|
class: "sidebar-item__icon",
|
|
268
268
|
"aria-hidden": "true"
|
|
269
|
-
},
|
|
269
|
+
}, Te = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
270
270
|
__name: "SidebarItem",
|
|
271
271
|
props: {
|
|
272
272
|
label: {},
|
|
@@ -286,21 +286,21 @@ var re = {
|
|
|
286
286
|
class: d(["sidebar-item", { "is-active": e.active }]),
|
|
287
287
|
disabled: e.disabled,
|
|
288
288
|
"aria-current": e.active ? "page" : void 0
|
|
289
|
-
}, [e.icon ? (h(), i("span",
|
|
289
|
+
}, [e.icon ? (h(), i("span", we, b(e.icon), 1)) : r("", !0), o(" " + b(e.label), 1)], 10, Ce));
|
|
290
290
|
}
|
|
291
|
-
}), [["__scopeId", "data-v-c8ae7e5f"]]),
|
|
291
|
+
}), [["__scopeId", "data-v-c8ae7e5f"]]), Ee = { class: "sidebar-group__label" }, De = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
292
292
|
__name: "SidebarGroup",
|
|
293
293
|
props: {
|
|
294
294
|
label: {},
|
|
295
295
|
level: { default: 1 }
|
|
296
296
|
},
|
|
297
297
|
setup(e) {
|
|
298
|
-
return (t, n) => (h(), i("fieldset", { class: d(["sidebar-group", `sidebar-group--l${e.level}`]) }, [a("legend",
|
|
298
|
+
return (t, n) => (h(), i("fieldset", { class: d(["sidebar-group", `sidebar-group--l${e.level}`]) }, [a("legend", Ee, b(e.label), 1), v(t.$slots, "default", {}, void 0, !0)], 2));
|
|
299
299
|
}
|
|
300
300
|
}), [["__scopeId", "data-v-1ac17bd7"]]);
|
|
301
301
|
//#endregion
|
|
302
302
|
//#region src/tabs.ts
|
|
303
|
-
function
|
|
303
|
+
function I(e, t) {
|
|
304
304
|
return {
|
|
305
305
|
tab: `${e}-tab-${t}`,
|
|
306
306
|
panel: `${e}-panel-${t}`
|
|
@@ -308,14 +308,14 @@ function R(e, t) {
|
|
|
308
308
|
}
|
|
309
309
|
//#endregion
|
|
310
310
|
//#region src/components/AppTabNav.vue?vue&type=script&setup=true&lang.ts
|
|
311
|
-
var
|
|
311
|
+
var Oe = ["aria-label"], ke = [
|
|
312
312
|
"id",
|
|
313
313
|
"aria-selected",
|
|
314
314
|
"aria-controls",
|
|
315
315
|
"tabindex",
|
|
316
316
|
"onClick",
|
|
317
317
|
"onKeydown"
|
|
318
|
-
],
|
|
318
|
+
], Ae = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
319
319
|
__name: "AppTabNav",
|
|
320
320
|
props: {
|
|
321
321
|
tabs: {},
|
|
@@ -352,7 +352,7 @@ var Ee = ["aria-label"], De = [
|
|
|
352
352
|
role: "presentation",
|
|
353
353
|
class: "mw-tab-nav__item"
|
|
354
354
|
}, [a("button", {
|
|
355
|
-
id: x(
|
|
355
|
+
id: x(I)(t.idPrefix, e.id).tab,
|
|
356
356
|
ref_for: !0,
|
|
357
357
|
ref: (e) => {
|
|
358
358
|
s[n] = e;
|
|
@@ -361,32 +361,32 @@ var Ee = ["aria-label"], De = [
|
|
|
361
361
|
role: "tab",
|
|
362
362
|
class: d(["mw-tab-nav__tab", { "mw-tab-nav__tab--active": t.modelValue === e.id }]),
|
|
363
363
|
"aria-selected": t.modelValue === e.id,
|
|
364
|
-
"aria-controls": t.allPanels || t.modelValue === e.id ? x(
|
|
364
|
+
"aria-controls": t.allPanels || t.modelValue === e.id ? x(I)(t.idPrefix, e.id).panel : void 0,
|
|
365
365
|
tabindex: t.modelValue === e.id ? 0 : -1,
|
|
366
366
|
onClick: (t) => o("update:modelValue", e.id),
|
|
367
367
|
onKeydown: (e) => l(e, n)
|
|
368
|
-
}, b(e.label), 43,
|
|
368
|
+
}, b(e.label), 43, ke)]))), 128))], 10, Oe));
|
|
369
369
|
}
|
|
370
|
-
}), [["__scopeId", "data-v-fbb7de4c"]]),
|
|
370
|
+
}), [["__scopeId", "data-v-fbb7de4c"]]), je = ["id", "aria-labelledby"], Me = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
371
371
|
__name: "UiTabPanel",
|
|
372
372
|
props: {
|
|
373
373
|
idPrefix: {},
|
|
374
374
|
tab: {}
|
|
375
375
|
},
|
|
376
376
|
setup(e) {
|
|
377
|
-
let n = e, r = t(() =>
|
|
377
|
+
let n = e, r = t(() => I(n.idPrefix, n.tab));
|
|
378
378
|
return (e, t) => (h(), i("section", {
|
|
379
379
|
id: r.value.panel,
|
|
380
380
|
role: "tabpanel",
|
|
381
381
|
"aria-labelledby": r.value.tab,
|
|
382
382
|
tabindex: "0",
|
|
383
383
|
class: "mw-tab-panel"
|
|
384
|
-
}, [v(e.$slots, "default", {}, void 0, !0)], 8,
|
|
384
|
+
}, [v(e.$slots, "default", {}, void 0, !0)], 8, je));
|
|
385
385
|
}
|
|
386
|
-
}), [["__scopeId", "data-v-add194c8"]]),
|
|
386
|
+
}), [["__scopeId", "data-v-add194c8"]]), Ne = ["aria-labelledby"], Pe = { class: "mw-dialog__content" }, Fe = { class: "mw-dialog__header" }, Ie = ["id"], Le = ["aria-label"], Re = {
|
|
387
387
|
key: 0,
|
|
388
388
|
class: "mw-dialog__actions"
|
|
389
|
-
},
|
|
389
|
+
}, ze = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
390
390
|
__name: "UiDialog",
|
|
391
391
|
props: /*@__PURE__*/ u({
|
|
392
392
|
title: {},
|
|
@@ -406,60 +406,60 @@ var Ee = ["aria-label"], De = [
|
|
|
406
406
|
emits: /*@__PURE__*/ u(["close"], ["update:open"]),
|
|
407
407
|
setup(e, { expose: n, emit: s }) {
|
|
408
408
|
S((e) => ({ ce627f2e: _.value }));
|
|
409
|
-
let c =
|
|
410
|
-
function
|
|
409
|
+
let c = C(e, "open"), l = e, u = s, d = g(null), m = ee(), _ = t(() => l.width ?? "min(420px, 90vw)"), y = typeof HTMLDialogElement < "u" && "closedBy" in HTMLDialogElement.prototype;
|
|
410
|
+
function w(e = "") {
|
|
411
411
|
d.value?.open && d.value.close(e);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function T(e) {
|
|
414
414
|
let t = d.value;
|
|
415
415
|
t && (e && !t.open ? t.showModal() : !e && t.open && t.close());
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function D() {
|
|
418
418
|
d.value?.setAttribute("closedby", l.dismissible ? "any" : "none");
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
l.dismissible && e.target === d.value &&
|
|
420
|
+
function O(e) {
|
|
421
|
+
l.dismissible && e.target === d.value && w();
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function k(e) {
|
|
424
424
|
l.dismissible || e.preventDefault();
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function A() {
|
|
427
427
|
c.value = !1, u("close", d.value?.returnValue ?? "");
|
|
428
428
|
}
|
|
429
429
|
return p(() => {
|
|
430
|
-
|
|
430
|
+
D(), y || d.value?.addEventListener("click", O), T(c.value);
|
|
431
431
|
}), f(() => {
|
|
432
|
-
d.value?.removeEventListener("click",
|
|
433
|
-
}),
|
|
432
|
+
d.value?.removeEventListener("click", O);
|
|
433
|
+
}), E(c, T, { flush: "post" }), E(() => l.dismissible, D), n({ close: w }), (t, n) => (h(), i("dialog", {
|
|
434
434
|
ref_key: "el",
|
|
435
435
|
ref: d,
|
|
436
436
|
class: "mw-dialog",
|
|
437
437
|
"aria-labelledby": x(m),
|
|
438
|
-
onCancel:
|
|
439
|
-
onClose:
|
|
440
|
-
}, [a("article",
|
|
441
|
-
a("header",
|
|
438
|
+
onCancel: k,
|
|
439
|
+
onClose: A
|
|
440
|
+
}, [a("article", Pe, [
|
|
441
|
+
a("header", Fe, [a("h2", {
|
|
442
442
|
id: x(m),
|
|
443
443
|
class: "mw-dialog__title"
|
|
444
|
-
}, [v(t.$slots, "title", {}, () => [o(b(e.title), 1)], !0)], 8,
|
|
444
|
+
}, [v(t.$slots, "title", {}, () => [o(b(e.title), 1)], !0)], 8, Ie), e.dismissible ? (h(), i("button", {
|
|
445
445
|
key: 0,
|
|
446
446
|
type: "button",
|
|
447
447
|
class: "mw-dialog__close",
|
|
448
448
|
"aria-label": e.closeLabel,
|
|
449
|
-
onClick: n[0] ||= (e) =>
|
|
450
|
-
}, "×", 8,
|
|
449
|
+
onClick: n[0] ||= (e) => w()
|
|
450
|
+
}, "×", 8, Le)) : r("", !0)]),
|
|
451
451
|
v(t.$slots, "default", {}, void 0, !0),
|
|
452
|
-
t.$slots.actions ? (h(), i("footer",
|
|
453
|
-
])], 40,
|
|
452
|
+
t.$slots.actions ? (h(), i("footer", Re, [v(t.$slots, "actions", { close: w }, void 0, !0)])) : r("", !0)
|
|
453
|
+
])], 40, Ne));
|
|
454
454
|
}
|
|
455
|
-
}), [["__scopeId", "data-v-78973168"]]),
|
|
456
|
-
function
|
|
455
|
+
}), [["__scopeId", "data-v-78973168"]]), L = [12, 10];
|
|
456
|
+
function R(e, t = L) {
|
|
457
457
|
let n = Math.max(0, Math.trunc(t[0]) || 0), r = Math.max(0, Math.trunc(t[1]) || 0);
|
|
458
458
|
return e.length <= n + r ? e : `${n > 0 ? e.slice(0, n) : ""}…${r > 0 ? e.slice(-r) : ""}`;
|
|
459
459
|
}
|
|
460
460
|
//#endregion
|
|
461
461
|
//#region src/components/CopyableAddress.vue?vue&type=script&setup=true&lang.ts
|
|
462
|
-
var
|
|
462
|
+
var Be = { class: "ca-root" }, Ve = ["title"], He = ["title", "aria-label"], Ue = {
|
|
463
463
|
key: 0,
|
|
464
464
|
class: "ca-icon",
|
|
465
465
|
viewBox: "0 0 24 24",
|
|
@@ -471,7 +471,7 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
471
471
|
"stroke-linecap": "round",
|
|
472
472
|
"stroke-linejoin": "round",
|
|
473
473
|
"aria-hidden": "true"
|
|
474
|
-
},
|
|
474
|
+
}, We = {
|
|
475
475
|
key: 1,
|
|
476
476
|
class: "ca-icon",
|
|
477
477
|
viewBox: "0 0 24 24",
|
|
@@ -483,7 +483,7 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
483
483
|
"stroke-linecap": "round",
|
|
484
484
|
"stroke-linejoin": "round",
|
|
485
485
|
"aria-hidden": "true"
|
|
486
|
-
},
|
|
486
|
+
}, Ge = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
487
487
|
__name: "CopyableAddress",
|
|
488
488
|
props: {
|
|
489
489
|
address: {},
|
|
@@ -491,11 +491,11 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
491
491
|
type: Boolean,
|
|
492
492
|
default: !0
|
|
493
493
|
},
|
|
494
|
-
chars: { default: () => [...
|
|
494
|
+
chars: { default: () => [...L] },
|
|
495
495
|
label: { default: "Copy" }
|
|
496
496
|
},
|
|
497
497
|
setup(e) {
|
|
498
|
-
let n = e, r = g(!1), s = t(() => n.truncate ?
|
|
498
|
+
let n = e, r = g(!1), s = t(() => n.truncate ? R(n.address, n.chars) : n.address);
|
|
499
499
|
async function c() {
|
|
500
500
|
try {
|
|
501
501
|
await navigator.clipboard.writeText(n.address);
|
|
@@ -506,25 +506,25 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
506
506
|
r.value = !1;
|
|
507
507
|
}, 1500);
|
|
508
508
|
}
|
|
509
|
-
return (t, n) => (h(), i("span",
|
|
509
|
+
return (t, n) => (h(), i("span", Be, [a("span", {
|
|
510
510
|
class: "ca-value",
|
|
511
511
|
title: e.address
|
|
512
|
-
}, [v(t.$slots, "default", {}, () => [o(b(s.value), 1)], !0)], 8,
|
|
512
|
+
}, [v(t.$slots, "default", {}, () => [o(b(s.value), 1)], !0)], 8, Ve), a("button", {
|
|
513
513
|
type: "button",
|
|
514
514
|
class: d(["ca-copy", { "ca-copy--copied": r.value }]),
|
|
515
515
|
title: r.value ? "Copied!" : e.label,
|
|
516
516
|
"aria-label": r.value ? "Copied" : e.label,
|
|
517
517
|
onClick: c
|
|
518
|
-
}, [r.value ? (h(), i("svg",
|
|
518
|
+
}, [r.value ? (h(), i("svg", Ue, [...n[0] ||= [a("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (h(), i("svg", We, [...n[1] ||= [a("rect", {
|
|
519
519
|
x: "9",
|
|
520
520
|
y: "9",
|
|
521
521
|
width: "13",
|
|
522
522
|
height: "13",
|
|
523
523
|
rx: "2",
|
|
524
524
|
ry: "2"
|
|
525
|
-
}, null, -1), a("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]]))], 10,
|
|
525
|
+
}, null, -1), a("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]]))], 10, He)]));
|
|
526
526
|
}
|
|
527
|
-
}), [["__scopeId", "data-v-ebf9e8c7"]]),
|
|
527
|
+
}), [["__scopeId", "data-v-ebf9e8c7"]]), Ke = ["href", "title"], qe = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
528
528
|
__name: "ExplorerLink",
|
|
529
529
|
props: {
|
|
530
530
|
href: {},
|
|
@@ -533,22 +533,22 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
533
533
|
type: Boolean,
|
|
534
534
|
default: !0
|
|
535
535
|
},
|
|
536
|
-
chars: { default: () => [...
|
|
536
|
+
chars: { default: () => [...L] }
|
|
537
537
|
},
|
|
538
538
|
setup(e) {
|
|
539
|
-
let n = e, r = t(() => n.value ? n.truncate ?
|
|
539
|
+
let n = e, r = t(() => n.value ? n.truncate ? R(n.value, n.chars) : n.value : "");
|
|
540
540
|
return (t, n) => (h(), i("a", {
|
|
541
541
|
class: "el-root",
|
|
542
|
-
href: x(
|
|
542
|
+
href: x(N)(e.href),
|
|
543
543
|
target: "_blank",
|
|
544
544
|
rel: "noopener noreferrer",
|
|
545
545
|
title: e.value
|
|
546
|
-
}, [v(t.$slots, "default", {}, () => [o(b(r.value), 1)], !0)], 8,
|
|
546
|
+
}, [v(t.$slots, "default", {}, () => [o(b(r.value), 1)], !0)], 8, Ke));
|
|
547
547
|
}
|
|
548
|
-
}), [["__scopeId", "data-v-f05cc8ba"]]),
|
|
548
|
+
}), [["__scopeId", "data-v-f05cc8ba"]]), Je = { class: "copyright-line" }, Ye = ["href", "aria-label"], Xe = { key: 0 }, Ze = { key: 1 }, Qe = {
|
|
549
549
|
key: 2,
|
|
550
550
|
class: "kopimi-symbol"
|
|
551
|
-
},
|
|
551
|
+
}, $e = { class: "text-content" }, et = { key: 0 }, tt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
552
552
|
__name: "CopyrightLine",
|
|
553
553
|
props: {
|
|
554
554
|
organisationName: {},
|
|
@@ -561,16 +561,16 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
561
561
|
setup(e) {
|
|
562
562
|
let n = e, s = t(() => n.symbolVariant);
|
|
563
563
|
function c(e) {
|
|
564
|
-
return e.startsWith("/") ?
|
|
564
|
+
return e.startsWith("/") ? F(e) : N(e);
|
|
565
565
|
}
|
|
566
566
|
let l = t(() => (n.symbolHref ? c(n.symbolHref) : void 0) || (s.value === "kopimi" ? "/legal/powr.broccoli-kopimi.pdf" : s.value === "copyleft" ? "/legal/copyleft.html" : "/legal/copyright.html")), u = t(() => l.value.startsWith("/")), d = t(() => n.symbolLabel || (s.value === "kopimi" ? "Kopimi legal notice" : s.value === "copyleft" ? "Copyleft legal notice" : "Copyright legal notice")), f = t(() => n.rightsStatement === "" ? "" : n.rightsStatement === "none" ? "No rights reserved." : n.rightsStatement === "all" || !n.rightsStatement ? "All rights reserved." : n.rightsStatement === "jam" ? "All jams preserved." : n.rightsStatement);
|
|
567
|
-
return (t, n) => (h(), i("small",
|
|
568
|
-
href: u.value ? x(
|
|
567
|
+
return (t, n) => (h(), i("small", Je, [a("a", {
|
|
568
|
+
href: u.value ? x(F)(l.value) : x(N)(l.value),
|
|
569
569
|
class: "symbol-link",
|
|
570
570
|
target: "_blank",
|
|
571
571
|
rel: "noopener noreferrer",
|
|
572
572
|
"aria-label": d.value
|
|
573
|
-
}, [s.value === "copyright" ? (h(), i("span",
|
|
573
|
+
}, [s.value === "copyright" ? (h(), i("span", Xe, "©")) : s.value === "copyleft" ? (h(), i("span", Ze, "🄯")) : s.value === "kopimi" ? (h(), i("span", Qe, [...n[0] ||= [a("svg", {
|
|
574
574
|
viewBox: "0 0 24 24",
|
|
575
575
|
width: "1em",
|
|
576
576
|
height: "1em",
|
|
@@ -590,17 +590,17 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
590
590
|
"font-family": "system-ui, sans-serif",
|
|
591
591
|
"font-size": "11",
|
|
592
592
|
fill: "currentColor"
|
|
593
|
-
}, " C ")], -1)]])) : r("", !0)], 8,
|
|
593
|
+
}, " C ")], -1)]])) : r("", !0)], 8, Ye), a("span", $e, [o(b(e.year) + " " + b(e.organisationName) + ".", 1), f.value ? (h(), i("span", et, b(`
|
|
594
594
|
${f.value}`), 1)) : r("", !0)])]));
|
|
595
595
|
}
|
|
596
|
-
}), [["__scopeId", "data-v-06282c3d"]]),
|
|
596
|
+
}), [["__scopeId", "data-v-06282c3d"]]), nt = {
|
|
597
597
|
class: "ui-stepper",
|
|
598
598
|
role: "list"
|
|
599
|
-
},
|
|
599
|
+
}, rt = ["aria-current"], it = ["aria-label", "onClick"], at = {
|
|
600
600
|
key: 1,
|
|
601
601
|
class: "ui-stepper__badge",
|
|
602
602
|
"aria-hidden": "true"
|
|
603
|
-
},
|
|
603
|
+
}, ot = { class: "ui-stepper__label" }, st = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
604
604
|
__name: "UiStepper",
|
|
605
605
|
props: {
|
|
606
606
|
steps: {},
|
|
@@ -615,7 +615,7 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
615
615
|
function c(e) {
|
|
616
616
|
e < r.modelValue && o("update:modelValue", e);
|
|
617
617
|
}
|
|
618
|
-
return (n, r) => (h(), i("ol",
|
|
618
|
+
return (n, r) => (h(), i("ol", nt, [(h(!0), i(e, null, _(t.steps, (e, t) => (h(), i("li", {
|
|
619
619
|
key: e.id,
|
|
620
620
|
class: d(["ui-stepper__step", `is-${s(t)}`]),
|
|
621
621
|
"aria-current": s(t) === "active" ? "step" : void 0
|
|
@@ -625,18 +625,18 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
625
625
|
class: "ui-stepper__badge",
|
|
626
626
|
"aria-label": `Back to ${e.label}`,
|
|
627
627
|
onClick: (e) => c(t)
|
|
628
|
-
}, "✓", 8,
|
|
628
|
+
}, "✓", 8, it)) : (h(), i("span", at, b(t + 1), 1)), a("span", ot, b(e.label), 1)], 10, rt))), 128))]));
|
|
629
629
|
}
|
|
630
|
-
}), [["__scopeId", "data-v-38fb837c"]]),
|
|
630
|
+
}), [["__scopeId", "data-v-38fb837c"]]), ct = { class: "mw-seg" }, lt = {
|
|
631
631
|
key: 0,
|
|
632
632
|
class: "mw-visually-hidden"
|
|
633
|
-
},
|
|
633
|
+
}, ut = ["title"], dt = [
|
|
634
634
|
"name",
|
|
635
635
|
"value",
|
|
636
636
|
"checked",
|
|
637
637
|
"disabled",
|
|
638
638
|
"onChange"
|
|
639
|
-
],
|
|
639
|
+
], ft = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
640
640
|
__name: "UiSegmentedControl",
|
|
641
641
|
props: {
|
|
642
642
|
options: {},
|
|
@@ -645,8 +645,8 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
645
645
|
},
|
|
646
646
|
emits: ["update:modelValue"],
|
|
647
647
|
setup(t, { emit: n }) {
|
|
648
|
-
let s = n, c =
|
|
649
|
-
return (n, l) => (h(), i("fieldset",
|
|
648
|
+
let s = n, c = ee();
|
|
649
|
+
return (n, l) => (h(), i("fieldset", ct, [t.ariaLabel ? (h(), i("legend", lt, b(t.ariaLabel), 1)) : r("", !0), (h(!0), i(e, null, _(t.options, (e) => (h(), i("label", {
|
|
650
650
|
key: e.id,
|
|
651
651
|
class: d(["mw-seg__item", {
|
|
652
652
|
"mw-seg__item--active": t.modelValue === e.id,
|
|
@@ -660,28 +660,28 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
660
660
|
checked: t.modelValue === e.id,
|
|
661
661
|
disabled: e.disabled,
|
|
662
662
|
onChange: (t) => s("update:modelValue", e.id)
|
|
663
|
-
}, null, 40,
|
|
663
|
+
}, null, 40, dt), o(" " + b(e.label), 1)], 10, ut))), 128))]));
|
|
664
664
|
}
|
|
665
|
-
}), [["__scopeId", "data-v-430ffdd6"]]),
|
|
665
|
+
}), [["__scopeId", "data-v-430ffdd6"]]), pt = { class: "mw-field-hint" }, mt = ["aria-describedby"], ht = ["id"], gt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
666
666
|
__name: "UiFieldHint",
|
|
667
667
|
props: { fieldId: {} },
|
|
668
668
|
setup(e) {
|
|
669
669
|
function t(e) {
|
|
670
670
|
e.key === "Escape" && e.currentTarget.blur();
|
|
671
671
|
}
|
|
672
|
-
return (n, r) => (h(), i("span",
|
|
672
|
+
return (n, r) => (h(), i("span", pt, [a("button", {
|
|
673
673
|
type: "button",
|
|
674
674
|
class: "mw-field-hint__btn",
|
|
675
675
|
"aria-describedby": `${e.fieldId}-hint`,
|
|
676
676
|
"aria-label": "Help",
|
|
677
677
|
onKeydown: t
|
|
678
|
-
}, "?", 40,
|
|
678
|
+
}, "?", 40, mt), a("span", {
|
|
679
679
|
id: `${e.fieldId}-hint`,
|
|
680
680
|
role: "tooltip",
|
|
681
681
|
class: "mw-field-hint__tip"
|
|
682
|
-
}, [v(n.$slots, "default", {}, void 0, !0)], 8,
|
|
682
|
+
}, [v(n.$slots, "default", {}, void 0, !0)], 8, ht)]));
|
|
683
683
|
}
|
|
684
|
-
}), [["__scopeId", "data-v-29d9a629"]]),
|
|
684
|
+
}), [["__scopeId", "data-v-29d9a629"]]), _t = { class: "mw-form-field" }, vt = ["for"], yt = ["id"], bt = ["id"], xt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
685
685
|
__name: "UiFormField",
|
|
686
686
|
props: {
|
|
687
687
|
id: {},
|
|
@@ -695,99 +695,99 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
695
695
|
"aria-invalid": n.error ? !0 : void 0,
|
|
696
696
|
"aria-describedby": n.error ? o.value : n.hint ? s.value : void 0
|
|
697
697
|
}));
|
|
698
|
-
return (t, n) => (h(), i("p",
|
|
698
|
+
return (t, n) => (h(), i("p", _t, [
|
|
699
699
|
a("label", {
|
|
700
700
|
for: e.id,
|
|
701
701
|
class: "mw-form-field__label"
|
|
702
|
-
}, b(e.label), 9,
|
|
702
|
+
}, b(e.label), 9, vt),
|
|
703
703
|
v(t.$slots, "label-suffix"),
|
|
704
704
|
v(t.$slots, "default", { attrs: c.value }),
|
|
705
705
|
e.hint && !e.error ? (h(), i("small", {
|
|
706
706
|
key: 0,
|
|
707
707
|
id: s.value,
|
|
708
708
|
class: "mw-form-field__hint"
|
|
709
|
-
}, b(e.hint), 9,
|
|
709
|
+
}, b(e.hint), 9, yt)) : r("", !0),
|
|
710
710
|
e.error ? (h(), i("small", {
|
|
711
711
|
key: 1,
|
|
712
712
|
id: o.value,
|
|
713
713
|
class: "mw-form-field__error"
|
|
714
|
-
}, b(e.error), 9,
|
|
714
|
+
}, b(e.error), 9, bt)) : r("", !0)
|
|
715
715
|
]));
|
|
716
716
|
}
|
|
717
|
-
}), [["__scopeId", "data-v-5aef34d9"]]),
|
|
717
|
+
}), [["__scopeId", "data-v-5aef34d9"]]), St = { class: "mw-tool-intro" }, Ct = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
718
718
|
__name: "UiToolIntro",
|
|
719
719
|
setup(e) {
|
|
720
|
-
return (e, t) => (h(), i("p",
|
|
720
|
+
return (e, t) => (h(), i("p", St, [v(e.$slots, "default", {}, void 0, !0)]));
|
|
721
721
|
}
|
|
722
|
-
}), [["__scopeId", "data-v-9a5436b9"]]),
|
|
722
|
+
}), [["__scopeId", "data-v-9a5436b9"]]), wt = { class: "mw-panel" }, Tt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
723
723
|
__name: "UiPanel",
|
|
724
724
|
props: {
|
|
725
725
|
title: {},
|
|
726
726
|
level: { default: 2 }
|
|
727
727
|
},
|
|
728
728
|
setup(e) {
|
|
729
|
-
let a = e, s =
|
|
730
|
-
return (t, a) => (h(), i("section",
|
|
729
|
+
let a = e, s = w(), c = t(() => !!(a.title || s.title));
|
|
730
|
+
return (t, a) => (h(), i("section", wt, [c.value ? (h(), n(y(`h${e.level}`), {
|
|
731
731
|
key: 0,
|
|
732
732
|
class: "mw-panel__title"
|
|
733
733
|
}, {
|
|
734
|
-
default:
|
|
734
|
+
default: D(() => [v(t.$slots, "title", {}, () => [o(b(e.title), 1)], !0)]),
|
|
735
735
|
_: 3
|
|
736
736
|
})) : r("", !0), v(t.$slots, "default", {}, void 0, !0)]));
|
|
737
737
|
}
|
|
738
|
-
}), [["__scopeId", "data-v-62fac524"]]),
|
|
738
|
+
}), [["__scopeId", "data-v-62fac524"]]), Et = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
739
739
|
__name: "UiBadge",
|
|
740
740
|
props: { variant: { default: "neutral" } },
|
|
741
741
|
setup(e) {
|
|
742
742
|
return (t, n) => (h(), i("span", { class: d(["mw-badge", `mw-badge--${e.variant}`]) }, [v(t.$slots, "default", {}, void 0, !0)], 2));
|
|
743
743
|
}
|
|
744
|
-
}), [["__scopeId", "data-v-2e33d71a"]]),
|
|
744
|
+
}), [["__scopeId", "data-v-2e33d71a"]]), Dt = {
|
|
745
745
|
type: "button",
|
|
746
746
|
class: "mw-toolbar-btn"
|
|
747
|
-
},
|
|
747
|
+
}, z = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
748
748
|
__name: "UiToolbarButton",
|
|
749
749
|
setup(e) {
|
|
750
|
-
return (e, t) => (h(), i("button",
|
|
750
|
+
return (e, t) => (h(), i("button", Dt, [v(e.$slots, "default", {}, void 0, !0)]));
|
|
751
751
|
}
|
|
752
|
-
}), [["__scopeId", "data-v-d5f19134"]]),
|
|
752
|
+
}), [["__scopeId", "data-v-d5f19134"]]), Ot = { class: "mw-toolbar" }, kt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
753
753
|
__name: "UiToolbar",
|
|
754
754
|
props: { actions: {} },
|
|
755
755
|
emits: ["action"],
|
|
756
756
|
setup(t, { emit: n }) {
|
|
757
757
|
let r = n;
|
|
758
|
-
return (n, a) => (h(), i("menu",
|
|
758
|
+
return (n, a) => (h(), i("menu", Ot, [(h(!0), i(e, null, _(t.actions, (e) => (h(), i("li", { key: e.id }, [s(z, {
|
|
759
759
|
disabled: e.disabled,
|
|
760
760
|
onClick: (t) => r("action", e.id)
|
|
761
761
|
}, {
|
|
762
|
-
default:
|
|
762
|
+
default: D(() => [o(b(e.label), 1)]),
|
|
763
763
|
_: 2
|
|
764
764
|
}, 1032, ["disabled", "onClick"])]))), 128))]));
|
|
765
765
|
}
|
|
766
|
-
}), [["__scopeId", "data-v-170c8eb5"]]),
|
|
766
|
+
}), [["__scopeId", "data-v-170c8eb5"]]), At = { class: "mw-stat-grid" }, jt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
767
767
|
__name: "UiStatGrid",
|
|
768
768
|
setup(e) {
|
|
769
|
-
return (e, t) => (h(), i("dl",
|
|
769
|
+
return (e, t) => (h(), i("dl", At, [v(e.$slots, "default", {}, void 0, !0)]));
|
|
770
770
|
}
|
|
771
|
-
}), [["__scopeId", "data-v-3608575d"]]),
|
|
771
|
+
}), [["__scopeId", "data-v-3608575d"]]), Mt = { class: "mw-stat-grid__label" }, Nt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
772
772
|
__name: "UiStatRow",
|
|
773
773
|
props: {
|
|
774
774
|
label: {},
|
|
775
775
|
align: { default: "right" }
|
|
776
776
|
},
|
|
777
777
|
setup(t) {
|
|
778
|
-
return (n, r) => (h(), i(e, null, [a("dt",
|
|
778
|
+
return (n, r) => (h(), i(e, null, [a("dt", Mt, b(t.label), 1), a("dd", { class: d(["mw-stat-grid__value", { "mw-stat-grid__value--left": t.align === "left" }]) }, [v(n.$slots, "default", {}, void 0, !0)], 2)], 64));
|
|
779
779
|
}
|
|
780
|
-
}), [["__scopeId", "data-v-829f7772"]]),
|
|
780
|
+
}), [["__scopeId", "data-v-829f7772"]]), Pt = { class: "mw-data-table-wrap" }, Ft = { class: "mw-data-table" }, It = {
|
|
781
781
|
key: 0,
|
|
782
782
|
class: "mw-data-table__empty"
|
|
783
|
-
},
|
|
783
|
+
}, Lt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
784
784
|
__name: "UiDataTable",
|
|
785
785
|
props: { empty: {} },
|
|
786
786
|
setup(e) {
|
|
787
|
-
let t =
|
|
788
|
-
return (n, o) => (h(), i("div",
|
|
787
|
+
let t = w();
|
|
788
|
+
return (n, o) => (h(), i("div", Pt, [a("table", Ft, [a("thead", null, [a("tr", null, [v(n.$slots, "head", {}, void 0, !0)])]), a("tbody", null, [v(n.$slots, "default", {}, void 0, !0)])]), e.empty && !t.default ? (h(), i("p", It, b(e.empty), 1)) : r("", !0)]));
|
|
789
789
|
}
|
|
790
|
-
}), [["__scopeId", "data-v-de139c21"]]),
|
|
790
|
+
}), [["__scopeId", "data-v-de139c21"]]), B = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
791
791
|
__name: "UiStatusDot",
|
|
792
792
|
props: { status: { default: "ok" } },
|
|
793
793
|
setup(e) {
|
|
@@ -796,17 +796,17 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
796
796
|
"aria-hidden": "true"
|
|
797
797
|
}, null, 2));
|
|
798
798
|
}
|
|
799
|
-
}), [["__scopeId", "data-v-62e9a7cc"]]),
|
|
799
|
+
}), [["__scopeId", "data-v-62e9a7cc"]]), Rt = {
|
|
800
800
|
role: "list",
|
|
801
801
|
class: "mw-statusbar",
|
|
802
802
|
"aria-label": "Status"
|
|
803
|
-
},
|
|
803
|
+
}, zt = { key: 0 }, Bt = { class: "mw-visually-hidden" }, Vt = { key: 0 }, Ht = {
|
|
804
804
|
key: 1,
|
|
805
805
|
class: "mw-statusbar__pending"
|
|
806
|
-
},
|
|
806
|
+
}, Ut = { key: 0 }, Wt = {
|
|
807
807
|
key: 1,
|
|
808
808
|
class: "mw-statusbar__pending"
|
|
809
|
-
},
|
|
809
|
+
}, Gt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
810
810
|
__name: "UiStatusBar",
|
|
811
811
|
props: {
|
|
812
812
|
network: {},
|
|
@@ -823,29 +823,29 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
823
823
|
let t = Math.floor((Date.now() - e.getTime()) / 1e3);
|
|
824
824
|
return t < 5 ? "just now" : t < 60 ? `${t}s ago` : `${Math.floor(t / 60)}m ago`;
|
|
825
825
|
}
|
|
826
|
-
return (t, c) => (h(), i("ul",
|
|
827
|
-
n.network ? (h(), i("li",
|
|
828
|
-
s(
|
|
826
|
+
return (t, c) => (h(), i("ul", Rt, [
|
|
827
|
+
n.network ? (h(), i("li", zt, [
|
|
828
|
+
s(B, { status: n.healthy ? "ok" : "error" }, null, 8, ["status"]),
|
|
829
829
|
o(" " + b(l.value) + " ", 1),
|
|
830
|
-
a("span",
|
|
830
|
+
a("span", Bt, "(" + b(n.healthy ? "status OK" : "status error") + ")", 1)
|
|
831
831
|
])) : r("", !0),
|
|
832
|
-
n.epoch === void 0 ? r("", !0) : (h(), i(e, { key: 1 }, [n.epoch === null ? (h(), i("li",
|
|
833
|
-
n.lastRefresh === void 0 ? r("", !0) : (h(), i(e, { key: 2 }, [n.lastRefresh ? (h(), i("li",
|
|
832
|
+
n.epoch === void 0 ? r("", !0) : (h(), i(e, { key: 1 }, [n.epoch === null ? (h(), i("li", Ht, "Epoch —")) : (h(), i("li", Vt, "Epoch " + b(n.epoch), 1))], 64)),
|
|
833
|
+
n.lastRefresh === void 0 ? r("", !0) : (h(), i(e, { key: 2 }, [n.lastRefresh ? (h(), i("li", Ut, "Refreshed " + b(u(n.lastRefresh)), 1)) : (h(), i("li", Wt, "Loading…"))], 64)),
|
|
834
834
|
v(t.$slots, "default", {}, void 0, !0)
|
|
835
835
|
]));
|
|
836
836
|
}
|
|
837
|
-
}), [["__scopeId", "data-v-06a511eb"]]),
|
|
837
|
+
}), [["__scopeId", "data-v-06a511eb"]]), Kt = {
|
|
838
838
|
class: "mw-feed",
|
|
839
839
|
role: "list"
|
|
840
|
-
},
|
|
840
|
+
}, qt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
841
841
|
__name: "UiActivityFeed",
|
|
842
842
|
setup(e) {
|
|
843
|
-
return (e, t) => (h(), i("ul",
|
|
843
|
+
return (e, t) => (h(), i("ul", Kt, [v(e.$slots, "default", {}, void 0, !0)]));
|
|
844
844
|
}
|
|
845
|
-
}), [["__scopeId", "data-v-9e578c9d"]]),
|
|
845
|
+
}), [["__scopeId", "data-v-9e578c9d"]]), Jt = { class: "mw-feed__item" }, Yt = ["datetime"], Xt = {
|
|
846
846
|
key: 1,
|
|
847
847
|
class: "mw-feed__meta"
|
|
848
|
-
},
|
|
848
|
+
}, Zt = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
849
849
|
__name: "UiActivityItem",
|
|
850
850
|
props: {
|
|
851
851
|
type: {},
|
|
@@ -853,51 +853,51 @@ var Re = { class: "ca-root" }, ze = ["title"], Be = ["title", "aria-label"], Ve
|
|
|
853
853
|
datetime: {}
|
|
854
854
|
},
|
|
855
855
|
setup(e) {
|
|
856
|
-
return (t, n) => (h(), i("li",
|
|
856
|
+
return (t, n) => (h(), i("li", Jt, [v(t.$slots, "type", {}, () => [o(b(e.type), 1)], !0), e.datetime ? (h(), i("time", {
|
|
857
857
|
key: 0,
|
|
858
858
|
class: "mw-feed__meta",
|
|
859
859
|
datetime: e.datetime
|
|
860
|
-
}, [v(t.$slots, "time", {}, () => [o(b(e.time), 1)], !0)], 8,
|
|
860
|
+
}, [v(t.$slots, "time", {}, () => [o(b(e.time), 1)], !0)], 8, Yt)) : (h(), i("small", Xt, [v(t.$slots, "time", {}, () => [o(b(e.time), 1)], !0)]))]));
|
|
861
861
|
}
|
|
862
|
-
}), [["__scopeId", "data-v-797b66a9"]]),
|
|
862
|
+
}), [["__scopeId", "data-v-797b66a9"]]), Qt = /* @__PURE__ */ new Set([
|
|
863
863
|
"operational",
|
|
864
864
|
"degraded",
|
|
865
865
|
"down",
|
|
866
866
|
"unknown"
|
|
867
867
|
]);
|
|
868
|
-
function
|
|
869
|
-
return typeof e == "string" &&
|
|
868
|
+
function V(e) {
|
|
869
|
+
return typeof e == "string" && Qt.has(e);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
872
|
-
return
|
|
871
|
+
function H(e) {
|
|
872
|
+
return V(e) ? e : "unknown";
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function U(e) {
|
|
875
875
|
return typeof e != "string" || e.trim() === "" ? "" : e.replace(/[<>&"]/g, "");
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function $t(e) {
|
|
878
878
|
if (typeof e != "object" || !e) return null;
|
|
879
|
-
let t = e, n =
|
|
879
|
+
let t = e, n = U(t.name);
|
|
880
880
|
return n ? {
|
|
881
881
|
name: n,
|
|
882
|
-
status:
|
|
882
|
+
status: H(t.status)
|
|
883
883
|
} : null;
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function en(e) {
|
|
886
886
|
if (typeof e != "object" || !e) return null;
|
|
887
|
-
let t = e, n =
|
|
887
|
+
let t = e, n = U(t.name);
|
|
888
888
|
if (!n) return null;
|
|
889
|
-
let r = Array.isArray(t.components) ? t.components.map(
|
|
889
|
+
let r = Array.isArray(t.components) ? t.components.map($t).filter((e) => e !== null) : [];
|
|
890
890
|
return {
|
|
891
891
|
name: n,
|
|
892
|
-
status:
|
|
892
|
+
status: H(t.status),
|
|
893
893
|
components: r
|
|
894
894
|
};
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function W(e) {
|
|
897
897
|
if (typeof e != "object" || !e) return null;
|
|
898
898
|
let t = e;
|
|
899
|
-
if (!
|
|
900
|
-
let n = t.groups.map(
|
|
899
|
+
if (!V(t.overall) || typeof t.generated_at != "string" || !Array.isArray(t.groups)) return null;
|
|
900
|
+
let n = t.groups.map(en).filter((e) => e !== null);
|
|
901
901
|
return {
|
|
902
902
|
generated_at: t.generated_at,
|
|
903
903
|
overall: t.overall,
|
|
@@ -906,7 +906,7 @@ function K(e) {
|
|
|
906
906
|
}
|
|
907
907
|
//#endregion
|
|
908
908
|
//#region src/components/StatusWidget.vue?vue&type=script&setup=true&lang.ts
|
|
909
|
-
var
|
|
909
|
+
var tn = ["href", "title"], nn = 15e3, rn = /*#__PURE__*/ j(/* @__PURE__ */ c({
|
|
910
910
|
__name: "StatusWidget",
|
|
911
911
|
props: {
|
|
912
912
|
apiUrl: { default: "https://status.meddleware.co.uk/api/status" },
|
|
@@ -929,7 +929,7 @@ var q = ["href", "title"], $t = 15e3, en = /*#__PURE__*/ M(/* @__PURE__ */ c({
|
|
|
929
929
|
try {
|
|
930
930
|
let e = await fetch(t.apiUrl, { signal: AbortSignal.timeout(1e4) });
|
|
931
931
|
if (!e.ok) throw Error(`HTTP ${e.status}`);
|
|
932
|
-
let i =
|
|
932
|
+
let i = W(await e.json());
|
|
933
933
|
if (!i) throw Error("unexpected response shape");
|
|
934
934
|
a.value = n[i.overall], o.value = r[i.overall];
|
|
935
935
|
} catch {
|
|
@@ -940,75 +940,147 @@ var q = ["href", "title"], $t = 15e3, en = /*#__PURE__*/ M(/* @__PURE__ */ c({
|
|
|
940
940
|
document.hidden || c();
|
|
941
941
|
}
|
|
942
942
|
return p(() => {
|
|
943
|
-
c(), s = setInterval(l, Math.max(t.pollInterval,
|
|
943
|
+
c(), s = setInterval(l, Math.max(t.pollInterval, nn)), document.addEventListener("visibilitychange", l);
|
|
944
944
|
}), m(() => {
|
|
945
945
|
s !== null && clearInterval(s), document.removeEventListener("visibilitychange", l);
|
|
946
946
|
}), (t, n) => (h(), i("a", {
|
|
947
|
-
href: x(
|
|
947
|
+
href: x(N)(e.href),
|
|
948
948
|
target: "_blank",
|
|
949
949
|
rel: "noopener noreferrer",
|
|
950
950
|
class: d(["status-widget", `status-widget--${a.value}`]),
|
|
951
951
|
title: `Platform status: ${o.value}`
|
|
952
|
-
}, b(o.value), 11,
|
|
952
|
+
}, b(o.value), 11, tn));
|
|
953
953
|
}
|
|
954
|
-
}), [["__scopeId", "data-v-a83de7ee"]]),
|
|
954
|
+
}), [["__scopeId", "data-v-a83de7ee"]]), G = {
|
|
955
955
|
mainnet: "https://suivision.xyz",
|
|
956
956
|
testnet: "https://testnet.suivision.xyz",
|
|
957
957
|
devnet: "https://devnet.suivision.xyz"
|
|
958
958
|
};
|
|
959
|
-
function
|
|
960
|
-
return `${
|
|
959
|
+
function an(e, t, n = "testnet") {
|
|
960
|
+
return `${G[n] ?? G.testnet}/${e}/${encodeURIComponent(t)}`;
|
|
961
961
|
}
|
|
962
962
|
//#endregion
|
|
963
963
|
//#region src/composables/useColorMode.ts
|
|
964
|
-
var
|
|
965
|
-
function
|
|
964
|
+
var K = "mw-color-mode", q = g("system"), J = !1;
|
|
965
|
+
function on() {
|
|
966
966
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
969
|
-
return e === "dark" || e === "system" &&
|
|
968
|
+
function Y(e) {
|
|
969
|
+
return e === "dark" || e === "system" && on();
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
typeof document < "u" && document.documentElement.setAttribute("data-theme",
|
|
971
|
+
function X(e) {
|
|
972
|
+
typeof document < "u" && document.documentElement.setAttribute("data-theme", Y(e) ? "dark" : "light");
|
|
973
973
|
}
|
|
974
|
-
function
|
|
975
|
-
if (!
|
|
976
|
-
|
|
974
|
+
function sn(e = "system") {
|
|
975
|
+
if (!J) {
|
|
976
|
+
J = !0;
|
|
977
977
|
let t = null;
|
|
978
978
|
try {
|
|
979
|
-
let e = typeof localStorage < "u" ? localStorage.getItem(
|
|
979
|
+
let e = typeof localStorage < "u" ? localStorage.getItem(K) : null;
|
|
980
980
|
(e === "light" || e === "dark" || e === "system") && (t = e);
|
|
981
981
|
} catch {}
|
|
982
|
-
|
|
983
|
-
|
|
982
|
+
q.value = t ?? e, X(q.value), typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
983
|
+
q.value === "system" && X("system");
|
|
984
984
|
}), l(!0).run(() => {
|
|
985
|
-
|
|
986
|
-
|
|
985
|
+
E(q, (e) => {
|
|
986
|
+
X(e);
|
|
987
987
|
try {
|
|
988
|
-
typeof localStorage < "u" && localStorage.setItem(
|
|
988
|
+
typeof localStorage < "u" && localStorage.setItem(K, e);
|
|
989
989
|
} catch {}
|
|
990
990
|
});
|
|
991
991
|
});
|
|
992
992
|
}
|
|
993
993
|
function t(e) {
|
|
994
|
-
|
|
994
|
+
q.value = e;
|
|
995
995
|
}
|
|
996
996
|
function n() {
|
|
997
|
-
t(
|
|
997
|
+
t(q.value === "light" ? "dark" : q.value === "dark" ? "system" : "light");
|
|
998
998
|
}
|
|
999
999
|
return {
|
|
1000
|
-
mode:
|
|
1000
|
+
mode: q,
|
|
1001
1001
|
set: t,
|
|
1002
1002
|
cycle: n,
|
|
1003
|
-
isDark: () =>
|
|
1003
|
+
isDark: () => Y(q.value)
|
|
1004
1004
|
};
|
|
1005
1005
|
}
|
|
1006
1006
|
//#endregion
|
|
1007
1007
|
//#region src/composables/useSeason.ts
|
|
1008
|
-
function
|
|
1008
|
+
function cn() {
|
|
1009
1009
|
if (typeof document > "u") return;
|
|
1010
1010
|
let e = (/* @__PURE__ */ new Date()).getMonth(), t = e >= 2 && e <= 4 ? "spring" : e >= 5 && e <= 7 ? "summer" : e >= 8 && e <= 10 ? "autumn" : "winter";
|
|
1011
1011
|
document.documentElement.dataset.season = t;
|
|
1012
1012
|
}
|
|
1013
1013
|
//#endregion
|
|
1014
|
-
|
|
1014
|
+
//#region src/runtime-config.ts
|
|
1015
|
+
var Z = [
|
|
1016
|
+
"VITE_INDEXER_URL",
|
|
1017
|
+
"VITE_WALRUS_RELAY_TESTNET",
|
|
1018
|
+
"VITE_WALRUS_RELAY_MAINNET"
|
|
1019
|
+
], Q = "/runtime-config.json", ln = 16384, un = 3e3, $ = Object.freeze({});
|
|
1020
|
+
function dn(e) {
|
|
1021
|
+
if (typeof e != "string" || e.length === 0 || e.length > 2048 || /[\u0000- \u007f\\]/.test(e)) return;
|
|
1022
|
+
let t;
|
|
1023
|
+
try {
|
|
1024
|
+
t = new URL(e);
|
|
1025
|
+
} catch {
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
if (t.username || t.password || t.search || t.hash) return;
|
|
1029
|
+
let n = t.hostname === "localhost" || t.hostname === "127.0.0.1";
|
|
1030
|
+
if (t.protocol === "https:" || t.protocol === "http:" && n) return t.href.replace(/\/+$/, "");
|
|
1031
|
+
}
|
|
1032
|
+
function fn(e) {
|
|
1033
|
+
let t = {}, n = [];
|
|
1034
|
+
if (typeof e != "object" || !e || Array.isArray(e)) return {
|
|
1035
|
+
endpoints: t,
|
|
1036
|
+
rejected: ["<root>"]
|
|
1037
|
+
};
|
|
1038
|
+
for (let [r, i] of Object.entries(e)) {
|
|
1039
|
+
if (!Z.includes(r)) {
|
|
1040
|
+
n.push(r);
|
|
1041
|
+
continue;
|
|
1042
|
+
}
|
|
1043
|
+
let e = dn(i);
|
|
1044
|
+
e === void 0 ? n.push(r) : t[r] = e;
|
|
1045
|
+
}
|
|
1046
|
+
return {
|
|
1047
|
+
endpoints: t,
|
|
1048
|
+
rejected: n
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
async function pn(e = Q, t = globalThis.fetch) {
|
|
1052
|
+
if (!e.startsWith("/") || e.startsWith("//")) return $;
|
|
1053
|
+
let n = new AbortController(), r = setTimeout(() => n.abort(), un);
|
|
1054
|
+
try {
|
|
1055
|
+
let r = await t(e, {
|
|
1056
|
+
cache: "no-cache",
|
|
1057
|
+
credentials: "omit",
|
|
1058
|
+
redirect: "error",
|
|
1059
|
+
signal: n.signal
|
|
1060
|
+
});
|
|
1061
|
+
if (!r.ok) return $;
|
|
1062
|
+
let i = r.headers.get("content-type") ?? "";
|
|
1063
|
+
if (!/^application\/json\b/i.test(i)) return $;
|
|
1064
|
+
let a = await r.text();
|
|
1065
|
+
if (a.length > ln) return $;
|
|
1066
|
+
let { endpoints: o, rejected: s } = fn(JSON.parse(a));
|
|
1067
|
+
s.length && console.warn(`runtime-config: ignored ${s.join(", ")}`), $ = Object.freeze({ ...o });
|
|
1068
|
+
} catch {} finally {
|
|
1069
|
+
clearTimeout(r);
|
|
1070
|
+
}
|
|
1071
|
+
return $;
|
|
1072
|
+
}
|
|
1073
|
+
function mn() {
|
|
1074
|
+
return $;
|
|
1075
|
+
}
|
|
1076
|
+
function hn(e) {
|
|
1077
|
+
return {
|
|
1078
|
+
...e,
|
|
1079
|
+
...$
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
function gn() {
|
|
1083
|
+
$ = Object.freeze({});
|
|
1084
|
+
}
|
|
1085
|
+
//#endregion
|
|
1086
|
+
export { se as AppFooter, te as AppHeader, re as AppSidebar, Ae as AppTabNav, fe as ColorModeControl, Ge as CopyableAddress, tt as CopyrightLine, L as DEFAULT_TRUNCATE_CHARS, qe as ExplorerLink, Q as RUNTIME_CONFIG_PATH, Z as RUNTIME_ENDPOINT_KEYS, De as SidebarGroup, Te as SidebarItem, rn as StatusWidget, qt as UiActivityFeed, Zt as UiActivityItem, Et as UiBadge, me as UiButton, ye as UiCard, Lt as UiDataTable, ze as UiDialog, gt as UiFieldHint, xt as UiFormField, Se as UiNotice, Tt as UiPanel, ft as UiSegmentedControl, be as UiSelect, jt as UiStatGrid, Nt as UiStatRow, Gt as UiStatusBar, B as UiStatusDot, st as UiStepper, Me as UiTabPanel, Ct as UiToolIntro, kt as UiToolbar, z as UiToolbarButton, V as isStatusLevel, pn as loadRuntimeConfig, dn as parseEndpoint, fn as parseRuntimeConfig, W as parseSnapshot, gn as resetRuntimeConfigForTesting, mn as runtimeEndpoints, N as safeHref, F as safePath, an as suiExplorerUrl, I as tabIds, R as truncateMiddle, sn as useColorMode, cn as useSeason, hn as withRuntimeEnv };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meddleware/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35",
|
|
4
4
|
"description": "Shared Vue 3 component library for @meddleware UIs — layout shell (header/sidebar/footer), colour-mode control, and primitives. Built on @meddleware/design-tokens.",
|
|
5
5
|
"homepage": "https://docs.meddleware.co.uk/",
|
|
6
6
|
"license": "0BSD",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"vue": "^3.5.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@meddleware/design-tokens": "^0.1.
|
|
44
|
+
"@meddleware/design-tokens": "^0.1.11"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@axe-core/playwright": "^4.13.0",
|
|
48
|
-
"@meddleware/eslint-config": "^0.0.
|
|
48
|
+
"@meddleware/eslint-config": "^0.0.4",
|
|
49
49
|
"@playwright/test": "~1.64.1",
|
|
50
50
|
"@vitejs/plugin-vue": "^6.0.9",
|
|
51
51
|
"@vue/eslint-config-typescript": "^14.9.0",
|