@yh-ui/components 0.1.25 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/ai-artifacts/src/ai-artifacts.vue +1 -1
  2. package/dist/ai-bubble/src/ai-bubble.vue +2 -2
  3. package/dist/ai-code-block/src/ai-code-block.vue +1 -1
  4. package/dist/ai-mention/index.d.ts +0 -1
  5. package/dist/ai-mention/src/ai-mention.vue +24 -9
  6. package/dist/ai-mention/src/ai-mention.vue.d.ts +1 -1
  7. package/dist/ai-mermaid/src/ai-mermaid.vue +8 -2
  8. package/dist/ai-thought-chain/src/ai-thought-chain.vue +1 -1
  9. package/dist/calendar/src/calendar.vue +3 -3
  10. package/dist/calendar/src/calendar.vue.d.ts +95 -96
  11. package/dist/date-picker/src/date-picker.vue +1 -1
  12. package/dist/date-picker/src/date-table.vue +1 -1
  13. package/dist/date-picker/src/month-table.vue +1 -1
  14. package/dist/date-picker/src/panel-utils.cjs +7 -7
  15. package/dist/date-picker/src/panel-utils.d.ts +1 -1
  16. package/dist/date-picker/src/panel-utils.mjs +13 -13
  17. package/dist/date-picker/src/quarter-table.vue +1 -1
  18. package/dist/date-picker/src/year-table.vue +1 -1
  19. package/dist/dayjs.cjs +11 -0
  20. package/dist/dayjs.d.ts +4 -0
  21. package/dist/dayjs.mjs +3 -0
  22. package/dist/form/src/form-schema.vue +13 -14
  23. package/dist/gantt-chart/src/gantt-chart.vue +7 -15
  24. package/dist/gantt-chart/src/gantt-chart.vue.d.ts +1 -1
  25. package/dist/highlight.cjs +34 -0
  26. package/dist/highlight.d.ts +13 -0
  27. package/dist/highlight.mjs +54 -0
  28. package/dist/image/src/image-viewer.vue +48 -26
  29. package/dist/image/src/image.vue +7 -5
  30. package/dist/markdown-it.cjs +11 -0
  31. package/dist/markdown-it.d.ts +2 -0
  32. package/dist/markdown-it.mjs +3 -0
  33. package/dist/menu/src/menu.vue +5 -5
  34. package/dist/transfer/index.cjs +9 -3
  35. package/dist/transfer/index.mjs +9 -3
  36. package/dist/typography/src/paragraph.vue +9 -2
  37. package/dist/upload/src/upload.vue +5 -4
  38. package/dist/viewerjs.cjs +11 -0
  39. package/dist/viewerjs.d.ts +2 -0
  40. package/dist/viewerjs.mjs +3 -0
  41. package/package.json +6 -6
@@ -9,7 +9,7 @@ import { YhIcon } from "../../icon";
9
9
  import { YhButton } from "../../button";
10
10
  import { YhSpin } from "../../spin";
11
11
  import { useComponentTheme } from "@yh-ui/theme";
12
- import hljs from "highlight.js";
12
+ import hljs from "../../highlight";
13
13
  import "highlight.js/styles/atom-one-dark.css";
