@seed-hypermedia/client 0.0.110 → 0.0.111

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.
Files changed (34) hide show
  1. package/dist/auto-link.mjs +3 -3
  2. package/dist/blocks-to-markdown.mjs +2 -2
  3. package/dist/capability.mjs +2 -2
  4. package/dist/{chunk-XBZWF34J.mjs → chunk-3IDYHD26.mjs} +1 -1
  5. package/dist/{chunk-FPANFJPK.mjs → chunk-75QI2URL.mjs} +10 -9
  6. package/dist/{chunk-N2DIEFL4.mjs → chunk-D2NNAW4D.mjs} +1 -1
  7. package/dist/{chunk-JITFCBJG.mjs → chunk-G4B7P2DG.mjs} +2 -2
  8. package/dist/{chunk-JXIRASEP.mjs → chunk-H4OOJ6F7.mjs} +1 -1
  9. package/dist/{chunk-JZO5T6RZ.mjs → chunk-HH7AOMKN.mjs} +1 -1
  10. package/dist/{chunk-ZIWKVJCO.mjs → chunk-IQ5HNMUK.mjs} +1 -1
  11. package/dist/{chunk-OBJQE4NK.mjs → chunk-MN2JRQM5.mjs} +1 -1
  12. package/dist/{chunk-5N4GUBTC.mjs → chunk-O62L5AUF.mjs} +3 -3
  13. package/dist/{chunk-4MLSRAHT.mjs → chunk-QSSNEIPO.mjs} +1 -1
  14. package/dist/{chunk-APDALLCQ.mjs → chunk-QU42JTHS.mjs} +1 -1
  15. package/dist/{chunk-ONSB56Z7.mjs → chunk-SFDJ4SQ4.mjs} +1 -1
  16. package/dist/{chunk-3Y2LUQ2S.mjs → chunk-U5MHHDOD.mjs} +1 -1
  17. package/dist/{chunk-U3PAJ472.mjs → chunk-YMOCTVFW.mjs} +1 -1
  18. package/dist/client.d.ts +1 -1
  19. package/dist/client.mjs +2 -2
  20. package/dist/comment.mjs +2 -2
  21. package/dist/document-state.mjs +2 -2
  22. package/dist/editorblock-to-hmblock.mjs +2 -2
  23. package/dist/hm-resolver.mjs +2 -2
  24. package/dist/hm-types.d.ts +8730 -81937
  25. package/dist/hm-types.mjs +1 -1
  26. package/dist/hmblock-to-editorblock.mjs +2 -2
  27. package/dist/index.mjs +13 -13
  28. package/dist/pdf-to-blocks.mjs +3 -3
  29. package/dist/resource-read.mjs +4 -4
  30. package/dist/schema-resolve.mjs +2 -2
  31. package/dist/schema-subtypes.mjs +2 -2
  32. package/dist/tei-to-blocks.mjs +2 -2
  33. package/dist/unicode.mjs +1 -1
  34. package/package.json +1 -1
@@ -4,13 +4,13 @@ import {
4
4
  documentContainsLinkToChild,
5
5
  documentHasSelfQuery,
6
6
  shouldAutoLinkParent
7
- } from "./chunk-JITFCBJG.mjs";
7
+ } from "./chunk-G4B7P2DG.mjs";
8
8
  import "./chunk-O5MHN2EO.mjs";
9
9
  import "./chunk-PJ2RFT5A.mjs";
10
- import "./chunk-APDALLCQ.mjs";
10
+ import "./chunk-QU42JTHS.mjs";
11
11
  import "./chunk-LVAHHQIK.mjs";
12
12
  import "./chunk-DR3HJ6BV.mjs";
13
- import "./chunk-FPANFJPK.mjs";
13
+ import "./chunk-75QI2URL.mjs";
14
14
  import "./chunk-AHQWDCHV.mjs";
15
15
  import "./chunk-7P6ASYW6.mjs";
16
16
  export {
@@ -7,8 +7,8 @@ import {
7
7
  emitFrontmatter,
8
8
  parseDraftFilename,
9
9
  slugify
10
- } from "./chunk-N2DIEFL4.mjs";
11
- import "./chunk-FPANFJPK.mjs";
10
+ } from "./chunk-D2NNAW4D.mjs";
11
+ import "./chunk-75QI2URL.mjs";
12
12
  import "./chunk-AHQWDCHV.mjs";
13
13
  import "./chunk-7P6ASYW6.mjs";
14
14
  export {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createCapability,
3
3
  resolveCapability
4
- } from "./chunk-ZIWKVJCO.mjs";
4
+ } from "./chunk-IQ5HNMUK.mjs";
5
5
  import "./chunk-LVAHHQIK.mjs";
