@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 dragon-fish
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
[](https://ipe.js.org/images/logo/InPageEdit.png)
|
|
4
|
+
|
|
5
|
+
# InPageEdit NEXT
|
|
6
|
+
|
|
7
|
+
🚀 MediaWiki 的模块化、可扩展超级增强插件
|
|
8
|
+
|
|
9
|
+
**InPageEdit NEXT**是由机智的小鱼君开发的一款 MediaWiki 多功能插件。主要功能旨在使许多 MediaWiki 的功能在不打开新标签页的情况下完成(包括但不限于编辑),极大加快维护 wiki 的速度。模块化设计、类型定义清晰完整,插件可自由热插拔。
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## 快速上手 / Quick Start
|
|
14
|
+
|
|
15
|
+
[](https://www.jsdelivr.com/package/npm/@inpageedit/core)
|
|
16
|
+
|
|
17
|
+
在*个人 JS 页*添加以下代码:
|
|
18
|
+
|
|
19
|
+
<!-- prettier-ignore -->
|
|
20
|
+
```javascript
|
|
21
|
+
// InPageEdit NEXT
|
|
22
|
+
$('<script src="https://esm.run/@inpageedit/core" type="module"></script>').appendTo('body')
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 特色功能 / Features
|
|
26
|
+
|
|
27
|
+
**编辑者视角 / For wiki editors**
|
|
28
|
+
|
|
29
|
+
- 快速编辑 / Quick Edit
|
|
30
|
+
- 快速移动 / Quick Move
|
|
31
|
+
- 快速重定向 / Quick Redirect
|
|
32
|
+
- 快速差异 / Quick Diff
|
|
33
|
+
- 快速预览 / Quick Preview
|
|
34
|
+
|
|
35
|
+
**开发者视角 / For developers**
|
|
36
|
+
|
|
37
|
+
- 可热插拔的模块化设计
|
|
38
|
+
- 完全使用 TypeScript 编写
|
|
39
|
+
- 超简单的扩展能力,示例插件:[hello-world](./examples/plugins/hello-world.js)
|
|
40
|
+
|
|
41
|
+
## Supported languages
|
|
42
|
+
|
|
43
|
+
> [!NOTE]
|
|
44
|
+
>
|
|
45
|
+
> Currently only English is supported. We're working on i18n support.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
🚀 Modular, Extensible Supercharged Plugin for MediaWiki.
|
|
50
|
+
|
|
51
|
+
> [MIT License](https://opensource.org/licenses/MIT)
|
|
52
|
+
>
|
|
53
|
+
> InPageEdit-NEXT Copyright © 2025-present dragon-fish
|
|
54
|
+
|
|
55
|
+
See more: [GitHub](https://github.com/inpageedit/inpageedit-next) | [Update logs](https://ipe.js.org/update/) | [File issues](https://github.com/inpageedit/inpageedit-next/issues)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { j as n } from "./index-CuEf9G7f.js";
|
|
2
|
+
const c = ({
|
|
3
|
+
type: o,
|
|
4
|
+
link: t,
|
|
5
|
+
target: a,
|
|
6
|
+
buttonProps: i,
|
|
7
|
+
anchorProps: r,
|
|
8
|
+
children: s
|
|
9
|
+
}) => {
|
|
10
|
+
const e = /* @__PURE__ */ n(
|
|
11
|
+
"button",
|
|
12
|
+
{
|
|
13
|
+
className: `theme-ipe ipe-action-button btn btn-${o || "default"}`,
|
|
14
|
+
"data-href": t,
|
|
15
|
+
...i,
|
|
16
|
+
children: s
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
return t ? /* @__PURE__ */ n(
|
|
20
|
+
"a",
|
|
21
|
+
{
|
|
22
|
+
className: "theme-ipe ipe-action-button ipe-link-button",
|
|
23
|
+
href: t,
|
|
24
|
+
target: a,
|
|
25
|
+
...r,
|
|
26
|
+
children: e
|
|
27
|
+
}
|
|
28
|
+
) : e;
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
c as A
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=ActionButton-BhcZX7rl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionButton-BhcZX7rl.js","sources":["../src/components/ActionButton.tsx"],"sourcesContent":["import { JSX, ReactNode } from 'jsx-dom'\n\nexport const ActionButton = ({\n type,\n link,\n target,\n buttonProps,\n anchorProps,\n children,\n}: {\n type?: 'primary' | 'secondary' | 'danger'\n link?: string\n target?: string\n anchorProps?: JSX.IntrinsicElements['a']\n buttonProps?: JSX.IntrinsicElements['button']\n children?: ReactNode\n}) => {\n const button = (\n <button\n className={`theme-ipe ipe-action-button btn btn-${type || 'default'}`}\n data-href={link}\n {...buttonProps}\n >\n {children}\n </button>\n )\n if (!link) {\n return button\n } else {\n return (\n <a\n className=\"theme-ipe ipe-action-button ipe-link-button\"\n href={link}\n target={target}\n {...anchorProps}\n >\n {button}\n </a>\n )\n }\n}\n"],"names":["ActionButton","type","link","target","buttonProps","anchorProps","children","button","jsx"],"mappings":";AAEO,MAAMA,IAAe,CAAC;AAAA,EAC3B,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AACF,MAOM;AACJ,QAAMC,IACJ,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,uCAAuCP,KAAQ,SAAS;AAAA,MACnE,aAAWC;AAAA,MACV,GAAGE;AAAA,MAEH,UAAAE;AAAA,IAAA;AAAA,EAAA;AAGL,SAAKJ,IAID,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,MAAMN;AAAA,MACN,QAAAC;AAAA,MACC,GAAGE;AAAA,MAEH,UAAAE;AAAA,IAAA;AAAA,EAAA,IATEA;AAaX;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { j as e } from "./index-CuEf9G7f.js";
|
|
2
|
+
const h = (s) => {
|
|
3
|
+
const { label: t, id: l, name: a, value: c, disabled: i, labelProps: n, inputProps: p, ...o } = s;
|
|
4
|
+
return /* @__PURE__ */ e("div", { className: "theme-ipe ipe-input-box", ...o, children: [
|
|
5
|
+
/* @__PURE__ */ e("label", { htmlFor: l, style: { display: "block" }, ...n, children: t }),
|
|
6
|
+
/* @__PURE__ */ e(
|
|
7
|
+
"input",
|
|
8
|
+
{
|
|
9
|
+
id: l,
|
|
10
|
+
name: a,
|
|
11
|
+
value: c,
|
|
12
|
+
disabled: i,
|
|
13
|
+
style: { width: "100%" },
|
|
14
|
+
...p
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
] });
|
|
18
|
+
}, b = (s) => {
|
|
19
|
+
const { id: t, name: l, label: a, checked: c, inputProps: i, labelProps: n, children: p, ...o } = s;
|
|
20
|
+
return /* @__PURE__ */ e("label", { className: "theme-ipe ipe-checkbox", ...o, children: [
|
|
21
|
+
/* @__PURE__ */ e("input", { type: "checkbox", id: t, name: l, checked: c, ...i }),
|
|
22
|
+
/* @__PURE__ */ e("span", { className: "ipe-checkbox-box" }),
|
|
23
|
+
/* @__PURE__ */ e("span", { ...n, children: a || p })
|
|
24
|
+
] });
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
b as C,
|
|
28
|
+
h as I
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=CheckBox-B7zLOm55.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckBox-B7zLOm55.js","sources":["../src/components/InputBox.tsx","../src/components/CheckBox.tsx"],"sourcesContent":["import { JSX } from 'jsx-dom'\n\nexport type InputBoxProps = {\n label: string\n id?: string\n name: string\n value?: string\n disabled?: boolean\n labelProps?: JSX.IntrinsicElements['label']\n inputProps?: JSX.IntrinsicElements['input']\n} & JSX.IntrinsicElements['div']\n\nexport const InputBox = (props: InputBoxProps) => {\n const { label, id, name, value, disabled, labelProps, inputProps, ...rest } = props\n return (\n <div className=\"theme-ipe ipe-input-box\" {...rest}>\n <label htmlFor={id} style={{ display: 'block' }} {...labelProps}>\n {label}\n </label>\n <input\n id={id}\n name={name}\n value={value}\n disabled={disabled}\n style={{ width: '100%' }}\n {...inputProps}\n />\n </div>\n )\n}\n","import { JSX, ReactNode } from 'jsx-dom'\n\nexport type CheckBoxProps = {\n id?: string\n name: string\n label?: string | HTMLElement\n checked?: boolean\n inputProps?: JSX.IntrinsicElements['input']\n labelProps?: JSX.IntrinsicElements['span']\n} & JSX.IntrinsicElements['label']\n\nexport const CheckBox = (props: CheckBoxProps) => {\n const { id, name, label, checked, inputProps, labelProps, children, ...rest } = props\n return (\n <label className=\"theme-ipe ipe-checkbox\" {...rest}>\n <input type=\"checkbox\" id={id} name={name} checked={checked} {...inputProps} />\n <span className=\"ipe-checkbox-box\"></span>\n <span {...labelProps}>{label || children}</span>\n </label>\n )\n}\n"],"names":["InputBox","props","label","id","name","value","disabled","labelProps","inputProps","rest","jsxs","jsx","CheckBox","checked","children"],"mappings":";AAYO,MAAMA,IAAW,CAACC,MAAyB;AAChD,QAAM,EAAE,OAAAC,GAAO,IAAAC,GAAI,MAAAC,GAAM,OAAAC,GAAO,UAAAC,GAAU,YAAAC,GAAY,YAAAC,GAAY,GAAGC,EAAA,IAASR;AAC9E,SACES,gBAAAA,EAAC,OAAA,EAAI,WAAU,2BAA2B,GAAGD,GAC3C,UAAA;AAAA,IAAA,gBAAAE,EAAC,SAAA,EAAM,SAASR,GAAI,OAAO,EAAE,SAAS,QAAA,GAAY,GAAGI,GAClD,UAAAL,EAAA,CACH;AAAA,IACA,gBAAAS;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,IAAAR;AAAA,QACA,MAAAC;AAAA,QACA,OAAAC;AAAA,QACA,UAAAC;AAAA,QACA,OAAO,EAAE,OAAO,OAAA;AAAA,QACf,GAAGE;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ,GClBaI,IAAW,CAACX,MAAyB;AAChD,QAAM,EAAE,IAAAE,GAAI,MAAAC,GAAM,OAAAF,GAAO,SAAAW,GAAS,YAAAL,GAAY,YAAAD,GAAY,UAAAO,GAAU,GAAGL,EAAA,IAASR;AAChF,SACES,gBAAAA,EAAC,SAAA,EAAM,WAAU,0BAA0B,GAAGD,GAC5C,UAAA;AAAA,IAAA,gBAAAE,EAAC,WAAM,MAAK,YAAW,IAAAR,GAAQ,MAAAC,GAAY,SAAAS,GAAmB,GAAGL,GAAY;AAAA,IAC7E,gBAAAG,EAAC,QAAA,EAAK,WAAU,mBAAA,CAAmB;AAAA,IACnC,gBAAAA,EAAC,QAAA,EAAM,GAAGJ,GAAa,eAASO,EAAA,CAAS;AAAA,EAAA,GAC3C;AAEJ;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Context, Inject } from 'cordis';
|
|
2
|
+
export interface InPageEditCoreConfig {
|
|
3
|
+
baseURL: string | URL;
|
|
4
|
+
legacyPreferences: Record<string, any>;
|
|
5
|
+
}
|
|
6
|
+
export * from 'cordis';
|
|
7
|
+
/**
|
|
8
|
+
* ✏️ InPageEdit NEXT
|
|
9
|
+
*
|
|
10
|
+
* 🚀 Modular, Extensible Supercharged Plugin for MediaWiki
|
|
11
|
+
*
|
|
12
|
+
* @author dragon-fish <dragon-fish@qq.com>
|
|
13
|
+
* @license MIT
|
|
14
|
+
* @see https://github.com/Dragon-Fish/InPageEdit-v2
|
|
15
|
+
*/
|
|
16
|
+
export declare class InPageEdit extends Context {
|
|
17
|
+
#private;
|
|
18
|
+
config: InPageEditCoreConfig;
|
|
19
|
+
static DEFAULT_CONFIG: InPageEditCoreConfig;
|
|
20
|
+
Endpoints: typeof globalThis.Endpoints;
|
|
21
|
+
Schema: Schemastery.Static;
|
|
22
|
+
readonly version: string;
|
|
23
|
+
constructor(config?: Partial<InPageEditCoreConfig>);
|
|
24
|
+
useScope(inject: Inject): Promise<this>;
|
|
25
|
+
}
|