@seed-hypermedia/client 0.0.64 → 0.0.66

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.
@@ -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({}),
@@ -285,6 +293,30 @@ function hmMetadataJsonCorrection(metadata) {
285
293
  return metadata;
286
294
  }
287
295
  var BUILTIN_METADATA_KEYS = new Set(Object.keys(HMDocumentMetadataSchema.shape));
296
+ var DOCUMENT_ATTRIBUTE_DESCRIPTIONS = {
297
+ name: "Document or space title.",
298
+ summary: "Short description shown in previews and cards.",
299
+ icon: "Square document or space image.",
300
+ thumbnail: "Deprecated image field kept for older documents.",
301
+ cover: "Wide cover image shown in headers and cards.",
302
+ siteUrl: "Published website URL for a space.",
303
+ layout: "Legacy site header layout setting.",
304
+ displayPublishTime: "Publication date shown to readers.",
305
+ displayAuthor: "Author byline shown to readers.",
306
+ seedExperimentalLogo: "Logo shown in the site header.",
307
+ seedExperimentalHomeOrder: "Legacy ordering preference for a space home page.",
308
+ showOutline: "Whether to show the document outline.",
309
+ showActivity: "Whether to show document activity and tools.",
310
+ contentWidth: "Width of the document content area.",
311
+ childrenType: "Layout of the document\u2019s root-level blocks.",
312
+ theme: "Visual settings for a site.",
313
+ "theme.headerLayout": "Alignment of the site header.",
314
+ importCategories: "Categories retained from an imported document.",
315
+ importTags: "Tags retained from an imported document.",
316
+ title: "Legacy document title; new documents use name.",
317
+ alias: "Legacy identity name used by older profiles.",
318
+ description: "Legacy profile description; documents use summary."
319
+ };
288
320
  function countCustomMetadataFields(metadata) {
289
321
  if (!metadata) return 0;
290
322
  let count = 0;
@@ -465,7 +497,8 @@ var HMBlockQuerySchema = z.object({
465
497
  style: HMQueryStyleSchema.optional().default("Card"),
466
498
  columnCount: z.number().optional().default(3),
467
499
  query: HMQuerySchema,
468
- banner: z.boolean().optional().default(false)
500
+ banner: z.boolean().optional().default(false),
501
+ table: HMQueryTableConfigSchema.optional()
469
502
  })
470
503
  }).strict();
471
504
  var HMBlockGroupSchema = z.object({
@@ -753,8 +786,10 @@ var HMSearchInputSchema = z.object({
753
786
  perspectiveAccountUid: z.string().optional(),
754
787
  searchType: z.number().optional(),
755
788
  pageSize: z.number().optional(),
789
+ pageToken: z.string().optional(),
756
790
  iriFilter: z.string().optional(),
757
- contentTypeFilter: z.array(z.number()).optional()
791
+ contentTypeFilter: z.array(z.number()).optional(),
792
+ entityKindFilter: z.array(z.number()).optional()
758
793
  });
759
794
  var HMSearchResultItemSchema = z.object({
760
795
  id: unpackedHmIdSchema,
@@ -769,7 +804,8 @@ var HMSearchResultItemSchema = z.object({
769
804
  });
770
805
  var HMSearchPayloadSchema = z.object({
771
806
  entities: z.array(HMSearchResultItemSchema),
772
- searchQuery: z.string()
807
+ searchQuery: z.string(),
808
+ nextPageToken: z.string()
773
809
  });
774
810
  var HMSearchRequestSchema = z.object({
775
811
  key: z.literal("Search"),
@@ -1392,6 +1428,7 @@ export {
1392
1428
  HMDocumentMetadataSchema,
1393
1429
  hmMetadataJsonCorrection,
1394
1430
  BUILTIN_METADATA_KEYS,
1431
+ DOCUMENT_ATTRIBUTE_DESCRIPTIONS,
1395
1432
  countCustomMetadataFields,
1396
1433
  HMResourceVisibilitySchema,
1397
1434
  HMCommentSchema,
@@ -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
  };