Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { Transactor } from './Transactor.js';
* @property docs - A map of document names to their loaded XMLDocument instances.
* @property doc - The XMLDocument currently being edited, if any.
* @property docName - The name of the currently edited document, if any.
* @property docsState - changes value when the document is modified or documents are added/removed.
* @property docVersion - changes value when the document is modified.
* @property locale - The end user's selected locale.
*/
export interface Plugin {
editor: Transactor<EditV2>;
docs: Record<string, XMLDocument>;
doc?: XMLDocument; // the document currently being edited
docName?: string; // the current doc's name
docsState: unknown; // current doc's state indicator
docVersion: unknown; // changes when the document is modified
locale: string; // the end user's chosen locale
}
6 changes: 3 additions & 3 deletions docs/plugin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class MyPlugin extends HTMLElement {
docs: Record<string, XMLDocument> = {}; // all loaded documents
doc?: XMLDocument; // the document currently being edited
docName?: string; // the current doc's name
docsState: unknown; // changes value when the document is modified or documents are added/removed.
docVersion: unknown; // changes value when the document is modified.
locale: string = 'en'; // the end user's chosen locale
}
```
Expand All @@ -46,9 +46,9 @@ The name of the `XMLDocument` currently being edited.

The `XMLDocument` currently being edited.

### `docsState`
### `docVersion`

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

### `locale`

Expand Down
2 changes: 2 additions & 0 deletions oscd-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ export type {
} from './edit-event-v2.js';

export type { OpenDetail, OpenEvent } from './open-event.js';

export type { Plugin } from './Plugin.js';