From 568233003c5fe039d35cf7cc0cbeca54c2f0030c Mon Sep 17 00:00:00 2001 From: "Umang G. Patel" <23169768+robonetphy@users.noreply.github.com> Date: Mon, 28 Nov 2022 23:25:16 +0530 Subject: [PATCH 1/4] add the codex icons to link-autocomplete tool --- package.json | 1 + yarn.lock | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/package.json b/package.json index 6a3c634..194bded 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "server": "nodemon example/server.js" }, "devDependencies": { + "@codexteam/icons": "^0.0.5", "codex-notifier": "^1.1.2", "css-loader": "^5.0.2", "eslint": "^7.30.0", diff --git a/yarn.lock b/yarn.lock index 5aa4fd5..0d11fdd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -44,6 +44,11 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@codexteam/icons@^0.0.5": + version "0.0.5" + resolved "https://registry.yarnpkg.com/@codexteam/icons/-/icons-0.0.5.tgz#d17f39b6a0497c6439f57dd42711817a3dd3679c" + integrity sha512-s6H2KXhLz2rgbMZSkRm8dsMJvyUNZsEjxobBEg9ztdrb1B2H3pEzY6iTwI4XUPJWJ3c3qRKwV4TrO3J5jUdoQA== + "@discoveryjs/json-ext@^0.5.0": version "0.5.2" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752" From 2d286cf718e12b8cad5ca04c99204115406fa9b7 Mon Sep 17 00:00:00 2001 From: "Umang G. Patel" <23169768+robonetphy@users.noreply.github.com> Date: Mon, 28 Nov 2022 23:34:18 +0530 Subject: [PATCH 2/4] codex icons integrated with tool --- icons/link.svg | 3 --- icons/unlink.svg | 3 --- src/index.js | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 icons/link.svg delete mode 100644 icons/unlink.svg diff --git a/icons/link.svg b/icons/link.svg deleted file mode 100644 index dde96c1..0000000 --- a/icons/link.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/icons/unlink.svg b/icons/unlink.svg deleted file mode 100644 index b5c52cb..0000000 --- a/icons/unlink.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/index.js b/src/index.js index e14eb79..3a6b89b 100644 --- a/src/index.js +++ b/src/index.js @@ -227,7 +227,7 @@ export default class LinkAutocomplete { * @type {HTMLSpanElement} */ this.nodes.toolButtonLink = Dom.make('span', LinkAutocomplete.CSS.iconWrapper, { - innerHTML: require('../icons/link.svg'), + innerHTML: require('@codexteam/icons').IconLink, }); this.nodes.toolButtons.appendChild(this.nodes.toolButtonLink); @@ -237,7 +237,7 @@ export default class LinkAutocomplete { * @type {HTMLSpanElement} */ this.nodes.toolButtonUnlink = Dom.make('span', LinkAutocomplete.CSS.iconWrapper, { - innerHTML: require('../icons/unlink.svg'), + innerHTML: require('@codexteam/icons').IconUnlink, }); this.nodes.toolButtons.appendChild(this.nodes.toolButtonUnlink); this.toggleVisibility(this.nodes.toolButtonUnlink, false); From c8fee5686b549738ca21888be1d1ec3f99ac7cc4 Mon Sep 17 00:00:00 2001 From: "Umang G. Patel" <23169768+robonetphy@users.noreply.github.com> Date: Mon, 28 Nov 2022 23:34:58 +0530 Subject: [PATCH 3/4] version updated --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 194bded..44909d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@editorjs/link-autocomplete", - "version": "0.0.0", + "version": "0.1.0", "description": "Link Autocomplete Inline Tool for EditorJS", "main": "dist/link-autocomplete.js", "repository": "https://github.com/editor-js/link-autocomplete.git", From 9f92837ee7043d9b1f6c27f388d5311236b63fbe Mon Sep 17 00:00:00 2001 From: "Umang G. Patel" <23169768+robonetphy@users.noreply.github.com> Date: Wed, 30 Nov 2022 00:53:32 +0530 Subject: [PATCH 4/4] webpack updated --- package.json | 4 +++- src/index.js | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 44909d1..931f41f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "server": "nodemon example/server.js" }, "devDependencies": { - "@codexteam/icons": "^0.0.5", "codex-notifier": "^1.1.2", "css-loader": "^5.0.2", "eslint": "^7.30.0", @@ -30,5 +29,8 @@ "style-loader": "^2.0.0", "webpack": "^5.24.1", "webpack-cli": "^4.5.0" + }, + "dependencies": { + "@codexteam/icons": "^0.0.5" } } diff --git a/src/index.js b/src/index.js index 3a6b89b..91e7ef7 100644 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,7 @@ import './../styles/index.pcss'; * Import deps */ import notifier from 'codex-notifier'; - +import { IconUnlink, IconLink } from '@codexteam/icons'; /** * Import functions */ @@ -227,7 +227,7 @@ export default class LinkAutocomplete { * @type {HTMLSpanElement} */ this.nodes.toolButtonLink = Dom.make('span', LinkAutocomplete.CSS.iconWrapper, { - innerHTML: require('@codexteam/icons').IconLink, + innerHTML: IconLink, }); this.nodes.toolButtons.appendChild(this.nodes.toolButtonLink); @@ -237,7 +237,7 @@ export default class LinkAutocomplete { * @type {HTMLSpanElement} */ this.nodes.toolButtonUnlink = Dom.make('span', LinkAutocomplete.CSS.iconWrapper, { - innerHTML: require('@codexteam/icons').IconUnlink, + innerHTML: IconUnlink, }); this.nodes.toolButtons.appendChild(this.nodes.toolButtonUnlink); this.toggleVisibility(this.nodes.toolButtonUnlink, false);