@inshapardaz/likhari-vue 0.1.3 → 0.1.4-dev.310
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/LikhariEditor.d.ts +21 -0
- package/dist/LikhariEditor.d.ts.map +1 -1
- package/dist/likhari-vue.js +32 -25
- package/package.json +1 -1
package/dist/LikhariEditor.d.ts
CHANGED
|
@@ -34,6 +34,12 @@ export declare const LikhariEditor: import("vue").DefineComponent<import("vue").
|
|
|
34
34
|
type: PropType<string | false>;
|
|
35
35
|
default: undefined;
|
|
36
36
|
};
|
|
37
|
+
fontMode: PropType<"selective" | "uniform">;
|
|
38
|
+
fontFamily: StringConstructor;
|
|
39
|
+
zoom: {
|
|
40
|
+
type: NumberConstructor;
|
|
41
|
+
default: undefined;
|
|
42
|
+
};
|
|
37
43
|
featureConfig: PropType<EditorFeatureConfig>;
|
|
38
44
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
39
45
|
[key: string]: any;
|
|
@@ -43,6 +49,10 @@ export declare const LikhariEditor: import("vue").DefineComponent<import("vue").
|
|
|
43
49
|
content: string;
|
|
44
50
|
format: FormatId;
|
|
45
51
|
}) => boolean;
|
|
52
|
+
fontChange: (payload: {
|
|
53
|
+
fontFamily: string | undefined;
|
|
54
|
+
zoom: number;
|
|
55
|
+
}) => boolean;
|
|
46
56
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
57
|
documentId: StringConstructor;
|
|
48
58
|
locale: PropType<string>;
|
|
@@ -68,6 +78,12 @@ export declare const LikhariEditor: import("vue").DefineComponent<import("vue").
|
|
|
68
78
|
type: PropType<string | false>;
|
|
69
79
|
default: undefined;
|
|
70
80
|
};
|
|
81
|
+
fontMode: PropType<"selective" | "uniform">;
|
|
82
|
+
fontFamily: StringConstructor;
|
|
83
|
+
zoom: {
|
|
84
|
+
type: NumberConstructor;
|
|
85
|
+
default: undefined;
|
|
86
|
+
};
|
|
71
87
|
featureConfig: PropType<EditorFeatureConfig>;
|
|
72
88
|
}>> & Readonly<{
|
|
73
89
|
onChange?: ((state: unknown) => any) | undefined;
|
|
@@ -75,10 +91,15 @@ export declare const LikhariEditor: import("vue").DefineComponent<import("vue").
|
|
|
75
91
|
content: string;
|
|
76
92
|
format: FormatId;
|
|
77
93
|
}) => any) | undefined;
|
|
94
|
+
onFontChange?: ((payload: {
|
|
95
|
+
fontFamily: string | undefined;
|
|
96
|
+
zoom: number;
|
|
97
|
+
}) => any) | undefined;
|
|
78
98
|
}>, {
|
|
79
99
|
showSave: boolean;
|
|
80
100
|
autosave: boolean;
|
|
81
101
|
toolbarBordered: boolean;
|
|
82
102
|
helpUrl: string | false;
|
|
103
|
+
zoom: number;
|
|
83
104
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
84
105
|
//# sourceMappingURL=LikhariEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LikhariEditor.d.ts","sourceRoot":"","sources":["../src/LikhariEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8D,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAChG,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAahE;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;YAIJ,QAAQ,CAAC,MAAM,CAAC;iBACX,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC;;;;;;;;;;;;mBAOxB,QAAQ,CAAC,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;;;;;oBAEnD,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC;;cAChB,QAAQ,CAAC,MAAM,GAAG,KAAK,CAAC;;;
|
|
1
|
+
{"version":3,"file":"LikhariEditor.d.ts","sourceRo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;;;4EAsCtE,CAAC"}
|
package/dist/likhari-vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, ref as c, onMounted as h, onBeforeUnmount as g, watch as s, h as m } from "vue";
|
|
2
2
|
import "@inshapardaz/likhari-webcomponent";
|
|
3
|
-
function
|
|
3
|
+
function C(e) {
|
|
4
4
|
return {
|
|
5
5
|
"document-id": e.documentId ?? null,
|
|
6
6
|
locale: e.locale ?? null,
|
|
@@ -13,10 +13,13 @@ function m(e) {
|
|
|
13
13
|
"feature-preset": e.featurePreset ?? null,
|
|
14
14
|
"toolbar-bordered": e.toolbarBordered === void 0 ? null : e.toolbarBordered ? "" : "false",
|
|
15
15
|
"toolbar-variant": e.toolbarVariant ?? null,
|
|
16
|
-
"help-url": e.helpUrl === void 0 ? null : e.helpUrl === !1 ? "false" : e.helpUrl
|
|
16
|
+
"help-url": e.helpUrl === void 0 ? null : e.helpUrl === !1 ? "false" : e.helpUrl,
|
|
17
|
+
"font-mode": e.fontMode ?? null,
|
|
18
|
+
"font-family": e.fontFamily ?? null,
|
|
19
|
+
zoom: e.zoom === void 0 ? null : String(e.zoom)
|
|
17
20
|
};
|
|
18
21
|
}
|
|
19
|
-
const
|
|
22
|
+
const y = f({
|
|
20
23
|
name: "LikhariEditor",
|
|
21
24
|
props: {
|
|
22
25
|
documentId: String,
|
|
@@ -32,47 +35,51 @@ const b = v({
|
|
|
32
35
|
toolbarBordered: { type: Boolean, default: void 0 },
|
|
33
36
|
toolbarVariant: String,
|
|
34
37
|
helpUrl: { type: [String, Boolean], default: void 0 },
|
|
38
|
+
fontMode: String,
|
|
39
|
+
fontFamily: String,
|
|
40
|
+
zoom: { type: Number, default: void 0 },
|
|
35
41
|
featureConfig: Object
|
|
36
42
|
},
|
|
37
43
|
emits: {
|
|
38
44
|
change: (e) => e !== void 0,
|
|
39
|
-
save: (e) => e !== void 0
|
|
45
|
+
save: (e) => e !== void 0,
|
|
46
|
+
fontChange: (e) => e !== void 0
|
|
40
47
|
},
|
|
41
|
-
setup(e, { emit:
|
|
42
|
-
const
|
|
43
|
-
|
|
48
|
+
setup(e, { emit: l, expose: v }) {
|
|
49
|
+
const o = c(null), r = (t) => l("change", t.detail), i = (t) => l("save", t.detail), d = (t) => l("fontChange", t.detail), u = () => {
|
|
50
|
+
o.value && (o.value.featureConfig = e.featureConfig);
|
|
44
51
|
};
|
|
45
52
|
return h(() => {
|
|
46
|
-
var t,
|
|
47
|
-
(t =
|
|
48
|
-
}),
|
|
49
|
-
var t,
|
|
50
|
-
(t =
|
|
51
|
-
}), s(() => e.featureConfig,
|
|
53
|
+
var t, n, a;
|
|
54
|
+
(t = o.value) == null || t.addEventListener("editor-change", r), (n = o.value) == null || n.addEventListener("editor-save", i), (a = o.value) == null || a.addEventListener("editor-font-change", d), u();
|
|
55
|
+
}), g(() => {
|
|
56
|
+
var t, n, a;
|
|
57
|
+
(t = o.value) == null || t.removeEventListener("editor-change", r), (n = o.value) == null || n.removeEventListener("editor-save", i), (a = o.value) == null || a.removeEventListener("editor-font-change", d);
|
|
58
|
+
}), s(() => e.featureConfig, u, { deep: !0 }), v({
|
|
52
59
|
getContent: (t) => {
|
|
53
|
-
var
|
|
54
|
-
return ((
|
|
60
|
+
var n;
|
|
61
|
+
return ((n = o.value) == null ? void 0 : n.getContent(t)) ?? "";
|
|
55
62
|
},
|
|
56
|
-
setContent: (t,
|
|
57
|
-
var
|
|
58
|
-
return (
|
|
63
|
+
setContent: (t, n) => {
|
|
64
|
+
var a;
|
|
65
|
+
return (a = o.value) == null ? void 0 : a.setContent(t, n);
|
|
59
66
|
},
|
|
60
67
|
hasUnsavedChanges: () => {
|
|
61
68
|
var t;
|
|
62
|
-
return ((t =
|
|
69
|
+
return ((t = o.value) == null ? void 0 : t.hasUnsavedChanges()) ?? !1;
|
|
63
70
|
},
|
|
64
71
|
confirmDiscard: () => {
|
|
65
72
|
var t;
|
|
66
|
-
return ((t =
|
|
73
|
+
return ((t = o.value) == null ? void 0 : t.confirmDiscard()) ?? Promise.resolve(!0);
|
|
67
74
|
},
|
|
68
75
|
focus: () => {
|
|
69
76
|
var t;
|
|
70
|
-
return (t =
|
|
77
|
+
return (t = o.value) == null ? void 0 : t.focus();
|
|
71
78
|
}
|
|
72
|
-
}), () =>
|
|
79
|
+
}), () => m("likhari-editor", { ref: o, ...C(e) });
|
|
73
80
|
}
|
|
74
81
|
});
|
|
75
82
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
y as LikhariEditor,
|
|
84
|
+
C as toElementAttributes
|
|
78
85
|
};
|
package/package.json
CHANGED