dou-ui 0.1.0-alpha.21 → 0.1.0-alpha.22

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 (99) hide show
  1. package/dist/components/chat-input/chat-input.vue_vue_type_script_setup_true_lang.js +19 -14
  2. package/dist/components/chat-input/chat-input.vue_vue_type_script_setup_true_lang.js.map +1 -1
  3. package/dist/components/chat-input/chat-input2.js.map +1 -1
  4. package/dist/components/chat-list/chat-list.js.map +1 -1
  5. package/dist/components/chat-list/chat-list.vue_vue_type_script_setup_true_lang.js +26 -10
  6. package/dist/components/chat-list/chat-list.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/components/chat-list/chat-list2.js.map +1 -1
  8. package/dist/components/chat-message/chat-message.js.map +1 -1
  9. package/dist/components/chat-plan/chat-plan.js.map +1 -1
  10. package/dist/components/chat-plan/chat-plan.vue_vue_type_script_setup_true_lang.js +22 -9
  11. package/dist/components/chat-plan/chat-plan.vue_vue_type_script_setup_true_lang.js.map +1 -1
  12. package/dist/components/chat-plan/chat-plan2.js.map +1 -1
  13. package/dist/components/code-block/code-block.js.map +1 -1
  14. package/dist/components/code-block/code-block.vue_vue_type_script_setup_true_lang.js +144 -7
  15. package/dist/components/code-block/code-block.vue_vue_type_script_setup_true_lang.js.map +1 -1
  16. package/dist/components/dock/dock-group.js.map +1 -1
  17. package/dist/components/dock/dock-group.vue_vue_type_script_setup_true_lang.js +4 -2
  18. package/dist/components/dock/dock-group.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/components/dock/dock.js.map +1 -1
  20. package/dist/components/dock/dock.vue_vue_type_script_setup_true_lang.js +30 -4
  21. package/dist/components/dock/dock.vue_vue_type_script_setup_true_lang.js.map +1 -1
  22. package/dist/components/dock/style.js +1 -0
  23. package/dist/components/form/form.vue_vue_type_script_setup_true_lang.js +1 -0
  24. package/dist/components/form/form.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/components/form/form2.js.map +1 -1
  26. package/dist/components/image/image-preview.js.map +1 -1
  27. package/dist/components/image/image-preview.vue_vue_type_script_setup_true_lang.js +63 -95
  28. package/dist/components/image/image-preview.vue_vue_type_script_setup_true_lang.js.map +1 -1
  29. package/dist/components/image/use-preview-viewport.js +619 -0
  30. package/dist/components/image/use-preview-viewport.js.map +1 -0
  31. package/dist/components/image/viewport.js +142 -0
  32. package/dist/components/image/viewport.js.map +1 -0
  33. package/dist/components/link/link.js.map +1 -1
  34. package/dist/components/link/link.vue_vue_type_script_setup_true_lang.js +59 -14
  35. package/dist/components/link/link.vue_vue_type_script_setup_true_lang.js.map +1 -1
  36. package/dist/components/popover/popover.js.map +1 -1
  37. package/dist/components/popover/popover.vue_vue_type_script_setup_true_lang.js +13 -3
  38. package/dist/components/popover/popover.vue_vue_type_script_setup_true_lang.js.map +1 -1
  39. package/dist/components/splitter/splitter.js.map +1 -1
  40. package/dist/components/splitter/splitter.vue_vue_type_script_setup_true_lang.js +111 -41
  41. package/dist/components/splitter/splitter.vue_vue_type_script_setup_true_lang.js.map +1 -1
  42. package/dist/components/tabs/style.js +1 -0
  43. package/dist/components/tabs/tab-button.js +6 -0
  44. package/dist/components/tabs/tab-button.js.map +1 -0
  45. package/dist/components/tabs/tab-button.vue_vue_type_script_setup_true_lang.js +108 -0
  46. package/dist/components/tabs/tab-button.vue_vue_type_script_setup_true_lang.js.map +1 -0
  47. package/dist/components/tabs/tab-drag.js +10 -2
  48. package/dist/components/tabs/tab-drag.js.map +1 -1
  49. package/dist/components/tabs/tab-panel.js.map +1 -1
  50. package/dist/components/tabs/tab-panel.vue_vue_type_script_setup_true_lang.js +4 -0
  51. package/dist/components/tabs/tab-panel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  52. package/dist/components/tabs/tabs.js.map +1 -1
  53. package/dist/components/tabs/tabs.vue_vue_type_script_setup_true_lang.js +430 -181
  54. package/dist/components/tabs/tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  55. package/dist/components/tabs/tabs2.js.map +1 -1
  56. package/dist/components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +33 -20
  57. package/dist/components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js.map +1 -1
  58. package/dist/components/virtual-list/virtual-list2.js.map +1 -1
  59. package/dist/composables/use-floating.js +60 -8
  60. package/dist/composables/use-floating.js.map +1 -1
  61. package/dist/composables/use-popup.js +3 -0
  62. package/dist/composables/use-popup.js.map +1 -1
  63. package/dist/locale/en.js +1 -2
  64. package/dist/locale/en.js.map +1 -1
  65. package/dist/locale/zh-cn.js +1 -2
  66. package/dist/locale/zh-cn.js.map +1 -1
  67. package/dist/locale/zh-tw.js +1 -2
  68. package/dist/locale/zh-tw.js.map +1 -1
  69. package/dist/style.css +1 -1
  70. package/dist/types/components/chat-list/chat-list.d.ts +13 -0
  71. package/dist/types/components/chat-list/index.d.ts +2 -0
  72. package/dist/types/components/chat-message/chat-message.d.ts +1 -0
  73. package/dist/types/components/chat-plan/chat-plan.d.ts +3 -1
  74. package/dist/types/components/chat-plan/chat-plan.vue.d.ts +1 -0
  75. package/dist/types/components/chat-plan/index.d.ts +3 -0
  76. package/dist/types/components/code-block/code-block.d.ts +23 -0
  77. package/dist/types/components/code-block/code-block.vue.d.ts +8 -2
  78. package/dist/types/components/code-block/index.d.ts +19 -3
  79. package/dist/types/components/dock/dock.d.ts +6 -0
  80. package/dist/types/components/image/image.d.ts +1 -1
  81. package/dist/types/components/image/use-preview-viewport.d.ts +48 -0
  82. package/dist/types/components/image/viewport.d.ts +58 -0
  83. package/dist/types/components/link/index.d.ts +3 -0
  84. package/dist/types/components/link/link.d.ts +12 -3
  85. package/dist/types/components/link/link.vue.d.ts +1 -0
  86. package/dist/types/components/popover/index.d.ts +3 -0
  87. package/dist/types/components/popover/popover.d.ts +7 -0
  88. package/dist/types/components/popover/popover.vue.d.ts +1 -0
  89. package/dist/types/components/splitter/index.d.ts +6 -9
  90. package/dist/types/components/splitter/splitter.d.ts +31 -4
  91. package/dist/types/components/splitter/splitter.vue.d.ts +3 -4
  92. package/dist/types/components/tabs/index.d.ts +3 -0
  93. package/dist/types/components/tabs/tab-button.vue.d.ts +28 -0
  94. package/dist/types/components/tabs/tab-drag.d.ts +8 -0
  95. package/dist/types/components/tabs/tab-panel.vue.d.ts +1 -0
  96. package/dist/types/components/tabs/tabs.d.ts +6 -0
  97. package/dist/types/composables/use-floating.d.ts +1 -1
  98. package/dist/types/locale/types.d.ts +2 -3
  99. package/package.json +3 -3
