@webx-ui/module-admin 0.12.2 → 0.13.0

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/style.css CHANGED
@@ -1 +1 @@
1
- .wx-row-menu[data-v-cab01f7f]{--wx-action-bg: transparent}.wx-screen-head[data-v-e27d184e]{--wx-head-line: calc(var(--wx-font-size-2xl) * var(--wx-font-line-height-tight));display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"back name actions" ". subtitle .";align-items:start;row-gap:var(--wx-space-4);flex:none;min-width:0}.wx-screen-head[data-level="3"][data-v-e27d184e]{--wx-head-line: calc(var(--wx-font-size-xl) * var(--wx-font-line-height-tight))}.wx-screen-head.has-trail[data-v-e27d184e]{grid-template-areas:"trail trail trail" "back name actions" ". subtitle ."}.wx-screen-head.has-divider[data-v-e27d184e]{padding-block-end:var(--wx-space-12);border-block-end:1px solid var(--wx-border-default)}.wx-screen-head__trail[data-v-e27d184e]{grid-area:trail;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;overflow-anchor:none;scrollbar-width:none;-ms-overflow-style:none}.wx-screen-head__trail[data-v-e27d184e]::-webkit-scrollbar{display:none}.wx-screen-head__trail[data-v-e27d184e]>*{flex-wrap:nowrap;white-space:nowrap}.wx-screen-head__trail[data-v-e27d184e] .wx-breadcrumb__list{flex-wrap:nowrap}.wx-screen-head__trail[data-v-e27d184e] .wx-breadcrumb-item{flex:none}.wx-screen-head__trail[data-v-e27d184e] .wx-breadcrumb-item__link{overflow:visible}.wx-screen-head[data-v-e27d184e]>.wx-screen-head__back{grid-area:back;margin-inline-end:var(--wx-space-8);margin-block-start:calc((var(--wx-head-line) - 30px) / 2)}.wx-screen-head__name[data-v-e27d184e]{grid-area:name;display:flex;align-items:center;gap:var(--wx-space-8);flex-wrap:wrap;min-width:0}.wx-screen-head__title[data-v-e27d184e]{min-width:0}.wx-screen-head__subtitle[data-v-e27d184e]{grid-area:subtitle;min-width:0}.wx-screen-head__actions[data-v-e27d184e]{grid-area:actions;display:flex;align-items:center;justify-content:flex-end;gap:var(--wx-space-8);flex-wrap:wrap;min-width:0;margin-inline-start:var(--wx-space-12);margin-block-start:calc((var(--wx-head-line) - var(--wx-size-control-md)) / 2)}.wx-screen-head__actions[data-v-e27d184e] .wx-action{--wx-action-size: var(--wx-size-control-md)}.wx-admin--drawer .wx-screen-head__actions[data-v-e27d184e]{--wx-size-control-md: 36px}.wx-screen-head.is-narrow.has-button[data-v-e27d184e]{grid-template-areas:"back name name" ". subtitle subtitle" "actions actions actions"}.wx-screen-head.is-narrow.has-button.has-trail[data-v-e27d184e]{grid-template-areas:"trail trail trail" "back name name" ". subtitle subtitle" "actions actions actions"}.wx-screen-head.is-narrow.has-button .wx-screen-head__actions[data-v-e27d184e]{margin-inline-start:0;margin-block-start:var(--wx-space-8)}.wx-screen-head.is-narrow .wx-screen-head__actions[data-v-e27d184e]>.wx-screen-head__button{flex:1 1 auto}.wx-list-screen[data-v-8c7e5ad1]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));min-width:0;container-type:inline-size}.wx-list-screen.is-fill[data-v-8c7e5ad1]{min-height:0}.wx-list-screen.is-fill[data-v-8c7e5ad1]>:last-child{flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs,.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__layout,.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__panels{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__panel,.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__panel>*{flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__bar{flex:0 0 auto}.wx-admin[data-v-309fdb9d]{--wx-admin-header-height: 52px;min-height:100dvh;background:var(--wx-bg-body)}.wx-admin--drawer[data-v-309fdb9d]{--wx-gap: var(--wx-space-8)}.wx-admin--rail[data-v-309fdb9d]{--wx-gap: var(--wx-space-12)}.wx-admin--sidebar[data-v-309fdb9d]{--wx-gap: var(--wx-space-16)}.wx-admin__frame[data-v-309fdb9d]{padding:var(--wx-gap);gap:var(--wx-gap)}.wx-admin__header[data-v-309fdb9d]{--wx-header-top: var(--wx-gap)}.wx-admin__aside[data-v-309fdb9d]{--wx-aside-top: var(--wx-gap);--wx-aside-height: calc(100dvh - var(--wx-gap) * 2)}.wx-admin__brand[data-v-309fdb9d]{display:flex;align-items:center;gap:var(--wx-space-8);box-sizing:border-box;min-height:48px;padding:var(--wx-space-8);border-bottom:1px solid var(--wx-border-muted)}.wx-aside--collapsed .wx-admin__brand[data-v-309fdb9d]{justify-content:center;padding-inline:var(--wx-space-4)}.wx-admin__brand--stacked[data-v-309fdb9d]{flex-direction:column;gap:var(--wx-space-4)}.wx-admin__title[data-v-309fdb9d]{flex:1 1 auto;min-width:0}.wx-admin__brand>.wx-admin__logo[data-v-309fdb9d]{margin-inline-end:auto}.wx-admin__logo[data-v-309fdb9d]{flex:0 1 auto;min-width:0;height:28px;width:auto;max-width:100%;object-fit:contain;object-position:left center}.wx-admin__mark[data-v-309fdb9d]{height:24px;width:24px;object-fit:contain}.wx-admin__user[data-v-309fdb9d]{display:flex;align-items:center;padding:var(--wx-space-8);border-top:1px solid var(--wx-border-muted)}.wx-aside--collapsed .wx-admin__user[data-v-309fdb9d]{justify-content:center}.wx-admin__user--drawer[data-v-309fdb9d]{flex:1 1 auto;justify-content:flex-start;padding:0;border-top:none}.wx-admin__screen[data-v-309fdb9d]{--wx-fill-height: calc(100dvh - var(--wx-gap) * 2);--wx-action-bar-bottom: var(--wx-gap);min-width:0;min-height:0}.wx-admin--drawer .wx-admin__screen[data-v-309fdb9d]{--wx-fill-height: calc(100dvh - var(--wx-gap) * 3 - var(--wx-admin-header-height))}.wx-admin-plain[data-v-309fdb9d]{display:grid;place-items:center;box-sizing:border-box;min-height:100dvh;padding:var(--wx-space-16);background:var(--wx-bg-body)}:root[data-wx-shell],:root[data-wx-shell]>body,html:has(>body>#webx-app),body:has(>#webx-app){margin:0}.wx-admin--drawer .wx-action--md{--wx-action-size: 30px}.wx-admin--drawer .wx-action--lg{--wx-action-size: 36px}.wx-admin__drawer .wx-drawer__content>.wx-menu{padding-inline:0}:root[data-wx-shell=drawer]{--wx-gap: var(--wx-space-8)}:root[data-wx-shell=rail]{--wx-gap: var(--wx-space-12)}:root[data-wx-shell=sidebar]{--wx-gap: var(--wx-space-16)}.wx-save-state[data-v-216e5e44]{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--wx-size-control-sm);height:var(--wx-size-control-sm)}.wx-save-state__mark[data-v-216e5e44]{font-size:var(--wx-font-size-lg);color:var(--wx-text-muted)}.wx-save-state__mark.is-saved[data-v-216e5e44]{color:var(--wx-color-success)}.wx-rename[data-v-d879e8d3]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-rename__footer[data-v-d879e8d3]{display:flex;justify-content:flex-end}.wx-help[data-v-6c280d42]{color:var(--wx-text-default);font-size:var(--wx-font-size-md);line-height:var(--wx-font-line-height-normal)}.wx-help[data-v-6c280d42] h2,.wx-help[data-v-6c280d42] h3,.wx-help[data-v-6c280d42] h4{margin-block:var(--wx-space-18) var(--wx-space-8);font-weight:var(--wx-font-weight-semibold)}.wx-help[data-v-6c280d42] h2{font-size:var(--wx-font-size-lg)}.wx-help[data-v-6c280d42] h3,.wx-help[data-v-6c280d42] h4{font-size:var(--wx-font-size-md)}.wx-help[data-v-6c280d42] :is(h2,h3,h4):first-child{margin-block-start:0}.wx-help[data-v-6c280d42] p,.wx-help[data-v-6c280d42] ul,.wx-help[data-v-6c280d42] ol{margin-block:0 var(--wx-space-12)}.wx-help[data-v-6c280d42] ul,.wx-help[data-v-6c280d42] ol{padding-inline-start:var(--wx-space-24)}.wx-help[data-v-6c280d42] li{margin-block-end:var(--wx-space-4)}.wx-help[data-v-6c280d42] code{padding:0 var(--wx-space-4);border-radius:var(--wx-radius-xs);background:var(--wx-bg-subtle);font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-sm)}.wx-help[data-v-6c280d42] pre{margin-block:0 var(--wx-space-12);padding:var(--wx-space-12);border-radius:var(--wx-radius-sm);background:var(--wx-bg-subtle);overflow:auto}.wx-help[data-v-6c280d42] pre code{padding:0;background:none}.wx-help[data-v-6c280d42] a{color:var(--wx-color-primary)}.wx-notes[data-v-71004c1a]{display:flex;flex-direction:column;gap:var(--wx-space-12);min-width:0;container-type:inline-size}.wx-notes__list[data-v-71004c1a]{display:flex;flex-direction:column;gap:var(--wx-space-12);margin:0;padding:0;list-style:none}.wx-note[data-v-71004c1a]{display:flex;gap:var(--wx-space-8);min-width:0}.wx-note__body[data-v-71004c1a]{display:flex;flex-direction:column;gap:var(--wx-space-4);flex:1 1 auto;min-width:0}.wx-note__head[data-v-71004c1a]{display:flex;align-items:center;gap:var(--wx-space-8);min-width:0}.wx-note__head[data-v-71004c1a]>:last-child{margin-inline-start:auto}.wx-note__text[data-v-71004c1a]{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--wx-font-size-sm);color:var(--wx-text-default)}.wx-note__buttons[data-v-71004c1a]{display:flex;align-items:flex-start;gap:var(--wx-space-8)}.wx-notes__new[data-v-71004c1a]{display:flex;flex-direction:column;align-items:stretch;gap:var(--wx-space-8)}.wx-notes__new[data-v-71004c1a]>:first-child{min-width:0}.wx-notes__new[data-v-71004c1a]>:last-child{align-self:flex-start}@container (max-width: 440px){.wx-note__buttons[data-v-71004c1a]{flex-direction:column;align-items:stretch}.wx-notes__new[data-v-71004c1a]>:last-child{align-self:stretch}}
1
+ .wx-row-menu[data-v-cab01f7f]{--wx-action-bg: transparent}.wx-screen-head[data-v-e27d184e]{--wx-head-line: calc(var(--wx-font-size-2xl) * var(--wx-font-line-height-tight));display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"back name actions" ". subtitle .";align-items:start;row-gap:var(--wx-space-4);flex:none;min-width:0}.wx-screen-head[data-level="3"][data-v-e27d184e]{--wx-head-line: calc(var(--wx-font-size-xl) * var(--wx-font-line-height-tight))}.wx-screen-head.has-trail[data-v-e27d184e]{grid-template-areas:"trail trail trail" "back name actions" ". subtitle ."}.wx-screen-head.has-divider[data-v-e27d184e]{padding-block-end:var(--wx-space-12);border-block-end:1px solid var(--wx-border-default)}.wx-screen-head__trail[data-v-e27d184e]{grid-area:trail;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;overflow-anchor:none;scrollbar-width:none;-ms-overflow-style:none}.wx-screen-head__trail[data-v-e27d184e]::-webkit-scrollbar{display:none}.wx-screen-head__trail[data-v-e27d184e]>*{flex-wrap:nowrap;white-space:nowrap}.wx-screen-head__trail[data-v-e27d184e] .wx-breadcrumb__list{flex-wrap:nowrap}.wx-screen-head__trail[data-v-e27d184e] .wx-breadcrumb-item{flex:none}.wx-screen-head__trail[data-v-e27d184e] .wx-breadcrumb-item__link{overflow:visible}.wx-screen-head[data-v-e27d184e]>.wx-screen-head__back{grid-area:back;margin-inline-end:var(--wx-space-8);margin-block-start:calc((var(--wx-head-line) - 30px) / 2)}.wx-screen-head__name[data-v-e27d184e]{grid-area:name;display:flex;align-items:center;gap:var(--wx-space-8);flex-wrap:wrap;min-width:0}.wx-screen-head__title[data-v-e27d184e]{min-width:0}.wx-screen-head__subtitle[data-v-e27d184e]{grid-area:subtitle;min-width:0}.wx-screen-head__actions[data-v-e27d184e]{grid-area:actions;display:flex;align-items:center;justify-content:flex-end;gap:var(--wx-space-8);flex-wrap:wrap;min-width:0;margin-inline-start:var(--wx-space-12);margin-block-start:calc((var(--wx-head-line) - var(--wx-size-control-md)) / 2)}.wx-screen-head__actions[data-v-e27d184e] .wx-action{--wx-action-size: var(--wx-size-control-md)}.wx-admin--drawer .wx-screen-head__actions[data-v-e27d184e]{--wx-size-control-md: 36px}.wx-screen-head.is-narrow.has-button[data-v-e27d184e]{grid-template-areas:"back name name" ". subtitle subtitle" "actions actions actions"}.wx-screen-head.is-narrow.has-button.has-trail[data-v-e27d184e]{grid-template-areas:"trail trail trail" "back name name" ". subtitle subtitle" "actions actions actions"}.wx-screen-head.is-narrow.has-button .wx-screen-head__actions[data-v-e27d184e]{margin-inline-start:0;margin-block-start:var(--wx-space-8)}.wx-screen-head.is-narrow .wx-screen-head__actions[data-v-e27d184e]>.wx-screen-head__button{flex:1 1 auto}.wx-list-screen[data-v-8c7e5ad1]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));min-width:0;container-type:inline-size}.wx-list-screen.is-fill[data-v-8c7e5ad1]{min-height:0}.wx-list-screen.is-fill[data-v-8c7e5ad1]>:last-child{flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs,.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__layout,.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__panels{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__panel,.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__panel>*{flex:1 1 auto;min-height:0}.wx-list-screen.is-fill[data-v-8c7e5ad1] .wx-tabs__bar{flex:0 0 auto}.wx-admin[data-v-309fdb9d]{--wx-admin-header-height: 52px;min-height:100dvh;background:var(--wx-bg-body)}.wx-admin--drawer[data-v-309fdb9d]{--wx-gap: var(--wx-space-8)}.wx-admin--rail[data-v-309fdb9d]{--wx-gap: var(--wx-space-12)}.wx-admin--sidebar[data-v-309fdb9d]{--wx-gap: var(--wx-space-16)}.wx-admin__frame[data-v-309fdb9d]{padding:var(--wx-gap);gap:var(--wx-gap)}.wx-admin__header[data-v-309fdb9d]{--wx-header-top: var(--wx-gap)}.wx-admin__aside[data-v-309fdb9d]{--wx-aside-top: var(--wx-gap);--wx-aside-height: calc(100dvh - var(--wx-gap) * 2)}.wx-admin__brand[data-v-309fdb9d]{display:flex;align-items:center;gap:var(--wx-space-8);box-sizing:border-box;min-height:48px;padding:var(--wx-space-8);border-bottom:1px solid var(--wx-border-muted)}.wx-aside--collapsed .wx-admin__brand[data-v-309fdb9d]{justify-content:center;padding-inline:var(--wx-space-4)}.wx-admin__brand--stacked[data-v-309fdb9d]{flex-direction:column;gap:var(--wx-space-4)}.wx-admin__title[data-v-309fdb9d]{flex:1 1 auto;min-width:0}.wx-admin__brand>.wx-admin__logo[data-v-309fdb9d]{margin-inline-end:auto}.wx-admin__logo[data-v-309fdb9d]{flex:0 1 auto;min-width:0;height:28px;width:auto;max-width:100%;object-fit:contain;object-position:left center}.wx-admin__mark[data-v-309fdb9d]{height:24px;width:24px;object-fit:contain}.wx-admin__user[data-v-309fdb9d]{display:flex;align-items:center;padding:var(--wx-space-8);border-top:1px solid var(--wx-border-muted)}.wx-aside--collapsed .wx-admin__user[data-v-309fdb9d]{justify-content:center}.wx-admin__user--drawer[data-v-309fdb9d]{flex:1 1 auto;justify-content:flex-start;padding:0;border-top:none}.wx-admin__screen[data-v-309fdb9d]{--wx-fill-height: calc(100dvh - var(--wx-gap) * 2);--wx-action-bar-bottom: var(--wx-gap);min-width:0;min-height:0}.wx-admin--drawer .wx-admin__screen[data-v-309fdb9d]{--wx-fill-height: calc(100dvh - var(--wx-gap) * 3 - var(--wx-admin-header-height))}.wx-admin-plain[data-v-309fdb9d]{display:grid;place-items:center;box-sizing:border-box;min-height:100dvh;padding:var(--wx-space-16);background:var(--wx-bg-body)}:root[data-wx-shell],:root[data-wx-shell]>body,html:has(>body>#webx-app),body:has(>#webx-app){margin:0}.wx-admin--drawer .wx-action--md{--wx-action-size: 30px}.wx-admin--drawer .wx-action--lg{--wx-action-size: 36px}.wx-admin__drawer .wx-drawer__content>.wx-menu{padding-inline:0}:root[data-wx-shell=drawer]{--wx-gap: var(--wx-space-8)}:root[data-wx-shell=rail]{--wx-gap: var(--wx-space-12)}:root[data-wx-shell=sidebar]{--wx-gap: var(--wx-space-16)}.wx-save-state[data-v-216e5e44]{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--wx-size-control-sm);height:var(--wx-size-control-sm)}.wx-save-state__mark[data-v-216e5e44]{font-size:var(--wx-font-size-lg);color:var(--wx-text-muted)}.wx-save-state__mark.is-saved[data-v-216e5e44]{color:var(--wx-color-success)}.wx-rename[data-v-d879e8d3]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-rename__footer[data-v-d879e8d3]{display:flex;justify-content:flex-end}.wx-help[data-v-6c280d42]{color:var(--wx-text-default);font-size:var(--wx-font-size-md);line-height:var(--wx-font-line-height-normal)}.wx-help[data-v-6c280d42] h2,.wx-help[data-v-6c280d42] h3,.wx-help[data-v-6c280d42] h4{margin-block:var(--wx-space-18) var(--wx-space-8);font-weight:var(--wx-font-weight-semibold)}.wx-help[data-v-6c280d42] h2{font-size:var(--wx-font-size-lg)}.wx-help[data-v-6c280d42] h3,.wx-help[data-v-6c280d42] h4{font-size:var(--wx-font-size-md)}.wx-help[data-v-6c280d42] :is(h2,h3,h4):first-child{margin-block-start:0}.wx-help[data-v-6c280d42] p,.wx-help[data-v-6c280d42] ul,.wx-help[data-v-6c280d42] ol{margin-block:0 var(--wx-space-12)}.wx-help[data-v-6c280d42] ul,.wx-help[data-v-6c280d42] ol{padding-inline-start:var(--wx-space-24)}.wx-help[data-v-6c280d42] li{margin-block-end:var(--wx-space-4)}.wx-help[data-v-6c280d42] code{padding:0 var(--wx-space-4);border-radius:var(--wx-radius-xs);background:var(--wx-bg-subtle);font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-sm)}.wx-help[data-v-6c280d42] pre{margin-block:0 var(--wx-space-12);padding:var(--wx-space-12);border-radius:var(--wx-radius-sm);background:var(--wx-bg-subtle);overflow:auto}.wx-help[data-v-6c280d42] pre code{padding:0;background:none}.wx-help[data-v-6c280d42] a{color:var(--wx-color-primary)}.wx-notes[data-v-71004c1a]{display:flex;flex-direction:column;gap:var(--wx-space-12);min-width:0;container-type:inline-size}.wx-notes__list[data-v-71004c1a]{display:flex;flex-direction:column;gap:var(--wx-space-12);margin:0;padding:0;list-style:none}.wx-note[data-v-71004c1a]{display:flex;gap:var(--wx-space-8);min-width:0}.wx-note__body[data-v-71004c1a]{display:flex;flex-direction:column;gap:var(--wx-space-4);flex:1 1 auto;min-width:0}.wx-note__head[data-v-71004c1a]{display:flex;align-items:center;gap:var(--wx-space-8);min-width:0}.wx-note__head[data-v-71004c1a]>:last-child{margin-inline-start:auto}.wx-note__text[data-v-71004c1a]{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--wx-font-size-sm);color:var(--wx-text-default)}.wx-note__buttons[data-v-71004c1a]{display:flex;align-items:flex-start;gap:var(--wx-space-8)}.wx-notes__new[data-v-71004c1a]{display:flex;flex-direction:column;align-items:stretch;gap:var(--wx-space-8)}.wx-notes__new[data-v-71004c1a]>:first-child{min-width:0}.wx-notes__new[data-v-71004c1a]>:last-child{align-self:flex-start}@container (max-width: 440px){.wx-note__buttons[data-v-71004c1a]{flex-direction:column;align-items:stretch}.wx-notes__new[data-v-71004c1a]>:last-child{align-self:stretch}}.wx-backup-note[data-v-beeee67e]{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--wx-space-4) var(--wx-space-6);margin:0}
@@ -0,0 +1,39 @@
1
+ import { App, InjectionKey } from 'vue';
2
+ import { Theme, ThemePreference } from '@webx-ui/tokens';
3
+ export type { Theme, ThemePreference };
4
+ export interface ThemeState {
5
+ /** What was chosen: one of the two themes, or an instruction to follow the machine. */
6
+ preference: ThemePreference;
7
+ /** What that works out to at this moment — what is actually on the screen. */
8
+ resolved: Theme;
9
+ }
10
+ export interface ThemeController {
11
+ readonly state: ThemeState;
12
+ /**
13
+ * Choose, paint and remember in this browser.
14
+ *
15
+ * Writing the choice down against the person is somebody else's job: this package knows
16
+ * nothing about accounts, and a panel with no sign-in still deserves a theme.
17
+ */
18
+ set(preference: ThemePreference): void;
19
+ /**
20
+ * Take up what the administrator's record says, without writing anything back to it.
21
+ *
22
+ * `null` is an answer — "follow the machine" is what somebody chose, and it has to travel
23
+ * between their machines like any other choice. `undefined` is not: it is a server that
24
+ * has never heard of themes, and the browser's own choice should survive it.
25
+ */
26
+ adopt(preference: ThemePreference | null | undefined): void;
27
+ }
28
+ export declare const themeKey: InjectionKey<ThemeController>;
29
+ export declare function useTheme(): ThemeController;
30
+ export declare function provideTheme(app: App, theme: ThemeController): void;
31
+ export interface CreateThemeOptions {
32
+ /**
33
+ * Where the choice is kept in this browser, or `null` to keep it nowhere. It is read before
34
+ * the panel paints anything, so the sign-in screen is already the right colour — the copy
35
+ * that follows somebody between machines is the one on their account.
36
+ */
37
+ storageKey?: string | null;
38
+ }
39
+ export declare function createTheme(options?: CreateThemeOptions): ThemeController;
package/dist/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { RouteRecordRaw } from 'vue-router';
2
2
  import { ButtonVariant, IconName } from '@webx-ui/core';
3
3
  import { TypeRegistry } from '@webx-ui/schema';
4
+ import { ThemePreference } from '@webx-ui/tokens';
4
5
  import { LocaleDescriptor } from './i18n';
5
6
  /**
6
7
  * What `GET /api/cms/manifest` answers with — the panel's own description of itself, and the
@@ -26,6 +27,22 @@ export interface Manifest {
26
27
  modules: ManifestModule[];
27
28
  /** Names of the screens the server can hand out — the trees themselves travel on request. */
28
29
  screens?: string[];
30
+ /**
31
+ * When the database was last dumped. Absent or `null` on a site that has switched the
32
+ * nightly backup off, and present with `at: null` on one that has it on and has never
33
+ * produced a file — which is the case the panel most needs to say out loud.
34
+ */
35
+ backup?: ManifestBackup | null;
36
+ }
37
+ /**
38
+ * The nightly dump, as the server sees it: the newest file in the backup directory and how
39
+ * big it is. There is no record of it anywhere else on purpose — a task that failed is the
40
+ * file that is not there.
41
+ */
42
+ export interface ManifestBackup {
43
+ /** ISO-8601, UTC. `null` when the directory is empty. */
44
+ at: string | null;
45
+ bytes: number | null;
29
46
  }
30
47
  /**
31
48
  * Two pictures rather than one and a cropping rule: a wordmark cut to a square is its first
@@ -71,6 +88,12 @@ export interface AdminUser {
71
88
  permissions: string[];
72
89
  /** The panel language they chose, or null if they never have. */
73
90
  locale?: string | null;
91
+ /**
92
+ * The theme they chose, or null for the machine's — which is a choice too, and one that
93
+ * has to travel with them. A server that has never heard of themes sends nothing at all,
94
+ * and then this browser's own choice stands.
95
+ */
96
+ theme?: ThemePreference | null;
74
97
  /** The key their photograph is stored under — not an address; the panel resolves it. */
75
98
  avatar?: string | null;
76
99
  [key: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webx-ui/module-admin",
3
- "version": "0.12.2",
3
+ "version": "0.13.0",
4
4
  "description": "The frame a WebX UI admin panel runs in: bootstrap, the shell, the HTTP client and the module registry that pairs with webx-ui/module-admin on the server.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,9 +44,9 @@
44
44
  "vue-router": "^4.5.0"
45
45
  },
46
46
  "dependencies": {
47
- "@webx-ui/core": "^0.29.0",
48
- "@webx-ui/schema": "^0.3.6",
49
- "@webx-ui/tokens": "^0.3.0"
47
+ "@webx-ui/core": "^0.30.0",
48
+ "@webx-ui/schema": "^0.3.7",
49
+ "@webx-ui/tokens": "^0.4.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^24.10.1",