@phtngyn/cms 0.1.0-beta.1 → 0.1.0-beta.2

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 (142) hide show
  1. package/README.md +192 -9
  2. package/package.json +30 -15
  3. package/src/Configuration-Br7tE9Qt.d.ts +68 -0
  4. package/src/{Configuration-DyKo0sLS.js → Configuration-CA_jvQKG.js} +26 -147
  5. package/src/Configuration-CA_jvQKG.js.map +1 -0
  6. package/src/Configuration.d.ts +2 -44
  7. package/src/Configuration.js +0 -1
  8. package/src/Configuration.js.map +1 -1
  9. package/src/{DocumentEngine-DYObwMDY.js → DocumentEngine-CgiBQU4g.js} +75 -27
  10. package/src/DocumentEngine-CgiBQU4g.js.map +1 -0
  11. package/src/DocumentModel-BB9igGC7.d.ts +34 -0
  12. package/src/DocumentModel.d.ts +2 -34
  13. package/src/DocumentModel.js +13 -3
  14. package/src/DocumentModel.js.map +1 -1
  15. package/src/Forms-BsJMev5_.d.ts +74 -0
  16. package/src/Forms-CfcI3tPU.js +79 -0
  17. package/src/Forms-CfcI3tPU.js.map +1 -0
  18. package/src/Forms-DxbkU3_5.js +367 -0
  19. package/src/Forms-DxbkU3_5.js.map +1 -0
  20. package/src/Forms.d.ts +35 -0
  21. package/src/Forms.js +13 -0
  22. package/src/Forms.js.map +1 -0
  23. package/src/{HttpPaths-BbS21Jy8.js → HttpPaths-c9nLZ9H2.js} +6 -2
  24. package/src/HttpPaths-c9nLZ9H2.js.map +1 -0
  25. package/src/I18n-DZK4CkJF.d.ts +21 -0
  26. package/src/I18n.d.ts +2 -0
  27. package/src/I18n.js +1 -0
  28. package/src/Module.js +57 -11
  29. package/src/Module.js.map +1 -1
  30. package/src/S3MediaObjects-JKMAWyVB.js +2664 -0
  31. package/src/S3MediaObjects-JKMAWyVB.js.map +1 -0
  32. package/src/Seed.d.ts +6 -0
  33. package/src/Seed.js +34 -0
  34. package/src/Seed.js.map +1 -0
  35. package/src/Seo-402YumpT.d.ts +198 -0
  36. package/src/{connection-CBTY-TzB.js → connection-B-iz0Y9Y.js} +5 -7
  37. package/src/connection-B-iz0Y9Y.js.map +1 -0
  38. package/src/{installation-DeuBiFRE.js → installation-DgF2M1gL.js} +1005 -2242
  39. package/src/installation-DgF2M1gL.js.map +1 -0
  40. package/src/internal/authoring-catalog.js +10 -4
  41. package/src/internal/authoring-catalog.js.map +1 -1
  42. package/src/internal/authoring-compiler.js +0 -1
  43. package/src/internal/authoring-compiler.js.map +1 -1
  44. package/src/internal/authoring-metadata.js +4 -4
  45. package/src/internal/authoring-metadata.js.map +1 -1
  46. package/src/internal/cms-config.js +0 -1
  47. package/src/internal/cms-config.js.map +1 -1
  48. package/src/internal/configuration.js +23 -10
  49. package/src/internal/configuration.js.map +1 -1
  50. package/src/internal/document-model.js +65 -20
  51. package/src/internal/document-model.js.map +1 -1
  52. package/src/internal/form-capabilities.js +12 -0
  53. package/src/internal/form-capabilities.js.map +1 -0
  54. package/src/internal/i18n.js +47 -0
  55. package/src/internal/i18n.js.map +1 -0
  56. package/src/internal/studio-app.js +2 -2
  57. package/src/internal/studio-app.js.map +1 -1
  58. package/src/{location-DtYv2aes.js → location-CFKTeK1K.js} +2 -3
  59. package/src/location-CFKTeK1K.js.map +1 -0
  60. package/src/{metadata-DE1Mc2td.js → metadata-BEZPWh-3.js} +3 -72
  61. package/src/metadata-BEZPWh-3.js.map +1 -0
  62. package/src/{models-C3witQBK.js → models-BWm1pTAf.js} +3 -2
  63. package/src/models-BWm1pTAf.js.map +1 -0
  64. package/src/{models-BkMgeaOL.js → models-DwYioyNV.js} +203 -32
  65. package/src/models-DwYioyNV.js.map +1 -0
  66. package/src/runtime/blocks.js +22 -9
  67. package/src/runtime/blocks.js.map +1 -1
  68. package/src/runtime/collaboration.js.map +1 -1
  69. package/src/runtime/delivery/DocumentRenderer.js +7 -4
  70. package/src/runtime/delivery/DocumentRenderer.js.map +1 -1
  71. package/src/runtime/delivery/blocks.js +3 -1
  72. package/src/runtime/delivery/blocks.js.map +1 -1
  73. package/src/runtime/delivery/context.js +1 -1
  74. package/src/runtime/delivery/document-page.js +12 -12
  75. package/src/runtime/delivery/document-page.js.map +1 -1
  76. package/src/runtime/delivery/document.js +4 -2
  77. package/src/runtime/delivery/document.js.map +1 -1
  78. package/src/runtime/delivery/error.js.map +1 -1
  79. package/src/runtime/delivery/plugin.js +22 -2
  80. package/src/runtime/delivery/plugin.js.map +1 -1
  81. package/src/runtime/delivery/types.d.ts +5 -0
  82. package/src/runtime/delivery/useCmsDocumentSeo.d.ts +56 -0
  83. package/src/runtime/delivery/useCmsDocumentSeo.js +99 -0
  84. package/src/runtime/delivery/useCmsDocumentSeo.js.map +1 -0
  85. package/src/runtime/delivery/useDocument.js +2 -2
  86. package/src/runtime/delivery/useDocument.js.map +1 -1
  87. package/src/runtime/delivery/useDocumentQuery.js +2 -2
  88. package/src/runtime/delivery/useDocumentQuery.js.map +1 -1
  89. package/src/runtime/forms/document.js +38 -0
  90. package/src/runtime/forms/document.js.map +1 -0
  91. package/src/runtime/forms/useCmsForm.js +149 -0
  92. package/src/runtime/forms/useCmsForm.js.map +1 -0
  93. package/src/runtime/i18n/translator.js +22 -0
  94. package/src/runtime/i18n/translator.js.map +1 -0
  95. package/src/runtime/i18n/useCmsI18n.d.ts +9 -0
  96. package/src/runtime/i18n/useCmsI18n.js +29 -0
  97. package/src/runtime/i18n/useCmsI18n.js.map +1 -0
  98. package/src/runtime/installation.js +1 -1
  99. package/src/runtime/plugin.js +1 -1
  100. package/src/runtime/plugin.js.map +1 -1
  101. package/src/runtime/preview/comark-document.js +0 -1
  102. package/src/runtime/preview/comark-document.js.map +1 -1
  103. package/src/runtime/preview/connection.js +1 -1
  104. package/src/runtime/preview/controller.js +10 -3
  105. package/src/runtime/preview/controller.js.map +1 -1
  106. package/src/runtime/preview/overlay.js.map +1 -1
  107. package/src/runtime/preview/plugin.client.js +59 -48
  108. package/src/runtime/preview/plugin.client.js.map +1 -1
  109. package/src/runtime/preview/protocol.js.map +1 -1
  110. package/src/runtime/preview/store.js +1 -1
  111. package/src/runtime/preview/targets.js +0 -1
  112. package/src/runtime/preview/targets.js.map +1 -1
  113. package/src/runtime/sitemap-entries.js +17 -0
  114. package/src/runtime/sitemap-entries.js.map +1 -0
  115. package/src/runtime/sitemap.js +24 -0
  116. package/src/runtime/sitemap.js.map +1 -0
  117. package/src/runtime/studio-app.js.map +1 -1
  118. package/src/runtime/studio-entry.js +2 -2
  119. package/src/runtime/studio-entry.js.map +1 -1
  120. package/src/runtime/studio-navigation.js +1 -1
  121. package/src/scalars-B2lgGUnj.js +26 -0
  122. package/src/scalars-B2lgGUnj.js.map +1 -0
  123. package/src/{store-CfFFx9Ua.js → store-DjJs3I7k.js} +12 -7
  124. package/src/store-DjJs3I7k.js.map +1 -0
  125. package/studio/{CreateDocumentDialog--L9lTfx6.js → CreateDocumentDialog-CTeIFlPb.js} +44 -44
  126. package/studio/{collaboration-DUuu678R.js → collaboration-DcK2F6v9.js} +7 -6
  127. package/studio/{documentPlanning-BXX04Woe.js → documentPlanning-Bfv-d7OU.js} +7310 -6479
  128. package/studio/{editor-PexnXkJY.js → editor-Bzlh3zXt.js} +7965 -7955
  129. package/studio/host.css +1 -1
  130. package/studio/host.js +10416 -7981
  131. package/src/Configuration-DyKo0sLS.js.map +0 -1
  132. package/src/DocumentEngine-DYObwMDY.js.map +0 -1
  133. package/src/HttpPaths-BbS21Jy8.js.map +0 -1
  134. package/src/StudioHttp-jR2-bc01.js +0 -718
  135. package/src/StudioHttp-jR2-bc01.js.map +0 -1
  136. package/src/connection-CBTY-TzB.js.map +0 -1
  137. package/src/installation-DeuBiFRE.js.map +0 -1
  138. package/src/location-DtYv2aes.js.map +0 -1
  139. package/src/metadata-DE1Mc2td.js.map +0 -1
  140. package/src/models-BkMgeaOL.js.map +0 -1
  141. package/src/models-C3witQBK.js.map +0 -1
  142. package/src/store-CfFFx9Ua.js.map +0 -1
@@ -1,29 +1,7 @@
1
- import { Schema } from "effect";
1
+ import { c as RevisionId, d as SourcePath, f as nonNegativeInt, i as DocumentVersion, o as PublicPath, p as publicPathPattern, r as DocumentId, s as RelativeDocumentPath, t as DocumentGeneration, u as Slug } from "./scalars-B2lgGUnj.js";
2
+ import { DateTime, Option, Schema } from "effect";
2
3
 
3
- //#region ../protocol/src/internal/scalars.ts
4
- const nonNegativeInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
5
- const publicPathPattern = /^\/(?!(?:[^/]+\/)*\.\.?(?:\/|$))(?:[^/?#\\]+(?:\/[^/?#\\]+)*)?$/u;
6
-
7
- //#endregion
8
- //#region ../protocol/src/internal/documents/scalars.ts
9
- const relativeDocumentPathPattern = /^(?!(?:[^/]+\/)*\.\.?(?:\/|$))[^/?#\\]+(?:\/[^/?#\\]+)*$/u;
10
- const slugPattern = /^[\p{Letter}\p{Number}][\p{Letter}\p{Number}_-]*$/u;
11
- const sourcePathPattern = /^(?!\.)[^/?#\\]+(?:\/(?!\.)[^/?#\\]+)*\.(?:md|mdc)$/u;
12
- const DocumentGeneration = Schema.String.check(Schema.isPattern(/^(?:0|[1-9]\d*)$/u)).pipe(Schema.brand("DocumentGeneration"));
13
- const DocumentVersion = Schema.NonEmptyString.pipe(Schema.brand("DocumentVersion"));
14
- const DocumentHistoryCursor = Schema.NonEmptyString.pipe(Schema.brand("DocumentHistoryCursor"));
15
- const DocumentId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand("DocumentId"));
16
- const EditorNodeId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand("EditorNodeId"));
17
- const PublicPath = Schema.String.check(Schema.isPattern(publicPathPattern)).pipe(Schema.brand("PublicPath"));
18
- const RelativeDocumentPath = Schema.String.check(Schema.isPattern(relativeDocumentPathPattern)).pipe(Schema.brand("RelativeDocumentPath"));
19
- const RevisionId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand("RevisionId"));
20
- const RevisionNumber = nonNegativeInt.pipe(Schema.brand("RevisionNumber"));
21
- const Slug = Schema.String.check(Schema.isPattern(slugPattern)).pipe(Schema.brand("Slug"));
22
- const SourcePath = Schema.String.check(Schema.isPattern(sourcePathPattern)).pipe(Schema.brand("SourcePath"));
23
-
24
- //#endregion
25
4
  //#region ../protocol/src/Identity.ts
26
- /** Cross-domain request correlation; decode unknown strings before crossing a seam. */
27
5
  const RequestId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand("RequestId"));
28
6
 
29
7
  //#endregion
@@ -112,6 +90,7 @@ const MediaPage = Schema.Struct({
112
90
  }).annotate({ identifier: "MediaPage" });
