@seed-hypermedia/client 0.0.3 → 0.0.5
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/blocks-to-markdown.d.ts +27 -0
- package/dist/{chunk-X57BIZUK.mjs → chunk-B5WCMFR5.mjs} +23 -2
- package/dist/comment.d.ts +13 -0
- package/dist/editor-types.d.ts +157 -0
- package/dist/editorblock-to-hmblock.d.ts +12 -0
- package/dist/hm-types.d.ts +1062 -0
- package/dist/hm-types.mjs +7 -1
- package/dist/hmblock-to-editorblock.d.ts +23 -0
- package/dist/index.d.ts +9 -4
- package/dist/index.mjs +717 -1
- package/dist/markdown-to-blocks.d.ts +10 -1
- package/dist/unicode.d.ts +35 -0
- package/package.json +1 -1
- package/src/index.ts +43 -4
package/dist/hm-types.mjs
CHANGED
|
@@ -74,6 +74,9 @@ import {
|
|
|
74
74
|
HMListCitationsInputSchema,
|
|
75
75
|
HMListCitationsOutputSchema,
|
|
76
76
|
HMListCitationsRequestSchema,
|
|
77
|
+
HMListCommentVersionsInputSchema,
|
|
78
|
+
HMListCommentVersionsOutputSchema,
|
|
79
|
+
HMListCommentVersionsRequestSchema,
|
|
77
80
|
HMListCommentsByAuthorInputSchema,
|
|
78
81
|
HMListCommentsByAuthorOutputSchema,
|
|
79
82
|
HMListCommentsByAuthorRequestSchema,
|
|
@@ -156,7 +159,7 @@ import {
|
|
|
156
159
|
toNumber,
|
|
157
160
|
unpackHmId,
|
|
158
161
|
unpackedHmIdSchema
|
|
159
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-B5WCMFR5.mjs";
|
|
160
163
|
export {
|
|
161
164
|
BlockRangeSchema,
|
|
162
165
|
BoldAnnotationSchema,
|
|
@@ -233,6 +236,9 @@ export {
|
|
|
233
236
|
HMListCitationsInputSchema,
|
|
234
237
|
HMListCitationsOutputSchema,
|
|
235
238
|
HMListCitationsRequestSchema,
|
|
239
|
+
HMListCommentVersionsInputSchema,
|
|
240
|
+
HMListCommentVersionsOutputSchema,
|
|
241
|
+
HMListCommentVersionsRequestSchema,
|
|
236
242
|
HMListCommentsByAuthorInputSchema,
|
|
237
243
|
HMListCommentsByAuthorOutputSchema,
|
|
238
244
|
HMListCommentsByAuthorRequestSchema,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EditorBlock } from './editor-types';
|
|
2
|
+
import { HMBlock, HMBlockChildrenType, HMBlockNode } from './hm-types';
|
|
3
|
+
import type { SpanAnnotation } from './unicode';
|
|
4
|
+
type ServerToEditorRecursiveOpts = {
|
|
5
|
+
level?: number;
|
|
6
|
+
};
|
|
7
|
+
/** Convert an array of HMBlockNode trees into BlockNote EditorBlock arrays. */
|
|
8
|
+
export declare function hmBlocksToEditorContent(blocks: HMBlockNode[], opts?: ServerToEditorRecursiveOpts & {
|
|
9
|
+
childrenType?: HMBlockChildrenType;
|
|
10
|
+
listLevel?: string;
|
|
11
|
+
start?: string;
|
|
12
|
+
}): Array<EditorBlock>;
|
|
13
|
+
/** Convert a single HMBlock into a BlockNote EditorBlock. */
|
|
14
|
+
export declare function hmBlockToEditorBlock(block: HMBlock): EditorBlock;
|
|
15
|
+
/**
|
|
16
|
+
* Checks if a position expressed in code points is within any span
|
|
17
|
+
* of this annotation.
|
|
18
|
+
*
|
|
19
|
+
* Assumes starts and ends arrays are sorted (binary search).
|
|
20
|
+
* Returns the index of the matching span, or -1.
|
|
21
|
+
*/
|
|
22
|
+
export declare function annotationContains(annotation: SpanAnnotation, pos: number): number;
|
|
23
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export { createChange, createChangeOps, createDocumentChange, createDocumentChan
|
|
|
4
4
|
export type { CreateChangeOpsInput, CreateDocumentChangeFromOpsInput, CreateDocumentChangeInput, DocumentOperation, SignDocumentChangeInput, } from './change';
|
|
5
5
|
export { createSeedClient } from './client';
|
|
6
6
|
export type { PublishDocumentInput, SeedClient, SeedClientOptions } from './client';
|
|
7
|
-
export { commentRecordIdFromBlob, createComment, deleteComment } from './comment';
|
|
8
|
-
export type { CommentAttachmentBlob, CreateCommentInput, DeleteCommentInput } from './comment';
|
|
7
|
+
export { commentRecordIdFromBlob, createComment, deleteComment, updateComment } from './comment';
|
|
8
|
+
export type { CommentAttachmentBlob, CreateCommentInput, DeleteCommentInput, UpdateCommentInput } from './comment';
|
|
9
9
|
export { contactRecordIdFromBlob, createContact, deleteContact, updateContact } from './contact';
|
|
10
10
|
export type { CreateContactInput, CreateContactResult, DeleteContactInput, UpdateContactInput } from './contact';
|
|
11
11
|
export { SeedClientError, SeedNetworkError, SeedValidationError } from './errors';
|
|
@@ -24,9 +24,9 @@ export { codePointLength, entityQueryPathToHmIdPath, getHMQueryString, hmIdPathT
|
|
|
24
24
|
export type { HMRequest, HMSigner, UnpackedHypermediaId } from './hm-types';
|
|
25
25
|
export { fileToIpfsBlobs, filesToIpfsBlobs, resolveFileLinksInBlocks, hasFileLinks } from './file-to-ipfs';
|
|
26
26
|
export type { CollectedBlob } from './file-to-ipfs';
|
|
27
|
-
export { parseMarkdown, flattenToOperations, parseInlineFormatting, parseFrontmatter } from './markdown-to-blocks';
|
|
27
|
+
export { parseMarkdown, flattenToOperations, parseInlineFormatting, parseFrontmatter, markdownBlockNodesToHMBlockNodes, } from './markdown-to-blocks';
|
|
28
28
|
export type { BlockNode, SeedBlock, Annotation } from './markdown-to-blocks';
|
|
29
|
-
export { blocksToMarkdown, emitFrontmatter } from './blocks-to-markdown';
|
|
29
|
+
export { blocksToMarkdown, emitFrontmatter, slugify, draftFilename, parseDraftFilename } from './blocks-to-markdown';
|
|
30
30
|
export type { BlocksToMarkdownOptions } from './blocks-to-markdown';
|
|
31
31
|
export { createBlocksMap, matchBlockIds, computeReplaceOps, hmBlockNodeToBlockNode } from './block-diff';
|
|
32
32
|
export type { APIBlockNode, APIBlock } from './block-diff';
|
|
@@ -34,3 +34,8 @@ export { autoLinkChildToParent, createAutoLinkOps, documentContainsLinkToChild,
|
|
|
34
34
|
export type { AutoLinkChildToParentOptions } from './auto-link';
|
|
35
35
|
export { resolveDocumentState } from './document-state';
|
|
36
36
|
export type { DocumentState } from './document-state';
|
|
37
|
+
export { editorBlockToHMBlock, editorBlocksToHMBlockNodes } from './editorblock-to-hmblock';
|
|
38
|
+
export { hmBlocksToEditorContent, hmBlockToEditorBlock, annotationContains } from './hmblock-to-editorblock';
|
|
39
|
+
export { AnnotationSet, addSpanToAnnotation, pushSpanToAnnotation } from './unicode';
|
|
40
|
+
export type { MutableAnnotation, SpanAnnotation } from './unicode';
|
|
41
|
+
export type { EditorBlock, EditorBaseBlock, EditorBlockProps, EditorBlockType, EditorParagraphBlock, EditorHeadingBlock, EditorCodeBlock, EditorImageBlock, EditorVideoBlock, EditorFileBlock, EditorButtonBlock, EditorEmbedBlock, EditorWebEmbedBlock, EditorMathBlock, EditorNostrBlock, EditorQueryBlock, EditorUnknownBlock, EditorText, EditorLink, EditorInlineEmbed, EditorInlineStyles, EditorAnnotationType, HMInlineContent, MediaBlockProps, DraftMediaRef, SearchResult, } from './editor-types';
|