@seed-hypermedia/client 0.0.106 → 0.0.108
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-P2FJTNNQ.mjs → chunk-4HFV2ZKM.mjs} +2 -2
- package/dist/{chunk-S4XBFD3S.mjs → chunk-4QESBHYW.mjs} +3 -3
- package/dist/{chunk-FFH7G6KW.mjs → chunk-52RP7HHW.mjs} +1 -1
- package/dist/{chunk-R6OYID6M.mjs → chunk-7HNJXR32.mjs} +1 -1
- package/dist/{chunk-KDI4WJKM.mjs → chunk-AADKT7A3.mjs} +1 -1
- package/dist/{chunk-GIKXPGFZ.mjs → chunk-E7LRAYKJ.mjs} +1 -1
- package/dist/{chunk-SKIKB2TP.mjs → chunk-HNCJHTB7.mjs} +20 -3
- package/dist/{chunk-4MZHSZFQ.mjs → chunk-IXF3MTOE.mjs} +7 -2
- package/dist/{chunk-UPYQNWW5.mjs → chunk-JS5GYEQ6.mjs} +1 -1
- package/dist/{chunk-NSNLRZ3X.mjs → chunk-RKCXRUMM.mjs} +1 -1
- package/dist/{chunk-MHICVQJI.mjs → chunk-UUPZ2NLC.mjs} +3 -3
- package/dist/{chunk-EZ5DM5TI.mjs → chunk-UWH2FAVV.mjs} +1 -1
- package/dist/{chunk-V5XCZMPG.mjs → chunk-VTRLILIX.mjs} +1 -1
- package/dist/{chunk-G6AYTCLG.mjs → chunk-WZEW53BF.mjs} +1 -1
- package/dist/chunk-Y5XKORRF.mjs +10 -0
- package/dist/{chunk-DQR4RPYC.mjs → chunk-ZS5HGCE2.mjs} +5 -1
- package/dist/client.mjs +2 -2
- package/dist/comment.mjs +2 -2
- package/dist/document-state.mjs +2 -2
- package/dist/editor-types.d.ts +2 -1
- package/dist/editorblock-to-hmblock.mjs +2 -2
- package/dist/hm-resolver.mjs +2 -2
- package/dist/hm-types.d.ts +283 -12
- package/dist/hm-types.mjs +3 -1
- package/dist/hmblock-to-editorblock.mjs +2 -2
- package/dist/index.mjs +13 -13
- package/dist/pdf-to-blocks.mjs +3 -3
- package/dist/resource-read.mjs +4 -4
- package/dist/schema-engine.mjs +2 -2
- package/dist/schema-registry.generated.mjs +1 -1
- package/dist/schema-resolve.mjs +4 -4
- package/dist/schema-subtypes.mjs +4 -4
- package/dist/schema-types.generated.d.ts +33 -0
- package/dist/signed-blob.mjs +2 -2
- package/dist/tei-to-blocks.mjs +2 -2
- package/dist/unicode.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZWKMAGDU.mjs +0 -10
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-4HFV2ZKM.mjs";
|
|
8
8
|
import "./chunk-O5MHN2EO.mjs";
|
|
9
9
|
import "./chunk-PJ2RFT5A.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-7HNJXR32.mjs";
|
|
11
11
|
import "./chunk-LVAHHQIK.mjs";
|
|
12
12
|
import "./chunk-DR3HJ6BV.mjs";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-HNCJHTB7.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-JS5GYEQ6.mjs";
|
|
11
|
+
import "./chunk-HNCJHTB7.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-AADKT7A3.mjs";
|
|
5
5
|
import "./chunk-LVAHHQIK.mjs";
|
|
6
6
|
import "./chunk-NBCHK76Q.mjs";
|
|
7
7
|
import "./chunk-DR3HJ6BV.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-HNCJHTB7.mjs";
|
|
9
9
|
import "./chunk-3TPCJCVO.mjs";
|
|
10
10
|
import "./chunk-7P6ASYW6.mjs";
|
|
11
11
|
export {
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
} from "./chunk-PJ2RFT5A.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveDocumentState
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7HNJXR32.mjs";
|
|
11
11
|
import {
|
|
12
12
|
entityQueryPathToHmIdPath,
|
|
13
13
|
packHmId,
|
|
14
14
|
unpackHmId
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HNCJHTB7.mjs";
|
|
16
16
|
|
|
17
17
|
// src/auto-link.ts
|
|
18
18
|
import { CID } from "multiformats/cid";
|
|
@@ -10,17 +10,17 @@ import {
|
|
|
10
10
|
schemaForCid,
|
|
11
11
|
structFields,
|
|
12
12
|
validate
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-52RP7HHW.mjs";
|
|
14
14
|
import {
|
|
15
15
|
HM_SCHEMAS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Y5XKORRF.mjs";
|
|
17
17
|
import {
|
|
18
18
|
parseCidString
|
|
19
19
|
} from "./chunk-VWSAFDOL.mjs";
|
|
20
20
|
import {
|
|
21
21
|
packHmId,
|
|
22
22
|
unpackHmId
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HNCJHTB7.mjs";
|
|
24
24
|
|
|
25
25
|
// src/schema-resolve.ts
|
|
26
26
|
var DAG_CBOR_CODE = 113;
|
|
@@ -22,6 +22,12 @@ var unpackedHmIdSchema = z.object({
|
|
|
22
22
|
targetDocPath: z.array(z.string()).nullable().optional()
|
|
23
23
|
});
|
|
24
24
|
var HMBlockChildrenTypeSchema = z.union([z.literal("Group"), z.literal("Ordered"), z.literal("Unordered"), z.literal("Blockquote"), z.literal("Grid")]).nullable();
|
|
25
|
+
var HMBlockTextAlignmentSchema = z.union([
|
|
26
|
+
z.literal("left"),
|
|
27
|
+
z.literal("center"),
|
|
28
|
+
z.literal("right"),
|
|
29
|
+
z.literal("justify")
|
|
30
|
+
]);
|
|
25
31
|
var HMEmbedViewSchema = z.union([
|
|
26
32
|
z.literal("Content"),
|
|
27
33
|
z.literal("Card"),
|
|
@@ -138,7 +144,9 @@ var textBlockProperties = {
|
|
|
138
144
|
};
|
|
139
145
|
var parentBlockAttributes = {
|
|
140
146
|
childrenType: HMBlockChildrenTypeSchema.optional(),
|
|
141
|
-
columnCount: z.number().optional()
|
|
147
|
+
columnCount: z.number().optional(),
|
|
148
|
+
// An unknown value is dropped rather than failing the block, which would turn it into an unknown block.
|
|
149
|
+
textAlignment: HMBlockTextAlignmentSchema.optional().catch(void 0)
|
|
142
150
|
};
|
|
143
151
|
var HMBlockParagraphSchema = z.object({
|
|
144
152
|
type: z.literal("Paragraph"),
|
|
@@ -768,13 +776,15 @@ var HMCitationCommentSourceSchema = z.object({
|
|
|
768
776
|
type: z.literal("c"),
|
|
769
777
|
id: unpackedHmIdSchema,
|
|
770
778
|
author: z.string().optional(),
|
|
771
|
-
time: HMTimestampSchema.optional()
|
|
779
|
+
time: HMTimestampSchema.optional(),
|
|
780
|
+
blockId: z.string().optional()
|
|
772
781
|
});
|
|
773
782
|
var HMCitationDocumentSourceSchema = z.object({
|
|
774
783
|
type: z.literal("d"),
|
|
775
784
|
id: unpackedHmIdSchema,
|
|
776
785
|
author: z.string().optional(),
|
|
777
|
-
time: HMTimestampSchema.optional()
|
|
786
|
+
time: HMTimestampSchema.optional(),
|
|
787
|
+
blockId: z.string().optional()
|
|
778
788
|
});
|
|
779
789
|
var HMCitationSchema = z.object({
|
|
780
790
|
source: z.discriminatedUnion("type", [HMCitationCommentSourceSchema, HMCitationDocumentSourceSchema]),
|
|
@@ -1138,6 +1148,10 @@ var HMListEventsInputSchema = z.object({
|
|
|
1138
1148
|
filterAuthors: z.array(z.string()).optional(),
|
|
1139
1149
|
filterEventType: z.array(z.string()).optional(),
|
|
1140
1150
|
filterResource: z.string().optional(),
|
|
1151
|
+
// Citations of one block of filterResource, one entry per citing block, read from ListCitations
|
|
1152
|
+
// instead of the feed: the feed keeps one event per publication, so a document that links one
|
|
1153
|
+
// block from many blocks has at most one of them there. Document citations only, a single page.
|
|
1154
|
+
targetBlockId: z.string().optional(),
|
|
1141
1155
|
currentAccount: z.string().optional(),
|
|
1142
1156
|
// Feed ordering. 'claimed' (default) orders by the event's claimed/create time; 'observed' orders by
|
|
1143
1157
|
// when the server locally observed the blob — needed by pollers that must see late-propagating events
|
|
@@ -1201,6 +1215,8 @@ var HMRawCitationSchema = z.object({
|
|
|
1201
1215
|
targetFragment: z.string().optional(),
|
|
1202
1216
|
isExactVersion: z.boolean().optional(),
|
|
1203
1217
|
targetBlockRevision: z.string().optional(),
|
|
1218
|
+
// The link type, `doc/Link`, `doc/Embed`, `comment/Embed`...
|
|
1219
|
+
citationType: z.string().optional(),
|
|
1204
1220
|
mentionType: z.string().optional(),
|
|
1205
1221
|
isExact: z.boolean().optional()
|
|
1206
1222
|
});
|
|
@@ -1708,6 +1724,7 @@ export {
|
|
|
1708
1724
|
BlockRangeSchema,
|
|
1709
1725
|
unpackedHmIdSchema,
|
|
1710
1726
|
HMBlockChildrenTypeSchema,
|
|
1727
|
+
HMBlockTextAlignmentSchema,
|
|
1711
1728
|
HMEmbedViewSchema,
|
|
1712
1729
|
HMQueryStyleSchema,
|
|
1713
1730
|
BoldAnnotationSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSupportedHMQueryFilters,
|
|
3
3
|
isSurrogate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HNCJHTB7.mjs";
|
|
5
5
|
|
|
6
6
|
// src/hmblock-to-editorblock.ts
|
|
7
7
|
function toEditorBlockType(hmBlockType) {
|
|
@@ -104,6 +104,11 @@ function hmBlockToEditorBlock(block) {
|
|
|
104
104
|
out.props.columnCount = String(attributes.columnCount);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
+
const textAlignment = attributes.textAlignment;
|
|
108
|
+
if (textAlignment === "center" || textAlignment === "right" || textAlignment === "justify") {
|
|
109
|
+
;
|
|
110
|
+
out.props.textAlignment = textAlignment;
|
|
111
|
+
}
|
|
107
112
|
if (["code-block", "video", "image", "file", "button", "embed", "web-embed", "math", "nostr"].includes(blockType)) {
|
|
108
113
|
if (block.link) {
|
|
109
114
|
;
|
|
@@ -114,7 +119,7 @@ function hmBlockToEditorBlock(block) {
|
|
|
114
119
|
}
|
|
115
120
|
if (block.attributes) {
|
|
116
121
|
Object.entries(block.attributes).forEach(([key, value]) => {
|
|
117
|
-
if (value !== void 0) {
|
|
122
|
+
if (value !== void 0 && key !== "textAlignment") {
|
|
118
123
|
if (key == "width" || key == "size") {
|
|
119
124
|
if (typeof value == "number") {
|
|
120
125
|
;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VTRLILIX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createSeedClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WZEW53BF.mjs";
|
|
7
7
|
import {
|
|
8
8
|
unpackHmId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HNCJHTB7.mjs";
|
|
10
10
|
|
|
11
11
|
// src/resource-read.ts
|
|
12
12
|
async function resolveIdWithClient(rawId, options = {}) {
|