fluekit 1.5.71 → 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
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"]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -2989,33 +2989,48 @@ var Transform_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @_
|
|
|
2989
2989
|
}
|
|
2990
2990
|
}), LayoutBuilder_default = /* @__PURE__ */ defineComponent({
|
|
2991
2991
|
__name: "LayoutBuilder",
|
|
2992
|
+
props: { direction: {} },
|
|
2992
2993
|
setup(e) {
|
|
2993
|
-
let C = ref(null),
|
|
2994
|
-
|
|
2995
|
-
height: "100%",
|
|
2996
|
-
|
|
2997
|
-
};
|
|
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
|
+
});
|
|
2998
2998
|
return onMounted(() => {
|
|
2999
|
-
|
|
3000
|
-
for (let
|
|
3001
|
-
let e =
|
|
3002
|
-
|
|
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({
|
|
3003
3003
|
width: e,
|
|
3004
|
-
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
|
|
3005
3020
|
});
|
|
3006
3021
|
}
|
|
3007
|
-
}),
|
|
3022
|
+
}), D.observe(w.value));
|
|
3008
3023
|
}), onUnmounted(() => {
|
|
3009
|
-
|
|
3010
|
-
}), (e,
|
|
3024
|
+
D?.disconnect();
|
|
3025
|
+
}), (e, C) => (openBlock(), createElementBlock("div", {
|
|
3011
3026
|
ref_key: "el",
|
|
3012
|
-
ref:
|
|
3027
|
+
ref: w,
|
|
3013
3028
|
class: "fluekit-layout-builder",
|
|
3014
|
-
style:
|
|
3015
|
-
}, [
|
|
3029
|
+
style: normalizeStyle(A.value)
|
|
3030
|
+
}, [T.value ? renderSlot(e.$slots, "default", {
|
|
3016
3031
|
key: 0,
|
|
3017
|
-
constraints:
|
|
3018
|
-
}) : createCommentVNode("", !0)],
|
|
3032
|
+
constraints: T.value
|
|
3033
|
+
}) : createCommentVNode("", !0)], 4));
|
|
3019
3034
|
}
|
|
3020
3035
|
});
|
|
3021
3036
|
let Orientation = /* @__PURE__ */ function(e) {
|