@phtngyn/cms 0.1.0-beta.0 → 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 (181) hide show
  1. package/README.md +260 -6
  2. package/package.json +31 -16
  3. package/src/Authoring.d.ts +13 -1
  4. package/src/Configuration-Br7tE9Qt.d.ts +68 -0
  5. package/src/{AuthoringSchema-BQ5kbhVB.js → Configuration-CA_jvQKG.js} +599 -492
  6. package/src/Configuration-CA_jvQKG.js.map +1 -0
  7. package/src/Configuration.d.ts +2 -44
  8. package/src/Configuration.js +0 -1
  9. package/src/Configuration.js.map +1 -1
  10. package/src/{DocumentEngine-Da0kWotL.js → DocumentEngine-CgiBQU4g.js} +110 -84
  11. package/src/DocumentEngine-CgiBQU4g.js.map +1 -0
  12. package/src/DocumentModel-BB9igGC7.d.ts +34 -0
  13. package/src/DocumentModel.d.ts +2 -30
  14. package/src/DocumentModel.js +13 -3
  15. package/src/DocumentModel.js.map +1 -1
  16. package/src/Forms-BsJMev5_.d.ts +74 -0
  17. package/src/Forms-CfcI3tPU.js +79 -0
  18. package/src/Forms-CfcI3tPU.js.map +1 -0
  19. package/src/Forms-DxbkU3_5.js +367 -0
  20. package/src/Forms-DxbkU3_5.js.map +1 -0
  21. package/src/Forms.d.ts +35 -0
  22. package/src/Forms.js +13 -0
  23. package/src/Forms.js.map +1 -0
  24. package/src/HttpPaths-c9nLZ9H2.js +21 -0
  25. package/src/HttpPaths-c9nLZ9H2.js.map +1 -0
  26. package/src/I18n-DZK4CkJF.d.ts +21 -0
  27. package/src/I18n.d.ts +2 -0
  28. package/src/I18n.js +1 -0
  29. package/src/Module.js +78 -81
  30. package/src/Module.js.map +1 -1
  31. package/src/S3MediaObjects-JKMAWyVB.js +2664 -0
  32. package/src/S3MediaObjects-JKMAWyVB.js.map +1 -0
  33. package/src/Seed.d.ts +6 -0
  34. package/src/Seed.js +34 -0
  35. package/src/Seed.js.map +1 -0
  36. package/src/Seo-402YumpT.d.ts +198 -0
  37. package/src/{connection-ZGtL54qY.js → connection-B-iz0Y9Y.js} +5 -7
  38. package/src/connection-B-iz0Y9Y.js.map +1 -0
  39. package/src/{installation-BNKaVjni.js → installation-DgF2M1gL.js} +1162 -2147
  40. package/src/installation-DgF2M1gL.js.map +1 -0
  41. package/src/internal/authoring-catalog.js +153 -0
  42. package/src/internal/authoring-catalog.js.map +1 -0
  43. package/src/internal/authoring-compiler.js +2 -2
  44. package/src/internal/authoring-compiler.js.map +1 -1
  45. package/src/internal/authoring-metadata.js +68 -49
  46. package/src/internal/authoring-metadata.js.map +1 -1
  47. package/src/internal/cms-config.js +0 -1
  48. package/src/internal/cms-config.js.map +1 -1
  49. package/src/internal/configuration.js +25 -13
  50. package/src/internal/configuration.js.map +1 -1
  51. package/src/internal/document-model.js +66 -20
  52. package/src/internal/document-model.js.map +1 -1
  53. package/src/internal/form-capabilities.js +12 -0
  54. package/src/internal/form-capabilities.js.map +1 -0
  55. package/src/internal/i18n.js +47 -0
  56. package/src/internal/i18n.js.map +1 -0
  57. package/src/internal/studio-app.js +66 -0
  58. package/src/internal/studio-app.js.map +1 -0
  59. package/src/location-CFKTeK1K.js +35 -0
  60. package/src/location-CFKTeK1K.js.map +1 -0
  61. package/src/{metadata-Czvi3E4K.js → metadata-BEZPWh-3.js} +3 -72
  62. package/src/metadata-BEZPWh-3.js.map +1 -0
  63. package/src/{models-DS5ClMsH.js → models-BWm1pTAf.js} +9 -31
  64. package/src/models-BWm1pTAf.js.map +1 -0
  65. package/src/models-DwYioyNV.js +726 -0
  66. package/src/models-DwYioyNV.js.map +1 -0
  67. package/src/runtime/blocks.js +30 -0
  68. package/src/runtime/blocks.js.map +1 -0
  69. package/src/runtime/collaboration.js +9 -4
  70. package/src/runtime/collaboration.js.map +1 -1
  71. package/src/runtime/delivery/DocumentRenderer.js +10 -4
  72. package/src/runtime/delivery/DocumentRenderer.js.map +1 -1
  73. package/src/runtime/delivery/blocks.js +8 -0
  74. package/src/runtime/delivery/blocks.js.map +1 -0
  75. package/src/runtime/delivery/context.js +12 -0
  76. package/src/runtime/delivery/context.js.map +1 -0
  77. package/src/runtime/delivery/document-page.js +14 -12
  78. package/src/runtime/delivery/document-page.js.map +1 -1
  79. package/src/runtime/delivery/document.js +21 -3
  80. package/src/runtime/delivery/document.js.map +1 -1
  81. package/src/runtime/delivery/error.js +11 -0
  82. package/src/runtime/delivery/error.js.map +1 -0
  83. package/src/runtime/delivery/plugin.js +41 -0
  84. package/src/runtime/delivery/plugin.js.map +1 -0
  85. package/src/runtime/delivery/types.d.ts +5 -0
  86. package/src/runtime/delivery/useCmsDocumentSeo.d.ts +56 -0
  87. package/src/runtime/delivery/useCmsDocumentSeo.js +99 -0
  88. package/src/runtime/delivery/useCmsDocumentSeo.js.map +1 -0
  89. package/src/runtime/delivery/useDocument.js +5 -2
  90. package/src/runtime/delivery/useDocument.js.map +1 -1
  91. package/src/runtime/delivery/useDocumentQuery.js +5 -2
  92. package/src/runtime/delivery/useDocumentQuery.js.map +1 -1
  93. package/src/runtime/forms/document.js +38 -0
  94. package/src/runtime/forms/document.js.map +1 -0
  95. package/src/runtime/forms/useCmsForm.js +149 -0
  96. package/src/runtime/forms/useCmsForm.js.map +1 -0
  97. package/src/runtime/i18n/translator.js +22 -0
  98. package/src/runtime/i18n/translator.js.map +1 -0
  99. package/src/runtime/i18n/useCmsI18n.d.ts +9 -0
  100. package/src/runtime/i18n/useCmsI18n.js +29 -0
  101. package/src/runtime/i18n/useCmsI18n.js.map +1 -0
  102. package/src/runtime/installation.js +1 -1
  103. package/src/runtime/plugin.js +3 -3
  104. package/src/runtime/plugin.js.map +1 -1
  105. package/src/runtime/preview/comark-document.js +0 -1
  106. package/src/runtime/preview/comark-document.js.map +1 -1
  107. package/src/runtime/preview/connection.js +1 -1
  108. package/src/runtime/preview/controller.js +37 -11
  109. package/src/runtime/preview/controller.js.map +1 -1
  110. package/src/runtime/preview/overlay.js +65 -0
  111. package/src/runtime/preview/overlay.js.map +1 -0
  112. package/src/runtime/preview/plugin.client.js +59 -61
  113. package/src/runtime/preview/plugin.client.js.map +1 -1
  114. package/src/runtime/preview/preview.css +72 -4
  115. package/src/runtime/preview/protocol.js.map +1 -1
  116. package/src/runtime/preview/store.js +1 -1
  117. package/src/runtime/preview/targets.js +0 -1
  118. package/src/runtime/preview/targets.js.map +1 -1
  119. package/src/runtime/sitemap-entries.js +17 -0
  120. package/src/runtime/sitemap-entries.js.map +1 -0
  121. package/src/runtime/sitemap.js +24 -0
  122. package/src/runtime/sitemap.js.map +1 -0
  123. package/src/runtime/studio-app.js +5 -1
  124. package/src/runtime/studio-app.js.map +1 -1
  125. package/src/runtime/studio-entry.js +36 -0
  126. package/src/runtime/studio-entry.js.map +1 -0
  127. package/src/runtime/studio-navigation.js +11 -0
  128. package/src/runtime/studio-navigation.js.map +1 -0
  129. package/src/scalars-B2lgGUnj.js +26 -0
  130. package/src/scalars-B2lgGUnj.js.map +1 -0
  131. package/src/{store-Nl4uxEXx.js → store-DjJs3I7k.js} +12 -7
  132. package/src/store-DjJs3I7k.js.map +1 -0
  133. package/studio/CreateDocumentDialog-CTeIFlPb.js +256 -0
  134. package/studio/collaboration-DcK2F6v9.js +4566 -0
  135. package/studio/documentPlanning-Bfv-d7OU.js +29820 -0
  136. package/studio/dom-to-image-more.min-D6jGGdrW.js +877 -0
  137. package/studio/editor-Bzlh3zXt.js +30827 -0
  138. package/studio/host.css +3 -0
  139. package/studio/host.js +46614 -0
  140. package/studio/rolldown-runtime-B0aSnxlc.js +20 -0
  141. package/dist/studio/assets/ActivityEntryRow-D--fRvWI.js +0 -1
  142. package/dist/studio/assets/ActivityView-D-XBBUHb.js +0 -1
  143. package/dist/studio/assets/CreateDocumentDialog-CH8UH1QM.js +0 -1
  144. package/dist/studio/assets/DocumentsView-CxRpmAxt.js +0 -34
  145. package/dist/studio/assets/DropdownMenu-BSb1l7fr.js +0 -1
  146. package/dist/studio/assets/Input-DVao38h7.js +0 -3
  147. package/dist/studio/assets/MediaView-BHrPIjxB.js +0 -1
  148. package/dist/studio/assets/Modal-VNrXGa5C.js +0 -1
  149. package/dist/studio/assets/OverviewView-DfP6-mLZ.js +0 -1
  150. package/dist/studio/assets/Select-BJZIs9sY.js +0 -1
  151. package/dist/studio/assets/SettingsView-CerHe-ua.js +0 -1
  152. package/dist/studio/assets/Skeleton-CWJNi3nS.js +0 -1
  153. package/dist/studio/assets/StudioPageHeader-DP9HDAF2.js +0 -1
  154. package/dist/studio/assets/UsersView-cP3REkH2.js +0 -1
  155. package/dist/studio/assets/collaboration-BLnCzfvV.js +0 -4
  156. package/dist/studio/assets/context-dY4fNbn3.js +0 -1
  157. package/dist/studio/assets/editor-CE07wW83.js +0 -137
  158. package/dist/studio/assets/gateway-BAyQgCse.js +0 -10
  159. package/dist/studio/assets/index-CjoaPLhZ.js +0 -28
  160. package/dist/studio/assets/index-s2rPqCmP.css +0 -2
  161. package/dist/studio/assets/render-BkxbK2St.js +0 -83
  162. package/dist/studio/assets/rolldown-runtime-DK3Fl9T5.js +0 -1
  163. package/dist/studio/assets/useMediaLibrary-D7qR7aBf.js +0 -1
  164. package/dist/studio/index.html +0 -76
  165. package/src/AuthoringSchema-BQ5kbhVB.js.map +0 -1
  166. package/src/Configuration-BGYFD2N1.js +0 -150
  167. package/src/Configuration-BGYFD2N1.js.map +0 -1
  168. package/src/DocumentEngine-Da0kWotL.js.map +0 -1
  169. package/src/HttpPaths-86qLGB90.js +0 -15
  170. package/src/HttpPaths-86qLGB90.js.map +0 -1
  171. package/src/StudioHttp-BTLLooh0.js +0 -916
  172. package/src/StudioHttp-BTLLooh0.js.map +0 -1
  173. package/src/connection-ZGtL54qY.js.map +0 -1
  174. package/src/installation-BNKaVjni.js.map +0 -1
  175. package/src/internal/component-metadata.js +0 -37
  176. package/src/internal/component-metadata.js.map +0 -1
  177. package/src/metadata-Czvi3E4K.js.map +0 -1
  178. package/src/models-Citx8jBi.js +0 -306
  179. package/src/models-Citx8jBi.js.map +0 -1
  180. package/src/models-DS5ClMsH.js.map +0 -1
  181. package/src/store-Nl4uxEXx.js.map +0 -1
