@phtngyn/cms 0.2.0-beta.4 → 0.2.0-beta.5
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.
- package/README.md +31 -13
- package/package.json +7 -7
- package/src/ApplicationTypes.d.ts +3 -3
- package/src/Authoring.d.ts +11 -3
- package/src/{Configuration-BU-UyGoH.js → Configuration-JQ1qyaU0.js} +347 -189
- package/src/Configuration-JQ1qyaU0.js.map +1 -0
- package/src/Configuration.d.ts +1 -1
- package/src/Content.d.ts +7 -6
- package/src/Content.js +106 -47
- package/src/Content.js.map +1 -1
- package/src/ContentTransfer-BxwswWn3.js +86 -0
- package/src/ContentTransfer-BxwswWn3.js.map +1 -0
- package/src/{ContentTransfer-CRQet3QJ.d.ts → ContentTransfer-Z9FHyLez.d.ts} +33 -9
- package/src/{DocumentEngine-ClhFXW9M.js → DocumentEngine-j6Vi7nQo.js} +279 -178
- package/src/DocumentEngine-j6Vi7nQo.js.map +1 -0
- package/src/DocumentModel.d.ts +9 -2
- package/src/DocumentModel.js +17 -4
- package/src/DocumentModel.js.map +1 -1
- package/src/{Forms-DoB56hfe.js → Forms-CX-hwmJF.js} +18 -11
- package/src/Forms-CX-hwmJF.js.map +1 -0
- package/src/{Forms-BbkE7QfC.js → Forms-CfNPTiCr.js} +2 -2
- package/src/{Forms-BbkE7QfC.js.map → Forms-CfNPTiCr.js.map} +1 -1
- package/src/Media-j1bTritO.js +112 -0
- package/src/Media-j1bTritO.js.map +1 -0
- package/src/Module.js +0 -4
- package/src/Module.js.map +1 -1
- package/src/References-CCPDAPve.js +45 -0
- package/src/References-CCPDAPve.js.map +1 -0
- package/src/{S3MediaObjects-CR3p1WTg.js → S3MediaObjects-BRuPQbxl.js} +454 -516
- package/src/S3MediaObjects-BRuPQbxl.js.map +1 -0
- package/src/cli/content.js +6 -5
- package/src/cli/content.js.map +1 -1
- package/src/cli.js +16 -3
- package/src/cli.js.map +1 -1
- package/src/{connection-D5S9Iph-.js → connection-BP80q4d-.js} +2 -2
- package/src/{connection-D5S9Iph-.js.map → connection-BP80q4d-.js.map} +1 -1
- package/src/{dev-lifecycle-D3f9-upa.js → dev-lifecycle-DdBluSiR.js} +26 -6
- package/src/dev-lifecycle-DdBluSiR.js.map +1 -0
- package/src/{installation-fZtNxtoW.js → installation-BoG8E3nJ.js} +7982 -7155
- package/src/installation-BoG8E3nJ.js.map +1 -0
- package/src/internal/authoring-catalog.js +2 -2
- package/src/internal/authoring-compiler.js +35 -9
- package/src/internal/authoring-compiler.js.map +1 -1
- package/src/internal/authoring-metadata.js +14 -5
- package/src/internal/authoring-metadata.js.map +1 -1
- package/src/internal/configuration.js +27 -3
- package/src/internal/configuration.js.map +1 -1
- package/src/internal/dev-lifecycle.js +2 -2
- package/src/internal/document-model.js +134 -43
- package/src/internal/document-model.js.map +1 -1
- package/src/internal/field-metadata.js +2 -1
- package/src/internal/field-metadata.js.map +1 -1
- package/src/internal/form-capabilities.js +1 -1
- package/src/{location-CPX7oj0o.js → location-CMNGO3lU.js} +2 -2
- package/src/{location-CPX7oj0o.js.map → location-CMNGO3lU.js.map} +1 -1
- package/src/{metadata-BEZPWh-3.js → metadata-UzZmjwxM.js} +2 -2
- package/src/{metadata-BEZPWh-3.js.map → metadata-UzZmjwxM.js.map} +1 -1
- package/src/{models-C9kF9JlQ.js → models-5j67LMqW.js} +4 -4
- package/src/{models-C9kF9JlQ.js.map → models-5j67LMqW.js.map} +1 -1
- package/src/{models-ChRxBChy.js → models-VmGmG19-.js} +42 -130
- package/src/models-VmGmG19-.js.map +1 -0
- package/src/runtime/delivery/DocumentRenderer.js +5 -1
- package/src/runtime/delivery/DocumentRenderer.js.map +1 -1
- package/src/runtime/delivery/context.js +1 -1
- package/src/runtime/delivery/plugin.js +2 -2
- package/src/runtime/delivery/preview.d.ts +1 -1
- package/src/runtime/delivery/types.d.ts +1 -1
- package/src/runtime/delivery/useCmsDocumentSeo.d.ts +1 -1
- package/src/runtime/forms/document.js +2 -2
- package/src/runtime/forms/useCmsForm.js +2 -2
- package/src/runtime/installation.js +1 -1
- package/src/runtime/plugin.js +1 -1
- package/src/runtime/preview/CmsStudioPreviewMarker.js +18 -4
- package/src/runtime/preview/CmsStudioPreviewMarker.js.map +1 -1
- package/src/runtime/preview/connection.js +1 -1
- package/src/runtime/preview/controller.js +65 -74
- package/src/runtime/preview/controller.js.map +1 -1
- package/src/runtime/preview/overlay.js +85 -28
- package/src/runtime/preview/overlay.js.map +1 -1
- package/src/runtime/preview/plugin.client.js +4 -4
- package/src/runtime/preview/preview.css +50 -36
- package/src/runtime/preview/protocol.d.ts +11 -5
- package/src/runtime/preview/protocol.js +17 -5
- package/src/runtime/preview/protocol.js.map +1 -1
- package/src/runtime/preview/regions.js +142 -0
- package/src/runtime/preview/regions.js.map +1 -0
- package/src/runtime/preview/store.js +1 -1
- package/src/runtime/sitemap.js +9 -10
- package/src/runtime/sitemap.js.map +1 -1
- package/src/{scalars-B2lgGUnj.js → scalars-CVZqT3L0.js} +2 -6
- package/src/scalars-CVZqT3L0.js.map +1 -0
- package/src/{store-CCsjHaZm.js → store-PKKB8xa2.js} +49 -66
- package/src/store-PKKB8xa2.js.map +1 -0
- package/src/{types-DutFRtaG.d.ts → types-DZ0IV-Ow.d.ts} +14 -3
- package/studio/CreateDocumentDialog-vQ8hDs2C.js +253 -0
- package/studio/{documentPlanning-CDb31mnl.js → documentPlanning-Bx3W9KkD.js} +12054 -12085
- package/studio/{editor-Bzlh3zXt.js → editor-P2rB7Csp.js} +11228 -11927
- package/studio/host.css +1 -1
- package/studio/host.js +23594 -24903
- package/studio/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/src/Configuration-BU-UyGoH.js.map +0 -1
- package/src/ContentTransfer-BhF9G56s.js +0 -57
- package/src/ContentTransfer-BhF9G56s.js.map +0 -1
- package/src/DocumentEngine-ClhFXW9M.js.map +0 -1
- package/src/Forms-DoB56hfe.js.map +0 -1
- package/src/S3MediaObjects-CR3p1WTg.js.map +0 -1
- package/src/dev-lifecycle-D3f9-upa.js.map +0 -1
- package/src/installation-fZtNxtoW.js.map +0 -1
- package/src/models-ChRxBChy.js.map +0 -1
- package/src/runtime/preview/targets.js +0 -101
- package/src/runtime/preview/targets.js.map +0 -1
- package/src/scalars-B2lgGUnj.js.map +0 -1
- package/src/store-CCsjHaZm.js.map +0 -1
- package/studio/CreateDocumentDialog-DJ8c0WZb.js +0 -256
- package/studio/dom-to-image-more.min-D6jGGdrW.js +0 -877
- package/studio/rolldown-runtime-B0aSnxlc.js +0 -20
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as publicPathPattern, i as DocumentVersion, l as Slug, o as PublicPath, r as DocumentId, s as RevisionId, t as DocumentGeneration, u as nonNegativeInt } from "./scalars-CVZqT3L0.js";
|
|
2
|
+
import { c as MediaId, s as MediaFolder } from "./Media-j1bTritO.js";
|
|
2
3
|
import { DateTime, Option, Schema } from "effect";
|
|
3
4
|
|
|
4
5
|
//#region ../protocol/src/Identity.ts
|
|
@@ -8,119 +9,9 @@ const RequestId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand("Reques
|
|
|
8
9
|
//#region ../protocol/src/internal/configuration/scalars.ts
|
|
9
10
|
const collectionNamePattern = /^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$/u;
|
|
10
11
|
const localePattern = /^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u;
|
|
11
|
-
const
|
|
12
|
-
const AddressPattern = Schema.String.check(Schema.isPattern(publicPathPattern)).pipe(Schema.brand("AddressPattern"));
|
|
12
|
+
const RoutePattern = Schema.String.check(Schema.isPattern(publicPathPattern)).pipe(Schema.brand("RoutePattern"));
|
|
13
13
|
const CollectionName = Schema.String.check(Schema.isPattern(collectionNamePattern)).pipe(Schema.brand("CollectionName"));
|
|
14
14
|
const Locale = Schema.String.check(Schema.isPattern(localePattern)).pipe(Schema.brand("Locale"));
|
|
15
|
-
const SourceDirectory = Schema.String.check(Schema.isPattern(sourceDirectoryPattern)).pipe(Schema.brand("SourceDirectory"));
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region ../protocol/src/Media.ts
|
|
19
|
-
/**
|
|
20
|
-
* Media wire models. Search pages are newest-first with opaque continuation cursors; only ready
|
|
21
|
-
* assets are public results, and names, folders, and object keys are validated path-safe values.
|
|
22
|
-
*/
|
|
23
|
-
const hasUnsafeMediaCharacter = (value) => {
|
|
24
|
-
for (const character of value) {
|
|
25
|
-
const codePoint = character.codePointAt(0);
|
|
26
|
-
if (character === "\\" || codePoint !== void 0 && (codePoint <= 31 || codePoint === 127)) return true;
|
|
27
|
-
}
|
|
28
|
-
return false;
|
|
29
|
-
};
|
|
30
|
-
const isSafeMediaPath = (value, allowEmpty) => {
|
|
31
|
-
if (value.length === 0) return allowEmpty;
|
|
32
|
-
if (value !== value.trim() || value.startsWith("/") || value.endsWith("/") || hasUnsafeMediaCharacter(value)) return false;
|
|
33
|
-
return value.split("/").every((segment) => segment.length > 0 && segment !== "." && segment !== "..");
|
|
34
|
-
};
|
|
35
|
-
const safeMediaFolder = Schema.makeFilter((value) => isSafeMediaPath(value, true), { expected: "a provider-relative media folder without traversal segments" });
|
|
36
|
-
const safeMediaObjectKey = Schema.makeFilter((value) => isSafeMediaPath(value, false), { expected: "a non-empty provider-relative media object key without traversal segments" });
|
|
37
|
-
const safeMediaName = Schema.makeFilter((value) => value.length > 0 && value.length <= 255 && value === value.trim() && value !== "." && value !== ".." && !value.includes("/") && !hasUnsafeMediaCharacter(value), { expected: "a safe media file name of at most 255 characters" });
|
|
38
|
-
const MediaId = Schema.String.check(Schema.isUUID()).pipe(Schema.brand("MediaId"));
|
|
39
|
-
const MediaFolder = Schema.String.check(Schema.isMaxLength(512), safeMediaFolder).pipe(Schema.brand("MediaFolder"));
|
|
40
|
-
const MediaObjectKey = Schema.String.check(Schema.isMaxLength(1024), safeMediaObjectKey).pipe(Schema.brand("MediaObjectKey"));
|
|
41
|
-
const MediaName = Schema.String.check(safeMediaName).pipe(Schema.brand("MediaName"));
|
|
42
|
-
const MediaCursor = Schema.NonEmptyString.pipe(Schema.brand("MediaCursor"));
|
|
43
|
-
const ImageMimeType = Schema.Literals([
|
|
44
|
-
"image/avif",
|
|
45
|
-
"image/gif",
|
|
46
|
-
"image/jpeg",
|
|
47
|
-
"image/png",
|
|
48
|
-
"image/webp"
|
|
49
|
-
]);
|
|
50
|
-
const MediaStatus = Schema.Literals([
|
|
51
|
-
"uploading",
|
|
52
|
-
"ready",
|
|
53
|
-
"deleting"
|
|
54
|
-
]);
|
|
55
|
-
const MediaByteSize = Schema.Int.check(Schema.isGreaterThan(0));
|
|
56
|
-
const MediaAsset = Schema.Struct({
|
|
57
|
-
kind: Schema.tag("image"),
|
|
58
|
-
id: MediaId,
|
|
59
|
-
objectKey: MediaObjectKey,
|
|
60
|
-
url: Schema.NonEmptyString,
|
|
61
|
-
name: MediaName,
|
|
62
|
-
folder: MediaFolder,
|
|
63
|
-
mimeType: ImageMimeType,
|
|
64
|
-
byteSize: MediaByteSize,
|
|
65
|
-
createdAt: Schema.DateTimeUtcFromString,
|
|
66
|
-
updatedAt: Schema.DateTimeUtcFromString,
|
|
67
|
-
status: MediaStatus
|
|
68
|
-
}).annotate({ identifier: "MediaAsset" });
|
|
69
|
-
const MediaUpload = Schema.Struct({
|
|
70
|
-
name: MediaName,
|
|
71
|
-
folder: Schema.optionalKey(MediaFolder),
|
|
72
|
-
declaredMimeType: Schema.optionalKey(Schema.NonEmptyString),
|
|
73
|
-
declaredByteSize: MediaByteSize
|
|
74
|
-
}).annotate({ identifier: "MediaUpload" });
|
|
75
|
-
const MediaQuery = Schema.Struct({
|
|
76
|
-
cursor: Schema.optionalKey(MediaCursor),
|
|
77
|
-
folder: Schema.optionalKey(MediaFolder),
|
|
78
|
-
search: Schema.optionalKey(Schema.NonEmptyString.check(Schema.isMaxLength(200))),
|
|
79
|
-
limit: Schema.optionalKey(Schema.Int.check(Schema.isBetween({
|
|
80
|
-
minimum: 1,
|
|
81
|
-
maximum: 100
|
|
82
|
-
})))
|
|
83
|
-
}).annotate({ identifier: "MediaQuery" });
|
|
84
|
-
const ReadyMediaAssets = Schema.Array(MediaAsset).check(Schema.makeFilter((assets) => assets.every((asset) => asset.status === "ready"), { expected: "media assets whose lifecycle status is ready" }));
|
|
85
|
-
const MediaPage = Schema.Struct({
|
|
86
|
-
assets: ReadyMediaAssets,
|
|
87
|
-
folders: Schema.Array(MediaFolder),
|
|
88
|
-
nextCursor: Schema.optionalKey(MediaCursor),
|
|
89
|
-
total: nonNegativeInt
|
|
90
|
-
}).annotate({ identifier: "MediaPage" });
|
|
91
|
-
const MediaReference = Schema.Struct({
|
|
92
|
-
documentId: DocumentId,
|
|
93
|
-
mediaId: Schema.optionalKey(MediaId),
|
|
94
|
-
path: PublicPath,
|
|
95
|
-
sourcePath: SourcePath,
|
|
96
|
-
objectKey: MediaObjectKey,
|
|
97
|
-
nodePath: Schema.Array(nonNegativeInt)
|
|
98
|
-
}).annotate({ identifier: "MediaReference" });
|
|
99
|
-
const MediaObjectMismatch = Schema.Struct({
|
|
100
|
-
asset: MediaAsset,
|
|
101
|
-
storedByteSize: MediaByteSize,
|
|
102
|
-
storedMimeType: Schema.optionalKey(ImageMimeType)
|
|
103
|
-
}).annotate({ identifier: "MediaObjectMismatch" });
|
|
104
|
-
const MediaIntegrityReport = Schema.Struct({
|
|
105
|
-
missingAssets: Schema.Array(MediaReference),
|
|
106
|
-
missingObjects: Schema.Array(MediaAsset),
|
|
107
|
-
mismatchedObjects: Schema.Array(MediaObjectMismatch),
|
|
108
|
-
orphanedObjectKeys: Schema.Array(MediaObjectKey),
|
|
109
|
-
unusedAssets: Schema.Array(MediaAsset)
|
|
110
|
-
}).annotate({ identifier: "MediaIntegrityReport" });
|
|
111
|
-
const MediaCleanupReport = Schema.Struct({ removedObjectKeys: Schema.Array(MediaObjectKey) }).annotate({ identifier: "MediaCleanupReport" });
|
|
112
|
-
var MediaNotFound = class extends Schema.TaggedError()("Media.NotFound", { mediaId: MediaId }) {};
|
|
113
|
-
var MediaReferenced = class extends Schema.TaggedError()("Media.Referenced", {
|
|
114
|
-
mediaId: MediaId,
|
|
115
|
-
references: Schema.Array(MediaReference),
|
|
116
|
-
seoScopes: Schema.optionalKey(Schema.Array(Schema.Literals(["working", "published"])))
|
|
117
|
-
}) {};
|
|
118
|
-
var MediaConflict = class extends Schema.TaggedError()("Media.Conflict", { mediaId: MediaId }) {};
|
|
119
|
-
var MediaInvalid = class extends Schema.TaggedError()("Media.Invalid", { message: Schema.NonEmptyString }) {};
|
|
120
|
-
var MediaTooLarge = class extends Schema.TaggedError()("Media.TooLarge", {
|
|
121
|
-
declaredByteSize: MediaByteSize,
|
|
122
|
-
maxUploadBytes: MediaByteSize
|
|
123
|
-
}) {};
|
|
124
15
|
|
|
125
16
|
//#endregion
|
|
126
17
|
//#region ../protocol/src/AccessControl.ts
|
|
@@ -433,6 +324,7 @@ const DocumentIssueCode = Schema.Literals([
|
|
|
433
324
|
"markdown.parse",
|
|
434
325
|
"reference.document",
|
|
435
326
|
"reference.component",
|
|
327
|
+
"reference.media",
|
|
436
328
|
"seo.invalid",
|
|
437
329
|
"schema.option",
|
|
438
330
|
"schema.constraint",
|
|
@@ -444,7 +336,8 @@ const DocumentIssue = Schema.Struct({
|
|
|
444
336
|
code: DocumentIssueCode,
|
|
445
337
|
severity: Schema.Literals(["error", "warning"]),
|
|
446
338
|
message: Schema.NonEmptyString,
|
|
447
|
-
|
|
339
|
+
component: Schema.optionalKey(Schema.NonEmptyString),
|
|
340
|
+
documentId: Schema.optionalKey(DocumentId),
|
|
448
341
|
collection: Schema.optionalKey(CollectionName),
|
|
449
342
|
field: Schema.optionalKey(Schema.NonEmptyString),
|
|
450
343
|
key: Schema.optionalKey(PublicPath),
|
|
@@ -492,16 +385,29 @@ const CmsDocumentAnalysis = Schema.Struct({
|
|
|
492
385
|
summary: Schema.String
|
|
493
386
|
});
|
|
494
387
|
const CompiledDocumentSource = Schema.Struct({
|
|
495
|
-
path: SourcePath,
|
|
496
388
|
mappings: Schema.Array(DocumentSourceMapping),
|
|
497
389
|
publishedAt: Schema.optionalKey(Schema.DateTimeUtcFromString)
|
|
498
390
|
});
|
|
391
|
+
const DocumentIdentity = Schema.Struct({
|
|
392
|
+
documentId: DocumentId,
|
|
393
|
+
collection: CollectionName,
|
|
394
|
+
locale: Schema.optionalKey(Locale)
|
|
395
|
+
}).annotate({ identifier: "DocumentIdentity" });
|
|
396
|
+
const HomeDocumentPlacement = Schema.Struct({ kind: Schema.tag("home") });
|
|
397
|
+
const NestedDocumentPlacement = Schema.Struct({
|
|
398
|
+
kind: Schema.tag("entry"),
|
|
399
|
+
parentDocumentId: DocumentId,
|
|
400
|
+
slug: Slug
|
|
401
|
+
});
|
|
402
|
+
const DocumentPlacement = Schema.Union([HomeDocumentPlacement, NestedDocumentPlacement]).pipe(Schema.toTaggedUnion("kind"));
|
|
499
403
|
const DocumentAlternative = Schema.Struct({
|
|
500
404
|
locale: Locale,
|
|
501
405
|
path: PublicPath
|
|
502
406
|
});
|
|
503
407
|
const CompiledDocument = Schema.Struct({
|
|
504
408
|
id: DocumentId,
|
|
409
|
+
identity: DocumentIdentity,
|
|
410
|
+
placement: DocumentPlacement,
|
|
505
411
|
key: PublicPath,
|
|
506
412
|
path: PublicPath,
|
|
507
413
|
locale: Schema.optionalKey(Locale),
|
|
@@ -519,6 +425,19 @@ const CompiledDocument = Schema.Struct({
|
|
|
519
425
|
engineFingerprint: Schema.NonEmptyString,
|
|
520
426
|
source: CompiledDocumentSource
|
|
521
427
|
}).annotate({ identifier: "CompiledDocument" });
|
|
428
|
+
const DocumentSummaryDocument = Schema.Struct({
|
|
429
|
+
id: DocumentId,
|
|
430
|
+
identity: DocumentIdentity,
|
|
431
|
+
placement: DocumentPlacement,
|
|
432
|
+
key: PublicPath,
|
|
433
|
+
path: PublicPath,
|
|
434
|
+
locale: Schema.optionalKey(Locale),
|
|
435
|
+
collection: CollectionName,
|
|
436
|
+
draft: Schema.Boolean,
|
|
437
|
+
title: Schema.NonEmptyString,
|
|
438
|
+
issues: Schema.Array(DocumentIssue),
|
|
439
|
+
searchText: Schema.String
|
|
440
|
+
}).annotate({ identifier: "DocumentSummaryDocument" });
|
|
522
441
|
const documentAttribution = {
|
|
523
442
|
createdBy: Schema.optionalKey(StudioActor),
|
|
524
443
|
editedBy: Schema.optionalKey(StudioActor),
|
|
@@ -527,7 +446,8 @@ const documentAttribution = {
|
|
|
527
446
|
const DocumentSource = Schema.Struct({
|
|
528
447
|
...documentAttribution,
|
|
529
448
|
documentId: DocumentId,
|
|
530
|
-
|
|
449
|
+
identity: DocumentIdentity,
|
|
450
|
+
placement: DocumentPlacement,
|
|
531
451
|
markdown: Schema.String,
|
|
532
452
|
revisionId: RevisionId,
|
|
533
453
|
version: DocumentVersion,
|
|
@@ -537,17 +457,17 @@ const DocumentSummary = Schema.Struct({
|
|
|
537
457
|
...documentAttribution,
|
|
538
458
|
publishedVersion: Schema.optionalKey(DocumentVersion),
|
|
539
459
|
publishedPath: Schema.optionalKey(PublicPath),
|
|
540
|
-
sourcePath: SourcePath,
|
|
541
460
|
version: DocumentVersion,
|
|
542
|
-
document:
|
|
461
|
+
document: DocumentSummaryDocument
|
|
543
462
|
}).annotate({ identifier: "DocumentSummary" });
|
|
544
463
|
const DeletedDocument = Schema.Struct({
|
|
545
464
|
title: Schema.optionalKey(Schema.String),
|
|
546
465
|
path: Schema.optionalKey(PublicPath),
|
|
547
466
|
trashBatchId: Schema.optionalKey(DocumentVersion),
|
|
548
467
|
documentId: DocumentId,
|
|
468
|
+
identity: DocumentIdentity,
|
|
469
|
+
placement: DocumentPlacement,
|
|
549
470
|
deletedAt: Schema.DateTimeUtcFromString,
|
|
550
|
-
sourcePath: SourcePath,
|
|
551
471
|
version: DocumentVersion
|
|
552
472
|
}).annotate({ identifier: "DeletedDocument" });
|
|
553
473
|
const DocumentBrowseQuery = Schema.Struct({
|
|
@@ -623,17 +543,10 @@ const DocumentSurround = Schema.Struct({
|
|
|
623
543
|
previous: Schema.NullOr(CompiledDocument),
|
|
624
544
|
next: Schema.NullOr(CompiledDocument)
|
|
625
545
|
}).annotate({ identifier: "DocumentSurround" });
|
|
626
|
-
const HomeDocumentLocation = Schema.Struct({ kind: Schema.tag("home") });
|
|
627
|
-
const NestedDocumentLocation = Schema.Struct({
|
|
628
|
-
kind: Schema.tag("entry"),
|
|
629
|
-
parent: Schema.optionalKey(RelativeDocumentPath),
|
|
630
|
-
slug: Slug
|
|
631
|
-
});
|
|
632
|
-
const DocumentLocation = Schema.Union([HomeDocumentLocation, NestedDocumentLocation]).pipe(Schema.toTaggedUnion("kind"));
|
|
633
546
|
const CreateDocumentInput = Schema.Struct({
|
|
634
547
|
collection: CollectionName,
|
|
635
548
|
locale: Schema.optionalKey(Locale),
|
|
636
|
-
|
|
549
|
+
placement: DocumentPlacement,
|
|
637
550
|
title: Schema.NonEmptyString,
|
|
638
551
|
...documentMutationMetadata
|
|
639
552
|
}).annotate({ identifier: "CreateDocumentInput" });
|
|
@@ -646,7 +559,7 @@ const UpdateDocumentInput = Schema.Struct({
|
|
|
646
559
|
const MoveDocumentInput = Schema.Struct({
|
|
647
560
|
documentId: DocumentId,
|
|
648
561
|
expectedVersion: DocumentVersion,
|
|
649
|
-
|
|
562
|
+
placement: DocumentPlacement,
|
|
650
563
|
...documentMutationMetadata
|
|
651
564
|
}).annotate({ identifier: "MoveDocumentInput" });
|
|
652
565
|
const DuplicateDocumentInput = Schema.Struct({
|
|
@@ -701,7 +614,6 @@ const DocumentMutationResult = Schema.Struct({
|
|
|
701
614
|
documentId: DocumentId,
|
|
702
615
|
generation: DocumentGeneration,
|
|
703
616
|
revisionId: RevisionId,
|
|
704
|
-
sourcePath: SourcePath,
|
|
705
617
|
version: DocumentVersion,
|
|
706
618
|
entry: Schema.optionalKey(DocumentSummary)
|
|
707
619
|
}).annotate({ identifier: "DocumentMutationResult" });
|
|
@@ -712,5 +624,5 @@ const DocumentValidationResult = Schema.Struct({
|
|
|
712
624
|
}).annotate({ identifier: "DocumentValidationResult" });
|
|
713
625
|
|
|
714
626
|
//#endregion
|
|
715
|
-
export {
|
|
716
|
-
//# sourceMappingURL=models-
|
|
627
|
+
export { MEDIA_ACTIONS as $, RestoreDocumentInput as A, SeoConfiguration as B, MoveDocumentInput as C, PublishedDocumentQuery as D, PublishedDocumentPage as E, GlobalSeoSettings as F, SeoSnapshot as G, SeoMediaUnavailable as H, PublishSeoInput as I, SeoVersionConflict as J, SeoState as K, SaveSeoInput as L, UnpublishDocumentInput as M, UpdateDocumentInput as N, PublishedDocumentSurroundQuery as O, DocumentSeo as P, DOCUMENT_ACTIONS as Q, SeoCanonicalOrigin as R, MarkdownNode as S, PublishedDocumentLookup as T, SeoMutationResult as U, SeoConfirmationRequired as V, SeoRevision as W, AccessDenied as X, SitemapEntry as Y, AuthenticationRequired as Z, DocumentSourceMapping as _, DOCUMENT_REVISION_ACTIONS as a, Locale as at, DocumentValidationResult as b, DocumentIdentity as c, DocumentNavigationItem as d, Role as et, DocumentNavigationQuery as f, DocumentSource as g, DocumentRevisionAction as h, CreateDocumentInput as i, CollectionName as it, UndeleteDocumentInput as j, RemoveDocumentInput as k, DocumentIssue as l, DocumentQueryScalar as m, CmsMarkdownDocument as n, StudioEntryDenied as nt, DeletedDocument as o, RoutePattern as ot, DocumentPlacement as p, SeoUrl as q, CompiledDocument as r, StudioRequestContext as rt, DocumentBrowseQuery as s, RequestId as st, CmsDocumentAnalysis as t, StudioActor as tt, DocumentMutationResult as u, DocumentSummary as v, PublishDocumentInput as w, DuplicateDocumentInput as x, DocumentSurround as y, SeoCapabilities as z };
|
|
628
|
+
//# sourceMappingURL=models-VmGmG19-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models-VmGmG19-.js","names":[],"sources":["../../../../protocol/src/Identity.ts","../../../../protocol/src/internal/configuration/scalars.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\nexport const RoutePattern = Schema.String.check(Schema.isPattern(publicPathPattern)).pipe(Schema.brand('RoutePattern'))\n\nexport type RoutePattern = typeof RoutePattern.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","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 'document.transfer',\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 { DocumentGeneration, DocumentVersion, DocumentId, PublicPath, RevisionId, Slug } 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 'reference.media',\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 component: Schema.optionalKey(Schema.NonEmptyString),\n documentId: Schema.optionalKey(DocumentId),\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 mappings: Schema.Array(DocumentSourceMapping),\n publishedAt: Schema.optionalKey(Schema.DateTimeUtcFromString),\n})\n\nexport interface CompiledDocumentSource extends Schema.Schema.Type<typeof CompiledDocumentSource> {}\n\nexport const DocumentIdentity = Schema.Struct({\n documentId: DocumentId,\n collection: CollectionName,\n locale: Schema.optionalKey(Locale),\n}).annotate({ identifier: 'DocumentIdentity' })\n\nexport interface DocumentIdentity extends Schema.Schema.Type<typeof DocumentIdentity> {}\n\nexport const HomeDocumentPlacement = Schema.Struct({\n kind: Schema.tag('home'),\n})\n\nexport interface HomeDocumentPlacement extends Schema.Schema.Type<typeof HomeDocumentPlacement> {}\n\nexport const NestedDocumentPlacement = Schema.Struct({\n kind: Schema.tag('entry'),\n parentDocumentId: DocumentId,\n slug: Slug,\n})\n\nexport interface NestedDocumentPlacement extends Schema.Schema.Type<typeof NestedDocumentPlacement> {}\n\nexport const DocumentPlacement = Schema.Union([HomeDocumentPlacement, NestedDocumentPlacement]).pipe(\n Schema.toTaggedUnion('kind'),\n)\n\nexport type DocumentPlacement = typeof DocumentPlacement.Type\n\nexport const DocumentAlternative = Schema.Struct({\n locale: Locale,\n path: PublicPath,\n})\n\nexport interface DocumentAlternative extends Schema.Schema.Type<typeof DocumentAlternative> {}\n\nexport const CompiledDocument = Schema.Struct({\n id: DocumentId,\n identity: DocumentIdentity,\n placement: DocumentPlacement,\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 alternatives: Schema.optionalKey(Schema.Array(DocumentAlternative)),\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\nexport const DocumentSummaryDocument = Schema.Struct({\n id: DocumentId,\n identity: DocumentIdentity,\n placement: DocumentPlacement,\n key: PublicPath,\n path: PublicPath,\n locale: Schema.optionalKey(Locale),\n collection: CollectionName,\n draft: Schema.Boolean,\n title: Schema.NonEmptyString,\n issues: Schema.Array(DocumentIssue),\n searchText: Schema.String,\n}).annotate({ identifier: 'DocumentSummaryDocument' })\n\nexport interface DocumentSummaryDocument extends Schema.Schema.Type<typeof DocumentSummaryDocument> {}\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 identity: DocumentIdentity,\n placement: DocumentPlacement,\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 DocumentSummary = Schema.Struct({\n ...documentAttribution,\n publishedVersion: Schema.optionalKey(DocumentVersion),\n publishedPath: Schema.optionalKey(PublicPath),\n version: DocumentVersion,\n document: DocumentSummaryDocument,\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 identity: DocumentIdentity,\n placement: DocumentPlacement,\n deletedAt: Schema.DateTimeUtcFromString,\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 CreateDocumentInput = Schema.Struct({\n collection: CollectionName,\n locale: Schema.optionalKey(Locale),\n placement: DocumentPlacement,\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 placement: DocumentPlacement,\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 /** Copies into another independent locale variant when supplied. */\n locale: Schema.optionalKey(Locale),\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 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,MAAa,eAAe,OAAO,OAAO,MAAM,OAAO,UAAU,iBAAiB,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM,cAAc,CAAC;AAItH,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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;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,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,6 +1,7 @@
|
|
|
1
1
|
import { blockComponentsKey, formComponentsKey, formPreviewKey } from "./blocks.js";
|
|
2
2
|
import { prepareFormDocument } from "../forms/document.js";
|
|
3
3
|
import DocumentScope_default from "./DocumentScope.js";
|
|
4
|
+
import CmsStudioPreviewMarker_default from "../preview/CmsStudioPreviewMarker.js";
|
|
4
5
|
import { Predicate } from "effect";
|
|
5
6
|
import { defineComponent, h, inject, shallowRef } from "vue";
|
|
6
7
|
import { MarkdownDocument } from "@comark/vue";
|
|
@@ -25,7 +26,10 @@ var DocumentRenderer_default = defineComponent({
|
|
|
25
26
|
});
|
|
26
27
|
function renderDocument(value, components = {}, forms = [], preview = false) {
|
|
27
28
|
return h(MarkdownDocument, {
|
|
28
|
-
components
|
|
29
|
+
components: preview ? {
|
|
30
|
+
...components,
|
|
31
|
+
CmsStudioPreviewMarker: CmsStudioPreviewMarker_default
|
|
32
|
+
} : components,
|
|
29
33
|
documentKey: value.id,
|
|
30
34
|
value: toComarkDocument(prepareFormDocument(value, forms, preview).body)
|
|
31
35
|
});
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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 CmsStudioPreviewMarker from '../preview/CmsStudioPreviewMarker'\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: preview ? { ...components, CmsStudioPreviewMarker } : 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":";;;;;;;;;AAYA,+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,YAAY,UAAU;GAAE,GAAG;GAAY;EAAuB,IAAI;EAClE,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,8 +1,8 @@
|
|
|
1
1
|
import { ownsCmsLocale } from "../../internal/i18n.js";
|
|
2
|
-
import { n as readPreviewLocation, t as previewRedirect } from "../../location-
|
|
2
|
+
import { n as readPreviewLocation, t as previewRedirect } from "../../location-CMNGO3lU.js";
|
|
3
3
|
import { usePreviewDelivery } from "./context.js";
|
|
4
|
-
import { localeFromPath } from "../i18n/translator.js";
|
|
5
4
|
import { installCmsDocumentSeoAdapters } from "./useCmsDocumentSeo.js";
|
|
5
|
+
import { localeFromPath } from "../i18n/translator.js";
|
|
6
6
|
import { computed, watch } from "vue";
|
|
7
7
|
import { addRouteMiddleware, defineNuxtPlugin, useHead, useRequestURL, useResponseHeader, useRoute, useState } from "nuxt/app";
|
|
8
8
|
import configuration from "#cms/i18n";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as DeliveryDocument } from "../../types-
|
|
1
|
+
import { t as DeliveryDocument } from "../../types-DZ0IV-Ow.js";
|
|
2
2
|
import { InjectionKey } from "vue";
|
|
3
3
|
//#region src/runtime/delivery/preview.d.ts
|
|
4
4
|
export type PreviewDocumentRole = 'embedded' | 'primary' | 'related' | 'summary';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DeliveryJson, c as DeliveryMarkdownNode, i as DeliveryDocumentQuerySort, n as DeliveryDocumentPage, o as DeliveryJsonObject, r as DeliveryDocumentQuery, s as DeliveryMarkdownDocument, t as DeliveryDocument } from "../../types-
|
|
1
|
+
import { a as DeliveryJson, c as DeliveryMarkdownNode, i as DeliveryDocumentQuerySort, n as DeliveryDocumentPage, o as DeliveryJsonObject, r as DeliveryDocumentQuery, s as DeliveryMarkdownDocument, t as DeliveryDocument } from "../../types-DZ0IV-Ow.js";
|
|
2
2
|
export { DeliveryDocument, DeliveryDocumentPage, DeliveryDocumentQuery, DeliveryDocumentQuerySort, DeliveryJson, DeliveryJsonObject, DeliveryMarkdownDocument, DeliveryMarkdownNode };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as SiteIdentity } from "../../Seo-402YumpT.js";
|
|
2
|
-
import { t as DeliveryDocument } from "../../types-
|
|
2
|
+
import { t as DeliveryDocument } from "../../types-DZ0IV-Ow.js";
|
|
3
3
|
import { ComputedRef, MaybeRefOrGetter } from "vue";
|
|
4
4
|
//#region src/runtime/delivery/useCmsDocumentSeo.d.ts
|
|
5
5
|
type ReactiveMetadataValue = () => string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as DocumentId } from "../../scalars-
|
|
2
|
-
import { t as documentForms } from "../../Forms-
|
|
1
|
+
import { r as DocumentId } from "../../scalars-CVZqT3L0.js";
|
|
2
|
+
import { t as documentForms } from "../../Forms-CX-hwmJF.js";
|
|
3
3
|
import { Predicate, Result, Schema } from "effect";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/forms/document.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as CMS_FORM_SUBMIT_PATH } from "../../HttpPaths-c9nLZ9H2.js";
|
|
2
|
-
import { o as FormResult } from "../../Forms-
|
|
3
|
-
import { i as validateFormValues } from "../../Forms-
|
|
2
|
+
import { o as FormResult } from "../../Forms-CfNPTiCr.js";
|
|
3
|
+
import { i as validateFormValues } from "../../Forms-CX-hwmJF.js";
|
|
4
4
|
import { Result, Schema } from "effect";
|
|
5
5
|
import { computed, getCurrentInstance, getCurrentScope, onScopeDispose, readonly, ref, shallowRef, toValue, useId, watch } from "vue";
|
|
6
6
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as scopedDatabaseUrl, r as toS3MediaObjectStoreOptions, t as installCms } from "../installation-
|
|
1
|
+
import { n as scopedDatabaseUrl, r as toS3MediaObjectStoreOptions, t as installCms } from "../installation-BoG8E3nJ.js";
|
|
2
2
|
|
|
3
3
|
export { installCms, scopedDatabaseUrl, toS3MediaObjectStoreOptions };
|
package/src/runtime/plugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveCmsInstallation } from "../internal/configuration.js";
|
|
2
|
-
import { t as installCms } from "../installation-
|
|
2
|
+
import { t as installCms } from "../installation-BoG8E3nJ.js";
|
|
3
3
|
import { diagnosticFromCause, renderDiagnostic } from "../internal/diagnostics.js";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { defineNitroPlugin, useNitroApp, useRuntimeConfig } from "nitropack/runtime";
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { previewMarkerComment } from "./protocol.js";
|
|
2
|
+
import { createCommentVNode, defineComponent } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/runtime/preview/CmsStudioPreviewMarker.ts
|
|
5
5
|
var CmsStudioPreviewMarker_default = defineComponent({
|
|
6
6
|
inheritAttrs: false,
|
|
7
7
|
name: "CmsStudioPreviewMarker",
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
props: {
|
|
9
|
+
edge: {
|
|
10
|
+
required: true,
|
|
11
|
+
type: String
|
|
12
|
+
},
|
|
13
|
+
kind: {
|
|
14
|
+
required: true,
|
|
15
|
+
type: String
|
|
16
|
+
},
|
|
17
|
+
node: {
|
|
18
|
+
required: true,
|
|
19
|
+
type: String
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(props) {
|
|
23
|
+
return () => createCommentVNode(previewMarkerComment(props.node, props.kind, props.edge));
|
|
10
24
|
}
|
|
11
25
|
});
|
|
12
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsStudioPreviewMarker.js","names":[],"sources":["../../../../../src/runtime/preview/CmsStudioPreviewMarker.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"CmsStudioPreviewMarker.js","names":[],"sources":["../../../../../src/runtime/preview/CmsStudioPreviewMarker.ts"],"sourcesContent":["import { createCommentVNode, defineComponent } from 'vue'\nimport type { PropType } from 'vue'\nimport { previewMarkerComment } from './protocol'\nimport type { CmsPreviewMarkerEdge, CmsPreviewTargetKind } from './protocol'\n\nexport default defineComponent({\n inheritAttrs: false,\n name: 'CmsStudioPreviewMarker',\n props: {\n // SAFETY: Vue validates this prop as a string; projection is the sole caller and emits only marker edges.\n edge: { required: true, type: String as PropType<CmsPreviewMarkerEdge> },\n // SAFETY: Vue validates this prop as a string; projection is the sole caller and emits only target kinds.\n kind: { required: true, type: String as PropType<CmsPreviewTargetKind> },\n node: { required: true, type: String },\n },\n setup(props) {\n return () => createCommentVNode(previewMarkerComment(props.node, props.kind, props.edge))\n },\n})\n"],"mappings":";;;;AAKA,qCAAe,gBAAgB;CAC7B,cAAc;CACd,MAAM;CACN,OAAO;EAEL,MAAM;GAAE,UAAU;GAAM,MAAM;EAAyC;EAEvE,MAAM;GAAE,UAAU;GAAM,MAAM;EAAyC;EACvE,MAAM;GAAE,UAAU;GAAM,MAAM;EAAO;CACvC;CACA,MAAM,OAAO;EACX,aAAa,mBAAmB,qBAAqB,MAAM,MAAM,MAAM,MAAM,MAAM,IAAI,CAAC;CAC1F;AACF,CAAC"}
|