From 2f197343ff444ac3014600df6fb40ab47cae562d Mon Sep 17 00:00:00 2001 From: cad Date: Tue, 22 Apr 2025 13:33:49 +0200 Subject: [PATCH 1/2] docs(API): fix plugins property type --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index 17dd7bf..f67d469 100644 --- a/API.md +++ b/API.md @@ -37,7 +37,7 @@ export default class MyPlugin extends HTMLElement { ]; history: LogEntry[]; editCount: number = 0; - plugins: { menu: Plugin[], editor: Plugin[] }[]; + plugins: { menu: Plugin[], editor: Plugin[] }; locale: string = 'en'; } From b2597fa0ddd7369060ea7f7b10a266f5fe9e1196 Mon Sep 17 00:00:00 2001 From: cad Date: Tue, 22 Apr 2025 13:39:05 +0200 Subject: [PATCH 2/2] docs(API): key plugins property by plugin name This makes the property type definition more compatible with the new `ConfigurePluginEvent` by making sure that the default (i.e. `en` language) name is unique per plugin `kind` at the code level. --- API.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/API.md b/API.md index f67d469..e575c78 100644 --- a/API.md +++ b/API.md @@ -37,7 +37,7 @@ export default class MyPlugin extends HTMLElement { ]; history: LogEntry[]; editCount: number = 0; - plugins: { menu: Plugin[], editor: Plugin[] }; + plugins: { menu: Record; editor: Record; }; locale: string = 'en'; } @@ -50,7 +50,6 @@ type LogEntry = { } type Plugin = { - name: string; translations?: Record; src: string; icon: string; // Material icon name or image URL