@meddleware/ui 0.1.11 → 0.1.12

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}.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)}
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-88269247]{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-88269247]{border-top:1px solid var(--border)}.mw-footer__center[data-v-88269247]{flex:auto;min-width:0}.mw-footer__end[data-v-88269247]{align-items:center;gap:1rem;margin-left:auto;display:flex}.mw-footer__docs-link[data-v-88269247]{color:inherit;text-underline-offset:2px;opacity:.7;text-decoration:underline}.mw-footer__docs-link[data-v-88269247]:hover{opacity:1}.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-cc70da78]{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-cc70da78]:hover:not(:disabled){background:color-mix(in srgb, currentColor 10%, transparent);opacity:1}.sidebar-item.is-active[data-v-cc70da78]{background:color-mix(in srgb, var(--accent) 26%, transparent);opacity:1}.sidebar-item[data-v-cc70da78]:disabled{cursor:default}.sidebar-item[data-v-cc70da78]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.sidebar-item__icon[data-v-cc70da78]{text-align:center;width:1.1rem}.mw-tab-nav[data-v-7c93ad15]{border-bottom:2px solid var(--border);gap:.25rem;display:flex}.mw-tab-nav__tab[data-v-7c93ad15]{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-7c93ad15]:hover{color:var(--text)}.mw-tab-nav__tab--active[data-v-7c93ad15]{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*/
@@ -4,6 +4,11 @@ type __VLS_Props = {
4
4
  variant?: PanelVariant;
5
5
  /** Per-instance colour overrides; token values are used by default. */
6
6
  colors?: PanelColors;
7
+ /**
8
+ * When set, renders a "Documentation" link pointing at this URL.
9
+ * Use `VITE_DOCS_URL` in the consuming app to make this configurable per deployment.
10
+ */
11
+ docsUrl?: string;
7
12
  };
8
13
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
9
14
  type __VLS_Slots = {} & {
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 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";
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";
2
2
  //#region src/internal/panel.ts
3
3
  function g(e, t) {
4
4
  let n;
@@ -83,32 +83,39 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
83
83
  t.$slots.foot ? (d(), r("div", S, [m(t.$slots, "foot", {}, void 0, !0)])) : n("", !0)
84
84
  ], 6));
85
85
  }
