pxd 0.1.6 → 0.1.8
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/components/_internal/mention-editor.d.vue.ts +23 -14
- package/dist/components/_internal/mention-editor.vue +78 -10
- package/dist/components/_internal/tree-node.d.vue.ts +2 -2
- package/dist/components/_internal/tree-node.vue +1 -1
- package/dist/components/active-graph/index.vue +3 -3
- package/dist/components/approval-card/index.d.vue.ts +11 -1
- package/dist/components/approval-card/index.vue +28 -8
- package/dist/components/approval-card/types.d.ts +5 -6
- package/dist/components/avatar/index.vue +1 -1
- package/dist/components/backtop/index.d.vue.ts +1 -1
- package/dist/components/backtop/index.vue +32 -10
- package/dist/components/badge/index.vue +2 -2
- package/dist/components/book/index.vue +1 -1
- package/dist/components/book/types.d.ts +2 -2
- package/dist/components/breadcrumb-item/index.vue +1 -1
- package/dist/components/browser/index.vue +1 -1
- package/dist/components/bubble/index.d.vue.ts +1 -1
- package/dist/components/bubble/index.vue +6 -6
- package/dist/components/bubble/types.d.ts +1 -1
- package/dist/components/bubble-group/index.d.vue.ts +11 -3
- package/dist/components/bubble-group/index.vue +31 -19
- package/dist/components/bubble-group/types.d.ts +1 -0
- package/dist/components/button/index.vue +2 -2
- package/dist/components/button/types.d.ts +2 -2
- package/dist/components/button-group/types.d.ts +2 -2
- package/dist/components/calendar/index.vue +4 -4
- package/dist/components/carousel/types.d.ts +2 -2
- package/dist/components/checkbox/index.vue +1 -1
- package/dist/components/checkbox/types.d.ts +2 -2
- package/dist/components/checkerboard/index.vue +1 -1
- package/dist/components/chip/index.vue +1 -1
- package/dist/components/chip/types.d.ts +2 -2
- package/dist/components/choicebox/types.d.ts +2 -2
- package/dist/components/choicebox-item/index.vue +1 -1
- package/dist/components/choicebox-item/types.d.ts +2 -2
- package/dist/components/code-block/index.vue +12 -12
- package/dist/components/code-block/types.d.ts +2 -2
- package/dist/components/collapse/index.vue +6 -6
- package/dist/components/collapse/types.d.ts +2 -2
- package/dist/components/collapse-group/index.vue +6 -6
- package/dist/components/command-menu/index.d.vue.ts +1 -1
- package/dist/components/command-menu/index.vue +17 -5
- package/dist/components/command-menu/types.d.ts +8 -1
- package/dist/components/config-provider/index.d.vue.ts +3 -0
- package/dist/components/confirm-popover/index.vue +1 -1
- package/dist/components/confirm-popover/types.d.ts +5 -5
- package/dist/components/context-usage/index.vue +13 -6
- package/dist/components/copy-button/index.d.vue.ts +2 -0
- package/dist/components/copy-button/index.vue +7 -3
- package/dist/components/copy-button/types.d.ts +3 -2
- package/dist/components/countdown/index.d.vue.ts +1 -1
- package/dist/components/countdown/index.vue +1 -1
- package/dist/components/date-picker/index.d.vue.ts +11 -1
- package/dist/components/date-picker/index.vue +4 -2
- package/dist/components/description/types.d.ts +2 -2
- package/dist/components/drawer/index.vue +4 -1
- package/dist/components/drawer/types.d.ts +4 -4
- package/dist/components/effort-slider/index.vue +13 -16
- package/dist/components/ellipsis-text/types.d.ts +3 -3
- package/dist/components/empty-state/index.vue +1 -1
- package/dist/components/empty-state/types.d.ts +2 -2
- package/dist/components/error/index.vue +2 -2
- package/dist/components/error/types.d.ts +2 -2
- package/dist/components/feedback-bar/index.vue +4 -4
- package/dist/components/gauge/index.vue +3 -3
- package/dist/components/hint/index.vue +2 -2
- package/dist/components/hold-button/index.d.vue.ts +2 -4
- package/dist/components/hold-button/index.vue +9 -13
- package/dist/components/hold-button/types.d.ts +2 -4
- package/dist/components/hue-text/types.d.ts +2 -2
- package/dist/components/image-preview/index.vue +6 -6
- package/dist/components/input/index.d.vue.ts +6 -6
- package/dist/components/input/index.vue +5 -5
- package/dist/components/kbd/index.vue +1 -1
- package/dist/components/kbd/types.d.ts +2 -2
- package/dist/components/link-button/index.d.vue.ts +1 -1
- package/dist/components/link-button/types.d.ts +1 -1
- package/dist/components/list/index.d.vue.ts +2 -1
- package/dist/components/list/index.vue +8 -2
- package/dist/components/list/types.d.ts +16 -8
- package/dist/components/list-group/index.vue +1 -7
- package/dist/components/list-group/types.d.ts +1 -1
- package/dist/components/list-item/index.d.vue.ts +2 -2
- package/dist/components/list-item/index.vue +16 -3
- package/dist/components/list-item/types.d.ts +1 -0
- package/dist/components/loading-mask/types.d.ts +1 -1
- package/dist/components/marching-ants/index.d.vue.ts +1 -1
- package/dist/components/marching-ants/index.vue +2 -2
- package/dist/components/marquee/index.d.vue.ts +3 -3
- package/dist/components/marquee/types.d.ts +2 -2
- package/dist/components/mention/index.d.vue.ts +27 -7
- package/dist/components/mention/index.vue +96 -11
- package/dist/components/mention/types.d.ts +37 -5
- package/dist/components/menu/index.d.vue.ts +3 -1
- package/dist/components/menu/index.vue +4 -0
- package/dist/components/message/index.d.vue.ts +4 -4
- package/dist/components/message/index.vue +3 -3
- package/dist/components/message-item/index.vue +1 -1
- package/dist/components/modal/index.vue +5 -2
- package/dist/components/modal/types.d.ts +4 -4
- package/dist/components/more-button/types.d.ts +2 -2
- package/dist/components/note/index.vue +3 -3
- package/dist/components/note/types.d.ts +3 -3
- package/dist/components/number-input/index.d.vue.ts +4 -4
- package/dist/components/page-number/index.vue +2 -2
- package/dist/components/pagination/index.vue +2 -2
- package/dist/components/pin-input/index.d.vue.ts +1 -1
- package/dist/components/pin-input/index.vue +1 -1
- package/dist/components/popover/index.vue +111 -100
- package/dist/components/popover/types.d.ts +0 -2
- package/dist/components/progress/index.d.vue.ts +1 -1
- package/dist/components/project-banner/index.vue +3 -3
- package/dist/components/project-banner/types.d.ts +2 -2
- package/dist/components/questionnaire/index.d.vue.ts +1 -1
- package/dist/components/questionnaire/index.vue +110 -46
- package/dist/components/questionnaire/types.d.ts +5 -1
- package/dist/components/radio/index.vue +1 -1
- package/dist/components/radio/types.d.ts +2 -2
- package/dist/components/rating/index.d.vue.ts +1 -1
- package/dist/components/rating/index.vue +1 -0
- package/dist/components/rating/types.d.ts +2 -2
- package/dist/components/reasoning/index.vue +4 -4
- package/dist/components/reasoning/types.d.ts +2 -2
- package/dist/components/resizable/index.d.vue.ts +1 -1
- package/dist/components/resizable/index.vue +34 -30
- package/dist/components/reveal/index.d.vue.ts +1 -1
- package/dist/components/reveal/index.vue +2 -2
- package/dist/components/rolling-number/index.d.vue.ts +1 -1
- package/dist/components/rolling-number/index.vue +6 -6
- package/dist/components/rolling-number/types.d.ts +1 -1
- package/dist/components/scroll-text/index.vue +3 -2
- package/dist/components/scroll-text/types.d.ts +2 -2
- package/dist/components/scrollable/index.vue +1 -6
- package/dist/components/scrollable/types.d.ts +0 -2
- package/dist/components/search-input/index.d.vue.ts +14 -14
- package/dist/components/search-input/index.vue +2 -2
- package/dist/components/select/index.d.vue.ts +8 -4
- package/dist/components/select/index.vue +29 -12
- package/dist/components/select/types.d.ts +9 -1
- package/dist/components/shimmer-text/index.d.vue.ts +2 -2
- package/dist/components/shimmer-text/index.vue +2 -2
- package/dist/components/shimmer-text/types.d.ts +4 -2
- package/dist/components/slider/index.d.vue.ts +1 -1
- package/dist/components/slider/index.vue +34 -2
- package/dist/components/snippet/index.d.vue.ts +2 -0
- package/dist/components/snippet/index.vue +6 -2
- package/dist/components/snippet/types.d.ts +3 -2
- package/dist/components/split-button/index.d.vue.ts +10 -6
- package/dist/components/split-button/index.vue +25 -6
- package/dist/components/split-button/types.d.ts +3 -1
- package/dist/components/status-dot/types.d.ts +2 -2
- package/dist/components/steps/types.d.ts +3 -3
- package/dist/components/stick-to-bottom/index.vue +9 -12
- package/dist/components/stick-to-bottom/types.d.ts +0 -2
- package/dist/components/switch/index.vue +1 -1
- package/dist/components/switch-item/types.d.ts +2 -2
- package/dist/components/tabs/index.vue +3 -3
- package/dist/components/teleport/index.vue +6 -3
- package/dist/components/text/index.vue +1 -1
- package/dist/components/text/types.d.ts +1 -1
- package/dist/components/textarea/index.d.vue.ts +6 -6
- package/dist/components/textarea/index.vue +1 -1
- package/dist/components/textarea/types.d.ts +2 -2
- package/dist/components/time-picker/index.d.vue.ts +11 -1
- package/dist/components/time-picker/index.vue +8 -6
- package/dist/components/toc/index.d.vue.ts +4 -1
- package/dist/components/toc/index.vue +72 -10
- package/dist/components/toc/types.d.ts +11 -1
- package/dist/components/todo-list/index.d.vue.ts +1 -1
- package/dist/components/todo-list/index.vue +138 -103
- package/dist/components/todo-list/types.d.ts +7 -5
- package/dist/components/toggle/index.vue +1 -1
- package/dist/components/toggle-button/index.vue +11 -9
- package/dist/components/toggle-button/types.d.ts +3 -3
- package/dist/components/toggle-button-group/index.vue +2 -1
- package/dist/components/toggle-button-group/types.d.ts +2 -2
- package/dist/components/tool-call/index.vue +31 -35
- package/dist/components/tool-call/types.d.ts +2 -2
- package/dist/components/tooltip/index.d.vue.ts +1 -1
- package/dist/components/tour/index.d.vue.ts +3 -3
- package/dist/components/tour/index.vue +1 -1
- package/dist/components/tour/types.d.ts +4 -4
- package/dist/components/tree/index.d.vue.ts +1 -1
- package/dist/components/tree/index.vue +5 -4
- package/dist/components/tree/types.d.ts +4 -5
- package/dist/components/virtual-list/index.d.vue.ts +1 -0
- package/dist/components/virtual-list/index.vue +2 -1
- package/dist/components/virtual-list/types.d.ts +3 -3
- package/dist/composables/_internal/use-details-collapse.js +28 -3
- package/dist/composables/_internal/use-list-search.d.ts +15 -0
- package/dist/composables/_internal/use-list-search.js +50 -0
- package/dist/composables/_internal/use-mention-editor.d.ts +10 -5
- package/dist/composables/_internal/use-mention-editor.js +180 -140
- package/dist/composables/_internal/use-mention-suggest.d.ts +10 -8
- package/dist/composables/_internal/use-mention-suggest.js +39 -25
- package/dist/composables/_internal/use-message-group.js +6 -6
- package/dist/composables/_internal/use-popover-responsive.d.ts +1 -1
- package/dist/composables/_internal/use-popover-responsive.js +1 -1
- package/dist/composables/_internal/use-remote-search.d.ts +17 -0
- package/dist/composables/_internal/use-remote-search.js +58 -0
- package/dist/composables/_internal/use-tree.d.ts +2 -2
- package/dist/composables/_internal/use-tree.js +7 -52
- package/dist/composables/_internal/use-word-limit.d.ts +2 -2
- package/dist/composables/use-backoff-retry.d.ts +2 -35
- package/dist/composables/use-backoff-retry.js +5 -98
- package/dist/composables/use-copy-click.js +14 -13
- package/dist/composables/use-countdown.d.ts +1 -1
- package/dist/composables/use-countdown.js +4 -4
- package/dist/composables/use-delay-destroy.js +8 -6
- package/dist/composables/use-message.d.ts +1 -1
- package/dist/composables/use-message.js +1 -1
- package/dist/composables/use-repeat-action.d.ts +1 -1
- package/dist/composables/use-repeat-action.js +3 -3
- package/dist/composables/use-stick-to-bottom.d.ts +4 -21
- package/dist/composables/use-stick-to-bottom.js +138 -24
- package/dist/composables/use-view-transition.d.ts +23 -9
- package/dist/composables/use-virtual-list.d.ts +20 -0
- package/dist/composables/use-virtual-list.js +30 -9
- package/dist/constants/tooltip-variants.d.ts +1 -1
- package/dist/constants/tooltip-variants.js +1 -1
- package/dist/locales/en-us.d.ts +3 -0
- package/dist/locales/en-us.js +4 -1
- package/dist/locales/zh-cn.d.ts +3 -0
- package/dist/locales/zh-cn.js +4 -1
- package/dist/styles/styles.css +1 -1
- package/dist/styles/tw.css +5 -14
- package/dist/types/shared/props.d.ts +5 -2
- package/dist/utils/_internal/mention-html.d.ts +1 -0
- package/dist/utils/_internal/mention-html.js +6 -4
- package/dist/utils/_internal/observer.js +3 -3
- package/dist/utils/backoff-retry.d.ts +15 -0
- package/dist/utils/backoff-retry.js +94 -0
- package/dist/utils/mention-html.d.ts +14 -0
- package/dist/utils/mention-html.js +71 -0
- package/package.json +2 -9
- package/dist/composables/_internal/use-list-filter.d.ts +0 -15
- package/dist/composables/_internal/use-list-filter.js +0 -48
|
@@ -44,12 +44,20 @@ const props = defineProps({
|
|
|
44
44
|
],
|
|
45
45
|
required: false
|
|
46
46
|
},
|
|
47
|
+
mainButtonProps: {
|
|
48
|
+
type: Object,
|
|
49
|
+
required: false
|
|
50
|
+
},
|
|
47
51
|
closeOnPressEscape: {
|
|
48
52
|
type: Boolean,
|
|
49
53
|
required: false
|
|
50
54
|
}
|
|
51
55
|
});
|
|
52
|
-
const emits = defineEmits([
|
|
56
|
+
const emits = defineEmits([
|
|
57
|
+
"change",
|
|
58
|
+
"main-click",
|
|
59
|
+
"update:model-value"
|
|
60
|
+
]);
|
|
53
61
|
const modelValue = useModelValue(props, emits);
|
|
54
62
|
const selectedItem = useSelectedListItem(() => props.options || [], modelValue);
|
|
55
63
|
const configProvider = useConfigProvider();
|
|
@@ -69,17 +77,24 @@ const computedSize = computed(() => props.size || configProvider.size);
|
|
|
69
77
|
:close-on-press-escape="closeOnPressEscape"
|
|
70
78
|
v-bind="$attrs"
|
|
71
79
|
>
|
|
72
|
-
<PButton
|
|
80
|
+
<PButton
|
|
81
|
+
:shape="shape"
|
|
82
|
+
:variant="variant"
|
|
83
|
+
:size="computedSize"
|
|
84
|
+
:disabled="disabled"
|
|
85
|
+
v-bind="mainButtonProps"
|
|
86
|
+
@click="emits('main-click')"
|
|
87
|
+
>
|
|
73
88
|
<slot :data="selectedItem" />
|
|
74
89
|
</PButton>
|
|
75
90
|
|
|
76
91
|
<PButton
|
|
77
|
-
|
|
78
|
-
:disabled="disabled"
|
|
79
|
-
:variant="variant"
|
|
92
|
+
icon
|
|
80
93
|
:shape="shape"
|
|
94
|
+
:variant="variant"
|
|
95
|
+
:disabled="disabled"
|
|
81
96
|
:size="computedSize"
|
|
82
|
-
|
|
97
|
+
data-split-button-trigger
|
|
83
98
|
>
|
|
84
99
|
<slot name="icon">
|
|
85
100
|
<ChevronDownIcon />
|
|
@@ -89,5 +104,9 @@ const computedSize = computed(() => props.size || configProvider.size);
|
|
|
89
104
|
<template v-if="$slots.item" #item="itemSlotProps">
|
|
90
105
|
<slot name="item" v-bind="itemSlotProps" />
|
|
91
106
|
</template>
|
|
107
|
+
|
|
108
|
+
<template v-if="$slots.footer">
|
|
109
|
+
<slot name="footer" />
|
|
110
|
+
</template>
|
|
92
111
|
</PMenu>
|
|
93
112
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentShape, ComponentSizeWithXs } from '../../types/shared/props'
|
|
2
2
|
import type { ListModelValue, ListOptions } from '../list/types'
|
|
3
|
-
import { ButtonVariant } from '../button/types'
|
|
3
|
+
import { ButtonVariant, type ButtonProps } from '../button/types'
|
|
4
4
|
|
|
5
5
|
export interface SplitButtonProps {
|
|
6
6
|
variant?: ButtonVariant
|
|
@@ -9,10 +9,12 @@ export interface SplitButtonProps {
|
|
|
9
9
|
options?: ListOptions
|
|
10
10
|
disabled?: boolean
|
|
11
11
|
modelValue?: ListModelValue
|
|
12
|
+
mainButtonProps?: ButtonProps
|
|
12
13
|
closeOnPressEscape?: boolean
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export interface SplitButtonEmits {
|
|
16
17
|
change: [ListModelValue]
|
|
18
|
+
'main-click': []
|
|
17
19
|
'update:model-value': [ListModelValue]
|
|
18
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentText } from '../../types/shared/props'
|
|
2
2
|
|
|
3
3
|
export interface StatusDotProps {
|
|
4
|
-
label?: boolean |
|
|
4
|
+
label?: boolean | ComponentText
|
|
5
5
|
state?: 'QUEUED' | 'BUILDING' | 'READY' | 'ERROR' | 'CANCELED'
|
|
6
6
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ComponentDirection,
|
|
1
|
+
import type { ComponentDirection, ComponentText, ComponentSize } from '../../types/shared/props'
|
|
2
2
|
|
|
3
3
|
export type StepsStatus = 'process' | 'finish' | 'error' | 'wait'
|
|
4
4
|
|
|
5
5
|
export interface StepsOption {
|
|
6
|
-
title?:
|
|
7
|
-
description?:
|
|
6
|
+
title?: ComponentText
|
|
7
|
+
description?: ComponentText
|
|
8
8
|
status?: StepsStatus
|
|
9
9
|
disabled?: boolean
|
|
10
10
|
}
|
|
@@ -24,19 +24,17 @@ const props = defineProps({
|
|
|
24
24
|
Object
|
|
25
25
|
],
|
|
26
26
|
required: false
|
|
27
|
-
},
|
|
28
|
-
contentStyle: {
|
|
29
|
-
type: [Object, String],
|
|
30
|
-
required: false
|
|
31
27
|
}
|
|
32
28
|
});
|
|
33
29
|
const emits = defineEmits(["change"]);
|
|
34
30
|
const containerRef = shallowRef();
|
|
35
31
|
const contentRef = shallowRef();
|
|
32
|
+
const actionRef = shallowRef();
|
|
36
33
|
const { classes, attrs } = useTailwindVariant({ base: "pxd-stick-to-bottom min-h-0 w-full max-w-full overflow-y-auto [overflow-anchor:none]" });
|
|
37
34
|
const { isAtBottom, scrollToBottom, forceStickToBottom, stickIfNeeded, update } = useStickToBottom(containerRef, contentRef, {
|
|
38
35
|
threshold: () => props.threshold,
|
|
39
|
-
enabled: () => props.enabled
|
|
36
|
+
enabled: () => props.enabled,
|
|
37
|
+
action: actionRef
|
|
40
38
|
});
|
|
41
39
|
watch(() => isAtBottom.value, (value) => {
|
|
42
40
|
emits("change", value);
|
|
@@ -54,16 +52,15 @@ defineExpose({
|
|
|
54
52
|
|
|
55
53
|
<template>
|
|
56
54
|
<div data-stick-to-bottom ref="containerRef" :class="classes" v-bind="attrs">
|
|
57
|
-
<div
|
|
58
|
-
ref="contentRef"
|
|
59
|
-
class="pxd-stick-to-bottom--content"
|
|
60
|
-
:class="contentClass"
|
|
61
|
-
:style="contentStyle"
|
|
62
|
-
>
|
|
55
|
+
<div ref="contentRef" class="pxd-stick-to-bottom--content" :class="contentClass">
|
|
63
56
|
<slot />
|
|
64
57
|
</div>
|
|
65
58
|
|
|
66
|
-
<div
|
|
59
|
+
<div
|
|
60
|
+
v-if="$slots.action"
|
|
61
|
+
ref="actionRef"
|
|
62
|
+
class="pxd-stick-to-bottom--action bottom-0 sticky w-full"
|
|
63
|
+
>
|
|
67
64
|
<slot
|
|
68
65
|
name="action"
|
|
69
66
|
:is-at-bottom="isAtBottom"
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { ComponentClass } from '../../types/shared/props'
|
|
2
|
-
import type { CSSProperties } from 'vue'
|
|
3
2
|
|
|
4
3
|
export interface StickToBottomProps {
|
|
5
4
|
enabled?: boolean
|
|
6
5
|
threshold?: number
|
|
7
6
|
contentClass?: ComponentClass
|
|
8
|
-
contentStyle?: CSSProperties | string
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
export interface StickToBottomEmits {
|
|
@@ -40,7 +40,7 @@ const props = defineProps({
|
|
|
40
40
|
});
|
|
41
41
|
const emits = defineEmits(["change", "update:model-value"]);
|
|
42
42
|
const SIZES = {
|
|
43
|
-
sm: `${BASIC_HEIGHTS.sm} text-
|
|
43
|
+
sm: `${BASIC_HEIGHTS.sm} text-[0.8125rem]`,
|
|
44
44
|
md: `${BASIC_HEIGHTS.md} text-sm`,
|
|
45
45
|
lg: `${BASIC_HEIGHTS.lg} text-base`
|
|
46
46
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentText } from '../../types/shared/props'
|
|
2
2
|
|
|
3
3
|
export interface SwitchItemProps {
|
|
4
|
-
label?:
|
|
4
|
+
label?: ComponentText
|
|
5
5
|
value: string | number
|
|
6
6
|
disabled?: boolean
|
|
7
7
|
}
|
|
@@ -243,7 +243,7 @@ onBeforeUnmount(() => {
|
|
|
243
243
|
aria-label="Scroll tabs left"
|
|
244
244
|
@click="scrollTabs('prev')"
|
|
245
245
|
>
|
|
246
|
-
<ChevronRightIcon class="size-
|
|
246
|
+
<ChevronRightIcon class="size-em rotate-180" aria-hidden="true" />
|
|
247
247
|
</button>
|
|
248
248
|
|
|
249
249
|
<div
|
|
@@ -285,7 +285,7 @@ onBeforeUnmount(() => {
|
|
|
285
285
|
aria-label="Scroll tabs right"
|
|
286
286
|
@click="scrollTabs('next')"
|
|
287
287
|
>
|
|
288
|
-
<ChevronRightIcon class="size-
|
|
288
|
+
<ChevronRightIcon class="size-em" aria-hidden="true" />
|
|
289
289
|
</button>
|
|
290
290
|
</div>
|
|
291
291
|
|
|
@@ -309,5 +309,5 @@ onBeforeUnmount(() => {
|
|
|
309
309
|
</template>
|
|
310
310
|
|
|
311
311
|
<style>
|
|
312
|
-
.pxd-tabs--header[data-variant=default]{box-shadow:0 -1px 0 0 var(--color-border) inset;padding-bottom:1px}.pxd-tabs--header[data-variant=default]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--scroll{margin-bottom:-1px}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav{gap:1.5rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item{border-bottom
|
|
312
|
+
.pxd-tabs--header[data-variant=default]{box-shadow:0 -1px 0 0 var(--color-border) inset;padding-bottom:1px}.pxd-tabs--header[data-variant=default]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--scroll{margin-bottom:-1px}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav{gap:1.5rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item{border-bottom:.125rem solid transparent;padding:.875rem .375rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item:not(:disabled){color:var(--color-gray-900)}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item[aria-selected=true]{border-color:currentColor;color:var(--color-primary)}.pxd-tabs--header[data-variant=secondary]+.pxd-tabs--content{padding-top:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav{gap:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item{background-color:var(--color-gray-alpha-200);border-radius:var(--radius-md);font-size:.8125rem;height:1.5rem;padding:0 .375rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item:disabled{background-color:var(--color-gray-100)}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item[aria-selected=true]{background-color:var(--color-primary);color:var(--color-gray-100)}.pxd-tabs--header[data-variant=segmented]{background-color:var(--color-gray-alpha-200);border-radius:var(--radius-md);color:var(--color-gray-800);padding:.25rem;width:-moz-max-content;width:max-content}.pxd-tabs--header[data-variant=segmented]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--arrow{border-width:0}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav{gap:.25rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item{border-radius:var(--radius-sm);height:1.5rem;padding:0 .5rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item:hover{color:var(--color-foreground)}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item:disabled{color:var(--color-gray-500)}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item[aria-selected=true]{background-color:var(--color-background-100);box-shadow:var(--shadow-small);color:var(--color-foreground)}
|
|
313
313
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, onBeforeUnmount, onMounted, shallowRef, watch } from "vue";
|
|
2
|
+
import { computed, getCurrentInstance, onBeforeUnmount, onMounted, shallowRef, watch } from "vue";
|
|
3
3
|
import { isServer, isVue3 } from "../../utils/is.js";
|
|
4
4
|
defineOptions({
|
|
5
5
|
name: "PTeleport",
|
|
@@ -22,8 +22,11 @@ let isTeleported = false;
|
|
|
22
22
|
let homeLocation;
|
|
23
23
|
// A teleported subtree cannot be prerendered: the content never reaches the HTML, so
|
|
24
24
|
// hydration would rebuild it elsewhere and leave the server copy orphaned. Render it
|
|
25
|
-
// in place for the server pass and for
|
|
26
|
-
|
|
25
|
+
// in place for the server pass and for hydrating, then move it. A fresh client render
|
|
26
|
+
// has nothing to match, and rendering it in place once exposes it to the host's
|
|
27
|
+
// containing block and scroll offsets — which floating layers measure.
|
|
28
|
+
const isHydrating = Boolean(getCurrentInstance()?.vnode.el);
|
|
29
|
+
const mounted = shallowRef(!inServer && !isHydrating);
|
|
27
30
|
const isDisabled = computed(() => props.disabled || !mounted.value);
|
|
28
31
|
const containerRef = shallowRef();
|
|
29
32
|
const targetEl = computed(() => {
|
|
@@ -48,7 +48,7 @@ const presetSize = {
|
|
|
48
48
|
};
|
|
49
49
|
const computedStyle = computed(() => {
|
|
50
50
|
const { size } = props;
|
|
51
|
-
return getResponsiveValue(size, (typeof size === "object" ? size.xs : size) ?? "
|
|
51
|
+
return getResponsiveValue(size, (typeof size === "object" ? size.xs : size) ?? "0.875rem", (acc, bp, value) => acc[bp] = acc[`--text-${bp}`] = getCssUnitValue(value));
|
|
52
52
|
});
|
|
53
53
|
const { attrs, classes: variantClasses } = useTailwindVariant({
|
|
54
54
|
base: "pxd-text m-0 shrink-0",
|
|
@@ -2,7 +2,7 @@ import type { ComponentAs, ResponsiveValue } from '../../types/shared/props'
|
|
|
2
2
|
|
|
3
3
|
export interface TextProps {
|
|
4
4
|
as?: ComponentAs
|
|
5
|
-
text?:
|
|
5
|
+
text?: ComponentText
|
|
6
6
|
size?: ResponsiveValue<string | number>
|
|
7
7
|
align?: 'left' | 'center' | 'right'
|
|
8
8
|
monospace?: boolean
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { TextareaProps } from './types';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<TextareaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
-
change: (args_0: NonNullable<import("../../types/shared/props.js").
|
|
4
|
-
"update:model-value": (args_0: NonNullable<import("../../types/shared/props.js").
|
|
5
|
-
blur: (args_0: FocusEvent) => any;
|
|
3
|
+
change: (args_0: NonNullable<import("../../types/shared/props.js").ComponentText>) => any;
|
|
4
|
+
"update:model-value": (args_0: NonNullable<import("../../types/shared/props.js").ComponentText>) => any;
|
|
6
5
|
focus: (args_0: FocusEvent) => any;
|
|
6
|
+
blur: (args_0: FocusEvent) => any;
|
|
7
7
|
}, string, import("vue").PublicProps, Readonly<TextareaProps> & Readonly<{
|
|
8
|
-
onChange?: ((args_0: NonNullable<import("../../types/shared/props.js").
|
|
9
|
-
"onUpdate:model-value"?: ((args_0: NonNullable<import("../../types/shared/props.js").
|
|
10
|
-
onBlur?: ((args_0: FocusEvent) => any) | undefined;
|
|
8
|
+
onChange?: ((args_0: NonNullable<import("../../types/shared/props.js").ComponentText>) => any) | undefined;
|
|
9
|
+
"onUpdate:model-value"?: ((args_0: NonNullable<import("../../types/shared/props.js").ComponentText>) => any) | undefined;
|
|
11
10
|
onFocus?: ((args_0: FocusEvent) => any) | undefined;
|
|
11
|
+
onBlur?: ((args_0: FocusEvent) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
13
|
modelValue: string | number | null;
|
|
14
14
|
trimOverflow: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentText, ComponentSizeWithXs } from '../../types/shared/props'
|
|
2
2
|
|
|
3
3
|
export interface TextareaProps {
|
|
4
4
|
rows?: string | number
|
|
@@ -11,7 +11,7 @@ export interface TextareaProps {
|
|
|
11
11
|
minLength?: number | string
|
|
12
12
|
maxLength?: number | string
|
|
13
13
|
trimOverflow?: boolean
|
|
14
|
-
modelValue?:
|
|
14
|
+
modelValue?: ComponentText
|
|
15
15
|
placeholder?: string
|
|
16
16
|
showWordLimit?: boolean | string
|
|
17
17
|
wordLimitPosition?: 'inside' | 'outside'
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { TimePickerProps } from './types';
|
|
2
|
-
declare
|
|
2
|
+
declare var __VLS_21: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
suffix?: (props: typeof __VLS_21) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<TimePickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
7
|
change: (args_0: import("../../types/shared/props.js").ComponentDateTimeValue) => any;
|
|
4
8
|
"update:model-value": (args_0: import("../../types/shared/props.js").ComponentDateTimeValue) => any;
|
|
5
9
|
}, string, import("vue").PublicProps, Readonly<TimePickerProps> & Readonly<{
|
|
@@ -13,5 +17,11 @@ declare const __VLS_export: import("vue").DefineComponent<TimePickerProps, {}, {
|
|
|
13
17
|
presets: import("./types").DateTimePreset<Date>[];
|
|
14
18
|
showSeconds: boolean;
|
|
15
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
21
|
declare const _default: typeof __VLS_export;
|
|
17
22
|
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -296,8 +296,10 @@ onBeforeUnmount(() => {
|
|
|
296
296
|
@change="onInputValueChange"
|
|
297
297
|
@keydown.enter="togglePopoverVisible(true)"
|
|
298
298
|
>
|
|
299
|
-
<template
|
|
300
|
-
<
|
|
299
|
+
<template #suffix>
|
|
300
|
+
<slot name="suffix">
|
|
301
|
+
<ClockIcon v-if="suffixIcon" class="me-3" />
|
|
302
|
+
</slot>
|
|
301
303
|
</template>
|
|
302
304
|
</PInput>
|
|
303
305
|
|
|
@@ -306,19 +308,19 @@ onBeforeUnmount(() => {
|
|
|
306
308
|
<PButton
|
|
307
309
|
size="xs"
|
|
308
310
|
variant="ghost"
|
|
309
|
-
class="sm:px-0.5 rounded-md text-[
|
|
311
|
+
class="sm:px-0.5 rounded-md text-[0.8125rem]"
|
|
310
312
|
@click="onCancelClick"
|
|
311
313
|
>
|
|
312
314
|
{{ configProvider.locale.interaction.cancel }}
|
|
313
315
|
</PButton>
|
|
314
316
|
|
|
315
|
-
<PButton size="xs" variant="ghost" class="sm:px-0 text-[
|
|
317
|
+
<PButton size="xs" variant="ghost" class="sm:px-0 text-[0.8125rem]" @click="onSetNowClick">
|
|
316
318
|
{{ configProvider.locale.date.now }}
|
|
317
319
|
</PButton>
|
|
318
320
|
</div>
|
|
319
321
|
|
|
320
322
|
<div
|
|
321
|
-
class="sm:text-[
|
|
323
|
+
class="sm:text-[0.9375rem] max-sm:text-base flex max-w-full transform-gpu items-stretch tabular-nums outline-none select-none"
|
|
322
324
|
@click.stop="onTimeListClick"
|
|
323
325
|
>
|
|
324
326
|
<div class="p-2 gap-1 relative mx-auto flex items-center">
|
|
@@ -381,7 +383,7 @@ onBeforeUnmount(() => {
|
|
|
381
383
|
v-for="(preset, i) in presets"
|
|
382
384
|
:key="preset.label"
|
|
383
385
|
:data-index="i"
|
|
384
|
-
class="px-1.5 py-0.5 sm:text-[
|
|
386
|
+
class="px-1.5 py-0.5 sm:text-[0.8125rem] sm:leading-4 max-sm:leading-5 max-sm:text-sm cursor-pointer appearance-none rounded-sm border-none bg-gray-300 font-inherit whitespace-nowrap text-foreground self-focus-ring outline-none hover:bg-gray-400 active:bg-gray-500 motion-safe:transition-colors"
|
|
385
387
|
>
|
|
386
388
|
{{ preset.label }}
|
|
387
389
|
</button>
|
|
@@ -11,7 +11,7 @@ type __VLS_Slots = {} & {
|
|
|
11
11
|
item?: (props: typeof __VLS_2) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: import("vue").DefineComponent<TocProps, {
|
|
14
|
-
activeId: import("vue").ComputedRef<string
|
|
14
|
+
activeId: import("vue").ComputedRef<string>;
|
|
15
15
|
items: import("vue").ComputedRef<TocItem[]>;
|
|
16
16
|
scrollTo: typeof scrollTo;
|
|
17
17
|
update: () => void;
|
|
@@ -22,8 +22,11 @@ declare const __VLS_base: import("vue").DefineComponent<TocProps, {
|
|
|
22
22
|
"onItem-click"?: ((item: TocItem, event: MouseEvent) => any) | undefined;
|
|
23
23
|
"onActive-change"?: ((item: TocItem | null) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
+
data: TocItem[] | null;
|
|
26
|
+
source: import("../../composables/use-virtual-list.js").VirtualListScrollSource | null;
|
|
25
27
|
scrollTarget: HTMLElement | null;
|
|
26
28
|
scrollBehavior: ScrollBehavior;
|
|
29
|
+
selector: string;
|
|
27
30
|
offset: number;
|
|
28
31
|
scrollActiveIntoView: boolean;
|
|
29
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -13,18 +13,34 @@ defineOptions({
|
|
|
13
13
|
});
|
|
14
14
|
const INDENT_BASE = 8;
|
|
15
15
|
const INDENT_STEP = 14;
|
|
16
|
+
const BOTTOM_TOLERANCE = 2;
|
|
16
17
|
const ITEM_ACTIVE_CLASS = "pxd-toc--item_active bg-gray-200 text-primary";
|
|
17
18
|
const ITEM_IDLE_CLASS = "text-foreground-secondary hover:bg-gray-100 hover:text-gray-900";
|
|
18
19
|
const props = defineProps({
|
|
20
|
+
data: {
|
|
21
|
+
type: [Array, null],
|
|
22
|
+
required: false,
|
|
23
|
+
default: null
|
|
24
|
+
},
|
|
19
25
|
selector: {
|
|
20
26
|
type: String,
|
|
21
|
-
required:
|
|
27
|
+
required: false,
|
|
28
|
+
default: ""
|
|
22
29
|
},
|
|
23
30
|
scrollTarget: {
|
|
24
31
|
type: null,
|
|
25
32
|
required: false,
|
|
26
33
|
default: null
|
|
27
34
|
},
|
|
35
|
+
source: {
|
|
36
|
+
type: [Object, null],
|
|
37
|
+
required: false,
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
itemClass: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: false
|
|
43
|
+
},
|
|
28
44
|
offset: {
|
|
29
45
|
type: Number,
|
|
30
46
|
required: false,
|
|
@@ -46,6 +62,7 @@ const motionReduce = useMotionReduced();
|
|
|
46
62
|
const { attrs, classes } = useTailwindVariant({ base: "pxd-toc text-sm w-full max-w-full" });
|
|
47
63
|
const listEl = ref(null);
|
|
48
64
|
const entries = shallowRef([]);
|
|
65
|
+
const isDataMode = computed(() => props.data != null);
|
|
49
66
|
function outlineRoot() {
|
|
50
67
|
return props.scrollTarget ?? document.body;
|
|
51
68
|
}
|
|
@@ -56,6 +73,12 @@ function isSameOutline(next, current) {
|
|
|
56
73
|
});
|
|
57
74
|
}
|
|
58
75
|
function readOutline() {
|
|
76
|
+
if (isDataMode.value || !props.selector) {
|
|
77
|
+
if (entries.value.length) {
|
|
78
|
+
entries.value = [];
|
|
79
|
+
}
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
59
82
|
const next = Array.from(outlineRoot().querySelectorAll(props.selector)).filter((el) => el.id).map((el) => ({
|
|
60
83
|
el,
|
|
61
84
|
item: {
|
|
@@ -70,12 +93,43 @@ function readOutline() {
|
|
|
70
93
|
entries.value = next;
|
|
71
94
|
}
|
|
72
95
|
const scheduleRead = scheduleByRaf(readOutline);
|
|
73
|
-
const {
|
|
96
|
+
const { activeIndex: spyActiveIndex, update } = useScrollspy(computed(() => isDataMode.value ? [] : entries.value.map((entry) => entry.el)), {
|
|
74
97
|
scrollTarget: () => props.scrollTarget,
|
|
75
98
|
topOffset: () => props.offset
|
|
76
99
|
});
|
|
77
|
-
const items = computed(() => entries.value.map((entry) => entry.item));
|
|
78
|
-
|
|
100
|
+
const items = computed(() => isDataMode.value ? props.data : entries.value.map((entry) => entry.item));
|
|
101
|
+
// Data mode bisects the source's cached offsets instead of DOM rects: the active entry sits at
|
|
102
|
+
// the probe line, where the owning list has it rendered and measured; distant entries may be
|
|
103
|
+
// estimates, which only ever shifts the jump target, never the highlight.
|
|
104
|
+
const activeIndex = computed(() => {
|
|
105
|
+
const source = props.source;
|
|
106
|
+
const count = items.value.length;
|
|
107
|
+
if (!isDataMode.value || !source || !count) {
|
|
108
|
+
return spyActiveIndex.value;
|
|
109
|
+
}
|
|
110
|
+
const scrollOffset = source.getScrollOffset();
|
|
111
|
+
if (scrollOffset == null) {
|
|
112
|
+
return -1;
|
|
113
|
+
}
|
|
114
|
+
const maxScroll = source.getMaxScrollOffset();
|
|
115
|
+
// A short trailing entry can never be scrolled up to the probe line.
|
|
116
|
+
if (maxScroll > 1 && scrollOffset >= maxScroll - BOTTOM_TOLERANCE) {
|
|
117
|
+
return count - 1;
|
|
118
|
+
}
|
|
119
|
+
let low = 0;
|
|
120
|
+
let high = count;
|
|
121
|
+
while (low < high) {
|
|
122
|
+
const mid = low + high >> 1;
|
|
123
|
+
const start = source.getOffsetForIndex(mid);
|
|
124
|
+
if (start == null || start - props.offset > scrollOffset) {
|
|
125
|
+
high = mid;
|
|
126
|
+
} else {
|
|
127
|
+
low = mid + 1;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return Math.max(low - 1, 0);
|
|
131
|
+
});
|
|
132
|
+
const activeId = computed(() => items.value[activeIndex.value]?.id ?? null);
|
|
79
133
|
const tocItems = computed(() => {
|
|
80
134
|
if (!items.value.length) {
|
|
81
135
|
return [];
|
|
@@ -88,8 +142,6 @@ const tocItems = computed(() => {
|
|
|
88
142
|
depth: item.level - minLevel
|
|
89
143
|
}));
|
|
90
144
|
});
|
|
91
|
-
// Indexed by the outline, not the spy's targets, so a dropped element can't shift later rows.
|
|
92
|
-
const activeRowIndex = computed(() => items.value.findIndex((item) => item.id === activeId.value));
|
|
93
145
|
function getScrollTop(target, container) {
|
|
94
146
|
const top = target.getBoundingClientRect().top;
|
|
95
147
|
if (isViewportScroll(container)) {
|
|
@@ -98,6 +150,11 @@ function getScrollTop(target, container) {
|
|
|
98
150
|
return top - container.getBoundingClientRect().top + container.scrollTop - props.offset;
|
|
99
151
|
}
|
|
100
152
|
function scrollTo(id) {
|
|
153
|
+
const index = items.value.findIndex((item) => item.id === id);
|
|
154
|
+
if (index >= 0 && isDataMode.value && props.source) {
|
|
155
|
+
props.source.scrollToIndex(index, { behavior: resolveScrollBehavior(props.scrollBehavior, motionReduce) });
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
101
158
|
const target = document.getElementById(id);
|
|
102
159
|
if (!target) {
|
|
103
160
|
return false;
|
|
@@ -121,7 +178,7 @@ function onItemClick(item, event) {
|
|
|
121
178
|
}
|
|
122
179
|
function keepActiveVisible() {
|
|
123
180
|
const list = listEl.value;
|
|
124
|
-
const index =
|
|
181
|
+
const index = activeIndex.value;
|
|
125
182
|
if (!props.scrollActiveIntoView || !list || index < 0) {
|
|
126
183
|
return;
|
|
127
184
|
}
|
|
@@ -145,7 +202,11 @@ if (!isServer()) {
|
|
|
145
202
|
attributes: true,
|
|
146
203
|
attributeFilter: ["id"]
|
|
147
204
|
});
|
|
148
|
-
watch(() => [
|
|
205
|
+
watch(() => [
|
|
206
|
+
props.selector,
|
|
207
|
+
props.scrollTarget,
|
|
208
|
+
props.data
|
|
209
|
+
], scheduleRead, {
|
|
149
210
|
immediate: true,
|
|
150
211
|
flush: "post"
|
|
151
212
|
});
|
|
@@ -169,7 +230,8 @@ defineExpose({
|
|
|
169
230
|
v-for="row in tocItems"
|
|
170
231
|
:key="row.item.id"
|
|
171
232
|
data-toc-item
|
|
172
|
-
class="
|
|
233
|
+
:class="itemClass"
|
|
234
|
+
class="pxd-toc--item m-0 flex list-none"
|
|
173
235
|
>
|
|
174
236
|
<slot
|
|
175
237
|
v-if="$slots.item"
|
|
@@ -181,7 +243,7 @@ defineExpose({
|
|
|
181
243
|
<a
|
|
182
244
|
v-else
|
|
183
245
|
:href="`#${row.item.id}`"
|
|
184
|
-
class="pxd-toc--item-label py-1.5 pe-2 block w-full max-w-full cursor-pointer truncate rounded-md text-start no-underline self-focus-ring outline-none motion-safe:transition-
|
|
246
|
+
class="pxd-toc--item-label py-1.5 pe-2 block w-full max-w-full cursor-pointer truncate rounded-md text-start no-underline self-focus-ring outline-none motion-safe:transition-[color,background,border-radius]"
|
|
185
247
|
:class="row.item.id === activeId ? ITEM_ACTIVE_CLASS : ITEM_IDLE_CLASS"
|
|
186
248
|
:style="{ paddingInlineStart: `${row.depth * INDENT_STEP + INDENT_BASE}px` }"
|
|
187
249
|
:aria-current="row.item.id === activeId ? 'location' : void 0"
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
VirtualListScrollSource,
|
|
3
|
+
VirtualListScrollToOptions,
|
|
4
|
+
} from '../../composables/use-virtual-list'
|
|
5
|
+
|
|
1
6
|
export interface TocItem {
|
|
2
7
|
/** `id` of the heading element this entry scrolls to. */
|
|
3
8
|
id: string
|
|
@@ -8,10 +13,15 @@ export interface TocItem {
|
|
|
8
13
|
}
|
|
9
14
|
|
|
10
15
|
export interface TocProps {
|
|
16
|
+
/** Outline entries as data, for lists that do not keep every entry in the DOM; overrides `selector`. */
|
|
17
|
+
data?: TocItem[] | null
|
|
11
18
|
/** Headings that make up the outline, as a CSS selector. */
|
|
12
|
-
selector
|
|
19
|
+
selector?: string
|
|
13
20
|
/** Scrollable container holding the headings; leave empty to read the document. */
|
|
14
21
|
scrollTarget?: HTMLElement | null
|
|
22
|
+
/** Position and scroll source for a data-driven outline; without it the outline renders without tracking. */
|
|
23
|
+
source?: VirtualListScrollSource | null
|
|
24
|
+
itemClass?: string
|
|
15
25
|
/** Pixels kept above the heading when scrolling to it, and the spy probe line. */
|
|
16
26
|
offset?: number
|
|
17
27
|
/** Scroll animation when an entry is activated; `auto` follows the system motion preference. */
|
|
@@ -42,8 +42,8 @@ declare const __VLS_base: import("vue").DefineComponent<TodoProps, {
|
|
|
42
42
|
}>, {
|
|
43
43
|
variant: import("./types").TodoVariant;
|
|
44
44
|
options: TodoOption[];
|
|
45
|
-
expand: boolean;
|
|
46
45
|
readonly: boolean;
|
|
46
|
+
expand: boolean;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
48
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
49
|
declare const _default: typeof __VLS_export;
|