@jant/core 0.6.2 → 0.6.3
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/dist/app-BX2XKxq0.js +6 -0
- package/dist/{app-Ct9c4zYF.js → app-CyysIxj_.js} +183 -205
- package/dist/client/.vite/manifest.json +3 -3
- package/dist/client/_assets/client-BMPMuwvV.css +2 -0
- package/dist/client/_assets/{client-Bp2IPjDe.js → client-CTrEFM5W.js} +1 -1
- package/dist/client/_assets/{client-auth-C4hQWqH1.js → client-auth-LBSZxqNC.js} +21 -21
- package/dist/{export-O2w3AsZX.js → export-CzuQyg5h.js} +28 -15
- package/dist/{github-sync-BUzIYouS.js → github-sync-CerNYCAn.js} +2 -2
- package/dist/{github-sync-D49RADci.js → github-sync-Dbrb1DS5.js} +5 -2
- package/dist/index.js +3 -3
- package/dist/node.js +4 -4
- package/package.json +1 -1
- package/src/__tests__/export-service.test.ts +127 -0
- package/src/client/components/__tests__/jant-collection-directory.test.ts +0 -42
- package/src/client/components/collection-manager-types.ts +0 -2
- package/src/client/components/jant-collection-directory.ts +0 -23
- package/src/i18n/locales/public/en.po +0 -12
- package/src/i18n/locales/public/zh-Hans.po +0 -12
- package/src/i18n/locales/public/zh-Hant.po +0 -12
- package/src/lib/github-sync-site-config.ts +4 -2
- package/src/services/export-theme/styles/main.css +4 -3
- package/src/services/export.ts +47 -17
- package/src/services/github-sync.ts +8 -2
- package/src/styles/ui.css +23 -46
- package/src/ui/pages/CollectionsPage.tsx +0 -22
- package/src/ui/shared/CollectionsManager.tsx +6 -41
- package/dist/app-CUZaVgsC.js +0 -6
- package/dist/client/_assets/client-YVrRjAid.css +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as toPublicPath, a as getSitePathPrefix, c as normalizePath, d as sanitizeUrl, f as slugify, g as toPublicHref, h as toAbsoluteSiteUrl, i as getSiteOrigin, m as toAbsoluteAssetUrl, n as extractDisplayDomain, o as isFullUrl, p as stripSitePathPrefix, r as extractDomain, s as isSafeInternalRedirect, t as buildSiteUrl, u as normalizeSiteUrl, y as __exportAll } from "./url-XF0GbKGO.js";
|
|
2
|
-
import { A as JANT_POSITIVE_LOGO_PNG_FILENAME, B as getJantLogoHref, C as formatYearMonth, D as HOME_BRANDING_LINK_LABEL, E as toISOString, F as getJantBundledAsset, G as base64ToUint8Array, H as JANT_LOGO_PATH_DATA, I as getJantIconFilename, L as getJantIconHref, M as getDefaultJantAppleTouchIconBytes, N as getDefaultJantFaviconIcoBytes, O as HOME_BRANDING_PREFIX, P as getJantBrandPackHref, R as getJantLogoFilename, S as formatTime, U as JANT_LOGO_VIEW_BOX, V as getJantPositiveLogoPngHref, W as arrayBufferToBase64, _ as getMediaUrl, b as formatRelativeAge, d as extractSummaryHtml, f as renderTiptapDocument, g as getImageUrl, h as escapeHtml, i as tiptapJsonToMarkdown, j as JANT_REPO_URL, k as JANT_BRAND_PACK_FILENAME, l as extractBodyText, m as trimTiptapBody, o as render, p as renderTiptapJson, s as toPlainText, t as createExportService, u as extractSummary, v as getPublicUrlForProvider, w as now, x as formatRelativeTime, y as formatDate, z as getJantLogoFills } from "./export-
|
|
2
|
+
import { A as JANT_POSITIVE_LOGO_PNG_FILENAME, B as getJantLogoHref, C as formatYearMonth, D as HOME_BRANDING_LINK_LABEL, E as toISOString, F as getJantBundledAsset, G as base64ToUint8Array, H as JANT_LOGO_PATH_DATA, I as getJantIconFilename, L as getJantIconHref, M as getDefaultJantAppleTouchIconBytes, N as getDefaultJantFaviconIcoBytes, O as HOME_BRANDING_PREFIX, P as getJantBrandPackHref, R as getJantLogoFilename, S as formatTime, U as JANT_LOGO_VIEW_BOX, V as getJantPositiveLogoPngHref, W as arrayBufferToBase64, _ as getMediaUrl, b as formatRelativeAge, d as extractSummaryHtml, f as renderTiptapDocument, g as getImageUrl, h as escapeHtml, i as tiptapJsonToMarkdown, j as JANT_REPO_URL, k as JANT_BRAND_PACK_FILENAME, l as extractBodyText, m as trimTiptapBody, o as render, p as renderTiptapJson, s as toPlainText, t as createExportService, u as extractSummary, v as getPublicUrlForProvider, w as now, x as formatRelativeTime, y as formatDate, z as getJantLogoFills } from "./export-CzuQyg5h.js";
|
|
3
3
|
import { S as getTelegramWebhookSecret, T as coalesceDisplayText, _ as getInternalAdminToken, a as getConfiguredSingleSiteUrl, b as getSiteResolutionMode, c as getDevApiToken, d as getHostedControlPlaneBaseUrl, f as getHostedControlPlaneDomainCheckSecret, g as getHostedControlPlaneSsoSecret, h as getHostedControlPlaneProviderLabel$1, i as getConfiguredSingleSitePathPrefix, l as getEnvString, m as getHostedControlPlaneInternalToken, n as getAuthSecret, o as getConfiguredStorageDriver, p as getHostedControlPlaneInternalBaseUrl, r as getConfiguredSingleSiteOrigin, s as getCorsOrigins, u as getGitHubAppConfig, v as getLocalStoragePath, w as shouldUseSecureCookies, x as getTelegramBotPool } from "./env-CoSe-1y4.js";
|
|
4
|
-
import { l as markdownToTiptapJson, o as createGitHubSyncService } from "./github-sync-
|
|
4
|
+
import { l as markdownToTiptapJson, o as createGitHubSyncService } from "./github-sync-Dbrb1DS5.js";
|
|
5
5
|
import { a as listInstallationReposPage, n as getInstallation, o as searchInstallationRepos, t as buildInstallUrl } from "./github-app-DeX6Td1O.js";
|
|
6
6
|
import { r as parseRepoSlug, t as createGitHubClient } from "./github-api-UD4u_7fa.js";
|
|
7
7
|
import { I18n } from "@lingui/core";
|
|
@@ -3419,10 +3419,10 @@ function normalizeThemeColorForMeta(color) {
|
|
|
3419
3419
|
* internal paths (e.g. `/_assets/client-HASH.js`) embedded by the Worker build
|
|
3420
3420
|
* from the Vite client manifest. Used only in production (IS_VITE_DEV=false).
|
|
3421
3421
|
*/ var IS_VITE_DEV = typeof __JANT_DEV__ !== "undefined" && __JANT_DEV__ === true;
|
|
3422
|
-
var CORE_VERSION = "0.6.
|
|
3423
|
-
var CLIENT_JS_FILE = "/_assets/client-
|
|
3424
|
-
var CLIENT_AUTH_JS_FILE = "/_assets/client-auth-
|
|
3425
|
-
var CLIENT_CSS_FILE = "/_assets/client-
|
|
3422
|
+
var CORE_VERSION = "0.6.3-2de57b4c4be1aa1c";
|
|
3423
|
+
var CLIENT_JS_FILE = "/_assets/client-CTrEFM5W.js";
|
|
3424
|
+
var CLIENT_AUTH_JS_FILE = "/_assets/client-auth-LBSZxqNC.js";
|
|
3425
|
+
var CLIENT_CSS_FILE = "/_assets/client-BMPMuwvV.css";
|
|
3426
3426
|
var CLIENT_CJK_CSS_FILE = "/_assets/client-cjk-B7Z0snDu.css";
|
|
3427
3427
|
var CLIENT_CJK_TC_CSS_FILE = "/_assets/client-cjk-tc-BesJYrb2.css";
|
|
3428
3428
|
var CLIENT_CJK_JP_CSS_FILE = "/_assets/client-cjk-jp-DZwrTzQC.css";
|
|
@@ -3740,7 +3740,7 @@ var IconSprite = () => {
|
|
|
3740
3740
|
const cjkSerifFont = appConfig?.cjkSerifFont ?? "off";
|
|
3741
3741
|
const cjkStylesheetPath = cjkSerifFont === "zh-Hans" ? IS_VITE_DEV ? assetPath("/src/style-cjk.css") : toPublicAssetPath(CLIENT_CJK_CSS_FILE, assetBasePath) : cjkSerifFont === "zh-Hant" ? IS_VITE_DEV ? assetPath("/src/style-cjk-tc.css") : toPublicAssetPath(CLIENT_CJK_TC_CSS_FILE, assetBasePath) : cjkSerifFont === "ja" ? IS_VITE_DEV ? assetPath("/src/style-cjk-jp.css") : toPublicAssetPath(CLIENT_CJK_JP_CSS_FILE, assetBasePath) : cjkSerifFont === "ko" ? IS_VITE_DEV ? assetPath("/src/style-cjk-kr.css") : toPublicAssetPath(CLIENT_CJK_KR_CSS_FILE, assetBasePath) : null;
|
|
3742
3742
|
const clientScriptPath = IS_VITE_DEV ? resolvedClientBundle === "full" ? assetPath("/src/client-auth.ts") : assetPath("/src/client.ts") : toPublicAssetPath(resolvedClientBundle === "full" ? CLIENT_AUTH_JS_FILE : CLIENT_JS_FILE, assetBasePath);
|
|
3743
|
-
const faviconAssetVersion = resolvedFaviconVersion || "0.6.
|
|
3743
|
+
const faviconAssetVersion = resolvedFaviconVersion || "0.6.3-2de57b4c4be1aa1c";
|
|
3744
3744
|
const resolvedFaviconHref = faviconHref ?? (faviconAssetVersion ? toPublicPath(`/favicon.ico?v=${faviconAssetVersion}`, sitePathPrefix) : toPublicPath("/favicon.ico", sitePathPrefix));
|
|
3745
3745
|
const resolvedAppleTouchHref = appleTouchHref ?? (faviconAssetVersion ? toPublicPath(`/apple-touch-icon.png?v=${faviconAssetVersion}`, sitePathPrefix) : toPublicPath("/apple-touch-icon.png", sitePathPrefix));
|
|
3746
3746
|
const socialImageHref = resolvedSocialImagePath ? toAbsoluteAssetUrl(resolvedSocialImagePath, appConfig?.siteUrl || "", sitePathPrefix) : "";
|
|
@@ -15153,18 +15153,13 @@ var CollectionDirectory = ({ items, emptyMessage, sitePathPrefix = "" }) => {
|
|
|
15153
15153
|
//#endregion
|
|
15154
15154
|
//#region src/ui/shared/CollectionsManager.tsx
|
|
15155
15155
|
var escapeJson = (data) => JSON.stringify(data).replace(/</g, "\\u003c");
|
|
15156
|
-
var countCollections$1 = (items) => items.filter((item) => item.type === "collection" && item.collection).length;
|
|
15157
15156
|
var CollectionsManager = ({ items, sitePathPrefix = "" }) => {
|
|
15158
15157
|
const { i18n } = useLingui();
|
|
15159
15158
|
const collectionsHref = toPublicPath(getCollectionsDirectoryPath(), sitePathPrefix);
|
|
15160
15159
|
const newCollectionHref = toPublicPath(`${getNewCollectionPath()}?returnTo=${encodeURIComponent(collectionsHref)}`, sitePathPrefix);
|
|
15161
|
-
const collectionCount = countCollections$1(items);
|
|
15162
|
-
const collectionCountLabel = `${collectionCount} ${collectionCount === 1 ? i18n._({ id: "sgr2wQ" }) : i18n._({ id: "CAh1km" })}`;
|
|
15163
15160
|
const mutationLabels = getCollectionMutationLabels(i18n);
|
|
15164
15161
|
const labels = {
|
|
15165
15162
|
collectionsTitle: i18n._({ id: "DoJzLz" }),
|
|
15166
|
-
collectionSingular: i18n._({ id: "sgr2wQ" }),
|
|
15167
|
-
collectionPlural: i18n._({ id: "CAh1km" }),
|
|
15168
15163
|
organize: i18n._({ id: "nV6twc" }),
|
|
15169
15164
|
done: i18n._({ id: "DPfwMq" }),
|
|
15170
15165
|
organizeHint: i18n._({ id: "r7kcaA" }),
|
|
@@ -15187,192 +15182,182 @@ var CollectionsManager = ({ items, sitePathPrefix = "" }) => {
|
|
|
15187
15182
|
class: "collections-page-header",
|
|
15188
15183
|
children: /* @__PURE__ */ jsxDEV$1("div", {
|
|
15189
15184
|
class: "collections-page-heading page-intro",
|
|
15190
|
-
children: [
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
|
|
15194
|
-
|
|
15195
|
-
|
|
15196
|
-
|
|
15197
|
-
|
|
15198
|
-
|
|
15199
|
-
|
|
15200
|
-
|
|
15201
|
-
|
|
15202
|
-
|
|
15203
|
-
|
|
15185
|
+
children: [/* @__PURE__ */ jsxDEV$1("div", {
|
|
15186
|
+
class: "page-intro-title-row",
|
|
15187
|
+
children: [/* @__PURE__ */ jsxDEV$1("h1", {
|
|
15188
|
+
class: "page-intro-title",
|
|
15189
|
+
children: labels.collectionsTitle
|
|
15190
|
+
}), /* @__PURE__ */ jsxDEV$1("div", {
|
|
15191
|
+
class: "collections-page-actions",
|
|
15192
|
+
children: [/* @__PURE__ */ jsxDEV$1("div", {
|
|
15193
|
+
class: "collections-page-action-group",
|
|
15194
|
+
"data-collections-reorder-actions": true,
|
|
15195
|
+
hidden: true,
|
|
15196
|
+
children: [/* @__PURE__ */ jsxDEV$1("button", {
|
|
15197
|
+
type: "button",
|
|
15198
|
+
class: "btn-outline",
|
|
15199
|
+
"data-collections-action": "divider",
|
|
15200
|
+
children: labels.newDivider
|
|
15201
|
+
}), /* @__PURE__ */ jsxDEV$1("button", {
|
|
15202
|
+
type: "button",
|
|
15203
|
+
class: "btn-outline",
|
|
15204
|
+
"data-collections-action": "done",
|
|
15205
|
+
children: labels.done
|
|
15206
|
+
})]
|
|
15204
15207
|
}), /* @__PURE__ */ jsxDEV$1("div", {
|
|
15205
|
-
class: "collections-page-
|
|
15206
|
-
|
|
15207
|
-
|
|
15208
|
-
|
|
15209
|
-
|
|
15208
|
+
class: "collections-page-action-group",
|
|
15209
|
+
"data-collections-toolbar": true,
|
|
15210
|
+
children: [/* @__PURE__ */ jsxDEV$1("a", {
|
|
15211
|
+
href: newCollectionHref,
|
|
15212
|
+
class: "collections-page-toolbar-button",
|
|
15213
|
+
"aria-label": labels.newCollection,
|
|
15214
|
+
title: labels.newCollection,
|
|
15215
|
+
children: /* @__PURE__ */ jsxDEV$1("svg", {
|
|
15216
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15217
|
+
width: "18",
|
|
15218
|
+
height: "18",
|
|
15219
|
+
viewBox: "0 0 24 24",
|
|
15220
|
+
fill: "none",
|
|
15221
|
+
stroke: "currentColor",
|
|
15222
|
+
"stroke-width": "2",
|
|
15223
|
+
"stroke-linecap": "round",
|
|
15224
|
+
"stroke-linejoin": "round",
|
|
15225
|
+
"aria-hidden": "true",
|
|
15226
|
+
children: [/* @__PURE__ */ jsxDEV$1("path", { d: "M12 5v14" }), /* @__PURE__ */ jsxDEV$1("path", { d: "M5 12h14" })]
|
|
15227
|
+
})
|
|
15228
|
+
}), /* @__PURE__ */ jsxDEV$1("div", {
|
|
15229
|
+
class: "relative",
|
|
15210
15230
|
children: [/* @__PURE__ */ jsxDEV$1("button", {
|
|
15211
15231
|
type: "button",
|
|
15212
|
-
class: "btn-outline",
|
|
15213
|
-
"data-collections-action": "divider",
|
|
15214
|
-
children: labels.newDivider
|
|
15215
|
-
}), /* @__PURE__ */ jsxDEV$1("button", {
|
|
15216
|
-
type: "button",
|
|
15217
|
-
class: "btn-outline",
|
|
15218
|
-
"data-collections-action": "done",
|
|
15219
|
-
children: labels.done
|
|
15220
|
-
})]
|
|
15221
|
-
}), /* @__PURE__ */ jsxDEV$1("div", {
|
|
15222
|
-
class: "collections-page-action-group",
|
|
15223
|
-
"data-collections-toolbar": true,
|
|
15224
|
-
children: [/* @__PURE__ */ jsxDEV$1("a", {
|
|
15225
|
-
href: newCollectionHref,
|
|
15226
15232
|
class: "collections-page-toolbar-button",
|
|
15227
|
-
"aria-label": labels.
|
|
15228
|
-
|
|
15233
|
+
"aria-label": labels.moreActions,
|
|
15234
|
+
"aria-expanded": "false",
|
|
15235
|
+
"aria-haspopup": "menu",
|
|
15236
|
+
title: labels.moreActions,
|
|
15237
|
+
"data-collections-action": "toggle-menu",
|
|
15229
15238
|
children: /* @__PURE__ */ jsxDEV$1("svg", {
|
|
15230
15239
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15231
|
-
width: "
|
|
15232
|
-
height: "
|
|
15240
|
+
width: "18",
|
|
15241
|
+
height: "18",
|
|
15233
15242
|
viewBox: "0 0 24 24",
|
|
15234
|
-
fill: "
|
|
15235
|
-
stroke: "currentColor",
|
|
15236
|
-
"stroke-width": "2",
|
|
15237
|
-
"stroke-linecap": "round",
|
|
15238
|
-
"stroke-linejoin": "round",
|
|
15239
|
-
children: [/* @__PURE__ */ jsxDEV$1("path", { d: "M12 5v14" }), /* @__PURE__ */ jsxDEV$1("path", { d: "M5 12h14" })]
|
|
15240
|
-
})
|
|
15241
|
-
}), /* @__PURE__ */ jsxDEV$1("div", {
|
|
15242
|
-
class: "relative",
|
|
15243
|
-
children: [/* @__PURE__ */ jsxDEV$1("button", {
|
|
15244
|
-
type: "button",
|
|
15245
|
-
class: "collections-page-toolbar-button collections-page-more-btn",
|
|
15246
|
-
"aria-label": labels.moreActions,
|
|
15247
|
-
"aria-expanded": "false",
|
|
15248
|
-
"aria-haspopup": "menu",
|
|
15249
|
-
title: labels.moreActions,
|
|
15250
|
-
"data-collections-action": "toggle-menu",
|
|
15251
|
-
children: /* @__PURE__ */ jsxDEV$1("svg", {
|
|
15252
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15253
|
-
width: "16",
|
|
15254
|
-
height: "16",
|
|
15255
|
-
viewBox: "0 0 24 24",
|
|
15256
|
-
fill: "currentColor",
|
|
15257
|
-
children: [
|
|
15258
|
-
/* @__PURE__ */ jsxDEV$1("circle", {
|
|
15259
|
-
cx: "5",
|
|
15260
|
-
cy: "12",
|
|
15261
|
-
r: "2"
|
|
15262
|
-
}),
|
|
15263
|
-
/* @__PURE__ */ jsxDEV$1("circle", {
|
|
15264
|
-
cx: "12",
|
|
15265
|
-
cy: "12",
|
|
15266
|
-
r: "2"
|
|
15267
|
-
}),
|
|
15268
|
-
/* @__PURE__ */ jsxDEV$1("circle", {
|
|
15269
|
-
cx: "19",
|
|
15270
|
-
cy: "12",
|
|
15271
|
-
r: "2"
|
|
15272
|
-
})
|
|
15273
|
-
]
|
|
15274
|
-
})
|
|
15275
|
-
}), /* @__PURE__ */ jsxDEV$1("div", {
|
|
15276
|
-
class: "collections-page-menu",
|
|
15277
|
-
"data-collections-more-menu": true,
|
|
15278
|
-
hidden: true,
|
|
15243
|
+
fill: "currentColor",
|
|
15279
15244
|
children: [
|
|
15280
|
-
/* @__PURE__ */ jsxDEV$1("
|
|
15281
|
-
|
|
15282
|
-
|
|
15283
|
-
|
|
15284
|
-
children: [/* @__PURE__ */ jsxDEV$1("span", {
|
|
15285
|
-
class: "collections-page-menu-item-icon",
|
|
15286
|
-
"aria-hidden": "true",
|
|
15287
|
-
children: /* @__PURE__ */ jsxDEV$1("svg", {
|
|
15288
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15289
|
-
width: "16",
|
|
15290
|
-
height: "16",
|
|
15291
|
-
viewBox: "0 0 24 24",
|
|
15292
|
-
fill: "none",
|
|
15293
|
-
stroke: "currentColor",
|
|
15294
|
-
"stroke-width": "2",
|
|
15295
|
-
"stroke-linecap": "round",
|
|
15296
|
-
"stroke-linejoin": "round",
|
|
15297
|
-
children: [
|
|
15298
|
-
/* @__PURE__ */ jsxDEV$1("path", { d: "M8 6h13" }),
|
|
15299
|
-
/* @__PURE__ */ jsxDEV$1("path", { d: "M8 12h13" }),
|
|
15300
|
-
/* @__PURE__ */ jsxDEV$1("path", { d: "M8 18h13" }),
|
|
15301
|
-
/* @__PURE__ */ jsxDEV$1("path", { d: "M3 6h.01" }),
|
|
15302
|
-
/* @__PURE__ */ jsxDEV$1("path", { d: "M3 12h.01" }),
|
|
15303
|
-
/* @__PURE__ */ jsxDEV$1("path", { d: "M3 18h.01" })
|
|
15304
|
-
]
|
|
15305
|
-
})
|
|
15306
|
-
}), /* @__PURE__ */ jsxDEV$1("span", {
|
|
15307
|
-
class: "collections-page-menu-item-label",
|
|
15308
|
-
children: labels.organize
|
|
15309
|
-
})]
|
|
15245
|
+
/* @__PURE__ */ jsxDEV$1("circle", {
|
|
15246
|
+
cx: "5",
|
|
15247
|
+
cy: "12",
|
|
15248
|
+
r: "2"
|
|
15310
15249
|
}),
|
|
15311
|
-
/* @__PURE__ */ jsxDEV$1("
|
|
15312
|
-
|
|
15313
|
-
|
|
15314
|
-
|
|
15315
|
-
children: [/* @__PURE__ */ jsxDEV$1("span", {
|
|
15316
|
-
class: "collections-page-menu-item-icon",
|
|
15317
|
-
"aria-hidden": "true",
|
|
15318
|
-
children: /* @__PURE__ */ jsxDEV$1("svg", {
|
|
15319
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15320
|
-
width: "16",
|
|
15321
|
-
height: "16",
|
|
15322
|
-
viewBox: "0 0 24 24",
|
|
15323
|
-
fill: "none",
|
|
15324
|
-
stroke: "currentColor",
|
|
15325
|
-
"stroke-width": "2",
|
|
15326
|
-
"stroke-linecap": "round",
|
|
15327
|
-
"stroke-linejoin": "round",
|
|
15328
|
-
children: [/* @__PURE__ */ jsxDEV$1("path", { d: "M10 13a5 5 0 0 0 7.54.54l2.92-2.92a5 5 0 0 0-7.07-7.08L11.7 5.24" }), /* @__PURE__ */ jsxDEV$1("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-2.92 2.92a5 5 0 0 0 7.07 7.08l1.69-1.7" })]
|
|
15329
|
-
})
|
|
15330
|
-
}), /* @__PURE__ */ jsxDEV$1("span", {
|
|
15331
|
-
class: "collections-page-menu-item-label",
|
|
15332
|
-
children: labels.newLink
|
|
15333
|
-
})]
|
|
15250
|
+
/* @__PURE__ */ jsxDEV$1("circle", {
|
|
15251
|
+
cx: "12",
|
|
15252
|
+
cy: "12",
|
|
15253
|
+
r: "2"
|
|
15334
15254
|
}),
|
|
15335
|
-
/* @__PURE__ */ jsxDEV$1("
|
|
15336
|
-
|
|
15337
|
-
|
|
15338
|
-
|
|
15339
|
-
children: [/* @__PURE__ */ jsxDEV$1("span", {
|
|
15340
|
-
class: "collections-page-menu-item-icon",
|
|
15341
|
-
"aria-hidden": "true",
|
|
15342
|
-
children: /* @__PURE__ */ jsxDEV$1("svg", {
|
|
15343
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15344
|
-
width: "16",
|
|
15345
|
-
height: "16",
|
|
15346
|
-
viewBox: "0 0 24 24",
|
|
15347
|
-
fill: "none",
|
|
15348
|
-
stroke: "currentColor",
|
|
15349
|
-
"stroke-width": "2",
|
|
15350
|
-
"stroke-linecap": "round",
|
|
15351
|
-
"stroke-linejoin": "round",
|
|
15352
|
-
children: [
|
|
15353
|
-
/* @__PURE__ */ jsxDEV$1("path", { d: "M4 8h16" }),
|
|
15354
|
-
/* @__PURE__ */ jsxDEV$1("path", { d: "M4 16h6" }),
|
|
15355
|
-
/* @__PURE__ */ jsxDEV$1("path", { d: "M14 16h6" })
|
|
15356
|
-
]
|
|
15357
|
-
})
|
|
15358
|
-
}), /* @__PURE__ */ jsxDEV$1("span", {
|
|
15359
|
-
class: "collections-page-menu-item-label",
|
|
15360
|
-
children: labels.newDivider
|
|
15361
|
-
})]
|
|
15255
|
+
/* @__PURE__ */ jsxDEV$1("circle", {
|
|
15256
|
+
cx: "19",
|
|
15257
|
+
cy: "12",
|
|
15258
|
+
r: "2"
|
|
15362
15259
|
})
|
|
15363
15260
|
]
|
|
15364
|
-
})
|
|
15261
|
+
})
|
|
15262
|
+
}), /* @__PURE__ */ jsxDEV$1("div", {
|
|
15263
|
+
class: "collections-page-menu",
|
|
15264
|
+
"data-collections-more-menu": true,
|
|
15265
|
+
hidden: true,
|
|
15266
|
+
children: [
|
|
15267
|
+
/* @__PURE__ */ jsxDEV$1("button", {
|
|
15268
|
+
type: "button",
|
|
15269
|
+
class: "collections-page-menu-item",
|
|
15270
|
+
"data-collections-action": "organize",
|
|
15271
|
+
children: [/* @__PURE__ */ jsxDEV$1("span", {
|
|
15272
|
+
class: "collections-page-menu-item-icon",
|
|
15273
|
+
"aria-hidden": "true",
|
|
15274
|
+
children: /* @__PURE__ */ jsxDEV$1("svg", {
|
|
15275
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15276
|
+
width: "16",
|
|
15277
|
+
height: "16",
|
|
15278
|
+
viewBox: "0 0 24 24",
|
|
15279
|
+
fill: "none",
|
|
15280
|
+
stroke: "currentColor",
|
|
15281
|
+
"stroke-width": "2",
|
|
15282
|
+
"stroke-linecap": "round",
|
|
15283
|
+
"stroke-linejoin": "round",
|
|
15284
|
+
children: [
|
|
15285
|
+
/* @__PURE__ */ jsxDEV$1("path", { d: "M8 6h13" }),
|
|
15286
|
+
/* @__PURE__ */ jsxDEV$1("path", { d: "M8 12h13" }),
|
|
15287
|
+
/* @__PURE__ */ jsxDEV$1("path", { d: "M8 18h13" }),
|
|
15288
|
+
/* @__PURE__ */ jsxDEV$1("path", { d: "M3 6h.01" }),
|
|
15289
|
+
/* @__PURE__ */ jsxDEV$1("path", { d: "M3 12h.01" }),
|
|
15290
|
+
/* @__PURE__ */ jsxDEV$1("path", { d: "M3 18h.01" })
|
|
15291
|
+
]
|
|
15292
|
+
})
|
|
15293
|
+
}), /* @__PURE__ */ jsxDEV$1("span", {
|
|
15294
|
+
class: "collections-page-menu-item-label",
|
|
15295
|
+
children: labels.organize
|
|
15296
|
+
})]
|
|
15297
|
+
}),
|
|
15298
|
+
/* @__PURE__ */ jsxDEV$1("button", {
|
|
15299
|
+
type: "button",
|
|
15300
|
+
class: "collections-page-menu-item",
|
|
15301
|
+
"data-collections-action": "link",
|
|
15302
|
+
children: [/* @__PURE__ */ jsxDEV$1("span", {
|
|
15303
|
+
class: "collections-page-menu-item-icon",
|
|
15304
|
+
"aria-hidden": "true",
|
|
15305
|
+
children: /* @__PURE__ */ jsxDEV$1("svg", {
|
|
15306
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15307
|
+
width: "16",
|
|
15308
|
+
height: "16",
|
|
15309
|
+
viewBox: "0 0 24 24",
|
|
15310
|
+
fill: "none",
|
|
15311
|
+
stroke: "currentColor",
|
|
15312
|
+
"stroke-width": "2",
|
|
15313
|
+
"stroke-linecap": "round",
|
|
15314
|
+
"stroke-linejoin": "round",
|
|
15315
|
+
children: [/* @__PURE__ */ jsxDEV$1("path", { d: "M10 13a5 5 0 0 0 7.54.54l2.92-2.92a5 5 0 0 0-7.07-7.08L11.7 5.24" }), /* @__PURE__ */ jsxDEV$1("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-2.92 2.92a5 5 0 0 0 7.07 7.08l1.69-1.7" })]
|
|
15316
|
+
})
|
|
15317
|
+
}), /* @__PURE__ */ jsxDEV$1("span", {
|
|
15318
|
+
class: "collections-page-menu-item-label",
|
|
15319
|
+
children: labels.newLink
|
|
15320
|
+
})]
|
|
15321
|
+
}),
|
|
15322
|
+
/* @__PURE__ */ jsxDEV$1("button", {
|
|
15323
|
+
type: "button",
|
|
15324
|
+
class: "collections-page-menu-item",
|
|
15325
|
+
"data-collections-action": "divider",
|
|
15326
|
+
children: [/* @__PURE__ */ jsxDEV$1("span", {
|
|
15327
|
+
class: "collections-page-menu-item-icon",
|
|
15328
|
+
"aria-hidden": "true",
|
|
15329
|
+
children: /* @__PURE__ */ jsxDEV$1("svg", {
|
|
15330
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15331
|
+
width: "16",
|
|
15332
|
+
height: "16",
|
|
15333
|
+
viewBox: "0 0 24 24",
|
|
15334
|
+
fill: "none",
|
|
15335
|
+
stroke: "currentColor",
|
|
15336
|
+
"stroke-width": "2",
|
|
15337
|
+
"stroke-linecap": "round",
|
|
15338
|
+
"stroke-linejoin": "round",
|
|
15339
|
+
children: [
|
|
15340
|
+
/* @__PURE__ */ jsxDEV$1("path", { d: "M4 8h16" }),
|
|
15341
|
+
/* @__PURE__ */ jsxDEV$1("path", { d: "M4 16h6" }),
|
|
15342
|
+
/* @__PURE__ */ jsxDEV$1("path", { d: "M14 16h6" })
|
|
15343
|
+
]
|
|
15344
|
+
})
|
|
15345
|
+
}), /* @__PURE__ */ jsxDEV$1("span", {
|
|
15346
|
+
class: "collections-page-menu-item-label",
|
|
15347
|
+
children: labels.newDivider
|
|
15348
|
+
})]
|
|
15349
|
+
})
|
|
15350
|
+
]
|
|
15365
15351
|
})]
|
|
15366
15352
|
})]
|
|
15367
15353
|
})]
|
|
15368
|
-
})
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15374
|
-
|
|
15375
|
-
]
|
|
15354
|
+
})]
|
|
15355
|
+
}), /* @__PURE__ */ jsxDEV$1("p", {
|
|
15356
|
+
class: "page-intro-description",
|
|
15357
|
+
"data-collections-hint": true,
|
|
15358
|
+
hidden: true,
|
|
15359
|
+
children: labels.organizeHint
|
|
15360
|
+
})]
|
|
15376
15361
|
})
|
|
15377
15362
|
}), /* @__PURE__ */ jsxDEV$1("jant-collections-manager", {
|
|
15378
15363
|
items: escapeJson(items),
|
|
@@ -15391,12 +15376,9 @@ var CollectionsManager = ({ items, sitePathPrefix = "" }) => {
|
|
|
15391
15376
|
* Collections Listing Page
|
|
15392
15377
|
*
|
|
15393
15378
|
* Single-column directory of collections.
|
|
15394
|
-
*/ var
|
|
15395
|
-
var CollectionsPage = ({ items, isAuthenticated, sitePathPrefix = "" }) => {
|
|
15379
|
+
*/ var CollectionsPage = ({ items, isAuthenticated, sitePathPrefix = "" }) => {
|
|
15396
15380
|
const { i18n } = useLingui();
|
|
15397
|
-
const collectionCount = countCollections(items);
|
|
15398
15381
|
const emptyMessage = i18n._({ id: "kr39oD" });
|
|
15399
|
-
const collectionCountLabel = `${collectionCount} ${collectionCount === 1 ? i18n._({ id: "sgr2wQ" }) : i18n._({ id: "CAh1km" })}`;
|
|
15400
15382
|
if (isAuthenticated) return /* @__PURE__ */ jsxDEV$1("div", {
|
|
15401
15383
|
class: "py-6",
|
|
15402
15384
|
"data-page": "collections",
|
|
@@ -15414,19 +15396,13 @@ var CollectionsPage = ({ items, isAuthenticated, sitePathPrefix = "" }) => {
|
|
|
15414
15396
|
class: "collections-page-header",
|
|
15415
15397
|
children: /* @__PURE__ */ jsxDEV$1("div", {
|
|
15416
15398
|
class: "collections-page-heading page-intro",
|
|
15417
|
-
children:
|
|
15399
|
+
children: /* @__PURE__ */ jsxDEV$1("div", {
|
|
15418
15400
|
class: "page-intro-title-row",
|
|
15419
15401
|
children: /* @__PURE__ */ jsxDEV$1("h1", {
|
|
15420
15402
|
class: "page-intro-title",
|
|
15421
15403
|
children: i18n._({ id: "DoJzLz" })
|
|
15422
15404
|
})
|
|
15423
|
-
})
|
|
15424
|
-
class: "page-intro-meta-row",
|
|
15425
|
-
children: /* @__PURE__ */ jsxDEV$1("p", {
|
|
15426
|
-
class: "page-intro-meta",
|
|
15427
|
-
children: collectionCountLabel
|
|
15428
|
-
})
|
|
15429
|
-
})]
|
|
15405
|
+
})
|
|
15430
15406
|
})
|
|
15431
15407
|
}), /* @__PURE__ */ jsxDEV$1(CollectionDirectory, {
|
|
15432
15408
|
items,
|
|
@@ -21058,8 +21034,10 @@ async function syncHostedControlPlaneSiteAvatar(input) {
|
|
|
21058
21034
|
* call site had its own near-identical copy.
|
|
21059
21035
|
*
|
|
21060
21036
|
* The shape mirrors `routes/api/export.ts` so `jant site export` and
|
|
21061
|
-
* `jant github sync` produce
|
|
21062
|
-
*
|
|
21037
|
+
* `jant github sync` produce matching Hugo sites. They differ only in
|
|
21038
|
+
* media: `site export` bundles attachment bytes into `static/media/` for
|
|
21039
|
+
* a self-contained archive, while Sync links attachments by URL and
|
|
21040
|
+
* never writes their bytes into the repo. If you add a field to the
|
|
21063
21041
|
* export route, add it here too.
|
|
21064
21042
|
*/ async function buildSyncSiteConfig(c) {
|
|
21065
21043
|
const { services, appConfig, allSettings, themeStyle } = c.var;
|
|
@@ -21168,7 +21146,7 @@ async function syncHostedControlPlaneSiteAvatar(input) {
|
|
|
21168
21146
|
return;
|
|
21169
21147
|
}
|
|
21170
21148
|
await markSyncPending(settings);
|
|
21171
|
-
const { createGitHubSyncService } = await import("./github-sync-
|
|
21149
|
+
const { createGitHubSyncService } = await import("./github-sync-CerNYCAn.js");
|
|
21172
21150
|
const { getGitHubAppConfig } = await import("./env-CoSe-1y4.js").then((n) => n.t);
|
|
21173
21151
|
const run = runBackgroundSync(settings, createGitHubSyncService(c.var.services, c.var.currentSite.id, await buildSyncSiteConfig(c), {
|
|
21174
21152
|
storage: c.var.storage,
|
|
@@ -21956,7 +21934,7 @@ settingsRoutes.post("/github-sync/connect", async (c) => {
|
|
|
21956
21934
|
await c.var.services.settings.set("GITHUB_SYNC_AUTH_MODE", "pat");
|
|
21957
21935
|
await c.var.services.settings.set("GITHUB_SYNC_APP_INSTALLATION_ID", "");
|
|
21958
21936
|
await c.var.services.settings.set("GITHUB_SYNC_ENABLED", "true");
|
|
21959
|
-
const { createGitHubSyncService } = await import("./github-sync-
|
|
21937
|
+
const { createGitHubSyncService } = await import("./github-sync-CerNYCAn.js");
|
|
21960
21938
|
const syncService = createGitHubSyncService(c.var.services, c.var.currentSite.id, await buildSyncSiteConfig(c), {
|
|
21961
21939
|
storage: c.var.storage,
|
|
21962
21940
|
githubApp: getGitHubAppConfig(c.env)
|
|
@@ -21975,7 +21953,7 @@ settingsRoutes.post("/github-sync/connect", async (c) => {
|
|
|
21975
21953
|
return dsRedirect(publicPath(c, "/settings/github-sync"));
|
|
21976
21954
|
});
|
|
21977
21955
|
settingsRoutes.post("/github-sync/push", async (c) => {
|
|
21978
|
-
const { createGitHubSyncService } = await import("./github-sync-
|
|
21956
|
+
const { createGitHubSyncService } = await import("./github-sync-CerNYCAn.js");
|
|
21979
21957
|
const syncService = createGitHubSyncService(c.var.services, c.var.currentSite.id, await buildSyncSiteConfig(c), {
|
|
21980
21958
|
storage: c.var.storage,
|
|
21981
21959
|
githubApp: getGitHubAppConfig(c.env)
|
|
@@ -21995,7 +21973,7 @@ settingsRoutes.post("/github-sync/push", async (c) => {
|
|
|
21995
21973
|
});
|
|
21996
21974
|
});
|
|
21997
21975
|
settingsRoutes.post("/github-sync/disconnect", async (c) => {
|
|
21998
|
-
const { createGitHubSyncService } = await import("./github-sync-
|
|
21976
|
+
const { createGitHubSyncService } = await import("./github-sync-CerNYCAn.js");
|
|
21999
21977
|
await createGitHubSyncService(c.var.services, c.var.currentSite.id, await buildSyncSiteConfig(c), { githubApp: getGitHubAppConfig(c.env) }).teardownWebhook();
|
|
22000
21978
|
return dsRedirect(publicPath(c, "/settings/github-sync"));
|
|
22001
21979
|
});
|
|
@@ -22186,7 +22164,7 @@ function buildRepoPickerLabels(c) {
|
|
|
22186
22164
|
const { parseRepoSlug, createGitHubClient } = await import("./github-api-UD4u_7fa.js").then((n) => n.n);
|
|
22187
22165
|
const parsed = parseRepoSlug(repo);
|
|
22188
22166
|
if (!parsed) return wantsJson ? c.json({ error: "Invalid repository format." }, 400) : c.text("Invalid repository format.", 400);
|
|
22189
|
-
const { classifyRepoForSync } = await import("./github-sync-
|
|
22167
|
+
const { classifyRepoForSync } = await import("./github-sync-CerNYCAn.js");
|
|
22190
22168
|
const ghClient = createGitHubClient(() => getInstallationTokenFromApp(app, installationId));
|
|
22191
22169
|
let classification;
|
|
22192
22170
|
try {
|
|
@@ -22216,7 +22194,7 @@ function buildRepoPickerLabels(c) {
|
|
|
22216
22194
|
await c.var.services.settings.set("GITHUB_SYNC_REPO", repo);
|
|
22217
22195
|
await c.var.services.settings.set("GITHUB_SYNC_TOKEN", "");
|
|
22218
22196
|
await c.var.services.settings.set("GITHUB_SYNC_ENABLED", "true");
|
|
22219
|
-
const { createGitHubSyncService } = await import("./github-sync-
|
|
22197
|
+
const { createGitHubSyncService } = await import("./github-sync-CerNYCAn.js");
|
|
22220
22198
|
const syncService = createGitHubSyncService(c.var.services, c.var.currentSite.id, await buildSyncSiteConfig(c), {
|
|
22221
22199
|
storage: c.var.storage,
|
|
22222
22200
|
githubApp: app
|
|
@@ -22332,7 +22310,7 @@ function requireGitHubApp(c) {
|
|
|
22332
22310
|
const { parseRepoSlug, createGitHubClient } = await import("./github-api-UD4u_7fa.js").then((n) => n.n);
|
|
22333
22311
|
const parsed = parseRepoSlug(repo);
|
|
22334
22312
|
if (!parsed) return c.json({ error: "Invalid repository format." }, 400);
|
|
22335
|
-
const { classifyRepoForSync } = await import("./github-sync-
|
|
22313
|
+
const { classifyRepoForSync } = await import("./github-sync-CerNYCAn.js");
|
|
22336
22314
|
const client = createGitHubClient(() => getInstallationTokenFromApp(app, installationId));
|
|
22337
22315
|
try {
|
|
22338
22316
|
const classification = await classifyRepoForSync(client, parsed.owner, parsed.repo, c.var.currentSite.id);
|
|
@@ -32714,7 +32692,7 @@ function createSiteAdminService(db, databaseSchema = sqliteSchemaBundle, databas
|
|
|
32714
32692
|
const themeCss = buildThemeStyle(activeTheme, appConfig.themeMode, fontOverrides);
|
|
32715
32693
|
const navItemList = await navItems.list();
|
|
32716
32694
|
const appleTouchKey = allSettings[SETTINGS_KEYS.SITE_FAVICON_APPLE_TOUCH];
|
|
32717
|
-
const { createExportService } = await import("./export-
|
|
32695
|
+
const { createExportService } = await import("./export-CzuQyg5h.js").then((n) => n.n);
|
|
32718
32696
|
const exportService = createExportService({
|
|
32719
32697
|
collections,
|
|
32720
32698
|
media: mediaService,
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"name": "url"
|
|
147
147
|
},
|
|
148
148
|
"src/client-auth.ts": {
|
|
149
|
-
"file": "_assets/client-auth-
|
|
149
|
+
"file": "_assets/client-auth-LBSZxqNC.js",
|
|
150
150
|
"name": "client-auth",
|
|
151
151
|
"src": "src/client-auth.ts",
|
|
152
152
|
"isEntry": true,
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
]
|
|
164
164
|
},
|
|
165
165
|
"src/client.ts": {
|
|
166
|
-
"file": "_assets/client-
|
|
166
|
+
"file": "_assets/client-CTrEFM5W.js",
|
|
167
167
|
"name": "client",
|
|
168
168
|
"src": "src/client.ts",
|
|
169
169
|
"isEntry": true,
|
|
@@ -858,7 +858,7 @@
|
|
|
858
858
|
]
|
|
859
859
|
},
|
|
860
860
|
"src/style.css": {
|
|
861
|
-
"file": "_assets/client-
|
|
861
|
+
"file": "_assets/client-BMPMuwvV.css",
|
|
862
862
|
"name": "style",
|
|
863
863
|
"names": [
|
|
864
864
|
"style.css"
|