@fileverse-dev/ddoc 6.0.0-drop-in.3 → 6.0.1-dist-slim.0

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 (51) hide show
  1. package/README.md +18 -89
  2. package/dist/data-BCRDUrcS.mjs +59842 -0
  3. package/dist/ddoc-persistence-DLdSviUr.mjs +371 -0
  4. package/dist/headless-editor-utils.es.js +1 -1
  5. package/dist/index--ObnXdbg.mjs +14053 -0
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.es.js +10734 -21551
  8. package/dist/markdown-source-pane-BJbpMXo2.mjs +143 -0
  9. package/dist/package/components/editor-toolbar.d.ts +1 -2
  10. package/dist/package/components/fullscreen-toolbar.d.ts +2 -2
  11. package/dist/package/components/mobile-toolbar.d.ts +1 -2
  12. package/dist/package/components/tabs/document-mobile-tab-panel.d.ts +1 -3
  13. package/dist/package/components/tabs/document-tabs-sidebar.d.ts +1 -2
  14. package/dist/package/components/toc/document-outline.d.ts +1 -1
  15. package/dist/package/components/toc/toc.d.ts +1 -1
  16. package/dist/package/components/toc/types.d.ts +0 -7
  17. package/dist/package/extensions/emoji/components/emoji-utils.d.ts +2 -2
  18. package/dist/package/hooks/use-export-headless-editor-content.d.ts +6 -2
  19. package/dist/package/hooks/use-focus-mode.d.ts +3 -1
  20. package/dist/package/hooks/use-headless-editor.d.ts +12 -4
  21. package/dist/package/hooks/use-tab-editor.d.ts +1 -4
  22. package/dist/package/hooks/use-tab-manager.d.ts +3 -1
  23. package/dist/package/hooks/use-yjs-setup.d.ts +7 -1
  24. package/dist/package/persistence/compaction.d.ts +27 -0
  25. package/dist/package/persistence/content-fingerprint.d.ts +27 -0
  26. package/dist/package/persistence/ddoc-persistence.d.ts +96 -0
  27. package/dist/package/persistence/index.d.ts +2 -0
  28. package/dist/package/persistence/provider-lifecycle.d.ts +37 -0
  29. package/dist/package/sync-local/SyncManager.d.ts +8 -1
  30. package/dist/package/sync-local/types/index.d.ts +2 -0
  31. package/dist/package/types.d.ts +25 -43
  32. package/dist/package/use-ddoc-editor.d.ts +1 -3
  33. package/dist/package/utils/responsive.d.ts +1 -3
  34. package/dist/persistence.d.ts +1 -0
  35. package/dist/persistence.es.js +10 -0
  36. package/dist/{split-view-toolbar-NTimkQK1.mjs → split-view-toolbar-6aBSjsO2.mjs} +47 -46
  37. package/dist/style.css +1 -1
  38. package/dist/tab-utils-BNFvrUAj.mjs +284 -0
  39. package/dist/use-headless-editor-fZCM6BjV.mjs +43828 -0
  40. package/package.json +11 -4
  41. package/tailwind.preset.cjs +0 -42
  42. package/dist/index-eP_xxZsk.mjs +0 -13126
  43. package/dist/markdown-source-pane-D-8OmL1r.mjs +0 -6069
  44. package/dist/package/components/editor-navbar.d.ts +0 -12
  45. package/dist/package/hooks/use-canvas-metrics.d.ts +0 -16
  46. package/dist/package/hooks/use-controllable-state.d.ts +0 -3
  47. package/dist/package/hooks/use-editor-media-query.d.ts +0 -4
  48. package/dist/package/utils/container-query-support.d.ts +0 -1
  49. package/dist/package/utils/editor-width-store.d.ts +0 -6
  50. package/dist/package/utils/stats-publisher.d.ts +0 -8
  51. package/dist/use-headless-editor-KdKS6vWp.mjs +0 -162186
@@ -1,12 +0,0 @@
1
- import { Editor } from '@tiptap/react';
2
- import { DdocProps } from '../types';
3
-
4
- type EditorNavbarProps = {
5
- editor: Editor | null;
6
- renderNavbar?: DdocProps['renderNavbar'];
7
- /** undefined: in flow. null: host element not attached yet, render nothing. */
8
- container?: HTMLElement | null;
9
- isHidden: boolean;
10
- };
11
- export declare const EditorNavbar: ({ editor, renderNavbar, container, isHidden, }: EditorNavbarProps) => import("react/jsx-runtime").JSX.Element | null;
12
- export {};
@@ -1,16 +0,0 @@
1
- import { RefObject } from 'react';
2
- import { EditorWidthStore } from '../utils/editor-width-store';
3
-
4
- export declare const computeWidthDecisions: (width: number, scaledWidth: number, leftWidth: number) => {
5
- shouldHideRight: boolean;
6
- shouldScroll: boolean;
7
- };
8
- type WidthDecisions = ReturnType<typeof computeWidthDecisions>;
9
- export declare const useCanvasMetrics: ({ canvasRef, rootRef, scaledWidth, leftWidth, widthStore, }: {
10
- canvasRef: RefObject<HTMLElement | null>;
11
- rootRef: RefObject<HTMLElement | null>;
12
- scaledWidth: number;
13
- leftWidth: number;
14
- widthStore?: EditorWidthStore;
15
- }) => WidthDecisions;
16
- export {};
@@ -1,3 +0,0 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
-
3
- export declare const useControllableState: <T>(value: T | undefined, defaultValue: T, onChange?: (next: T) => void, legacySetter?: (next: T) => void) => [T, Dispatch<SetStateAction<T>>];
@@ -1,4 +0,0 @@
1
- import { EditorWidthStore } from '../utils/editor-width-store';
2
-
3
- export declare const EditorWidthContext: import('react').Context<EditorWidthStore | null>;
4
- export declare const useEditorMediaQuery: (query: string, store?: EditorWidthStore) => boolean;
@@ -1 +0,0 @@
1
- export declare const canUseEditorContainerQueries: () => boolean;
@@ -1,6 +0,0 @@
1
- export type EditorWidthStore = {
2
- get(): number | null;
3
- set(width: number): void;
4
- subscribe(listener: () => void): () => void;
5
- };
6
- export declare const createEditorWidthStore: () => EditorWidthStore;
@@ -1,8 +0,0 @@
1
- import { DdocStats } from '../types';
2
-
3
- export declare const createStatsPublisher: (emit: (stats: DdocStats) => void) => {
4
- beginTab(pages: number | null): void;
5
- publish(patch: Partial<DdocStats>, options?: {
6
- tick?: boolean;
7
- }): void;
8
- };