ghost 5.88.0 → 5.88.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.88.2.tgz +0 -0
  2. package/components/{tryghost-adapter-cache-redis-5.88.0.tgz → tryghost-adapter-cache-redis-5.88.2.tgz} +0 -0
  3. package/components/tryghost-adapter-manager-5.88.2.tgz +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.88.2.tgz +0 -0
  5. package/components/{tryghost-api-framework-5.88.0.tgz → tryghost-api-framework-5.88.2.tgz} +0 -0
  6. package/components/{tryghost-api-version-compatibility-service-5.88.0.tgz → tryghost-api-version-compatibility-service-5.88.2.tgz} +0 -0
  7. package/components/tryghost-audience-feedback-5.88.2.tgz +0 -0
  8. package/components/tryghost-bookshelf-repository-5.88.2.tgz +0 -0
  9. package/components/tryghost-bootstrap-socket-5.88.2.tgz +0 -0
  10. package/components/tryghost-collections-5.88.2.tgz +0 -0
  11. package/components/tryghost-constants-5.88.2.tgz +0 -0
  12. package/components/tryghost-custom-theme-settings-service-5.88.2.tgz +0 -0
  13. package/components/{tryghost-data-generator-5.88.0.tgz → tryghost-data-generator-5.88.2.tgz} +0 -0
  14. package/components/tryghost-domain-events-5.88.2.tgz +0 -0
  15. package/components/tryghost-donations-5.88.2.tgz +0 -0
  16. package/components/tryghost-dynamic-routing-events-5.88.2.tgz +0 -0
  17. package/components/{tryghost-email-addresses-5.88.0.tgz → tryghost-email-addresses-5.88.2.tgz} +0 -0
  18. package/components/{tryghost-email-analytics-provider-mailgun-5.88.0.tgz → tryghost-email-analytics-provider-mailgun-5.88.2.tgz} +0 -0
  19. package/components/tryghost-email-analytics-service-5.88.2.tgz +0 -0
  20. package/components/tryghost-email-content-generator-5.88.2.tgz +0 -0
  21. package/components/{tryghost-email-events-5.88.0.tgz → tryghost-email-events-5.88.2.tgz} +0 -0
  22. package/components/{tryghost-email-service-5.88.0.tgz → tryghost-email-service-5.88.2.tgz} +0 -0
  23. package/components/tryghost-email-suppression-list-5.88.2.tgz +0 -0
  24. package/components/tryghost-express-dynamic-redirects-5.88.2.tgz +0 -0
  25. package/components/tryghost-external-media-inliner-5.88.2.tgz +0 -0
  26. package/components/tryghost-extract-api-key-5.88.2.tgz +0 -0
  27. package/components/tryghost-ghost-5.88.2.tgz +0 -0
  28. package/components/{tryghost-html-to-plaintext-5.88.0.tgz → tryghost-html-to-plaintext-5.88.2.tgz} +0 -0
  29. package/components/tryghost-i18n-5.88.2.tgz +0 -0
  30. package/components/tryghost-importer-handler-content-files-5.88.2.tgz +0 -0
  31. package/components/{tryghost-importer-revue-5.88.0.tgz → tryghost-importer-revue-5.88.2.tgz} +0 -0
  32. package/components/tryghost-in-memory-repository-5.88.2.tgz +0 -0
  33. package/components/{tryghost-job-manager-5.88.0.tgz → tryghost-job-manager-5.88.2.tgz} +0 -0
  34. package/components/tryghost-link-redirects-5.88.2.tgz +0 -0
  35. package/components/{tryghost-link-replacer-5.88.0.tgz → tryghost-link-replacer-5.88.2.tgz} +0 -0
  36. package/components/tryghost-link-tracking-5.88.2.tgz +0 -0
  37. package/components/tryghost-magic-link-5.88.2.tgz +0 -0
  38. package/components/{tryghost-mail-events-5.88.0.tgz → tryghost-mail-events-5.88.2.tgz} +0 -0
  39. package/components/{tryghost-mailgun-client-5.88.0.tgz → tryghost-mailgun-client-5.88.2.tgz} +0 -0
  40. package/components/tryghost-member-attribution-5.88.2.tgz +0 -0
  41. package/components/tryghost-member-events-5.88.2.tgz +0 -0
  42. package/components/{tryghost-members-api-5.88.0.tgz → tryghost-members-api-5.88.2.tgz} +0 -0
  43. package/components/tryghost-members-csv-5.88.2.tgz +0 -0
  44. package/components/tryghost-members-events-service-5.88.2.tgz +0 -0
  45. package/components/{tryghost-members-importer-5.88.0.tgz → tryghost-members-importer-5.88.2.tgz} +0 -0
  46. package/components/{tryghost-members-offers-5.88.0.tgz → tryghost-members-offers-5.88.2.tgz} +0 -0
  47. package/components/tryghost-members-payments-5.88.2.tgz +0 -0
  48. package/components/tryghost-members-ssr-5.88.2.tgz +0 -0
  49. package/components/tryghost-members-stripe-service-5.88.2.tgz +0 -0
  50. package/components/tryghost-mentions-email-report-5.88.2.tgz +0 -0
  51. package/components/tryghost-milestones-5.88.2.tgz +0 -0
  52. package/components/{tryghost-minifier-5.88.0.tgz → tryghost-minifier-5.88.2.tgz} +0 -0
  53. package/components/tryghost-model-to-domain-event-interceptor-5.88.2.tgz +0 -0
  54. package/components/tryghost-mw-api-version-mismatch-5.88.2.tgz +0 -0
  55. package/components/tryghost-mw-cache-control-5.88.2.tgz +0 -0
  56. package/components/tryghost-mw-error-handler-5.88.2.tgz +0 -0
  57. package/components/{tryghost-mw-session-from-token-5.88.0.tgz → tryghost-mw-session-from-token-5.88.2.tgz} +0 -0
  58. package/components/tryghost-mw-update-user-last-seen-5.88.2.tgz +0 -0
  59. package/components/tryghost-mw-version-match-5.88.2.tgz +0 -0
  60. package/components/tryghost-mw-vhost-5.88.2.tgz +0 -0
  61. package/components/tryghost-nql-filter-expansions-5.88.2.tgz +0 -0
  62. package/components/tryghost-oembed-service-5.88.2.tgz +0 -0
  63. package/components/tryghost-package-json-5.88.2.tgz +0 -0
  64. package/components/tryghost-post-events-5.88.2.tgz +0 -0
  65. package/components/tryghost-post-revisions-5.88.2.tgz +0 -0
  66. package/components/tryghost-posts-service-5.88.2.tgz +0 -0
  67. package/components/tryghost-recommendations-5.88.2.tgz +0 -0
  68. package/components/tryghost-referrers-5.88.2.tgz +0 -0
  69. package/components/{tryghost-security-5.88.0.tgz → tryghost-security-5.88.2.tgz} +0 -0
  70. package/components/tryghost-session-service-5.88.2.tgz +0 -0
  71. package/components/tryghost-settings-path-manager-5.88.2.tgz +0 -0
  72. package/components/tryghost-slack-notifications-5.88.2.tgz +0 -0
  73. package/components/tryghost-staff-service-5.88.2.tgz +0 -0
  74. package/components/tryghost-stats-service-5.88.2.tgz +0 -0
  75. package/components/tryghost-tiers-5.88.2.tgz +0 -0
  76. package/components/{tryghost-update-check-service-5.88.0.tgz → tryghost-update-check-service-5.88.2.tgz} +0 -0
  77. package/components/tryghost-verification-trigger-5.88.2.tgz +0 -0
  78. package/components/{tryghost-version-notifications-data-service-5.88.0.tgz → tryghost-version-notifications-data-service-5.88.2.tgz} +0 -0
  79. package/components/{tryghost-webmentions-5.88.0.tgz → tryghost-webmentions-5.88.2.tgz} +0 -0
  80. package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +3 -3
  81. package/core/built/admin/assets/admin-x-activitypub/{index-b4a353e7.mjs → index-d7494526.mjs} +7342 -7382
  82. package/core/built/admin/assets/admin-x-activitypub/modals-8098b85c.mjs +663 -0
  83. package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +1 -1
  84. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-44d3cb95.mjs → CodeEditorView-3601b44e.mjs} +2 -2
  85. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
  86. package/core/built/admin/assets/admin-x-settings/{index-39f35680.mjs → index-0b24e982.mjs} +2 -2
  87. package/core/built/admin/assets/admin-x-settings/{index-e2574737.mjs → index-e7c4aa3c.mjs} +1340 -1320
  88. package/core/built/admin/assets/admin-x-settings/{modals-c7767943.mjs → modals-f8ab7cf2.mjs} +4 -4
  89. package/core/built/admin/assets/{chunk.524.66e180793119996857e4.js → chunk.524.d789401ed18183e69110.js} +5 -5
  90. package/core/built/admin/assets/{chunk.582.b59b54cc996149c42561.js → chunk.582.50a6bb6ad78373759548.js} +6 -6
  91. package/core/built/admin/assets/{ghost-03ba1e3a74e7e938cff9445d1dcff473.js → ghost-a9fa385e2a92cc3686349b2dea0249d2.js} +92 -103
  92. package/core/built/admin/assets/koenig-lexical/index.css +1 -1
  93. package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +9284 -9164
  94. package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +119 -115
  95. package/core/built/admin/index.html +3 -3
  96. package/core/frontend/helpers/comment_count.js +3 -1
  97. package/core/frontend/helpers/t.js +4 -11
  98. package/core/frontend/services/theme-engine/i18n/I18n.js +1 -1
  99. package/core/server/api/endpoints/identities.js +16 -2
  100. package/ghost.js +1 -3
  101. package/package.json +153 -153
  102. package/yarn.lock +147 -189
  103. package/components/tryghost-adapter-cache-memory-ttl-5.88.0.tgz +0 -0
  104. package/components/tryghost-adapter-manager-5.88.0.tgz +0 -0
  105. package/components/tryghost-announcement-bar-settings-5.88.0.tgz +0 -0
  106. package/components/tryghost-audience-feedback-5.88.0.tgz +0 -0
  107. package/components/tryghost-bookshelf-repository-5.88.0.tgz +0 -0
  108. package/components/tryghost-bootstrap-socket-5.88.0.tgz +0 -0
  109. package/components/tryghost-collections-5.88.0.tgz +0 -0
  110. package/components/tryghost-constants-5.88.0.tgz +0 -0
  111. package/components/tryghost-custom-theme-settings-service-5.88.0.tgz +0 -0
  112. package/components/tryghost-domain-events-5.88.0.tgz +0 -0
  113. package/components/tryghost-donations-5.88.0.tgz +0 -0
  114. package/components/tryghost-dynamic-routing-events-5.88.0.tgz +0 -0
  115. package/components/tryghost-email-analytics-service-5.88.0.tgz +0 -0
  116. package/components/tryghost-email-content-generator-5.88.0.tgz +0 -0
  117. package/components/tryghost-email-suppression-list-5.88.0.tgz +0 -0
  118. package/components/tryghost-express-dynamic-redirects-5.88.0.tgz +0 -0
  119. package/components/tryghost-external-media-inliner-5.88.0.tgz +0 -0
  120. package/components/tryghost-extract-api-key-5.88.0.tgz +0 -0
  121. package/components/tryghost-ghost-5.88.0.tgz +0 -0
  122. package/components/tryghost-i18n-5.88.0.tgz +0 -0
  123. package/components/tryghost-importer-handler-content-files-5.88.0.tgz +0 -0
  124. package/components/tryghost-in-memory-repository-5.88.0.tgz +0 -0
  125. package/components/tryghost-link-redirects-5.88.0.tgz +0 -0
  126. package/components/tryghost-link-tracking-5.88.0.tgz +0 -0
  127. package/components/tryghost-magic-link-5.88.0.tgz +0 -0
  128. package/components/tryghost-member-attribution-5.88.0.tgz +0 -0
  129. package/components/tryghost-member-events-5.88.0.tgz +0 -0
  130. package/components/tryghost-members-csv-5.88.0.tgz +0 -0
  131. package/components/tryghost-members-events-service-5.88.0.tgz +0 -0
  132. package/components/tryghost-members-payments-5.88.0.tgz +0 -0
  133. package/components/tryghost-members-ssr-5.88.0.tgz +0 -0
  134. package/components/tryghost-members-stripe-service-5.88.0.tgz +0 -0
  135. package/components/tryghost-mentions-email-report-5.88.0.tgz +0 -0
  136. package/components/tryghost-milestones-5.88.0.tgz +0 -0
  137. package/components/tryghost-model-to-domain-event-interceptor-5.88.0.tgz +0 -0
  138. package/components/tryghost-mw-api-version-mismatch-5.88.0.tgz +0 -0
  139. package/components/tryghost-mw-cache-control-5.88.0.tgz +0 -0
  140. package/components/tryghost-mw-error-handler-5.88.0.tgz +0 -0
  141. package/components/tryghost-mw-update-user-last-seen-5.88.0.tgz +0 -0
  142. package/components/tryghost-mw-version-match-5.88.0.tgz +0 -0
  143. package/components/tryghost-mw-vhost-5.88.0.tgz +0 -0
  144. package/components/tryghost-nql-filter-expansions-5.88.0.tgz +0 -0
  145. package/components/tryghost-oembed-service-5.88.0.tgz +0 -0
  146. package/components/tryghost-package-json-5.88.0.tgz +0 -0
  147. package/components/tryghost-post-events-5.88.0.tgz +0 -0
  148. package/components/tryghost-post-revisions-5.88.0.tgz +0 -0
  149. package/components/tryghost-posts-service-5.88.0.tgz +0 -0
  150. package/components/tryghost-recommendations-5.88.0.tgz +0 -0
  151. package/components/tryghost-referrers-5.88.0.tgz +0 -0
  152. package/components/tryghost-session-service-5.88.0.tgz +0 -0
  153. package/components/tryghost-settings-path-manager-5.88.0.tgz +0 -0
  154. package/components/tryghost-slack-notifications-5.88.0.tgz +0 -0
  155. package/components/tryghost-staff-service-5.88.0.tgz +0 -0
  156. package/components/tryghost-stats-service-5.88.0.tgz +0 -0
  157. package/components/tryghost-tiers-5.88.0.tgz +0 -0
  158. package/components/tryghost-verification-trigger-5.88.0.tgz +0 -0
  159. package/core/built/admin/assets/admin-x-activitypub/modals-f64a65f9.mjs +0 -514
