@seed-hypermedia/client 0.0.119 → 0.0.121

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 (40) hide show
  1. package/dist/apps.mjs +2 -2
  2. package/dist/auto-link.mjs +3 -3
  3. package/dist/blocks-to-markdown.mjs +3 -3
  4. package/dist/capability.mjs +2 -2
  5. package/dist/{chunk-6RZWE7TK.mjs → chunk-5AZOE4Q5.mjs} +2 -2
  6. package/dist/{chunk-PTCL6IO7.mjs → chunk-6GHZWVT6.mjs} +1 -1
  7. package/dist/{chunk-BFXGJBSN.mjs → chunk-7DPSFFKD.mjs} +3 -3
  8. package/dist/{chunk-RJ77FJD2.mjs → chunk-7NQUJO5X.mjs} +1 -1
  9. package/dist/{chunk-IC3KRDNX.mjs → chunk-CBCMOIFJ.mjs} +2 -2
  10. package/dist/{chunk-PUKRJHZR.mjs → chunk-EDCDFQJC.mjs} +1 -1
  11. package/dist/{chunk-KTOBQK6C.mjs → chunk-LOAOGLQF.mjs} +13 -2
  12. package/dist/{chunk-JLSJJMOD.mjs → chunk-LZYLDVJR.mjs} +2 -2
  13. package/dist/{chunk-J2QF2I3H.mjs → chunk-O3QWSQ3Y.mjs} +1 -1
  14. package/dist/{chunk-JMP3HYRE.mjs → chunk-OUBG6JFC.mjs} +3 -3
  15. package/dist/{chunk-MY2L74E7.mjs → chunk-QH6OHO4E.mjs} +1 -1
  16. package/dist/{chunk-PON3NHRS.mjs → chunk-QIZO45NU.mjs} +1 -1
  17. package/dist/{chunk-37I7X7G7.mjs → chunk-QTPHQIZJ.mjs} +1 -1
  18. package/dist/{chunk-TSK67IPM.mjs → chunk-UBZRS3WZ.mjs} +1 -1
  19. package/dist/{chunk-F37OTY5W.mjs → chunk-UCISXEJ7.mjs} +1 -1
  20. package/dist/{chunk-P5EQ4NJ7.mjs → chunk-XMDF4NIR.mjs} +1 -1
  21. package/dist/client.mjs +2 -2
  22. package/dist/comment.mjs +2 -2
  23. package/dist/document-state.mjs +2 -2
  24. package/dist/editorblock-to-hmblock.mjs +2 -2
  25. package/dist/hm-resolver.mjs +2 -2
  26. package/dist/hm-types.d.ts +264 -0
  27. package/dist/hm-types.mjs +1 -1
  28. package/dist/hmblock-to-editorblock.mjs +2 -2
  29. package/dist/index.mjs +13 -13
  30. package/dist/pdf-to-blocks.mjs +3 -3
  31. package/dist/resource-read.mjs +4 -4
  32. package/dist/schema-engine.mjs +2 -2
  33. package/dist/schema-registry.generated.mjs +1 -1
  34. package/dist/schema-resolve.mjs +4 -4
  35. package/dist/schema-subtypes.mjs +4 -4
  36. package/dist/schema-types.generated.d.ts +4 -2
  37. package/dist/signed-blob.mjs +2 -2
  38. package/dist/tei-to-blocks.mjs +2 -2
  39. package/dist/unicode.mjs +1 -1
  40. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getSupportedHMQueryFilters,
3
3
  isSurrogate
4
- } from "./chunk-KTOBQK6C.mjs";
4
+ } from "./chunk-LOAOGLQF.mjs";
5
5
 
6
6
  // src/hmblock-to-editorblock.ts
7
7
  function toEditorBlockType(hmBlockType) {
@@ -10,17 +10,17 @@ import {
10
10
  schemaForCid,
11
11
  structFields,
12
12
  validate
13
- } from "./chunk-TSK67IPM.mjs";
13
+ } from "./chunk-UBZRS3WZ.mjs";
14
14
  import {
15
15
  HM_SCHEMAS
16
- } from "./chunk-6RZWE7TK.mjs";
16
+ } from "./chunk-5AZOE4Q5.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-KTOBQK6C.mjs";
23
+ } from "./chunk-LOAOGLQF.mjs";
24
24
 
25
25
  // src/schema-resolve.ts
26
26
  var DAG_CBOR_CODE = 113;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  teiToBlocks
3
- } from "./chunk-PON3NHRS.mjs";
3
+ } from "./chunk-QIZO45NU.mjs";
4
4
  import {
5
5
  embeddedPdfToBlocks
6
6
  } from "./chunk-2FJBS3V7.mjs";
@@ -7,12 +7,12 @@ import {
7
7
  } from "./chunk-PJ2RFT5A.mjs";
