ghost 5.94.0 → 5.94.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.
- package/components/tryghost-adapter-cache-memory-ttl-5.94.2.tgz +0 -0
- package/components/{tryghost-adapter-cache-redis-5.94.0.tgz → tryghost-adapter-cache-redis-5.94.2.tgz} +0 -0
- package/components/{tryghost-adapter-manager-5.94.0.tgz → tryghost-adapter-manager-5.94.2.tgz} +0 -0
- package/components/tryghost-announcement-bar-settings-5.94.2.tgz +0 -0
- package/components/{tryghost-api-framework-5.94.0.tgz → tryghost-api-framework-5.94.2.tgz} +0 -0
- package/components/{tryghost-api-version-compatibility-service-5.94.0.tgz → tryghost-api-version-compatibility-service-5.94.2.tgz} +0 -0
- package/components/tryghost-audience-feedback-5.94.2.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.94.2.tgz +0 -0
- package/components/{tryghost-bootstrap-socket-5.94.0.tgz → tryghost-bootstrap-socket-5.94.2.tgz} +0 -0
- package/components/tryghost-collections-5.94.2.tgz +0 -0
- package/components/tryghost-constants-5.94.2.tgz +0 -0
- package/components/{tryghost-custom-theme-settings-service-5.94.0.tgz → tryghost-custom-theme-settings-service-5.94.2.tgz} +0 -0
- package/components/{tryghost-data-generator-5.94.0.tgz → tryghost-data-generator-5.94.2.tgz} +0 -0
- package/components/tryghost-domain-events-5.94.2.tgz +0 -0
- package/components/{tryghost-donations-5.94.0.tgz → tryghost-donations-5.94.2.tgz} +0 -0
- package/components/tryghost-dynamic-routing-events-5.94.2.tgz +0 -0
- package/components/tryghost-email-addresses-5.94.2.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.94.2.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.94.2.tgz +0 -0
- package/components/{tryghost-email-content-generator-5.94.0.tgz → tryghost-email-content-generator-5.94.2.tgz} +0 -0
- package/components/{tryghost-email-events-5.94.0.tgz → tryghost-email-events-5.94.2.tgz} +0 -0
- package/components/{tryghost-email-service-5.94.0.tgz → tryghost-email-service-5.94.2.tgz} +0 -0
- package/components/tryghost-email-suppression-list-5.94.2.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.94.2.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.94.2.tgz +0 -0
- package/components/tryghost-extract-api-key-5.94.2.tgz +0 -0
- package/components/tryghost-ghost-5.94.2.tgz +0 -0
- package/components/{tryghost-html-to-plaintext-5.94.0.tgz → tryghost-html-to-plaintext-5.94.2.tgz} +0 -0
- package/components/tryghost-i18n-5.94.2.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.94.2.tgz +0 -0
- package/components/tryghost-importer-revue-5.94.2.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.94.2.tgz +0 -0
- package/components/{tryghost-job-manager-5.94.0.tgz → tryghost-job-manager-5.94.2.tgz} +0 -0
- package/components/tryghost-link-redirects-5.94.2.tgz +0 -0
- package/components/tryghost-link-replacer-5.94.2.tgz +0 -0
- package/components/{tryghost-link-tracking-5.94.0.tgz → tryghost-link-tracking-5.94.2.tgz} +0 -0
- package/components/{tryghost-magic-link-5.94.0.tgz → tryghost-magic-link-5.94.2.tgz} +0 -0
- package/components/{tryghost-mail-events-5.94.0.tgz → tryghost-mail-events-5.94.2.tgz} +0 -0
- package/components/tryghost-mailgun-client-5.94.2.tgz +0 -0
- package/components/{tryghost-member-attribution-5.94.0.tgz → tryghost-member-attribution-5.94.2.tgz} +0 -0
- package/components/{tryghost-member-events-5.94.0.tgz → tryghost-member-events-5.94.2.tgz} +0 -0
- package/components/tryghost-members-api-5.94.2.tgz +0 -0
- package/components/{tryghost-members-csv-5.94.0.tgz → tryghost-members-csv-5.94.2.tgz} +0 -0
- package/components/tryghost-members-events-service-5.94.2.tgz +0 -0
- package/components/{tryghost-members-importer-5.94.0.tgz → tryghost-members-importer-5.94.2.tgz} +0 -0
- package/components/tryghost-members-offers-5.94.2.tgz +0 -0
- package/components/tryghost-members-payments-5.94.2.tgz +0 -0
- package/components/tryghost-members-ssr-5.94.2.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.94.2.tgz +0 -0
- package/components/{tryghost-mentions-email-report-5.94.0.tgz → tryghost-mentions-email-report-5.94.2.tgz} +0 -0
- package/components/{tryghost-milestones-5.94.0.tgz → tryghost-milestones-5.94.2.tgz} +0 -0
- package/components/tryghost-minifier-5.94.2.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.94.2.tgz +0 -0
- package/components/{tryghost-mw-api-version-mismatch-5.94.0.tgz → tryghost-mw-api-version-mismatch-5.94.2.tgz} +0 -0
- package/components/tryghost-mw-cache-control-5.94.2.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.94.2.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.94.2.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.94.2.tgz +0 -0
- package/components/tryghost-mw-version-match-5.94.2.tgz +0 -0
- package/components/tryghost-mw-vhost-5.94.2.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.94.2.tgz +0 -0
- package/components/tryghost-oembed-service-5.94.2.tgz +0 -0
- package/components/{tryghost-package-json-5.94.0.tgz → tryghost-package-json-5.94.2.tgz} +0 -0
- package/components/tryghost-post-events-5.94.2.tgz +0 -0
- package/components/tryghost-post-revisions-5.94.2.tgz +0 -0
- package/components/tryghost-posts-service-5.94.2.tgz +0 -0
- package/components/tryghost-recommendations-5.94.2.tgz +0 -0
- package/components/tryghost-referrers-5.94.2.tgz +0 -0
- package/components/{tryghost-security-5.94.0.tgz → tryghost-security-5.94.2.tgz} +0 -0
- package/components/tryghost-session-service-5.94.2.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.94.2.tgz +0 -0
- package/components/tryghost-slack-notifications-5.94.2.tgz +0 -0
- package/components/{tryghost-staff-service-5.94.0.tgz → tryghost-staff-service-5.94.2.tgz} +0 -0
- package/components/tryghost-stats-service-5.94.2.tgz +0 -0
- package/components/{tryghost-tiers-5.94.0.tgz → tryghost-tiers-5.94.2.tgz} +0 -0
- package/components/{tryghost-update-check-service-5.94.0.tgz → tryghost-update-check-service-5.94.2.tgz} +0 -0
- package/components/{tryghost-verification-trigger-5.94.0.tgz → tryghost-verification-trigger-5.94.2.tgz} +0 -0
- package/components/tryghost-version-notifications-data-service-5.94.2.tgz +0 -0
- package/components/{tryghost-webmentions-5.94.0.tgz → tryghost-webmentions-5.94.2.tgz} +0 -0
- package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +2 -2
- package/core/built/admin/assets/admin-x-activitypub/{index-51277f76.mjs → index-d646c7a1.mjs} +6618 -4913
- package/core/built/admin/assets/admin-x-activitypub/modals-a8aeb643.mjs +342 -0
- package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +2 -2
- package/core/built/admin/assets/admin-x-demo/{index-bfbb9783.mjs → index-140752db.mjs} +1667 -1657
- package/core/built/admin/assets/admin-x-demo/{modals-334b160e.mjs → modals-3979b40c.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-6bb10ebd.mjs → CodeEditorView-9ca04b2a.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-a57eb33d.mjs → index-5fba7766.mjs} +1907 -1893
- package/core/built/admin/assets/admin-x-settings/{index-52f09138.mjs → index-6c87f26e.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{modals-07c66c7d.mjs → modals-80acb66f.mjs} +2107 -2101
- package/core/built/admin/assets/{chunk.524.b9da8e9c62fc112baf2b.js → chunk.524.cd82d3016052a43d2b44.js} +5 -5
- package/core/built/admin/assets/{chunk.582.27ddbcbd7a6e7a439db8.js → chunk.582.ea2e209b67019b57bff7.js} +6 -6
- package/core/built/admin/assets/{chunk.785.78610bd253a9e2419ec9.js → chunk.602.a3d38ba0a516decd78ce.js} +6089 -6078
- package/core/built/admin/assets/codemirror/{codemirror-91774021e5e17ea08db5cd2ed9f3e664.js → codemirror-730d06e33ae9af4745ddd6a1af2a66bd.js} +809 -810
- package/core/built/admin/assets/{ghost-535088daf62c8cbea78a012bb6bbafc6.js → ghost-27a2284f57455ac2e06f1553344f5ba7.js} +248 -194
- package/core/built/admin/assets/{ghost-d1c51d3a2d840dda5aa7b4ffe6057756.css → ghost-81adcc22c7836b40b08a662812319e01.css} +1 -1
- package/core/built/admin/assets/{ghost-dark-98b3a7e593292a7cb410609e17727a3c.css → ghost-dark-88c10b0aa259d4b666d6a98174c6f5bd.css} +1 -1
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +3 -3
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +3 -3
- package/core/built/admin/assets/{vendor-649dc64bfd9ecc1bd7361b53680dfdc2.js → vendor-b83f61eee071be0ef00075df9ff7782d.js} +15 -15
- package/core/built/admin/index.html +6 -6
- package/core/server/api/endpoints/utils/serializers/output/mappers/index.js +1 -0
- package/core/server/api/endpoints/utils/serializers/output/mappers/oembed.js +5 -0
- package/core/server/api/endpoints/utils/serializers/output/oembed.js +7 -0
- package/core/server/data/importer/import-manager.js +2 -2
- package/core/server/data/importer/importers/data/PostsImporter.js +2 -2
- package/core/server/data/migrations/versions/4.46/2022-04-13-12-58-fill-uuid-for-newsletters.js +2 -2
- package/core/server/data/migrations/versions/4.46/2022-04-13-13-00-add-default-newsletter.js +2 -2
- package/core/server/models/email.js +2 -2
- package/core/server/models/member.js +3 -3
- package/core/server/models/newsletter.js +2 -2
- package/core/server/models/post.js +2 -2
- package/core/server/models/settings.js +1 -2
- package/core/server/services/email-analytics/lib/queries.js +2 -2
- package/core/server/services/members-events/index.js +20 -2
- package/core/server/web/parent/middleware/request-id.js +2 -2
- package/core/shared/labs.js +2 -1
- package/core/shared/settings-cache/public.js +2 -1
- package/package.json +157 -155
- package/yarn.lock +363 -185
- package/components/tryghost-adapter-cache-memory-ttl-5.94.0.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.94.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.94.0.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.94.0.tgz +0 -0
- package/components/tryghost-collections-5.94.0.tgz +0 -0
- package/components/tryghost-constants-5.94.0.tgz +0 -0
- package/components/tryghost-domain-events-5.94.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.94.0.tgz +0 -0
- package/components/tryghost-email-addresses-5.94.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.94.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.94.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.94.0.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.94.0.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.94.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.94.0.tgz +0 -0
- package/components/tryghost-ghost-5.94.0.tgz +0 -0
- package/components/tryghost-i18n-5.94.0.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.94.0.tgz +0 -0
- package/components/tryghost-importer-revue-5.94.0.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.94.0.tgz +0 -0
- package/components/tryghost-link-redirects-5.94.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.94.0.tgz +0 -0
- package/components/tryghost-mailgun-client-5.94.0.tgz +0 -0
- package/components/tryghost-members-api-5.94.0.tgz +0 -0
- package/components/tryghost-members-events-service-5.94.0.tgz +0 -0
- package/components/tryghost-members-offers-5.94.0.tgz +0 -0
- package/components/tryghost-members-payments-5.94.0.tgz +0 -0
- package/components/tryghost-members-ssr-5.94.0.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.94.0.tgz +0 -0
- package/components/tryghost-minifier-5.94.0.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.94.0.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.94.0.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.94.0.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.94.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.94.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.94.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.94.0.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.94.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.94.0.tgz +0 -0
- package/components/tryghost-post-events-5.94.0.tgz +0 -0
- package/components/tryghost-post-revisions-5.94.0.tgz +0 -0
- package/components/tryghost-posts-service-5.94.0.tgz +0 -0
- package/components/tryghost-recommendations-5.94.0.tgz +0 -0
- package/components/tryghost-referrers-5.94.0.tgz +0 -0
- package/components/tryghost-session-service-5.94.0.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.94.0.tgz +0 -0
- package/components/tryghost-slack-notifications-5.94.0.tgz +0 -0
- package/components/tryghost-stats-service-5.94.0.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.94.0.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/modals-c85985ad.mjs +0 -815
- /package/core/built/admin/assets/{chunk.785.78610bd253a9e2419ec9.js.LICENSE.txt → chunk.602.a3d38ba0a516decd78ce.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { u as se, a as oe, c as u, j as e, $ as z, H as ae, b as ne, d as le, e as ie, f as ce, g as E, h as de, i as ue, k as C, l as f, P as S, m as P, S as ge, N as v, n as $, M as N, o as R, A as M, p as xe, s as fe, L as B, B as q, q as A, r as T } from "./index-d646c7a1.mjs";
|
|
2
|
+
const me = ({
|
|
3
|
+
type: s = "text",
|
|
4
|
+
inputRef: a,
|
|
5
|
+
title: t,
|
|
6
|
+
hideTitle: r,
|
|
7
|
+
value: n,
|
|
8
|
+
error: o,
|
|
9
|
+
placeholder: i,
|
|
10
|
+
rightPlaceholder: l,
|
|
11
|
+
hint: c,
|
|
12
|
+
onChange: d,
|
|
13
|
+
onFocus: m,
|
|
14
|
+
onBlur: g,
|
|
15
|
+
clearBg: p = !1,
|
|
16
|
+
className: w = "",
|
|
17
|
+
maxLength: b,
|
|
18
|
+
containerClassName: x = "",
|
|
19
|
+
hintClassName: y = "",
|
|
20
|
+
unstyled: h = !1,
|
|
21
|
+
disabled: j,
|
|
22
|
+
...X
|
|
23
|
+
}) => {
|
|
24
|
+
const F = se(), { setFocusState: I } = oe(), Y = (L) => {
|
|
25
|
+
m == null || m(L), I(!0);
|
|
26
|
+
}, Z = (L) => {
|
|
27
|
+
g == null || g(L), I(!1);
|
|
28
|
+
}, D = u(
|
|
29
|
+
"relative order-2 flex w-full items-center",
|
|
30
|
+
t && !r && "mt-1.5"
|
|
31
|
+
), _ = !h && u(
|
|
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
|
+
o ? "border-red bg-white dark:bg-grey-925" : "border-transparent bg-grey-150 dark:bg-grey-900",
|
|
34
|
+
j && "bg-grey-50 peer-hover:bg-grey-50 dark:bg-grey-950 dark:peer-hover:bg-grey-950"
|
|
35
|
+
), ee = !h && u(
|
|
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
|
+
j ? "cursor-not-allowed text-grey-600 opacity-60 dark:text-grey-800" : "dark:text-white",
|
|
38
|
+
l ? "w-0 grow rounded-l-lg" : "rounded-lg",
|
|
39
|
+
w
|
|
40
|
+
), te = !h && u(
|
|
41
|
+
"z-[1] order-3 rounded-r-lg",
|
|
42
|
+
l ? typeof l == "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 k = /* @__PURE__ */ e.jsx(e.Fragment, {});
|
|
45
|
+
const re = /* @__PURE__ */ e.jsx(
|
|
46
|
+
"input",
|
|
47
|
+
{
|
|
48
|
+
ref: a,
|
|
49
|
+
className: ee || w,
|
|
50
|
+
disabled: j,
|
|
51
|
+
id: F,
|
|
52
|
+
maxLength: b,
|
|
53
|
+
placeholder: i,
|
|
54
|
+
type: s,
|
|
55
|
+
value: n,
|
|
56
|
+
onBlur: Z,
|
|
57
|
+
onChange: d,
|
|
58
|
+
onFocus: Y,
|
|
59
|
+
...X
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
return k = /* @__PURE__ */ e.jsx(le, { name: F, asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: D, children: [
|
|
63
|
+
/* @__PURE__ */ e.jsx(ie, { asChild: !0, children: re }),
|
|
64
|
+
!h && !p && /* @__PURE__ */ e.jsx("div", { className: _ || "" }),
|
|
65
|
+
l && /* @__PURE__ */ e.jsx("span", { className: te || "", children: l })
|
|
66
|
+
] }) }), y = u(
|
|
67
|
+
"order-3",
|
|
68
|
+
y
|
|
69
|
+
), x = u(
|
|
70
|
+
"flex flex-col",
|
|
71
|
+
x
|
|
72
|
+
), t || c ? /* @__PURE__ */ e.jsx(z, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: x, children: [
|
|
73
|
+
k,
|
|
74
|
+
t && /* @__PURE__ */ e.jsx(ae, { className: r ? "sr-only" : "order-1", htmlFor: F, useLabelTag: !0, children: t }),
|
|
75
|
+
c && /* @__PURE__ */ e.jsx(ne, { className: y, color: o ? "red" : "default", children: c })
|
|
76
|
+
] }) }) : /* @__PURE__ */ e.jsx(z, { asChild: !0, children: k });
|
|
77
|
+
};
|
|
78
|
+
function pe(s) {
|
|
79
|
+
const a = ce(s);
|
|
80
|
+
return E(() => {
|
|
81
|
+
a.current = s;
|
|
82
|
+
}), de(() => (...t) => {
|
|
83
|
+
var r;
|
|
84
|
+
return (r = a.current) == null ? void 0 : r.call(a, ...t);
|
|
85
|
+
}, []);
|
|
86
|
+
}
|
|
87
|
+
var U = "Avatar", [we, Me] = ue(U), [he, V] = we(U), H = C(
|
|
88
|
+
(s, a) => {
|
|
89
|
+
const { __scopeAvatar: t, ...r } = s, [n, o] = f("idle");
|
|
90
|
+
return /* @__PURE__ */ e.jsx(
|
|
91
|
+
he,
|
|
92
|
+
{
|
|
93
|
+
scope: t,
|
|
94
|
+
imageLoadingStatus: n,
|
|
95
|
+
onImageLoadingStatusChange: o,
|
|
96
|
+
children: /* @__PURE__ */ e.jsx(S.span, { ...r, ref: a })
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
H.displayName = U;
|
|
102
|
+
var K = "AvatarImage", G = C(
|
|
103
|
+
(s, a) => {
|
|
104
|
+
const { __scopeAvatar: t, src: r, onLoadingStatusChange: n = () => {
|
|
105
|
+
}, ...o } = s, i = V(K, t), l = ve(r), c = pe((d) => {
|
|
106
|
+
n(d), i.onImageLoadingStatusChange(d);
|
|
107
|
+
});
|
|
108
|
+
return P(() => {
|
|
109
|
+
l !== "idle" && c(l);
|
|
110
|
+
}, [l, c]), l === "loaded" ? /* @__PURE__ */ e.jsx(S.img, { ...o, ref: a, src: r }) : null;
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
G.displayName = K;
|
|
114
|
+
var O = "AvatarFallback", Q = C(
|
|
115
|
+
(s, a) => {
|
|
116
|
+
const { __scopeAvatar: t, delayMs: r, ...n } = s, o = V(O, t), [i, l] = f(r === void 0);
|
|
117
|
+
return E(() => {
|
|
118
|
+
if (r !== void 0) {
|
|
119
|
+
const c = window.setTimeout(() => l(!0), r);
|
|
120
|
+
return () => window.clearTimeout(c);
|
|
121
|
+
}
|
|
122
|
+
}, [r]), i && o.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e.jsx(S.span, { ...n, ref: a }) : null;
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
Q.displayName = O;
|
|
126
|
+
function ve(s) {
|
|
127
|
+
const [a, t] = f("idle");
|
|
128
|
+
return P(() => {
|
|
129
|
+
if (!s) {
|
|
130
|
+
t("error");
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
let r = !0;
|
|
134
|
+
const n = new window.Image(), o = (i) => () => {
|
|
135
|
+
r && t(i);
|
|
136
|
+
};
|
|
137
|
+
return t("loading"), n.onload = o("loaded"), n.onerror = o("error"), n.src = s, () => {
|
|
138
|
+
r = !1;
|
|
139
|
+
};
|
|
140
|
+
}, [s]), a;
|
|
141
|
+
}
|
|
142
|
+
var be = H, ye = G, je = Q;
|
|
143
|
+
const J = ({ image: s, label: a, labelColor: t, bgColor: r, size: n, className: o }) => {
|
|
144
|
+
let i = "", l = " -mb-2 ";
|
|
145
|
+
switch (n) {
|
|
146
|
+
case "sm":
|
|
147
|
+
i = " w-7 h-7 text-sm ";
|
|
148
|
+
break;
|
|
149
|
+
case "lg":
|
|
150
|
+
i = " w-12 h-12 text-xl ";
|
|
151
|
+
break;
|
|
152
|
+
case "xl":
|
|
153
|
+
i = " w-16 h-16 text-2xl ", l = " -mb-3 ";
|
|
154
|
+
break;
|
|
155
|
+
case "2xl":
|
|
156
|
+
i = " w-20 h-20 text-2xl ", l = " -mb-3 ";
|
|
157
|
+
break;
|
|
158
|
+
default:
|
|
159
|
+
i = " w-10 h-10 text-md ";
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
return /* @__PURE__ */ e.jsxs(be, { className: `relative inline-flex select-none items-center justify-center overflow-hidden rounded-full align-middle ${i}`, children: [
|
|
163
|
+
s ? /* @__PURE__ */ e.jsx(ye, { className: `absolute z-20 h-full w-full object-cover ${o && o}`, src: s }) : /* @__PURE__ */ e.jsx("span", { className: `${t && `text-${t}`} relative z-10 inline-flex h-full w-full items-center justify-center p-2 font-semibold ${o && o}`, style: r ? { backgroundColor: r } : {}, children: a }),
|
|
164
|
+
/* @__PURE__ */ e.jsx(je, { asChild: !0, children: /* @__PURE__ */ e.jsx(ge, { className: `${l} absolute z-0 h-full w-full text-grey-300` }) })
|
|
165
|
+
] });
|
|
166
|
+
}, W = ({
|
|
167
|
+
id: s,
|
|
168
|
+
title: a,
|
|
169
|
+
detail: t,
|
|
170
|
+
action: r,
|
|
171
|
+
hideActions: n,
|
|
172
|
+
avatar: o,
|
|
173
|
+
className: i,
|
|
174
|
+
testId: l,
|
|
175
|
+
separator: c = !0,
|
|
176
|
+
bgOnHover: d = !0,
|
|
177
|
+
paddingRight: m = !0,
|
|
178
|
+
onClick: g,
|
|
179
|
+
children: p
|
|
180
|
+
}) => {
|
|
181
|
+
const w = (x) => {
|
|
182
|
+
g == null || g(x);
|
|
183
|
+
}, b = u(
|
|
184
|
+
"group/list-item flex items-center justify-between",
|
|
185
|
+
d && "hover:bg-gradient-to-r hover:from-white hover:to-grey-50 dark:hover:from-black dark:hover:to-grey-950",
|
|
186
|
+
c ? "border-b border-grey-100 last-of-type:border-b-transparent hover:border-grey-200 dark:border-grey-900 dark:hover:border-grey-800" : "border-y border-transparent hover:border-grey-200 first-of-type:hover:border-t-transparent dark:hover:border-grey-800",
|
|
187
|
+
i
|
|
188
|
+
);
|
|
189
|
+
return /* @__PURE__ */ e.jsxs("div", { className: b, "data-testid": l, children: [
|
|
190
|
+
p || /* @__PURE__ */ e.jsxs("div", { className: `flex grow items-center gap-3 ${g && "cursor-pointer"}`, onClick: w, children: [
|
|
191
|
+
o && o,
|
|
192
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col py-3 pr-6", id: s, children: [
|
|
193
|
+
/* @__PURE__ */ e.jsx("span", { children: a }),
|
|
194
|
+
t && /* @__PURE__ */ e.jsx("span", { className: "text-xs text-grey-700", children: t })
|
|
195
|
+
] })
|
|
196
|
+
] }),
|
|
197
|
+
r && /* @__PURE__ */ e.jsx("div", { className: `visible py-3 md:pl-6 ${m && "md:pr-6"} ${n ? "group-hover/list-item:visible md:invisible" : ""}`, children: r })
|
|
198
|
+
] });
|
|
199
|
+
};
|
|
200
|
+
function Fe(s, a, t) {
|
|
201
|
+
var l;
|
|
202
|
+
const n = (l = R().data) == null ? void 0 : l.site, o = (n == null ? void 0 : n.url) ?? window.location.origin, i = new M(
|
|
203
|
+
new URL(o),
|
|
204
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
205
|
+
s
|
|
206
|
+
);
|
|
207
|
+
return xe({
|
|
208
|
+
async mutationFn(c) {
|
|
209
|
+
return i.follow(c);
|
|
210
|
+
},
|
|
211
|
+
onSuccess: a,
|
|
212
|
+
onError: t
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
const ke = v.create(() => {
|
|
216
|
+
const { updateRoute: s } = $(), a = v.useModal(), [t, r] = f(""), [n, o] = f(null);
|
|
217
|
+
async function i() {
|
|
218
|
+
fe({
|
|
219
|
+
message: "Site followed",
|
|
220
|
+
type: "success"
|
|
221
|
+
}), a.remove(), s("");
|
|
222
|
+
}
|
|
223
|
+
async function l() {
|
|
224
|
+
o(n);
|
|
225
|
+
}
|
|
226
|
+
const c = Fe("index", i, l);
|
|
227
|
+
return /* @__PURE__ */ e.jsx(
|
|
228
|
+
N,
|
|
229
|
+
{
|
|
230
|
+
afterClose: () => {
|
|
231
|
+
c.reset(), s("");
|
|
232
|
+
},
|
|
233
|
+
cancelLabel: "Cancel",
|
|
234
|
+
okLabel: "Follow",
|
|
235
|
+
size: "sm",
|
|
236
|
+
title: "Follow a Ghost site",
|
|
237
|
+
onOk: () => c.mutate(t),
|
|
238
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex flex-col gap-4", children: /* @__PURE__ */ e.jsx(
|
|
239
|
+
me,
|
|
240
|
+
{
|
|
241
|
+
autoFocus: !0,
|
|
242
|
+
error: !!n,
|
|
243
|
+
hint: n,
|
|
244
|
+
placeholder: "@username@hostname",
|
|
245
|
+
title: "Profile name",
|
|
246
|
+
value: t,
|
|
247
|
+
"data-test-new-follower": !0,
|
|
248
|
+
onChange: (d) => r(d.target.value)
|
|
249
|
+
}
|
|
250
|
+
) })
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
});
|
|
254
|
+
function Le(s) {
|
|
255
|
+
var o;
|
|
256
|
+
const t = (o = R().data) == null ? void 0 : o.site, r = (t == null ? void 0 : t.url) ?? window.location.origin, n = new M(
|
|
257
|
+
new URL(r),
|
|
258
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
259
|
+
s
|
|
260
|
+
);
|
|
261
|
+
return T({
|
|
262
|
+
queryKey: [`followers:${s}`],
|
|
263
|
+
async queryFn() {
|
|
264
|
+
const i = await n.getFollowers();
|
|
265
|
+
return await Promise.all(i.map((c) => n.getActor(c)));
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
const Ae = ({}) => {
|
|
270
|
+
const { updateRoute: s } = $(), { data: a = [], isLoading: t } = Le("index");
|
|
271
|
+
return /* @__PURE__ */ e.jsx(
|
|
272
|
+
N,
|
|
273
|
+
{
|
|
274
|
+
afterClose: () => {
|
|
275
|
+
s("profile");
|
|
276
|
+
},
|
|
277
|
+
cancelLabel: "",
|
|
278
|
+
footer: !1,
|
|
279
|
+
okLabel: "",
|
|
280
|
+
size: "md",
|
|
281
|
+
title: "Followers",
|
|
282
|
+
topRightContent: "close",
|
|
283
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: t ? /* @__PURE__ */ e.jsx("p", { children: "Loading followers..." }) : /* @__PURE__ */ e.jsx(B, { children: a.map((r) => /* @__PURE__ */ e.jsx(
|
|
284
|
+
W,
|
|
285
|
+
{
|
|
286
|
+
action: /* @__PURE__ */ e.jsx(q, { color: "grey", label: "Remove", link: !0 }),
|
|
287
|
+
avatar: /* @__PURE__ */ e.jsx(J, { image: r.icon, size: "sm" }),
|
|
288
|
+
detail: A(r),
|
|
289
|
+
id: "list-item",
|
|
290
|
+
title: r.name || A(r)
|
|
291
|
+
},
|
|
292
|
+
r.id
|
|
293
|
+
)) }) })
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
}, Ce = v.create(Ae);
|
|
297
|
+
function Se(s) {
|
|
298
|
+
var o;
|
|
299
|
+
const t = (o = R().data) == null ? void 0 : o.site, r = (t == null ? void 0 : t.url) ?? window.location.origin, n = new M(
|
|
300
|
+
new URL(r),
|
|
301
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
302
|
+
s
|
|
303
|
+
);
|
|
304
|
+
return T({
|
|
305
|
+
queryKey: [`following:${s}`],
|
|
306
|
+
async queryFn() {
|
|
307
|
+
return n.getFollowing();
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
const $e = ({}) => {
|
|
312
|
+
const { updateRoute: s } = $(), { data: a = [] } = Se("index");
|
|
313
|
+
return /* @__PURE__ */ e.jsx(
|
|
314
|
+
N,
|
|
315
|
+
{
|
|
316
|
+
afterClose: () => {
|
|
317
|
+
s("profile");
|
|
318
|
+
},
|
|
319
|
+
cancelLabel: "",
|
|
320
|
+
footer: !1,
|
|
321
|
+
okLabel: "",
|
|
322
|
+
size: "md",
|
|
323
|
+
title: "Following",
|
|
324
|
+
topRightContent: "close",
|
|
325
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: /* @__PURE__ */ e.jsx(B, { children: a.map((t) => /* @__PURE__ */ e.jsx(
|
|
326
|
+
W,
|
|
327
|
+
{
|
|
328
|
+
action: /* @__PURE__ */ e.jsx(q, { color: "grey", label: "Unfollow", link: !0 }),
|
|
329
|
+
avatar: /* @__PURE__ */ e.jsx(J, { image: t.icon, size: "sm" }),
|
|
330
|
+
detail: A(t),
|
|
331
|
+
id: "list-item",
|
|
332
|
+
title: t.name
|
|
333
|
+
},
|
|
334
|
+
t.id
|
|
335
|
+
)) }) })
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
}, Ne = v.create($e), Ue = { FollowSite: ke, ViewFollowing: Ne, ViewFollowers: Ce };
|
|
339
|
+
export {
|
|
340
|
+
Ue as default
|
|
341
|
+
};
|
|
342
|
+
//# sourceMappingURL=modals-a8aeb643.mjs.map
|