@openrails/contentkit-ui 0.79.0 → 0.81.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 (295) hide show
  1. package/README.md +82 -54
  2. package/dist/client/beacons.d.ts +53 -0
  3. package/dist/client/beacons.js +72 -0
  4. package/dist/client/beacons.js.map +1 -0
  5. package/dist/client/catalog.d.ts +2 -2
  6. package/dist/client/catalog.js +1 -1
  7. package/dist/client/catalog.js.map +1 -1
  8. package/dist/client/client.d.ts +24 -11
  9. package/dist/client/client.js +37 -29
  10. package/dist/client/client.js.map +1 -1
  11. package/dist/client/content/comments.d.ts +12 -8
  12. package/dist/client/content/comments.js +33 -20
  13. package/dist/client/content/comments.js.map +1 -1
  14. package/dist/client/content/favorites.d.ts +24 -9
  15. package/dist/client/content/favorites.js +21 -22
  16. package/dist/client/content/favorites.js.map +1 -1
  17. package/dist/client/content/moderation.d.ts +1 -1
  18. package/dist/client/content/moderation.js.map +1 -1
  19. package/dist/client/content/reactions.d.ts +11 -6
  20. package/dist/client/content/reactions.js +23 -18
  21. package/dist/client/content/reactions.js.map +1 -1
  22. package/dist/client/content/types.d.ts +40 -21
  23. package/dist/client/content/types.js +5 -2
  24. package/dist/client/content/types.js.map +1 -1
  25. package/dist/client/contents.d.ts +55 -0
  26. package/dist/client/contents.js +144 -0
  27. package/dist/client/contents.js.map +1 -0
  28. package/dist/client/discovery.d.ts +126 -0
  29. package/dist/client/discovery.js +125 -0
  30. package/dist/client/discovery.js.map +1 -0
  31. package/dist/client/generated/error-codes.d.ts +1 -1
  32. package/dist/client/generated/error-codes.js +12 -0
  33. package/dist/client/generated/error-codes.js.map +1 -1
  34. package/dist/client/generated/routes.d.ts +1244 -370
  35. package/dist/client/generated/routes.js +1870 -554
  36. package/dist/client/generated/routes.js.map +1 -1
  37. package/dist/client/generated/wire.d.ts +960 -134
  38. package/dist/client/generated/wire.js.map +1 -1
  39. package/dist/client/group-fields.d.ts +25 -0
  40. package/dist/client/group-fields.js +63 -0
  41. package/dist/client/group-fields.js.map +1 -0
  42. package/dist/client/groups.d.ts +58 -0
  43. package/dist/client/groups.js +119 -0
  44. package/dist/client/groups.js.map +1 -0
  45. package/dist/client/http.d.ts +24 -12
  46. package/dist/client/http.js +20 -24
  47. package/dist/client/http.js.map +1 -1
  48. package/dist/client/index.d.ts +11 -6
  49. package/dist/client/media/api.d.ts +1 -1
  50. package/dist/client/media/api.js +4 -2
  51. package/dist/client/media/api.js.map +1 -1
  52. package/dist/client/media/client.d.ts +8 -9
  53. package/dist/client/media/client.js +58 -71
  54. package/dist/client/media/client.js.map +1 -1
  55. package/dist/client/media/ref.d.ts +30 -0
  56. package/dist/client/media/ref.js +10 -3
  57. package/dist/client/media/ref.js.map +1 -1
  58. package/dist/client/offers.d.ts +41 -0
  59. package/dist/client/offers.js +66 -0
  60. package/dist/client/offers.js.map +1 -0
  61. package/dist/client/route.d.ts +2 -0
  62. package/dist/client/route.js +2 -1
  63. package/dist/client/route.js.map +1 -1
  64. package/dist/client/versions.d.ts +20 -0
  65. package/dist/client/versions.js +53 -0
  66. package/dist/client/versions.js.map +1 -0
  67. package/dist/client.js +35 -30
  68. package/dist/components/admin/content-manager.d.ts +80 -0
  69. package/dist/components/admin/content-manager.js +591 -0
  70. package/dist/components/admin/content-manager.js.map +1 -0
  71. package/dist/components/admin/group-manager.d.ts +24 -0
  72. package/dist/components/admin/group-manager.js +244 -0
  73. package/dist/components/admin/group-manager.js.map +1 -0
  74. package/dist/components/admin/media-item-panel.js +1 -1
  75. package/dist/components/admin/media-item-panel.js.map +1 -1
  76. package/dist/components/content/card.d.ts +44 -0
  77. package/dist/components/content/card.js +285 -0
  78. package/dist/components/content/card.js.map +1 -0
  79. package/dist/components/content/editors.d.ts +40 -0
  80. package/dist/components/content/editors.js +764 -0
  81. package/dist/components/content/editors.js.map +1 -0
  82. package/dist/components/content/filters.d.ts +28 -0
  83. package/dist/components/content/filters.js +134 -0
  84. package/dist/components/content/filters.js.map +1 -0
  85. package/dist/components/content/grid.d.ts +62 -0
  86. package/dist/components/content/grid.js +233 -0
  87. package/dist/components/content/grid.js.map +1 -0
  88. package/dist/components/content/index.d.ts +8 -0
  89. package/dist/components/content/listing.d.ts +20 -0
  90. package/dist/components/content/listing.js +150 -0
  91. package/dist/components/content/listing.js.map +1 -0
  92. package/dist/components/content/offer-fields.d.ts +8 -0
  93. package/dist/components/content/offer-fields.js +127 -0
  94. package/dist/components/content/offer-fields.js.map +1 -0
  95. package/dist/components/content/paywall.d.ts +53 -0
  96. package/dist/components/content/paywall.js +221 -0
  97. package/dist/components/content/paywall.js.map +1 -0
  98. package/dist/components/content/search.d.ts +27 -0
  99. package/dist/components/content/search.js +164 -0
  100. package/dist/components/content/search.js.map +1 -0
  101. package/dist/components/groups/banner.d.ts +51 -0
  102. package/dist/components/groups/banner.js +194 -0
  103. package/dist/components/groups/banner.js.map +1 -0
  104. package/dist/components/groups/directory.d.ts +37 -0
  105. package/dist/components/groups/directory.js +117 -0
  106. package/dist/components/groups/directory.js.map +1 -0
  107. package/dist/components/groups/editor.d.ts +44 -0
  108. package/dist/components/groups/editor.js +860 -0
  109. package/dist/components/groups/editor.js.map +1 -0
  110. package/dist/components/groups/fields.d.ts +13 -0
  111. package/dist/components/groups/fields.js +68 -0
  112. package/dist/components/groups/fields.js.map +1 -0
  113. package/dist/components/groups/header.d.ts +25 -0
  114. package/dist/components/groups/header.js +131 -0
  115. package/dist/components/groups/header.js.map +1 -0
  116. package/dist/components/groups/index.d.ts +6 -0
  117. package/dist/components/groups/memberships.d.ts +55 -0
  118. package/dist/components/groups/memberships.js +527 -0
  119. package/dist/components/groups/memberships.js.map +1 -0
  120. package/dist/components/groups/parts.d.ts +49 -0
  121. package/dist/components/groups/parts.js +172 -0
  122. package/dist/components/groups/parts.js.map +1 -0
  123. package/dist/components/media-folder-editor.js +153 -152
  124. package/dist/components/media-folder-editor.js.map +1 -1
  125. package/dist/components/social/comments.d.ts +7 -5
  126. package/dist/components/social/comments.js +6 -2
  127. package/dist/components/social/comments.js.map +1 -1
  128. package/dist/components/social/engagement.d.ts +4 -3
  129. package/dist/components/social/engagement.js.map +1 -1
  130. package/dist/components/social/moderation.d.ts +1 -1
  131. package/dist/components/social/moderation.js +3 -3
  132. package/dist/components/social/moderation.js.map +1 -1
  133. package/dist/editor/rich-text-editor.d.ts +4 -4
  134. package/dist/editor/rich-text-editor.js.map +1 -1
  135. package/dist/index.d.ts +4 -2
  136. package/dist/index.js +23 -9
  137. package/dist/locales/admin/de.js +5 -66
  138. package/dist/locales/admin/de.js.map +1 -1
  139. package/dist/locales/admin/en.d.ts +5 -66
  140. package/dist/locales/admin/en.js +19 -80
  141. package/dist/locales/admin/en.js.map +1 -1
  142. package/dist/locales/admin/es.js +5 -66
  143. package/dist/locales/admin/es.js.map +1 -1
  144. package/dist/locales/admin/ja.js +5 -66
  145. package/dist/locales/admin/ja.js.map +1 -1
  146. package/dist/locales/admin/ko.js +5 -66
  147. package/dist/locales/admin/ko.js.map +1 -1
  148. package/dist/locales/admin/zh.js +5 -66
  149. package/dist/locales/admin/zh.js.map +1 -1
  150. package/dist/locales/content/de.d.ts +2 -0
  151. package/dist/locales/content/de.js +98 -0
  152. package/dist/locales/content/de.js.map +1 -0
  153. package/dist/locales/content/en.d.ts +93 -0
  154. package/dist/locales/content/en.js +98 -0
  155. package/dist/locales/content/en.js.map +1 -0
  156. package/dist/locales/content/es.d.ts +2 -0
  157. package/dist/locales/content/es.js +98 -0
  158. package/dist/locales/content/es.js.map +1 -0
  159. package/dist/locales/content/ja.d.ts +2 -0
  160. package/dist/locales/content/ja.js +98 -0
  161. package/dist/locales/content/ja.js.map +1 -0
  162. package/dist/locales/content/ko.d.ts +2 -0
  163. package/dist/locales/content/ko.js +98 -0
  164. package/dist/locales/content/ko.js.map +1 -0
  165. package/dist/locales/content/zh.d.ts +2 -0
  166. package/dist/locales/content/zh.js +98 -0
  167. package/dist/locales/content/zh.js.map +1 -0
  168. package/dist/locales/de.js +11 -2
  169. package/dist/locales/de.js.map +1 -1
  170. package/dist/locales/discovery/de.d.ts +2 -0
  171. package/dist/locales/discovery/de.js +68 -0
  172. package/dist/locales/discovery/de.js.map +1 -0
  173. package/dist/locales/discovery/en.d.ts +63 -0
  174. package/dist/locales/discovery/en.js +68 -0
  175. package/dist/locales/discovery/en.js.map +1 -0
  176. package/dist/locales/discovery/es.d.ts +2 -0
  177. package/dist/locales/discovery/es.js +68 -0
  178. package/dist/locales/discovery/es.js.map +1 -0
  179. package/dist/locales/discovery/ja.d.ts +2 -0
  180. package/dist/locales/discovery/ja.js +68 -0
  181. package/dist/locales/discovery/ja.js.map +1 -0
  182. package/dist/locales/discovery/ko.d.ts +2 -0
  183. package/dist/locales/discovery/ko.js +68 -0
  184. package/dist/locales/discovery/ko.js.map +1 -0
  185. package/dist/locales/discovery/zh.d.ts +2 -0
  186. package/dist/locales/discovery/zh.js +68 -0
  187. package/dist/locales/discovery/zh.js.map +1 -0
  188. package/dist/locales/en.d.ts +288 -67
  189. package/dist/locales/en.js +11 -2
  190. package/dist/locales/en.js.map +1 -1
  191. package/dist/locales/es.js +11 -2
  192. package/dist/locales/es.js.map +1 -1
  193. package/dist/locales/groups/de.d.ts +2 -0
  194. package/dist/locales/groups/de.js +133 -0
  195. package/dist/locales/groups/de.js.map +1 -0
  196. package/dist/locales/groups/en.d.ts +128 -0
  197. package/dist/locales/groups/en.js +133 -0
  198. package/dist/locales/groups/en.js.map +1 -0
  199. package/dist/locales/groups/es.d.ts +2 -0
  200. package/dist/locales/groups/es.js +133 -0
  201. package/dist/locales/groups/es.js.map +1 -0
  202. package/dist/locales/groups/ja.d.ts +2 -0
  203. package/dist/locales/groups/ja.js +133 -0
  204. package/dist/locales/groups/ja.js.map +1 -0
  205. package/dist/locales/groups/ko.d.ts +2 -0
  206. package/dist/locales/groups/ko.js +133 -0
  207. package/dist/locales/groups/ko.js.map +1 -0
  208. package/dist/locales/groups/zh.d.ts +2 -0
  209. package/dist/locales/groups/zh.js +133 -0
  210. package/dist/locales/groups/zh.js.map +1 -0
  211. package/dist/locales/ja.js +11 -2
  212. package/dist/locales/ja.js.map +1 -1
  213. package/dist/locales/ko.js +11 -2
  214. package/dist/locales/ko.js.map +1 -1
  215. package/dist/locales/social/de.js +2 -1
  216. package/dist/locales/social/de.js.map +1 -1
  217. package/dist/locales/social/en.d.ts +2 -1
  218. package/dist/locales/social/en.js +2 -1
  219. package/dist/locales/social/en.js.map +1 -1
  220. package/dist/locales/social/es.js +2 -1
  221. package/dist/locales/social/es.js.map +1 -1
  222. package/dist/locales/social/ja.js +2 -1
  223. package/dist/locales/social/ja.js.map +1 -1
  224. package/dist/locales/social/ko.js +2 -1
  225. package/dist/locales/social/ko.js.map +1 -1
  226. package/dist/locales/social/zh.js +2 -1
  227. package/dist/locales/social/zh.js.map +1 -1
  228. package/dist/locales/zh.js +11 -2
  229. package/dist/locales/zh.js.map +1 -1
  230. package/dist/react/admin.d.ts +1 -1
  231. package/dist/react/admin.js +8 -6
  232. package/dist/react/admin.js.map +1 -1
  233. package/dist/react/comments.d.ts +9 -7
  234. package/dist/react/comments.js +42 -27
  235. package/dist/react/comments.js.map +1 -1
  236. package/dist/react/contents.d.ts +57 -0
  237. package/dist/react/contents.js +214 -0
  238. package/dist/react/contents.js.map +1 -0
  239. package/dist/react/context.d.ts +1 -1
  240. package/dist/react/context.js.map +1 -1
  241. package/dist/react/crop.js +45 -44
  242. package/dist/react/crop.js.map +1 -1
  243. package/dist/react/detail.d.ts +30 -0
  244. package/dist/react/detail.js +42 -0
  245. package/dist/react/detail.js.map +1 -0
  246. package/dist/react/discovery.d.ts +138 -0
  247. package/dist/react/discovery.js +299 -0
  248. package/dist/react/discovery.js.map +1 -0
  249. package/dist/react/engagement.d.ts +5 -5
  250. package/dist/react/engagement.js +55 -41
  251. package/dist/react/engagement.js.map +1 -1
  252. package/dist/react/folder.js +54 -53
  253. package/dist/react/folder.js.map +1 -1
  254. package/dist/react/groups.d.ts +115 -0
  255. package/dist/react/groups.js +229 -0
  256. package/dist/react/groups.js.map +1 -0
  257. package/dist/react/index.d.ts +5 -1
  258. package/dist/react/public.d.ts +6 -5
  259. package/dist/react/public.js +19 -22
  260. package/dist/react/public.js.map +1 -1
  261. package/dist/react/read.js +105 -106
  262. package/dist/react/read.js.map +1 -1
  263. package/dist/react/resources.d.ts +2 -2
  264. package/dist/react/resources.js +69 -40
  265. package/dist/react/resources.js.map +1 -1
  266. package/dist/react/store.js +41 -39
  267. package/dist/react/store.js.map +1 -1
  268. package/dist/react/upload.js +54 -53
  269. package/dist/react/upload.js.map +1 -1
  270. package/dist/react/use-resource.d.ts +2 -1
  271. package/dist/react/use-resource.js +1 -0
  272. package/dist/react/use-resource.js.map +1 -1
  273. package/dist/react/versions.d.ts +57 -0
  274. package/dist/react/versions.js +94 -0
  275. package/dist/react/versions.js.map +1 -0
  276. package/dist/react/video.js +87 -86
  277. package/dist/react/video.js.map +1 -1
  278. package/dist/react.js +9 -5
  279. package/dist/styles.css +1 -1
  280. package/package.json +1 -1
  281. package/dist/client/content/posts.d.ts +0 -52
  282. package/dist/client/content/posts.js +0 -84
  283. package/dist/client/content/posts.js.map +0 -1
  284. package/dist/client/taxonomy.d.ts +0 -34
  285. package/dist/client/taxonomy.js +0 -84
  286. package/dist/client/taxonomy.js.map +0 -1
  287. package/dist/components/admin/post-manager.d.ts +0 -45
  288. package/dist/components/admin/post-manager.js +0 -602
  289. package/dist/components/admin/post-manager.js.map +0 -1
  290. package/dist/components/admin/taxonomy-manager.d.ts +0 -54
  291. package/dist/components/admin/taxonomy-manager.js +0 -976
  292. package/dist/components/admin/taxonomy-manager.js.map +0 -1
  293. package/dist/react/posts.d.ts +0 -61
  294. package/dist/react/posts.js +0 -183
  295. package/dist/react/posts.js.map +0 -1