6
6
  import "./chunk-NBCHK76Q.mjs";
7
7
  import "./chunk-DR3HJ6BV.mjs";
8
- import "./chunk-FPANFJPK.mjs";
8
+ import "./chunk-75QI2URL.mjs";
9
9
  import "./chunk-AHQWDCHV.mjs";
10
10
  import "./chunk-3TPCJCVO.mjs";
11
11
  import "./chunk-7P6ASYW6.mjs";
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  packHmId,
22
22
  unpackHmId
23
- } from "./chunk-FPANFJPK.mjs";
23
+ } from "./chunk-75QI2URL.mjs";
24
24
 
25
25
  // src/schema-resolve.ts
26
26
  var DAG_CBOR_CODE = 113;
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-AHQWDCHV.mjs";
5
5
 
6
6
  // src/hm-types.ts
7
- import * as z from "zod/v3";
7
+ import * as z from "zod";
8
8
  var BlockRangeSchema = z.object({
9
9
  // a block range should either have start+end
10
10
  start: z.number().optional(),
@@ -23,7 +23,7 @@ var unpackedHmIdSchema = z.object({
23
23
  scheme: z.string().nullable(),
24
24
  latest: z.boolean().nullable().optional(),
25
25
  /** JSON-encoded custom HTML page input, excluded from canonical resource identity. */
26
- pageParams: z.record(z.string()).optional(),
26
+ pageParams: z.record(z.string(), z.string()).optional(),
27
27
  // deprecated:
28
28
  targetDocUid: z.string().nullable().optional(),
29
29
  targetDocPath: z.array(z.string()).nullable().optional()
@@ -232,7 +232,7 @@ var HMBlockFileSchema = z.object({
232
232
  size: z.number().optional().transform((value) => value == null ? null : toNumber(value)),
233
233
  // number of bytes, as a string
234
234
  name: z.string().optional()
235
- }).optional().default({}),
235
+ }).prefault({}),
236
236
  link: z.string()
237
237
  }).strict();
238
238
  var HMBlockButtonAlignmentSchema = z.union([z.literal("flex-start"), z.literal("center"), z.literal("flex-end")]).optional();
