@seed-hypermedia/client 0.0.63 → 0.0.65
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/{chunk-DBW6Z7HZ.mjs → chunk-PDW4T53T.mjs} +22 -4
- package/dist/editor-types.d.ts +2 -1
- package/dist/hm-types.d.ts +406 -52
- package/dist/hm-types.mjs +1 -1
- package/dist/index.mjs +13 -6
- package/package.json +1 -1
|
@@ -28,7 +28,15 @@ var HMEmbedViewSchema = z.union([
|
|
|
28
28
|
z.literal("Comments"),
|
|
29
29
|
z.literal("Link")
|
|
30
30
|
]);
|
|
31
|
-
var HMQueryStyleSchema = z.union([z.literal("Card"), z.literal("List")]);
|
|
31
|
+
var HMQueryStyleSchema = z.union([z.literal("Card"), z.literal("List"), z.literal("Table")]);
|
|
32
|
+
var HMQueryTableColumnSchema = z.object({
|
|
33
|
+
id: z.string(),
|
|
34
|
+
visible: z.boolean(),
|
|
35
|
+
width: z.number().positive().optional()
|
|
36
|
+
});
|
|
37
|
+
var HMQueryTableConfigSchema = z.object({
|
|
38
|
+
columns: z.array(HMQueryTableColumnSchema)
|
|
39
|
+
});
|
|
32
40
|
var baseAnnotationProperties = {
|
|
33
41
|
starts: z.array(z.number()),
|
|
34
42
|
ends: z.array(z.number()),
|
|
@@ -201,7 +209,7 @@ var HMBlockFileSchema = z.object({
|
|
|
201
209
|
...blockBaseProperties,
|
|
202
210
|
attributes: z.object({
|
|
203
211
|
...parentBlockAttributes,
|
|
204
|
-
size: z.number().optional().transform(toNumber),
|
|
212
|
+
size: z.number().optional().transform((value) => value == null ? null : toNumber(value)),
|
|
205
213
|
// number of bytes, as a string
|
|
206
214
|
name: z.string().optional()
|
|
207
215
|
}).optional().default({}),
|
|
@@ -347,7 +355,10 @@ var HMActivitySummarySchema = z.object({
|
|
|
347
355
|
latestCommentId: z.string(),
|
|
348
356
|
commentCount: z.number(),
|
|
349
357
|
latestChangeTime: HMTimestampSchema,
|
|
350
|
-
isUnread: z.boolean()
|
|
358
|
+
isUnread: z.boolean(),
|
|
359
|
+
// Alive direct child documents. Populated in listings so cards show the
|
|
360
|
+
// subdocument count without a per-document interaction-summary request.
|
|
361
|
+
childrenCount: z.number().optional()
|
|
351
362
|
});
|
|
352
363
|
var HMGenerationInfoSchema = z.object({
|
|
353
364
|
genesis: z.string(),
|
|
@@ -373,6 +384,11 @@ var HMDocumentInfoSchema = z.object({
|
|
|
373
384
|
generationInfo: HMGenerationInfoSchema,
|
|
374
385
|
redirectInfo: HMRedirectInfoSchema.optional(),
|
|
375
386
|
metadata: HMDocumentMetadataSchema,
|
|
387
|
+
// Indexer-derived first image block of the document's content (reading
|
|
388
|
+
// order), used as a fallback cover on directory cards without fetching the
|
|
389
|
+
// full document. Undefined = not derived (yet); empty string = derived, the
|
|
390
|
+
// document has no content image (cards skip their fallback fetch).
|
|
391
|
+
firstImageInContent: z.string().optional(),
|
|
376
392
|
visibility: HMResourceVisibilitySchema
|
|
377
393
|
});
|
|
378
394
|
var HMQueryResultSchema = z.object({
|
|
@@ -457,7 +473,8 @@ var HMBlockQuerySchema = z.object({
|
|
|
457
473
|
style: HMQueryStyleSchema.optional().default("Card"),
|
|
458
474
|
columnCount: z.number().optional().default(3),
|
|
459
475
|
query: HMQuerySchema,
|
|
460
|
-
banner: z.boolean().optional().default(false)
|
|
476
|
+
banner: z.boolean().optional().default(false),
|
|
477
|
+
table: HMQueryTableConfigSchema.optional()
|
|
461
478
|
})
|
|
462
479
|
}).strict();
|
|
463
480
|
var HMBlockGroupSchema = z.object({
|
|
@@ -982,6 +999,7 @@ var HMInteractionSummaryRequestSchema = z.object({
|
|
|
982
999
|
});
|
|
983
1000
|
var HMQueryBlockItemSummarySchema = z.object({
|
|
984
1001
|
comments: z.number(),
|
|
1002
|
+
children: z.number().optional(),
|
|
985
1003
|
authorUids: z.array(z.string()).default([])
|
|
986
1004
|
});
|
|
987
1005
|
var HMQueryBlockPayloadSchema = z.object({
|
package/dist/editor-types.d.ts
CHANGED
|
@@ -106,12 +106,13 @@ export type EditorNostrBlock = EditorBaseBlock & {
|
|
|
106
106
|
export type EditorQueryBlock = EditorBaseBlock & {
|
|
107
107
|
type: 'query';
|
|
108
108
|
props: EditorBlockProps & {
|
|
109
|
-
style: 'Card' | 'List';
|
|
109
|
+
style: 'Card' | 'List' | 'Table';
|
|
110
110
|
columnCount?: '1' | '2' | '3';
|
|
111
111
|
queryLimit?: string;
|
|
112
112
|
queryIncludes?: string;
|
|
113
113
|
querySort?: string;
|
|
114
114
|
banner?: 'true' | 'false';
|
|
115
|
+
tableConfig?: string;
|
|
115
116
|
};
|
|
116
117
|
content: Array<HMInlineContent>;
|
|
117
118
|
};
|