@meddleware/ui 0.1.10 → 0.1.11

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/base.css CHANGED
@@ -1,2 +1,2 @@
1
- *,:before,:after{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg);min-height:100vh;color:var(--text);font-family:var(--mw-font-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;font-size:16px;line-height:1.55}:where(ul,ol):where([role=list],[role=listitem]){margin:0;padding:0;list-style:none}:where(img,svg,video,canvas){max-width:100%;display:block}:where(fieldset){border:0;margin:0;padding:0}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}:where(button,input,select,textarea){font-family:inherit}:where(a,button,input,select,textarea):focus-visible{outline:2px solid var(--accent);outline-offset:2px}.mw-mono{font-family:var(--mw-font-mono)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.001ms!important;animation-duration:.001ms!important}}.mw-header[data-v-ad7cd1c5]{height:var(--mw-header-height,56px);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);align-items:center;gap:1rem;padding:0 1rem;display:flex}.mw-header--sticky[data-v-ad7cd1c5]{z-index:50;position:sticky;top:0}.mw-header__brand[data-v-ad7cd1c5]{letter-spacing:.01em;white-space:nowrap;align-items:center;gap:.5rem;font-weight:650;display:flex}.mw-header__center[data-v-ad7cd1c5]{flex:auto;min-width:0}.mw-header__actions[data-v-ad7cd1c5]{align-items:center;gap:.5rem;margin-left:auto;display:flex}.mw-sidebar[data-v-23c3c7f3]{height:100%;width:var(--mw-sidebar-width,240px);background:var(--_bg);color:var(--_text);border-right:1px solid var(--_border);font-family:var(--mw-font-sans);flex-direction:column;display:flex}.mw-sidebar__head[data-v-23c3c7f3]{border-bottom:1px solid var(--_border);padding:1rem}.mw-sidebar__nav[data-v-23c3c7f3]{flex-direction:column;flex:auto;gap:.25rem;padding:.75rem;display:flex;overflow-y:auto}.mw-sidebar__body[data-v-23c3c7f3]{flex-shrink:0}.mw-sidebar__foot[data-v-23c3c7f3]{border-top:1px solid var(--_border);color:var(--_muted);padding:.75rem 1rem;font-size:.85rem}.mw-footer[data-v-c646b8e1]{background:var(--_bg);color:var(--_muted);border-top:1px solid var(--_border);font-family:var(--mw-font-sans);flex-wrap:wrap;align-items:center;gap:1rem;padding:.75rem 1rem;font-size:.85rem;display:flex}.mw-footer--transparent[data-v-c646b8e1]{border-top:1px solid var(--border)}.mw-footer__center[data-v-c646b8e1]{flex:auto;min-width:0}.mw-footer__end[data-v-c646b8e1]{margin-left:auto}.mw-mode[data-v-186f8312]{border:1px solid var(--_border,var(--border));border-radius:var(--mw-radius,10px);background:color-mix(in srgb, var(--_text,var(--text)) 6%, transparent);gap:2px;padding:2px;display:inline-flex}.mw-mode__btn[data-v-186f8312]{border-radius:calc(var(--mw-radius,10px) - 3px);color:var(--_text,var(--text));font:inherit;cursor:pointer;opacity:.7;background:0 0;border:0;align-items:center;gap:.35rem;padding:.25rem .5rem;font-size:.8rem;display:inline-flex}.mw-mode__btn[data-v-186f8312]:hover{opacity:1}.mw-mode__btn.is-active[data-v-186f8312]{opacity:1;background:color-mix(in srgb, var(--_text,var(--text)) 14%, transparent)}.mw-mode__btn[data-v-186f8312]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media (width<=640px){.mw-mode__label[data-v-186f8312]{display:none}}.mw-btn[data-v-299de2c3]{border-radius:var(--mw-radius,10px);font:inherit;cursor:pointer;border:1px solid #0000;justify-content:center;align-items:center;gap:.4rem;padding:.5rem .9rem;font-weight:550;transition:filter .12s,background .12s;display:inline-flex}.mw-btn[data-v-299de2c3]:disabled{opacity:.55;cursor:not-allowed}.mw-btn[data-v-299de2c3]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.mw-btn--primary[data-v-299de2c3]{background:var(--accent);color:var(--accent-contrast)}.mw-btn--primary[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--secondary[data-v-299de2c3]{background:var(--secondary);color:var(--secondary-contrast)}.mw-btn--secondary[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--ghost[data-v-299de2c3]{color:var(--text);border-color:var(--border);background:0 0}.mw-btn--ghost[data-v-299de2c3]:not(:disabled):hover{background:var(--lift)}.mw-btn--danger[data-v-299de2c3]{background:var(--danger);color:var(--mw-neutral-000)}.mw-btn--danger[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-card[data-v-fd2fd7ab]{background:var(--surface);border:1px solid var(--border);border-radius:var(--mw-radius,10px);color:var(--text);overflow:hidden}.mw-card__header[data-v-fd2fd7ab]{border-bottom:1px solid var(--border);padding:.85rem 1rem}.mw-card__title[data-v-fd2fd7ab]{margin:0;font-size:1rem;font-weight:600}.mw-card__body[data-v-fd2fd7ab]{padding:1rem}.mw-card__footer[data-v-fd2fd7ab]{border-top:1px solid var(--border);background:var(--lift);padding:.75rem 1rem}.mw-select[data-v-b9468387]{position:relative}.mw-select select[data-v-b9468387]{appearance:none;background:var(--surface);width:100%;color:var(--text);border:1px solid var(--border);border-radius:var(--mw-radius,10px);font:inherit;padding:.5rem 2.5rem .5rem .7rem}.mw-select select[data-v-b9468387]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.mw-select__chevron[data-v-b9468387]{pointer-events:none;stroke:var(--muted);stroke-width:1.5px;fill:none;position:absolute;top:50%;right:.75rem;transform:translateY(-50%)}.mw-notice[data-v-6f53d0be]{border:1px solid var(--border);border-radius:var(--mw-radius,10px);background:var(--lift);color:var(--text);border-left-width:3px;margin:0;padding:.6rem .8rem;font-size:.9rem}.mw-notice--error[data-v-6f53d0be]{border-left-color:var(--danger);color:var(--danger);background:color-mix(in srgb, var(--danger) 8%, transparent)}.mw-notice--ok[data-v-6f53d0be]{border-left-color:var(--ok);color:var(--ok);background:color-mix(in srgb, var(--ok) 8%, transparent)}.sidebar-item[data-v-e15afdf7]{border-radius:var(--mw-radius,10px);width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;opacity:.85;background:0 0;border:0;align-items:center;gap:.6rem;padding:.55rem .7rem;display:flex}.sidebar-item[data-v-e15afdf7]:hover:not(:disabled){background:color-mix(in srgb, currentColor 10%, transparent);opacity:1}.sidebar-item.is-active[data-v-e15afdf7]{background:color-mix(in srgb, var(--accent) 26%, transparent);opacity:1}.sidebar-item[data-v-e15afdf7]:disabled{cursor:default}.sidebar-item[data-v-e15afdf7]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.sidebar-item__icon[data-v-e15afdf7]{text-align:center;width:1.1rem}.ca-root[data-v-08c3420b]{align-items:center;gap:.35em;display:inline-flex}.ca-value[data-v-08c3420b]{font-family:monospace;font-size:inherit}.ca-copy[data-v-08c3420b]{color:var(--muted,#888);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;line-height:1;transition:color .15s;display:inline-flex}.ca-copy[data-v-08c3420b]:hover{color:var(--text,#f0f0f0)}.ca-copy--copied[data-v-08c3420b]{color:var(--accent,#6366f1)}.ca-icon[data-v-08c3420b]{display:block}.el-root[data-v-7a44607e]{font-family:monospace;font-size:inherit;color:var(--accent,#6366f1);text-underline-offset:2px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;transition:color .15s}.el-root[data-v-7a44607e]:hover{color:var(--text,#f0f0f0);text-decoration-style:solid}.status-widget[data-v-20197983]{color:inherit;opacity:.85;align-items:center;gap:.4rem;font-size:.8rem;text-decoration:none;display:inline-flex}.status-widget[data-v-20197983]:hover{opacity:1}.status-widget__dot[data-v-20197983]{border-radius:50%;flex-shrink:0;width:.55rem;height:.55rem}.status-widget--ok .status-widget__dot[data-v-20197983]{background:var(--mw-ok-500)}.status-widget--degraded .status-widget__dot[data-v-20197983]{background:var(--mw-gold-500)}.status-widget--error .status-widget__dot[data-v-20197983]{background:var(--mw-danger-500)}
1
+ *,:before,:after{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg);min-height:100vh;color:var(--text);font-family:var(--mw-font-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;font-size:16px;line-height:1.55}:where(ul,ol):where([role=list],[role=listitem]){margin:0;padding:0;list-style:none}:where(img,svg,video,canvas){max-width:100%;display:block}:where(fieldset){border:0;margin:0;padding:0}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}:where(button,input,select,textarea){font-family:inherit}:where(a,button,input,select,textarea):focus-visible{outline:2px solid var(--accent);outline-offset:2px}.mw-mono{font-family:var(--mw-font-mono)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.001ms!important;animation-duration:.001ms!important}}.mw-header[data-v-ad7cd1c5]{height:var(--mw-header-height,56px);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);align-items:center;gap:1rem;padding:0 1rem;display:flex}.mw-header--sticky[data-v-ad7cd1c5]{z-index:50;position:sticky;top:0}.mw-header__brand[data-v-ad7cd1c5]{letter-spacing:.01em;white-space:nowrap;align-items:center;gap:.5rem;font-weight:650;display:flex}.mw-header__center[data-v-ad7cd1c5]{flex:auto;min-width:0}.mw-header__actions[data-v-ad7cd1c5]{align-items:center;gap:.5rem;margin-left:auto;display:flex}.mw-sidebar[data-v-23c3c7f3]{height:100%;width:var(--mw-sidebar-width,240px);background:var(--_bg);color:var(--_text);border-right:1px solid var(--_border);font-family:var(--mw-font-sans);flex-direction:column;display:flex}.mw-sidebar__head[data-v-23c3c7f3]{border-bottom:1px solid var(--_border);padding:1rem}.mw-sidebar__nav[data-v-23c3c7f3]{flex-direction:column;flex:auto;gap:.25rem;padding:.75rem;display:flex;overflow-y:auto}.mw-sidebar__body[data-v-23c3c7f3]{flex-shrink:0}.mw-sidebar__foot[data-v-23c3c7f3]{border-top:1px solid var(--_border);color:var(--_muted);padding:.75rem 1rem;font-size:.85rem}.mw-footer[data-v-c646b8e1]{background:var(--_bg);color:var(--_muted);border-top:1px solid var(--_border);font-family:var(--mw-font-sans);flex-wrap:wrap;align-items:center;gap:1rem;padding:.75rem 1rem;font-size:.85rem;display:flex}.mw-footer--transparent[data-v-c646b8e1]{border-top:1px solid var(--border)}.mw-footer__center[data-v-c646b8e1]{flex:auto;min-width:0}.mw-footer__end[data-v-c646b8e1]{margin-left:auto}.mw-mode[data-v-186f8312]{border:1px solid var(--_border,var(--border));border-radius:var(--mw-radius,10px);background:color-mix(in srgb, var(--_text,var(--text)) 6%, transparent);gap:2px;padding:2px;display:inline-flex}.mw-mode__btn[data-v-186f8312]{border-radius:calc(var(--mw-radius,10px) - 3px);color:var(--_text,var(--text));font:inherit;cursor:pointer;opacity:.7;background:0 0;border:0;align-items:center;gap:.35rem;padding:.25rem .5rem;font-size:.8rem;display:inline-flex}.mw-mode__btn[data-v-186f8312]:hover{opacity:1}.mw-mode__btn.is-active[data-v-186f8312]{opacity:1;background:color-mix(in srgb, var(--_text,var(--text)) 14%, transparent)}.mw-mode__btn[data-v-186f8312]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media (width<=640px){.mw-mode__label[data-v-186f8312]{display:none}}.mw-btn[data-v-299de2c3]{border-radius:var(--mw-radius,10px);font:inherit;cursor:pointer;border:1px solid #0000;justify-content:center;align-items:center;gap:.4rem;padding:.5rem .9rem;font-weight:550;transition:filter .12s,background .12s;display:inline-flex}.mw-btn[data-v-299de2c3]:disabled{opacity:.55;cursor:not-allowed}.mw-btn[data-v-299de2c3]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.mw-btn--primary[data-v-299de2c3]{background:var(--accent);color:var(--accent-contrast)}.mw-btn--primary[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--secondary[data-v-299de2c3]{background:var(--secondary);color:var(--secondary-contrast)}.mw-btn--secondary[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-btn--ghost[data-v-299de2c3]{color:var(--text);border-color:var(--border);background:0 0}.mw-btn--ghost[data-v-299de2c3]:not(:disabled):hover{background:var(--lift)}.mw-btn--danger[data-v-299de2c3]{background:var(--danger);color:var(--mw-neutral-000)}.mw-btn--danger[data-v-299de2c3]:not(:disabled):hover{filter:brightness(1.08)}.mw-card[data-v-fd2fd7ab]{background:var(--surface);border:1px solid var(--border);border-radius:var(--mw-radius,10px);color:var(--text);overflow:hidden}.mw-card__header[data-v-fd2fd7ab]{border-bottom:1px solid var(--border);padding:.85rem 1rem}.mw-card__title[data-v-fd2fd7ab]{margin:0;font-size:1rem;font-weight:600}.mw-card__body[data-v-fd2fd7ab]{padding:1rem}.mw-card__footer[data-v-fd2fd7ab]{border-top:1px solid var(--border);background:var(--lift);padding:.75rem 1rem}.mw-select[data-v-b9468387]{position:relative}.mw-select select[data-v-b9468387]{appearance:none;background:var(--surface);width:100%;color:var(--text);border:1px solid var(--border);border-radius:var(--mw-radius,10px);font:inherit;padding:.5rem 2.5rem .5rem .7rem}.mw-select select[data-v-b9468387]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.mw-select__chevron[data-v-b9468387]{pointer-events:none;stroke:var(--muted);stroke-width:1.5px;fill:none;position:absolute;top:50%;right:.75rem;transform:translateY(-50%)}.mw-notice[data-v-6f53d0be]{border:1px solid var(--border);border-radius:var(--mw-radius,10px);background:var(--lift);color:var(--text);border-left-width:3px;margin:0;padding:.6rem .8rem;font-size:.9rem}.mw-notice--error[data-v-6f53d0be]{border-left-color:var(--danger);color:var(--danger);background:color-mix(in srgb, var(--danger) 8%, transparent)}.mw-notice--ok[data-v-6f53d0be]{border-left-color:var(--ok);color:var(--ok);background:color-mix(in srgb, var(--ok) 8%, transparent)}.sidebar-item[data-v-e15afdf7]{border-radius:var(--mw-radius,10px);width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;opacity:.85;background:0 0;border:0;align-items:center;gap:.6rem;padding:.55rem .7rem;display:flex}.sidebar-item[data-v-e15afdf7]:hover:not(:disabled){background:color-mix(in srgb, currentColor 10%, transparent);opacity:1}.sidebar-item.is-active[data-v-e15afdf7]{background:color-mix(in srgb, var(--accent) 26%, transparent);opacity:1}.sidebar-item[data-v-e15afdf7]:disabled{cursor:default}.sidebar-item[data-v-e15afdf7]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.sidebar-item__icon[data-v-e15afdf7]{text-align:center;width:1.1rem}.mw-tab-nav[data-v-88758ede]{border-bottom:2px solid var(--border);gap:.25rem;display:flex}.mw-tab-nav__tab[data-v-88758ede]{appearance:none;cursor:pointer;color:var(--muted);background:0 0;border:none;border-bottom:2px solid #0000;margin-bottom:-2px;padding:.5rem 1rem;font-size:.95rem;transition:color .1s,border-color .1s}.mw-tab-nav__tab[data-v-88758ede]:hover{color:var(--text)}.mw-tab-nav__tab--active[data-v-88758ede]{border-bottom-color:var(--accent);color:var(--text);font-weight:600}.ca-root[data-v-08c3420b]{align-items:center;gap:.35em;display:inline-flex}.ca-value[data-v-08c3420b]{font-family:monospace;font-size:inherit}.ca-copy[data-v-08c3420b]{color:var(--muted,#888);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;line-height:1;transition:color .15s;display:inline-flex}.ca-copy[data-v-08c3420b]:hover{color:var(--text,#f0f0f0)}.ca-copy--copied[data-v-08c3420b]{color:var(--accent,#6366f1)}.ca-icon[data-v-08c3420b]{display:block}.el-root[data-v-7a44607e]{font-family:monospace;font-size:inherit;color:var(--accent,#6366f1);text-underline-offset:2px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;transition:color .15s}.el-root[data-v-7a44607e]:hover{color:var(--text,#f0f0f0);text-decoration-style:solid}.status-widget[data-v-20197983]{color:inherit;opacity:.85;align-items:center;gap:.4rem;font-size:.8rem;text-decoration:none;display:inline-flex}.status-widget[data-v-20197983]:hover{opacity:1}.status-widget__dot[data-v-20197983]{border-radius:50%;flex-shrink:0;width:.55rem;height:.55rem}.status-widget--ok .status-widget__dot[data-v-20197983]{background:var(--mw-ok-500)}.status-widget--degraded .status-widget__dot[data-v-20197983]{background:var(--mw-gold-500)}.status-widget--error .status-widget__dot[data-v-20197983]{background:var(--mw-danger-500)}
2
2
  /*$vite$:1*/
@@ -0,0 +1,16 @@
1
+ export interface AppTab {
2
+ id: string;
3
+ label: string;
4
+ }
5
+ type __VLS_Props = {
6
+ tabs: AppTab[];
7
+ modelValue: string;
8
+ ariaLabel?: string;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (id: string) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ "onUpdate:modelValue"?: ((id: string) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export { default as UiCard } from './components/UiCard.vue';
8
8
  export { default as UiSelect } from './components/UiSelect.vue';
9
9
  export { default as UiNotice } from './components/UiNotice.vue';
10
10
  export { default as SidebarItem } from './components/SidebarItem.vue';
11
+ export { default as AppTabNav } from './components/AppTabNav.vue';
12
+ export type { AppTab } from './components/AppTabNav.vue';
11
13
  export { default as CopyableAddress } from './components/CopyableAddress.vue';
12
14
  export { default as ExplorerLink } from './components/ExplorerLink.vue';
13
15
  export { default as StatusWidget } from './components/StatusWidget.vue';
package/dist/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeProps as s, normalizeClass as c, normalizeStyle as l, onMounted as u, onUnmounted as ee, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, useModel as te, vModelSelect as ne, watch as re, withDirectives as ie } from "vue";
1
+ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeProps as s, normalizeClass as c, normalizeStyle as l, onMounted as ee, onUnmounted as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, useModel as te, vModelSelect as ne, watch as re, withDirectives as ie } from "vue";
2
2
  //#region src/internal/panel.ts
3
3
  function g(e, t) {
4
4
  let n;
@@ -171,7 +171,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
171
171
  t.$slots.footer ? (d(), r("footer", z, [m(t.$slots, "footer", {}, void 0, !0)])) : n("", !0)
172
172
  ]));
