@seed-hypermedia/client 0.0.68 → 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.
Files changed (72) hide show
  1. package/LICENSE +201 -0
  2. package/dist/auth.d.ts +79 -0
  3. package/dist/auth.mjs +265 -0
  4. package/dist/auto-link.mjs +20 -0
  5. package/dist/base64.mjs +9 -0
  6. package/dist/blobs.d.ts +168 -0
  7. package/dist/blobs.mjs +50 -0
  8. package/dist/block-diff.mjs +17 -0
  9. package/dist/blocks-to-markdown.mjs +22 -0
  10. package/dist/capability.mjs +11 -0
  11. package/dist/cbor.d.ts +13 -0
  12. package/dist/cbor.mjs +13 -0
  13. package/dist/change.mjs +23 -0
  14. package/dist/chunk-2MD3FXKB.mjs +14 -0
  15. package/dist/chunk-3TPCJCVO.mjs +24 -0
  16. package/dist/chunk-52P3E6H6.mjs +459 -0
  17. package/dist/{chunk-KCR3277A.mjs → chunk-5EWV4OPF.mjs} +1 -1
  18. package/dist/chunk-CBELM7KX.mjs +29 -0
  19. package/dist/chunk-DXDF36H5.mjs +289 -0
  20. package/dist/chunk-EY6RQVAP.mjs +138 -0
  21. package/dist/chunk-FYUZZ3HT.mjs +199 -0
  22. package/dist/chunk-GKGWSN6J.mjs +75 -0
  23. package/dist/chunk-H7L4TI6X.mjs +705 -0
  24. package/dist/chunk-HBIVZA6C.mjs +102 -0
  25. package/dist/chunk-I3YUHKYW.mjs +135 -0
  26. package/dist/chunk-KO4XH5L2.mjs +475 -0
  27. package/dist/chunk-LYECQKZE.mjs +49 -0
  28. package/dist/chunk-MKUWQB5W.mjs +297 -0
  29. package/dist/chunk-N3P7S5YZ.mjs +118 -0
  30. package/dist/chunk-NPG76WUS.mjs +348 -0
  31. package/dist/chunk-NX7YFFRX.mjs +124 -0
  32. package/dist/chunk-OZKQOI2X.mjs +334 -0
  33. package/dist/chunk-PPAY4WZX.mjs +40 -0
  34. package/dist/chunk-QS7TPMYT.mjs +411 -0
  35. package/dist/chunk-S2PVJK2P.mjs +517 -0
  36. package/dist/chunk-T5BTAJPW.mjs +725 -0
  37. package/dist/{chunk-EGCUJ6D6.mjs → chunk-UOL3F6XQ.mjs} +0 -12
  38. package/dist/chunk-VN7F33SS.mjs +108 -0
  39. package/dist/chunk-W4OGV22Y.mjs +57 -0
  40. package/dist/chunk-WJQSJ6UM.mjs +159 -0
  41. package/dist/chunk-XI2LXZM7.mjs +112 -0
  42. package/dist/chunk-YNVFRCUH.mjs +171 -0
  43. package/dist/chunk-YZX54L3G.mjs +33 -0
  44. package/dist/client.mjs +14 -0
  45. package/dist/comment.mjs +18 -0
  46. package/dist/contact.mjs +14 -0
  47. package/dist/document-state.mjs +8 -0
  48. package/dist/editor-types.mjs +0 -0
  49. package/dist/editorblock-to-hmblock.mjs +11 -0
  50. package/dist/encryption.mjs +13 -0
  51. package/dist/errors.mjs +11 -0
  52. package/dist/file-to-ipfs.mjs +13 -0
  53. package/dist/grobid.mjs +11 -0
  54. package/dist/hm-resolver.mjs +10 -0
  55. package/dist/hm-types.d.ts +566 -566
  56. package/dist/hmauth.d.ts +169 -0
  57. package/dist/hmauth.mjs +52 -0
  58. package/dist/hmblock-to-editorblock.mjs +12 -0
  59. package/dist/index.mjs +124 -5453
  60. package/dist/keyfile.mjs +19 -0
  61. package/dist/markdown-to-blocks.mjs +15 -0
  62. package/dist/pdf-to-blocks-embedded.mjs +7 -0
  63. package/dist/pdf-to-blocks.mjs +11 -0
  64. package/dist/ref.mjs +12 -0
  65. package/dist/resource-read.mjs +14 -0
  66. package/dist/signing.mjs +13 -0
  67. package/dist/tei-to-blocks.mjs +8 -0
  68. package/dist/unicode.mjs +19 -0
  69. package/dist/vault-local.mjs +7 -6
  70. package/dist/vault.mjs +3 -2
  71. package/package.json +18 -28
  72. package/src/index.ts +0 -144
