@wow-two-beta/fe 0.0.41 → 0.0.43
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 +21 -3
- package/dist/auth/BffSession.d.ts +5 -0
- package/dist/auth/BffSession.js +2 -0
- package/dist/auth/BffSession.js.map +1 -1
- package/dist/foundation/net/hooks/UseRunningVersion.d.ts +30 -0
- package/dist/foundation/net/hooks/UseRunningVersion.js +19 -0
- package/dist/foundation/net/hooks/UseRunningVersion.js.map +1 -0
- package/dist/foundation/net/index.d.ts +1 -0
- package/dist/foundation/net/index.js +2 -0
- package/dist/foundation/net/index.js.map +1 -1
- package/dist/foundation/storage/StorageBroker.d.ts +6 -0
- package/dist/foundation/storage/StorageBroker.js +41 -36
- package/dist/foundation/storage/StorageBroker.js.map +1 -1
- package/dist/foundation/storage/index.d.ts +1 -1
- package/dist/foundation/storage/index.js +2 -1
- package/dist/foundation/themes/constants/Authored.js +21 -0
- package/dist/foundation/themes/constants/Authored.js.map +1 -1
- package/dist/index.css +16 -0
- package/dist/index.js +812 -806
- package/dist/index.js.map +1 -1
- package/dist/presentation/display/index.d.ts +1 -0
- package/dist/presentation/display/index.js +6 -4
- package/dist/presentation/display/index.js.map +1 -1
- package/dist/presentation/display/versionBadge/VersionBadge.vue.d.ts +27 -0
- package/dist/presentation/display/versionBadge/VersionBadge.vue.js +80 -0
- package/dist/presentation/display/versionBadge/VersionBadge.vue.js.map +1 -0
- package/dist/presentation/display/versionBadge/VersionBadge2.vue.js +5 -0
- package/dist/presentation/display/versionBadge/VersionBadge2.vue.js.map +1 -0
- package/dist/presentation/display/versionBadge/VersionBadgeExtensions.d.ts +9 -0
- package/dist/presentation/display/versionBadge/VersionBadgeExtensions.js +21 -0
- package/dist/presentation/display/versionBadge/VersionBadgeExtensions.js.map +1 -0
- package/dist/presentation/display/versionBadge/index.d.ts +1 -0
- package/dist/presentation/forms/imageEditor/ImageEditor.vue.d.ts +1 -1
- package/dist/presentation/layout/appFrame/AppFrame.vue.d.ts +168 -0
- package/dist/presentation/layout/appFrame/AppFrame.vue.js +408 -0
- package/dist/presentation/layout/appFrame/AppFrame.vue.js.map +1 -0
- package/dist/presentation/layout/appFrame/AppFrame2.vue.js +8 -0
- package/dist/presentation/layout/appFrame/AppFrame2.vue.js.map +1 -0
- package/dist/presentation/layout/appFrame/index.d.ts +1 -0
- package/dist/presentation/layout/index.d.ts +1 -0
- package/dist/presentation/layout/index.js +90 -86
- package/dist/presentation/layout/index.js.map +1 -1
- package/dist/presentation/nav/accountMenu/AccountMenu.vue.d.ts +7 -4
- package/dist/presentation/nav/accountMenu/AccountMenu.vue.js +20 -5
- package/dist/presentation/nav/accountMenu/AccountMenu.vue.js.map +1 -1
- package/dist/presentation/nav/appSwitcherMenu/AppSwitcherMenu.vue.d.ts +2 -0
- package/dist/presentation/nav/appSwitcherMenu/AppSwitcherMenu.vue.js +15 -8
- package/dist/presentation/nav/appSwitcherMenu/AppSwitcherMenu.vue.js.map +1 -1
- package/dist/presentation/nav/breadcrumb/Breadcrumb.vue.d.ts +8 -1
- package/dist/presentation/nav/breadcrumb/Breadcrumb.vue.js +38 -19
- package/dist/presentation/nav/breadcrumb/Breadcrumb.vue.js.map +1 -1
- package/dist/themes.css +14 -0
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -121,8 +121,9 @@ import { default as default121 } from "./treeViewer/TreeViewerGroup.vue.js";
|
|
|
121
121
|
import { default as default122 } from "./treeViewer/TreeViewerItem.vue.js";
|
|
122
122
|
import { default as default123 } from "./truncatedText/TruncatedText.vue.js";
|
|
123
123
|
import { default as default124 } from "./typewriterText/TypewriterText.vue.js";
|
|
124
|
-
import { default as default125 } from "./
|
|
125
|
-
import { default as default126
|
|
124
|
+
import { default as default125 } from "./versionBadge/VersionBadge.vue.js";
|
|
125
|
+
import { default as default126 } from "./moduleGlyphs/VerticalBarsGlyph.vue.js";
|
|
126
|
+
import { default as default127, VideoTrackKind } from "./videoPlayer/VideoPlayer.vue.js";
|
|
126
127
|
import { AccordionGroupType, useAccordionContext, useAccordionItemContext } from "./accordionGroup/AccordionGroupContext.js";
|
|
127
128
|
import { AvatarBackground, AvatarRing, AvatarShape, AvatarTone, avatarVariants } from "./avatar/Avatar.variants.js";
|
|
128
129
|
import { BadgeBorderStyle, BadgeVariant, badgeVariants } from "./badge/Badge.variants.js";
|
|
@@ -325,8 +326,9 @@ export {
|
|
|
325
326
|
default122 as TreeViewerItem,
|
|
326
327
|
default123 as TruncatedText,
|
|
327
328
|
default124 as TypewriterText,
|
|
328
|
-
default125 as
|
|
329
|
-
default126 as
|
|
329
|
+
default125 as VersionBadge,
|
|
330
|
+
default126 as VerticalBarsGlyph,
|
|
331
|
+
default127 as VideoPlayer,
|
|
330
332
|
VideoTrackKind,
|
|
331
333
|
avatarVariants,
|
|
332
334
|
badgeVariants,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Defines props for the badge that names an app's version beside its logo. */
|
|
2
|
+
export interface VersionBadgeProps {
|
|
3
|
+
/** The version this tab loaded — `0.15.4`, `0.15.4+abc1234` or `dev`. Build metadata after `+` is not shown. */
|
|
4
|
+
readonly version: string;
|
|
5
|
+
/**
|
|
6
|
+
* The version the host serves now, from `useRunningVersion`. While it differs from `version` the badge names it
|
|
7
|
+
* and becomes a button that asks for a reload; `null` or omitted, the badge shows `version`.
|
|
8
|
+
*/
|
|
9
|
+
readonly runningVersion?: string | null;
|
|
10
|
+
/** The badge's tooltip; `{version}` becomes the shown version. Default `"Version {version}"`. */
|
|
11
|
+
readonly label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The stale badge's tooltip and accessible name; `{version}` is the loaded version and `{running}` the served one.
|
|
14
|
+
* Default `"Version {running} is live; this tab runs {version}. Reload to update."`.
|
|
15
|
+
*/
|
|
16
|
+
readonly updateLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import('vue').DefineComponent<VersionBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
|
+
reload: () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<VersionBadgeProps> & Readonly<{
|
|
21
|
+
onReload?: (() => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
readonly label: string;
|
|
24
|
+
readonly runningVersion: string | null;
|
|
25
|
+
readonly updateLabel: string;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { defineComponent, useAttrs, computed, openBlock, createElementBlock, mergeProps, createVNode, unref, createElementVNode, toDisplayString } from "vue";
|
|
2
|
+
import { RefreshCw } from "lucide-vue-next";
|
|
3
|
+
import { useLocale } from "../../../foundation/i18n/providers/LocaleContext.js";
|
|
4
|
+
import { cn } from "../../../foundation/styles/Cn.js";
|
|
5
|
+
import { VersionBadgeExtensions } from "./VersionBadgeExtensions.js";
|
|
6
|
+
import _sfc_main$1 from "../../../foundation/icons/icon/Icon.vue.js";
|
|
7
|
+
const _hoisted_1 = ["title", "aria-label"];
|
|
8
|
+
const _hoisted_2 = ["title"];
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
...{ name: "VersionBadge", inheritAttrs: false },
|
|
11
|
+
__name: "VersionBadge",
|
|
12
|
+
props: {
|
|
13
|
+
version: {},
|
|
14
|
+
runningVersion: { default: void 0 },
|
|
15
|
+
label: { default: void 0 },
|
|
16
|
+
updateLabel: { default: void 0 }
|
|
17
|
+
},
|
|
18
|
+
emits: ["reload"],
|
|
19
|
+
setup(__props, { emit: __emit }) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const emit = __emit;
|
|
22
|
+
const attrs = useAttrs();
|
|
23
|
+
const locale = useLocale();
|
|
24
|
+
const isStale = computed(() => VersionBadgeExtensions.isStale(props.version, props.runningVersion));
|
|
25
|
+
const loaded = computed(() => VersionBadgeExtensions.display(props.version));
|
|
26
|
+
const shown = computed(
|
|
27
|
+
() => isStale.value ? VersionBadgeExtensions.display(props.runningVersion ?? props.version) : loaded.value
|
|
28
|
+
);
|
|
29
|
+
const name = computed(() => {
|
|
30
|
+
if (isStale.value) {
|
|
31
|
+
const variables = { version: loaded.value, running: shown.value };
|
|
32
|
+
return props.updateLabel === void 0 ? locale.t(
|
|
33
|
+
"VersionBadge.updateLabel",
|
|
34
|
+
variables,
|
|
35
|
+
"Version {running} is live; this tab runs {version}. Reload to update."
|
|
36
|
+
) : props.updateLabel.replaceAll("{version}", variables.version).replaceAll("{running}", variables.running);
|
|
37
|
+
}
|
|
38
|
+
return props.label === void 0 ? locale.t("VersionBadge.label", { version: shown.value }, "Version {version}") : props.label.replaceAll("{version}", shown.value);
|
|
39
|
+
});
|
|
40
|
+
const classes = computed(
|
|
41
|
+
() => cn(
|
|
42
|
+
"inline-flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[11px] font-medium leading-4",
|
|
43
|
+
isStale.value ? "bg-warning-soft text-warning-soft-foreground transition-colors hover:bg-warning/20 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none" : "bg-muted text-muted-foreground",
|
|
44
|
+
attrs.class
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
const rest = computed(() => {
|
|
48
|
+
const { class: _class, ...others } = attrs;
|
|
49
|
+
return others;
|
|
50
|
+
});
|
|
51
|
+
return (_ctx, _cache) => {
|
|
52
|
+
return isStale.value ? (openBlock(), createElementBlock("button", mergeProps({
|
|
53
|
+
key: 0,
|
|
54
|
+
type: "button",
|
|
55
|
+
"data-version-badge": "",
|
|
56
|
+
"data-stale": "",
|
|
57
|
+
title: name.value,
|
|
58
|
+
"aria-label": name.value
|
|
59
|
+
}, rest.value, {
|
|
60
|
+
class: classes.value,
|
|
61
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("reload"))
|
|
62
|
+
}), [
|
|
63
|
+
createVNode(unref(_sfc_main$1), {
|
|
64
|
+
icon: unref(RefreshCw),
|
|
65
|
+
size: 11,
|
|
66
|
+
"aria-hidden": "true"
|
|
67
|
+
}, null, 8, ["icon"]),
|
|
68
|
+
createElementVNode("span", null, toDisplayString(shown.value), 1)
|
|
69
|
+
], 16, _hoisted_1)) : (openBlock(), createElementBlock("span", mergeProps({
|
|
70
|
+
key: 1,
|
|
71
|
+
"data-version-badge": "",
|
|
72
|
+
title: name.value
|
|
73
|
+
}, rest.value, { class: classes.value }), toDisplayString(shown.value), 17, _hoisted_2));
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
export {
|
|
78
|
+
_sfc_main as default
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=VersionBadge.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionBadge.vue.js","sources":["../../../../src/presentation/display/versionBadge/VersionBadge.vue"],"sourcesContent":["<script lang=\"ts\">\n/** Defines props for the badge that names an app's version beside its logo. */\nexport interface VersionBadgeProps {\n /** The version this tab loaded — `0.15.4`, `0.15.4+abc1234` or `dev`. Build metadata after `+` is not shown. */\n readonly version: string;\n\n /**\n * The version the host serves now, from `useRunningVersion`. While it differs from `version` the badge names it\n * and becomes a button that asks for a reload; `null` or omitted, the badge shows `version`.\n */\n readonly runningVersion?: string | null;\n\n /** The badge's tooltip; `{version}` becomes the shown version. Default `\"Version {version}\"`. */\n readonly label?: string;\n\n /**\n * The stale badge's tooltip and accessible name; `{version}` is the loaded version and `{running}` the served one.\n * Default `\"Version {running} is live; this tab runs {version}. Reload to update.\"`.\n */\n readonly updateLabel?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { RefreshCw } from 'lucide-vue-next';\nimport { Icon } from '../../../foundation/icons';\nimport { useLocale } from '../../../foundation/i18n';\nimport { cn } from '../../../foundation/styles';\nimport { VersionBadgeExtensions } from './VersionBadgeExtensions';\n\n/**\n * Renders the app version beside a logo. It follows the running version: once the host serves a newer release than\n * the tab loaded, the badge names that release and offers the reload that brings the tab up to it.\n */\ndefineOptions({ name: 'VersionBadge', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<VersionBadgeProps>(), {\n runningVersion: undefined,\n label: undefined,\n updateLabel: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader asks for the newer release — the caller reloads the page. */\n reload: [];\n}>();\n\nconst attrs = useAttrs();\nconst locale = useLocale();\n\nconst isStale = computed(() => VersionBadgeExtensions.isStale(props.version, props.runningVersion));\nconst loaded = computed(() => VersionBadgeExtensions.display(props.version));\nconst shown = computed(() =>\n isStale.value ? VersionBadgeExtensions.display(props.runningVersion ?? props.version) : loaded.value,\n);\n\nconst name = computed(() => {\n if (isStale.value) {\n const variables = { version: loaded.value, running: shown.value };\n return props.updateLabel === undefined\n ? locale.t(\n 'VersionBadge.updateLabel',\n variables,\n 'Version {running} is live; this tab runs {version}. Reload to update.',\n )\n : props.updateLabel.replaceAll('{version}', variables.version).replaceAll('{running}', variables.running);\n }\n return props.label === undefined\n ? locale.t('VersionBadge.label', { version: shown.value }, 'Version {version}')\n : props.label.replaceAll('{version}', shown.value);\n});\n\nconst classes = computed(() =>\n cn(\n 'inline-flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[11px] font-medium leading-4',\n isStale.value\n ? 'bg-warning-soft text-warning-soft-foreground transition-colors hover:bg-warning/20 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none'\n : 'bg-muted text-muted-foreground',\n attrs.class as ClassValue,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n</script>\n\n<template>\n <button\n v-if=\"isStale\"\n type=\"button\"\n data-version-badge\n data-stale\n :title=\"name\"\n :aria-label=\"name\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"emit('reload')\"\n >\n <Icon :icon=\"RefreshCw\" :size=\"11\" aria-hidden=\"true\" />\n <span>{{ shown }}</span>\n </button>\n <span v-else data-version-badge :title=\"name\" v-bind=\"rest\" :class=\"classes\">{{ shown }}</span>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_createVNode","_unref","Icon","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;AAsCA,UAAM,QAAQ;AAMd,UAAM,OAAO;AAKb,UAAM,QAAQ,SAAA;AACd,UAAM,SAAS,UAAA;AAEf,UAAM,UAAU,SAAS,MAAM,uBAAuB,QAAQ,MAAM,SAAS,MAAM,cAAc,CAAC;AAClG,UAAM,SAAS,SAAS,MAAM,uBAAuB,QAAQ,MAAM,OAAO,CAAC;AAC3E,UAAM,QAAQ;AAAA,MAAS,MACrB,QAAQ,QAAQ,uBAAuB,QAAQ,MAAM,kBAAkB,MAAM,OAAO,IAAI,OAAO;AAAA,IAAA;AAGjG,UAAM,OAAO,SAAS,MAAM;AAC1B,UAAI,QAAQ,OAAO;AACjB,cAAM,YAAY,EAAE,SAAS,OAAO,OAAO,SAAS,MAAM,MAAA;AAC1D,eAAO,MAAM,gBAAgB,SACzB,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,QAAA,IAEF,MAAM,YAAY,WAAW,aAAa,UAAU,OAAO,EAAE,WAAW,aAAa,UAAU,OAAO;AAAA,MAC5G;AACA,aAAO,MAAM,UAAU,SACnB,OAAO,EAAE,sBAAsB,EAAE,SAAS,MAAM,SAAS,mBAAmB,IAC5E,MAAM,MAAM,WAAW,aAAa,MAAM,KAAK;AAAA,IACrD,CAAC;AAED,UAAM,UAAU;AAAA,MAAS,MACvB;AAAA,QACE;AAAA,QACA,QAAQ,QACJ,+LACA;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IACR;AAIF,UAAM,OAAO,SAAS,MAAM;AAC1B,YAAM,EAAE,OAAO,QAAQ,GAAG,WAAW;AACrC,aAAO;AAAA,IACT,CAAC;;aAKS,QAAA,SADRA,UAAA,GAAAC,mBAaS,UAbTC,WAaS;AAAA;QAXP,MAAK;AAAA,QACL,sBAAA;AAAA,QACA,cAAA;AAAA,QACC,OAAO,KAAA;AAAA,QACP,cAAY,KAAA;AAAA,MAAA,GACL,KAAA,OAAI;AAAA,QACX,OAAO,QAAA;AAAA,QACP,+CAAO,KAAI,QAAA;AAAA,MAAA;QAEZC,YAAwDC,MAAAC,WAAA,GAAA;AAAA,UAAjD,MAAMD,MAAA,SAAA;AAAA,UAAY,MAAM;AAAA,UAAI,eAAY;AAAA,QAAA;QAC/CE,mBAAwB,8BAAf,MAAA,KAAK,GAAA,CAAA;AAAA,MAAA,uBAEhBN,aAAAC,mBAA+F,QAA/FC,WAA+F;AAAA;QAAlF,sBAAA;AAAA,QAAoB,OAAO,KAAA;AAAA,MAAA,GAAc,KAAA,OAAI,EAAG,OAAO,QAAA,MAAA,oBAAY,MAAA,KAAK,GAAA,IAAA,UAAA;AAAA;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionBadge2.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Reads and compares the version strings a `VersionBadge` shows. */
|
|
2
|
+
export declare const VersionBadgeExtensions: {
|
|
3
|
+
/** The release part of a version — `0.15.4+abc1234` gives `0.15.4`; build metadata never reaches the badge. */
|
|
4
|
+
readonly release: (version: string) => string;
|
|
5
|
+
/** The badge text — a numbered release shows as `v0.15.4`; a named build (`dev`) shows as it is. */
|
|
6
|
+
readonly display: (version: string) => string;
|
|
7
|
+
/** Whether the host serves another release than the one this tab loaded. Without a running version, never. */
|
|
8
|
+
readonly isStale: (version: string, runningVersion: string | null | undefined) => boolean;
|
|
9
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const VersionBadgeExtensions = {
|
|
2
|
+
/** The release part of a version — `0.15.4+abc1234` gives `0.15.4`; build metadata never reaches the badge. */
|
|
3
|
+
release(version) {
|
|
4
|
+
return version.trim().split("+")[0] ?? "";
|
|
5
|
+
},
|
|
6
|
+
/** The badge text — a numbered release shows as `v0.15.4`; a named build (`dev`) shows as it is. */
|
|
7
|
+
display(version) {
|
|
8
|
+
const release = VersionBadgeExtensions.release(version).replace(/^v(?=\d)/u, "");
|
|
9
|
+
return /^\d/u.test(release) ? `v${release}` : release;
|
|
10
|
+
},
|
|
11
|
+
/** Whether the host serves another release than the one this tab loaded. Without a running version, never. */
|
|
12
|
+
isStale(version, runningVersion) {
|
|
13
|
+
if (runningVersion === null || runningVersion === void 0) return false;
|
|
14
|
+
const running = VersionBadgeExtensions.display(runningVersion);
|
|
15
|
+
return running !== "" && running !== VersionBadgeExtensions.display(version);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
VersionBadgeExtensions
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=VersionBadgeExtensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionBadgeExtensions.js","sources":["../../../../src/presentation/display/versionBadge/VersionBadgeExtensions.ts"],"sourcesContent":["/** Reads and compares the version strings a `VersionBadge` shows. */\nexport const VersionBadgeExtensions = {\n /** The release part of a version — `0.15.4+abc1234` gives `0.15.4`; build metadata never reaches the badge. */\n release(version: string): string {\n return version.trim().split('+')[0] ?? '';\n },\n\n /** The badge text — a numbered release shows as `v0.15.4`; a named build (`dev`) shows as it is. */\n display(version: string): string {\n const release = VersionBadgeExtensions.release(version).replace(/^v(?=\\d)/u, '');\n return /^\\d/u.test(release) ? `v${release}` : release;\n },\n\n /** Whether the host serves another release than the one this tab loaded. Without a running version, never. */\n isStale(version: string, runningVersion: string | null | undefined): boolean {\n if (runningVersion === null || runningVersion === undefined) return false;\n const running = VersionBadgeExtensions.display(runningVersion);\n return running !== '' && running !== VersionBadgeExtensions.display(version);\n },\n} as const;\n"],"names":[],"mappings":"AACO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,QAAQ,SAAyB;AAC/B,WAAO,QAAQ,OAAO,MAAM,GAAG,EAAE,CAAC,KAAK;AAAA,EACzC;AAAA;AAAA,EAGA,QAAQ,SAAyB;AAC/B,UAAM,UAAU,uBAAuB,QAAQ,OAAO,EAAE,QAAQ,aAAa,EAAE;AAC/E,WAAO,OAAO,KAAK,OAAO,IAAI,IAAI,OAAO,KAAK;AAAA,EAChD;AAAA;AAAA,EAGA,QAAQ,SAAiB,gBAAoD;AAC3E,QAAI,mBAAmB,QAAQ,mBAAmB,OAAW,QAAO;AACpE,UAAM,UAAU,uBAAuB,QAAQ,cAAc;AAC7D,WAAO,YAAY,MAAM,YAAY,uBAAuB,QAAQ,OAAO;AAAA,EAC7E;AACF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as VersionBadge, type VersionBadgeProps } from './VersionBadge.vue';
|
|
@@ -31,10 +31,10 @@ declare const _default: import('vue').DefineComponent<ImageEditorProps, {}, {},
|
|
|
31
31
|
readonly isReadOnly: boolean;
|
|
32
32
|
readonly defaultValue: ImageEditRecipe;
|
|
33
33
|
readonly modelValue: ImageEditRecipe;
|
|
34
|
+
readonly isBusy: boolean;
|
|
34
35
|
readonly maxDimension: number;
|
|
35
36
|
readonly maxPixels: number;
|
|
36
37
|
readonly previewSrc: string;
|
|
37
38
|
readonly canRemoveBackground: boolean;
|
|
38
|
-
readonly isBusy: boolean;
|
|
39
39
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
export default _default;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { AccountMenuProps } from '../../nav/accountMenu/AccountMenu.vue';
|
|
2
|
+
import { AppSwitcherItem, AppSwitcherMenuProps } from '../../nav/appSwitcherMenu/AppSwitcherMenu.vue';
|
|
3
|
+
import { BreadcrumbItem } from '../../nav/breadcrumb/Breadcrumb.vue';
|
|
4
|
+
/** Defines how wide an `AppFrame` lets its page run. */
|
|
5
|
+
export declare const AppFrameContentWidth: {
|
|
6
|
+
/** Refers to the shared page column: the frame's gutter, capped at `--frame-content-max` and centred. */
|
|
7
|
+
readonly Default: "default";
|
|
8
|
+
/** Refers to a page that fills the main region edge to edge — an editor, a canvas, a map. */
|
|
9
|
+
readonly Full: "full";
|
|
10
|
+
};
|
|
11
|
+
export type AppFrameContentWidth = (typeof AppFrameContentWidth)[keyof typeof AppFrameContentWidth];
|
|
12
|
+
/** Defines the surface an `AppFrame` paints its chrome with. */
|
|
13
|
+
export declare const AppFrameVariant: {
|
|
14
|
+
/** Refers to the theme's glass: a translucent bar and sidebar over the ambient backdrop. The default. */
|
|
15
|
+
readonly Glass: "glass";
|
|
16
|
+
/** Refers to opaque chrome on the card colour — a dense data tool or a print-first product. */
|
|
17
|
+
readonly Solid: "solid";
|
|
18
|
+
};
|
|
19
|
+
export type AppFrameVariant = (typeof AppFrameVariant)[keyof typeof AppFrameVariant];
|
|
20
|
+
/**
|
|
21
|
+
* Who is signed in and what the account menu offers: every `AccountMenu` prop except the three the frame binds as
|
|
22
|
+
* models (`open`, `locale`, `organization`).
|
|
23
|
+
*/
|
|
24
|
+
export type AppFrameAccount = Omit<AccountMenuProps, 'open' | 'defaultOpen' | 'locale' | 'organization'>;
|
|
25
|
+
/** The app switcher's own strings and breakpoint, passed through to `AppSwitcherMenu`. */
|
|
26
|
+
export type AppFrameSwitcher = Pick<AppSwitcherMenuProps, 'title' | 'sitesLabel' | 'closeLabel' | 'newTabLabel' | 'triggerLabel' | 'breakpoint'>;
|
|
27
|
+
/** Defines props for the frame every app renders its places inside. */
|
|
28
|
+
export interface AppFrameProps {
|
|
29
|
+
/** The version this tab loaded, shown beside the brand — `0.15.4`, `0.15.4+abc1234` or `dev`. Omitted, no badge. */
|
|
30
|
+
readonly version?: string;
|
|
31
|
+
/** The version the host serves now, from `useRunningVersion`; when it differs the badge offers a reload. */
|
|
32
|
+
readonly runningVersion?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Fires when the reader asks for the newer release. Default reloads the page.
|
|
35
|
+
*
|
|
36
|
+
* Kept a PROP, not an emit: its presence replaces the built-in reload, and Vue strips a declared emit's listener
|
|
37
|
+
* out of `useAttrs()`, so an emit could never be detected. Bind it as `@reload`.
|
|
38
|
+
*/
|
|
39
|
+
readonly onReload?: () => unknown;
|
|
40
|
+
/** The trail to the current place, the last item the place itself. Empty or omitted, the bar shows none. */
|
|
41
|
+
readonly crumbs?: ReadonlyArray<BreadcrumbItem>;
|
|
42
|
+
/**
|
|
43
|
+
* Opens a trail link through the app's router: a plain left click on a link whose `href` starts with `/` calls
|
|
44
|
+
* this instead of loading the page. Modified clicks keep the browser's behaviour.
|
|
45
|
+
*
|
|
46
|
+
* Kept a PROP, not an emit, for the reason `onReload` is. Bind it as `@navigate`.
|
|
47
|
+
*/
|
|
48
|
+
readonly onNavigate?: (href: string, event: MouseEvent) => unknown;
|
|
49
|
+
/** The suite's apps and sites. Given, the brand becomes the app switcher; omitted, the `brand` slot stands alone. */
|
|
50
|
+
readonly apps?: ReadonlyArray<AppSwitcherItem>;
|
|
51
|
+
/** The key of this app among `apps`. */
|
|
52
|
+
readonly currentApp?: string;
|
|
53
|
+
/** The app name on the switcher. Default the current app's label. */
|
|
54
|
+
readonly appLabel?: string;
|
|
55
|
+
/** The switcher's second line — the suite or the organization. */
|
|
56
|
+
readonly appSubtitle?: string;
|
|
57
|
+
/** The switcher's own strings and breakpoint. */
|
|
58
|
+
readonly appSwitcher?: AppFrameSwitcher;
|
|
59
|
+
/** The account menu that ends the bar. Omitted, the bar ends with the `account` slot, or with nothing. */
|
|
60
|
+
readonly account?: AppFrameAccount;
|
|
61
|
+
/** The account menu's open state, controlled. The `v-model:accountOpen` binding target. */
|
|
62
|
+
readonly accountOpen?: boolean;
|
|
63
|
+
/** The current interface language. The `v-model:locale` binding target. */
|
|
64
|
+
readonly locale?: string;
|
|
65
|
+
/** The current organization's id. The `v-model:organization` binding target. */
|
|
66
|
+
readonly organization?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the frame has a sidebar. Default follows the `nav` slot; `false` drops the sidebar, the brand cell and the
|
|
69
|
+
* toggle while the slot stays declared — an app whose navigation waits for a choice.
|
|
70
|
+
*/
|
|
71
|
+
readonly hasNavigation?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Where this browser remembers the desktop sidebar's collapse. Read once, when the frame is created. Default
|
|
74
|
+
* `wow-two.app-frame.sidebar-collapsed`; an app that kept a key of its own passes it and keeps its readers' choice.
|
|
75
|
+
*/
|
|
76
|
+
readonly collapseStorageKey?: string;
|
|
77
|
+
/** Whether the desktop sidebar starts as the icon rail until the reader chooses. Default `false`. */
|
|
78
|
+
readonly isCollapsedByDefault?: boolean;
|
|
79
|
+
/** How wide the page runs. Default `default`. */
|
|
80
|
+
readonly contentWidth?: AppFrameContentWidth;
|
|
81
|
+
/** The chrome's surface. Default `glass`. */
|
|
82
|
+
readonly variant?: AppFrameVariant;
|
|
83
|
+
/** The toggle's name while the desktop sidebar is open. Default `"Collapse sidebar"`, localized. */
|
|
84
|
+
readonly collapseLabel?: string;
|
|
85
|
+
/** The toggle's name while the desktop sidebar is the rail. Default `"Expand sidebar"`, localized. */
|
|
86
|
+
readonly expandLabel?: string;
|
|
87
|
+
/** The toggle's name where it opens the navigation drawer. Default `"Open navigation"`, localized. */
|
|
88
|
+
readonly openNavigationLabel?: string;
|
|
89
|
+
/** The navigation drawer's accessible title. Default `"Navigation"`, localized. */
|
|
90
|
+
readonly navigationLabel?: string;
|
|
91
|
+
}
|
|
92
|
+
/** What the `brand` slot receives. */
|
|
93
|
+
export interface AppFrameBrandSlotProps {
|
|
94
|
+
/** True where only the mark fits: above the icon rail and in a phone's bar. */
|
|
95
|
+
readonly isRail: boolean;
|
|
96
|
+
}
|
|
97
|
+
/** What the `nav` slot receives. */
|
|
98
|
+
export interface AppFrameNavSlotProps {
|
|
99
|
+
/** True in the icon rail; false in the open sidebar and in the drawer. */
|
|
100
|
+
readonly isRail: boolean;
|
|
101
|
+
/** Closes the navigation drawer. A click on any link inside the slot already does. */
|
|
102
|
+
readonly close: () => void;
|
|
103
|
+
}
|
|
104
|
+
declare const _default: __VLS_WithSlots<import('vue').DefineComponent<AppFrameProps, {
|
|
105
|
+
el: import('vue').ComputedRef<HTMLDivElement | null>;
|
|
106
|
+
mainEl: import('vue').ComputedRef<HTMLElement | null>;
|
|
107
|
+
isRail: import('vue').ComputedRef<boolean>;
|
|
108
|
+
isCollapsed: import('vue').Ref<boolean, boolean>;
|
|
109
|
+
toggleSidebar: () => void;
|
|
110
|
+
closeNavigation: () => void;
|
|
111
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
112
|
+
collapse: (isCollapsed: boolean) => any;
|
|
113
|
+
"update:locale": (locale: string) => any;
|
|
114
|
+
"update:organization": (organization: string) => any;
|
|
115
|
+
"update:accountOpen": (open: boolean) => any;
|
|
116
|
+
}, string, import('vue').PublicProps, Readonly<AppFrameProps> & Readonly<{
|
|
117
|
+
onCollapse?: ((isCollapsed: boolean) => any) | undefined;
|
|
118
|
+
"onUpdate:locale"?: ((locale: string) => any) | undefined;
|
|
119
|
+
"onUpdate:organization"?: ((organization: string) => any) | undefined;
|
|
120
|
+
"onUpdate:accountOpen"?: ((open: boolean) => any) | undefined;
|
|
121
|
+
}>, {
|
|
122
|
+
readonly variant: AppFrameVariant;
|
|
123
|
+
readonly version: string;
|
|
124
|
+
readonly locale: string;
|
|
125
|
+
readonly organization: string;
|
|
126
|
+
readonly runningVersion: string | null;
|
|
127
|
+
readonly onReload: () => unknown;
|
|
128
|
+
readonly apps: ReadonlyArray<AppSwitcherItem>;
|
|
129
|
+
readonly crumbs: ReadonlyArray<BreadcrumbItem>;
|
|
130
|
+
readonly onNavigate: (href: string, event: MouseEvent) => unknown;
|
|
131
|
+
readonly currentApp: string;
|
|
132
|
+
readonly appLabel: string;
|
|
133
|
+
readonly appSubtitle: string;
|
|
134
|
+
readonly appSwitcher: AppFrameSwitcher;
|
|
135
|
+
readonly account: AppFrameAccount;
|
|
136
|
+
readonly accountOpen: boolean;
|
|
137
|
+
readonly hasNavigation: boolean;
|
|
138
|
+
readonly collapseStorageKey: string;
|
|
139
|
+
readonly isCollapsedByDefault: boolean;
|
|
140
|
+
readonly contentWidth: AppFrameContentWidth;
|
|
141
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
142
|
+
/** The page. */
|
|
143
|
+
default?(): unknown;
|
|
144
|
+
/** The brand: a home link around the wordmark, or the mark where `isRail`. With `apps`, the switcher's mark. */
|
|
145
|
+
brand?(props: AppFrameBrandSlotProps): unknown;
|
|
146
|
+
/** The sidebar's navigation — a `SidebarMenu` bound to `isRail`. Omitted, the frame has no sidebar. */
|
|
147
|
+
nav?(props: AppFrameNavSlotProps): unknown;
|
|
148
|
+
/** Controls between the toggle and the trail. */
|
|
149
|
+
'bar-start'?(): unknown;
|
|
150
|
+
/** Replaces the trail — a portal target, or a trail that carries a page's actions. */
|
|
151
|
+
trail?(): unknown;
|
|
152
|
+
/** The app's own bar controls, before the account menu. */
|
|
153
|
+
'bar-end'?(): unknown;
|
|
154
|
+
/** Replaces the account menu. */
|
|
155
|
+
account?(): unknown;
|
|
156
|
+
/** The account-level destinations inside the account menu — `MenuItem` rows. */
|
|
157
|
+
'account-items'?(): unknown;
|
|
158
|
+
/** A phone's bottom bar, below `md`. Given, a phone has no drawer and the toggle hides there. */
|
|
159
|
+
'phone-nav'?(): unknown;
|
|
160
|
+
/** What stands above every page — a notice, a connection banner. */
|
|
161
|
+
notice?(): unknown;
|
|
162
|
+
}>;
|
|
163
|
+
export default _default;
|
|
164
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
165
|
+
new (): {
|
|
166
|
+
$slots: S;
|
|
167
|
+
};
|
|
168
|
+
};
|