diff --git a/packages/ckeditor5-core/core.js b/packages/ckeditor5-core/core.js index 532d82d7923..62826b4c951 100644 --- a/packages/ckeditor5-core/core.js +++ b/packages/ckeditor5-core/core.js @@ -9,5 +9,11 @@ export { default as Plugin } from './src/plugin'; export { default as Command } from './src/command'; + export { default as Editor } from './src/editor/editor'; +export { default as EditorUI } from './src/editor/editorui'; +export { default as attachToForm } from './src/editor/utils/attachtoform'; +export { default as DataApiMixin } from './src/editor/utils/dataapimixin'; +export { default as ElementApiMixin } from './src/editor/utils/elementapimixin'; +export { default as secureSourceElement } from './src/editor/utils/securesourceelement'; diff --git a/packages/ckeditor5-dll-balloon/package.json b/packages/ckeditor5-dll-balloon/package.json index 07ab3ba9d2c..9dbc660fea3 100644 --- a/packages/ckeditor5-dll-balloon/package.json +++ b/packages/ckeditor5-dll-balloon/package.json @@ -21,7 +21,9 @@ "ckeditor5": "^23.1.0" }, "devDependencies": { + "@ckeditor/ckeditor5-theme-lark": "^23.1.0", "@ckeditor/ckeditor5-clipboard": "^23.1.0", + "@ckeditor/ckeditor5-dev-utils": "^23.6.1", "@ckeditor/ckeditor5-editor-balloon": "^23.1.0", "@ckeditor/ckeditor5-enter": "^23.1.0", "@ckeditor/ckeditor5-paragraph": "^23.1.0", diff --git a/packages/ckeditor5-dll-balloon/src/ckeditor.js b/packages/ckeditor5-dll-balloon/src/ckeditor.js index 650b931e80b..b86c0bb13f7 100644 --- a/packages/ckeditor5-dll-balloon/src/ckeditor.js +++ b/packages/ckeditor5-dll-balloon/src/ckeditor.js @@ -5,7 +5,7 @@ // The editor creator to use. -import { BalloonEditor as BalloonEditorBase } from 'ckeditor5/src/ballooneditor'; +import BalloonEditorBase from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor'; import { Paragraph } from 'ckeditor5/src/paragraph'; import { Clipboard } from 'ckeditor5/src/clipboard'; import { Enter, ShiftEnter } from 'ckeditor5/src/enter'; diff --git a/packages/ckeditor5-dll-balloon/webpack.config.js b/packages/ckeditor5-dll-balloon/webpack.config.js index 5b3f5ccc816..d1db5cb5faa 100644 --- a/packages/ckeditor5-dll-balloon/webpack.config.js +++ b/packages/ckeditor5-dll-balloon/webpack.config.js @@ -7,6 +7,7 @@ const path = require( 'path' ); const webpack = require( 'webpack' ); +const { styles } = require( '@ckeditor/ckeditor5-dev-utils' ); module.exports = { mode: 'development', @@ -22,6 +23,37 @@ module.exports = { libraryTarget: 'umd', libraryExport: 'default' }, + module: { + rules: [ + { + test: /\.svg$/, + use: [ 'raw-loader' ] + }, + { + test: /\.css$/, + use: [ + { + loader: 'style-loader', + options: { + injectType: 'singletonStyleTag', + attributes: { + 'data-cke': true + } + } + }, + { + loader: 'postcss-loader', + options: styles.getPostCssConfig( { + themeImporter: { + themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) + }, + minify: true + } ) + } + ] + } + ] + }, plugins: [ new webpack.DllReferencePlugin( { manifest: require( '../../build/ckeditor5-dll.manifest.json' ), diff --git a/packages/ckeditor5-dll-classic/package.json b/packages/ckeditor5-dll-classic/package.json index 018e6cec285..ef5426df57b 100644 --- a/packages/ckeditor5-dll-classic/package.json +++ b/packages/ckeditor5-dll-classic/package.json @@ -21,7 +21,9 @@ "ckeditor5": "^23.1.0" }, "devDependencies": { + "@ckeditor/ckeditor5-theme-lark": "^23.1.0", "@ckeditor/ckeditor5-clipboard": "^23.1.0", + "@ckeditor/ckeditor5-dev-utils": "^23.6.1", "@ckeditor/ckeditor5-editor-classic": "^23.1.0", "@ckeditor/ckeditor5-enter": "^23.1.0", "@ckeditor/ckeditor5-paragraph": "^23.1.0", diff --git a/packages/ckeditor5-dll-classic/src/ckeditor.js b/packages/ckeditor5-dll-classic/src/ckeditor.js index 41a6ba21c9c..3c89b7ead9c 100644 --- a/packages/ckeditor5-dll-classic/src/ckeditor.js +++ b/packages/ckeditor5-dll-classic/src/ckeditor.js @@ -4,7 +4,7 @@ */ // The editor creator to use. -import { ClassicEditor as ClassicEditorBase } from 'ckeditor5/src/classiceditor'; +import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; import { Paragraph } from 'ckeditor5/src/paragraph'; import { Clipboard } from 'ckeditor5/src/clipboard'; import { Enter, ShiftEnter } from 'ckeditor5/src/enter'; diff --git a/packages/ckeditor5-dll-classic/webpack.config.js b/packages/ckeditor5-dll-classic/webpack.config.js index d99dfeefb98..a4f0b1676f5 100644 --- a/packages/ckeditor5-dll-classic/webpack.config.js +++ b/packages/ckeditor5-dll-classic/webpack.config.js @@ -7,6 +7,7 @@ const path = require( 'path' ); const webpack = require( 'webpack' ); +const { styles } = require( '@ckeditor/ckeditor5-dev-utils' ); module.exports = { mode: 'development', @@ -22,6 +23,37 @@ module.exports = { libraryTarget: 'umd', libraryExport: 'default' }, + module: { + rules: [ + { + test: /\.svg$/, + use: [ 'raw-loader' ] + }, + { + test: /\.css$/, + use: [ + { + loader: 'style-loader', + options: { + injectType: 'singletonStyleTag', + attributes: { + 'data-cke': true + } + } + }, + { + loader: 'postcss-loader', + options: styles.getPostCssConfig( { + themeImporter: { + themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) + }, + minify: true + } ) + } + ] + } + ] + }, plugins: [ new webpack.DllReferencePlugin( { manifest: require( '../../build/ckeditor5-dll.manifest.json' ), diff --git a/packages/ckeditor5-dll-decoupled-document/package.json b/packages/ckeditor5-dll-decoupled-document/package.json index a43ab20d031..0cbca7987ca 100644 --- a/packages/ckeditor5-dll-decoupled-document/package.json +++ b/packages/ckeditor5-dll-decoupled-document/package.json @@ -21,7 +21,9 @@ "ckeditor5": "^23.1.0" }, "devDependencies": { + "@ckeditor/ckeditor5-theme-lark": "^23.1.0", "@ckeditor/ckeditor5-clipboard": "^23.1.0", + "@ckeditor/ckeditor5-dev-utils": "^23.6.1", "@ckeditor/ckeditor5-editor-decoupled": "^23.1.0", "@ckeditor/ckeditor5-enter": "^23.1.0", "@ckeditor/ckeditor5-paragraph": "^23.1.0", diff --git a/packages/ckeditor5-dll-decoupled-document/src/ckeditor.js b/packages/ckeditor5-dll-decoupled-document/src/ckeditor.js index 2f86cd62d74..7f4296c2c63 100644 --- a/packages/ckeditor5-dll-decoupled-document/src/ckeditor.js +++ b/packages/ckeditor5-dll-decoupled-document/src/ckeditor.js @@ -4,7 +4,7 @@ */ // The editor creator to use. -import { DecoupledEditor as DecoupledEditorBase } from 'ckeditor5/src/decouplededitor'; +import DecoupledEditorBase from '@ckeditor/ckeditor5-editor-decoupled/src/decouplededitor'; import { Paragraph } from 'ckeditor5/src/paragraph'; import { Clipboard } from 'ckeditor5/src/clipboard'; import { Enter, ShiftEnter } from 'ckeditor5/src/enter'; diff --git a/packages/ckeditor5-dll-decoupled-document/webpack.config.js b/packages/ckeditor5-dll-decoupled-document/webpack.config.js index d09e5a93a4f..1fa14518892 100644 --- a/packages/ckeditor5-dll-decoupled-document/webpack.config.js +++ b/packages/ckeditor5-dll-decoupled-document/webpack.config.js @@ -7,6 +7,7 @@ const path = require( 'path' ); const webpack = require( 'webpack' ); +const { styles } = require( '@ckeditor/ckeditor5-dev-utils' ); module.exports = { mode: 'development', @@ -22,6 +23,37 @@ module.exports = { libraryTarget: 'umd', libraryExport: 'default' }, + module: { + rules: [ + { + test: /\.svg$/, + use: [ 'raw-loader' ] + }, + { + test: /\.css$/, + use: [ + { + loader: 'style-loader', + options: { + injectType: 'singletonStyleTag', + attributes: { + 'data-cke': true + } + } + }, + { + loader: 'postcss-loader', + options: styles.getPostCssConfig( { + themeImporter: { + themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) + }, + minify: true + } ) + } + ] + } + ] + }, plugins: [ new webpack.DllReferencePlugin( { manifest: require( '../../build/ckeditor5-dll.manifest.json' ), diff --git a/packages/ckeditor5-dll-inline/package.json b/packages/ckeditor5-dll-inline/package.json index a30b5659a73..4e9524da338 100644 --- a/packages/ckeditor5-dll-inline/package.json +++ b/packages/ckeditor5-dll-inline/package.json @@ -21,7 +21,9 @@ "ckeditor5": "^23.1.0" }, "devDependencies": { + "@ckeditor/ckeditor5-theme-lark": "^23.1.0", "@ckeditor/ckeditor5-clipboard": "^23.1.0", + "@ckeditor/ckeditor5-dev-utils": "^23.6.1", "@ckeditor/ckeditor5-editor-inline": "^23.1.0", "@ckeditor/ckeditor5-enter": "^23.1.0", "@ckeditor/ckeditor5-paragraph": "^23.1.0", diff --git a/packages/ckeditor5-dll-inline/src/ckeditor.js b/packages/ckeditor5-dll-inline/src/ckeditor.js index 1f60bb85114..2140543df1e 100644 --- a/packages/ckeditor5-dll-inline/src/ckeditor.js +++ b/packages/ckeditor5-dll-inline/src/ckeditor.js @@ -4,7 +4,7 @@ */ // The editor creator to use. -import { InlineEditor as InlineEditorBase } from 'ckeditor5/src/inlineeditor'; +import InlineEditorBase from '@ckeditor/ckeditor5-editor-inline/src/inlineeditor'; import { Paragraph } from 'ckeditor5/src/paragraph'; import { Clipboard } from 'ckeditor5/src/clipboard'; import { Enter, ShiftEnter } from 'ckeditor5/src/enter'; diff --git a/packages/ckeditor5-dll-inline/webpack.config.js b/packages/ckeditor5-dll-inline/webpack.config.js index ba6974824fa..bfcbf638181 100644 --- a/packages/ckeditor5-dll-inline/webpack.config.js +++ b/packages/ckeditor5-dll-inline/webpack.config.js @@ -7,6 +7,7 @@ const path = require( 'path' ); const webpack = require( 'webpack' ); +const { styles } = require( '@ckeditor/ckeditor5-dev-utils' ); module.exports = { mode: 'development', @@ -22,6 +23,37 @@ module.exports = { libraryTarget: 'umd', libraryExport: 'default' }, + module: { + rules: [ + { + test: /\.svg$/, + use: [ 'raw-loader' ] + }, + { + test: /\.css$/, + use: [ + { + loader: 'style-loader', + options: { + injectType: 'singletonStyleTag', + attributes: { + 'data-cke': true + } + } + }, + { + loader: 'postcss-loader', + options: styles.getPostCssConfig( { + themeImporter: { + themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) + }, + minify: true + } ) + } + ] + } + ] + }, plugins: [ new webpack.DllReferencePlugin( { manifest: require( '../../build/ckeditor5-dll.manifest.json' ), diff --git a/packages/ckeditor5-editor-balloon/package.json b/packages/ckeditor5-editor-balloon/package.json index 4f2db06efad..d61698134e2 100644 --- a/packages/ckeditor5-editor-balloon/package.json +++ b/packages/ckeditor5-editor-balloon/package.json @@ -9,19 +9,22 @@ "ckeditor5-editor" ], "dependencies": { - "@ckeditor/ckeditor5-core": "^23.1.0", - "@ckeditor/ckeditor5-engine": "^23.1.0", - "@ckeditor/ckeditor5-ui": "^23.1.0", - "@ckeditor/ckeditor5-utils": "^23.1.0", + "ckeditor5": "^23.1.0", "lodash-es": "^4.17.15" }, "devDependencies": { "@ckeditor/ckeditor5-basic-styles": "^23.1.0", + "@ckeditor/ckeditor5-core": "^23.1.0", + "@ckeditor/ckeditor5-dev-utils": "^23.1.0", + "@ckeditor/ckeditor5-engine": "^23.1.0", "@ckeditor/ckeditor5-enter": "^23.1.0", "@ckeditor/ckeditor5-heading": "^23.1.0", "@ckeditor/ckeditor5-paragraph": "^23.1.0", + "@ckeditor/ckeditor5-theme-lark": "^23.1.0", "@ckeditor/ckeditor5-typing": "^23.1.0", - "@ckeditor/ckeditor5-undo": "^23.1.0" + "@ckeditor/ckeditor5-ui": "^23.1.0", + "@ckeditor/ckeditor5-undo": "^23.1.0", + "@ckeditor/ckeditor5-utils": "^23.1.0" }, "engines": { "node": ">=12.0.0", diff --git a/packages/ckeditor5-editor-balloon/src/ballooneditor.js b/packages/ckeditor5-editor-balloon/src/ballooneditor.js index cc30482c844..bb7a5dfd362 100644 --- a/packages/ckeditor5-editor-balloon/src/ballooneditor.js +++ b/packages/ckeditor5-editor-balloon/src/ballooneditor.js @@ -7,20 +7,15 @@ * @module editor-balloon/ballooneditor */ -import Editor from '@ckeditor/ckeditor5-core/src/editor/editor'; -import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor'; -import BalloonToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/balloon/balloontoolbar'; +import { Editor, DataApiMixin, ElementApiMixin, attachToForm, secureSourceElement } from 'ckeditor5/src/core'; +import { HtmlDataProcessor } from 'ckeditor5/src/engine'; +import { BalloonToolbar } from 'ckeditor5/src/ui'; +import { CKEditorError, setDataInElement, getDataFromElement, mix } from 'ckeditor5/src/utils'; + +import { isElement } from 'lodash-es'; + import BalloonEditorUI from './ballooneditorui'; import BalloonEditorUIView from './ballooneditoruiview'; -import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement'; -import getDataFromElement from '@ckeditor/ckeditor5-utils/src/dom/getdatafromelement'; -import DataApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/dataapimixin'; -import ElementApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/elementapimixin'; -import attachToForm from '@ckeditor/ckeditor5-core/src/editor/utils/attachtoform'; -import mix from '@ckeditor/ckeditor5-utils/src/mix'; -import { isElement } from 'lodash-es'; -import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror'; -import secureSourceElement from '@ckeditor/ckeditor5-core/src/editor/utils/securesourceelement'; /** * The {@glink builds/guides/overview#balloon-editor balloon editor} implementation (Medium-like editor). diff --git a/packages/ckeditor5-editor-balloon/src/ballooneditorui.js b/packages/ckeditor5-editor-balloon/src/ballooneditorui.js index 079f770f444..ae0b80c6869 100644 --- a/packages/ckeditor5-editor-balloon/src/ballooneditorui.js +++ b/packages/ckeditor5-editor-balloon/src/ballooneditorui.js @@ -7,9 +7,9 @@ * @module editor-balloon/ballooneditorui */ -import EditorUI from '@ckeditor/ckeditor5-core/src/editor/editorui'; -import enableToolbarKeyboardFocus from '@ckeditor/ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus'; -import { enablePlaceholder } from '@ckeditor/ckeditor5-engine/src/view/placeholder'; +import { EditorUI } from 'ckeditor5/src/core'; +import { enableToolbarKeyboardFocus } from 'ckeditor5/src/ui'; +import { enablePlaceholder } from 'ckeditor5/src/engine'; /** * The balloon editor UI class. diff --git a/packages/ckeditor5-editor-balloon/src/ballooneditoruiview.js b/packages/ckeditor5-editor-balloon/src/ballooneditoruiview.js index 631499e3f22..70785a215ad 100644 --- a/packages/ckeditor5-editor-balloon/src/ballooneditoruiview.js +++ b/packages/ckeditor5-editor-balloon/src/ballooneditoruiview.js @@ -7,8 +7,7 @@ * @module editor-balloon/ballooneditoruiview */ -import EditorUIView from '@ckeditor/ckeditor5-ui/src/editorui/editoruiview'; -import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview'; +import { EditorUIView, InlineEditableUIView } from 'ckeditor5/src/ui'; /** * Contextual editor UI view. Uses the {@link module:ui/editableui/inline/inlineeditableuiview~InlineEditableUIView}. diff --git a/src/ballooneditor.js b/packages/ckeditor5-editor-classic/editor-classic.js similarity index 63% rename from src/ballooneditor.js rename to packages/ckeditor5-editor-classic/editor-classic.js index 71fb42cdf5b..3e092cf707f 100644 --- a/src/ballooneditor.js +++ b/packages/ckeditor5-editor-classic/editor-classic.js @@ -4,7 +4,11 @@ */ /** - * @module dll/ballooneditor + * @module editor-classic */ -export * from '@ckeditor/ckeditor5-editor-balloon/ballooneditor'; +import ClassicEditor from './src/classiceditor'; + +export default { + ClassicEditor +}; diff --git a/packages/ckeditor5-editor-classic/package.json b/packages/ckeditor5-editor-classic/package.json index 0c98f69249e..5c2bea4f853 100644 --- a/packages/ckeditor5-editor-classic/package.json +++ b/packages/ckeditor5-editor-classic/package.json @@ -9,19 +9,24 @@ "ckeditor5-editor" ], "dependencies": { - "@ckeditor/ckeditor5-core": "^23.1.0", - "@ckeditor/ckeditor5-engine": "^23.1.0", - "@ckeditor/ckeditor5-ui": "^23.1.0", - "@ckeditor/ckeditor5-utils": "^23.1.0", + "ckeditor5": "^23.1.0", "lodash-es": "^4.17.15" }, "devDependencies": { "@ckeditor/ckeditor5-basic-styles": "^23.1.0", + "@ckeditor/ckeditor5-core": "^23.1.0", + "@ckeditor/ckeditor5-dev-utils": "^23.1.0", + "@ckeditor/ckeditor5-engine": "^23.1.0", "@ckeditor/ckeditor5-enter": "^23.1.0", "@ckeditor/ckeditor5-heading": "^23.1.0", "@ckeditor/ckeditor5-paragraph": "^23.1.0", + "@ckeditor/ckeditor5-theme-lark": "^23.1.0", "@ckeditor/ckeditor5-typing": "^23.1.0", - "@ckeditor/ckeditor5-undo": "^23.1.0" + "@ckeditor/ckeditor5-ui": "^23.1.0", + "@ckeditor/ckeditor5-undo": "^23.1.0", + "@ckeditor/ckeditor5-utils": "^23.1.0", + "webpack": "^4.43.0", + "webpack-cli": "^3.3.11" }, "engines": { "node": ">=12.0.0", @@ -40,5 +45,8 @@ "lang", "src", "theme" - ] + ], + "scripts": { + "build:dll": "webpack --config=webpack.config.js" + } } diff --git a/packages/ckeditor5-editor-classic/src/classiceditor.js b/packages/ckeditor5-editor-classic/src/classiceditor.js index 5c1c413b657..ad8bdbded67 100644 --- a/packages/ckeditor5-editor-classic/src/classiceditor.js +++ b/packages/ckeditor5-editor-classic/src/classiceditor.js @@ -7,17 +7,14 @@ * @module editor-classic/classiceditor */ -import Editor from '@ckeditor/ckeditor5-core/src/editor/editor'; -import DataApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/dataapimixin'; -import ElementApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/elementapimixin'; -import attachToForm from '@ckeditor/ckeditor5-core/src/editor/utils/attachtoform'; -import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor'; +import { Editor, DataApiMixin, ElementApiMixin, attachToForm } from 'ckeditor5/src/core'; +import { HtmlDataProcessor } from 'ckeditor5/src/engine'; +import { mix, getDataFromElement, CKEditorError } from 'ckeditor5/src/utils'; + +import { isElement } from 'lodash-es'; + import ClassicEditorUI from './classiceditorui'; import ClassicEditorUIView from './classiceditoruiview'; -import getDataFromElement from '@ckeditor/ckeditor5-utils/src/dom/getdatafromelement'; -import mix from '@ckeditor/ckeditor5-utils/src/mix'; -import { isElement } from 'lodash-es'; -import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror'; /** * The {@glink builds/guides/overview#classic-editor classic editor} implementation. diff --git a/packages/ckeditor5-editor-classic/src/classiceditorui.js b/packages/ckeditor5-editor-classic/src/classiceditorui.js index 6b389a245a8..7381ff55fcd 100644 --- a/packages/ckeditor5-editor-classic/src/classiceditorui.js +++ b/packages/ckeditor5-editor-classic/src/classiceditorui.js @@ -7,11 +7,10 @@ * @module editor-classic/classiceditorui */ -import EditorUI from '@ckeditor/ckeditor5-core/src/editor/editorui'; -import enableToolbarKeyboardFocus from '@ckeditor/ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus'; -import normalizeToolbarConfig from '@ckeditor/ckeditor5-ui/src/toolbar/normalizetoolbarconfig'; -import { enablePlaceholder } from '@ckeditor/ckeditor5-engine/src/view/placeholder'; -import ElementReplacer from '@ckeditor/ckeditor5-utils/src/elementreplacer'; +import { EditorUI } from 'ckeditor5/src/core'; +import { enableToolbarKeyboardFocus, normalizeToolbarConfig } from 'ckeditor5/src/ui'; +import { enablePlaceholder } from 'ckeditor5/src/engine'; +import { ElementReplacer } from 'ckeditor5/src/utils'; /** * The classic editor UI class. diff --git a/packages/ckeditor5-editor-classic/src/classiceditoruiview.js b/packages/ckeditor5-editor-classic/src/classiceditoruiview.js index 4e72885743a..4bcbc63f00a 100644 --- a/packages/ckeditor5-editor-classic/src/classiceditoruiview.js +++ b/packages/ckeditor5-editor-classic/src/classiceditoruiview.js @@ -7,10 +7,7 @@ * @module editor-classic/classiceditoruiview */ -import BoxedEditorUIView from '@ckeditor/ckeditor5-ui/src/editorui/boxed/boxededitoruiview'; -import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview'; -import StickyPanelView from '@ckeditor/ckeditor5-ui/src/panel/sticky/stickypanelview'; -import ToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/toolbarview'; +import { BoxedEditorUIView, InlineEditableUIView, StickyPanelView, ToolbarView } from 'ckeditor5/src/ui'; import '../theme/classiceditor.css'; diff --git a/packages/ckeditor5-editor-classic/webpack.config.js b/packages/ckeditor5-editor-classic/webpack.config.js new file mode 100644 index 00000000000..21f512aa995 --- /dev/null +++ b/packages/ckeditor5-editor-classic/webpack.config.js @@ -0,0 +1,65 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license + */ + +/* eslint-env node */ + +const path = require( 'path' ); +const webpack = require( 'webpack' ); +const { styles } = require( '@ckeditor/ckeditor5-dev-utils' ); + +module.exports = { + mode: 'development', + optimization: { + minimize: false, + moduleIds: 'named' + }, + entry: { + path: path.resolve( __dirname, 'editor-classic.js' ) + }, + output: { + path: path.resolve( __dirname, 'build' ), + filename: 'editor-classic.js', + library: [ 'CKEditor5', 'ClassicEditor' ], + libraryTarget: 'umd', + libraryExport: 'default' + }, + module: { + rules: [ + { + test: /\.svg$/, + use: [ 'raw-loader' ] + }, + { + test: /\.css$/, + use: [ + { + loader: 'style-loader', + options: { + injectType: 'singletonStyleTag', + attributes: { + 'data-cke': true + } + } + }, + { + loader: 'postcss-loader', + options: styles.getPostCssConfig( { + themeImporter: { + themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) + }, + minify: true + } ) + } + ] + } + ] + }, + plugins: [ + new webpack.DllReferencePlugin( { + manifest: require( '../../build/ckeditor5-dll.manifest.json' ), + scope: 'ckeditor5/src' + } ) + ] +}; diff --git a/packages/ckeditor5-editor-decoupled/package.json b/packages/ckeditor5-editor-decoupled/package.json index 1151715fdeb..689bb7a34c7 100644 --- a/packages/ckeditor5-editor-decoupled/package.json +++ b/packages/ckeditor5-editor-decoupled/package.json @@ -9,19 +9,24 @@ "ckeditor5-editor" ], "dependencies": { - "@ckeditor/ckeditor5-core": "^23.1.0", - "@ckeditor/ckeditor5-engine": "^23.1.0", - "@ckeditor/ckeditor5-ui": "^23.1.0", - "@ckeditor/ckeditor5-utils": "^23.1.0", + "ckeditor5": "^23.1.0", "lodash-es": "^4.17.15" }, "devDependencies": { "@ckeditor/ckeditor5-basic-styles": "^23.1.0", + "@ckeditor/ckeditor5-core": "^23.1.0", + "@ckeditor/ckeditor5-dev-utils": "^23.1.0", + "@ckeditor/ckeditor5-engine": "^23.1.0", "@ckeditor/ckeditor5-enter": "^23.1.0", "@ckeditor/ckeditor5-heading": "^23.1.0", "@ckeditor/ckeditor5-paragraph": "^23.1.0", + "@ckeditor/ckeditor5-theme-lark": "^23.1.0", "@ckeditor/ckeditor5-typing": "^23.1.0", - "@ckeditor/ckeditor5-undo": "^23.1.0" + "@ckeditor/ckeditor5-ui": "^23.1.0", + "@ckeditor/ckeditor5-undo": "^23.1.0", + "@ckeditor/ckeditor5-utils": "^23.1.0", + "webpack": "^4.43.0", + "webpack-cli": "^3.3.11" }, "engines": { "node": ">=12.0.0", diff --git a/packages/ckeditor5-editor-decoupled/src/decouplededitor.js b/packages/ckeditor5-editor-decoupled/src/decouplededitor.js index b79c07677cc..3d14ac78d24 100644 --- a/packages/ckeditor5-editor-decoupled/src/decouplededitor.js +++ b/packages/ckeditor5-editor-decoupled/src/decouplededitor.js @@ -7,17 +7,14 @@ * @module editor-decoupled/decouplededitor */ -import Editor from '@ckeditor/ckeditor5-core/src/editor/editor'; -import DataApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/dataapimixin'; -import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor'; +import { Editor, DataApiMixin, secureSourceElement } from 'ckeditor5/src/core'; +import { HtmlDataProcessor } from 'ckeditor5/src/engine'; +import { CKEditorError, getDataFromElement, setDataInElement, mix } from 'ckeditor5/src/utils'; + +import { isElement } from 'lodash-es'; + import DecoupledEditorUI from './decouplededitorui'; import DecoupledEditorUIView from './decouplededitoruiview'; -import getDataFromElement from '@ckeditor/ckeditor5-utils/src/dom/getdatafromelement'; -import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement'; -import mix from '@ckeditor/ckeditor5-utils/src/mix'; -import { isElement } from 'lodash-es'; -import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror'; -import secureSourceElement from '@ckeditor/ckeditor5-core/src/editor/utils/securesourceelement'; /** * The {@glink builds/guides/overview#document-editor decoupled editor} implementation. diff --git a/packages/ckeditor5-editor-decoupled/src/decouplededitorui.js b/packages/ckeditor5-editor-decoupled/src/decouplededitorui.js index a0cdd9f971c..f4b748f374f 100644 --- a/packages/ckeditor5-editor-decoupled/src/decouplededitorui.js +++ b/packages/ckeditor5-editor-decoupled/src/decouplededitorui.js @@ -7,10 +7,9 @@ * @module editor-decoupled/decouplededitorui */ -import EditorUI from '@ckeditor/ckeditor5-core/src/editor/editorui'; -import enableToolbarKeyboardFocus from '@ckeditor/ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus'; -import normalizeToolbarConfig from '@ckeditor/ckeditor5-ui/src/toolbar/normalizetoolbarconfig'; -import { enablePlaceholder } from '@ckeditor/ckeditor5-engine/src/view/placeholder'; +import { EditorUI } from 'ckeditor5/src/core'; +import { enablePlaceholder } from 'ckeditor5/src/engine'; +import { enableToolbarKeyboardFocus, normalizeToolbarConfig } from 'ckeditor5/src/ui'; /** * The decoupled editor UI class. diff --git a/packages/ckeditor5-editor-decoupled/src/decouplededitoruiview.js b/packages/ckeditor5-editor-decoupled/src/decouplededitoruiview.js index bde8847ae78..53ce6c36229 100644 --- a/packages/ckeditor5-editor-decoupled/src/decouplededitoruiview.js +++ b/packages/ckeditor5-editor-decoupled/src/decouplededitoruiview.js @@ -7,9 +7,7 @@ * @module editor-decoupled/decouplededitoruiview */ -import EditorUIView from '@ckeditor/ckeditor5-ui/src/editorui/editoruiview'; -import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview'; -import ToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/toolbarview'; +import { EditorUIView, InlineEditableUIView, ToolbarView } from 'ckeditor5/src/ui'; /** * The decoupled editor UI view. It is a virtual view providing an inline diff --git a/packages/ckeditor5-editor-inline/package.json b/packages/ckeditor5-editor-inline/package.json index f403998fa16..ced69596bea 100644 --- a/packages/ckeditor5-editor-inline/package.json +++ b/packages/ckeditor5-editor-inline/package.json @@ -9,19 +9,22 @@ "ckeditor5-editor" ], "dependencies": { - "@ckeditor/ckeditor5-core": "^23.1.0", - "@ckeditor/ckeditor5-engine": "^23.1.0", - "@ckeditor/ckeditor5-ui": "^23.1.0", - "@ckeditor/ckeditor5-utils": "^23.1.0", + "ckeditor5": "^23.1.0", "lodash-es": "^4.17.15" }, "devDependencies": { "@ckeditor/ckeditor5-basic-styles": "^23.1.0", + "@ckeditor/ckeditor5-core": "^23.1.0", + "@ckeditor/ckeditor5-dev-utils": "^23.1.0", + "@ckeditor/ckeditor5-engine": "^23.1.0", "@ckeditor/ckeditor5-enter": "^23.1.0", "@ckeditor/ckeditor5-heading": "^23.1.0", "@ckeditor/ckeditor5-paragraph": "^23.1.0", + "@ckeditor/ckeditor5-theme-lark": "^23.1.0", "@ckeditor/ckeditor5-typing": "^23.1.0", - "@ckeditor/ckeditor5-undo": "^23.1.0" + "@ckeditor/ckeditor5-ui": "^23.1.0", + "@ckeditor/ckeditor5-undo": "^23.1.0", + "@ckeditor/ckeditor5-utils": "^23.1.0" }, "engines": { "node": ">=12.0.0", diff --git a/packages/ckeditor5-editor-inline/src/inlineeditor.js b/packages/ckeditor5-editor-inline/src/inlineeditor.js index 81e7287ffe7..14d566c6f07 100644 --- a/packages/ckeditor5-editor-inline/src/inlineeditor.js +++ b/packages/ckeditor5-editor-inline/src/inlineeditor.js @@ -7,19 +7,14 @@ * @module editor-inline/inlineeditor */ -import Editor from '@ckeditor/ckeditor5-core/src/editor/editor'; -import DataApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/dataapimixin'; -import ElementApiMixin from '@ckeditor/ckeditor5-core/src/editor/utils/elementapimixin'; -import attachToForm from '@ckeditor/ckeditor5-core/src/editor/utils/attachtoform'; -import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor'; +import { Editor, DataApiMixin, ElementApiMixin, attachToForm, secureSourceElement } from 'ckeditor5/src/core'; +import { HtmlDataProcessor } from 'ckeditor5/src/engine'; +import { mix, getDataFromElement, setDataInElement, CKEditorError } from 'ckeditor5/src/utils'; + +import { isElement } from 'lodash-es'; + import InlineEditorUI from './inlineeditorui'; import InlineEditorUIView from './inlineeditoruiview'; -import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement'; -import getDataFromElement from '@ckeditor/ckeditor5-utils/src/dom/getdatafromelement'; -import mix from '@ckeditor/ckeditor5-utils/src/mix'; -import { isElement } from 'lodash-es'; -import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror'; -import secureSourceElement from '@ckeditor/ckeditor5-core/src/editor/utils/securesourceelement'; /** * The {@glink builds/guides/overview#inline-editor inline editor} implementation. diff --git a/packages/ckeditor5-editor-inline/src/inlineeditorui.js b/packages/ckeditor5-editor-inline/src/inlineeditorui.js index cac847a9eae..1d6124ef755 100644 --- a/packages/ckeditor5-editor-inline/src/inlineeditorui.js +++ b/packages/ckeditor5-editor-inline/src/inlineeditorui.js @@ -7,10 +7,9 @@ * @module editor-inline/inlineeditorui */ -import EditorUI from '@ckeditor/ckeditor5-core/src/editor/editorui'; -import enableToolbarKeyboardFocus from '@ckeditor/ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus'; -import normalizeToolbarConfig from '@ckeditor/ckeditor5-ui/src/toolbar/normalizetoolbarconfig'; -import { enablePlaceholder } from '@ckeditor/ckeditor5-engine/src/view/placeholder'; +import { EditorUI } from 'ckeditor5/src/core'; +import { enableToolbarKeyboardFocus, normalizeToolbarConfig } from 'ckeditor5/src/ui'; +import { enablePlaceholder } from 'ckeditor5/src/engine'; /** * The inline editor UI class. diff --git a/packages/ckeditor5-editor-inline/src/inlineeditoruiview.js b/packages/ckeditor5-editor-inline/src/inlineeditoruiview.js index 47d5a31d97f..eb1fd685a4e 100644 --- a/packages/ckeditor5-editor-inline/src/inlineeditoruiview.js +++ b/packages/ckeditor5-editor-inline/src/inlineeditoruiview.js @@ -6,14 +6,8 @@ /** * @module editor-inline/inlineeditoruiview */ - -import EditorUIView from '@ckeditor/ckeditor5-ui/src/editorui/editoruiview'; -import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview'; -import BalloonPanelView from '@ckeditor/ckeditor5-ui/src/panel/balloon/balloonpanelview'; -import ToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/toolbarview'; -import Rect from '@ckeditor/ckeditor5-utils/src/dom/rect'; -import ResizeObserver from '@ckeditor/ckeditor5-utils/src/dom/resizeobserver'; -import toUnit from '@ckeditor/ckeditor5-utils/src/dom/tounit'; +import { BalloonPanelView, EditorUIView, InlineEditableUIView, ToolbarView } from 'ckeditor5/src/ui'; +import { Rect, ResizeObserver, toUnit } from 'ckeditor5/src/utils'; const toPx = toUnit( 'px' ); diff --git a/packages/ckeditor5-engine/engine.js b/packages/ckeditor5-engine/engine.js index 22190df775a..6423e5fe22f 100644 --- a/packages/ckeditor5-engine/engine.js +++ b/packages/ckeditor5-engine/engine.js @@ -3,6 +3,10 @@ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ +/** + * @module engine + */ + export * from './src/view/placeholder'; export { default as EditingController } from './src/controller/editingcontroller'; @@ -10,10 +14,17 @@ export { default as DataController } from './src/controller/datacontroller'; export { default as Conversion } from './src/conversion/conversion'; +export { default as HtmlDataProcessor } from './src/dataprocessor/htmldataprocessor'; + export { default as LiveRange } from './src/model/liverange'; export { default as LivePosition } from './src/model/liveposition'; export { default as Model } from './src/model/model'; export { default as Observer } from './src/view/observer/observer'; +export { default as DomEventObserver } from './src/view/observer/domeventobserver'; export { default as UpcastWriter } from './src/view/upcastwriter'; export { StylesProcessor } from './src/view/stylesmap'; +export * from './src/view/styles/border'; +export * from './src/view/styles/padding'; +export * from './src/view/styles/background'; +export * from './src/view/styles/utils'; diff --git a/packages/ckeditor5-table/package.json b/packages/ckeditor5-table/package.json index 5712eda2fdd..563ce3f9b94 100644 --- a/packages/ckeditor5-table/package.json +++ b/packages/ckeditor5-table/package.json @@ -12,6 +12,7 @@ "dependencies": { "@ckeditor/ckeditor5-core": "^23.1.0", "@ckeditor/ckeditor5-ui": "^23.1.0", + "ckeditor5": "^23.1.0", "@ckeditor/ckeditor5-utils": "^23.1.0", "@ckeditor/ckeditor5-widget": "^23.1.0", "lodash-es": "^4.17.15" @@ -49,5 +50,8 @@ "lang", "src", "theme" - ] + ], + "scripts": { + "build:dll": "webpack --config=webpack.config.js" + } } diff --git a/packages/ckeditor5-table/src/commands/insertcolumncommand.js b/packages/ckeditor5-table/src/commands/insertcolumncommand.js index 7e3160e1bee..83cfe22af58 100644 --- a/packages/ckeditor5-table/src/commands/insertcolumncommand.js +++ b/packages/ckeditor5-table/src/commands/insertcolumncommand.js @@ -7,7 +7,7 @@ * @module table/commands/insertcolumncommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import { getColumnIndexes, getSelectionAffectedTableCells } from '../utils/selection'; /** diff --git a/packages/ckeditor5-table/src/commands/insertrowcommand.js b/packages/ckeditor5-table/src/commands/insertrowcommand.js index 0c9b5286b84..f03d45ee722 100644 --- a/packages/ckeditor5-table/src/commands/insertrowcommand.js +++ b/packages/ckeditor5-table/src/commands/insertrowcommand.js @@ -7,7 +7,7 @@ * @module table/commands/insertrowcommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import { getRowIndexes, getSelectionAffectedTableCells } from '../utils/selection'; /** diff --git a/packages/ckeditor5-table/src/commands/inserttablecommand.js b/packages/ckeditor5-table/src/commands/inserttablecommand.js index 97bc50b9b7f..0b97689dc93 100644 --- a/packages/ckeditor5-table/src/commands/inserttablecommand.js +++ b/packages/ckeditor5-table/src/commands/inserttablecommand.js @@ -7,8 +7,8 @@ * @module table/commands/inserttablecommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; -import { findOptimalInsertionPosition } from '@ckeditor/ckeditor5-widget/src/utils'; +import { Command } from 'ckeditor5/src/core'; +import { findOptimalInsertionPosition } from 'ckeditor5/src/widget'; /** * The insert table command. diff --git a/packages/ckeditor5-table/src/commands/mergecellcommand.js b/packages/ckeditor5-table/src/commands/mergecellcommand.js index e487d9fd811..fe42e4dcb14 100644 --- a/packages/ckeditor5-table/src/commands/mergecellcommand.js +++ b/packages/ckeditor5-table/src/commands/mergecellcommand.js @@ -7,7 +7,7 @@ * @module table/commands/mergecellcommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import TableWalker from '../tablewalker'; import { getTableCellsContainingSelection } from '../utils/selection'; import { isHeadingColumnCell } from '../utils/common'; diff --git a/packages/ckeditor5-table/src/commands/mergecellscommand.js b/packages/ckeditor5-table/src/commands/mergecellscommand.js index 7addb1af8bd..0d2a7c9f105 100644 --- a/packages/ckeditor5-table/src/commands/mergecellscommand.js +++ b/packages/ckeditor5-table/src/commands/mergecellscommand.js @@ -7,7 +7,7 @@ * @module table/commands/mergecellscommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import TableUtils from '../tableutils'; import { getSelectedTableCells, isSelectionRectangular } from '../utils/selection'; import { updateNumericAttribute } from '../utils/common'; diff --git a/packages/ckeditor5-table/src/commands/removecolumncommand.js b/packages/ckeditor5-table/src/commands/removecolumncommand.js index ef7d0247b6b..3fdd9dc8b55 100644 --- a/packages/ckeditor5-table/src/commands/removecolumncommand.js +++ b/packages/ckeditor5-table/src/commands/removecolumncommand.js @@ -7,7 +7,7 @@ * @module table/commands/removecolumncommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import TableWalker from '../tablewalker'; import { getColumnIndexes, getSelectionAffectedTableCells } from '../utils/selection'; diff --git a/packages/ckeditor5-table/src/commands/removerowcommand.js b/packages/ckeditor5-table/src/commands/removerowcommand.js index 725e374f3b2..bef116ee9f0 100644 --- a/packages/ckeditor5-table/src/commands/removerowcommand.js +++ b/packages/ckeditor5-table/src/commands/removerowcommand.js @@ -7,7 +7,7 @@ * @module table/commands/removerowcommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import { getRowIndexes, getSelectionAffectedTableCells } from '../utils/selection'; diff --git a/packages/ckeditor5-table/src/commands/selectcolumncommand.js b/packages/ckeditor5-table/src/commands/selectcolumncommand.js index 23519ce0224..61cb1f2c9a0 100644 --- a/packages/ckeditor5-table/src/commands/selectcolumncommand.js +++ b/packages/ckeditor5-table/src/commands/selectcolumncommand.js @@ -7,7 +7,7 @@ * @module table/commands/selectcolumncommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import TableWalker from '../tablewalker'; import { getSelectionAffectedTableCells } from '../utils/selection'; diff --git a/packages/ckeditor5-table/src/commands/selectrowcommand.js b/packages/ckeditor5-table/src/commands/selectrowcommand.js index 20ca7c3753d..53886b3a44b 100644 --- a/packages/ckeditor5-table/src/commands/selectrowcommand.js +++ b/packages/ckeditor5-table/src/commands/selectrowcommand.js @@ -7,7 +7,7 @@ * @module table/commands/selectrowcommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import { getRowIndexes, getSelectionAffectedTableCells } from '../utils/selection'; diff --git a/packages/ckeditor5-table/src/commands/setheadercolumncommand.js b/packages/ckeditor5-table/src/commands/setheadercolumncommand.js index 86ffcd673f7..a390b33c0bb 100644 --- a/packages/ckeditor5-table/src/commands/setheadercolumncommand.js +++ b/packages/ckeditor5-table/src/commands/setheadercolumncommand.js @@ -7,7 +7,7 @@ * @module table/commands/setheadercolumncommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import { isHeadingColumnCell, diff --git a/packages/ckeditor5-table/src/commands/setheaderrowcommand.js b/packages/ckeditor5-table/src/commands/setheaderrowcommand.js index be0dc2bfff3..df3052aa651 100644 --- a/packages/ckeditor5-table/src/commands/setheaderrowcommand.js +++ b/packages/ckeditor5-table/src/commands/setheaderrowcommand.js @@ -7,7 +7,7 @@ * @module table/commands/setheaderrowcommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import { updateNumericAttribute } from '../utils/common'; import { getRowIndexes, getSelectionAffectedTableCells } from '../utils/selection'; diff --git a/packages/ckeditor5-table/src/commands/splitcellcommand.js b/packages/ckeditor5-table/src/commands/splitcellcommand.js index 0d3e56ef5d1..a10ce170414 100644 --- a/packages/ckeditor5-table/src/commands/splitcellcommand.js +++ b/packages/ckeditor5-table/src/commands/splitcellcommand.js @@ -7,7 +7,7 @@ * @module table/commands/splitcellcommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import { getSelectionAffectedTableCells } from '../utils/selection'; /** diff --git a/packages/ckeditor5-table/src/converters/downcast.js b/packages/ckeditor5-table/src/converters/downcast.js index 3f938248bb1..ac83ad9720e 100644 --- a/packages/ckeditor5-table/src/converters/downcast.js +++ b/packages/ckeditor5-table/src/converters/downcast.js @@ -8,8 +8,8 @@ */ import TableWalker from './../tablewalker'; -import { setHighlightHandling, toWidget, toWidgetEditable } from '@ckeditor/ckeditor5-widget/src/utils'; -import toArray from '@ckeditor/ckeditor5-utils/src/toarray'; +import { setHighlightHandling, toWidget, toWidgetEditable } from 'ckeditor5/src/widget'; +import { toArray } from 'ckeditor5/src/utils'; /** * Model table element to view table element conversion helper. diff --git a/packages/ckeditor5-table/src/table.js b/packages/ckeditor5-table/src/table.js index 13fcbdf2b7a..b8072fea532 100644 --- a/packages/ckeditor5-table/src/table.js +++ b/packages/ckeditor5-table/src/table.js @@ -7,7 +7,8 @@ * @module table/table */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import { Plugin } from 'ckeditor5/src/core'; +import { Widget } from 'ckeditor5/src/widget'; import TableEditing from './tableediting'; import TableUI from './tableui'; @@ -15,7 +16,6 @@ import TableSelection from './tableselection'; import TableClipboard from './tableclipboard'; import TableKeyboard from './tablekeyboard'; import TableMouse from './tablemouse'; -import Widget from '@ckeditor/ckeditor5-widget/src/widget'; import '../theme/table.css'; diff --git a/packages/ckeditor5-table/src/tablecellproperties.js b/packages/ckeditor5-table/src/tablecellproperties.js index 45d24b6efd8..66c7fbf0b19 100644 --- a/packages/ckeditor5-table/src/tablecellproperties.js +++ b/packages/ckeditor5-table/src/tablecellproperties.js @@ -7,7 +7,7 @@ * @module table/tablecellproperties */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import { Plugin } from 'ckeditor5/src/core'; import TableCellPropertiesUI from './tablecellproperties/tablecellpropertiesui'; import TableCellPropertiesEditing from './tablecellproperties/tablecellpropertiesediting'; diff --git a/packages/ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.js b/packages/ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.js index dd638e994ce..62641fec230 100644 --- a/packages/ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.js +++ b/packages/ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.js @@ -7,7 +7,7 @@ * @module table/tablecellproperties/commands/tablecellpropertycommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; import { getSelectionAffectedTableCells } from '../../utils/selection'; /** diff --git a/packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesediting.js b/packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesediting.js index 3e1d6ac9d12..06b18569a48 100644 --- a/packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesediting.js +++ b/packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesediting.js @@ -7,10 +7,8 @@ * @module table/tablecellproperties/tablecellpropertiesediting */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; -import { addBorderRules } from '@ckeditor/ckeditor5-engine/src/view/styles/border'; -import { addPaddingRules } from '@ckeditor/ckeditor5-engine/src/view/styles/padding'; -import { addBackgroundRules } from '@ckeditor/ckeditor5-engine/src/view/styles/background'; +import { Plugin } from 'ckeditor5/src/core'; +import { addBorderRules, addPaddingRules, addBackgroundRules } from 'ckeditor5/src/engine'; import { downcastAttributeToStyle, upcastStyleToAttribute, upcastBorderStyles } from './../converters/tableproperties'; import TableEditing from './../tableediting'; diff --git a/packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.js b/packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.js index b04bd6dd4d9..16b25198a45 100644 --- a/packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.js +++ b/packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.js @@ -7,12 +7,10 @@ * @module table/tablecellproperties/tablecellpropertiesui */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; -import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; -import clickOutsideHandler from '@ckeditor/ckeditor5-ui/src/bindings/clickoutsidehandler'; -import ContextualBalloon from '@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon'; +import { Plugin } from 'ckeditor5/src/core'; +import { ButtonView, clickOutsideHandler, ContextualBalloon, getLocalizedColorOptions, normalizeColorOptions } from 'ckeditor5/src/ui'; + import TableCellPropertiesView from './ui/tablecellpropertiesview'; -import tableCellProperties from './../../theme/icons/table-cell-properties.svg'; import { colorFieldValidator, getLocalizedColorErrorText, @@ -21,14 +19,12 @@ import { lengthFieldValidator, lineWidthFieldValidator } from '../utils/ui/table-properties'; -import { - getLocalizedColorOptions, - normalizeColorOptions -} from '@ckeditor/ckeditor5-ui/src/colorgrid/utils'; import { debounce } from 'lodash-es'; import { getTableWidgetAncestor } from '../utils/ui/widget'; import { getBalloonCellPositionData, repositionContextualBalloon } from '../utils/ui/contextualballoon'; +import tableCellProperties from './../../theme/icons/table-cell-properties.svg'; + const ERROR_TEXT_TIMEOUT = 500; // Map of view properties and related commands. diff --git a/packages/ckeditor5-table/src/tablecellproperties/ui/tablecellpropertiesview.js b/packages/ckeditor5-table/src/tablecellproperties/ui/tablecellpropertiesview.js index e11b9b3730a..7087b27990a 100644 --- a/packages/ckeditor5-table/src/tablecellproperties/ui/tablecellpropertiesview.js +++ b/packages/ckeditor5-table/src/tablecellproperties/ui/tablecellpropertiesview.js @@ -7,20 +7,22 @@ * @module table/tablecellproperties/ui/tablecellpropertiesview */ -import View from '@ckeditor/ckeditor5-ui/src/view'; -import ViewCollection from '@ckeditor/ckeditor5-ui/src/viewcollection'; -import submitHandler from '@ckeditor/ckeditor5-ui/src/bindings/submithandler'; - -import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler'; -import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker'; -import FocusCycler from '@ckeditor/ckeditor5-ui/src/focuscycler'; - -import LabeledFieldView from '@ckeditor/ckeditor5-ui/src/labeledfield/labeledfieldview'; -import { createLabeledDropdown, createLabeledInputText } from '@ckeditor/ckeditor5-ui/src/labeledfield/utils'; -import LabelView from '@ckeditor/ckeditor5-ui/src/label/labelview'; -import { addListToDropdown } from '@ckeditor/ckeditor5-ui/src/dropdown/utils'; -import ToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/toolbarview'; -import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; +import { + LabeledFieldView, + createLabeledDropdown, + createLabeledInputText, + LabelView, + addListToDropdown, + ToolbarView, + ButtonView, + FocusCycler, + View, + ViewCollection, + FormHeaderView, + submitHandler +} from 'ckeditor5/src/ui'; +import { KeystrokeHandler, FocusTracker } from 'ckeditor5/src/utils'; + import { fillToolbar, getBorderStyleDefinitions, @@ -29,8 +31,6 @@ import { } from '../../utils/ui/table-properties'; import FormRowView from '../../ui/formrowview'; -import FormHeaderView from '@ckeditor/ckeditor5-ui/src/formheader/formheaderview'; - import checkIcon from '@ckeditor/ckeditor5-core/theme/icons/check.svg'; import cancelIcon from '@ckeditor/ckeditor5-core/theme/icons/cancel.svg'; import alignLeftIcon from '@ckeditor/ckeditor5-core/theme/icons/align-left.svg'; diff --git a/packages/ckeditor5-table/src/tableclipboard.js b/packages/ckeditor5-table/src/tableclipboard.js index 494b70ebbaf..48bc459df91 100644 --- a/packages/ckeditor5-table/src/tableclipboard.js +++ b/packages/ckeditor5-table/src/tableclipboard.js @@ -7,7 +7,7 @@ * @module table/tableclipboard */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import { Plugin } from 'ckeditor5/src/core'; import TableSelection from './tableselection'; import TableWalker from './tablewalker'; diff --git a/packages/ckeditor5-table/src/tableediting.js b/packages/ckeditor5-table/src/tableediting.js index ab2772b7585..f8e47264e0b 100644 --- a/packages/ckeditor5-table/src/tableediting.js +++ b/packages/ckeditor5-table/src/tableediting.js @@ -7,7 +7,7 @@ * @module table/tableediting */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import { Plugin } from 'ckeditor5/src/core'; import upcastTable, { skipEmptyTableRow } from './converters/upcasttable'; import { diff --git a/packages/ckeditor5-table/src/tablekeyboard.js b/packages/ckeditor5-table/src/tablekeyboard.js index e97bb2854c1..4278ebce489 100644 --- a/packages/ckeditor5-table/src/tablekeyboard.js +++ b/packages/ckeditor5-table/src/tablekeyboard.js @@ -10,12 +10,8 @@ import TableSelection from './tableselection'; import TableWalker from './tablewalker'; -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; -import priorities from '@ckeditor/ckeditor5-utils/src/priorities'; -import { - isArrowKeyCode, - getLocalizedArrowKeyCodeDirection -} from '@ckeditor/ckeditor5-utils/src/keyboard'; +import { Plugin } from 'ckeditor5/src/core'; +import { priorities, isArrowKeyCode, getLocalizedArrowKeyCodeDirection } from 'ckeditor5/src/utils'; import { getSelectedTableCells, getTableCellsContainingSelection } from './utils/selection'; /** diff --git a/packages/ckeditor5-table/src/tablemouse.js b/packages/ckeditor5-table/src/tablemouse.js index 5456b455c77..f39b15bbf1a 100644 --- a/packages/ckeditor5-table/src/tablemouse.js +++ b/packages/ckeditor5-table/src/tablemouse.js @@ -7,7 +7,7 @@ * @module table/tablemouse */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import { Plugin } from 'ckeditor5/src/core'; import TableSelection from './tableselection'; import MouseEventsObserver from './tablemouse/mouseeventsobserver'; diff --git a/packages/ckeditor5-table/src/tablemouse/mouseeventsobserver.js b/packages/ckeditor5-table/src/tablemouse/mouseeventsobserver.js index e8c3b713c57..45f48437c75 100644 --- a/packages/ckeditor5-table/src/tablemouse/mouseeventsobserver.js +++ b/packages/ckeditor5-table/src/tablemouse/mouseeventsobserver.js @@ -7,7 +7,7 @@ * @module table/tableselection/mouseeventsobserver */ -import DomEventObserver from '@ckeditor/ckeditor5-engine/src/view/observer/domeventobserver'; +import { DomEventObserver } from 'ckeditor5/src/engine'; /** * The mouse selection event observer. diff --git a/packages/ckeditor5-table/src/tableproperties.js b/packages/ckeditor5-table/src/tableproperties.js index eb2642f4511..2ffab498311 100644 --- a/packages/ckeditor5-table/src/tableproperties.js +++ b/packages/ckeditor5-table/src/tableproperties.js @@ -7,7 +7,7 @@ * @module table/tableproperties */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import { Plugin } from 'ckeditor5/src/core'; import TablePropertiesEditing from './tableproperties/tablepropertiesediting'; import TablePropertiesUI from './tableproperties/tablepropertiesui'; diff --git a/packages/ckeditor5-table/src/tableproperties/commands/tablepropertycommand.js b/packages/ckeditor5-table/src/tableproperties/commands/tablepropertycommand.js index f0784cc295b..71937fedbfc 100644 --- a/packages/ckeditor5-table/src/tableproperties/commands/tablepropertycommand.js +++ b/packages/ckeditor5-table/src/tableproperties/commands/tablepropertycommand.js @@ -7,7 +7,7 @@ * @module table/tableproperties/commands/tablepropertycommand */ -import Command from '@ckeditor/ckeditor5-core/src/command'; +import { Command } from 'ckeditor5/src/core'; /** * The table cell attribute command. diff --git a/packages/ckeditor5-table/src/tableproperties/tablepropertiesediting.js b/packages/ckeditor5-table/src/tableproperties/tablepropertiesediting.js index ac1782b7c8e..f5818a8d948 100644 --- a/packages/ckeditor5-table/src/tableproperties/tablepropertiesediting.js +++ b/packages/ckeditor5-table/src/tableproperties/tablepropertiesediting.js @@ -7,9 +7,8 @@ * @module table/tableproperties/tablepropertiesediting */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; -import { addBorderRules } from '@ckeditor/ckeditor5-engine/src/view/styles/border'; -import { addBackgroundRules } from '@ckeditor/ckeditor5-engine/src/view/styles/background'; +import { Plugin } from 'ckeditor5/src/core'; +import { addBackgroundRules, addBorderRules } from 'ckeditor5/src/engine'; import TableEditing from '../tableediting'; import { diff --git a/packages/ckeditor5-table/src/tableproperties/tablepropertiesui.js b/packages/ckeditor5-table/src/tableproperties/tablepropertiesui.js index f0ed5707537..e6cf9e09719 100644 --- a/packages/ckeditor5-table/src/tableproperties/tablepropertiesui.js +++ b/packages/ckeditor5-table/src/tableproperties/tablepropertiesui.js @@ -7,10 +7,11 @@ * @module table/tableproperties/tablepropertiesui */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; -import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; -import clickOutsideHandler from '@ckeditor/ckeditor5-ui/src/bindings/clickoutsidehandler'; -import ContextualBalloon from '@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon'; +import { Plugin } from 'ckeditor5/src/core'; +import { ButtonView, ContextualBalloon, clickOutsideHandler, getLocalizedColorOptions, normalizeColorOptions } from 'ckeditor5/src/ui'; + +import { debounce } from 'lodash-es'; + import TablePropertiesView from './ui/tablepropertiesview'; import tableProperties from './../../theme/icons/table-properties.svg'; import { @@ -21,11 +22,6 @@ import { lineWidthFieldValidator, defaultColors } from '../utils/ui/table-properties'; -import { - getLocalizedColorOptions, - normalizeColorOptions -} from '@ckeditor/ckeditor5-ui/src/colorgrid/utils'; -import { debounce } from 'lodash-es'; import { getTableWidgetAncestor } from '../utils/ui/widget'; import { getBalloonTablePositionData, repositionContextualBalloon } from '../utils/ui/contextualballoon'; diff --git a/packages/ckeditor5-table/src/tableproperties/ui/tablepropertiesview.js b/packages/ckeditor5-table/src/tableproperties/ui/tablepropertiesview.js index cd9db7b5e7e..b760bc7d034 100644 --- a/packages/ckeditor5-table/src/tableproperties/ui/tablepropertiesview.js +++ b/packages/ckeditor5-table/src/tableproperties/ui/tablepropertiesview.js @@ -7,20 +7,22 @@ * @module table/tableproperties/ui/tablepropertiesview */ -import View from '@ckeditor/ckeditor5-ui/src/view'; -import ViewCollection from '@ckeditor/ckeditor5-ui/src/viewcollection'; -import submitHandler from '@ckeditor/ckeditor5-ui/src/bindings/submithandler'; - -import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler'; -import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker'; -import FocusCycler from '@ckeditor/ckeditor5-ui/src/focuscycler'; - -import LabeledFieldView from '@ckeditor/ckeditor5-ui/src/labeledfield/labeledfieldview'; -import { createLabeledDropdown, createLabeledInputText } from '@ckeditor/ckeditor5-ui/src/labeledfield/utils'; -import LabelView from '@ckeditor/ckeditor5-ui/src/label/labelview'; -import { addListToDropdown } from '@ckeditor/ckeditor5-ui/src/dropdown/utils'; -import ToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/toolbarview'; -import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; +import { + ButtonView, + FocusCycler, + FormHeaderView, + LabelView, + LabeledFieldView, + ToolbarView, + View, + ViewCollection, + addListToDropdown, + createLabeledDropdown, + createLabeledInputText, + submitHandler +} from 'ckeditor5/src/ui'; +import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils'; + import { fillToolbar, getBorderStyleDefinitions, @@ -29,8 +31,6 @@ import { } from '../../utils/ui/table-properties'; import FormRowView from '../../ui/formrowview'; -import FormHeaderView from '@ckeditor/ckeditor5-ui/src/formheader/formheaderview'; - import checkIcon from '@ckeditor/ckeditor5-core/theme/icons/check.svg'; import cancelIcon from '@ckeditor/ckeditor5-core/theme/icons/cancel.svg'; import objectLeftIcon from '@ckeditor/ckeditor5-core/theme/icons/object-left.svg'; diff --git a/packages/ckeditor5-table/src/tableselection.js b/packages/ckeditor5-table/src/tableselection.js index 46f77678861..654af36edee 100644 --- a/packages/ckeditor5-table/src/tableselection.js +++ b/packages/ckeditor5-table/src/tableselection.js @@ -7,8 +7,8 @@ * @module table/tableselection */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; -import first from '@ckeditor/ckeditor5-utils/src/first'; +import { Plugin } from 'ckeditor5/src/core'; +import { first } from 'ckeditor5/src/utils'; import TableWalker from './tablewalker'; import TableUtils from './tableutils'; diff --git a/packages/ckeditor5-table/src/tabletoolbar.js b/packages/ckeditor5-table/src/tabletoolbar.js index 21ed5f99af0..e3de7ce7d61 100644 --- a/packages/ckeditor5-table/src/tabletoolbar.js +++ b/packages/ckeditor5-table/src/tabletoolbar.js @@ -7,8 +7,8 @@ * @module table/tabletoolbar */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; -import WidgetToolbarRepository from '@ckeditor/ckeditor5-widget/src/widgettoolbarrepository'; +import { Plugin } from 'ckeditor5/src/core'; +import { WidgetToolbarRepository } from 'ckeditor5/src/widget'; import { getSelectedTableWidget, getTableWidgetAncestor } from './utils/ui/widget'; /** diff --git a/packages/ckeditor5-table/src/tableui.js b/packages/ckeditor5-table/src/tableui.js index ceb19bd2aef..faed8565a04 100644 --- a/packages/ckeditor5-table/src/tableui.js +++ b/packages/ckeditor5-table/src/tableui.js @@ -7,11 +7,9 @@ * @module table/tableui */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; -import { addListToDropdown, createDropdown } from '@ckeditor/ckeditor5-ui/src/dropdown/utils'; -import SplitButtonView from '@ckeditor/ckeditor5-ui/src/dropdown/button/splitbuttonview'; -import Model from '@ckeditor/ckeditor5-ui/src/model'; -import Collection from '@ckeditor/ckeditor5-utils/src/collection'; +import { Plugin } from 'ckeditor5/src/core'; +import { addListToDropdown, createDropdown, Model, SplitButtonView } from 'ckeditor5/src/ui'; +import { Collection } from 'ckeditor5/src/utils'; import InsertTableView from './ui/inserttableview'; diff --git a/packages/ckeditor5-table/src/tableutils.js b/packages/ckeditor5-table/src/tableutils.js index 019170435d2..74bebd45a7c 100644 --- a/packages/ckeditor5-table/src/tableutils.js +++ b/packages/ckeditor5-table/src/tableutils.js @@ -7,7 +7,7 @@ * @module table/tableutils */ -import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; +import { Plugin } from 'ckeditor5/src/core'; import TableWalker from './tablewalker'; import { createEmptyTableCell, updateNumericAttribute } from './utils/common'; diff --git a/packages/ckeditor5-table/src/ui/colorinputview.js b/packages/ckeditor5-table/src/ui/colorinputview.js index 82dc4af6e96..7ed4a54a4ed 100644 --- a/packages/ckeditor5-table/src/ui/colorinputview.js +++ b/packages/ckeditor5-table/src/ui/colorinputview.js @@ -7,12 +7,10 @@ * @module table/ui/colorinputview */ -import View from '@ckeditor/ckeditor5-ui/src/view'; -import InputTextView from '@ckeditor/ckeditor5-ui/src/inputtext/inputtextview'; -import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; -import { createDropdown } from '@ckeditor/ckeditor5-ui/src/dropdown/utils'; -import ColorGrid from '@ckeditor/ckeditor5-ui/src/colorgrid/colorgridview'; +import { View, InputTextView, ButtonView, createDropdown, ColorGridView } from 'ckeditor5/src/ui'; + import removeButtonIcon from '@ckeditor/ckeditor5-core/theme/icons/eraser.svg'; + import '../../theme/colorinput.css'; /** @@ -286,7 +284,7 @@ export default class ColorInputView extends View { * @private */ _createColorGrid( locale ) { - const colorGrid = new ColorGrid( locale, { + const colorGrid = new ColorGridView( locale, { colorDefinitions: this.options.colorDefinitions, columns: this.options.columns } ); diff --git a/packages/ckeditor5-table/src/ui/formrowview.js b/packages/ckeditor5-table/src/ui/formrowview.js index 0a986be4d80..fc34830093a 100644 --- a/packages/ckeditor5-table/src/ui/formrowview.js +++ b/packages/ckeditor5-table/src/ui/formrowview.js @@ -7,7 +7,7 @@ * @module table/ui/formrowview */ -import View from '@ckeditor/ckeditor5-ui/src/view'; +import { View } from 'ckeditor5/src/ui'; import '../../theme/formrow.css'; diff --git a/packages/ckeditor5-table/src/ui/inserttableview.js b/packages/ckeditor5-table/src/ui/inserttableview.js index fbef39cc501..b48afe91047 100644 --- a/packages/ckeditor5-table/src/ui/inserttableview.js +++ b/packages/ckeditor5-table/src/ui/inserttableview.js @@ -7,7 +7,7 @@ * @module table/ui/inserttableview */ -import View from '@ckeditor/ckeditor5-ui/src/view'; +import { View } from 'ckeditor5/src/ui'; import './../../theme/inserttable.css'; diff --git a/packages/ckeditor5-table/src/utils/ui/contextualballoon.js b/packages/ckeditor5-table/src/utils/ui/contextualballoon.js index 6e385cd39f8..89d9d81b078 100644 --- a/packages/ckeditor5-table/src/utils/ui/contextualballoon.js +++ b/packages/ckeditor5-table/src/utils/ui/contextualballoon.js @@ -7,10 +7,11 @@ * @module table/utils/ui/contextualballoon */ -import { centeredBalloonPositionForLongWidgets } from '@ckeditor/ckeditor5-widget/src/utils'; -import Rect from '@ckeditor/ckeditor5-utils/src/dom/rect'; +import { centeredBalloonPositionForLongWidgets } from 'ckeditor5/src/widget'; +import { Rect } from 'ckeditor5/src/utils'; +import { BalloonPanelView } from 'ckeditor5/src/ui'; + import { getTableWidgetAncestor } from './widget'; -import BalloonPanelView from '@ckeditor/ckeditor5-ui/src/panel/balloon/balloonpanelview'; const DEFAULT_BALLOON_POSITIONS = BalloonPanelView.defaultPositions; diff --git a/packages/ckeditor5-table/src/utils/ui/table-properties.js b/packages/ckeditor5-table/src/utils/ui/table-properties.js index 5ad63accd0d..260504c7786 100644 --- a/packages/ckeditor5-table/src/utils/ui/table-properties.js +++ b/packages/ckeditor5-table/src/utils/ui/table-properties.js @@ -7,11 +7,11 @@ * @module table/utils/ui/table-properties */ -import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview'; -import Collection from '@ckeditor/ckeditor5-utils/src/collection'; -import Model from '@ckeditor/ckeditor5-ui/src/model'; +import { ButtonView, Model } from 'ckeditor5/src/ui'; +import { Collection } from 'ckeditor5/src/utils'; +import { isColor, isLength, isPercentage } from 'ckeditor5/src/engine'; + import ColorInputView from '../../ui/colorinputview'; -import { isColor, isLength, isPercentage } from '@ckeditor/ckeditor5-engine/src/view/styles/utils'; const isEmpty = val => val === ''; diff --git a/packages/ckeditor5-table/src/utils/ui/widget.js b/packages/ckeditor5-table/src/utils/ui/widget.js index 0cc9267d327..ae7353b86b1 100644 --- a/packages/ckeditor5-table/src/utils/ui/widget.js +++ b/packages/ckeditor5-table/src/utils/ui/widget.js @@ -7,7 +7,7 @@ * @module table/utils/ui/widget */ -import { isWidget } from '@ckeditor/ckeditor5-widget/src/utils'; +import { isWidget } from 'ckeditor5/src/widget'; /** * Returns a table widget editing view element if one is selected. diff --git a/packages/ckeditor5-table/table.js b/packages/ckeditor5-table/table.js new file mode 100644 index 00000000000..a2b1354fcb7 --- /dev/null +++ b/packages/ckeditor5-table/table.js @@ -0,0 +1,30 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license + */ + +/** + * @module table + */ + +import Table from './src/table'; +import TableToolbar from './src/tabletoolbar'; +import TableCellProperties from './src/tablecellproperties'; +import TableProperties from './src/tableproperties'; +import TableClipboard from './src/tableclipboard'; +import TableMouse from './src/tablemouse'; +import TableKeyboard from './src/tablekeyboard'; +import TableSelection from './src/tableselection'; +import TableUtils from './src/tableutils'; + +export default { + Table, + TableToolbar, + TableCellProperties, + TableProperties, + TableMouse, + TableClipboard, + TableKeyboard, + TableSelection, + TableUtils +}; diff --git a/packages/ckeditor5-table/webpack.config.js b/packages/ckeditor5-table/webpack.config.js new file mode 100644 index 00000000000..b0d8f1409e0 --- /dev/null +++ b/packages/ckeditor5-table/webpack.config.js @@ -0,0 +1,66 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license + */ + +/* eslint-env node */ + +const path = require( 'path' ); +const webpack = require( 'webpack' ); +const { styles } = require( '@ckeditor/ckeditor5-dev-utils' ); + +module.exports = { + mode: 'development', + optimization: { + minimize: false, + moduleIds: 'named' + }, + entry: { + path: path.resolve( __dirname, 'table.js' ) + }, + output: { + path: path.resolve( __dirname, 'build' ), + filename: 'table.js', + library: [ 'CKEditor5', 'Table' ], + libraryTarget: 'umd', + libraryExport: 'default' + }, + module: { + rules: [ + { + test: /\.svg$/, + use: [ 'raw-loader' ] + }, + { + test: /\.css$/, + use: [ + { + loader: 'style-loader', + options: { + injectType: 'singletonStyleTag', + attributes: { + 'data-cke': true + } + } + }, + { + loader: 'postcss-loader', + options: styles.getPostCssConfig( { + themeImporter: { + themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) + }, + minify: true + } ) + } + ] + } + ] + }, + plugins: [ + new webpack.DllReferencePlugin( { + manifest: require( '../../build/ckeditor5-dll.manifest.json' ), + scope: 'ckeditor5/src' + } ) + ] +}; + diff --git a/packages/ckeditor5-ui/ui.js b/packages/ckeditor5-ui/ui.js index 04add16ce2b..f33529b581f 100644 --- a/packages/ckeditor5-ui/ui.js +++ b/packages/ckeditor5-ui/ui.js @@ -1,21 +1,49 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license + */ + +/** + * @module ui + */ + export { default as clickOutsideHandler } from './src/bindings/clickoutsidehandler'; export { default as injectCssTransitionDisabler } from './src/bindings/injectcsstransitiondisabler'; export { default as submitHandler } from './src/bindings/submithandler'; export { default as ButtonView } from './src/button/buttonview'; +export * from './src/colorgrid/utils'; +export { default as ColorGridView } from './src/colorgrid/colorgridview'; + export { default as DropdownButtonView } from './src/dropdown/button/dropdownbuttonview'; export { default as SplitButtonView } from './src/dropdown/button/splitbuttonview'; export * from './src/dropdown/utils'; +export { default as EditorUIView } from './src/editorui/editoruiview'; +export { default as BoxedEditorUIView } from './src/editorui/boxed/boxededitoruiview'; +export { default as InlineEditableUIView } from './src/editableui/inline/inlineeditableuiview'; + +export { default as FormHeaderView } from './src/formheader/formheaderview'; export { default as FocusCycler } from './src/focuscycler'; -export { default as Notification } from './src/notification/notification'; +export { default as InputTextView } from './src/inputtext/inputtextview'; + +export { default as LabelView } from './src/label/labelview'; export { default as LabeledFieldView } from './src/labeledfield/labeledfieldview'; export * from './src/labeledfield/utils'; +export { default as Notification } from './src/notification/notification'; + export { default as Model } from './src/model'; export { default as BalloonPanelView } from './src/panel/balloon/balloonpanelview'; export { default as ContextualBalloon } from './src/panel/balloon/contextualballoon'; +export { default as StickyPanelView } from './src/panel/sticky/stickypanelview'; + +export { default as ToolbarView } from './src/toolbar/toolbarview'; +export { default as enableToolbarKeyboardFocus } from './src/toolbar/enabletoolbarkeyboardfocus'; +export { default as normalizeToolbarConfig } from './src/toolbar/normalizetoolbarconfig'; +export { default as BalloonToolbar } from './src/toolbar/balloon/balloontoolbar'; + export { default as View } from './src/view'; export { default as ViewCollection } from './src/viewcollection'; diff --git a/packages/ckeditor5-utils/utils.js b/packages/ckeditor5-utils/utils.js index 784b9768d65..3388e3e6f01 100644 --- a/packages/ckeditor5-utils/utils.js +++ b/packages/ckeditor5-utils/utils.js @@ -11,11 +11,20 @@ export { default as ObservableMixin } from './src/observablemixin'; export { default as CKEditorError, logError, logWarning } from './src/ckeditorerror'; +export { default as ElementReplacer } from './src/elementreplacer'; + export { default as createElement } from './src/dom/createelement'; +export { default as global } from './src/dom/global'; +export { default as getDataFromElement } from './src/dom/getdatafromelement'; +export { default as Rect } from './src/dom/rect'; +export { default as ResizeObserver } from './src/dom/resizeobserver'; +export { default as setDataInElement } from './src/dom/setdatainelement'; +export { default as toUnit } from './src/dom/tounit'; +export * from './src/keyboard'; export { default as Collection } from './src/collection'; export { default as first } from './src/first'; export { default as FocusTracker } from './src/focustracker'; export { default as KeystrokeHandler } from './src/keystrokehandler'; -export { default as global } from './src/dom/global'; export { default as toArray } from './src/toarray'; +export { default as priorities } from './src/priorities'; diff --git a/sample/index.html b/sample/index.html index 0f7509842ff..5aed69b2fe5 100644 --- a/sample/index.html +++ b/sample/index.html @@ -77,13 +77,15 @@

The editable

+