@@ -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,OAAO,OAAO,MAAM,OAAO,UAAU,aAAa,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,QAAQ,CAAC;AAItG,MAAa,kBAAkB,OAAO,OAAO,MAAM,OAAO,UAAU,sBAAsB,CAAC,CAAC,CAAC,KAC3F,OAAO,MAAM,iBAAiB,CAChC;;;;;;;;ACnBA,MAAM,2BAA2B,UAA2B;CAC1D,KAAK,MAAM,aAAa,OAAO;EAC7B,MAAM,YAAY,UAAU,YAAY,CAAC;EAEzC,IAAI,cAAc,QAAS,cAAc,WAAc,aAAa,MAAM,cAAc,MAAO,OAAO;CACxG;CAEA,OAAO;AACT;AAEA,MAAM,mBAAmB,OAAe,eAAiC;CACvE,IAAI,MAAM,WAAW,GAAG,OAAO;CAE/B,IAAI,UAAU,MAAM,KAAK,KAAK,MAAM,WAAW,GAAG,KAAK,MAAM,SAAS,GAAG,KAAK,wBAAwB,KAAK,GACzG,OAAO;CAGT,OAAO,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,YAAY,QAAQ,SAAS,KAAK,Y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,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"}
@@ -0,0 +1,30 @@
1
+ import { usePreviewDelivery } from "./delivery/context.js";
2
+ import { blockComponentsKey, formComponentsKey, formPreviewKey } from "./delivery/blocks.js";
3
+ import { shallowRef } from "vue";
4
+ import { defineNuxtPlugin } from "nuxt/app";
5
+ import blocks from "#cms/blocks";
6
+ import authoring from "#cms/authoring";
7
+
8
+ //#region src/runtime/blocks.ts
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
+ }
26
+ });
27
+
28
+ //#endregion
29
+ export { blocks_default as default };
30
+ //# sourceMappingURL=blocks.js.map
@@ -0,0 +1 @@
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"}
@@ -2,9 +2,12 @@ import { useCmsInstallation } from "./plugin.js";
2
2
  import { defineWebSocketHandler } from "h3";
