@seed-hypermedia/client 0.0.67 → 0.0.69
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/LICENSE +201 -0
- package/dist/auth.d.ts +79 -0
- package/dist/auth.mjs +265 -0
- package/dist/auto-link.mjs +20 -0
- package/dist/base64.mjs +9 -0
- package/dist/blobs.d.ts +168 -0
- package/dist/blobs.mjs +50 -0
- package/dist/block-diff.d.ts +37 -1
- package/dist/block-diff.mjs +17 -0
- package/dist/blocks-to-markdown.mjs +22 -0
- package/dist/capability.mjs +11 -0
- package/dist/cbor.d.ts +13 -0
- package/dist/cbor.mjs +13 -0
- package/dist/change.mjs +23 -0
- package/dist/chunk-2MD3FXKB.mjs +14 -0
- package/dist/chunk-3TPCJCVO.mjs +24 -0
- package/dist/chunk-52P3E6H6.mjs +459 -0
- package/dist/{chunk-KCR3277A.mjs → chunk-5EWV4OPF.mjs} +1 -1
- package/dist/chunk-CBELM7KX.mjs +29 -0
- package/dist/chunk-DXDF36H5.mjs +289 -0
- package/dist/chunk-EY6RQVAP.mjs +138 -0
- package/dist/chunk-FYUZZ3HT.mjs +199 -0
- package/dist/chunk-GKGWSN6J.mjs +75 -0
- package/dist/chunk-H7L4TI6X.mjs +705 -0
- package/dist/chunk-HBIVZA6C.mjs +102 -0
- package/dist/chunk-I3YUHKYW.mjs +135 -0
- package/dist/chunk-KO4XH5L2.mjs +475 -0
- package/dist/chunk-LYECQKZE.mjs +49 -0
- package/dist/chunk-MKUWQB5W.mjs +297 -0
- package/dist/chunk-N3P7S5YZ.mjs +118 -0
- package/dist/chunk-NPG76WUS.mjs +348 -0
- package/dist/chunk-NX7YFFRX.mjs +124 -0
- package/dist/chunk-OZKQOI2X.mjs +334 -0
- package/dist/chunk-PPAY4WZX.mjs +40 -0
- package/dist/chunk-QS7TPMYT.mjs +411 -0
- package/dist/chunk-S2PVJK2P.mjs +517 -0
- package/dist/chunk-T5BTAJPW.mjs +725 -0
- package/dist/{chunk-EGCUJ6D6.mjs → chunk-UOL3F6XQ.mjs} +0 -12
- package/dist/chunk-VN7F33SS.mjs +108 -0
- package/dist/chunk-W4OGV22Y.mjs +57 -0
- package/dist/chunk-WJQSJ6UM.mjs +159 -0
- package/dist/chunk-XI2LXZM7.mjs +112 -0
- package/dist/chunk-YNVFRCUH.mjs +171 -0
- package/dist/chunk-YZX54L3G.mjs +33 -0
- package/dist/client.mjs +14 -0
- package/dist/comment.mjs +18 -0
- package/dist/contact.mjs +14 -0
- package/dist/document-state.mjs +8 -0
- package/dist/editor-types.mjs +0 -0
- package/dist/editorblock-to-hmblock.mjs +11 -0
- package/dist/encryption.mjs +13 -0
- package/dist/errors.mjs +11 -0
- package/dist/file-to-ipfs.mjs +13 -0
- package/dist/grobid.mjs +11 -0
- package/dist/hm-resolver.mjs +10 -0
- package/dist/hm-types.d.ts +566 -566
- package/dist/hmauth.d.ts +169 -0
- package/dist/hmauth.mjs +52 -0
- package/dist/hmblock-to-editorblock.mjs +12 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +126 -5006
- package/dist/keyfile.mjs +19 -0
- package/dist/markdown-to-blocks.d.ts +7 -0
- package/dist/markdown-to-blocks.mjs +15 -0
- package/dist/pdf-to-blocks-embedded.mjs +7 -0
- package/dist/pdf-to-blocks.mjs +11 -0
- package/dist/ref.mjs +12 -0
- package/dist/resource-read.mjs +14 -0
- package/dist/signing.mjs +13 -0
- package/dist/tei-to-blocks.mjs +8 -0
- package/dist/unicode.mjs +19 -0
- package/dist/vault-local.mjs +7 -6
- package/dist/vault.mjs +3 -2
- package/package.json +18 -28
- package/src/index.ts +0 -137
package/dist/keyfile.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
create,
|
|
3
|
+
decrypt,
|
|
4
|
+
load,
|
|
5
|
+
parse,
|
|
6
|
+
principalStringFromSeed,
|
|
7
|
+
stringify
|
|
8
|
+
} from "./chunk-EY6RQVAP.mjs";
|
|
9
|
+
import "./chunk-UOL3F6XQ.mjs";
|
|
10
|
+
import "./chunk-2MD3FXKB.mjs";
|
|
11
|
+
import "./chunk-7P6ASYW6.mjs";
|
|
12
|
+
export {
|
|
13
|
+
create,
|
|
14
|
+
decrypt,
|
|
15
|
+
load,
|
|
16
|
+
parse,
|
|
17
|
+
principalStringFromSeed,
|
|
18
|
+
stringify
|
|
19
|
+
};
|
|
@@ -29,6 +29,13 @@ export type SeedBlock = {
|
|
|
29
29
|
childrenType?: string;
|
|
30
30
|
language?: string;
|
|
31
31
|
link?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Additional block attributes beyond the legacy top-level ones above
|
|
34
|
+
* (e.g. `columnId` on table cell Paragraphs, `isHeader` on TableRow /
|
|
35
|
+
* TableColumn, `width` on TableColumn). Inlined at the top level of the
|
|
36
|
+
* wire block, nested under `attributes` in HMBlockNode.
|
|
37
|
+
*/
|
|
38
|
+
attributes?: Record<string, unknown>;
|
|
32
39
|
};
|
|
33
40
|
export type BlockNode = {
|
|
34
41
|
block: SeedBlock;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
flattenToOperations,
|
|
3
|
+
markdownBlockNodesToHMBlockNodes,
|
|
4
|
+
parseFrontmatter,
|
|
5
|
+
parseInlineFormatting,
|
|
6
|
+
parseMarkdown
|
|
7
|
+
} from "./chunk-H7L4TI6X.mjs";
|
|
8
|
+
import "./chunk-7P6ASYW6.mjs";
|
|
9
|
+
export {
|
|
10
|
+
flattenToOperations,
|
|
11
|
+
markdownBlockNodesToHMBlockNodes,
|
|
12
|
+
parseFrontmatter,
|
|
13
|
+
parseInlineFormatting,
|
|
14
|
+
parseMarkdown
|
|
15
|
+
};
|
package/dist/ref.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveIdWithClient
|
|
3
|
+
} from "./chunk-GKGWSN6J.mjs";
|
|
4
|
+
import "./chunk-YNVFRCUH.mjs";
|
|
5
|
+
import "./chunk-MKUWQB5W.mjs";
|
|
6
|
+
import "./chunk-CBELM7KX.mjs";
|
|
7
|
+
import "./chunk-I3YUHKYW.mjs";
|
|
8
|
+
import "./chunk-XI2LXZM7.mjs";
|
|
9
|
+
import "./chunk-YZX54L3G.mjs";
|
|
10
|
+
import "./chunk-SQEUO7FO.mjs";
|
|
11
|
+
import "./chunk-7P6ASYW6.mjs";
|
|
12
|
+
export {
|
|
13
|
+
resolveIdWithClient
|
|
14
|
+
};
|
package/dist/signing.mjs
ADDED
package/dist/unicode.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AnnotationSet,
|
|
3
|
+
addSpanToAnnotation,
|
|
4
|
+
pushSpanToAnnotation,
|
|
5
|
+
validateExclusiveAnnotations
|
|
6
|
+
} from "./chunk-N3P7S5YZ.mjs";
|
|
7
|
+
import {
|
|
8
|
+
codePointLength,
|
|
9
|
+
isSurrogate
|
|
10
|
+
} from "./chunk-SQEUO7FO.mjs";
|
|
11
|
+
import "./chunk-7P6ASYW6.mjs";
|
|
12
|
+
export {
|
|
13
|
+
AnnotationSet,
|
|
14
|
+
addSpanToAnnotation,
|
|
15
|
+
codePointLength,
|
|
16
|
+
isSurrogate,
|
|
17
|
+
pushSpanToAnnotation,
|
|
18
|
+
validateExclusiveAnnotations
|
|
19
|
+
};
|
package/dist/vault-local.mjs
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
readOSSecret,
|
|
3
|
-
stripGoKeyringPrefix
|
|
4
|
-
} from "./chunk-KNP335NP.mjs";
|
|
5
1
|
import {
|
|
6
2
|
decryptVaultState,
|
|
7
3
|
getAccountName,
|
|
@@ -9,8 +5,13 @@ import {
|
|
|
9
5
|
principalFromPublicKey,
|
|
10
6
|
principalToString,
|
|
11
7
|
unwrapDEK
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import
|
|
8
|
+
} from "./chunk-5EWV4OPF.mjs";
|
|
9
|
+
import {
|
|
10
|
+
readOSSecret,
|
|
11
|
+
stripGoKeyringPrefix
|
|
12
|
+
} from "./chunk-KNP335NP.mjs";
|
|
13
|
+
import "./chunk-UOL3F6XQ.mjs";
|
|
14
|
+
import "./chunk-2MD3FXKB.mjs";
|
|
14
15
|
import "./chunk-7P6ASYW6.mjs";
|
|
15
16
|
|
|
16
17
|
// src/vault-local.ts
|
package/dist/vault.mjs
CHANGED
|
@@ -14,8 +14,9 @@ import {
|
|
|
14
14
|
principalToString,
|
|
15
15
|
serialize,
|
|
16
16
|
unwrapDEK
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-5EWV4OPF.mjs";
|
|
18
|
+
import "./chunk-UOL3F6XQ.mjs";
|
|
19
|
+
import "./chunk-2MD3FXKB.mjs";
|
|
19
20
|
import "./chunk-7P6ASYW6.mjs";
|
|
20
21
|
export {
|
|
21
22
|
VAULT_VERSION,
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-hypermedia/client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.69",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/seed-hypermedia/seed",
|
|
7
7
|
"directory": "frontend/packages/client"
|
|
8
8
|
},
|
|
9
|
-
"main": "
|
|
10
|
-
"types": "
|
|
9
|
+
"main": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.mjs"
|
|
14
15
|
},
|
|
15
16
|
"./*": {
|
|
16
|
-
"
|
|
17
|
+
"types": "./dist/*.d.ts",
|
|
18
|
+
"import": "./dist/*.mjs"
|
|
17
19
|
},
|
|
18
20
|
"./package.json": "./package.json"
|
|
19
21
|
},
|
|
@@ -22,32 +24,13 @@
|
|
|
22
24
|
],
|
|
23
25
|
"sideEffects": false,
|
|
24
26
|
"publishConfig": {
|
|
25
|
-
"access": "public"
|
|
26
|
-
"main": "./dist/index.js",
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"exports": {
|
|
29
|
-
".": {
|
|
30
|
-
"import": "./dist/index.js",
|
|
31
|
-
"types": "./dist/index.d.ts"
|
|
32
|
-
},
|
|
33
|
-
"./*": {
|
|
34
|
-
"import": "./dist/*.js",
|
|
35
|
-
"types": "./dist/*.d.ts"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "tsup && tsc --project tsconfig.build.json",
|
|
41
|
-
"format:check": "prettier --check .",
|
|
42
|
-
"format:write": "prettier --write .",
|
|
43
|
-
"prepublishOnly": "pnpm build",
|
|
44
|
-
"test": "vitest --run",
|
|
45
|
-
"typecheck": "tsc --noEmit --project tsconfig.app.json"
|
|
27
|
+
"access": "public"
|
|
46
28
|
},
|
|
47
29
|
"dependencies": {
|
|
48
30
|
"@ipld/dag-cbor": "^9.2.5",
|
|
49
31
|
"@noble/ciphers": "^2.1.1",
|
|
50
32
|
"@noble/curves": "^2.0.1",
|
|
33
|
+
"@noble/hashes": "^2.0.1",
|
|
51
34
|
"blockstore-core": "^5.0.2",
|
|
52
35
|
"cborg": "^4.5.8",
|
|
53
36
|
"cheerio": "^1.2.0",
|
|
@@ -66,11 +49,18 @@
|
|
|
66
49
|
},
|
|
67
50
|
"peerDependencies": {
|
|
68
51
|
"pdfjs-dist": "^4.2.67",
|
|
69
|
-
"zod": "
|
|
52
|
+
"zod": "^3.20.0"
|
|
70
53
|
},
|
|
71
54
|
"peerDependenciesMeta": {
|
|
72
55
|
"pdfjs-dist": {
|
|
73
56
|
"optional": true
|
|
74
57
|
}
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "tsup && tsc --project tsconfig.build.json",
|
|
61
|
+
"format:check": "prettier --check .",
|
|
62
|
+
"format:write": "prettier --write .",
|
|
63
|
+
"test": "vitest --run",
|
|
64
|
+
"typecheck": "tsc --noEmit --project tsconfig.app.json"
|
|
75
65
|
}
|
|
76
|
-
}
|
|
66
|
+
}
|
package/src/index.ts
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
export {createCapability, resolveCapability} from './capability'
|
|
2
|
-
export type {CapabilityRole, CreateCapabilityInput} from './capability'
|
|
3
|
-
export {
|
|
4
|
-
createChange,
|
|
5
|
-
createChangeOps,
|
|
6
|
-
createDocumentChange,
|
|
7
|
-
createDocumentChangeFromOps,
|
|
8
|
-
createGenesisChange,
|
|
9
|
-
signDocumentChange,
|
|
10
|
-
signPreparedChange,
|
|
11
|
-
} from './change'
|
|
12
|
-
export type {
|
|
13
|
-
CreateChangeOpsInput,
|
|
14
|
-
CreateDocumentChangeFromOpsInput,
|
|
15
|
-
CreateDocumentChangeInput,
|
|
16
|
-
DocumentOperation,
|
|
17
|
-
SignDocumentChangeInput,
|
|
18
|
-
} from './change'
|
|
19
|
-
export {createSeedClient} from './client'
|
|
20
|
-
export type {PublishDocumentInput, SeedClient, SeedClientOptions} from './client'
|
|
21
|
-
export {commentRecordIdFromBlob, createComment, deleteComment, updateComment} from './comment'
|
|
22
|
-
export type {
|
|
23
|
-
CommentAttachmentBlob,
|
|
24
|
-
CreateCommentInput,
|
|
25
|
-
DeleteCommentInput,
|
|
26
|
-
QuotingTarget,
|
|
27
|
-
UpdateCommentInput,
|
|
28
|
-
} from './comment'
|
|
29
|
-
export {contactRecordIdFromBlob, createContact, deleteContact, updateContact} from './contact'
|
|
30
|
-
export type {CreateContactInput, CreateContactResult, DeleteContactInput, UpdateContactInput} from './contact'
|
|
31
|
-
export {SeedClientError, SeedNetworkError, SeedValidationError} from './errors'
|
|
32
|
-
export {createRedirectRef, createTombstoneRef, createVersionRef} from './ref'
|
|
33
|
-
export type {CreateRedirectRefInput, CreateTombstoneRefInput, CreateVersionRefInput} from './ref'
|
|
34
|
-
export {teiToBlocks} from './tei-to-blocks'
|
|
35
|
-
export type {TeiToBlocksOptions, TeiToBlocksResult, TeiFigure, FigureCoords} from './tei-to-blocks'
|
|
36
|
-
export {pdfToBlocks} from './pdf-to-blocks'
|
|
37
|
-
export type {PdfToBlocksOptions, PdfToBlocksResult} from './pdf-to-blocks'
|
|
38
|
-
export {isGrobidAvailable, processFulltextDocument, DEFAULT_GROBID_URL} from './grobid'
|
|
39
|
-
export type {GrobidOptions} from './grobid'
|
|
40
|
-
export {embeddedPdfToBlocks} from './pdf-to-blocks-embedded'
|
|
41
|
-
export type {EmbeddedPdfResult} from './pdf-to-blocks-embedded'
|
|
42
|
-
|
|
43
|
-
export {trimTrailingEmptyBlocks} from './comment'
|
|
44
|
-
export {
|
|
45
|
-
codePointLength,
|
|
46
|
-
entityQueryPathToHmIdPath,
|
|
47
|
-
getHMQueryString,
|
|
48
|
-
hmIdPathToEntityQueryPath,
|
|
49
|
-
HYPERMEDIA_SCHEME,
|
|
50
|
-
isSurrogate,
|
|
51
|
-
packBaseId,
|
|
52
|
-
packHmId,
|
|
53
|
-
parseCustomURL,
|
|
54
|
-
parseFragment,
|
|
55
|
-
serializeBlockRange,
|
|
56
|
-
unpackHmId,
|
|
57
|
-
} from './hm-types'
|
|
58
|
-
export type {HMRequest, HMSigner, UnpackedHypermediaId} from './hm-types'
|
|
59
|
-
|
|
60
|
-
export {resolveHypermediaUrl, resolveId} from './hm-resolver'
|
|
61
|
-
export type {DomainResolverFn, DomainIdChangedCallback, ResolveOptions, ResolvedUrl} from './hm-resolver'
|
|
62
|
-
export {resolveIdWithClient} from './resource-read'
|
|
63
|
-
export type {ResolveIdWithClientOptions, ResolvedIdWithClient} from './resource-read'
|
|
64
|
-
|
|
65
|
-
export {fileToIpfsBlobs, filesToIpfsBlobs, resolveFileLinksInBlocks, hasFileLinks} from './file-to-ipfs'
|
|
66
|
-
export type {CollectedBlob} from './file-to-ipfs'
|
|
67
|
-
|
|
68
|
-
export {
|
|
69
|
-
parseMarkdown,
|
|
70
|
-
flattenToOperations,
|
|
71
|
-
parseInlineFormatting,
|
|
72
|
-
parseFrontmatter,
|
|
73
|
-
markdownBlockNodesToHMBlockNodes,
|
|
74
|
-
} from './markdown-to-blocks'
|
|
75
|
-
export type {BlockNode, SeedBlock, Annotation} from './markdown-to-blocks'
|
|
76
|
-
export {
|
|
77
|
-
blocksToMarkdown,
|
|
78
|
-
emitFrontmatter,
|
|
79
|
-
slugify,
|
|
80
|
-
draftFilename,
|
|
81
|
-
parseDraftFilename,
|
|
82
|
-
documentToResolvedMarkdown,
|
|
83
|
-
commentToResolvedMarkdown,
|
|
84
|
-
contentToResolvedMarkdown,
|
|
85
|
-
} from './blocks-to-markdown'
|
|
86
|
-
export type {ResolvedMarkdownOptions} from './blocks-to-markdown'
|
|
87
|
-
export type {BlocksToMarkdownOptions} from './blocks-to-markdown'
|
|
88
|
-
|
|
89
|
-
export {createBlocksMap, matchBlockIds, computeReplaceOps, hmBlockNodeToBlockNode} from './block-diff'
|
|
90
|
-
export type {APIBlockNode, APIBlock} from './block-diff'
|
|
91
|
-
|
|
92
|
-
export {
|
|
93
|
-
autoLinkChildToParent,
|
|
94
|
-
createAutoLinkOps,
|
|
95
|
-
documentContainsLinkToChild,
|
|
96
|
-
documentHasSelfQuery,
|
|
97
|
-
shouldAutoLinkParent,
|
|
98
|
-
} from './auto-link'
|
|
99
|
-
export type {AutoLinkChildToParentOptions} from './auto-link'
|
|
100
|
-
export {resolveDocumentState} from './document-state'
|
|
101
|
-
export type {DocumentState} from './document-state'
|
|
102
|
-
|
|
103
|
-
export {editorBlockToHMBlock, editorBlocksToHMBlockNodes} from './editorblock-to-hmblock'
|
|
104
|
-
export {hmBlocksToEditorContent, hmBlockToEditorBlock, annotationContains} from './hmblock-to-editorblock'
|
|
105
|
-
export {AnnotationSet, addSpanToAnnotation, pushSpanToAnnotation} from './unicode'
|
|
106
|
-
export type {MutableAnnotation, SpanAnnotation} from './unicode'
|
|
107
|
-
|
|
108
|
-
export * as keyfile from './keyfile'
|
|
109
|
-
export * as keyEncryption from './encryption'
|
|
110
|
-
export type {
|
|
111
|
-
EditorBlock,
|
|
112
|
-
EditorBaseBlock,
|
|
113
|
-
EditorBlockProps,
|
|
114
|
-
EditorBlockType,
|
|
115
|
-
EditorParagraphBlock,
|
|
116
|
-
EditorHeadingBlock,
|
|
117
|
-
EditorCodeBlock,
|
|
118
|
-
EditorImageBlock,
|
|
119
|
-
EditorVideoBlock,
|
|
120
|
-
EditorFileBlock,
|
|
121
|
-
EditorButtonBlock,
|
|
122
|
-
EditorEmbedBlock,
|
|
123
|
-
EditorWebEmbedBlock,
|
|
124
|
-
EditorMathBlock,
|
|
125
|
-
EditorNostrBlock,
|
|
126
|
-
EditorQueryBlock,
|
|
127
|
-
EditorUnknownBlock,
|
|
128
|
-
EditorText,
|
|
129
|
-
EditorLink,
|
|
130
|
-
EditorInlineEmbed,
|
|
131
|
-
EditorInlineStyles,
|
|
132
|
-
EditorAnnotationType,
|
|
133
|
-
HMInlineContent,
|
|
134
|
-
MediaBlockProps,
|
|
135
|
-
DraftMediaRef,
|
|
136
|
-
SearchResult,
|
|
137
|
-
} from './editor-types'
|