patent-editor 0.2.0 → 0.2.2
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/lib.js +20 -15
- package/dist/lib.js.map +1 -1
- package/package.json +1 -1
package/dist/lib.js
CHANGED
|
@@ -1006,6 +1006,7 @@ const G = new Pa(), Rt = {
|
|
|
1006
1006
|
claimInsertHintCreated: "已自动创建 Claim 区并插入新 Claim",
|
|
1007
1007
|
claimInsertHintMoved: "当前光标在区外,已放入 Claim 区",
|
|
1008
1008
|
referenceNavigateTitle: "点击跳转到目标权利要求",
|
|
1009
|
+
figureReferenceNavigateTitle: "点击跳转到目标附图",
|
|
1009
1010
|
referenceNavigateDisabledTitle: "引用无效,无法跳转",
|
|
1010
1011
|
currentFigure: "当前附图",
|
|
1011
1012
|
figureId: "图号",
|
|
@@ -1092,6 +1093,7 @@ const G = new Pa(), Rt = {
|
|
|
1092
1093
|
claimInsertHintCreated: "Claims section was created and a new Claim was inserted",
|
|
1093
1094
|
claimInsertHintMoved: "Cursor is outside claims section, inserted into Claims section",
|
|
1094
1095
|
referenceNavigateTitle: "Click to navigate to target claim",
|
|
1096
|
+
figureReferenceNavigateTitle: "Click to navigate to target figure",
|
|
1095
1097
|
referenceNavigateDisabledTitle: "Invalid reference, navigation unavailable",
|
|
1096
1098
|
currentFigure: "Current Figure",
|
|
1097
1099
|
figureId: "Figure ID",
|
|
@@ -1803,8 +1805,8 @@ function pt() {
|
|
|
1803
1805
|
JSON.stringify({ action: "export", format: "svg" }),
|
|
1804
1806
|
"*"
|
|
1805
1807
|
);
|
|
1806
|
-
},
|
|
1807
|
-
}, window.addEventListener("message", ce), r = setTimeout(() => a(""), qa), U ? Ve && s() : (U = document.createElement("iframe"), U.style.cssText = "position:fixed;left:-9999px;top:-9999px;width:
|
|
1808
|
+
}, 1500) : l.event === "export" && a(l.data || "");
|
|
1809
|
+
}, window.addEventListener("message", ce), r = setTimeout(() => a(""), qa), U ? Ve && s() : (U = document.createElement("iframe"), U.style.cssText = "position:fixed;left:-9999px;top:-9999px;width:1920px;height:1080px;opacity:0;pointer-events:none;", document.body.appendChild(U), Ve = !1, U.src = "https://embed.diagrams.net/?embed=1&proto=json&spin=0&chrome=0");
|
|
1808
1810
|
}
|
|
1809
1811
|
const je = () => {
|
|
1810
1812
|
document.querySelectorAll('body > svg[id^="fig-mermaid-"]').forEach((e) => e.remove()), document.querySelectorAll('body > svg[id^="d"]').forEach((e) => {
|
|
@@ -2113,21 +2115,24 @@ const je = () => {
|
|
|
2113
2115
|
let n = e;
|
|
2114
2116
|
const r = document.createElement("span"), a = () => {
|
|
2115
2117
|
const s = n.attrs.lang === "en" ? "en" : "zh", i = j(s), l = n.attrs.targetType === "figure" ? "figure" : "claim", c = Number(n.attrs.resolvedNumber), d = typeof n.attrs.resolvedFigureId == "string" && n.attrs.resolvedFigureId ? n.attrs.resolvedFigureId : null, o = l === "figure" ? d || (s === "en" ? "Figure ?" : "附图?") : Number.isFinite(c) ? i.claimLabel(c) : s === "en" ? "Claim ?" : "权利要求?", u = n.attrs.displayText || o;
|
|
2116
|
-
r.textContent = u, r.className = `reference-link${n.attrs.invalid ? " reference-link-invalid" : ""}`, r.setAttribute("data-type", "reference"), r.setAttribute("data-highlight", n.attrs.highlight ? "true" : "false"), r.title = n.attrs.invalid ? i.referenceNavigateDisabledTitle : i.referenceNavigateTitle;
|
|
2118
|
+
r.textContent = u, r.className = `reference-link${n.attrs.invalid ? " reference-link-invalid" : ""}`, r.setAttribute("data-type", "reference"), r.setAttribute("data-highlight", n.attrs.highlight ? "true" : "false"), r.title = n.attrs.invalid ? i.referenceNavigateDisabledTitle : l === "figure" ? i.figureReferenceNavigateTitle : i.referenceNavigateTitle;
|
|
2117
2119
|
};
|
|
2118
2120
|
return a(), r.addEventListener("click", () => {
|
|
2119
2121
|
const s = n.attrs.targetType === "figure" ? "figure" : "claim";
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2122
|
+
n.attrs.invalid || setTimeout(() => {
|
|
2123
|
+
let i = null;
|
|
2124
|
+
if (s === "figure") {
|
|
2125
|
+
const l = typeof n.attrs.targetFigureId == "string" ? n.attrs.targetFigureId : "";
|
|
2126
|
+
if (!l)
|
|
2127
|
+
return;
|
|
2128
|
+
t.state.doc.descendants((c, d) => i !== null ? !1 : c.type.name === "figure" && c.attrs.id === l ? (i = d, !1) : !0);
|
|
2129
|
+
} else {
|
|
2130
|
+
if (!n.attrs.targetClaimId)
|
|
2131
|
+
return;
|
|
2132
|
+
t.state.doc.descendants((l, c) => i !== null ? !1 : l.type.name === "claim" && l.attrs.claimId === n.attrs.targetClaimId ? (i = c, !1) : !0);
|
|
2133
|
+
}
|
|
2134
|
+
typeof i == "number" && t.chain().focus().setTextSelection(i + 1).scrollIntoView().run();
|
|
2135
|
+
}, 0);
|
|
2131
2136
|
}), {
|
|
2132
2137
|
dom: r,
|
|
2133
2138
|
update: (s) => s.type.name !== this.name ? !1 : (n = s, a(), !0)
|
|
@@ -5063,7 +5068,7 @@ function ti(e, t, n) {
|
|
|
5063
5068
|
}
|
|
5064
5069
|
function vo(e, t) {
|
|
5065
5070
|
const n = e.state.doc, r = n.content.size, { text: a, segments: s } = ln(e, 0, r), i = ei(), l = i.diff_main(t, a);
|
|
5066
|
-
i.
|
|
5071
|
+
i.diff_cleanupEfficiency(l);
|
|
5067
5072
|
const c = [];
|
|
5068
5073
|
let d = 0;
|
|
5069
5074
|
for (const [m, p] of l)
|