173
173
  }
174
- }), [["__scopeId", "data-v-fd2fd7ab"]]), le = { class: "mw-select" }, V = /*#__PURE__*/ _(/* @__PURE__ */ o({
174
+ }), [["__scopeId", "data-v-fd2fd7ab"]]), V = { class: "mw-select" }, H = /*#__PURE__*/ _(/* @__PURE__ */ o({
175
175
  inheritAttrs: !1,
176
176
  __name: "UiSelect",
177
177
  props: {
@@ -181,7 +181,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
181
181
  emits: ["update:modelValue"],
182
182
  setup(e) {
183
183
  let t = te(e, "modelValue");
184
- return (e, n) => (d(), r("div", le, [ie(i("select", s(e.$attrs, { "onUpdate:modelValue": n[0] ||= (e) => t.value = e }), [m(e.$slots, "default", {}, void 0, !0)], 16), [[ne, t.value]]), n[1] ||= i("svg", {
184
+ return (e, n) => (d(), r("div", V, [ie(i("select", s(e.$attrs, { "onUpdate:modelValue": n[0] ||= (e) => t.value = e }), [m(e.$slots, "default", {}, void 0, !0)], 16), [[ne, t.value]]), n[1] ||= i("svg", {
185
185
  class: "mw-select__chevron",
186
186
  xmlns: "http://www.w3.org/2000/svg",
187
187
  width: "12",
@@ -190,7 +190,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
190
190
  "aria-hidden": "true"
191
191
  }, [i("path", { d: "M1 1l5 5 5-5" })], -1)]));
192
192
  }
193
- }), [["__scopeId", "data-v-b9468387"]]), H = ["role"], U = /*#__PURE__*/ _(/* @__PURE__ */ o({
193
+ }), [["__scopeId", "data-v-b9468387"]]), U = ["role"], W = /*#__PURE__*/ _(/* @__PURE__ */ o({
194
194
  __name: "UiNotice",
195
195
  props: { type: {} },
196
196
  setup(e) {
@@ -201,13 +201,13 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
201
201
  return (t, n) => (d(), r("p", {
202
202
  class: c(["mw-notice", e.type && e.type !== "info" ? `mw-notice--${e.type}` : ""]),
203
203
  role: i.value
204
- }, [m(t.$slots, "default", {}, void 0, !0)], 10, H));
204
+ }, [m(t.$slots, "default", {}, void 0, !0)], 10, U));
205
205
  }
206
- }), [["__scopeId", "data-v-6f53d0be"]]), W = ["disabled", "aria-current"], ue = {
206
+ }), [["__scopeId", "data-v-6f53d0be"]]), le = ["disabled", "aria-current"], ue = {
207
207
  key: 0,
208
208
  class: "sidebar-item__icon",
209
209
  "aria-hidden": "true"
210
- }, de = { class: "sidebar-item__label" }, fe = /*#__PURE__*/ _(/* @__PURE__ */ o({
210
+ }, G = { class: "sidebar-item__label" }, de = /*#__PURE__*/ _(/* @__PURE__ */ o({
211
211
  __name: "SidebarItem",
212
212
  props: {
213
213
  label: {},
@@ -227,9 +227,30 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
227
227
  class: c(["sidebar-item", { "is-active": e.active }]),
228
228
  disabled: e.disabled,
229
229
  "aria-current": e.active ? "page" : void 0
230
- }, [e.icon ? (d(), r("span", ue, h(e.icon), 1)) : n("", !0), i("span", de, h(e.label), 1)], 10, W));
230
+ }, [e.icon ? (d(), r("span", ue, h(e.icon), 1)) : n("", !0), i("span", G, h(e.label), 1)], 10, le));
231
231
  }
