@voltro/cms 0.86.0 → 0.88.0

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 (243) hide show
  1. package/CHANGELOG.md +5484 -0
  2. package/README.md +138 -0
  3. package/THIRD-PARTY-NOTICES.md +1511 -276
  4. package/dist/ContentForm.js +1 -2
  5. package/dist/RichDocumentEditor.js +1 -2
  6. package/dist/RichDocumentView.js +82 -38
  7. package/dist/RichTextSurface.js +1 -2
  8. package/dist/aiCandidates.js +4 -5
  9. package/dist/aiOperations.js +1 -2
  10. package/dist/applicationBuildSnapshotService.js +100 -0
  11. package/dist/assetRenditions.js +101 -0
  12. package/dist/assetRevision.js +45 -0
  13. package/dist/assetUseRights.js +71 -0
  14. package/dist/audiences.js +1 -2
  15. package/dist/availability.js +20 -18
  16. package/dist/blueprint.js +76 -77
  17. package/dist/build.d.ts +3063 -0
  18. package/dist/build.js +37 -0
  19. package/dist/buildApplicationAdmission.js +15 -0
  20. package/dist/buildApplicationCatalog.js +135 -0
  21. package/dist/buildApplicationCatalogTable.js +23 -0
  22. package/dist/buildApplicationRest.js +98 -0
  23. package/dist/buildApplicationUpload.js +110 -0
  24. package/dist/buildSnapshot.js +400 -0
  25. package/dist/buildSnapshotApplicationPin.js +31 -0
  26. package/dist/buildSnapshotRest.js +209 -0
  27. package/dist/buildSnapshotService.js +264 -0
  28. package/dist/buildSnapshotTables.js +24 -0
  29. package/dist/bulk.js +72 -72
  30. package/dist/cacheIdentity.js +1 -2
  31. package/dist/changes.js +280 -64
  32. package/dist/cmsContext.js +1 -2
  33. package/dist/collections.js +1 -2
  34. package/dist/consent.js +6 -7
  35. package/dist/contentLocations.js +52 -0
  36. package/dist/contentProjection.js +82 -0
  37. package/dist/contentRouteIdentity.js +12 -0
  38. package/dist/contentRouteMaterializer.js +96 -0
  39. package/dist/contentRouteTypes.js +38 -0
  40. package/dist/contentSeo.js +188 -0
  41. package/dist/contentTreePath.js +59 -0
  42. package/dist/contentType.js +121 -105
  43. package/dist/contentValues.js +17 -0
  44. package/dist/contentfulImport.js +1 -2
  45. package/dist/copies.js +4 -5
  46. package/dist/cutover.js +1 -2
  47. package/dist/deliveryChecks.js +1 -2
  48. package/dist/domainHost.js +6 -0
  49. package/dist/domains.js +82 -89
  50. package/dist/draftTexts.js +38 -39
  51. package/dist/duplicates.js +24 -25
  52. package/dist/edgePurge.js +1 -2
  53. package/dist/editHistory.js +1 -2
  54. package/dist/effectForm.js +1 -2
  55. package/dist/environmentAliases.js +137 -0
  56. package/dist/environments.js +108 -71
  57. package/dist/errors.js +55 -16
  58. package/dist/experiments.js +8 -9
  59. package/dist/exposure.js +1 -2
  60. package/dist/extensionManifest.js +2 -3
  61. package/dist/extensions.js +1 -2
  62. package/dist/fieldSchema.js +1 -2
  63. package/dist/formStrings.js +1 -2
  64. package/dist/frontendBindings.js +98 -0
  65. package/dist/frontendMedia.js +17 -0
  66. package/dist/glossary.js +1 -2
  67. package/dist/history.js +1 -2
  68. package/dist/htmlImport.js +1 -2
  69. package/dist/index.d.ts +760 -47
  70. package/dist/index.js +89 -73
  71. package/dist/initializePublicRoutes.js +27 -0
  72. package/dist/liveContentRouteView.js +75 -0
  73. package/dist/media.js +1 -2
  74. package/dist/metrics.js +1 -2
  75. package/dist/migration.js +1 -2
  76. package/dist/migrationStages.js +1 -2
  77. package/dist/nativeOutputDeploymentService.js +204 -0
  78. package/dist/outputActivation.js +233 -0
  79. package/dist/outputActivationOrigin.js +50 -0
  80. package/dist/outputActivationStore.js +410 -0
  81. package/dist/outputActivationTables.js +10 -0
  82. package/dist/outputActivationTarget.js +80 -0
  83. package/dist/outputActivationTargetTable.js +24 -0
  84. package/dist/outputDeployment.js +173 -0
  85. package/dist/outputDeploymentRest.js +167 -0
  86. package/dist/outputDeploymentService.js +240 -0
  87. package/dist/outputRouteGraph.js +176 -0
  88. package/dist/outputSafetyArtifact.js +146 -0
  89. package/dist/outputTargetRest.js +61 -0
  90. package/dist/pathSegmentEncoding.js +3 -0
  91. package/dist/presenceAnchors.js +1 -2
  92. package/dist/preview.js +1 -2
  93. package/dist/privateCmsTransport.js +75 -0
  94. package/dist/privateNativeRouteReservation.js +9 -0
  95. package/dist/promotion.js +69 -61
  96. package/dist/publicBuild.js +89 -0
  97. package/dist/publicBuildRest.js +97 -0
  98. package/dist/publicBuildService.js +62 -0
  99. package/dist/publicOutputHttp.js +128 -0
  100. package/dist/publicOutputService.js +286 -0
  101. package/dist/publicPresentation.js +16 -0
  102. package/dist/publicRouteDispositionAdmission.js +37 -0
  103. package/dist/publicRouteHistoryStore.js +11 -0
  104. package/dist/publicRouteHistoryView.js +33 -0
  105. package/dist/publicRouteIntegrity.js +4 -0
  106. package/dist/publicRouteMutation.js +5 -0
  107. package/dist/publicRouteNamespace.js +133 -0
  108. package/dist/publicRoutePublication.js +35 -0
  109. package/dist/publicRouteRegistry.js +16 -0
  110. package/dist/publicRouteRegistryBinding.js +193 -0
  111. package/dist/publicRouteRegistryDefinition.js +75 -0
  112. package/dist/publicRouteSitePublication.js +39 -0
  113. package/dist/publicRouteTables.js +12 -0
  114. package/dist/publicRouteUrl.js +17 -0
  115. package/dist/publicationSeo.js +51 -0
  116. package/dist/publicationState.js +295 -0
  117. package/dist/quality.js +9 -10
  118. package/dist/reconfigurePublicRoutes.js +40 -0
  119. package/dist/recurrence.js +1 -2
  120. package/dist/redirects.js +105 -75
  121. package/dist/referenceGraph.js +16 -16
  122. package/dist/references.js +3 -4
  123. package/dist/release.js +178 -143
  124. package/dist/renderReadAuthority.js +42 -0
  125. package/dist/renderReadGrant.js +136 -0
  126. package/dist/rest.js +1 -2
  127. package/dist/review.js +29 -30
  128. package/dist/richDocument.js +56 -27
  129. package/dist/richInline.js +1 -2
  130. package/dist/routeDispositionGraph.js +43 -0
  131. package/dist/routeDispositionRest.js +50 -0
  132. package/dist/routeDispositionService.js +72 -0
  133. package/dist/routeDispositionStore.js +288 -0
  134. package/dist/routeDispositionTables.js +4 -0
  135. package/dist/routeDispositions.js +90 -0
  136. package/dist/routeHistoryStorage.js +319 -0
  137. package/dist/routeHistoryStore.js +11 -0
  138. package/dist/schedule.js +37 -38
  139. package/dist/search.js +1 -2
  140. package/dist/selectionIntent.js +1 -2
  141. package/dist/seo.js +2 -3
  142. package/dist/series.js +12 -13
  143. package/dist/share.js +14 -15
  144. package/dist/siteBindings.js +158 -0
  145. package/dist/siteBuildCandidate.js +103 -0
  146. package/dist/siteDelivery.js +114 -0
  147. package/dist/siteState.js +46 -0
  148. package/dist/snapshotAddressGraph.js +54 -0
  149. package/dist/snapshotAddressRead.js +72 -0
  150. package/dist/snapshotAppConsumer.js +70 -0
  151. package/dist/snapshotAppExecution.js +101 -0
  152. package/dist/snapshotApplication.js +74 -0
  153. package/dist/snapshotApprovedRouteDispositions.js +43 -0
  154. package/dist/snapshotAssetAssembly.js +69 -0
  155. package/dist/snapshotAssetAssemblyRest.js +49 -0
  156. package/dist/snapshotBindingRead.js +60 -0
  157. package/dist/snapshotCodeSeo.js +28 -0
  158. package/dist/snapshotComponent.js +33 -0
  159. package/dist/snapshotComponentSource.js +23 -0
  160. package/dist/snapshotConsumer.js +86 -0
  161. package/dist/snapshotContentIdentity.js +9 -0
  162. package/dist/snapshotDefinitions.js +263 -0
  163. package/dist/snapshotDocumentAssembly.js +192 -0
  164. package/dist/snapshotDocumentAssemblyRest.js +83 -0
  165. package/dist/snapshotDocumentProjection.js +201 -0
  166. package/dist/snapshotDocumentTransfer.js +34 -0
  167. package/dist/snapshotDocumentTransferRest.js +79 -0
  168. package/dist/snapshotDomains.js +55 -0
  169. package/dist/snapshotEnvironment.js +30 -0
  170. package/dist/snapshotFieldPlan.js +84 -0
  171. package/dist/snapshotFrontend.js +102 -0
  172. package/dist/snapshotLink.js +7 -0
  173. package/dist/snapshotMedia.js +110 -0
  174. package/dist/snapshotMediaCapture.js +245 -0
  175. package/dist/snapshotMediaFields.js +224 -0
  176. package/dist/snapshotMediaRead.js +184 -0
  177. package/dist/snapshotMediaReader.js +12 -0
  178. package/dist/snapshotObservation.js +15 -0
  179. package/dist/snapshotObservedRouteHistory.js +33 -0
  180. package/dist/snapshotOutputTransfer.js +77 -0
  181. package/dist/snapshotPageLoader.js +6 -0
  182. package/dist/snapshotPageSeo.js +58 -0
  183. package/dist/snapshotPathLocale.js +14 -0
  184. package/dist/snapshotPresentation.js +85 -0
  185. package/dist/snapshotPresentationPolicy.js +11 -0
  186. package/dist/snapshotProjection.js +118 -0
  187. package/dist/snapshotPublicAccess.js +160 -0
  188. package/dist/snapshotPublicRouteHistory.js +39 -0
  189. package/dist/snapshotReadAdmission.js +37 -0
  190. package/dist/snapshotRedirectOutput.js +150 -0
  191. package/dist/snapshotRedirectTargets.js +23 -0
  192. package/dist/snapshotRedirects.js +131 -0
  193. package/dist/snapshotReference.js +7 -0
  194. package/dist/snapshotReferenceAddress.js +9 -0
  195. package/dist/snapshotReferenceGraph.js +78 -0
  196. package/dist/snapshotReferenceRead.js +64 -0
  197. package/dist/snapshotRelease.js +98 -0
  198. package/dist/snapshotRender.js +360 -0
  199. package/dist/snapshotRenderDependencies.js +177 -0
  200. package/dist/snapshotRenditions.js +87 -0
  201. package/dist/snapshotRichDocument.js +61 -0
  202. package/dist/snapshotRoleTransfer.js +105 -0
  203. package/dist/snapshotRoleTransferRest.js +98 -0
  204. package/dist/snapshotRouteAdmission.js +70 -0
  205. package/dist/snapshotRouteDispatch.js +110 -0
  206. package/dist/snapshotRouteDispositionPlan.js +72 -0
  207. package/dist/snapshotRouteRead.js +42 -0
  208. package/dist/snapshotRoutes.js +78 -0
  209. package/dist/snapshotRouting.js +112 -0
  210. package/dist/snapshotSeo.js +178 -0
  211. package/dist/snapshotSeoControls.js +100 -0
  212. package/dist/snapshotSeoDocumentInventory.js +114 -0
  213. package/dist/snapshotSeoDocuments.js +128 -0
  214. package/dist/snapshotSeoMerge.js +84 -0
  215. package/dist/snapshotSeoMetadata.js +136 -0
  216. package/dist/snapshotSeoOutput.js +172 -0
  217. package/dist/snapshotSeoPathSets.js +104 -0
  218. package/dist/snapshotSeoRead.js +87 -0
  219. package/dist/snapshotSite.js +127 -0
  220. package/dist/snapshotSitemapFiles.js +35 -0
  221. package/dist/snapshotTreeDependencies.js +57 -0
  222. package/dist/snapshotTreeLoader.js +9 -0
  223. package/dist/snapshotTreeRead.js +157 -0
  224. package/dist/staticPathSet.js +176 -0
  225. package/dist/staticPathSetRest.js +128 -0
  226. package/dist/staticPathSetService.js +248 -0
  227. package/dist/staticPathSetStore.js +337 -0
  228. package/dist/stewardship.js +2 -3
  229. package/dist/taxonomy.js +1 -2
  230. package/dist/team.js +1 -2
  231. package/dist/templates.js +2 -3
  232. package/dist/trackChanges.js +1 -2
  233. package/dist/translation.js +1 -2
  234. package/dist/tree.js +10 -11
  235. package/dist/usage.js +1 -2
  236. package/dist/validation.js +54 -55
  237. package/dist/visualEditing.js +1 -2
  238. package/dist/web.d.ts +709 -7
  239. package/dist/web.js +50 -33
  240. package/dist/workflow.js +9 -10
  241. package/dist/write.js +251 -227
  242. package/dist/xliff.js +1 -2
  243. package/package.json +21 -7