@@ -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
+ };
@@ -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
+ };
@@ -0,0 +1,7 @@
1
+ import {
2
+ embeddedPdfToBlocks
3
+ } from "./chunk-52P3E6H6.mjs";
4
+ import "./chunk-7P6ASYW6.mjs";
5
+ export {
6
+ embeddedPdfToBlocks
7
+ };
@@ -0,0 +1,11 @@
1
+ import {
2
+ pdfToBlocks
3
+ } from "./chunk-LYECQKZE.mjs";
4
+ import "./chunk-S2PVJK2P.mjs";
5
+ import "./chunk-52P3E6H6.mjs";
6
+ import "./chunk-PPAY4WZX.mjs";
7
+ import "./chunk-SQEUO7FO.mjs";
8
+ import "./chunk-7P6ASYW6.mjs";
9
+ export {
10
+ pdfToBlocks
11
+ };
package/dist/ref.mjs ADDED
@@ -0,0 +1,12 @@
1
+ import {
2
+ createRedirectRef,
3
+ createTombstoneRef,
4
+ createVersionRef
5
+ } from "./chunk-XI2LXZM7.mjs";
6
+ import "./chunk-YZX54L3G.mjs";
7
+ import "./chunk-7P6ASYW6.mjs";
8
+ export {
9
+ createRedirectRef,
10
+ createTombstoneRef,
11
+ createVersionRef
12
+ };
@@ -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
+ };
@@ -0,0 +1,13 @@
1
+ import {
2
+ cborCodec,
3
+ normalizeBytes,
4
+ signObject,
5
+ toPublishInput
6
+ } from "./chunk-YZX54L3G.mjs";
7
+ import "./chunk-7P6ASYW6.mjs";
8
+ export {
9
+ cborCodec,
10
+ normalizeBytes,
11
+ signObject,
12
+ toPublishInput
13
+ };
@@ -0,0 +1,8 @@
1
+ import {
2
+ teiToBlocks
3
+ } from "./chunk-S2PVJK2P.mjs";
4
+ import "./chunk-SQEUO7FO.mjs";
5
+ import "./chunk-7P6ASYW6.mjs";
6
+ export {
7
+ teiToBlocks
8
+ };
@@ -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
+ };
@@ -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-KCR3277A.mjs";
13
- import "./chunk-EGCUJ6D6.mjs";
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-KCR3277A.mjs";
18
- import "./chunk-EGCUJ6D6.mjs";
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.68",
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": "src/index.ts",
10
- "types": "src/index.ts",
9
+ "main": "./dist/index.mjs",
10
+ "types": "./dist/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
- "default": "./src/index.ts"
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs"
14
15
  },
15
16
  "./*": {
16
- "default": "./src/*.ts"
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": ">=3.20.0"
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,144 +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 {
90
- createBlocksMap,
91
- matchBlockIds,
92
- computeReplaceOps,
93
- hmBlockNodeToBlockNode,
94
- rebindTableIdentities,
95
- toAPIBlockNode,
96
- } from './block-diff'
97
- export type {APIBlockNode, APIBlock} from './block-diff'
98
-
99
- export {
100
- autoLinkChildToParent,
101
- createAutoLinkOps,
102
- documentContainsLinkToChild,
103
- documentHasSelfQuery,
104
- shouldAutoLinkParent,
105
- } from './auto-link'
106
- export type {AutoLinkChildToParentOptions} from './auto-link'
107
- export {resolveDocumentState} from './document-state'
108
- export type {DocumentState} from './document-state'
109
-
110
- export {editorBlockToHMBlock, editorBlocksToHMBlockNodes} from './editorblock-to-hmblock'
111
- export {hmBlocksToEditorContent, hmBlockToEditorBlock, annotationContains} from './hmblock-to-editorblock'
112
- export {AnnotationSet, addSpanToAnnotation, pushSpanToAnnotation} from './unicode'
113
- export type {MutableAnnotation, SpanAnnotation} from './unicode'
114
-
115
- export * as keyfile from './keyfile'
116
- export * as keyEncryption from './encryption'
117
- export type {
118
- EditorBlock,
119
- EditorBaseBlock,
120
- EditorBlockProps,
121
- EditorBlockType,
122
- EditorParagraphBlock,
123
- EditorHeadingBlock,
124
- EditorCodeBlock,
125
- EditorImageBlock,
126
- EditorVideoBlock,
127
- EditorFileBlock,
128
- EditorButtonBlock,
129
- EditorEmbedBlock,
130
- EditorWebEmbedBlock,
131
- EditorMathBlock,
132
- EditorNostrBlock,
133
- EditorQueryBlock,
134
- EditorUnknownBlock,
135
- EditorText,
136
- EditorLink,
137
- EditorInlineEmbed,
138
- EditorInlineStyles,
139
- EditorAnnotationType,
140
- HMInlineContent,
141
- MediaBlockProps,
142
- DraftMediaRef,
143
- SearchResult,
144
- } from './editor-types'