@meddleware/ui 0.1.42 → 0.1.44

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/README.md CHANGED
@@ -69,7 +69,7 @@ Seasonal theming is entirely in `@meddleware/design-tokens` (import `seasons.css
69
69
  | `AppHeader` | Top bar (`<header>`). `sidebarId` shows a menu button below 45em that opens that sidebar as a drawer. Slots `brand`, default and `actions` render **directly** in the header — no wrapper elements. The brand slot's single element comes first and takes the brand typography, pushing everything after it to the inline end; default-slot content that should fill the gap sets its own `flex: 1`. |
70
70
  | `AppSidebar` | Side panel (`<aside>`) around a component-owned `<nav>` (default slot; `navLabel`, default "Primary"). Below 45em it becomes a **drawer** on the Popover API, opened by `AppHeader`'s menu button (give the sidebar an `id`, pass it as `sidebar-id`), closed by Escape, a click outside, or choosing an item. The `head`, `body` and `foot` slots render directly and style themselves; the nav grows, so body/foot content settles at the bottom. |
71
71
  | `BrandMark` | The company mark, the Kopimi "K" (public domain, vendored; `src/brand/README.md`), drawn in `currentColor` so it takes the accent in either colour mode. Decorative unless given `label`. The favicon set (`favicon.svg` with a dark-mode colour, `favicon.ico`, `apple-touch-icon.png`, `icon-192.png`, `icon-512.png`) is published as `@meddleware/ui/brand/*`; apps get it through `@meddleware/frontend-config`'s `brandIcons`. |
72
- | `AppToolShell` | The frame of a standalone tool app: header with the mark and the tool's name, `actions` slot, colour-mode control, footer with the documentation links and the copyright line. `docsUrl` / `devUrl` take a URL or `false` (no link); `pageHeading` false when the page has its own `h1`. |
72
+ | `AppToolShell` | The frame of a standalone tool app: header with the mark and the tool's name, `actions` slot, colour-mode control, footer with the documentation links and the copyright line. `docsUrl` / `devUrl` take a URL or `false` (no link); `pageHeading` false when the page has its own `h1`; `contained` false lets the page use the full width; a `footer-note` slot adds a sentence to the footer. |
73
73
  | `AppFooter` | Page footer (`<footer>`). Slots `start`, default and `end` render directly; `docsUrl` / `devUrl` render a component-owned `<nav aria-label="Documentation">` at the inline end. |
74
74
 
75
75
  All three accept a `variant` prop (a CSS class, `mw-panel--dark` and so on, defined in the reset; `colors` overrides are written to the element through the CSSOM, never as an inline `style` attribute, so they work under a strict CSP):
package/dist/base.css CHANGED
@@ -1,7 +1,7 @@
1
1
  @layer mw.reset, mw.components;
2
2
  @layer mw.reset{*,:before,:after{box-sizing:border-box}html,body{margin:0;padding:0}html{scroll-padding-block:calc(var(--mw-header-offset,calc(var(--mw-header-height) * 2)) + var(--mw-sticky-extra,0px)) calc(var(--mw-header-height) * 2)}body{background:var(--bg);min-height:100vh;color:var(--text);font-family:var(--mw-font-sans);font-size:var(--font-size-base);line-height:var(--leading-normal);letter-spacing:var(--tracking-normal);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility}:where(ul,ol):where([role=list],[role=listitem]),:where(menu){margin:0;padding:0;list-style:none}.mw-visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.mw-panel--dark{--_bg:var(--mw-panel-dark-bg);--_surface:var(--mw-panel-dark-surface);--_text:var(--mw-panel-dark-text);--_muted:var(--mw-panel-dark-muted);--_border:var(--mw-panel-dark-border);--_ok:var(--mw-panel-dark-ok);--_danger:var(--mw-panel-dark-danger);--_info:var(--mw-panel-dark-info);--text:var(--_text);--muted:var(--_muted);--border:var(--_border);--bg:var(--_bg);--surface:var(--_surface);--lift:var(--_surface);--mw-link:var(--_text)}.mw-panel--light{--_bg:var(--mw-panel-light-bg);--_surface:var(--mw-panel-light-surface);--_text:var(--mw-panel-light-text);--_muted:var(--mw-panel-light-muted);--_border:var(--mw-panel-light-border);--_ok:var(--mw-panel-light-ok);--_danger:var(--mw-panel-light-danger);--_info:var(--mw-panel-light-info);--text:var(--_text);--muted:var(--_muted);--border:var(--_border);--bg:var(--_bg);--surface:var(--_surface);--lift:var(--_surface);--mw-link:var(--_text)}.mw-panel--transparent{--_bg:transparent;--_surface:transparent;--_text:var(--text);--_muted:var(--muted);--_border:transparent;--_ok:var(--ok);--_danger:var(--danger);--_info:var(--info)}:where(img,svg,video,canvas){max-width:100%;display:block}:where(fieldset){border:0;min-inline-size:0;margin:0;padding:0}:where(legend){overflow-wrap:anywhere;max-inline-size:100%;padding:0}a{color:var(--mw-link,var(--accent));text-underline-offset:.18em;transition:color var(--transition-base);text-decoration:underline;text-decoration-thickness:.08em}a:hover{text-decoration-thickness:.14em}:where(button,input,select,textarea){font-family:inherit}:where(button){padding:var(--space-3xs) var(--space-xs);color:var(--text);background-color:var(--lift);border:1px solid var(--border);border-radius:var(--radius-sm);font-size:inherit;cursor:pointer}:where(input[type=file])::file-selector-button{padding:var(--space-3xs) var(--space-xs);color:var(--text);background-color:var(--lift);border:1px solid var(--border);border-radius:var(--radius-sm);font-size:inherit;cursor:pointer}:where(input[type=file])::file-selector-button{margin-inline-end:var(--space-xs)}:where(button:disabled){cursor:not-allowed}:where(a,button,input,select,textarea):focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}.mw-mono{font-family:var(--mw-font-mono)}:where(code,kbd,samp){font-family:var(--mw-font-mono);overflow-wrap:anywhere}:where(pre) :where(code,kbd,samp){overflow-wrap:normal}.mw-noise{isolation:isolate;position:relative}.mw-noise:before{content:"";z-index:var(--z-below);background-image:var(--noise-overlay);opacity:var(--noise-opacity);pointer-events:none;background-repeat:repeat;position:absolute;inset:0}.mw-hand-drawn{display:inline-flex;position:relative}.mw-spinner{width:var(--space-sm);height:var(--space-sm);border:2px solid var(--border);border-top-color:var(--accent);animation:mw-spin var(--transition-slow) linear infinite;border-radius:50%;display:inline-block}@keyframes mw-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:0s!important;transition-delay:0s!important;animation-duration:.001ms!important}.mw-spinner{border-top-color:var(--accent);animation:none}}}@layer mw.components;
3
3
  @layer mw.reset;@layer mw.components{.mw-footer[data-v-766c24d7]{align-items:center;gap:var(--space-sm);padding:var(--space-xs) var(--space-sm);background:var(--_bg);color:var(--_muted);border-top:1px solid var(--_border);font-family:var(--mw-font-sans);font-size:var(--font-size-sm);flex-wrap:wrap;display:flex}.mw-footer--transparent[data-v-766c24d7]{border-top:1px solid var(--border)}.mw-footer__docs[data-v-766c24d7]{align-items:center;gap:var(--space-2xs) var(--space-sm);flex-wrap:wrap;max-inline-size:100%;margin-inline-start:auto;display:flex}.mw-footer__docs a[data-v-766c24d7]{color:inherit;text-underline-offset:.18em;text-decoration:underline}.mw-footer__docs a[data-v-766c24d7]:hover{text-decoration-thickness:.14em}.mw-footer a[data-v-766c24d7-s]{color:inherit}.mw-footer[data-v-766c24d7]:not(.mw-footer--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
4
- @layer mw.reset;@layer mw.components{.mw-header[data-v-2037e3f5]{align-items:center;gap:var(--space-2xs);min-height:var(--mw-header-height);padding:var(--space-4xs) var(--space-sm);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);transition:background var(--transition-base), backdrop-filter var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);flex-wrap:wrap;display:flex}.mw-header--sticky[data-v-2037e3f5]{z-index:var(--z-header);position:sticky;top:0}.mw-header--scrolled[data-v-2037e3f5]{background:color-mix(in srgb, var(--bg) 82%, transparent);-webkit-backdrop-filter:blur(var(--space-2xs));backdrop-filter:blur(var(--space-2xs));border-bottom-color:var(--border);box-shadow:var(--shadow-1)}.mw-header__brand[data-v-2037e3f5]{align-items:center;gap:var(--space-2xs);font-weight:var(--font-weight-brand);letter-spacing:var(--tracking-wide);overflow-wrap:anywhere;min-inline-size:0;margin-inline-end:auto;text-decoration:none;display:flex}.mw-header a[data-v-2037e3f5-s]{color:inherit}.mw-header__menu[data-v-2037e3f5]{padding:var(--space-3xs);border:1px solid var(--_border);border-radius:var(--radius-sm);color:inherit;cursor:pointer;background:0 0;justify-content:center;align-items:center;display:none}.mw-header__menu[data-v-2037e3f5]:hover{background:color-mix(in srgb, currentColor 12%, transparent)}@media (width<45em){.mw-header__menu[data-v-2037e3f5]{display:inline-flex}}.mw-header[data-v-2037e3f5]:not(.mw-header--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
4
+ @layer mw.reset;@layer mw.components{.mw-header[data-v-a57cc4b5]{align-items:center;gap:var(--space-2xs);min-height:var(--mw-header-height);padding:var(--space-4xs) var(--space-sm);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);transition:background var(--transition-base), backdrop-filter var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);flex-wrap:wrap;display:flex}.mw-header--sticky[data-v-a57cc4b5]{z-index:var(--z-header);position:sticky;top:0}.mw-header--sticky.mw-header--transparent[data-v-a57cc4b5]{background:color-mix(in srgb, var(--bg) 82%, transparent);-webkit-backdrop-filter:blur(var(--space-2xs));backdrop-filter:blur(var(--space-2xs));border-bottom-color:var(--border);box-shadow:var(--shadow-1)}.mw-header__brand[data-v-a57cc4b5]{align-items:center;gap:var(--space-2xs);font-weight:var(--font-weight-brand);letter-spacing:var(--tracking-wide);overflow-wrap:anywhere;min-inline-size:0;margin-inline-end:auto;text-decoration:none;display:flex}.mw-header a[data-v-a57cc4b5-s]{color:inherit}.mw-header__menu[data-v-a57cc4b5]{padding:var(--space-3xs);border:1px solid var(--_border);border-radius:var(--radius-sm);color:inherit;cursor:pointer;background:0 0;justify-content:center;align-items:center;display:none}.mw-header__menu[data-v-a57cc4b5]:hover{background:color-mix(in srgb, currentColor 12%, transparent)}@media (width<45em){.mw-header__menu[data-v-a57cc4b5]{display:inline-flex}}.mw-header[data-v-a57cc4b5]:not(.mw-header--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
5
5
  @layer mw.reset;@layer mw.components{.mw-sidebar[data-v-f5e6df6c]{--_width:var(--v4ba6c322);height:100%;width:var(--_width);background:var(--_bg);color:var(--_text);border:0;border-right:1px solid var(--_border);font-family:var(--mw-font-sans);flex-direction:column;margin:0;padding:0;display:flex;position:static;inset:auto;overflow:visible}.mw-sidebar__nav[data-v-f5e6df6c]{gap:var(--space-3xs);padding:var(--space-xs) 0;flex-direction:column;flex:auto;display:flex;overflow-y:auto}@media (width<45em){.mw-sidebar[data-v-f5e6df6c]:not(:popover-open){display:none}.mw-sidebar[data-v-f5e6df6c]:popover-open{width:min(var(--_width), 85vw);height:100dvh;box-shadow:var(--shadow-3);position:fixed;inset:0 auto 0 0}.mw-sidebar[data-v-f5e6df6c]::backdrop{background:var(--backdrop)}}.mw-sidebar a[data-v-f5e6df6c-s]{color:inherit}.mw-sidebar[data-v-f5e6df6c]:not(.mw-sidebar--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
6
6
  @layer mw.reset;@layer mw.components{.mw-tab-nav[data-v-7b318cd8]{gap:var(--space-3xs);border-bottom:var(--space-4xs) solid var(--border);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.mw-tab-nav__item[data-v-7b318cd8]{display:contents}.mw-tab-nav__tab[data-v-7b318cd8]{appearance:none;border:none;border-bottom:var(--space-4xs) solid transparent;padding:var(--space-2xs) var(--space-sm);margin-bottom:calc(-1 * var(--space-4xs));cursor:pointer;font-size:var(--font-size-base);color:var(--muted);transition:color var(--transition-base), border-color var(--transition-base);background:0 0;border-radius:0}.mw-tab-nav__tab[data-v-7b318cd8]:hover{color:var(--text)}.mw-tab-nav__tab--active[data-v-7b318cd8]{border-bottom-color:var(--accent);color:var(--text);font-weight:var(--font-weight-semibold)}.mw-tab-nav--raised[data-v-7b318cd8]{border-bottom:1px solid var(--border);background:var(--surface);padding:var(--space-3xs) var(--space-3xs) 0;align-items:flex-end;gap:var(--space-4xs);scrollbar-width:none;flex-shrink:0;overflow-x:auto}.mw-tab-nav--raised[data-v-7b318cd8]::-webkit-scrollbar{display:none}.mw-tab-nav--raised .mw-tab-nav__tab[data-v-7b318cd8]{border-bottom:1px solid var(--border);padding:var(--space-3xs) var(--space-xs) var(--space-3xs);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--muted);background:var(--lift);border-top:var(--space-4xs) solid transparent;white-space:nowrap;transition:color var(--transition-base), background var(--transition-base), border-color var(--transition-base);border-left:1px solid #0000;border-right:1px solid #0000;margin-bottom:-1px}.mw-tab-nav--raised .mw-tab-nav__tab[data-v-7b318cd8]:hover:not(.mw-tab-nav__tab--active){color:var(--text);background:var(--surface)}.mw-tab-nav--raised .mw-tab-nav__tab--active[data-v-7b318cd8]{color:var(--text);background:var(--bg);border-color:var(--accent) var(--border) var(--bg) var(--border);font-weight:var(--font-weight-semibold)}.mw-tab-nav--raised.mw-tab-nav--lg[data-v-7b318cd8]{gap:var(--space-4xs);padding:var(--space-3xs) var(--space-3xs) 0}.mw-tab-nav--raised.mw-tab-nav--lg .mw-tab-nav__tab[data-v-7b318cd8]{padding:var(--space-2xs) var(--space-sm);font-size:var(--font-size-base);font-weight:var(--font-weight-semibold)}.mw-tab-nav--flush[data-v-7b318cd8]{background:0 0;padding-inline:0}}
7
7
  @layer mw.reset;@layer mw.components{.mw-brand-mark[data-v-701f75be]{inline-size:var(--mw-brand-size,1em);block-size:var(--mw-brand-size,1em);vertical-align:-.125em;flex:none;display:inline-block}}
@@ -25,7 +25,7 @@
25
25
  @layer mw.reset;@layer mw.components{.mw-data-table-wrap[data-v-57394578]{scrollbar-width:thin;position:relative;overflow-x:auto}.mw-data-table-wrap[data-v-57394578]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}.mw-data-table[data-v-57394578]{border-collapse:collapse;width:100%;font-size:var(--font-size-sm)}.mw-data-table[data-v-57394578] th{text-align:left;padding:var(--space-3xs) var(--space-2xs);font-size:var(--font-size-2xs);font-weight:var(--font-weight-semibold);letter-spacing:var(--tracking-wide);text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--border);white-space:nowrap}.mw-data-table[data-v-57394578] tbody th[scope=row]{font-size:inherit;letter-spacing:normal;text-transform:none;color:var(--text);white-space:normal;vertical-align:middle}.mw-data-table[data-v-57394578] td{padding:var(--space-3xs) var(--space-2xs);border-bottom:1px solid var(--border);vertical-align:middle}.mw-data-table[data-v-57394578] tbody tr:last-child td,.mw-data-table[data-v-57394578] tbody tr:last-child th{border-bottom:none}.mw-data-table[data-v-57394578] tbody tr:nth-child(2n) td,.mw-data-table[data-v-57394578] tbody tr:nth-child(2n) th{background:var(--lift)}.mw-data-table__empty[data-v-57394578]{padding:var(--space-md) var(--space-sm);text-align:center;color:var(--muted);font-size:var(--font-size-sm);margin:0}.mw-data-table__hint[data-v-57394578]{padding:var(--space-3xs) var(--space-2xs);color:var(--muted);font-size:var(--font-size-xs);display:block;position:sticky;left:0}}
26
26
  @layer mw.reset;@layer mw.components{.mw-dialog[data-v-a4a786e3]{--_width:var(--a58c281a);width:var(--_width);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);max-height:90dvh;color:var(--text);box-shadow:var(--shadow-3);padding:0}.mw-dialog[data-v-a4a786e3]::backdrop{background:var(--backdrop);-webkit-backdrop-filter:blur(var(--space-4xs));backdrop-filter:blur(var(--space-4xs))}.mw-dialog__content[data-v-a4a786e3]{gap:var(--space-sm);padding:var(--space-md);flex-direction:column;display:flex}.mw-dialog__header[data-v-a4a786e3]{justify-content:space-between;align-items:center;gap:var(--space-sm);display:flex}.mw-dialog__title[data-v-a4a786e3]{font-size:var(--font-size-base);font-weight:var(--font-weight-semibold);margin:0}.mw-dialog__close[data-v-a4a786e3]{padding:0 var(--space-3xs);border-radius:var(--radius);color:var(--muted);font-size:var(--font-size-xl);cursor:pointer;background:0 0;border:0;line-height:1}.mw-dialog__close[data-v-a4a786e3]:hover{color:var(--text)}.mw-dialog__actions[data-v-a4a786e3]{justify-content:flex-end;gap:var(--space-xs);flex-wrap:wrap;display:flex}}
27
27
  @layer mw.reset;@layer mw.components{.mw-empty[data-v-8463293a]{align-items:center;gap:var(--space-xs);padding:var(--space-md) var(--space-sm);text-align:center;flex-direction:column;display:flex}.mw-empty__text[data-v-8463293a]{color:var(--muted);margin:0}}
28
- @layer mw.reset;@layer mw.components{.mw-field-hint[data-v-e1611375]{vertical-align:middle;margin-inline-start:var(--space-3xs);display:inline-block;position:relative}.mw-field-hint__btn[data-v-e1611375]{inline-size:calc(var(--space-sm) + var(--space-3xs));block-size:calc(var(--space-sm) + var(--space-3xs));font-size:var(--font-size-sm);font-weight:var(--font-weight-bold);border:1px solid var(--muted);color:var(--muted);cursor:help;background:0 0;border-radius:50%;justify-content:center;align-items:center;padding:0;font-family:inherit;line-height:1;display:inline-flex}.mw-field-hint__btn[data-v-e1611375]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.mw-field-hint__tip[data-v-e1611375]{top:calc(100% + var(--space-3xs));z-index:var(--z-popover);min-width:calc(var(--mw-content-narrow) / 2);max-width:min(var(--mw-content-narrow), 90vw);padding:var(--space-2xs) var(--space-xs);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--leading-normal);color:var(--text);box-shadow:var(--shadow-2);display:none;position:absolute;left:0}.mw-field-hint:not(.mw-field-hint--dismissed):hover .mw-field-hint__tip[data-v-e1611375],.mw-field-hint:not(.mw-field-hint--dismissed):focus-within .mw-field-hint__tip[data-v-e1611375]{display:block}}
28
+ @layer mw.reset;@layer mw.components{.mw-field-hint[data-v-14f7f1b2]{vertical-align:middle;margin-inline-start:var(--space-3xs);display:inline-block;position:relative}.mw-field-hint__btn[data-v-14f7f1b2]{inline-size:calc(var(--space-sm) + var(--space-3xs));block-size:calc(var(--space-sm) + var(--space-3xs));font-size:var(--font-size-sm);font-weight:var(--font-weight-bold);border:1px solid var(--muted);color:var(--muted);cursor:help;background:0 0;border-radius:50%;justify-content:center;align-items:center;padding:0;font-family:inherit;line-height:1;display:inline-flex}.mw-field-hint__btn[data-v-14f7f1b2]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.mw-field-hint__tip[data-v-14f7f1b2]{inset:auto;inline-size:max-content;max-inline-size:min(var(--mw-content-narrow), calc(100vw - 2 * var(--space-xs)));box-sizing:border-box;padding:var(--space-2xs) var(--space-xs);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-2);color:var(--text);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--leading-normal);letter-spacing:normal;text-transform:none;text-align:start;white-space:normal;overflow-wrap:anywhere;margin:0;position:absolute;inset-block-start:var(--mw-hint-y,0);inset-inline-start:var(--mw-hint-x,0);overflow:visible}}
29
29
  @layer mw.reset;@layer mw.components{.mw-file[data-v-ef589318]{inline-size:100%;min-inline-size:0;max-inline-size:100%;color:var(--text);font:inherit}.mw-file[data-v-ef589318]::file-selector-button{padding:var(--space-2xs) var(--space-xs);border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text);font:inherit;cursor:pointer;margin-inline-end:var(--space-xs)}.mw-file[data-v-ef589318]:disabled{filter:grayscale(.6);cursor:not-allowed}}
30
30
  @layer mw.reset;@layer mw.components{.mw-form-field[data-v-1385d389]{min-inline-size:0;max-inline-size:100%;margin:0}.mw-form-field__label[data-v-1385d389]{font-weight:var(--font-weight-semibold);margin:var(--space-xs) 0 var(--space-3xs);display:inline-block}.mw-form-field :is(input[data-v-1385d389-s],select[data-v-1385d389-s],textarea[data-v-1385d389-s]){display:block}.mw-form-field__hint[data-v-1385d389],.mw-form-field__error[data-v-1385d389]{margin:var(--space-3xs) 0 0;font-size:var(--font-size-sm);display:block}.mw-form-field__hint[data-v-1385d389]{color:var(--muted);font-weight:var(--font-weight-regular)}.mw-form-field__error[data-v-1385d389]{color:var(--danger)}}
31
31
  @layer mw.reset;@layer mw.components{.mw-input[data-v-d9f28e0e]{width:100%;padding:var(--space-2xs) var(--space-xs);background:var(--surface);color:var(--text);border:1px solid var(--control-border);border-radius:var(--radius);font:inherit}.mw-input[data-v-d9f28e0e]::placeholder{color:var(--muted)}.mw-input[data-v-d9f28e0e]:is(:focus-visible,:focus-within){outline:2px solid var(--focus-ring);outline-offset:1px}.mw-input[aria-invalid=true][data-v-d9f28e0e]{border-color:var(--danger)}.mw-input[data-v-d9f28e0e]:disabled{filter:grayscale(.6);cursor:not-allowed}}
@@ -1 +1 @@
1
- @layer mw.reset;@layer mw.components{.mw-header[data-v-2037e3f5]{align-items:center;gap:var(--space-2xs);min-height:var(--mw-header-height);padding:var(--space-4xs) var(--space-sm);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);transition:background var(--transition-base), backdrop-filter var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);flex-wrap:wrap;display:flex}.mw-header--sticky[data-v-2037e3f5]{z-index:var(--z-header);position:sticky;top:0}.mw-header--scrolled[data-v-2037e3f5]{background:color-mix(in srgb, var(--bg) 82%, transparent);-webkit-backdrop-filter:blur(var(--space-2xs));backdrop-filter:blur(var(--space-2xs));border-bottom-color:var(--border);box-shadow:var(--shadow-1)}.mw-header__brand[data-v-2037e3f5]{align-items:center;gap:var(--space-2xs);font-weight:var(--font-weight-brand);letter-spacing:var(--tracking-wide);overflow-wrap:anywhere;min-inline-size:0;margin-inline-end:auto;text-decoration:none;display:flex}.mw-header a[data-v-2037e3f5-s]{color:inherit}.mw-header__menu[data-v-2037e3f5]{padding:var(--space-3xs);border:1px solid var(--_border);border-radius:var(--radius-sm);color:inherit;cursor:pointer;background:0 0;justify-content:center;align-items:center;display:none}.mw-header__menu[data-v-2037e3f5]:hover{background:color-mix(in srgb, currentColor 12%, transparent)}@media (width<45em){.mw-header__menu[data-v-2037e3f5]{display:inline-flex}}.mw-header[data-v-2037e3f5]:not(.mw-header--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
1
+ @layer mw.reset;@layer mw.components{.mw-header[data-v-a57cc4b5]{align-items:center;gap:var(--space-2xs);min-height:var(--mw-header-height);padding:var(--space-4xs) var(--space-sm);background:var(--_bg);color:var(--_text);border-bottom:1px solid var(--_border);font-family:var(--mw-font-sans);transition:background var(--transition-base), backdrop-filter var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);flex-wrap:wrap;display:flex}.mw-header--sticky[data-v-a57cc4b5]{z-index:var(--z-header);position:sticky;top:0}.mw-header--sticky.mw-header--transparent[data-v-a57cc4b5]{background:color-mix(in srgb, var(--bg) 82%, transparent);-webkit-backdrop-filter:blur(var(--space-2xs));backdrop-filter:blur(var(--space-2xs));border-bottom-color:var(--border);box-shadow:var(--shadow-1)}.mw-header__brand[data-v-a57cc4b5]{align-items:center;gap:var(--space-2xs);font-weight:var(--font-weight-brand);letter-spacing:var(--tracking-wide);overflow-wrap:anywhere;min-inline-size:0;margin-inline-end:auto;text-decoration:none;display:flex}.mw-header a[data-v-a57cc4b5-s]{color:inherit}.mw-header__menu[data-v-a57cc4b5]{padding:var(--space-3xs);border:1px solid var(--_border);border-radius:var(--radius-sm);color:inherit;cursor:pointer;background:0 0;justify-content:center;align-items:center;display:none}.mw-header__menu[data-v-a57cc4b5]:hover{background:color-mix(in srgb, currentColor 12%, transparent)}@media (width<45em){.mw-header__menu[data-v-a57cc4b5]{display:inline-flex}}.mw-header[data-v-a57cc4b5]:not(.mw-header--transparent){--ok:var(--_ok);--danger:var(--_danger);--info:var(--_info)}}
@@ -2,6 +2,6 @@ import e from "./AppHeader.vue_vue_type_script_setup_true_lang.js";
2
2
  import "./AppHeader.css";
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
4
  //#region src/components/AppHeader.vue
5
- var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-2037e3f5"]]);
5
+ var n = /*#__PURE__*/ t(e, [["__scopeId", "data-v-a57cc4b5"]]);
6
6
  //#endregion
7
7
  export { n as default };
@@ -4,14 +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
- /** Stick to the top of the viewport (full-width shells). */
8
- sticky?: boolean;
9
7
  /**
10
- * Solidify a transparent header on scroll: while at the top the header stays
11
- * see-through (e.g. over a hero); once the page scrolls it fades in a frosted
12
- * background so the brand/nav stay legible. No-op unless the header scrolls.
8
+ * Stick to the top of the viewport (full-width shells). A sticky `transparent` header is painted frosted from the first pixel,
9
+ * so it looks the same at every scroll position (it used to turn solid after 8 px of scroll, which read as a jolt).
13
10
  */
14
- solidifyOnScroll?: boolean;
11
+ sticky?: boolean;
15
12
  /**
16
13
  * The `id` of an AppSidebar. When set, a menu button appears on narrow screens (below 45em) that opens the sidebar as a drawer;
17
14
  * on wide screens the sidebar is always visible and the button is hidden.
@@ -33,7 +30,6 @@ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
33
30
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
34
31
  variant: PanelVariant;
35
32
  sticky: boolean;
36
- solidifyOnScroll: boolean;
37
33
  menuLabel: string;
38
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
35
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,11 +1,11 @@
1
1
  import { usePanelOverrides as e } from "../internal/panel.js";
2
2
  import { useStickyOffset as t } from "../composables/useStickyOffset.js";
3
- import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, onBeforeUnmount as s, onMounted as c, openBlock as l, ref as u, renderSlot as d } from "vue";
3
+ import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, ref as c, renderSlot as l } from "vue";
4
4
  //#region src/components/AppHeader.vue?vue&type=script&setup=true&lang.ts
5
- var f = ["popovertarget", "aria-label"], p = {
5
+ var u = ["popovertarget", "aria-label"], d = {
6
6
  key: 1,
7
7
  class: "mw-header__brand"
8
- }, m = /*@__PURE__*/ a({
8
+ }, f = /*@__PURE__*/ a({
9
9
  __name: "AppHeader",
10
10
  props: {
11
11
  variant: { default: "dark" },
@@ -14,36 +14,21 @@ var f = ["popovertarget", "aria-label"], p = {
14
14
  type: Boolean,
15
15
  default: !0
16
16
  },
17
- solidifyOnScroll: {
18
- type: Boolean,
19
- default: !1
20
- },
21
17
  sidebarId: {},
22
18
  menuLabel: { default: "Menu" }
23
19
  },
24
20
  setup(a) {
25
- let m = a, h = u(null);
26
- e(h, () => m.colors), m.sticky && t(h, "--mw-header-offset");
27
- let g = u(!1), _ = null;
28
- return c(() => {
29
- m.solidifyOnScroll && typeof window < "u" && (_ = () => {
30
- g.value = window.scrollY > 8;
31
- }, _(), window.addEventListener("scroll", _, { passive: !0 }));
32
- }), s(() => {
33
- _ && window.removeEventListener("scroll", _);
34
- }), (e, t) => (l(), r("header", {
21
+ let f = a, p = c(null);
22
+ return e(p, () => f.colors), f.sticky && t(p, "--mw-header-offset"), (e, t) => (s(), r("header", {
35
23
  ref_key: "root",
36
- ref: h,
24
+ ref: p,
37
25
  class: o(["mw-header", [
38
26
  `mw-panel--${a.variant}`,
39
27
  `mw-header--${a.variant}`,
40
- {
41
- "mw-header--sticky": a.sticky,
42
- "mw-header--scrolled": a.solidifyOnScroll && g.value
43
- }
28
+ { "mw-header--sticky": a.sticky }
44
29
  ]])
45
30
  }, [
46
- a.sidebarId ? (l(), r("button", {
31
+ a.sidebarId ? (s(), r("button", {
47
32
  key: 0,
48
33
  type: "button",
49
34
  class: "mw-header__menu",
@@ -58,12 +43,12 @@ var f = ["popovertarget", "aria-label"], p = {
58
43
  "stroke-width": "2",
59
44
  "stroke-linecap": "round",
60
45
  "aria-hidden": "true"
61
- }, [i("path", { d: "M4 6h16M4 12h16M4 18h16" })], -1)]], 8, f)) : n("", !0),
62
- e.$slots.brand ? (l(), r("span", p, [d(e.$slots, "brand")])) : n("", !0),
63
- d(e.$slots, "default"),
64
- d(e.$slots, "actions")
46
+ }, [i("path", { d: "M4 6h16M4 12h16M4 18h16" })], -1)]], 8, u)) : n("", !0),
47
+ e.$slots.brand ? (s(), r("span", d, [l(e.$slots, "brand")])) : n("", !0),
48
+ l(e.$slots, "default"),
49
+ l(e.$slots, "actions")
65
50
  ], 2));
66
51
  }
67
52
  });
