@inpageedit/core 0.1.0 → 0.2.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/README.md +2 -2
- package/dist/{ActionButton-BhcZX7rl.js → ActionButton-DkQu8dfH.js} +2 -2
- package/dist/{ActionButton-BhcZX7rl.js.map → ActionButton-DkQu8dfH.js.map} +1 -1
- package/dist/InPageEdit.d.ts +8 -3
- package/dist/{CheckBox-B7zLOm55.js → InputBox-B-BAGjgs.js} +11 -11
- package/dist/InputBox-B-BAGjgs.js.map +1 -0
- package/dist/{PluginPreferencesUI-CqQKXQkn.js → PluginPreferencesUI-CHdAGK8T.js} +6 -5
- package/dist/{PluginPreferencesUI-CqQKXQkn.js.map → PluginPreferencesUI-CHdAGK8T.js.map} +1 -1
- package/dist/{RadioBox-Dl-VRoW0.js → RadioBox-CQ9xz5nk.js} +2 -2
- package/dist/{RadioBox-Dl-VRoW0.js.map → RadioBox-CQ9xz5nk.js.map} +1 -1
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +79 -0
- package/dist/components/index.js.map +1 -0
- package/dist/{index-CL0NhE5n.js → index-B02kaEy5.js} +5 -4
- package/dist/{index-CL0NhE5n.js.map → index-B02kaEy5.js.map} +1 -1
- package/dist/{index-BEDkPsz1.js → index-BIFsoDor.js} +18 -17
- package/dist/{index-BEDkPsz1.js.map → index-BIFsoDor.js.map} +1 -1
- package/dist/{index-Hed2P8uH.js → index-C6PwuH_U.js} +18 -17
- package/dist/{index-Hed2P8uH.js.map → index-C6PwuH_U.js.map} +1 -1
- package/dist/{index-LoZLvK3o.js → index-CavCnbOz.js} +20 -19
- package/dist/{index-LoZLvK3o.js.map → index-CavCnbOz.js.map} +1 -1
- package/dist/{index-sORwn1Vt.js → index-D1nQg-aN.js} +10 -9
- package/dist/{index-sORwn1Vt.js.map → index-D1nQg-aN.js.map} +1 -1
- package/dist/index-D3QOS3-Q.js +348 -0
- package/dist/index-D3QOS3-Q.js.map +1 -0
- package/dist/{index-Bz4cBa1Z.js → index-Do5exwYg.js} +36 -35
- package/dist/{index-Bz4cBa1Z.js.map → index-Do5exwYg.js.map} +1 -1
- package/dist/{index-DA5i7w02.js → index-vjK9PEyV.js} +9 -8
- package/dist/{index-DA5i7w02.js.map → index-vjK9PEyV.js.map} +1 -1
- package/dist/{index-Bi1eJIjL.js → index-wYcxrK6G.js} +2 -2
- package/dist/{index-Bi1eJIjL.js.map → index-wYcxrK6G.js.map} +1 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +5120 -5
- package/dist/index.js.map +1 -1
- package/dist/plugins/BasePlugin.d.ts +2 -2
- package/dist/services/ApiService.d.ts +1 -1
- package/dist/services/ResourceLoaderService.d.ts +3 -2
- package/dist/services/SiteMetadataService.d.ts +1 -1
- package/dist/style.css +1 -1
- package/lib/i18n/languages.json +1527 -0
- package/lib/index.umd.js +2666 -0
- package/lib/style.css +1 -0
- package/package.json +55 -9
- package/dist/CheckBox-B7zLOm55.js.map +0 -1
- package/dist/index-CuEf9G7f.js +0 -5459
- package/dist/index-CuEf9G7f.js.map +0 -1
- /package/dist/components/TabView/{TabView.d.ts → index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<!-- prettier-ignore -->
|
|
20
20
|
```javascript
|
|
21
21
|
// InPageEdit NEXT
|
|
22
|
-
$('<script src="https://
|
|
22
|
+
$('<script src="https://unpkg.com/@inpageedit/core" type="module"></script>').appendTo('body')
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## 特色功能 / Features
|
|
@@ -36,7 +36,7 @@ $('<script src="https://esm.run/@inpageedit/core" type="module"></script>').appe
|
|
|
36
36
|
|
|
37
37
|
- 可热插拔的模块化设计
|
|
38
38
|
- 完全使用 TypeScript 编写
|
|
39
|
-
- 超简单的扩展能力,示例插件:[hello-world](./examples/plugins/hello-world.js)
|
|
39
|
+
- 超简单的扩展能力,示例插件:[hello-world](./docs/.templates/examples/plugins/hello-world.js)
|
|
40
40
|
|
|
41
41
|
## Supported languages
|
|
42
42
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as n } from "./index-
|
|
1
|
+
import { j as n } from "./index-D3QOS3-Q.js";
|
|
2
2
|
const c = ({
|
|
3
3
|
type: o,
|
|
4
4
|
link: t,
|
|
@@ -30,4 +30,4 @@ const c = ({
|
|
|
30
30
|
export {
|
|
31
31
|
c as A
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=ActionButton-
|
|
33
|
+
//# sourceMappingURL=ActionButton-DkQu8dfH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButton-
|
|
1
|
+
{"version":3,"file":"ActionButton-DkQu8dfH.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;"}
|
package/dist/InPageEdit.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Context, Inject } from 'cordis';
|
|
1
|
+
import { Context, Inject, Events as CordisEvents } from 'cordis';
|
|
2
2
|
export interface InPageEditCoreConfig {
|
|
3
3
|
baseURL: string | URL;
|
|
4
4
|
legacyPreferences: Record<string, any>;
|
|
5
5
|
}
|
|
6
|
-
export * from 'cordis';
|
|
7
6
|
/**
|
|
8
7
|
* ✏️ InPageEdit NEXT
|
|
9
8
|
*
|
|
@@ -11,7 +10,7 @@ export * from 'cordis';
|
|
|
11
10
|
*
|
|
12
11
|
* @author dragon-fish <dragon-fish@qq.com>
|
|
13
12
|
* @license MIT
|
|
14
|
-
* @see https://github.com/
|
|
13
|
+
* @see https://github.com/inpageedit/inpageedit-next
|
|
15
14
|
*/
|
|
16
15
|
export declare class InPageEdit extends Context {
|
|
17
16
|
#private;
|
|
@@ -23,3 +22,9 @@ export declare class InPageEdit extends Context {
|
|
|
23
22
|
constructor(config?: Partial<InPageEditCoreConfig>);
|
|
24
23
|
useScope(inject: Inject): Promise<this>;
|
|
25
24
|
}
|
|
25
|
+
export { Inject, Schema, Service } from 'cordis';
|
|
26
|
+
export interface Events<C extends InPageEdit = InPageEdit> extends CordisEvents<C> {
|
|
27
|
+
}
|
|
28
|
+
export interface InPageEdit {
|
|
29
|
+
[InPageEdit.events]: Events<this>;
|
|
30
|
+
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import { j as e } from "./index-
|
|
1
|
+
import { j as e } from "./index-D3QOS3-Q.js";
|
|
2
2
|
const h = (s) => {
|
|
3
|
+
const { id: t, name: l, label: a, checked: c, inputProps: i, labelProps: n, children: p, ...o } = s;
|
|
4
|
+
return /* @__PURE__ */ e("label", { className: "theme-ipe ipe-checkbox", ...o, children: [
|
|
5
|
+
/* @__PURE__ */ e("input", { type: "checkbox", id: t, name: l, checked: c, ...i }),
|
|
6
|
+
/* @__PURE__ */ e("span", { className: "ipe-checkbox-box" }),
|
|
7
|
+
/* @__PURE__ */ e("span", { ...n, children: a || p })
|
|
8
|
+
] });
|
|
9
|
+
}, b = (s) => {
|
|
3
10
|
const { label: t, id: l, name: a, value: c, disabled: i, labelProps: n, inputProps: p, ...o } = s;
|
|
4
11
|
return /* @__PURE__ */ e("div", { className: "theme-ipe ipe-input-box", ...o, children: [
|
|
5
12
|
/* @__PURE__ */ e("label", { htmlFor: l, style: { display: "block" }, ...n, children: t }),
|
|
@@ -15,16 +22,9 @@ const h = (s) => {
|
|
|
15
22
|
}
|
|
16
23
|
)
|
|
17
24
|
] });
|
|
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
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
h as C,
|
|
28
|
+
b as I
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=
|
|
30
|
+
//# sourceMappingURL=InputBox-B-BAGjgs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputBox-B-BAGjgs.js","sources":["../src/components/CheckBox.tsx","../src/components/InputBox.tsx"],"sourcesContent":["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","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"],"names":["CheckBox","props","id","name","label","checked","inputProps","labelProps","children","rest","jsxs","jsx","InputBox","value","disabled"],"mappings":";AAWO,MAAMA,IAAW,CAACC,MAAyB;AAChD,QAAM,EAAE,IAAAC,GAAI,MAAAC,GAAM,OAAAC,GAAO,SAAAC,GAAS,YAAAC,GAAY,YAAAC,GAAY,UAAAC,GAAU,GAAGC,EAAA,IAASR;AAChF,SACES,gBAAAA,EAAC,SAAA,EAAM,WAAU,0BAA0B,GAAGD,GAC5C,UAAA;AAAA,IAAA,gBAAAE,EAAC,WAAM,MAAK,YAAW,IAAAT,GAAQ,MAAAC,GAAY,SAAAE,GAAmB,GAAGC,GAAY;AAAA,IAC7E,gBAAAK,EAAC,QAAA,EAAK,WAAU,mBAAA,CAAmB;AAAA,IACnC,gBAAAA,EAAC,QAAA,EAAM,GAAGJ,GAAa,eAASC,EAAA,CAAS;AAAA,EAAA,GAC3C;AAEJ,GCRaI,IAAW,CAACX,MAAyB;AAChD,QAAM,EAAE,OAAAG,GAAO,IAAAF,GAAI,MAAAC,GAAM,OAAAU,GAAO,UAAAC,GAAU,YAAAP,GAAY,YAAAD,GAAY,GAAGG,EAAA,IAASR;AAC9E,SACES,gBAAAA,EAAC,OAAA,EAAI,WAAU,2BAA2B,GAAGD,GAC3C,UAAA;AAAA,IAAA,gBAAAE,EAAC,SAAA,EAAM,SAAST,GAAI,OAAO,EAAE,SAAS,QAAA,GAAY,GAAGK,GAClD,UAAAH,EAAA,CACH;AAAA,IACA,gBAAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,IAAAT;AAAA,QACA,MAAAC;AAAA,QACA,OAAAU;AAAA,QACA,UAAAC;AAAA,QACA,OAAO,EAAE,OAAO,OAAA;AAAA,QACf,GAAGR;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
var jg = Object.defineProperty;
|
|
2
2
|
var Wg = (e, t, n) => t in e ? jg(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Ae = (e, t, n) => Wg(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import {
|
|
4
|
+
import { j as Jo, P as Ug, F as Yg } from "./index-D3QOS3-Q.js";
|
|
5
|
+
import { BasePlugin as qg, Inject as Kg } from "./index.js";
|
|
5
6
|
/**
|
|
6
7
|
* @vue/shared v3.5.21
|
|
7
8
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
@@ -4949,7 +4950,7 @@ const Vy = "n", wl = `.${Vy}-`, Ly = "__", Ny = "--", tv = ev(), nv = Cy({
|
|
|
4949
4950
|
tv.use(nv);
|
|
4950
4951
|
const {
|
|
4951
4952
|
c: V,
|
|
4952
|
-
find:
|
|
4953
|
+
find: RD
|
|
4953
4954
|
} = tv, {
|
|
4954
4955
|
cB: T,
|
|
4955
4956
|
cE: N,
|
|
@@ -33845,7 +33846,7 @@ var pD = Object.create, nu = Object.defineProperty, vD = Object.getOwnPropertyDe
|
|
|
33845
33846
|
return wD(e, o), v && nu(o, n, v), c ? d ^ 4 ? a : v : o;
|
|
33846
33847
|
}, wg, ru, Cg;
|
|
33847
33848
|
wg = [Kg(["preferences", "modal"])];
|
|
33848
|
-
class nc extends (Cg =
|
|
33849
|
+
class nc extends (Cg = qg) {
|
|
33849
33850
|
constructor(t) {
|
|
33850
33851
|
super(t, {}, "preferences-ui"), this.ctx = t, t.set("preferencesUI", this), t.inject(["toolbox"], (n) => {
|
|
33851
33852
|
n.toolbox.addButton({
|
|
@@ -33881,7 +33882,7 @@ class nc extends (Cg = Ug) {
|
|
|
33881
33882
|
outSideClose: !1,
|
|
33882
33883
|
center: !0,
|
|
33883
33884
|
title: "InPageEdit Prefrences",
|
|
33884
|
-
content: /* @__PURE__ */ Jo(
|
|
33885
|
+
content: /* @__PURE__ */ Jo(Yg, { children: /* @__PURE__ */ Jo(Ug, {}) })
|
|
33885
33886
|
});
|
|
33886
33887
|
t.get$wrapper().addClass("dialog");
|
|
33887
33888
|
const n = /* @__PURE__ */ Jo("div", { id: "ipe-preferences-app", style: { minHeight: "65vh" } });
|
|
@@ -33918,4 +33919,4 @@ CD(ru, 1, nc);
|
|
|
33918
33919
|
export {
|
|
33919
33920
|
nc as PluginPreferencesUI
|
|
33920
33921
|
};
|
|
33921
|
-
//# sourceMappingURL=PluginPreferencesUI-
|
|
33922
|
+
//# sourceMappingURL=PluginPreferencesUI-CHdAGK8T.js.map
|