@fileverse-dev/ddoc 3.1.4 → 3.1.6-patch-001

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 (60) hide show
  1. package/dist/index.es.js +38278 -37713
  2. package/dist/package/components/editor-toolbar.d.ts +1 -2
  3. package/dist/package/components/editor-utils.d.ts +1 -2
  4. package/dist/package/components/inline-comment/comment-card.d.ts +1 -1
  5. package/dist/package/components/inline-comment/comment-drawer.d.ts +1 -1
  6. package/dist/package/components/inline-comment/comment-dropdown.d.ts +1 -1
  7. package/dist/package/components/inline-comment/comment-floating-container.d.ts +1 -0
  8. package/dist/package/components/inline-comment/comment-floating-layout.d.ts +31 -0
  9. package/dist/package/components/inline-comment/comment-input-field.d.ts +3 -0
  10. package/dist/package/components/inline-comment/comment-reply-input.d.ts +7 -0
  11. package/dist/package/components/inline-comment/comment-section.d.ts +1 -1
  12. package/dist/package/components/inline-comment/comment-username.d.ts +1 -1
  13. package/dist/package/components/inline-comment/constants.d.ts +1 -0
  14. package/dist/package/components/inline-comment/context/types.d.ts +46 -89
  15. package/dist/package/components/inline-comment/delete-confirm-overlay.d.ts +10 -0
  16. package/dist/package/components/inline-comment/empty-comments.d.ts +4 -1
  17. package/dist/package/components/inline-comment/floating-comment/comment-floating-container.d.ts +3 -0
  18. package/dist/package/components/inline-comment/floating-comment/draft-floating-card.d.ts +3 -0
  19. package/dist/package/components/inline-comment/floating-comment/floating-auth-prompt.d.ts +1 -0
  20. package/dist/package/components/inline-comment/floating-comment/floating-card-shell.d.ts +3 -0
  21. package/dist/package/components/inline-comment/floating-comment/index.d.ts +1 -0
  22. package/dist/package/components/inline-comment/floating-comment/thread-floating-card.d.ts +3 -0
  23. package/dist/package/components/inline-comment/floating-comment/types.d.ts +32 -0
  24. package/dist/package/components/inline-comment/floating-comment-layout-utils.d.ts +78 -0
  25. package/dist/package/components/inline-comment/resize-inline-comment-textarea.d.ts +1 -0
  26. package/dist/package/components/inline-comment/types.d.ts +22 -0
  27. package/dist/package/components/inline-comment/use-anchor-registry.d.ts +34 -0
  28. package/dist/package/components/inline-comment/use-comment-card.d.ts +29 -0
  29. package/dist/package/components/inline-comment/use-comment-list-container.d.ts +17 -0
  30. package/dist/package/components/inline-comment/use-ens-status.d.ts +3 -0
  31. package/dist/package/components/inline-comment/use-floating-card-state.d.ts +36 -0
  32. package/dist/package/components/inline-comment/use-floating-comment-card-layout.d.ts +23 -0
  33. package/dist/package/components/inline-comment/use-floating-comment-card-state.d.ts +13 -0
  34. package/dist/package/components/inline-comment/use-floating-layout-engine.d.ts +26 -0
  35. package/dist/package/components/presentation-mode/presentation-mode.d.ts +2 -2
  36. package/dist/package/components/presentation-mode/preview-panel.d.ts +2 -2
  37. package/dist/package/components/preview-export-trigger.d.ts +1 -2
  38. package/dist/package/components/tabs/document-tabs-sidebar.d.ts +2 -1
  39. package/dist/package/context/editor-context.d.ts +3 -3
  40. package/dist/package/extensions/comment/comment-decoration-plugin.d.ts +67 -0
  41. package/dist/package/extensions/comment/comment.d.ts +27 -0
  42. package/dist/package/extensions/default-extension.d.ts +1 -1
  43. package/dist/package/hooks/use-ddoc-export.d.ts +1 -1
  44. package/dist/package/hooks/use-export-headless-editor-content.d.ts +1 -1
  45. package/dist/package/hooks/use-tab-editor.d.ts +5 -3
  46. package/dist/package/hooks/use-tab-manager.d.ts +1 -2
  47. package/dist/package/stores/comment-store-provider.d.ts +50 -0
  48. package/dist/package/stores/comment-store.d.ts +185 -0
  49. package/dist/package/sync-local/SyncManager.d.ts +0 -12
  50. package/dist/package/sync-local/types/index.d.ts +0 -4
  51. package/dist/package/types.d.ts +17 -7
  52. package/dist/package/use-ddoc-editor.d.ts +1 -0
  53. package/dist/package/utils/colors.d.ts +1 -3
  54. package/dist/package/utils/document-styling.d.ts +3 -3
  55. package/dist/style.css +1 -1
  56. package/package.json +2 -2
  57. package/dist/package/components/inline-comment/context/comment-context.d.ts +0 -4
  58. package/dist/package/extensions/custom-link/index.d.ts +0 -19
  59. package/dist/package/extensions/odt-export/index.d.ts +0 -30
  60. package/dist/package/utils/heading-link.d.ts +0 -23
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "3.1.4",
5
+ "version": "3.1.6-patch-001",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -121,7 +121,7 @@
121
121
  "@dnd-kit/sortable": ">=10.0.0",