14
14
  defineOptions({
15
15
  name: "YhAiArtifacts"
@@ -18,8 +18,8 @@ import { YhAvatar } from "../../avatar";
18
18
  import { YhButton } from "../../button";
19
19
  import { YhIcon } from "../../icon";
20
20
  import { YhAiThoughtChain } from "../../ai-thought-chain";
21
- import MarkdownIt from "markdown-it";
22
- import hljs from "highlight.js";
21
+ import MarkdownIt from "../../markdown-it";
22
+ import hljs from "../../highlight";
23
23
  import "highlight.js/styles/atom-one-dark.css";
24
24
  defineOptions({
25
25
  name: "YhAiBubble"
@@ -3,7 +3,7 @@ import { useNamespace, useLocale } from "@yh-ui/hooks";
3
3
  import { ref, computed, watch, useSlots, Comment, Text } from "vue";
4
4
  import { YhButton } from "../../button";
5
5
  import { YhIcon } from "../../icon";
6
- import hljs from "highlight.js";
6
+ import hljs from "../../highlight";
7
7
  import "highlight.js/styles/atom-one-dark.css";
8
8
  import { aiCodeBlockProps, aiCodeBlockEmits } from "./ai-code-block";
9
9
  import { useComponentTheme } from "@yh-ui/theme";
@@ -375,7 +375,6 @@ export declare const YhAiMention: import("@yh-ui/utils").SFCWithInstall<{
375
375
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
376
376
  $slots: {
377
377
  [x: string]: ((props: any) => any) | undefined;
378
- [x: number]: ((props: any) => any) | undefined;
379
378
  };
380
379
  })> & Record<string, unknown>;
381
380
  export default YhAiMention;
@@ -14,6 +14,7 @@ defineOptions({
14
14
  const props = defineProps(aiMentionProps);
15
15
  const emit = defineEmits(aiMentionEmits);
16
16
  const slots = useSlots();
17
+ const forwardedSlotNames = computed(() => Object.keys(slots));
17
18
  const ns = useNamespace("ai-mention");
18
19
  const { t } = useLocale();
19
20
  const { themeStyle } = useComponentTheme("ai-mention", props.themeOverrides);
@@ -67,6 +68,7 @@ const getOptionIcon = (type) => {
67
68
  return "sparkles";
68
69
  }
69
70
  };
71
+ const asAiMentionOption = (option) => option;
70
72
  const fileTreePanelStyle = computed(() => ({
71
73
  position: "fixed",
72
74
  top: "200px",
@@ -451,24 +453,37 @@ defineExpose({
451
453
  @input="emit('input', $event)"
452
454
  @keydown="emit('keydown', $event)"
453
455
  >
454
- <template #option="{ option }: { option: AiMentionOption }">
456
+ <template #option="{ option }">
455
457
  <div :class="ns.e('option-item')">
456
- <div :class="[ns.e('option-icon'), option.type ? ns.em('option-icon', option.type) : '']">
457
- <YhIcon :name="option.icon || getOptionIcon(option.type)" />
458
+ <div
459
+ :class="[ns.e('option-icon'), asAiMentionOption(option).type ? ns.em('option-icon', asAiMentionOption(option).type) : '']"
460
+ >
461
+ <YhIcon
462
+ :name="
463
+ asAiMentionOption(option).icon || getOptionIcon(asAiMentionOption(option).type)
464
+ "
465
+ />
458
466
  </div>
459
467
  <div :class="ns.e('option-info')">
460
- <div :class="ns.e('option-label')">{{ option.label || option.value }}</div>
461
- <div v-if="option.description" :class="ns.e('option-desc')">
462
- {{ option.description }}
468
+ <div :class="ns.e('option-label')">
469
+ {{ asAiMentionOption(option).label || asAiMentionOption(option).value }}
470
+ </div>
471
+ <div v-if="asAiMentionOption(option).description" :class="ns.e('option-desc')">
472
+ {{ asAiMentionOption(option).description }}
463
473
  </div>
464
474
  </div>
465
- <div v-if="option.type" :class="[ns.e('option-tag'), ns.em('option-tag', option.type)]">
466
- {{ t(`ai.mention.${option.type}`) || option.type }}
475
+ <div
476
+ v-if="asAiMentionOption(option).type"
477
+ :class="[ns.e('option-tag'), ns.em('option-tag', asAiMentionOption(option).type)]"
478
+ >
479
+ {{
480
+ t(`ai.mention.${asAiMentionOption(option).type}`) || asAiMentionOption(option).type
481
+ }}
467
482
  </div>
468
483
  </div>
469
484
  </template>
470
485
 
471
- <template v-for="(_, name) in slots" :key="name" #[name]="slotProps">
486
+ <template v-for="name in forwardedSlotNames" :key="name" #[name]="slotProps">
472
487
  <slot :name="name" v-bind="slotProps"></slot>
473
488
  </template>
474
489
  </YhMention>
@@ -1,5 +1,5 @@
1
1
  import { type AiMentionOption, type AiMentionFileNode } from './ai-mention';
2
- declare var __VLS_22: string | number, __VLS_23: any;
2
+ declare var __VLS_22: string, __VLS_23: any;
3
3
  type __VLS_Slots = {} & {
4
4
  [K in NonNullable<typeof __VLS_22>]?: (props: typeof __VLS_23) => any;
5
5
  };
@@ -23,6 +23,7 @@ const isLoading = ref(false);
23
23
  const renderType = ref("image");
24
24
  const zoomLevel = ref(1);
25
25
  const graphContainerRef = ref(null);
26
+ const canUseDom = typeof window !== "undefined" && typeof document !== "undefined";
26
27
  const loadMermaid = async () => {
27
28
  if (mermaidModule.value) return mermaidModule.value;
28
29
  try {
@@ -41,6 +42,11 @@ const renderGraph = async () => {
41
42
  svgContent.value = "";
42
43
  return;
43
44
  }
45
+ if (!canUseDom) {
46
+ svgContent.value = "";
47
+ errorMessage.value = null;
48
+ return;
49
+ }
44
50
  isLoading.value = true;
45
51
  errorMessage.value = null;
46
52
  try {
@@ -74,7 +80,7 @@ ${processedCode}`;
74
80
  watch(
75
81
  [() => props.code, () => props.config],
76
82
  () => {
77
- if (renderType.value === "image") {
83
+ if (canUseDom && renderType.value === "image") {
78
84
  renderGraph();
79
85
  }
80
86
  },
@@ -86,7 +92,7 @@ const handleRenderTypeChange = (type) => {
86
92
  if (props.onRenderTypeChange) {
87
93
  props.onRenderTypeChange(type);
88
94
  }
89
- if (type === "image") {
95
+ if (canUseDom && type === "image") {
90
96
  renderGraph();
91
97
  }
92
98
  };
@@ -2,7 +2,7 @@
2
2
  import { useNamespace, useLocale } from "@yh-ui/hooks";
3
3
  import { ref, computed, watch } from "vue";
4
4
  import { YhIcon } from "../../icon";
5
- import MarkdownIt from "markdown-it";
5
+ import MarkdownIt from "../../markdown-it";
6
6
  import { aiThoughtChainProps, aiThoughtChainEmits } from "./ai-thought-chain";
7
7
  import { useComponentTheme } from "@yh-ui/theme";
8
8
  defineOptions({
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { ref, computed, watch, onMounted } from "vue";
3
- import dayjs from "dayjs";
4
- import isoWeek from "dayjs/plugin/isoWeek";
3
+ import dayjs from "../../dayjs";
4
+ import isoWeekPlugin from "dayjs/plugin/isoWeek.js";
5
5
  import { useNamespace, useLocale } from "@yh-ui/hooks";
6
6
  import { useComponentTheme } from "@yh-ui/theme";
7
7
  import {
@@ -10,7 +10,7 @@ import {
10
10
  DEFAULT_CHINA_HOLIDAYS_2026
11
11
  } from "./calendar";
12
12
  import { YhButton } from "../../button";
13
- dayjs.extend(isoWeek);
13
+ dayjs.extend(isoWeekPlugin);
14
14
  defineOptions({
15
15
  name: "YhCalendar"
16
16
  });
@@ -1,5 +1,4 @@
1
- import dayjs from 'dayjs';
2
- import type { Dayjs } from 'dayjs';
1
+ import type { Dayjs } from '../../dayjs';
3
2
  import { type CalendarDateCell, type HolidayMap } from './calendar';
4
3
  declare var __VLS_1: {
5
4
  date: string;
@@ -152,28 +151,28 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
152
151
  (): number;
153
152
  (value: number): Dayjs;
154
153
  };
155
- set: (unit: dayjs.UnitType, value: number) => Dayjs;
156
- get: (unit: dayjs.UnitType) => number;
154
+ set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
155
+ get: (unit: import("dayjs").UnitType) => number;
157
156
  add: {
158
- (value: number, unit?: dayjs.ManipulateType): Dayjs;
159
- (value: number, unit: dayjs.QUnitType): Dayjs;
157
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
158
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
160
159
  };
161
160
  subtract: {
162
- (value: number, unit?: dayjs.ManipulateType): Dayjs;
163
- (value: number, unit: dayjs.QUnitType): Dayjs;
161
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
162
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
164
163
  };
165
164
  startOf: {
166
- (unit: dayjs.OpUnitType): Dayjs;
167
- (unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
168
- (unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
165
+ (unit: import("dayjs").OpUnitType): Dayjs;
166
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
167
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
169
168
  };
170
169
  endOf: {
171
- (unit: dayjs.OpUnitType): Dayjs;
172
- (unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
173
- (unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
170
+ (unit: import("dayjs").OpUnitType): Dayjs;
171
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
172
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
174
173
  };
175
174
  format: (template?: string) => string;
176
- diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
175
+ diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
177
176
  valueOf: () => number;
178
177
  unix: () => number;
179
178
  daysInMonth: () => number;
@@ -183,25 +182,25 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
183
182
  toString: () => string;
184
183
  utcOffset: () => number;
185
184
  isBefore: {
186
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
187
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
188
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
185
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
186
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
187
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
189
188
  };
190
189
  isSame: {
191
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
192
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
193
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
190
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
191
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
192
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
194
193
  };
195
194
  isAfter: {
196
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
197
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
198
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
195
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
196
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
197
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
199
198
  };
200
199
  locale: {
201
200
  (): string;
202
201
  (preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
203
202
  };
204
- isBetween: (a: dayjs.ConfigType, b: dayjs.ConfigType, c?: dayjs.OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
203
+ isBetween: (a: import("dayjs").ConfigType, b: import("dayjs").ConfigType, c?: import("dayjs").OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
205
204
  week: {
206
205
  (): number;
207
206
  (value: number): Dayjs;
@@ -219,7 +218,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
219
218
  (): number;
220
219
  (quarter: number): Dayjs;
221
220
  };
222
- }, dayjs.Dayjs | {
221
+ }, Dayjs | {
223
222
  clone: () => Dayjs;
224
223
  isValid: () => boolean;
225
224
  year: {
@@ -254,28 +253,28 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
254
253
  (): number;
255
254
  (value: number): Dayjs;
256
255
  };
257
- set: (unit: dayjs.UnitType, value: number) => Dayjs;
258
- get: (unit: dayjs.UnitType) => number;
256
+ set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
257
+ get: (unit: import("dayjs").UnitType) => number;
259
258
  add: {
260
- (value: number, unit?: dayjs.ManipulateType): Dayjs;
261
- (value: number, unit: dayjs.QUnitType): Dayjs;
259
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
260
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
262
261
  };
263
262
  subtract: {
264
- (value: number, unit?: dayjs.ManipulateType): Dayjs;
265
- (value: number, unit: dayjs.QUnitType): Dayjs;
263
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
264
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
266
265
  };
267
266
  startOf: {
268
- (unit: dayjs.OpUnitType): Dayjs;
269
- (unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
270
- (unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
267
+ (unit: import("dayjs").OpUnitType): Dayjs;
268
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
269
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
271
270
  };
272
271
  endOf: {
273
- (unit: dayjs.OpUnitType): Dayjs;
274
- (unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
275
- (unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
272
+ (unit: import("dayjs").OpUnitType): Dayjs;
273
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
274
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
276
275
  };
277
276
  format: (template?: string) => string;
278
- diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
277
+ diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
279
278
  valueOf: () => number;
280
279
  unix: () => number;
281
280
  daysInMonth: () => number;
@@ -285,25 +284,25 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
285
284
  toString: () => string;
286
285
  utcOffset: () => number;
287
286
  isBefore: {
288
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
289
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
290
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
287
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
288
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
289
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
291
290
  };
292
291
  isSame: {
293
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
294
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
295
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
292
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
293
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
294
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
296
295
  };
297
296
  isAfter: {
298
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
299
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
300
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
297
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
298
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
299
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
301
300
  };
302
301
  locale: {
303
302
  (): string;
304
303
  (preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
305
304
  };
306
- isBetween: (a: dayjs.ConfigType, b: dayjs.ConfigType, c?: dayjs.OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
305
+ isBetween: (a: import("dayjs").ConfigType, b: import("dayjs").ConfigType, c?: import("dayjs").OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
307
306
  week: {
308
307
  (): number;
309
308
  (value: number): Dayjs;
@@ -358,28 +357,28 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
358
357
  (): number;
359
358
  (value: number): Dayjs;
360
359
  };
361
- set: (unit: dayjs.UnitType, value: number) => Dayjs;
362
- get: (unit: dayjs.UnitType) => number;
360
+ set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
361
+ get: (unit: import("dayjs").UnitType) => number;
363
362
  add: {
364
- (value: number, unit?: dayjs.ManipulateType): Dayjs;
365
- (value: number, unit: dayjs.QUnitType): Dayjs;
363
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
364
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
366
365
  };
367
366
  subtract: {
368
- (value: number, unit?: dayjs.ManipulateType): Dayjs;
369
- (value: number, unit: dayjs.QUnitType): Dayjs;
367
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
368
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
370
369
  };
371
370
  startOf: {
372
- (unit: dayjs.OpUnitType): Dayjs;
373
- (unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
374
- (unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
371
+ (unit: import("dayjs").OpUnitType): Dayjs;
372
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
373
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
375
374
  };
376
375
  endOf: {
377
- (unit: dayjs.OpUnitType): Dayjs;
378
- (unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
379
- (unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
376
+ (unit: import("dayjs").OpUnitType): Dayjs;
377
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
378
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
380
379
  };
381
380
  format: (template?: string) => string;
382
- diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
381
+ diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
383
382
  valueOf: () => number;
384
383
  unix: () => number;
385
384
  daysInMonth: () => number;
@@ -389,25 +388,25 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
389
388
  toString: () => string;
390
389
  utcOffset: () => number;
391
390
  isBefore: {
392
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
393
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
394
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
391
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
392
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
393
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
395
394
  };
396
395
  isSame: {
397
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
398
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
399
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
396
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
397
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
398
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
400
399
  };
401
400
  isAfter: {
402
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
403
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
404
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
401
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
402
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
403
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
405
404
  };
406
405
  locale: {
407
406
  (): string;
408
407
  (preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
409
408
  };
410
- isBetween: (a: dayjs.ConfigType, b: dayjs.ConfigType, c?: dayjs.OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
409
+ isBetween: (a: import("dayjs").ConfigType, b: import("dayjs").ConfigType, c?: import("dayjs").OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
411
410
  week: {
412
411
  (): number;
413
412
  (value: number): Dayjs;
@@ -425,7 +424,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
425
424
  (): number;
426
425
  (quarter: number): Dayjs;
427
426
  };
428
- } | undefined, dayjs.Dayjs | {
427
+ } | undefined, Dayjs | {
429
428
  clone: () => Dayjs;
430
429
  isValid: () => boolean;
431
430
  year: {
@@ -460,28 +459,28 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
460
459
  (): number;
461
460
  (value: number): Dayjs;
462
461
  };
463
- set: (unit: dayjs.UnitType, value: number) => Dayjs;
464
- get: (unit: dayjs.UnitType) => number;
462
+ set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
463
+ get: (unit: import("dayjs").UnitType) => number;
465
464
  add: {
466
- (value: number, unit?: dayjs.ManipulateType): Dayjs;
467
- (value: number, unit: dayjs.QUnitType): Dayjs;
465
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
466
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
468
467
  };
469
468
  subtract: {
470
- (value: number, unit?: dayjs.ManipulateType): Dayjs;
471
- (value: number, unit: dayjs.QUnitType): Dayjs;
469
+ (value: number, unit?: import("dayjs").ManipulateType): Dayjs;
470
+ (value: number, unit: import("dayjs").QUnitType): Dayjs;
472
471
  };
473
472
  startOf: {
474
- (unit: dayjs.OpUnitType): Dayjs;
475
- (unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
476
- (unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
473
+ (unit: import("dayjs").OpUnitType): Dayjs;
474
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
475
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
477
476
  };
478
477
  endOf: {
479
- (unit: dayjs.OpUnitType): Dayjs;
480
- (unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
481
- (unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
478
+ (unit: import("dayjs").OpUnitType): Dayjs;
479
+ (unit: import("dayjs").OpUnitType | "isoWeek"): Dayjs;
480
+ (unit: import("dayjs").QUnitType | import("dayjs").OpUnitType): Dayjs;
482
481
  };
483
482
  format: (template?: string) => string;
484
- diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
483
+ diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
485
484
  valueOf: () => number;
486
485
  unix: () => number;
487
486
  daysInMonth: () => number;
@@ -491,25 +490,25 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
491
490
  toString: () => string;
492
491
  utcOffset: () => number;
493
492
  isBefore: {
494
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
495
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
496
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
493
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
494
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
495
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
497
496
  };
498
497
  isSame: {
499
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
500
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
501
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
498
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
499
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
500
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
502
501
  };
503
502
  isAfter: {
504
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
505
- (date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
506
- (date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
503
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType): boolean;
504
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType | "isoWeek"): boolean;
505
+ (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType): boolean;
507
506
  };
508
507
  locale: {
509
508
  (): string;
510
509
  (preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
511
510
  };
512
- isBetween: (a: dayjs.ConfigType, b: dayjs.ConfigType, c?: dayjs.OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
511
+ isBetween: (a: import("dayjs").ConfigType, b: import("dayjs").ConfigType, c?: import("dayjs").OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
513
512
  week: {
514
513
  (): number;
515
514
  (value: number): Dayjs;
@@ -11,7 +11,7 @@ import {
11
11
  datePickerProps
12
12
  } from "./date-picker";
13
13
  import { DEFAULT_FORMATS, formatDate } from "./panel-utils";
14
- import dayjs from "dayjs";
14
+ import dayjs from "../../dayjs";
15
15
  defineOptions({
16
16
  name: "YhDatePicker"
17
17
  });
@@ -2,7 +2,7 @@
2
2
  import { computed } from "vue";
3
3
  import { useNamespace, useLocale } from "@yh-ui/hooks";
4
4
  import { generateCalendar } from "./panel-utils";
5
- import dayjs from "dayjs";
5
+ import dayjs from "../../dayjs";
6
6
  const props = defineProps({
7
7
  date: { type: Date, required: true },
8
8
  selectedDate: { type: [Date, Array, null], required: false },
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import { useNamespace, useLocale } from "@yh-ui/hooks";
4
- import dayjs from "dayjs";
4
+ import dayjs from "../../dayjs";
5
5
  const props = defineProps({
6
6
  date: { type: Date, required: true },
7
7
  selectedDate: { type: [Date, Array, null], required: false },
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.parseDate = exports.generateCalendar = exports.formatDate = exports.DEFAULT_FORMATS = void 0;
7
- var _dayjs = _interopRequireDefault(require("dayjs"));
8
- var _isBetween = _interopRequireDefault(require("dayjs/plugin/isBetween"));
9
- var _weekOfYear = _interopRequireDefault(require("dayjs/plugin/weekOfYear"));
10
- var _isoWeek = _interopRequireDefault(require("dayjs/plugin/isoWeek"));
11
- var _quarterOfYear = _interopRequireDefault(require("dayjs/plugin/quarterOfYear"));
12
- var _advancedFormat = _interopRequireDefault(require("dayjs/plugin/advancedFormat"));
13
- var _customParseFormat = _interopRequireDefault(require("dayjs/plugin/customParseFormat"));
7
+ var _dayjs = _interopRequireDefault(require("../../dayjs.cjs"));
8
+ var _isBetween = _interopRequireDefault(require("dayjs/plugin/isBetween.js"));
9
+ var _weekOfYear = _interopRequireDefault(require("dayjs/plugin/weekOfYear.js"));
10
+ var _isoWeek = _interopRequireDefault(require("dayjs/plugin/isoWeek.js"));
11
+ var _quarterOfYear = _interopRequireDefault(require("dayjs/plugin/quarterOfYear.js"));
12
+ var _advancedFormat = _interopRequireDefault(require("dayjs/plugin/advancedFormat.js"));
13
+ var _customParseFormat = _interopRequireDefault(require("dayjs/plugin/customParseFormat.js"));
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
15
  _dayjs.default.extend(_isBetween.default);
16
16
  _dayjs.default.extend(_weekOfYear.default);
@@ -1,4 +1,4 @@
1
- import type { Dayjs } from 'dayjs';
1
+ import type { Dayjs } from '../../dayjs';
2
2
  export declare const DEFAULT_FORMATS: {
3
3
  date: string;
4
4
  datetime: string;
@@ -1,16 +1,16 @@
1
- import dayjs from "dayjs";
2
- import isBetween from "dayjs/plugin/isBetween";
3
- import weekOfYear from "dayjs/plugin/weekOfYear";
4
- import isoWeek from "dayjs/plugin/isoWeek";
5
- import quarterOfYear from "dayjs/plugin/quarterOfYear";
6
- import advancedFormat from "dayjs/plugin/advancedFormat";
7
- import customParseFormat from "dayjs/plugin/customParseFormat";
8
- dayjs.extend(isBetween);
9
- dayjs.extend(weekOfYear);
10
- dayjs.extend(isoWeek);
11
- dayjs.extend(quarterOfYear);
12
- dayjs.extend(advancedFormat);
13
- dayjs.extend(customParseFormat);
1
+ import dayjs from "../../dayjs.mjs";
2
+ import isBetweenPlugin from "dayjs/plugin/isBetween.js";
3
+ import weekOfYearPlugin from "dayjs/plugin/weekOfYear.js";
4
+ import isoWeekPlugin from "dayjs/plugin/isoWeek.js";
5
+ import quarterOfYearPlugin from "dayjs/plugin/quarterOfYear.js";
6
+ import advancedFormatPlugin from "dayjs/plugin/advancedFormat.js";
7
+ import customParseFormatPlugin from "dayjs/plugin/customParseFormat.js";
8
+ dayjs.extend(isBetweenPlugin);
9
+ dayjs.extend(weekOfYearPlugin);
10
+ dayjs.extend(isoWeekPlugin);
11
+ dayjs.extend(quarterOfYearPlugin);
12
+ dayjs.extend(advancedFormatPlugin);
13
+ dayjs.extend(customParseFormatPlugin);
14
14
  export const DEFAULT_FORMATS = {
15
15
  date: "YYYY-MM-DD",
16
16
  datetime: "YYYY-MM-DD HH:mm:ss",
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import { useNamespace, useLocale } from "@yh-ui/hooks";
4
- import dayjs from "dayjs";
4
+ import dayjs from "../../dayjs";
5
5
  const props = defineProps({
6
6
  date: { type: Date, required: true },
7
7
  selectedDate: { type: [Date, Array, null], required: false },
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import { useNamespace } from "@yh-ui/hooks";
4
- import dayjs from "dayjs";
4
+ import dayjs from "../../dayjs";
5
5
  const props = defineProps({
6
6
  date: { type: Date, required: true },
7
7
  selectedDate: { type: [Date, Array, null], required: false },