@meddleware/ui 0.1.35 → 0.1.36

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 (202) hide show
  1. package/README.md +49 -13
  2. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  3. package/dist/base.css +48 -2
  4. package/dist/components/AppFooter.css +1 -0
  5. package/dist/components/AppFooter.js +7 -0
  6. package/dist/components/AppFooter.vue_vue_type_script_setup_true_lang.js +42 -0
  7. package/dist/components/AppHeader.css +1 -0
  8. package/dist/components/AppHeader.js +7 -0
  9. package/dist/components/AppHeader.vue.d.ts +8 -0
  10. package/dist/components/AppHeader.vue_vue_type_script_setup_true_lang.js +68 -0
  11. package/dist/components/AppSidebar.css +1 -0
  12. package/dist/components/AppSidebar.js +7 -0
  13. package/dist/components/AppSidebar.vue.d.ts +3 -0
  14. package/dist/components/AppSidebar.vue_vue_type_script_setup_true_lang.js +37 -0
  15. package/dist/components/AppTabNav.css +1 -0
  16. package/dist/components/AppTabNav.js +7 -0
  17. package/dist/components/AppTabNav.vue.d.ts +3 -0
  18. package/dist/components/AppTabNav.vue_vue_type_script_setup_true_lang.js +70 -0
  19. package/dist/components/ColorModeControl.css +1 -0
  20. package/dist/components/ColorModeControl.js +7 -0
  21. package/dist/components/ColorModeControl.vue_vue_type_script_setup_true_lang.js +58 -0
  22. package/dist/components/CopyableAddress.css +1 -0
  23. package/dist/components/CopyableAddress.js +7 -0
  24. package/dist/components/CopyableAddress.vue_vue_type_script_setup_true_lang.js +28 -0
  25. package/dist/components/CopyrightLine.css +1 -0
  26. package/dist/components/CopyrightLine.js +7 -0
  27. package/dist/components/CopyrightLine.vue.d.ts +6 -0
  28. package/dist/components/CopyrightLine.vue_vue_type_script_setup_true_lang.js +80 -0
  29. package/dist/components/ExplorerLink.css +1 -0
  30. package/dist/components/ExplorerLink.js +7 -0
  31. package/dist/components/ExplorerLink.vue_vue_type_script_setup_true_lang.js +27 -0
  32. package/dist/components/SidebarGroup.css +1 -0
  33. package/dist/components/SidebarGroup.js +7 -0
  34. package/dist/components/SidebarGroup.vue_vue_type_script_setup_true_lang.js +14 -0
  35. package/dist/components/SidebarItem.css +1 -0
  36. package/dist/components/SidebarItem.js +7 -0
  37. package/dist/components/SidebarItem.vue.d.ts +3 -0
  38. package/dist/components/SidebarItem.vue_vue_type_script_setup_true_lang.js +43 -0
  39. package/dist/components/StatusWidget.css +1 -0
  40. package/dist/components/StatusWidget.js +7 -0
  41. package/dist/components/StatusWidget.vue_vue_type_script_setup_true_lang.js +33 -0
  42. package/dist/components/UiActivityFeed.css +1 -0
  43. package/dist/components/UiActivityFeed.js +7 -0
  44. package/dist/components/UiActivityFeed.vue_vue_type_script_setup_true_lang.js +13 -0
  45. package/dist/components/UiActivityItem.css +1 -0
  46. package/dist/components/UiActivityItem.js +7 -0
  47. package/dist/components/UiActivityItem.vue_vue_type_script_setup_true_lang.js +22 -0
  48. package/dist/components/UiAmount.css +1 -0
  49. package/dist/components/UiAmount.js +7 -0
  50. package/dist/components/UiAmount.vue.d.ts +12 -0
  51. package/dist/components/UiAmount.vue_vue_type_script_setup_true_lang.js +31 -0
  52. package/dist/components/UiAppShell.css +1 -0
  53. package/dist/components/UiAppShell.js +7 -0
  54. package/dist/components/UiAppShell.vue.d.ts +26 -0
  55. package/dist/components/UiAppShell.vue_vue_type_script_setup_true_lang.js +27 -0
  56. package/dist/components/UiBadge.css +1 -0
  57. package/dist/components/UiBadge.js +7 -0
  58. package/dist/components/UiBadge.vue.d.ts +10 -1
  59. package/dist/components/UiBadge.vue_vue_type_script_setup_true_lang.js +35 -0
  60. package/dist/components/UiButton.css +1 -0
  61. package/dist/components/UiButton.js +7 -0
  62. package/dist/components/UiButton.vue.d.ts +17 -7
  63. package/dist/components/UiButton.vue_vue_type_script_setup_true_lang.js +60 -0
  64. package/dist/components/UiCard.css +1 -0
  65. package/dist/components/UiCard.js +7 -0
  66. package/dist/components/UiCard.vue.d.ts +20 -6
  67. package/dist/components/UiCard.vue_vue_type_script_setup_true_lang.js +51 -0
  68. package/dist/components/UiCheckField.css +1 -0
  69. package/dist/components/UiCheckField.js +7 -0
  70. package/dist/components/UiCheckField.vue.d.ts +26 -0
  71. package/dist/components/UiCheckField.vue_vue_type_script_setup_true_lang.js +31 -0
  72. package/dist/components/UiCodeBlock.css +1 -0
  73. package/dist/components/UiCodeBlock.js +7 -0
  74. package/dist/components/UiCodeBlock.vue.d.ts +21 -0
  75. package/dist/components/UiCodeBlock.vue_vue_type_script_setup_true_lang.js +21 -0
  76. package/dist/components/UiCopyButton.css +1 -0
  77. package/dist/components/UiCopyButton.js +7 -0
  78. package/dist/components/UiCopyButton.vue.d.ts +11 -0
  79. package/dist/components/UiCopyButton.vue_vue_type_script_setup_true_lang.js +64 -0
  80. package/dist/components/UiDataTable.css +1 -0
  81. package/dist/components/UiDataTable.js +7 -0
  82. package/dist/components/UiDataTable.vue.d.ts +5 -0
  83. package/dist/components/UiDataTable.vue_vue_type_script_setup_true_lang.js +56 -0
  84. package/dist/components/UiDateTimeField.js +5 -0
  85. package/dist/components/UiDateTimeField.vue.d.ts +18 -0
  86. package/dist/components/UiDateTimeField.vue_vue_type_script_setup_true_lang.js +51 -0
  87. package/dist/components/UiDialog.css +1 -0
  88. package/dist/components/UiDialog.js +7 -0
  89. package/dist/components/UiDialog.vue.d.ts +8 -5
  90. package/dist/components/UiDialog.vue_vue_type_script_setup_true_lang.js +78 -0
  91. package/dist/components/UiEmptyState.css +1 -0
  92. package/dist/components/UiEmptyState.js +7 -0
  93. package/dist/components/UiEmptyState.vue.d.ts +15 -0
  94. package/dist/components/UiEmptyState.vue_vue_type_script_setup_true_lang.js +10 -0
  95. package/dist/components/UiFieldHint.css +1 -0
  96. package/dist/components/UiFieldHint.js +7 -0
  97. package/dist/components/UiFieldHint.vue_vue_type_script_setup_true_lang.js +24 -0
  98. package/dist/components/UiFileField.css +1 -0
  99. package/dist/components/UiFileField.js +7 -0
  100. package/dist/components/UiFileField.vue.d.ts +17 -0
  101. package/dist/components/UiFileField.vue_vue_type_script_setup_true_lang.js +55 -0
  102. package/dist/components/UiFormField.css +1 -0
  103. package/dist/components/UiFormField.js +7 -0
  104. package/dist/components/UiFormField.vue_vue_type_script_setup_true_lang.js +38 -0
  105. package/dist/components/UiInput.css +1 -0
  106. package/dist/components/UiInput.js +7 -0
  107. package/dist/components/UiInput.vue.d.ts +10 -0
  108. package/dist/components/UiInput.vue_vue_type_script_setup_true_lang.js +20 -0
  109. package/dist/components/UiLiveStatus.css +1 -0
  110. package/dist/components/UiLiveStatus.js +7 -0
  111. package/dist/components/UiLiveStatus.vue.d.ts +19 -0
  112. package/dist/components/UiLiveStatus.vue_vue_type_script_setup_true_lang.js +17 -0
  113. package/dist/components/UiMeter.css +1 -0
  114. package/dist/components/UiMeter.js +7 -0
  115. package/dist/components/UiMeter.vue.d.ts +11 -0
  116. package/dist/components/UiMeter.vue_vue_type_script_setup_true_lang.js +41 -0
  117. package/dist/components/UiNotice.css +1 -0
  118. package/dist/components/UiNotice.js +7 -0
  119. package/dist/components/UiNotice.vue.d.ts +16 -8
  120. package/dist/components/UiNotice.vue_vue_type_script_setup_true_lang.js +22 -0
  121. package/dist/components/UiPager.css +1 -0
  122. package/dist/components/UiPager.js +7 -0
  123. package/dist/components/UiPager.vue.d.ts +23 -0
  124. package/dist/components/UiPager.vue_vue_type_script_setup_true_lang.js +46 -0
  125. package/dist/components/UiPanel.css +1 -0
  126. package/dist/components/UiPanel.js +7 -0
  127. package/dist/components/UiPanel.vue_vue_type_script_setup_true_lang.js +21 -0
  128. package/dist/components/UiSegmentedControl.css +1 -0
  129. package/dist/components/UiSegmentedControl.js +7 -0
  130. package/dist/components/UiSegmentedControl.vue.d.ts +11 -1
  131. package/dist/components/UiSegmentedControl.vue_vue_type_script_setup_true_lang.js +57 -0
  132. package/dist/components/UiSelect.css +1 -0
  133. package/dist/components/UiSelect.js +7 -0
  134. package/dist/components/UiSelect.vue.d.ts +2 -1
  135. package/dist/components/UiSelect.vue_vue_type_script_setup_true_lang.js +19 -0
  136. package/dist/components/UiSelectField.js +5 -0
  137. package/dist/components/UiSelectField.vue.d.ts +29 -0
  138. package/dist/components/UiSelectField.vue_vue_type_script_setup_true_lang.js +58 -0
  139. package/dist/components/UiSkipLink.css +1 -0
  140. package/dist/components/UiSkipLink.js +7 -0
  141. package/dist/components/UiSkipLink.vue.d.ts +8 -0
  142. package/dist/components/UiSkipLink.vue_vue_type_script_setup_true_lang.js +14 -0
  143. package/dist/components/UiStatGrid.css +1 -0
  144. package/dist/components/UiStatGrid.js +7 -0
  145. package/dist/components/UiStatGrid.vue_vue_type_script_setup_true_lang.js +10 -0
  146. package/dist/components/UiStatRow.css +1 -0
  147. package/dist/components/UiStatRow.js +7 -0
  148. package/dist/components/UiStatRow.vue_vue_type_script_setup_true_lang.js +19 -0
  149. package/dist/components/UiStatusBar.css +1 -0
  150. package/dist/components/UiStatusBar.js +7 -0
  151. package/dist/components/UiStatusBar.vue_vue_type_script_setup_true_lang.js +45 -0
  152. package/dist/components/UiStatusDot.css +1 -0
  153. package/dist/components/UiStatusDot.js +7 -0
  154. package/dist/components/UiStatusDot.vue.d.ts +6 -2
  155. package/dist/components/UiStatusDot.vue_vue_type_script_setup_true_lang.js +26 -0
  156. package/dist/components/UiStepper.css +1 -0
  157. package/dist/components/UiStepper.js +7 -0
  158. package/dist/components/UiStepper.vue.d.ts +10 -2
  159. package/dist/components/UiStepper.vue_vue_type_script_setup_true_lang.js +55 -0
  160. package/dist/components/UiTabPanel.css +1 -0
  161. package/dist/components/UiTabPanel.js +7 -0
  162. package/dist/components/UiTabPanel.vue_vue_type_script_setup_true_lang.js +22 -0
  163. package/dist/components/UiTextField.js +5 -0
  164. package/dist/components/UiTextField.vue.d.ts +35 -0
  165. package/dist/components/UiTextField.vue_vue_type_script_setup_true_lang.js +59 -0
  166. package/dist/components/UiTextarea.css +1 -0
  167. package/dist/components/UiTextarea.js +7 -0
  168. package/dist/components/UiTextarea.vue.d.ts +10 -0
  169. package/dist/components/UiTextarea.vue_vue_type_script_setup_true_lang.js +19 -0
  170. package/dist/components/UiToolIntro.css +1 -0
  171. package/dist/components/UiToolIntro.js +7 -0
  172. package/dist/components/UiToolIntro.vue_vue_type_script_setup_true_lang.js +10 -0
  173. package/dist/components/UiToolbar.css +1 -0
  174. package/dist/components/UiToolbar.js +7 -0
  175. package/dist/components/UiToolbar.vue.d.ts +5 -2
  176. package/dist/components/UiToolbar.vue_vue_type_script_setup_true_lang.js +49 -0
  177. package/dist/components/UiToolbarButton.css +1 -0
  178. package/dist/components/UiToolbarButton.js +7 -0
  179. package/dist/components/UiToolbarButton.vue_vue_type_script_setup_true_lang.js +13 -0
  180. package/dist/composables/useColorMode.js +46 -0
  181. package/dist/composables/useNow.d.ts +6 -0
  182. package/dist/composables/useNow.js +12 -0
  183. package/dist/composables/usePager.d.ts +28 -0
  184. package/dist/composables/usePager.js +36 -0
  185. package/dist/composables/useSeason.js +8 -0
  186. package/dist/composables/useStatusSnapshot.d.ts +28 -0
  187. package/dist/composables/useStatusSnapshot.js +38 -0
  188. package/dist/index.d.ts +28 -8
  189. package/dist/index.js +58 -0
  190. package/dist/internal/panel.d.ts +8 -2
  191. package/dist/internal/panel.js +29 -0
  192. package/dist/reset.css +1 -0
  193. package/dist/runtime-config.js +73 -0
  194. package/dist/styles/reset.d.ts +1 -0
  195. package/dist/tabs.js +9 -0
  196. package/dist/theme-init.js +26 -0
  197. package/package.json +14 -10
  198. package/dist/explorer.d.ts +0 -13
  199. package/dist/safe-href.d.ts +0 -20
  200. package/dist/status.d.ts +0 -29
  201. package/dist/truncate.d.ts +0 -14
  202. package/dist/ui.js +0 -1086
