vue-layout-gitcode 1.12.15-beta.15 → 1.12.15-beta.17

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,5 +1,5 @@
1
- import { defineComponent, onMounted, nextTick, onUnmounted, openBlock, createBlock, unref, withCtx, createElementVNode } from "vue";
2
- import { x as slidCaptchaManager, y as useLayoutConfig, z as isZh, _ as _export_sfc } from "./index-bSQvw45o.js";
1
+ import { defineComponent, onMounted, nextTick, onUnmounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
2
+ import { x as slidCaptchaManager, y as useLayoutConfig, z as isZh, _ as _export_sfc } from "./index-Br1fy5_D.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:";
@@ -105,10 +105,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
105
105
  });
106
106
  return (_ctx, _cache) => {
107
107
  return openBlock(), createBlock(unref(FixedOverlay), { class: "captcha-overlay-slid" }, {
108
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
108
+ default: withCtx(() => _cache[0] || (_cache[0] = [
109
109
  createElementVNode("div", { id: "captcha-box" }, null, -1)
110
- ])]),
111
- _: 1
110
+ ])),
111
+ _: 1,
112
+ __: [0]
112
113
  });
113
114
  };
114
115
  }
@@ -1,14 +1,14 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { defineComponent, ref, onMounted, onBeforeUnmount, openBlock, createBlock, unref, withCtx, createElementVNode, withDirectives, createVNode, vShow, nextTick } from "vue";
4
+ import { defineComponent, ref, onMounted, onBeforeUnmount, createBlock, openBlock, unref, withCtx, createElementVNode, withDirectives, createVNode, vShow, nextTick } from "vue";
5
5
  import { Button } from "vue-devui-lal/button";
6
6
  import "vue-devui-lal/button/style.css";
