@giscus/vue
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -421,7 +421,7 @@ var __defProp = Object.defineProperty; | ||
} | ||
A(t2, i2 = this._$AB) { | ||
M(t2, i2 = this._$AB) { | ||
return this._$AA.parentNode.insertBefore(t2, i2); | ||
} | ||
k(t2) { | ||
this._$AH !== t2 && (this._$AR(), this._$AH = this.A(t2)); | ||
this._$AH !== t2 && (this._$AR(), this._$AH = this.M(t2)); | ||
} | ||
@@ -450,3 +450,3 @@ $(t2) { | ||
for (const o2 of t2) | ||
e2 === i2.length ? i2.push(s2 = new N(this.A(h$2()), this.A(h$2()), this, this.options)) : s2 = i2[e2], s2._$AI(o2), e2++; | ||
e2 === i2.length ? i2.push(s2 = new N(this.M(h$2()), this.M(h$2()), this, this.options)) : s2 = i2[e2], s2._$AI(o2), e2++; | ||
e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2); | ||
@@ -538,3 +538,3 @@ } | ||
const z = window.litHtmlPolyfillSupport; | ||
z == null || z(E, N), ((t$1 = globalThis.litHtmlVersions) !== null && t$1 !== void 0 ? t$1 : globalThis.litHtmlVersions = []).push("2.2.1"); | ||
z == null || z(E, N), ((t$1 = globalThis.litHtmlVersions) !== null && t$1 !== void 0 ? t$1 : globalThis.litHtmlVersions = []).push("2.2.2"); | ||
/** | ||
@@ -720,16 +720,22 @@ * @license | ||
const h = /* @__PURE__ */ new WeakMap(), n = e$2(class extends d { | ||
render(i2) { | ||
render(t2) { | ||
return w; | ||
} | ||
update(i2, [s2]) { | ||
update(t2, [s2]) { | ||
var e2; | ||
const o2 = s2 !== this.U; | ||
return o2 && this.U !== void 0 && this.ot(void 0), (o2 || this.rt !== this.lt) && (this.U = s2, this.ht = (e2 = i2.options) === null || e2 === void 0 ? void 0 : e2.host, this.ot(this.lt = i2.element)), w; | ||
return o2 && this.U !== void 0 && this.ot(void 0), (o2 || this.rt !== this.lt) && (this.U = s2, this.ht = (e2 = t2.options) === null || e2 === void 0 ? void 0 : e2.host, this.ot(this.lt = t2.element)), w; | ||
} | ||
ot(t2) { | ||
typeof this.U == "function" ? (h.get(this.U) !== void 0 && this.U.call(this.ht, void 0), h.set(this.U, t2), t2 !== void 0 && this.U.call(this.ht, t2)) : this.U.value = t2; | ||
ot(i2) { | ||
var t2; | ||
if (typeof this.U == "function") { | ||
const s2 = (t2 = this.ht) !== null && t2 !== void 0 ? t2 : globalThis; | ||
let e2 = h.get(s2); | ||
e2 === void 0 && (e2 = /* @__PURE__ */ new WeakMap(), h.set(s2, e2)), e2.get(this.U) !== void 0 && this.U.call(this.ht, void 0), e2.set(this.U, i2), i2 !== void 0 && this.U.call(this.ht, i2); | ||
} else | ||
this.U.value = i2; | ||
} | ||
get rt() { | ||
var t2; | ||
return typeof this.U == "function" ? h.get(this.U) : (t2 = this.U) === null || t2 === void 0 ? void 0 : t2.value; | ||
var i2, t2, s2; | ||
return typeof this.U == "function" ? (t2 = h.get((i2 = this.ht) !== null && i2 !== void 0 ? i2 : globalThis)) === null || t2 === void 0 ? void 0 : t2.get(this.U) : (s2 = this.U) === null || s2 === void 0 ? void 0 : s2.value; | ||
} | ||
@@ -786,4 +792,4 @@ disconnected() { | ||
setupSession() { | ||
const origin2 = location.href; | ||
const url = new URL(origin2); | ||
const origin = location.href; | ||
const url = new URL(origin); | ||
const savedSession = localStorage.getItem(this.GISCUS_SESSION_KEY); | ||
@@ -869,6 +875,11 @@ const urlSession = url.searchParams.get("giscus") || ""; | ||
} | ||
_getCleanedUrl() { | ||
const url = new URL(location.href); | ||
url.searchParams.delete("giscus"); | ||
return url; | ||
} | ||
getTerm() { | ||
switch (this.mapping) { | ||
case "url": | ||
return origin; | ||
return `${this._getCleanedUrl()}`; | ||
case "title": | ||
@@ -891,8 +902,7 @@ return document.title; | ||
getIframeSrc() { | ||
const url = new URL(location.href); | ||
url.searchParams.delete("giscus"); | ||
const origin2 = `${url}${this.id ? "#" + this.id : ""}`; | ||
const url = this._getCleanedUrl(); | ||
const origin = `${url}${this.id ? "#" + this.id : ""}`; | ||
const description = this._getOgMetaContent("description"); | ||
const params = { | ||
origin: origin2, | ||
origin, | ||
session: this.__session, | ||
@@ -922,2 +932,3 @@ repo: this.repo, | ||
loading=${this.loading} | ||
part="iframe" | ||
></iframe> | ||
@@ -933,2 +944,3 @@ `; | ||
color-scheme: normal; | ||
min-height: 150px; | ||
} | ||
@@ -935,0 +947,0 @@ `; |
{ | ||
"name": "@giscus/vue", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"main": "dist/giscus.cjs.js", | ||
@@ -32,3 +32,3 @@ "module": "dist/index.es.js", | ||
"dependencies": { | ||
"giscus": "^1.0.2" | ||
"giscus": "^1.0.3" | ||
}, | ||
@@ -39,14 +39,14 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@types/node": "^16.11.26", | ||
"@typescript-eslint/eslint-plugin": "^5.16.0", | ||
"@typescript-eslint/parser": "^5.16.0", | ||
"@types/node": "^16.11.27", | ||
"@typescript-eslint/eslint-plugin": "^5.19.0", | ||
"@typescript-eslint/parser": "^5.19.0", | ||
"@vitejs/plugin-vue": "^2.2.0", | ||
"eslint": "^8.12.0", | ||
"eslint": "^8.13.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-vue": "^8.5.0", | ||
"eslint-plugin-vue": "^8.6.0", | ||
"prettier": "^2.6.1", | ||
"typescript": "^4.6.3", | ||
"vite": "^2.9.1", | ||
"vue-tsc": "^0.33.9" | ||
"vite": "^2.9.5", | ||
"vue-tsc": "^0.34.7" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47349
1094
Updatedgiscus@^1.0.3