@ckeditor/ckeditor5-word-count 43.3.0-alpha.5 → 43.3.0-alpha.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js","../src/utils.ts","../src/wordcount.ts"],"names":["modelElementToPlainText","item","is","data","element","text","prev","child","getChildren","childText","WordCount","Plugin","constructor","editor","set","Object","defineProperties","characters","get","_getCharacters","_getText","words","_getWords","undefined","_config","config","_outputView","_wordsMatchRegExp","env","features","isRegExpUnicodePropertySupported","RegExp","pluginName","isOfficialPlugin","model","document","on","throttle","_refreshStats","bind","onUpdate","evt","isElement","container","appendChild","wordCountContainer","remove","destroy","t","displayWords","displayCharacters","Template","children","View","to","push","tag","attributes","class","setTemplate","render","txt","root","getRoots","replace","length","detectedWords","match","fire"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/D,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACrE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC7D,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;ACH/C,CAAA,CAAA;ADMA,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CA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CAAA,CAAA;AAC1C/C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA;AACAJ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACD,CAAA,CAAA,CAAA,CAAA;AACD;;AFhEA,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Template, View } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { env } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module word-count/utils\n */ /**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */ function modelElementToPlainText(item) {\n if (item.is('$text') || item.is('$textProxy')) {\n return item.data;\n }\n const element = item;\n let text = '';\n let prev = null;\n for (const child of element.getChildren()){\n const childText = modelElementToPlainText(child);\n // If last block was finish, start from new line.\n if (prev && prev.is('element')) {\n text += '\\n';\n }\n text += childText;\n prev = child;\n }\n return text;\n}\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */ class WordCount extends Plugin {\n /**\n\t * The configuration of this plugin.\n\t */ _config;\n /**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */ _outputView;\n /**\n\t * A regular expression used to recognize words in the editor's content.\n\t */ _wordsMatchRegExp;\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n this.set('characters', 0);\n this.set('words', 0);\n // Don't wait for the #update event to set the value of the properties but obtain it right away.\n // This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n // If not accessed directly, the properties will be refreshed upon #update anyway.\n Object.defineProperties(this, {\n characters: {\n get () {\n return this.characters = this._getCharacters(this._getText());\n }\n },\n words: {\n get () {\n return this.words = this._getWords(this._getText());\n }\n }\n });\n this.set('_wordsLabel', undefined);\n this.set('_charactersLabel', undefined);\n this._config = editor.config.get('wordCount') || {};\n this._outputView = undefined;\n this._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ? // Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n // Groups:\n // {L} - Any kind of letter from any language.\n // {N} - Any kind of numeric character in any script.\n new RegExp('([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu') : /([a-zA-Z0-9À-ž]+\\S?)+/gu;\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'WordCount';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n editor.model.document.on('change:data', throttle(this._refreshStats.bind(this), 250));\n if (typeof this._config.onUpdate == 'function') {\n this.on('update', (evt, data)=>{\n this._config.onUpdate(data);\n });\n }\n if (isElement(this._config.container)) {\n this._config.container.appendChild(this.wordCountContainer);\n }\n }\n /**\n\t * @inheritDoc\n\t */ destroy() {\n if (this._outputView) {\n this._outputView.element.remove();\n this._outputView.destroy();\n }\n super.destroy();\n }\n /**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */ get wordCountContainer() {\n const editor = this.editor;\n const t = editor.t;\n const displayWords = editor.config.get('wordCount.displayWords');\n const displayCharacters = editor.config.get('wordCount.displayCharacters');\n const bind = Template.bind(this, this);\n const children = [];\n if (!this._outputView) {\n this._outputView = new View();\n if (displayWords || displayWords === undefined) {\n this.bind('_wordsLabel').to(this, 'words', (words)=>{\n return t('Words: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_wordsLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__words'\n }\n });\n }\n if (displayCharacters || displayCharacters === undefined) {\n this.bind('_charactersLabel').to(this, 'characters', (words)=>{\n return t('Characters: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_charactersLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__characters'\n }\n });\n }\n this._outputView.setTemplate({\n tag: 'div',\n attributes: {\n class: [\n 'ck',\n 'ck-word-count'\n ]\n },\n children\n });\n this._outputView.render();\n }\n return this._outputView.element;\n }\n _getText() {\n let txt = '';\n for (const root of this.editor.model.document.getRoots()){\n if (txt !== '') {\n // Add a delimiter, so words from each root are treated independently.\n txt += '\\n';\n }\n txt += modelElementToPlainText(root);\n }\n return txt;\n }\n /**\n\t * Determines the number of characters in the current editor's model.\n\t */ _getCharacters(txt) {\n return txt.replace(/\\n/g, '').length;\n }\n /**\n\t * Determines the number of words in the current editor's model.\n\t */ _getWords(txt) {\n const detectedWords = txt.match(this._wordsMatchRegExp) || [];\n return detectedWords.length;\n }\n /**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */ _refreshStats() {\n const txt = this._getText();\n const words = this.words = this._getWords(txt);\n const characters = this.characters = this._getCharacters(txt);\n this.fire('update', {\n words,\n characters\n });\n }\n}\n\nexport { WordCount };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/utils\n */\n\nimport type { Element, Item } from 'ckeditor5/src/engine.js';\n\n/**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */\nexport function modelElementToPlainText( item: Item ): string {\n\tif ( item.is( '$text' ) || item.is( '$textProxy' ) ) {\n\t\treturn item.data;\n\t}\n\n\tconst element = item as Element;\n\tlet text = '';\n\tlet prev = null;\n\n\tfor ( const child of element.getChildren() ) {\n\t\tconst childText = modelElementToPlainText( child );\n\n\t\t// If last block was finish, start from new line.\n\t\tif ( prev && prev.is( 'element' ) ) {\n\t\t\ttext += '\\n';\n\t\t}\n\n\t\ttext += childText;\n\n\t\tprev = child;\n\t}\n\n\treturn text;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/wordcount\n */\n\nimport { type DocumentChangeEvent } from 'ckeditor5/src/engine.js';\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport { Template, View } from 'ckeditor5/src/ui.js';\nimport { env } from 'ckeditor5/src/utils.js';\n\nimport { modelElementToPlainText } from './utils.js';\nimport type { WordCountConfig } from './wordcountconfig.js';\n\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */\nexport default class WordCount extends Plugin {\n\t/**\n\t * The number of characters in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public characters: number;\n\n\t/**\n\t * The number of words in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public words: number;\n\n\t/**\n\t * The label used to display the words value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _wordsLabel: string | undefined;\n\n\t/**\n\t * The label used to display the characters value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _charactersLabel: string | undefined;\n\n\t/**\n\t * The configuration of this plugin.\n\t */\n\tprivate _config: WordCountConfig;\n\n\t/**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */\n\tprivate _outputView: View | undefined;\n\n\t/**\n\t * A regular expression used to recognize words in the editor's content.\n\t */\n\tprivate readonly _wordsMatchRegExp: RegExp;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.set( 'characters', 0 );\n\t\tthis.set( 'words', 0 );\n\n\t\t// Don't wait for the #update event to set the value of the properties but obtain it right away.\n\t\t// This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n\t\t// If not accessed directly, the properties will be refreshed upon #update anyway.\n\t\tObject.defineProperties( this, {\n\t\t\tcharacters: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.characters = this._getCharacters( this._getText() ) );\n\t\t\t\t}\n\t\t\t},\n\t\t\twords: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.words = this._getWords( this._getText() ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis.set( '_wordsLabel', undefined );\n\t\tthis.set( '_charactersLabel', undefined );\n\n\t\tthis._config = editor.config.get( 'wordCount' ) || {};\n\n\t\tthis._outputView = undefined;\n\n\t\tthis._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ?\n\t\t\t// Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n\t\t\t// Groups:\n\t\t\t// {L} - Any kind of letter from any language.\n\t\t\t// {N} - Any kind of numeric character in any script.\n\t\t\tnew RegExp( '([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu' ) :\n\t\t\t/([a-zA-Z0-9À-ž]+\\S?)+/gu;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'WordCount' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.document.on<DocumentChangeEvent>( 'change:data', throttle( this._refreshStats.bind( this ), 250 ) );\n\n\t\tif ( typeof this._config.onUpdate == 'function' ) {\n\t\t\tthis.on<WordCountUpdateEvent>( 'update', ( evt, data ) => {\n\t\t\t\tthis._config.onUpdate!( data );\n\t\t\t} );\n\t\t}\n\n\t\tif ( isElement( this._config.container ) ) {\n\t\t\tthis._config.container!.appendChild( this.wordCountContainer );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._outputView ) {\n\t\t\tthis._outputView.element!.remove();\n\t\t\tthis._outputView.destroy();\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */\n\tpublic get wordCountContainer(): HTMLElement {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst displayWords = editor.config.get( 'wordCount.displayWords' );\n\t\tconst displayCharacters = editor.config.get( 'wordCount.displayCharacters' );\n\t\tconst bind = Template.bind( this, this );\n\t\tconst children = [];\n\n\t\tif ( !this._outputView ) {\n\t\t\tthis._outputView = new View();\n\n\t\t\tif ( displayWords || displayWords === undefined ) {\n\t\t\t\tthis.bind( '_wordsLabel' ).to( this, 'words', words => {\n\t\t\t\t\treturn t( 'Words: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_wordsLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__words'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( displayCharacters || displayCharacters === undefined ) {\n\t\t\t\tthis.bind( '_charactersLabel' ).to( this, 'characters', words => {\n\t\t\t\t\treturn t( 'Characters: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_charactersLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__characters'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis._outputView.setTemplate( {\n\t\t\t\ttag: 'div',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-word-count'\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t} );\n\n\t\t\tthis._outputView.render();\n\t\t}\n\n\t\treturn this._outputView.element!;\n\t}\n\n\tprivate _getText(): string {\n\t\tlet txt = '';\n\n\t\tfor ( const root of this.editor.model.document.getRoots() ) {\n\t\t\tif ( txt !== '' ) {\n\t\t\t\t// Add a delimiter, so words from each root are treated independently.\n\t\t\t\ttxt += '\\n';\n\t\t\t}\n\n\t\t\ttxt += modelElementToPlainText( root );\n\t\t}\n\n\t\treturn txt;\n\t}\n\n\t/**\n\t * Determines the number of characters in the current editor's model.\n\t */\n\tprivate _getCharacters( txt: string ): number {\n\t\treturn txt.replace( /\\n/g, '' ).length;\n\t}\n\n\t/**\n\t * Determines the number of words in the current editor's model.\n\t */\n\tprivate _getWords( txt: string ): number {\n\t\tconst detectedWords = txt.match( this._wordsMatchRegExp ) || [];\n\n\t\treturn detectedWords.length;\n\t}\n\n\t/**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */\n\tprivate _refreshStats(): void {\n\t\tconst txt = this._getText();\n\t\tconst words = this.words = this._getWords( txt );\n\t\tconst characters = this.characters = this._getCharacters( txt );\n\n\t\tthis.fire<WordCountUpdateEvent>( 'update', {\n\t\t\twords,\n\t\t\tcharacters\n\t\t} );\n\t}\n}\n\n/**\n * An event fired after {@link ~WordCount#words} and {@link ~WordCount#characters} are updated.\n *\n * @eventName ~WordCount#update\n */\nexport type WordCountUpdateEvent = {\n\tname: 'update';\n\targs: [ { words: number; characters: number } ];\n};\n"]}
|
1
|
+
{"version":3,"sources":["index.js","../src/utils.ts","../src/wordcount.ts"],"names":["modelElementToPlainText","item","is","data","element","text","prev","child","getChildren","childText","WordCount","Plugin","constructor","editor","set","Object","defineProperties","characters","get","_getCharacters","_getText","words","_getWords","undefined","_config","config","_outputView","_wordsMatchRegExp","env","features","isRegExpUnicodePropertySupported","RegExp","pluginName","isOfficialPlugin","model","document","on","throttle","_refreshStats","bind","onUpdate","evt","isElement","container","appendChild","wordCountContainer","remove","destroy","t","displayWords","displayCharacters","Template","children","View","to","push","tag","attributes","class","setTemplate","render","txt","root","getRoots","replace","length","detectedWords","match","fire"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/D,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACrE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC7D,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;ACH/C,CAAA,CAAA;ADM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AAwB,CAAA,MAAA,CAAU,CAAA,CAAA;AAC1C/C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,KAAAA;AACAJ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACD,CAAA,CAAA,CAAA,CAAA;AACD;;AFhEA,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Template, View } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { env } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */ /**\n * @module word-count/utils\n */ /**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */ function modelElementToPlainText(item) {\n if (item.is('$text') || item.is('$textProxy')) {\n return item.data;\n }\n const element = item;\n let text = '';\n let prev = null;\n for (const child of element.getChildren()){\n const childText = modelElementToPlainText(child);\n // If last block was finish, start from new line.\n if (prev && prev.is('element')) {\n text += '\\n';\n }\n text += childText;\n prev = child;\n }\n return text;\n}\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */ class WordCount extends Plugin {\n /**\n\t * The configuration of this plugin.\n\t */ _config;\n /**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */ _outputView;\n /**\n\t * A regular expression used to recognize words in the editor's content.\n\t */ _wordsMatchRegExp;\n /**\n\t * @inheritDoc\n\t */ constructor(editor){\n super(editor);\n this.set('characters', 0);\n this.set('words', 0);\n // Don't wait for the #update event to set the value of the properties but obtain it right away.\n // This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n // If not accessed directly, the properties will be refreshed upon #update anyway.\n Object.defineProperties(this, {\n characters: {\n get () {\n return this.characters = this._getCharacters(this._getText());\n }\n },\n words: {\n get () {\n return this.words = this._getWords(this._getText());\n }\n }\n });\n this.set('_wordsLabel', undefined);\n this.set('_charactersLabel', undefined);\n this._config = editor.config.get('wordCount') || {};\n this._outputView = undefined;\n this._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ? // Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n // Groups:\n // {L} - Any kind of letter from any language.\n // {N} - Any kind of numeric character in any script.\n new RegExp('([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu') : /([a-zA-Z0-9À-ž]+\\S?)+/gu;\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'WordCount';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n editor.model.document.on('change:data', throttle(this._refreshStats.bind(this), 250));\n if (typeof this._config.onUpdate == 'function') {\n this.on('update', (evt, data)=>{\n this._config.onUpdate(data);\n });\n }\n if (isElement(this._config.container)) {\n this._config.container.appendChild(this.wordCountContainer);\n }\n }\n /**\n\t * @inheritDoc\n\t */ destroy() {\n if (this._outputView) {\n this._outputView.element.remove();\n this._outputView.destroy();\n }\n super.destroy();\n }\n /**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */ get wordCountContainer() {\n const editor = this.editor;\n const t = editor.t;\n const displayWords = editor.config.get('wordCount.displayWords');\n const displayCharacters = editor.config.get('wordCount.displayCharacters');\n const bind = Template.bind(this, this);\n const children = [];\n if (!this._outputView) {\n this._outputView = new View();\n if (displayWords || displayWords === undefined) {\n this.bind('_wordsLabel').to(this, 'words', (words)=>{\n return t('Words: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_wordsLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__words'\n }\n });\n }\n if (displayCharacters || displayCharacters === undefined) {\n this.bind('_charactersLabel').to(this, 'characters', (words)=>{\n return t('Characters: %0', words);\n });\n children.push({\n tag: 'div',\n children: [\n {\n text: [\n bind.to('_charactersLabel')\n ]\n }\n ],\n attributes: {\n class: 'ck-word-count__characters'\n }\n });\n }\n this._outputView.setTemplate({\n tag: 'div',\n attributes: {\n class: [\n 'ck',\n 'ck-word-count'\n ]\n },\n children\n });\n this._outputView.render();\n }\n return this._outputView.element;\n }\n _getText() {\n let txt = '';\n for (const root of this.editor.model.document.getRoots()){\n if (txt !== '') {\n // Add a delimiter, so words from each root are treated independently.\n txt += '\\n';\n }\n txt += modelElementToPlainText(root);\n }\n return txt;\n }\n /**\n\t * Determines the number of characters in the current editor's model.\n\t */ _getCharacters(txt) {\n return txt.replace(/\\n/g, '').length;\n }\n /**\n\t * Determines the number of words in the current editor's model.\n\t */ _getWords(txt) {\n const detectedWords = txt.match(this._wordsMatchRegExp) || [];\n return detectedWords.length;\n }\n /**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */ _refreshStats() {\n const txt = this._getText();\n const words = this.words = this._getWords(txt);\n const characters = this.characters = this._getCharacters(txt);\n this.fire('update', {\n words,\n characters\n });\n }\n}\n\nexport { WordCount };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/utils\n */\n\nimport type { Element, Item } from 'ckeditor5/src/engine.js';\n\n/**\n * Returns a plain text representation of an element and its children.\n *\n * @returns Plain text representing the model's data.\n */\nexport function modelElementToPlainText( item: Item ): string {\n\tif ( item.is( '$text' ) || item.is( '$textProxy' ) ) {\n\t\treturn item.data;\n\t}\n\n\tconst element = item as Element;\n\tlet text = '';\n\tlet prev = null;\n\n\tfor ( const child of element.getChildren() ) {\n\t\tconst childText = modelElementToPlainText( child );\n\n\t\t// If last block was finish, start from new line.\n\t\tif ( prev && prev.is( 'element' ) ) {\n\t\t\ttext += '\\n';\n\t\t}\n\n\t\ttext += childText;\n\n\t\tprev = child;\n\t}\n\n\treturn text;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module word-count/wordcount\n */\n\nimport { type DocumentChangeEvent } from 'ckeditor5/src/engine.js';\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport { Template, View } from 'ckeditor5/src/ui.js';\nimport { env } from 'ckeditor5/src/utils.js';\n\nimport { modelElementToPlainText } from './utils.js';\nimport type { WordCountConfig } from './wordcountconfig.js';\n\nimport { throttle, isElement } from 'lodash-es';\n\n/**\n * The word count plugin.\n *\n * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.\n * It also provides an HTML element that updates its state whenever the editor content is changed.\n *\n * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.\n * The number of words and characters in your text are determined based on the created plain text. Please keep in mind\n * that every block in the editor is separated with a newline character, which is included in the calculation.\n *\n * Here are some examples of how the word and character calculations are made:\n *\n * ```html\n * <paragraph>foo</paragraph>\n * <paragraph>bar</paragraph>\n * // Words: 2, Characters: 7\n *\n * <paragraph><$text bold=\"true\">foo</$text>bar</paragraph>\n * // Words: 1, Characters: 6\n *\n * <paragraph>*&^%)</paragraph>\n * // Words: 0, Characters: 5\n *\n * <paragraph>foo(bar)</paragraph>\n * //Words: 1, Characters: 8\n *\n * <paragraph>12345</paragraph>\n * // Words: 1, Characters: 5\n * ```\n */\nexport default class WordCount extends Plugin {\n\t/**\n\t * The number of characters in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public characters: number;\n\n\t/**\n\t * The number of words in the editor.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public words: number;\n\n\t/**\n\t * The label used to display the words value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _wordsLabel: string | undefined;\n\n\t/**\n\t * The label used to display the characters value in the {@link #wordCountContainer output container}.\n\t *\n\t * @observable\n\t * @private\n\t * @readonly\n\t */\n\tdeclare public _charactersLabel: string | undefined;\n\n\t/**\n\t * The configuration of this plugin.\n\t */\n\tprivate _config: WordCountConfig;\n\n\t/**\n\t * The reference to a {@link module:ui/view~View view object} that contains the self-updating HTML container.\n\t */\n\tprivate _outputView: View | undefined;\n\n\t/**\n\t * A regular expression used to recognize words in the editor's content.\n\t */\n\tprivate readonly _wordsMatchRegExp: RegExp;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.set( 'characters', 0 );\n\t\tthis.set( 'words', 0 );\n\n\t\t// Don't wait for the #update event to set the value of the properties but obtain it right away.\n\t\t// This way, accessing the properties directly returns precise numbers, e.g. for validation, etc.\n\t\t// If not accessed directly, the properties will be refreshed upon #update anyway.\n\t\tObject.defineProperties( this, {\n\t\t\tcharacters: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.characters = this._getCharacters( this._getText() ) );\n\t\t\t\t}\n\t\t\t},\n\t\t\twords: {\n\t\t\t\tget() {\n\t\t\t\t\treturn ( this.words = this._getWords( this._getText() ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis.set( '_wordsLabel', undefined );\n\t\tthis.set( '_charactersLabel', undefined );\n\n\t\tthis._config = editor.config.get( 'wordCount' ) || {};\n\n\t\tthis._outputView = undefined;\n\n\t\tthis._wordsMatchRegExp = env.features.isRegExpUnicodePropertySupported ?\n\t\t\t// Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n\t\t\t// Groups:\n\t\t\t// {L} - Any kind of letter from any language.\n\t\t\t// {N} - Any kind of numeric character in any script.\n\t\t\tnew RegExp( '([\\\\p{L}\\\\p{N}]+\\\\S?)+', 'gu' ) :\n\t\t\t/([a-zA-Z0-9À-ž]+\\S?)+/gu;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'WordCount' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.document.on<DocumentChangeEvent>( 'change:data', throttle( this._refreshStats.bind( this ), 250 ) );\n\n\t\tif ( typeof this._config.onUpdate == 'function' ) {\n\t\t\tthis.on<WordCountUpdateEvent>( 'update', ( evt, data ) => {\n\t\t\t\tthis._config.onUpdate!( data );\n\t\t\t} );\n\t\t}\n\n\t\tif ( isElement( this._config.container ) ) {\n\t\t\tthis._config.container!.appendChild( this.wordCountContainer );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tif ( this._outputView ) {\n\t\t\tthis._outputView.element!.remove();\n\t\t\tthis._outputView.destroy();\n\t\t}\n\n\t\tsuper.destroy();\n\t}\n\n\t/**\n\t * Creates a self-updating HTML element. Repeated executions return the same element.\n\t * The returned element has the following HTML structure:\n\t *\n\t * ```html\n\t * <div class=\"ck ck-word-count\">\n\t * \t<div class=\"ck-word-count__words\">Words: 4</div>\n\t * \t<div class=\"ck-word-count__characters\">Characters: 28</div>\n\t * </div>\n\t * ```\n\t */\n\tpublic get wordCountContainer(): HTMLElement {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst displayWords = editor.config.get( 'wordCount.displayWords' );\n\t\tconst displayCharacters = editor.config.get( 'wordCount.displayCharacters' );\n\t\tconst bind = Template.bind( this, this );\n\t\tconst children = [];\n\n\t\tif ( !this._outputView ) {\n\t\t\tthis._outputView = new View();\n\n\t\t\tif ( displayWords || displayWords === undefined ) {\n\t\t\t\tthis.bind( '_wordsLabel' ).to( this, 'words', words => {\n\t\t\t\t\treturn t( 'Words: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_wordsLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__words'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( displayCharacters || displayCharacters === undefined ) {\n\t\t\t\tthis.bind( '_charactersLabel' ).to( this, 'characters', words => {\n\t\t\t\t\treturn t( 'Characters: %0', words );\n\t\t\t\t} );\n\n\t\t\t\tchildren.push( {\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: [ bind.to( '_charactersLabel' ) ]\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-word-count__characters'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis._outputView.setTemplate( {\n\t\t\t\ttag: 'div',\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'ck',\n\t\t\t\t\t\t'ck-word-count'\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t} );\n\n\t\t\tthis._outputView.render();\n\t\t}\n\n\t\treturn this._outputView.element!;\n\t}\n\n\tprivate _getText(): string {\n\t\tlet txt = '';\n\n\t\tfor ( const root of this.editor.model.document.getRoots() ) {\n\t\t\tif ( txt !== '' ) {\n\t\t\t\t// Add a delimiter, so words from each root are treated independently.\n\t\t\t\ttxt += '\\n';\n\t\t\t}\n\n\t\t\ttxt += modelElementToPlainText( root );\n\t\t}\n\n\t\treturn txt;\n\t}\n\n\t/**\n\t * Determines the number of characters in the current editor's model.\n\t */\n\tprivate _getCharacters( txt: string ): number {\n\t\treturn txt.replace( /\\n/g, '' ).length;\n\t}\n\n\t/**\n\t * Determines the number of words in the current editor's model.\n\t */\n\tprivate _getWords( txt: string ): number {\n\t\tconst detectedWords = txt.match( this._wordsMatchRegExp ) || [];\n\n\t\treturn detectedWords.length;\n\t}\n\n\t/**\n\t * Determines the number of words and characters in the current editor's model and assigns it to {@link #characters} and {@link #words}.\n\t * It also fires the {@link #event:update}.\n\t *\n\t * @fires update\n\t */\n\tprivate _refreshStats(): void {\n\t\tconst txt = this._getText();\n\t\tconst words = this.words = this._getWords( txt );\n\t\tconst characters = this.characters = this._getCharacters( txt );\n\n\t\tthis.fire<WordCountUpdateEvent>( 'update', {\n\t\t\twords,\n\t\t\tcharacters\n\t\t} );\n\t}\n}\n\n/**\n * An event fired after {@link ~WordCount#words} and {@link ~WordCount#characters} are updated.\n *\n * @eventName ~WordCount#update\n */\nexport type WordCountUpdateEvent = {\n\tname: 'update';\n\targs: [ { words: number; characters: number } ];\n};\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-word-count",
|
3
|
-
"version": "43.3.0-alpha.
|
3
|
+
"version": "43.3.0-alpha.7",
|
4
4
|
"description": "Word and character count feature for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -13,11 +13,11 @@
|
|
13
13
|
"type": "module",
|
14
14
|
"main": "src/index.js",
|
15
15
|
"dependencies": {
|
16
|
-
"@ckeditor/ckeditor5-core": "43.3.0-alpha.
|
17
|
-
"@ckeditor/ckeditor5-ui": "43.3.0-alpha.
|
18
|
-
"@ckeditor/ckeditor5-utils": "43.3.0-alpha.
|
16
|
+
"@ckeditor/ckeditor5-core": "43.3.0-alpha.7",
|
17
|
+
"@ckeditor/ckeditor5-ui": "43.3.0-alpha.7",
|
18
|
+
"@ckeditor/ckeditor5-utils": "43.3.0-alpha.7",
|
19
19
|
"lodash-es": "4.17.21",
|
20
|
-
"ckeditor5": "43.3.0-alpha.
|
20
|
+
"ckeditor5": "43.3.0-alpha.7"
|
21
21
|
},
|
22
22
|
"author": "CKSource (http://cksource.com/)",
|
23
23
|
"license": "GPL-2.0-or-later",
|