@@ -20,6 +20,19 @@ export interface ChatListProps<T = any> {
20
20
  threshold?: number;
21
21
  /** Show a button that scrolls back down while the list is away from the bottom. */
22
22
  showScrollButton?: boolean;
23
+ /**
24
+ * Extra space reserved at the bottom, e.g. for a floating composer over the
25
+ * list. Adds to bottom padding, sets `scroll-padding-block-end` on the
26
+ * viewport, and lifts the scroll-to-bottom button by the same amount. Accepts
27
+ * a px number or any CSS length; can also be set via `--dou-chat-list-bottom-inset`.
28
+ */
29
+ bottomInset?: number | string;
30
+ /**
31
+ * Fade messages out at the bottom edge so text does not peek past the rounded
32
+ * corners of a floating composer. Placed using `--dou-chat-list-bottom-inset`
33
+ * and `--dou-chat-list-bottom-fade`.
34
+ */
35
+ bottomFade?: boolean;
23
36
  /**
24
37
  * The messages as data, drawn one by one with the `item` slot. Only the
25
38
  * messages in or near view are in the page, so long conversations stay
@@ -9,6 +9,8 @@ export declare const DouChatList: import("../..").WithInstall<(<T>(__VLS_props:
9
9
  autoScroll?: boolean | undefined;
10
10
  threshold?: number | undefined;
11
11
  showScrollButton?: boolean | undefined;
12
+ bottomInset?: number | string | undefined;
13
+ bottomFade?: boolean | undefined;
12
14
  items?: T[] | undefined;
13
15
  itemKey?: string | ((item: T, index: number) => import("..").VirtualListKey) | undefined;
14
16
  estimateSize?: number | undefined;
@@ -56,6 +56,7 @@ export interface ChatPlanPart {
56
56
  type: 'plan';
57
57
  items: ChatPlanItem[];
58
58
  title?: string;
59
+ showHeader?: boolean;
59
60
  collapsible?: boolean;
60
61
  live?: boolean;
61
62
  }
@@ -16,9 +16,11 @@ export interface ChatPlanProps {
16
16
  items?: ChatPlanItem[];
17
17
  /** Defaults to the locale's "Plan". */
18
18
  title?: string;
19
+ /** Show the header bar with icon, title and counter. Off hides the header and keeps the list open. */
20
+ showHeader?: boolean;
19
21
  /** Let the header fold the list away. Off gives a plain panel that always shows the steps. */
20
22
  collapsible?: boolean;
21
- /** Expanded or not. Bound with `v-model:open`; open by default. Ignored when not `collapsible`. */
23
+ /** Expanded or not. Bound with `v-model:open`; open by default. Ignored when not `collapsible` or `showHeader` is false. */
22
24
  open?: boolean;
23
25
  /**
24
26
  * The run is going on now. Off once the turn has ended or been stopped: a
@@ -7,6 +7,7 @@ declare const __VLS_base: import("vue").DefineComponent<ChatPlanProps, {}, {}, {
7
7
  }>, {
8
8
  open: boolean;
9
9
  items: import("./chat-plan").ChatPlanItem[];
10
+ showHeader: boolean;
10
11
  collapsible: boolean;
11
12
  live: boolean;
12
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -7,6 +7,7 @@ export declare const DouChatPlan: import("../..").WithInstall<{
7
7
  }, import("vue").PublicProps, {
8
8
  open: boolean;
9
9
  items: import("./chat-plan").ChatPlanItem[];
10
+ showHeader: boolean;
10
11
  collapsible: boolean;
11
12
  live: boolean;
12
13
  }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
@@ -21,6 +22,7 @@ export declare const DouChatPlan: import("../..").WithInstall<{
21
22
  }>, {}, {}, {}, {}, {
22
23
  open: boolean;
23
24
  items: import("./chat-plan").ChatPlanItem[];
25
+ showHeader: boolean;
24
26
  collapsible: boolean;
25
27
  live: boolean;
26
28
  }>;
@@ -34,6 +36,7 @@ export declare const DouChatPlan: import("../..").WithInstall<{
34
36
  }, string, {
35
37
  open: boolean;
36
38
  items: import("./chat-plan").ChatPlanItem[];
39
+ showHeader: boolean;
37
40
  collapsible: boolean;
38
41
  live: boolean;
39
42
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
@@ -29,6 +29,11 @@ export interface CodeBlockProps {
29
29
  wrap?: boolean;
30
30
  /** Fold the block beyond this many lines, with a button to show the rest. */
31
31
  maxLines?: number;
32
+ /**
33
+ * Limit the body height and scroll vertically inside it. Accepts a px
34
+ * number or any CSS length (such as `'240px'` or `'40vh'`).
35
+ */
36
+ maxHeight?: number | string;
32
37
  /** Show a copy button. */
33
38
  copyable?: boolean;
34
39
  /**
@@ -37,15 +42,33 @@ export interface CodeBlockProps {
37
42
  * lines fade in.
38
43
  */
39
44
  streaming?: boolean;
45
+ /**
46
+ * Keep the scrollable body pinned to the bottom as code grows. Scrolling up
47
+ * pauses following until the bottom is reached again. Defaults to `true`
48
+ * while `streaming` is on, and `false` otherwise.
49
+ */
50
+ autoScroll?: boolean;
40
51
  /**
41
52
  * The hairline frame and rounded corners. Off, the block takes no border
42
53
  * at all, for a card or panel that already has an edge. On by default.
43
54
  */
44
55
  bordered?: boolean;
45
56
  }