86
- }), [["__scopeId", "data-v-23c3c7f3"]]), w = { class: "mw-footer__start" }, T = { class: "mw-footer__center" }, E = { class: "mw-footer__end" }, D = /*#__PURE__*/ _(/* @__PURE__ */ o({
86
+ }), [["__scopeId", "data-v-23c3c7f3"]]), w = { class: "mw-footer__start" }, T = { class: "mw-footer__center" }, E = { class: "mw-footer__end" }, D = ["href"], O = /*#__PURE__*/ _(/* @__PURE__ */ o({
87
87
  __name: "AppFooter",
88
88
  props: {
89
89
  variant: { default: "transparent" },
90
- colors: {}
90
+ colors: {},
91
+ docsUrl: {}
91
92
  },
92
93
  setup(e) {
93
- let n = e, a = t(() => g(n.variant, n.colors));
94
- return (t, n) => (d(), r("footer", {
94
+ let a = e, o = t(() => g(a.variant, a.colors));
95
+ return (t, a) => (d(), r("footer", {
95
96
  class: c(["mw-footer", `mw-footer--${e.variant}`]),
96
- style: l(a.value)
97
+ style: l(o.value)
97
98
  }, [
98
99
  i("div", w, [m(t.$slots, "start", {}, void 0, !0)]),
99
100
  i("div", T, [m(t.$slots, "default", {}, void 0, !0)]),
100
- i("div", E, [m(t.$slots, "end", {}, void 0, !0)])
101
+ i("div", E, [m(t.$slots, "end", {}, void 0, !0), e.docsUrl ? (d(), r("a", {
102
+ key: 0,
103
+ href: e.docsUrl,
104
+ target: "_blank",
105
+ rel: "noopener noreferrer",
106
+ class: "mw-footer__docs-link"
107
+ }, "Documentation", 8, D)) : n("", !0)])
101
108
  ], 6));
102
109
  }
103
- }), [["__scopeId", "data-v-c646b8e1"]]), O = {
110
+ }), [["__scopeId", "data-v-88269247"]]), k = {
104
111
  class: "mw-mode",
105
112
  role: "group",
106
113
  "aria-label": "Colour mode"
107
- }, k = [
114
+ }, A = [
108
115
  "aria-pressed",
109
116
  "title",
110
117
  "onClick"
111
- ], A = { "aria-hidden": "true" }, j = { class: "mw-mode__label" }, M = /*#__PURE__*/ _(/* @__PURE__ */ o({
118
+ ], j = { "aria-hidden": "true" }, M = { class: "mw-mode__label" }, N = /*#__PURE__*/ _(/* @__PURE__ */ o({
112
119
  __name: "ColorModeControl",
113
120
  props: {
114
121
  modelValue: {},
@@ -129,16 +136,16 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
129
136
  dark: "☾",
130
137
  system: "🖵"
131
138
  };
132
- return (o, s) => (d(), r("div", O, [(d(!0), r(e, null, p(t.modes, (e) => (d(), r("button", {
139
+ return (o, s) => (d(), r("div", k, [(d(!0), r(e, null, p(t.modes, (e) => (d(), r("button", {
133
140
  key: e,
134
141
  type: "button",
135
142
  class: c(["mw-mode__btn", { "is-active": t.modelValue === e }]),
136
143
  "aria-pressed": t.modelValue === e,
137
144
  title: n[e],
138
145
  onClick: (t) => o.$emit("update:modelValue", e)
139
- }, [i("span", A, h(a[e]), 1), i("span", j, h(n[e]), 1)], 10, k))), 128))]));
146
+ }, [i("span", j, h(a[e]), 1), i("span", M, h(n[e]), 1)], 10, A))), 128))]));
140
147
  }
141
- }), [["__scopeId", "data-v-186f8312"]]), N = ["type", "disabled"], P = /*#__PURE__*/ _(/* @__PURE__ */ o({
148
+ }), [["__scopeId", "data-v-186f8312"]]), P = ["type", "disabled"], F = /*#__PURE__*/ _(/* @__PURE__ */ o({
142
149
  __name: "UiButton",
143
150
  props: {
144
151
  variant: { default: "primary" },
@@ -153,25 +160,25 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
153
160
  type: e.type,
154
161
  disabled: e.disabled,
155
162
  class: c(["mw-btn", `mw-btn--${e.variant}`])
156
- }, [m(t.$slots, "default", {}, void 0, !0)], 10, N));
163
+ }, [m(t.$slots, "default", {}, void 0, !0)], 10, P));
157
164
  }