7
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, k as usePageResize, z as isZh, _ as _export_sfc } from "./index-bSQvw45o.js";
11
+ import { a as i18n, k as usePageResize, z as isZh, _ as _export_sfc } from "./index-Br1fy5_D.js";
12
12
  const _YunpianCaptchaManager = class _YunpianCaptchaManager {
13
13
  // eslint-disable-next-line no-useless-constructor
14
14
  constructor() {
package/index.d.ts CHANGED
@@ -12,6 +12,7 @@ import { HeaderPropsForCustom } from '../../types/types';
12
12
  import { OrgInfo } from '../../types/types';
13
13
  import { PublicProps } from '../../../vue/dist/vue.esm-bundler.js';
14
14
  import { PublicProps as PublicProps_2 } from '../../../../vue/dist/vue.esm-bundler.js';
15
+ import { Ref } from '../../../vue/dist/vue.esm-bundler.js';
15
16
  import { repoInfoType } from '../../types/types';
16
17
  import { setTheme } from './themes/index';
17
18
  import { UserInfo } from '../../types/types';
@@ -30,7 +31,32 @@ collapseMode: boolean;
30
31
  disableFlatMode: boolean;
31
32
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
32
33
 
33
- declare const __VLS_component_2: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
34
+ declare const __VLS_component_2: DefineComponent<Props_3, {
35
+ containerEl: Ref<HTMLElement | null, HTMLElement | null>;
36
+ contentEl: Ref<HTMLElement | null, HTMLElement | null>;
37
+ trackEl: Ref<HTMLDivElement | null, HTMLDivElement | null>;
38
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
39
+ mouseenter: (event: MouseEvent) => any;
40
+ mouseleave: (event: MouseEvent) => any;
41
+ scroll: (event: Event) => any;
42
+ }, string, PublicProps, Readonly<Props_3> & Readonly<{
43
+ onMouseenter?: ((event: MouseEvent) => any) | undefined;
44
+ onMouseleave?: ((event: MouseEvent) => any) | undefined;
45
+ onScroll?: ((event: Event) => any) | undefined;
46
+ }>, {
47
+ timeout: number;
48
+ tag: string;
49
+ direction: "vertical" | "horizontal";
50
+ visibleOnHover: boolean;
51
+ wrapperClass: string;
52
+ contentClass: string;
53
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
54
+ containerRef: unknown;
55
+ contentRef: HTMLDivElement;
56
+ trackRef: HTMLDivElement;
57
+ }, any>;
58
+
59
+ declare const __VLS_component_3: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
34
60
  resetPwdDirectlySuccess: (...args: any[]) => void;
35
61
  followDevCommunity: (...args: any[]) => void;
36
62
  followUser: (...args: any[]) => void;
@@ -66,11 +92,11 @@ openCreateDropdown: boolean;
66
92
  headerRef: HTMLDivElement;
67
93
  }, HTMLDivElement>;
68
94
 
69
- declare const __VLS_component_3: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
95
+ declare const __VLS_component_4: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
70
96
  resetPwdDirectlySuccess: (...args: any[]) => void;
71
97
  followDevCommunity: (...args: any[]) => void;
72
98
  followUser: (...args: any[]) => void;
73
- }, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{
99
+ }, string, PublicProps, Readonly<__VLS_Props_4> & Readonly<{
74
100
  onResetPwdDirectlySuccess?: ((...args: any[]) => any) | undefined;
75
101
  onFollowDevCommunity?: ((...args: any[]) => any) | undefined;
76
102
  onFollowUser?: ((...args: any[]) => any) | undefined;
@@ -128,6 +154,11 @@ declare type __VLS_Props_2 = {
128
154
  };
129
155
 
130
156
  declare type __VLS_Props_3 = {
157
+ customItems?: HomePageSidebarItem[];
158
+ fallbacks?: Partial<HomeHeaderActionUrls>;
159
+ };
160
+
161
+ declare type __VLS_Props_4 = {
131
162
  isLogin: boolean;
132
163
  request: Function;
133
164
  globalStore: Object;
@@ -144,7 +175,7 @@ declare type __VLS_Props_3 = {
144
175
  loginChildComponents: any;
145
176
  };
146
177
 
147
- declare type __VLS_Props_4 = {
178
+ declare type __VLS_Props_5 = {
148
179
  /** 展示主题设置项,默认 true */
149
180
  showThemeSetting?: boolean;
150
181
  /** 展示语言设置项,默认 true */
@@ -164,6 +195,19 @@ declare function __VLS_template(): {
164
195
  };
165
196
 
166
197
  declare function __VLS_template_2(): {
198
+ attrs: Partial<{}>;
199
+ slots: {
200
+ default?(_: {}): any;
201
+ };
202
+ refs: {
203
+ containerRef: unknown;
204
+ contentRef: HTMLDivElement;
205
+ trackRef: HTMLDivElement;
206
+ };
207
+ rootEl: any;
208
+ };
209
+
210
+ declare function __VLS_template_3(): {
167
211
  attrs: Partial<{}>;
168
212
  slots: {
169
213
  headerCustom?(_: {}): any;
@@ -175,6 +219,7 @@ declare function __VLS_template_2(): {
175
219
  searchStr: string;
176
220
  searchMore: (type: any) => void;
177
221
  }): any;
222
+ headerActions?(_: {}): any;
178
223
  bodyHeader?(_: {}): any;
179
224
  info?(_: {}): any;
180
225
  menu?(_: {}): any;
@@ -186,7 +231,7 @@ declare function __VLS_template_2(): {
186
231
  rootEl: HTMLDivElement;
187
232
  };
188
233
 
189
- declare function __VLS_template_3(): {
234
+ declare function __VLS_template_4(): {
190
235
  attrs: Partial<{}>;
191
236
  slots: {
192
237
  search?(_: {}): any;
@@ -212,6 +257,8 @@ declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
212
257
 
213
258
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
214
259
 
260
+ declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
261
+
215
262
  declare type __VLS_WithTemplateSlots<T, S> = T & {
216
263
  new (): {
217
264
  $slots: S;
@@ -230,7 +277,13 @@ declare type __VLS_WithTemplateSlots_3<T, S> = T & {
230
277
  };
231
278
  };
232
279
 
233
- export declare const AsideFooterTools: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_4> & Readonly<{}>, {
280
+ declare type __VLS_WithTemplateSlots_4<T, S> = T & {
281
+ new (): {
282
+ $slots: S;
283
+ };
284
+ };
285
+
286
+ export declare const AsideFooterTools: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_5> & Readonly<{}>, {
234
287
  position: string[];
235
288
  showThemeSetting: boolean;
236
289
  showLangSetting: boolean;
@@ -260,7 +313,7 @@ declare const _default: {
260
313
  };
261
314
  export default _default;
262
315
 
263
- export declare const EnterpriseHeader: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
316
+ export declare const EnterpriseHeader: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
264
317
 
265
318
  declare type EventBus = {
266
319
  logout?: boolean;
@@ -294,7 +347,58 @@ declare type EventBus = {
294
347
 
295
348
  export declare const GitCodeAside: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
296
349
 
297
- export declare const GitCodeHeader: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
350
+ export declare const GitCodeAsideV2: DefineComponent<GitCodeAsideV2Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
351
+ select: (item: HomeChannelStoreItem) => any;
352
+ "update:modelValue": (val: string) => any;
353
+ "update:activeChannel": (val: string) => any;
354
+ channelChange: (item: HomeChannelStoreItem) => any;
355
+ }, string, PublicProps, Readonly<GitCodeAsideV2Props> & Readonly<{
356
+ onSelect?: ((item: HomeChannelStoreItem) => any) | undefined;
357
+ "onUpdate:modelValue"?: ((val: string) => any) | undefined;
358
+ "onUpdate:activeChannel"?: ((val: string) => any) | undefined;
359
+ onChannelChange?: ((item: HomeChannelStoreItem) => any) | undefined;
360
+ }>, {
361
+ globalStore: Record<string, unknown>;
362
+ isLogin: boolean;
363
+ sceneValue: SceneValue;
364
+ request: Function;
365
+ modelValue: string;
366
+ userInfo: AccountInfo;
367
+ independence: boolean;
368
+ singleCol: boolean;
369
+ channels: HomeChannelStoreItem[];
370
+ activeChannel: string;
371
+ onChannelChange: (item: HomeChannelStoreItem) => void;
372
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
373
+
374
+ /**
375
+ * GitCodeAsideV2 组件 Props 定义
376
+ */
377
+ declare interface GitCodeAsideV2Props {
378
+ /** 场景值,默认为 home */
379
+ sceneValue?: SceneValue;
380
+ /** 单列模式:移动端抽屉或紧凑容器内展示,不包含外层固定定位 */
381
+ singleCol?: boolean;
382
+ /** 外部传入的一级频道列表(若不传则组件内部请求接口获取) */
383
+ channels?: HomeChannelStoreItem[];
384
+ /** 当前激活频道 object_id,支持 v-model 或 v-model:activeChannel */
385
+ modelValue?: string;
386
+ activeChannel?: string;
387
+ /** 用户信息 */
388
+ userInfo?: AccountInfo;
389
+ /** 是否登录 */
390
+ isLogin?: boolean;
391
+ /** 请求实例 */
392
+ request?: Function;
393
+ /** 全局 store,上报用 */
394
+ globalStore?: Record<string, unknown>;
395
+ /** 是否独立部署 */
396
+ independence?: boolean;
397
+ /** 频道切换完成回调 */
398
+ onChannelChange?: (item: HomeChannelStoreItem) => void;
399
+ }
400
+
401
+ export declare const GitCodeHeader: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
298
402
 
299
403
  export declare const GitCodeLayoutEmitter: Emitter<EventBus>;
300
404
 
@@ -312,6 +416,73 @@ declare enum HeaderDisplayItem {
312
416
  OPERATION_ENTRY = "0111"
313
417
  }
314
418
 
419
+ /**
420
+ * 首页一级频道项
421
+ */
422
+ declare interface HomeChannelItem {
423
+ /** 频道 id (后端 mongo object_id 字符串) */
424
+ object_id: string;
425
+ /** 频道展示名 */
426
+ name: string;
427
+ name_en?: string;
428
+ icon?: string;
429
+ dark_icon?: string;
430
+ icon_dark?: string;
431
+ level?: number;
432
+ parent_id?: string;
433
+ /** 标识当前栏目是自定义静态页 */
434
+ static?: boolean;
435
+ /** 直接跳外链 url */
436
+ url?: string;
437
+ description?: string;
438
+ desc?: string;
439
+ desc_en?: string;
440
+ /** 是否本月新增,true 时在侧边菜单展示 New 标签 */
441
+ is_new?: boolean;
442
+ children?: HomeChannelItem[];
443
+ channelPrefixLogo?: {
444
+ logoUrl?: string;
445
+ logoLink?: string;
446
+ };
447
+ pre_logo?: string;
448
+ pre_logo_jump_url?: string;
449
+ [key: string]: unknown;
450
+ }
451
+
452
+ /**
453
+ * 首页频道 Store / 组件中使用的频道项类型
454
+ */
455
+ declare type HomeChannelStoreItem = HomeChannelItem & {
456
+ links?: RecommendLinkItem[];
457
+ group?: {
458
+ name: string;
459
+ name_en?: string;
460
+ len: number;
461
+ };
462
+ groupIndex?: number;
463
+ children?: HomeChannelStoreItem[];
464
+ };
465
+
466
+ export declare const HomeHeaderActions: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{}>, {
467
+ customItems: HomePageSidebarItem[];
468
+ fallbacks: Partial<HomeHeaderActionUrls>;
469
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
470
+
471
+ declare interface HomeHeaderActionUrls {
472
+ atomCode: string;
473
+ aiCommunity: string;
474
+ competition: string;
475
+ marketplace: string;
476
+ workspace: string;
477
+ }
478
+
479
+ declare interface HomePageSidebarItem {
480
+ left_menu_name_cn?: string;
481
+ left_menu_name_cn_shrink?: string;
482
+ left_menu_url?: string;
483
+ [key: string]: unknown;
484
+ }
485
+
315
486
  export declare const Login: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
316
487
  globalStore: Object;
317
488
  request: Function;
@@ -372,6 +543,34 @@ declare interface Props_2 {
372
543
  slotKeys?: Array<string>;
373
544
  }
374
545
 
546
+ declare interface Props_3 {
547
+ /** 容器使用的 DOM 元素标签,默认为 'div' */
548
+ tag?: string;
549
+ /** 滚动停止后取消 isScrolling 状态的延迟时间 (毫秒),默认 300 */
550
+ timeout?: number;
551
+ /** 滚动方向 'vertical' | 'horizontal',默认 'vertical' */
552
+ direction?: 'vertical' | 'horizontal';
553
+ /** 鼠标悬浮时是否展示滚动条,默认为 true */
554
+ visibleOnHover?: boolean;
555
+ /** 外层包裹容器的附加 class */
556
+ wrapperClass?: string;
557
+ /** 内容包裹层的附加 class */
558
+ contentClass?: string;
559
+ }
560
+
561
+ /**
562
+ * 频道推荐外链项
563
+ */
564
+ declare interface RecommendLinkItem {
565
+ name: string;
566
+ name_en?: string;
567
+ url: string;
568
+ icon?: string;
569
+ dark_icon?: string;
570
+ icon_dark?: string;
571
+ [key: string]: unknown;
572
+ }
573
+
375
574
  export declare enum SceneValue {
376
575
  home = "home",
377
576
  repo = "repo",
@@ -386,6 +585,8 @@ export declare enum SceneValue {
386
585
  enterprise = "enterprise"
387
586
  }
388
587
 
588
+ export declare const ScrollActiveContainer: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
589
+
389
590
  export declare function setLayoutConfig(customConfig: BaseLayoutConfig): void;
390
591
 
391
592
  export { setTheme }
package/index.js CHANGED
@@ -1,17 +1,20 @@
1
- import { O, P, Q, S, U, V, W, X, Y, B, Z, $, a0, a1 } from "./index-bSQvw45o.js";
1
+ import { $, Y, Q, U, W, a2, X, P, S, V, Z, O, B, a4, a1, a3, a0 } from "./index-Br1fy5_D.js";
2
2
  export {
3
- O as AsideFooterTools,
4
- P as EnterpriseHeader,
3
+ $ as AsideFooterTools,
4
+ Y as EnterpriseHeader,
5
5
  Q as GitCodeAside,
6
- S as GitCodeHeader,
7
- U as GitCodeLayoutEmitter,
8
- V as Login,
9
- W as SceneValue,
10
- X as SiteAnnouncement,
11
- Y as ToolsFloat,
6
+ U as GitCodeAsideV2,
7
+ W as GitCodeHeader,
8
+ a2 as GitCodeLayoutEmitter,
9
+ X as HomeHeaderActions,
10
+ P as Login,
11
+ S as SceneValue,
12
+ V as ScrollActiveContainer,
13
+ Z as SiteAnnouncement,
14
+ O as ToolsFloat,
12
15
  B as currentTheme,
13
- Z as default,
14
- $ as setLayoutConfig,
15
- a0 as setTheme,
16
- a1 as useLogin
16
+ a4 as default,
17
+ a1 as setLayoutConfig,
18
+ a3 as setTheme,
19
+ a0 as useLogin
17
20
  };
@@ -1,5 +1,5 @@
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-bSQvw45o.js";
1
+ import { defineComponent, computed, createBlock, openBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
2
+ import { i as isPhone, u as useModel, _ as _export_sfc } from "./index-Br1fy5_D.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";
@@ -33,13 +33,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  createVNode(unref(Button), {
34
34
  variant: "outline",
35
35
  size: isMobile.value ? "sm" : "md",
36
- onClick: __props.onClose,
36
+ onClick: _ctx.onClose,
37
37
  class: "email-notice__btn-ignore"
38
38
  }, {
39
- default: withCtx(() => [..._cache[1] || (_cache[1] = [
40
- createTextVNode("忽略", -1)
41
- ])]),
42
- _: 1
39
+ default: withCtx(() => _cache[1] || (_cache[1] = [
40
+ createTextVNode("忽略")
41
+ ])),
42
+ _: 1,
43
+ __: [1]
43
44
  }, 8, ["size", "onClick"]),
44
45
  createVNode(unref(Button), {
45
46
  variant: "solid",
@@ -47,10 +48,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
48
  color: "primary",
48
49
  onClick: handleConfirm
49
50
  }, {
50
- default: withCtx(() => [..._cache[2] || (_cache[2] = [
51
- createTextVNode("修改", -1)
52
- ])]),
53
- _: 1
51
+ default: withCtx(() => _cache[2] || (_cache[2] = [
52
+ createTextVNode("修改")
53
+ ])),
54
+ _: 1,
55
+ __: [2]
54
56
  }, 8, ["size"])
55
57
  ], 2)
56
58
  ]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-layout-gitcode",
3
- "version": "1.12.15-beta.15",
3
+ "version": "1.12.15-beta.17",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",