@window-splitter/vue 0.8.5
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/.storybook/main.js +19 -0
- package/.storybook/preview.css +22 -0
- package/.storybook/preview.js +15 -0
- package/.turbo/turbo-build.log +15 -0
- package/CHANGELOG.md +28 -0
- package/dist/Panel.vue.d.ts +33 -0
- package/dist/Panel.vue.d.ts.map +1 -0
- package/dist/PanelGroup.vue.d.ts +33 -0
- package/dist/PanelGroup.vue.d.ts.map +1 -0
- package/dist/PanelResizer.vue.d.ts +22 -0
- package/dist/PanelResizer.vue.d.ts.map +1 -0
- package/dist/VueWindowSplitter.stories.d.ts +1147 -0
- package/dist/VueWindowSplitter.stories.d.ts.map +1 -0
- package/dist/VueWindowSplitter.test.d.ts +1 -0
- package/dist/VueWindowSplitter.test.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1493 -0
- package/dist/index.mjs.map +1 -0
- package/eslint.config.mjs +25 -0
- package/package.json +84 -0
- package/src/Panel.vue +195 -0
- package/src/PanelGroup.vue +166 -0
- package/src/PanelResizer.vue +188 -0
- package/src/VueWindowSplitter.stories.ts +796 -0
- package/src/VueWindowSplitter.test.ts +275 -0
- package/src/__snapshots__/VueWindowSplitter.test.ts.snap +58 -0
- package/src/index.ts +6 -0
- package/tsconfig.json +21 -0
- package/vite.config.js +18 -0
- package/vitest.config.js +22 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { join, dirname } from "path";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This function is used to resolve the absolute path of a package.
|
|
5
|
+
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
|
|
6
|
+
*/
|
|
7
|
+
function getAbsolutePath(value) {
|
|
8
|
+
return dirname(require.resolve(join(value, "package.json")));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** @type { import('@storybook/vue3-vite').StorybookConfig } */
|
|
12
|
+
const config = {
|
|
13
|
+
stories: ["../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
14
|
+
framework: {
|
|
15
|
+
name: getAbsolutePath("@storybook/vue3-vite"),
|
|
16
|
+
options: {},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export default config;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.panel-group {
|
|
2
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
3
|
+
background: rgba(0, 0, 0, 0.1);
|
|
4
|
+
border-radius: 12px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
min-width: 500px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.panel {
|
|
10
|
+
height: 100%;
|
|
11
|
+
width: 100%;
|
|
12
|
+
padding: 20px;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.panel-resizer {
|
|
21
|
+
background: red;
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @window-splitter/vue@0.8.4 build /Users/andrew/Documents/react-window-splitter/packages/vue
|
|
4
|
+
> vite build
|
|
5
|
+
|
|
6
|
+
[33mThe CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m
|
|
7
|
+
[36mvite v6.3.3 [32mbuilding for production...[36m[39m
|
|
8
|
+
[2K[1Gtransforming (1) [2msrc/index.ts[22m[2K[1Gtransforming (12) [2m../interface/dist/esm/mergeAttributes.js[22m[2K[1G[32m✓[39m 14 modules transformed.
|
|
9
|
+
[2K[1Grendering chunks (1)...[2K[1G[32m
|
|
10
|
+
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
11
|
+
[2K[1Gcomputing gzip size (0)...[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.mjs [39m[1m[2m52.74 kB[22m[1m[22m[2m │ gzip: 14.31 kB[22m[2m │ map: 166.06 kB[22m
|
|
12
|
+
[32m[36m[vite:dts][32m Declaration files built in 1823ms.
|
|
13
|
+
[39m
|
|
14
|
+
[2K[1Grendering chunks (1)...[2K[1G[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.js [39m[1m[2m37.98 kB[22m[1m[22m[2m │ gzip: 12.41 kB[22m[2m │ map: 162.27 kB[22m
|
|
15
|
+
[32m✓ built in 2.07s[39m
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# v0.8.5 (Sun May 04 2025)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Vue Adapter [#56](https://github.com/hipstersmoothie/window-splitter/pull/56) ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
6
|
+
- fix controlled panel can exapand calca ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
7
|
+
- fix children being measured before parent ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
8
|
+
- formatting ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
9
|
+
- fix lint ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
10
|
+
- fix build more ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
11
|
+
- get builds working ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
12
|
+
- tests ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
13
|
+
- catalogs ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
14
|
+
- linting ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
15
|
+
- dynamic constraints ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
16
|
+
- imperative API ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
17
|
+
- dynamic panels ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
18
|
+
- collapse keyboard ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
19
|
+
- starting to work ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
20
|
+
- storybook setup ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
21
|
+
|
|
22
|
+
#### ⚠️ Pushed to `main`
|
|
23
|
+
|
|
24
|
+
- add publish info ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
25
|
+
|
|
26
|
+
#### Authors: 1
|
|
27
|
+
|
|
28
|
+
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SharedPanelProps } from '@window-splitter/interface';
|
|
2
|
+
type PanelProps = SharedPanelProps<boolean> & {
|
|
3
|
+
id?: string;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<PanelProps, {
|
|
15
|
+
collapse: () => void;
|
|
16
|
+
isCollapsed: () => boolean;
|
|
17
|
+
expand: () => void;
|
|
18
|
+
isExpanded: () => boolean;
|
|
19
|
+
getId: () => string;
|
|
20
|
+
getPixelSize: () => number;
|
|
21
|
+
getPercentageSize: () => number;
|
|
22
|
+
setSize: (size: import('@window-splitter/state').Unit) => void;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PanelProps> & Readonly<{}>, {
|
|
24
|
+
collapsed: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=Panel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panel.vue.d.ts","sourceRoot":"","sources":["../src/Panel.vue"],"names":[],"mappings":"AAqMA,OAAO,EAGL,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAsBpC,KAAK,UAAU,GAAG,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAuK9D,iBAAS,cAAc;WAuBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;wFASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SharedPanelGroupProps } from '@window-splitter/interface';
|
|
2
|
+
type PanelGroupProps = SharedPanelGroupProps & {
|
|
3
|
+
id?: string;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {
|
|
11
|
+
elementRef: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<PanelGroupProps, {
|
|
17
|
+
getId: () => string;
|
|
18
|
+
getPixelSizes: () => Array<number>;
|
|
19
|
+
getPercentageSizes: () => Array<number>;
|
|
20
|
+
setSizes: (items: Array<import('@window-splitter/state').Unit>) => void;
|
|
21
|
+
getTemplate: () => string;
|
|
22
|
+
getState: () => "idle" | "dragging";
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PanelGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
24
|
+
elementRef: HTMLDivElement;
|
|
25
|
+
}, HTMLDivElement>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=PanelGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelGroup.vue.d.ts","sourceRoot":"","sources":["../src/PanelGroup.vue"],"names":[],"mappings":"AAwKA,OAAO,EAGL,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAsBpC,KAAK,eAAe,GAAG,qBAAqB,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAoI/D,iBAAS,cAAc;WA8BT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;kBASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SharedPanelResizerProps } from '@window-splitter/interface';
|
|
2
|
+
type PanelResizerProps = SharedPanelResizerProps & {
|
|
3
|
+
id?: string;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLDivElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<PanelResizerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PanelResizerProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=PanelResizer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelResizer.vue.d.ts","sourceRoot":"","sources":["../src/PanelResizer.vue"],"names":[],"mappings":"AA8LA,OAAO,EAGL,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAwBpC,KAAK,iBAAiB,GAAG,uBAAuB,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA6JnE,iBAAS,cAAc;WAyBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,yTAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|