Skip to content

Commit

Permalink
Merge pull request #73 from ahmedatigui/master
Browse files Browse the repository at this point in the history
Fix type mismatch and version discrepancy in dependencies
  • Loading branch information
ahmedatigui authored Nov 22, 2024
2 parents 5740e1c + 3168039 commit 20e61c5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"email": "[email protected]"
},
"devDependencies": {
"@editorjs/editorjs": "^2.29.1",
"@editorjs/editorjs": "^2.30.7",
"typescript": "^5.4.5",
"vite": "^4.5.0",
"vite-plugin-css-injected-by-js": "^3.3.0",
Expand Down
14 changes: 7 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ export interface QuoteConfig extends ToolConfig {
/**
* Placeholder text to display in the quote's text input.
*/
quotePlaceholder: string;
quotePlaceholder?: string;

/**
* Placeholder text to display in the quote's caption input.
*/
captionPlaceholder: string;
captionPlaceholder?: string;

/**
* Default alignment for the quote.
*/
defaultAlignment: Alignment;
defaultAlignment?: Alignment;
}

/**
Expand Down Expand Up @@ -73,7 +73,7 @@ interface QuoteParams {
/**
* Quote tool configuration
*/
config: QuoteConfig;
config?: QuoteConfig;
/**
* Editor.js API
*/
Expand Down Expand Up @@ -180,17 +180,17 @@ export default class Quote implements BlockTool {
this.readOnly = readOnly;

this._quotePlaceholder =
config.quotePlaceholder || Quote.DEFAULT_QUOTE_PLACEHOLDER;
config?.quotePlaceholder || Quote.DEFAULT_QUOTE_PLACEHOLDER;
this._captionPlaceholder =
config.captionPlaceholder || Quote.DEFAULT_CAPTION_PLACEHOLDER;
config?.captionPlaceholder || Quote.DEFAULT_CAPTION_PLACEHOLDER;

this._data = {
text: data.text || "",
caption: data.caption || "",
alignment:
(Object.values(Alignment).includes(data.alignment as Alignment) &&
data.alignment) ||
config.defaultAlignment ||
config?.defaultAlignment ||
DEFAULT_ALIGNMENT,
};
this._CSS = {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
dependencies:
"@editorjs/helpers" "^0.0.4"

"@editorjs/editorjs@^2.29.1":
version "2.30.5"
resolved "https://registry.yarnpkg.com/@editorjs/editorjs/-/editorjs-2.30.5.tgz#c1a6fc2b99f567a0271408c0edd51d3da21b4534"
integrity sha512-sE7m/UPbuf+nSGjv9cmWggFsfvtYlgEX7PCby2lZWvOsOLbRxuLT+ZYlwbWshD+8BFJwiAmBj9e+ScZcOjCzeg==
"@editorjs/editorjs@^2.30.7":
version "2.30.7"
resolved "https://registry.yarnpkg.com/@editorjs/editorjs/-/editorjs-2.30.7.tgz#6ba210490c1040c55ef7e5ef040c4c6e3dc722e7"
integrity sha512-FfdeUqrgcKWC+Cy2GW6Dxup6s2TaRKokR4FL+HKXshu6h9Y//rrx4SQkURgkZOCSbV77t9btbmAXdFXWGB+diw==

"@editorjs/helpers@^0.0.4":
version "0.0.4"
Expand Down

0 comments on commit 20e61c5

Please sign in to comment.