oasis-editor 0.0.136 → 0.0.138

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.
Files changed (32) hide show
  1. package/dist/{OasisEditorApp-DPrjPRTW.js → OasisEditorApp-DMI2ZfOd.js} +561 -115
  2. package/dist/app/controllers/animationFrame.d.ts +2 -0
  3. package/dist/app/controllers/tableResize/tableResizeDom.d.ts +3 -3
  4. package/dist/app/controllers/tableResize/tableResizeHitTest.d.ts +1 -1
  5. package/dist/app/controllers/tableResize/tableResizeTypes.d.ts +1 -0
  6. package/dist/app/controllers/useEditorTableCornerResize.d.ts +1 -0
  7. package/dist/app/controllers/useEditorTableDrag.d.ts +2 -0
  8. package/dist/assets/{importDocxWorker-B0cSSI12.js → importDocxWorker-DBjcGf-C.js} +1 -1
  9. package/dist/core/commands/table/tableCellStyleCommands.d.ts +3 -0
  10. package/dist/core/commands/table/tableRowCommands.d.ts +1 -0
  11. package/dist/core/editorState/defaultStyles.d.ts +1 -0
  12. package/dist/core/model/index.d.ts +1 -1
  13. package/dist/core/model/types/nodes.d.ts +123 -5
  14. package/dist/export/docx/text/sdtXml.d.ts +10 -0
  15. package/dist/i18n/locales/en.d.ts +4 -0
  16. package/dist/i18n/locales/pt-BR.d.ts +4 -0
  17. package/dist/import/docx/contentControls.d.ts +9 -0
  18. package/dist/import/docx/tableProperties.d.ts +1 -14
  19. package/dist/{index-Cbwb1bgI.js → index-M7h7REmM.js} +691 -488
  20. package/dist/oasis-editor.css +1 -1
  21. package/dist/oasis-editor.js +49 -49
  22. package/dist/oasis-editor.umd.cjs +4 -4
  23. package/dist/ui/OasisEditorEditorProps.d.ts +0 -1
  24. package/dist/ui/app/EditorWorkspace.d.ts +0 -1
  25. package/dist/ui/app/createEditorInteractionRuntime.d.ts +1 -0
  26. package/dist/ui/components/Toolbar/presets/builtinToolbarIds.d.ts +0 -1
  27. package/dist/ui/components/Toolbar/presets/defaultToolbar/buttonSpecs.d.ts +1 -0
  28. package/dist/ui/components/Toolbar/primitives/useSurfaceRect.d.ts +2 -2
  29. package/dist/ui/editorHistory.d.ts +2 -0
  30. package/dist/ui/shells/DocumentShell.d.ts +1 -2
  31. package/package.json +1 -1
  32. package/dist/ui/components/FloatingToolbar/FloatingTableToolbar.d.ts +0 -11
@@ -36,7 +36,6 @@ export interface OasisEditorEditorOverlayProps {
36
36
  imageCropMode?: Accessor<boolean>;
37
37
  toolbarHost?: () => ToolbarHost;
38
38
  persistenceStatus?: () => string;
39
- showFloatingTableToolbar?: Accessor<boolean>;
40
39
  layoutOptions?: LayoutOptionsOverlay;
41
40
  }