232
- }), [["__scopeId", "data-v-e15afdf7"]]), pe = { class: "ca-root" }, me = ["title"], he = ["title", "aria-label"], ge = {
232
+ }), [["__scopeId", "data-v-e15afdf7"]]), fe = ["aria-label"], pe = ["aria-current", "onClick"], me = /*#__PURE__*/ _(/* @__PURE__ */ o({
233
+ __name: "AppTabNav",
234
+ props: {
235
+ tabs: {},
236
+ modelValue: {},
237
+ ariaLabel: {}
238
+ },
239
+ emits: ["update:modelValue"],
240
+ setup(t, { emit: n }) {
241
+ let i = n;
242
+ return (n, a) => (d(), r("nav", {
243
+ class: "mw-tab-nav",
244
+ "aria-label": t.ariaLabel
245
+ }, [(d(!0), r(e, null, p(t.tabs, (e) => (d(), r("button", {
246
+ key: e.id,
247
+ type: "button",
248
+ class: c(["mw-tab-nav__tab", { "mw-tab-nav__tab--active": t.modelValue === e.id }]),
249
+ "aria-current": t.modelValue === e.id ? "page" : void 0,
250
+ onClick: (t) => i("update:modelValue", e.id)
251
+ }, h(e.label), 11, pe))), 128))], 8, fe));
252
+ }
253
+ }), [["__scopeId", "data-v-88758ede"]]), he = { class: "ca-root" }, ge = ["title"], _e = ["title", "aria-label"], ve = {
233
254
  key: 0,
234
255
  class: "ca-icon",
235
256
  viewBox: "0 0 24 24",
@@ -241,7 +262,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
241
262
  "stroke-linecap": "round",
242
263
  "stroke-linejoin": "round",
243
264
  "aria-hidden": "true"
244
- }, _e = {
265
+ }, ye = {
245
266
  key: 1,
246
267
  class: "ca-icon",
247
268
  viewBox: "0 0 24 24",
@@ -253,7 +274,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
253
274
  "stroke-linecap": "round",
254
275
  "stroke-linejoin": "round",
255
276
  "aria-hidden": "true"
256
- }, ve = /*#__PURE__*/ _(/* @__PURE__ */ o({
277
+ }, be = /*#__PURE__*/ _(/* @__PURE__ */ o({
257
278
  __name: "CopyableAddress",
258
279
  props: {
259
280
  address: {},
@@ -275,25 +296,25 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
275
296
  o.value = !1;
276
297
  }, 1500);
277
298
  }
278
- return (t, n) => (d(), r("span", pe, [i("span", {
299
+ return (t, n) => (d(), r("span", he, [i("span", {
279
300
  class: "ca-value",
280
301
  title: e.address
281
- }, [m(t.$slots, "default", {}, () => [a(h(s.value), 1)], !0)], 8, me), i("button", {
302
+ }, [m(t.$slots, "default", {}, () => [a(h(s.value), 1)], !0)], 8, ge), i("button", {
282
303
  type: "button",
283
304
  class: c(["ca-copy", { "ca-copy--copied": o.value }]),
284
305
  title: o.value ? "Copied!" : e.label,
285
306
  "aria-label": o.value ? "Copied" : e.label,
286
307
  onClick: l
287
- }, [o.value ? (d(), r("svg", ge, [...n[0] ||= [i("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (d(), r("svg", _e, [...n[1] ||= [i("rect", {
308
+ }, [o.value ? (d(), r("svg", ve, [...n[0] ||= [i("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (d(), r("svg", ye, [...n[1] ||= [i("rect", {
288
309
  x: "9",
289
310
  y: "9",
290
311
  width: "13",
291
312
  height: "13",
292
313
  rx: "2",
293
314
  ry: "2"
294
- }, null, -1), i("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)]));
315
+ }, null, -1), i("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, _e)]));
295
316
  }
296
- }), [["__scopeId", "data-v-08c3420b"]]), ye = ["href", "title"], be = /*#__PURE__*/ _(/* @__PURE__ */ o({
317
+ }), [["__scopeId", "data-v-08c3420b"]]), xe = ["href", "title"], Se = /*#__PURE__*/ _(/* @__PURE__ */ o({
297
318
  __name: "ExplorerLink",
298
319
  props: {
299
320
  href: {},
@@ -317,25 +338,25 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
317
338
  target: "_blank",
318
339
  rel: "noopener noreferrer",
319
340
  title: e.value
320
- }, [m(t.$slots, "default", {}, () => [a(h(i.value), 1)], !0)], 8, ye));
341
+ }, [m(t.$slots, "default", {}, () => [a(h(i.value), 1)], !0)], 8, xe));
321
342
  }
322
- }), [["__scopeId", "data-v-7a44607e"]]), xe = /* @__PURE__ */ new Set([
343
+ }), [["__scopeId", "data-v-7a44607e"]]), Ce = /* @__PURE__ */ new Set([
323
344
  "operational",
324
345
  "degraded",
325
346
  "down",
326
347
  "unknown"
327
348
  ]);
328
- function G(e) {
329
- return typeof e == "string" && xe.has(e);
330
- }
331
349
  function K(e) {
350
+ return typeof e == "string" && Ce.has(e);
351
+ }
352
+ function q(e) {
332
353
  if (typeof e != "object" || !e) return null;
333
354
  let t = e;
334
- return !G(t.overall) || typeof t.generated_at != "string" || !Array.isArray(t.groups) ? null : e;
355
+ return !K(t.overall) || typeof t.generated_at != "string" || !Array.isArray(t.groups) ? null : e;
335
356
  }
336
357
  //#endregion
337
358
  //#region src/components/StatusWidget.vue?vue&type=script&setup=true&lang.ts
338
- var Se = ["href", "title"], Ce = { class: "status-widget__label" }, we = /*#__PURE__*/ _(/* @__PURE__ */ o({
359
+ var we = ["href", "title"], Te = { class: "status-widget__label" }, Ee = /*#__PURE__*/ _(/* @__PURE__ */ o({
339
360
  __name: "StatusWidget",
340
361
  props: {
341
362
  apiUrl: { default: "https://status.meddleware.co.uk/api/status" },
@@ -358,16 +379,16 @@ var Se = ["href", "title"], Ce = { class: "status-widget__label" }, we = /*#__PU
358
379
  try {
359
380
  let e = await fetch(t.apiUrl);
360
381
  if (!e.ok) throw Error(`HTTP ${e.status}`);
361
- let r = K(await e.json());
382
+ let r = q(await e.json());
362
383
  if (!r) throw Error("unexpected response shape");
363
384
  o.value = n[r.overall], s.value = a[r.overall];
364
385
  } catch {
365
386
  o.value = "error", s.value = "Status unavailable";
366
387
  }
367
388
  }
368
- return u(() => {
389
+ return ee(() => {
369
390
  p(), l = setInterval(p, t.pollInterval);
370
- }), ee(() => {
391
+ }), u(() => {
371
392
  l !== null && clearInterval(l);
372
393
  }), (t, n) => (d(), r("a", {
373
394
  href: e.href,
@@ -378,56 +399,56 @@ var Se = ["href", "title"], Ce = { class: "status-widget__label" }, we = /*#__PU
378
399
  }, [n[0] ||= i("span", {
379
400
  class: "status-widget__dot",
380
401
  "aria-hidden": "true"
381
- }, null, -1), i("span", Ce, h(s.value), 1)], 10, Se));
402
+ }, null, -1), i("span", Te, h(s.value), 1)], 10, we));
382
403
  }
383
- }), [["__scopeId", "data-v-20197983"]]), q = {
404
+ }), [["__scopeId", "data-v-20197983"]]), J = {
384
405
  mainnet: "https://suivision.xyz",
385
406
  testnet: "https://testnet.suivision.xyz",
386
407
  devnet: "https://devnet.suivision.xyz"
387
408
  };
388
- function Te(e, t, n = "testnet") {
389
- return `${q[n] ?? q.testnet}/${e}/${t}`;
409
+ function De(e, t, n = "testnet") {
410
+ return `${J[n] ?? J.testnet}/${e}/${t}`;
390
411
  }
391
412
  //#endregion
392
413
  //#region src/composables/useColorMode.ts
393
- var J = "mw-color-mode", Y = f("system"), X = !1;
394
- function Z() {
414
+ var Y = "mw-color-mode", X = f("system"), Z = !1;
415
+ function Oe() {
395
416
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
396
417
  }
397
418
  function Q(e) {
398
- return e === "dark" || e === "system" && Z();
419
+ return e === "dark" || e === "system" && Oe();
399
420
  }
400
421
  function $(e) {
401
422
  typeof document > "u" || document.documentElement.setAttribute("data-theme", Q(e) ? "dark" : "light");
402
423
  }
403
- function Ee(e = "system") {
404
- if (!X) {
405
- X = !0;
424
+ function ke(e = "system") {
425
+ if (!Z) {
426
+ Z = !0;
406
427
  let t = null;
407
428
  try {
408
- t = typeof localStorage < "u" ? localStorage.getItem(J) : null;
429
+ t = typeof localStorage < "u" ? localStorage.getItem(Y) : null;
409
430
  } catch {}
410
- Y.value = t ?? e, $(Y.value), typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
411
- Y.value === "system" && $("system");
412
- }), re(Y, (e) => {
431
+ X.value = t ?? e, $(X.value), typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
432
+ X.value === "system" && $("system");
433
+ }), re(X, (e) => {
413
434
  $(e);
414
435
  try {
415
- typeof localStorage < "u" && localStorage.setItem(J, e);
436
+ typeof localStorage < "u" && localStorage.setItem(Y, e);
416
437
  } catch {}
417
438
  });
418
439
  }
419
440
  function t(e) {
420
- Y.value = e;
441
+ X.value = e;
421
442
  }
422
443
  function n() {
423
- t(Y.value === "light" ? "dark" : Y.value === "dark" ? "system" : "light");
444
+ t(X.value === "light" ? "dark" : X.value === "dark" ? "system" : "light");
424
445
  }
425
446
  return {
426
- mode: Y,
447
+ mode: X,
427
448
  set: t,
428
449
  cycle: n,
429
- isDark: () => Q(Y.value)
450
+ isDark: () => Q(X.value)
430
451
  };
431
452
  }
432
453
  //#endregion
433
- export { D as AppFooter, v as AppHeader, C as AppSidebar, M as ColorModeControl, ve as CopyableAddress, be as ExplorerLink, fe as SidebarItem, we as StatusWidget, P as UiButton, B as UiCard, U as UiNotice, V as UiSelect, G as isStatusLevel, K as parseSnapshot, Te as suiExplorerUrl, Ee as useColorMode };
454
+ export { D as AppFooter, v as AppHeader, C as AppSidebar, me as AppTabNav, M as ColorModeControl, be as CopyableAddress, Se as ExplorerLink, de as SidebarItem, Ee as StatusWidget, P as UiButton, B as UiCard, W as UiNotice, H as UiSelect, K as isStatusLevel, q as parseSnapshot, De as suiExplorerUrl, ke as useColorMode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meddleware/ui",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Shared Vue 3 component library for @meddleware UIs \u2014 layout shell (header/sidebar/footer), colour-mode control, and primitives. Built on @meddleware/design-tokens.",
5
5
  "license": "0BSD",
6
6
  "type": "module",