113
91
  const MediaReference = Schema.Struct({
114
92
  documentId: DocumentId,
93
+ mediaId: Schema.optionalKey(MediaId),
115
94
  path: PublicPath,
116
95
  sourcePath: SourcePath,
117
96
  objectKey: MediaObjectKey,
@@ -133,7 +112,8 @@ const MediaCleanupReport = Schema.Struct({ removedObjectKeys: Schema.Array(Media
133
112
  var MediaNotFound = class extends Schema.TaggedError()("Media.NotFound", { mediaId: MediaId }) {};
134
113
  var MediaReferenced = class extends Schema.TaggedError()("Media.Referenced", {
135
114
  mediaId: MediaId,
136
- references: Schema.Array(MediaReference)
115
+ references: Schema.Array(MediaReference),
116
+ seoScopes: Schema.optionalKey(Schema.Array(Schema.Literals(["working", "published"])))
137
117
  }) {};
138
118
  var MediaConflict = class extends Schema.TaggedError()("Media.Conflict", { mediaId: MediaId }) {};
139
119
  var MediaInvalid = class extends Schema.TaggedError()("Media.Invalid", { message: Schema.NonEmptyString }) {};
@@ -144,7 +124,6 @@ var MediaTooLarge = class extends Schema.TaggedError()("Media.TooLarge", {
144
124
 
145
125
  //#endregion
146
126
  //#region ../protocol/src/AccessControl.ts
147
- /** Wire-visible Studio actors, request identity, roles, access decisions, and denials. */
148
127
  const ROLES = [
149
128
  "administrator",
150
129
  "editor",
@@ -230,21 +209,35 @@ const ActivityAccessDecision = Schema.Struct({
230
209
  action: Schema.Literal("activity.read"),
231
210
  resource: ActivityResource
232
211
  }).annotate({ identifier: "ActivityAccessDecision" });
212
+ const SEO_ACTIONS = [
213
+ "seo.read",
214
+ "seo.save",
215
+ "seo.publish"
216
+ ];
217
+ const SeoAction = Schema.Literals(SEO_ACTIONS);
218
+ const SeoResource = Schema.Struct({ kind: Schema.tag("seo") });
219
+ const SeoAccessDecision = Schema.Struct({
220
+ action: SeoAction,
221
+ resource: SeoResource
222
+ }).annotate({ identifier: "SeoAccessDecision" });
233
223
  const STUDIO_ACTIONS = [
234
224
  ...DOCUMENT_ACTIONS,
235
225
  ...MEDIA_ACTIONS,
226
+ ...SEO_ACTIONS,
236
227
  "activity.read"
237
228
  ];
238
229
  const StudioAction = Schema.Literals(STUDIO_ACTIONS);
239
230
  const StudioResource = Schema.Union([
240
231
  DocumentAccessResource,
241
232
  MediaResource,
242
- ActivityResource
233
+ ActivityResource,
234
+ SeoResource
243
235
  ]);
244
236
  const StudioAccessDecision = Schema.Union([
245
237
  DocumentAccessDecision,
246
238
  MediaAccessDecision,
247
- ActivityAccessDecision
239
+ ActivityAccessDecision,
240
+ SeoAccessDecision
248
241
  ]);
249
242
  var AuthenticationRequired = class extends Schema.TaggedError()("Studio.AuthenticationRequired", {}) {};
250
243
  var StudioEntryDenied = class extends Schema.TaggedError()("Studio.EntryDenied", {}) {};
@@ -254,6 +247,181 @@ var AccessDenied = class extends Schema.TaggedError()("Studio.AccessDenied", {
254
247
  resource: StudioResource
255
248
  }) {};
256
249
 
250
+ //#endregion
251
+ //#region ../protocol/src/Seo.ts
252
+ const absoluteUrl = Schema.makeFilter((value) => {
253
+ try {
254
+ const url = new URL(value);
255
+ return url.protocol === "http:" || url.protocol === "https:";
256
+ } catch {
257
+ return false;
258
+ }
259
+ }, { expected: "an absolute HTTP or HTTPS URL" });
260
+ const canonicalOrigin = Schema.makeFilter((value) => {
261
+ try {
262
+ const url = new URL(value);
263
+ return (url.protocol === "http:" || url.protocol === "https:") && url.origin === value && url.pathname === "/" && url.search === "" && url.hash === "";
264
+ } catch {
265
+ return false;
266
+ }
267
+ }, { expected: "an HTTP or HTTPS origin without a path, query, hash, or trailing slash" });
268
+ const titleTemplate = Schema.makeFilter((value) => value.includes("%s"), { expected: "a title template containing %s" });
269
+ const calendarDate = Schema.makeFilter((value) => {
270
+ if (!/^\d{4}-\d{2}-\d{2}$/u.test(value)) return false;
271
+ const parsed = DateTime.make(value);
272
+ return Option.isSome(parsed) && DateTime.formatIsoDate(parsed.value) === value;
273
+ }, { expected: "a valid calendar date in YYYY-MM-DD format" });
274
+ const SeoUrl = Schema.NonEmptyString.check(absoluteUrl).pipe(Schema.brand("SeoUrl"));
275
+ const SeoCanonicalOrigin = Schema.NonEmptyString.check(canonicalOrigin).pipe(Schema.brand("SeoCanonicalOrigin"));
276
+ const SeoImage = Schema.Struct({
277
+ mediaId: MediaId,
278
+ url: SeoUrl,
279
+ alt: Schema.NonEmptyString
280
+ }).annotate({ identifier: "SeoImage" });
281
+ const StructuredDataType = Schema.Literals(["WebPage", "Article"]);
282
+ const WebPageStructuredData = Schema.Struct({ type: Schema.tag("WebPage") });
283
+ const ArticleStructuredData = Schema.Struct({
284
+ type: Schema.tag("Article"),
285
+ headline: Schema.optionalKey(Schema.NonEmptyString),
286
+ datePublished: Schema.optionalKey(Schema.String.check(calendarDate)),
287
+ dateModified: Schema.optionalKey(Schema.String.check(calendarDate))
288
+ });
289
+ const DocumentStructuredData = Schema.Union([WebPageStructuredData, ArticleStructuredData]).pipe(Schema.toTaggedUnion("type"));
290
+ const IdentityType = Schema.Literals([
291
+ "Person",
292
+ "Organization",
293
+ "LocalBusiness"
294
+ ]);
295
+ const identityFields = {
296
+ name: Schema.NonEmptyString,
297
+ url: Schema.optionalKey(SeoUrl)
298
+ };
299
+ const PersonIdentity = Schema.Struct({
300
+ type: Schema.tag("Person"),
301
+ ...identityFields,
302
+ image: Schema.optionalKey(SeoImage)
303
+ });
304
+ const OrganizationIdentity = Schema.Struct({
305
+ type: Schema.tag("Organization"),
306
+ ...identityFields,
307
+ logo: Schema.optionalKey(SeoImage)
308
+ });
309
+ const PostalAddress = Schema.Struct({
310
+ streetAddress: Schema.optionalKey(Schema.NonEmptyString),
311
+ addressLocality: Schema.optionalKey(Schema.NonEmptyString),
312
+ addressRegion: Schema.optionalKey(Schema.NonEmptyString),
313
+ postalCode: Schema.optionalKey(Schema.NonEmptyString),
314
+ addressCountry: Schema.optionalKey(Schema.NonEmptyString)
315
+ }).annotate({ identifier: "PostalAddress" });
316
+ const LocalBusinessIdentity = Schema.Struct({
317
+ type: Schema.tag("LocalBusiness"),
318
+ ...identityFields,
319
+ logo: Schema.optionalKey(SeoImage),
320
+ image: Schema.optionalKey(SeoImage),
321
+ telephone: Schema.optionalKey(Schema.NonEmptyString),
322
+ address: Schema.optionalKey(PostalAddress)
323
+ });
324
+ const SiteIdentity = Schema.Union([
325
+ PersonIdentity,
326
+ OrganizationIdentity,
327
+ LocalBusinessIdentity
328
+ ]).pipe(Schema.toTaggedUnion("type"));
329
+ const DocumentSeo = Schema.Struct({
330
+ title: Schema.optionalKey(Schema.NonEmptyString),
331
+ description: Schema.optionalKey(Schema.NonEmptyString),
332
+ socialTitle: Schema.optionalKey(Schema.NonEmptyString),
333
+ socialDescription: Schema.optionalKey(Schema.NonEmptyString),
334
+ socialImage: Schema.optionalKey(SeoImage),
335
+ index: Schema.optionalKey(Schema.Boolean),
336
+ follow: Schema.optionalKey(Schema.Boolean),
337
+ canonicalUrl: Schema.optionalKey(SeoUrl),
338
+ structuredData: Schema.optionalKey(DocumentStructuredData)
339
+ }).annotate({ identifier: "DocumentSeo" });
340
+ const GlobalSeoSettings = Schema.Struct({
341
+ siteName: Schema.NonEmptyString,
342
+ defaultDescription: Schema.optionalKey(Schema.NonEmptyString),
343
+ canonicalOrigin: SeoCanonicalOrigin,
344
+ titleTemplate: Schema.optionalKey(Schema.NonEmptyString.check(titleTemplate)),
345
+ socialTitle: Schema.optionalKey(Schema.NonEmptyString),
346
+ socialDescription: Schema.optionalKey(Schema.NonEmptyString),
347
+ socialImage: Schema.optionalKey(SeoImage),
348
+ index: Schema.Boolean,
349
+ follow: Schema.Boolean,
350
+ identity: Schema.optionalKey(SiteIdentity)
351
+ }).annotate({ identifier: "GlobalSeoSettings" });
352
+ const SeoCapabilities = Schema.Struct({
353
+ structuredDataTypes: Schema.Array(StructuredDataType),
354
+ identityTypes: Schema.Array(IdentityType),
355
+ generatedSocialImageTemplateIds: Schema.Array(Schema.NonEmptyString)
356
+ }).annotate({ identifier: "SeoCapabilities" });
357
+ const SeoConfiguration = Schema.Struct({
358
+ defaults: GlobalSeoSettings,
359
+ capabilities: SeoCapabilities
360
+ }).annotate({ identifier: "SeoConfiguration" });
361
+ const ResolvedSeo = Schema.Struct({
362
+ title: Schema.NonEmptyString,
363
+ description: Schema.optionalKey(Schema.NonEmptyString),
364
+ socialTitle: Schema.NonEmptyString,
365
+ socialDescription: Schema.optionalKey(Schema.NonEmptyString),
366
+ socialImage: Schema.optionalKey(SeoImage),
367
+ canonicalUrl: SeoUrl,
368
+ index: Schema.Boolean,
369
+ follow: Schema.Boolean,
370
+ structuredData: Schema.optionalKey(DocumentStructuredData),
371
+ identity: Schema.optionalKey(SiteIdentity)
372
+ }).annotate({ identifier: "ResolvedSeo" });
373
+ const SeoVersion = Schema.NonEmptyString.pipe(Schema.brand("SeoVersion"));
374
+ const SeoRevisionId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand("SeoRevisionId"));
375
+ const SeoRevision = Schema.Struct({
376
+ revisionId: SeoRevisionId,
377
+ version: SeoVersion,
378
+ settings: GlobalSeoSettings,
379
+ editedBy: StudioActor,
380
+ editedAt: Schema.DateTimeUtcFromString
381
+ }).annotate({ identifier: "SeoRevision" });
382
+ const SeoState = Schema.Struct({
383
+ working: SeoRevision,
384
+ published: Schema.optionalKey(SeoRevision),
385
+ capabilities: SeoCapabilities
386
+ }).annotate({ identifier: "SeoState" });
387
+ const SeoSnapshot = Schema.Struct({
388
+ revision: SeoRevision,
389
+ capabilities: SeoCapabilities
390
+ }).annotate({ identifier: "SeoSnapshot" });
391
+ const mutationMetadata = {
392
+ reason: Schema.optionalKey(Schema.NonEmptyString.check(Schema.isMaxLength(1e3))),
393
+ confirmedSiteWideChange: Schema.optionalKey(Schema.Boolean)
394
+ };
395
+ const SaveSeoInput = Schema.Struct({
396
+ expectedVersion: SeoVersion,
397
+ settings: GlobalSeoSettings,
398
+ ...mutationMetadata
399
+ }).annotate({ identifier: "SaveSeoInput" });
400
+ const PublishSeoInput = Schema.Struct({
401
+ expectedVersion: SeoVersion,
402
+ ...mutationMetadata
403
+ }).annotate({ identifier: "PublishSeoInput" });
404
+ const SeoMutationResult = Schema.Struct({
405
+ action: Schema.Literals(["seo.save", "seo.publish"]),
406
+ state: SeoState
407
+ }).annotate({ identifier: "SeoMutationResult" });
408
+ const SitemapAlternative = Schema.Struct({
409
+ locale: Locale,
410
+ loc: PublicPath
411
+ }).annotate({ identifier: "SitemapAlternative" });
412
+ const SitemapEntry = Schema.Struct({
413
+ loc: PublicPath,
414
+ lastmod: Schema.DateTimeUtcFromString,
415
+ alternatives: Schema.optionalKey(Schema.Array(SitemapAlternative))
416
+ }).annotate({ identifier: "SitemapEntry" });
417
+ const SeoConfirmationChange = Schema.Literals(["canonicalOrigin", "indexability"]);
418
+ var SeoVersionConflict = class extends Schema.TaggedError()("Seo.VersionConflict", {
419
+ expectedVersion: SeoVersion,
420
+ actualVersion: SeoVersion
421
+ }) {};
422
+ var SeoConfirmationRequired = class extends Schema.TaggedError()("Seo.ConfirmationRequired", { changes: Schema.Array(SeoConfirmationChange) }) {};
423
+ var SeoMediaUnavailable = class extends Schema.TaggedError()("Seo.MediaUnavailable", { mediaId: MediaId }) {};
424
+
257
425
  //#endregion
258
426
  //#region ../protocol/src/internal/documents/models.ts
259
427
  const DocumentIssueCode = Schema.Literals([
@@ -264,6 +432,7 @@ const DocumentIssueCode = Schema.Literals([
264
432
  "markdown.parse",
265
433
  "reference.document",
266
434
  "reference.component",
435
+ "seo.invalid",
267
436
  "schema.option",
268
437
  "schema.constraint",
269
438
  "schema.required",
@@ -315,7 +484,6 @@ const CmsDocumentHeading = Schema.Struct({
315
484
  id: Schema.String,
316
485
  text: Schema.String
317
486
  });
318
- /** Stable, JSON-safe analysis derived from the same document used for delivery. */
319
487
  const CmsDocumentAnalysis = Schema.Struct({
320
488
  components: Schema.Array(Schema.NonEmptyString),
321
489
  headings: Schema.Array(CmsDocumentHeading),
@@ -324,7 +492,8 @@ const CmsDocumentAnalysis = Schema.Struct({
324
492
  });
325
493
  const CompiledDocumentSource = Schema.Struct({
326
494
  path: SourcePath,
327
- mappings: Schema.Array(DocumentSourceMapping)
495
+ mappings: Schema.Array(DocumentSourceMapping),
496
+ publishedAt: Schema.optionalKey(Schema.DateTimeUtcFromString)
328
497
  });
329
498
  const CompiledDocument = Schema.Struct({
330
499
  id: DocumentId,
@@ -335,6 +504,8 @@ const CompiledDocument = Schema.Struct({
335
504
  draft: Schema.Boolean,
336
505
  title: Schema.NonEmptyString,
337
506
  description: Schema.optionalKey(Schema.String),
507
+ seo: Schema.optionalKey(DocumentSeo),
508
+ resolvedSeo: Schema.optionalKey(ResolvedSeo),
338
509
  data: Schema.JsonObject,
339
510
  issues: Schema.Array(DocumentIssue),
340
511
  analysis: CmsDocumentAnalysis,
@@ -551,5 +722,5 @@ const DocumentValidationResult = Schema.Struct({
551
722
  }).annotate({ identifier: "DocumentValidationResult" });
552
723
 
553
724
  //#endregion
554
- export { MediaName as $, RemoveDocumentInput as A, StudioActor as B, MarkdownNode as C, Slug as Ct, PublishedDocumentPage as D, PublishedDocumentLookup as E, AccessDenied as F, MediaByteSize as G, StudioRequestContext as H, AuthenticationRequired as I, MediaCursor as J, MediaCleanupReport as K, DOCUMENT_ACTIONS as L, UndeleteDocumentInput as M, UnpublishDocumentInput as N, PublishedDocumentQuery as O, UpdateDocumentInput as P, MediaInvalid as Q, MEDIA_ACTIONS as R, DuplicateDocumentInput as S, RevisionNumber as St, PublishDocumentInput as T, nonNegativeInt as Tt, ImageMimeType as U, StudioEntryDenied as V, MediaAsset as W, MediaId as X, MediaFolder as Y, MediaIntegrityReport as Z, DocumentSource as _, DocumentVersion as _t, DOCUMENT_REVISION_ACTIONS as a, MediaReferenced as at, DocumentSurround as b, RelativeDocumentPath as bt, DocumentImportInput as c, MediaUpload as ct, DocumentIssue as d, Locale as dt, MediaNotFound as et, DocumentMutationResult as f, SourceDirectory as ft, DocumentRevisionAction as g, DocumentId as gt, DocumentQueryScalar as h, DocumentHistoryCursor as ht, CreateDocumentInput as i, MediaReference as it, RestoreDocumentInput as j, PublishedDocumentSurroundQuery as k, DocumentImportReport as l, AddressPattern as lt, DocumentNavigationQuery as m, DocumentGeneration as mt, CmsMarkdownDocument as n, MediaPage as nt, DeletedDocument as o, MediaStatus as ot, DocumentNavigationItem as p, RequestId as pt, MediaConflict as q, CompiledDocument as r, MediaQuery as rt, DocumentBrowseQuery as s, MediaTooLarge as st, CmsDocumentAnalysis as t, MediaObjectKey as tt, DocumentImportSource as u, CollectionName as ut, DocumentSourceMapping as v, EditorNodeId as vt, MoveDocumentInput as w, SourcePath as wt, DocumentValidationResult as x, RevisionId as xt, DocumentSummary as y, PublicPath as yt, Role as z };
555
- //# sourceMappingURL=models-BkMgeaOL.js.map
725
+ export { DOCUMENT_ACTIONS as $, RemoveDocumentInput as A, SeoCapabilities as B, MarkdownNode as C, MediaTooLarge as Ct, PublishedDocumentPage as D, Locale as Dt, PublishedDocumentLookup as E, CollectionName as Et, DocumentSeo as F, SeoRevision as G, SeoConfirmationRequired as H, GlobalSeoSettings as I, SeoUrl as J, SeoSnapshot as K, PublishSeoInput as L, UndeleteDocumentInput as M, UnpublishDocumentInput as N, PublishedDocumentQuery as O, SourceDirectory as Ot, UpdateDocumentInput as P, AuthenticationRequired as Q, SaveSeoInput as R, DuplicateDocumentInput as S, MediaStatus as St, PublishDocumentInput as T, AddressPattern as Tt, SeoMediaUnavailable as U, SeoConfiguration as V, SeoMutationResult as W, SitemapEntry as X, SeoVersionConflict as Y, AccessDenied as Z, DocumentSource as _, MediaObjectKey as _t, DOCUMENT_REVISION_ACTIONS as a, ImageMimeType as at, DocumentSurround as b, MediaReference as bt, DocumentImportInput as c, MediaCleanupReport as ct, DocumentIssue as d, MediaFolder as dt, MEDIA_ACTIONS as et, DocumentMutationResult as f, MediaId as ft, DocumentRevisionAction as g, MediaNotFound as gt, DocumentQueryScalar as h, MediaName as ht, CreateDocumentInput as i, StudioRequestContext as it, RestoreDocumentInput as j, PublishedDocumentSurroundQuery as k, RequestId as kt, DocumentImportReport as l, MediaConflict as lt, DocumentNavigationQuery as m, MediaInvalid as mt, CmsMarkdownDocument as n, StudioActor as nt, DeletedDocument as o, MediaAsset as ot, DocumentNavigationItem as p, MediaIntegrityReport as pt, SeoState as q, CompiledDocument as r, StudioEntryDenied as rt, DocumentBrowseQuery as s, MediaByteSize as st, CmsDocumentAnalysis as t, Role as tt, DocumentImportSource as u, MediaCursor as ut, DocumentSourceMapping as v, MediaPage as vt, MoveDocumentInput as w, MediaUpload as wt, DocumentValidationResult as x, MediaReferenced as xt, DocumentSummary as y, MediaQuery as yt, SeoCanonicalOrigin as z };
726
+ //# sourceMappingURL=models-DwYioyNV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models-DwYioyNV.js","names":[],"sources":["../../../../protocol/src/Identity.ts","../../../../protocol/src/internal/configuration/scalars.ts","../../../../protocol/src/Media.ts","../../../../protocol/src/AccessControl.ts","../../../../protocol/src/Seo.ts","../../../../protocol/src/internal/documents/models.ts"],"sourcesContent":["import { Schema } from 'effect'\n\nexport const RequestId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand('RequestId'))\n\nexport type RequestId = typeof RequestId.Type\n","import { Schema } from 'effect'\nimport { publicPathPattern } from '../scalars'\n\nconst collectionNamePattern = /^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$/u\n\nconst localePattern = /^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u\n\nconst sourceDirectoryPattern = /^(?:\\.|(?!\\.)[^/?#\\\\]+(?:\\/(?!\\.)[^/?#\\\\]+)*)$/u\n\nexport const AddressPattern = Schema.String.check(Schema.isPattern(publicPathPattern)).pipe(\n Schema.brand('AddressPattern'),\n)\n\nexport type AddressPattern = typeof AddressPattern.Type\n\nexport const CollectionName = Schema.String.check(Schema.isPattern(collectionNamePattern)).pipe(\n Schema.brand('CollectionName'),\n)\n\nexport type CollectionName = typeof CollectionName.Type\n\nexport const Locale = Schema.String.check(Schema.isPattern(localePattern)).pipe(Schema.brand('Locale'))\n\nexport type Locale = typeof Locale.Type\n\nexport const SourceDirectory = Schema.String.check(Schema.isPattern(sourceDirectoryPattern)).pipe(\n Schema.brand('SourceDirectory'),\n)\n\nexport type SourceDirectory = typeof SourceDirectory.Type\n","/**\n * Media wire models. Search pages are newest-first with opaque continuation cursors; only ready\n * assets are public results, and names, folders, and object keys are validated path-safe values.\n */\nimport { Schema } from 'effect'\nimport { DocumentId, PublicPath, SourcePath } from './internal/documents/scalars'\nimport { nonNegativeInt } from './internal/scalars'\n\nconst hasUnsafeMediaCharacter = (value: string): boolean => {\n for (const character of value) {\n const codePoint = character.codePointAt(0)\n\n if (character === '\\\\' || (codePoint !== undefined && (codePoint <= 31 || codePoint === 127))) return true\n }\n\n return false\n}\n\nconst isSafeMediaPath = (value: string, allowEmpty: boolean): boolean => {\n if (value.length === 0) return allowEmpty\n\n if (value !== value.trim() || value.startsWith('/') || value.endsWith('/') || hasUnsafeMediaCharacter(value)) {\n return false\n }\n\n return value.split('/').every((segment) => segment.length > 0 && segment !== '.' && segment !== '..')\n}\n\nconst safeMediaFolder = Schema.makeFilter<string>((value) => isSafeMediaPath(value, true), {\n expected: 'a provider-relative media folder without traversal segments',\n})\n\nconst safeMediaObjectKey = Schema.makeFilter<string>((value) => isSafeMediaPath(value, false), {\n expected: 'a non-empty provider-relative media object key without traversal segments',\n})\n\nconst safeMediaName = Schema.makeFilter<string>(\n (value) =>\n value.length > 0 &&\n value.length <= 255 &&\n value === value.trim() &&\n value !== '.' &&\n value !== '..' &&\n !value.includes('/') &&\n !hasUnsafeMediaCharacter(value),\n { expected: 'a safe media file name of at most 255 characters' },\n)\n\nexport const MediaId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand('MediaId'))\n\nexport type MediaId = typeof MediaId.Type\n\nexport const MediaFolder = Schema.String.check(Schema.isMaxLength(512), safeMediaFolder).pipe(\n Schema.brand('MediaFolder'),\n)\n\nexport type MediaFolder = typeof MediaFolder.Type\n\nexport const MediaObjectKey = Schema.String.check(Schema.isMaxLength(1024), safeMediaObjectKey).pipe(\n Schema.brand('MediaObjectKey'),\n)\n\nexport type MediaObjectKey = typeof MediaObjectKey.Type\n\nexport const MediaName = Schema.String.check(safeMediaName).pipe(Schema.brand('MediaName'))\n\nexport type MediaName = typeof MediaName.Type\n\nexport const MediaCursor = Schema.NonEmptyString.pipe(Schema.brand('MediaCursor'))\n\nexport type MediaCursor = typeof MediaCursor.Type\n\nexport const ImageMimeType = Schema.Literals(['image/avif', 'image/gif', 'image/jpeg', 'image/png', 'image/webp'])\n\nexport type ImageMimeType = typeof ImageMimeType.Type\n\nexport const MediaStatus = Schema.Literals(['uploading', 'ready', 'deleting'])\n\nexport type MediaStatus = typeof MediaStatus.Type\n\nexport const MediaByteSize = Schema.Int.check(Schema.isGreaterThan(0))\n\nexport type MediaByteSize = typeof MediaByteSize.Type\n\nexport const MediaAsset = Schema.Struct({\n kind: Schema.tag('image'),\n id: MediaId,\n objectKey: MediaObjectKey,\n url: Schema.NonEmptyString,\n name: MediaName,\n folder: MediaFolder,\n mimeType: ImageMimeType,\n byteSize: MediaByteSize,\n createdAt: Schema.DateTimeUtcFromString,\n updatedAt: Schema.DateTimeUtcFromString,\n status: MediaStatus,\n}).annotate({ identifier: 'MediaAsset' })\n\nexport interface MediaAsset extends Schema.Schema.Type<typeof MediaAsset> {}\n\nexport const MediaUpload = Schema.Struct({\n name: MediaName,\n folder: Schema.optionalKey(MediaFolder),\n declaredMimeType: Schema.optionalKey(Schema.NonEmptyString),\n declaredByteSize: MediaByteSize,\n}).annotate({ identifier: 'MediaUpload' })\n\nexport interface MediaUpload extends Schema.Schema.Type<typeof MediaUpload> {}\n\nexport const MediaQuery = Schema.Struct({\n cursor: Schema.optionalKey(MediaCursor),\n folder: Schema.optionalKey(MediaFolder),\n search: Schema.optionalKey(Schema.NonEmptyString.check(Schema.isMaxLength(200))),\n limit: Schema.optionalKey(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 }))),\n}).annotate({ identifier: 'MediaQuery' })\n\nexport interface MediaQuery extends Schema.Schema.Type<typeof MediaQuery> {}\n\nconst ReadyMediaAssets = Schema.Array(MediaAsset).check(\n Schema.makeFilter((assets) => assets.every((asset) => asset.status === 'ready'), {\n expected: 'media assets whose lifecycle status is ready',\n }),\n)\n\nexport const MediaPage = Schema.Struct({\n assets: ReadyMediaAssets,\n folders: Schema.Array(MediaFolder),\n nextCursor: Schema.optionalKey(MediaCursor),\n total: nonNegativeInt,\n}).annotate({ identifier: 'MediaPage' })\n\nexport interface MediaPage extends Schema.Schema.Type<typeof MediaPage> {}\n\nexport const MediaReference = Schema.Struct({\n documentId: DocumentId,\n mediaId: Schema.optionalKey(MediaId),\n path: PublicPath,\n sourcePath: SourcePath,\n objectKey: MediaObjectKey,\n nodePath: Schema.Array(nonNegativeInt),\n}).annotate({ identifier: 'MediaReference' })\n\nexport interface MediaReference extends Schema.Schema.Type<typeof MediaReference> {}\n\nconst MediaObjectMismatch = Schema.Struct({\n asset: MediaAsset,\n storedByteSize: MediaByteSize,\n storedMimeType: Schema.optionalKey(ImageMimeType),\n}).annotate({ identifier: 'MediaObjectMismatch' })\n\nexport const MediaIntegrityReport = Schema.Struct({\n missingAssets: Schema.Array(MediaReference),\n missingObjects: Schema.Array(MediaAsset),\n mismatchedObjects: Schema.Array(MediaObjectMismatch),\n orphanedObjectKeys: Schema.Array(MediaObjectKey),\n unusedAssets: Schema.Array(MediaAsset),\n}).annotate({ identifier: 'MediaIntegrityReport' })\n\nexport interface MediaIntegrityReport extends Schema.Schema.Type<typeof MediaIntegrityReport> {}\n\nexport const MediaCleanupReport = Schema.Struct({\n removedObjectKeys: Schema.Array(MediaObjectKey),\n}).annotate({ identifier: 'MediaCleanupReport' })\n\nexport interface MediaCleanupReport extends Schema.Schema.Type<typeof MediaCleanupReport> {}\n\nexport class MediaNotFound extends Schema.TaggedError<MediaNotFound>()('Media.NotFound', {\n mediaId: MediaId,\n}) {}\n\nexport class MediaReferenced extends Schema.TaggedError<MediaReferenced>()('Media.Referenced', {\n mediaId: MediaId,\n references: Schema.Array(MediaReference),\n seoScopes: Schema.optionalKey(Schema.Array(Schema.Literals(['working', 'published']))),\n}) {}\n\nexport class MediaConflict extends Schema.TaggedError<MediaConflict>()('Media.Conflict', {\n mediaId: MediaId,\n}) {}\n\nexport class MediaInvalid extends Schema.TaggedError<MediaInvalid>()('Media.Invalid', {\n message: Schema.NonEmptyString,\n}) {}\n\nexport class MediaTooLarge extends Schema.TaggedError<MediaTooLarge>()('Media.TooLarge', {\n declaredByteSize: MediaByteSize,\n maxUploadBytes: MediaByteSize,\n}) {}\n","import { Schema } from 'effect'\nimport { RequestId } from './Identity'\nimport { CollectionName, Locale } from './internal/configuration/scalars'\nimport { DocumentId } from './internal/documents/scalars'\nimport { MediaFolder, MediaId } from './Media'\n\nexport const ROLES = ['administrator', 'editor', 'viewer'] as const\n\nexport const Role = Schema.Literals(ROLES)\n\nexport type Role = typeof Role.Type\n\nexport const StudioActor = Schema.Struct({\n id: Schema.NonEmptyString,\n email: Schema.NonEmptyString,\n name: Schema.NonEmptyString,\n // Provider roles remain visible, while access control recognizes only Role values.\n roles: Schema.Array(Schema.NonEmptyString),\n}).annotate({ identifier: 'StudioActor' })\n\nexport interface StudioActor extends Schema.Schema.Type<typeof StudioActor> {}\n\nexport const StudioRequestContext = Schema.Struct({\n actor: StudioActor,\n requestId: RequestId,\n}).annotate({ identifier: 'StudioRequestContext' })\n\nexport interface StudioRequestContext extends Schema.Schema.Type<typeof StudioRequestContext> {}\n\nexport const DOCUMENT_ACTIONS = [\n 'document.browse',\n 'document.read',\n 'document.trash',\n 'document.validate',\n 'document.create',\n 'document.update',\n 'document.move',\n 'document.remove',\n 'document.restore',\n 'document.undelete',\n 'document.publish',\n 'document.unpublish',\n 'document.duplicate',\n 'document.history',\n] as const\n\nconst DocumentAction = Schema.Literals(DOCUMENT_ACTIONS)\n\nconst DocumentCatalogResource = Schema.Struct({\n kind: Schema.tag('catalog'),\n})\n\nconst CollectionResource = Schema.Struct({\n kind: Schema.tag('collection'),\n collection: CollectionName,\n locale: Schema.optionalKey(Locale),\n})\n\nconst DocumentResource = Schema.Struct({\n kind: Schema.tag('document'),\n documentId: DocumentId,\n})\n\nconst DocumentAccessResource = Schema.Union([DocumentCatalogResource, CollectionResource, DocumentResource]).pipe(\n Schema.toTaggedUnion('kind'),\n)\n\nexport const DocumentAccessDecision = Schema.Struct({\n action: DocumentAction,\n resource: DocumentAccessResource,\n}).annotate({ identifier: 'DocumentAccessDecision' })\n\nexport interface DocumentAccessDecision extends Schema.Schema.Type<typeof DocumentAccessDecision> {}\n\nexport const MEDIA_ACTIONS = [\n 'media.read',\n 'media.search',\n 'media.integrity',\n 'media.upload',\n 'media.replace',\n 'media.remove',\n 'media.cleanup',\n] as const\n\nconst MediaAction = Schema.Literals(MEDIA_ACTIONS)\n\nconst MediaCatalogResource = Schema.Struct({\n kind: Schema.tag('media-catalog'),\n})\n\nconst MediaAssetResource = Schema.Struct({\n kind: Schema.tag('media-asset'),\n mediaId: MediaId,\n})\n\nconst MediaFolderResource = Schema.Struct({\n kind: Schema.tag('media-folder'),\n folder: MediaFolder,\n})\n\nconst MediaResource = Schema.Union([MediaCatalogResource, MediaAssetResource, MediaFolderResource]).pipe(\n Schema.toTaggedUnion('kind'),\n)\n\nexport const MediaAccessDecision = Schema.Struct({\n action: MediaAction,\n resource: MediaResource,\n}).annotate({ identifier: 'MediaAccessDecision' })\n\nexport interface MediaAccessDecision extends Schema.Schema.Type<typeof MediaAccessDecision> {}\n\nconst ActivityResource = Schema.Struct({\n kind: Schema.tag('activity'),\n})\n\nconst ActivityAccessDecision = Schema.Struct({\n action: Schema.Literal('activity.read'),\n resource: ActivityResource,\n}).annotate({ identifier: 'ActivityAccessDecision' })\n\nexport const SEO_ACTIONS = ['seo.read', 'seo.save', 'seo.publish'] as const\n\nconst SeoAction = Schema.Literals(SEO_ACTIONS)\n\nconst SeoResource = Schema.Struct({ kind: Schema.tag('seo') })\n\nexport const SeoAccessDecision = Schema.Struct({\n action: SeoAction,\n resource: SeoResource,\n}).annotate({ identifier: 'SeoAccessDecision' })\n\nexport interface SeoAccessDecision extends Schema.Schema.Type<typeof SeoAccessDecision> {}\n\nconst STUDIO_ACTIONS = [...DOCUMENT_ACTIONS, ...MEDIA_ACTIONS, ...SEO_ACTIONS, 'activity.read'] as const\n\nexport const StudioAction = Schema.Literals(STUDIO_ACTIONS)\n\nexport type StudioAction = typeof StudioAction.Type\n\nconst StudioResource = Schema.Union([DocumentAccessResource, MediaResource, ActivityResource, SeoResource])\n\nexport const StudioAccessDecision = Schema.Union([\n DocumentAccessDecision,\n MediaAccessDecision,\n ActivityAccessDecision,\n SeoAccessDecision,\n])\n\nexport type StudioAccessDecision = typeof StudioAccessDecision.Type\n\nexport class AuthenticationRequired extends Schema.TaggedError<AuthenticationRequired>()(\n 'Studio.AuthenticationRequired',\n {},\n) {}\n\nexport class StudioEntryDenied extends Schema.TaggedError<StudioEntryDenied>()('Studio.EntryDenied', {}) {}\n\nexport class AccessDenied extends Schema.TaggedError<AccessDenied>()('Studio.AccessDenied', {\n action: StudioAction,\n actorId: StudioActor.fields.id,\n resource: StudioResource,\n}) {}\n","import { DateTime, Option, Schema } from 'effect'\nimport { StudioActor } from './AccessControl'\nimport { MediaId } from './Media'\nimport { Locale } from './internal/configuration/scalars'\nimport { PublicPath } from './internal/documents/scalars'\n\nconst absoluteUrl = Schema.makeFilter<string>(\n (value) => {\n try {\n const url = new URL(value)\n\n return url.protocol === 'http:' || url.protocol === 'https:'\n } catch {\n return false\n }\n },\n { expected: 'an absolute HTTP or HTTPS URL' },\n)\n\nconst canonicalOrigin = Schema.makeFilter<string>(\n (value) => {\n try {\n const url = new URL(value)\n\n return (\n (url.protocol === 'http:' || url.protocol === 'https:') &&\n url.origin === value &&\n url.pathname === '/' &&\n url.search === '' &&\n url.hash === ''\n )\n } catch {\n return false\n }\n },\n { expected: 'an HTTP or HTTPS origin without a path, query, hash, or trailing slash' },\n)\n\nconst titleTemplate = Schema.makeFilter<string>((value) => value.includes('%s'), {\n expected: 'a title template containing %s',\n})\n\nconst calendarDate = Schema.makeFilter<string>(\n (value) => {\n if (!/^\\d{4}-\\d{2}-\\d{2}$/u.test(value)) return false\n const parsed = DateTime.make(value)\n\n return Option.isSome(parsed) && DateTime.formatIsoDate(parsed.value) === value\n },\n { expected: 'a valid calendar date in YYYY-MM-DD format' },\n)\n\nexport const SeoUrl = Schema.NonEmptyString.check(absoluteUrl).pipe(Schema.brand('SeoUrl'))\n\nexport type SeoUrl = typeof SeoUrl.Type\n\nexport const SeoCanonicalOrigin = Schema.NonEmptyString.check(canonicalOrigin).pipe(Schema.brand('SeoCanonicalOrigin'))\n\nexport type SeoCanonicalOrigin = typeof SeoCanonicalOrigin.Type\n\nexport const SeoImage = Schema.Struct({\n mediaId: MediaId,\n url: SeoUrl,\n alt: Schema.NonEmptyString,\n}).annotate({ identifier: 'SeoImage' })\n\nexport interface SeoImage extends Schema.Schema.Type<typeof SeoImage> {}\n\nexport const StructuredDataType = Schema.Literals(['WebPage', 'Article'])\n\nexport type StructuredDataType = typeof StructuredDataType.Type\n\nconst WebPageStructuredData = Schema.Struct({\n type: Schema.tag('WebPage'),\n})\n\nconst ArticleStructuredData = Schema.Struct({\n type: Schema.tag('Article'),\n headline: Schema.optionalKey(Schema.NonEmptyString),\n datePublished: Schema.optionalKey(Schema.String.check(calendarDate)),\n dateModified: Schema.optionalKey(Schema.String.check(calendarDate)),\n})\n\nexport const DocumentStructuredData = Schema.Union([WebPageStructuredData, ArticleStructuredData]).pipe(\n Schema.toTaggedUnion('type'),\n)\n\nexport type DocumentStructuredData = typeof DocumentStructuredData.Type\n\nexport const IdentityType = Schema.Literals(['Person', 'Organization', 'LocalBusiness'])\n\nexport type IdentityType = typeof IdentityType.Type\n\nconst identityFields = {\n name: Schema.NonEmptyString,\n url: Schema.optionalKey(SeoUrl),\n}\n\nconst PersonIdentity = Schema.Struct({\n type: Schema.tag('Person'),\n ...identityFields,\n image: Schema.optionalKey(SeoImage),\n})\n\nconst OrganizationIdentity = Schema.Struct({\n type: Schema.tag('Organization'),\n ...identityFields,\n logo: Schema.optionalKey(SeoImage),\n})\n\nexport const PostalAddress = Schema.Struct({\n streetAddress: Schema.optionalKey(Schema.NonEmptyString),\n addressLocality: Schema.optionalKey(Schema.NonEmptyString),\n addressRegion: Schema.optionalKey(Schema.NonEmptyString),\n postalCode: Schema.optionalKey(Schema.NonEmptyString),\n addressCountry: Schema.optionalKey(Schema.NonEmptyString),\n}).annotate({ identifier: 'PostalAddress' })\n\nexport interface PostalAddress extends Schema.Schema.Type<typeof PostalAddress> {}\n\nconst LocalBusinessIdentity = Schema.Struct({\n type: Schema.tag('LocalBusiness'),\n ...identityFields,\n logo: Schema.optionalKey(SeoImage),\n image: Schema.optionalKey(SeoImage),\n telephone: Schema.optionalKey(Schema.NonEmptyString),\n address: Schema.optionalKey(PostalAddress),\n})\n\nexport const SiteIdentity = Schema.Union([PersonIdentity, OrganizationIdentity, LocalBusinessIdentity]).pipe(\n Schema.toTaggedUnion('type'),\n)\n\nexport type SiteIdentity = typeof SiteIdentity.Type\n\nexport const DocumentSeo = Schema.Struct({\n title: Schema.optionalKey(Schema.NonEmptyString),\n description: Schema.optionalKey(Schema.NonEmptyString),\n socialTitle: Schema.optionalKey(Schema.NonEmptyString),\n socialDescription: Schema.optionalKey(Schema.NonEmptyString),\n socialImage: Schema.optionalKey(SeoImage),\n index: Schema.optionalKey(Schema.Boolean),\n follow: Schema.optionalKey(Schema.Boolean),\n canonicalUrl: Schema.optionalKey(SeoUrl),\n structuredData: Schema.optionalKey(DocumentStructuredData),\n}).annotate({ identifier: 'DocumentSeo' })\n\nexport interface DocumentSeo extends Schema.Schema.Type<typeof DocumentSeo> {}\n\nexport const GlobalSeoSettings = Schema.Struct({\n siteName: Schema.NonEmptyString,\n defaultDescription: Schema.optionalKey(Schema.NonEmptyString),\n canonicalOrigin: SeoCanonicalOrigin,\n titleTemplate: Schema.optionalKey(Schema.NonEmptyString.check(titleTemplate)),\n socialTitle: Schema.optionalKey(Schema.NonEmptyString),\n socialDescription: Schema.optionalKey(Schema.NonEmptyString),\n socialImage: Schema.optionalKey(SeoImage),\n index: Schema.Boolean,\n follow: Schema.Boolean,\n identity: Schema.optionalKey(SiteIdentity),\n}).annotate({ identifier: 'GlobalSeoSettings' })\n\nexport interface GlobalSeoSettings extends Schema.Schema.Type<typeof GlobalSeoSettings> {}\n\nexport const SeoCapabilities = Schema.Struct({\n structuredDataTypes: Schema.Array(StructuredDataType),\n identityTypes: Schema.Array(IdentityType),\n generatedSocialImageTemplateIds: Schema.Array(Schema.NonEmptyString),\n}).annotate({ identifier: 'SeoCapabilities' })\n\nexport interface SeoCapabilities extends Schema.Schema.Type<typeof SeoCapabilities> {}\n\nexport const SeoConfiguration = Schema.Struct({\n defaults: GlobalSeoSettings,\n capabilities: SeoCapabilities,\n}).annotate({ identifier: 'SeoConfiguration' })\n\nexport interface SeoConfiguration extends Schema.Schema.Type<typeof SeoConfiguration> {}\n\nexport const ResolvedSeo = Schema.Struct({\n title: Schema.NonEmptyString,\n description: Schema.optionalKey(Schema.NonEmptyString),\n socialTitle: Schema.NonEmptyString,\n socialDescription: Schema.optionalKey(Schema.NonEmptyString),\n socialImage: Schema.optionalKey(SeoImage),\n canonicalUrl: SeoUrl,\n index: Schema.Boolean,\n follow: Schema.Boolean,\n structuredData: Schema.optionalKey(DocumentStructuredData),\n identity: Schema.optionalKey(SiteIdentity),\n}).annotate({ identifier: 'ResolvedSeo' })\n\nexport interface ResolvedSeo extends Schema.Schema.Type<typeof ResolvedSeo> {}\n\nexport const SeoVersion = Schema.NonEmptyString.pipe(Schema.brand('SeoVersion'))\n\nexport type SeoVersion = typeof SeoVersion.Type\n\nexport const SeoRevisionId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand('SeoRevisionId'))\n\nexport type SeoRevisionId = typeof SeoRevisionId.Type\n\nexport const SeoRevision = Schema.Struct({\n revisionId: SeoRevisionId,\n version: SeoVersion,\n settings: GlobalSeoSettings,\n editedBy: StudioActor,\n editedAt: Schema.DateTimeUtcFromString,\n}).annotate({ identifier: 'SeoRevision' })\n\nexport interface SeoRevision extends Schema.Schema.Type<typeof SeoRevision> {}\n\nexport const SeoState = Schema.Struct({\n working: SeoRevision,\n published: Schema.optionalKey(SeoRevision),\n capabilities: SeoCapabilities,\n}).annotate({ identifier: 'SeoState' })\n\nexport interface SeoState extends Schema.Schema.Type<typeof SeoState> {}\n\nexport const SeoSnapshot = Schema.Struct({\n revision: SeoRevision,\n capabilities: SeoCapabilities,\n}).annotate({ identifier: 'SeoSnapshot' })\n\nexport interface SeoSnapshot extends Schema.Schema.Type<typeof SeoSnapshot> {}\n\nconst mutationMetadata = {\n reason: Schema.optionalKey(Schema.NonEmptyString.check(Schema.isMaxLength(1_000))),\n confirmedSiteWideChange: Schema.optionalKey(Schema.Boolean),\n}\n\nexport const SaveSeoInput = Schema.Struct({\n expectedVersion: SeoVersion,\n settings: GlobalSeoSettings,\n ...mutationMetadata,\n}).annotate({ identifier: 'SaveSeoInput' })\n\nexport interface SaveSeoInput extends Schema.Schema.Type<typeof SaveSeoInput> {}\n\nexport const PublishSeoInput = Schema.Struct({\n expectedVersion: SeoVersion,\n ...mutationMetadata,\n}).annotate({ identifier: 'PublishSeoInput' })\n\nexport interface PublishSeoInput extends Schema.Schema.Type<typeof PublishSeoInput> {}\n\nexport const SeoMutationResult = Schema.Struct({\n action: Schema.Literals(['seo.save', 'seo.publish']),\n state: SeoState,\n}).annotate({ identifier: 'SeoMutationResult' })\n\nexport interface SeoMutationResult extends Schema.Schema.Type<typeof SeoMutationResult> {}\n\nexport const SitemapAlternative = Schema.Struct({\n locale: Locale,\n loc: PublicPath,\n}).annotate({ identifier: 'SitemapAlternative' })\n\nexport interface SitemapAlternative extends Schema.Schema.Type<typeof SitemapAlternative> {}\n\nexport const SitemapEntry = Schema.Struct({\n loc: PublicPath,\n lastmod: Schema.DateTimeUtcFromString,\n alternatives: Schema.optionalKey(Schema.Array(SitemapAlternative)),\n}).annotate({ identifier: 'SitemapEntry' })\n\nexport interface SitemapEntry extends Schema.Schema.Type<typeof SitemapEntry> {}\n\nexport const SeoConfirmationChange = Schema.Literals(['canonicalOrigin', 'indexability'])\n\nexport type SeoConfirmationChange = typeof SeoConfirmationChange.Type\n\nexport class SeoVersionConflict extends Schema.TaggedError<SeoVersionConflict>()('Seo.VersionConflict', {\n expectedVersion: SeoVersion,\n actualVersion: SeoVersion,\n}) {}\n\nexport class SeoConfirmationRequired extends Schema.TaggedError<SeoConfirmationRequired>()('Seo.ConfirmationRequired', {\n changes: Schema.Array(SeoConfirmationChange),\n}) {}\n\nexport class SeoMediaUnavailable extends Schema.TaggedError<SeoMediaUnavailable>()('Seo.MediaUnavailable', {\n mediaId: MediaId,\n}) {}\n","import { Schema } from 'effect'\nimport { StudioActor } from '../../AccessControl'\nimport { CollectionName, Locale } from '../configuration/scalars'\nimport { nonNegativeInt } from '../scalars'\nimport { DocumentSeo, ResolvedSeo } from '../../Seo'\nimport {\n DocumentGeneration,\n DocumentVersion,\n DocumentId,\n PublicPath,\n RelativeDocumentPath,\n RevisionId,\n Slug,\n SourcePath,\n} from './scalars'\n\nexport const DocumentIssueCode = Schema.Literals([\n 'document.collision',\n 'document.id',\n 'document.invalid',\n 'i18n.missing-translation',\n 'markdown.parse',\n 'reference.document',\n 'reference.component',\n 'seo.invalid',\n 'schema.option',\n 'schema.constraint',\n 'schema.required',\n 'schema.type',\n 'schema.unknown',\n])\n\nexport type DocumentIssueCode = typeof DocumentIssueCode.Type\n\nexport const DocumentIssue = Schema.Struct({\n code: DocumentIssueCode,\n severity: Schema.Literals(['error', 'warning']),\n message: Schema.NonEmptyString,\n sourcePath: Schema.optionalKey(SourcePath),\n collection: Schema.optionalKey(CollectionName),\n field: Schema.optionalKey(Schema.NonEmptyString),\n key: Schema.optionalKey(PublicPath),\n locale: Schema.optionalKey(Locale),\n}).annotate({ identifier: 'DocumentIssue' })\n\nexport interface DocumentIssue extends Schema.Schema.Type<typeof DocumentIssue> {}\n\nexport const DocumentSourcePoint = Schema.Struct({\n offset: nonNegativeInt,\n line: nonNegativeInt,\n column: nonNegativeInt,\n})\n\nexport interface DocumentSourcePoint extends Schema.Schema.Type<typeof DocumentSourcePoint> {}\n\nexport const DocumentSourceRange = Schema.Struct({\n start: DocumentSourcePoint,\n end: DocumentSourcePoint,\n})\n\nexport interface DocumentSourceRange extends Schema.Schema.Type<typeof DocumentSourceRange> {}\n\nexport const DocumentSourceMapping = Schema.Struct({\n nodePath: Schema.Array(nonNegativeInt),\n range: DocumentSourceRange,\n})\n\nexport interface DocumentSourceMapping extends Schema.Schema.Type<typeof DocumentSourceMapping> {}\n\nexport type MarkdownNode =\n | string\n | readonly [null, Schema.JsonObject, string]\n | readonly [string, Schema.JsonObject, ...MarkdownNode[]]\n\nexport const MarkdownNode: Schema.Codec<MarkdownNode> = Schema.suspend(() =>\n Schema.Union([\n Schema.String,\n Schema.Tuple([Schema.Null, Schema.JsonObject, Schema.String]),\n Schema.TupleWithRest(Schema.Tuple([Schema.NonEmptyString, Schema.JsonObject]), [MarkdownNode]),\n ]),\n)\n\nexport const CmsMarkdownDocument = Schema.Struct({\n nodes: Schema.Array(MarkdownNode),\n frontmatter: Schema.JsonObject,\n meta: Schema.JsonObject,\n}).annotate({ identifier: 'CmsMarkdownDocument' })\n\nexport interface CmsMarkdownDocument extends Schema.Schema.Type<typeof CmsMarkdownDocument> {}\n\nexport const CmsDocumentHeading = Schema.Struct({\n depth: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 6 })),\n id: Schema.String,\n text: Schema.String,\n})\n\nexport interface CmsDocumentHeading extends Schema.Schema.Type<typeof CmsDocumentHeading> {}\n\nexport const CmsDocumentAnalysis = Schema.Struct({\n components: Schema.Array(Schema.NonEmptyString),\n headings: Schema.Array(CmsDocumentHeading),\n searchText: Schema.String,\n summary: Schema.String,\n})\n\nexport interface CmsDocumentAnalysis extends Schema.Schema.Type<typeof CmsDocumentAnalysis> {}\n\nexport const CompiledDocumentSource = Schema.Struct({\n path: SourcePath,\n mappings: Schema.Array(DocumentSourceMapping),\n publishedAt: Schema.optionalKey(Schema.DateTimeUtcFromString),\n})\n\nexport interface CompiledDocumentSource extends Schema.Schema.Type<typeof CompiledDocumentSource> {}\n\nexport const CompiledDocument = Schema.Struct({\n id: DocumentId,\n key: PublicPath,\n path: PublicPath,\n locale: Schema.optionalKey(Locale),\n collection: CollectionName,\n draft: Schema.Boolean,\n title: Schema.NonEmptyString,\n description: Schema.optionalKey(Schema.String),\n seo: Schema.optionalKey(DocumentSeo),\n resolvedSeo: Schema.optionalKey(ResolvedSeo),\n data: Schema.JsonObject,\n issues: Schema.Array(DocumentIssue),\n analysis: CmsDocumentAnalysis,\n body: CmsMarkdownDocument,\n engineFingerprint: Schema.NonEmptyString,\n source: CompiledDocumentSource,\n}).annotate({ identifier: 'CompiledDocument' })\n\nexport interface CompiledDocument extends Schema.Schema.Type<typeof CompiledDocument> {}\n\nconst documentAttribution = {\n createdBy: Schema.optionalKey(StudioActor),\n editedBy: Schema.optionalKey(StudioActor),\n editedAt: Schema.optionalKey(Schema.DateTimeUtcFromString),\n}\n\nexport const DocumentSource = Schema.Struct({\n ...documentAttribution,\n documentId: DocumentId,\n sourcePath: SourcePath,\n markdown: Schema.String,\n revisionId: RevisionId,\n version: DocumentVersion,\n publishedVersion: Schema.optionalKey(DocumentVersion),\n}).annotate({ identifier: 'DocumentSource' })\n\nexport interface DocumentSource extends Schema.Schema.Type<typeof DocumentSource> {}\n\nexport const DocumentImportSource = Schema.Struct({\n sourcePath: SourcePath,\n markdown: Schema.String,\n published: Schema.Boolean,\n}).annotate({ identifier: 'DocumentImportSource' })\n\nexport interface DocumentImportSource extends Schema.Schema.Type<typeof DocumentImportSource> {}\n\nexport const DocumentImportMode = Schema.Literals(['preserve', 'overwrite'])\n\nexport type DocumentImportMode = typeof DocumentImportMode.Type\n\nexport const DocumentImportInput = Schema.Struct({\n sources: Schema.Array(DocumentImportSource),\n mode: DocumentImportMode,\n reason: Schema.optionalKey(Schema.NonEmptyString.check(Schema.isMaxLength(1_000))),\n}).annotate({ identifier: 'DocumentImportInput' })\n\nexport interface DocumentImportInput extends Schema.Schema.Type<typeof DocumentImportInput> {}\n\nexport const DocumentImportReport = Schema.Struct({\n created: nonNegativeInt,\n preserved: nonNegativeInt,\n published: nonNegativeInt,\n unchanged: nonNegativeInt,\n updated: nonNegativeInt,\n}).annotate({ identifier: 'DocumentImportReport' })\n\nexport interface DocumentImportReport extends Schema.Schema.Type<typeof DocumentImportReport> {}\n\nexport const DocumentSummary = Schema.Struct({\n ...documentAttribution,\n publishedVersion: Schema.optionalKey(DocumentVersion),\n publishedPath: Schema.optionalKey(PublicPath),\n sourcePath: SourcePath,\n version: DocumentVersion,\n document: CompiledDocument,\n}).annotate({ identifier: 'DocumentSummary' })\n\nexport interface DocumentSummary extends Schema.Schema.Type<typeof DocumentSummary> {}\n\nexport const DeletedDocument = Schema.Struct({\n title: Schema.optionalKey(Schema.String),\n path: Schema.optionalKey(PublicPath),\n trashBatchId: Schema.optionalKey(DocumentVersion),\n documentId: DocumentId,\n deletedAt: Schema.DateTimeUtcFromString,\n sourcePath: SourcePath,\n version: DocumentVersion,\n}).annotate({ identifier: 'DeletedDocument' })\n\nexport interface DeletedDocument extends Schema.Schema.Type<typeof DeletedDocument> {}\n\nexport const DocumentBrowseQuery = Schema.Struct({\n collection: Schema.optionalKey(CollectionName),\n locale: Schema.optionalKey(Locale),\n}).annotate({ identifier: 'DocumentBrowseQuery' })\n\nexport interface DocumentBrowseQuery extends Schema.Schema.Type<typeof DocumentBrowseQuery> {}\n\nexport const PublishedDocumentLookup = Schema.Union([\n Schema.Struct({\n kind: Schema.tag('id'),\n documentId: DocumentId,\n }),\n Schema.Struct({\n kind: Schema.tag('path'),\n path: PublicPath,\n }),\n Schema.Struct({\n kind: Schema.tag('key'),\n key: PublicPath,\n collection: Schema.optionalKey(CollectionName),\n locale: Schema.optionalKey(Locale),\n }),\n]).pipe(Schema.toTaggedUnion('kind'))\n\nexport type PublishedDocumentLookup = typeof PublishedDocumentLookup.Type\n\nexport const DocumentQueryScalar = Schema.Union([Schema.String, Schema.Finite, Schema.Boolean, Schema.Null])\n\nexport type DocumentQueryScalar = typeof DocumentQueryScalar.Type\n\nconst validDocumentQueryField = Schema.makeFilter<string>(\n (field) => {\n const segments = field.split('.')\n\n return field.length <= 200 && segments.length <= 8 && segments.every((segment) => segment.length > 0)\n },\n { expected: 'a non-empty field path of at most 200 characters and eight non-empty segments' },\n)\n\nexport const DocumentQueryField = Schema.NonEmptyString.check(validDocumentQueryField)\n\nexport type DocumentQueryField = typeof DocumentQueryField.Type\n\nexport const DocumentQueryValue = Schema.Union([\n DocumentQueryScalar,\n Schema.Array(DocumentQueryScalar).check(Schema.isMaxLength(20)),\n])\n\nexport type DocumentQueryValue = typeof DocumentQueryValue.Type\n\nexport const DocumentQuerySort = Schema.Struct({\n field: DocumentQueryField,\n direction: Schema.optionalKey(Schema.Literals(['asc', 'desc'])),\n})\n\nexport interface DocumentQuerySort extends Schema.Schema.Type<typeof DocumentQuerySort> {}\n\nconst DocumentQueryWhere = Schema.Record(Schema.String, DocumentQueryValue).check(\n Schema.makeFilter((where) => Object.keys(where).every((field) => Schema.is(DocumentQueryField)(field)), {\n expected: 'document query keys with valid bounded field paths',\n }),\n Schema.makeFilter((where) => Object.keys(where).length <= 12, {\n expected: 'at most 12 document query filters',\n }),\n)\n\nexport const PublishedDocumentSelection = Schema.Struct({\n collection: Schema.optionalKey(CollectionName),\n locale: Schema.optionalKey(Locale),\n where: Schema.optionalKey(DocumentQueryWhere),\n sort: Schema.optionalKey(Schema.Array(DocumentQuerySort).check(Schema.isMaxLength(4))),\n}).annotate({ identifier: 'PublishedDocumentSelection' })\n\nexport interface PublishedDocumentSelection extends Schema.Schema.Type<typeof PublishedDocumentSelection> {}\n\nexport const PublishedDocumentQuery = Schema.Struct({\n ...PublishedDocumentSelection.fields,\n offset: Schema.optionalKey(nonNegativeInt),\n limit: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 })),\n}).annotate({ identifier: 'PublishedDocumentQuery' })\n\nexport interface PublishedDocumentQuery extends Schema.Schema.Type<typeof PublishedDocumentQuery> {}\n\nexport const PublishedDocumentSurroundQuery = Schema.Struct({\n ...PublishedDocumentSelection.fields,\n}).annotate({ identifier: 'PublishedDocumentSurroundQuery' })\n\nexport interface PublishedDocumentSurroundQuery extends Schema.Schema.Type<typeof PublishedDocumentSurroundQuery> {}\n\nexport const PublishedDocumentPage = Schema.Struct({\n items: Schema.Array(CompiledDocument),\n total: nonNegativeInt,\n}).annotate({ identifier: 'PublishedDocumentPage' })\n\nexport interface PublishedDocumentPage extends Schema.Schema.Type<typeof PublishedDocumentPage> {}\n\nexport const DocumentNavigationQuery = Schema.Struct({\n collection: Schema.optionalKey(CollectionName),\n locale: Schema.optionalKey(Locale),\n}).annotate({ identifier: 'DocumentNavigationQuery' })\n\nexport interface DocumentNavigationQuery extends Schema.Schema.Type<typeof DocumentNavigationQuery> {}\n\nconst documentMutationMetadata = {\n reason: Schema.optionalKey(Schema.NonEmptyString.check(Schema.isMaxLength(1_000))),\n}\n\nexport interface DocumentNavigationItem {\n readonly key: PublicPath\n readonly title: string\n readonly path?: PublicPath\n readonly locale?: Locale\n readonly documentId?: DocumentId\n readonly children: ReadonlyArray<DocumentNavigationItem>\n}\n\ninterface DocumentNavigationItemEncoded {\n readonly key: string\n readonly title: string\n readonly path?: string\n readonly locale?: string\n readonly documentId?: string\n readonly children: ReadonlyArray<DocumentNavigationItemEncoded>\n}\n\nexport const DocumentNavigationItem: Schema.Codec<DocumentNavigationItem, DocumentNavigationItemEncoded> =\n Schema.suspend(() =>\n Schema.Struct({\n key: PublicPath,\n title: Schema.NonEmptyString,\n path: Schema.optionalKey(PublicPath),\n locale: Schema.optionalKey(Locale),\n documentId: Schema.optionalKey(DocumentId),\n children: Schema.Array(DocumentNavigationItem),\n }),\n )\n\nexport const DocumentSurround = Schema.Struct({\n previous: Schema.NullOr(CompiledDocument),\n next: Schema.NullOr(CompiledDocument),\n}).annotate({ identifier: 'DocumentSurround' })\n\nexport interface DocumentSurround extends Schema.Schema.Type<typeof DocumentSurround> {}\n\nexport const HomeDocumentLocation = Schema.Struct({\n kind: Schema.tag('home'),\n})\n\nexport interface HomeDocumentLocation extends Schema.Schema.Type<typeof HomeDocumentLocation> {}\n\nexport const NestedDocumentLocation = Schema.Struct({\n kind: Schema.tag('entry'),\n parent: Schema.optionalKey(RelativeDocumentPath),\n slug: Slug,\n})\n\nexport interface NestedDocumentLocation extends Schema.Schema.Type<typeof NestedDocumentLocation> {}\n\nexport const DocumentLocation = Schema.Union([HomeDocumentLocation, NestedDocumentLocation]).pipe(\n Schema.toTaggedUnion('kind'),\n)\n\nexport type DocumentLocation = typeof DocumentLocation.Type\n\nexport const CreateDocumentInput = Schema.Struct({\n collection: CollectionName,\n locale: Schema.optionalKey(Locale),\n location: DocumentLocation,\n title: Schema.NonEmptyString,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'CreateDocumentInput' })\n\nexport interface CreateDocumentInput extends Schema.Schema.Type<typeof CreateDocumentInput> {}\n\nexport const UpdateDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n markdown: Schema.String,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'UpdateDocumentInput' })\n\nexport interface UpdateDocumentInput extends Schema.Schema.Type<typeof UpdateDocumentInput> {}\n\nexport const MoveDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n location: DocumentLocation,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'MoveDocumentInput' })\n\nexport interface MoveDocumentInput extends Schema.Schema.Type<typeof MoveDocumentInput> {}\n\nexport const DuplicateDocumentInput = Schema.Struct({\n ...MoveDocumentInput.fields,\n includeChildren: Schema.Boolean,\n}).annotate({ identifier: 'DuplicateDocumentInput' })\n\nexport interface DuplicateDocumentInput extends Schema.Schema.Type<typeof DuplicateDocumentInput> {}\n\nexport const UnpublishDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'UnpublishDocumentInput' })\n\nexport interface UnpublishDocumentInput extends Schema.Schema.Type<typeof UnpublishDocumentInput> {}\n\nexport const RemoveDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'RemoveDocumentInput' })\n\nexport interface RemoveDocumentInput extends Schema.Schema.Type<typeof RemoveDocumentInput> {}\n\nexport const PublishDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'PublishDocumentInput' })\n\nexport interface PublishDocumentInput extends Schema.Schema.Type<typeof PublishDocumentInput> {}\n\nexport const RestoreDocumentInput = Schema.Struct({\n documentId: DocumentId,\n revisionId: RevisionId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'RestoreDocumentInput' })\n\nexport interface RestoreDocumentInput extends Schema.Schema.Type<typeof RestoreDocumentInput> {}\n\nexport const UndeleteDocumentInput = Schema.Struct({\n documentId: DocumentId,\n expectedVersion: DocumentVersion,\n ...documentMutationMetadata,\n}).annotate({ identifier: 'UndeleteDocumentInput' })\n\nexport interface UndeleteDocumentInput extends Schema.Schema.Type<typeof UndeleteDocumentInput> {}\n\nexport const DOCUMENT_REVISION_ACTIONS = [\n 'document.create',\n 'document.move',\n 'document.remove',\n 'document.restore',\n 'document.undelete',\n 'document.update',\n] as const\n\nexport const DocumentRevisionAction = Schema.Literals(DOCUMENT_REVISION_ACTIONS)\n\nexport type DocumentRevisionAction = typeof DocumentRevisionAction.Type\n\nexport const DocumentMutationAction = Schema.Literals([\n ...DOCUMENT_REVISION_ACTIONS,\n 'document.publish',\n 'document.unpublish',\n])\n\nexport type DocumentMutationAction = typeof DocumentMutationAction.Type\n\nexport const DocumentMutationResult = Schema.Struct({\n action: DocumentMutationAction,\n affectedDocumentIds: Schema.optionalKey(Schema.Array(DocumentId)),\n documentId: DocumentId,\n generation: DocumentGeneration,\n revisionId: RevisionId,\n sourcePath: SourcePath,\n version: DocumentVersion,\n entry: Schema.optionalKey(DocumentSummary),\n}).annotate({ identifier: 'DocumentMutationResult' })\n\nexport interface DocumentMutationResult extends Schema.Schema.Type<typeof DocumentMutationResult> {}\n\nexport const DocumentValidationResult = Schema.Struct({\n valid: Schema.Boolean,\n document: Schema.optionalKey(CompiledDocument),\n issues: Schema.Array(DocumentIssue),\n}).annotate({ identifier: 'DocumentValidationResult' })\n\nexport interface DocumentValidationResult extends Schema.Schema.Type<typeof DocumentValidationResult> {}\n"],"mappings":";;;;AAEA,MAAa,YAAY,OAAO,OAAO,MAAM,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,WAAW,CAAC;;;;ACC5F,MAAM,wBAAwB;AAE9B,MAAM,gBAAgB;AAEtB,MAAM,yBAAyB;AAE/B,MAAa,iBAAiB,OAAO,OAAO,MAAM,OAAO,UAAU,iBAAiB,CAAC,CAAC,CAAC,KACrF,OAAO,MAAM,gBAAgB,CAC/B;AAIA,MAAa,iBAAiB,OAAO,OAAO,MAAM,OAAO,UAAU,qBAAqB,CAAC,CAAC,CAAC,KACzF,OAAO,MAAM,gBAAgB,CAC/B;AAIA,MAAa,SAAS,OA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;CACZ,iBAAiB;CACjB,GAAG;AACL,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY,uBAAuB,CAAC;AAIlD,MAAa,uBAAuB,OAAO,OAAO;CAChD,YAAY;CACZ,YAAY;CACZ,iBAAiB;CACjB,GAAG;AACL,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY,uBAAuB,CAAC;AAIlD,MAAa,wBAAwB,OAAO,OAAO;CACjD,YAAY;CACZ,iBAAiB;CACjB,GAAG;AACL,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY,wBAAwB,CAAC;AAInD,MAAa,4BAA4B;CACvC;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,yBAAyB,OAAO,SAAS,yBAAyB;AAI/E,MAAa,yBAAyB,OAAO,SAAS;CACpD,GAAG;CACH;CACA;AACF,CAAC;AAID,MAAa,yBAAyB,OAAO,OAAO;CAClD,QAAQ;CACR,qBAAqB,OAAO,YAAY,OAAO,MAAM,UAAU,CAAC;CAChE,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,OAAO,OAAO,YAAY,eAAe;AAC3C,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY,yBAAyB,CAAC;AAIpD,MAAa,2BAA2B,OAAO,OAAO;CACpD,OAAO,OAAO;CACd,UAAU,OAAO,YAAY,gBAAgB;CAC7C,QAAQ,OAAO,MAAM,aAAa;AACpC,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY,2BAA2B,CAAC"}
@@ -1,15 +1,28 @@
1
- import { blockComponentsKey } from "./delivery/blocks.js";
2
- import blocks from "#cms/blocks";
3
- import { defineNuxtPlugin } from "nuxt/app";
1
+ import { usePreviewDelivery } from "./delivery/context.js";
2
+ import { blockComponentsKey, formComponentsKey, formPreviewKey } from "./delivery/blocks.js";
4
3
  import { shallowRef } from "vue";
4
+ import { defineNuxtPlugin } from "nuxt/app";
5
+ import blocks from "#cms/blocks";
6
+ import authoring from "#cms/authoring";
5
7
 
6
8
  //#region src/runtime/blocks.ts
7
- var blocks_default = defineNuxtPlugin((nuxtApp) => {
8
- const components = shallowRef(blocks);
9
- nuxtApp.vueApp.provide(blockComponentsKey, components);
10
- if (import.meta.hot) import.meta.hot.accept("#cms/blocks", (module) => {
11
- if (module) components.value = module.default;
12
- });
9
+ var blocks_default = defineNuxtPlugin({
10
+ name: "cms-blocks",
11
+ setup: (nuxtApp) => {
12
+ nuxtApp.vueApp.provide(formPreviewKey, usePreviewDelivery());
13
+ const components = shallowRef(blocks);
14
+ const forms = shallowRef(authoring.components.filter((component) => component.authoring.form));
15
+ nuxtApp.vueApp.provide(formComponentsKey, forms);
16
+ nuxtApp.vueApp.provide(blockComponentsKey, components);
17
+ if (import.meta.hot) {
18
+ import.meta.hot.accept("#cms/authoring", (module) => {
19
+ if (module) forms.value = module.default.components.filter((component) => component.authoring.form);
20
+ });
21
+ import.meta.hot.accept("#cms/blocks", (module) => {
22
+ if (module) components.value = module.default;
23
+ });
24
+ }
25
+ }
13
26
  });
14
27
 
15
28
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","names":[],"sources":["../../../../src/runtime/blocks.ts"],"sourcesContent":["import blocks from '#cms/blocks'\nimport { defineNuxtPlugin } from 'nuxt/app'\nimport { shallowRef } from 'vue'\nimport { blockComponentsKey } from './delivery/blocks'\n\nexport default defineNuxtPlugin((nuxtApp) => {\n const components = shallowRef(blocks)\n nuxtApp.vueApp.provide(blockComponentsKey, components)\n if (import.meta.hot) {\n import.meta.hot.accept('#cms/blocks', (module) => {\n if (module) components.value = module.default\n })\n }\n})\n"],"mappings":";;;;;;AAKA,qBAAe,kBAAkB,YAAY;CAC3C,MAAM,aAAa,WAAW,MAAM;CACpC,QAAQ,OAAO,QAAQ,oBAAoB,UAAU;CACrD,IAAI,YAAY,KACd,YAAY,IAAI,OAAO,gBAAgB,WAAW;EAChD,IAAI,QAAQ,WAAW,QAAQ,OAAO;CACxC,CAAC;AAEL,CAAC"}
1
+ {"version":3,"file":"blocks.js","names":[],"sources":["../../../../src/runtime/blocks.ts"],"sourcesContent":["import { usePreviewDelivery } from './delivery/context'\nimport blocks from '#cms/blocks'\nimport authoring from '#cms/authoring'\nimport { defineNuxtPlugin } from 'nuxt/app'\nimport { shallowRef } from 'vue'\nimport { blockComponentsKey, formComponentsKey, formPreviewKey } from './delivery/blocks'\n\nexport default defineNuxtPlugin({\n name: 'cms-blocks',\n setup: (nuxtApp) => {\n nuxtApp.vueApp.provide(formPreviewKey, usePreviewDelivery())\n const components = shallowRef(blocks)\n const forms = shallowRef(authoring.components.filter((component) => component.authoring.form))\n nuxtApp.vueApp.provide(formComponentsKey, forms)\n nuxtApp.vueApp.provide(blockComponentsKey, components)\n\n if (import.meta.hot) {\n import.meta.hot.accept('#cms/authoring', (module) => {\n if (module)\n forms.value = module.default.components.filter(\n (component: import('@internal/protocol/Configuration').ComponentDefinition) => component.authoring.form,\n )\n })\n import.meta.hot.accept('#cms/blocks', (module) => {\n if (module) components.value = module.default\n })\n }\n },\n})\n"],"mappings":";;;;;;;;AAOA,qBAAe,iBAAiB;CAC9B,MAAM;CACN,QAAQ,YAAY;EAClB,QAAQ,OAAO,QAAQ,gBAAgB,mBAAmB,CAAC;EAC3D,MAAM,aAAa,WAAW,MAAM;EACpC,MAAM,QAAQ,WAAW,UAAU,WAAW,QAAQ,cAAc,UAAU,UAAU,IAAI,CAAC;EAC7F,QAAQ,OAAO,QAAQ,mBAAmB,KAAK;EAC/C,QAAQ,OAAO,QAAQ,oBAAoB,UAAU;EAErD,IAAI,YAAY,KAAK;GACnB,YAAY,IAAI,OAAO,mBAAmB,WAAW;IACnD,IAAI,QACF,MAAM,QAAQ,OAAO,QAAQ,WAAW,QACrC,cAA8E,UAAU,UAAU,IACrG;GACJ,CAAC;GACD,YAAY,IAAI,OAAO,gBAAgB,WAAW;IAChD,IAAI,QAAQ,WAAW,QAAQ,OAAO;GACxC,CAAC;EACH;CACF;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"collaboration.js","names":[],"sources":["../../../../src/runtime/collaboration.ts"],"sourcesContent":["import type { CmsInstallation } from '@internal/platform-node/Installation'\nimport { defineWebSocketHandler } from 'h3'\nimport { useCmsInstallation } from './plugin'\n\ntype CollaborationSocket = Parameters<CmsInstallation['webSocket']['open']>[0]['socket']\ntype H3WebSocketHooks = Parameters<typeof defineWebSocketHandler>[0]\ntype H3Socket = Parameters<NonNullable<H3WebSocketHooks['open']>>[0]['websocket']\n\n// A socket belongs to the worker installation that accepted it, including during Nitro shutdown.\nconst installations = new WeakMap<H3Socket, Promise<CmsInstallation>>()\n\nexport default defineWebSocketHandler({\n open(peer) {\n const installation = useCmsInstallation()\n installations.set(peer.websocket, installation)\n return installation.then((installation) => {\n const request = new Request(peer.request.url, { headers: peer.request.headers })\n installation.webSocket.open({ request, socket: collaborationSocket(peer.websocket) })\n })\n },\n message(peer, message) {\n return installations.get(peer.websocket)?.then((installation) => {\n installation.webSocket.message(collaborationSocket(peer.websocket), message.uint8Array())\n })\n },\n close(peer, details) {\n const installation = installations.get(peer.websocket)\n installations.delete(peer.websocket)\n return installation?.then((installation) => {\n installation.webSocket.close(collaborationSocket(peer.websocket), {\n code: details.code,\n reason: details.reason,\n })\n })\n },\n error(peer) {\n return installations.get(peer.websocket)?.then((installation) => {\n installation.webSocket.error(collaborationSocket(peer.websocket))\n })\n },\n})\n\nfunction collaborationSocket(socket: H3Socket): CollaborationSocket {\n // SAFETY: crossws exposes the standard send/close/event WebSocket surface consumed by Hocuspocus.\n return socket as CollaborationSocket\n}\n"],"mappings":";;;;AASA,MAAM,gCAAgB,IAAI,QAA4C;AAEtE,4BAAe,uBAAuB;CACpC,KAAK,MAAM;EACT,MAAM,eAAe,mBAAmB;EACxC,cAAc,IAAI,KAAK,WAAW,YAAY;EAC9C,OAAO,aAAa,MAAM,iBAAiB;GACzC,MAAM,UAAU,IAAI,QAAQ,KAAK,QAAQ,KAAK,EAAE,SAAS,KAAK,QAAQ,QAAQ,CAAC;GAC/E,aAAa,UAAU,KAAK;IAAE;IAAS,QAAQ,oBAAoB,KAAK,SAAS;GAAE,CAAC;EACtF,CAAC;CACH;CACA,QAAQ,MAAM,SAAS;EACrB,OAAO,cAAc,IAAI,KAAK,SAAS,CAAC,EAAE,MAAM,iBAAiB;GAC/D,aAAa,UAAU,QAAQ,oBAAoB,KAAK,SAAS,GAAG,QAAQ,WAAW,CAAC;EAC1F,CAAC;CACH;CACA,MAAM,MAAM,SAAS;EACnB,MAAM,eAAe,cAAc,IAAI,KAAK,SAAS;EACrD,cAAc,OAAO,KAAK,SAAS;EACnC,OAAO,cAAc,MAAM,iBAAiB;GAC1C,aAAa,UAAU,MAAM,oBAAoB,KAAK,SAAS,GAAG;IAChE,MAAM,QAAQ;IACd,QAAQ,QAAQ;GAClB,CAAC;EACH,CAAC;CACH;CACA,MAAM,MAAM;EACV,OAAO,cAAc,IAAI,KAAK,SAAS,CAAC,EAAE,MAAM,iBAAiB;GAC/D,aAAa,UAAU,MAAM,oBAAoB,KAAK,SAAS,CAAC;EAClE,CAAC;CACH;AACF,CAAC;AAED,SAAS,oBAAoB,QAAuC;CAElE,OAAO;AACT"}
1
+ {"version":3,"file":"collaboration.js","names":[],"sources":["../../../../src/runtime/collaboration.ts"],"sourcesContent":["import type { CmsInstallation } from '@internal/platform-node/Installation'\nimport { defineWebSocketHandler } from 'h3'\nimport { useCmsInstallation } from './plugin'\n\ntype CollaborationSocket = Parameters<CmsInstallation['webSocket']['open']>[0]['socket']\n\ntype H3WebSocketHooks = Parameters<typeof defineWebSocketHandler>[0]\n\ntype H3Socket = Parameters<NonNullable<H3WebSocketHooks['open']>>[0]['websocket']\n\n// A socket belongs to the worker installation that accepted it, including during Nitro shutdown.\nconst installations = new WeakMap<H3Socket, Promise<CmsInstallation>>()\n\nexport default defineWebSocketHandler({\n open(peer) {\n const installation = useCmsInstallation()\n installations.set(peer.websocket, installation)\n\n return installation.then((installation) => {\n const request = new Request(peer.request.url, { headers: peer.request.headers })\n installation.webSocket.open({ request, socket: collaborationSocket(peer.websocket) })\n })\n },\n message(peer, message) {\n return installations.get(peer.websocket)?.then((installation) => {\n installation.webSocket.message(collaborationSocket(peer.websocket), message.uint8Array())\n })\n },\n close(peer, details) {\n const installation = installations.get(peer.websocket)\n installations.delete(peer.websocket)\n\n return installation?.then((installation) => {\n installation.webSocket.close(collaborationSocket(peer.websocket), {\n code: details.code,\n reason: details.reason,\n })\n })\n },\n error(peer) {\n return installations.get(peer.websocket)?.then((installation) => {\n installation.webSocket.error(collaborationSocket(peer.websocket))\n })\n },\n})\n\nfunction collaborationSocket(socket: H3Socket): CollaborationSocket {\n // SAFETY: crossws exposes the standard send/close/event WebSocket surface consumed by Hocuspocus.\n return socket as CollaborationSocket\n}\n"],"mappings":";;;;AAWA,MAAM,gCAAgB,IAAI,QAA4C;AAEtE,4BAAe,uBAAuB;CACpC,KAAK,MAAM;EACT,MAAM,eAAe,mBAAmB;EACxC,cAAc,IAAI,KAAK,WAAW,YAAY;EAE9C,OAAO,aAAa,MAAM,iBAAiB;GACzC,MAAM,UAAU,IAAI,QAAQ,KAAK,QAAQ,KAAK,EAAE,SAAS,KAAK,QAAQ,QAAQ,CAAC;GAC/E,aAAa,UAAU,KAAK;IAAE;IAAS,QAAQ,oBAAoB,KAAK,SAAS;GAAE,CAAC;EACtF,CAAC;CACH;CACA,QAAQ,MAAM,SAAS;EACrB,OAAO,cAAc,IAAI,KAAK,SAAS,CAAC,EAAE,MAAM,iBAAiB;GAC/D,aAAa,UAAU,QAAQ,oBAAoB,KAAK,SAAS,GAAG,QAAQ,WAAW,CAAC;EAC1F,CAAC;CACH;CACA,MAAM,MAAM,SAAS;EACnB,MAAM,eAAe,cAAc,IAAI,KAAK,SAAS;EACrD,cAAc,OAAO,KAAK,SAAS;EAEnC,OAAO,cAAc,MAAM,iBAAiB;GAC1C,aAAa,UAAU,MAAM,oBAAoB,KAAK,SAAS,GAAG;IAChE,MAAM,QAAQ;IACd,QAAQ,QAAQ;GAClB,CAAC;EACH,CAAC;CACH;CACA,MAAM,MAAM;EACV,OAAO,cAAc,IAAI,KAAK,SAAS,CAAC,EAAE,MAAM,iBAAiB;GAC/D,aAAa,UAAU,MAAM,oBAAoB,KAAK,SAAS,CAAC;EAClE,CAAC;CACH;AACF,CAAC;AAED,SAAS,oBAAoB,QAAuC;CAElE,OAAO;AACT"}
@@ -1,4 +1,5 @@
1
- import { blockComponentsKey } from "./blocks.js";
1
+ import { blockComponentsKey, formComponentsKey, formPreviewKey } from "./blocks.js";
2
+ import { prepareFormDocument } from "../forms/document.js";
2
3
  import DocumentScope_default from "./DocumentScope.js";
3
4
  import { Predicate } from "effect";
4
5
  import { defineComponent, h, inject, shallowRef } from "vue";
@@ -12,19 +13,21 @@ var DocumentRenderer_default = defineComponent({
12
13
  type: Object
13
14
  } },
14
15
  setup(props) {
16
+ const formComponents = inject(formComponentsKey, shallowRef([]));
17
+ const preview = inject(formPreviewKey, shallowRef(false));
15
18
  const components = inject(blockComponentsKey, shallowRef({}));
16
19
  return () => h(DocumentScope_default, {
17
20
  as: "article",
18
21
  role: "primary",
19
22
  value: props.value
20
- }, { default: ({ value }) => renderDocument(value, components.value) });
23
+ }, { default: ({ value }) => renderDocument(value, components.value, formComponents.value, preview.value) });
21
24
  }
22
25
  });
23
- function renderDocument(value, components = {}) {
26
+ function renderDocument(value, components = {}, forms = [], preview = false) {
24
27
  return h(MarkdownDocument, {
25
28
  components,
26
29
  documentKey: value.id,
27
- value: toComarkDocument(value.body)
30
+ value: toComarkDocument(prepareFormDocument(value, forms, preview).body)
28
31
  });
29
32
  }
30
33
  function toComarkDocument(document) {
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentRenderer.js","names":["DocumentScope"],"sources":["../../../../../src/runtime/delivery/DocumentRenderer.ts"],"sourcesContent":["import type { Component, PropType } from 'vue'\nimport type { MarkdownDocument as ComarkDocument, Node as ComarkNode } from 'comark'\nimport type { DeliveryDocument, DeliveryMarkdownDocument, DeliveryMarkdownNode } from './types'\nimport { MarkdownDocument } from '@comark/vue'\nimport { Predicate } from 'effect'\nimport { defineComponent, h, inject, shallowRef } from 'vue'\nimport DocumentScope from './DocumentScope'\nimport { blockComponentsKey } from './blocks'\n\nexport default defineComponent({\n name: 'DocumentRenderer',\n props: {\n // SAFETY: DeliveryDocument is an object contract, so Object is its matching Vue runtime constructor.\n value: { required: true, type: Object as PropType<DeliveryDocument> },\n },\n setup(props) {\n const components = inject(blockComponentsKey, shallowRef({}))\n return () =>\n h(\n DocumentScope,\n { as: 'article', role: 'primary', value: props.value },\n {\n default: ({ value }: { value: DeliveryDocument }) => renderDocument(value, components.value),\n },\n )\n },\n})\n\nexport function renderDocument(value: DeliveryDocument, components: Record<string, Component> = {}) {\n return h(MarkdownDocument, { components, documentKey: value.id, value: toComarkDocument(value.body) })\n}\n\nfunction toComarkDocument(document: DeliveryMarkdownDocument): ComarkDocument {\n return {\n frontmatter: { ...document.frontmatter },\n meta: { ...document.meta },\n nodes: document.nodes.map(toComarkNode),\n }\n}\n\nfunction toComarkNode(node: DeliveryMarkdownNode): ComarkNode {\n if (Predicate.isString(node)) return node\n if (node[0] === null) return [null, { ...node[1] }, node[2]]\n const [tag, attributes, ...children] = node\n return [tag, { ...attributes }, ...children.map(toComarkNode)]\n}\n"],"mappings":";;;;;;;AASA,+BAAe,gBAAgB;CAC7B,MAAM;CACN,OAAO,EAEL,OAAO;EAAE,UAAU;EAAM,MAAM;CAAqC,EACtE;CACA,MAAM,OAAO;EACX,MAAM,aAAa,OAAO,oBAAoB,WAAW,CAAC,CAAC,CAAC;EAC5D,aACE,EACEA,uBACA;GAAE,IAAI;GAAW,MAAM;GAAW,OAAO,MAAM;EAAM,GACrD,EACE,UAAU,EAAE,YAAyC,eAAe,OAAO,WAAW,KAAK,EAC7F,CACF;CACJ;AACF,CAAC;AAED,SAAgB,eAAe,OAAyB,aAAwC,CAAC,GAAG;CAClG,OAAO,EAAE,kBAAkB;EAAE;EAAY,aAAa,MAAM;EAAI,OAAO,iBAAiB,MAAM,IAAI;CAAE,CAAC;AACvG;AAEA,SAAS,iBAAiB,UAAoD;CAC5E,OAAO;EACL,aAAa,EAAE,GAAG,SAAS,YAAY;EACvC,MAAM,EAAE,GAAG,SAAS,KAAK;EACzB,OAAO,SAAS,MAAM,IAAI,YAAY;CACxC;AACF;AAEA,SAAS,aAAa,MAAwC;CAC5D,IAAI,UAAU,SAAS,IAAI,GAAG,OAAO;CACrC,IAAI,KAAK,OAAO,MAAM,OAAO;EAAC;EAAM,EAAE,GAAG,KAAK,GAAG;EAAG,KAAK;CAAE;CAC3D,MAAM,CAAC,KAAK,YAAY,GAAG,YAAY;CACvC,OAAO;EAAC;EAAK,EAAE,GAAG,WAAW;EAAG,GAAG,SAAS,IAAI,YAAY;CAAC;AAC/D"}
1
+ {"version":3,"file":"DocumentRenderer.js","names":["DocumentScope"],"sources":["../../../../../src/runtime/delivery/DocumentRenderer.ts"],"sourcesContent":["import { prepareFormDocument } from '../forms/document'\nimport type { ComponentDefinition } from '@internal/protocol/Configuration'\nimport type { Component, PropType } from 'vue'\nimport type { MarkdownDocument as ComarkDocument, Node as ComarkNode } from 'comark'\nimport type { DeliveryDocument, DeliveryMarkdownDocument, DeliveryMarkdownNode } from './types'\nimport { MarkdownDocument } from '@comark/vue'\nimport { Predicate } from 'effect'\nimport { defineComponent, h, inject, shallowRef } from 'vue'\nimport DocumentScope from './DocumentScope'\nimport { blockComponentsKey, formComponentsKey, formPreviewKey } from './blocks'\n\nexport default defineComponent({\n name: 'DocumentRenderer',\n props: {\n // SAFETY: DeliveryDocument is an object contract, so Object is its matching Vue runtime constructor.\n value: { required: true, type: Object as PropType<DeliveryDocument> },\n },\n setup(props) {\n const formComponents = inject(formComponentsKey, shallowRef([]))\n const preview = inject(formPreviewKey, shallowRef(false))\n const components = inject(blockComponentsKey, shallowRef({}))\n\n return () =>\n h(\n DocumentScope,\n { as: 'article', role: 'primary', value: props.value },\n {\n default: ({ value }: { value: DeliveryDocument }) =>\n renderDocument(value, components.value, formComponents.value, preview.value),\n },\n )\n },\n})\n\nexport function renderDocument(\n value: DeliveryDocument,\n components: Record<string, Component> = {},\n forms: ReadonlyArray<ComponentDefinition> = [],\n preview = false,\n) {\n return h(MarkdownDocument, {\n components,\n documentKey: value.id,\n value: toComarkDocument(prepareFormDocument(value, forms, preview).body),\n })\n}\n\nfunction toComarkDocument(document: DeliveryMarkdownDocument): ComarkDocument {\n return {\n frontmatter: { ...document.frontmatter },\n meta: { ...document.meta },\n nodes: document.nodes.map(toComarkNode),\n }\n}\n\nfunction toComarkNode(node: DeliveryMarkdownNode): ComarkNode {\n if (Predicate.isString(node)) return node\n\n if (node[0] === null) return [null, { ...node[1] }, node[2]]\n const [tag, attributes, ...children] = node\n\n return [tag, { ...attributes }, ...children.map(toComarkNode)]\n}\n"],"mappings":";;;;;;;;AAWA,+BAAe,gBAAgB;CAC7B,MAAM;CACN,OAAO,EAEL,OAAO;EAAE,UAAU;EAAM,MAAM;CAAqC,EACtE;CACA,MAAM,OAAO;EACX,MAAM,iBAAiB,OAAO,mBAAmB,WAAW,CAAC,CAAC,CAAC;EAC/D,MAAM,UAAU,OAAO,gBAAgB,WAAW,KAAK,CAAC;EACxD,MAAM,aAAa,OAAO,oBAAoB,WAAW,CAAC,CAAC,CAAC;EAE5D,aACE,EACEA,uBACA;GAAE,IAAI;GAAW,MAAM;GAAW,OAAO,MAAM;EAAM,GACrD,EACE,UAAU,EAAE,YACV,eAAe,OAAO,WAAW,OAAO,eAAe,OAAO,QAAQ,KAAK,EAC/E,CACF;CACJ;AACF,CAAC;AAED,SAAgB,eACd,OACA,aAAwC,CAAC,GACzC,QAA4C,CAAC,GAC7C,UAAU,OACV;CACA,OAAO,EAAE,kBAAkB;EACzB;EACA,aAAa,MAAM;EACnB,OAAO,iBAAiB,oBAAoB,OAAO,OAAO,OAAO,CAAC,CAAC,IAAI;CACzE,CAAC;AACH;AAEA,SAAS,iBAAiB,UAAoD;CAC5E,OAAO;EACL,aAAa,EAAE,GAAG,SAAS,YAAY;EACvC,MAAM,EAAE,GAAG,SAAS,KAAK;EACzB,OAAO,SAAS,MAAM,IAAI,YAAY;CACxC;AACF;AAEA,SAAS,aAAa,MAAwC;CAC5D,IAAI,UAAU,SAAS,IAAI,GAAG,OAAO;CAErC,IAAI,KAAK,OAAO,MAAM,OAAO;EAAC;EAAM,EAAE,GAAG,KAAK,GAAG;EAAG,KAAK;CAAE;CAC3D,MAAM,CAAC,KAAK,YAAY,GAAG,YAAY;CAEvC,OAAO;EAAC;EAAK,EAAE,GAAG,WAAW;EAAG,GAAG,SAAS,IAAI,YAAY;CAAC;AAC/D"}
@@ -1,6 +1,8 @@
1
1
  //#region src/runtime/delivery/blocks.ts
2
2
  const blockComponentsKey = Symbol("cms-block-components");
3
+ const formComponentsKey = Symbol("cms-form-components");
4
+ const formPreviewKey = Symbol("cms-form-preview");
3
5
 
4
6
  //#endregion
5
- export { blockComponentsKey };
7
+ export { blockComponentsKey, formComponentsKey, formPreviewKey };
6
8
  //# sourceMappingURL=blocks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","names":[],"sources":["../../../../../src/runtime/delivery/blocks.ts"],"sourcesContent":["import type { Component, InjectionKey, ShallowRef } from 'vue'\n\nexport const blockComponentsKey: InjectionKey<ShallowRef<Record<string, Component>>> = Symbol('cms-block-components')\n"],"mappings":";AAEA,MAAa,qBAA0E,OAAO,sBAAsB"}
1
+ {"version":3,"file":"blocks.js","names":[],"sources":["../../../../../src/runtime/delivery/blocks.ts"],"sourcesContent":["import type { ComponentDefinition } from '@internal/protocol/Configuration'\nimport type { Component, InjectionKey, ShallowRef } from 'vue'\n\nexport const blockComponentsKey: InjectionKey<ShallowRef<Record<string, Component>>> = Symbol('cms-block-components')\n\nexport const formComponentsKey: InjectionKey<ShallowRef<ReadonlyArray<ComponentDefinition>>> =\n Symbol('cms-form-components')\n\nexport const formPreviewKey: InjectionKey<import('vue').Ref<boolean>> = Symbol('cms-form-preview')\n"],"mappings":";AAGA,MAAa,qBAA0E,OAAO,sBAAsB;AAEpH,MAAa,oBACX,OAAO,qBAAqB;AAE9B,MAAa,iBAA2D,OAAO,kBAAkB"}
@@ -1,4 +1,4 @@
1
- import { n as readPreviewLocation } from "../../location-DtYv2aes.js";
1
+ import { n as readPreviewLocation } from "../../location-CFKTeK1K.js";
2
2
  import { useRequestURL, useState } from "nuxt/app";
3
3
 
4
4
  //#region src/runtime/delivery/context.ts