oasis-editor 0.0.209 → 0.0.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  import { OasisPlugin } from '../../core/plugin.js';
2
2
  import { EssentialsPluginDeps } from './essentialsCapabilities.js';
3
- export type { EssentialsFeatureGate, EssentialsStyleCapability, EssentialsSelectionCapability, EssentialsHistoryCapability, EssentialsFormattingCapability, EssentialsDocumentStyleDescriptor, EssentialsDocumentCapability, EssentialsLinkCapability, EssentialsImageCapability, EssentialsBrowserCapability, EssentialsParagraphCapability, EssentialsSectionCapability, EssentialsTableCapability, EssentialsPluginDeps, EssentialsDesignCapability, } from './essentialsCapabilities.js';
3
+ export type { EssentialsFeatureGate, EssentialsStyleCapability, EssentialsSelectionCapability, EssentialsHistoryCapability, EssentialsFormattingCapability, EssentialsDocumentStyleDescriptor, EssentialsDocumentCapability, EssentialsLinkCapability, EssentialsImageCapability, EssentialsBrowserCapability, EssentialsParagraphCapability, EssentialsSectionCapability, EssentialsHeaderFooterCapability, EssentialsTableCapability, EssentialsPluginDeps, EssentialsDesignCapability, } from './essentialsCapabilities.js';
4
4
  export declare function createEssentialsPlugin(deps: EssentialsPluginDeps): OasisPlugin;
@@ -210,6 +210,18 @@ export interface EssentialsSectionCapability {
210
210
  getMargins: () => EditorPageMargins | undefined;
211
211
  setPageMargins: (margins: Partial<EditorPageMargins>) => void;
212
212
  }
213
+ export interface EssentialsHeaderFooterCapability {
214
+ /** Enter header editing for the active section's default header. */
215
+ editHeader: () => void;
216
+ /** Enter footer editing for the active section's default footer. */
217
+ editFooter: () => void;
218
+ /** Insert a PAGE field at the active caret (header, footer or body). */
219
+ insertPageNumber: () => void;
220
+ /** Return the caret to the main body, leaving header/footer editing. */
221
+ exit: () => void;
222
+ /** Whether the caret currently edits a header or footer zone. */
223
+ isInHeaderFooter: () => boolean;
224
+ }
213
225
  export interface EssentialsDesignCapability {
214
226
  applyTheme: (theme: DesignThemeId) => void;
215
227
  setColorScheme: (value: string) => void;
@@ -285,6 +297,7 @@ export interface EssentialsPluginDeps {
285
297
  browser: EssentialsBrowserCapability;
286
298
  paragraph: EssentialsParagraphCapability;
287
299
  section: EssentialsSectionCapability;
300
+ headerFooter: EssentialsHeaderFooterCapability;
288
301
  table: EssentialsTableCapability;
289
302
  design: EssentialsDesignCapability;
290
303
  }
@@ -0,0 +1,11 @@
1
+ import { OasisPlugin } from '../../../core/plugin.js';
2
+ import { ActionCommandBuilder, CommandBuilder } from '../essentialsCommandBuilders.js';
3
+ import { EssentialsFeatureGate, EssentialsHeaderFooterCapability } from '../essentialsCapabilities.js';
4
+ interface HeaderFooterGroupDeps {
5
+ gate: EssentialsFeatureGate;
6
+ headerFooter: EssentialsHeaderFooterCapability;
7
+ command: CommandBuilder;
8
+ actionCommand: ActionCommandBuilder;
9
+ }
10
+ export declare function buildHeaderFooterCommands({ gate, headerFooter, command, actionCommand, }: HeaderFooterGroupDeps): NonNullable<OasisPlugin["commands"]>;
11
+ export {};
@@ -0,0 +1,8 @@
1
+ import { EssentialsHeaderFooterCapability } from '../../../plugins/internal/essentialsCapabilities.js';
2
+ import { CreateEditorEssentialsPluginOptions } from './types.js';
3
+ /**
4
+ * Header/footer authoring capability: bridges the core header/footer story
5
+ * commands onto the editor's transactional state pipeline so edits enter the
6
+ * undo/redo history and are grouped like other document mutations.
7
+ */
8
+ export declare function buildEssentialsHeaderFooter(options: CreateEditorEssentialsPluginOptions): EssentialsHeaderFooterCapability;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.209",
3
+ "version": "0.0.211",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {