@brftech/filex-core 0.46.0 → 0.46.1
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/{ArchiveViewer-CVCnCmU-.js → ArchiveViewer-CJGndj5n.js} +2 -2
- package/dist/{ArchiveViewer-CVCnCmU-.js.map → ArchiveViewer-CJGndj5n.js.map} +1 -1
- package/dist/{CsvViewer-xQIAYtDm.js → CsvViewer-CIhVY7v1.js} +2 -2
- package/dist/{CsvViewer-xQIAYtDm.js.map → CsvViewer-CIhVY7v1.js.map} +1 -1
- package/dist/{DrawioViewer-BI-qJ-BJ.js → DrawioViewer-P_XlO_2u.js} +2 -2
- package/dist/{DrawioViewer-BI-qJ-BJ.js.map → DrawioViewer-P_XlO_2u.js.map} +1 -1
- package/dist/{EpubViewer-Ccf8hOA4.js → EpubViewer-GqUGpZrl.js} +2 -2
- package/dist/{EpubViewer-Ccf8hOA4.js.map → EpubViewer-GqUGpZrl.js.map} +1 -1
- package/dist/{IpynbViewer-Bbe9-GFL.js → IpynbViewer-CjUIPMR8.js} +2 -2
- package/dist/{IpynbViewer-Bbe9-GFL.js.map → IpynbViewer-CjUIPMR8.js.map} +1 -1
- package/dist/{MermaidViewer-Dv_6pwXO.js → MermaidViewer-pNRNDIJ9.js} +2 -2
- package/dist/{MermaidViewer-Dv_6pwXO.js.map → MermaidViewer-pNRNDIJ9.js.map} +1 -1
- package/dist/{PsdViewer-Bhon-LPt.js → PsdViewer-DFFicCZ7.js} +2 -2
- package/dist/{PsdViewer-Bhon-LPt.js.map → PsdViewer-DFFicCZ7.js.map} +1 -1
- package/dist/{TiffViewer-BMZQC176.js → TiffViewer-eodqGHI8.js} +2 -2
- package/dist/{TiffViewer-BMZQC176.js.map → TiffViewer-eodqGHI8.js.map} +1 -1
- package/dist/{Viewer3D-AslreHjR.js → Viewer3D-DkX1VfHV.js} +2 -2
- package/dist/{Viewer3D-AslreHjR.js.map → Viewer3D-DkX1VfHV.js.map} +1 -1
- package/dist/filex-core.js +192 -190
- package/dist/filex-core.umd.cjs +42 -42
- package/dist/filex-core.umd.cjs.map +1 -1
- package/dist/{index-Bu_xuz-1.js → index-DqWLI0MK.js} +320 -307
- package/dist/{index-Bu_xuz-1.js.map → index-DqWLI0MK.js.map} +1 -1
- package/dist/index.d.ts +25 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/lib/productVersion.ts +46 -8
- package/src/styles/base.css +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brftech/filex-core",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.1",
|
|
4
4
|
"description": "filex core — Vue 3 source of truth for the filex file manager (FileExplorer + ConnectionsPanel SFCs, composables, types)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/filex-core.umd.cjs",
|
package/src/index.ts
CHANGED
|
@@ -520,7 +520,8 @@ export { default as ConnectionNotice } from './components/ConnectionNotice.vue';
|
|
|
520
520
|
/* `filex 0.43.0` — which filex this is, in ONE spelling for every place that
|
|
521
521
|
says it (the account menus, user settings, the sign-in page). No catalogue
|
|
522
522
|
key: a name and a number need no translation (lib/productVersion). */
|
|
523
|
-
export { PRODUCT_NAME, productVersionLine } from './lib/productVersion';
|
|
523
|
+
export { PRODUCT_NAME, parseServerVersion, productVersionLine, shortCommit } from './lib/productVersion';
|
|
524
|
+
export type { ServerVersion } from './lib/productVersion';
|
|
524
525
|
export { default as ProductVersion } from './components/ProductVersion.vue';
|
|
525
526
|
/* The one splitter for list fields — "،" "," "、" are commas too. */
|
|
526
527
|
export { splitList, isListSeparatorKey } from './lib/listInput';
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
* (lesson #417). `filex` is the SOFTWARE's name, not the operator's brand:
|
|
14
14
|
* the line answers "which filex is this", which a renamed instance is too.
|
|
15
15
|
*
|
|
16
|
-
* ⚠ The SERVER's own
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* placeholder, `0.0.0` —
|
|
16
|
+
* ⚠ The SERVER's own release (`GET /api/files/capabilities` → `version`,
|
|
17
|
+
* without the commit and build time it adds — parseServerVersion): a
|
|
18
|
+
* development build says `0.1.0-dev`, and that is the honest answer. The
|
|
19
|
+
* one value it will not print is the client's own placeholder, `0.0.0` —
|
|
20
|
+
* the capabilities store holds it until the real
|
|
20
21
|
* answer lands, and a menu opened in that moment would otherwise announce a
|
|
21
22
|
* version that has never existed. Unknown is said by saying nothing.
|
|
22
23
|
*/
|
|
@@ -27,9 +28,46 @@ export const PRODUCT_NAME = 'filex';
|
|
|
27
28
|
/** The client's "not known yet" — never a real server's answer. */
|
|
28
29
|
const PLACEHOLDER = '0.0.0';
|
|
29
30
|
|
|
30
|
-
/**
|
|
31
|
-
export
|
|
31
|
+
/** The parts of the server's version string. A part it left out is ''. */
|
|
32
|
+
export interface ServerVersion {
|
|
33
|
+
/** `v0.46.0`, `0.1.0-dev` — the release, as the server spells it. */
|
|
34
|
+
release: string;
|
|
35
|
+
/** The full commit hash the build was made from. */
|
|
36
|
+
commit: string;
|
|
37
|
+
/** The build time, as the build stamped it (ISO 8601). */
|
|
38
|
+
built: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* `v0.46.0 (a2d7e34d19…, 2026-09-26T03:41:30Z)` → its parts.
|
|
43
|
+
*
|
|
44
|
+
* ⚠ That is the REAL shape of `capabilities.version` (backend
|
|
45
|
+
* internal/version.String): the release, then the commit and the build time
|
|
46
|
+
* in brackets, either of which a build may leave out. Printed whole, the 40
|
|
47
|
+
* hex digits and the timestamp gave the avatar menu a sideways scroll bar and
|
|
48
|
+
* ran off the About page (Burak, 2026-09-26).
|
|
49
|
+
*/
|
|
50
|
+
export function parseServerVersion(version: string | null | undefined): ServerVersion {
|
|
32
51
|
const v = String(version ?? '').trim();
|
|
33
|
-
|
|
34
|
-
return
|
|
52
|
+
const m = /^(\S+)\s*\(([^)]*)\)$/.exec(v);
|
|
53
|
+
if (!m) return { release: v, commit: '', built: '' };
|
|
54
|
+
let commit = '';
|
|
55
|
+
let built = '';
|
|
56
|
+
for (const part of m[2].split(',').map((p) => p.trim())) {
|
|
57
|
+
if (/^\d{4}-\d{2}-\d{2}/.test(part)) built = part;
|
|
58
|
+
else if (part && !commit) commit = part;
|
|
59
|
+
}
|
|
60
|
+
return { release: m[1], commit, built };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** A commit hash as git shows it short: seven characters. */
|
|
64
|
+
export function shortCommit(commit: string): string {
|
|
65
|
+
return /^[0-9a-f]{8,}$/i.test(commit) ? commit.slice(0, 7) : commit;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** `filex 0.43.0` — the release only — or '' while the version is not known. */
|
|
69
|
+
export function productVersionLine(version: string | null | undefined): string {
|
|
70
|
+
const { release } = parseServerVersion(version);
|
|
71
|
+
if (!release || release === PLACEHOLDER) return '';
|
|
72
|
+
return `${PRODUCT_NAME} ${release}`;
|
|
35
73
|
}
|
package/src/styles/base.css
CHANGED
|
@@ -2205,6 +2205,10 @@ filex-explorer {
|
|
|
2205
2205
|
font-variant-numeric: tabular-nums;
|
|
2206
2206
|
user-select: text;
|
|
2207
2207
|
white-space: nowrap;
|
|
2208
|
+
/* A string longer than the menu is cut, never scrolled: the release alone
|
|
2209
|
+
fits, and a menu must not grow a sideways scroll bar (2026-09-26). */
|
|
2210
|
+
overflow: hidden;
|
|
2211
|
+
text-overflow: ellipsis;
|
|
2208
2212
|
}
|
|
2209
2213
|
|
|
2210
2214
|
/* === bul:s3 === */
|