vue-layout-gitcode 1.12.73 → 1.12.75

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.
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, openBlock, createElementBlock, Fragment, renderList, withDirectives, createBlock, unref, ref, watch, createElementVNode, createVNode, toDisplayString, createCommentVNode } from "vue";
2
- import { h as headRequest, R as REPO_MODULE, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, a as i18n, c as useLayoutConfig, G as GIcon } from "./index-DQaP-OBW.js";
3
- import { u as useReportRepo, S as SearchRepoCard, m as mergeSearchSuggestions } from "./search-suggestion-SNl1jA0P.js";
2
+ import { h as headRequest, R as REPO_MODULE, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, a as i18n, c as useLayoutConfig, G as GIcon } from "./index-BqIiUJGW.js";
3
+ import { u as useReportRepo, S as SearchRepoCard, m as mergeSearchSuggestions } from "./search-suggestion-D8jjDMO8.js";
4
4
  import "vue-devui-lal/icon";
5
5
  import "vue-devui-lal/icon/style.css";
6
6
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, inject, useSlots, computed, ref, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, createCommentVNode, createTextVNode, toDisplayString, renderSlot } from "vue";
2
- import { a as i18n, c as useLayoutConfig, B as ThemeType, C as currentTheme, L as LANG_ZH, D as LANG_EN, F as getLocaleLang, G as GIcon, H as emitEvent, b as REPO_EVENT, I as ASIDE_MENU_REPO, J as isHttps, K as navigateWithMigrationGuard, _ as _export_sfc } from "./index-DQaP-OBW.js";
2
+ import { a as i18n, c as useLayoutConfig, B as ThemeType, C as currentTheme, L as LANG_ZH, D as LANG_EN, F as getLocaleLang, G as GIcon, H as emitEvent, b as REPO_EVENT, I as ASIDE_MENU_REPO, J as isHttps, K as navigateWithMigrationGuard, _ as _export_sfc } from "./index-BqIiUJGW.js";
3
3
  import { useRouter } from "vue-router";
4
4
  import { Popover } from "vue-devui-lal/popover";
5
5
  import "vue-devui-lal/popover/style.css";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, ref, reactive, watch, computed, openBlock, createElementBlock, Fragment, createElementVNode, toDisplayString, unref, createVNode, withModifiers, normalizeClass, withCtx, renderList, createBlock, createCommentVNode, createTextVNode, withDirectives, vShow } from "vue";
2
- import { a as i18n, c as useLayoutConfig, G as GIcon, t as transformUrl, N as _sfc_main$1, O as loadAsideData, K as navigateWithMigrationGuard, H as emitEvent, s as setLoginTriggerSource, e as useRequestReport, M as asideRequest, _ as _export_sfc } from "./index-DQaP-OBW.js";
2
+ import { a as i18n, c as useLayoutConfig, G as GIcon, t as transformUrl, N as _sfc_main$1, O as loadAsideData, K as navigateWithMigrationGuard, H as emitEvent, s as setLoginTriggerSource, e as useRequestReport, M as asideRequest, _ as _export_sfc } from "./index-BqIiUJGW.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-D0t12zmt.js";
4
+ import { t as transWebUrl } from "./transWebUrl-BlwQntOs.js";
5
5
  import { Select, Option } from "vue-devui-lal/select";
6
6
  import { Input } from "vue-devui-lal/input";
7
7
  import { Skeleton } from "vue-devui-lal/skeleton";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, ref, reactive, computed, watch, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, withModifiers, normalizeClass, withCtx, createBlock, createCommentVNode, Fragment, renderList, createTextVNode, withDirectives, vShow } from "vue";
2
- import { a as i18n, c as useLayoutConfig, t as transformUrl, G as GIcon, M as asideRequest, K as navigateWithMigrationGuard, H as emitEvent, s as setLoginTriggerSource, e as useRequestReport, _ as _export_sfc } from "./index-DQaP-OBW.js";
2
+ import { a as i18n, c as useLayoutConfig, t as transformUrl, G as GIcon, M as asideRequest, K as navigateWithMigrationGuard, H as emitEvent, s as setLoginTriggerSource, e as useRequestReport, _ as _export_sfc } from "./index-BqIiUJGW.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-D0t12zmt.js";
4
+ import { t as transWebUrl } from "./transWebUrl-BlwQntOs.js";
5
5
  import { Input } from "vue-devui-lal/input";
6
6
  import { Skeleton } from "vue-devui-lal/skeleton";
7
7
  import { MenuItem } from "vue-devui-lal/menu";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, inject, watch, computed, withDirectives, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