68
53
  //#endregion
69
- export { m as default };
54
+ export { f as default };
@@ -9,6 +9,8 @@ type __VLS_Props = {
9
9
  devUrl?: string | false;
10
10
  /** Whether the shell adds the (visually hidden) page heading. Default true; false when the page brings its own `h1`. */
11
11
  pageHeading?: boolean;
12
+ /** Limit the page to the tool width (default). False for a full-width console. */
13
+ contained?: boolean;
12
14
  /** The colour mode a first visit gets; a saved choice always wins. */
13
15
  defaultMode?: 'light' | 'dark' | 'system';
14
16
  };
@@ -19,12 +21,15 @@ declare const __VLS_template: () => {
19
21
  actions?: (props: {}) => any;
20
22
  } & {
21
23
  default?: (props: {}) => any;
24
+ } & {
25
+ 'footer-note'?: (props: {}) => any;
22
26
  };
23
27
  };
24
28
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
25
29
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
26
30
  docsUrl: string | false;
27
31
  devUrl: string | false;
32
+ contained: boolean;
28
33
  pageHeading: boolean;
29
34
  defaultMode: "light" | "dark" | "system";
30
35
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -27,11 +27,15 @@ var y = {
27
27
  type: Boolean,
28
28
  default: !0
29
29
  },