122
122
  "@dnd-kit/utilities": ">=3.2.2",
123
123
  "@fileverse/crypto": ">=0.0.21",
124
- "@fileverse/ui": ">=5.1.0",
124
+ "@fileverse/ui": ">=5.1.1",
125
125
  "framer-motion": ">=11.2.10",
126
126
  "frimousse": ">=0.3.0",
127
127
  "viem": ">=2.13.8"
@@ -1,4 +0,0 @@
1
- import { CommentContextType, CommentProviderProps } from './types';
2
-
3
- export declare const CommentProvider: ({ children, editor, ydoc, initialComments, setInitialComments, username, setUsername, activeCommentId, setActiveCommentId, activeTabId, focusCommentWithActiveId, onNewComment, onCommentReply, ensResolutionUrl, onResolveComment, onUnresolveComment, onDeleteComment, isConnected, connectViaWallet, isLoading, connectViaUsername, isDDocOwner, onInlineComment, onComment, setCommentDrawerOpen, }: CommentProviderProps) => import("react/jsx-runtime").JSX.Element;
4
- export declare const useComments: () => CommentContextType;
@@ -1,19 +0,0 @@
1
- import { LinkOptions } from '@tiptap/extension-link';
2
-
3
- export interface CustomLinkOptions extends LinkOptions {
4
- /**
5
- * Called when the user pastes a heading link URL whose target
6
- * heading does not exist in the current document — i.e. the link
7
- * belongs to a different dDoc.
8
- */
9
- onForeignHeadingLink?: (message: string) => void;
10
- }
11
- /**
12
- * Extends tiptap's Link with a paste-time hook that detects
13
- * heading links pointing at headings from other dDocs and dispatches
14
- * a warning. A dedicated ProseMirror `handlePaste` is used (instead
15
- * of piggybacking on `shouldAutoLink`) because `shouldAutoLink` is
16
- * also called by the autolink plugin on every transaction — which
17
- * would re-fire the warning on unrelated keystrokes like Enter.
18
- */
19
- export declare const CustomLink: import('@tiptap/core').Mark<CustomLinkOptions, any>;
@@ -1,30 +0,0 @@
1
- import { Extension } from '@tiptap/core';
2
- import { IpfsImageFetchPayload } from '../../types';
3
-
4
- declare module '@tiptap/core' {
5
- interface Commands {
6
- exportOdtFile: {
7
- exportOdtFile: (props?: {
8
- title?: string;
9
- }) => any;
10
- };
11
- }
12
- }
13
- /**
14
- * Preprocess TipTap HTML for odf-kit compatibility:
15
- * - Convert task lists to standard lists with checkbox text prefixes
16
- * - Replace <img> tags with warning text (odf-kit v1 skips images)
17
- * - Convert callouts (<aside>) to blockquotes
18
- * - Convert Twitter embeds to links
19
- * - Convert iframes (YouTube, SoundCloud, etc.) to links
20
- * - Strip TipTap-specific data attributes
21
- * - Convert void elements to self-closing XHTML for the XML parser
22
- */
23
- export declare function preprocessHtml(html: string): {
24
- html: string;
25
- };
26
- declare const OdtExportExtension: (ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
27
- url: string;
28
- file: File;
29
- }>, fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>) => Extension<any, any>;
30
- export default OdtExportExtension;
@@ -1,23 +0,0 @@
1
- /**
2
- * Heading links have the form `<origin>/<path>#heading=<slug>-<uuid8>`.
3
- * They're created by the copy-heading-link button in the TOC and the
4
- * block handle menu. Consumers of a dDoc paste these URLs expecting
5
- * same-page scroll behavior; but the same URL shape is also used for
6
- * cross-document heading links, which we need to detect and warn about.
7
- */
8
- export interface ParsedHeadingLink {
9
- /** The raw `heading` hash param value (e.g. `my-heading-a1b2c3d4`). */
10
- headingParam: string;
11
- /** The short id suffix used to locate the heading in the DOM. */
12
- id: string;
13
- /** The heading element in the current document, if present. */
14
- headingEl: HTMLHeadingElement | undefined;
15
- }
16
- /**
17
- * Parses a URL and, if it's a heading link pointing at the current origin,
18
- * returns the heading param, id, and the matching DOM element (if any).
19
- *
20
- * Returns `null` when the URL is not parseable, is cross-origin, has no
21
- * hash, or does not carry a `heading=` param.
22
- */
23
- export declare const parseHeadingLink: (rawUrl: string) => ParsedHeadingLink | null;