ckeditor5 1.31.7 → 1.32.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.
- checksums.yaml +4 -4
- data/README.md +34 -12
- data/lib/ckeditor5/rails/assets/webcomponent_bundle.rb +2 -21
- data/lib/ckeditor5/rails/version.rb +2 -2
- data/npm_package/dist/index.cjs +2 -0
- data/npm_package/dist/index.cjs.map +1 -0
- data/npm_package/dist/index.d.ts +1 -0
- data/npm_package/dist/index.mjs +723 -0
- data/npm_package/dist/index.mjs.map +1 -0
- data/npm_package/dist/src/components/context.d.ts +24 -0
- data/npm_package/dist/src/components/context.d.ts.map +1 -0
- data/npm_package/dist/src/components/editable.d.ts +34 -0
- data/npm_package/dist/src/components/editable.d.ts.map +1 -0
- data/npm_package/dist/src/components/editor/editor.d.ts +79 -0
- data/npm_package/dist/src/components/editor/editor.d.ts.map +1 -0
- data/npm_package/dist/src/components/editor/index.d.ts +3 -0
- data/npm_package/dist/src/components/editor/index.d.ts.map +1 -0
- data/npm_package/dist/src/components/editor/multiroot-editables-tracker.d.ts +36 -0
- data/npm_package/dist/src/components/editor/multiroot-editables-tracker.d.ts.map +1 -0
- data/npm_package/dist/src/components/index.d.ts +5 -0
- data/npm_package/dist/src/components/index.d.ts.map +1 -0
- data/npm_package/dist/src/components/ui-part.d.ts +2 -0
- data/npm_package/dist/src/components/ui-part.d.ts.map +1 -0
- data/npm_package/dist/src/helpers/exec-if-dom-ready.d.ts +7 -0
- data/npm_package/dist/src/helpers/exec-if-dom-ready.d.ts.map +1 -0
- data/npm_package/dist/src/helpers/index.d.ts +8 -0
- data/npm_package/dist/src/helpers/index.d.ts.map +1 -0
- data/npm_package/dist/src/helpers/inject-script.d.ts +8 -0
- data/npm_package/dist/src/helpers/inject-script.d.ts.map +1 -0
- data/npm_package/dist/src/helpers/is-safe-key.d.ts +8 -0
- data/npm_package/dist/src/helpers/is-safe-key.d.ts.map +1 -0
- data/npm_package/dist/src/helpers/load-async-css.d.ts +9 -0
- data/npm_package/dist/src/helpers/load-async-css.d.ts.map +1 -0
- data/npm_package/dist/src/helpers/load-async-imports.d.ts +25 -0
- data/npm_package/dist/src/helpers/load-async-imports.d.ts.map +1 -0
- data/npm_package/dist/src/helpers/resolve-config-element-references.d.ts +9 -0
- data/npm_package/dist/src/helpers/resolve-config-element-references.d.ts.map +1 -0
- data/npm_package/dist/src/helpers/uid.d.ts +7 -0
- data/npm_package/dist/src/helpers/uid.d.ts.map +1 -0
- data/npm_package/dist/src/index.d.ts +1 -0
- data/npm_package/dist/src/index.d.ts.map +1 -0
- data/npm_package/dist/vite.config.d.ts +3 -0
- data/npm_package/dist/vite.config.d.ts.map +1 -0
- data/npm_package/package.json +37 -0
- metadata +42 -7
- data/lib/ckeditor5/rails/assets/webcomponents/components/context.mjs +0 -123
- data/lib/ckeditor5/rails/assets/webcomponents/components/editable.mjs +0 -113
- data/lib/ckeditor5/rails/assets/webcomponents/components/editor.mjs +0 -778
- data/lib/ckeditor5/rails/assets/webcomponents/components/ui-part.mjs +0 -26
- data/lib/ckeditor5/rails/assets/webcomponents/utils.mjs +0 -235
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/helpers/exec-if-dom-ready.ts","../src/helpers/inject-script.ts","../src/helpers/is-safe-key.ts","../src/helpers/load-async-css.ts","../src/helpers/load-async-imports.ts","../src/helpers/resolve-config-element-references.ts","../src/helpers/uid.ts","../src/components/context.ts","../src/components/editable.ts","../src/components/editor/multiroot-editables-tracker.ts","../src/components/editor/editor.ts","../src/components/ui-part.ts"],"sourcesContent":["/**\n * Executes callback when DOM is ready.\n *\n * @param callback - Function to execute when DOM is ready.\n */\nexport function execIfDOMReady(callback: VoidFunction) {\n switch (document.readyState) {\n case 'loading':\n document.addEventListener('DOMContentLoaded', callback, { once: true });\n break;\n\n case 'interactive':\n case 'complete':\n setTimeout(callback, 0);\n break;\n\n default:\n console.warn('Unexpected document.readyState:', document.readyState);\n setTimeout(callback, 0);\n }\n}\n","const SCRIPT_LOAD_PROMISES = new Map();\n\n/**\n * Dynamically loads script files based on configuration.\n * Uses caching to avoid loading the same script multiple times.\n *\n * @param url - URL of the script to load\n */\nexport function injectScript(url: string) {\n if (SCRIPT_LOAD_PROMISES.has(url)) {\n return SCRIPT_LOAD_PROMISES.get(url);\n }\n\n const promise = new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = url;\n script.onload = resolve;\n script.onerror = reject;\n\n document.head.appendChild(script);\n });\n\n SCRIPT_LOAD_PROMISES.set(url, promise);\n return promise;\n}\n","/**\n * Checks if a key is safe to use in configuration objects to prevent prototype pollution\n *\n * @param key - Key name to check\n * @returns True if key is safe to use\n */\nexport function isSafeKey(key: string) {\n return (\n typeof key === 'string'\n && key !== '__proto__'\n && key !== 'constructor'\n && key !== 'prototype'\n );\n}\n","/**\n * Checks if stylesheet with given href already exists in document\n *\n * @param href - Stylesheet URL to check\n * @returns True if stylesheet already exists\n */\nfunction stylesheetExists(href: string) {\n return Array\n .from(document.styleSheets)\n .some(sheet =>\n sheet.href === href || sheet.href === new URL(href, window.location.href).href,\n );\n}\n\n/**\n * Dynamically loads CSS files based on configuration\n *\n * @param stylesheets - Array of CSS file URLs to load\n * @returns Array of promises for each CSS file load\n * @throws When CSS file loading fails\n */\nexport function loadAsyncCSS(stylesheets: string[] = []) {\n const promises = stylesheets.map(href =>\n new Promise<void>((resolve, reject) => {\n if (stylesheetExists(href)) {\n resolve();\n return;\n }\n\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = href;\n\n link.onerror = reject;\n link.onload = () => resolve();\n\n document.head.appendChild(link);\n }),\n );\n\n return Promise.all(promises);\n}\n","import { injectScript } from './inject-script';\nimport { loadAsyncCSS } from './load-async-css';\n\n/**\n * Dynamically imports modules based on configuration\n *\n * @param imports - Array of import configurations\n * @param imports[].name - Name of inline plugin (for inline type)\n * @param imports[].code - Source code of inline plugin (for inline type)\n * @param imports[].import_name - Module path to import (for external type)\n * @param imports[].import_as - Name to import as (for external type)\n * @param imports[].window_name - Global window object name (for external type)\n * @param imports[].type - Type of import\n * @returns Array of loaded modules\n * @throws When plugin loading fails\n */\nexport function loadAsyncImports(imports: Array<AsyncImportRawDescription | string> = []) {\n const loadExternalPlugin = async ({ url, import_name, import_as, window_name, stylesheets }: AsyncImportRawDescription) => {\n if (stylesheets?.length) {\n await loadAsyncCSS(stylesheets);\n }\n\n if (window_name) {\n function isScriptPresent() {\n return Object.prototype.hasOwnProperty.call(window, window_name!);\n }\n\n if (url && !isScriptPresent()) {\n await injectScript(url);\n }\n\n if (!isScriptPresent()) {\n window.dispatchEvent(\n new CustomEvent(`ckeditor:request-cjs-plugin:${window_name}`),\n );\n }\n\n if (!isScriptPresent()) {\n throw new Error(\n `Plugin window['${window_name}'] not found in global scope. `\n + 'Please ensure the plugin is loaded before CKEditor initialization.',\n );\n }\n\n return (window as any)[window_name!];\n }\n\n const module = await import(import_name!);\n const imported = module[import_as || 'default'];\n\n if (!imported) {\n throw new Error(\n `Plugin \"${import_as || 'default'}\" not found in the ESM module `\n + `\"${import_name}\"! Available imports: ${Object.keys(module).join(', ')}! `\n + 'Consider changing \"import_as\" value.',\n );\n }\n\n return imported;\n };\n\n function uncompressImport(pkg: any) {\n if (typeof pkg === 'string') {\n return loadExternalPlugin({ import_name: 'ckeditor5', import_as: pkg });\n }\n\n return loadExternalPlugin(pkg);\n }\n\n return Promise.all(imports.map(uncompressImport));\n}\n\n/**\n * Type definition for plugin raw descriptor\n */\nexport type AsyncImportRawDescription = {\n url?: string;\n import_name?: string;\n import_as?: string;\n window_name?: string;\n stylesheets?: string[];\n};\n","/**\n * Resolves element references in configuration object.\n * Looks for objects with { $element: \"selector\" } format and replaces them with actual DOM elements.\n *\n * @param obj - Configuration object to process\n * @returns Processed configuration object with resolved element references\n */\nexport function resolveConfigElementReferences<T>(obj: T): T {\n if (!obj || typeof obj !== 'object') {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.map(item => resolveConfigElementReferences(item)) as T;\n }\n\n const anyObj = obj as any;\n\n if (anyObj.$element && typeof anyObj.$element === 'string') {\n const element = document.querySelector(anyObj.$element);\n\n if (!element) {\n console.warn(`Element not found for selector: ${anyObj.$element}`);\n }\n\n return (element || null) as T;\n }\n\n const result = Object.create(null);\n\n for (const [key, value] of Object.entries(obj)) {\n result[key] = resolveConfigElementReferences(value);\n }\n\n return result as T;\n}\n","/**\n * Generates a unique identifier string\n *\n * @returns Random string that can be used as unique identifier\n */\nexport function uid() {\n return Math.random().toString(36).substring(2);\n}\n","import type { ContextWatchdog } from 'ckeditor5';\n\nimport { execIfDOMReady, loadAsyncImports, resolveConfigElementReferences } from 'src/helpers';\n\nimport type { CKEditorComponent } from './editor';\n\nexport class CKEditorContextComponent extends HTMLElement {\n instance: ContextWatchdog | null = null;\n\n instancePromise = Promise.withResolvers<ContextWatchdog>();\n\n #connectedEditors = new Set<CKEditorComponent>();\n\n static get observedAttributes() {\n return ['plugins', 'config'];\n }\n\n async connectedCallback() {\n try {\n execIfDOMReady(() => this.#initializeContext());\n }\n catch (error) {\n console.error('Failed to initialize context:', error);\n this.dispatchEvent(new CustomEvent('context-error', { detail: error }));\n }\n }\n\n async attributeChangedCallback(_: unknown, oldValue: string | null, newValue: string | null) {\n if (oldValue !== null && oldValue !== newValue) {\n await this.#initializeContext();\n }\n }\n\n async disconnectedCallback() {\n if (this.instance) {\n await this.instance.destroy();\n this.instance = null;\n }\n }\n\n /**\n * Register editor component with this context\n *\n * @param editor - Editor component to register.\n */\n registerEditor(editor: CKEditorComponent) {\n this.#connectedEditors.add(editor);\n }\n\n /**\n * Unregister editor component from this context\n *\n * @param editor - Editor component to unregister\n */\n unregisterEditor(editor: CKEditorComponent) {\n this.#connectedEditors.delete(editor);\n }\n\n /**\n * Initialize CKEditor context with shared configuration\n *\n * @private\n */\n async #initializeContext() {\n if (this.instance) {\n this.instancePromise = Promise.withResolvers<ContextWatchdog>();\n\n await this.instance.destroy();\n\n this.instance = null;\n }\n\n // Broadcast context initialization event\n window.dispatchEvent(\n new CustomEvent('ckeditor:context:attach:before', { detail: { element: this } }),\n );\n\n const { Context, ContextWatchdog } = await import('ckeditor5');\n const plugins = await this.#getPlugins();\n const config = this.#getConfig();\n\n // Broadcast context mounting event with configuration\n window.dispatchEvent(\n new CustomEvent('ckeditor:context:attach', { detail: { config, element: this } }),\n );\n\n this.instance = new ContextWatchdog(Context, {\n crashNumberLimit: 10,\n });\n\n await this.instance.create({\n ...config,\n plugins,\n });\n\n this.instance.on('itemError', (...args) => {\n console.error('Context item error:', ...args);\n });\n\n this.instancePromise.resolve(this.instance);\n this.dispatchEvent(new CustomEvent('context-ready', { detail: this.instance }));\n\n // Reinitialize connected editors.\n await Promise.all(\n [...this.#connectedEditors].map(editor => editor.reinitializeEditor()),\n );\n }\n\n async #getPlugins() {\n const raw = this.getAttribute('plugins');\n\n return loadAsyncImports(raw ? JSON.parse(raw) : []);\n }\n\n /**\n * Gets context configuration with resolved element references.\n *\n * @private\n */\n #getConfig() {\n const config = JSON.parse(this.getAttribute('config') || '{}');\n\n return resolveConfigElementReferences(config);\n }\n}\n\ncustomElements.define('ckeditor-context-component', CKEditorContextComponent);\n","import type { CKEditorComponent } from './editor';\n\nimport { execIfDOMReady } from '../helpers/exec-if-dom-ready';\n\nexport class CKEditorEditableComponent extends HTMLElement {\n /**\n * List of attributes that trigger updates when changed\n *\n * @static\n * @returns {string[]} Array of attribute names to observe\n */\n static get observedAttributes() {\n return ['name'];\n }\n\n /**\n * Gets the name of this editable region\n */\n get name() {\n return this.getAttribute('name') || 'editable';\n }\n\n /**\n * Gets the actual editable DOM element.\n */\n get editableElement() {\n return this.querySelector('div')!;\n }\n\n /**\n * Lifecycle callback when element is added to DOM\n * Sets up the editable element and registers it with the parent editor\n */\n connectedCallback() {\n execIfDOMReady(() => {\n const editorComponent = this.#queryEditorElement();\n\n if (!editorComponent) {\n throw new Error('ckeditor-editable-component must be a child of ckeditor-component');\n }\n\n this.innerHTML = `<div>${this.innerHTML}</div>`;\n this.style.display = 'block';\n\n if (editorComponent.isDecoupled()) {\n editorComponent.runAfterEditorReady((editor) => {\n this.appendChild((editor.ui.view as any)[this.name].element);\n });\n }\n else {\n if (!this.name) {\n throw new Error('Editable component missing required \"name\" attribute');\n }\n\n editorComponent.editables![this.name] = this;\n }\n });\n }\n\n /**\n * Lifecycle callback for attribute changes\n * Handles name changes and propagates other attributes to editable element\n */\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (oldValue === newValue) {\n return;\n }\n\n if (name === 'name') {\n if (!oldValue) {\n return;\n }\n\n const editorComponent = this.#queryEditorElement();\n\n if (editorComponent) {\n editorComponent.editables![newValue] = editorComponent.editables![oldValue]!;\n delete editorComponent.editables![oldValue];\n }\n }\n else {\n this.editableElement.setAttribute(name, newValue!);\n }\n }\n\n /**\n * Lifecycle callback when element is removed\n * Un-registers this editable from the parent editor\n */\n disconnectedCallback() {\n const editorComponent = this.#queryEditorElement();\n\n if (editorComponent) {\n delete editorComponent.editables![this.name];\n }\n }\n\n /**\n * Finds the parent editor component\n */\n #queryEditorElement(): CKEditorComponent | null {\n return this.closest('ckeditor-component') || document.body.querySelector('ckeditor-component');\n }\n}\n\ncustomElements.define('ckeditor-editable-component', CKEditorEditableComponent);\n","import type { MultiRootEditor } from 'ckeditor5';\n\nimport type { CKEditorComponent } from './editor';\n\nexport class CKEditorMultiRootEditablesTracker {\n #editorElement: CKEditorComponent;\n #editables: Record<string, HTMLElement>;\n\n /**\n * Creates new tracker instance wrapped in a Proxy for dynamic property access\n *\n * @param editorElement - Parent editor component reference\n * @param initialEditables - Initial editable elements\n * @returns Proxy wrapping the tracker\n */\n constructor(\n editorElement: CKEditorComponent,\n initialEditables: Record<string, HTMLElement> = {},\n ) {\n this.#editorElement = editorElement;\n this.#editables = initialEditables;\n\n return new Proxy(this, {\n /**\n * Handles property access, returns class methods or editable elements\n *\n * @param target - The tracker instance\n * @param name - Property name being accessed\n */\n get(target: CKEditorMultiRootEditablesTracker, name: string) {\n if (typeof (target as any)[name] === 'function') {\n return (target as any)[name].bind(target);\n }\n\n return target.#editables[name];\n },\n\n /**\n * Handles setting new editable elements, triggers root attachment\n *\n * @param target - The tracker instance\n * @param name - Name of the editable root\n * @param element - Element to attach as editable\n */\n set(target: CKEditorMultiRootEditablesTracker, name: string, element: HTMLElement) {\n if (target.#editables[name] !== element) {\n void target.attachRoot(name, element);\n target.#editables[name] = element;\n }\n return true;\n },\n\n /**\n * Handles removing editable elements, triggers root detachment\n *\n * @param target - The tracker instance\n * @param name - Name of the root to remove\n */\n deleteProperty(target: CKEditorMultiRootEditablesTracker, name: string) {\n void target.detachRoot(name);\n delete target.#editables[name];\n\n return true;\n },\n });\n }\n\n /**\n * Attaches a new editable root to the editor.\n * Creates new editor root and binds UI elements.\n *\n * @param name - Name of the editable root\n * @param element - DOM element to use as editable\n * @returns Resolves when root is attached\n */\n async attachRoot(name: string, element: HTMLElement) {\n await this.detachRoot(name);\n\n return this.#editorElement.runAfterEditorReady<MultiRootEditor>((editor) => {\n const { ui, editing, model } = editor;\n\n editor.addRoot(name, {\n isUndoable: false,\n data: element.innerHTML,\n });\n\n const root = model.document.getRoot(name);\n\n if (ui.getEditableElement(name)) {\n editor.detachEditable(root!);\n }\n\n const editable = ui.view.createEditable(name, element);\n ui.addEditable(editable);\n editing.view.forceRender();\n });\n }\n\n /**\n * Detaches an editable root from the editor.\n * Removes editor root and cleans up UI bindings.\n *\n * @param name - Name of root to detach\n * @returns Resolves when root is detached\n */\n async detachRoot(name: string) {\n return this.#editorElement.runAfterEditorReady<MultiRootEditor>((editor) => {\n const root = editor.model.document.getRoot(name);\n\n if (root) {\n editor.detachEditable(root);\n editor.detachRoot(name, true);\n }\n });\n }\n\n /**\n * Gets all currently tracked editable elements\n *\n * @returns Map of all editable elements\n */\n getAll() {\n return this.#editables;\n }\n}\n","import type { Editor, EditorWatchdog, Watchdog } from 'ckeditor5';\n\nimport type { AsyncImportRawDescription } from '../../helpers';\nimport type { CKEditorContextComponent } from '../context';\nimport type { CKEditorEditableComponent } from '../editable';\n\nimport {\n execIfDOMReady,\n isSafeKey,\n loadAsyncCSS,\n loadAsyncImports,\n resolveConfigElementReferences,\n uid,\n} from '../../helpers';\nimport { CKEditorMultiRootEditablesTracker } from './multiroot-editables-tracker';\n\nexport class CKEditorComponent extends HTMLElement {\n instancePromise = Promise.withResolvers<Editor>();\n\n watchdog: Watchdog | null = null;\n\n instance: Editor | null = null;\n\n editables: Record<string, HTMLElement> | null = Object.create({});\n\n #initialHTML: string = '';\n\n #context: CKEditorContextComponent | null = null;\n\n #contextEditorId: string | null = null;\n\n #bundle: object | null = null;\n\n /**\n * List of attributes that trigger updates when changed.\n */\n static get observedAttributes() {\n return ['config', 'plugins', 'translations', 'type'];\n }\n\n /**\n * List of input attributes that trigger updates when changed.\n */\n static get inputAttributes() {\n return ['name', 'required', 'value'];\n }\n\n get oneditorchange() {\n return this.#getEventHandler('editorchange');\n }\n\n set oneditorchange(handler) {\n this.#setEventHandler('editorchange', handler);\n }\n\n get oneditorready() {\n return this.#getEventHandler('editorready');\n }\n\n set oneditorready(handler) {\n this.#setEventHandler('editorready', handler);\n }\n\n get oneditorerror() {\n return this.#getEventHandler('editorerror');\n }\n\n set oneditorerror(handler) {\n this.#setEventHandler('editorerror', handler);\n }\n\n /**\n * Gets event handler function from attribute or property\n *\n * @private\n * @param name - Event name without 'on' prefix\n * @returns Event handler or null\n */\n #getEventHandler(name: string): Function | null {\n if (this.hasAttribute(`on${name}`)) {\n const handler = this.getAttribute(`on${name}`)!;\n\n if (!isSafeKey(handler)) {\n throw new Error(`Unsafe event handler attribute value: ${handler}`);\n }\n\n // eslint-disable-next-line no-new-func\n return (window as any)[handler] || new Function('event', handler);\n }\n return (this as any)[`#${name}Handler`];\n }\n\n /**\n * Sets event handler function\n *\n * @private\n * @param name - Event name without 'on' prefix\n * @param handler - Event handler\n */\n #setEventHandler(name: string, handler: Function | null) {\n if (typeof handler === 'string') {\n this.setAttribute(`on${name}`, handler);\n }\n else {\n this.removeAttribute(`on${name}`);\n (this as any)[`#${name}Handler`] = handler;\n }\n }\n\n /**\n * Lifecycle callback when element is connected to DOM\n * Initializes the editor when DOM is ready\n *\n * @protected\n */\n connectedCallback() {\n this.#context = this.closest('ckeditor-context-component');\n this.#initialHTML = this.innerHTML;\n\n try {\n execIfDOMReady(async () => {\n if (this.#context) {\n await this.#context.instancePromise.promise;\n this.#context.registerEditor(this);\n }\n\n await this.reinitializeEditor();\n });\n }\n catch (error) {\n console.error('Failed to initialize editor:', error);\n\n const event = new CustomEvent('editor-error', { detail: error });\n\n this.dispatchEvent(event);\n this.oneditorerror?.(event);\n }\n }\n\n /**\n * Handles attribute changes and reinitializes editor if needed\n *\n * @protected\n * @param name - Name of changed attribute\n * @param oldValue - Previous attribute value\n * @param newValue - New attribute value\n */\n async attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n if (oldValue !== null\n && oldValue !== newValue\n && CKEditorComponent.observedAttributes.includes(name) && this.isConnected) {\n await this.reinitializeEditor();\n }\n }\n\n /**\n * Lifecycle callback when element is removed from DOM\n * Destroys the editor instance\n * @protected\n */\n async disconnectedCallback() {\n if (this.#context) {\n this.#context.unregisterEditor(this);\n }\n\n try {\n await this.#destroy();\n }\n catch (error) {\n console.error('Failed to destroy editor:', error);\n }\n }\n\n /**\n * Runs a callback after the editor is ready. It waits for editor\n * initialization if needed.\n *\n * @param callback - Callback to run\n */\n runAfterEditorReady<E extends Editor>(callback: (editor: E) => void): Promise<void> {\n if (this.instance) {\n return Promise.resolve(callback(this.instance as unknown as E));\n }\n\n return this.instancePromise.promise.then(callback as unknown as any);\n }\n\n /**\n * Determines appropriate editor element tag based on editor type\n */\n get #editorElementTag() {\n switch (this.getAttribute('type')) {\n case 'ClassicEditor':\n return 'textarea';\n\n default:\n return 'div';\n }\n }\n\n /**\n * Gets the CKEditor context instance if available.\n */\n get #contextWatchdog() {\n return this.#context?.instance;\n }\n\n /**\n * Destroys the editor instance and watchdog if available\n */\n async #destroy() {\n if (this.#contextEditorId) {\n await this.#contextWatchdog!.remove(this.#contextEditorId);\n }\n\n await this.instance?.destroy();\n this.watchdog?.destroy();\n }\n\n /**\n * Gets editor configuration with resolved element references\n */\n #getConfig() {\n const config = JSON.parse(this.getAttribute('config') || '{}');\n\n return resolveConfigElementReferences(config);\n }\n\n /**\n * Creates a new CKEditor instance\n */\n async #initializeEditor(editablesOrContent: Record<string, HTMLElement | string> | CKEditorMultiRootEditablesTracker | string | HTMLElement) {\n await Promise.all([\n this.#ensureStylesheetsInjected(),\n this.#ensureWindowScriptsInjected(),\n ]);\n\n // Depending on the type of the editor the content supplied on the first\n // argument is different. For ClassicEditor it's a element or string, for MultiRootEditor\n // it's an object with editables, for DecoupledEditor it's string.\n let content: any = editablesOrContent;\n\n if (editablesOrContent instanceof CKEditorMultiRootEditablesTracker) {\n content = editablesOrContent.getAll();\n }\n else if (typeof editablesOrContent !== 'string') {\n content = (editablesOrContent as any)['main'];\n }\n\n // Broadcast editor initialization event. It's good time to load add inline window plugins.\n const beforeInitEventDetails = {\n ...content instanceof HTMLElement && { element: content },\n ...typeof content === 'string' && { data: content },\n ...content instanceof Object && { editables: content },\n };\n\n window.dispatchEvent(\n new CustomEvent('ckeditor:attach:before', { detail: beforeInitEventDetails }),\n );\n\n // Start fetching constructor.\n const Editor = await this.#getEditorConstructor();\n const [plugins, translations] = await Promise.all([\n this.#getPlugins(),\n this.#getTranslations(),\n ]);\n\n const config = {\n ...this.#getConfig(),\n ...translations.length && {\n translations,\n },\n plugins,\n };\n\n // Broadcast editor mounting event. It's good time to map configuration.\n window.dispatchEvent(\n new CustomEvent('ckeditor:attach', { detail: { config, ...beforeInitEventDetails } }),\n );\n\n console.warn('Initializing CKEditor with:', { config, watchdog: this.hasWatchdog(), context: this.#context });\n\n // Initialize watchdog if needed\n let watchdog: EditorWatchdog | null = null;\n let instance: Editor | null = null;\n let contextId: string | null = null;\n\n if (this.#context) {\n contextId = uid();\n\n await this.#contextWatchdog!.add({\n creator: (_element, _config) => Editor.create(_element, _config),\n id: contextId,\n sourceElementOrData: content,\n type: 'editor',\n config,\n });\n\n instance = this.#contextWatchdog!.getItem(contextId) as Editor;\n }\n else if (this.hasWatchdog()) {\n // Let's create use with plain watchdog.\n const { EditorWatchdog } = await import('ckeditor5');\n watchdog = new EditorWatchdog(Editor);\n\n await watchdog.create(content, config);\n\n instance = watchdog.editor;\n }\n else {\n // Let's create the editor without watchdog.\n instance = await Editor.create(content, config);\n }\n\n console.warn('CKEditor initialized:', {\n instance,\n watchdog,\n config: (instance!.config as any)._config,\n });\n\n return {\n contextId,\n instance,\n watchdog,\n };\n }\n\n /**\n * Re-initializes the editor by destroying existing instance and creating new one\n *\n * @private\n * @returns {Promise<void>}\n */\n async reinitializeEditor() {\n if (this.instance) {\n this.instancePromise = Promise.withResolvers();\n\n await this.#destroy();\n\n this.instance = null;\n }\n\n this.style.display = 'block';\n\n if (!this.isMultiroot() && !this.isDecoupled()) {\n this.innerHTML = `<${this.#editorElementTag}>${this.#initialHTML}</${this.#editorElementTag}>`;\n this.#assignInputAttributes();\n }\n\n // Let's track changes in editables if it's a multiroot editor.\n if (this.isMultiroot()) {\n this.editables = new CKEditorMultiRootEditablesTracker(this, this.#queryEditables()) as unknown as Record<string, HTMLElement>;\n }\n else if (this.isDecoupled()) {\n this.editables = null;\n }\n else {\n this.editables = this.#queryEditables();\n }\n\n try {\n const { watchdog, instance, contextId } = await this.#initializeEditor(this.editables || this.#getConfig().initialData || '');\n\n this.watchdog = watchdog;\n this.instance = instance!;\n this.#contextEditorId = contextId;\n\n this.#setupContentSync();\n this.#setupEditableHeight();\n this.#setupDataChangeListener();\n\n this.instancePromise.resolve(this.instance!);\n\n // Broadcast editor ready event\n const event = new CustomEvent('editor-ready', { detail: this.instance });\n\n this.dispatchEvent(event);\n this.oneditorready?.(event);\n }\n catch (err) {\n this.instancePromise.reject(err);\n throw err;\n }\n }\n\n /**\n * Sets up data change listener that broadcasts content changes\n */\n #setupDataChangeListener() {\n const getRootContent = (rootName: string) => this.instance!.getData({ rootName });\n const getAllRoots = () =>\n this.instance?.model.document\n .getRootNames()\n .reduce((acc, rootName) => ({\n ...acc,\n [rootName]: getRootContent(rootName),\n }), {});\n\n this.instance?.model.document.on('change:data', () => {\n const event = new CustomEvent('editor-change', {\n detail: {\n editor: this.instance,\n data: getAllRoots(),\n },\n bubbles: true,\n });\n\n this.dispatchEvent(event);\n this.oneditorchange?.(event);\n });\n }\n\n /**\n * Checks if current editor is classic type\n */\n isClassic() {\n return this.getAttribute('type') === 'ClassicEditor';\n }\n\n /**\n * Checks if current editor is balloon type\n */\n isBallon() {\n return this.getAttribute('type') === 'BalloonEditor';\n }\n\n /**\n * Checks if current editor is multiroot type\n */\n isMultiroot() {\n return this.getAttribute('type') === 'MultiRootEditor';\n }\n\n /**\n * Checks if current editor is decoupled type\n */\n isDecoupled() {\n return this.getAttribute('type') === 'DecoupledEditor';\n }\n\n /**\n * Checks if current editor has watchdog enabled\n */\n hasWatchdog() {\n return this.getAttribute('watchdog') === 'true';\n }\n\n /**\n * Queries and validates editable elements\n */\n #queryEditables() {\n if (this.isDecoupled()) {\n return {};\n }\n\n if (this.isMultiroot()) {\n const editables = [...this.querySelectorAll('ckeditor-editable-component')] as CKEditorEditableComponent[];\n\n return editables.reduce((acc, element) => {\n if (!element.name) {\n throw new Error('Editable component missing required \"name\" attribute');\n }\n acc[element.name] = element;\n return acc;\n }, Object.create(null));\n }\n\n const mainEditable = this.querySelector(this.#editorElementTag);\n\n if (!mainEditable) {\n throw new Error(`No ${this.#editorElementTag} element found`);\n }\n\n return { main: mainEditable };\n }\n\n /**\n * Copies input-related attributes from component to the main editable element\n *\n * @private\n */\n #assignInputAttributes() {\n const textarea = this.querySelector('textarea');\n\n if (!textarea) {\n return;\n }\n\n for (const attr of CKEditorComponent.inputAttributes) {\n if (this.hasAttribute(attr)) {\n textarea.setAttribute(attr, this.getAttribute(attr)!);\n }\n }\n }\n\n /**\n * Sets up content sync between editor and textarea element.\n *\n * @private\n */\n #setupContentSync() {\n if (!this.instance) {\n return;\n }\n\n const textarea = this.querySelector('textarea');\n\n if (!textarea) {\n return;\n }\n\n // Initial sync\n const syncInput = () => {\n this.style.position = 'relative';\n\n textarea.innerHTML = '';\n textarea.value = this.instance!.getData();\n textarea.tabIndex = -1;\n\n Object.assign(textarea.style, {\n display: 'flex',\n position: 'absolute',\n bottom: '0',\n left: '50%',\n width: '1px',\n height: '1px',\n opacity: '0',\n pointerEvents: 'none',\n margin: '0',\n padding: '0',\n border: 'none',\n });\n };\n\n syncInput();\n\n // Listen for changes\n this.instance.model.document.on('change:data', () => {\n textarea.dispatchEvent(new Event('input', { bubbles: true }));\n textarea.dispatchEvent(new Event('change', { bubbles: true }));\n\n syncInput();\n });\n }\n\n /**\n * Sets up editable height for ClassicEditor\n *\n * @private\n */\n #setupEditableHeight() {\n if (!this.isClassic() && !this.isBallon()) {\n return;\n }\n\n const { instance } = this;\n const height = Number.parseInt(this.getAttribute('editable-height')!, 10);\n\n if (Number.isNaN(height)) {\n return;\n }\n\n instance!.editing.view.change((writer) => {\n writer.setStyle('height', `${height}px`, instance!.editing.view.document.getRoot()!);\n });\n }\n\n /**\n * Gets bundle JSON description from translations attribute\n */\n #getBundle(): BundleDescription {\n return this.#bundle ||= JSON.parse(this.getAttribute('bundle')!);\n }\n\n /**\n * Checks if all required stylesheets are injected. If not, inject.\n */\n async #ensureStylesheetsInjected() {\n await loadAsyncCSS(this.#getBundle().stylesheets || []);\n }\n\n /**\n * Checks if all required scripts are injected. If not, inject.\n */\n async #ensureWindowScriptsInjected() {\n const windowScripts = (this.#getBundle().scripts || []).filter(script => !!script.window_name);\n\n await loadAsyncImports(windowScripts);\n }\n\n /**\n * Loads translation modules\n */\n async #getTranslations() {\n const translations = this.#getBundle().scripts.filter(script => script.translation);\n\n return loadAsyncImports(translations);\n }\n\n /**\n * Loads plugin modules\n */\n async #getPlugins() {\n const raw = this.getAttribute('plugins');\n const items = raw ? JSON.parse(raw) : [];\n const mappedItems = items.map((item: any) =>\n typeof item === 'string'\n ? { import_name: 'ckeditor5', import_as: item }\n : item,\n );\n\n return loadAsyncImports(mappedItems);\n }\n\n /**\n * Gets editor constructor based on type attribute\n */\n async #getEditorConstructor() {\n const CKEditor = await import('ckeditor5');\n const editorType = this.getAttribute('type');\n\n if (!editorType || !Object.prototype.hasOwnProperty.call(CKEditor, editorType)) {\n throw new Error(`Invalid editor type: ${editorType}`);\n }\n\n return (CKEditor as any)[editorType] as EditorConstructor;\n }\n}\n\ntype EditorConstructor = {\n create: (...args: any[]) => Promise<Editor>;\n};\n\ntype BundleDescription = {\n stylesheets: string[];\n scripts: Array<AsyncImportRawDescription & {\n translation?: boolean;\n }>;\n};\n\ncustomElements.define('ckeditor-component', CKEditorComponent);\n","import type { CKEditorComponent } from './editor';\n\nimport { execIfDOMReady } from '../helpers';\n\nclass CKEditorUIPartComponent extends HTMLElement {\n /**\n * Lifecycle callback when element is added to DOM.\n * Adds the toolbar to the editor UI.\n */\n connectedCallback() {\n execIfDOMReady(async () => {\n const uiPart = this.getAttribute('name')!;\n const editor = await this.#queryEditorElement()!.instancePromise.promise;\n\n this.appendChild((editor.ui.view as any)[uiPart].element);\n });\n }\n\n /**\n * Finds the parent editor component.\n */\n #queryEditorElement(): CKEditorComponent | null {\n return this.closest('ckeditor-component') || document.body.querySelector('ckeditor-component');\n }\n}\n\ncustomElements.define('ckeditor-ui-part-component', CKEditorUIPartComponent);\n"],"names":["execIfDOMReady","callback","SCRIPT_LOAD_PROMISES","injectScript","url","promise","resolve","reject","script","isSafeKey","key","stylesheetExists","href","sheet","loadAsyncCSS","stylesheets","promises","link","loadAsyncImports","imports","loadExternalPlugin","import_name","import_as","window_name","isScriptPresent","module","imported","uncompressImport","pkg","resolveConfigElementReferences","obj","item","anyObj","element","result","value","uid","CKEditorContextComponent","#connectedEditors","#initializeContext","error","_","oldValue","newValue","editor","Context","ContextWatchdog","plugins","#getPlugins","config","#getConfig","args","raw","CKEditorEditableComponent","editorComponent","#queryEditorElement","name","CKEditorMultiRootEditablesTracker","#editorElement","#editables","editorElement","initialEditables","target","ui","editing","model","root","editable","CKEditorComponent","#initialHTML","#context","#contextEditorId","#bundle","#getEventHandler","handler","#setEventHandler","event","#destroy","#editorElementTag","#contextWatchdog","#initializeEditor","editablesOrContent","#ensureStylesheetsInjected","#ensureWindowScriptsInjected","content","beforeInitEventDetails","Editor","#getEditorConstructor","translations","#getTranslations","watchdog","instance","contextId","_element","_config","EditorWatchdog","#assignInputAttributes","#queryEditables","#setupContentSync","#setupEditableHeight","#setupDataChangeListener","err","getRootContent","rootName","getAllRoots","acc","mainEditable","textarea","attr","syncInput","height","writer","#getBundle","windowScripts","mappedItems","CKEditor","editorType","CKEditorUIPartComponent","uiPart"],"mappings":"AAKO,SAASA,EAAeC,GAAwB;AACrD,UAAQ,SAAS,YAAA;AAAA,IACf,KAAK;AACH,eAAS,iBAAiB,oBAAoBA,GAAU,EAAE,MAAM,IAAM;AACtE;AAAA,IAEF,KAAK;AAAA,IACL,KAAK;AACH,iBAAWA,GAAU,CAAC;AACtB;AAAA,IAEF;AACE,cAAQ,KAAK,mCAAmC,SAAS,UAAU,GACnE,WAAWA,GAAU,CAAC;AAAA,EAAA;AAE5B;ACpBA,MAAMC,wBAA2B,IAAA;AAQ1B,SAASC,EAAaC,GAAa;AACxC,MAAIF,EAAqB,IAAIE,CAAG;AAC9B,WAAOF,EAAqB,IAAIE,CAAG;AAGrC,QAAMC,IAAU,IAAI,QAAQ,CAACC,GAASC,MAAW;AAC/C,UAAMC,IAAS,SAAS,cAAc,QAAQ;AAC9C,IAAAA,EAAO,MAAMJ,GACbI,EAAO,SAASF,GAChBE,EAAO,UAAUD,GAEjB,SAAS,KAAK,YAAYC,CAAM;AAAA,EAClC,CAAC;AAED,SAAAN,EAAqB,IAAIE,GAAKC,CAAO,GAC9BA;AACT;AClBO,SAASI,EAAUC,GAAa;AACrC,SACE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7B,OAAOA,KAAS,WACZ,EAAE,aAAa,aAAa,WAAWA,MACvCA;AAAA,IAAA;AAGN,WAAOb,EAAiBgG,CAAW;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM3B,KAAwB;AAC5B,UAAM4B,IAAW,MAAM,OAAO,WAAW,GACnCC,IAAa,KAAK,aAAa,MAAM;AAE3C,QAAI,CAACA,KAAc,CAAC,OAAO,UAAU,eAAe,KAAKD,GAAUC,CAAU;AAC3E,YAAM,IAAI,MAAM,wBAAwBA,CAAU,EAAE;AAGtD,WAAQD,EAAiBC,CAAU;AAAA,EACrC;AACF;AAaA,eAAe,OAAO,sBAAsBhD,CAAiB;AC5nB7D,MAAMiD,UAAgC,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhD,oBAAoB;AAClB,IAAArH,EAAe,YAAY;AACzB,YAAMsH,IAAS,KAAK,aAAa,MAAM,GACjC1E,IAAS,MAAM,KAAKW,GAAA,EAAuB,gBAAgB;AAEjE,WAAK,YAAaX,EAAO,GAAG,KAAa0E,CAAM,EAAE,OAAO;AAAA,IAC1D,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA,EAKA/D,KAAgD;AAC9C,WAAO,KAAK,QAAQ,oBAAoB,KAAK,SAAS,KAAK,cAAc,oBAAoB;AAAA,EAC/F;AACF;AAEA,eAAe,OAAO,8BAA8B8D,CAAuB;"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { ContextWatchdog } from 'ckeditor5';
|
2
|
+
import { CKEditorComponent } from './editor';
|
3
|
+
export declare class CKEditorContextComponent extends HTMLElement {
|
4
|
+
#private;
|
5
|
+
instance: ContextWatchdog | null;
|
6
|
+
instancePromise: PromiseWithResolvers<ContextWatchdog<import('ckeditor5').Context>>;
|
7
|
+
static get observedAttributes(): string[];
|
8
|
+
connectedCallback(): Promise<void>;
|
9
|
+
attributeChangedCallback(_: unknown, oldValue: string | null, newValue: string | null): Promise<void>;
|
10
|
+
disconnectedCallback(): Promise<void>;
|
11
|
+
/**
|
12
|
+
* Register editor component with this context
|
13
|
+
*
|
14
|
+
* @param editor - Editor component to register.
|
15
|
+
*/
|
16
|
+
registerEditor(editor: CKEditorComponent): void;
|
17
|
+
/**
|
18
|
+
* Unregister editor component from this context
|
19
|
+
*
|
20
|
+
* @param editor - Editor component to unregister
|
21
|
+
*/
|
22
|
+
unregisterEditor(editor: CKEditorComponent): void;
|
23
|
+
}
|
24
|
+
//# sourceMappingURL=context.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAIjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,qBAAa,wBAAyB,SAAQ,WAAW;;IACvD,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAQ;IAExC,eAAe,qEAA4C;IAI3D,MAAM,KAAK,kBAAkB,aAE5B;IAEK,iBAAiB;IAUjB,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMrF,oBAAoB;IAO1B;;;;OAIG;IACH,cAAc,CAAC,MAAM,EAAE,iBAAiB;IAIxC;;;;OAIG;IACH,gBAAgB,CAAC,MAAM,EAAE,iBAAiB;CAsE3C"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
export declare class CKEditorEditableComponent extends HTMLElement {
|
2
|
+
#private;
|
3
|
+
/**
|
4
|
+
* List of attributes that trigger updates when changed
|
5
|
+
*
|
6
|
+
* @static
|
7
|
+
* @returns {string[]} Array of attribute names to observe
|
8
|
+
*/
|
9
|
+
static get observedAttributes(): string[];
|
10
|
+
/**
|
11
|
+
* Gets the name of this editable region
|
12
|
+
*/
|
13
|
+
get name(): string;
|
14
|
+
/**
|
15
|
+
* Gets the actual editable DOM element.
|
16
|
+
*/
|
17
|
+
get editableElement(): HTMLDivElement;
|
18
|
+
/**
|
19
|
+
* Lifecycle callback when element is added to DOM
|
20
|
+
* Sets up the editable element and registers it with the parent editor
|
21
|
+
*/
|
22
|
+
connectedCallback(): void;
|
23
|
+
/**
|
24
|
+
* Lifecycle callback for attribute changes
|
25
|
+
* Handles name changes and propagates other attributes to editable element
|
26
|
+
*/
|
27
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
28
|
+
/**
|
29
|
+
* Lifecycle callback when element is removed
|
30
|
+
* Un-registers this editable from the parent editor
|
31
|
+
*/
|
32
|
+
disconnectedCallback(): void;
|
33
|
+
}
|
34
|
+
//# sourceMappingURL=editable.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["../../../src/components/editable.ts"],"names":[],"mappings":"AAIA,qBAAa,yBAA0B,SAAQ,WAAW;;IACxD;;;;;OAKG;IACH,MAAM,KAAK,kBAAkB,aAE5B;IAED;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,eAAe,mBAElB;IAED;;;OAGG;IACH,iBAAiB;IA0BjB;;;OAGG;IACH,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAsBzE;;;OAGG;IACH,oBAAoB;CAcrB"}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
import { Editor, Watchdog } from 'ckeditor5';
|
2
|
+
export declare class CKEditorComponent extends HTMLElement {
|
3
|
+
#private;
|
4
|
+
instancePromise: PromiseWithResolvers<Editor>;
|
5
|
+
watchdog: Watchdog | null;
|
6
|
+
instance: Editor | null;
|
7
|
+
editables: Record<string, HTMLElement> | null;
|
8
|
+
/**
|
9
|
+
* List of attributes that trigger updates when changed.
|
10
|
+
*/
|
11
|
+
static get observedAttributes(): string[];
|
12
|
+
/**
|
13
|
+
* List of input attributes that trigger updates when changed.
|
14
|
+
*/
|
15
|
+
static get inputAttributes(): string[];
|
16
|
+
get oneditorchange(): Function | null;
|
17
|
+
set oneditorchange(handler: Function | null);
|
18
|
+
get oneditorready(): Function | null;
|
19
|
+
set oneditorready(handler: Function | null);
|
20
|
+
get oneditorerror(): Function | null;
|
21
|
+
set oneditorerror(handler: Function | null);
|
22
|
+
/**
|
23
|
+
* Lifecycle callback when element is connected to DOM
|
24
|
+
* Initializes the editor when DOM is ready
|
25
|
+
*
|
26
|
+
* @protected
|
27
|
+
*/
|
28
|
+
connectedCallback(): void;
|
29
|
+
/**
|
30
|
+
* Handles attribute changes and reinitializes editor if needed
|
31
|
+
*
|
32
|
+
* @protected
|
33
|
+
* @param name - Name of changed attribute
|
34
|
+
* @param oldValue - Previous attribute value
|
35
|
+
* @param newValue - New attribute value
|
36
|
+
*/
|
37
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): Promise<void>;
|
38
|
+
/**
|
39
|
+
* Lifecycle callback when element is removed from DOM
|
40
|
+
* Destroys the editor instance
|
41
|
+
* @protected
|
42
|
+
*/
|
43
|
+
disconnectedCallback(): Promise<void>;
|
44
|
+
/**
|
45
|
+
* Runs a callback after the editor is ready. It waits for editor
|
46
|
+
* initialization if needed.
|
47
|
+
*
|
48
|
+
* @param callback - Callback to run
|
49
|
+
*/
|
50
|
+
runAfterEditorReady<E extends Editor>(callback: (editor: E) => void): Promise<void>;
|
51
|
+
/**
|
52
|
+
* Re-initializes the editor by destroying existing instance and creating new one
|
53
|
+
*
|
54
|
+
* @private
|
55
|
+
* @returns {Promise<void>}
|
56
|
+
*/
|
57
|
+
reinitializeEditor(): Promise<void>;
|
58
|
+
/**
|
59
|
+
* Checks if current editor is classic type
|
60
|
+
*/
|
61
|
+
isClassic(): boolean;
|
62
|
+
/**
|
63
|
+
* Checks if current editor is balloon type
|
64
|
+
*/
|
65
|
+
isBallon(): boolean;
|
66
|
+
/**
|
67
|
+
* Checks if current editor is multiroot type
|
68
|
+
*/
|
69
|
+
isMultiroot(): boolean;
|
70
|
+
/**
|
71
|
+
* Checks if current editor is decoupled type
|
72
|
+
*/
|
73
|
+
isDecoupled(): boolean;
|
74
|
+
/**
|
75
|
+
* Checks if current editor has watchdog enabled
|
76
|
+
*/
|
77
|
+
hasWatchdog(): boolean;
|
78
|
+
}
|
79
|
+
//# sourceMappingURL=editor.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,QAAQ,EAAE,MAAM,WAAW,CAAC;AAgBlE,qBAAa,iBAAkB,SAAQ,WAAW;;IAChD,eAAe,+BAAmC;IAElD,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAQ;IAEjC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,IAAI,CAAqB;IAUlE;;OAEG;IACH,MAAM,KAAK,kBAAkB,aAE5B;IAED;;OAEG;IACH,MAAM,KAAK,eAAe,aAEzB;IAED,IAAI,cAAc,oBAEjB;IAED,IAAI,cAAc,CAAC,OAAO,iBAAA,EAEzB;IAED,IAAI,aAAa,oBAEhB;IAED,IAAI,aAAa,CAAC,OAAO,iBAAA,EAExB;IAED,IAAI,aAAa,oBAEhB;IAED,IAAI,aAAa,CAAC,OAAO,iBAAA,EAExB;IAwCD;;;;;OAKG;IACH,iBAAiB;IAwBjB;;;;;;;OAOG;IACG,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAQ7F;;;;OAIG;IACG,oBAAoB;IAa1B;;;;;OAKG;IACH,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAoJnF;;;;;OAKG;IACG,kBAAkB;IA+ExB;;OAEG;IACH,SAAS;IAIT;;OAEG;IACH,QAAQ;IAIR;;OAEG;IACH,WAAW;IAIX;;OAEG;IACH,WAAW;IAIX;;OAEG;IACH,WAAW;CAwLZ"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,+BAA+B,CAAC"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { CKEditorComponent } from './editor';
|
2
|
+
export declare class CKEditorMultiRootEditablesTracker {
|
3
|
+
#private;
|
4
|
+
/**
|
5
|
+
* Creates new tracker instance wrapped in a Proxy for dynamic property access
|
6
|
+
*
|
7
|
+
* @param editorElement - Parent editor component reference
|
8
|
+
* @param initialEditables - Initial editable elements
|
9
|
+
* @returns Proxy wrapping the tracker
|
10
|
+
*/
|
11
|
+
constructor(editorElement: CKEditorComponent, initialEditables?: Record<string, HTMLElement>);
|
12
|
+
/**
|
13
|
+
* Attaches a new editable root to the editor.
|
14
|
+
* Creates new editor root and binds UI elements.
|
15
|
+
*
|
16
|
+
* @param name - Name of the editable root
|
17
|
+
* @param element - DOM element to use as editable
|
18
|
+
* @returns Resolves when root is attached
|
19
|
+
*/
|
20
|
+
attachRoot(name: string, element: HTMLElement): Promise<void>;
|
21
|
+
/**
|
22
|
+
* Detaches an editable root from the editor.
|
23
|
+
* Removes editor root and cleans up UI bindings.
|
24
|
+
*
|
25
|
+
* @param name - Name of root to detach
|
26
|
+
* @returns Resolves when root is detached
|
27
|
+
*/
|
28
|
+
detachRoot(name: string): Promise<void>;
|
29
|
+
/**
|
30
|
+
* Gets all currently tracked editable elements
|
31
|
+
*
|
32
|
+
* @returns Map of all editable elements
|
33
|
+
*/
|
34
|
+
getAll(): Record<string, HTMLElement>;
|
35
|
+
}
|
36
|
+
//# sourceMappingURL=multiroot-editables-tracker.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"multiroot-editables-tracker.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/multiroot-editables-tracker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,qBAAa,iCAAiC;;IAI5C;;;;;;OAMG;gBAED,aAAa,EAAE,iBAAiB,EAChC,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAM;IAkDpD;;;;;;;OAOG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW;IAuBnD;;;;;;OAMG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM;IAW7B;;;;OAIG;IACH,MAAM;CAGP"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ui-part.d.ts","sourceRoot":"","sources":["../../../src/components/ui-part.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"exec-if-dom-ready.d.ts","sourceRoot":"","sources":["../../../src/helpers/exec-if-dom-ready.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,QAepD"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export * from './exec-if-dom-ready';
|
2
|
+
export * from './inject-script';
|
3
|
+
export * from './is-safe-key';
|
4
|
+
export * from './load-async-css';
|
5
|
+
export * from './load-async-imports';
|
6
|
+
export * from './resolve-config-element-references';
|
7
|
+
export * from './uid';
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,OAAO,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* Dynamically loads script files based on configuration.
|
3
|
+
* Uses caching to avoid loading the same script multiple times.
|
4
|
+
*
|
5
|
+
* @param url - URL of the script to load
|
6
|
+
*/
|
7
|
+
export declare function injectScript(url: string): any;
|
8
|
+
//# sourceMappingURL=inject-script.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"inject-script.d.ts","sourceRoot":"","sources":["../../../src/helpers/inject-script.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,OAgBvC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* Checks if a key is safe to use in configuration objects to prevent prototype pollution
|
3
|
+
*
|
4
|
+
* @param key - Key name to check
|
5
|
+
* @returns True if key is safe to use
|
6
|
+
*/
|
7
|
+
export declare function isSafeKey(key: string): boolean;
|
8
|
+
//# sourceMappingURL=is-safe-key.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"is-safe-key.d.ts","sourceRoot":"","sources":["../../../src/helpers/is-safe-key.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,WAOpC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* Dynamically loads CSS files based on configuration
|
3
|
+
*
|
4
|
+
* @param stylesheets - Array of CSS file URLs to load
|
5
|
+
* @returns Array of promises for each CSS file load
|
6
|
+
* @throws When CSS file loading fails
|
7
|
+
*/
|
8
|
+
export declare function loadAsyncCSS(stylesheets?: string[]): Promise<void[]>;
|
9
|
+
//# sourceMappingURL=load-async-css.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"load-async-css.d.ts","sourceRoot":"","sources":["../../../src/helpers/load-async-css.ts"],"names":[],"mappings":"AAcA;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,WAAW,GAAE,MAAM,EAAO,mBAoBtD"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/**
|
2
|
+
* Dynamically imports modules based on configuration
|
3
|
+
*
|
4
|
+
* @param imports - Array of import configurations
|
5
|
+
* @param imports[].name - Name of inline plugin (for inline type)
|
6
|
+
* @param imports[].code - Source code of inline plugin (for inline type)
|
7
|
+
* @param imports[].import_name - Module path to import (for external type)
|
8
|
+
* @param imports[].import_as - Name to import as (for external type)
|
9
|
+
* @param imports[].window_name - Global window object name (for external type)
|
10
|
+
* @param imports[].type - Type of import
|
11
|
+
* @returns Array of loaded modules
|
12
|
+
* @throws When plugin loading fails
|
13
|
+
*/
|
14
|
+
export declare function loadAsyncImports(imports?: Array<AsyncImportRawDescription | string>): Promise<any[]>;
|
15
|
+
/**
|
16
|
+
* Type definition for plugin raw descriptor
|
17
|
+
*/
|
18
|
+
export type AsyncImportRawDescription = {
|
19
|
+
url?: string;
|
20
|
+
import_name?: string;
|
21
|
+
import_as?: string;
|
22
|
+
window_name?: string;
|
23
|
+
stylesheets?: string[];
|
24
|
+
};
|
25
|
+
//# sourceMappingURL=load-async-imports.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"load-async-imports.d.ts","sourceRoot":"","sources":["../../../src/helpers/load-async-imports.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,KAAK,CAAC,yBAAyB,GAAG,MAAM,CAAM,kBAsDvF;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,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 resolveConfigElementReferences<T>(obj: T): T;
|
9
|
+
//# sourceMappingURL=resolve-config-element-references.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resolve-config-element-references.d.ts","sourceRoot":"","sources":["../../../src/helpers/resolve-config-element-references.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CA4B3D"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"uid.d.ts","sourceRoot":"","sources":["../../../src/helpers/uid.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,GAAG,WAElB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAMA,wBAyBG"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"name": "ckeditor5-rails",
|
3
|
+
"version": "1.9.0",
|
4
|
+
"description": "CKEditor 5 integration for Rails Framework",
|
5
|
+
"exports": {
|
6
|
+
".": {
|
7
|
+
"types": "./dist/index.d.ts",
|
8
|
+
"import": "./dist/index.mjs",
|
9
|
+
"require": "./dist/index.cjs"
|
10
|
+
}
|
11
|
+
},
|
12
|
+
"main": "dist/index.cjs",
|
13
|
+
"module": "dist/index.mjs",
|
14
|
+
"types": "dist/index.d.ts",
|
15
|
+
"files": [
|
16
|
+
"dist",
|
17
|
+
"src"
|
18
|
+
],
|
19
|
+
"scripts": {
|
20
|
+
"clean": "rm -rf dist",
|
21
|
+
"prepare": "npm run build",
|
22
|
+
"build": "npm run clean && vite build",
|
23
|
+
"watch": "vite build --watch",
|
24
|
+
"dev": "vite build --watch",
|
25
|
+
"typecheck": "tsc --noEmit --pretty"
|
26
|
+
},
|
27
|
+
"dependencies": {
|
28
|
+
"ckeditor5": "^45.2.1",
|
29
|
+
"ckeditor5-premium-features": "^45.2.1"
|
30
|
+
},
|
31
|
+
"devDependencies": {
|
32
|
+
"typescript": "^5.5.4",
|
33
|
+
"vite": "^7.0.2",
|
34
|
+
"vite-plugin-dts": "^4.5.4",
|
35
|
+
"vite-tsconfig-paths": "^5.1.4"
|
36
|
+
}
|
37
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ckeditor5
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mateusz Bagiński
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-08-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -60,11 +60,6 @@ files:
|
|
60
60
|
- lib/ckeditor5/rails/assets/assets_bundle.rb
|
61
61
|
- lib/ckeditor5/rails/assets/assets_bundle_html_serializer.rb
|
62
62
|
- lib/ckeditor5/rails/assets/webcomponent_bundle.rb
|
63
|
-
- lib/ckeditor5/rails/assets/webcomponents/components/context.mjs
|
64
|
-
- lib/ckeditor5/rails/assets/webcomponents/components/editable.mjs
|
65
|
-
- lib/ckeditor5/rails/assets/webcomponents/components/editor.mjs
|
66
|
-
- lib/ckeditor5/rails/assets/webcomponents/components/ui-part.mjs
|
67
|
-
- lib/ckeditor5/rails/assets/webcomponents/utils.mjs
|
68
63
|
- lib/ckeditor5/rails/cdn/ckbox_bundle.rb
|
69
64
|
- lib/ckeditor5/rails/cdn/ckeditor_bundle.rb
|
70
65
|
- lib/ckeditor5/rails/cdn/concerns/bundle_builder.rb
|
@@ -105,6 +100,46 @@ files:
|
|
105
100
|
- lib/ckeditor5/rails/semver.rb
|
106
101
|
- lib/ckeditor5/rails/version.rb
|
107
102
|
- lib/ckeditor5/rails/version_detector.rb
|
103
|
+
- npm_package/dist/index.cjs
|
104
|
+
- npm_package/dist/index.cjs.map
|
105
|
+
- npm_package/dist/index.d.ts
|
106
|
+
- npm_package/dist/index.mjs
|
107
|
+
- npm_package/dist/index.mjs.map
|
108
|
+
- npm_package/dist/src/components/context.d.ts
|
109
|
+
- npm_package/dist/src/components/context.d.ts.map
|
110
|
+
- npm_package/dist/src/components/editable.d.ts
|
111
|
+
- npm_package/dist/src/components/editable.d.ts.map
|
112
|
+
- npm_package/dist/src/components/editor/editor.d.ts
|
113
|
+
- npm_package/dist/src/components/editor/editor.d.ts.map
|
114
|
+
- npm_package/dist/src/components/editor/index.d.ts
|
115
|
+
- npm_package/dist/src/components/editor/index.d.ts.map
|
116
|
+
- npm_package/dist/src/components/editor/multiroot-editables-tracker.d.ts
|
117
|
+
- npm_package/dist/src/components/editor/multiroot-editables-tracker.d.ts.map
|
118
|
+
- npm_package/dist/src/components/index.d.ts
|
119
|
+
- npm_package/dist/src/components/index.d.ts.map
|
120
|
+
- npm_package/dist/src/components/ui-part.d.ts
|
121
|
+
- npm_package/dist/src/components/ui-part.d.ts.map
|
122
|
+
- npm_package/dist/src/helpers/exec-if-dom-ready.d.ts
|
123
|
+
- npm_package/dist/src/helpers/exec-if-dom-ready.d.ts.map
|
124
|
+
- npm_package/dist/src/helpers/index.d.ts
|
125
|
+
- npm_package/dist/src/helpers/index.d.ts.map
|
126
|
+
- npm_package/dist/src/helpers/inject-script.d.ts
|
127
|
+
- npm_package/dist/src/helpers/inject-script.d.ts.map
|
128
|
+
- npm_package/dist/src/helpers/is-safe-key.d.ts
|
129
|
+
- npm_package/dist/src/helpers/is-safe-key.d.ts.map
|
130
|
+
- npm_package/dist/src/helpers/load-async-css.d.ts
|
131
|
+
- npm_package/dist/src/helpers/load-async-css.d.ts.map
|
132
|
+
- npm_package/dist/src/helpers/load-async-imports.d.ts
|
133
|
+
- npm_package/dist/src/helpers/load-async-imports.d.ts.map
|
134
|
+
- npm_package/dist/src/helpers/resolve-config-element-references.d.ts
|
135
|
+
- npm_package/dist/src/helpers/resolve-config-element-references.d.ts.map
|
136
|
+
- npm_package/dist/src/helpers/uid.d.ts
|
137
|
+
- npm_package/dist/src/helpers/uid.d.ts.map
|
138
|
+
- npm_package/dist/src/index.d.ts
|
139
|
+
- npm_package/dist/src/index.d.ts.map
|
140
|
+
- npm_package/dist/vite.config.d.ts
|
141
|
+
- npm_package/dist/vite.config.d.ts.map
|
142
|
+
- npm_package/package.json
|
108
143
|
- spec/e2e/features/ajax_form_integration_spec.rb
|
109
144
|
- spec/e2e/features/context_spec.rb
|
110
145
|
- spec/e2e/features/editor_types_spec.rb
|