@intinyagroup/rich-text 0.1.1-alpha.8 → 0.1.2

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.
@@ -2,11 +2,21 @@ type $$ComponentProps = {
2
2
  content?: string;
3
3
  placeholder?: string;
4
4
  editable?: boolean;
5
+ /** Toolbar mode: 'classic' (fixed top toolbar), 'bubble' (Notion-style floating toolbar only), or 'none' */
6
+ mode?: "classic" | "bubble" | "none";
5
7
  height?: number;
6
8
  class?: string;
7
9
  onUpdate?: (html: string) => void;
8
10
  /** Called when paste/drop provides an image file. Return a URL to insert. */
9
11
  onImageUpload?: (file: File) => Promise<string>;
12
+ onOpenSubPage?: (page: {
13
+ id: string;
14
+ title: string;
15
+ }) => void;
16
+ /** Called by HTML export action with current document HTML. */
17
+ onExportHtml?: (html: string) => void;
18
+ /** Called by Markdown export action with best-effort CommonMark output. */
19
+ onExportMarkdown?: (markdown: string) => void;
10
20
  };
11
21
  declare const RichTextEditor: import("svelte").Component<$$ComponentProps, {}, "">;
12
22
  type RichTextEditor = ReturnType<typeof RichTextEditor>;
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@intinyagroup/rich-text",
3
- "version": "0.1.1-alpha.8",
3
+ "version": "0.1.2",
4
4
  "description": "Rich text editor component powered by TipTap",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./dist/index.d.ts",
9
- "svelte": "./dist/index.js"
9
+ "svelte": "./dist/index.js",
10
+ "import": "./dist/index.js",
11
+ "default": "./dist/index.js"
10
12
  }
11
13
  },
12
14
  "files": [
@@ -19,23 +21,34 @@
19
21
  "dev": "svelte-package -o dist -w"
20
22
  },
21
23
  "dependencies": {
22
- "@intinyagroup/ui": "0.1.1-alpha.8",
23
- "@intinyagroup/grid-core": "0.1.1-alpha.8",
24
- "@tiptap/core": "^3.22.5",
25
- "@tiptap/starter-kit": "^3.22.5",
26
- "@tiptap/extension-placeholder": "^3.22.5",
27
- "@tiptap/extension-underline": "^3.22.5",
28
- "@tiptap/extension-text-align": "^3.22.5",
29
- "@tiptap/extension-link": "^3.22.5",
30
- "@tiptap/extension-image": "^3.22.5",
31
- "@tiptap/extension-code-block-lowlight": "^3.22.5",
32
- "@tiptap/pm": "^3.22.5"
24
+ "@intinyagroup/grid-core": "0.2.1",
25
+ "@intinyagroup/ui": "0.2.7",
26
+ "@tiptap/core": "^3.31.3",
27
+ "@tiptap/extension-bubble-menu": "^3.31.3",
28
+ "@tiptap/extension-code-block-lowlight": "^3.31.3",
29
+ "@tiptap/extension-highlight": "^3.31.3",
30
+ "@tiptap/extension-image": "^3.31.3",
31
+ "@tiptap/extension-link": "^3.31.3",
32
+ "@tiptap/extension-placeholder": "^3.31.3",
33
+ "@tiptap/extension-table": "^3.31.3",
34
+ "@tiptap/extension-table-cell": "^3.31.3",
35
+ "@tiptap/extension-table-header": "^3.31.3",
36
+ "@tiptap/extension-table-row": "^3.31.3",
37
+ "@tiptap/extension-task-item": "^3.31.3",
38
+ "@tiptap/extension-task-list": "^3.31.3",
39
+ "@tiptap/extension-text-align": "^3.31.3",
40
+ "@tiptap/extension-typography": "^3.31.3",
41
+ "@tiptap/extension-underline": "^3.31.3",
42
+ "@tiptap/pm": "^3.31.3",
43
+ "@tiptap/starter-kit": "^3.31.3",
44
+ "lowlight": "^3.3.0",
45
+ "lucide-svelte": "^1.0.1"
33
46
  },
34
47
  "devDependencies": {
35
48
  "@sveltejs/package": "^2.5.8",
49
+ "@sveltejs/vite-plugin-svelte": "^5.1.1",
36
50
  "svelte": "^5.55.2",
37
- "typescript": "^6.0.2",
38
- "@sveltejs/vite-plugin-svelte": "^5.1.1"
51
+ "typescript": "^6.0.2"
39
52
  },
40
53
  "peerDependencies": {
41
54
  "svelte": "^5.0.0"