Binary file
@@ -1,514 +0,0 @@
1
- import { u as ce, a as de, c as s, j as e, H as J, b as ue, d as se, e as me, f as I, g as D, B as K, h as xe, N as M, i as X, k as te, l as pe, m as fe, s as be, n as we, L as oe, o as le, A as ae, p as ge, q as he } from "./index-b4a353e7.mjs";
2
- const ye = ({
3
- type: t = "text",
4
- inputRef: l,
5
- title: o,
6
- hideTitle: r,
7
- value: a,
8
- error: m,
9
- placeholder: k,
10
- rightPlaceholder: c,
11
- hint: u,
12
- onChange: f,
13
- onFocus: b,
14
- onBlur: p,
15
- clearBg: w = !1,
16
- className: x = "",
17
- maxLength: F,
18
- containerClassName: $ = "",
19
- hintClassName: v = "",
20
- unstyled: g = !1,
21
- disabled: z,
22
- ...C
23
- }) => {
24
- const U = ce(), { setFocusState: A } = de(), O = (L) => {
25
- b == null || b(L), A(!0);
26
- }, T = (L) => {
27
- p == null || p(L), A(!1);
28
- }, V = s(
29
- "relative order-2 flex w-full items-center",
30
- o && !r && "mt-1.5"
31
- ), H = !g && s(
32
- "absolute inset-0 rounded-lg border text-grey-300 transition-colors peer-hover:bg-grey-100 peer-focus:border-green peer-focus:bg-white peer-focus:shadow-[0_0_0_2px_rgba(48,207,67,.25)] dark:peer-hover:bg-grey-925 dark:peer-focus:bg-grey-950",
33
- m ? "border-red bg-white dark:bg-grey-925" : "border-transparent bg-grey-150 dark:bg-grey-900",
34
- z && "bg-grey-50 peer-hover:bg-grey-50 dark:bg-grey-950 dark:peer-hover:bg-grey-950"
35
- ), N = !g && s(
36
- "peer z-[1] order-2 h-9 w-full bg-transparent px-3 py-1.5 text-sm placeholder:text-grey-500 dark:placeholder:text-grey-700 md:h-[38px] md:py-2 md:text-md",
37
- z ? "cursor-not-allowed text-grey-600 opacity-60 dark:text-grey-800" : "dark:text-white",
38
- c ? "w-0 grow rounded-l-lg" : "rounded-lg",
39
- x
40
- ), q = !g && s(
41
- "z-[1] order-3 rounded-r-lg",
42
- c ? typeof c == "string" ? "flex h-8 items-center py-1 pr-3 text-right text-sm text-grey-500 md:h-9 md:text-base" : "h-9 pr-1" : "pr-2"
43
- );
44
- let j = /* @__PURE__ */ e.jsx(e.Fragment, {});
45
- const Q = /* @__PURE__ */ e.jsx(
46
- "input",
47
- {
48
- ref: l,
49
- className: N || x,
50
- disabled: z,
51
- id: U,
52
- maxLength: F,
53
- placeholder: k,
54
- type: t,
55
- value: a,
56
- onBlur: T,
57
- onChange: f,
58
- onFocus: O,
59
- ...C
60
- }
61
- );
62
- return j = /* @__PURE__ */ e.jsxs("div", { className: V, children: [
63
- Q,
64
- !g && !w && /* @__PURE__ */ e.jsx("div", { className: H || "" }),
65
- c && /* @__PURE__ */ e.jsx("span", { className: q || "", children: c })
66
- ] }), v = s(
67
- "order-3",
68
- v
69
- ), $ = s(
70
- "flex flex-col",
71
- $
72
- ), o || u ? /* @__PURE__ */ e.jsxs("div", { className: $, children: [
73
- j,
74
- o && /* @__PURE__ */ e.jsx(J, { className: r ? "sr-only" : "order-1", htmlFor: U, useLabelTag: !0, children: o }),
75
- u && /* @__PURE__ */ e.jsx(ue, { className: v, color: m ? "red" : "default", children: u })
76
- ] }) : j;
77
- }, ke = ({
78
- shiftY: t,
79
- footerBgColorClass: l = "bg-white dark:bg-black",
80
- contentBgColorClass: o = "bg-white dark:bg-black",
81
- height: r = 96,
82
- children: a
83
- }) => {
84
- const m = s(
85
- "w-100 sticky bottom-[-24px] z-[297] m-0 box-border p-0"
86
- ), k = t ? `calc(${t} - 24px)` : "-24px", c = `${r + 24}px`, u = s(
87
- "sticky z-[298] block h-[24px]",
88
- o
89
- ), f = "0", b = s(
90
- "sticky z-[299] mb-[-24px] flex items-center justify-between",
91
- "h-[96px]",
92
- l
93
- ), p = "0", w = `${r}px`, x = "sticky mx-2 block h-[24px] rounded-full shadow-[0_0_0_1px_rgba(0,0,0,.025),0_-8px_16px_-3px_rgba(0,0,0,.08)]", F = t ? `calc(${t} + ${r - 24}px)` : `${r - 24}px`;
94
- return /* @__PURE__ */ e.jsxs(
95
- "div",
96
- {
97
- className: m,
98
- style: {
99
- bottom: k,
100
- height: c
101
- },
102
- children: [
103
- /* @__PURE__ */ e.jsx(
104
- "div",
105
- {
106
- className: u,
107
- style: {
108
- bottom: f
109
- }
110
- }
111
- ),
112
- /* @__PURE__ */ e.jsx(
113
- "div",
114
- {
115
- className: b,
116
- style: {
117
- bottom: p,
118
- height: w
119
- },
120
- children: a
121
- }
122
- ),
123
- /* @__PURE__ */ e.jsx(
124
- "div",
125
- {
126
- className: x,
127
- style: {
128
- bottom: F
129
- }
130
- }
131
- )
132
- ]
133
- }
134
- );
135
- };
136
- function ee(t, l, o = {}) {
137
- t ? M.show(Fe, {
138
- title: "Are you sure you want to leave this page?",
139
- prompt: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
140
- /* @__PURE__ */ e.jsx("p", { children: "Hey there! It looks like you didn't save the changes you made." }),
141
- /* @__PURE__ */ e.jsx("p", { children: "Save before you go!" })
142
- ] }),
143
- okLabel: "Leave",
144
- cancelLabel: "Stay",
145
- okColor: "red",
146
- onOk: (r) => {
147
- l(), r == null || r.remove();
148
- },
149
- ...o
150
- }) : l();
151
- }
152
- const ve = "bg-[rgba(98,109,121,0.2)] backdrop-blur-[3px]", G = ({
153
- size: t = "md",
154
- width: l,
155
- height: o,
156
- testId: r,
157
- title: a,
158
- okLabel: m = "OK",
159
- okLoading: k = !1,
160
- cancelLabel: c = "Cancel",
161
- footer: u,
162
- header: f,
163
- leftButtonProps: b,
164
- buttonsDisabled: p,
165
- okDisabled: w,
166
- padding: x = !0,
167
- onOk: F,
168
- okColor: $ = "black",
169
- onCancel: v,
170
- topRightContent: g,
171
- hideXOnMobile: z = !1,
172
- afterClose: C,
173
- children: U,
174
- backDrop: A = !0,
175
- backDropClick: O = !0,
176
- stickyFooter: T = !1,
177
- stickyHeader: V = !1,
178
- scrolling: H = !0,
179
- dirty: N = !1,
180
- animate: q = !0,
181
- formSheet: j = !1,
182
- enableCMDS: Q = !0
183
- }) => {
184
- const L = se(), { setGlobalDirtyState: Z } = me(), [Y, re] = I(!1);
185
- D(() => {
186
- Z(N);
187
- }, [N, Z]), D(() => {
188
- const y = (B) => {
189
- B.key === "Escape" && (document.activeElement && document.activeElement instanceof HTMLElement && document.activeElement.blur(), setTimeout(() => {
190
- v ? v() : ee(N, () => {
191
- L.remove(), C == null || C();
192
- });
193
- }), B.stopPropagation());
194
- };
195
- return document.addEventListener("keydown", y), () => {
196
- document.removeEventListener("keydown", y);
197
- };
198
- }, [L, N, C, v]), D(() => {
199
- const y = setTimeout(() => {
200
- re(!0);
201
- }, 250);
202
- return () => clearTimeout(y);
203
- }, []), D(() => {
204
- if (F) {
205
- const y = (B) => {
206
- (B.metaKey || B.ctrlKey) && B.key === "s" && (B.preventDefault(), F());
207
- };
208
- if (Q)
209
- return window.addEventListener("keydown", y), () => {
210
- window.removeEventListener("keydown", y);
211
- };
212
- }
213
- });
214
- const P = [];
215
- let _;
216
- const W = () => {
217
- ee(N, () => {
218
- L.remove(), C == null || C();
219
- });
220
- };
221
- u || (c && P.push({
222
- key: "cancel-modal",
223
- label: c,
224
- color: "outline",
225
- onClick: v || (() => {
226
- W();
227
- }),
228
- disabled: p
229
- }), m && P.push({
230
- key: "ok-modal",
231
- label: m,
232
- color: $,
233
- className: "min-w-[80px]",
234
- onClick: F,
235
- disabled: p || w,
236
- loading: k
237
- }));
238
- let i = s(
239
- "relative z-50 mx-auto flex max-h-[100%] w-full flex-col justify-between overflow-x-hidden bg-white dark:bg-black",
240
- t !== "bleed" && "rounded",
241
- j ? "shadow-md" : "shadow-xl",
242
- q && !j && !Y && "animate-modal-in",
243
- j && !Y && "animate-modal-in-reverse",
244
- H ? "overflow-y-auto" : "overflow-y-hidden"
245
- ), d = s(
246
- "fixed inset-0 z-[1000] h-[100vh] w-[100vw]"
247
- ), h = "", n = s(
248
- !g || g === "close" ? "" : "flex items-center justify-between gap-5"
249
- );
250
- switch (V && (n = s(
251
- n,
252
- "sticky top-0 z-[200] -mb-4 bg-white !pb-4 dark:bg-black"
253
- )), t) {
254
- case "sm":
255
- i = s(
256
- i,
257
- "max-w-[480px]"
258
- ), d = s(
259
- d,
260
- "p-4 md:p-[8vmin]"
261
- ), h = "p-8", n = s(
262
- n,
263
- "-inset-x-8"
264
- );
265
- break;
266
- case "md":
267
- i = s(
268
- i,
269
- "max-w-[720px]"
270
- ), d = s(
271
- d,
272
- "p-4 md:p-[8vmin]"
273
- ), h = "p-8", n = s(
274
- n,
275
- "-inset-x-8"
276
- );
277
- break;
278
- case "lg":
279
- i = s(
280
- i,
281
- "max-w-[1020px]"
282
- ), d = s(
283
- d,
284
- "p-4 md:p-[4vmin]"
285
- ), h = "p-7", n = s(
286
- n,
287
- "-inset-x-8"
288
- );
289
- break;
290
- case "xl":
291
- i = s(
292
- i,
293
- "max-w-[1240px]0"
294
- ), d = s(
295
- d,
296
- "p-4 md:p-[3vmin]"
297
- ), h = "p-10", n = s(
298
- n,
299
- "-inset-x-10 -top-10"
300
- );
301
- break;
302
- case "full":
303
- i = s(
304
- i,
305
- "h-full"
306
- ), d = s(
307
- d,
308
- "p-4 md:p-[3vmin]"
309
- ), h = "p-10", n = s(
310
- n,
311
- "-inset-x-10"
312
- );
313
- break;
314
- case "bleed":
315
- i = s(
316
- i,
317
- "h-full"
318
- ), h = "p-10", n = s(
319
- n,
320
- "-inset-x-10"
321
- );
322
- break;
323
- default:
324
- d = s(
325
- d,
326
- "p-4 md:p-[8vmin]"
327
- ), h = "p-8", n = s(
328
- n,
329
- "-inset-x-8"
330
- );
331
- break;
332
- }
333
- x || (h = "p-0"), i = s(
334
- i
335
- ), n = s(
336
- n,
337
- h,
338
- "pb-0"
339
- ), _ = s(
340
- h,
341
- "py-0"
342
- ), d = s(
343
- d,
344
- "max-[800px]:!pb-20"
345
- );
346
- const ne = s(
347
- `${h} ${T ? "py-6" : ""}`,
348
- "flex w-full items-center justify-between"
349
- );
350
- _ = s(
351
- _,
352
- (t === "full" || t === "bleed" || o === "full" || typeof o == "number") && "grow"
353
- );
354
- const ie = (y) => {
355
- y.target === y.currentTarget && O && W();
356
- }, S = {};
357
- typeof l == "number" ? (S.width = "100%", S.maxWidth = l + "px") : l === "full" && (i = s(
358
- i,
359
- "w-full"
360
- )), typeof o == "number" ? (S.height = "100%", S.maxHeight = o + "px") : o === "full" && (i = s(
361
- i,
362
- "h-full"
363
- ));
364
- let E;
365
- return u ? E = u : u === !1 ? _ += " pb-0 " : E = /* @__PURE__ */ e.jsxs("div", { className: ne, children: [
366
- /* @__PURE__ */ e.jsx("div", { children: b && /* @__PURE__ */ e.jsx(K, { ...b }) }),
367
- /* @__PURE__ */ e.jsx("div", { className: "flex gap-3", children: /* @__PURE__ */ e.jsx(xe, { buttons: P }) })
368
- ] }), E = T ? /* @__PURE__ */ e.jsx(ke, { height: 84, children: E }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: E }), /* @__PURE__ */ e.jsxs("div", { className: d, id: "modal-backdrop", onMouseDown: ie, children: [
369
- /* @__PURE__ */ e.jsx("div", { className: s(
370
- "pointer-events-none fixed inset-0 z-0",
371
- A && !j && ve,
372
- j && "bg-[rgba(98,109,121,0.08)]"
373
- ) }),
374
- /* @__PURE__ */ e.jsxs("section", { className: i, "data-testid": r, style: S, children: [
375
- f === !1 ? "" : !g || g === "close" ? /* @__PURE__ */ e.jsxs("header", { className: n, children: [
376
- a && /* @__PURE__ */ e.jsx(J, { level: 3, children: a }),
377
- /* @__PURE__ */ e.jsx("div", { className: `${g !== "close" && "md:!invisible md:!hidden"} ${z && "hidden"} absolute right-6 top-6`, children: /* @__PURE__ */ e.jsx(K, { className: "-m-2 cursor-pointer p-2 opacity-50 hover:opacity-100", icon: "close", iconColorClass: "text-black dark:text-white", size: "sm", testId: "close-modal", unstyled: !0, onClick: W }) })
378
- ] }) : /* @__PURE__ */ e.jsxs("header", { className: n, children: [
379
- a && /* @__PURE__ */ e.jsx(J, { level: 3, children: a }),
380
- g
381
- ] }),
382
- /* @__PURE__ */ e.jsx("div", { className: _, children: U }),
383
- E
384
- ] })
385
- ] });
386
- }, je = ({
387
- title: t = "Are you sure?",
388
- prompt: l,
389
- cancelLabel: o = "Cancel",
390
- okLabel: r = "OK",
391
- okRunningLabel: a = "...",
392
- okColor: m = "black",
393
- onCancel: k,
394
- onOk: c,
395
- customFooter: u,
396
- formSheet: f = !0
397
- }) => {
398
- const b = se(), [p, w] = I("");
399
- return /* @__PURE__ */ e.jsx(
400
- G,
401
- {
402
- backDropClick: !1,
403
- buttonsDisabled: p === "running",
404
- cancelLabel: o,
405
- footer: u,
406
- formSheet: f,
407
- okColor: m,
408
- okLabel: p === "running" ? a : r,
409
- testId: "confirmation-modal",
410
- title: t,
411
- width: 540,
412
- onCancel: k,
413
- onOk: async () => {
414
- w("running");
415
- try {
416
- await (c == null ? void 0 : c(b));
417
- } catch (x) {
418
- console.error("Unhandled Promise Rejection. Make sure you catch errors in your onOk handler.", x);
419
- }
420
- w("");
421
- },
422
- children: /* @__PURE__ */ e.jsx("div", { className: "py-4 leading-9", children: l })
423
- }
424
- );
425
- }, Fe = M.create(je), Ce = M.create(() => {
426
- var w;
427
- const { updateRoute: t } = X(), l = M.useModal(), o = te(), r = pe(), m = (w = fe().data) == null ? void 0 : w.site, k = (m == null ? void 0 : m.url) ?? window.location.origin, [c, u] = I(""), [f, b] = I(null), p = async () => {
428
- try {
429
- const x = new URL(`.ghost/activitypub/actions/follow/${c}`, k);
430
- await fetch(x, {
431
- method: "POST"
432
- }), be({
433
- message: "Site followed",
434
- type: "success"
435
- }), l.remove(), await r.refetchQueries({ queryKey: ["FollowingResponseData"], type: "active" }), t("");
436
- } catch {
437
- b(f);
438
- }
439
- };
440
- return /* @__PURE__ */ e.jsx(
441
- G,
442
- {
443
- afterClose: () => {
444
- o.reset(), t("");
445
- },
446
- cancelLabel: "Cancel",
447
- okLabel: "Follow",
448
- size: "sm",
449
- title: "Follow a Ghost site",
450
- onOk: p,
451
- children: /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex flex-col gap-4", children: /* @__PURE__ */ e.jsx(
452
- ye,
453
- {
454
- autoFocus: !0,
455
- error: !!f,
456
- hint: f,
457
- placeholder: "@username@hostname",
458
- title: "Profile name",
459
- value: c,
460
- "data-test-new-follower": !0,
461
- onChange: (x) => u(x.target.value)
462
- }
463
- ) })
464
- }
465
- );
466
- });
467
- function R(t) {
468
- if (!t.preferredUsername || !t.id)
469
- return "@unknown@unknown";
470
- try {
471
- return `@${t.preferredUsername}@${new URL(t.id).hostname}`;
472
- } catch {
473
- return "@unknown@unknown";
474
- }
475
- }
476
- const Ne = ({}) => {
477
- const { updateRoute: t } = X(), l = te(), { data: { items: o = [] } = {} } = we("inbox"), r = Array.isArray(o) ? o : [o];
478
- return /* @__PURE__ */ e.jsx(
479
- G,
480
- {
481
- afterClose: () => {
482
- l.reset(), t("");
483
- },
484
- cancelLabel: "",
485
- footer: !1,
486
- okLabel: "",
487
- size: "md",
488
- title: "Followers",
489
- topRightContent: "close",
490
- children: /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: /* @__PURE__ */ e.jsx(oe, { children: r.map((a) => /* @__PURE__ */ e.jsx(le, { action: /* @__PURE__ */ e.jsx(K, { color: "grey", label: "Follow back", link: !0, onClick: () => l.mutate({ username: R(a) }) }), avatar: /* @__PURE__ */ e.jsx(ae, { image: a.icon, size: "sm" }), detail: R(a), id: "list-item", title: a.name })) }) })
491
- }
492
- );
493
- }, Le = M.create(Ne), Be = ({}) => {
494
- const { updateRoute: t } = X(), l = ge(), { data: { items: o = [] } = {} } = he("inbox"), r = Array.isArray(o) ? o : [o];
495
- return /* @__PURE__ */ e.jsx(
496
- G,
497
- {
498
- afterClose: () => {
499
- l.reset(), t("");
500
- },
501
- cancelLabel: "",
502
- footer: !1,
503
- okLabel: "",
504
- size: "md",
505
- title: "Following",
506
- topRightContent: "close",
507
- children: /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: /* @__PURE__ */ e.jsx(oe, { children: r.map((a) => /* @__PURE__ */ e.jsx(le, { action: /* @__PURE__ */ e.jsx(K, { color: "grey", label: "Unfollow", link: !0, onClick: () => l.mutate({ username: R(a) }) }), avatar: /* @__PURE__ */ e.jsx(ae, { image: a.icon, size: "sm" }), detail: R(a), id: "list-item", title: a.name })) }) })
508
- }
509
- );
510
- }, Ee = M.create(Be), $e = { FollowSite: Ce, ViewFollowing: Ee, ViewFollowers: Le };
511
- export {
512
- $e as default
513
- };
514
- //# sourceMappingURL=modals-f64a65f9.mjs.map