webim-adapter 2.4.0 → 2.4.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/CHANGELOG.md +11 -0
- package/build/webim-bundle.js +8 -1
- package/build/webim-ssr.js +1230 -1221
- package/bundle.d.ts +3 -0
- package/package.json +1 -1
- package/ssr.d.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to `webim-adapter` are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [2.4.1] - 2026-09-29
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `documentTitle(bundle)` (from `webim-adapter/bundle` and `/ssr`): the
|
|
15
|
+
page's title with the site name added after or before it, per the
|
|
16
|
+
tenant's `site.titleFormat` / `site.titleSeparator` settings.
|
|
17
|
+
`renderPageDocument` uses it for `<title>` and `og:title`.
|
|
18
|
+
|
|
8
19
|
## [2.1.0] - 2026-09-10
|
|
9
20
|
|
|
10
21
|
_No noteworthy changes._
|
package/build/webim-bundle.js
CHANGED
|
@@ -220,5 +220,12 @@ function a({ page: e, settings: t, tenant: n, apiUrl: r, locale: a }) {
|
|
|
220
220
|
settings: o
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
+
function o(e) {
|
|
224
|
+
let t = e?.seo ?? {}, n = String(t.title || e?.title || e?.slug || "").trim(), r = e?.settings ?? {}, i = r["site.titleFormat"], a = typeof r["site.name"] == "string" ? r["site.name"].trim() : "";
|
|
225
|
+
if (!a || i !== "suffix" && i !== "prefix") return n;
|
|
226
|
+
if (!n || n.toLowerCase().includes(a.toLowerCase())) return n || a;
|
|
227
|
+
let o = typeof r["site.titleSeparator"] == "string" ? r["site.titleSeparator"].trim() : "", s = o ? ` ${o} ` : " ";
|
|
228
|
+
return i === "prefix" ? `${a}${s}${n}` : `${n}${s}${a}`;
|
|
229
|
+
}
|
|
223
230
|
//#endregion
|
|
224
|
-
export { a as assembleBundle };
|
|
231
|
+
export { a as assembleBundle, o as documentTitle };
|