-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow for plugins being passed down as props to
<open-scd>
(#…
…1486) * feat: allow open-scd to have plugins being passed down as props Signed-off-by: Juan Munoz <[email protected]> * test: added integration snapshot test for plugins prop Signed-off-by: Juan Munoz <[email protected]> * chore: refactor to implement "tasks" section on issue #1418 Signed-off-by: Juan Munoz <[email protected]> * chore: remove unnecessary default attribute from core's Plugin interface Signed-off-by: Juan Munoz <[email protected]> * chore: change position attr to accomodate for editor plug-in positions Signed-off-by: Juan Munoz <[email protected]> * chore: fixing prop "default" to "active" and adding snapshot test with an editor plugin Signed-off-by: Juan Munoz <[email protected]> * chore: fixing casting of CorePlugin type into Plugin type Signed-off-by: Juan Munoz <[email protected]> * chore: updating with snapshots from main Signed-off-by: Juan Munoz <[email protected]> --------- Signed-off-by: Juan Munoz <[email protected]> Co-authored-by: Steffen van den Driest <[email protected]>
- Loading branch information
1 parent
24f4b25
commit 01bcc01
Showing
7 changed files
with
190 additions
and
111 deletions.
There are no files selected for viewing
This file contains 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 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,12 @@ | ||
import { targetLocales } from '../locales.js'; | ||
|
||
export type Plugin = { | ||
name: string; | ||
translations?: Record<(typeof targetLocales)[number], string>; | ||
src: string; | ||
icon: string; | ||
requireDoc?: boolean; | ||
active?: boolean; | ||
position: ('top' | 'middle' | 'bottom') | number; | ||
}; | ||
export type PluginSet = { menu: Plugin[]; editor: Plugin[] }; |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
|
@@ -21,4 +21,7 @@ module.exports = { | |
'no-duplicate-imports': 'off', | ||
'tsdoc/syntax': 'warn' | ||
}, | ||
env: { | ||
browser: true, | ||
}, | ||
}; |
This file contains 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 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.