30
+ contained: {
31
+ type: Boolean,
32
+ default: !0
33
+ },
30
34
  defaultMode: { default: "dark" }
31
35
  },
32
36
  setup(p) {
33
37
  let b = p, { mode: x, set: S } = o(b.defaultMode), C = s(() => b.docsUrl === !1 ? void 0 : b.docsUrl || `https://docs.meddleware.co.uk/blockchain/sui/${b.slug}/`), w = s(() => b.devUrl === !1 ? void 0 : b.devUrl || `https://meddleware.dev/sui/${b.slug}/`);
34
- return (o, s) => (m(), c(a, { contained: "" }, {
38
+ return (o, s) => (m(), c(a, { contained: p.contained }, {
35
39
  header: v(() => [f(e, { variant: "dark" }, {
36
40
  brand: v(() => [h(o.$slots, "brand", {}, () => [f(n), d(" " + g(p.title), 1)])]),
37
41
  actions: v(() => [h(o.$slots, "actions"), f(r, {
@@ -49,11 +53,12 @@ var y = {
49
53
  "organisation-name": "Meddleware",
50
54
  "rights-statement": "jam"
51
55
  })]),
52
- _: 1
56
+ default: v(() => [h(o.$slots, "footer-note")]),
57
+ _: 3
53
58
  }, 8, ["docs-url", "dev-url"])]),
54
59
  default: v(() => [p.pageHeading ? (m(), u("h1", y, g(p.title), 1)) : l("", !0), h(o.$slots, "default")]),
55
60
  _: 3
56
- }));
61
+ }, 8, ["contained"]));
57
62
  }
58
63
  });