158
- }), [["__scopeId", "data-v-299de2c3"]]), F = { class: "mw-card" }, I = {
165
+ }), [["__scopeId", "data-v-299de2c3"]]), I = { class: "mw-card" }, L = {
159
166
  key: 0,
160
167
  class: "mw-card__header"
161
- }, L = { class: "mw-card__title" }, R = { class: "mw-card__body" }, z = {
168
+ }, R = { class: "mw-card__title" }, z = { class: "mw-card__body" }, B = {
162
169
  key: 1,
163
170
  class: "mw-card__footer"
164
- }, B = /*#__PURE__*/ _(/* @__PURE__ */ o({
171
+ }, V = /*#__PURE__*/ _(/* @__PURE__ */ o({
165
172
  __name: "UiCard",
166
173
  props: { title: {} },
167
174
  setup(e) {
168
- return (t, a) => (d(), r("section", F, [
169
- e.title || t.$slots.header ? (d(), r("header", I, [m(t.$slots, "header", {}, () => [i("h3", L, h(e.title), 1)], !0)])) : n("", !0),
170
- i("div", R, [m(t.$slots, "default", {}, void 0, !0)]),
171
- t.$slots.footer ? (d(), r("footer", z, [m(t.$slots, "footer", {}, void 0, !0)])) : n("", !0)
175
+ return (t, a) => (d(), r("section", I, [
176
+ e.title || t.$slots.header ? (d(), r("header", L, [m(t.$slots, "header", {}, () => [i("h3", R, h(e.title), 1)], !0)])) : n("", !0),
177
+ i("div", z, [m(t.$slots, "default", {}, void 0, !0)]),
178
+ t.$slots.footer ? (d(), r("footer", B, [m(t.$slots, "footer", {}, void 0, !0)])) : n("", !0)
172
179
  ]));
173
180
  }
174
- }), [["__scopeId", "data-v-fd2fd7ab"]]), V = { class: "mw-select" }, H = /*#__PURE__*/ _(/* @__PURE__ */ o({
181
+ }), [["__scopeId", "data-v-fd2fd7ab"]]), H = { class: "mw-select" }, U = /*#__PURE__*/ _(/* @__PURE__ */ o({
175
182
  inheritAttrs: !1,
176
183
  __name: "UiSelect",
177
184
  props: {
@@ -181,7 +188,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
181
188
  emits: ["update:modelValue"],
182
189
  setup(e) {
183
190
  let t = te(e, "modelValue");
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", {
191
+ return (e, n) => (d(), r("div", H, [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
192
  class: "mw-select__chevron",
186
193
  xmlns: "http://www.w3.org/2000/svg",
187
194
  width: "12",
@@ -190,7 +197,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
190
197
  "aria-hidden": "true"
191
198
  }, [i("path", { d: "M1 1l5 5 5-5" })], -1)]));
192
199
  }
193
- }), [["__scopeId", "data-v-b9468387"]]), U = ["role"], W = /*#__PURE__*/ _(/* @__PURE__ */ o({
200
+ }), [["__scopeId", "data-v-b9468387"]]), W = ["role"], le = /*#__PURE__*/ _(/* @__PURE__ */ o({
194
201
  __name: "UiNotice",
195
202
  props: { type: {} },
196
203
  setup(e) {
@@ -201,13 +208,13 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
201
208
  return (t, n) => (d(), r("p", {
202
209
  class: c(["mw-notice", e.type && e.type !== "info" ? `mw-notice--${e.type}` : ""]),
203
210
  role: i.value
204
- }, [m(t.$slots, "default", {}, void 0, !0)], 10, U));
211
+ }, [m(t.$slots, "default", {}, void 0, !0)], 10, W));
205
212
  }
206
- }), [["__scopeId", "data-v-6f53d0be"]]), le = ["disabled", "aria-current"], ue = {
213
+ }), [["__scopeId", "data-v-6f53d0be"]]), ue = ["disabled", "aria-current"], de = {
207
214
  key: 0,
208
215
  class: "sidebar-item__icon",
209
216
  "aria-hidden": "true"
210
- }, G = { class: "sidebar-item__label" }, de = /*#__PURE__*/ _(/* @__PURE__ */ o({
217
+ }, fe = { class: "sidebar-item__label" }, pe = /*#__PURE__*/ _(/* @__PURE__ */ o({
211
218
  __name: "SidebarItem",
212
219
  props: {
213
220
  label: {},
@@ -227,9 +234,9 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
227
234
  class: c(["sidebar-item", { "is-active": e.active }]),
228
235
  disabled: e.disabled,
229
236
  "aria-current": e.active ? "page" : void 0
230
- }, [e.icon ? (d(), r("span", ue, h(e.icon), 1)) : n("", !0), i("span", G, h(e.label), 1)], 10, le));
237
+ }, [e.icon ? (d(), r("span", de, h(e.icon), 1)) : n("", !0), i("span", fe, h(e.label), 1)], 10, ue));
231
238
  }
232
- }), [["__scopeId", "data-v-e15afdf7"]]), fe = ["aria-label"], pe = ["aria-current", "onClick"], me = /*#__PURE__*/ _(/* @__PURE__ */ o({
239
+ }), [["__scopeId", "data-v-cc70da78"]]), me = ["aria-label"], he = ["aria-current", "onClick"], ge = /*#__PURE__*/ _(/* @__PURE__ */ o({
233
240
  __name: "AppTabNav",
234
241
  props: {
235
242
  tabs: {},
@@ -248,9 +255,9 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
248
255
  class: c(["mw-tab-nav__tab", { "mw-tab-nav__tab--active": t.modelValue === e.id }]),
249
256
  "aria-current": t.modelValue === e.id ? "page" : void 0,
250
257
  onClick: (t) => i("update:modelValue", e.id)
251
- }, h(e.label), 11, pe))), 128))], 8, fe));
258
+ }, h(e.label), 11, he))), 128))], 8, me));
252
259
  }
