@seed-hypermedia/client 0.0.108 → 0.0.110
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/auto-link.mjs +4 -3
- package/dist/blocks-to-markdown.mjs +3 -2
- package/dist/capability.d.ts +9 -3
- package/dist/capability.mjs +3 -2
- package/dist/{chunk-RKCXRUMM.mjs → chunk-3Y2LUQ2S.mjs} +1 -1
- package/dist/{chunk-UWH2FAVV.mjs → chunk-4MLSRAHT.mjs} +1 -1
- package/dist/{chunk-UUPZ2NLC.mjs → chunk-5N4GUBTC.mjs} +3 -3
- package/dist/{chunk-VN7F33SS.mjs → chunk-65UV5O57.mjs} +38 -0
- package/dist/chunk-AHQWDCHV.mjs +56 -0
- package/dist/{chunk-7HNJXR32.mjs → chunk-APDALLCQ.mjs} +1 -1
- package/dist/{chunk-52RP7HHW.mjs → chunk-AUKAVTTK.mjs} +1 -1
- package/dist/{chunk-HNCJHTB7.mjs → chunk-FPANFJPK.mjs} +24 -6
- package/dist/{chunk-4HFV2ZKM.mjs → chunk-JITFCBJG.mjs} +2 -2
- package/dist/{chunk-WZEW53BF.mjs → chunk-JXIRASEP.mjs} +1 -1
- package/dist/{chunk-E7LRAYKJ.mjs → chunk-JZO5T6RZ.mjs} +1 -1
- package/dist/{chunk-Y5XKORRF.mjs → chunk-MLR4UDOJ.mjs} +3 -3
- package/dist/{chunk-JS5GYEQ6.mjs → chunk-N2DIEFL4.mjs} +1 -1
- package/dist/{chunk-ZS5HGCE2.mjs → chunk-OBJQE4NK.mjs} +1 -1
- package/dist/{chunk-VTRLILIX.mjs → chunk-ONSB56Z7.mjs} +6 -1
- package/dist/{chunk-IXF3MTOE.mjs → chunk-U3PAJ472.mjs} +1 -1
- package/dist/{chunk-4QESBHYW.mjs → chunk-XBZWF34J.mjs} +3 -3
- package/dist/{chunk-AADKT7A3.mjs → chunk-ZIWKVJCO.mjs} +10 -5
- package/dist/client.d.ts +1 -1
- package/dist/client.mjs +3 -2
- package/dist/comment.mjs +3 -2
- package/dist/document-state.mjs +3 -2
- package/dist/editorblock-to-hmblock.mjs +3 -2
- package/dist/file-to-ipfs.d.ts +19 -0
- package/dist/file-to-ipfs.mjs +5 -1
- package/dist/hm-resolver.mjs +3 -2
- package/dist/hm-types.d.ts +6833 -2412
- package/dist/hm-types.mjs +2 -1
- package/dist/hmblock-to-editorblock.mjs +3 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +19 -14
- package/dist/page-input.d.ts +13 -0
- package/dist/page-input.mjs +15 -0
- package/dist/pdf-to-blocks.mjs +4 -3
- package/dist/resource-read.mjs +5 -4
- package/dist/schema-engine.mjs +2 -2
- package/dist/schema-registry.generated.mjs +1 -1
- package/dist/schema-resolve.mjs +5 -4
- package/dist/schema-subtypes.mjs +5 -4
- package/dist/schema-types.generated.d.ts +24 -0
- package/dist/signed-blob.mjs +2 -2
- package/dist/tei-to-blocks.mjs +3 -2
- package/dist/unicode.mjs +2 -1
- package/package.json +3 -3
package/dist/hm-types.mjs
CHANGED
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
annotationContains,
|
|
3
3
|
hmBlockToEditorBlock,
|
|
4
4
|
hmBlocksToEditorContent
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-U3PAJ472.mjs";
|
|
6
|
+
import "./chunk-FPANFJPK.mjs";
|
|
7
|
+
import "./chunk-AHQWDCHV.mjs";
|
|
7
8
|
import "./chunk-7P6ASYW6.mjs";
|
|
8
9
|
export {
|
|
9
10
|
annotationContains,
|
package/dist/index.d.ts
CHANGED
|
@@ -29,8 +29,8 @@ export { resolveHypermediaUrl, resolveId } from './hm-resolver';
|
|
|
29
29
|
export type { DomainResolverFn, DomainIdChangedCallback, ResolveOptions, ResolvedUrl } from './hm-resolver';
|
|
30
30
|
export { resolveIdWithClient } from './resource-read';
|
|
31
31
|
export type { ResolveIdWithClientOptions, ResolvedIdWithClient } from './resource-read';
|
|
32
|
-
export { fileToIpfsBlobs, filesToIpfsBlobs, resolveFileLinksInBlocks, hasFileLinks } from './file-to-ipfs';
|
|
33
|
-
export type { CollectedBlob } from './file-to-ipfs';
|
|
32
|
+
export { fileToIpfsBlobs, filesToIpfsBlobs, directoryToIpfsBlobs, normalizeDirectoryFilePath, resolveFileLinksInBlocks, hasFileLinks, } from './file-to-ipfs';
|
|
33
|
+
export type { CollectedBlob, IpfsDirectoryFile } from './file-to-ipfs';
|
|
34
34
|
export { parseMarkdown, flattenToOperations, parseInlineFormatting, parseFrontmatter, markdownBlockNodesToHMBlockNodes, hmAccountMentionUid, MarkdownFrontmatterError, } from './markdown-to-blocks';
|
|
35
35
|
export type { BlockNode, SeedBlock, Annotation, ParseMarkdownOptions } from './markdown-to-blocks';
|
|
36
36
|
export { collectMermaidBlocks, validateMermaidBlocks, assertValidMermaid, InvalidMermaidError, } from './mermaid-validation';
|
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pdfToBlocks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3Y2LUQ2S.mjs";
|
|
4
4
|
import {
|
|
5
5
|
teiToBlocks
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JZO5T6RZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
embeddedPdfToBlocks
|
|
9
9
|
} from "./chunk-2FJBS3V7.mjs";
|
|
10
10
|
import {
|
|
11
11
|
resolveIdWithClient
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5N4GUBTC.mjs";
|
|
13
13
|
import {
|
|
14
14
|
annotationContains,
|
|
15
15
|
hmBlockToEditorBlock,
|
|
16
16
|
hmBlocksToEditorContent
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U3PAJ472.mjs";
|
|
18
18
|
import {
|
|
19
19
|
keyfile_exports
|
|
20
20
|
} from "./chunk-EY6RQVAP.mjs";
|
|
@@ -36,16 +36,18 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
editorBlockToHMBlock,
|
|
38
38
|
editorBlocksToHMBlockNodes
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-OBJQE4NK.mjs";
|
|
40
40
|
import {
|
|
41
41
|
encryption_exports
|
|
42
42
|
} from "./chunk-UOL3F6XQ.mjs";
|
|
43
43
|
import {
|
|
44
|
+
directoryToIpfsBlobs,
|
|
44
45
|
fileToIpfsBlobs,
|
|
45
46
|
filesToIpfsBlobs,
|
|
46
47
|
hasFileLinks,
|
|
48
|
+
normalizeDirectoryFilePath,
|
|
47
49
|
resolveFileLinksInBlocks
|
|
48
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-65UV5O57.mjs";
|
|
49
51
|
import {
|
|
50
52
|
DEFAULT_GROBID_URL,
|
|
51
53
|
isGrobidAvailable,
|
|
@@ -54,10 +56,10 @@ import {
|
|
|
54
56
|
import {
|
|
55
57
|
resolveHypermediaUrl,
|
|
56
58
|
resolveId
|
|
57
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-ONSB56Z7.mjs";
|
|
58
60
|
import {
|
|
59
61
|
createSeedClient
|
|
60
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-JXIRASEP.mjs";
|
|
61
63
|
import {
|
|
62
64
|
SeedClientError,
|
|
63
65
|
SeedNetworkError,
|
|
@@ -69,7 +71,7 @@ import {
|
|
|
69
71
|
deleteComment,
|
|
70
72
|
trimTrailingEmptyBlocks,
|
|
71
73
|
updateComment
|
|
72
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-4MLSRAHT.mjs";
|
|
73
75
|
import {
|
|
74
76
|
AnnotationSet,
|
|
75
77
|
addSpanToAnnotation,
|
|
@@ -90,7 +92,7 @@ import {
|
|
|
90
92
|
documentContainsLinkToChild,
|
|
91
93
|
documentHasSelfQuery,
|
|
92
94
|
shouldAutoLinkParent
|
|
93
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-JITFCBJG.mjs";
|
|
94
96
|
import {
|
|
95
97
|
createChange,
|
|
96
98
|
createChangeOps,
|
|
@@ -112,7 +114,7 @@ import {
|
|
|
112
114
|
followToDocument,
|
|
113
115
|
resolveDocumentState,
|
|
114
116
|
resolveEditableDocument
|
|
115
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-APDALLCQ.mjs";
|
|
116
118
|
import "./chunk-2MD3FXKB.mjs";
|
|
117
119
|
import {
|
|
118
120
|
computeReplaceOps,
|
|
@@ -131,11 +133,11 @@ import {
|
|
|
131
133
|
emitFrontmatter,
|
|
132
134
|
parseDraftFilename,
|
|
133
135
|
slugify
|
|
134
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-N2DIEFL4.mjs";
|
|
135
137
|
import {
|
|
136
138
|
createCapability,
|
|
137
139
|
resolveCapability
|
|
138
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-ZIWKVJCO.mjs";
|
|
139
141
|
import "./chunk-LVAHHQIK.mjs";
|
|
140
142
|
import "./chunk-NBCHK76Q.mjs";
|
|
141
143
|
import {
|
|
@@ -155,7 +157,8 @@ import {
|
|
|
155
157
|
parseFragment,
|
|
156
158
|
serializeBlockRange,
|
|
157
159
|
unpackHmId
|
|
158
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-FPANFJPK.mjs";
|
|
161
|
+
import "./chunk-AHQWDCHV.mjs";
|
|
159
162
|
import "./chunk-3TPCJCVO.mjs";
|
|
160
163
|
import "./chunk-7P6ASYW6.mjs";
|
|
161
164
|
export {
|
|
@@ -198,6 +201,7 @@ export {
|
|
|
198
201
|
deleteComment,
|
|
199
202
|
deleteContact,
|
|
200
203
|
describeRedirect,
|
|
204
|
+
directoryToIpfsBlobs,
|
|
201
205
|
documentContainsLinkToChild,
|
|
202
206
|
documentHasSelfQuery,
|
|
203
207
|
documentToResolvedMarkdown,
|
|
@@ -225,6 +229,7 @@ export {
|
|
|
225
229
|
keyfile_exports as keyfile,
|
|
226
230
|
markdownBlockNodesToHMBlockNodes,
|
|
227
231
|
matchBlockIds,
|
|
232
|
+
normalizeDirectoryFilePath,
|
|
228
233
|
packBaseId,
|
|
229
234
|
packHmId,
|
|
230
235
|
parseCustomURL,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Query namespace reserved for a custom HTML page's schema-defined input. */
|
|
2
|
+
export declare const PAGE_INPUT_PREFIX = "p.";
|
|
3
|
+
/** Read page-owned query parameters without mixing in Seed navigation parameters. */
|
|
4
|
+
export declare function pageParamsFromUrl(url: string): Record<string, string> | undefined;
|
|
5
|
+
/** Encode raw JSON parameter values for insertion into an HM or web query string. */
|
|
6
|
+
export declare function pageParamsQuery(params?: Record<string, string>): string;
|
|
7
|
+
/** Decode JSON values from the URL, retaining validation errors for the page to display. */
|
|
8
|
+
export declare function decodePageInput(params?: Record<string, string>): {
|
|
9
|
+
values: Record<string, unknown>;
|
|
10
|
+
errors: string[];
|
|
11
|
+
};
|
|
12
|
+
/** Serialize a complete input state; rejects values that JSON would silently discard or change. */
|
|
13
|
+
export declare function encodePageInput(values: unknown): Record<string, string>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PAGE_INPUT_PREFIX,
|
|
3
|
+
decodePageInput,
|
|
4
|
+
encodePageInput,
|
|
5
|
+
pageParamsFromUrl,
|
|
6
|
+
pageParamsQuery
|
|
7
|
+
} from "./chunk-AHQWDCHV.mjs";
|
|
8
|
+
import "./chunk-7P6ASYW6.mjs";
|
|
9
|
+
export {
|
|
10
|
+
PAGE_INPUT_PREFIX,
|
|
11
|
+
decodePageInput,
|
|
12
|
+
encodePageInput,
|
|
13
|
+
pageParamsFromUrl,
|
|
14
|
+
pageParamsQuery
|
|
15
|
+
};
|
package/dist/pdf-to-blocks.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pdfToBlocks
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3Y2LUQ2S.mjs";
|
|
4
|
+
import "./chunk-JZO5T6RZ.mjs";
|
|
5
5
|
import "./chunk-2FJBS3V7.mjs";
|
|
6
6
|
import "./chunk-PPAY4WZX.mjs";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-FPANFJPK.mjs";
|
|
8
|
+
import "./chunk-AHQWDCHV.mjs";
|
|
8
9
|
import "./chunk-7P6ASYW6.mjs";
|
|
9
10
|
export {
|
|
10
11
|
pdfToBlocks
|
package/dist/resource-read.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveIdWithClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5N4GUBTC.mjs";
|
|
4
|
+
import "./chunk-ONSB56Z7.mjs";
|
|
5
|
+
import "./chunk-JXIRASEP.mjs";
|
|
6
6
|
import "./chunk-CBELM7KX.mjs";
|
|
7
7
|
import "./chunk-O5MHN2EO.mjs";
|
|
8
8
|
import "./chunk-PJ2RFT5A.mjs";
|
|
9
9
|
import "./chunk-LVAHHQIK.mjs";
|
|
10
10
|
import "./chunk-DR3HJ6BV.mjs";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-FPANFJPK.mjs";
|
|
12
|
+
import "./chunk-AHQWDCHV.mjs";
|
|
12
13
|
import "./chunk-7P6ASYW6.mjs";
|
|
13
14
|
export {
|
|
14
15
|
resolveIdWithClient
|
package/dist/schema-engine.mjs
CHANGED
|
@@ -35,11 +35,11 @@ import {
|
|
|
35
35
|
typeOf,
|
|
36
36
|
validate,
|
|
37
37
|
validateAdvisory
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-AUKAVTTK.mjs";
|
|
39
39
|
import {
|
|
40
40
|
HM_SCHEMAS,
|
|
41
41
|
HM_SCHEMA_MANIFEST
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-MLR4UDOJ.mjs";
|
|
43
43
|
import "./chunk-7P6ASYW6.mjs";
|
|
44
44
|
export {
|
|
45
45
|
HM_SCHEMAS,
|
package/dist/schema-resolve.mjs
CHANGED
|
@@ -17,11 +17,12 @@ import {
|
|
|
17
17
|
resolveSchemaRef,
|
|
18
18
|
schemaDefinitionCid,
|
|
19
19
|
withoutSchemaLink
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-XBZWF34J.mjs";
|
|
21
|
+
import "./chunk-AUKAVTTK.mjs";
|
|
22
|
+
import "./chunk-MLR4UDOJ.mjs";
|
|
23
23
|
import "./chunk-VWSAFDOL.mjs";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-FPANFJPK.mjs";
|
|
25
|
+
import "./chunk-AHQWDCHV.mjs";
|
|
25
26
|
import "./chunk-7P6ASYW6.mjs";
|
|
26
27
|
export {
|
|
27
28
|
bareCid,
|
package/dist/schema-subtypes.mjs
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
classifyRef
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XBZWF34J.mjs";
|
|
4
4
|
import {
|
|
5
5
|
kindOf,
|
|
6
6
|
nameForCid,
|
|
7
7
|
nameToUrl,
|
|
8
8
|
schemaCid
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AUKAVTTK.mjs";
|
|
10
10
|
import {
|
|
11
11
|
HM_SCHEMAS
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MLR4UDOJ.mjs";
|
|
13
13
|
import "./chunk-VWSAFDOL.mjs";
|
|
14
14
|
import {
|
|
15
15
|
unpackHmId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FPANFJPK.mjs";
|
|
17
|
+
import "./chunk-AHQWDCHV.mjs";
|
|
17
18
|
import "./chunk-7P6ASYW6.mjs";
|
|
18
19
|
|
|
19
20
|
// src/schema-subtypes.ts
|
|
@@ -1221,6 +1221,8 @@ export type HMMetadata = {
|
|
|
1221
1221
|
importCategories?: string;
|
|
1222
1222
|
/** Comma-separated tags kept from an external import (e.g. WordPress). */
|
|
1223
1223
|
importTags?: string;
|
|
1224
|
+
/** Resource type, for example hm://hyper.media/page for a custom HTML page. */
|
|
1225
|
+
type?: HMHmUrl;
|
|
1224
1226
|
} & {
|
|
1225
1227
|
[key: string]: HMValue;
|
|
1226
1228
|
};
|
|
@@ -1245,6 +1247,28 @@ export type HMMetadataNavigationItem = {
|
|
|
1245
1247
|
* Schema: hm://hyper.media/none
|
|
1246
1248
|
*/
|
|
1247
1249
|
export type HMNone = never;
|
|
1250
|
+
/**
|
|
1251
|
+
* Custom HTML Page
|
|
1252
|
+
* A resource type for a sandboxed HTML page with schema-defined URL input.
|
|
1253
|
+
* Resource attributes for a custom HTML page, with a sandboxed HTML bundle and a published input contract.
|
|
1254
|
+
* Schema: hm://hyper.media/page
|
|
1255
|
+
*/
|
|
1256
|
+
export type HMPage = {
|
|
1257
|
+
type: 'hm://hyper.media/page';
|
|
1258
|
+
/** UnixFS folder containing index.html for this custom HTML page. */
|
|
1259
|
+
html: HMIpfsUrl;
|
|
1260
|
+
/** Published HM struct schema defining this page's URL input fields. */
|
|
1261
|
+
inputSchema: HMUrl;
|
|
1262
|
+
} & {
|
|
1263
|
+
[key: string]: HMValue;
|
|
1264
|
+
};
|
|
1265
|
+
/**
|
|
1266
|
+
* Empty Page Input
|
|
1267
|
+
* The default published input schema for a custom HTML page that accepts no URL state.
|
|
1268
|
+
* The empty input contract for a custom HTML page that accepts no URL parameters.
|
|
1269
|
+
* Schema: hm://hyper.media/page-input
|
|
1270
|
+
*/
|
|
1271
|
+
export type HMPageInput = Record<string, never>;
|
|
1248
1272
|
/**
|
|
1249
1273
|
* Principal
|
|
1250
1274
|
* A public key that identifies an account or space, stored in blobs as the raw bytes of a multicodec prefix plus the key and shown to people as a base58 string starting with z6Mk.
|
package/dist/signed-blob.mjs
CHANGED
package/dist/tei-to-blocks.mjs
CHANGED
package/dist/unicode.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-hypermedia/client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.110",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/seed-hypermedia/seed",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"tsup": "^8.5.1",
|
|
46
46
|
"typescript": "5.8.3",
|
|
47
47
|
"vitest": "4.1.8",
|
|
48
|
-
"zod": "
|
|
48
|
+
"zod": "4.6.6"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"pdfjs-dist": "^4.2.67",
|
|
52
|
-
"zod": "^
|
|
52
|
+
"zod": "^4.6.6"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"pdfjs-dist": {
|