59
64
  //#endregion
@@ -22,7 +22,7 @@ declare const __VLS_template: () => {
22
22
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
23
23
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
24
24
  variant: "danger" | "link" | "primary" | "secondary" | "ghost";
25
- type: "reset" | "submit" | "button";
25
+ type: "button" | "submit" | "reset";
26
26
  disabled: boolean;
27
27
  size: "md" | "sm";
28
28
  busy: boolean;
@@ -1 +1 @@
1
- @layer mw.reset;@layer mw.components{.mw-field-hint[data-v-e1611375]{vertical-align:middle;margin-inline-start:var(--space-3xs);display:inline-block;position:relative}.mw-field-hint__btn[data-v-e1611375]{inline-size:calc(var(--space-sm) + var(--space-3xs));block-size:calc(var(--space-sm) + var(--space-3xs));font-size:var(--font-size-sm);font-weight:var(--font-weight-bold);border:1px solid var(--muted);color:var(--muted);cursor:help;background:0 0;border-radius:50%;justify-content:center;align-items:center;padding:0;font-family:inherit;line-height:1;display:inline-flex}.mw-field-hint__btn[data-v-e1611375]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.mw-field-hint__tip[data-v-e1611375]{top:calc(100% + var(--space-3xs));z-index:var(--z-popover);min-width:calc(var(--mw-content-narrow) / 2);max-width:min(var(--mw-content-narrow), 90vw);padding:var(--space-2xs) var(--space-xs);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--leading-normal);color:var(--text);box-shadow:var(--shadow-2);display:none;position:absolute;left:0}.mw-field-hint:not(.mw-field-hint--dismissed):hover .mw-field-hint__tip[data-v-e1611375],.mw-field-hint:not(.mw-field-hint--dismissed):focus-within .mw-field-hint__tip[data-v-e1611375]{display:block}}
1
+ @layer mw.reset;@layer mw.components{.mw-field-hint[data-v-14f7f1b2]{vertical-align:middle;margin-inline-start:var(--space-3xs);display:inline-block;position:relative}.mw-field-hint__btn[data-v-14f7f1b2]{inline-size:calc(var(--space-sm) + var(--space-3xs));block-size:calc(var(--space-sm) + var(--space-3xs));font-size:var(--font-size-sm);font-weight:var(--font-weight-bold);border:1px solid var(--muted);color:var(--muted);cursor:help;background:0 0;border-radius:50%;justify-content:center;align-items:center;padding:0;font-family:inherit;line-height:1;display:inline-flex}.mw-field-hint__btn[data-v-14f7f1b2]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}.mw-field-hint__tip[data-v-14f7f1b2]{inset:auto;inline-size:max-content;max-inline-size:min(var(--mw-content-narrow), calc(100vw - 2 * var(--space-xs)));box-sizing:border-box;padding:var(--space-2xs) var(--space-xs);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-2);color:var(--text);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--leading-normal);letter-spacing:normal;text-transform:none;text-align:start;white-space:normal;overflow-wrap:anywhere;margin:0;position:absolute;inset-block-start:var(--mw-hint-y,0);inset-inline-start:var(--mw-hint-x,0);overflow:visible}}
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
2
2
  import t from "./UiFieldHint.vue_vue_type_script_setup_true_lang.js";
