Skip to content

Commit

Permalink
Remove DLLs
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjhanson committed Dec 12, 2024
1 parent b2aeeba commit 0ecef4c
Show file tree
Hide file tree
Showing 20 changed files with 98 additions and 14,272 deletions.
14,146 changes: 11 additions & 14,135 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 2 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,9 @@
"extends @craftcms/browserslist-config"
],
"devDependencies": {
"@ckeditor/ckeditor5-alignment": ">=44.0.0",
"@ckeditor/ckeditor5-autoformat": ">=44.0.0",
"@ckeditor/ckeditor5-basic-styles": ">=44.0.0",
"@ckeditor/ckeditor5-block-quote": ">=44.0.0",
"@ckeditor/ckeditor5-code-block": ">=44.0.0",
"@ckeditor/ckeditor5-core": ">=44.0.0",
"@ckeditor/ckeditor5-dev-translations": "^43.0.1",
"@ckeditor/ckeditor5-editor-classic": ">=44.0.0",
"@ckeditor/ckeditor5-essentials": ">=44.0.0",
"@ckeditor/ckeditor5-find-and-replace": ">=44.0.0",
"@ckeditor/ckeditor5-font": ">=44.0.0",
"@ckeditor/ckeditor5-heading": ">=44.0.0",
"@ckeditor/ckeditor5-horizontal-line": ">=44.0.0",
"@ckeditor/ckeditor5-html-embed": ">=44.0.0",
"@ckeditor/ckeditor5-html-support": ">=44.0.0",
"@ckeditor/ckeditor5-image": ">=44.0.0",
"@ckeditor/ckeditor5-indent": ">=44.0.0",
"@ckeditor/ckeditor5-inspector": ">=4.1.0",
"@ckeditor/ckeditor5-language": "^44.0.0",
"@ckeditor/ckeditor5-link": ">=44.0.0",
"@ckeditor/ckeditor5-list": ">=44.0.0",
"@ckeditor/ckeditor5-media-embed": ">=44.0.0",
"@ckeditor/ckeditor5-package-tools": "^1.0.0",
"@ckeditor/ckeditor5-page-break": ">=44.0.0",
"@ckeditor/ckeditor5-paragraph": ">=44.0.0",
"@ckeditor/ckeditor5-paste-from-office": ">=44.0.0",
"@ckeditor/ckeditor5-remove-format": ">=44.0.0",
"@ckeditor/ckeditor5-select-all": ">=44.0.0",
"@ckeditor/ckeditor5-source-editing": ">=44.0.0",
"@ckeditor/ckeditor5-style": ">=44.0.0",
"@ckeditor/ckeditor5-table": ">=44.0.0",
"@ckeditor/ckeditor5-theme-lark": "^44.0.0",
"@ckeditor/ckeditor5-upload": ">=44.0.0",
"@ckeditor/ckeditor5-word-count": ">=44.0.0",
"@craftcms/sass": "^1.1.0",
"@craftcms/webpack": "^1.1.2",
"@northernco/ckeditor5-anchor-drupal": "^0.5.0",
Expand All @@ -48,7 +17,8 @@
"husky": "^9.1.7",
"jquery": "^3.7.1",
"lint-staged": "^15.2.10",
"prettier": "^3.4.2"
"prettier": "^3.4.2",
"terser-webpack-plugin": "^5.3.10"
},
"scripts": {
"prebuild": "npm run fix-prettier",
Expand Down
1 change: 0 additions & 1 deletion src/web/assets/ckeditor/CkeditorAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class CkeditorAsset extends BaseCkeditorPackageAsset
* @inheritdoc
*/
public $js = [
'ckeditor5-dll.js',
'ckeditor5-craftcms.js',
];

Expand Down
92 changes: 48 additions & 44 deletions src/web/assets/ckeditor/src/ckeditor5-craftcms.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,75 @@
* @license GPL-3.0-or-later
*/

import 'ckeditor5/ckeditor5.css';
import './ckeditor5-craftcms.css';
import {Alignment} from '@ckeditor/ckeditor5-alignment';
import {
Alignment,
Autoformat,
AutoImage,
AutoLink,
BlockQuote,
Bold,
ClassicEditor,
Clipboard,
Code,
CodeBlock,
Essentials,
FindAndReplace,
Font,
GeneralHtmlSupport,
Heading,
HorizontalLine,
HtmlComment,
HtmlEmbed,
Image,
ImageCaption,
ImageStyle,
ImageToolbar,
} from '@ckeditor/ckeditor5-image';
import {Autoformat} from '@ckeditor/ckeditor5-autoformat';
import {BlockQuote} from '@ckeditor/ckeditor5-block-quote';
import {
Bold,
Code,
Indent,
IndentBlock,
Italic,
LinkEditing,
LinkImage,
List,
ListProperties,
MediaEmbed,
MediaEmbedToolbar,
PageBreak,
Paragraph,
PasteFromOffice,
RemoveFormat,
SelectAll,
SourceEditing,
Strikethrough,
Style,
Subscript,
Superscript,
Underline,
} from '@ckeditor/ckeditor5-basic-styles';
import {ClassicEditor} from '@ckeditor/ckeditor5-editor-classic';
import {CodeBlock} from '@ckeditor/ckeditor5-code-block';
import {Essentials} from '@ckeditor/ckeditor5-essentials';
import {FindAndReplace} from '@ckeditor/ckeditor5-find-and-replace';
import {Font} from '@ckeditor/ckeditor5-font';
import {
GeneralHtmlSupport,
HtmlComment,
} from '@ckeditor/ckeditor5-html-support';
import {Heading} from '@ckeditor/ckeditor5-heading';
import {HorizontalLine} from '@ckeditor/ckeditor5-horizontal-line';
import {HtmlEmbed} from '@ckeditor/ckeditor5-html-embed';
import {Indent, IndentBlock} from '@ckeditor/ckeditor5-indent';
import {LinkEditing, AutoLink, LinkImage} from '@ckeditor/ckeditor5-link';
import {List, ListProperties, TodoList} from '@ckeditor/ckeditor5-list';
import {MediaEmbed, MediaEmbedToolbar} from '@ckeditor/ckeditor5-media-embed';
import {PageBreak} from '@ckeditor/ckeditor5-page-break';
import {PasteFromOffice} from '@ckeditor/ckeditor5-paste-from-office';
import {RemoveFormat} from '@ckeditor/ckeditor5-remove-format';
import {SourceEditing} from '@ckeditor/ckeditor5-source-editing';
import {Style} from '@ckeditor/ckeditor5-style';
import {
Table,
TableCaption,
TableCellProperties,
TableProperties,
TableToolbar,
TableUI,
} from '@ckeditor/ckeditor5-table';
import {WordCount} from '@ckeditor/ckeditor5-word-count';
TextPartLanguage,
TodoList,
Underline,
WordCount,
} from 'ckeditor5';
import {default as CraftImageInsertUI} from './image/imageinsert/imageinsertui';
import {default as CraftLinkUI} from './link/linkui';
import ImageTransform from './image/imagetransform';
import ImageEditor from './image/imageeditor';
import {TextPartLanguage} from '@ckeditor/ckeditor5-language';
import CraftEntries from './entries/entries';
import CKEditorInspector from '@ckeditor/ckeditor5-inspector';
import {Anchor} from '@northernco/ckeditor5-anchor-drupal';
// import {Anchor} from '@northernco/ckeditor5-anchor-drupal';