@@ -0,0 +1,764 @@
1
+ import { useMessages as e } from "../../i18n/context.js";
2
+ import { useContentKitClient as t } from "../../react/context.js";
3
+ import { Button as n } from "../../ui/button.js";
4
+ import { SortableList as r } from "../sortable-list.js";
5
+ import { MediaFolderEditor as i } from "../media-folder-editor.js";
6
+ import { Badge as a } from "../../ui/badge.js";
7
+ import { Input as o } from "../../ui/input.js";
8
+ import { Label as s } from "../../ui/label.js";
9
+ import { Select as c, SelectContent as l, SelectItem as u, SelectTrigger as d, SelectValue as f } from "../../ui/select.js";
10
+ import { ErrorLine as p, useAction as m } from "../social/parts.js";
11
+ import { Switch as h } from "../../ui/switch.js";
12
+ import { fromLocalInput as g, parseAttributes as _, toLocalInput as v } from "../../client/group-fields.js";
13
+ import { useKinds as y } from "../../react/groups.js";
14
+ import { GroupPicker as b, labelOf as x, useGroupNames as S, useLanguageName as C } from "../groups/parts.js";
15
+ import { OfferFields as w } from "./offer-fields.js";
16
+ import { AttributeFields as T, formOf as E } from "../groups/fields.js";
17
+ import { MembershipEditor as D } from "../groups/memberships.js";
18
+ import { useEffect as O, useId as k, useMemo as A, useState as j } from "react";
19
+ import { jsx as M, jsxs as N } from "react/jsx-runtime";
20
+ import { cn as P } from "cn";
21
+ //#region src/components/content/editors.tsx
22
+ var F = "__none__", I = [
23
+ "listed",
24
+ "members",
25
+ "unlisted"
26
+ ], L = [
27
+ "open",
28
+ "closed",
29
+ "hidden"
30
+ ], R = [
31
+ "public",
32
+ "tier",
33
+ "ppv",
34
+ "group",
35
+ "group_ppv"
36
+ ];
37
+ function z({ title: e, ckui: t, children: n }) {
38
+ return /* @__PURE__ */ N("section", {
39
+ className: "grid gap-3 border-t border-border pt-4",
40
+ "data-ckui": t,
41
+ children: [/* @__PURE__ */ M("h3", {
42
+ className: "font-medium",
43
+ children: e
44
+ }), n]
45
+ });
46
+ }
47
+ function B({ show: t }) {
48
+ let { t: n } = e();
49
+ return t ? /* @__PURE__ */ M("span", {
50
+ role: "status",
51
+ className: "text-muted-foreground",
52
+ children: n("contentEditor.saved")
53
+ }) : null;
54
+ }
55
+ function V(e, t) {
56
+ let { kinds: n } = y({ client: t });
57
+ return {
58
+ model: n,
59
+ spec: n?.kinds[e]
60
+ };
61
+ }
62
+ function H({ content: r, ...i }) {
63
+ let { t: a } = e(), o = t(i.client), { spec: h } = V(r.kind, i.client), g = A(() => h?.attributes ?? {}, [h]), [v, y] = j(r.listing), [b, x] = j(r.comments), [S, C] = j({});
64
+ O(() => {
65
+ y(r.listing), x(r.comments), C(E(g, r.attributes));
66
+ }, [
67
+ r.revision,
68
+ r.listing,
69
+ r.comments,
70
+ r.attributes,
71
+ g
72
+ ]);
73
+ let [w, D] = j(null), [k, P] = j(!1), F = m("content.save", i.onError);
74
+ return /* @__PURE__ */ M(z, {
75
+ title: a("contentEditor.details"),
76
+ ckui: "content-details",
77
+ children: /* @__PURE__ */ N("form", {
78
+ className: "grid gap-3",
79
+ onSubmit: (e) => {
80
+ e.preventDefault(), D(null), P(!1);
81
+ let t;
82
+ try {
83
+ t = _(g, S);
84
+ } catch (e) {
85
+ return D(e.message);
86
+ }
87
+ F.run(() => o.contents.update(r.id, {
88
+ listing: v,
89
+ comments: b,
90
+ attributes: t,
91
+ revision: r.revision
92
+ })).then((e) => e && P(!0));
93
+ },
94
+ children: [
95
+ /* @__PURE__ */ N("div", {
96
+ className: "grid gap-1.5 sm:max-w-xs",
97
+ children: [/* @__PURE__ */ M(s, { children: a("contentEditor.listing") }), /* @__PURE__ */ N(c, {
98
+ value: v,
99
+ onValueChange: (e) => y(e),
100
+ children: [/* @__PURE__ */ M(d, {
101
+ size: "sm",
102
+ "aria-label": a("contentEditor.listing"),
103
+ children: /* @__PURE__ */ M(f, { children: (e) => a(`contentEditor.listing_${e}`) })
104
+ }), /* @__PURE__ */ M(l, { children: I.map((e) => /* @__PURE__ */ M(u, {
105
+ value: e,
106
+ children: a(`contentEditor.listing_${e}`)
107
+ }, e)) })]
108
+ })]
109
+ }),
110
+ /* @__PURE__ */ N("div", {
111
+ className: "grid gap-1.5 sm:max-w-xs",
112
+ children: [/* @__PURE__ */ M(s, { children: a("contentEditor.comments") }), /* @__PURE__ */ N(c, {
113
+ value: b,
114
+ onValueChange: (e) => x(e),
115
+ children: [/* @__PURE__ */ M(d, {
116
+ size: "sm",
117
+ "aria-label": a("contentEditor.comments"),
118
+ children: /* @__PURE__ */ M(f, { children: (e) => a(`contentEditor.comments_${e}`) })
119
+ }), /* @__PURE__ */ M(l, { children: L.map((e) => /* @__PURE__ */ M(u, {
120
+ value: e,
121
+ children: a(`contentEditor.comments_${e}`)
122
+ }, e)) })]
123
+ })]
124
+ }),
125
+ /* @__PURE__ */ M(T, {
126
+ declared: g,
127
+ form: S,
128
+ onChange: (e, t) => C((n) => ({
129
+ ...n,
130
+ [e]: t
131
+ })),
132
+ labels: i.labels
133
+ }),
134
+ w && /* @__PURE__ */ M(p, { children: w }),
135
+ /* @__PURE__ */ M(p, { error: F.error }),
136
+ /* @__PURE__ */ N("div", {
137
+ className: "flex items-center gap-3",
138
+ children: [/* @__PURE__ */ M(n, {
139
+ type: "submit",
140
+ size: "sm",
141
+ disabled: F.pending,
142
+ children: F.pending ? a("common.saving") : a("common.save")
143
+ }), /* @__PURE__ */ M(B, { show: k })]
144
+ })
145
+ ]
146
+ })
147
+ });
148
+ }
149
+ function U({ value: t, onChange: n, model: r, labels: i, client: a }) {
150
+ let { t: p } = e(), m = k(), _ = r?.tiers ?? [], y = Object.entries(r?.group_kinds ?? {}).filter(([, e]) => e.sellable || e.auth_scope).map(([e]) => e), [C, w] = j(y[0] ?? ""), T = S(t.group_id ? [t.group_id] : [], { client: a }), E = t.group_id ? T.get(t.group_id) : void 0, D = (e) => n({
151
+ ...t,
152
+ ...e
153
+ });
154
+ return /* @__PURE__ */ N("div", {
155
+ className: "grid gap-3",
156
+ "data-ckui": "rule-fields",
157
+ children: [
158
+ /* @__PURE__ */ N("div", {
159
+ className: "grid gap-1.5 sm:max-w-xs",
160
+ children: [/* @__PURE__ */ M(s, { children: p("contentEditor.access") }), /* @__PURE__ */ N(c, {
161
+ value: t.level,
162
+ onValueChange: (e) => n({
163
+ level: e,
164
+ preview: t.preview,
165
+ free_after: t.free_after
166
+ }),
167
+ children: [/* @__PURE__ */ M(d, {
168
+ size: "sm",
169
+ "aria-label": p("contentEditor.access"),
170
+ children: /* @__PURE__ */ M(f, { children: (e) => p(`contentEditor.level_${e}`) })
171
+ }), /* @__PURE__ */ M(l, { children: R.filter((e) => (e !== "tier" || _.length) && (!e.startsWith("group") || y.length)).map((e) => /* @__PURE__ */ M(u, {
172
+ value: e,
173
+ children: p(`contentEditor.level_${e}`)
174
+ }, e)) })]
175
+ })]
176
+ }),
177
+ t.level === "tier" && /* @__PURE__ */ N("fieldset", {
178
+ className: "flex flex-wrap gap-3",
179
+ children: [/* @__PURE__ */ M("legend", {
180
+ className: "sr-only",
181
+ children: p("contentEditor.tiers")
182
+ }), _.map((e) => /* @__PURE__ */ N("label", {
183
+ className: "flex items-center gap-2",
184
+ children: [/* @__PURE__ */ M(h, {
185
+ checked: t.tiers?.includes(e) ?? !1,
186
+ onCheckedChange: (n) => D({ tiers: n ? [...t.tiers ?? [], e] : (t.tiers ?? []).filter((t) => t !== e) }),
187
+ "aria-label": x(i, e)
188
+ }), x(i, e)]
189
+ }, e))]
190
+ }),
191
+ (t.level === "group" || t.level === "group_ppv") && /* @__PURE__ */ N("div", {
192
+ className: "flex flex-wrap items-end gap-2",
193
+ children: [
194
+ E || t.group_id ? /* @__PURE__ */ M("span", {
195
+ className: "rounded-md border border-border px-2 py-0.5",
196
+ "data-ckui": "rule-group",
197
+ children: E ? E.name || E.slug : t.group_id
198
+ }) : null,
199
+ y.length > 1 && /* @__PURE__ */ N(c, {
200
+ value: C,
201
+ onValueChange: (e) => w(String(e)),
202
+ children: [/* @__PURE__ */ M(d, {
203
+ size: "sm",
204
+ "aria-label": p("groupEditor.edgeKind"),
205
+ children: /* @__PURE__ */ M(f, { children: (e) => x(i, e) })
206
+ }), /* @__PURE__ */ M(l, { children: y.map((e) => /* @__PURE__ */ M(u, {
207
+ value: e,
208
+ children: x(i, e)
209
+ }, e)) })]
210
+ }),
211
+ C && /* @__PURE__ */ M(b, {
212
+ kind: C,
213
+ label: p("contentEditor.group"),
214
+ client: a,
215
+ onPick: (e) => D({ group_id: e.id })
216
+ }, C)
217
+ ]
218
+ }),
219
+ t.level !== "public" && /* @__PURE__ */ N("div", {
220
+ className: "grid gap-3 sm:grid-cols-3",
221
+ children: [
222
+ /* @__PURE__ */ N("div", {
223
+ className: "grid gap-1.5",
224
+ children: [/* @__PURE__ */ M(s, {
225
+ htmlFor: `${m}-pages`,
226
+ children: p("contentEditor.previewPages")
227
+ }), /* @__PURE__ */ M(o, {
228
+ id: `${m}-pages`,
229
+ className: "h-8",
230
+ type: "number",
231
+ min: 0,
232
+ value: t.preview?.pages ?? "",
233
+ onChange: (e) => D({ preview: {
234
+ ...t.preview,
235
+ pages: e.target.value ? Math.max(0, Math.trunc(Number(e.target.value))) : void 0
236
+ } })
237
+ })]
238
+ }),
239
+ /* @__PURE__ */ N("div", {
240
+ className: "grid gap-1.5",
241
+ children: [/* @__PURE__ */ M(s, {
242
+ htmlFor: `${m}-segments`,
243
+ children: p("contentEditor.previewSegments")
244
+ }), /* @__PURE__ */ M(o, {
245
+ id: `${m}-segments`,
246
+ className: "h-8",
247
+ type: "number",
248
+ min: 0,
249
+ value: t.preview?.segments ?? "",
250
+ onChange: (e) => D({ preview: {
251
+ ...t.preview,
252
+ segments: e.target.value ? Math.max(0, Math.trunc(Number(e.target.value))) : void 0
253
+ } })
254
+ })]
255
+ }),
256
+ /* @__PURE__ */ N("div", {
257
+ className: "grid gap-1.5",
258
+ children: [/* @__PURE__ */ M(s, {
259
+ htmlFor: `${m}-free`,
260
+ children: p("contentEditor.freeAfter")
261
+ }), /* @__PURE__ */ M(o, {
262
+ id: `${m}-free`,
263
+ className: "h-8",
264
+ type: "datetime-local",
265
+ value: v(t.free_after),
266
+ onChange: (e) => D({ free_after: g(e.target.value) })
267
+ })]
268
+ })
269
+ ]
270
+ })
271
+ ]
272
+ });
273
+ }
274
+ function W(e) {
275
+ let t = e.preview && (e.preview.pages || e.preview.segments) ? {
276
+ pages: e.preview.pages || void 0,
277
+ segments: e.preview.segments || void 0
278
+ } : void 0;
279
+ return {
280
+ level: e.level,
281
+ tiers: e.level === "tier" ? e.tiers : void 0,
282
+ group_id: e.level === "group" || e.level === "group_ppv" ? e.group_id : void 0,
283
+ preview: e.level === "public" ? void 0 : t,
284
+ free_after: e.level === "public" ? void 0 : e.free_after
285
+ };
286
+ }
287
+ function G({ content: r, ...i }) {
288
+ let { t: a } = e(), o = t(i.client), { model: s } = V(r.kind, i.client), [c, l] = j(r.access);
289
+ O(() => l(r.access), [r.revision, r.access]);
290
+ let [u, d] = j(!1), f = m("content.save", i.onError), h = m("offer.save", i.onError);
291
+ return /* @__PURE__ */ N(z, {
292
+ title: a("contentEditor.accessTitle"),
293
+ ckui: "access-editor",
294
+ children: [
295
+ /* @__PURE__ */ N("form", {
296
+ className: "grid gap-3",
297
+ onSubmit: (e) => {
298
+ e.preventDefault(), d(!1), f.run(() => o.contents.update(r.id, {
299
+ access: W(c),
300
+ revision: r.revision
301
+ })).then((e) => e && d(!0));
302
+ },
303
+ children: [
304
+ /* @__PURE__ */ M(U, {
305
+ value: c,
306
+ onChange: l,
307
+ model: s,
308
+ labels: i.labels,
309
+ client: o
310
+ }),
311
+ /* @__PURE__ */ M(p, { error: f.error }),
312
+ /* @__PURE__ */ N("div", {
313
+ className: "flex items-center gap-3",
314
+ children: [/* @__PURE__ */ M(n, {
315
+ type: "submit",
316
+ size: "sm",
317
+ disabled: f.pending,
318
+ children: f.pending ? a("common.saving") : a("common.save")
319
+ }), /* @__PURE__ */ M(B, { show: u })]
320
+ })
321
+ ]
322
+ }),
323
+ /* @__PURE__ */ M(w, {
324
+ offer: r.offer,
325
+ pending: h.pending,
326
+ onSell: (e) => void h.run(() => o.offers.sell({ content: r.id }, e)),
327
+ onWithdraw: () => void h.run(() => o.offers.withdraw({ content: r.id }))
328
+ }),
329
+ /* @__PURE__ */ M(p, { error: h.error })
330
+ ]
331
+ });
332
+ }
333
+ function K(e, t, n) {
334
+ return e.label || [...e.languages.map(t), ...e.traits.map((e) => x(n, e))].join(" · ");
335
+ }
336
+ function q({ content: i, media: o = !0, ...s }) {
337
+ let { t: c } = e(), l = t(s.client), u = C(), { model: d, spec: f } = V(i.kind, s.client), h = m("content.save", s.onError), g = m("content.save", s.onError), [_, v] = j(null), y = A(() => [...i.versions].sort((e, t) => e.position - t.position), [i.versions]);
338
+ if (f?.versions.hidden) return null;
339
+ let b = d?.languages ?? [];
340
+ return /* @__PURE__ */ N(z, {
341
+ title: c("contentEditor.versions"),
342
+ ckui: "versions-editor",
343
+ children: [
344
+ /* @__PURE__ */ M(r, {
345
+ items: y,
346
+ id: (e) => e.id,
347
+ name: (e) => K(e, u, s.labels),
348
+ label: c("contentEditor.versions"),
349
+ disabled: h.pending || y.length < 2,
350
+ onMove: (e, t) => {
351
+ let n = y.map((e) => e.id), [r] = n.splice(e, 1);
352
+ n.splice(t, 0, r), h.run(() => l.contents.orderVersions(i.id, n));
353
+ },
354
+ children: (e, t) => /* @__PURE__ */ N("div", {
355
+ className: "grid gap-2 rounded-md border border-border p-2",
356
+ "data-ckui": "version-row",
357
+ "data-version": e.id,
358
+ children: [/* @__PURE__ */ N("div", {
359
+ className: "flex flex-wrap items-center gap-2",
360
+ children: [
361
+ y.length > 1 && t,
362
+ /* @__PURE__ */ M("span", {
363
+ className: "min-w-0 flex-1 font-medium break-words",
364
+ children: K(e, u, s.labels)
365
+ }),
366
+ /* @__PURE__ */ M(a, {
367
+ variant: e.live ? "default" : "outline",
368
+ children: c(e.live ? "contentEditor.live" : e.state === "draft" ? "contentManager.draft" : "contentManager.scheduled")
369
+ }),
370
+ e.access && /* @__PURE__ */ M(a, {
371
+ variant: "secondary",
372
+ children: c(`contentEditor.level_${e.access.level}`)
373
+ }),
374
+ e.pages ? /* @__PURE__ */ M("span", {
375
+ className: "text-xs text-muted-foreground",
376
+ children: c("contentEditor.pageCount", { count: e.pages })
377
+ }) : null,
378
+ /* @__PURE__ */ M(n, {
379
+ type: "button",
380
+ size: "xs",
381
+ variant: "ghost",
382
+ "aria-expanded": _ === e.id,
383
+ onClick: () => v(_ === e.id ? null : e.id),
384
+ children: c(_ === e.id ? "contentEditor.close" : "contentEditor.edit")
385
+ })
386
+ ]
387
+ }), _ === e.id && /* @__PURE__ */ M(X, {
388
+ content: i,
389
+ version: e,
390
+ model: d,
391
+ media: o,
392
+ ...s
393
+ })]
394
+ })
395
+ }),
396
+ /* @__PURE__ */ M(p, { error: h.error }),
397
+ /* @__PURE__ */ M(Y, {
398
+ languages: b,
399
+ many: f?.versions.languages === "many",
400
+ pending: g.pending,
401
+ onAdd: (e) => void g.run(() => l.contents.addVersion(i.id, e))
402
+ }),
403
+ /* @__PURE__ */ M(p, { error: g.error })
404
+ ]
405
+ });
406
+ }
407
+ function J({ languages: t, value: n, many: r, onChange: i }) {
408
+ let { t: a } = e(), o = C();
409
+ return r ? /* @__PURE__ */ N("fieldset", {
410
+ className: "flex flex-wrap gap-3",
411
+ children: [/* @__PURE__ */ M("legend", {
412
+ className: "sr-only",
413
+ children: a("contentEditor.versionLanguages")
414
+ }), t.map((e) => /* @__PURE__ */ N("label", {
415
+ className: "flex items-center gap-1.5",
416
+ children: [/* @__PURE__ */ M(h, {
417
+ size: "sm",
418
+ checked: n.includes(e),
419
+ onCheckedChange: (t) => i(t ? [...n, e] : n.filter((t) => t !== e)),
420
+ "aria-label": o(e)
421
+ }), o(e)]
422
+ }, e))]
423
+ }) : /* @__PURE__ */ N(c, {
424
+ value: n[0] ?? F,
425
+ onValueChange: (e) => i(e === F ? [] : [String(e)]),
426
+ children: [/* @__PURE__ */ M(d, {
427
+ size: "sm",
428
+ "aria-label": a("contentEditor.versionLanguage"),
429
+ children: /* @__PURE__ */ M(f, { children: (e) => e === F ? a("contentEditor.chooseLanguage") : o(e) })
430
+ }), /* @__PURE__ */ M(l, { children: t.map((e) => /* @__PURE__ */ M(u, {
431
+ value: e,
432
+ children: o(e)
433
+ }, e)) })]
434
+ });
435
+ }
436
+ function Y({ languages: t, many: r, pending: i, onAdd: a }) {
437
+ let { t: o } = e(), [s, c] = j([]);
438
+ return /* @__PURE__ */ N("div", {
439
+ className: "flex flex-wrap items-center gap-2",
440
+ "data-ckui": "add-version",
441
+ children: [/* @__PURE__ */ M(J, {
442
+ languages: t,
443
+ value: s,
444
+ many: r,
445
+ onChange: c
446
+ }), /* @__PURE__ */ M(n, {
447
+ type: "button",
448
+ size: "sm",
449
+ variant: "outline",
450
+ disabled: i || !s.length,
451
+ onClick: () => {
452
+ a({ languages: s }), c([]);
453
+ },
454
+ children: o("contentEditor.addVersion")
455
+ })]
456
+ });
457
+ }
458
+ function X({ content: r, version: a, model: c, media: l, ...u }) {
459
+ let { t: d } = e(), f = k(), _ = t(u.client), y = c?.kinds[r.kind], [b, S] = j(a.languages), [C, T] = j(a.traits), [E, D] = j(a.label ?? ""), [O, A] = j(a.state === "draft"), [P, F] = j(v(a.publish_at)), [I, L] = j(!!a.access), [R, z] = j(a.access ?? r.access), [V, H] = j(!1), G = m("content.save", u.onError), K = m("content.save", u.onError), q = m("offer.save", u.onError);
460
+ return /* @__PURE__ */ N("div", {
461
+ className: "grid gap-4 pt-2",
462
+ children: [
463
+ /* @__PURE__ */ N("form", {
464
+ className: "grid gap-3",
465
+ onSubmit: (e) => {
466
+ e.preventDefault(), H(!1), G.run(() => _.contents.updateVersion(r.id, a.id, {
467
+ languages: b,
468
+ traits: C,
469
+ label: E.trim(),
470
+ state: O ? "draft" : "published",
471
+ publish_at: g(P),
472
+ ...I ? { access: W(R) } : { clear_access: !!a.access }
473
+ })).then((e) => e && H(!0));
474
+ },
475
+ children: [
476
+ /* @__PURE__ */ M(J, {
477
+ languages: c?.languages ?? [],
478
+ value: b,
479
+ many: y?.versions.languages === "many",
480
+ onChange: S
481
+ }),
482
+ !!y?.versions.traits?.length && /* @__PURE__ */ N("fieldset", {
483
+ className: "flex flex-wrap gap-3",
484
+ children: [/* @__PURE__ */ M("legend", {
485
+ className: "sr-only",
486
+ children: d("contentEditor.traits")
487
+ }), y.versions.traits.map((e) => /* @__PURE__ */ N("label", {
488
+ className: "flex items-center gap-1.5",
489
+ children: [/* @__PURE__ */ M(h, {
490
+ size: "sm",
491
+ checked: C.includes(e),
492
+ onCheckedChange: (t) => T(t ? [...C, e] : C.filter((t) => t !== e)),
493
+ "aria-label": x(u.labels, e)
494
+ }), x(u.labels, e)]
495
+ }, e))]
496
+ }),
497
+ /* @__PURE__ */ N("div", {
498
+ className: "grid gap-3 sm:grid-cols-2",
499
+ children: [/* @__PURE__ */ N("div", {
500
+ className: "grid gap-1.5",
501
+ children: [/* @__PURE__ */ M(s, {
502
+ htmlFor: `${f}-label`,
503
+ children: d("contentEditor.versionLabel")
504
+ }), /* @__PURE__ */ M(o, {
505
+ id: `${f}-label`,
506
+ className: "h-8",
507
+ value: E,
508
+ onChange: (e) => D(e.target.value)
509
+ })]
510
+ }), /* @__PURE__ */ N("div", {
511
+ className: "grid gap-1.5",
512
+ children: [/* @__PURE__ */ M(s, {
513
+ htmlFor: `${f}-at`,
514
+ children: d("contentEditor.versionPublishAt")
515
+ }), /* @__PURE__ */ M(o, {
516
+ id: `${f}-at`,
517
+ className: "h-8",
518
+ type: "datetime-local",
519
+ value: P,
520
+ onChange: (e) => F(e.target.value)
521
+ })]
522
+ })]
523
+ }),
524
+ /* @__PURE__ */ N("label", {
525
+ className: "flex items-center gap-2",
526
+ children: [/* @__PURE__ */ M(h, {
527
+ size: "sm",
528
+ checked: O,
529
+ onCheckedChange: A
530
+ }), d("contentEditor.versionDraft")]
531
+ }),
532
+ /* @__PURE__ */ N("label", {
533
+ className: "flex items-center gap-2",
534
+ children: [/* @__PURE__ */ M(h, {
535
+ size: "sm",
536
+ checked: I,
537
+ onCheckedChange: L
538
+ }), d("contentEditor.ownAccess")]
539
+ }),
540
+ I && /* @__PURE__ */ M(U, {
541
+ value: R,
542
+ onChange: z,
543
+ model: c,
544
+ labels: u.labels,
545
+ client: _
546
+ }),
547
+ /* @__PURE__ */ M(p, { error: G.error }),
548
+ /* @__PURE__ */ N("div", {
549
+ className: "flex flex-wrap items-center gap-3",
550
+ children: [
551
+ /* @__PURE__ */ M(n, {
552
+ type: "submit",
553
+ size: "sm",
554
+ disabled: G.pending || !b.length,
555
+ children: G.pending ? d("common.saving") : d("common.save")
556
+ }),
557
+ /* @__PURE__ */ M(B, { show: V }),
558
+ /* @__PURE__ */ M(n, {
559
+ type: "button",
560
+ size: "sm",
561
+ variant: "destructive",
562
+ className: "ms-auto",
563
+ disabled: K.pending,
564
+ onClick: () => void K.run(() => _.contents.removeVersion(r.id, a.id)),
565
+ children: d("contentEditor.deleteVersion")
566
+ })
567
+ ]
568
+ }),
569
+ /* @__PURE__ */ M(p, { error: K.error })
570
+ ]
571
+ }),
572
+ /* @__PURE__ */ M(w, {
573
+ offer: a.offer,
574
+ pending: q.pending,
575
+ onSell: (e) => void q.run(() => _.offers.sell({
576
+ content: r.id,
577
+ version: a.id
578
+ }, e)),
579
+ onWithdraw: () => void q.run(() => _.offers.withdraw({
580
+ content: r.id,
581
+ version: a.id
582
+ }))
583
+ }),
584
+ /* @__PURE__ */ M(p, { error: q.error }),
585
+ y?.segments && /* @__PURE__ */ M(Z, {
586
+ content: r,
587
+ version: a,
588
+ ...u
589
+ }),
590
+ l && /* @__PURE__ */ M(i, {
591
+ item: {
592
+ kind: r.kind,
593
+ id: r.id,
594
+ version: a.id
595
+ },
596
+ label: d("contentEditor.media")
597
+ })
598
+ ]
599
+ });
600
+ }
601
+ function Z({ content: r, version: i, ...a }) {
602
+ let { t: s } = e(), c = t(a.client), l = () => i.segments.map((e) => ({
603
+ title: e.title ?? "",
604
+ start: String(e.start),
605
+ end: String(e.end),
606
+ release: v(e.release_at)
607
+ })), [u, d] = j(l);
608
+ O(() => d(l()), [JSON.stringify(i.segments)]);
609
+ let [f, h] = j(!1), _ = m("content.save", a.onError), y = (e, t) => {
610
+ h(!1), d((n) => n.map((n, r) => r === e ? {
611
+ ...n,
612
+ ...t
613
+ } : n));
614
+ }, b = u.every((e) => /^\d+$/.test(e.start) && /^\d+$/.test(e.end) && Number(e.end) > Number(e.start));
615
+ return /* @__PURE__ */ N("div", {
616
+ className: "grid gap-2",
617
+ "data-ckui": "segments-editor",
618
+ children: [
619
+ /* @__PURE__ */ M("h4", {
620
+ className: "text-sm font-medium",
621
+ children: s("contentEditor.segments")
622
+ }),
623
+ u.length === 0 && /* @__PURE__ */ M("p", {
624
+ className: "text-muted-foreground",
625
+ children: s("contentEditor.noSegments")
626
+ }),
627
+ u.map((e, t) => /* @__PURE__ */ N("div", {
628
+ className: "flex flex-wrap items-center gap-2",
629
+ "data-ckui": "segment-row",
630
+ children: [
631
+ /* @__PURE__ */ M("span", {
632
+ className: "w-6 text-xs text-muted-foreground tabular-nums",
633
+ children: t + 1
634
+ }),
635
+ /* @__PURE__ */ M(o, {
636
+ className: "h-8 w-40",
637
+ "aria-label": s("contentEditor.segmentTitle", { n: t + 1 }),
638
+ placeholder: s("contentEditor.segmentTitlePlaceholder"),
639
+ value: e.title,
640
+ onChange: (e) => y(t, { title: e.target.value })
641
+ }),
642
+ /* @__PURE__ */ M(o, {
643
+ className: "h-8 w-20",
644
+ type: "number",
645
+ min: 0,
646
+ "aria-label": s("contentEditor.segmentStart", { n: t + 1 }),
647
+ value: e.start,
648
+ onChange: (e) => y(t, { start: e.target.value })
649
+ }),
650
+ /* @__PURE__ */ M("span", {
651
+ "aria-hidden": !0,
652
+ children: "–"
653
+ }),
654
+ /* @__PURE__ */ M(o, {
655
+ className: "h-8 w-20",
656
+ type: "number",
657
+ min: 1,
658
+ "aria-label": s("contentEditor.segmentEnd", { n: t + 1 }),
659
+ value: e.end,
660
+ onChange: (e) => y(t, { end: e.target.value })
661
+ }),
662
+ /* @__PURE__ */ M(o, {
663
+ className: "h-8 w-48",
664
+ type: "datetime-local",
665
+ "aria-label": s("contentEditor.segmentRelease", { n: t + 1 }),
666
+ value: e.release,
667
+ onChange: (e) => y(t, { release: e.target.value })
668
+ }),
669
+ /* @__PURE__ */ M(n, {
670
+ type: "button",
671
+ size: "xs",
672
+ variant: "ghost",
673
+ onClick: () => d((e) => e.filter((e, n) => n !== t)),
674
+ children: s("common.remove")
675
+ })
676
+ ]
677
+ }, t)),
678
+ /* @__PURE__ */ N("div", {
679
+ className: "flex flex-wrap items-center gap-2",
680
+ children: [
681
+ /* @__PURE__ */ M(n, {
682
+ type: "button",
683
+ size: "sm",
684
+ variant: "outline",
685
+ onClick: () => {
686
+ let e = u.at(-1), t = e && Number(e.end) || 0;
687
+ d((e) => [...e, {
688
+ title: "",
689
+ start: String(t),
690
+ end: String(t + 1),
691
+ release: ""
692
+ }]);
693
+ },
694
+ children: s("contentEditor.addSegment")
695
+ }),
696
+ /* @__PURE__ */ M(n, {
697
+ type: "button",
698
+ size: "sm",
699
+ disabled: _.pending || !b,
700
+ onClick: () => {
701
+ h(!1);
702
+ let e = u.map((e, t) => ({
703
+ position: t + 1,
704
+ title: e.title.trim() || void 0,
705
+ start: Number(e.start),
706
+ end: Number(e.end),
707
+ release_at: g(e.release),
708
+ released: !1
709
+ }));
710
+ _.run(() => c.contents.setSegments(r.id, i.id, e)).then((e) => e && h(!0));
711
+ },
712
+ children: s("contentEditor.saveSegments")
713
+ }),
714
+ /* @__PURE__ */ M(B, { show: f })
715
+ ]
716
+ }),
717
+ /* @__PURE__ */ M(p, { error: _.error })
718
+ ]
719
+ });
720
+ }
721
+ function Q({ content: e, ...t }) {
722
+ let n = C(), r = A(() => e.versions.map((e) => ({
723
+ id: e.id,
724
+ label: K(e, n, t.labels)
725
+ })), [
726
+ e.versions,
727
+ n,
728
+ t.labels
729
+ ]), { spec: i } = V(e.kind, t.client);
730
+ return /* @__PURE__ */ N("div", {
731
+ className: P("grid gap-6", t.className),
732
+ "data-ckui": "content-sections",
733
+ children: [
734
+ /* @__PURE__ */ M(H, {
735
+ content: e,
736
+ ...t
737
+ }),
738
+ /* @__PURE__ */ M(G, {
739
+ content: e,
740
+ ...t
741
+ }),
742
+ /* @__PURE__ */ M(q, {
743
+ content: e,
744
+ ...t
745
+ }),
746
+ !!i?.groups?.length && /* @__PURE__ */ M("section", {
747
+ className: "grid gap-3 border-t border-border pt-4",
748
+ "data-ckui": "content-groups",
749
+ children: /* @__PURE__ */ M(D, {
750
+ content: e.id,
751
+ contentKind: e.kind,
752
+ versions: i.versions.hidden ? void 0 : r,
753
+ labels: t.labels,
754
+ client: t.client,
755
+ onError: t.onError
756
+ })
757
+ })
758
+ ]
759
+ });
760
+ }
761
+ //#endregion
762
+ export { G as AccessEditor, H as ContentDetailsEditor, Q as ContentSections, Z as SegmentsEditor, q as VersionsEditor, K as versionLabel };
763
+
764
+ //# sourceMappingURL=editors.js.map