57
+ export interface CodeBlockEmits {
58
+ /** Whether the scrollable body is at the bottom changed. */
59
+ atBottomChange: [atBottom: boolean];
60
+ }
46
61
  export interface CodeBlockSlots {
47
62
  /** Replaces the filename or language in the header. */
48
63
  title?: () => unknown;
49
64
  /** Placed at the end of the header, before the copy button. */
50
65
  actions?: () => unknown;
51
66
  }
67
+ export interface CodeBlockExpose {
68
+ /** The scrolling body element. */
69
+ readonly body: HTMLElement | null;
70
+ /** Scroll to the bottom and resume auto-following. */
71
+ scrollToBottom: (behavior?: ScrollBehavior) => void;
72
+ /** Whether the body is currently at the bottom. */
73
+ readonly atBottom: boolean;
74
+ }
@@ -1,10 +1,16 @@
1
- import type { CodeBlockProps, CodeBlockSlots } from './code-block';
1
+ import type { CodeBlockExpose, CodeBlockProps, CodeBlockSlots } from './code-block';
2
2
  type __VLS_Slots = CodeBlockSlots;
3
- declare const __VLS_base: import("vue").DefineComponent<CodeBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CodeBlockProps> & Readonly<{}>, {
3
+ declare const __VLS_base: import("vue").DefineComponent<CodeBlockProps, CodeBlockExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ atBottomChange: (atBottom: boolean) => any;
5
+ }, string, import("vue").PublicProps, Readonly<CodeBlockProps> & Readonly<{
6
+ onAtBottomChange?: ((atBottom: boolean) => any) | undefined;
7
+ }>, {
4
8
  wrap: boolean;
9
+ maxHeight: string | number;
5
10
  lang: string;
6
11
  bordered: boolean;
7
12
  code: string;
13
+ autoScroll: boolean;
8
14
  lineNumbers: boolean;
9
15
  startLine: number;
10
16
  copyable: boolean;
@@ -1,10 +1,16 @@
1
1
  import CodeBlock from './code-block.vue';
2
2
  export declare const DouCodeBlock: import("../..").WithInstall<{
3
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./code-block").CodeBlockProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
3
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./code-block").CodeBlockProps> & Readonly<{
4
+ onAtBottomChange?: ((atBottom: boolean) => any) | undefined;
5
+ }>, import("./code-block").CodeBlockExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ atBottomChange: (atBottom: boolean) => any;
7
+ }, import("vue").PublicProps, {
4
8
  wrap: boolean;
9
+ maxHeight: string | number;
5
10
  lang: string;
6
11
  bordered: boolean;
7
12
  code: string;
13
+ autoScroll: boolean;
8
14
  lineNumbers: boolean;
9
15
  startLine: number;
10
16
  copyable: boolean;
@@ -16,11 +22,15 @@ export declare const DouCodeBlock: import("../..").WithInstall<{
16
22
  C: {};
17
23
  M: {};
18
24
  Defaults: {};
19
- }, Readonly<import("./code-block").CodeBlockProps> & Readonly<{}>, {}, {}, {}, {}, {
25
+ }, Readonly<import("./code-block").CodeBlockProps> & Readonly<{
26
+ onAtBottomChange?: ((atBottom: boolean) => any) | undefined;
27
+ }>, import("./code-block").CodeBlockExpose, {}, {}, {}, {
20
28
  wrap: boolean;
29
+ maxHeight: string | number;
21
30
  lang: string;
22
31
  bordered: boolean;
23
32
  code: string;
33
+ autoScroll: boolean;
24
34
  lineNumbers: boolean;
25
35
  startLine: number;
26
36
  copyable: boolean;
@@ -29,11 +39,17 @@ export declare const DouCodeBlock: import("../..").WithInstall<{
29
39
  __isFragment?: never;
30
40
  __isTeleport?: never;
31
41
  __isSuspense?: never;
32
- } & import("vue").ComponentOptionsBase<Readonly<import("./code-block").CodeBlockProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
42
+ } & import("vue").ComponentOptionsBase<Readonly<import("./code-block").CodeBlockProps> & Readonly<{
43
+ onAtBottomChange?: ((atBottom: boolean) => any) | undefined;
44
+ }>, import("./code-block").CodeBlockExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
+ atBottomChange: (atBottom: boolean) => any;
46
+ }, string, {
33
47
  wrap: boolean;
48
+ maxHeight: string | number;
34
49
  lang: string;
35
50
  bordered: boolean;
36
51
  code: string;
52
+ autoScroll: boolean;
37
53
  lineNumbers: boolean;
38
54
  startLine: number;
39
55
  copyable: boolean;
@@ -13,6 +13,12 @@ export interface DockPanel {
13
13
  disabled?: boolean;
14
14
  /** Whether the tab can be dragged; `false` keeps it in its place. Defaults to `true`. */
15
15
  draggable?: boolean;
16
+ /**
17
+ * Pin this tab to the start of its group's tab bar so it stays visible while
18
+ * other tabs scroll. A pinned tab with an `icon` shows the icon alone with a
19
+ * tooltip, and is not closable unless `closable: true` is set on the panel.
20
+ */
21
+ pinned?: boolean;
16
22
  }
17
23
  /** The smallest a group may get, by direction: `width` across a side-by-side split, `height` across a stacked one. */
18
24
  export interface DockMinSize {
@@ -57,7 +57,7 @@ export interface ImagePreviewProps {
57
57
  loop?: boolean;
58
58
  minScale?: number;
59
59
  maxScale?: number;
60
- /** Close when the dark area around the picture is clicked. */
60
+ /** Close when the dark area around the picture is clicked while not zoomed in. */
61
61
  closeOnMask?: boolean;
62
62
  teleport?: string | HTMLElement | false;
63
63
  /**
@@ -0,0 +1,48 @@
1
+ import type { Ref } from 'vue';
2
+ import type { Point } from './viewport';
3
+ export interface UsePreviewViewportOptions {
4
+ stageRef: Ref<HTMLElement | null>;
5
+ imageRef: Ref<HTMLImageElement | null>;
6
+ active: () => boolean;
7
+ minScale: () => number;
8
+ maxScale: () => number;
9
+ }
10
+ export declare function usePreviewViewport(options: UsePreviewViewportOptions): {
11
+ scale: Ref<number, number>;
12
+ rotate: Ref<number, number>;
13
+ flip: Ref<{
14
+ x: number;
15
+ y: number;
16
+ }, {
17
+ x: number;
18
+ y: number;
19
+ } | {
20
+ x: number;
21
+ y: number;
22
+ }>;
23
+ offset: Ref<{
24
+ x: number;
25
+ y: number;
26
+ }, Point | {
27
+ x: number;
28
+ y: number;
29
+ }>;
30
+ interacting: Ref<boolean, boolean>;
31
+ dragging: Ref<boolean, boolean>;
32
+ canPan: import("vue").ComputedRef<boolean>;
33
+ isZoomed: import("vue").ComputedRef<boolean>;
34
+ transform: import("vue").ComputedRef<string>;
35
+ reset: () => void;
36
+ zoom: (direction: 1 | -1) => void;
37
+ turn: (by: number) => void;
38
+ mirror: (axis: "x" | "y") => void;
39
+ syncBounds: () => void;
40
+ canCloseOnMask: () => boolean;
41
+ consumeMaskClick: () => boolean;
42
+ onPointerdown: (event: PointerEvent) => void;
43
+ onPointermove: (event: PointerEvent) => void;
44
+ onPointerup: (event: PointerEvent) => void;
45
+ onPointercancel: (event: PointerEvent) => void;
46
+ onDblclick: (event: MouseEvent) => void;
47
+ onWheel: (event: WheelEvent) => void;
48
+ };
@@ -0,0 +1,58 @@
1
+ export interface Point {
2
+ x: number;
3
+ y: number;
4
+ }
5
+ export interface Size {
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface PanBounds {
10
+ maxX: number;
11
+ maxY: number;
12
+ }
13
+ export interface ViewportTransform {
14
+ scale: number;
15
+ offset: Point;
16
+ }
17
+ /** Keep `value` within `[min, max]` without quantizing continuous precision. */
18
+ export declare function clamp(value: number, min: number, max: number): number;
19
+ /** Normalize a CSS transform number to avoid `-0` and noisy floating tails. */
20
+ export declare function formatTransformNumber(value: number): number;
21
+ /** Whether `rotate` swaps the image's visual width and height. */
22
+ export declare function isQuarterTurn(rotate: number): boolean;
23
+ /**
24
+ * Maximum horizontal and vertical pan offsets from the centered origin so the
25
+ * image edges stay clamped to the viewport content area.
26
+ */
27
+ export declare function getPanBounds(imageSize: Size, viewportSize: Size, scale: number, rotate?: number): PanBounds;
28
+ /** Clamp a pan offset to the symmetric viewport bounds. */
29
+ export declare function clampOffset(offset: Point, bounds: PanBounds): Point;
30
+ /** Smooth asymptotic damping when `value` extends past `[min, max]`. */
31
+ export declare function rubberband(value: number, min: number, max: number, range?: number, resistance?: number): number;
32
+ /** Apply rubberband resistance to a pan offset beyond the viewport bounds. */
33
+ export declare function rubberbandOffset(offset: Point, bounds: PanBounds, range?: number): Point;
34
+ /**
35
+ * Apply logarithmic rubberband resistance when a pinch overshoots `minScale`
36
+ * or `maxScale`, keeping the damped scale strictly positive and bounded.
37
+ */
38
+ export declare function rubberbandScale(scale: number, minScale: number, maxScale: number): number;
39
+ /**
40
+ * Compute the new offset when scaling from `current.scale` to `nextScale` so
41
+ * the image pixel under `focal` moves to `nextFocal` (both relative to the
42
+ * untransformed image center).
43
+ */
44
+ export declare function zoomAroundPoint(current: ViewportTransform, nextScale: number, focal: Point, nextFocal?: Point): Point;
45
+ /**
46
+ * Target scale for double-tap / double-click: toggle between the fit scale
47
+ * (1, clamped to `[minScale, maxScale]`) and the zoomed scale (2x, clamped).
48
+ */
49
+ export declare function getDoubleTapScale(currentScale: number, minScale: number, maxScale: number, zoomScale?: number): number;
50
+ /** Convert line/page wheel deltas to pixel-equivalent units. */
51
+ export declare function normalizeWheelDelta(event: Pick<WheelEvent, 'deltaY' | 'deltaMode'>): number;
52
+ /**
53
+ * Exponential scale multiplier for continuous trackpad pinch (`ctrlKey` wheel)
54
+ * or smooth pixel-mode trackpad scrolling.
55
+ */
56
+ export declare function wheelScaleFactor(deltaY: number, isPinch: boolean): number;
57
+ /** Turn a screen-space pan offset with a 90-degree step rotation. */
58
+ export declare function rotateOffset(offset: Point, degrees: number): Point;
@@ -8,6 +8,7 @@ export declare const DouLink: import("../..").WithInstall<{
8
8
  }, import("vue").PublicProps, {
9
9
  tone: import("../..").Tone;
10
10
  disabled: boolean;
11
+ wrap: boolean;
11
12
  underline: import("./link").LinkUnderline;
12
13
  variant: import("./link").LinkVariant;
13
14
  external: boolean;
@@ -23,6 +24,7 @@ export declare const DouLink: import("../..").WithInstall<{
23
24
  }>, {}, {}, {}, {}, {
24
25
  tone: import("../..").Tone;
25
26
  disabled: boolean;
27
+ wrap: boolean;
26
28
  underline: import("./link").LinkUnderline;
27
29
  variant: import("./link").LinkVariant;
28
30
  external: boolean;
@@ -37,6 +39,7 @@ export declare const DouLink: import("../..").WithInstall<{
37
39
  }, string, {
38
40
  tone: import("../..").Tone;
39
41
  disabled: boolean;
42
+ wrap: boolean;
40
43
  underline: import("./link").LinkUnderline;
41
44
  variant: import("./link").LinkVariant;
42
45
  external: boolean;
@@ -9,17 +9,26 @@ export type LinkVariant = 'text' | 'soft';
9
9
  export interface LinkProps {
10
10
  /**
11
11
  * Where the link goes. Without it the link is an action and renders as
12
- * `<button type="button">`; listen to `click`.
12
+ * `<button type="button">` (or an inline `<span role="button">` when
13
+ * `variant="soft"` or `wrap` is enabled so it can break across lines);
14
+ * listen to `click`.
13
15
  */
14
16
  href?: string;
15
17
  /** What the link means. */
16
18
  tone?: LinkTone;
17
19
  /**
18
20
  * How it is set apart. A `soft` link breaks with the line like text, its
19
- * fill drawn on each line, and deepens on hover. Without an `href` it is a
20
- * button, which never breaks: it wraps as one piece.
21
+ * fill drawn on each line, and deepens on hover — both with and without an
22
+ * `href`.
21
23
  */
22
24
  variant?: LinkVariant;
25
+ /**
26
+ * Allow a `text` link to break across lines with surrounding prose, the way
27
+ * a `soft` link does. Without an `href` it renders as an inline
28
+ * `<span role="button">` with keyboard Enter/Space support instead of a
29
+ * non-wrapping `<button>`.
30
+ */
31
+ wrap?: boolean;
23
32
  /**
24
33
  * When the underline shows. A resting underline is faint and deepens on
25
34
  * hover. Defaults to `always`, or `none` for a `soft` link.
@@ -7,6 +7,7 @@ declare const __VLS_base: import("vue").DefineComponent<LinkProps, {}, {}, {}, {
7
7
  }>, {
8
8
  tone: import("../..").Tone;
9
9
  disabled: boolean;
10
+ wrap: boolean;
10
11
  underline: import("./link").LinkUnderline;
11
12
  variant: import("./link").LinkVariant;
12
13
  external: boolean;
@@ -14,6 +14,7 @@ export declare const DouPopover: import("../..").WithInstall<{
14
14
  trigger: import("./popover").PopoverTrigger;
15
15
  showDelay: number;
16
16
  hideDelay: number;
17
+ openOnTap: boolean;
17
18
  }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
18
19
  P: {};
19
20
  B: {};
@@ -33,6 +34,7 @@ export declare const DouPopover: import("../..").WithInstall<{
33
34
  trigger: import("./popover").PopoverTrigger;
34
35
  showDelay: number;
35
36
  hideDelay: number;
37
+ openOnTap: boolean;
36
38
  }>;
37
39
  __isFragment?: never;
38
40
  __isTeleport?: never;
@@ -51,6 +53,7 @@ export declare const DouPopover: import("../..").WithInstall<{
51
53
  trigger: import("./popover").PopoverTrigger;
52
54
  showDelay: number;
53
55
  hideDelay: number;
56
+ openOnTap: boolean;
54
57
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
55
58
  $slots: import("./popover").PopoverSlots;
56
59
  }), import("vue").HTMLAttributes>;
@@ -16,12 +16,19 @@ export interface PopoverProps {
16
16
  disabled?: boolean;
17
17
  /** The width of the panel; a number is in px. */
18
18
  width?: string | number;
19
+ /** The maximum height of the panel; a number is in px. Still capped to the available viewport height. */
20
+ maxHeight?: string | number;
19
21
  /** Delay before opening on hover, in ms. */
20
22
  showDelay?: number;
21
23
  /** Delay before closing once the pointer leaves, in ms. */
22
24
  hideDelay?: number;
23
25
  /** The gap to the trigger, in px. */
24
26
  offset?: number;
27
+ /**
28
+ * Whether a tap on touch or pen devices opens and closes a `hover` popover.
29
+ * Turn off when the trigger has its own click action.
30
+ */
31
+ openOnTap?: boolean;
25
32
  /** Where to render the panel; `false` keeps it in place. */
26
33
  teleport?: string | HTMLElement | false;
27
34
  }
@@ -17,6 +17,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, Popov
17
17
  trigger: import("./popover").PopoverTrigger;
18
18
  showDelay: number;
19
19
  hideDelay: number;
20
+ openOnTap: boolean;
20
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
22
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
23
  declare const _default: typeof __VLS_export;
@@ -1,7 +1,6 @@
1
1
  import Splitter from './splitter.vue';
2
2
  export declare const DouSplitter: import("../..").WithInstall<{
3
3
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./splitter").SplitterProps & {
4
- modelValue?: number;
5
4
  collapsed?: boolean;
6
5
  }> & Readonly<{
7
6
  onChange?: ((value: number) => any) | undefined;
@@ -13,12 +12,12 @@ export declare const DouSplitter: import("../..").WithInstall<{
13
12
  "update:collapsed": (value: boolean) => any;
14
13
  }, import("vue").PublicProps, {
15
14
  min: import("./splitter").SplitterLimit;
16
- max: import("./splitter").SplitterLimit;
17
15
  disabled: boolean;
18
16
  direction: import("./splitter").SplitterDirection;
19
- step: number;
20
17
  collapsible: boolean;
18
+ unit: import("./splitter").SplitterUnit;
21
19
  minEnd: import("./splitter").SplitterLimit;
20
+ singlePane: import("./splitter").SplitterPane | null;
22
21
  }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
23
22
  P: {};
24
23
  B: {};
@@ -27,7 +26,6 @@ export declare const DouSplitter: import("../..").WithInstall<{
27
26
  M: {};
28
27
  Defaults: {};
29
28
  }, Readonly<import("./splitter").SplitterProps & {
30
- modelValue?: number;
31
29
  collapsed?: boolean;
32
30
  }> & Readonly<{
33
31
  onChange?: ((value: number) => any) | undefined;
@@ -35,18 +33,17 @@ export declare const DouSplitter: import("../..").WithInstall<{
35
33
  "onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
36
34
  }>, {}, {}, {}, {}, {
37
35
  min: import("./splitter").SplitterLimit;
38
- max: import("./splitter").SplitterLimit;
39
36
  disabled: boolean;
40
37
  direction: import("./splitter").SplitterDirection;
41
- step: number;
42
38
  collapsible: boolean;
39
+ unit: import("./splitter").SplitterUnit;
43
40
  minEnd: import("./splitter").SplitterLimit;
41
+ singlePane: import("./splitter").SplitterPane | null;
44
42
  }>;
45
43
  __isFragment?: never;
46
44
  __isTeleport?: never;
47
45
  __isSuspense?: never;
48
46
  } & import("vue").ComponentOptionsBase<Readonly<import("./splitter").SplitterProps & {
49
- modelValue?: number;
50
47
  collapsed?: boolean;
51
48
  }> & Readonly<{
52
49
  onChange?: ((value: number) => any) | undefined;
@@ -58,12 +55,12 @@ export declare const DouSplitter: import("../..").WithInstall<{
58
55
  "update:collapsed": (value: boolean) => any;
59
56
  }, string, {
60
57
  min: import("./splitter").SplitterLimit;
61
- max: import("./splitter").SplitterLimit;
62
58
  disabled: boolean;
63
59
  direction: import("./splitter").SplitterDirection;
64
- step: number;
65
60
  collapsible: boolean;
61
+ unit: import("./splitter").SplitterUnit;
66
62
  minEnd: import("./splitter").SplitterLimit;
63
+ singlePane: import("./splitter").SplitterPane | null;
67
64
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
68
65
  $slots: import("./splitter").SplitterSlots;
69
66
  }), import("vue").HTMLAttributes>;
@@ -1,14 +1,33 @@
1
1
  export type SplitterDirection = 'horizontal' | 'vertical';
2
- /** A percentage of the splitter as a number, or a length in px as `'240px'`. */
2
+ /**
3
+ * Unit of `modelValue`, `step`, and numeric `min` / `max` / `minEnd`:
4
+ * `'percent'` (0–100) or `'px'` (pixels).
5
+ */
6
+ export type SplitterUnit = 'percent' | 'px';
7
+ /** Which pane to show alone when `singlePane` is active. */
8
+ export type SplitterPane = 'start' | 'end';
9
+ /** A number in the active `unit` (`percent` or `px`), or a length in px as `'240px'`. */
3
10
  export type SplitterLimit = number | `${number}px`;
4
11
  export interface SplitterProps {
5
- /** The size of the first pane in percent, bound with `v-model`. */
12
+ /**
13
+ * The size of the first pane, bound with `v-model`.
14
+ * Interpreted according to `unit` (defaults to `50` in `'percent'` mode, `240` in `'px'` mode).
15
+ */
6
16
  modelValue?: number;
7
17
  /** `horizontal` puts the panes side by side; `vertical` stacks them. */
8
18
  direction?: SplitterDirection;
19
+ /**
20
+ * Unit for `modelValue`, `step`, and numeric limits (`min`, `max`, `minEnd`).
21
+ * In `'px'` mode, the first pane keeps its pixel size when the container resizes
22
+ * and the divider width is accounted for automatically.
23
+ */
24
+ unit?: SplitterUnit;
9
25
  /** The smallest the first pane may get. */
10
26
  min?: SplitterLimit;
11
- /** The largest the first pane may get; the second pane keeps the rest. */
27
+ /**
28
+ * The largest the first pane may get; the second pane keeps the rest.
29
+ * Defaults to `100` in `'percent'` mode and unbounded (up to container minus `minEnd`) in `'px'` mode.
30
+ */
12
31
  max?: SplitterLimit;
13
32
  /**
14
33
  * The smallest the second pane may get. When the splitter is too small
@@ -19,7 +38,15 @@ export interface SplitterProps {
19
38
  collapsible?: boolean;
20
39
  /** Whether the first pane is folded away, bound with `v-model:collapsed`. */
21
40
  collapsed?: boolean;
22
- /** Percent moved by each arrow key; `Shift` moves ten times as far. */
41
+ /**
42
+ * Show only one pane at full size while keeping both panes mounted in the DOM,
43
+ * hiding the divider and the inactive pane. Set to `null` or `undefined` to show both panes.
44
+ */
45
+ singlePane?: SplitterPane | null;
46
+ /**
47
+ * Amount moved by each arrow key in the active `unit`; `Shift` moves ten times as far.
48
+ * Defaults to `1` in `'percent'` mode and `10` in `'px'` mode.
49
+ */
23
50
  step?: number;
24
51
  disabled?: boolean;
25
52
  /** Names the divider for screen readers. */
@@ -1,8 +1,7 @@
1
- import type { SplitterLimit, SplitterProps, SplitterSlots } from './splitter';
1
+ import type { SplitterLimit, SplitterPane, SplitterProps, SplitterSlots } from './splitter';
2
2
  type __VLS_Props = SplitterProps;
3
3
  type __VLS_Slots = SplitterSlots;
4
4
  type __VLS_ModelProps = {
5
- modelValue?: number;
6
5
  'collapsed'?: boolean;
7
6
  };
8
7
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
@@ -16,12 +15,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
16
15
  "onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
17
16
  }>, {
18
17
  min: SplitterLimit;
19
- max: SplitterLimit;
20
18
  disabled: boolean;
21
19
  direction: import("./splitter").SplitterDirection;
22
- step: number;
23
20
  collapsible: boolean;
21
+ unit: import("./splitter").SplitterUnit;
24
22
  minEnd: SplitterLimit;
23
+ singlePane: SplitterPane | null;
25
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
26
  declare const _default: typeof __VLS_export;
@@ -77,6 +77,7 @@ export declare const DouTabPanel: import("../..").WithInstall<{
77
77
  closable: boolean;
78
78
  disabled: boolean;
79
79
  draggable: boolean;
80
+ pinned: boolean;
80
81
  eager: boolean;
81
82
  }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
82
83
  P: {};
@@ -89,6 +90,7 @@ export declare const DouTabPanel: import("../..").WithInstall<{
89
90
  closable: boolean;
90
91
  disabled: boolean;
91
92
  draggable: boolean;
93
+ pinned: boolean;
92
94
  eager: boolean;
93
95
  }>;
94
96
  __isFragment?: never;
@@ -98,6 +100,7 @@ export declare const DouTabPanel: import("../..").WithInstall<{
98
100
  closable: boolean;
99
101
  disabled: boolean;
100
102
  draggable: boolean;
103
+ pinned: boolean;
101
104
  eager: boolean;
102
105
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
103
106
  $slots: import("./tabs").TabPanelSlots;