@@ -307,7 +307,7 @@ var HMDocumentMetadataSchema = z.object({
307
307
  * because removal leaves a null attribute behind rather than dropping the key; `parseSpaceAgentIds`
308
308
  * in @shm/ui/agents/space-agents is the reader for this field.
309
309
  */
310
- spaceAgents: z.record(z.unknown()).optional(),
310
+ spaceAgents: z.record(z.string(), z.unknown()).optional(),
311
311
  /** Resource type; custom HTML pages use hm://hyper.media/page. */
312
312
  type: z.string().optional(),
313
313
  /** UnixFS folder whose index.html runs as an isolated custom HTML page. */
@@ -634,13 +634,13 @@ var HMBlockUnknownSchema = z.object({
634
634
  type: z.string(),
635
635
  id: z.string(),
636
636
  revision: z.string().optional(),
637
- attributes: z.record(z.any()).optional(),
637
+ attributes: z.record(z.string(), z.any()).optional(),
638
638
  annotations: z.array(z.any()).optional(),
639
639
  text: z.string().optional(),
640
640
  link: z.string().optional()
641
641
  }).passthrough();
642
642
  var HMBlockSchema = z.union([HMBlockKnownSchema, HMBlockUnknownSchema]);
643
- var knownBlockTypes = new Set(HMBlockKnownSchema.optionsMap.keys());
643
+ var knownBlockTypes = new Set(HMBlockKnownSchema.options.map((schema) => schema.shape.type.value));
644
644
  function isKnownBlockType(btype) {
645
645
  return knownBlockTypes.has(btype);
646
646
  }
@@ -998,7 +998,7 @@ var HMRawDocumentInfoSchema = z.object({
998
998
  account: z.string(),
999
999
  /** The document path, `/`-prefixed; empty for the space's home document. */
1000
1000
  path: z.string().optional(),
1001
- metadata: z.record(z.unknown()).optional(),
1001
+ metadata: z.record(z.string(), z.unknown()).optional(),
1002
1002
  authors: z.array(z.string()).optional(),
1003
1003
  createTime: z.string().optional(),
1004
1004
  updateTime: z.string().optional(),
@@ -1191,7 +1191,7 @@ var HMListAccountsRequestSchema = z.object({
1191
1191
  output: HMListAccountsOutputSchema
1192
1192
  });
1193
1193
  var HMGetCIDOutputSchema = z.object({
1194
- value: z.any()
1194
+ value: z.any().optional()
1195
1195
  });
1196
1196
  var HMGetCIDInputSchema = z.object({
1197
1197
  cid: z.string()
@@ -1408,11 +1408,12 @@ var ProtoBlockSchema = z.object({
1408
1408
  annotations: z.array(ProtoAnnotationSchema).optional(),
1409
1409
  revision: z.string().optional()
1410
1410
  });
1411
+ var ProtoEmptySchema = z.object({});
1411
1412
  var ProtoSetAttributeValueSchema = z.union([
1412
1413
  z.object({ case: z.literal("stringValue"), value: z.string() }),
1413
1414
  z.object({ case: z.literal("intValue"), value: z.union([z.bigint(), z.coerce.bigint()]) }),
1414
1415
  z.object({ case: z.literal("boolValue"), value: z.boolean() }),
1415
- z.object({ case: z.literal("nullValue"), value: z.object({}) }),
1416
+ z.object({ case: z.literal("nullValue"), value: ProtoEmptySchema }),
1416
1417
  z.object({ case: z.undefined(), value: z.undefined().optional() })
1417
1418
  ]);
1418
1419
  var ProtoDocumentChangeSchema = z.object({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  normalizeQuerySort,
3
3
  unpackHmId
4
- } from "./chunk-FPANFJPK.mjs";
4
+ } from "./chunk-75QI2URL.mjs";
5
5
 
6
6
  // src/blocks-to-markdown.ts
7
7
  import { stringify as stringifyYaml } from "yaml";
@@ -7,12 +7,12 @@ import {
7
7
  } from "./chunk-PJ2RFT5A.mjs";
8
8
  import {
9
9
  resolveDocumentState
10
- } from "./chunk-APDALLCQ.mjs";
10
+ } from "./chunk-QU42JTHS.mjs";
11
11
  import {
12
12
  entityQueryPathToHmIdPath,
13
13
  packHmId,
14
14
  unpackHmId
15
- } from "./chunk-FPANFJPK.mjs";
15
+ } from "./chunk-75QI2URL.mjs";
16
16
 
17
17
  // src/auto-link.ts
18
18
  import { CID } from "multiformats/cid";
@@ -15,7 +15,7 @@ import {
15
15
  HMActionSchema,
16
16
  HMRequestSchema,
17
17
  packHmId
18
- } from "./chunk-FPANFJPK.mjs";
18
+ } from "./chunk-75QI2URL.mjs";
19
19
 
20
20
  // src/client.ts
21
21
  import { encode as cborEncode } from "@ipld/dag-cbor";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  codePointLength
3
- } from "./chunk-FPANFJPK.mjs";
3
+ } from "./chunk-75QI2URL.mjs";
4
4
 
5
5
  // src/tei-to-blocks.ts
6
6
  function generateBlockId() {
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  entityQueryPathToHmIdPath,
9
9
  packBaseId
10
- } from "./chunk-FPANFJPK.mjs";
10
+ } from "./chunk-75QI2URL.mjs";
11
11
 
12
12
  // src/capability.ts
13
13
  import { base58btc } from "multiformats/bases/base58";
@@ -7,7 +7,7 @@ import {
7
7
  codePointLength,
8
8
  parseHMQueryFiltersJSON,
9
9
  toNumber
10
- } from "./chunk-FPANFJPK.mjs";
10
+ } from "./chunk-75QI2URL.mjs";
11
11
 
12
12
  // src/editorblock-to-hmblock.ts
13
13
  function toHMBlockType(editorBlockType) {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  resolveId
3
- } from "./chunk-ONSB56Z7.mjs";
3
+ } from "./chunk-SFDJ4SQ4.mjs";
4
4
  import {
5
5
  createSeedClient
6
- } from "./chunk-JXIRASEP.mjs";
6
+ } from "./chunk-H4OOJ6F7.mjs";
7
7
  import {
8
8
  unpackHmId
9
- } from "./chunk-FPANFJPK.mjs";
9
+ } from "./chunk-75QI2URL.mjs";
10
10
 
11
11
  // src/resource-read.ts
12
12
  async function resolveIdWithClient(rawId, options = {}) {
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  hmIdPathToEntityQueryPath,
11
11
  packHmId
12
- } from "./chunk-FPANFJPK.mjs";
12
+ } from "./chunk-75QI2URL.mjs";
13
13
 
14
14
  // src/comment.ts
15
15
  import { decode as cborDecode, encode as cborEncode } from "@ipld/dag-cbor";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  packHmId,
3
3
  unpackHmId