2
- import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-DQaP-OBW.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-BqIiUJGW.js";
3
3
  import { useRoute, useRouter } from "vue-router";
4
4
  import "vue-devui-lal/icon";
5
5
  import "vue-devui-lal/icon/style.css";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, createVNode, toDisplayString, withModifiers, createCommentVNode } from "vue";
2
- import { a as i18n, n as normalizeSearchHistoryEntry, G as GIcon, _ as _export_sfc } from "./index-DQaP-OBW.js";
2
+ import { a as i18n, n as normalizeSearchHistoryEntry, G as GIcon, _ as _export_sfc } from "./index-BqIiUJGW.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = { class: "history-list" };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, ref, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, renderSlot, createBlock, createVNode, withCtx } from "vue";
2
- import { u as useReportRepo, S as SearchRepoCard, i as isProjectSuggestionType, n as normalizeProjectUrlForMainSite } from "./search-suggestion-SNl1jA0P.js";
3
- import { a as i18n, h as headRequest, c as useLayoutConfig, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-DQaP-OBW.js";
2
+ import { u as useReportRepo, S as SearchRepoCard, i as isProjectSuggestionType, n as normalizeProjectUrlForMainSite } from "./search-suggestion-D8jjDMO8.js";
3
+ import { a as i18n, h as headRequest, c as useLayoutConfig, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-BqIiUJGW.js";
4
4
  import { Row, Col } from "vue-devui-lal/grid";
5
5
  import { SkeletonItem } from "vue-devui-lal/skeleton";
6
6
  import "vue-devui-lal/grid/style.css";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createElementBlock, Fragment, renderList, createElementVNode, createVNode, toDisplayString, createCommentVNode, unref } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-DQaP-OBW.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-BqIiUJGW.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = ["onClick"];
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, inject, ref, watch, withDirectives, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
2
- import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-DQaP-OBW.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-BqIiUJGW.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = { class: "history-list-project history-list-project--padded" };
@@ -8,7 +8,7 @@ import { Message } from "vue-devui-lal/message";
8
8
  import "vue-devui-lal/message/style.css";
9
9
  import { FixedOverlay } from "vue-devui-lal/overlay";
10
10
  import "vue-devui-lal/overlay/style.css";
11
- import { a as i18n, j as usePageResize, A as isZh, _ as _export_sfc } from "./index-DQaP-OBW.js";
11
+ import { a as i18n, j as usePageResize, A as isZh, _ as _export_sfc } from "./index-BqIiUJGW.js";
12
12
  const _YunpianCaptchaManager = class _YunpianCaptchaManager {
13
13
  // eslint-disable-next-line no-useless-constructor
14
14
  constructor() {
@@ -17887,12 +17887,12 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
17887
17887
  setup(__props) {
17888
17888
  const layoutConfig2 = useLayoutConfig();
17889
17889
  const { t: $t } = i18n.global;
17890
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-CxdoPXiZ.js"));
17891
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-B830E27r.js"));
17892
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-CnNO_nT3.js"));
17893
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-PWETyKhx.js"));
17894
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-BgP61CMs.js"));
17895
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-BbvCClgI.js"));
17890
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-HLjZm9mz.js"));
17891
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-CMvBzax7.js"));
17892
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-3ldJnSeM.js"));
17893
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-hia7fBKv.js"));
17894
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-DuQ2U3ue.js"));
17895
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-D-jEH7FT.js"));
17896
17896
  const props = __props;
17897
17897
  const repoInfo = inject("repoInfo", computed(() => void 0));
17898
17898
  const orgInfo = inject("orgInfo", computed(() => void 0));
@@ -19256,7 +19256,7 @@ const vElementExposure = {
19256
19256
  beforeUnmount() {
19257
19257
  }
19258
19258
  };
19259
- const NoticeModal = defineAsyncComponent(() => import("./notice-Kt8wr2-m.js"));
19259
+ const NoticeModal = defineAsyncComponent(() => import("./notice-Cr29HOgU.js"));
19260
19260
  function clearNotice() {
19261
19261
  if (localStorage$2.getItem("validator_email")) {
19262
19262
  localStorage$2.removeItem("validator_email");
@@ -21736,9 +21736,9 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
21736
21736
  const layoutConfig2 = useLayoutConfig();
21737
21737
  const { t: t2 } = i18n.global;
21738
21738
  const route = useRoute();
21739
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-B0Vx7MJa.js"));
21740
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-s85ysS6h.js"));
21741
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-CTyX9RuB.js"));
21739
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-D0cxvoIO.js"));
21740
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-fLWQqZtl.js"));
21741
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-CK8OB2_Q.js"));
21742
21742
  const props = __props;
21743
21743
  const useReport2 = inject("useReport");
21744
21744
  const userInfo = inject("userInfo");
@@ -28277,7 +28277,7 @@ const _SlidCaptchaManager = class _SlidCaptchaManager {
28277
28277
  __publicField(_SlidCaptchaManager, "instance");
28278
28278
  let SlidCaptchaManager = _SlidCaptchaManager;
28279
28279
  const slidCaptchaManager = SlidCaptchaManager.getInstance();
28280
- const SlidCaptcha = defineAsyncComponent(() => import("./index-C086334T.js"));
28280
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-Taje1XCA.js"));
28281
28281
  const useSlidCaptcha = () => {
28282
28282
  const { mount, unMount, isMounted } = usePopup("slid-captcha-popup");
28283
28283
  const open = (config2) => {
@@ -28307,7 +28307,7 @@ const useSlidCaptcha = () => {
28307
28307
  close
28308
28308
  };
28309
28309
  };
28310
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-BBxjuBVB.js"));
28310
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-BOR867Xb.js"));
28311
28311
  const useYunpianCaptcha = () => {
28312
28312
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
28313
28313
  const open = (config2) => {
@@ -32163,6 +32163,16 @@ function resolveTargetFromUrl(href, options = {}) {
32163
32163
  const query = { type: "namespace", path };
32164
32164
  return { type: "namespace", key: `namespace:${path}`, query };
32165
32165
  }
32166
+ if (decoded.length >= 4 && decoded[0].toLowerCase() === "org") {
32167
+ const section = decoded[2].toLowerCase();
32168
+ if (URL_ENTITY_SEGMENT.discussion.includes(section)) {
32169
+ const orgPath = String(decoded[1] || "").trim().toLowerCase();
32170
+ const number2 = parsePositiveInt(decoded[3]);
32171
+ if (!orgPath || number2 === null) return null;
32172
+ const query = { type: "discussion", org_path: orgPath, number: number2 };
32173
+ return { type: "discussion", key: `discussion:org/${orgPath}#${number2}`, query };
32174
+ }
32175
+ }
32166
32176
  if (decoded.length >= 3) {
32167
32177
  const repoPath = normalizeRepoPath(`${decoded[0]}/${decoded[1]}`);
32168
32178
  if (!repoPath) return null;
@@ -33135,6 +33145,40 @@ function useEntityHovercardHost() {
33135
33145
  function resetEntityHovercardHost() {
33136
33146
  currentHost = null;
33137
33147
  }
33148
+ const LIST_SUPPRESSED_TYPES = ["issue", "pr", "discussion"];
33149
+ const LIST_PATTERNS = [
33150
+ // 项目级:/ {ns}/{repo}/(issues|pulls|pull|discussions)
33151
+ /^\/[^/]+\/[^/]+\/(?:issues|pulls|pull|discussions)\/?$/,
33152
+ // 组织级:/org/{org}/(issues|pulls|discussions)
33153
+ /^\/org\/[^/]+\/(?:issues|pulls|discussions)\/?$/,
33154
+ // 工作台:/dashboard/(issues|pulls|discussions)
33155
+ /^\/dashboard\/(?:issues|pulls|discussions)\/?$/,
33156
+ // 搜索结果:/search、/search-page(结果列表形态)
33157
+ /^\/search(?:-page)?\/?$/
33158
+ ];
33159
+ const CODE_PATTERNS = [/^\/[^/]+\/[^/]+\/(?:code|tree|blob|commits)(?:\/|$)/];
33160
+ function normalizePath(pathname) {
33161
+ const raw = String(pathname || "").split(/[?#]/)[0].toLowerCase();
33162
+ if (!raw) return "";
33163
+ const withLeading = raw.startsWith("/") ? raw : `/${raw}`;
33164
+ return withLeading.replace(/\/{2,}/g, "/");
33165
+ }
33166
+ function isHovercardSceneSuppressed(pathname, entityType) {
33167
+ const type = String(entityType || "").toLowerCase();
33168
+ if (!type) return false;
33169
+ const path = normalizePath(String(pathname || ""));
33170
+ if (!path) return false;
33171
+ if (LIST_SUPPRESSED_TYPES.includes(type)) {
33172
+ return LIST_PATTERNS.some((pattern) => pattern.test(path));
33173
+ }
33174
+ if (type === "commit") {
33175
+ return CODE_PATTERNS.some((pattern) => pattern.test(path));
33176
+ }
33177
+ return false;
33178
+ }
33179
+ function currentPathname() {
33180
+ return typeof window === "undefined" ? "" : window.location.pathname;
33181
+ }
33138
33182
  function pickFirstLineRect(rects) {
33139
33183
  if (!rects || typeof rects.length !== "number") return null;
33140
33184
  for (let i = 0; i < rects.length; i += 1) {
@@ -33385,6 +33429,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33385
33429
  return Boolean(data && data.is_self);
33386
33430
  }
33387
33431
  async function showPreview(result2) {
33432
+ if (isHovercardSceneSuppressed(currentPathname(), result2.entity_type)) {
33433
+ closeCard();
33434
+ return;
33435
+ }
33388
33436
  if (isSelfUserPreview(result2)) {
33389
33437
  closeCard();
33390
33438
  return;
@@ -33489,6 +33537,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33489
33537
  }, config2.closeDelay);
33490
33538
  }
33491
33539
  function startOpenTimer(target, anchor) {
33540
+ if (isHovercardSceneSuppressed(currentPathname(), target.type)) return;
33492
33541
  clearOpenTimer();
33493
33542
  pendingAnchor = anchor;
33494
33543
  pendingTarget = target;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, onMounted, nextTick, onUnmounted, openBlock, createBlock, unref, withCtx, createElementVNode } from "vue";
2
- import { z as slidCaptchaManager, c as useLayoutConfig, A as isZh, _ as _export_sfc } from "./index-DQaP-OBW.js";
2
+ import { z as slidCaptchaManager, c as useLayoutConfig, A as isZh, _ as _export_sfc } from "./index-BqIiUJGW.js";
3
3
  import { FixedOverlay } from "vue-devui-lal/overlay";
4
4
  import "vue-devui-lal/overlay/style.css";
5
5
  const TARGET_TEXT = "Click in order:";
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P, Q, S, U, V, W, X, Y, Z, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, C, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL } from "./index-DQaP-OBW.js";
1
+ import { P, Q, S, U, V, W, X, Y, Z, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, C, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL } from "./index-BqIiUJGW.js";
2
2
  export {
3
3
  P as AsideFooterTools,
4
4
  Q as AtomCodeLauncher,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, openBlock, createBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
2
- import { i as isPhone, u as useModel, _ as _export_sfc } from "./index-DQaP-OBW.js";
2
+ import { i as isPhone, u as useModel, _ as _export_sfc } from "./index-BqIiUJGW.js";
3
3
  import { Notification } from "vue-devui-lal/notification";
4
4
  import { Button } from "vue-devui-lal/button";
5
5
  import "vue-devui-lal/notification/style.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-layout-gitcode",
3
- "version": "1.12.73",
3
+ "version": "1.12.75",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, toDisplayString, unref, useModel, ref, watch, openBlock, createElementBlock, createVNode, normalizeClass, withDirectives, createElementVNode, vShow, mergeModels, inject, withModifiers, createBlock, Fragment, computed, normalizeStyle, createCommentVNode, createTextVNode, renderList, withCtx, reactive, onMounted, watchEffect } from "vue";
2
- import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, r as reqCatch, e as useRequestReport, h as headRequest, a as i18n, T as TOPIC_TYPE, f as useTimeFormat, g as useCookie, j as usePageResize, L as LANG_ZH, k as isGstarRepo, m as _sfc_main$b, o as isIncubationRepo, p as highlightWords, t as transformUrl, q as _frEventTrack, E as EVENT_NAME, w as REPO_TYPE, x as extractRepoInfoWithURL, y as LANG_KEY } from "./index-DQaP-OBW.js";
3
- import { t as transWebUrl } from "./transWebUrl-D0t12zmt.js";
2
+ import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, r as reqCatch, e as useRequestReport, h as headRequest, a as i18n, T as TOPIC_TYPE, f as useTimeFormat, g as useCookie, j as usePageResize, L as LANG_ZH, k as isGstarRepo, m as _sfc_main$b, o as isIncubationRepo, p as highlightWords, t as transformUrl, q as _frEventTrack, E as EVENT_NAME, w as REPO_TYPE, x as extractRepoInfoWithURL, y as LANG_KEY } from "./index-BqIiUJGW.js";
3
+ import { t as transWebUrl } from "./transWebUrl-BlwQntOs.js";
4
4
  import { useRouter } from "vue-router";
5
5
  import { Row, Col } from "vue-devui-lal/grid";
6
6
  import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
@@ -1,4 +1,4 @@
1
- import { c as useLayoutConfig } from "./index-DQaP-OBW.js";
1
+ import { c as useLayoutConfig } from "./index-BqIiUJGW.js";
2
2
  const layoutConfig = useLayoutConfig();
3
3
  const transWebUrl = (url, params, options = {}) => {
4
4
  if (!url) return url;