3
3
  import "./UiFieldHint.css";
4
4
  //#region src/components/UiFieldHint.vue
5
- var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-e1611375"]]);
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-14f7f1b2"]]);
6
6
  //#endregion
7
7
  export { n as default };
@@ -1,49 +1,101 @@
1
- import { createElementBlock as e, createElementVNode as t, defineComponent as n, normalizeClass as r, onBeforeUnmount as i, onMounted as a, openBlock as o, ref as s, renderSlot as c } from "vue";
1
+ import { placeTip as e } from "../internal/placeTip.js";
2
+ import { createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, onBeforeUnmount as a, onMounted as o, openBlock as s, ref as c, renderSlot as l } from "vue";
2
3
  //#region src/components/UiFieldHint.vue?vue&type=script&setup=true&lang.ts
3
- var l = ["aria-describedby"], u = ["id"], d = /*@__PURE__*/ n({
4
+ var u = ["aria-describedby"], d = ["id"], f = 150, p = 6, m = 8, h = /*@__PURE__*/ r({
4
5
  __name: "UiFieldHint",
5
6
  props: { fieldId: {} },
6
- setup(n) {
7
- let d = s(null), f = s(!1), p = !1, m = !1;
8
- function h(e) {
9
- e.key === "Escape" && (f.value = !0);
7
+ setup(r) {
8
+ let h = c(null), g = c(null), _ = c(!1), v = c(!1), y = !1, b = !1, x = !1, S = !1, C, w = 0, T = null;
9
+ function E() {
10
+ return !v.value && (y || b || x);
10
11
  }
11
- function g() {
12
- p || m || (document.removeEventListener("keydown", h), f.value = !1);
12
+ function D() {
13
+ let t = g.value, n = h.value?.querySelector("button");
14
+ if (!t || !n || !_.value) return;
15
+ let r = n.getBoundingClientRect(), i = t.getBoundingClientRect(), a = document.documentElement, o = e({
16
+ left: r.left,
17
+ top: r.top,
18
+ width: r.width,
19
+ height: r.height
20
+ }, {
21
+ width: i.width,
22
+ height: i.height
23
+ }, {
24
+ width: a.clientWidth,
25
+ height: a.clientHeight
26
+ }, {
27
+ x: window.scrollX,
28
+ y: window.scrollY
29
+ }, p, m);
30
+ t.style.setProperty("--mw-hint-x", `${o.left}px`), t.style.setProperty("--mw-hint-y", `${o.top}px`);
13
31
  }
14
- function _() {
15
- p = !0, document.addEventListener("keydown", h);
32
+ function O() {
33
+ w ||= requestAnimationFrame(() => {
34
+ w = 0, D();
35
+ });
16
36
  }
17
- function v() {
18
- p = !1, g();
37
+ function k(e) {
38
+ e !== S && (S = e, e ? document.addEventListener("keydown", A) : document.removeEventListener("keydown", A));
19
39
  }
20
- function y() {
21
- m = !0, document.addEventListener("keydown", h);
40
+ function A(e) {
41
+ e.key === "Escape" && (v.value = !0, x = !1, M());
22
42
  }
23
- function b() {
24
- m = !1, g();
43
+ function j(e) {
44
+ h.value && e.target instanceof Node && h.value.contains(e.target) || (x = !1, M());
25
45
  }
26
- return a(() => {
27
- let e = d.value;
28
- e?.addEventListener("mouseenter", _), e?.addEventListener("mouseleave", v), e?.addEventListener("focusin", y), e?.addEventListener("focusout", b);
29
- }), i(() => {
30
- let e = d.value;
31
- e?.removeEventListener("mouseenter", _), e?.removeEventListener("mouseleave", v), e?.removeEventListener("focusin", y), e?.removeEventListener("focusout", b), document.removeEventListener("keydown", h);
32
- }), (i, a) => (o(), e("span", {
46
+ function M() {
47
+ let e = g.value, t = E();
48
+ t && !_.value ? (_.value = !0, e?.showPopover?.(), document.addEventListener("pointerdown", j), window.addEventListener("resize", O), document.addEventListener("scroll", O, {
49
+ capture: !0,
50
+ passive: !0
51
+ }), D(), e && typeof ResizeObserver < "u" && (T = new ResizeObserver(O), T.observe(e))) : !t && _.value && (_.value = !1, e?.hidePopover?.(), N()), !y && !b && !x && (v.value = !1, k(!1));
52
+ }
53
+ function N() {
54
+ T?.disconnect(), T = null, document.removeEventListener("pointerdown", j), window.removeEventListener("resize", O), document.removeEventListener("scroll", O, { capture: !0 }), w && cancelAnimationFrame(w), w = 0;
55
+ }
56
+ function P() {
57
+ clearTimeout(C), y = !0, k(!0), M();
58
+ }
59
+ function F() {
60
+ clearTimeout(C), C = setTimeout(() => {
61
+ y = !1, M();
62
+ }, f);
63
+ }
64
+ function I() {
65
+ b = !0, k(!0), M();
66
+ }
67
+ function L() {
68
+ b = !1, M();
69
+ }
70
+ function R(e) {
71
+ e.target instanceof Element && e.target.closest(".mw-field-hint__btn") && (x ? (x = !1, v.value = !0) : (v.value = !1, x = !0, k(!0)), M());
72
+ }
73
+ return o(() => {
74
+ let e = h.value;
75
+ e?.addEventListener("mouseenter", P), e?.addEventListener("mouseleave", F), e?.addEventListener("focusin", I), e?.addEventListener("focusout", L), e?.addEventListener("click", R);
76
+ }), a(() => {
77
+ let e = h.value;
78
+ e?.removeEventListener("mouseenter", P), e?.removeEventListener("mouseleave", F), e?.removeEventListener("focusin", I), e?.removeEventListener("focusout", L), e?.removeEventListener("click", R), clearTimeout(C), k(!1), _.value && g.value?.hidePopover?.(), N();
79
+ }), (e, a) => (s(), t("span", {
33
80
  ref_key: "root",
34
- ref: d,
35
- class: r(["mw-field-hint", { "mw-field-hint--dismissed": f.value }])
36
- }, [t("button", {
81
+ ref: h,
82
+ class: i(["mw-field-hint", {
83
+ "mw-field-hint--dismissed": v.value,
84
+ "mw-field-hint--open": _.value
85
+ }])
86
+ }, [n("button", {
37
87
  type: "button",
38
88
  class: "mw-field-hint__btn",
39
- "aria-describedby": `${n.fieldId}-hint`,
89
+ "aria-describedby": `${r.fieldId}-hint`,
40
90
  "aria-label": "Help"
41
- }, "?", 8, l), t("span", {
42
- id: `${n.fieldId}-hint`,
43
- role: "tooltip",
91
+ }, "?", 8, u), n("small", {
92
+ id: `${r.fieldId}-hint`,
93
+ ref_key: "tip",
94
+ ref: g,
95
+ popover: "manual",
44
96
  class: "mw-field-hint__tip"
45
- }, [c(i.$slots, "default", {}, void 0, !0)], 8, u)], 2));
97
+ }, [l(e.$slots, "default", {}, void 0, !0)], 8, d)], 2));
46
98
  }
47
99
  });
48
100
  //#endregion
49
- export { d as default };
101
+ export { h as default };
@@ -9,7 +9,7 @@ declare const __VLS_template: () => {
9
9
  };
10
10
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
11
11
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
- align: "left" | "right";
12
+ align: "right" | "left";
13
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
15
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,43 @@
1
+ /** A rectangle in viewport coordinates (what `getBoundingClientRect()` returns, reduced to what is needed here). */
2
+ export interface Box {
3
+ left: number;
4
+ top: number;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ /** Which side of the anchor the tip is on. */
9
+ export type Side = 'bottom' | 'top' | 'right' | 'left';
10
+ export interface Placement {
11
+ /** The tip's left edge in DOCUMENT coordinates (the page's own, so the tip scrolls with the page). */
12
+ left: number;
13
+ /** The tip's top edge in document coordinates. */
14
+ top: number;
15
+ side: Side;
16
+ /** False when no side keeps the whole tip inside the viewport: the default side is used and the page grows to hold it. */
17
+ fits: boolean;
18
+ }
19
+ /** The order the sides are tried in: below the anchor is the default, then above, then beside it. */
20
+ export declare const SIDE_ORDER: readonly Side[];
21
+ /**
22
+ * Chooses the side and position of a tip. Each side is tried in {@link SIDE_ORDER}; on each, the tip is first slid along the side to
23
+ * stay on screen, and the side is taken when the whole tip then fits inside the viewport (less `margin` on every edge). If no side fits,
24
+ * the default side (below) is used, and because the result is in document coordinates the tip extends the page's own scroll area, so
25
+ * the person can scroll to read all of it. Nothing outside the table or panel that holds the anchor is affected.
26
+ *
27
+ * @param anchor The anchor's rectangle in viewport coordinates.
28
+ * @param tip The tip's measured size.
29
+ * @param viewport The visible area (`innerWidth`, `innerHeight`; the root element's client size where scrollbars take room).
30
+ * @param scroll The page's scroll offsets (`scrollX`, `scrollY`), added to turn viewport coordinates into document coordinates.
31
+ * @param gap The space between the anchor and the tip.
32
+ * @param margin The space kept clear at the viewport's edges.
33
+ */
34
+ export declare function placeTip(anchor: Box, tip: {
35
+ width: number;
36
+ height: number;
37
+ }, viewport: {
38
+ width: number;
39
+ height: number;
40
+ }, scroll: {
41
+ x: number;
42
+ y: number;
43
+ }, gap: number, margin: number): Placement;
@@ -0,0 +1,49 @@
1
+ //#region src/internal/placeTip.ts
2
+ var e = [
3
+ "bottom",
4
+ "top",
5
+ "right",
6
+ "left"
7
+ ];
8
+ function t(e, t, n, r) {
9
+ return Math.max(n, Math.min(e, r - t));
10
+ }
11
+ function n(e, n, r, i, a, o) {
12
+ let s = t(n.left, r.width, o, i.width - o), c = t(n.top, r.height, o, i.height - o);
13
+ switch (e) {
14
+ case "bottom": return {
15
+ left: s,
16
+ top: n.top + n.height + a
17
+ };
18
+ case "top": return {
19
+ left: s,
20
+ top: n.top - a - r.height
21
+ };
22
+ case "right": return {
23
+ left: n.left + n.width + a,
24
+ top: c
25
+ };
26
+ case "left": return {
27
+ left: n.left - a - r.width,
28
+ top: c
29
+ };
30
+ }
31
+ }
32
+ function r(t, r, i, a, o, s) {
33
+ let c = (e) => e.left >= s && e.top >= s && e.left + r.width <= i.width - s && e.top + r.height <= i.height - s, l = null, u = n("bottom", t, r, i, o, s);
34
+ for (let a of e) {
35
+ let e = n(a, t, r, i, o, s);
36
+ if (c(e)) {
37
+ l = a, u = e;
38
+ break;
39
+ }
40
+ }
41
+ return {
42
+ left: Math.round(u.left + a.x),
43
+ top: Math.round(u.top + a.y),
44
+ side: l ?? "bottom",
45
+ fits: l !== null
46
+ };
47
+ }
48
+ //#endregion
49
+ export { e as SIDE_ORDER, r as placeTip };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meddleware/ui",
3
- "version": "0.1.42",
3
+ "version": "0.1.44",
4
4
  "description": "Shared Vue 3 component library for @meddleware UIs — layout shell (header/sidebar/footer), colour-mode control, and primitives. Built on @meddleware/design-tokens.",
5
5
  "homepage": "https://docs.meddleware.co.uk/",
6
6
  "license": "0BSD",
@@ -54,7 +54,7 @@
54
54
  "devDependencies": {
55
55
  "@axe-core/playwright": "^4.13.0",
56
56
  "@meddleware/eslint-config": "^0.0.4",
57
- "@meddleware/frontend-config": "^0.0.2",
57
+ "@meddleware/frontend-config": "^0.0.14",
58
58
  "@playwright/test": "~1.64.1",
59
59
  "@resvg/resvg-js": "^2.6.2",
60
60
  "@vitejs/plugin-vue": "^6.0.9",
@@ -70,8 +70,8 @@
70
70
  "jsdom": "^30.1.2",
71
71
  "postcss": "^8.4.49",
72
72
  "postcss-html": "^2.0.0",
73
- "stylelint": "^17.15.0",
74
- "stylelint-config-standard": "^40.0.0",
73
+ "stylelint": "^18.0.0",
74
+ "stylelint-config-standard": "^41.0.0",
75
75
  "typescript": "^6.0.0",
76
76
  "vite": "^8.3.0",
77
77
  "vitest": "~5.1.0",
@@ -85,5 +85,11 @@
85
85
  ],
86
86
  "publishConfig": {
87
87
  "access": "public"
88
+ },
89
+ "overrides": {
90
+ "js-beautify": {
91
+ "editorconfig": "^4.0.1",
92
+ "glob": "^14.0.6"
93
+ }
88
94
  }
89
95
  }