8
8
  import {
9
9
  resolveDocumentState
10
- } from "./chunk-37I7X7G7.mjs";
10
+ } from "./chunk-QTPHQIZJ.mjs";
11
11
  import {
12
12
  entityQueryPathToHmIdPath,
13
13
  packHmId,
14
14
  unpackHmId
15
- } from "./chunk-KTOBQK6C.mjs";
15
+ } from "./chunk-LOAOGLQF.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-KTOBQK6C.mjs";
18
+ } from "./chunk-LOAOGLQF.mjs";
19
19
 
20
20
  // src/client.ts
21
21
  import { encode as cborEncode } from "@ipld/dag-cbor";
@@ -288,11 +288,12 @@ var HMDocumentMetadataSchema = z.object({
288
288
  cover: z.string().optional(),
289
289
  siteUrl: z.string().optional(),
290
290
  /**
291
- * The agents server an agent's mount document names (an http(s) origin). A document with
291
+ * The app environment an agent's mount document names (an http(s) origin). A document with
292
292
  * `type: hm://hyper.media/agent` and this field is an agent: its versionless hm:// id is the
293
293
  * agent's id, and that server must register it under exactly that id. A space's agents are
294
294
  * found by querying its documents for this type; nothing else registers an agent with a space.
295
295
  */
296
+ appEnvironmentUrl: z.string().optional(),
296
297
  agentServerUrl: z.string().optional(),
297
298
  /**
298
299
  * Resource type: hm://hyper.media/page (custom HTML page), hm://hyper.media/app (an app, whose
@@ -309,6 +310,12 @@ var HMDocumentMetadataSchema = z.object({
309
310
  code: z.string().optional(),
310
311
  /** hm:// URL of the app's own page that its Home tab shows. */
311
312
  homePage: z.string().optional(),
313
+ /** Published HM struct schema of an app's public config (readable by anyone who can read the app). */
314
+ publicConfigSchema: z.string().optional(),
315
+ /** Published HM struct schema of an app's private config, which the server running the app keeps. */
316
+ privateConfigSchema: z.string().optional(),
317
+ /** An app's public config values, shaped by its publicConfigSchema. */
318
+ publicConfig: z.record(z.string(), z.unknown()).optional(),
312
319
  layout: z.union([z.literal("Seed/Experimental/Newspaper"), z.literal("")]).optional(),
313
320
  displayPublishTime: z.string().optional(),
314
321
  displayAuthor: z.string().optional(),
@@ -347,13 +354,17 @@ var DOCUMENT_ATTRIBUTE_DESCRIPTIONS = {
347
354
  thumbnail: "Deprecated image field kept for older documents.",
348
355
  cover: "Wide cover image shown in headers and cards.",
349
356
  siteUrl: "Published website URL for a space.",
350
- agentServerUrl: "Agents server that hosts the agent this document mounts.",
357
+ appEnvironmentUrl: "App environment a space is bound to, on its home document (read before agentServerUrl), or the one an app document was created for.",
358
+ agentServerUrl: "App environment that hosts the agent this document mounts.",
351
359
  type: "Resource type, such as a custom HTML page, an app or a tool.",
352
360
  html: "UnixFS folder holding a custom HTML page.",
353
361
  inputSchema: "Schema of the input a page or tool takes.",
354
362
  outputSchema: "Schema of what a tool returns.",
355
363
  code: "UnixFS folder holding a tool\u2019s code, entry point index.ts.",
356
364
  homePage: "The app page its Home tab shows.",
365
+ publicConfigSchema: "Schema of an app\u2019s public config.",
366
+ privateConfigSchema: "Schema of an app\u2019s private config, kept by the server running it.",
367
+ publicConfig: "An app\u2019s public config values.",
357
368
  layout: "Legacy space header layout setting.",
358
369
  displayPublishTime: "Publication date shown to readers.",
359
370
  displayAuthor: "Author byline shown to readers.",
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  resolveId
3
- } from "./chunk-P5EQ4NJ7.mjs";
3
+ } from "./chunk-XMDF4NIR.mjs";
4
4
  import {
5
5
  normalizeQuerySort,
6
6
  unpackHmId
7
- } from "./chunk-KTOBQK6C.mjs";
7
+ } from "./chunk-LOAOGLQF.mjs";
8
8
 
9
9
  // src/blocks-to-markdown.ts
10
10
  import { stringify as stringifyYaml } from "yaml";
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  hmIdPathToEntityQueryPath,
11
11
  packHmId
12
- } from "./chunk-KTOBQK6C.mjs";
12
+ } from "./chunk-LOAOGLQF.mjs";
13
13
 
14
14
  // src/comment.ts
15
15
  import { decode as cborDecode, encode as cborEncode } from "@ipld/dag-cbor";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  createSeedClient
