@inpageedit/core 0.1.0
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/LICENSE +21 -0
- package/README.md +55 -0
- package/dist/ActionButton-BhcZX7rl.js +33 -0
- package/dist/ActionButton-BhcZX7rl.js.map +1 -0
- package/dist/CheckBox-B7zLOm55.js +30 -0
- package/dist/CheckBox-B7zLOm55.js.map +1 -0
- package/dist/InPageEdit.d.ts +25 -0
- package/dist/PluginPreferencesUI-CqQKXQkn.js +33921 -0
- package/dist/PluginPreferencesUI-CqQKXQkn.js.map +1 -0
- package/dist/Preferences-Bg3J5Ur9.js +9 -0
- package/dist/Preferences-Bg3J5Ur9.js.map +1 -0
- package/dist/RadioBox-Dl-VRoW0.js +54 -0
- package/dist/RadioBox-Dl-VRoW0.js.map +1 -0
- package/dist/components/ActionButton.d.ts +9 -0
- package/dist/components/CheckBox.d.ts +10 -0
- package/dist/components/InputBox.d.ts +11 -0
- package/dist/components/MBox/index.d.ts +14 -0
- package/dist/components/MwUserLinks.d.ts +4 -0
- package/dist/components/ProgressBar/index.d.ts +7 -0
- package/dist/components/RadioBox.d.ts +10 -0
- package/dist/components/TabView/TabView.d.ts +19 -0
- package/dist/components/TwinSwapInput/index.d.ts +18 -0
- package/dist/components/utils.d.ts +4 -0
- package/dist/constants/endpoints.d.ts +10 -0
- package/dist/decorators/Preferences.d.ts +36 -0
- package/dist/i18n/languages.json +1527 -0
- package/dist/index-BEDkPsz1.js +86 -0
- package/dist/index-BEDkPsz1.js.map +1 -0
- package/dist/index-Bi1eJIjL.js +83 -0
- package/dist/index-Bi1eJIjL.js.map +1 -0
- package/dist/index-Bz4cBa1Z.js +1130 -0
- package/dist/index-Bz4cBa1Z.js.map +1 -0
- package/dist/index-CL0NhE5n.js +155 -0
- package/dist/index-CL0NhE5n.js.map +1 -0
- package/dist/index-CuEf9G7f.js +5459 -0
- package/dist/index-CuEf9G7f.js.map +1 -0
- package/dist/index-DA5i7w02.js +141 -0
- package/dist/index-DA5i7w02.js.map +1 -0
- package/dist/index-Hed2P8uH.js +159 -0
- package/dist/index-Hed2P8uH.js.map +1 -0
- package/dist/index-LoZLvK3o.js +409 -0
- package/dist/index-LoZLvK3o.js.map +1 -0
- package/dist/index-sORwn1Vt.js +140 -0
- package/dist/index-sORwn1Vt.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/models/WikiPage/index.d.ts +63 -0
- package/dist/models/WikiPage/types/PageInfo.d.ts +56 -0
- package/dist/models/WikiPage/types/PageParseData.d.ts +17 -0
- package/dist/models/WikiPage/types/WatchlistAction.d.ts +6 -0
- package/dist/models/WikiTitle/index.d.ts +12 -0
- package/dist/plugins/BasePlugin.d.ts +19 -0
- package/dist/plugins/_debug/index.d.ts +8 -0
- package/dist/plugins/preferences/PluginPreferencesUI.d.ts +11 -0
- package/dist/plugins/preferences/components/hooks.d.ts +5 -0
- package/dist/plugins/preferences/index.d.ts +37 -0
- package/dist/plugins/quick-diff/JsDiffService.d.ts +23 -0
- package/dist/plugins/quick-diff/PluginQuickDiffCore.d.ts +69 -0
- package/dist/plugins/quick-diff/components/DiffTable.d.ts +6 -0
- package/dist/plugins/quick-diff/index.d.ts +6 -0
- package/dist/plugins/quick-edit/PluginQuickEditInArticleLinks.d.ts +14 -0
- package/dist/plugins/quick-edit/index.d.ts +52 -0
- package/dist/plugins/quick-move/index.d.ts +27 -0
- package/dist/plugins/quick-preview/index.d.ts +32 -0
- package/dist/plugins/quick-redirect/index.d.ts +24 -0
- package/dist/plugins/toolbox/index.d.ts +38 -0
- package/dist/polyfills/Promise.withResolvers.d.ts +5 -0
- package/dist/polyfills/index.d.ts +0 -0
- package/dist/services/ApiService.d.ts +14 -0
- package/dist/services/ResourceLoaderService.d.ts +13 -0
- package/dist/services/SiteMetadataService.d.ts +53 -0
- package/dist/services/SsiModalService.d.ts +35 -0
- package/dist/services/StorageService.d.ts +56 -0
- package/dist/services/WikiPageService.d.ts +19 -0
- package/dist/sleep-DpyIipK-.js +5 -0
- package/dist/sleep-DpyIipK-.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/SiteMetadata.d.ts +133 -0
- package/dist/utils/defineAsyncPlugin.d.ts +2 -0
- package/dist/utils/noop.d.ts +1 -0
- package/dist/utils/schemaValidator.d.ts +12 -0
- package/dist/utils/sleep.d.ts +1 -0
- package/dist/utils/string.d.ts +7 -0
- package/dist/utils/vueReactivity.d.ts +2 -0
- package/package.json +81 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { b as C, j as n, a as A, S as m } from "./index-CuEf9G7f.js";
|
|
2
|
+
import { R as B } from "./Preferences-Bg3J5Ur9.js";
|
|
3
|
+
import { s as I } from "./sleep-DpyIipK-.js";
|
|
4
|
+
var j = Object.create, x = Object.defineProperty, q = Object.getOwnPropertyDescriptor, w = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), _ = (t) => {
|
|
5
|
+
throw TypeError(t);
|
|
6
|
+
}, z = (t, e, o) => e in t ? x(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, M = (t, e) => x(t, "name", { value: e, configurable: !0 }), E = (t) => [, , , j(t?.[w("metadata")] ?? null)], $ = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], y = (t) => t !== void 0 && typeof t != "function" ? _("Function expected") : t, N = (t, e, o, i, r) => ({ kind: $[t], name: e, metadata: i, addInitializer: (l) => o._ ? _("Already initialized") : r.push(y(l || null)) }), O = (t, e) => z(e, w("metadata"), t[3]), T = (t, e, o, i) => {
|
|
7
|
+
for (var r = 0, l = t[e >> 1], d = l && l.length; r < d; r++) l[r].call(o);
|
|
8
|
+
return i;
|
|
9
|
+
}, L = (t, e, o, i, r, l) => {
|
|
10
|
+
var d, b, u, a = e & 7, s = !1, c = 0, g = t[c] || (t[c] = []), p = a && (r = r.prototype, a < 5 && (a > 3 || !s) && q(r, o));
|
|
11
|
+
M(r, o);
|
|
12
|
+
for (var h = i.length - 1; h >= 0; h--)
|
|
13
|
+
u = N(a, o, b = {}, t[3], g), d = (0, i[h])(r, u), b._ = 1, y(d) && (r = d);
|
|
14
|
+
return O(t, r), p && x(r, o, p), s ? a ^ 4 ? l : p : r;
|
|
15
|
+
}, S, v, k;
|
|
16
|
+
S = [B(
|
|
17
|
+
m.object({
|
|
18
|
+
toolboxAlwaysShow: m.boolean().description("Make the toolbox opened by default").default(!1)
|
|
19
|
+
}),
|
|
20
|
+
{
|
|
21
|
+
toolboxAlwaysShow: !1
|
|
22
|
+
}
|
|
23
|
+
), A(["preferences"])];
|
|
24
|
+
class f extends (k = C) {
|
|
25
|
+
constructor(e) {
|
|
26
|
+
super(e, "toolbox", !1), this.ctx = e, this.container = void 0, this.forceShow = !1;
|
|
27
|
+
}
|
|
28
|
+
async start() {
|
|
29
|
+
mw && mw.config.get("wgIsArticle") === !1 && !this.forceShow ? this.container = this.createIndicatorForNotArticlePage() : this.container = this.createToolbox(), document.body.appendChild(this.container), await I(0), this.ctx.preferences.get("toolboxAlwaysShow").then((e) => {
|
|
30
|
+
e && (this.container.querySelector("#toolbox-toggle")?.classList.add("opened"), this.container.querySelectorAll(".btn-group").forEach((o) => {
|
|
31
|
+
o.classList.add("opened");
|
|
32
|
+
}));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
stop() {
|
|
36
|
+
this.container?.remove();
|
|
37
|
+
}
|
|
38
|
+
createToolbox() {
|
|
39
|
+
const o = /* @__PURE__ */ n("div", { id: "ipe-edit-toolbox", children: [
|
|
40
|
+
/* @__PURE__ */ n("ul", { className: "btn-group group1", style: { display: "flex", flexDirection: "column" } }),
|
|
41
|
+
/* @__PURE__ */ n("ul", { className: "btn-group group2", style: { display: "flex", flexDirection: "row" } }),
|
|
42
|
+
/* @__PURE__ */ n(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
className: "ipe-toolbox-btn",
|
|
46
|
+
id: "toolbox-toggle",
|
|
47
|
+
onClick: function(i) {
|
|
48
|
+
const r = this.classList.contains("opened");
|
|
49
|
+
this.classList.toggle("opened", !r), o.querySelectorAll(".btn-group").forEach((l) => {
|
|
50
|
+
l.classList.toggle("opened", !r);
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
children: /* @__PURE__ */ n(
|
|
54
|
+
"svg",
|
|
55
|
+
{
|
|
56
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
57
|
+
width: "24",
|
|
58
|
+
height: "24",
|
|
59
|
+
viewBox: "0 0 24 24",
|
|
60
|
+
fill: "none",
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
"stroke-width": "2",
|
|
63
|
+
"stroke-linecap": "round",
|
|
64
|
+
"stroke-linejoin": "round",
|
|
65
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-plus",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ n("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
68
|
+
/* @__PURE__ */ n("path", { d: "M12 5l0 14" }),
|
|
69
|
+
/* @__PURE__ */ n("path", { d: "M5 12l14 0" })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] });
|
|
76
|
+
return o;
|
|
77
|
+
}
|
|
78
|
+
createIndicatorForNotArticlePage() {
|
|
79
|
+
return /* @__PURE__ */ n("div", { id: "ipe-edit-toolbox", children: /* @__PURE__ */ n(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
id: "ipe-toolbox-placeholder",
|
|
83
|
+
style: "width: 0.75rem; height: 0.75rem; border-radius: 50%; background: #3f51b5; color: #fff; pointer-events: none;",
|
|
84
|
+
children: /* @__PURE__ */ n(
|
|
85
|
+
"svg",
|
|
86
|
+
{
|
|
87
|
+
style: "width: 0.5em; height: 0.5em; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);",
|
|
88
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
89
|
+
width: "24",
|
|
90
|
+
height: "24",
|
|
91
|
+
viewBox: "0 0 24 24",
|
|
92
|
+
fill: "none",
|
|
93
|
+
stroke: "currentColor",
|
|
94
|
+
"stroke-width": "4",
|
|
95
|
+
"stroke-linecap": "round",
|
|
96
|
+
"stroke-linejoin": "round",
|
|
97
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-check",
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ n("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
100
|
+
/* @__PURE__ */ n("path", { d: "M5 12l5 5l10 -10" })
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
) });
|
|
106
|
+
}
|
|
107
|
+
normalizeButtonId(e) {
|
|
108
|
+
return e || (e = Math.random().toString(36).substring(2, 8)), `ipe-toolbox__${e.trim()}`.replace(/\s\.#/g, "-");
|
|
109
|
+
}
|
|
110
|
+
addButton(e) {
|
|
111
|
+
let { id: o, group: i, icon: r, tooltip: l, buttonProps: d, onClick: b, index: u } = e;
|
|
112
|
+
o = this.normalizeButtonId(o);
|
|
113
|
+
const a = this.container.querySelector(`#${o}`);
|
|
114
|
+
a && (this.ctx.logger("toolbox").warn(`Button with id ${o} already exists, replacing it.`), a.remove());
|
|
115
|
+
let s = null;
|
|
116
|
+
if (typeof i > "u" || i === "auto") {
|
|
117
|
+
const g = this.container.querySelector(".btn-group.group1"), p = this.container.querySelector(".btn-group.group2"), h = g?.children.length || 0, P = p?.children.length || 0;
|
|
118
|
+
s = h <= P ? g : p;
|
|
119
|
+
} else
|
|
120
|
+
s = this.container.querySelector(`.btn-group.${i}`);
|
|
121
|
+
if (!s) throw new Error(`Button group ${i} not found`);
|
|
122
|
+
const c = /* @__PURE__ */ n("li", { class: "btn-tip-group", id: o, onClick: b, children: [
|
|
123
|
+
/* @__PURE__ */ n("div", { class: "btn-tip", children: l }),
|
|
124
|
+
/* @__PURE__ */ n("button", { id: `${o}-btn`, class: "ipe-toolbox-btn", ...d, children: r })
|
|
125
|
+
] });
|
|
126
|
+
return typeof u == "number" ? u <= 0 ? s.prepend(c) : u >= s.children.length ? s.appendChild(c) : s.children[u]?.before(c) : s.appendChild(c), this.ctx.emit("toolbox/button/added", {
|
|
127
|
+
ctx: this.ctx,
|
|
128
|
+
button: c
|
|
129
|
+
}), c;
|
|
130
|
+
}
|
|
131
|
+
removeButton(e) {
|
|
132
|
+
this.container.querySelector(`.ipe-toolbox-btn#${e}`)?.remove(), this.ctx.emit("toolbox/button/removed", { ctx: this.ctx, id: e });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
v = E(k);
|
|
136
|
+
f = L(v, 0, "PluginToolbox", S, f);
|
|
137
|
+
T(v, 1, f);
|
|
138
|
+
export {
|
|
139
|
+
f as PluginToolbox
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=index-DA5i7w02.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DA5i7w02.js","sources":["../src/plugins/toolbox/index.tsx"],"sourcesContent":["import { Inject, InPageEdit, Schema, Service } from '@/InPageEdit'\nimport { ReactElement } from 'jsx-dom'\n\ndeclare module '@/InPageEdit' {\n interface InPageEdit {\n toolbox: PluginToolbox\n }\n interface Events {\n 'toolbox/button/added'(payload: { ctx: InPageEdit; button: HTMLElement }): void\n 'toolbox/button/removed'(payload: { ctx: InPageEdit; id: string }): void\n }\n}\n\n@RegisterPreferences(\n Schema.object({\n toolboxAlwaysShow: Schema.boolean()\n .description('Make the toolbox opened by default')\n .default(false),\n }),\n {\n toolboxAlwaysShow: false,\n }\n)\n@Inject(['preferences'])\nexport class PluginToolbox extends Service {\n container!: HTMLElement\n private forceShow = false\n\n constructor(public ctx: InPageEdit) {\n super(ctx, 'toolbox', false)\n }\n\n protected async start(): Promise<void> {\n if (mw && mw.config.get('wgIsArticle') === false && !this.forceShow) {\n this.container = this.createIndicatorForNotArticlePage()\n } else {\n this.container = this.createToolbox()\n }\n document.body.appendChild(this.container)\n await sleep(0) // wait nextTick\n this.ctx.preferences.get('toolboxAlwaysShow').then((val) => {\n if (val) {\n this.container.querySelector('#toolbox-toggle')?.classList.add('opened')\n this.container.querySelectorAll('.btn-group').forEach((el) => {\n el.classList.add('opened')\n })\n }\n })\n }\n\n protected stop(): void | Promise<void> {\n this.container?.remove()\n }\n\n private createToolbox() {\n const toggler = (\n <button\n className=\"ipe-toolbox-btn\"\n id=\"toolbox-toggle\"\n onClick={function (e) {\n const isOpened = this.classList.contains('opened')\n this.classList.toggle('opened', !isOpened)\n element.querySelectorAll('.btn-group').forEach((el) => {\n el.classList.toggle('opened', !isOpened)\n })\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-plus\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 5l0 14\" />\n <path d=\"M5 12l14 0\" />\n </svg>\n </button>\n )\n const element = (\n <div id=\"ipe-edit-toolbox\">\n <ul className=\"btn-group group1\" style={{ display: 'flex', flexDirection: 'column' }}></ul>\n <ul className=\"btn-group group2\" style={{ display: 'flex', flexDirection: 'row' }}></ul>\n {toggler}\n </div>\n )\n\n return element as HTMLElement\n }\n\n private createIndicatorForNotArticlePage() {\n const indicator = (\n <div id=\"ipe-edit-toolbox\">\n <div\n id=\"ipe-toolbox-placeholder\"\n style=\"width: 0.75rem; height: 0.75rem; border-radius: 50%; background: #3f51b5; color: #fff; pointer-events: none;\"\n >\n <svg\n style=\"width: 0.5em; height: 0.5em; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-check\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M5 12l5 5l10 -10\" />\n </svg>\n </div>\n </div>\n )\n return indicator as HTMLElement\n }\n\n private normalizeButtonId(id: string) {\n if (!id) {\n id = Math.random().toString(36).substring(2, 8)\n }\n return `ipe-toolbox__${id.trim()}`.replace(/\\s\\.#/g, '-')\n }\n\n addButton(payload: {\n id: string\n group?: 'auto' | 'group1' | 'group2'\n icon: string | HTMLElement | SVGElement | JQuery | ReactElement\n tooltip?: string | HTMLElement | JQuery\n buttonProps?: Record<string, any>\n onClick?: (event: MouseEvent) => void\n index?: number\n }) {\n let { id, group, icon, tooltip, buttonProps, onClick, index } = payload\n id = this.normalizeButtonId(id)\n\n const existingButton = this.container.querySelector(`#${id}`)\n if (existingButton) {\n this.ctx.logger('toolbox').warn(`Button with id ${id} already exists, replacing it.`)\n existingButton.remove()\n }\n\n let groupEl: HTMLElement | null = null\n if (typeof group === 'undefined' || group === 'auto') {\n // 选择按钮最少的那一组,一样多就选第一组\n const group1 = this.container.querySelector('.btn-group.group1') as HTMLElement\n const group2 = this.container.querySelector('.btn-group.group2') as HTMLElement\n const group1Count = group1?.children.length || 0\n const group2Count = group2?.children.length || 0\n groupEl = group1Count <= group2Count ? group1 : group2\n } else {\n groupEl = this.container.querySelector(`.btn-group.${group}`)\n }\n if (!groupEl) throw new Error(`Button group ${group} not found`)\n\n const button = (\n <li class=\"btn-tip-group\" id={id} onClick={onClick}>\n <div class=\"btn-tip\">{tooltip}</div>\n <button id={`${id}-btn`} class=\"ipe-toolbox-btn\" {...buttonProps}>\n {icon}\n </button>\n </li>\n )\n\n if (typeof index === 'number') {\n if (index <= 0) {\n groupEl.prepend(button)\n } else if (index >= groupEl.children.length) {\n groupEl.appendChild(button)\n } else {\n groupEl.children[index]?.before(button)\n }\n } else {\n groupEl.appendChild(button)\n }\n\n this.ctx.emit('toolbox/button/added', {\n ctx: this.ctx,\n button: button as HTMLElement,\n })\n\n return button as HTMLElement\n }\n\n removeButton(id: string) {\n const button = this.container.querySelector(`.ipe-toolbox-btn#${id}`)\n button?.remove()\n this.ctx.emit('toolbox/button/removed', { ctx: this.ctx, id })\n }\n}\n"],"names":["_PluginToolbox_decorators","_init","_a","RegisterPreferences","Schema","Inject","PluginToolbox","Service","ctx","sleep","val","el","element","jsxs","jsx","e","isOpened","id","payload","group","icon","tooltip","buttonProps","onClick","index","existingButton","groupEl","group1","group2","group1Count","group2Count","button","__decoratorStart","__decorateElement","__runInitializers"],"mappings":";;;;;;;;;;;;;;GAAAA,GAAAC,GAAAC;AAaAF,IAAA,CAACG;AAAA,EACCC,EAAO,OAAO;AAAA,IACZ,mBAAmBA,EAAO,QAAA,EACvB,YAAY,oCAAoC,EAChD,QAAQ,EAAK;AAAA,EAAA,CACjB;AAAA,EACD;AAAA,IACE,mBAAmB;AAAA,EAAA;AAEvB,GACCC,EAAO,CAAC,aAAa,CAAC,CAAA;AAChB,MAAMC,WAAsBJ,IAAAK,GAAQ;AAAA,EAIzC,YAAmBC,GAAiB;AAClC,UAAMA,GAAK,WAAW,EAAK,GADV,KAAA,MAAAA,GAHnB,KAAA,YAAA,QACA,KAAQ,YAAY;AAAA,EAIpB;AAAA,EAEA,MAAgB,QAAuB;AACrC,IAAI,MAAM,GAAG,OAAO,IAAI,aAAa,MAAM,MAAS,CAAC,KAAK,YACxD,KAAK,YAAY,KAAK,iCAAA,IAEtB,KAAK,YAAY,KAAK,cAAA,GAExB,SAAS,KAAK,YAAY,KAAK,SAAS,GACxC,MAAMC,EAAM,CAAC,GACb,KAAK,IAAI,YAAY,IAAI,mBAAmB,EAAE,KAAK,CAACC,MAAQ;AAC1D,MAAIA,MACF,KAAK,UAAU,cAAc,iBAA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AA7KOhB,IAAA+B,EAAA9B,CAAA;AAAMI,IAAN2B,yBAXPjC,GAWaM,CAAA;AAAN4B,EAAAjC,GAAA,GAAMK,CAAA;"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { B as y, j as a, P as S, a as j } from "./index-CuEf9G7f.js";
|
|
2
|
+
import { T as F } from "./index-Bi1eJIjL.js";
|
|
3
|
+
import { C as v, I as q } from "./CheckBox-B7zLOm55.js";
|
|
4
|
+
import { A as B } from "./ActionButton-BhcZX7rl.js";
|
|
5
|
+
var E = Object.create, h = Object.defineProperty, I = Object.getOwnPropertyDescriptor, _ = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), b = (t) => {
|
|
6
|
+
throw TypeError(t);
|
|
7
|
+
}, C = (t, e, o) => e in t ? h(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, T = (t, e) => h(t, "name", { value: e, configurable: !0 }), z = (t) => [, , , E(t?.[_("metadata")] ?? null)], D = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], k = (t) => t !== void 0 && typeof t != "function" ? b("Function expected") : t, O = (t, e, o, n, r) => ({ kind: D[t], name: e, metadata: n, addInitializer: (i) => o._ ? b("Already initialized") : r.push(k(i || null)) }), Q = (t, e) => C(e, _("metadata"), t[3]), N = (t, e, o, n) => {
|
|
8
|
+
for (var r = 0, i = t[e >> 1], s = i && i.length; r < s; r++) i[r].call(o);
|
|
9
|
+
return n;
|
|
10
|
+
}, A = (t, e, o, n, r, i) => {
|
|
11
|
+
var s, c, g, l = e & 7, f = !1, w = 0, x = t[w] || (t[w] = []), d = l && (r = r.prototype, l < 5 && (l > 3 || !f) && I(r, o));
|
|
12
|
+
T(r, o);
|
|
13
|
+
for (var m = n.length - 1; m >= 0; m--)
|
|
14
|
+
g = O(l, o, c = {}, t[3], x), s = (0, n[m])(r, g), c._ = 1, k(s) && (r = s);
|
|
15
|
+
return Q(t, r), d && h(r, o, d), f ? l ^ 4 ? i : d : r;
|
|
16
|
+
}, M, p, P;
|
|
17
|
+
M = [j(["modal", "sitemeta"])];
|
|
18
|
+
class u extends (P = y) {
|
|
19
|
+
constructor(e) {
|
|
20
|
+
super(e, {}, "quick-move"), this.ctx = e, e.set("quickMove", this.quickMove.bind(this)), e.set("movePage", this.movePage.bind(this));
|
|
21
|
+
}
|
|
22
|
+
start() {
|
|
23
|
+
this.ctx.inject(["toolbox"], (e) => {
|
|
24
|
+
this.injectToolbox(e);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
injectToolbox(e) {
|
|
28
|
+
const o = window.mw?.config.get("wgPageName") || "", n = window.mw?.config.get("wgIsProbablyEditable");
|
|
29
|
+
e.toolbox.addButton({
|
|
30
|
+
id: "quick-move",
|
|
31
|
+
icon: /* @__PURE__ */ a(
|
|
32
|
+
"svg",
|
|
33
|
+
{
|
|
34
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
+
width: "24",
|
|
36
|
+
height: "24",
|
|
37
|
+
viewBox: "0 0 24 24",
|
|
38
|
+
fill: "none",
|
|
39
|
+
stroke: "currentColor",
|
|
40
|
+
"stroke-width": "2",
|
|
41
|
+
"stroke-linecap": "round",
|
|
42
|
+
"stroke-linejoin": "round",
|
|
43
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-forms",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ a("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
46
|
+
/* @__PURE__ */ a("path", { d: "M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3" }),
|
|
47
|
+
/* @__PURE__ */ a("path", { d: "M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3" }),
|
|
48
|
+
/* @__PURE__ */ a("path", { d: "M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7" }),
|
|
49
|
+
/* @__PURE__ */ a("path", { d: "M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1" }),
|
|
50
|
+
/* @__PURE__ */ a("path", { d: "M17 12h.01" }),
|
|
51
|
+
/* @__PURE__ */ a("path", { d: "M13 12h.01" })
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
tooltip: "Quick Move",
|
|
56
|
+
group: "group2",
|
|
57
|
+
onClick: () => {
|
|
58
|
+
this.quickMove(
|
|
59
|
+
n ? {
|
|
60
|
+
lockFromField: !0,
|
|
61
|
+
from: o
|
|
62
|
+
} : {}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
quickMove(e) {
|
|
68
|
+
const o = this.ctx.modal.createObject({
|
|
69
|
+
title: "Quick Move",
|
|
70
|
+
content: /* @__PURE__ */ a(S, {}),
|
|
71
|
+
className: "quick-move",
|
|
72
|
+
sizeClass: "medium",
|
|
73
|
+
center: !0
|
|
74
|
+
}).init();
|
|
75
|
+
let n = null;
|
|
76
|
+
return o.setContent(
|
|
77
|
+
/* @__PURE__ */ a(
|
|
78
|
+
"form",
|
|
79
|
+
{
|
|
80
|
+
ref: (r) => n = r,
|
|
81
|
+
style: {
|
|
82
|
+
display: "flex",
|
|
83
|
+
flexDirection: "column",
|
|
84
|
+
gap: "1rem"
|
|
85
|
+
},
|
|
86
|
+
onSubmit: (r) => {
|
|
87
|
+
r.preventDefault();
|
|
88
|
+
const i = new FormData(n), s = {
|
|
89
|
+
from: i.get("from"),
|
|
90
|
+
to: i.get("to"),
|
|
91
|
+
reason: i.get("reason") || "",
|
|
92
|
+
movetalk: i.get("movetalk") === "on",
|
|
93
|
+
movesubpages: i.get("movesubpages") === "on",
|
|
94
|
+
noredirect: i.get("noredirect") === "on"
|
|
95
|
+
};
|
|
96
|
+
o.setLoadingState(!0), this.movePage(s).then(() => {
|
|
97
|
+
location.reload();
|
|
98
|
+
}).catch((c) => {
|
|
99
|
+
o.setLoadingState(!1), this.ctx.modal.notify("error", {
|
|
100
|
+
title: "Failed to move",
|
|
101
|
+
content: c instanceof Error ? c.message : String(c)
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ a(
|
|
107
|
+
F,
|
|
108
|
+
{
|
|
109
|
+
inputs: [
|
|
110
|
+
{
|
|
111
|
+
label: "Move from",
|
|
112
|
+
name: "from",
|
|
113
|
+
value: e?.from
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: "Move to",
|
|
117
|
+
name: "to",
|
|
118
|
+
value: e?.to
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(v, { name: "movetalk", id: "movetalk", checked: e?.movetalk, children: "Move talk page" }) }),
|
|
124
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(v, { name: "movesubpages", id: "movesubpages", checked: e?.movesubpages, children: "Move subpage(s) (up to 100)" }) }),
|
|
125
|
+
this.ctx.sitemeta.hasRight("suppressredirect") && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(v, { name: "noredirect", id: "noredirect", checked: e?.noredirect, children: "Move without leaving a redirect" }) }),
|
|
126
|
+
/* @__PURE__ */ a(q, { label: "Reason", id: "reason", name: "reason", value: e?.reason }),
|
|
127
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
128
|
+
B,
|
|
129
|
+
{
|
|
130
|
+
type: "primary",
|
|
131
|
+
buttonProps: {
|
|
132
|
+
style: {
|
|
133
|
+
width: "100%"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
children: "Move"
|
|
137
|
+
}
|
|
138
|
+
) })
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
), o.show();
|
|
143
|
+
}
|
|
144
|
+
async movePage(e) {
|
|
145
|
+
const { from: o, to: n, reason: r = "", ...i } = e;
|
|
146
|
+
if (!o || !n)
|
|
147
|
+
throw new Error("From and to titles are required.");
|
|
148
|
+
if (o === n)
|
|
149
|
+
throw new Error("From and to titles cannot be the same.");
|
|
150
|
+
return (await this.ctx.wikiPage.newFromTitle(o)).moveTo(n, r, i);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
p = z(P);
|
|
154
|
+
u = A(p, 0, "PluginQuickMove", M, u);
|
|
155
|
+
N(p, 1, u);
|
|
156
|
+
export {
|
|
157
|
+
u as PluginQuickMove
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=index-Hed2P8uH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Hed2P8uH.js","sources":["../src/plugins/quick-move/index.tsx"],"sourcesContent":["import { Inject, InPageEdit } from '@/InPageEdit'\n\ndeclare module '@/InPageEdit' {\n interface InPageEdit {\n quickMove: PluginQuickMove['quickMove']\n movePage: PluginQuickMove['movePage']\n }\n}\n\nexport interface MovePageOptions {\n from: string\n to: string\n reason?: string\n movetalk?: boolean\n movesubpages?: boolean\n noredirect?: boolean\n}\nexport interface QuickMoveOptions extends Partial<MovePageOptions> {\n lockFromField?: boolean\n lockToField?: boolean\n}\n\n@Inject(['modal', 'sitemeta'])\nexport class PluginQuickMove extends BasePlugin {\n constructor(public ctx: InPageEdit) {\n super(ctx, {}, 'quick-move')\n ctx.set('quickMove', this.quickMove.bind(this))\n ctx.set('movePage', this.movePage.bind(this))\n }\n\n protected start(): Promise<void> | void {\n this.ctx.inject(['toolbox'], (ctx) => {\n this.injectToolbox(ctx)\n })\n }\n\n private injectToolbox(ctx: InPageEdit) {\n const curPageName = window.mw?.config.get('wgPageName') || ''\n const canEdit = window.mw?.config.get('wgIsProbablyEditable')\n ctx.toolbox.addButton({\n id: 'quick-move',\n icon: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-forms\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3\" />\n <path d=\"M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3\" />\n <path d=\"M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7\" />\n <path d=\"M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1\" />\n <path d=\"M17 12h.01\" />\n <path d=\"M13 12h.01\" />\n </svg>\n ),\n tooltip: 'Quick Move',\n group: 'group2',\n onClick: () => {\n this.quickMove(\n canEdit\n ? {\n lockFromField: true,\n from: curPageName,\n }\n : {}\n )\n },\n })\n }\n\n quickMove(options?: Partial<QuickMoveOptions>) {\n const modal = this.ctx.modal\n .createObject({\n title: 'Quick Move',\n content: (<ProgressBar />) as HTMLElement,\n className: 'quick-move',\n sizeClass: 'medium',\n center: true,\n })\n .init()\n\n let formRef: HTMLFormElement | null = null\n modal.setContent(\n (\n <form\n ref={(el) => (formRef = el)}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '1rem',\n }}\n onSubmit={(e) => {\n e.preventDefault()\n const formData = new FormData(formRef!)\n const options = {\n from: formData.get('from') as string,\n to: formData.get('to') as string,\n reason: (formData.get('reason') as string) || '',\n movetalk: formData.get('movetalk') === 'on',\n movesubpages: formData.get('movesubpages') === 'on',\n noredirect: formData.get('noredirect') === 'on',\n }\n modal.setLoadingState(true)\n this.movePage(options)\n .then(() => {\n location.reload()\n })\n .catch((error) => {\n modal.setLoadingState(false)\n this.ctx.modal.notify('error', {\n title: 'Failed to move',\n content: error instanceof Error ? error.message : String(error),\n })\n })\n }}\n >\n <TwinSwapInput\n inputs={[\n {\n label: 'Move from',\n name: 'from',\n value: options?.from,\n },\n {\n label: 'Move to',\n name: 'to',\n value: options?.to,\n },\n ]}\n />\n <div>\n <CheckBox name=\"movetalk\" id=\"movetalk\" checked={options?.movetalk}>\n Move talk page\n </CheckBox>\n </div>\n <div>\n <CheckBox name=\"movesubpages\" id=\"movesubpages\" checked={options?.movesubpages}>\n Move subpage(s) (up to 100)\n </CheckBox>\n </div>\n {this.ctx.sitemeta.hasRight('suppressredirect') && (\n <div>\n <CheckBox name=\"noredirect\" id=\"noredirect\" checked={options?.noredirect}>\n Move without leaving a redirect\n </CheckBox>\n </div>\n )}\n <InputBox label=\"Reason\" id=\"reason\" name=\"reason\" value={options?.reason} />\n <div>\n <ActionButton\n type=\"primary\"\n buttonProps={{\n style: {\n width: '100%',\n },\n }}\n >\n Move\n </ActionButton>\n </div>\n </form>\n ) as HTMLElement\n )\n\n return modal.show()\n }\n\n async movePage(options: MovePageOptions) {\n const { from, to, reason = '', ...rest } = options\n\n if (!from || !to) {\n throw new Error('From and to titles are required.')\n }\n if (from === to) {\n throw new Error('From and to titles cannot be the same.')\n }\n\n const wikiPage = await this.ctx.wikiPage.newFromTitle(from)\n return wikiPage.moveTo(to, reason, rest)\n }\n}\n"],"names":["_PluginQuickMove_decorators","_init","_a","Inject","PluginQuickMove","BasePlugin","ctx","curPageName","canEdit","jsxs","jsx","options","modal","ProgressBar","formRef","el","e","formData","error","TwinSwapInput","CheckBox","InputBox","ActionButton","from","to","reason","rest","__decoratorStart","__decorateElement","__runInitializers"],"mappings":";;;;;;;;;;;;;;;GAAAA,GAAAC,GAAAC;AAsBAF,IAAA,CAACG,EAAO,CAAC,SAAS,UAAU,CAAC,CAAA;AACtB,MAAMC,WAAwBF,IAAAG,GAAW;AAAA,EAC9C,YAAmBC,GAAiB;AAClC,UAAMA,GAAK,CAAA,GAAI,YAAY,GADV,KAAA,MAAAA,GAEjBA,EAAI,IAAI,aAAa,KAAK,UAAU,KAAK,IAAI,CAAC,GAC9CA,EAAI,IAAI,YAAY,KAAK,SAAS,KAAK,IAAI,CAAC;AAAA,EAC9C;AAAA,EAEU,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