package/dist/ui.js DELETED
@@ -1,1086 +0,0 @@
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
- //#region src/internal/panel.ts
3
- function k(e, t) {
4
- let n;
5
- return n = e === "transparent" ? {
6
- "--_bg": "transparent",
7
- "--_surface": "transparent",
8
- "--_text": "var(--text)",
9
- "--_muted": "var(--muted)",
10
- "--_border": "transparent",
11
- "--_ok": "var(--ok)",
12
- "--_danger": "var(--danger)",
13
- "--_info": "var(--info)"
14
- } : e === "light" ? {
15
- "--_bg": "var(--mw-panel-light-bg)",
16
- "--_surface": "var(--mw-panel-light-surface)",
17
- "--_text": "var(--mw-panel-light-text)",
18
- "--_muted": "var(--mw-panel-light-muted)",
19
- "--_border": "var(--mw-panel-light-border)",
20
- "--_ok": "var(--mw-panel-light-ok)",
21
- "--_danger": "var(--mw-panel-light-danger)",
22
- "--_info": "var(--mw-panel-light-info)"
23
- } : {
24
- "--_bg": "var(--mw-panel-dark-bg)",
25
- "--_surface": "var(--mw-panel-dark-surface)",
26
- "--_text": "var(--mw-panel-dark-text)",
27
- "--_muted": "var(--mw-panel-dark-muted)",
28
- "--_border": "var(--mw-panel-dark-border)",
29
- "--_ok": "var(--mw-panel-dark-ok)",
30
- "--_danger": "var(--mw-panel-dark-danger)",
31
- "--_info": "var(--mw-panel-dark-info)"
32
- }, t && (t.bg && (n["--_bg"] = t.bg), t.surface && (n["--_surface"] = t.surface), t.text && (n["--_text"] = t.text), t.muted && (n["--_muted"] = t.muted), t.border && (n["--_border"] = t.border), t.ok && (n["--_ok"] = t.ok), t.danger && (n["--_danger"] = t.danger), t.info && (n["--_info"] = t.info)), n;
33
- }
34
- //#endregion
35
- //#region src/components/AppHeader.vue?vue&type=script&setup=true&lang.ts
36
- var A = /*@__PURE__*/ c({
37
- __name: "AppHeader",
38
- props: {
39
- variant: { default: "dark" },
40
- colors: {},
41
- sticky: {
42
- type: Boolean,
43
- default: !0
44
- },
45
- solidifyOnScroll: {
46
- type: Boolean,
47
- default: !1
48
- }
49
- },
50
- setup(e) {
51
- S((e) => ({
52
- fff85088: r.value["--_bg"],
53
- v5048fb2c: r.value["--_surface"],
54
- a5a150b8: r.value["--_text"],
55
- bd016d2c: r.value["--_muted"],
56
- v523d383a: r.value["--_border"],
57
- ffec60da: r.value["--_ok"],
58
- v893937cc: r.value["--_danger"],
59
- ca3eca36: r.value["--_info"]
60
- }));
61
- let n = e, r = t(() => k(n.variant, n.colors)), a = g(!1), o = null;
62
- return p(() => {
63
- n.solidifyOnScroll && typeof window < "u" && (o = () => {
64
- a.value = window.scrollY > 8;
65
- }, o(), window.addEventListener("scroll", o, { passive: !0 }));
66
- }), f(() => {
67
- o && window.removeEventListener("scroll", o);
68
- }), (t, n) => (h(), i("header", { class: d(["mw-header", [`mw-header--${e.variant}`, {
69
- "mw-header--sticky": e.sticky,
70
- "mw-header--scrolled": e.solidifyOnScroll && a.value
71
- }]]) }, [
72
- v(t.$slots, "brand"),
73
- v(t.$slots, "default"),
74
- v(t.$slots, "actions")
75
- ], 2));
76
- }
77
- }), j = (e, t) => {
78
- let n = e.__vccOpts || e;
79
- for (let [e, r] of t) n[e] = r;
80
- return n;
81
- }, te = /*#__PURE__*/ j(A, [["__scopeId", "data-v-384786e1"]]), ne = {
82
- class: "mw-sidebar__nav",
83
- "aria-label": "Primary"
84
- }, re = /*#__PURE__*/ j(/* @__PURE__ */ c({
85
- __name: "AppSidebar",
86
- props: {
87
- variant: { default: "dark" },
88
- colors: {},
89
- width: {}
90
- },
91
- setup(e) {
92
- S((e) => ({
93
- v5b5002f5: r.value["--_bg"],
94
- v6623eb93: r.value["--_surface"],
95
- v33c4cec6: r.value["--_text"],
96
- f34db0de: r.value["--_muted"],
97
- e5796ac8: r.value["--_border"],
98
- v5b55facc: r.value["--_ok"],
99
- v71c54ad3: r.value["--_danger"],
100
- v58624844: r.value["--_info"],
101
- d1940a6a: o.value
102
- }));
103
- let n = e, r = t(() => k(n.variant, n.colors)), o = t(() => n.width ?? "var(--mw-sidebar-width, 240px)");
104
- return (t, n) => (h(), i("aside", { class: d(["mw-sidebar", `mw-sidebar--${e.variant}`]) }, [
105
- v(t.$slots, "head"),
106
- a("nav", ne, [v(t.$slots, "default")]),
107
- v(t.$slots, "body"),
108
- v(t.$slots, "foot")
109
- ], 2));
110
- }
111
- }), [["__scopeId", "data-v-e5506501"]]), M = /[\u0000-\u0020\u007f\\]/;
112
- function N(e) {
113
- if (e && !M.test(e)) try {
114
- let t = new URL(e);
115
- if (t.username || t.password) return;
116
- if (t.protocol === "https:" || t.protocol === "http:" && (t.hostname === "localhost" || t.hostname === "127.0.0.1")) return t.href;
117
- } catch {}
118
- }
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
- } catch {
125
- return;
126
- }
127
- }
128
- //#endregion
129
- //#region src/components/AppFooter.vue?vue&type=script&setup=true&lang.ts
130
- var ie = {
131
- key: 0,
132
- class: "mw-footer__docs",
133
- "aria-label": "Documentation"
134
- }, ae = ["href"], oe = ["href"], se = /*#__PURE__*/ j(/* @__PURE__ */ c({
135
- __name: "AppFooter",
136
- props: {
137
- variant: { default: "transparent" },
138
- colors: {},
139
- docsUrl: {},
140
- devUrl: {}
141
- },
142
- setup(e) {
143
- S((e) => ({
144
- v331b054e: a.value["--_bg"],
145
- v5a224faf: a.value["--_surface"],
146
- v328b0a01: a.value["--_text"],
147
- v70cc3aa6: a.value["--_muted"],
148
- v7419f300: a.value["--_border"],
149
- v330f15a0: a.value["--_ok"],
150
- v589bf337: a.value["--_danger"],
151
- v203c4d42: a.value["--_info"]
152
- }));
153
- let n = e, a = t(() => k(n.variant, n.colors));
154
- return (t, n) => (h(), i("footer", { class: d(["mw-footer", `mw-footer--${e.variant}`]) }, [
155
- v(t.$slots, "start"),
156
- v(t.$slots, "default"),
157
- v(t.$slots, "end"),
158
- e.docsUrl || e.devUrl ? (h(), i("nav", ie, [e.docsUrl ? (h(), i("a", {
159
- key: 0,
160
- href: x(N)(e.docsUrl),
161
- target: "_blank",
162
- rel: "noopener noreferrer"
163
- }, "Documentation", 8, ae)) : r("", !0), e.devUrl ? (h(), i("a", {
164
- key: 1,
165
- href: x(N)(e.devUrl),
166
- target: "_blank",
167
- rel: "noopener noreferrer"
168
- }, "Developer docs", 8, oe)) : r("", !0)])) : r("", !0)
169
- ], 2));
170
- }
171
- }), [["__scopeId", "data-v-42cde159"]]), ce = { class: "mw-mode" }, le = [
172
- "aria-pressed",
173
- "title",
174
- "onClick"
175
- ], ue = { "aria-hidden": "true" }, de = { class: "mw-mode__label" }, fe = /*#__PURE__*/ j(/* @__PURE__ */ c({
176
- __name: "ColorModeControl",
177
- props: {
178
- modelValue: {},
179
- modes: { default: () => [
180
- "light",
181
- "dark",
182
- "system"
183
- ] }
184
- },
185
- emits: ["update:modelValue"],
186
- setup(t) {
187
- let n = {
188
- light: "Light",
189
- dark: "Dark",
190
- system: "System"
191
- }, r = {
192
- light: "☀",
193
- dark: "☾",
194
- system: "🖵"
195
- };
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
- key: e,
198
- type: "button",
199
- class: d(["mw-mode__btn", { "is-active": t.modelValue === e }]),
200
- "aria-pressed": t.modelValue === e,
201
- title: n[e],
202
- onClick: (t) => o.$emit("update:modelValue", e)
203
- }, [a("span", ue, b(r[e]), 1), a("span", de, b(n[e]), 1)], 10, le))), 128))]));
204
- }
205
- }), [["__scopeId", "data-v-e5cba7a7"]]), pe = ["type", "disabled"], me = /*#__PURE__*/ j(/* @__PURE__ */ c({
206
- __name: "UiButton",
207
- props: {
208
- variant: { default: "primary" },
209
- type: { default: "button" },
210
- disabled: {
211
- type: Boolean,
212
- default: !1
213
- }
214
- },
215
- setup(e) {
216
- return (t, n) => (h(), i("button", {
217
- type: e.type,
218
- disabled: e.disabled,
219
- class: d(["mw-btn", `mw-btn--${e.variant}`])
220
- }, [v(t.$slots, "default", {}, void 0, !0)], 10, pe));
221
- }
222
- }), [["__scopeId", "data-v-bc33cc23"]]), he = { class: "mw-card" }, ge = {
223
- key: 0,
224
- class: "mw-card__header"
225
- }, _e = { class: "mw-card__title" }, ve = {
226
- key: 1,
227
- class: "mw-card__footer"
228
- }, ye = /*#__PURE__*/ j(/* @__PURE__ */ c({
229
- __name: "UiCard",
230
- props: { title: {} },
231
- setup(e) {
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
- v(t.$slots, "default", {}, void 0, !0),
235
- t.$slots.footer ? (h(), i("footer", ve, [v(t.$slots, "footer", {}, void 0, !0)])) : r("", !0)
236
- ]));
237
- }
238
- }), [["__scopeId", "data-v-384b36cf"]]), be = /*#__PURE__*/ j(/* @__PURE__ */ c({
239
- __name: "UiSelect",
240
- props: {
241
- modelValue: {},
242
- modelModifiers: {}
243
- },
244
- emits: ["update:modelValue"],
245
- setup(e) {
246
- let t = C(e, "modelValue");
247
- return (e, n) => O((h(), i("select", {
248
- "onUpdate:modelValue": n[0] ||= (e) => t.value = e,
249
- class: "mw-select"
250
- }, [v(e.$slots, "default", {}, void 0, !0)], 512)), [[T, t.value]]);
251
- }
252
- }), [["__scopeId", "data-v-38fbd9b5"]]), xe = ["role"], Se = /*#__PURE__*/ j(/* @__PURE__ */ c({
253
- __name: "UiNotice",
254
- props: { type: {} },
255
- setup(e) {
256
- let n = e, r = t(() => {
257
- if (n.type === "error") return "alert";
258
- if (n.type === "ok") return "status";
259
- });
260
- return (t, n) => (h(), i("p", {
261
- class: d(["mw-notice", e.type && e.type !== "info" ? `mw-notice--${e.type}` : ""]),
262
- role: r.value
263
- }, [v(t.$slots, "default", {}, void 0, !0)], 10, xe));
264
- }
265
- }), [["__scopeId", "data-v-ee7fffb1"]]), Ce = ["disabled", "aria-current"], we = {
266
- key: 0,
267
- class: "sidebar-item__icon",
268
- "aria-hidden": "true"
269
- }, Te = /*#__PURE__*/ j(/* @__PURE__ */ c({
270
- __name: "SidebarItem",
271
- props: {
272
- label: {},
273
- icon: {},
274
- active: {
275
- type: Boolean,
276
- default: !1
277
- },
278
- disabled: {
279
- type: Boolean,
280
- default: !1
281
- }
282
- },
283
- setup(e) {
284
- return (t, n) => (h(), i("button", {
285
- type: "button",
286
- class: d(["sidebar-item", { "is-active": e.active }]),
287
- disabled: e.disabled,
288
- "aria-current": e.active ? "page" : void 0
289
- }, [e.icon ? (h(), i("span", we, b(e.icon), 1)) : r("", !0), o(" " + b(e.label), 1)], 10, Ce));
290
- }
291
- }), [["__scopeId", "data-v-c8ae7e5f"]]), Ee = { class: "sidebar-group__label" }, De = /*#__PURE__*/ j(/* @__PURE__ */ c({
292
- __name: "SidebarGroup",
293
- props: {
294
- label: {},
295
- level: { default: 1 }
296
- },
297
- setup(e) {
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
- }
300
- }), [["__scopeId", "data-v-1ac17bd7"]]);
301
- //#endregion
302
- //#region src/tabs.ts
303
- function I(e, t) {
304
- return {
305
- tab: `${e}-tab-${t}`,
306
- panel: `${e}-panel-${t}`
307
- };
308
- }
309
- //#endregion
310
- //#region src/components/AppTabNav.vue?vue&type=script&setup=true&lang.ts
311
- var Oe = ["aria-label"], ke = [
312
- "id",
313
- "aria-selected",
314
- "aria-controls",
315
- "tabindex",
316
- "onClick",
317
- "onKeydown"
318
- ], Ae = /*#__PURE__*/ j(/* @__PURE__ */ c({
319
- __name: "AppTabNav",
320
- props: {
321
- tabs: {},
322
- modelValue: {},
323
- idPrefix: {},
324
- ariaLabel: {},
325
- variant: { default: "underline" },
326
- size: { default: "md" },
327
- allPanels: {
328
- type: Boolean,
329
- default: !1
330
- }
331
- },
332
- emits: ["update:modelValue"],
333
- setup(t, { emit: n }) {
334
- let r = t, o = n, s = [];
335
- function c(e) {
336
- let t = r.tabs[e];
337
- t && (o("update:modelValue", t.id), s[e]?.focus());
338
- }
339
- function l(e, t) {
340
- let n = r.tabs.length - 1, i = e.key === "ArrowRight" ? t === n ? 0 : t + 1 : e.key === "ArrowLeft" ? t === 0 ? n : t - 1 : e.key === "Home" ? 0 : e.key === "End" ? n : -1;
341
- i < 0 || (e.preventDefault(), c(i));
342
- }
343
- return (n, r) => (h(), i("menu", {
344
- role: "tablist",
345
- class: d(["mw-tab-nav", {
346
- "mw-tab-nav--raised": t.variant === "raised",
347
- "mw-tab-nav--lg": t.size === "lg"
348
- }]),
349
- "aria-label": t.ariaLabel
350
- }, [(h(!0), i(e, null, _(t.tabs, (e, n) => (h(), i("li", {
351
- key: e.id,
352
- role: "presentation",
353
- class: "mw-tab-nav__item"
354
- }, [a("button", {
355
- id: x(I)(t.idPrefix, e.id).tab,
356
- ref_for: !0,
357
- ref: (e) => {
358
- s[n] = e;
359
- },
360
- type: "button",
361
- role: "tab",
362
- class: d(["mw-tab-nav__tab", { "mw-tab-nav__tab--active": t.modelValue === e.id }]),
363
- "aria-selected": t.modelValue === e.id,
364
- "aria-controls": t.allPanels || t.modelValue === e.id ? x(I)(t.idPrefix, e.id).panel : void 0,
365
- tabindex: t.modelValue === e.id ? 0 : -1,
366
- onClick: (t) => o("update:modelValue", e.id),
367
- onKeydown: (e) => l(e, n)
368
- }, b(e.label), 43, ke)]))), 128))], 10, Oe));
369
- }
370
- }), [["__scopeId", "data-v-fbb7de4c"]]), je = ["id", "aria-labelledby"], Me = /*#__PURE__*/ j(/* @__PURE__ */ c({
371
- __name: "UiTabPanel",
372
- props: {
373
- idPrefix: {},
374
- tab: {}
375
- },
376
- setup(e) {
377
- let n = e, r = t(() => I(n.idPrefix, n.tab));
378
- return (e, t) => (h(), i("section", {
379
- id: r.value.panel,
380
- role: "tabpanel",
381
- "aria-labelledby": r.value.tab,
382
- tabindex: "0",
383
- class: "mw-tab-panel"
384
- }, [v(e.$slots, "default", {}, void 0, !0)], 8, je));
385
- }
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
- key: 0,
388
- class: "mw-dialog__actions"
389
- }, ze = /*#__PURE__*/ j(/* @__PURE__ */ c({
390
- __name: "UiDialog",
391
- props: /*@__PURE__*/ u({
392
- title: {},
393
- dismissible: {
394
- type: Boolean,
395
- default: !0
396
- },
397
- closeLabel: { default: "Close" },
398
- width: {}
399
- }, {
400
- open: {
401
- type: Boolean,
402
- default: !1
403
- },
404
- openModifiers: {}
405
- }),
406
- emits: /*@__PURE__*/ u(["close"], ["update:open"]),
407
- setup(e, { expose: n, emit: s }) {
408
- S((e) => ({ ce627f2e: _.value }));
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
- d.value?.open && d.value.close(e);
412
- }
413
- function T(e) {
414
- let t = d.value;
415
- t && (e && !t.open ? t.showModal() : !e && t.open && t.close());
416
- }
417
- function D() {
418
- d.value?.setAttribute("closedby", l.dismissible ? "any" : "none");
419
- }
420
- function O(e) {
421
- l.dismissible && e.target === d.value && w();
422
- }
423
- function k(e) {
424
- l.dismissible || e.preventDefault();
425
- }
426
- function A() {
427
- c.value = !1, u("close", d.value?.returnValue ?? "");
428
- }
429
- return p(() => {
430
- D(), y || d.value?.addEventListener("click", O), T(c.value);
431
- }), f(() => {
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
- ref_key: "el",
435
- ref: d,
436
- class: "mw-dialog",
437
- "aria-labelledby": x(m),
438
- onCancel: k,
439
- onClose: A
440
- }, [a("article", Pe, [
441
- a("header", Fe, [a("h2", {
442
- id: x(m),
443
- class: "mw-dialog__title"
444
- }, [v(t.$slots, "title", {}, () => [o(b(e.title), 1)], !0)], 8, Ie), e.dismissible ? (h(), i("button", {
445
- key: 0,
446
- type: "button",
447
- class: "mw-dialog__close",
448
- "aria-label": e.closeLabel,
449
- onClick: n[0] ||= (e) => w()
450
- }, "×", 8, Le)) : r("", !0)]),
451
- v(t.$slots, "default", {}, void 0, !0),
452
- t.$slots.actions ? (h(), i("footer", Re, [v(t.$slots, "actions", { close: w }, void 0, !0)])) : r("", !0)
453
- ])], 40, Ne));
454
- }
455
- }), [["__scopeId", "data-v-78973168"]]), L = [12, 10];
456
- function R(e, t = L) {
457
- let n = Math.max(0, Math.trunc(t[0]) || 0), r = Math.max(0, Math.trunc(t[1]) || 0);
458
- return e.length <= n + r ? e : `${n > 0 ? e.slice(0, n) : ""}…${r > 0 ? e.slice(-r) : ""}`;
459
- }
460
- //#endregion
461
- //#region src/components/CopyableAddress.vue?vue&type=script&setup=true&lang.ts
462
- var Be = { class: "ca-root" }, Ve = ["title"], He = ["title", "aria-label"], Ue = {
463
- key: 0,
464
- class: "ca-icon",
465
- viewBox: "0 0 24 24",
466
- width: "1em",
467
- height: "1em",
468
- fill: "none",
469
- stroke: "currentColor",
470
- "stroke-width": "2",
471
- "stroke-linecap": "round",
472
- "stroke-linejoin": "round",
473
- "aria-hidden": "true"
474
- }, We = {
475
- key: 1,
476
- class: "ca-icon",
477
- viewBox: "0 0 24 24",
478
- width: "1em",
479
- height: "1em",
480
- fill: "none",
481
- stroke: "currentColor",
482
- "stroke-width": "2",
483
- "stroke-linecap": "round",
484
- "stroke-linejoin": "round",
485
- "aria-hidden": "true"
486
- }, Ge = /*#__PURE__*/ j(/* @__PURE__ */ c({
487
- __name: "CopyableAddress",
488
- props: {
489
- address: {},
490
- truncate: {
491
- type: Boolean,
492
- default: !0
493
- },
494
- chars: { default: () => [...L] },
495
- label: { default: "Copy" }
496
- },
497
- setup(e) {
498
- let n = e, r = g(!1), s = t(() => n.truncate ? R(n.address, n.chars) : n.address);
499
- async function c() {
500
- try {
501
- await navigator.clipboard.writeText(n.address);
502
- } catch {
503
- return;
504
- }
505
- r.value = !0, setTimeout(() => {
506
- r.value = !1;
507
- }, 1500);
508
- }
509
- return (t, n) => (h(), i("span", Be, [a("span", {
510
- class: "ca-value",
511
- title: e.address
512
- }, [v(t.$slots, "default", {}, () => [o(b(s.value), 1)], !0)], 8, Ve), a("button", {
513
- type: "button",
514
- class: d(["ca-copy", { "ca-copy--copied": r.value }]),
515
- title: r.value ? "Copied!" : e.label,
516
- "aria-label": r.value ? "Copied" : e.label,
517
- onClick: c
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
- x: "9",
520
- y: "9",
521
- width: "13",
522
- height: "13",
523
- rx: "2",
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, He)]));
526
- }
527
- }), [["__scopeId", "data-v-ebf9e8c7"]]), Ke = ["href", "title"], qe = /*#__PURE__*/ j(/* @__PURE__ */ c({
528
- __name: "ExplorerLink",
529
- props: {
530
- href: {},
531
- value: {},
532
- truncate: {
533
- type: Boolean,
534
- default: !0
535
- },
536
- chars: { default: () => [...L] }
537
- },
538
- setup(e) {
539
- let n = e, r = t(() => n.value ? n.truncate ? R(n.value, n.chars) : n.value : "");
540
- return (t, n) => (h(), i("a", {
541
- class: "el-root",
542
- href: x(N)(e.href),
543
- target: "_blank",
544
- rel: "noopener noreferrer",
545
- title: e.value
546
- }, [v(t.$slots, "default", {}, () => [o(b(r.value), 1)], !0)], 8, Ke));
547
- }
548
- }), [["__scopeId", "data-v-f05cc8ba"]]), Je = { class: "copyright-line" }, Ye = ["href", "aria-label"], Xe = { key: 0 }, Ze = { key: 1 }, Qe = {
549
- key: 2,
550
- class: "kopimi-symbol"
551
- }, $e = { class: "text-content" }, et = { key: 0 }, tt = /*#__PURE__*/ j(/* @__PURE__ */ c({
552
- __name: "CopyrightLine",
553
- props: {
554
- organisationName: {},
555
- year: { default: () => (/* @__PURE__ */ new Date()).getFullYear() },
556
- rightsStatement: { default: "all" },
557
- symbolVariant: { default: "copyright" },
558
- symbolHref: {},
559
- symbolLabel: {}
560
- },
561
- setup(e) {
562
- let n = e, s = t(() => n.symbolVariant);
563
- function c(e) {
564
- return e.startsWith("/") ? F(e) : N(e);
565
- }
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", Je, [a("a", {
568
- href: u.value ? x(F)(l.value) : x(N)(l.value),
569
- class: "symbol-link",
570
- target: "_blank",
571
- rel: "noopener noreferrer",
572
- "aria-label": d.value
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
- viewBox: "0 0 24 24",
575
- width: "1em",
576
- height: "1em",
577
- "aria-hidden": "true",
578
- focusable: "false",
579
- class: "kopimi-mark"
580
- }, [a("path", {
581
- d: "M12 4L22 23H2Z",
582
- fill: "none",
583
- stroke: "currentColor",
584
- "stroke-width": "1.5"
585
- }), a("text", {
586
- x: "12",
587
- y: "18",
588
- "text-anchor": "middle",
589
- "dominant-baseline": "middle",
590
- "font-family": "system-ui, sans-serif",
591
- "font-size": "11",
592
- fill: "currentColor"
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
- ${f.value}`), 1)) : r("", !0)])]));
595
- }
596
- }), [["__scopeId", "data-v-06282c3d"]]), nt = {
597
- class: "ui-stepper",
598
- role: "list"
599
- }, rt = ["aria-current"], it = ["aria-label", "onClick"], at = {
600
- key: 1,
601
- class: "ui-stepper__badge",
602
- "aria-hidden": "true"
603
- }, ot = { class: "ui-stepper__label" }, st = /*#__PURE__*/ j(/* @__PURE__ */ c({
604
- __name: "UiStepper",
605
- props: {
606
- steps: {},
607
- modelValue: {}
608
- },
609
- emits: ["update:modelValue"],
610
- setup(t, { emit: n }) {
611
- let r = t, o = n;
612
- function s(e) {
613
- return e < r.modelValue ? "done" : e === r.modelValue ? "active" : "upcoming";
614
- }
615
- function c(e) {
616
- e < r.modelValue && o("update:modelValue", e);
617
- }
618
- return (n, r) => (h(), i("ol", nt, [(h(!0), i(e, null, _(t.steps, (e, t) => (h(), i("li", {
619
- key: e.id,
620
- class: d(["ui-stepper__step", `is-${s(t)}`]),
621
- "aria-current": s(t) === "active" ? "step" : void 0
622
- }, [s(t) === "done" ? (h(), i("button", {
623
- key: 0,
624
- type: "button",
625
- class: "ui-stepper__badge",
626
- "aria-label": `Back to ${e.label}`,
627
- onClick: (e) => c(t)
628
- }, "✓", 8, it)) : (h(), i("span", at, b(t + 1), 1)), a("span", ot, b(e.label), 1)], 10, rt))), 128))]));
629
- }
630
- }), [["__scopeId", "data-v-38fb837c"]]), ct = { class: "mw-seg" }, lt = {
631
- key: 0,
632
- class: "mw-visually-hidden"
633
- }, ut = ["title"], dt = [
634
- "name",
635
- "value",
636
- "checked",
637
- "disabled",
638
- "onChange"
639
- ], ft = /*#__PURE__*/ j(/* @__PURE__ */ c({
640
- __name: "UiSegmentedControl",
641
- props: {
642
- options: {},
643
- modelValue: {},
644
- ariaLabel: {}
645
- },
646
- emits: ["update:modelValue"],
647
- setup(t, { emit: n }) {
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
- key: e.id,
651
- class: d(["mw-seg__item", {
652
- "mw-seg__item--active": t.modelValue === e.id,
653
- "mw-seg__item--disabled": e.disabled
654
- }]),
655
- title: e.title
656
- }, [a("input", {
657
- type: "radio",
658
- name: x(c),
659
- value: e.id,
660
- checked: t.modelValue === e.id,
661
- disabled: e.disabled,
662
- onChange: (t) => s("update:modelValue", e.id)
663
- }, null, 40, dt), o(" " + b(e.label), 1)], 10, ut))), 128))]));
664
- }
665
- }), [["__scopeId", "data-v-430ffdd6"]]), pt = { class: "mw-field-hint" }, mt = ["aria-describedby"], ht = ["id"], gt = /*#__PURE__*/ j(/* @__PURE__ */ c({
666
- __name: "UiFieldHint",
667
- props: { fieldId: {} },
668
- setup(e) {
669
- function t(e) {
670
- e.key === "Escape" && e.currentTarget.blur();
671
- }
672
- return (n, r) => (h(), i("span", pt, [a("button", {
673
- type: "button",
674
- class: "mw-field-hint__btn",
675
- "aria-describedby": `${e.fieldId}-hint`,
676
- "aria-label": "Help",
677
- onKeydown: t
678
- }, "?", 40, mt), a("span", {
679
- id: `${e.fieldId}-hint`,
680
- role: "tooltip",
681
- class: "mw-field-hint__tip"
682
- }, [v(n.$slots, "default", {}, void 0, !0)], 8, ht)]));
683
- }
684
- }), [["__scopeId", "data-v-29d9a629"]]), _t = { class: "mw-form-field" }, vt = ["for"], yt = ["id"], bt = ["id"], xt = /*#__PURE__*/ j(/* @__PURE__ */ c({
685
- __name: "UiFormField",
686
- props: {
687
- id: {},
688
- label: {},
689
- error: {},
690
- hint: {}
691
- },
692
- setup(e) {
693
- let n = e, o = t(() => `${n.id}-err`), s = t(() => `${n.id}-hint-text`), c = t(() => ({
694
- id: n.id,
695
- "aria-invalid": n.error ? !0 : void 0,
696
- "aria-describedby": n.error ? o.value : n.hint ? s.value : void 0
697
- }));
698
- return (t, n) => (h(), i("p", _t, [
699
- a("label", {
700
- for: e.id,
701
- class: "mw-form-field__label"
702
- }, b(e.label), 9, vt),
703
- v(t.$slots, "label-suffix"),
704
- v(t.$slots, "default", { attrs: c.value }),
705
- e.hint && !e.error ? (h(), i("small", {
706
- key: 0,
707
- id: s.value,
708
- class: "mw-form-field__hint"
709
- }, b(e.hint), 9, yt)) : r("", !0),
710
- e.error ? (h(), i("small", {
711
- key: 1,
712
- id: o.value,
713
- class: "mw-form-field__error"
714
- }, b(e.error), 9, bt)) : r("", !0)
715
- ]));
716
- }
717
- }), [["__scopeId", "data-v-5aef34d9"]]), St = { class: "mw-tool-intro" }, Ct = /*#__PURE__*/ j(/* @__PURE__ */ c({
718
- __name: "UiToolIntro",
719
- setup(e) {
720
- return (e, t) => (h(), i("p", St, [v(e.$slots, "default", {}, void 0, !0)]));
721
- }
722
- }), [["__scopeId", "data-v-9a5436b9"]]), wt = { class: "mw-panel" }, Tt = /*#__PURE__*/ j(/* @__PURE__ */ c({
723
- __name: "UiPanel",
724
- props: {
725
- title: {},
726
- level: { default: 2 }
727
- },
728
- setup(e) {
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
- key: 0,
732
- class: "mw-panel__title"
733
- }, {
734
- default: D(() => [v(t.$slots, "title", {}, () => [o(b(e.title), 1)], !0)]),
735
- _: 3
736
- })) : r("", !0), v(t.$slots, "default", {}, void 0, !0)]));
737
- }
738
- }), [["__scopeId", "data-v-62fac524"]]), Et = /*#__PURE__*/ j(/* @__PURE__ */ c({
739
- __name: "UiBadge",
740
- props: { variant: { default: "neutral" } },
741
- setup(e) {
742
- return (t, n) => (h(), i("span", { class: d(["mw-badge", `mw-badge--${e.variant}`]) }, [v(t.$slots, "default", {}, void 0, !0)], 2));
743
- }
744
- }), [["__scopeId", "data-v-2e33d71a"]]), Dt = {
745
- type: "button",
746
- class: "mw-toolbar-btn"
747
- }, z = /*#__PURE__*/ j(/* @__PURE__ */ c({
748
- __name: "UiToolbarButton",
749
- setup(e) {
750
- return (e, t) => (h(), i("button", Dt, [v(e.$slots, "default", {}, void 0, !0)]));
751
- }
752
- }), [["__scopeId", "data-v-d5f19134"]]), Ot = { class: "mw-toolbar" }, kt = /*#__PURE__*/ j(/* @__PURE__ */ c({
753
- __name: "UiToolbar",
754
- props: { actions: {} },
755
- emits: ["action"],
756
- setup(t, { emit: n }) {
757
- let r = n;
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
- disabled: e.disabled,
760
- onClick: (t) => r("action", e.id)
761
- }, {
762
- default: D(() => [o(b(e.label), 1)]),
763
- _: 2
764
- }, 1032, ["disabled", "onClick"])]))), 128))]));
765
- }
766
- }), [["__scopeId", "data-v-170c8eb5"]]), At = { class: "mw-stat-grid" }, jt = /*#__PURE__*/ j(/* @__PURE__ */ c({
767
- __name: "UiStatGrid",
768
- setup(e) {
769
- return (e, t) => (h(), i("dl", At, [v(e.$slots, "default", {}, void 0, !0)]));
770
- }
771
- }), [["__scopeId", "data-v-3608575d"]]), Mt = { class: "mw-stat-grid__label" }, Nt = /*#__PURE__*/ j(/* @__PURE__ */ c({
772
- __name: "UiStatRow",
773
- props: {
774
- label: {},
775
- align: { default: "right" }
776
- },
777
- setup(t) {
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
- }
780
- }), [["__scopeId", "data-v-829f7772"]]), Pt = { class: "mw-data-table-wrap" }, Ft = { class: "mw-data-table" }, It = {
781
- key: 0,
782
- class: "mw-data-table__empty"
783
- }, Lt = /*#__PURE__*/ j(/* @__PURE__ */ c({
784
- __name: "UiDataTable",
785
- props: { empty: {} },
786
- setup(e) {
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
- }
790
- }), [["__scopeId", "data-v-de139c21"]]), B = /*#__PURE__*/ j(/* @__PURE__ */ c({
791
- __name: "UiStatusDot",
792
- props: { status: { default: "ok" } },
793
- setup(e) {
794
- return (t, n) => (h(), i("span", {
795
- class: d(["mw-status-dot", `mw-status-dot--${e.status}`]),
796
- "aria-hidden": "true"
797
- }, null, 2));
798
- }
799
- }), [["__scopeId", "data-v-62e9a7cc"]]), Rt = {
800
- role: "list",
801
- class: "mw-statusbar",
802
- "aria-label": "Status"
803
- }, zt = { key: 0 }, Bt = { class: "mw-visually-hidden" }, Vt = { key: 0 }, Ht = {
804
- key: 1,
805
- class: "mw-statusbar__pending"
806
- }, Ut = { key: 0 }, Wt = {
807
- key: 1,
808
- class: "mw-statusbar__pending"
809
- }, Gt = /*#__PURE__*/ j(/* @__PURE__ */ c({
810
- __name: "UiStatusBar",
811
- props: {
812
- network: {},
813
- healthy: {
814
- type: Boolean,
815
- default: !0
816
- },
817
- epoch: {},
818
- lastRefresh: {}
819
- },
820
- setup(n) {
821
- let c = n, l = t(() => c.network ? c.network.charAt(0).toUpperCase() + c.network.slice(1) : "");
822
- function u(e) {
823
- let t = Math.floor((Date.now() - e.getTime()) / 1e3);
824
- return t < 5 ? "just now" : t < 60 ? `${t}s ago` : `${Math.floor(t / 60)}m ago`;
825
- }
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
- o(" " + b(l.value) + " ", 1),
830
- a("span", Bt, "(" + b(n.healthy ? "status OK" : "status error") + ")", 1)
831
- ])) : r("", !0),
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
- v(t.$slots, "default", {}, void 0, !0)
835
- ]));
836
- }
837
- }), [["__scopeId", "data-v-06a511eb"]]), Kt = {
838
- class: "mw-feed",
839
- role: "list"
840
- }, qt = /*#__PURE__*/ j(/* @__PURE__ */ c({
841
- __name: "UiActivityFeed",
842
- setup(e) {
843
- return (e, t) => (h(), i("ul", Kt, [v(e.$slots, "default", {}, void 0, !0)]));
844
- }
845
- }), [["__scopeId", "data-v-9e578c9d"]]), Jt = { class: "mw-feed__item" }, Yt = ["datetime"], Xt = {
846
- key: 1,
847
- class: "mw-feed__meta"
848
- }, Zt = /*#__PURE__*/ j(/* @__PURE__ */ c({
849
- __name: "UiActivityItem",
850
- props: {
851
- type: {},
852
- time: {},
853
- datetime: {}
854
- },
855
- setup(e) {
856
- return (t, n) => (h(), i("li", Jt, [v(t.$slots, "type", {}, () => [o(b(e.type), 1)], !0), e.datetime ? (h(), i("time", {
857
- key: 0,
858
- class: "mw-feed__meta",
859
- datetime: e.datetime
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
- }
862
- }), [["__scopeId", "data-v-797b66a9"]]), Qt = /* @__PURE__ */ new Set([
863
- "operational",
864
- "degraded",
865
- "down",
866
- "unknown"
867
- ]);
868
- function V(e) {
869
- return typeof e == "string" && Qt.has(e);
870
- }
871
- function H(e) {
872
- return V(e) ? e : "unknown";
873
- }
874
- function U(e) {
875
- return typeof e != "string" || e.trim() === "" ? "" : e.replace(/[<>&"]/g, "");
876
- }
877
- function $t(e) {
878
- if (typeof e != "object" || !e) return null;
879
- let t = e, n = U(t.name);
880
- return n ? {
881
- name: n,
882
- status: H(t.status)
883
- } : null;
884
- }
885
- function en(e) {
886
- if (typeof e != "object" || !e) return null;
887
- let t = e, n = U(t.name);
888
- if (!n) return null;
889
- let r = Array.isArray(t.components) ? t.components.map($t).filter((e) => e !== null) : [];
890
- return {
891
- name: n,
892
- status: H(t.status),
893
- components: r
894
- };
895
- }
896
- function W(e) {
897
- if (typeof e != "object" || !e) return null;
898
- let t = e;
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
- return {
902
- generated_at: t.generated_at,
903
- overall: t.overall,
904
- groups: n
905
- };
906
- }
907
- //#endregion
908
- //#region src/components/StatusWidget.vue?vue&type=script&setup=true&lang.ts
909
- var tn = ["href", "title"], nn = 15e3, rn = /*#__PURE__*/ j(/* @__PURE__ */ c({
910
- __name: "StatusWidget",
911
- props: {
912
- apiUrl: { default: "https://status.meddleware.co.uk/api/status" },
913
- href: { default: "https://status.meddleware.co.uk" },
914
- pollInterval: { default: 6e4 }
915
- },
916
- setup(e) {
917
- let t = e, n = {
918
- operational: "ok",
919
- degraded: "degraded",
920
- down: "error",
921
- unknown: "degraded"
922
- }, r = {
923
- operational: "All systems operational",
924
- degraded: "Degraded",
925
- down: "Major outage",
926
- unknown: "Status unknown"
927
- }, a = g("checking"), o = g("Checking status…"), s = null;
928
- async function c() {
929
- try {
930
- let e = await fetch(t.apiUrl, { signal: AbortSignal.timeout(1e4) });
931
- if (!e.ok) throw Error(`HTTP ${e.status}`);
932
- let i = W(await e.json());
933
- if (!i) throw Error("unexpected response shape");
934
- a.value = n[i.overall], o.value = r[i.overall];
935
- } catch {
936
- a.value = "error", o.value = "Status unavailable";
937
- }
938
- }
939
- function l() {
940
- document.hidden || c();
941
- }
942
- return p(() => {
943
- c(), s = setInterval(l, Math.max(t.pollInterval, nn)), document.addEventListener("visibilitychange", l);
944
- }), m(() => {
945
- s !== null && clearInterval(s), document.removeEventListener("visibilitychange", l);
946
- }), (t, n) => (h(), i("a", {
947
- href: x(N)(e.href),
948
- target: "_blank",
949
- rel: "noopener noreferrer",
950
- class: d(["status-widget", `status-widget--${a.value}`]),
951
- title: `Platform status: ${o.value}`
952
- }, b(o.value), 11, tn));
953
- }
954
- }), [["__scopeId", "data-v-a83de7ee"]]), G = {
955
- mainnet: "https://suivision.xyz",
956
- testnet: "https://testnet.suivision.xyz",
957
- devnet: "https://devnet.suivision.xyz"
958
- };
959
- function an(e, t, n = "testnet") {
960
- return `${G[n] ?? G.testnet}/${e}/${encodeURIComponent(t)}`;
961
- }
962
- //#endregion
963
- //#region src/composables/useColorMode.ts
964
- var K = "mw-color-mode", q = g("system"), J = !1;
965
- function on() {
966
- return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
967
- }
968
- function Y(e) {
969
- return e === "dark" || e === "system" && on();
970
- }
971
- function X(e) {
972
- typeof document < "u" && document.documentElement.setAttribute("data-theme", Y(e) ? "dark" : "light");
973
- }
974
- function sn(e = "system") {
975
- if (!J) {
976
- J = !0;
977
- let t = null;
978
- try {
979
- let e = typeof localStorage < "u" ? localStorage.getItem(K) : null;
980
- (e === "light" || e === "dark" || e === "system") && (t = e);
981
- } catch {}
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
- }), l(!0).run(() => {
985
- E(q, (e) => {
986
- X(e);
987
- try {
988
- typeof localStorage < "u" && localStorage.setItem(K, e);
989
- } catch {}
990
- });
991
- });
992
- }
993
- function t(e) {
994
- q.value = e;
995
- }
996
- function n() {
997
- t(q.value === "light" ? "dark" : q.value === "dark" ? "system" : "light");
998
- }
999
- return {
1000
- mode: q,
1001
- set: t,
1002
- cycle: n,
1003
- isDark: () => Y(q.value)
1004
- };
1005
- }
1006
- //#endregion
1007
- //#region src/composables/useSeason.ts
1008
- function cn() {
1009
- if (typeof document > "u") return;
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
- document.documentElement.dataset.season = t;
1012
- }
1013
- //#endregion
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 };