@itshixun/qckeditor-vue2 1.0.18 → 1.1.1

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,14 @@ declare const _default: import('vue').DefineComponent<{
27
27
  type: BooleanConstructor;
28
28
  default: boolean;
29
29
  };
30
+ dataNormalizer: {
31
+ type: PropType<(data: string) => string>;
32
+ default: (data: string) => string;
33
+ };
34
+ disableExit: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
30
38
  content: {
31
39
  type: StringConstructor;
32
40
  default: undefined;
@@ -67,6 +75,10 @@ declare const _default: import('vue').DefineComponent<{
67
75
  type: NumberConstructor;
68
76
  default: number;
69
77
  };
78
+ imagePreview: {
79
+ type: PropType<boolean | QCKImagePreviewOptions>;
80
+ default: boolean;
81
+ };
70
82
  }, {
71
83
  currentValue: import('vue').Ref<string>;
72
84
  isActive: import('vue').Ref<boolean>;
@@ -88,6 +100,7 @@ declare const _default: import('vue').DefineComponent<{
88
100
  contentProps: import('vue').ComputedRef<{
89
101
  containerClass: string;
90
102
  sanitize: boolean;
103
+ imagePreview: boolean | QCKImagePreviewOptions;
91
104
  }>;
92
105
  shouldApplyMinHeight: import('vue').ComputedRef<boolean>;
93
106
  activate: () => void;
@@ -97,8 +110,10 @@ declare const _default: import('vue').DefineComponent<{
97
110
  handleClickOutside: (event: MouseEvent) => void;
98
111
  handleReady: (editor: ClassicEditorType) => void;
99
112
  handleDestroy: () => void;
113
+ exitBlocked: import('vue').ComputedRef<boolean>;
114
+ unbindPendingActions: () => void;
100
115
  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<{
116
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "focus" | "input" | "ready" | "destroy" | "update:modelValue" | "exit-blocked")[], string, Readonly<import('vue').ExtractPropTypes<{
102
117
  value: {
103
118
  type: StringConstructor;
104
119
  default: string;
@@ -123,6 +138,14 @@ declare const _default: import('vue').DefineComponent<{
123
138
  type: BooleanConstructor;
124
139
  default: boolean;
125
140
  };
141
+ dataNormalizer: {
142
+ type: PropType<(data: string) => string>;
143
+ default: (data: string) => string;
144
+ };
145
+ disableExit: {
146
+ type: BooleanConstructor;
147
+ default: boolean;
148
+ };
126
149
  content: {
127
150
  type: StringConstructor;
128
151
  default: undefined;
@@ -163,17 +186,24 @@ declare const _default: import('vue').DefineComponent<{
163
186
  type: NumberConstructor;
164
187
  default: number;
165
188
  };
189
+ imagePreview: {
190
+ type: PropType<boolean | QCKImagePreviewOptions>;
191
+ default: boolean;
192
+ };
166
193
  }>>, {
167
194
  value: string;
168
195
  config: EditorConfig;
169
196
  tagName: string;
170
197
  disabled: boolean;
171
198
  disableTwoWayDataBinding: boolean;
199
+ dataNormalizer: (data: string) => string;
172
200
  modelValue: string;
173
201
  placeholder: string;
174
202
  content: string;
175
203
  containerClass: string;
176
204
  sanitize: boolean;
205
+ imagePreview: boolean | QCKImagePreviewOptions;
206
+ disableExit: boolean;
177
207
  minHeight: number;
178
208
  height: number;
179
209
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAM,CAAC;wBACpC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+CK,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;2BAhDnC,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;AAlCzD,wBAoYG"}
@@ -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,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;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.1",
4
4
  "description": "Vue2 components for CKEditor 5",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",