3
- } from "./chunk-PUKRJHZR.mjs";
3
+ } from "./chunk-EDCDFQJC.mjs";
4
4
  import {
5
5
  extractCommentIdFromUrl,
6
6
  hmDomainUrlToWebUrl,
7
7
  resolveId
8
- } from "./chunk-P5EQ4NJ7.mjs";
8
+ } from "./chunk-XMDF4NIR.mjs";
9
9
  import {
10
10
  unpackHmId
11
- } from "./chunk-KTOBQK6C.mjs";
11
+ } from "./chunk-LOAOGLQF.mjs";
12
12
 
13
13
  // src/resource-read.ts
14
14
  async function resolveIdWithClient(rawId, options = {}) {
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  entityQueryPathToHmIdPath,
9
9
  packBaseId
10
- } from "./chunk-KTOBQK6C.mjs";
10
+ } from "./chunk-LOAOGLQF.mjs";
11
11
 
12
12
  // src/capability.ts
13
13
  import { base58btc } from "multiformats/bases/base58";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  codePointLength
3
- } from "./chunk-KTOBQK6C.mjs";
3
+ } from "./chunk-LOAOGLQF.mjs";
4
4
 
5
5
  // src/tei-to-blocks.ts
6
6
  function generateBlockId() {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  packHmId,
3
3
  unpackHmId
4
- } from "./chunk-KTOBQK6C.mjs";
4
+ } from "./chunk-LOAOGLQF.mjs";
5
5
 
6
6
  // src/document-state.ts
7
7
  async function resolveDocumentState(client, targetId) {
@@ -2,7 +2,7 @@ import {
2
2
  HM_SCHEMAS,
3
3
  HM_SCHEMA_MANIFEST,
4
4
  HM_SCHEMA_PAGES
5
- } from "./chunk-6RZWE7TK.mjs";
5
+ } from "./chunk-5AZOE4Q5.mjs";
6
6
 
7
7
  // src/schema-engine.ts
8
8
  var LIBRARY_AUTHORITY = "hyper.media";
@@ -7,7 +7,7 @@ import {
7
7
  codePointLength,
8
8
  parseHMQueryFiltersJSON,
9
9
  toNumber
10
- } from "./chunk-KTOBQK6C.mjs";
10
+ } from "./chunk-LOAOGLQF.mjs";
11
11
 
12
12
  // src/editorblock-to-hmblock.ts
13
13
  function toHMBlockType(editorBlockType) {
@@ -2,7 +2,7 @@ import {
2
2
  entityQueryPathToHmIdPath,
3
3
  parseFragment,
4
4
  unpackHmId
5
- } from "./chunk-KTOBQK6C.mjs";
5
+ } from "./chunk-LOAOGLQF.mjs";
6
6
  import {
7
7
  pageParamsFromUrl
8
8
  } from "./chunk-AHQWDCHV.mjs";
package/dist/client.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createSeedClient,
3
3
  deserializeQueryString
4
- } from "./chunk-PUKRJHZR.mjs";
4
+ } from "./chunk-EDCDFQJC.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-KTOBQK6C.mjs";
10
+ import "./chunk-LOAOGLQF.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-J2QF2I3H.mjs";
7
+ } from "./chunk-O3QWSQ3Y.mjs";
8
8
  import "./chunk-JKKS35IS.mjs";
9
9
  import "./chunk-LVAHHQIK.mjs";
10
10
  import "./chunk-DR3HJ6BV.mjs";
11
- import "./chunk-KTOBQK6C.mjs";
11
+ import "./chunk-LOAOGLQF.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-37I7X7G7.mjs";
8
- import "./chunk-KTOBQK6C.mjs";
7
+ } from "./chunk-QTPHQIZJ.mjs";
8
+ import "./chunk-LOAOGLQF.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-F37OTY5W.mjs";
4
+ } from "./chunk-UCISXEJ7.mjs";
5
5
  import "./chunk-JKKS35IS.mjs";
6
- import "./chunk-KTOBQK6C.mjs";
6
+ import "./chunk-LOAOGLQF.mjs";
7
7
  import "./chunk-AHQWDCHV.mjs";
8
8
  import "./chunk-7P6ASYW6.mjs";
9
9
  export {
@@ -3,8 +3,8 @@ import {
3
3
  hmDomainUrlToWebUrl,
4
4
  resolveHypermediaUrl,
5
5
  resolveId
6
- } from "./chunk-P5EQ4NJ7.mjs";
7
- import "./chunk-KTOBQK6C.mjs";
6
+ } from "./chunk-XMDF4NIR.mjs";
7
+ import "./chunk-LOAOGLQF.mjs";
8
8
  import "./chunk-AHQWDCHV.mjs";
9
9
  import "./chunk-7P6ASYW6.mjs";
10
10
  export {