253
- }), [["__scopeId", "data-v-88758ede"]]), he = { class: "ca-root" }, ge = ["title"], _e = ["title", "aria-label"], ve = {
260
+ }), [["__scopeId", "data-v-7c93ad15"]]), _e = { class: "ca-root" }, ve = ["title"], ye = ["title", "aria-label"], be = {
254
261
  key: 0,
255
262
  class: "ca-icon",
256
263
  viewBox: "0 0 24 24",
@@ -262,7 +269,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
262
269
  "stroke-linecap": "round",
263
270
  "stroke-linejoin": "round",
264
271
  "aria-hidden": "true"
265
- }, ye = {
272
+ }, xe = {
266
273
  key: 1,
267
274
  class: "ca-icon",
268
275
  viewBox: "0 0 24 24",
@@ -274,7 +281,7 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
274
281
  "stroke-linecap": "round",
275
282
  "stroke-linejoin": "round",
276
283
  "aria-hidden": "true"
277
- }, be = /*#__PURE__*/ _(/* @__PURE__ */ o({
284
+ }, Se = /*#__PURE__*/ _(/* @__PURE__ */ o({
278
285
  __name: "CopyableAddress",
279
286
  props: {
280
287
  address: {},
@@ -296,25 +303,25 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
296
303
  o.value = !1;
297
304
  }, 1500);
298
305
  }
299
- return (t, n) => (d(), r("span", he, [i("span", {
306
+ return (t, n) => (d(), r("span", _e, [i("span", {
300
307
  class: "ca-value",
301
308
  title: e.address
302
- }, [m(t.$slots, "default", {}, () => [a(h(s.value), 1)], !0)], 8, ge), i("button", {
309
+ }, [m(t.$slots, "default", {}, () => [a(h(s.value), 1)], !0)], 8, ve), i("button", {
303
310
  type: "button",
304
311
  class: c(["ca-copy", { "ca-copy--copied": o.value }]),
305
312
  title: o.value ? "Copied!" : e.label,
306
313
  "aria-label": o.value ? "Copied" : e.label,
307
314
  onClick: l
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", {
315
+ }, [o.value ? (d(), r("svg", be, [...n[0] ||= [i("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (d(), r("svg", xe, [...n[1] ||= [i("rect", {
309
316
  x: "9",
310
317
  y: "9",
311
318
  width: "13",
312
319
  height: "13",
313
320
  rx: "2",
314
321
  ry: "2"
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)]));
322
+ }, 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, ye)]));
316
323
  }
317
- }), [["__scopeId", "data-v-08c3420b"]]), xe = ["href", "title"], Se = /*#__PURE__*/ _(/* @__PURE__ */ o({
324
+ }), [["__scopeId", "data-v-08c3420b"]]), Ce = ["href", "title"], we = /*#__PURE__*/ _(/* @__PURE__ */ o({
318
325
  __name: "ExplorerLink",
319
326
  props: {
320
327
  href: {},
@@ -338,25 +345,25 @@ var ae = { class: "mw-header__brand" }, oe = { class: "mw-header__center" }, se
338
345
  target: "_blank",
339
346
  rel: "noopener noreferrer",
340
347
  title: e.value
341
- }, [m(t.$slots, "default", {}, () => [a(h(i.value), 1)], !0)], 8, xe));
348
+ }, [m(t.$slots, "default", {}, () => [a(h(i.value), 1)], !0)], 8, Ce));
342
349
  }
343
- }), [["__scopeId", "data-v-7a44607e"]]), Ce = /* @__PURE__ */ new Set([
350
+ }), [["__scopeId", "data-v-7a44607e"]]), Te = /* @__PURE__ */ new Set([
344
351
  "operational",
345
352
  "degraded",
346
353
  "down",
347
354
  "unknown"
348
355
  ]);
