documint 0.0.6 → 0.0.8

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.
package/README.md CHANGED
@@ -8,12 +8,12 @@ A canvas-based, batteries-included markdown editor for React.
8
8
 
9
9
  - **Markdown in, markdown out** — Documents are parsed from markdown and serialized back to markdown. Full support for CommonMark, GFM tables, task lists, strikethrough, and fenced code blocks with language hints.
10
10
 
11
+ - **Rich semantic editing** — Context-sensitive behavior that adapts to what you're editing. Enter splits a paragraph but adds a new row in a table. Backspace at the start of a list item dedents it. Tab indents a list but inserts a column in a table. The editor understands the structure of your document, so every gesture does the right thing.
12
+
11
13
  - **Subtle, delightful animations** — A typing trail highlights newly inserted text. Deleted text fades out before disappearing. List markers pop into place. Punctuation pulses with a soft ring on keystroke. Small details that make editing feel fun.
12
14
 
13
15
  - **Mobile-native editing** — Responsive layout with full support for iOS and Android gestures: auto-capitalization, auto-correct, auto-scroll on keyboard appearance, shake-to-undo, and selection handles all work as expected.
14
16
 
15
- - **Rich semantic editing** — Context-sensitive behavior that adapts to what you're editing. Enter splits a paragraph but adds a new row in a table. Backspace at the start of a list item dedents it. Tab indents a list but inserts a column in a table. The editor understands the structure of your document, so every gesture does the right thing.
16
-
17
17
  - **Context-aware toolbars ("leaves")** — Floating toolbars that appear based on what you're interacting with: text formatting options on selection, link editing on links, column/row controls on tables, and block insertion (headings, lists, quotes, tables) on empty lines.
18
18
 
19
19
  - **Configurable themes and keybindings** — Ships with built-in light and dark themes, follows the system theme by default, and lets you customize every theme value or start from presets like mint, midnight, and sunrise. Keybindings are configurable too — remap formatting shortcuts, navigation, and list operations to match your users' expectations.
package/dist/index.d.ts CHANGED
@@ -56,7 +56,7 @@ type TableCell = {
56
56
  id: string;
57
57
  plainText: string;
58
58
  };
59
- type DividerBlock = BlockNode<"thematicBreak">;
59
+ type DividerBlock = BlockNode<"divider">;
60
60
  type CodeBlock = BlockNode<"code", {
61
61
  language: string | null;
62
62
  meta: string | null;
@@ -67,7 +67,7 @@ export type DirectiveBlock = BlockNode<"directive", {
67
67
  body: string;
68
68
  name: string;
69
69
  }>;
70
- export type RawBlock = BlockNode<"unsupported", {
70
+ export type RawBlock = BlockNode<"raw", {
71
71
  originalType: string;
72
72
  source: string;
73
73
  }>;
@@ -87,11 +87,11 @@ type Image$1 = DocumentNode<"image", {
87
87
  url: string;
88
88
  width: number | null;
89
89
  }>;
90
- type LineBreak = DocumentNode<"break">;
91
- type Code = DocumentNode<"inlineCode", {
90
+ type LineBreak = DocumentNode<"lineBreak">;
91
+ type Code = DocumentNode<"code", {
92
92
  code: string;
93
93
  }>;
94
- export type Raw = DocumentNode<"unsupported", {
94
+ export type Raw = DocumentNode<"raw", {
95
95
  originalType: string;
96
96
  source: string;
97
97
  }>;
@@ -110,7 +110,7 @@ export type DocumintStorage = {
110
110
  readFile(path: string): Promise<Blob | null>;
111
111
  writeFile(file: File): Promise<string>;
112
112
  };
113
- type EditorCommand = "dedent" | "deleteBackward" | "indent" | "insertLineBreak" | "moveListItemDown" | "moveListItemUp" | "moveToDocumentEnd" | "moveToDocumentStart" | "moveToLineEnd" | "moveToLineStart" | "redo" | "selectAll" | "toggleBold" | "toggleCode" | "toggleItalic" | "toggleStrikethrough" | "toggleUnderline" | "undo";
113
+ type EditorCommand = "dedent" | "deleteBackward" | "indent" | "insertLineBreak" | "insertSoftLineBreak" | "moveListItemDown" | "moveListItemUp" | "moveToDocumentEnd" | "moveToDocumentStart" | "moveToLineEnd" | "moveToLineStart" | "redo" | "selectAll" | "toggleBold" | "toggleCode" | "toggleItalic" | "toggleStrikethrough" | "toggleUnderline" | "undo";
114
114
  export type EditorTheme = {
115
115
  activeBlockBackground: string;
116
116
  activeBlockFlash: string;
@@ -130,6 +130,7 @@ export type EditorTheme = {
130
130
  commentHighlightActive: string;
131
131
  commentHighlightResolved: string;
132
132
  commentHighlightResolvedActive: string;
133
+ dividerRule?: string;
133
134
  headingRule: string;
134
135
  headingText: string;
135
136
  imageLoadingOverlay: string;