3
3
 
4
4
  //#region src/runtime/collaboration.ts
5
+ const installations = /* @__PURE__ */ new WeakMap();
5
6
  var collaboration_default = defineWebSocketHandler({
6
7
  open(peer) {
7
- return useCmsInstallation().then((installation) => {
8
+ const installation = useCmsInstallation();
9
+ installations.set(peer.websocket, installation);
10
+ return installation.then((installation) => {
8
11
  const request = new Request(peer.request.url, { headers: peer.request.headers });
9
12
  installation.webSocket.open({
10
13
  request,
@@ -13,12 +16,14 @@ var collaboration_default = defineWebSocketHandler({
13
16
  });
14
17
  },
15
18
  message(peer, message) {
16
- return useCmsInstallation().then((installation) => {
19
+ return installations.get(peer.websocket)?.then((installation) => {
17
20
  installation.webSocket.message(collaborationSocket(peer.websocket), message.uint8Array());
18
21
  });
19
22
  },
20
23
  close(peer, details) {
21
- return useCmsInstallation().then((installation) => {
24
+ const installation = installations.get(peer.websocket);
25
+ installations.delete(peer.websocket);
26
+ return installation?.then((installation) => {
22
27
  installation.webSocket.close(collaborationSocket(peer.websocket), {
23
28
  code: details.code,
24
29
  reason: details.reason
@@ -26,7 +31,7 @@ var collaboration_default = defineWebSocketHandler({
26
31
  });
27
32
  },
28
33
  error(peer) {
29
- return useCmsInstallation().then((installation) => {
34
+ return installations.get(peer.websocket)?.then((installation) => {
30
35
  installation.webSocket.error(collaborationSocket(peer.websocket));
31
36
  });
32
37
  }
@@ -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\nexport default defineWebSocketHandler({\n open(peer) {\n return useCmsInstallation().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 useCmsInstallation().then((installation) => {\n installation.webSocket.message(collaborationSocket(peer.websocket), message.uint8Array())\n })\n },\n close(peer, details) {\n return useCmsInstallation().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 useCmsInstallation().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":";;;;AAQA,4BAAe,uBAAuB;CACpC,KAAK,MAAM;EACT,OAAO,mBAAmB,CAAC,CAAC,MAAM,iBAAiB;GACjD,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,mBAAmB,CAAC,CAAC,MAAM,iBAAiB;GACjD,aAAa,UAAU,QAAQ,oBAAoB,KAAK,SAAS,GAAG,QAAQ,WAAW,CAAC;EAC1F,CAAC;CACH;CACA,MAAM,MAAM,SAAS;EACnB,OAAO,mBAAmB,CAAC,CAAC,MAAM,iBAAiB;GACjD,aAAa,UAAU,MAAM,oBAAoB,KAAK,SAAS,GAAG;IAChE,MAAM,QAAQ;IACd,QAAQ,QAAQ;GAClB,CAAC;EACH,CAAC;CACH;CACA,MAAM,MAAM;EACV,OAAO,mBAAmB,CAAC,CAAC,MAAM,iBAAiB;GACjD,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,6 +1,8 @@
1
+ import { blockComponentsKey, formComponentsKey, formPreviewKey } from "./blocks.js";
2
+ import { prepareFormDocument } from "../forms/document.js";
1
3
  import DocumentScope_default from "./DocumentScope.js";
2
4
  import { Predicate } from "effect";
3
- import { defineComponent, h } from "vue";
5
+ import { defineComponent, h, inject, shallowRef } from "vue";
4
6
  import { MarkdownDocument } from "@comark/vue";
5
7
 
6
8
  //#region src/runtime/delivery/DocumentRenderer.ts
@@ -11,17 +13,21 @@ var DocumentRenderer_default = defineComponent({
11
13
  type: Object
12
14
  } },
13
15
  setup(props) {
16
+ const formComponents = inject(formComponentsKey, shallowRef([]));
17
+ const preview = inject(formPreviewKey, shallowRef(false));
18
+ const components = inject(blockComponentsKey, shallowRef({}));
14
19
  return () => h(DocumentScope_default, {
15
20
  as: "article",
16
21
  role: "primary",
17
22
  value: props.value
18
- }, { default: ({ value }) => renderDocument(value) });
23
+ }, { default: ({ value }) => renderDocument(value, components.value, formComponents.value, preview.value) });
19
24
  }
20
25
  });
21
- function renderDocument(value) {
26
+ function renderDocument(value, components = {}, forms = [], preview = false) {
22
27
  return h(MarkdownDocument, {
28
+ components,
23
29
  documentKey: value.id,
24
- value: toComarkDocument(value.body)
30
+ value: toComarkDocument(prepareFormDocument(value, forms, preview).body)
25
31
  });
26
32
  }
27
33
  function toComarkDocument(document) {
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentRenderer.js","names":["DocumentScope"],"sources":["../../../../../src/runtime/delivery/DocumentRenderer.ts"],"sourcesContent":["import type { 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 } from 'vue'\nimport DocumentScope from './DocumentScope'\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 return () =>\n h(\n DocumentScope,\n { as: 'article', role: 'primary', value: props.value },\n {\n default: ({ value }: { value: DeliveryDocument }) => renderDocument(value),\n },\n )\n },\n})\n\nexport function renderDocument(value: DeliveryDocument) {\n return h(MarkdownDocument, { 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":";;;;;;AAQA,+BAAe,gBAAgB;CAC7B,MAAM;CACN,OAAO,EAEL,OAAO;EAAE,UAAU;EAAM,MAAM;CAAqC,EACtE;CACA,MAAM,OAAO;EACX,aACE,EACEA,uBACA;GAAE,IAAI;GAAW,MAAM;GAAW,OAAO,MAAM;EAAM,GACrD,EACE,UAAU,EAAE,YAAyC,eAAe,KAAK,EAC3E,CACF;CACJ;AACF,CAAC;AAED,SAAgB,eAAe,OAAyB;CACtD,OAAO,EAAE,kBAAkB;EAAE,aAAa,MAAM;EAAI,OAAO,iBAAiB,MAAM,IAAI;CAAE,CAAC;AAC3F;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"}
@@ -0,0 +1,8 @@
1
+ //#region src/runtime/delivery/blocks.ts
2
+ const blockComponentsKey = Symbol("cms-block-components");
3
+ const formComponentsKey = Symbol("cms-form-components");
4
+ const formPreviewKey = Symbol("cms-form-preview");
5
+
6
+ //#endregion
7
+ export { blockComponentsKey, formComponentsKey, formPreviewKey };
8
+ //# sourceMappingURL=blocks.js.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,12 @@
1
+ import { n as readPreviewLocation } from "../../location-CFKTeK1K.js";
2
+ import { useRequestURL, useState } from "nuxt/app";
3
+
4
+ //#region src/runtime/delivery/context.ts
5
+ /** Per Nuxt app/request, serialized through hydration and retained during navigation. Access is checked by the preview API. */
6
+ function usePreviewDelivery() {
7
+ return useState("cms:preview-delivery", () => Boolean(readPreviewLocation(useRequestURL())));
8
+ }
9
+
10
+ //#endregion
11
+ export { usePreviewDelivery };
12
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","names":[],"sources":["../../../../../src/runtime/delivery/context.ts"],"sourcesContent":["import { useRequestURL, useState } from 'nuxt/app'\nimport { readPreviewLocation } from '@internal/protocol/Preview'\n\n/** Per Nuxt app/request, serialized through hydration and retained during navigation. Access is checked by the preview API. */\nexport function usePreviewDelivery() {\n return useState('cms:preview-delivery', () => Boolean(readPreviewLocation(useRequestURL())))\n}\n"],"mappings":";;;;;AAIA,SAAgB,qBAAqB;CACnC,OAAO,SAAS,8BAA8B,QAAQ,oBAAoB,cAAc,CAAC,CAAC,CAAC;AAC7F"}
@@ -2,19 +2,21 @@ import DocumentRenderer_default from "./DocumentRenderer.js";
2
2
  import { h } from "vue";
3
3
 
4
4
  //#region src/runtime/delivery/document-page.ts
5
- function resolveDocumentPage(request, registerMetadata) {
6
- registerMetadata({
7
- description: () => request.page()?.description,
8
- title: () => request.page()?.title
9
- });
10
- return request.ready.then(() => {
5
+ function resolveDocumentPage(request) {
6
+ function render() {
11
7
  const error = request.error();
12
- if (error) throw error;
13
- if (!request.page()) throw request.notFound();
14
- return () => {
15
- const page = request.page();
16
- return page ? h(DocumentRenderer_default, { value: page }) : void 0;
17
- };
8
+ const page = request.page();
9
+ const failure = error ?? (!page ? request.notFound() : void 0);
10
+ if (failure) {
11
+ if (request.renderError) return request.renderError(failure)();
12
+ throw failure;
13
+ }
14
+ return page ? h(DocumentRenderer_default, { value: page }) : void 0;
15
+ }
16
+ return request.ready.then(() => {
17
+ const failure = request.error() ?? (!request.page() ? request.notFound() : void 0);
18
+ if (failure && !request.renderError) throw failure;
19
+ return render;
18
20
  });
19
21
  }
20
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"document-page.js","names":["DocumentRenderer"],"sources":["../../../../../src/runtime/delivery/document-page.ts"],"sourcesContent":["import type { VNode } from 'vue'\nimport type { DeliveryDocument } from './types'\nimport { h } from 'vue'\nimport DocumentRenderer from './DocumentRenderer'\n\nexport interface DocumentPageMetadata {\n readonly description: () => string | undefined\n readonly title: () => string | undefined\n}\n\nexport interface DocumentPageRequest {\n readonly error: () => Error | undefined\n readonly notFound: () => Error\n readonly page: () => DeliveryDocument | null\n readonly ready: Promise<unknown>\n}\n\nexport function resolveDocumentPage(\n request: DocumentPageRequest,\n registerMetadata: (metadata: DocumentPageMetadata) => void,\n): Promise<() => VNode | undefined> {\n registerMetadata({\n description: () => request.page()?.description,\n title: () => request.page()?.title,\n })\n\n return request.ready.then(() => {\n const error = request.error()\n if (error) throw error\n if (!request.page()) throw request.notFound()\n\n return () => {\n const page = request.page()\n return page ? h(DocumentRenderer, { value: page }) : undefined\n }\n })\n}\n"],"mappings":";;;;AAiBA,SAAgB,oBACd,SACA,kBACkC;CAClC,iBAAiB;EACf,mBAAmB,QAAQ,KAAK,CAAC,EAAE;EACnC,aAAa,QAAQ,KAAK,CAAC,EAAE;CAC/B,CAAC;CAED,OAAO,QAAQ,MAAM,WAAW;EAC9B,MAAM,QAAQ,QAAQ,MAAM;EAC5B,IAAI,OAAO,MAAM;EACjB,IAAI,CAAC,QAAQ,KAAK,GAAG,MAAM,QAAQ,SAAS;EAE5C,aAAa;GACX,MAAM,OAAO,QAAQ,KAAK;GAC1B,OAAO,OAAO,EAAEA,0BAAkB,EAAE,OAAO,KAAK,CAAC,IAAI;EACvD;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"document-page.js","names":["DocumentRenderer"],"sources":["../../../../../src/runtime/delivery/document-page.ts"],"sourcesContent":["import type { VNode } from 'vue'\nimport type { DeliveryDocument } from './types'\nimport { h } from 'vue'\nimport DocumentRenderer from './DocumentRenderer'\n\nexport interface DocumentPageRequest {\n readonly error: () => Error | undefined\n readonly notFound: () => Error\n readonly page: () => DeliveryDocument | null\n readonly renderError?: ((error: Error) => () => VNode) | undefined\n readonly ready: Promise<unknown>\n}\n\nexport function resolveDocumentPage(request: DocumentPageRequest): Promise<() => VNode | undefined> {\n function render(): VNode | undefined {\n const error = request.error()\n const page = request.page()\n const failure = error ?? (!page ? request.notFound() : undefined)\n\n if (failure) {\n if (request.renderError) return request.renderError(failure)()\n throw failure\n }\n\n return page ? h(DocumentRenderer, { value: page }) : undefined\n }\n\n return request.ready.then(() => {\n // Reject initial delivery failures during setup so Nuxt can set the HTTP status.\n const failure = request.error() ?? (!request.page() ? request.notFound() : undefined)\n\n if (failure && !request.renderError) throw failure\n\n return render\n })\n}\n"],"mappings":";;;;AAaA,SAAgB,oBAAoB,SAAgE;CAClG,SAAS,SAA4B;EACnC,MAAM,QAAQ,QAAQ,MAAM;EAC5B,MAAM,OAAO,QAAQ,KAAK;EAC1B,MAAM,UAAU,UAAU,CAAC,OAAO,QAAQ,SAAS,IAAI;EAEvD,IAAI,SAAS;GACX,IAAI,QAAQ,aAAa,OAAO,QAAQ,YAAY,OAAO,CAAC,CAAC;GAC7D,MAAM;EACR;EAEA,OAAO,OAAO,EAAEA,0BAAkB,EAAE,OAAO,KAAK,CAAC,IAAI;CACvD;CAEA,OAAO,QAAQ,MAAM,WAAW;EAE9B,MAAM,UAAU,QAAQ,MAAM,MAAM,CAAC,QAAQ,KAAK,IAAI,QAAQ,SAAS,IAAI;EAE3E,IAAI,WAAW,CAAC,QAAQ,aAAa,MAAM;EAE3C,OAAO;CACT,CAAC;AACH"}
@@ -1,22 +1,40 @@
1
+ import { usePreviewDelivery } from "./context.js";
1
2
  import { resolveDocumentPage } from "./document-page.js";
3
+ import { previewErrorMessage } from "./error.js";
2
4
  import { useDocument } from "./useDocument.js";
3
- import { createError, defineNuxtComponent, useRoute, useSeoMeta } from "nuxt/app";
5
+ import { useCmsDocumentSeo } from "./useCmsDocumentSeo.js";
6
+ import { h } from "vue";
7
+ import { createError, defineNuxtComponent, useRoute, useState } from "nuxt/app";
4
8
 
5
9
  //#region src/runtime/delivery/document.ts
6
10
  var document_default = defineNuxtComponent({
7
11
  name: "CmsDocumentPage",
8
12
  setup() {
9
13
  const route = useRoute();
14
+ const preview = usePreviewDelivery();
15
+ const previewError = useState("cms:preview-error", () => null);
10
16
  const request = useDocument(() => route.path);
17
+ useCmsDocumentSeo(() => request.data.value);
11
18
  return resolveDocumentPage({
12
19
  error: () => request.error.value,
20
+ renderError: preview.value ? (error) => {
21
+ const status = createError(error).statusCode ?? 500;
22
+ previewError.value = previewErrorMessage(status);
23
+ return () => h("p", {
24
+ role: "alert",
25
+ class: "p-6"
26
+ }, previewError.value ?? "");
27
+ } : void 0,
13
28
  notFound: () => createError({
14
29
  statusCode: 404,
15
30
  statusMessage: "Document not found"
16
31
  }),
17
- page: () => request.data.value,
32
+ page: () => {
33
+ if (request.data.value) previewError.value = null;
34
+ return request.data.value;
35
+ },
18
36
  ready: request
19
- }, useSeoMeta);
37
+ });
20
38
  }
21
39
  });
22
40
 
@@ -1 +1 @@
1
- {"version":3,"file":"document.js","names":[],"sources":["../../../../../src/runtime/delivery/document.ts"],"sourcesContent":["import { createError, defineNuxtComponent, useRoute, useSeoMeta } from 'nuxt/app'\nimport { resolveDocumentPage } from './document-page'\nimport { useDocument } from './useDocument'\n\nexport default defineNuxtComponent({\n name: 'CmsDocumentPage',\n setup() {\n const route = useRoute()\n const request = useDocument(() => route.path)\n return resolveDocumentPage(\n {\n error: () => request.error.value,\n notFound: () =>\n createError({\n statusCode: 404,\n statusMessage: 'Document not found',\n }),\n page: () => request.data.value,\n ready: request,\n },\n useSeoMeta,\n )\n },\n})\n"],"mappings":";;;;;AAIA,uBAAe,oBAAoB;CACjC,MAAM;CACN,QAAQ;EACN,MAAM,QAAQ,SAAS;EACvB,MAAM,UAAU,kBAAkB,MAAM,IAAI;EAC5C,OAAO,oBACL;GACE,aAAa,QAAQ,MAAM;GAC3B,gBACE,YAAY;IACV,YAAY;IACZ,eAAe;GACjB,CAAC;GACH,YAAY,QAAQ,KAAK;GACzB,OAAO;EACT,GACA,UACF;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"document.js","names":[],"sources":["../../../../../src/runtime/delivery/document.ts"],"sourcesContent":["import { createError, defineNuxtComponent, useRoute, useState } from 'nuxt/app'\nimport { h } from 'vue'\nimport { usePreviewDelivery } from './context'\nimport { previewErrorMessage } from './error'\nimport { resolveDocumentPage } from './document-page'\nimport { useDocument } from './useDocument'\nimport { useCmsDocumentSeo } from './useCmsDocumentSeo'\n\nexport default defineNuxtComponent({\n name: 'CmsDocumentPage',\n setup() {\n const route = useRoute()\n const preview = usePreviewDelivery()\n const previewError = useState<string | null>('cms:preview-error', () => null)\n const request = useDocument(() => route.path)\n\n useCmsDocumentSeo(() => request.data.value)\n\n return resolveDocumentPage({\n error: () => request.error.value,\n renderError: preview.value\n ? (error) => {\n const status = createError(error).statusCode ?? 500\n previewError.value = previewErrorMessage(status)\n\n return () => h('p', { role: 'alert', class: 'p-6' }, previewError.value ?? '')\n }\n : undefined,\n notFound: () =>\n createError({\n statusCode: 404,\n statusMessage: 'Document not found',\n }),\n page: () => {\n if (request.data.value) previewError.value = null\n\n return request.data.value\n },\n ready: request,\n })\n },\n})\n"],"mappings":";;;;;;;;;AAQA,uBAAe,oBAAoB;CACjC,MAAM;CACN,QAAQ;EACN,MAAM,QAAQ,SAAS;EACvB,MAAM,UAAU,mBAAmB;EACnC,MAAM,eAAe,SAAwB,2BAA2B,IAAI;EAC5E,MAAM,UAAU,kBAAkB,MAAM,IAAI;EAE5C,wBAAwB,QAAQ,KAAK,KAAK;EAE1C,OAAO,oBAAoB;GACzB,aAAa,QAAQ,MAAM;GAC3B,aAAa,QAAQ,SAChB,UAAU;IACT,MAAM,SAAS,YAAY,KAAK,CAAC,CAAC,cAAc;IAChD,aAAa,QAAQ,oBAAoB,MAAM;IAE/C,aAAa,EAAE,KAAK;KAAE,MAAM;KAAS,OAAO;IAAM,GAAG,aAAa,SAAS,EAAE;GAC/E,IACA;GACJ,gBACE,YAAY;IACV,YAAY;IACZ,eAAe;GACjB,CAAC;GACH,YAAY;IACV,IAAI,QAAQ,KAAK,OAAO,aAAa,QAAQ;IAE7C,OAAO,QAAQ,KAAK;GACtB;GACA,OAAO;EACT,CAAC;CACH;AACF,CAAC"}
@@ -0,0 +1,11 @@
1
+ //#region src/runtime/delivery/error.ts
2
+ function previewErrorMessage(status) {
3
+ if (status === 401) return "Your session has expired. Sign in to Studio and reload the preview.";
4
+ if (status === 403) return "You do not have permission to preview this page.";
5
+ if (status === 404) return "This page could not be found. It may have moved or been deleted.";
6
+ return "The preview could not load. Try reloading the page.";
7
+ }
8
+
9
+ //#endregion
10
+ export { previewErrorMessage };
11
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","names":[],"sources":["../../../../../src/runtime/delivery/error.ts"],"sourcesContent":["export function previewErrorMessage(status: number): string {\n if (status === 401) return 'Your session has expired. Sign in to Studio and reload the preview.'\n\n if (status === 403) return 'You do not have permission to preview this page.'\n\n if (status === 404) return 'This page could not be found. It may have moved or been deleted.'\n\n return 'The preview could not load. Try reloading the page.'\n}\n"],"mappings":";AAAA,SAAgB,oBAAoB,QAAwB;CAC1D,IAAI,WAAW,KAAK,OAAO;CAE3B,IAAI,WAAW,KAAK,OAAO;CAE3B,IAAI,WAAW,KAAK,OAAO;CAE3B,OAAO;AACT"}
@@ -0,0 +1,41 @@
1
+ import { n as readPreviewLocation, t as previewRedirect } from "../../location-CFKTeK1K.js";
2
+ import { usePreviewDelivery } from "./context.js";
3
+ import { installCmsDocumentSeoAdapters } from "./useCmsDocumentSeo.js";
4
+ import { watch } from "vue";
5
+ import { addRouteMiddleware, defineNuxtPlugin, useHead, useRequestURL, useResponseHeader, useSeoMeta } from "nuxt/app";
6
+ import { useRobotsRule, useSchemaOrg } from "#imports";
7
+
8
+ //#region src/runtime/delivery/plugin.ts
9
+ var plugin_default = defineNuxtPlugin(() => {
10
+ installCmsDocumentSeoAdapters({
11
+ head: (input) => {
12
+ useHead(input);
13
+ },
14
+ robots: (input) => {
15
+ const robots = useRobotsRule(input);
16
+ if (import.meta.server) watch(input, (value) => {
17
+ robots.value = value;
18
+ }, { flush: "sync" });
19
+ },
20
+ schema: (input) => {
21
+ useSchemaOrg(input);
22
+ },
23
+ seoMeta: (input) => {
24
+ useSeoMeta(input);
25
+ }
26
+ });
27
+ const url = useRequestURL();
28
+ const parameters = readPreviewLocation(url);
29
+ if (!usePreviewDelivery().value || !parameters) return;
30
+ if (import.meta.server) {
31
+ useResponseHeader("cache-control").value = "private, no-store";
32
+ useResponseHeader("x-frame-options").value = "SAMEORIGIN";
33
+ }
34
+ addRouteMiddleware("cms-preview", (to) => {
35
+ return previewRedirect(new URL(to.fullPath, url.origin), parameters);
36
+ }, { global: true });
37
+ });
38
+
39
+ //#endregion
40
+ export { plugin_default as default };
41
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","names":[],"sources":["../../../../../src/runtime/delivery/plugin.ts"],"sourcesContent":["import { addRouteMiddleware, defineNuxtPlugin, useHead, useRequestURL, useResponseHeader, useSeoMeta } from 'nuxt/app'\nimport { useRobotsRule, useSchemaOrg } from '#imports'\nimport { previewRedirect, readPreviewLocation } from '@internal/protocol/Preview'\nimport { watch } from 'vue'\nimport { usePreviewDelivery } from './context'\nimport { installCmsDocumentSeoAdapters } from './useCmsDocumentSeo'\n\nexport default defineNuxtPlugin(() => {\n installCmsDocumentSeoAdapters({\n head: (input) => {\n useHead(input)\n },\n robots: (input) => {\n const robots = useRobotsRule(input)\n\n if (import.meta.server) {\n watch(\n input,\n (value) => {\n robots.value = value\n },\n { flush: 'sync' },\n )\n }\n },\n schema: (input) => {\n useSchemaOrg(input)\n },\n seoMeta: (input) => {\n useSeoMeta(input)\n },\n })\n\n const url = useRequestURL()\n const parameters = readPreviewLocation(url)\n const preview = usePreviewDelivery()\n\n if (!preview.value || !parameters) return\n\n if (import.meta.server) {\n useResponseHeader('cache-control').value = 'private, no-store'\n useResponseHeader('x-frame-options').value = 'SAMEORIGIN'\n }\n\n addRouteMiddleware(\n 'cms-preview',\n (to) => {\n return previewRedirect(new URL(to.fullPath, url.origin), parameters)\n },\n { global: true },\n )\n})\n"],"mappings":";;;;;;;;AAOA,qBAAe,uBAAuB;CACpC,8BAA8B;EAC5B,OAAO,UAAU;GACf,QAAQ,KAAK;EACf;EACA,SAAS,UAAU;GACjB,MAAM,SAAS,cAAc,KAAK;GAElC,IAAI,YAAY,QACd,MACE,QACC,UAAU;IACT,OAAO,QAAQ;GACjB,GACA,EAAE,OAAO,OAAO,CAClB;EAEJ;EACA,SAAS,UAAU;GACjB,aAAa,KAAK;EACpB;EACA,UAAU,UAAU;GAClB,WAAW,KAAK;EAClB;CACF,CAAC;CAED,MAAM,MAAM,cAAc;CAC1B,MAAM,aAAa,oBAAoB,GAAG;CAG1C,IAAI,CAFY,mBAEL,CAAC,CAAC,SAAS,CAAC,YAAY;CAEnC,IAAI,YAAY,QAAQ;EACtB,kBAAkB,eAAe,CAAC,CAAC,QAAQ;EAC3C,kBAAkB,iBAAiB,CAAC,CAAC,QAAQ;CAC/C;CAEA,mBACE,gBACC,OAAO;EACN,OAAO,gBAAgB,IAAI,IAAI,GAAG,UAAU,IAAI,MAAM,GAAG,UAAU;CACrE,GACA,EAAE,QAAQ,KAAK,CACjB;AACF,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { n as ResolvedSeo, t as DocumentSeo } from "../../Seo-402YumpT.js";
2
+ import { DateTime } from "effect";
1
3
  //#region src/runtime/delivery/types.d.ts
2
4
  export type DeliveryJson = null | boolean | number | string | ReadonlyArray<DeliveryJson> | DeliveryJsonObject;
3
5
  export interface DeliveryJsonObject {
@@ -40,6 +42,8 @@ export interface DeliveryDocument {
40
42
  readonly key: string;
41
43
  readonly locale?: string;
42
44
  readonly path: string;
45
+ readonly resolvedSeo?: ResolvedSeo;
46
+ readonly seo?: DocumentSeo;
43
47
  readonly source: {
44
48
  readonly mappings: ReadonlyArray<{
45
49
  readonly nodePath: ReadonlyArray<number>;
@@ -57,6 +61,7 @@ export interface DeliveryDocument {
57
61
  };
58
62
  }>;
59
63
  readonly path: string;
64
+ readonly publishedAt?: DateTime.Utc;
60
65
  };
61
66
  readonly title: string;
62
67
  }
@@ -0,0 +1,56 @@
1
+ import { i as SiteIdentity } from "../../Seo-402YumpT.js";
2
+ import { DeliveryDocument } from "./types.js";
3
+ import { ComputedRef, MaybeRefOrGetter } from "vue";
4
+ //#region src/runtime/delivery/useCmsDocumentSeo.d.ts
5
+ type ReactiveMetadataValue = () => string | undefined;
6
+ export interface CmsSeoMetadata {
7
+ readonly title: ReactiveMetadataValue;
8
+ readonly description: ReactiveMetadataValue;
9
+ readonly ogTitle: ReactiveMetadataValue;
10
+ readonly ogDescription: ReactiveMetadataValue;
11
+ readonly ogImage: ReactiveMetadataValue;
12
+ readonly ogImageAlt: ReactiveMetadataValue;
13
+ readonly robots: ReactiveMetadataValue;
14
+ }
15
+ interface CmsIdentitySchemaNode {
16
+ readonly '@type': SiteIdentity['type'];
17
+ readonly name: string;
18
+ readonly url?: string;
19
+ readonly image?: string;
20
+ readonly logo?: string;
21
+ readonly telephone?: string;
22
+ readonly address?: NonNullable<Extract<SiteIdentity, {
23
+ readonly type: 'LocalBusiness';
24
+ }>['address']>;
25
+ }
26
+ interface CmsPageSchemaNode {
27
+ readonly '@type': 'Article' | 'WebPage';
28
+ readonly name: string;
29
+ readonly description?: string;
30
+ readonly image?: string;
31
+ readonly url?: string;
32
+ readonly headline?: string;
33
+ readonly datePublished?: string;
34
+ readonly dateModified?: string;
35
+ }
36
+ export type CmsSeoSchemaNode = CmsIdentitySchemaNode | CmsPageSchemaNode;
37
+ export interface CmsDocumentSeoAdapters {
38
+ readonly head: (input: () => {
39
+ link: Array<{
40
+ href: string;
41
+ rel: 'canonical';
42
+ }>;
43
+ titleTemplate: null;
44
+ }) => void;
45
+ readonly robots: (input: ComputedRef<{
46
+ readonly follow: boolean;
47
+ readonly index: boolean;
48
+ }>) => void;
49
+ readonly schema: (input: ComputedRef<ReadonlyArray<CmsSeoSchemaNode>>) => void;
50
+ readonly seoMeta: (input: CmsSeoMetadata) => void;
51
+ }
52
+ /** Installs Nuxt's composables once before document page setup. */
53
+ export declare function installCmsDocumentSeoAdapters(adapters: CmsDocumentSeoAdapters): void;
54
+ export declare function useCmsDocumentSeo(document: MaybeRefOrGetter<DeliveryDocument | null>): void;
55
+ //#endregion
56
+ //# sourceMappingURL=useCmsDocumentSeo.d.ts.map