fluekit 1.5.7 → 1.5.72
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/LayoutBuilder.d.ts +4 -1
- package/dist/MediaQuery.d.ts +20 -20
- package/dist/Positioned.d.ts +1 -2
- package/dist/__tests__/LayoutBuilder.spec.d.ts +1 -0
- package/dist/index.js +35 -19
- package/dist/usePosition.d.ts +0 -1
- package/package.json +6 -6
package/dist/LayoutBuilder.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { BoxConstraints } from './BoxConstraints';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
direction?: "horizontal" | "vertical" | "both" | "none";
|
|
4
|
+
};
|
|
2
5
|
declare function __VLS_template(): {
|
|
3
6
|
attrs: Partial<{}>;
|
|
4
7
|
slots: {
|
|
@@ -12,7 +15,7 @@ declare function __VLS_template(): {
|
|
|
12
15
|
rootEl: HTMLDivElement;
|
|
13
16
|
};
|
|
14
17
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
16
19
|
el: HTMLDivElement;
|
|
17
20
|
}, HTMLDivElement>;
|
|
18
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/dist/MediaQuery.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { EdgeInsets } from './EdgeInsets';
|
|
3
|
+
export declare enum Orientation {
|
|
4
|
+
portrait = "portrait",
|
|
5
|
+
landscape = "landscape"
|
|
6
|
+
}
|
|
7
|
+
export interface MediaQueryData {
|
|
8
|
+
size: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
9
11
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
};
|
|
12
|
+
devicePixelRatio: number;
|
|
13
|
+
platformBrightness: "light" | "dark";
|
|
14
|
+
orientation: Orientation;
|
|
15
|
+
disableAnimations: boolean;
|
|
16
|
+
highContrast: boolean;
|
|
17
|
+
padding: EdgeInsets;
|
|
18
|
+
viewInsets: EdgeInsets;
|
|
19
|
+
}
|
|
20
|
+
export declare const MediaQueryKey: InjectionKey<MediaQueryData>;
|
|
21
|
+
export declare function useMediaQuery(): MediaQueryData;
|
package/dist/Positioned.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Props } from './usePosition';
|
|
2
|
-
type __VLS_Props = Omit<Props, "zIndex">;
|
|
3
2
|
declare function __VLS_template(): {
|
|
4
3
|
attrs: Partial<{}>;
|
|
5
4
|
slots: {
|
|
@@ -9,7 +8,7 @@ declare function __VLS_template(): {
|
|
|
9
8
|
rootEl: any;
|
|
10
9
|
};
|
|
11
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
11
|
+
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, {}, any>;
|
|
13
12
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
14
13
|
export default _default;
|
|
15
14
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -1582,7 +1582,8 @@ var Positioned_default = /* @__PURE__ */ defineComponent({
|
|
|
1582
1582
|
left: {},
|
|
1583
1583
|
right: {},
|
|
1584
1584
|
width: {},
|
|
1585
|
-
height: {}
|
|
1585
|
+
height: {},
|
|
1586
|
+
zIndex: {}
|
|
1586
1587
|
},
|
|
1587
1588
|
setup(e) {
|
|
1588
1589
|
let C = e, w = useStackContext();
|
|
@@ -2988,33 +2989,48 @@ var Transform_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @_
|
|
|
2988
2989
|
}
|
|
2989
2990
|
}), LayoutBuilder_default = /* @__PURE__ */ defineComponent({
|
|
2990
2991
|
__name: "LayoutBuilder",
|
|
2992
|
+
props: { direction: {} },
|
|
2991
2993
|
setup(e) {
|
|
2992
|
-
let C = ref(null),
|
|
2993
|
-
|
|
2994
|
-
height: "100%",
|
|
2995
|
-
|
|
2996
|
-
};
|
|
2994
|
+
let C = e, w = ref(null), T = shallowRef(null), D = null, A = computed(() => {
|
|
2995
|
+
let e = { display: "block" }, w = C.direction ?? "both";
|
|
2996
|
+
return w === "both" ? (e.width = "100%", e.height = "100%") : w === "horizontal" ? e.width = "100%" : w === "vertical" && (e.height = "100%"), e;
|
|
2997
|
+
});
|
|
2997
2998
|
return onMounted(() => {
|
|
2998
|
-
|
|
2999
|
-
for (let
|
|
3000
|
-
let e =
|
|
3001
|
-
|
|
2999
|
+
w.value && (D = new ResizeObserver((e) => {
|
|
3000
|
+
for (let w of e) {
|
|
3001
|
+
let e = w.contentRect.width, E = w.contentRect.height, D = C.direction ?? "both";
|
|
3002
|
+
D === "both" ? T.value = BoxConstraints.tight({
|
|
3002
3003
|
width: e,
|
|
3003
|
-
height:
|
|
3004
|
+
height: E
|
|
3005
|
+
}) : D === "horizontal" ? T.value = BoxConstraints({
|
|
3006
|
+
minWidth: e,
|
|
3007
|
+
maxWidth: e,
|
|
3008
|
+
minHeight: 0,
|
|
3009
|
+
maxHeight: Infinity
|
|
3010
|
+
}) : D === "vertical" ? T.value = BoxConstraints({
|
|
3011
|
+
minWidth: 0,
|
|
3012
|
+
maxWidth: Infinity,
|
|
3013
|
+
minHeight: E,
|
|
3014
|
+
maxHeight: E
|
|
3015
|
+
}) : T.value = BoxConstraints({
|
|
3016
|
+
minWidth: 0,
|
|
3017
|
+
maxWidth: Infinity,
|
|
3018
|
+
minHeight: 0,
|
|
3019
|
+
maxHeight: Infinity
|
|
3004
3020
|
});
|
|
3005
3021
|
}
|
|
3006
|
-
}),
|
|
3022
|
+
}), D.observe(w.value));
|
|
3007
3023
|
}), onUnmounted(() => {
|
|
3008
|
-
|
|
3009
|
-
}), (e,
|
|
3024
|
+
D?.disconnect();
|
|
3025
|
+
}), (e, C) => (openBlock(), createElementBlock("div", {
|
|
3010
3026
|
ref_key: "el",
|
|
3011
|
-
ref:
|
|
3027
|
+
ref: w,
|
|
3012
3028
|
class: "fluekit-layout-builder",
|
|
3013
|
-
style:
|
|
3014
|
-
}, [
|
|
3029
|
+
style: normalizeStyle(A.value)
|
|
3030
|
+
}, [T.value ? renderSlot(e.$slots, "default", {
|
|
3015
3031
|
key: 0,
|
|
3016
|
-
constraints:
|
|
3017
|
-
}) : createCommentVNode("", !0)],
|
|
3032
|
+
constraints: T.value
|
|
3033
|
+
}) : createCommentVNode("", !0)], 4));
|
|
3018
3034
|
}
|
|
3019
3035
|
});
|
|
3020
3036
|
let Orientation = /* @__PURE__ */ function(e) {
|
package/dist/usePosition.d.ts
CHANGED
|
@@ -15,5 +15,4 @@ export interface Props {
|
|
|
15
15
|
/** z-index 层级 */
|
|
16
16
|
zIndex?: number;
|
|
17
17
|
}
|
|
18
|
-
export declare function positionToStyle(props: Props, position?: "absolute" | "fixed" | "sticky" | "relative"): CSSProperties;
|
|
19
18
|
export declare function usePositionStyle(props: Props, position?: "absolute" | "fixed" | "sticky" | "relative"): import('vue').ComputedRef<CSSProperties>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluekit",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.72",
|
|
4
4
|
"description": "A Flutter-style Layout UI kit for Vue",
|
|
5
5
|
"homepage": "https://fi2zz.github.io/fluekit/",
|
|
6
6
|
"repository": {
|
|
@@ -20,10 +20,6 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "vite build",
|
|
25
|
-
"test": "vitest"
|
|
26
|
-
},
|
|
27
23
|
"peerDependencies": {
|
|
28
24
|
"vue": "^3.5.0"
|
|
29
25
|
},
|
|
@@ -37,5 +33,9 @@
|
|
|
37
33
|
"vite-plugin-dts": "^4.5.4",
|
|
38
34
|
"vitest": "^4.0.16",
|
|
39
35
|
"vue-tsc": "^3.1.4"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "vite build",
|
|
39
|
+
"test": "vitest"
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
}
|