@itshixun/qckeditor-vue2 1.0.18 → 1.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.
@@ -1,4 +1,5 @@
1
1
  import { PropType } from 'vue';
2
+ import { QCKImagePreviewOptions } from '../types';
2
3
  declare const _default: import('vue').DefineComponent<{
3
4
  value: {
4
5
  type: StringConstructor;
@@ -32,12 +33,22 @@ declare const _default: import('vue').DefineComponent<{
32
33
  type: PropType<number>;
33
34
  default: undefined;
34
35
  };
36
+ imagePreview: {
37
+ type: PropType<boolean | QCKImagePreviewOptions>;
38
+ default: boolean;
39
+ };
35
40
  }, {
36
41
  container: import('vue').Ref<HTMLDivElement | null>;
37
42
  renderHtml: import('vue').ComputedRef<string>;
38
43
  containerStyle: import('vue').ComputedRef<{
39
44
  '--ck-content-font-size': string;
40
45
  } | undefined>;
46
+ previewEnabled: import('vue').ComputedRef<boolean>;
47
+ viewerOptions: import('vue').ComputedRef<Required<QCKImagePreviewOptions>>;
48
+ viewerVisible: import('vue').Ref<boolean>;
49
+ viewerImages: import('vue').Ref<string[]>;
50
+ viewerIndex: import('vue').Ref<number>;
51
+ handleContainerClick: (event: MouseEvent) => void;
41
52
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{
42
53
  value: {
43
54
  type: StringConstructor;
@@ -71,6 +82,10 @@ declare const _default: import('vue').DefineComponent<{
71
82
  type: PropType<number>;
72
83
  default: undefined;
73
84
  };
85
+ imagePreview: {
86
+ type: PropType<boolean | QCKImagePreviewOptions>;
87
+ default: boolean;
88
+ };
74
89
  }>>, {
75
90
  value: string;
76
91
  fontSize: number;
@@ -80,6 +95,7 @@ declare const _default: import('vue').DefineComponent<{
80
95
  containerClass: string;
81
96
  sanitize: boolean;
82
97
  highlightCode: boolean;
98
+ imagePreview: boolean | QCKImagePreviewOptions;
83
99
  }>;
84
100
  export default _default;
85
101
  //# sourceMappingURL=QCKContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QCKContent.d.ts","sourceRoot":"","sources":["../../../src/components/QCKContent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAyC,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE3E,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,uCAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgFzB,QAAQ,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAhB,QAAQ,CAAC,MAAM,CAAC;;;;;;;;;;;;;AAjCtC,wBA0LG"}
1
+ {"version":3,"file":"QCKContent.d.ts","sourceRoot":"","sources":["../../../src/components/QCKContent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA0D,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE5F,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,uCAAuC,CAAC;AAK/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8EjC,QAAQ,CAAC,MAAM,CAAC;;;;cAIL,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;kCA4IlC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAhJ7B,QAAQ,CAAC,MAAM,CAAC;;;;cAIL,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;AArC3E,wBAgRG"}
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { ClassicEditor, EditorConfig, EventInfo } from 'ckeditor5';
3
- import { ExtractEditorType } from '../types';
3
+ import { ExtractEditorType, QCKImagePreviewOptions } from '../types';
4
4
  type ClassicEditorType = ExtractEditorType<typeof ClassicEditor>;
5
5
  declare const _default: import('vue').DefineComponent<{
6
6
  value: {
@@ -27,6 +27,10 @@ declare const _default: import('vue').DefineComponent<{
27
27
  type: BooleanConstructor;
28
28
  default: boolean;
29
29
  };
30
+ disableExit: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
30
34
  content: {
31
35
  type: StringConstructor;
32
36
  default: undefined;
@@ -67,6 +71,10 @@ declare const _default: import('vue').DefineComponent<{
67
71
  type: NumberConstructor;
68
72
  default: number;
69
73
  };
74
+ imagePreview: {
75
+ type: PropType<boolean | QCKImagePreviewOptions>;
76
+ default: boolean;
77
+ };
70
78
  }, {
71
79
  currentValue: import('vue').Ref<string>;
72
80
  isActive: import('vue').Ref<boolean>;
@@ -88,6 +96,7 @@ declare const _default: import('vue').DefineComponent<{
88
96
  contentProps: import('vue').ComputedRef<{
89
97
  containerClass: string;
90
98
  sanitize: boolean;
99
+ imagePreview: boolean | QCKImagePreviewOptions;
91
100
  }>;
92
101
  shouldApplyMinHeight: import('vue').ComputedRef<boolean>;
93
102
  activate: () => void;
@@ -97,8 +106,10 @@ declare const _default: import('vue').DefineComponent<{
97
106
  handleClickOutside: (event: MouseEvent) => void;
98
107
  handleReady: (editor: ClassicEditorType) => void;
99
108
  handleDestroy: () => void;
109
+ exitBlocked: import('vue').ComputedRef<boolean>;
110
+ unbindPendingActions: () => void;
100
111
  handleInput: (data: string, event: EventInfo, editor: ClassicEditorType) => void;
101
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "focus" | "input" | "ready" | "destroy" | "update:modelValue")[], string, Readonly<import('vue').ExtractPropTypes<{
112
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "focus" | "input" | "ready" | "destroy" | "update:modelValue" | "exit-blocked")[], string, Readonly<import('vue').ExtractPropTypes<{
102
113
  value: {
103
114
  type: StringConstructor;
104
115
  default: string;
@@ -123,6 +134,10 @@ declare const _default: import('vue').DefineComponent<{
123
134
  type: BooleanConstructor;
124
135
  default: boolean;
125
136
  };
137
+ disableExit: {
138
+ type: BooleanConstructor;
139
+ default: boolean;
140
+ };
126
141
  content: {
127
142
  type: StringConstructor;
128
143
  default: undefined;
@@ -163,6 +178,10 @@ declare const _default: import('vue').DefineComponent<{
163
178
  type: NumberConstructor;
164
179
  default: number;
165
180
  };
181
+ imagePreview: {
182
+ type: PropType<boolean | QCKImagePreviewOptions>;
183
+ default: boolean;
184
+ };
166
185
  }>>, {
167
186
  value: string;
168
187
  config: EditorConfig;
@@ -174,6 +193,8 @@ declare const _default: import('vue').DefineComponent<{
174
193
  content: string;
175
194
  containerClass: string;
176
195
  sanitize: boolean;
196
+ imagePreview: boolean | QCKImagePreviewOptions;
197
+ disableExit: boolean;
177
198
  minHeight: number;
178
199
  height: number;
179
200
  fitHeight: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"QCKEditorPro.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditorPro.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAuD,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAC;;;;;;;;;;;cAoB3C,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA8Ea,MAAM,GAAG,QAAQ;;;;;;;;;;kCA0BjC,KAAK;;6BA2CV,UAAU;gCAsBP,UAAU;0BA4BhB,iBAAiB;;wBAwBnB,MAAM,SAAS,SAAS,UAAU,iBAAiB;;;;;;;;;;;cA7N5D,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlB5C,wBAkVG"}
1
+ {"version":3,"file":"QCKEditorPro.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditorPro.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAuD,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AACzF,OAAO,EAAE,aAAa,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAE1E,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAC;;;;;;;;;;;cAuB3C,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4DX,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;;;;mBAoClB,MAAM,GAAG,QAAQ;;;;;;;;;;;kCA0BjC,KAAK;;6BAiDV,UAAU;gCAsBP,UAAU;0BA4BhB,iBAAiB;;;;wBAyCnB,MAAM,SAAS,SAAS,UAAU,iBAAiB;;;;;;;;;;;cAtQ5D,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4DX,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;AA9E3E,wBA+XG"}
@@ -0,0 +1,52 @@
1
+ import { PropType } from 'vue';
2
+ import { QCKImagePreviewOptions } from '../types';
3
+ declare const _default: import('vue').DefineComponent<{
4
+ images: {
5
+ type: PropType<string[]>;
6
+ required: true;
7
+ };
8
+ initialIndex: {
9
+ type: NumberConstructor;
10
+ required: true;
11
+ };
12
+ options: {
13
+ type: PropType<Required<QCKImagePreviewOptions>>;
14
+ required: true;
15
+ };
16
+ }, {
17
+ overlayRef: import('vue').Ref<HTMLElement | null>;
18
+ currentIndex: import('vue').Ref<number>;
19
+ scale: import('vue').Ref<number>;
20
+ isFullscreen: import('vue').Ref<boolean>;
21
+ imgStyle: import('vue').ComputedRef<{
22
+ transform: string;
23
+ }>;
24
+ resetTransform: () => void;
25
+ close: () => void;
26
+ goTo: (index: number) => void;
27
+ prev: () => void;
28
+ next: () => void;
29
+ zoomIn: () => void;
30
+ zoomOut: () => void;
31
+ onWheel: (event: WheelEvent) => void;
32
+ onPointerDown: (event: PointerEvent) => void;
33
+ resetDragFlag: () => void;
34
+ handleOverlayClick: (event: MouseEvent) => void;
35
+ stop: (event: MouseEvent) => void;
36
+ toggleFullscreen: () => void;
37
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "close"[], string, Readonly<import('vue').ExtractPropTypes<{
38
+ images: {
39
+ type: PropType<string[]>;
40
+ required: true;
41
+ };
42
+ initialIndex: {
43
+ type: NumberConstructor;
44
+ required: true;
45
+ };
46
+ options: {
47
+ type: PropType<Required<QCKImagePreviewOptions>>;
48
+ required: true;
49
+ };
50
+ }>>, {}>;
51
+ export default _default;
52
+ //# sourceMappingURL=QCKImageViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QCKImageViewer.d.ts","sourceRoot":"","sources":["../../../src/components/QCKImageViewer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAqE,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AACvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;;;cA6BlC,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;cAQjB,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;;;;;;;;;;;;;kBAmCvC,MAAM;;;;;qBA6BH,UAAU;2BAUJ,YAAY;;gCAwCP,UAAU;kBAYxB,UAAU;;;;cAtId,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;cAQjB,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;;;;AAbhE,wBA4SG"}
@@ -20,4 +20,18 @@ export interface Props<TEditor> {
20
20
  export type ExtractEditorType<TEditor> = TEditor extends {
21
21
  create(...args: Array<any>): Promise<infer E>;
22
22
  } ? E : never;
23
+ /**
24
+ * QCKContent 图片预览选项。
25
+ * 传 true 等价于全默认配置;传对象可覆盖对应项。
26
+ */
27
+ export interface QCKImagePreviewOptions {
28
+ /** 弹层 z-index,默认 2100 */
29
+ zIndex?: number;
30
+ /** 切换到底/顶后是否循环,默认 true */
31
+ loop?: boolean;
32
+ /** 底部缩略图栏(图片数 > 1 时显示),默认 true */
33
+ navbar?: boolean;
34
+ /** 是否显示全屏按钮,默认 true */
35
+ fullscreen?: boolean;
36
+ }
23
37
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,KAAK,CAAC,OAAO;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,OAAO,IAAI,OAAO,SAAS;IAAE,MAAM,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,KAAK,CAAC,OAAO;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,OAAO,IAAI,OAAO,SAAS;IAAE,MAAM,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAEvH;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itshixun/qckeditor-vue2",
3
- "version": "1.0.18",
3
+ "version": "1.1.0",
4
4
  "description": "Vue2 components for CKEditor 5",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -53,4 +53,4 @@
53
53
  "type": "git",
54
54
  "url": ""
55
55
  }
56
- }
56
+ }