@timpel/forumkit-sdk-web 0.2.5 → 0.2.6
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.
|
@@ -13338,6 +13338,23 @@ button.fk-profile-filter-label {
|
|
|
13338
13338
|
|
|
13339
13339
|
// src/components/forum-kit.ts
|
|
13340
13340
|
var DEFAULT_API_URL = "";
|
|
13341
|
+
var FONTS_HREF = "https://fonts.googleapis.com/css2?family=Michroma&family=Inter:wght@400;500;600;700;800&display=swap";
|
|
13342
|
+
function ensureFontsLoaded() {
|
|
13343
|
+
if (document.querySelector(`link[href="${FONTS_HREF}"]`)) return;
|
|
13344
|
+
const preconnect1 = document.createElement("link");
|
|
13345
|
+
preconnect1.rel = "preconnect";
|
|
13346
|
+
preconnect1.href = "https://fonts.googleapis.com";
|
|
13347
|
+
document.head.appendChild(preconnect1);
|
|
13348
|
+
const preconnect2 = document.createElement("link");
|
|
13349
|
+
preconnect2.rel = "preconnect";
|
|
13350
|
+
preconnect2.href = "https://fonts.gstatic.com";
|
|
13351
|
+
preconnect2.crossOrigin = "anonymous";
|
|
13352
|
+
document.head.appendChild(preconnect2);
|
|
13353
|
+
const stylesheet = document.createElement("link");
|
|
13354
|
+
stylesheet.rel = "stylesheet";
|
|
13355
|
+
stylesheet.href = FONTS_HREF;
|
|
13356
|
+
document.head.appendChild(stylesheet);
|
|
13357
|
+
}
|
|
13341
13358
|
var ForumKitElement = class extends HTMLElement {
|
|
13342
13359
|
_config = null;
|
|
13343
13360
|
_shadow;
|
|
@@ -13363,6 +13380,7 @@ var ForumKitElement = class extends HTMLElement {
|
|
|
13363
13380
|
}
|
|
13364
13381
|
constructor() {
|
|
13365
13382
|
super();
|
|
13383
|
+
ensureFontsLoaded();
|
|
13366
13384
|
this._shadow = this.attachShadow({ mode: "open" });
|
|
13367
13385
|
const style = document.createElement("style");
|
|
13368
13386
|
style.textContent = all_default;
|
|
@@ -13459,4 +13477,4 @@ if (!customElements.get("forum-kit")) {
|
|
|
13459
13477
|
export {
|
|
13460
13478
|
ForumKitElement
|
|
13461
13479
|
};
|
|
13462
|
-
//# sourceMappingURL=chunk-
|
|
13480
|
+
//# sourceMappingURL=chunk-46QQNTQZ.js.map
|