Skip to content

Commit 20c7d79

Browse files
stee-reca-d
authored andcommitted
feat: correct plugin "version" prop and expose type
1 parent ad9a3d0 commit 20c7d79

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import { Transactor } from './Transactor.js';
99
* @property docs - A map of document names to their loaded XMLDocument instances.
1010
* @property doc - The XMLDocument currently being edited, if any.
1111
* @property docName - The name of the currently edited document, if any.
12-
* @property docsState - changes value when the document is modified or documents are added/removed.
12+
* @property docVersion - changes value when the document is modified.
1313
* @property locale - The end user's selected locale.
1414
*/
1515
export interface Plugin {
1616
editor: Transactor<EditV2>;
1717
docs: Record<string, XMLDocument>;
1818
doc?: XMLDocument; // the document currently being edited
1919
docName?: string; // the current doc's name
20-
docsState: unknown; // current doc's state indicator
20+
docVersion: unknown; // changes when the document is modified
2121
locale: string; // the end user's chosen locale
2222
}

docs/plugin-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class MyPlugin extends HTMLElement {
2424
docs: Record<string, XMLDocument> = {}; // all loaded documents
2525
doc?: XMLDocument; // the document currently being edited
2626
docName?: string; // the current doc's name
27-
docsState: unknown; // changes value when the document is modified or documents are added/removed.
27+
docVersion: unknown; // changes value when the document is modified.
2828
locale: string = 'en'; // the end user's chosen locale
2929
}
3030
```
@@ -46,9 +46,9 @@ The name of the `XMLDocument` currently being edited.
4646

4747
The `XMLDocument` currently being edited.
4848

49-
### `docsState`
49+
### `docVersion`
5050

51-
A value which changes with edits to the current document AND when documents are opened or closed.
51+
A value which changes with edits to the current document.
5252

5353
### `locale`
5454

oscd-api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ export type {
3232
} from './edit-event-v2.js';
3333

3434
export type { OpenDetail, OpenEvent } from './open-event.js';
35+
36+
export type { Plugin } from './Plugin.js';

0 commit comments

Comments
 (0)