const allPlugins = [
CKEditor5.paragraph.Paragraph,
CKEditor5.selectAll.SelectAll,
CKEditor5.clipboard.Clipboard,
Paragraph,
SelectAll,
Clipboard,
Alignment,
Anchor,
// Anchor,
AutoImage,
AutoLink,
Autoformat,
Expand Down Expand Up @@ -149,7 +153,7 @@ export const toolbarItems = normalizeToolbarItems([
'superscript',
'code',
'link',
'anchor',
// 'anchor',
'textPartLanguage',
{button: 'fontSize', configOption: 'fontSize'},
'fontFamily',
Expand Down Expand Up @@ -177,11 +181,11 @@ export const toolbarItems = normalizeToolbarItems([

const pluginButtonMap = [
{plugins: ['Alignment'], buttons: ['alignment']},
{plugins: ['Anchor'], buttons: ['anchor']},
// {plugins: ['Anchor'], buttons: ['anchor']},
{
plugins: [
'AutoImage',
'CraftImageInsertUI',
// 'CraftImageInsertUI',
'Image',
'ImageCaption',
'ImageStyle',
Expand Down Expand Up @@ -246,9 +250,9 @@ const pluginButtonMap = [
];

const findPlugin = (pluginName) => {
for (const [k, v] of Object.entries(CKEditor5)) {
for (const [_, v] of Object.entries(CKEditor5)) {
if (typeof v === 'object') {
for (const [k2, v2] of Object.entries(v)) {
for (const [_, v2] of Object.entries(v)) {
if (typeof v2 === 'function' && v2.pluginName === pluginName) {
return v2;
}
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/ckeditor/src/entries/entries.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Plugin} from 'ckeditor5/src/core';
import {Plugin} from 'ckeditor5';
import CraftEntriesEditing from './entriesediting';
import CraftEntriesUI from './entriesui';

Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/ckeditor/src/entries/entriescommand.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Command} from 'ckeditor5/src/core';
import {Command} from 'ckeditor5';

export default class CraftEntriesCommand extends Command {
execute(options) {
Expand Down
6 changes: 3 additions & 3 deletions src/web/assets/ckeditor/src/entries/entriesediting.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {Plugin} from 'ckeditor5/src/core';
import {
Widget,
Plugin,
toWidget,
viewToModelPositionOutsideModelElement,
} from 'ckeditor5/src/widget';
Widget,
} from 'ckeditor5';
import CraftEntriesCommand from './entriescommand';

export default class CraftEntriesEditing extends Plugin {
Expand Down
10 changes: 5 additions & 5 deletions src/web/assets/ckeditor/src/entries/entriesui.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {Plugin} from 'ckeditor5/src/core';
import {
addListToDropdown,
ButtonView,
Collection,
createDropdown,
isWidget,
Plugin,
ViewModel,
} from 'ckeditor5/src/ui';
import {Range} from 'ckeditor5/src/engine';
import {Collection} from 'ckeditor5/src/utils';
import {isWidget, WidgetToolbarRepository} from 'ckeditor5/src/widget';
WidgetToolbarRepository,
} from 'ckeditor5';
import {DoubleClickObserver} from '../observers/domevent';

export default class CraftEntriesUI extends Plugin {
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/ckeditor/src/image/imageeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @license GPL-3.0-or-later
*/

import {Plugin} from 'ckeditor5/src/core';
import {Plugin} from 'ckeditor5';
import ImageEditorEditing from './imageeditor/imageeditorediting';
import ImageEditorUI from './imageeditor/imageeditorui';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @license GPL-3.0-or-later
*/

import {Command} from 'ckeditor5/src/core';
import {Command} from 'ckeditor5';

/**
* The transform image command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* @license GPL-3.0-or-later
*/

import {Plugin} from 'ckeditor5/src/core';
import ImageUtils from '@ckeditor/ckeditor5-image/src/imageutils';
import {ImageUtils, Plugin} from 'ckeditor5';
import ImageEditorCommand from './imageeditorcommand';

export default class ImageEditorEditing extends Plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* @license GPL-3.0-or-later
*/

import {Plugin, icons} from 'ckeditor5/src/core';
import {ButtonView} from 'ckeditor5/src/ui';
import {ButtonView, Plugin} from 'ckeditor5';
import ImageEditorEditing from './imageeditorediting';

export default class ImageEditorUI extends Plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
* @license GPL-3.0-or-later
*/

import {icons} from 'ckeditor5/src/core';
import {ButtonView} from 'ckeditor5/src/ui';
import {ImageInsertUI} from '@ckeditor/ckeditor5-image';
import {ButtonView, icons, ImageInsertUI} from 'ckeditor5';

export default class CraftImageInsertUI extends ImageInsertUI {
static get pluginName() {
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/ckeditor/src/image/imagetransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @license GPL-3.0-or-later
*/

import {Plugin} from 'ckeditor5/src/core';
import {Plugin} from 'ckeditor5';
import ImageTransformEditing from './imagetransform/imagetransformediting';
import ImageTransformUI from './imagetransform/imagetransformui';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* @license GPL-3.0-or-later
*/

import {Plugin} from 'ckeditor5/src/core';
import ImageUtils from '@ckeditor/ckeditor5-image/src/imageutils';
import {ImageUtils, Plugin} from 'ckeditor5';
import TransformImageCommand from './transformimagecommand';

export default class ImageTransformEditing extends Plugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
* @license GPL-3.0-or-later
*/

import {Plugin, icons} from 'ckeditor5/src/core';
import {
addListToDropdown,
Collection,
createDropdown,
DropdownButtonView,
icons,
Plugin,
ViewModel,
createDropdown,
addListToDropdown,
} from 'ckeditor5/src/ui';
import {Collection} from 'ckeditor5/src/utils';
} from 'ckeditor5';
import ImageTransformEditing from './imagetransformediting';

const RESIZE_ICON = icons.objectSizeMedium;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @license GPL-3.0-or-later
*/

import {Command} from 'ckeditor5/src/core';
import {Command} from 'ckeditor5';

/**
* The transform image command.
Expand Down
24 changes: 11 additions & 13 deletions src/web/assets/ckeditor/src/link/linkui.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@
* @license GPL-3.0-or-later
*/

import {Plugin} from 'ckeditor5/src/core';
import {Collection} from 'ckeditor5/src/utils';
import {
ViewModel,
ContextualBalloon,
SplitButtonView,
createDropdown,
addListToDropdown,
} from 'ckeditor5/src/ui';
import linkIcon from '@ckeditor/ckeditor5-link/theme/icons/link.svg';
import {LinkUI} from '@ckeditor/ckeditor5-link';
import {LINK_KEYSTROKE} from '@ckeditor/ckeditor5-link/src/utils';
import {Range} from 'ckeditor5/src/engine';
import {addListToDropdown, Collection, ContextualBalloon, createDropdown, LinkUI, Plugin, Range, SplitButtonView, ViewModel} from 'ckeditor5';

/**
* These imports aren't ideal but are necessary for now because the main
* ckeditor5 package doesn't expose them.
*
* @link https://github.com/ckeditor/ckeditor5/issues/17304#issuecomment-2522746556
*/
const linkIcon = `<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>`;
const LINK_KEYSTROKE = 'Ctrl+K';

export default class CraftLinkUI extends Plugin {
static get requires() {
return [LinkUI];
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/ckeditor/src/observers/domevent.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {DomEventObserver} from 'ckeditor5/src/engine';
import {DomEventObserver} from 'ckeditor5';

export class DoubleClickObserver extends DomEventObserver {
constructor(view) {
Expand Down
Loading

0 comments on commit 0ecef4c

Please sign in to comment.