-
Notifications
You must be signed in to change notification settings - Fork 2
chore(sdk): sdk now stores shared deps #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 4 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1966c43
sdk package
neSpecc 1488a2f
Update Blocks.ts
neSpecc a824296
ci
neSpecc dc2f217
Merge branch 'main' into sdk
neSpecc 17aaac2
lint
neSpecc e0062a9
fix eslint sdk
neSpecc b43afe2
fix lint
neSpecc 09d9f31
Update core.yml
neSpecc 7a8b1cd
Revert "Update core.yml"
neSpecc ac71edc
Update tsconfig.json
neSpecc 51579c9
Update package.json
neSpecc 8d86284
Update eslint.config.mjs
neSpecc 8f47cab
Update ToolsManager.ts
neSpecc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Core check | ||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Run ESLint check | ||
| uses: ./.github/actions/lint | ||
| with: | ||
| package-name: '@editorjs/core' | ||
|
|
||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Build the package | ||
| uses: ./.github/actions/build | ||
| with: | ||
| package-name: '@editorjs/core' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: SDK check | ||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Run ESLint check | ||
| uses: ./.github/actions/lint | ||
| with: | ||
| package-name: '@editorjs/sdk' | ||
|
|
||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Build the package | ||
| uses: ./.github/actions/build | ||
| with: | ||
| package-name: '@editorjs/sdk' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,16 @@ | ||
| { | ||
| "name": "@editorjs/sdk", | ||
| "version": "0.0.0", | ||
| "version": "0.1.0", | ||
| "packageManager": "[email protected]", | ||
| "main": "dist/index.js", | ||
| "types": "dist/index.d.ts", | ||
| "type": "module", | ||
| "scripts": { | ||
| "build": "tsc", | ||
| "build": "yarn clear && tsc --build tsconfig.build.json", | ||
| "lint": "eslint", | ||
| "lint:ci": "yarn lint --max-warnings 0", | ||
| "lint:fix": "yarn lint --fix" | ||
| "lint:fix": "yarn lint --fix", | ||
| "clear": "rm -rf dist && rm -f tsconfig.build.tsbuildinfo && rm -f tsconfig.tsbuildinfo" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/eslint": "^8", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import type { BlockToolData, ToolConfig } from '@editorjs/editorjs'; | ||
|
|
||
| /** | ||
| * Blocks API interface | ||
| * Provides methods to work with blocks | ||
| */ | ||
| export interface BlocksAPI { | ||
| /** | ||
| * Inserts a new block to the editor | ||
| * @param type - Block tool name to insert | ||
| * @param data - Block's initial data | ||
| * @param _config - not used but left for compatibility | ||
| * @param index - index to insert block at | ||
| * @param needToFocus - flag indicates if new block should be focused @todo implement | ||
| * @param replace - flag indicates if block at index should be replaced @todo implement | ||
| * @param id - id of the inserted block @todo implement | ||
| */ | ||
| insert( | ||
| type?: string, | ||
| data?: BlockToolData, | ||
| _config?: ToolConfig, | ||
| index?: number, | ||
| needToFocus?: boolean, | ||
| replace?: boolean, | ||
| id?: string | ||
| ): void; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import type { BlocksAPI } from './BlocksAPI.js'; | ||
| import type { SelectionAPI } from './SelectionAPI.js'; | ||
|
|
||
| /** | ||
| * Editor API interface | ||
| * Gathers all Editor's APIs | ||
| */ | ||
| export interface EditorAPI { | ||
| /** | ||
| * Blocks API instance to work with blocks | ||
| */ | ||
| blocks: BlocksAPI; | ||
|
|
||
| /** | ||
| * Selection API instance to work with selection and inline formatting | ||
| */ | ||
| selection: SelectionAPI; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import type { InlineToolName } from '@editorjs/model'; | ||
|
|
||
| /** | ||
| * Selection API interface | ||
| * Provides methods to work with text selection and inline tools | ||
| */ | ||
| export interface SelectionAPI { | ||
| /** | ||
| * Applies inline tool for the current selection | ||
| * @param tool - name of the inline tool to apply | ||
| * @param data - optional data for the inline tool | ||
| */ | ||
| applyInlineToolForCurrentSelection(tool: InlineToolName, data?: Record<string, unknown>): void; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| export * from './EditorAPI.js'; | ||
| export * from './BlocksAPI.js'; | ||
| export * from './SelectionAPI.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.