@opentiny/tiny-robot 0.4.2-alpha.4 → 0.4.2-alpha.6
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/action-group/ActionGroup.vue.d.ts +26 -0
- package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
- package/dist/action-group/index.d.ts +12 -0
- package/dist/action-group/index.type.d.ts +17 -0
- package/dist/anchor/components/AnchorItem.vue.d.ts +24 -0
- package/dist/anchor/components/AnchorList.vue.d.ts +20 -0
- package/dist/anchor/components/AnchorOverlay.vue.d.ts +33 -0
- package/dist/anchor/components/AnchorSearch.vue.d.ts +7 -0
- package/dist/anchor/composables/index.d.ts +5 -0
- package/dist/anchor/composables/useActiveSync.d.ts +10 -0
- package/dist/anchor/composables/useFloatingOffset.d.ts +6 -0
- package/dist/anchor/composables/useNavController.d.ts +12 -0
- package/dist/anchor/composables/useOverlayInteractions.d.ts +6 -0
- package/dist/anchor/composables/useTargetFeedback.d.ts +5 -0
- package/dist/anchor/defaults.d.ts +16 -0
- package/dist/anchor/index.d.ts +7 -0
- package/dist/anchor/index.type.d.ts +60 -0
- package/dist/anchor/index.vue.d.ts +159 -0
- package/dist/anchor/internal.type.d.ts +103 -0
- package/dist/anchor/utils/scroll.d.ts +7 -0
- package/dist/anchor/utils/target.d.ts +6 -0
- package/dist/attachments/components/FileCard.vue.d.ts +18 -0
- package/dist/attachments/components/ImagePreview.vue.d.ts +17 -0
- package/dist/attachments/components/index.d.ts +2 -0
- package/dist/attachments/composables/index.d.ts +5 -0
- package/dist/attachments/composables/useFileCard.d.ts +15 -0
- package/dist/attachments/composables/useFileType.d.ts +20 -0
- package/dist/attachments/composables/useImagePreview.d.ts +18 -0
- package/dist/attachments/composables/useListType.d.ts +11 -0
- package/dist/attachments/index.d.ts +7 -0
- package/dist/attachments/index.js +2 -2
- package/dist/attachments/index.type.d.ts +70 -0
- package/dist/attachments/index.vue.d.ts +27 -0
- package/dist/attachments/utils.d.ts +3 -0
- package/dist/base-popper/components/Popper.vue.d.ts +28 -0
- package/dist/base-popper/index.d.ts +2 -0
- package/dist/base-popper/index.vue.d.ts +41 -0
- package/dist/bubble/Bubble.vue.d.ts +39 -0
- package/dist/bubble/BubbleBoxWrapper.vue.d.ts +22 -0
- package/dist/bubble/BubbleContentWrapper.vue.d.ts +16 -0
- package/dist/bubble/BubbleItem.vue.d.ts +36 -0
- package/dist/bubble/BubbleList.vue.d.ts +41 -0
- package/dist/bubble/BubbleProvider.vue.d.ts +18 -0
- package/dist/bubble/composables/index.d.ts +10 -0
- package/dist/bubble/composables/useBubbleBoxRenderer.d.ts +18 -0
- package/dist/bubble/composables/useBubbleContentRenderer.d.ts +18 -0
- package/dist/bubble/composables/useBubbleStateChange.d.ts +2 -0
- package/dist/bubble/composables/useBubbleStore.d.ts +16 -0
- package/dist/bubble/composables/useContentResolver.d.ts +5 -0
- package/dist/bubble/composables/useCopyCleanup.d.ts +6 -0
- package/dist/bubble/composables/useMessageContent.d.ts +5 -0
- package/dist/bubble/composables/useMessageGroup.d.ts +4 -0
- package/dist/bubble/composables/useOmitMessageFields.d.ts +12 -0
- package/dist/bubble/composables/useToolCall.d.ts +25 -0
- package/dist/bubble/constants.d.ts +42 -0
- package/dist/bubble/index.d.ts +19 -0
- package/dist/bubble/index.type.d.ts +171 -0
- package/dist/bubble/renderers/Box.vue.d.ts +18 -0
- package/dist/bubble/renderers/Image.vue.d.ts +4 -0
- package/dist/bubble/renderers/Loading.vue.d.ts +4 -0
- package/dist/bubble/renderers/Markdown.vue.d.ts +4 -0
- package/dist/bubble/renderers/Reasoning.vue.d.ts +9 -0
- package/dist/bubble/renderers/Text.vue.d.ts +4 -0
- package/dist/bubble/renderers/Tool.vue.d.ts +14 -0
- package/dist/bubble/renderers/ToolRole.vue.d.ts +4 -0
- package/dist/bubble/renderers/Tools.vue.d.ts +4 -0
- package/dist/bubble/renderers/allRenderers.d.ts +93 -0
- package/dist/bubble/renderers/defaultRenderers.d.ts +27 -0
- package/dist/bubble/utils.d.ts +7 -0
- package/dist/chat/components/ChatConversation.vue.d.ts +267 -0
- package/dist/chat/components/ChatLauncherButton.vue.d.ts +12 -0
- package/dist/chat/components/ChatMcpTrigger.vue.d.ts +30 -0
- package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +6 -0
- package/dist/chat/components/ChatWelcome.vue.d.ts +14 -0
- package/dist/chat/components/icons/IconModelAliyunBailian.vue.d.ts +7 -0
- package/dist/chat/components/icons/IconModelDeepseek.vue.d.ts +7 -0
- package/dist/chat/components/icons/index.d.ts +5 -0
- package/dist/chat/composables/useChatConversation.d.ts +37 -0
- package/dist/chat/composables/useChatMcp.d.ts +29 -0
- package/dist/chat/composables/useChatModel.d.ts +27 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +13902 -0
- package/dist/chat/index.type.d.ts +92 -0
- package/dist/chat/index.vue.d.ts +51 -0
- package/dist/chat/locale.d.ts +12 -0
- package/dist/chat/mcpServers.d.ts +3 -0
- package/dist/container/index.d.ts +7 -0
- package/dist/container/index.type.d.ts +20 -0
- package/dist/container/index.vue.d.ts +32 -0
- package/dist/conversations/index.d.ts +7 -0
- package/dist/conversations/index.vue.d.ts +2 -0
- package/dist/drag-overlay/constants.d.ts +17 -0
- package/dist/drag-overlay/directives/vDropzone.d.ts +14 -0
- package/dist/drag-overlay/index.d.ts +7 -0
- package/dist/drag-overlay/index.type.d.ts +105 -0
- package/dist/drag-overlay/index.vue.d.ts +20 -0
- package/dist/dropdown-menu/composables/usePopperHover.d.ts +6 -0
- package/dist/dropdown-menu/index.d.ts +7 -0
- package/dist/dropdown-menu/index.js +17 -17
- package/dist/dropdown-menu/index.type.d.ts +42 -0
- package/dist/dropdown-menu/index.vue.d.ts +217 -0
- package/dist/feedback/components/SourceList.vue.d.ts +11 -0
- package/dist/feedback/components/index.d.ts +1 -0
- package/dist/feedback/index.d.ts +7 -0
- package/dist/feedback/index.type.d.ts +25 -0
- package/dist/feedback/index.vue.d.ts +13 -0
- package/dist/flow-layout-buttons/index.d.ts +7 -0
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/flow-layout-buttons/index.type.d.ts +35 -0
- package/dist/flow-layout-buttons/index.vue.d.ts +22 -0
- package/dist/history/components/Empty.vue.d.ts +7 -0
- package/dist/history/components/MenuList.vue.d.ts +24 -0
- package/dist/history/composables/useRenameEditor.d.ts +22 -0
- package/dist/history/constants.d.ts +1 -0
- package/dist/history/index.d.ts +7 -0
- package/dist/history/index.type.d.ts +33 -0
- package/dist/history/index.vue.d.ts +18 -0
- package/dist/icon-button/index.d.ts +7 -0
- package/dist/icon-button/index.type.d.ts +7 -0
- package/dist/icon-button/index.vue.d.ts +6 -0
- package/dist/index.d.ts +49 -5018
- package/dist/index.js +1 -1
- package/dist/mcp-add-form/components/CodeEditor.vue.d.ts +9 -0
- package/dist/mcp-add-form/components/FormEditor.vue.d.ts +10 -0
- package/dist/mcp-add-form/components/index.d.ts +2 -0
- package/dist/mcp-add-form/index.d.ts +7 -0
- package/dist/mcp-add-form/index.type.d.ts +19 -0
- package/dist/mcp-add-form/index.vue.d.ts +13 -0
- package/dist/mcp-server-picker/components/NoData.vue.d.ts +7 -0
- package/dist/mcp-server-picker/components/PluginCard.vue.d.ts +40 -0
- package/dist/mcp-server-picker/components/PluginModal.vue.d.ts +15 -0
- package/dist/mcp-server-picker/components/index.d.ts +3 -0
- package/dist/mcp-server-picker/index.d.ts +7 -0
- package/dist/mcp-server-picker/index.js +83 -80
- package/dist/mcp-server-picker/index.type.d.ts +99 -0
- package/dist/mcp-server-picker/index.vue.d.ts +71 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.type.d.ts +59 -0
- package/dist/prompts/prompt.vue.d.ts +5 -0
- package/dist/prompts/prompts.vue.d.ts +20 -0
- package/dist/sender/components/editor-content/index.vue.d.ts +4 -0
- package/dist/sender/components/footer/index.vue.d.ts +38 -0
- package/dist/sender/components/layouts/MultiLineLayout.vue.d.ts +43 -0
- package/dist/sender/components/layouts/SingleLineLayout.vue.d.ts +32 -0
- package/dist/sender/composables/index.d.ts +7 -0
- package/dist/sender/composables/useAutoSize.d.ts +5 -0
- package/dist/sender/composables/useEditor.d.ts +13 -0
- package/dist/sender/composables/useKeyboardShortcuts.d.ts +7 -0
- package/dist/sender/composables/useModeSwitch.d.ts +4 -0
- package/dist/sender/composables/useSenderCore.d.ts +31 -0
- package/dist/sender/composables/useSlotScope.d.ts +10 -0
- package/dist/sender/context/index.d.ts +6 -0
- package/dist/sender/context/types.d.ts +7 -0
- package/dist/sender/extensions/constants.d.ts +94 -0
- package/dist/sender/extensions/index.d.ts +12 -0
- package/dist/sender/extensions/mention/commands.d.ts +20 -0
- package/dist/sender/extensions/mention/components/mention-list.vue.d.ts +18 -0
- package/dist/sender/extensions/mention/components/mention-view.vue.d.ts +19 -0
- package/dist/sender/extensions/mention/extension.d.ts +6 -0
- package/dist/sender/extensions/mention/index.d.ts +22 -0
- package/dist/sender/extensions/mention/plugin.d.ts +16 -0
- package/dist/sender/extensions/mention/types.d.ts +126 -0
- package/dist/sender/extensions/mention/utils.d.ts +34 -0
- package/dist/sender/extensions/suggestion/extension.d.ts +8 -0
- package/dist/sender/extensions/suggestion/index.d.ts +20 -0
- package/dist/sender/extensions/suggestion/plugin.d.ts +21 -0
- package/dist/sender/extensions/suggestion/suggestion-list.vue.d.ts +46 -0
- package/dist/sender/extensions/suggestion/types.d.ts +254 -0
- package/dist/sender/extensions/suggestion/utils/filter.d.ts +29 -0
- package/dist/sender/extensions/suggestion/utils/highlight.d.ts +73 -0
- package/dist/sender/extensions/template/block/extension.d.ts +6 -0
- package/dist/sender/extensions/template/block/plugins.d.ts +13 -0
- package/dist/sender/extensions/template/block/template-block-view.vue.d.ts +14 -0
- package/dist/sender/extensions/template/commands.d.ts +31 -0
- package/dist/sender/extensions/template/extension.d.ts +6 -0
- package/dist/sender/extensions/template/index.d.ts +21 -0
- package/dist/sender/extensions/template/select/dropdown-manager.d.ts +23 -0
- package/dist/sender/extensions/template/select/extension.d.ts +5 -0
- package/dist/sender/extensions/template/select/plugins.d.ts +34 -0
- package/dist/sender/extensions/template/select/template-select-view.vue.d.ts +20 -0
- package/dist/sender/extensions/template/types.d.ts +100 -0
- package/dist/sender/extensions/template/utils.d.ts +20 -0
- package/dist/sender/extensions/utils/id-generator.d.ts +16 -0
- package/dist/sender/extensions/utils/index.d.ts +7 -0
- package/dist/sender/extensions/utils/keyboard.d.ts +49 -0
- package/dist/sender/extensions/utils/position.d.ts +25 -0
- package/dist/sender/index.d.ts +136 -0
- package/dist/sender/index.type.d.ts +302 -0
- package/dist/sender/index.vue.d.ts +90 -0
- package/dist/sender/types/base.d.ts +239 -0
- package/dist/sender/types/components.d.ts +68 -0
- package/dist/sender/types/composables.d.ts +122 -0
- package/dist/sender/types/context.d.ts +132 -0
- package/dist/sender/types/slots.d.ts +67 -0
- package/dist/sender/utils/countGraphemes.d.ts +1 -0
- package/dist/sender-actions/action-button/index.vue.d.ts +23 -0
- package/dist/sender-actions/clear-button/index.vue.d.ts +2 -0
- package/dist/sender-actions/clear-button/useClearButtonState.d.ts +6 -0
- package/dist/sender-actions/default-actions/index.vue.d.ts +17 -0
- package/dist/sender-actions/index.d.ts +21 -0
- package/dist/sender-actions/index.type.d.ts +7 -0
- package/dist/sender-actions/submit-button/index.vue.d.ts +2 -0
- package/dist/sender-actions/types/common.d.ts +40 -0
- package/dist/sender-actions/types/index.d.ts +5 -0
- package/dist/sender-actions/types/tooltip.d.ts +7 -0
- package/dist/sender-actions/upload-button/index.type.d.ts +57 -0
- package/dist/sender-actions/upload-button/index.vue.d.ts +16 -0
- package/dist/sender-actions/utils/tooltip.d.ts +8 -0
- package/dist/sender-actions/voice-button/index.type.d.ts +78 -0
- package/dist/sender-actions/voice-button/index.vue.d.ts +43 -0
- package/dist/sender-actions/voice-button/speech.types.d.ts +40 -0
- package/dist/sender-actions/voice-button/useSpeechHandler.d.ts +10 -0
- package/dist/sender-actions/voice-button/webSpeechHandler.d.ts +40 -0
- package/dist/sender-actions/word-counter/index.vue.d.ts +2 -0
- package/dist/sender-compat/index.d.ts +7 -0
- package/dist/sender-compat/index.type.d.ts +91 -0
- package/dist/sender-compat/index.vue.d.ts +532 -0
- package/dist/shared/composables/createTeleport.d.ts +2 -0
- package/dist/shared/composables/index.d.ts +5 -0
- package/dist/shared/composables/useAutoScroll.d.ts +25 -0
- package/dist/shared/composables/useSlotRefs.d.ts +12 -0
- package/dist/shared/composables/useTeleportTarget.d.ts +11 -0
- package/dist/shared/composables/useTouchDevice.d.ts +3 -0
- package/dist/shared/utils.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/components/PillButton.vue.d.ts +16 -0
- package/dist/suggestion-pills/components/index.d.ts +1 -0
- package/dist/suggestion-pills/index.d.ts +13 -0
- package/dist/suggestion-pills/index.js +12 -12
- package/dist/suggestion-pills/index.type.d.ts +45 -0
- package/dist/suggestion-pills/index.vue.d.ts +44 -0
- package/dist/suggestion-popover/components/Backdrop.vue.d.ts +5 -0
- package/dist/suggestion-popover/components/Header.vue.d.ts +4 -0
- package/dist/suggestion-popover/components/Loading.vue.d.ts +17 -0
- package/dist/suggestion-popover/components/NoData.vue.d.ts +17 -0
- package/dist/suggestion-popover/components/Tooltip.vue.d.ts +19 -0
- package/dist/suggestion-popover/index.d.ts +7 -0
- package/dist/suggestion-popover/index.js +35 -35
- package/dist/suggestion-popover/index.type.d.ts +80 -0
- package/dist/suggestion-popover/index.vue.d.ts +262 -0
- package/dist/theme-provider/constants.d.ts +6 -0
- package/dist/theme-provider/index.d.ts +9 -0
- package/dist/theme-provider/index.js +32 -41
- package/dist/theme-provider/index.type.d.ts +18 -0
- package/dist/theme-provider/index.vue.d.ts +32 -0
- package/dist/theme-provider/useTheme.d.ts +11 -0
- package/dist/useTheme.js +22 -0
- package/dist/welcome/index.d.ts +7 -0
- package/dist/welcome/index.type.d.ts +10 -0
- package/dist/welcome/index.vue.d.ts +18 -0
- package/package.json +22 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ActionGroupProps, ActionGroupSlots } from './index.type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<ActionGroupSlots> & ActionGroupSlots;
|
|
5
|
+
refs: {
|
|
6
|
+
moreBtnRef: HTMLSpanElement;
|
|
7
|
+
dropDownRef: HTMLUListElement;
|
|
8
|
+
};
|
|
9
|
+
rootEl: HTMLDivElement;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: import('vue').DefineComponent<ActionGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
13
|
+
"item-click": (name: string) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<ActionGroupProps> & Readonly<{
|
|
15
|
+
"onItem-click"?: ((name: string) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
|
+
moreBtnRef: HTMLSpanElement;
|
|
18
|
+
dropDownRef: HTMLUListElement;
|
|
19
|
+
}, HTMLDivElement>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ActionGroupItemProps } from './index.type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: any;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<ActionGroupItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ActionGroupItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as ActionGroup } from './ActionGroup.vue';
|
|
3
|
+
import { default as ActionGroupItemComp } from './ActionGroupItem.vue';
|
|
4
|
+
declare const install: <T>(app: App<T>) => void;
|
|
5
|
+
declare const _default: typeof ActionGroup & {
|
|
6
|
+
install: typeof install;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
declare const installActionGroupItem: <T>(app: App<T>) => void;
|
|
10
|
+
export declare const ActionGroupItem: typeof ActionGroupItemComp & {
|
|
11
|
+
install: typeof installActionGroupItem;
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
export interface ActionGroupProps {
|
|
3
|
+
maxNum?: number;
|
|
4
|
+
showTooltip?: boolean;
|
|
5
|
+
dropDownShowLabelOnly?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ActionGroupEvents {
|
|
8
|
+
(e: 'item-click', name: string): void;
|
|
9
|
+
}
|
|
10
|
+
export interface ActionGroupSlots {
|
|
11
|
+
default: () => VNode | VNode[];
|
|
12
|
+
moreBtn: () => VNode;
|
|
13
|
+
}
|
|
14
|
+
export interface ActionGroupItemProps {
|
|
15
|
+
name: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AnchorItemProps, AnchorItemSlots } from '../internal.type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<AnchorItemSlots> & AnchorItemSlots;
|
|
5
|
+
refs: {
|
|
6
|
+
itemButtonRef: HTMLButtonElement;
|
|
7
|
+
};
|
|
8
|
+
rootEl: HTMLLIElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<AnchorItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
select: (item: import('../index.type').AnchorItem) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<AnchorItemProps> & Readonly<{
|
|
14
|
+
onSelect?: ((item: import('../index.type').AnchorItem) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
16
|
+
itemButtonRef: HTMLButtonElement;
|
|
17
|
+
}, HTMLLIElement>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AnchorListProps, AnchorListSlots } from '../internal.type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<AnchorListSlots> & AnchorListSlots;
|
|
5
|
+
refs: {};
|
|
6
|
+
rootEl: HTMLUListElement;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<AnchorListProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
select: (item: import('../index.type').AnchorItem) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<AnchorListProps> & Readonly<{
|
|
12
|
+
onSelect?: ((item: import('../index.type').AnchorItem) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLUListElement>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AnchorOverlayProps } from '../internal.type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
search?(_: {}): any;
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
refs: {
|
|
9
|
+
hostEl: HTMLDivElement;
|
|
10
|
+
overlayEl: HTMLDivElement;
|
|
11
|
+
navEl: HTMLElement;
|
|
12
|
+
};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<AnchorOverlayProps, {
|
|
17
|
+
hostEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
18
|
+
overlayEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
19
|
+
navEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
20
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AnchorOverlayProps> & Readonly<{}>, {
|
|
21
|
+
floatingOffset: number;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
|
+
hostEl: HTMLDivElement;
|
|
24
|
+
overlayEl: HTMLDivElement;
|
|
25
|
+
navEl: HTMLElement;
|
|
26
|
+
}, HTMLDivElement>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AnchorSearchProps } from '../internal.type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<AnchorSearchProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
"update:searchQuery": (value: string) => any;
|
|
4
|
+
}, string, import('vue').PublicProps, Readonly<AnchorSearchProps> & Readonly<{
|
|
5
|
+
"onUpdate:searchQuery"?: ((value: string) => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnchorActiveSyncOptions } from '../internal.type';
|
|
2
|
+
export declare function useActiveSync(options: AnchorActiveSyncOptions): {
|
|
3
|
+
activeId: import('vue').ComputedRef<string | undefined>;
|
|
4
|
+
scrollTo: (id: string) => void;
|
|
5
|
+
sync: () => void;
|
|
6
|
+
clearPendingScroll: () => void;
|
|
7
|
+
releaseSelectionLock: () => void;
|
|
8
|
+
handleUserScrollIntent: () => void;
|
|
9
|
+
handleScrollIntentKeydown: (event: KeyboardEvent) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AnchorFloatingOffsetOptions } from '../internal.type';
|
|
2
|
+
export declare function useFloatingOffset(options: AnchorFloatingOffsetOptions): {
|
|
3
|
+
offset: import('vue').Ref<number, number>;
|
|
4
|
+
sync: () => void;
|
|
5
|
+
resizeTargets: import('vue').ComputedRef<HTMLElement[]>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnchorControllerOptions, AnchorFilteredItem } from '../internal.type';
|
|
2
|
+
export declare function useNavController(options: AnchorControllerOptions): {
|
|
3
|
+
expanded: import('vue').ComputedRef<boolean>;
|
|
4
|
+
searchQuery: import('vue').ComputedRef<string>;
|
|
5
|
+
filteredItems: import('vue').ComputedRef<AnchorFilteredItem[]>;
|
|
6
|
+
highlightedIndex: import('vue').ComputedRef<number>;
|
|
7
|
+
highlightedId: import('vue').ComputedRef<string>;
|
|
8
|
+
setExpanded: (value: boolean) => void;
|
|
9
|
+
setSearchQuery: (value: string) => void;
|
|
10
|
+
getHighlightedItem: () => import('../index.type').AnchorItem;
|
|
11
|
+
handleNavigationKeydown: (event: KeyboardEvent) => boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AnchorOverlayInteractionsOptions } from '../internal.type';
|
|
2
|
+
export declare function useOverlayInteractions(options: AnchorOverlayInteractionsOptions): {
|
|
3
|
+
handleKeydown: (event: KeyboardEvent) => void;
|
|
4
|
+
handleMouseLeave: () => void;
|
|
5
|
+
handleFocusOut: (event: FocusEvent) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnchorHighlightSegment, AnchorItem, AnchorSearchMatcher } from './index.type';
|
|
2
|
+
export declare const defaultAnchorSearchMatcher: AnchorSearchMatcher;
|
|
3
|
+
export declare function defaultAnchorActiveResolver(options: {
|
|
4
|
+
viewport: {
|
|
5
|
+
top: number;
|
|
6
|
+
scrollTop: number;
|
|
7
|
+
clientHeight: number;
|
|
8
|
+
scrollHeight: number;
|
|
9
|
+
};
|
|
10
|
+
anchors: Array<{
|
|
11
|
+
id: string;
|
|
12
|
+
el: HTMLElement;
|
|
13
|
+
}>;
|
|
14
|
+
activeOffset?: number;
|
|
15
|
+
}): string | undefined;
|
|
16
|
+
export declare function ensureAnchorSegments(item: AnchorItem, segments: false | AnchorHighlightSegment[]): AnchorHighlightSegment[];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
export interface AnchorItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
searchText?: string;
|
|
6
|
+
tooltipText?: string;
|
|
7
|
+
meta?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface AnchorHighlightSegment {
|
|
10
|
+
text: string;
|
|
11
|
+
highlighted: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type AnchorSearchMatcher = (item: AnchorItem, searchQuery: string) => false | AnchorHighlightSegment[];
|
|
14
|
+
export type AnchorPlacement = 'left' | 'right';
|
|
15
|
+
export type AnchorExpandTrigger = 'hover' | 'manual';
|
|
16
|
+
export interface AnchorSearchOptions {
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
matcher?: AnchorSearchMatcher;
|
|
19
|
+
clearOnCollapse?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface AnchorProps {
|
|
22
|
+
items: AnchorItem[];
|
|
23
|
+
scrollContainer?: HTMLElement | null;
|
|
24
|
+
activeId?: string;
|
|
25
|
+
activeOffset?: number;
|
|
26
|
+
expanded?: boolean;
|
|
27
|
+
searchQuery?: string;
|
|
28
|
+
placement?: AnchorPlacement;
|
|
29
|
+
expandTrigger?: AnchorExpandTrigger;
|
|
30
|
+
searchOptions?: AnchorSearchOptions;
|
|
31
|
+
tooltipDelay?: number;
|
|
32
|
+
targetFeedbackClass?: string;
|
|
33
|
+
targetFeedbackDuration?: number;
|
|
34
|
+
emptyText?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface AnchorEmits {
|
|
37
|
+
'update:activeId': [value: string | undefined];
|
|
38
|
+
'update:expanded': [value: boolean];
|
|
39
|
+
'update:searchQuery': [value: string];
|
|
40
|
+
select: [item: AnchorItem];
|
|
41
|
+
}
|
|
42
|
+
export interface AnchorSlots {
|
|
43
|
+
item?: (slotProps: {
|
|
44
|
+
item: AnchorItem;
|
|
45
|
+
segments: AnchorHighlightSegment[];
|
|
46
|
+
active: boolean;
|
|
47
|
+
expanded: boolean;
|
|
48
|
+
highlighted: boolean;
|
|
49
|
+
}) => VNode | VNode[];
|
|
50
|
+
marker?: (slotProps: {
|
|
51
|
+
item: AnchorItem;
|
|
52
|
+
active: boolean;
|
|
53
|
+
}) => VNode | VNode[];
|
|
54
|
+
search?: (slotProps: {
|
|
55
|
+
searchQuery: string;
|
|
56
|
+
setSearchQuery: (value: string) => void;
|
|
57
|
+
searchOptions: AnchorSearchOptions;
|
|
58
|
+
}) => VNode | VNode[];
|
|
59
|
+
empty?: () => VNode | VNode[];
|
|
60
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { AnchorProps, AnchorSlots } from './index.type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<AnchorSlots> & AnchorSlots;
|
|
5
|
+
refs: {
|
|
6
|
+
overlayShellRef: ({
|
|
7
|
+
$: import('vue').ComponentInternalInstance;
|
|
8
|
+
$data: {};
|
|
9
|
+
$props: {
|
|
10
|
+
readonly expanded: boolean;
|
|
11
|
+
readonly placement: import('./index.type').AnchorPlacement;
|
|
12
|
+
readonly floatingOffset?: number | undefined;
|
|
13
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
14
|
+
$attrs: import('vue').Attrs;
|
|
15
|
+
$refs: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
} & {
|
|
18
|
+
hostEl: HTMLDivElement;
|
|
19
|
+
overlayEl: HTMLDivElement;
|
|
20
|
+
navEl: HTMLElement;
|
|
21
|
+
};
|
|
22
|
+
$slots: Readonly<{
|
|
23
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
26
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
27
|
+
$host: Element | null;
|
|
28
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
29
|
+
$el: HTMLDivElement;
|
|
30
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('./internal.type').AnchorOverlayProps> & Readonly<{}>, {
|
|
31
|
+
hostEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
32
|
+
overlayEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
33
|
+
navEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
34
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
35
|
+
floatingOffset: number;
|
|
36
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
37
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
38
|
+
created?: (() => void) | (() => void)[];
|
|
39
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
40
|
+
mounted?: (() => void) | (() => void)[];
|
|
41
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
42
|
+
updated?: (() => void) | (() => void)[];
|
|
43
|
+
activated?: (() => void) | (() => void)[];
|
|
44
|
+
deactivated?: (() => void) | (() => void)[];
|
|
45
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
46
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
47
|
+
destroyed?: (() => void) | (() => void)[];
|
|
48
|
+
unmounted?: (() => void) | (() => void)[];
|
|
49
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
50
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
51
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
52
|
+
};
|
|
53
|
+
$forceUpdate: () => void;
|
|
54
|
+
$nextTick: typeof import('vue').nextTick;
|
|
55
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
56
|
+
} & Readonly<{
|
|
57
|
+
floatingOffset: number;
|
|
58
|
+
}> & Omit<Readonly<import('./internal.type').AnchorOverlayProps> & Readonly<{}>, "floatingOffset" | "hostEl" | "overlayEl" | "navEl"> & {
|
|
59
|
+
hostEl: HTMLElement | null;
|
|
60
|
+
overlayEl: HTMLElement | null;
|
|
61
|
+
navEl: HTMLElement | null;
|
|
62
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
63
|
+
$slots: {
|
|
64
|
+
search?(_: {}): any;
|
|
65
|
+
default?(_: {}): any;
|
|
66
|
+
};
|
|
67
|
+
}) | null;
|
|
68
|
+
};
|
|
69
|
+
rootEl: any;
|
|
70
|
+
};
|
|
71
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
72
|
+
declare const __VLS_component: import('vue').DefineComponent<AnchorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
73
|
+
select: (item: import('./index.type').AnchorItem) => any;
|
|
74
|
+
"update:searchQuery": (value: string) => any;
|
|
75
|
+
"update:activeId": (value: string | undefined) => any;
|
|
76
|
+
"update:expanded": (value: boolean) => any;
|
|
77
|
+
}, string, import('vue').PublicProps, Readonly<AnchorProps> & Readonly<{
|
|
78
|
+
onSelect?: ((item: import('./index.type').AnchorItem) => any) | undefined;
|
|
79
|
+
"onUpdate:searchQuery"?: ((value: string) => any) | undefined;
|
|
80
|
+
"onUpdate:activeId"?: ((value: string | undefined) => any) | undefined;
|
|
81
|
+
"onUpdate:expanded"?: ((value: boolean) => any) | undefined;
|
|
82
|
+
}>, {
|
|
83
|
+
placement: import('./index.type').AnchorPlacement;
|
|
84
|
+
tooltipDelay: number;
|
|
85
|
+
emptyText: string;
|
|
86
|
+
activeOffset: number;
|
|
87
|
+
expandTrigger: import('./index.type').AnchorExpandTrigger;
|
|
88
|
+
targetFeedbackDuration: number;
|
|
89
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
90
|
+
overlayShellRef: ({
|
|
91
|
+
$: import('vue').ComponentInternalInstance;
|
|
92
|
+
$data: {};
|
|
93
|
+
$props: {
|
|
94
|
+
readonly expanded: boolean;
|
|
95
|
+
readonly placement: import('./index.type').AnchorPlacement;
|
|
96
|
+
readonly floatingOffset?: number | undefined;
|
|
97
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
98
|
+
$attrs: import('vue').Attrs;
|
|
99
|
+
$refs: {
|
|
100
|
+
[x: string]: unknown;
|
|
101
|
+
} & {
|
|
102
|
+
hostEl: HTMLDivElement;
|
|
103
|
+
overlayEl: HTMLDivElement;
|
|
104
|
+
navEl: HTMLElement;
|
|
105
|
+
};
|
|
106
|
+
$slots: Readonly<{
|
|
107
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
110
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
111
|
+
$host: Element | null;
|
|
112
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
113
|
+
$el: HTMLDivElement;
|
|
114
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('./internal.type').AnchorOverlayProps> & Readonly<{}>, {
|
|
115
|
+
hostEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
116
|
+
overlayEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
117
|
+
navEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
118
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
119
|
+
floatingOffset: number;
|
|
120
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
121
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
122
|
+
created?: (() => void) | (() => void)[];
|
|
123
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
124
|
+
mounted?: (() => void) | (() => void)[];
|
|
125
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
126
|
+
updated?: (() => void) | (() => void)[];
|
|
127
|
+
activated?: (() => void) | (() => void)[];
|
|
128
|
+
deactivated?: (() => void) | (() => void)[];
|
|
129
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
130
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
131
|
+
destroyed?: (() => void) | (() => void)[];
|
|
132
|
+
unmounted?: (() => void) | (() => void)[];
|
|
133
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
134
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
135
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
136
|
+
};
|
|
137
|
+
$forceUpdate: () => void;
|
|
138
|
+
$nextTick: typeof import('vue').nextTick;
|
|
139
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
140
|
+
} & Readonly<{
|
|
141
|
+
floatingOffset: number;
|
|
142
|
+
}> & Omit<Readonly<import('./internal.type').AnchorOverlayProps> & Readonly<{}>, "floatingOffset" | "hostEl" | "overlayEl" | "navEl"> & {
|
|
143
|
+
hostEl: HTMLElement | null;
|
|
144
|
+
overlayEl: HTMLElement | null;
|
|
145
|
+
navEl: HTMLElement | null;
|
|
146
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
147
|
+
$slots: {
|
|
148
|
+
search?(_: {}): any;
|
|
149
|
+
default?(_: {}): any;
|
|
150
|
+
};
|
|
151
|
+
}) | null;
|
|
152
|
+
}, any>;
|
|
153
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
154
|
+
export default _default;
|
|
155
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
156
|
+
new (): {
|
|
157
|
+
$slots: S;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { AnchorExpandTrigger, AnchorHighlightSegment, AnchorItem, AnchorPlacement, AnchorSearchOptions } from './index.type';
|
|
3
|
+
export interface AnchorFilteredItem {
|
|
4
|
+
item: AnchorItem;
|
|
5
|
+
segments: AnchorHighlightSegment[];
|
|
6
|
+
}
|
|
7
|
+
export interface AnchorItemSlotProps {
|
|
8
|
+
item: AnchorItem;
|
|
9
|
+
segments: AnchorFilteredItem['segments'];
|
|
10
|
+
active: boolean;
|
|
11
|
+
expanded: boolean;
|
|
12
|
+
highlighted: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface AnchorMarkerSlotProps {
|
|
15
|
+
item: AnchorItem;
|
|
16
|
+
active: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface AnchorSearchProps {
|
|
19
|
+
searchQuery: string;
|
|
20
|
+
searchOptions?: AnchorSearchOptions;
|
|
21
|
+
}
|
|
22
|
+
export interface AnchorSearchEmits {
|
|
23
|
+
'update:searchQuery': [value: string];
|
|
24
|
+
}
|
|
25
|
+
export interface AnchorOverlayProps {
|
|
26
|
+
expanded: boolean;
|
|
27
|
+
placement: AnchorPlacement;
|
|
28
|
+
floatingOffset?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface AnchorOverlayExpose {
|
|
31
|
+
hostEl: HTMLElement | null;
|
|
32
|
+
overlayEl: HTMLElement | null;
|
|
33
|
+
navEl: HTMLElement | null;
|
|
34
|
+
}
|
|
35
|
+
export interface AnchorListProps {
|
|
36
|
+
items: AnchorFilteredItem[];
|
|
37
|
+
activeId?: string;
|
|
38
|
+
expanded: boolean;
|
|
39
|
+
highlightedIndex: number;
|
|
40
|
+
placement: AnchorPlacement;
|
|
41
|
+
tooltipDelay: number;
|
|
42
|
+
emptyText: string;
|
|
43
|
+
}
|
|
44
|
+
export interface AnchorListEmits {
|
|
45
|
+
select: [item: AnchorItem];
|
|
46
|
+
}
|
|
47
|
+
export interface AnchorListSlots {
|
|
48
|
+
item?: (slotProps: AnchorItemSlotProps) => unknown;
|
|
49
|
+
marker?: (slotProps: AnchorMarkerSlotProps) => unknown;
|
|
50
|
+
empty?: () => unknown;
|
|
51
|
+
}
|
|
52
|
+
export interface AnchorItemProps {
|
|
53
|
+
entry: AnchorFilteredItem;
|
|
54
|
+
activeId?: string;
|
|
55
|
+
expanded: boolean;
|
|
56
|
+
highlighted: boolean;
|
|
57
|
+
placement: AnchorPlacement;
|
|
58
|
+
tooltipDelay: number;
|
|
59
|
+
}
|
|
60
|
+
export interface AnchorItemEmits {
|
|
61
|
+
select: [item: AnchorItem];
|
|
62
|
+
}
|
|
63
|
+
export interface AnchorItemSlots {
|
|
64
|
+
item?: (slotProps: AnchorItemSlotProps) => unknown;
|
|
65
|
+
marker?: (slotProps: AnchorMarkerSlotProps) => unknown;
|
|
66
|
+
}
|
|
67
|
+
export interface AnchorActiveSyncOptions {
|
|
68
|
+
items: Ref<AnchorItem[]>;
|
|
69
|
+
resolveTarget: (id: string) => HTMLElement | null;
|
|
70
|
+
container: Ref<HTMLElement | null | undefined>;
|
|
71
|
+
host?: Ref<HTMLElement | null | undefined>;
|
|
72
|
+
activeId?: Ref<string | undefined>;
|
|
73
|
+
activeOffset?: Ref<number | undefined>;
|
|
74
|
+
onUpdateActiveId?: (value: string | undefined) => void;
|
|
75
|
+
}
|
|
76
|
+
export interface AnchorFloatingOffsetOptions {
|
|
77
|
+
container: Ref<HTMLElement | null | undefined>;
|
|
78
|
+
host: Ref<HTMLElement | null | undefined>;
|
|
79
|
+
}
|
|
80
|
+
export interface AnchorOverlayInteractionsOptions {
|
|
81
|
+
overlay: Ref<AnchorOverlayExpose | null>;
|
|
82
|
+
highlightedId: Ref<string | undefined>;
|
|
83
|
+
shouldAutoCollapse: Ref<boolean>;
|
|
84
|
+
handleNavigationKeydown: (event: KeyboardEvent) => boolean;
|
|
85
|
+
getHighlightedItem: () => AnchorItem | undefined;
|
|
86
|
+
onSelectItem: (itemId: string) => void;
|
|
87
|
+
setExpanded: (value: boolean) => void;
|
|
88
|
+
}
|
|
89
|
+
export interface AnchorControllerOptions {
|
|
90
|
+
items: Ref<AnchorItem[]>;
|
|
91
|
+
activeId: Ref<string | undefined>;
|
|
92
|
+
expanded: Ref<boolean | undefined>;
|
|
93
|
+
expandTrigger: Ref<AnchorExpandTrigger>;
|
|
94
|
+
searchQuery?: Ref<string | undefined>;
|
|
95
|
+
searchOptions?: Ref<AnchorSearchOptions | undefined>;
|
|
96
|
+
onUpdateExpanded?: (value: boolean) => void;
|
|
97
|
+
onUpdateSearchQuery?: (value: string) => void;
|
|
98
|
+
}
|
|
99
|
+
export interface AnchorTargetFeedbackOptions {
|
|
100
|
+
resolveTarget: (id: string) => HTMLElement | null;
|
|
101
|
+
feedbackClass: Ref<string | undefined>;
|
|
102
|
+
feedbackDuration: Ref<number | undefined>;
|
|
103
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type AnchorScrollRoot = HTMLElement | Window;
|
|
2
|
+
export declare function resolveAnchorScrollRoot(container: HTMLElement | null | undefined): AnchorScrollRoot | null;
|
|
3
|
+
export declare function getAnchorScrollTop(root: AnchorScrollRoot | null): number;
|
|
4
|
+
export declare function getAnchorClientHeight(root: AnchorScrollRoot | null): number;
|
|
5
|
+
export declare function getAnchorScrollHeight(root: AnchorScrollRoot | null): number;
|
|
6
|
+
export declare function getAnchorViewportTop(root: AnchorScrollRoot | null): number;
|
|
7
|
+
export declare function scrollAnchorTo(root: AnchorScrollRoot | null, top: number, behavior: ScrollBehavior): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const ANCHOR_TARGET_ATTRIBUTE = "data-anchor-id";
|
|
2
|
+
export declare const ANCHOR_TARGET_SELECTOR = "[data-anchor-id]";
|
|
3
|
+
export declare const ANCHOR_ITEM_ATTRIBUTE = "data-item-id";
|
|
4
|
+
export declare const ANCHOR_ITEM_SELECTOR = "[data-item-id]";
|
|
5
|
+
export declare function queryAnchorTargetById(root: ParentNode, id: string): HTMLElement | undefined;
|
|
6
|
+
export declare function queryAnchorItemById(root: ParentNode, id: string): HTMLElement | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FileCardProps } from '../index.type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<FileCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
remove: (...args: any[]) => void;
|
|
4
|
+
download: (...args: any[]) => void;
|
|
5
|
+
retry: (...args: any[]) => void;
|
|
6
|
+
preview: (...args: any[]) => void;
|
|
7
|
+
action: (...args: any[]) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<FileCardProps> & Readonly<{
|
|
9
|
+
onRemove?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
onDownload?: ((...args: any[]) => any) | undefined;
|
|
11
|
+
onRetry?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
onPreview?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
onAction?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
variant: "picture" | "card";
|
|
16
|
+
showStatus: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Attachment } from '../index.type';
|
|
2
|
+
type Image = Pick<Attachment, 'id' | 'name' | 'url'>;
|
|
3
|
+
interface ImagePreviewProps {
|
|
4
|
+
images: Image[];
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = ImagePreviewProps;
|
|
7
|
+
type __VLS_PublicProps = {
|
|
8
|
+
'currentIndex': number;
|
|
9
|
+
} & __VLS_Props;
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
close: (...args: any[]) => void;
|
|
12
|
+
"update:currentIndex": (value: number) => void;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
"onUpdate:currentIndex"?: ((value: number) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
export default _default;
|