4
- } from "./chunk-FPANFJPK.mjs";
4
+ } from "./chunk-75QI2URL.mjs";
5
5
 
6
6
  // src/document-state.ts
7
7
  async function resolveDocumentState(client, targetId) {
@@ -2,7 +2,7 @@ import {
2
2
  entityQueryPathToHmIdPath,
3
3
  parseFragment,
4
4
  unpackHmId
5
- } from "./chunk-FPANFJPK.mjs";
5
+ } from "./chunk-75QI2URL.mjs";
6
6
  import {
7
7
  pageParamsFromUrl
8
8
  } from "./chunk-AHQWDCHV.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  teiToBlocks
3
- } from "./chunk-JZO5T6RZ.mjs";
3
+ } from "./chunk-HH7AOMKN.mjs";
4
4
  import {
5
5
  embeddedPdfToBlocks
6
6
  } from "./chunk-2FJBS3V7.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getSupportedHMQueryFilters,
3
3
  isSurrogate
4
- } from "./chunk-FPANFJPK.mjs";
4
+ } from "./chunk-75QI2URL.mjs";
5
5
 
6
6
  // src/hmblock-to-editorblock.ts
7
7
  function toEditorBlockType(hmBlockType) {
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v3';
1
+ import { z } from 'zod';
2
2
  import { type HMPrepareDocumentChangeInput, type HMRequest } from './hm-types';
3
3
  import type { AnySigner } from './signer';
4
4
  /**
package/dist/client.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createSeedClient,
3
3
  deserializeQueryString
4
- } from "./chunk-JXIRASEP.mjs";
4
+ } from "./chunk-H4OOJ6F7.mjs";
5
5
  import "./chunk-CBELM7KX.mjs";
6
6
  import "./chunk-O5MHN2EO.mjs";
7
7
  import "./chunk-PJ2RFT5A.mjs";
8
8
  import "./chunk-LVAHHQIK.mjs";
9
9
  import "./chunk-DR3HJ6BV.mjs";
10
- import "./chunk-FPANFJPK.mjs";
10
+ import "./chunk-75QI2URL.mjs";
11
11
  import "./chunk-AHQWDCHV.mjs";
12
12
  import "./chunk-7P6ASYW6.mjs";
13
13
  export {
package/dist/comment.mjs CHANGED
@@ -4,11 +4,11 @@ import {
4
4
  deleteComment,
5
5
  trimTrailingEmptyBlocks,
6
6
  updateComment
7
- } from "./chunk-4MLSRAHT.mjs";
7
+ } from "./chunk-QSSNEIPO.mjs";
8
8
  import "./chunk-JKKS35IS.mjs";
9
9
  import "./chunk-LVAHHQIK.mjs";
10
10
  import "./chunk-DR3HJ6BV.mjs";
11
- import "./chunk-FPANFJPK.mjs";
11
+ import "./chunk-75QI2URL.mjs";
12
12
  import "./chunk-AHQWDCHV.mjs";
13
13
  import "./chunk-7P6ASYW6.mjs";
14
14
  export {
@@ -4,8 +4,8 @@ import {
4
4
  followToDocument,
5
5
  resolveDocumentState,
6
6
  resolveEditableDocument
7
- } from "./chunk-APDALLCQ.mjs";
8
- import "./chunk-FPANFJPK.mjs";
7
+ } from "./chunk-QU42JTHS.mjs";
8
+ import "./chunk-75QI2URL.mjs";
9
9
  import "./chunk-AHQWDCHV.mjs";
10
10
  import "./chunk-7P6ASYW6.mjs";
11
11
  export {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  editorBlockToHMBlock,
3
3
  editorBlocksToHMBlockNodes
4
- } from "./chunk-OBJQE4NK.mjs";
4
+ } from "./chunk-MN2JRQM5.mjs";
5
5
  import "./chunk-JKKS35IS.mjs";
6
- import "./chunk-FPANFJPK.mjs";
6
+ import "./chunk-75QI2URL.mjs";
7
7
  import "./chunk-AHQWDCHV.mjs";
8
8
  import "./chunk-7P6ASYW6.mjs";
9
9
  export {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  resolveHypermediaUrl,
3
3
  resolveId
4
- } from "./chunk-ONSB56Z7.mjs";
5
- import "./chunk-FPANFJPK.mjs";
4
+ } from "./chunk-SFDJ4SQ4.mjs";
5
+ import "./chunk-75QI2URL.mjs";
6
6
  import "./chunk-AHQWDCHV.mjs";
7
7
  import "./chunk-7P6ASYW6.mjs";
8
8
  export {