ckeditor5-symfony 1.0.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.
Files changed (174) hide show
  1. package/dist/ckeditor5-symfony-error.d.ts +7 -0
  2. package/dist/ckeditor5-symfony-error.d.ts.map +1 -0
  3. package/dist/elements/context/context.d.ts +18 -0
  4. package/dist/elements/context/context.d.ts.map +1 -0
  5. package/dist/elements/context/contexts-registry.d.ts +9 -0
  6. package/dist/elements/context/contexts-registry.d.ts.map +1 -0
  7. package/dist/elements/context/index.d.ts +4 -0
  8. package/dist/elements/context/index.d.ts.map +1 -0
  9. package/dist/elements/context/typings.d.ts +34 -0
  10. package/dist/elements/context/typings.d.ts.map +1 -0
  11. package/dist/elements/editable.d.ts +18 -0
  12. package/dist/elements/editable.d.ts.map +1 -0
  13. package/dist/elements/editor/custom-editor-plugins.d.ts +54 -0
  14. package/dist/elements/editor/custom-editor-plugins.d.ts.map +1 -0
  15. package/dist/elements/editor/editor.d.ts +23 -0
  16. package/dist/elements/editor/editor.d.ts.map +1 -0
  17. package/dist/elements/editor/editors-registry.d.ts +9 -0
  18. package/dist/elements/editor/editors-registry.d.ts.map +1 -0
  19. package/dist/elements/editor/index.d.ts +3 -0
  20. package/dist/elements/editor/index.d.ts.map +1 -0
  21. package/dist/elements/editor/plugins/index.d.ts +2 -0
  22. package/dist/elements/editor/plugins/index.d.ts.map +1 -0
  23. package/dist/elements/editor/plugins/sync-editor-with-input.d.ts +6 -0
  24. package/dist/elements/editor/plugins/sync-editor-with-input.d.ts.map +1 -0
  25. package/dist/elements/editor/typings.d.ts +99 -0
  26. package/dist/elements/editor/typings.d.ts.map +1 -0
  27. package/dist/elements/editor/utils/create-editor-in-context.d.ts +44 -0
  28. package/dist/elements/editor/utils/create-editor-in-context.d.ts.map +1 -0
  29. package/dist/elements/editor/utils/index.d.ts +12 -0
  30. package/dist/elements/editor/utils/index.d.ts.map +1 -0
  31. package/dist/elements/editor/utils/is-single-root-editor.d.ts +9 -0
  32. package/dist/elements/editor/utils/is-single-root-editor.d.ts.map +1 -0
  33. package/dist/elements/editor/utils/load-editor-constructor.d.ts +9 -0
  34. package/dist/elements/editor/utils/load-editor-constructor.d.ts.map +1 -0
  35. package/dist/elements/editor/utils/load-editor-plugins.d.ts +20 -0
  36. package/dist/elements/editor/utils/load-editor-plugins.d.ts.map +1 -0
  37. package/dist/elements/editor/utils/load-editor-translations.d.ts +14 -0
  38. package/dist/elements/editor/utils/load-editor-translations.d.ts.map +1 -0
  39. package/dist/elements/editor/utils/normalize-custom-translations.d.ts +11 -0
  40. package/dist/elements/editor/utils/normalize-custom-translations.d.ts.map +1 -0
  41. package/dist/elements/editor/utils/query-all-editor-ids.d.ts +5 -0
  42. package/dist/elements/editor/utils/query-all-editor-ids.d.ts.map +1 -0
  43. package/dist/elements/editor/utils/query-editor-editables.d.ts +25 -0
  44. package/dist/elements/editor/utils/query-editor-editables.d.ts.map +1 -0
  45. package/dist/elements/editor/utils/resolve-editor-config-elements-references.d.ts +9 -0
  46. package/dist/elements/editor/utils/resolve-editor-config-elements-references.d.ts.map +1 -0
  47. package/dist/elements/editor/utils/set-editor-editable-height.d.ts +9 -0
  48. package/dist/elements/editor/utils/set-editor-editable-height.d.ts.map +1 -0
  49. package/dist/elements/editor/utils/wrap-with-watchdog.d.ts +24 -0
  50. package/dist/elements/editor/utils/wrap-with-watchdog.d.ts.map +1 -0
  51. package/dist/elements/index.d.ts +6 -0
  52. package/dist/elements/index.d.ts.map +1 -0
  53. package/dist/elements/register-custom-elements.d.ts +5 -0
  54. package/dist/elements/register-custom-elements.d.ts.map +1 -0
  55. package/dist/elements/ui-part.d.ts +18 -0
  56. package/dist/elements/ui-part.d.ts.map +1 -0
  57. package/dist/index.cjs +5 -0
  58. package/dist/index.cjs.map +1 -0
  59. package/dist/index.d.ts +3 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.mjs +1089 -0
  62. package/dist/index.mjs.map +1 -0
  63. package/dist/shared/async-registry.d.ts +136 -0
  64. package/dist/shared/async-registry.d.ts.map +1 -0
  65. package/dist/shared/camel-case.d.ts +8 -0
  66. package/dist/shared/camel-case.d.ts.map +1 -0
  67. package/dist/shared/debounce.d.ts +2 -0
  68. package/dist/shared/debounce.d.ts.map +1 -0
  69. package/dist/shared/deep-camel-case-keys.d.ts +8 -0
  70. package/dist/shared/deep-camel-case-keys.d.ts.map +1 -0
  71. package/dist/shared/filter-object-values.d.ts +9 -0
  72. package/dist/shared/filter-object-values.d.ts.map +1 -0
  73. package/dist/shared/index.d.ts +15 -0
  74. package/dist/shared/index.d.ts.map +1 -0
  75. package/dist/shared/is-empty-object.d.ts +2 -0
  76. package/dist/shared/is-empty-object.d.ts.map +1 -0
  77. package/dist/shared/is-plain-object.d.ts +8 -0
  78. package/dist/shared/is-plain-object.d.ts.map +1 -0
  79. package/dist/shared/map-object-values.d.ts +11 -0
  80. package/dist/shared/map-object-values.d.ts.map +1 -0
  81. package/dist/shared/once.d.ts +2 -0
  82. package/dist/shared/once.d.ts.map +1 -0
  83. package/dist/shared/shallow-equal.d.ts +9 -0
  84. package/dist/shared/shallow-equal.d.ts.map +1 -0
  85. package/dist/shared/timeout.d.ts +8 -0
  86. package/dist/shared/timeout.d.ts.map +1 -0
  87. package/dist/shared/uid.d.ts +7 -0
  88. package/dist/shared/uid.d.ts.map +1 -0
  89. package/dist/shared/wait-for-dom-ready.d.ts +5 -0
  90. package/dist/shared/wait-for-dom-ready.d.ts.map +1 -0
  91. package/dist/shared/wait-for.d.ts +20 -0
  92. package/dist/shared/wait-for.d.ts.map +1 -0
  93. package/dist/types/can-be-promise.type.d.ts +2 -0
  94. package/dist/types/can-be-promise.type.d.ts.map +1 -0
  95. package/dist/types/index.d.ts +3 -0
  96. package/dist/types/index.d.ts.map +1 -0
  97. package/dist/types/required-by.type.d.ts +2 -0
  98. package/dist/types/required-by.type.d.ts.map +1 -0
  99. package/package.json +40 -0
  100. package/src/ckeditor5-symfony-error.ts +9 -0
  101. package/src/elements/context/context.test.ts +291 -0
  102. package/src/elements/context/context.ts +99 -0
  103. package/src/elements/context/contexts-registry.test.ts +10 -0
  104. package/src/elements/context/contexts-registry.ts +10 -0
  105. package/src/elements/context/index.ts +3 -0
  106. package/src/elements/context/typings.ts +39 -0
  107. package/src/elements/editable.test.ts +334 -0
  108. package/src/elements/editable.ts +114 -0
  109. package/src/elements/editor/custom-editor-plugins.test.ts +103 -0
  110. package/src/elements/editor/custom-editor-plugins.ts +86 -0
  111. package/src/elements/editor/editor.test.ts +438 -0
  112. package/src/elements/editor/editor.ts +279 -0
  113. package/src/elements/editor/editors-registry.test.ts +10 -0
  114. package/src/elements/editor/editors-registry.ts +10 -0
  115. package/src/elements/editor/index.ts +2 -0
  116. package/src/elements/editor/plugins/index.ts +1 -0
  117. package/src/elements/editor/plugins/sync-editor-with-input.ts +78 -0
  118. package/src/elements/editor/typings.ts +114 -0
  119. package/src/elements/editor/utils/create-editor-in-context.ts +90 -0
  120. package/src/elements/editor/utils/index.ts +11 -0
  121. package/src/elements/editor/utils/is-single-root-editor.test.ts +40 -0
  122. package/src/elements/editor/utils/is-single-root-editor.ts +11 -0
  123. package/src/elements/editor/utils/load-editor-constructor.test.ts +62 -0
  124. package/src/elements/editor/utils/load-editor-constructor.ts +29 -0
  125. package/src/elements/editor/utils/load-editor-plugins.test.ts +100 -0
  126. package/src/elements/editor/utils/load-editor-plugins.ts +73 -0
  127. package/src/elements/editor/utils/load-editor-translations.ts +233 -0
  128. package/src/elements/editor/utils/normalize-custom-translations.test.ts +152 -0
  129. package/src/elements/editor/utils/normalize-custom-translations.ts +18 -0
  130. package/src/elements/editor/utils/query-all-editor-ids.ts +9 -0
  131. package/src/elements/editor/utils/query-editor-editables.ts +101 -0
  132. package/src/elements/editor/utils/resolve-editor-config-elements-references.test.ts +93 -0
  133. package/src/elements/editor/utils/resolve-editor-config-elements-references.ts +36 -0
  134. package/src/elements/editor/utils/set-editor-editable-height.test.ts +131 -0
  135. package/src/elements/editor/utils/set-editor-editable-height.ts +15 -0
  136. package/src/elements/editor/utils/wrap-with-watchdog.test.ts +45 -0
  137. package/src/elements/editor/utils/wrap-with-watchdog.ts +51 -0
  138. package/src/elements/index.ts +14 -0
  139. package/src/elements/register-custom-elements.ts +24 -0
  140. package/src/elements/ui-part.test.ts +142 -0
  141. package/src/elements/ui-part.ts +80 -0
  142. package/src/index.ts +6 -0
  143. package/src/shared/async-registry.test.ts +737 -0
  144. package/src/shared/async-registry.ts +353 -0
  145. package/src/shared/camel-case.test.ts +35 -0
  146. package/src/shared/camel-case.ts +11 -0
  147. package/src/shared/debounce.test.ts +72 -0
  148. package/src/shared/debounce.ts +16 -0
  149. package/src/shared/deep-camel-case-keys.test.ts +34 -0
  150. package/src/shared/deep-camel-case-keys.ts +26 -0
  151. package/src/shared/filter-object-values.test.ts +25 -0
  152. package/src/shared/filter-object-values.ts +17 -0
  153. package/src/shared/index.ts +14 -0
  154. package/src/shared/is-empty-object.test.ts +78 -0
  155. package/src/shared/is-empty-object.ts +3 -0
  156. package/src/shared/is-plain-object.test.ts +38 -0
  157. package/src/shared/is-plain-object.ts +15 -0
  158. package/src/shared/map-object-values.test.ts +29 -0
  159. package/src/shared/map-object-values.ts +19 -0
  160. package/src/shared/once.test.ts +116 -0
  161. package/src/shared/once.ts +12 -0
  162. package/src/shared/shallow-equal.test.ts +51 -0
  163. package/src/shared/shallow-equal.ts +30 -0
  164. package/src/shared/timeout.test.ts +65 -0
  165. package/src/shared/timeout.ts +13 -0
  166. package/src/shared/uid.test.ts +25 -0
  167. package/src/shared/uid.ts +8 -0
  168. package/src/shared/wait-for-dom-ready.test.ts +87 -0
  169. package/src/shared/wait-for-dom-ready.ts +21 -0
  170. package/src/shared/wait-for.test.ts +24 -0
  171. package/src/shared/wait-for.ts +56 -0
  172. package/src/types/can-be-promise.type.ts +1 -0
  173. package/src/types/index.ts +2 -0
  174. package/src/types/required-by.type.ts +1 -0
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Custom error class for CKEditor5 Symfony-related errors.
3
+ */
4
+ export declare class CKEditor5SymfonyError extends Error {
5
+ constructor(message: string);
6
+ }
7
+ //# sourceMappingURL=ckeditor5-symfony-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ckeditor5-symfony-error.d.ts","sourceRoot":"","sources":["../../src/ckeditor5-symfony-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The Symfony hook that mounts CKEditor context instances.
3
+ */
4
+ export declare class ContextComponentElement extends HTMLElement {
5
+ /**
6
+ * The promise that resolves to the context instance.
7
+ */
8
+ private contextPromise;
9
+ /**
10
+ * Mounts the context component.
11
+ */
12
+ connectedCallback(): Promise<void>;
13
+ /**
14
+ * Destroys the context component. Unmounts root from the editor.
15
+ */
16
+ disconnectedCallback(): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/elements/context/context.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;IACtD;;OAEG;IACH,OAAO,CAAC,cAAc,CAAkD;IAExE;;OAEG;IACG,iBAAiB;IAkDvB;;OAEG;IACG,oBAAoB;CAoB3B"}
@@ -0,0 +1,9 @@
1
+ import { Context, ContextWatchdog } from 'ckeditor5';
2
+ import { AsyncRegistry } from '../../shared';
3
+ /**
4
+ * It provides a way to register contexts and execute callbacks on them when they are available.
5
+ */
6
+ export declare class ContextsRegistry extends AsyncRegistry<ContextWatchdog<Context>> {
7
+ static readonly the: ContextsRegistry;
8
+ }
9
+ //# sourceMappingURL=contexts-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contexts-registry.d.ts","sourceRoot":"","sources":["../../../../src/elements/context/contexts-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3E,MAAM,CAAC,QAAQ,CAAC,GAAG,mBAA0B;CAC9C"}
@@ -0,0 +1,4 @@
1
+ export * from './context';
2
+ export * from './contexts-registry';
3
+ export * from './typings';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { WatchdogConfig } from 'ckeditor5';
2
+ import { EditorCustomTranslationsDictionary, EditorPlugin } from '../editor';
3
+ /**
4
+ * Configuration object for CKEditor5 context instance.
5
+ */
6
+ export type ContextConfig = {
7
+ /**
8
+ * Optional custom translations for the editor.
9
+ * This allows for localization of the editor interface.
10
+ */
11
+ customTranslations?: EditorCustomTranslationsDictionary | null;
12
+ /**
13
+ * Watchdog configuration for the context.
14
+ */
15
+ watchdogConfig: WatchdogConfig | null;
16
+ /**
17
+ * Configuration options for the context instance.
18
+ */
19
+ config: ContextCreatorConfig;
20
+ };
21
+ /**
22
+ * Configuration options for the context instance.
23
+ */
24
+ export type ContextCreatorConfig = {
25
+ /**
26
+ * Array of plugin identifiers to be loaded by the editor.
27
+ */
28
+ plugins?: EditorPlugin[];
29
+ /**
30
+ * Other configuration options are flexible and can be any key-value pairs.
31
+ */
32
+ [key: string]: any;
33
+ };
34
+ //# sourceMappingURL=typings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../../../src/elements/context/typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,kCAAkC,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,kCAAkC,GAAG,IAAI,CAAC;IAE/D;;OAEG;IACH,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IAEtC;;OAEG;IACH,MAAM,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAEzB;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Editable hook for Symfony. It allows you to create editables for multi-root editors.
3
+ */
4
+ export declare class EditableComponentElement extends HTMLElement {
5
+ /**
6
+ * The promise that resolves when the editable is mounted.
7
+ */
8
+ private editorPromise;
9
+ /**
10
+ * Mounts the editable component.
11
+ */
12
+ connectedCallback(): Promise<void>;
13
+ /**
14
+ * Destroys the editable component. Unmounts root from the editor.
15
+ */
16
+ disconnectedCallback(): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=editable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["../../../src/elements/editable.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,WAAW;IACvD;;OAEG;IACH,OAAO,CAAC,aAAa,CAAyC;IAE9D;;OAEG;IACG,iBAAiB;IAuEvB;;OAEG;IACG,oBAAoB;CAoB3B"}
@@ -0,0 +1,54 @@
1
+ import { PluginConstructor } from 'ckeditor5';
2
+ import { CanBePromise } from '../../types';
3
+ type PluginReader = () => CanBePromise<PluginConstructor>;
4
+ /**
5
+ * Registry for custom CKEditor plugins.
6
+ * Allows registration and retrieval of custom plugins that can be used alongside built-in plugins.
7
+ */
8
+ export declare class CustomEditorPluginsRegistry {
9
+ static readonly the: CustomEditorPluginsRegistry;
10
+ /**
11
+ * Map of registered custom plugins.
12
+ */
13
+ private readonly plugins;
14
+ /**
15
+ * Private constructor to enforce singleton pattern.
16
+ */
17
+ private constructor();
18
+ /**
19
+ * Registers a custom plugin for the CKEditor.
20
+ *
21
+ * @param name The name of the plugin.
22
+ * @param reader The plugin reader function that returns the plugin constructor.
23
+ * @returns A function to unregister the plugin.
24
+ */
25
+ register(name: string, reader: PluginReader): () => void;
26
+ /**
27
+ * Removes a custom plugin by its name.
28
+ *
29
+ * @param name The name of the plugin to unregister.
30
+ * @throws Will throw an error if the plugin is not registered.
31
+ */
32
+ unregister(name: string): void;
33
+ /**
34
+ * Removes all custom editor plugins.
35
+ * This is useful for cleanup in tests or when reloading plugins.
36
+ */
37
+ unregisterAll(): void;
38
+ /**
39
+ * Retrieves a custom plugin by its name.
40
+ *
41
+ * @param name The name of the plugin.
42
+ * @returns The plugin constructor or undefined if not found.
43
+ */
44
+ get(name: string): Promise<PluginConstructor | undefined>;
45
+ /**
46
+ * Checks if a plugin with the given name is registered.
47
+ *
48
+ * @param name The name of the plugin.
49
+ * @returns `true` if the plugin is registered, `false` otherwise.
50
+ */
51
+ has(name: string): boolean;
52
+ }
53
+ export {};
54
+ //# sourceMappingURL=custom-editor-plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-editor-plugins.d.ts","sourceRoot":"","sources":["../../../../src/elements/editor/custom-editor-plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,KAAK,YAAY,GAAG,MAAM,YAAY,CAAC,iBAAiB,CAAC,CAAC;AAE1D;;;GAGG;AACH,qBAAa,2BAA2B;IACtC,MAAM,CAAC,QAAQ,CAAC,GAAG,8BAAqC;IAExD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmC;IAE3D;;OAEG;IACH,OAAO;IAEP;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI;IAUxD;;;;;OAKG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQ9B;;;OAGG;IACH,aAAa,IAAI,IAAI;IAIrB;;;;;OAKG;IACG,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;IAM/D;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAG3B"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The Symfony hook that manages the lifecycle of CKEditor5 instances.
3
+ */
4
+ export declare class EditorComponentElement extends HTMLElement {
5
+ /**
6
+ * The promise that resolves to the editor instance.
7
+ */
8
+ private editorPromise;
9
+ /**
10
+ * Mounts the editor component.
11
+ */
12
+ connectedCallback(): Promise<void>;
13
+ /**
14
+ * Destroys the editor instance when the component is destroyed.
15
+ * This is important to prevent memory leaks and ensure that the editor is properly cleaned up.
16
+ */
17
+ disconnectedCallback(): Promise<void>;
18
+ /**
19
+ * Creates the CKEditor instance.
20
+ */
21
+ private createEditor;
22
+ }
23
+ //# sourceMappingURL=editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../../src/elements/editor/editor.ts"],"names":[],"mappings":"AAyBA;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;IACrD;;OAEG;IACH,OAAO,CAAC,aAAa,CAAgC;IAErD;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAiCxC;;;OAGG;IACG,oBAAoB;IAmC1B;;OAEG;YACW,YAAY;CA4H3B"}
@@ -0,0 +1,9 @@
1
+ import { Editor } from 'ckeditor5';
2
+ import { AsyncRegistry } from '../../shared/async-registry';
3
+ /**
4
+ * It provides a way to register editors and execute callbacks on them when they are available.
5
+ */
6
+ export declare class EditorsRegistry extends AsyncRegistry<Editor> {
7
+ static readonly the: EditorsRegistry;
8
+ }
9
+ //# sourceMappingURL=editors-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editors-registry.d.ts","sourceRoot":"","sources":["../../../../src/elements/editor/editors-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;GAEG;AACH,qBAAa,eAAgB,SAAQ,aAAa,CAAC,MAAM,CAAC;IACxD,MAAM,CAAC,QAAQ,CAAC,GAAG,kBAAyB;CAC7C"}
@@ -0,0 +1,3 @@
1
+ export * from './editor';
2
+ export * from './typings';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/editor/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './sync-editor-with-input';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { PluginConstructor } from 'ckeditor5';
2
+ /**
3
+ * Creates a SyncEditorWithInput plugin class.
4
+ */
5
+ export declare function createSyncEditorWithInputPlugin(saveDebounceMs: number): Promise<PluginConstructor>;
6
+ //# sourceMappingURL=sync-editor-with-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-editor-with-input.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/plugins/sync-editor-with-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAIlE;;GAEG;AACH,wBAAsB,+BAA+B,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAsExG"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Represents a unique identifier for a CKEditor5 editor instance.
3
+ * This is typically the ID of the HTML element that the editor is attached to.
4
+ */
5
+ export type EditorId = string;
6
+ /**
7
+ * Defines editor type supported by CKEditor5.
8
+ */
9
+ export type EditorType = 'inline' | 'classic' | 'balloon' | 'decoupled' | 'multiroot';
10
+ /**
11
+ * Represents a CKEditor5 plugin as a string identifier.
12
+ */
13
+ export type EditorPlugin = string;
14
+ /**
15
+ * Configuration object for CKEditor5 editor instance.
16
+ */
17
+ export type EditorConfig = {
18
+ /**
19
+ * Array of plugin identifiers to be loaded by the editor.
20
+ */
21
+ plugins: EditorPlugin[];
22
+ /**
23
+ * Other configuration options are flexible and can be any key-value pairs.
24
+ */
25
+ [key: string]: any;
26
+ };
27
+ /**
28
+ * Configuration object for CKEditor5 cloud services.
29
+ */
30
+ export type EditorCloudConfig = {
31
+ /**
32
+ * The version of CKEditor5 being used.
33
+ */
34
+ editorVersion: string;
35
+ /**
36
+ * Indicates whether the CKEditor5 instance is a premium version.
37
+ */
38
+ premium: boolean;
39
+ /**
40
+ * List of language codes for translations available in the CKEditor5 instance.
41
+ */
42
+ translations: string[];
43
+ /**
44
+ * Configuration for CKEditor5's upload adapter.
45
+ */
46
+ ckbox: {
47
+ version: string;
48
+ theme: string | null;
49
+ } | null;
50
+ };
51
+ /**
52
+ * Configuration object for the CKEditor5 hook.
53
+ */
54
+ export type EditorPreset = {
55
+ /**
56
+ * The configuration of the cloud.
57
+ */
58
+ cloud: EditorCloudConfig | null;
59
+ /**
60
+ * The type of CKEditor5 editor to use.
61
+ * Must be one of the predefined types: 'inline', 'classic', 'balloon', 'decoupled', or 'multiroot'.
62
+ */
63
+ editorType: EditorType;
64
+ /**
65
+ * The configuration object for the CKEditor5 editor.
66
+ * This should match the configuration expected by CKEditor5.
67
+ */
68
+ config: EditorConfig;
69
+ /**
70
+ * The license key for CKEditor5.
71
+ * This is required for using CKEditor5 with a valid license.
72
+ */
73
+ licenseKey: string;
74
+ /**
75
+ * Optional watchdog configuration for error recovery.
76
+ */
77
+ watchdogConfig?: Record<string, any> | null;
78
+ /**
79
+ * Optional custom translations for the editor.
80
+ * This allows for localization of the editor interface.
81
+ */
82
+ customTranslations?: EditorCustomTranslationsDictionary | null;
83
+ };
84
+ /**
85
+ * Represents the language settings for the CKEditor5 editor.
86
+ */
87
+ export type EditorLanguage = {
88
+ ui: string;
89
+ content: string;
90
+ };
91
+ /**
92
+ * Represents custom translations for the editor.
93
+ */
94
+ export type EditorCustomTranslationsDictionary = {
95
+ [language: string]: {
96
+ [key: string]: string | ReadonlyArray<string>;
97
+ };
98
+ };
99
+ //# sourceMappingURL=typings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../../../src/elements/editor/typings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,OAAO,EAAE,YAAY,EAAE,CAAC;IAExB;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB;;OAEG;IACH,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB,GAAG,IAAI,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAEhC;;;OAGG;IACH,UAAU,EAAE,UAAU,CAAC;IAEvB;;;OAGG;IACH,MAAM,EAAE,YAAY,CAAC;IAErB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAE5C;;;OAGG;IACH,kBAAkB,CAAC,EAAE,kCAAkC,GAAG,IAAI,CAAC;CAChE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,CAAC,QAAQ,EAAE,MAAM,GAAG;QAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;KAC/C,CAAC;CACH,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { Context, ContextWatchdog, Editor, EditorConfig } from 'ckeditor5';
2
+ import { EditorCreator } from './wrap-with-watchdog';
3
+ /**
4
+ * Creates a CKEditor 5 editor instance within a given context watchdog.
5
+ *
6
+ * @param params Parameters for editor creation.
7
+ * @param params.element The DOM element or data for the editor.
8
+ * @param params.context The context watchdog instance.
9
+ * @param params.creator The editor creator utility.
10
+ * @param params.config The editor configuration object.
11
+ * @returns The created editor instance.
12
+ */
13
+ export declare function createEditorInContext({ element, context, creator, config }: Attrs): Promise<{
14
+ editor: Editor;
15
+ state: "available" | "unavailable";
16
+ editorContextId: string;
17
+ context: ContextWatchdog<Context>;
18
+ }>;
19
+ /**
20
+ * Retrieves the context watchdog from an editor instance, if available.
21
+ *
22
+ * @param editor The editor instance.
23
+ * @returns The context watchdog or null if not found.
24
+ */
25
+ export declare function unwrapEditorContext(editor: Editor): EditorContextDescriptor | null;
26
+ /**
27
+ * Parameters for creating an editor in a context.
28
+ */
29
+ type Attrs = {
30
+ context: ContextWatchdog<Context>;
31
+ creator: EditorCreator;
32
+ element: HTMLElement;
33
+ config: EditorConfig;
34
+ };
35
+ /**
36
+ * Descriptor for an editor context.
37
+ */
38
+ type EditorContextDescriptor = {
39
+ state: 'available' | 'unavailable';
40
+ editorContextId: string;
41
+ context: ContextWatchdog<Context>;
42
+ };
43
+ export {};
44
+ //# sourceMappingURL=create-editor-in-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-editor-in-context.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/create-editor-in-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAU1D;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK;;WAgE/E,WAAW,GAAG,aAAa;qBACjB,MAAM;aACd,eAAe,CAAC,OAAO,CAAC;GAhClC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI,CAMlF;AAED;;GAEG;AACH,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAClC,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,WAAW,GAAG,aAAa,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;CACnC,CAAC"}
@@ -0,0 +1,12 @@
1
+ export * from './create-editor-in-context';
2
+ export * from './is-single-root-editor';
3
+ export * from './load-editor-constructor';
4
+ export * from './load-editor-plugins';
5
+ export * from './load-editor-translations';
6
+ export * from './normalize-custom-translations';
7
+ export * from './query-all-editor-ids';
8
+ export * from './query-editor-editables';
9
+ export * from './resolve-editor-config-elements-references';
10
+ export * from './set-editor-editable-height';
11
+ export * from './wrap-with-watchdog';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { EditorType } from '../typings';
2
+ /**
3
+ * Checks if the given editor type is one of the single editing-like editors.
4
+ *
5
+ * @param editorType - The type of the editor to check.
6
+ * @returns `true` if the editor type is 'inline', 'classic', or 'balloon', otherwise `false`.
7
+ */
8
+ export declare function isSingleRootEditor(editorType: EditorType): boolean;
9
+ //# sourceMappingURL=is-single-root-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-single-root-editor.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/is-single-root-editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAElE"}
@@ -0,0 +1,9 @@
1
+ import { EditorType } from '../typings';
2
+ /**
3
+ * Returns the constructor for the specified CKEditor5 editor type.
4
+ *
5
+ * @param type - The type of the editor to load.
6
+ * @returns A promise that resolves to the editor constructor.
7
+ */
8
+ export declare function loadEditorConstructor(type: EditorType): Promise<typeof import('ckeditor5').InlineEditor | typeof import('ckeditor5').BalloonEditor | typeof import('ckeditor5').ClassicEditor | typeof import('ckeditor5').DecoupledEditor | typeof import('ckeditor5').MultiRootEditor>;
9
+ //# sourceMappingURL=load-editor-constructor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-editor-constructor.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/load-editor-constructor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAI7C;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,UAAU,oOAkB3D"}
@@ -0,0 +1,20 @@
1
+ import { PluginConstructor } from 'ckeditor5';
2
+ import { EditorPlugin } from '../typings';
3
+ /**
4
+ * Loads CKEditor plugins from base and premium packages.
5
+ * First tries to load from the base 'ckeditor5' package, then falls back to 'ckeditor5-premium-features'.
6
+ *
7
+ * @param plugins - Array of plugin names to load
8
+ * @returns Promise that resolves to an array of loaded Plugin instances
9
+ * @throws Error if a plugin is not found in either package
10
+ */
11
+ export declare function loadEditorPlugins(plugins: EditorPlugin[]): Promise<LoadedPlugins>;
12
+ /**
13
+ * Type representing the loaded plugins and whether premium features are available.
14
+ */
15
+ type LoadedPlugins = {
16
+ loadedPlugins: PluginConstructor<any>[];
17
+ hasPremium: boolean;
18
+ };
19
+ export {};
20
+ //# sourceMappingURL=load-editor-plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-editor-plugins.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/load-editor-plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAiDvF;AAED;;GAEG;AACH,KAAK,aAAa,GAAG;IACnB,aAAa,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Loads all required translations for the editor based on the language configuration.
3
+ *
4
+ * @param language - The language configuration object containing UI and content language codes.
5
+ * @param language.ui - The UI language code.
6
+ * @param language.content - The content language code.
7
+ * @param hasPremium - Whether premium features are enabled and premium translations should be loaded.
8
+ * @returns A promise that resolves to an array of loaded translation objects.
9
+ */
10
+ export declare function loadAllEditorTranslations(language: {
11
+ ui: string;
12
+ content: string;
13
+ }, hasPremium: boolean): Promise<any[]>;
14
+ //# sourceMappingURL=load-editor-translations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-editor-translations.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/load-editor-translations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;CAAE,EAC1C,UAAU,EAAE,OAAO,kBAapB"}
@@ -0,0 +1,11 @@
1
+ import { Translations } from 'ckeditor5';
2
+ import { EditorCustomTranslationsDictionary } from '../typings';
3
+ /**
4
+ * This function takes a custom translations object and maps it to the format expected by CKEditor5.
5
+ * Each translation dictionary is wrapped in an object with a `dictionary` key.
6
+ *
7
+ * @param translations - The custom translations to normalize.
8
+ * @returns A normalized translations object suitable for CKEditor5.
9
+ */
10
+ export declare function normalizeCustomTranslations(translations: EditorCustomTranslationsDictionary): Translations;
11
+ //# sourceMappingURL=normalize-custom-translations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-custom-translations.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/normalize-custom-translations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,YAAY,CAAC;AAIrE;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,kCAAkC,GAAG,YAAY,CAI1G"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Queries all CKEditor 5 editor IDs present in the document.
3
+ */
4
+ export declare function queryAllEditorIds(): string[];
5
+ //# sourceMappingURL=query-all-editor-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-all-editor-ids.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/query-all-editor-ids.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAK5C"}
@@ -0,0 +1,25 @@
1
+ import { EditorId } from '../typings';
2
+ /**
3
+ * Gets the initial root elements for the editor based on its type.
4
+ *
5
+ * @param editorId The editor's ID.
6
+ * @returns The root element(s) for the editor.
7
+ */
8
+ export declare function queryEditablesElements(editorId: EditorId): Record<string, HTMLElement>;
9
+ /**
10
+ * Gets the initial data for the roots of the editor. If the editor is a single editing-like editor,
11
+ * it retrieves the initial value from the element's attribute. Otherwise, it returns an object mapping
12
+ * editable names to their initial values.
13
+ *
14
+ * @param editorId The editor's ID.
15
+ * @returns The initial values for the editor's roots.
16
+ */
17
+ export declare function queryEditablesSnapshotContent(editorId: EditorId): Record<string, string>;
18
+ /**
19
+ * Type representing an editable item within an editor.
20
+ */
21
+ export type EditableItem = {
22
+ element: HTMLElement;
23
+ content: string | null;
24
+ };
25
+ //# sourceMappingURL=query-editor-editables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-editor-editables.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/query-editor-editables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,+BAIxD;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,QAAQ,GAIW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAChG;AAiED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Resolves element references in configuration object.
3
+ * Looks for objects with { $element: "selector" } format and replaces them with actual DOM elements.
4
+ *
5
+ * @param obj - Configuration object to process
6
+ * @returns Processed configuration object with resolved element references
7
+ */
8
+ export declare function resolveEditorConfigElementReferences<T>(obj: T): T;
9
+ //# sourceMappingURL=resolve-editor-config-elements-references.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-editor-config-elements-references.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/resolve-editor-config-elements-references.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CA4BjE"}
@@ -0,0 +1,9 @@
1
+ import { Editor } from 'ckeditor5';
2
+ /**
3
+ * Sets the height of the editable area in the CKEditor instance.
4
+ *
5
+ * @param instance - The CKEditor instance to modify.
6
+ * @param height - The height in pixels to set for the editable area.
7
+ */
8
+ export declare function setEditorEditableHeight(instance: Editor, height: number): void;
9
+ //# sourceMappingURL=set-editor-editable-height.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-editor-editable-height.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/set-editor-editable-height.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAM9E"}
@@ -0,0 +1,24 @@
1
+ import { Editor, EditorWatchdog } from 'ckeditor5';
2
+ /**
3
+ * Wraps an Editor creator with a watchdog for automatic recovery.
4
+ *
5
+ * @param Editor - The Editor creator to wrap.
6
+ * @returns The Editor creator wrapped with a watchdog.
7
+ */
8
+ export declare function wrapWithWatchdog(Editor: EditorCreator): Promise<{
9
+ watchdog: EditorWatchdog<Editor>;
10
+ Constructor: {
11
+ create: (...args: Parameters<(typeof Editor)["create"]>) => Promise<Editor>;
12
+ };
13
+ }>;
14
+ /**
15
+ * Unwraps the EditorWatchdog from the editor instance.
16
+ */
17
+ export declare function unwrapEditorWatchdog(editor: Editor): EditorWatchdog | null;
18
+ /**
19
+ * Type representing an Editor creator with a create method.
20
+ */
21
+ export type EditorCreator = {
22
+ create: (...args: any) => Promise<Editor>;
23
+ };
24
+ //# sourceMappingURL=wrap-with-watchdog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrap-with-watchdog.d.ts","sourceRoot":"","sources":["../../../../../src/elements/editor/utils/wrap-with-watchdog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIxD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,aAAa;;;0BAe9B,UAAU,CAAC,CAAA,OAAO,MAAM,EAAC,QAAQ,CAAC,CAAC;;GAOhE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAM1E;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3C,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { ContextComponentElement, type ContextConfig, type ContextCreatorConfig, ContextsRegistry, } from './context';
2
+ export { EditableComponentElement } from './editable';
3
+ export { type EditorCloudConfig, EditorComponentElement, type EditorConfig, } from './editor';
4
+ export { registerCustomElements } from './register-custom-elements';
5
+ export { UIPartComponentElement } from './ui-part';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EACL,KAAK,iBAAiB,EACtB,sBAAsB,EACtB,KAAK,YAAY,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC"}