42
41
  export interface OasisEditorEditorRefProps {
@@ -16,7 +16,6 @@ export interface EditorWorkspaceRuntime {
16
16
  persistenceStatus: () => string;
17
17
  toolbarRegistry: ToolbarRegistry;
18
18
  menuRegistry: MenuRegistry;
19
- showFloatingTableToolbar: Accessor<boolean>;
20
19
  }
21
20
  /** Chrome visibility / toolbar-mode flags. */
22
21
  export interface EditorWorkspaceChrome {
@@ -159,6 +159,7 @@ declare function createEditorInteractionRuntimeImpl(deps: EditorInteractionRunti
159
159
  }>;
160
160
  dropTargetPos: import('solid-js').Accessor<EditorPosition | null>;
161
161
  handleMouseDown: (tableId: string, event: MouseEvent) => void;
162
+ stop: () => void;
162
163
  };
163
164
  revisionController: {
164
165
  hoveredRevision: import('solid-js').Accessor<import('../editorUiTypes.js').RevisionBox | null>;
@@ -1,5 +1,4 @@
1
1
  export declare const OASIS_TOOLBAR_ITEMS: {
2
- readonly fileDropdown: "editor-toolbar-file-dropdown";
3
2
  readonly exportDocx: "editor-toolbar-export-docx";
4
3
  readonly exportPdf: "editor-toolbar-export-pdf";
5
4
  readonly importDocument: "editor-toolbar-import-document";
@@ -17,6 +17,7 @@ export declare const TABLE_LAYOUT_BUTTONS: Array<{
17
17
  id: string;
18
18
  command: string;
19
19
  icon: string;
20
+ labelKey: TranslationKey;
20
21
  tooltipKey: TranslationKey;
21
22
  ribbonSize?: "large";
22
23
  }>;
@@ -10,11 +10,11 @@ export interface SurfaceRectApi {
10
10
  }
11
11
  /**
12
12
  * Tracks the bounding rect of a scroll/resize-affected surface element so that
13
- * surface-relative overlays (floating table toolbar, layout-options anchor) can
13
+ * surface-relative overlays (such as the layout-options anchor) can
14
14
  * position themselves in viewport space.
15
15
  *
16
16
  * Consolidates the identical `surfaceRect` + rAF `scheduleRefresh` +
17
17
  * scroll(capture)/resize listener block that used to be copy-pasted across
18
- * `FloatingTableToolbar` and `FloatingLayoutOptions`.
18
+ * `FloatingLayoutOptions`.
19
19
  */
20
20
  export declare function useSurfaceRect(surfaceRef: () => HTMLElement | undefined): SurfaceRectApi;
@@ -13,6 +13,8 @@ export interface EditorHistoryState {
13
13
  redoStack: EditorState[];
14
14
  lastTransactionMeta: EditorTransactionMeta | null;
15
15
  }
16
+ export declare const MAX_EDITOR_HISTORY_ENTRIES = 250;
17
+ export declare function appendEditorHistoryEntry(stack: EditorState[], state: EditorState): EditorState[];
16
18
  export declare function createEmptyEditorHistoryState(): EditorHistoryState;
17
19
  export declare function applyEditorHistoryTransaction(history: EditorHistoryState, previous: EditorState, next: EditorState, options?: EditorTransactionOptions, now?: number): EditorHistoryState;
18
20
  export declare function resetEditorHistoryGrouping(history: EditorHistoryState): EditorHistoryState;
@@ -26,9 +26,8 @@ export interface ShellProps {
26
26
  measuredParagraphLayouts: Accessor<Record<string, EditorLayoutParagraph>>;
27
27
  documentLayout: Accessor<EditorLayoutDocument>;
28
28
  viewportHeight: Accessor<number | string | undefined>;
29
- showFloatingTableToolbar: Accessor<boolean>;
30
29
  layout: Omit<OasisEditorEditorLayoutProps, "documentLayout" | "measuredBlockHeights" | "measuredParagraphLayouts" | "viewportHeight" | "readOnly">;
31
- overlays: Omit<OasisEditorEditorOverlayProps, "toolbarHost" | "persistenceStatus" | "showFloatingTableToolbar">;
30
+ overlays: Omit<OasisEditorEditorOverlayProps, "toolbarHost" | "persistenceStatus">;
32
31
  refs: OasisEditorEditorRefProps;
33
32
  surfaceHandlers: OasisEditorEditorSurfaceHandlers;
34
33
  inputHandlers: OasisEditorEditorInputHandlers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.136",
3
+ "version": "0.0.138",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,11 +0,0 @@
1
- import { Accessor, JSX } from 'solid-js';
2
- import { SelectionBox } from '../../editorUiTypes.js';
3
- import { ToolbarHost } from '../Toolbar/state/createToolbarApi.js';
4
-
5
- export interface FloatingTableToolbarProps {
6
- host: () => ToolbarHost;
7
- selectionBoxes: Accessor<SelectionBox[]>;
8
- visible: Accessor<boolean>;
9
- surfaceRef: () => HTMLElement | undefined;
10
- }
11
- export declare function FloatingTableToolbar(props: FloatingTableToolbarProps): JSX.Element;