@seed-hypermedia/client 0.0.70 → 0.0.72
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 +3 -3
- package/dist/blocks-to-markdown.mjs +2 -2
- package/dist/capability.mjs +2 -2
- package/dist/{chunk-NPG76WUS.mjs → chunk-4L2LE3JW.mjs} +1 -1
- package/dist/{chunk-T5BTAJPW.mjs → chunk-ALT5YCCW.mjs} +1 -1
- package/dist/{chunk-HBIVZA6C.mjs → chunk-BZ4AXNSZ.mjs} +56 -2
- package/dist/{chunk-LYECQKZE.mjs → chunk-FNETXNBK.mjs} +1 -1
- package/dist/{chunk-3KESF5XJ.mjs → chunk-FUSG27NF.mjs} +1 -1
- package/dist/{chunk-EU36RFR3.mjs → chunk-GYZGSI4H.mjs} +2 -2
- package/dist/{chunk-S2PVJK2P.mjs → chunk-H34UYMNW.mjs} +1 -1
- package/dist/{chunk-NYWCMQTH.mjs → chunk-KY6WRGXY.mjs} +1 -1
- package/dist/{chunk-KO4XH5L2.mjs → chunk-NUIZU7KO.mjs} +1 -1
- package/dist/{chunk-YNVFRCUH.mjs → chunk-QYA75XPV.mjs} +37 -17
- package/dist/{chunk-BUPMCRR4.mjs → chunk-RL3OEUFZ.mjs} +1 -1
- package/dist/{chunk-4Q3SAL5R.mjs → chunk-TXVEL22U.mjs} +3 -3
- package/dist/{chunk-SQEUO7FO.mjs → chunk-W3FLBRBH.mjs} +1 -0
- package/dist/client.mjs +2 -2
- package/dist/comment.mjs +2 -2
- package/dist/document-state.d.ts +80 -0
- package/dist/document-state.mjs +12 -4
- package/dist/editorblock-to-hmblock.mjs +2 -2
- package/dist/hm-resolver.d.ts +7 -3
- package/dist/hm-resolver.mjs +2 -2
- package/dist/hm-types.d.ts +44 -0
- package/dist/hm-types.mjs +1 -1
- package/dist/hmblock-to-editorblock.mjs +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +22 -14
- package/dist/pdf-to-blocks.mjs +3 -3
- package/dist/resource-read.mjs +4 -4
- package/dist/tei-to-blocks.mjs +2 -2
- package/dist/unicode.mjs +1 -1
- package/package.json +1 -1
package/dist/auto-link.mjs
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
documentContainsLinkToChild,
|
|
5
5
|
documentHasSelfQuery,
|
|
6
6
|
shouldAutoLinkParent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GYZGSI4H.mjs";
|
|
8
8
|
import "./chunk-JT57MV7Y.mjs";
|
|
9
9
|
import "./chunk-PJ2RFT5A.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-BZ4AXNSZ.mjs";
|
|
11
11
|
import "./chunk-LVAHHQIK.mjs";
|
|
12
12
|
import "./chunk-DR3HJ6BV.mjs";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-W3FLBRBH.mjs";
|
|
14
14
|
import "./chunk-7P6ASYW6.mjs";
|
|
15
15
|
export {
|
|
16
16
|
autoLinkChildToParent,
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
emitFrontmatter,
|
|
8
8
|
parseDraftFilename,
|
|
9
9
|
slugify
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ALT5YCCW.mjs";
|
|
11
|
+
import "./chunk-W3FLBRBH.mjs";
|
|
12
12
|
import "./chunk-7P6ASYW6.mjs";
|
|
13
13
|
export {
|
|
14
14
|
blocksToMarkdown,
|
package/dist/capability.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapability,
|
|
3
3
|
resolveCapability
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RL3OEUFZ.mjs";
|
|
5
5
|
import "./chunk-LVAHHQIK.mjs";
|
|
6
6
|
import "./chunk-IT5LLTMP.mjs";
|
|
7
7
|
import "./chunk-DR3HJ6BV.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-W3FLBRBH.mjs";
|
|
9
9
|
import "./chunk-3TPCJCVO.mjs";
|
|
10
10
|
import "./chunk-7P6ASYW6.mjs";
|
|
11
11
|
export {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
packHmId,
|
|
2
3
|
unpackHmId
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W3FLBRBH.mjs";
|
|
4
5
|
|
|
5
6
|
// src/document-state.ts
|
|
6
7
|
async function resolveDocumentState(client, targetId) {
|
|
@@ -51,6 +52,55 @@ async function resolveDocumentState(client, targetId) {
|
|
|
51
52
|
version
|
|
52
53
|
};
|
|
53
54
|
}
|
|
55
|
+
var MAX_REDIRECT_HOPS = 5;
|
|
56
|
+
async function followRedirects(client, id) {
|
|
57
|
+
const seen = /* @__PURE__ */ new Set([packHmId(id)]);
|
|
58
|
+
const redirects = [];
|
|
59
|
+
let current = id;
|
|
60
|
+
for (let hop = 0; hop <= MAX_REDIRECT_HOPS; hop++) {
|
|
61
|
+
const resource = await client.request("Resource", current);
|
|
62
|
+
if (resource.type !== "redirect") {
|
|
63
|
+
return { id, targetId: current, resource, redirects };
|
|
64
|
+
}
|
|
65
|
+
redirects.push({ from: current, to: resource.redirectTarget, republish: resource.republish === true });
|
|
66
|
+
const next = packHmId(resource.redirectTarget);
|
|
67
|
+
if (seen.has(next)) throw new Error(`Redirect cycle detected at ${next}`);
|
|
68
|
+
seen.add(next);
|
|
69
|
+
current = resource.redirectTarget;
|
|
70
|
+
}
|
|
71
|
+
throw new Error(`Too many redirects while resolving ${packHmId(id)} (limit ${MAX_REDIRECT_HOPS})`);
|
|
72
|
+
}
|
|
73
|
+
function describeRedirect(followed) {
|
|
74
|
+
const first = followed.redirects[0];
|
|
75
|
+
if (!first) return null;
|
|
76
|
+
const from = packHmId(followed.id);
|
|
77
|
+
const to = packHmId(followed.targetId);
|
|
78
|
+
const via = followed.redirects.length > 1 ? ` (via ${followed.redirects.length} redirects)` : "";
|
|
79
|
+
if (first.republish) {
|
|
80
|
+
return `${from} republishes ${to}${via}: the content shown is the latest version of ${to}. To edit the shared original, write to ${to}. Writing to ${from} replaces the republish with an independent copy that no longer follows ${to}.`;
|
|
81
|
+
}
|
|
82
|
+
return `${from} has moved to ${to}${via}: the content shown is the latest version of ${to}. Write to ${to}. Writing to ${from} would revive it as an independent copy that no longer follows ${to}.`;
|
|
83
|
+
}
|
|
84
|
+
async function followToDocument(client, id) {
|
|
85
|
+
const followed = await followRedirects(client, id);
|
|
86
|
+
const first = followed.redirects[0];
|
|
87
|
+
if (followed.resource.type !== "document") {
|
|
88
|
+
throw new Error(
|
|
89
|
+
`Cannot edit ${packHmId(followed.targetId)}: resource is ${followed.resource.type}` + (first ? ` (followed redirect from ${packHmId(id)})` : "")
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
id,
|
|
94
|
+
targetId: followed.targetId,
|
|
95
|
+
document: followed.resource.document,
|
|
96
|
+
redirect: first ? { republish: first.republish, target: first.to } : null
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
async function resolveEditableDocument(client, id) {
|
|
100
|
+
const followed = await followToDocument(client, id);
|
|
101
|
+
const state = await resolveDocumentState(client, packHmId(followed.targetId));
|
|
102
|
+
return { ...followed, state };
|
|
103
|
+
}
|
|
54
104
|
function computeDepths(changesResp) {
|
|
55
105
|
const depthMap = /* @__PURE__ */ new Map();
|
|
56
106
|
const depsMap = /* @__PURE__ */ new Map();
|
|
@@ -98,5 +148,9 @@ function computeDepths(changesResp) {
|
|
|
98
148
|
}
|
|
99
149
|
|
|
100
150
|
export {
|
|
101
|
-
resolveDocumentState
|
|
151
|
+
resolveDocumentState,
|
|
152
|
+
followRedirects,
|
|
153
|
+
describeRedirect,
|
|
154
|
+
followToDocument,
|
|
155
|
+
resolveEditableDocument
|
|
102
156
|
};
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
} from "./chunk-PJ2RFT5A.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveDocumentState
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BZ4AXNSZ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
entityQueryPathToHmIdPath,
|
|
13
13
|
packHmId,
|
|
14
14
|
unpackHmId
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-W3FLBRBH.mjs";
|
|
16
16
|
|
|
17
17
|
// src/auto-link.ts
|
|
18
18
|
import { CID } from "multiformats/cid";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
entityQueryPathToHmIdPath,
|
|
3
3
|
parseFragment,
|
|
4
4
|
unpackHmId
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-W3FLBRBH.mjs";
|
|
6
6
|
|
|
7
7
|
// src/hm-resolver.ts
|
|
8
8
|
async function resolveHypermediaUrl(url, opts) {
|
|
@@ -32,14 +32,14 @@ async function resolveHypermediaUrl(url, opts) {
|
|
|
32
32
|
}
|
|
33
33
|
if ((opts == null ? void 0 : opts.domainResolver) && parsedUrl) {
|
|
34
34
|
try {
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
const resolved = await resolveFromDomainResolver(opts.domainResolver, url, parsedUrl, {
|
|
36
|
+
latest,
|
|
37
|
+
blockRef,
|
|
38
|
+
blockRange,
|
|
39
|
+
panel
|
|
40
|
+
});
|
|
41
|
+
if (resolved) {
|
|
42
|
+
return resolved;
|
|
43
43
|
}
|
|
44
44
|
} catch {
|
|
45
45
|
}
|
|
@@ -52,14 +52,14 @@ async function resolveHypermediaUrl(url, opts) {
|
|
|
52
52
|
} catch (error) {
|
|
53
53
|
if ((opts == null ? void 0 : opts.domainResolver) && parsedUrl) {
|
|
54
54
|
try {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
const resolved = await resolveFromDomainResolver(opts.domainResolver, url, parsedUrl, {
|
|
56
|
+
latest,
|
|
57
|
+
blockRef,
|
|
58
|
+
blockRange,
|
|
59
|
+
panel
|
|
60
|
+
});
|
|
61
|
+
if (resolved) {
|
|
62
|
+
return resolved;
|
|
63
63
|
}
|
|
64
64
|
} catch {
|
|
65
65
|
}
|
|
@@ -123,6 +123,26 @@ async function resolveId(input, opts) {
|
|
|
123
123
|
}
|
|
124
124
|
throw new Error(`Invalid Hypermedia ID: ${input}`);
|
|
125
125
|
}
|
|
126
|
+
async function resolveFromDomainResolver(domainResolver, url, parsedUrl, opts) {
|
|
127
|
+
const domainResolution = await domainResolver(parsedUrl.hostname);
|
|
128
|
+
const uid = typeof domainResolution === "string" ? domainResolution : (domainResolution == null ? void 0 : domainResolution.registeredAccountUid) ?? null;
|
|
129
|
+
if (!uid) return null;
|
|
130
|
+
const isGateway = typeof domainResolution === "object" && !!(domainResolution == null ? void 0 : domainResolution.isGateway);
|
|
131
|
+
const gatewayHmId = isGateway && parsedUrl.pathname.startsWith("/hm/") ? unpackHmId(url) : null;
|
|
132
|
+
if (gatewayHmId) {
|
|
133
|
+
return {
|
|
134
|
+
id: gatewayHmId.id,
|
|
135
|
+
hmId: gatewayHmId,
|
|
136
|
+
version: gatewayHmId.version,
|
|
137
|
+
title: null,
|
|
138
|
+
target: null,
|
|
139
|
+
authors: null,
|
|
140
|
+
type: null,
|
|
141
|
+
panel: opts.panel
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
return buildResolvedUrlFromDomainUid(parsedUrl, uid, opts);
|
|
145
|
+
}
|
|
126
146
|
function buildResolvedUrlFromDomainUid(parsedUrl, uid, {
|
|
127
147
|
latest,
|
|
128
148
|
blockRef,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QYA75XPV.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createSeedClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FUSG27NF.mjs";
|
|
7
7
|
import {
|
|
8
8
|
unpackHmId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-W3FLBRBH.mjs";
|
|
10
10
|
|
|
11
11
|
// src/resource-read.ts
|
|
12
12
|
async function resolveIdWithClient(rawId, options = {}) {
|
|
@@ -1135,6 +1135,7 @@ var HMDomainInfoSchema = z.object({
|
|
|
1135
1135
|
lastSuccess: z.date().nullable(),
|
|
1136
1136
|
registeredAccountUid: z.string().nullable(),
|
|
1137
1137
|
peerId: z.string().nullable(),
|
|
1138
|
+
isGateway: z.boolean(),
|
|
1138
1139
|
lastError: z.string().nullable()
|
|
1139
1140
|
});
|
|
1140
1141
|
var HMGetDomainInputSchema = z.object({
|
package/dist/client.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSeedClient,
|
|
3
3
|
deserializeQueryString
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FUSG27NF.mjs";
|
|
5
5
|
import "./chunk-CBELM7KX.mjs";
|
|
6
6
|
import "./chunk-JT57MV7Y.mjs";
|
|
7
7
|
import "./chunk-PJ2RFT5A.mjs";
|
|
8
8
|
import "./chunk-LVAHHQIK.mjs";
|
|
9
9
|
import "./chunk-DR3HJ6BV.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-W3FLBRBH.mjs";
|
|
11
11
|
import "./chunk-7P6ASYW6.mjs";
|
|
12
12
|
export {
|
|
13
13
|
createSeedClient,
|
package/dist/comment.mjs
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
deleteComment,
|
|
5
5
|
trimTrailingEmptyBlocks,
|
|
6
6
|
updateComment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KY6WRGXY.mjs";
|
|
8
8
|
import "./chunk-N3P7S5YZ.mjs";
|
|
9
9
|
import "./chunk-LVAHHQIK.mjs";
|
|
10
10
|
import "./chunk-DR3HJ6BV.mjs";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-W3FLBRBH.mjs";
|
|
12
12
|
import "./chunk-7P6ASYW6.mjs";
|
|
13
13
|
export {
|
|
14
14
|
commentRecordIdFromBlob,
|
package/dist/document-state.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* genesis has depth 0, each subsequent change has depth = max(dep depths) + 1.
|
|
7
7
|
*/
|
|
8
8
|
import type { SeedClient } from './client';
|
|
9
|
+
import type { HMDocument, HMResource, UnpackedHypermediaId } from './hm-types';
|
|
9
10
|
/** The resolved state of a document's change DAG. */
|
|
10
11
|
export type DocumentState = {
|
|
11
12
|
/** CID of the genesis change blob. */
|
|
@@ -21,3 +22,82 @@ export type DocumentState = {
|
|
|
21
22
|
* Resolves the current document state including head depth.
|
|
22
23
|
*/
|
|
23
24
|
export declare function resolveDocumentState(client: SeedClient, targetId: string): Promise<DocumentState>;
|
|
25
|
+
/** A document address resolved through redirects to the document it currently presents. */
|
|
26
|
+
export type FollowedDocument = {
|
|
27
|
+
/** The address that was resolved — where a new Ref should be published to affect this path. */
|
|
28
|
+
id: UnpackedHypermediaId;
|
|
29
|
+
/** Where the document actually lives after following redirects (same as `id` for a plain document). */
|
|
30
|
+
targetId: UnpackedHypermediaId;
|
|
31
|
+
/** The current document at the target — the content baseline for edits, forks, and moves. */
|
|
32
|
+
document: HMDocument;
|
|
33
|
+
/**
|
|
34
|
+
* Non-null when `id` currently holds a redirect Ref. Publishing a Version Ref at `id` with the
|
|
35
|
+
* target's genesis and a fresh (current-timestamp) generation replaces the redirect: the path
|
|
36
|
+
* becomes a live document continuing the target's change history, and stops following the target.
|
|
37
|
+
*/
|
|
38
|
+
redirect: {
|
|
39
|
+
republish: boolean;
|
|
40
|
+
target: UnpackedHypermediaId;
|
|
41
|
+
} | null;
|
|
42
|
+
};
|
|
43
|
+
/** The full baseline needed to build a new Change at an address: {@link FollowedDocument} plus DAG state. */
|
|
44
|
+
export type EditableDocumentBase = FollowedDocument & {
|
|
45
|
+
/** Change-DAG state of the target (genesis/heads/depth) for building the next Change. */
|
|
46
|
+
state: DocumentState;
|
|
47
|
+
};
|
|
48
|
+
/** One redirect Ref that was followed while resolving an address. */
|
|
49
|
+
export type RedirectHop = {
|
|
50
|
+
/** The address holding the redirect Ref. */
|
|
51
|
+
from: UnpackedHypermediaId;
|
|
52
|
+
/** Where it points. */
|
|
53
|
+
to: UnpackedHypermediaId;
|
|
54
|
+
/**
|
|
55
|
+
* `true` for a "republish" redirect (the path re-publishes the target's latest content as its
|
|
56
|
+
* own), `false` for a move redirect (the path has moved away).
|
|
57
|
+
*/
|
|
58
|
+
republish: boolean;
|
|
59
|
+
};
|
|
60
|
+
/** A resource read through any redirect Refs on the way, plus the trail of redirects followed. */
|
|
61
|
+
export type FollowedResource = {
|
|
62
|
+
/** The address that was asked for. */
|
|
63
|
+
id: UnpackedHypermediaId;
|
|
64
|
+
/** The address the resource was actually read from (equals `id` when nothing was followed). */
|
|
65
|
+
targetId: UnpackedHypermediaId;
|
|
66
|
+
/** The resource at `targetId` — never a redirect. */
|
|
67
|
+
resource: Exclude<HMResource, {
|
|
68
|
+
type: 'redirect';
|
|
69
|
+
}>;
|
|
70
|
+
/** Every redirect followed, in order. Empty when `id` holds no redirect. */
|
|
71
|
+
redirects: RedirectHop[];
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Reads the resource at an address, following redirect Refs (bounded, cycle-safe) and reporting
|
|
75
|
+
* every hop that was taken.
|
|
76
|
+
*
|
|
77
|
+
* Readers that follow redirects must never present the result as if it lived at the requested
|
|
78
|
+
* address: the content belongs to `targetId`, and a write to `id` behaves differently from a write
|
|
79
|
+
* to `targetId` (see {@link describeRedirect}). Callers surface `redirects` to the user or agent.
|
|
80
|
+
*/
|
|
81
|
+
export declare function followRedirects(client: SeedClient, id: UnpackedHypermediaId): Promise<FollowedResource>;
|
|
82
|
+
/**
|
|
83
|
+
* One plain sentence explaining a followed redirect and what a write to either address does —
|
|
84
|
+
* shared by the CLI and the agents read tool so every surface tells the same story.
|
|
85
|
+
*/
|
|
86
|
+
export declare function describeRedirect(followed: Pick<FollowedResource, 'id' | 'targetId' | 'redirects'>): string | null;
|
|
87
|
+
/**
|
|
88
|
+
* Resolves an address to the document it currently presents, following redirect Refs.
|
|
89
|
+
*
|
|
90
|
+
* A path that holds a redirect Ref (including a "republish" redirect, which re-publishes the
|
|
91
|
+
* target's latest content at this path) has no document of its own: the `Resource` API reports
|
|
92
|
+
* `type: 'redirect'`. Operations on such a path (edit, fork, move, delete) act on the redirect
|
|
93
|
+
* target's document, so this follows the chain (bounded, cycle-safe) to that document.
|
|
94
|
+
*/
|
|
95
|
+
export declare function followToDocument(client: SeedClient, id: UnpackedHypermediaId): Promise<FollowedDocument>;
|
|
96
|
+
/**
|
|
97
|
+
* Resolves an address to the state needed to edit the document there, following redirects.
|
|
98
|
+
*
|
|
99
|
+
* Edits at a redirected address must build the Change on the redirect target's DAG (the source
|
|
100
|
+
* path has no changes of its own — `ListChanges` returns nothing for it) and publish a Version
|
|
101
|
+
* Ref at the source path with a fresh generation, which supersedes the redirect Ref.
|
|
102
|
+
*/
|
|
103
|
+
export declare function resolveEditableDocument(client: SeedClient, id: UnpackedHypermediaId): Promise<EditableDocumentBase>;
|
package/dist/document-state.mjs
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
describeRedirect,
|
|
3
|
+
followRedirects,
|
|
4
|
+
followToDocument,
|
|
5
|
+
resolveDocumentState,
|
|
6
|
+
resolveEditableDocument
|
|
7
|
+
} from "./chunk-BZ4AXNSZ.mjs";
|
|
8
|
+
import "./chunk-W3FLBRBH.mjs";
|
|
5
9
|
import "./chunk-7P6ASYW6.mjs";
|
|
6
10
|
export {
|
|
7
|
-
|
|
11
|
+
describeRedirect,
|
|
12
|
+
followRedirects,
|
|
13
|
+
followToDocument,
|
|
14
|
+
resolveDocumentState,
|
|
15
|
+
resolveEditableDocument
|
|
8
16
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
editorBlockToHMBlock,
|
|
3
3
|
editorBlocksToHMBlockNodes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4L2LE3JW.mjs";
|
|
5
5
|
import "./chunk-N3P7S5YZ.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-W3FLBRBH.mjs";
|
|
7
7
|
import "./chunk-7P6ASYW6.mjs";
|
|
8
8
|
export {
|
|
9
9
|
editorBlockToHMBlock,
|
package/dist/hm-resolver.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { type UnpackedHypermediaId } from './hm-types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Domain metadata from the daemon's domain store. The string form is kept
|
|
4
|
+
* for older/simple resolvers that only return an account UID.
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type DomainResolution = string | {
|
|
7
|
+
registeredAccountUid: string;
|
|
8
|
+
isGateway?: boolean;
|
|
9
|
+
} | null;
|
|
10
|
+
export type DomainResolverFn = (hostname: string) => Promise<DomainResolution>;
|
|
7
11
|
/**
|
|
8
12
|
* Callback fired when a background domain check detects that a domain
|
|
9
13
|
* now points to a different account UID than what was cached.
|
package/dist/hm-resolver.mjs
CHANGED
package/dist/hm-types.d.ts
CHANGED
|
@@ -36388,11 +36388,13 @@ export declare const HMDomainInfoSchema: z.ZodObject<{
|
|
|
36388
36388
|
lastSuccess: z.ZodNullable<z.ZodDate>;
|
|
36389
36389
|
registeredAccountUid: z.ZodNullable<z.ZodString>;
|
|
36390
36390
|
peerId: z.ZodNullable<z.ZodString>;
|
|
36391
|
+
isGateway: z.ZodBoolean;
|
|
36391
36392
|
lastError: z.ZodNullable<z.ZodString>;
|
|
36392
36393
|
}, "strip", z.ZodTypeAny, {
|
|
36393
36394
|
status: string;
|
|
36394
36395
|
peerId: string | null;
|
|
36395
36396
|
registeredAccountUid: string | null;
|
|
36397
|
+
isGateway: boolean;
|
|
36396
36398
|
domain: string;
|
|
36397
36399
|
lastCheck: Date | null;
|
|
36398
36400
|
lastSuccess: Date | null;
|
|
@@ -36401,6 +36403,7 @@ export declare const HMDomainInfoSchema: z.ZodObject<{
|
|
|
36401
36403
|
status: string;
|
|
36402
36404
|
peerId: string | null;
|
|
36403
36405
|
registeredAccountUid: string | null;
|
|
36406
|
+
isGateway: boolean;
|
|
36404
36407
|
domain: string;
|
|
36405
36408
|
lastCheck: Date | null;
|
|
36406
36409
|
lastSuccess: Date | null;
|
|
@@ -36439,11 +36442,13 @@ export declare const HMGetDomainRequestSchema: z.ZodObject<{
|
|
|
36439
36442
|
lastSuccess: z.ZodNullable<z.ZodDate>;
|
|
36440
36443
|
registeredAccountUid: z.ZodNullable<z.ZodString>;
|
|
36441
36444
|
peerId: z.ZodNullable<z.ZodString>;
|
|
36445
|
+
isGateway: z.ZodBoolean;
|
|
36442
36446
|
lastError: z.ZodNullable<z.ZodString>;
|
|
36443
36447
|
}, "strip", z.ZodTypeAny, {
|
|
36444
36448
|
status: string;
|
|
36445
36449
|
peerId: string | null;
|
|
36446
36450
|
registeredAccountUid: string | null;
|
|
36451
|
+
isGateway: boolean;
|
|
36447
36452
|
domain: string;
|
|
36448
36453
|
lastCheck: Date | null;
|
|
36449
36454
|
lastSuccess: Date | null;
|
|
@@ -36452,6 +36457,7 @@ export declare const HMGetDomainRequestSchema: z.ZodObject<{
|
|
|
36452
36457
|
status: string;
|
|
36453
36458
|
peerId: string | null;
|
|
36454
36459
|
registeredAccountUid: string | null;
|
|
36460
|
+
isGateway: boolean;
|
|
36455
36461
|
domain: string;
|
|
36456
36462
|
lastCheck: Date | null;
|
|
36457
36463
|
lastSuccess: Date | null;
|
|
@@ -36467,6 +36473,7 @@ export declare const HMGetDomainRequestSchema: z.ZodObject<{
|
|
|
36467
36473
|
status: string;
|
|
36468
36474
|
peerId: string | null;
|
|
36469
36475
|
registeredAccountUid: string | null;
|
|
36476
|
+
isGateway: boolean;
|
|
36470
36477
|
domain: string;
|
|
36471
36478
|
lastCheck: Date | null;
|
|
36472
36479
|
lastSuccess: Date | null;
|
|
@@ -36482,6 +36489,7 @@ export declare const HMGetDomainRequestSchema: z.ZodObject<{
|
|
|
36482
36489
|
status: string;
|
|
36483
36490
|
peerId: string | null;
|
|
36484
36491
|
registeredAccountUid: string | null;
|
|
36492
|
+
isGateway: boolean;
|
|
36485
36493
|
domain: string;
|
|
36486
36494
|
lastCheck: Date | null;
|
|
36487
36495
|
lastSuccess: Date | null;
|
|
@@ -36499,11 +36507,13 @@ export declare const HMListDomainsOutputSchema: z.ZodObject<{
|
|
|
36499
36507
|
lastSuccess: z.ZodNullable<z.ZodDate>;
|
|
36500
36508
|
registeredAccountUid: z.ZodNullable<z.ZodString>;
|
|
36501
36509
|
peerId: z.ZodNullable<z.ZodString>;
|
|
36510
|
+
isGateway: z.ZodBoolean;
|
|
36502
36511
|
lastError: z.ZodNullable<z.ZodString>;
|
|
36503
36512
|
}, "strip", z.ZodTypeAny, {
|
|
36504
36513
|
status: string;
|
|
36505
36514
|
peerId: string | null;
|
|
36506
36515
|
registeredAccountUid: string | null;
|
|
36516
|
+
isGateway: boolean;
|
|
36507
36517
|
domain: string;
|
|
36508
36518
|
lastCheck: Date | null;
|
|
36509
36519
|
lastSuccess: Date | null;
|
|
@@ -36512,6 +36522,7 @@ export declare const HMListDomainsOutputSchema: z.ZodObject<{
|
|
|
36512
36522
|
status: string;
|
|
36513
36523
|
peerId: string | null;
|
|
36514
36524
|
registeredAccountUid: string | null;
|
|
36525
|
+
isGateway: boolean;
|
|
36515
36526
|
domain: string;
|
|
36516
36527
|
lastCheck: Date | null;
|
|
36517
36528
|
lastSuccess: Date | null;
|
|
@@ -36522,6 +36533,7 @@ export declare const HMListDomainsOutputSchema: z.ZodObject<{
|
|
|
36522
36533
|
status: string;
|
|
36523
36534
|
peerId: string | null;
|
|
36524
36535
|
registeredAccountUid: string | null;
|
|
36536
|
+
isGateway: boolean;
|
|
36525
36537
|
domain: string;
|
|
36526
36538
|
lastCheck: Date | null;
|
|
36527
36539
|
lastSuccess: Date | null;
|
|
@@ -36532,6 +36544,7 @@ export declare const HMListDomainsOutputSchema: z.ZodObject<{
|
|
|
36532
36544
|
status: string;
|
|
36533
36545
|
peerId: string | null;
|
|
36534
36546
|
registeredAccountUid: string | null;
|
|
36547
|
+
isGateway: boolean;
|
|
36535
36548
|
domain: string;
|
|
36536
36549
|
lastCheck: Date | null;
|
|
36537
36550
|
lastSuccess: Date | null;
|
|
@@ -36550,11 +36563,13 @@ export declare const HMListDomainsRequestSchema: z.ZodObject<{
|
|
|
36550
36563
|
lastSuccess: z.ZodNullable<z.ZodDate>;
|
|
36551
36564
|
registeredAccountUid: z.ZodNullable<z.ZodString>;
|
|
36552
36565
|
peerId: z.ZodNullable<z.ZodString>;
|
|
36566
|
+
isGateway: z.ZodBoolean;
|
|
36553
36567
|
lastError: z.ZodNullable<z.ZodString>;
|
|
36554
36568
|
}, "strip", z.ZodTypeAny, {
|
|
36555
36569
|
status: string;
|
|
36556
36570
|
peerId: string | null;
|
|
36557
36571
|
registeredAccountUid: string | null;
|
|
36572
|
+
isGateway: boolean;
|
|
36558
36573
|
domain: string;
|
|
36559
36574
|
lastCheck: Date | null;
|
|
36560
36575
|
lastSuccess: Date | null;
|
|
@@ -36563,6 +36578,7 @@ export declare const HMListDomainsRequestSchema: z.ZodObject<{
|
|
|
36563
36578
|
status: string;
|
|
36564
36579
|
peerId: string | null;
|
|
36565
36580
|
registeredAccountUid: string | null;
|
|
36581
|
+
isGateway: boolean;
|
|
36566
36582
|
domain: string;
|
|
36567
36583
|
lastCheck: Date | null;
|
|
36568
36584
|
lastSuccess: Date | null;
|
|
@@ -36573,6 +36589,7 @@ export declare const HMListDomainsRequestSchema: z.ZodObject<{
|
|
|
36573
36589
|
status: string;
|
|
36574
36590
|
peerId: string | null;
|
|
36575
36591
|
registeredAccountUid: string | null;
|
|
36592
|
+
isGateway: boolean;
|
|
36576
36593
|
domain: string;
|
|
36577
36594
|
lastCheck: Date | null;
|
|
36578
36595
|
lastSuccess: Date | null;
|
|
@@ -36583,6 +36600,7 @@ export declare const HMListDomainsRequestSchema: z.ZodObject<{
|
|
|
36583
36600
|
status: string;
|
|
36584
36601
|
peerId: string | null;
|
|
36585
36602
|
registeredAccountUid: string | null;
|
|
36603
|
+
isGateway: boolean;
|
|
36586
36604
|
domain: string;
|
|
36587
36605
|
lastCheck: Date | null;
|
|
36588
36606
|
lastSuccess: Date | null;
|
|
@@ -36597,6 +36615,7 @@ export declare const HMListDomainsRequestSchema: z.ZodObject<{
|
|
|
36597
36615
|
status: string;
|
|
36598
36616
|
peerId: string | null;
|
|
36599
36617
|
registeredAccountUid: string | null;
|
|
36618
|
+
isGateway: boolean;
|
|
36600
36619
|
domain: string;
|
|
36601
36620
|
lastCheck: Date | null;
|
|
36602
36621
|
lastSuccess: Date | null;
|
|
@@ -36611,6 +36630,7 @@ export declare const HMListDomainsRequestSchema: z.ZodObject<{
|
|
|
36611
36630
|
status: string;
|
|
36612
36631
|
peerId: string | null;
|
|
36613
36632
|
registeredAccountUid: string | null;
|
|
36633
|
+
isGateway: boolean;
|
|
36614
36634
|
domain: string;
|
|
36615
36635
|
lastCheck: Date | null;
|
|
36616
36636
|
lastSuccess: Date | null;
|
|
@@ -49288,11 +49308,13 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49288
49308
|
lastSuccess: z.ZodNullable<z.ZodDate>;
|
|
49289
49309
|
registeredAccountUid: z.ZodNullable<z.ZodString>;
|
|
49290
49310
|
peerId: z.ZodNullable<z.ZodString>;
|
|
49311
|
+
isGateway: z.ZodBoolean;
|
|
49291
49312
|
lastError: z.ZodNullable<z.ZodString>;
|
|
49292
49313
|
}, "strip", z.ZodTypeAny, {
|
|
49293
49314
|
status: string;
|
|
49294
49315
|
peerId: string | null;
|
|
49295
49316
|
registeredAccountUid: string | null;
|
|
49317
|
+
isGateway: boolean;
|
|
49296
49318
|
domain: string;
|
|
49297
49319
|
lastCheck: Date | null;
|
|
49298
49320
|
lastSuccess: Date | null;
|
|
@@ -49301,6 +49323,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49301
49323
|
status: string;
|
|
49302
49324
|
peerId: string | null;
|
|
49303
49325
|
registeredAccountUid: string | null;
|
|
49326
|
+
isGateway: boolean;
|
|
49304
49327
|
domain: string;
|
|
49305
49328
|
lastCheck: Date | null;
|
|
49306
49329
|
lastSuccess: Date | null;
|
|
@@ -49316,6 +49339,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49316
49339
|
status: string;
|
|
49317
49340
|
peerId: string | null;
|
|
49318
49341
|
registeredAccountUid: string | null;
|
|
49342
|
+
isGateway: boolean;
|
|
49319
49343
|
domain: string;
|
|
49320
49344
|
lastCheck: Date | null;
|
|
49321
49345
|
lastSuccess: Date | null;
|
|
@@ -49331,6 +49355,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49331
49355
|
status: string;
|
|
49332
49356
|
peerId: string | null;
|
|
49333
49357
|
registeredAccountUid: string | null;
|
|
49358
|
+
isGateway: boolean;
|
|
49334
49359
|
domain: string;
|
|
49335
49360
|
lastCheck: Date | null;
|
|
49336
49361
|
lastSuccess: Date | null;
|
|
@@ -49347,11 +49372,13 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49347
49372
|
lastSuccess: z.ZodNullable<z.ZodDate>;
|
|
49348
49373
|
registeredAccountUid: z.ZodNullable<z.ZodString>;
|
|
49349
49374
|
peerId: z.ZodNullable<z.ZodString>;
|
|
49375
|
+
isGateway: z.ZodBoolean;
|
|
49350
49376
|
lastError: z.ZodNullable<z.ZodString>;
|
|
49351
49377
|
}, "strip", z.ZodTypeAny, {
|
|
49352
49378
|
status: string;
|
|
49353
49379
|
peerId: string | null;
|
|
49354
49380
|
registeredAccountUid: string | null;
|
|
49381
|
+
isGateway: boolean;
|
|
49355
49382
|
domain: string;
|
|
49356
49383
|
lastCheck: Date | null;
|
|
49357
49384
|
lastSuccess: Date | null;
|
|
@@ -49360,6 +49387,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49360
49387
|
status: string;
|
|
49361
49388
|
peerId: string | null;
|
|
49362
49389
|
registeredAccountUid: string | null;
|
|
49390
|
+
isGateway: boolean;
|
|
49363
49391
|
domain: string;
|
|
49364
49392
|
lastCheck: Date | null;
|
|
49365
49393
|
lastSuccess: Date | null;
|
|
@@ -49370,6 +49398,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49370
49398
|
status: string;
|
|
49371
49399
|
peerId: string | null;
|
|
49372
49400
|
registeredAccountUid: string | null;
|
|
49401
|
+
isGateway: boolean;
|
|
49373
49402
|
domain: string;
|
|
49374
49403
|
lastCheck: Date | null;
|
|
49375
49404
|
lastSuccess: Date | null;
|
|
@@ -49380,6 +49409,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49380
49409
|
status: string;
|
|
49381
49410
|
peerId: string | null;
|
|
49382
49411
|
registeredAccountUid: string | null;
|
|
49412
|
+
isGateway: boolean;
|
|
49383
49413
|
domain: string;
|
|
49384
49414
|
lastCheck: Date | null;
|
|
49385
49415
|
lastSuccess: Date | null;
|
|
@@ -49394,6 +49424,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49394
49424
|
status: string;
|
|
49395
49425
|
peerId: string | null;
|
|
49396
49426
|
registeredAccountUid: string | null;
|
|
49427
|
+
isGateway: boolean;
|
|
49397
49428
|
domain: string;
|
|
49398
49429
|
lastCheck: Date | null;
|
|
49399
49430
|
lastSuccess: Date | null;
|
|
@@ -49408,6 +49439,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
|
|
|
49408
49439
|
status: string;
|
|
49409
49440
|
peerId: string | null;
|
|
49410
49441
|
registeredAccountUid: string | null;
|
|
49442
|
+
isGateway: boolean;
|
|
49411
49443
|
domain: string;
|
|
49412
49444
|
lastCheck: Date | null;
|
|
49413
49445
|
lastSuccess: Date | null;
|
|
@@ -62821,11 +62853,13 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62821
62853
|
lastSuccess: z.ZodNullable<z.ZodDate>;
|
|
62822
62854
|
registeredAccountUid: z.ZodNullable<z.ZodString>;
|
|
62823
62855
|
peerId: z.ZodNullable<z.ZodString>;
|
|
62856
|
+
isGateway: z.ZodBoolean;
|
|
62824
62857
|
lastError: z.ZodNullable<z.ZodString>;
|
|
62825
62858
|
}, "strip", z.ZodTypeAny, {
|
|
62826
62859
|
status: string;
|
|
62827
62860
|
peerId: string | null;
|
|
62828
62861
|
registeredAccountUid: string | null;
|
|
62862
|
+
isGateway: boolean;
|
|
62829
62863
|
domain: string;
|
|
62830
62864
|
lastCheck: Date | null;
|
|
62831
62865
|
lastSuccess: Date | null;
|
|
@@ -62834,6 +62868,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62834
62868
|
status: string;
|
|
62835
62869
|
peerId: string | null;
|
|
62836
62870
|
registeredAccountUid: string | null;
|
|
62871
|
+
isGateway: boolean;
|
|
62837
62872
|
domain: string;
|
|
62838
62873
|
lastCheck: Date | null;
|
|
62839
62874
|
lastSuccess: Date | null;
|
|
@@ -62849,6 +62884,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62849
62884
|
status: string;
|
|
62850
62885
|
peerId: string | null;
|
|
62851
62886
|
registeredAccountUid: string | null;
|
|
62887
|
+
isGateway: boolean;
|
|
62852
62888
|
domain: string;
|
|
62853
62889
|
lastCheck: Date | null;
|
|
62854
62890
|
lastSuccess: Date | null;
|
|
@@ -62864,6 +62900,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62864
62900
|
status: string;
|
|
62865
62901
|
peerId: string | null;
|
|
62866
62902
|
registeredAccountUid: string | null;
|
|
62903
|
+
isGateway: boolean;
|
|
62867
62904
|
domain: string;
|
|
62868
62905
|
lastCheck: Date | null;
|
|
62869
62906
|
lastSuccess: Date | null;
|
|
@@ -62880,11 +62917,13 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62880
62917
|
lastSuccess: z.ZodNullable<z.ZodDate>;
|
|
62881
62918
|
registeredAccountUid: z.ZodNullable<z.ZodString>;
|
|
62882
62919
|
peerId: z.ZodNullable<z.ZodString>;
|
|
62920
|
+
isGateway: z.ZodBoolean;
|
|
62883
62921
|
lastError: z.ZodNullable<z.ZodString>;
|
|
62884
62922
|
}, "strip", z.ZodTypeAny, {
|
|
62885
62923
|
status: string;
|
|
62886
62924
|
peerId: string | null;
|
|
62887
62925
|
registeredAccountUid: string | null;
|
|
62926
|
+
isGateway: boolean;
|
|
62888
62927
|
domain: string;
|
|
62889
62928
|
lastCheck: Date | null;
|
|
62890
62929
|
lastSuccess: Date | null;
|
|
@@ -62893,6 +62932,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62893
62932
|
status: string;
|
|
62894
62933
|
peerId: string | null;
|
|
62895
62934
|
registeredAccountUid: string | null;
|
|
62935
|
+
isGateway: boolean;
|
|
62896
62936
|
domain: string;
|
|
62897
62937
|
lastCheck: Date | null;
|
|
62898
62938
|
lastSuccess: Date | null;
|
|
@@ -62903,6 +62943,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62903
62943
|
status: string;
|
|
62904
62944
|
peerId: string | null;
|
|
62905
62945
|
registeredAccountUid: string | null;
|
|
62946
|
+
isGateway: boolean;
|
|
62906
62947
|
domain: string;
|
|
62907
62948
|
lastCheck: Date | null;
|
|
62908
62949
|
lastSuccess: Date | null;
|
|
@@ -62913,6 +62954,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62913
62954
|
status: string;
|
|
62914
62955
|
peerId: string | null;
|
|
62915
62956
|
registeredAccountUid: string | null;
|
|
62957
|
+
isGateway: boolean;
|
|
62916
62958
|
domain: string;
|
|
62917
62959
|
lastCheck: Date | null;
|
|
62918
62960
|
lastSuccess: Date | null;
|
|
@@ -62927,6 +62969,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62927
62969
|
status: string;
|
|
62928
62970
|
peerId: string | null;
|
|
62929
62971
|
registeredAccountUid: string | null;
|
|
62972
|
+
isGateway: boolean;
|
|
62930
62973
|
domain: string;
|
|
62931
62974
|
lastCheck: Date | null;
|
|
62932
62975
|
lastSuccess: Date | null;
|
|
@@ -62941,6 +62984,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
|
|
|
62941
62984
|
status: string;
|
|
62942
62985
|
peerId: string | null;
|
|
62943
62986
|
registeredAccountUid: string | null;
|
|
62987
|
+
isGateway: boolean;
|
|
62944
62988
|
domain: string;
|
|
62945
62989
|
lastCheck: Date | null;
|
|
62946
62990
|
lastSuccess: Date | null;
|
package/dist/hm-types.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
annotationContains,
|
|
3
3
|
hmBlockToEditorBlock,
|
|
4
4
|
hmBlocksToEditorContent
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-NUIZU7KO.mjs";
|
|
6
|
+
import "./chunk-W3FLBRBH.mjs";
|
|
7
7
|
import "./chunk-7P6ASYW6.mjs";
|
|
8
8
|
export {
|
|
9
9
|
annotationContains,
|
package/dist/index.d.ts
CHANGED
|
@@ -39,8 +39,8 @@ export { createBlocksMap, matchBlockIds, computeReplaceOps, hmBlockNodeToBlockNo
|
|
|
39
39
|
export type { APIBlockNode, APIBlock } from './block-diff';
|
|
40
40
|
export { autoLinkChildToParent, createAutoLinkOps, documentContainsLinkToChild, documentHasSelfQuery, shouldAutoLinkParent, } from './auto-link';
|
|
41
41
|
export type { AutoLinkChildToParentOptions } from './auto-link';
|
|
42
|
-
export { resolveDocumentState } from './document-state';
|
|
43
|
-
export type { DocumentState } from './document-state';
|
|
42
|
+
export { describeRedirect, followRedirects, followToDocument, resolveDocumentState, resolveEditableDocument, } from './document-state';
|
|
43
|
+
export type { DocumentState, EditableDocumentBase, FollowedDocument, FollowedResource, RedirectHop, } from './document-state';
|
|
44
44
|
export { editorBlockToHMBlock, editorBlocksToHMBlockNodes } from './editorblock-to-hmblock';
|
|
45
45
|
export { hmBlocksToEditorContent, hmBlockToEditorBlock, annotationContains } from './hmblock-to-editorblock';
|
|
46
46
|
export { AnnotationSet, addSpanToAnnotation, pushSpanToAnnotation } from './unicode';
|
package/dist/index.mjs
CHANGED
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
} from "./chunk-H7L4TI6X.mjs";
|
|
11
11
|
import {
|
|
12
12
|
pdfToBlocks
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FNETXNBK.mjs";
|
|
14
14
|
import {
|
|
15
15
|
teiToBlocks
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H34UYMNW.mjs";
|
|
17
17
|
import {
|
|
18
18
|
embeddedPdfToBlocks
|
|
19
19
|
} from "./chunk-52P3E6H6.mjs";
|
|
20
20
|
import {
|
|
21
21
|
resolveIdWithClient
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TXVEL22U.mjs";
|
|
23
23
|
import {
|
|
24
24
|
fileToIpfsBlobs,
|
|
25
25
|
filesToIpfsBlobs,
|
|
@@ -34,15 +34,15 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
resolveHypermediaUrl,
|
|
36
36
|
resolveId
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-QYA75XPV.mjs";
|
|
38
38
|
import {
|
|
39
39
|
annotationContains,
|
|
40
40
|
hmBlockToEditorBlock,
|
|
41
41
|
hmBlocksToEditorContent
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-NUIZU7KO.mjs";
|
|
43
43
|
import {
|
|
44
44
|
createSeedClient
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-FUSG27NF.mjs";
|
|
46
46
|
import {
|
|
47
47
|
SeedClientError,
|
|
48
48
|
SeedNetworkError,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
deleteComment,
|
|
55
55
|
trimTrailingEmptyBlocks,
|
|
56
56
|
updateComment
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-KY6WRGXY.mjs";
|
|
58
58
|
import {
|
|
59
59
|
contactRecordIdFromBlob,
|
|
60
60
|
createContact,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
editorBlockToHMBlock,
|
|
66
66
|
editorBlocksToHMBlockNodes
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-4L2LE3JW.mjs";
|
|
68
68
|
import {
|
|
69
69
|
AnnotationSet,
|
|
70
70
|
addSpanToAnnotation,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
documentContainsLinkToChild,
|
|
80
80
|
documentHasSelfQuery,
|
|
81
81
|
shouldAutoLinkParent
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-GYZGSI4H.mjs";
|
|
83
83
|
import {
|
|
84
84
|
createChange,
|
|
85
85
|
createChangeOps,
|
|
@@ -95,8 +95,12 @@ import {
|
|
|
95
95
|
createVersionRef
|
|
96
96
|
} from "./chunk-PJ2RFT5A.mjs";
|
|
97
97
|
import {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
describeRedirect,
|
|
99
|
+
followRedirects,
|
|
100
|
+
followToDocument,
|
|
101
|
+
resolveDocumentState,
|
|
102
|
+
resolveEditableDocument
|
|
103
|
+
} from "./chunk-BZ4AXNSZ.mjs";
|
|
100
104
|
import "./chunk-2MD3FXKB.mjs";
|
|
101
105
|
import {
|
|
102
106
|
computeReplaceOps,
|
|
@@ -115,11 +119,11 @@ import {
|
|
|
115
119
|
emitFrontmatter,
|
|
116
120
|
parseDraftFilename,
|
|
117
121
|
slugify
|
|
118
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-ALT5YCCW.mjs";
|
|
119
123
|
import {
|
|
120
124
|
createCapability,
|
|
121
125
|
resolveCapability
|
|
122
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-RL3OEUFZ.mjs";
|
|
123
127
|
import "./chunk-LVAHHQIK.mjs";
|
|
124
128
|
import "./chunk-IT5LLTMP.mjs";
|
|
125
129
|
import {
|
|
@@ -139,7 +143,7 @@ import {
|
|
|
139
143
|
parseFragment,
|
|
140
144
|
serializeBlockRange,
|
|
141
145
|
unpackHmId
|
|
142
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-W3FLBRBH.mjs";
|
|
143
147
|
import "./chunk-3TPCJCVO.mjs";
|
|
144
148
|
import "./chunk-7P6ASYW6.mjs";
|
|
145
149
|
export {
|
|
@@ -175,6 +179,7 @@ export {
|
|
|
175
179
|
createVersionRef,
|
|
176
180
|
deleteComment,
|
|
177
181
|
deleteContact,
|
|
182
|
+
describeRedirect,
|
|
178
183
|
documentContainsLinkToChild,
|
|
179
184
|
documentHasSelfQuery,
|
|
180
185
|
documentToResolvedMarkdown,
|
|
@@ -187,6 +192,8 @@ export {
|
|
|
187
192
|
fileToIpfsBlobs,
|
|
188
193
|
filesToIpfsBlobs,
|
|
189
194
|
flattenToOperations,
|
|
195
|
+
followRedirects,
|
|
196
|
+
followToDocument,
|
|
190
197
|
getHMQueryString,
|
|
191
198
|
hasFileLinks,
|
|
192
199
|
hmBlockNodeToBlockNode,
|
|
@@ -213,6 +220,7 @@ export {
|
|
|
213
220
|
rebindTableIdentities,
|
|
214
221
|
resolveCapability,
|
|
215
222
|
resolveDocumentState,
|
|
223
|
+
resolveEditableDocument,
|
|
216
224
|
resolveFileLinksInBlocks,
|
|
217
225
|
resolveHypermediaUrl,
|
|
218
226
|
resolveId,
|
package/dist/pdf-to-blocks.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pdfToBlocks
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-FNETXNBK.mjs";
|
|
4
|
+
import "./chunk-H34UYMNW.mjs";
|
|
5
5
|
import "./chunk-52P3E6H6.mjs";
|
|
6
6
|
import "./chunk-PPAY4WZX.mjs";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-W3FLBRBH.mjs";
|
|
8
8
|
import "./chunk-7P6ASYW6.mjs";
|
|
9
9
|
export {
|
|
10
10
|
pdfToBlocks
|
package/dist/resource-read.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveIdWithClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-TXVEL22U.mjs";
|
|
4
|
+
import "./chunk-QYA75XPV.mjs";
|
|
5
|
+
import "./chunk-FUSG27NF.mjs";
|
|
6
6
|
import "./chunk-CBELM7KX.mjs";
|
|
7
7
|
import "./chunk-JT57MV7Y.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-W3FLBRBH.mjs";
|
|
12
12
|
import "./chunk-7P6ASYW6.mjs";
|
|
13
13
|
export {
|
|
14
14
|
resolveIdWithClient
|
package/dist/tei-to-blocks.mjs
CHANGED
package/dist/unicode.mjs
CHANGED