documint 0.0.16 → 0.0.17

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/dist/index.d.ts CHANGED
@@ -1,5 +1,16 @@
1
1
  import { LucideIcon } from 'lucide-react';
2
2
 
3
+ declare const ANCHOR_KINDS: readonly [
4
+ "text",
5
+ "code",
6
+ "tableCell"
7
+ ];
8
+ type AnchorKind = (typeof ANCHOR_KINDS)[number];
9
+ type TextAnchor = {
10
+ kind?: AnchorKind;
11
+ prefix?: string;
12
+ suffix?: string;
13
+ };
3
14
  export type CommentThread = {
4
15
  id: string;
5
16
  quote: string;
@@ -11,9 +22,20 @@ type Comment$1 = {
11
22
  body: string;
12
23
  updatedAt: string;
13
24
  };
25
+ type CommentThreadAnchor = {
26
+ threadId: string;
27
+ };
28
+ export type Anchor = TextAnchor | CommentThreadAnchor;
14
29
  type Document$1 = {
15
30
  blocks: Block[];
16
31
  comments: CommentThread[];
32
+ /**
33
+ * Markdown-only round-trip slot for the leading `---`-fenced front matter,
34
+ * preserved verbatim. Treat as opaque metadata: the document engine never
35
+ * reads it. Intentionally an unparsed string until there is a concrete
36
+ * reason to model YAML/TOML structurally — once we do, this becomes a
37
+ * `metadata: Record<string, unknown>` slot owned at the document layer.
38
+ */
17
39
  frontMatter?: string;
18
40
  };
19
41
  export type Block = ParagraphBlock | HeadingBlock | ListBlock | ListItemBlock | BlockquoteBlock | TableBlock | DividerBlock | CodeBlock | DirectiveBlock | RawBlock;
@@ -102,21 +124,6 @@ export type Raw = DocumentNode<"raw", {
102
124
  originalType: string;
103
125
  source: string;
104
126
  }>;
105
- declare const ANCHOR_KINDS: readonly [
106
- "text",
107
- "code",
108
- "tableCell"
109
- ];
110
- type AnchorKind = (typeof ANCHOR_KINDS)[number];
111
- type TextAnchor = {
112
- kind?: AnchorKind;
113
- prefix?: string;
114
- suffix?: string;
115
- };
116
- type CommentThreadAnchor = {
117
- threadId: string;
118
- };
119
- export type Anchor = TextAnchor | CommentThreadAnchor;
120
127
  export type DocumintStorage = {
121
128
  readFile(path: string): Promise<Blob | null>;
122
129
  writeFile(file: File): Promise<string>;
@@ -168,8 +175,8 @@ export type EditorTheme = {
168
175
  listMarkerText?: string;
169
176
  mentionBackground?: string;
170
177
  mentionText?: string;
171
- paddingX: number;
172
- paddingY: number;
178
+ paddingX?: number;
179
+ paddingY?: number;
173
180
  paragraphText: string;
174
181
  selectionBackground: string;
175
182
  selectionHandleBackground: string;