349
- function K(e) {
350
- return typeof e == "string" && Ce.has(e);
356
+ function G(e) {
357
+ return typeof e == "string" && Te.has(e);
351
358
  }
352
- function q(e) {
359
+ function K(e) {
353
360
  if (typeof e != "object" || !e) return null;
354
361
  let t = e;
355
- return !K(t.overall) || typeof t.generated_at != "string" || !Array.isArray(t.groups) ? null : e;
362
+ return !G(t.overall) || typeof t.generated_at != "string" || !Array.isArray(t.groups) ? null : e;
356
363
  }
357
364
  //#endregion
358
365
  //#region src/components/StatusWidget.vue?vue&type=script&setup=true&lang.ts
359
- var we = ["href", "title"], Te = { class: "status-widget__label" }, Ee = /*#__PURE__*/ _(/* @__PURE__ */ o({
366
+ var Ee = ["href", "title"], q = { class: "status-widget__label" }, De = /*#__PURE__*/ _(/* @__PURE__ */ o({
360
367
  __name: "StatusWidget",
361
368
  props: {
362
369
  apiUrl: { default: "https://status.meddleware.co.uk/api/status" },
@@ -379,16 +386,16 @@ var we = ["href", "title"], Te = { class: "status-widget__label" }, Ee = /*#__PU
379
386
  try {
380
387
  let e = await fetch(t.apiUrl);
381
388
  if (!e.ok) throw Error(`HTTP ${e.status}`);
382
- let r = q(await e.json());
389
+ let r = K(await e.json());
383
390
  if (!r) throw Error("unexpected response shape");
384
391
  o.value = n[r.overall], s.value = a[r.overall];
385
392
  } catch {
386
393
  o.value = "error", s.value = "Status unavailable";
387
394
  }
388
395
  }
389
- return ee(() => {
396
+ return u(() => {
390
397
  p(), l = setInterval(p, t.pollInterval);
391
- }), u(() => {
398
+ }), ee(() => {
392
399
  l !== null && clearInterval(l);
393
400
  }), (t, n) => (d(), r("a", {
394
401
  href: e.href,
@@ -399,29 +406,29 @@ var we = ["href", "title"], Te = { class: "status-widget__label" }, Ee = /*#__PU
399
406
  }, [n[0] ||= i("span", {
400
407
  class: "status-widget__dot",
401
408
  "aria-hidden": "true"
402
- }, null, -1), i("span", Te, h(s.value), 1)], 10, we));
409
+ }, null, -1), i("span", q, h(s.value), 1)], 10, Ee));
403
410
  }
404
411
  }), [["__scopeId", "data-v-20197983"]]), J = {
405
412
  mainnet: "https://suivision.xyz",
406
413
  testnet: "https://testnet.suivision.xyz",
407
414
  devnet: "https://devnet.suivision.xyz"
408
415
  };
409
- function De(e, t, n = "testnet") {
416
+ function Oe(e, t, n = "testnet") {
410
417
  return `${J[n] ?? J.testnet}/${e}/${t}`;
411
418
  }
412
419
  //#endregion
413
420
  //#region src/composables/useColorMode.ts
414
421
  var Y = "mw-color-mode", X = f("system"), Z = !1;
415
- function Oe() {
422
+ function ke() {
416
423
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches;
417
424
  }
418
425
  function Q(e) {
419
- return e === "dark" || e === "system" && Oe();
426
+ return e === "dark" || e === "system" && ke();
420
427
  }
421
428
  function $(e) {
422
429
  typeof document > "u" || document.documentElement.setAttribute("data-theme", Q(e) ? "dark" : "light");
423
430
  }
424
- function ke(e = "system") {
431
+ function Ae(e = "system") {
425
432
  if (!Z) {
426
433
  Z = !0;
427
434
  let t = null;
@@ -451,4 +458,4 @@ function ke(e = "system") {
451
458
  };
452
459
  }
453
460
  //#endregion
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 };
461
+ export { O as AppFooter, v as AppHeader, C as AppSidebar, ge as AppTabNav, N as ColorModeControl, Se as CopyableAddress, we as ExplorerLink, pe as SidebarItem, De as StatusWidget, F as UiButton, V as UiCard, le as UiNotice, U as UiSelect, G as isStatusLevel, K as parseSnapshot, Oe as suiExplorerUrl, Ae as useColorMode };
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@meddleware/ui",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
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
+ "homepage": "https://docs.meddleware.co.uk/",
5
6
  "license": "0BSD",
6
7
  "type": "module",
7
8
  "sideEffects": [