@dolanske/vui 1.14.8 → 1.14.9

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.
@@ -22,6 +22,12 @@ interface Props {
22
22
  * Enables scroll-snap so items snap into place when scrolling stops
23
23
  */
24
24
  snap?: boolean;
25
+ /**
26
+ * Disables the drag-to-scroll functionality. Keeping only mouse wheel and
27
+ * touch scrolling. Useful when the carousel contains interactive elements
28
+ * like buttons or links that would conflict with dragging.
29
+ */
30
+ disableDrag?: boolean;
25
31
  }
26
32
  declare function __VLS_template(): {
27
33
  attrs: Partial<{}>;
@@ -7,6 +7,10 @@ interface Props {
7
7
  * If provided, it enables local persistence of panel sizes
8
8
  */
9
9
  storageKey?: string;
10
+ /**
11
+ *
12
+ */
13
+ hideHandles?: boolean;
10
14
  }
11
15
  interface PanelProps {
12
16
  minWidth: number;
@@ -0,0 +1,69 @@
1
+ import { Panel, ViewTab } from './ViewPanel.vue';
2
+ /**
3
+ * ResizableView — a VSCode-like multi-panel editor layout.
4
+ *
5
+ * CONCEPTS
6
+ * ─────────
7
+ * Panel — a leaf node: holds an ordered list of tabs, one of which is active.
8
+ * Group — an inner node: an array that contains Panels and/or nested Groups.
9
+ * Groups alternate direction by depth:
10
+ * depth 1 (views[]) → horizontal <Resizable>
11
+ * depth 2 (item1[]) → vertical <Resizable vertical>
12
+ * depth 3 (item2[]) → horizontal <Resizable>
13
+ * Three levels of nesting therefore support h → v → h splits.
14
+ *
15
+ * TREE SHAPE
16
+ * ──────────
17
+ * `views` is a Level1Item[] whose elements are either a Panel (rendered
18
+ * directly) or a Level2Item[] Group (rendered as a nested Resizable).
19
+ *
20
+ * views = [
21
+ * panelA, // full-width single panel
22
+ * [ panelB, panelC ], // vertical split: B above C
23
+ * [ [ panelD, panelE ], panelF ] // vertical: (D|E horizontal) above F
24
+ * ]
25
+ *
26
+ * DRAG & DROP
27
+ * ───────────
28
+ * Shared drag state (`dragState`) is stored here and injected into every
29
+ * ViewPanel via provide/inject under the key '$vrp'. Each ViewPanel has two
30
+ * independent drop zones:
31
+ *
32
+ * Tabs bar — reorders tabs; dropped tab becomes active in the target panel.
33
+ * Content — splits the panel (left/right/top/bottom) or appends (center).
34
+ */
35
+ type Level3Item = Panel;
36
+ type Level2Item = Panel | Level3Item[];
37
+ type Level1Item = Panel | Level2Item[];
38
+ type __VLS_PublicProps = {
39
+ modelValue?: Level1Item[];
40
+ };
41
+ declare function __VLS_template(): {
42
+ attrs: Partial<{}>;
43
+ slots: Readonly<{
44
+ tab: (props: {
45
+ tab: ViewTab | undefined;
46
+ panel: Panel;
47
+ }) => any;
48
+ }> & {
49
+ tab: (props: {
50
+ tab: ViewTab | undefined;
51
+ panel: Panel;
52
+ }) => any;
53
+ };
54
+ refs: {};
55
+ rootEl: HTMLDivElement;
56
+ };
57
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
58
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
59
+ "update:modelValue": (value: Level1Item[]) => any;
60
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
61
+ "onUpdate:modelValue"?: ((value: Level1Item[]) => any) | undefined;
62
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
63
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
64
+ export default _default;
65
+ type __VLS_WithTemplateSlots<T, S> = T & {
66
+ new (): {
67
+ $slots: S;
68
+ };
69
+ };
@@ -0,0 +1,77 @@
1
+ /**
2
+ * ViewPanel — one pane in the ResizableView grid.
3
+ *
4
+ * Renders a Card whose header is a Tabs bar and whose body is the active tab's
5
+ * content area. It is both a drag SOURCE (tabs can be picked up) and a drag
6
+ * TARGET with two independent drop zones:
7
+ *
8
+ * ┌─────────────────────────────────┐
9
+ * │ [Tab A] [Tab B] [Tab C] │ ← TABS DROP ZONE
10
+ * ├─────────────────────────────────┤
11
+ * │ │
12
+ * │ content area │ ← CONTENT DROP ZONE
13
+ * │ (split overlay shown here) │
14
+ * │ │
15
+ * └─────────────────────────────────┘
16
+ *
17
+ * TABS DROP ZONE
18
+ * Dropping here reorders tabs or moves a tab from another panel.
19
+ * A thin 2 px bar (::before / ::after pseudo-element on the neighbouring Tab)
20
+ * previews the insertion slot. The slot is determined by which horizontal half
21
+ * of each Tab the cursor is over (left-half → insert before, right-half →
22
+ * insert after). The dropped tab becomes active only for cross-panel drops.
23
+ *
24
+ * CONTENT DROP ZONE
25
+ * A semi-transparent overlay divides the content area into five zones using
26
+ * `HOVER_OFFSET` (33 %) margins:
27
+ *
28
+ * ┌──────┬──────────┬──────┐
29
+ * │ │ top │ │
30
+ * │ left │ center │ right│
31
+ * │ │ bottom │ │
32
+ * └──────┴──────────┴──────┘
33
+ *
34
+ * center → append tab to this panel (no split)
35
+ * left/right/top/bottom → split the panel and place a new panel on that side
36
+ */
37
+ export interface ViewTab {
38
+ path: string;
39
+ label?: string;
40
+ }
41
+ export interface Panel {
42
+ /** Stable unique ID assigned by ResizableView on first render. Used as v-for key. */
43
+ id?: string;
44
+ tabs: ViewTab[];
45
+ }
46
+ interface Props {
47
+ panel: Panel;
48
+ }
49
+ declare function __VLS_template(): {
50
+ attrs: Partial<{}>;
51
+ slots: Readonly<{
52
+ tab: (props: {
53
+ tab: ViewTab;
54
+ panel: Panel;
55
+ }) => any;
56
+ }> & {
57
+ tab: (props: {
58
+ tab: ViewTab;
59
+ panel: Panel;
60
+ }) => any;
61
+ };
62
+ refs: {
63
+ contentRef: HTMLDivElement;
64
+ };
65
+ rootEl: HTMLDivElement;
66
+ };
67
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
68
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
69
+ contentRef: HTMLDivElement;
70
+ }, HTMLDivElement>;
71
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
72
+ export default _default;
73
+ type __VLS_WithTemplateSlots<T, S> = T & {
74
+ new (): {
75
+ $slots: S;
76
+ };
77
+ };
@@ -53,6 +53,7 @@ import { default as Progress } from './components/Progress/Progress.vue';
53
53
  import { default as Radio } from './components/Radio/Radio.vue';
54
54
  import { default as RadioGroup } from './components/Radio/RadioGroup.vue';
55
55
  import { default as Resizable } from './components/Resizable/Resizable.vue';
56
+ import { default as ResizableView } from './components/ResizableView/ResizableView.vue';
56
57
  import { default as Sheet } from './components/Sheet/Sheet.vue';
57
58
  import { default as Sidebar } from './components/Sidebar/Sidebar.vue';
58
59
  import { default as Skeleton } from './components/Skeleton/Skeleton.vue';
@@ -70,4 +71,4 @@ import { searchString } from './shared/helpers';
70
71
  import { setColorTheme, theme } from './shared/theme';
71
72
  import { useViewTransition } from './shared/viewTransition';
72
73
  import * as Table from './components/Table';
73
- export { Accordion, AccordionGroup, Alert, AspectRatio, Avatar, AvatarGroup, Backdrop, Badge, BadgeGroup, BreadcrumbItem, Breadcrumbs, type Breakpoints, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Color, type Command, Commands, Confirm, ContextMenu, CopyClipboard, Counter, defineTable, Divider, Drawer, Dropdown, DropdownItem, DropdownTitle, Dropzone, File, Flex, Grid, Indicator, Input, Kbd, KbdGroup, Marquee, Menubar, MenuItem, Modal, OTP, OTPItem, Overflow, paginate, Pagination, Password, Popout, PopoutHover, Progress, pushToast, Radio, RadioGroup, removeToast, Resizable, searchString, Select, type SelectOption, setColorTheme, Sheet, Sidebar, type Size, type Sizes, Skeleton, Slider, type Spaces, type SpaceSize, Spinner, Switch, Tab, Table, Tabs, Textarea, theme, Toasts, Tooltip, useBreakpoint, useViewTransition, vuiBreakpoints, };
74
+ export { Accordion, AccordionGroup, Alert, AspectRatio, Avatar, AvatarGroup, Backdrop, Badge, BadgeGroup, BreadcrumbItem, Breadcrumbs, type Breakpoints, Button, ButtonGroup, Calendar, Card, Carousel, Checkbox, Color, type Command, Commands, Confirm, ContextMenu, CopyClipboard, Counter, defineTable, Divider, Drawer, Dropdown, DropdownItem, DropdownTitle, Dropzone, File, Flex, Grid, Indicator, Input, Kbd, KbdGroup, Marquee, Menubar, MenuItem, Modal, OTP, OTPItem, Overflow, paginate, Pagination, Password, Popout, PopoutHover, Progress, pushToast, Radio, RadioGroup, removeToast, Resizable, ResizableView, searchString, Select, type SelectOption, setColorTheme, Sheet, Sidebar, type Size, type Sizes, Skeleton, Slider, type Spaces, type SpaceSize, Spinner, Switch, Tab, Table, Tabs, Textarea, theme, Toasts, Tooltip, useBreakpoint, useViewTransition, vuiBreakpoints, };