package/dist/errors.js CHANGED
@@ -1,13 +1,21 @@
1
1
  import { Schema as e } from "effect";
2
- //#region src/errors.ts
3
- var t = e.Struct({
2
+ // src/errors.ts
3
+ var t = class extends e.TaggedError()("EnvironmentAliasUnavailable", { reason: e.Literals([
4
+ "scope",
5
+ "name",
6
+ "target",
7
+ "missing",
8
+ "conflict",
9
+ "revision",
10
+ "state"
11
+ ]) }) {}, n = e.Struct({
4
12
  field: e.String,
5
13
  rule: e.String,
6
14
  message: e.String
7
- }), n = class extends e.TaggedError()("ContentValidationFailed", {
15
+ }), r = class extends e.TaggedError()("ContentValidationFailed", {
8
16
  contentType: e.String,
9
- violations: e.Array(t)
10
- }) {}, r = class extends e.TaggedError()("ContentNotFound", {
17
+ violations: e.Array(n)
18
+ }) {}, i = class extends e.TaggedError()("ContentNotFound", {
11
19
  contentType: e.String,
12
20
  id: e.String,
13
21
  stage: e.Literals([
@@ -16,25 +24,25 @@ var t = e.Struct({
16
24
  "revision",
17
25
  "share"
18
26
  ])
19
- }) {}, i = class extends e.TaggedError()("ContentGone", {
27
+ }) {}, a = class extends e.TaggedError()("ContentGone", {
20
28
  contentType: e.String,
21
29
  path: e.String
22
- }) {}, a = class extends e.TaggedError()("ContentIdConflict", {
30
+ }) {}, o = class extends e.TaggedError()("ContentIdConflict", {
23
31
  contentType: e.String,
24
32
  id: e.String
25
- }) {}, o = class extends e.TaggedError()("RevisionMismatch", {
33
+ }) {}, s = class extends e.TaggedError()("RevisionMismatch", {
26
34
  contentType: e.String,
27
35
  id: e.String,
28
36
  expected: e.String,
29
37
  actual: e.String
30
- }) {}, s = class extends e.TaggedError()("ReleaseNotEditable", {
38
+ }) {}, c = class extends e.TaggedError()("ReleaseNotEditable", {
31
39
  id: e.String,
32
40
  status: e.String
33
- }) {}, c = class extends e.TaggedError()("PreviewShareRejected", { reason: e.Literals(["expiryInPast", "expiryTooFar"]) }) {}, l = class extends e.TaggedError()("ReviewRequired", {
41
+ }) {}, l = class extends e.TaggedError()("PreviewShareRejected", { reason: e.Literals(["expiryInPast", "expiryTooFar"]) }) {}, u = class extends e.TaggedError()("ReviewRequired", {
34
42
  contentType: e.String,
35
43
  id: e.String,
36
44
  revisionId: e.String
37
- }) {}, u = class extends e.TaggedError()("ReviewStepRefused", {
45
+ }) {}, d = class extends e.TaggedError()("ReviewStepRefused", {
38
46
  contentType: e.String,
39
47
  id: e.String,
40
48
  reason: e.Literals([
@@ -42,7 +50,7 @@ var t = e.Struct({
42
50
  "selfApproval",
43
51
  "ambiguousOrder"
44
52
  ])
45
- }) {}, d = class extends e.TaggedError()("ReferenceUnavailable", {
53
+ }) {}, f = class extends e.TaggedError()("ReferenceUnavailable", {
46
54
  contentType: e.String,
47
55
  id: e.String,
48
56
  targets: e.Array(e.Struct({
@@ -58,10 +66,41 @@ var t = e.Struct({
58
66
  "purpose"
59
67
  ])
60
68
  }))
61
- }) {}, f = class extends e.TaggedError()("QuotaExceeded", {
69
+ }) {}, p = class extends e.TaggedError()("QuotaExceeded", {
62
70
  quota: e.String,
63
71
  limit: e.Number,
64
72
  used: e.Number
65
- }) {};
66
- //#endregion
67
- export { i as ContentGone, a as ContentIdConflict, r as ContentNotFound, n as ContentValidationFailed, c as PreviewShareRejected, f as QuotaExceeded, d as ReferenceUnavailable, s as ReleaseNotEditable, l as ReviewRequired, u as ReviewStepRefused, o as RevisionMismatch };
73
+ }) {}, m = class extends e.TaggedError()("ChangeFeedUnavailable", { reason: e.Literals([
74
+ "scope",
75
+ "cursor",
76
+ "migration",
77
+ "exhausted"
78
+ ]) }) {}, h = class extends e.TaggedError()("SiteStateUnavailable", { reason: e.Literals(["scope", "state"]) }) {}, g = class extends e.TaggedError()("SiteBindingUnavailable", { reason: e.Literals([
79
+ "scope",
80
+ "name",
81
+ "target",
82
+ "missing",
83
+ "conflict",
84
+ "revision",
85
+ "state"
86
+ ]) }) {}, _ = class extends e.TaggedError()("SiteDeliveryUnavailable", { reason: e.Literals([
87
+ "definition",
88
+ "environment",
89
+ "locale",
90
+ "fallback",
91
+ "prefix",
92
+ "binding"
93
+ ]) }) {}, v = class extends e.TaggedError()("ContentLocationUnavailable", { reason: e.Literals([
94
+ "definition",
95
+ "field",
96
+ "tree",
97
+ "path",
98
+ "bounds"
99
+ ]) }) {}, y = class extends e.TaggedError()("ContentSeoUnavailable", { reason: e.Literals([
100
+ "definition",
101
+ "field",
102
+ "defaults",
103
+ "values",
104
+ "scope"
105
+ ]) }) {};
106
+ export { m as ChangeFeedUnavailable, a as ContentGone, o as ContentIdConflict, v as ContentLocationUnavailable, i as ContentNotFound, y as ContentSeoUnavailable, r as ContentValidationFailed, t as EnvironmentAliasUnavailable, l as PreviewShareRejected, p as QuotaExceeded, f as ReferenceUnavailable, c as ReleaseNotEditable, u as ReviewRequired, d as ReviewStepRefused, s as RevisionMismatch, g as SiteBindingUnavailable, _ as SiteDeliveryUnavailable, h as SiteStateUnavailable };
@@ -1,10 +1,10 @@
1
- import { asTyped as e } from "./effectForm.js";
2
- import { ContentIdConflict as t, ContentNotFound as n, ContentValidationFailed as r, ReleaseNotEditable as i, RevisionMismatch as a } from "./errors.js";
1
+ import { ContentIdConflict as e, ContentNotFound as t, ContentValidationFailed as n, ReleaseNotEditable as r, RevisionMismatch as i } from "./errors.js";
2
+ import { asTyped as a } from "./effectForm.js";
3
3
  import { saveDraft as o } from "./write.js";
4
4
  import { CMS_RELEASE_ITEMS_TABLE as s, addToRelease as c, createRelease as l, releaseStatusOf as u } from "./release.js";
5
5
  import { and as d, eq as f, id as p, integer as m, json as h, table as g, text as _, timestamp as v } from "@voltro/database";
6
6
  import { tenant as y } from "@voltro/plugin-multitenancy/mixin";
7
- //#region src/experiments.ts
7
+ // src/experiments.ts
8
8
  var b = "cms_experiments", x = "cms_experiment_events", S = g(b, {
9
9
  id: p({ prefix: "cexp" }),
10
10
  site: _().maxLength(64),
@@ -518,11 +518,10 @@ var b = "cms_experiments", x = "cms_experiment_events", S = g(b, {
518
518
  adopted: i
519
519
  };
520
520
  }, Y = [
521
- r,
522
- t,
523
521
  n,
524
- a,
525
- i
526
- ], X = (...t) => e(() => V(...t)), Z = (...t) => e(() => K(...t)), Q = (...t) => e(() => H(...t)), $ = (...t) => e(() => U(...t)), ee = (...t) => e(() => B(...t)), te = (...t) => e(() => P(...t)), ne = (...t) => e(() => z(...t)), re = (...t) => e(() => q(...t), ...Y), ie = (...t) => e(() => L(...t)), ae = (...t) => e(() => J(...t));
527
- //#endregion
522
+ e,
523
+ t,
524
+ i,
525
+ r
526
+ ], X = (...e) => a(() => V(...e)), Z = (...e) => a(() => K(...e)), Q = (...e) => a(() => H(...e)), $ = (...e) => a(() => U(...e)), ee = (...e) => a(() => B(...e)), te = (...e) => a(() => P(...e)), ne = (...e) => a(() => z(...e)), re = (...e) => a(() => q(...e), ...Y), ie = (...e) => a(() => L(...e)), ae = (...e) => a(() => J(...e));
528
527
  export { b as CMS_EXPERIMENTS_TABLE, x as CMS_EXPERIMENT_EVENTS_TABLE, W as MIN_READERS, q as adoptWinner, re as adoptWinnerEffect, A as applyVariant, O as assignVariant, C as cmsExperimentEventsTable, S as cmsExperimentsTable, V as experimentById, X as experimentByIdEffect, j as experimentFields, J as experimentLineage, ae as experimentLineageEffect, M as experimentOverrideKeys, R as experimentReleaseHook, K as experimentResults, Z as experimentResultsEffect, H as listExperiments, Q as listExperimentsEffect, L as planExperiment, ie as planExperimentEffect, U as recordExperimentEvent, $ as recordExperimentEventEffect, B as runningExperiment, ee as runningExperimentEffect, P as startExperiment, te as startExperimentEffect, z as stopExperiment, ne as stopExperimentEffect };
package/dist/exposure.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/exposure.ts
1
+ // src/exposure.ts
2
2
  var e = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : [], t = (t) => {
3
3
  let n = new Map(t.ceiling.map((e) => [e, {
4
4
  tool: e,
@@ -24,5 +24,4 @@ var e = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : [], t
24
24
  explained: r
25
25
  };
26
26
  };
27
- //#endregion
28
27
  export { t as effectiveExposure };
@@ -1,5 +1,5 @@
1
1
  import { Schema as e } from "effect";
2
- //#region src/extensionManifest.ts
2
+ // src/extensionManifest.ts
3
3
  var t = [
4
4
  "dashboard",
5
5
  "sidebar",
@@ -12,7 +12,7 @@ var t = [
12
12
  let n = new Map((e.settings ?? []).map((e) => [e.key, e])), r = [];
13
13
  for (let [i, a] of Object.entries(t)) {
14
14
  let t = n.get(i);
15
- t === void 0 ? r.push(`"${i}" is not a setting of ${e.id}`) : t.kind === "number" ? typeof a != "number" || !Number.isFinite(a) ? r.push(`"${i}" is a number`) : (t.min !== void 0 && a < t.min || t.max !== void 0 && a > t.max) && r.push(`"${i}" is between ${t.min ?? "…"} and ${t.max ?? "…"}`) : t.kind === "boolean" ? typeof a != "boolean" && r.push(`"${i}" is true or false`) : (typeof a != "string" || !t.options.includes(a)) && r.push(`"${i}" is one of ${t.options.join(", ")}`);
15
+ t === void 0 ? r.push(`"${i}" is not a setting of ${e.id}`) : t.kind === "number" ? typeof a != "number" || !Number.isFinite(a) ? r.push(`"${i}" is a number`) : (t.min !== void 0 && a < t.min || t.max !== void 0 && a > t.max) && r.push(`"${i}" is between ${t.min ?? "…"} and ${t.max ?? "…"}`) : t.kind === "boolean" ? typeof a != "boolean" && r.push(`"${i}" is true or false`) : typeof a == "string" && t.options.includes(a) || r.push(`"${i}" is one of ${t.options.join(", ")}`);
16
16
  }
17
17
  return r;
18
18
  }, r = (e, t) => Object.fromEntries((e.settings ?? []).map((r) => {
@@ -77,5 +77,4 @@ var t = [
77
77
  })
78
78
  ])))
79
79
  });
80
- //#endregion
81
80
  export { t as EXTENSION_SLOTS, p as ExtensionAccessDenied, m as ExtensionManifestSchema, d as compareVersions, l as isExtensionCapability, u as manifestProblems, f as newCapabilities, n as settingsProblems, r as settingsWithDefaults };
@@ -2,7 +2,7 @@ import { asTyped as e } from "./effectForm.js";
2
2
  import { ExtensionAccessDenied as t, compareVersions as n, manifestProblems as r, newCapabilities as i, settingsProblems as a, settingsWithDefaults as o } from "./extensionManifest.js";
3
3
  import { and as s, eq as c, id as l, json as u, table as d, text as f } from "@voltro/database";
4
4
  import { tenant as p } from "@voltro/plugin-multitenancy/mixin";
5
- //#region src/extensions.ts
5
+ // src/extensions.ts
6
6
  var m = "cms_extensions", h = "cms_extension_data", g = "cms_extension_secrets", _ = d(m, {
7
7
  id: l({ prefix: "cext" }),
8
8
  extensionId: f(),
@@ -310,5 +310,4 @@ var m = "cms_extensions", h = "cms_extension_data", g = "cms_extension_secrets",
310
310
  }
311
311
  };
312
312
  }, R = (...t) => e(() => F(...t)), z = (...t) => e(() => D(...t)), B = (...t) => e(() => I(...t)), V = (...t) => e(() => M(...t)), H = (...t) => e(() => N(...t)), U = (...t) => e(() => T(...t)), W = (...t) => e(() => w(...t)), G = (...t) => e(() => C(...t)), K = (...t) => e(() => A(...t)), q = (...t) => e(() => k(...t)), J = (...t) => e(() => O(...t)), Y = (...t) => e(() => P(...t)), X = (...t) => e(() => E(...t));
313
- //#endregion
314
313
  export { m as CMS_EXTENSIONS_TABLE, h as CMS_EXTENSION_DATA_TABLE, g as CMS_EXTENSION_SECRETS_TABLE, F as bindExtensionSecret, R as bindExtensionSecretEffect, v as cmsExtensionDataTable, y as cmsExtensionSecretsTable, _ as cmsExtensionsTable, D as consentToUpgrade, z as consentToUpgradeEffect, L as extensionSandbox, I as extensionSecret, B as extensionSecretEffect, M as extensionSettings, V as extensionSettingsEffect, T as installExtension, U as installExtensionEffect, w as installedExtension, W as installedExtensionEffect, C as installedExtensions, G as installedExtensionsEffect, A as regrantExtension, K as regrantExtensionEffect, k as revokeExtension, q as revokeExtensionEffect, O as rollbackExtension, J as rollbackExtensionEffect, N as setExtensionSettings, H as setExtensionSettingsEffect, P as uninstallExtension, Y as uninstallExtensionEffect, E as upgradeExtension, X as upgradeExtensionEffect };
@@ -1,4 +1,4 @@
1
- //#region src/fieldSchema.ts
1
+ // src/fieldSchema.ts
2
2
  var e = (t) => ({
3
3
  ...t,
4
4
  pipe(...n) {
@@ -195,5 +195,4 @@ var e = (t) => ({
195
195
  đ: "d",
196
196
  þ: "th"
197
197
  }, m = (e) => String(e).normalize("NFC").toLowerCase().trim().replace(/[äöüßæœøåłđþ]/g, (e) => p[e] ?? e).normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
198
- //#endregion
199
198
  export { a as Schema, c as componentFingerprint, d as defineComponent, l as defineDesignTokens, u as defineRichTextProfile, f as derivedFrom, s as fnv1a, t as maxLength, n as pattern, m as slugify, r as unique };
@@ -1,4 +1,4 @@
1
- //#region src/formStrings.ts
1
+ // src/formStrings.ts
2
2
  var e = {
3
3
  blockNames: {
4
4
  paragraph: "Paragraph",
@@ -70,5 +70,4 @@ var e = {
70
70
  ...t.blockNames
71
71
  }
72
72
  };
73
- //#endregion
74
73
  export { e as CONTENT_FORM_STRINGS, t as contentFormStrings };
@@ -0,0 +1,98 @@
1
+ import { createFrontendMediaReader as e } from "./frontendMedia.js";
2
+ import { admitSnapshotPresentation as t } from "./snapshotPresentation.js";
3
+ import { Schema as n } from "effect";
4
+ // src/frontendBindings.ts
5
+ var r = [
6
+ "empty",
7
+ "loading",
8
+ "error"
9
+ ], i = class extends n.TaggedError()("FrontendBindingUnavailable", { reason: n.Literals([
10
+ "definition",
11
+ "missing",
12
+ "schema",
13
+ "implementation",
14
+ "context"
15
+ ]) }) {}, a = (e) => {
16
+ throw new i({ reason: e });
17
+ }, o = (e) => typeof e == "string" && /^[A-Za-z][A-Za-z0-9_.:-]{0,127}$/.test(e), s = (e) => {
18
+ if (typeof e != "object" || !e || Array.isArray(e) || ![Object.prototype, null].includes(Object.getPrototypeOf(e)) || Object.getOwnPropertySymbols(e).length) return a("definition");
19
+ let t = Object.getOwnPropertyDescriptors(e);
20
+ return Object.values(t).some((e) => !e.enumerable || !("value" in e)) ? a("definition") : Object.fromEntries(Object.entries(t).map(([e, t]) => [e, t.value]));
21
+ }, c = (e) => {
22
+ let t = s(e);
23
+ return Object.keys(t).length !== 2 || !o(t.channel) || !o(t.theme) ? a("definition") : Object.freeze({
24
+ channel: t.channel,
25
+ theme: t.theme
26
+ });
27
+ }, l = (e) => {
28
+ let t = s(e), n = c({
29
+ channel: t.channel,
30
+ theme: t.theme
31
+ });
32
+ return Object.keys(t).length !== 6 || typeof t.localeId != "string" || !/^[a-z][a-z0-9_-]{0,63}$/.test(t.localeId) || typeof t.contentLocale != "string" || t.contentLocale.length === 0 || t.contentLocale.length > 64 || t.contentLocale.trim() !== t.contentLocale || typeof t.languageTag != "string" || t.languageTag.length > 128 || !/^[A-Za-z][A-Za-z0-9]*(?:-[A-Za-z0-9]+)*$/.test(t.languageTag) || t.direction !== "ltr" && t.direction !== "rtl" ? a("definition") : Object.freeze({
33
+ ...n,
34
+ localeId: t.localeId,
35
+ contentLocale: t.contentLocale,
36
+ languageTag: t.languageTag,
37
+ direction: t.direction
38
+ });
39
+ }, u = (e) => JSON.stringify(l(e)), d = (e) => {
40
+ if (!Array.isArray(e) || e.length === 0 || e.length > 1024 || Object.getOwnPropertySymbols(e).length || Object.keys(e).length !== e.length || Object.keys(e).some((e, t) => e !== String(t))) return a("definition");
41
+ let t = Object.getOwnPropertyDescriptors(e);
42
+ if (Object.entries(t).some(([e, t]) => e !== "length" && (!t.enumerable || !("value" in t)))) return a("definition");
43
+ let n = Array.from({ length: e.length }, (e, n) => l(t[String(n)].value)).map((e) => [u(e), e]).sort(([e], [t]) => e < t ? -1 : +(e > t));
44
+ return new Set(n.map(([e]) => e)).size === n.length ? Object.freeze(n.map(([, e]) => e)) : a("definition");
45
+ }, f = (e, t) => e.some((e) => u(e) === u(t)), p = (e) => {
46
+ let t = s(e), n = /* @__PURE__ */ new Map();
47
+ return Object.keys(t).length > 4096 ? a("definition") : Object.freeze(Object.fromEntries(Object.keys(t).sort().map((e) => {
48
+ let i = s(t[e]), c = s(i.schema);
49
+ if (c.id !== e || !/^[a-z][a-zA-Z0-9]*$/.test(e) || Object.keys(i).some((e) => ![
50
+ "schema",
51
+ "renderer",
52
+ "contexts",
53
+ "render",
54
+ "restricted",
55
+ ...r
56
+ ].includes(e)) || !o(i.renderer)) return a("definition");
57
+ if (typeof i.render != "function" || r.some((e) => typeof i[e] != "function") || i.restricted !== void 0 && typeof i.restricted != "function" || c.consent !== void 0 && typeof i.restricted != "function") return a("implementation");
58
+ if (c.consent !== void 0 && (typeof c.consent != "string" || c.consent.length === 0)) return a("definition");
59
+ let l = d(i.contexts), u = [
60
+ "render",
61
+ ...r,
62
+ "restricted"
63
+ ].map((e) => i[e]), f = n.get(i.renderer);
64
+ return f !== void 0 && f.some((e, t) => e !== u[t]) ? a("implementation") : (n.set(i.renderer, u), [e, Object.freeze({
65
+ schema: i.schema,
66
+ renderer: i.renderer,
67
+ contexts: l,
68
+ render: i.render,
69
+ empty: i.empty,
70
+ loading: i.loading,
71
+ error: i.error,
72
+ ...i.restricted === void 0 ? {} : { restricted: i.restricted }
73
+ })]);
74
+ })));
75
+ }, m = (n, i) => {
76
+ let o = p(n);
77
+ if (!Object.hasOwn(o, i.componentId)) return a("missing");
78
+ let s = o[i.componentId], c = l(i.context);
79
+ if (!f(s.contexts, c)) return a("context");
80
+ if (i.state !== "content" && !r.includes(i.state)) return a("definition");
81
+ let u = t(i.consentPurposes, i.presentation), d = s.schema.consent !== void 0 && !u.granted.some((e) => e.id === s.schema.consent), m = {
82
+ componentId: i.componentId,
83
+ context: c,
84
+ ...i.source === void 0 ? {} : { source: i.source }
85
+ };
86
+ return i.observe?.({
87
+ componentId: i.componentId,
88
+ renderer: s.renderer,
89
+ handler: d ? "restricted" : i.state === "content" ? "render" : i.state
90
+ }), d ? s.restricted({
91
+ ...m,
92
+ purpose: s.schema.consent
93
+ }) : i.state === "content" ? s.render(i.props, c, {
94
+ media: e(i.media?.entries ?? [], i.media?.fieldPath ?? [], i.media?.observe),
95
+ ...i.source === void 0 ? {} : { source: i.source }
96
+ }) : s[i.state](m);
97
+ };
98
+ export { i as FrontendBindingUnavailable, d as copyFrontendContexts, l as copyFrontendOutputContext, c as copyFrontendOutputSelection, p as defineFrontendBindings, u as frontendContextKey, o as frontendRendererId, r as frontendStates, m as renderCapturedFrontendComponent, f as supportsFrontendContext };
@@ -0,0 +1,17 @@
1
+ // src/frontendMedia.ts
2
+ var e = (e, t = [], n) => {
3
+ let r = [...t];
4
+ return (t, i = { kind: "original" }) => {
5
+ let a = [...r, ...t], o = e.filter((e) => e.fieldPath.length === a.length && e.fieldPath.every((e, t) => e === a[t]) && e.output.kind === i.kind && (i.kind !== "rendition" || e.output.kind === "rendition" && e.output.slot === i.slot));
6
+ if (o.length > 1) throw Error("Ambiguous rendered media selection");
7
+ let s = o[0];
8
+ return s !== void 0 && n?.({
9
+ fieldPath: [...a],
10
+ output: { ...s.output }
11
+ }), s === void 0 ? null : {
12
+ url: s.url,
13
+ contentType: s.contentType
14
+ };
15
+ };
16
+ };
17
+ export { e as createFrontendMediaReader };
package/dist/glossary.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { asTyped as e } from "./effectForm.js";
2
2
  import { and as t, eq as n, id as r, json as i, table as a, text as o } from "@voltro/database";
3
3
  import { tenant as s } from "@voltro/plugin-multitenancy/mixin";
4
- //#region src/glossary.ts
4
+ // src/glossary.ts
5
5
  var c = "cms_glossary", l = a(c, {
6
6
  id: r({ prefix: "cgl" }),
7
7
  term: o(),
@@ -69,5 +69,4 @@ var c = "cms_glossary", l = a(c, {
69
69
  found: e,
70
70
  use: t.translation
71
71
  }))), b = (...t) => e(() => h(...t)), x = (...t) => e(() => m(...t)), S = (...t) => e(() => p(...t));
72
- //#endregion
73
72
  export { c as CMS_GLOSSARY_TABLE, l as cmsGlossaryTable, h as glossary, b as glossaryEffect, f as glossaryInputProblems, y as glossaryProblems, m as removeGlossaryTerm, x as removeGlossaryTermEffect, p as setGlossaryTerm, S as setGlossaryTermEffect, v as termsIn };
package/dist/history.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { plainTextOf as e } from "./richDocument.js";
2
- //#region src/history.ts
2
+ // src/history.ts
3
3
  var t = (e) => Array.isArray(e) ? e.map(t) : typeof e == "object" && e && !(e instanceof Date) ? Object.fromEntries(Object.keys(e).sort().map((n) => [n, t(e[n])])) : e instanceof Date ? e.toISOString() : e === void 0 ? null : e, n = (e, n, r) => Object.keys(e).filter((e) => JSON.stringify(t(n[e])) !== JSON.stringify(t(r[e]))), r = (e, n) => {
4
4
  let r = [...e].sort((e, t) => Number(e.number) - Number(t.number)), i = [], a;
5
5
  for (let e of r) {
@@ -50,5 +50,4 @@ var t = (e) => Array.isArray(e) ? e.map(t) : typeof e == "object" && e && !(e in
50
50
  field: e,
51
51
  segments: o(c(t[e]), c(r[e]))
52
52
  }));
53
- //#endregion
54
53
  export { n as changedFields, o as diffWords, l as fieldDiffs, r as fieldVersions, c as valueText };
@@ -1,5 +1,5 @@
1
1
  import { contactLiteralProblem as e } from "./richDocument.js";
2
- //#region src/htmlImport.ts
2
+ // src/htmlImport.ts
3
3
  var t = {
4
4
  amp: "&",
5
5
  lt: "<",
@@ -293,5 +293,4 @@ var t = {
293
293
  findings: d
294
294
  };
295
295
  };
296
- //#endregion
297
296
  export { n as decodeEntities, c as richDocumentFromHtml };