vueless 0.0.607 → 0.0.609

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.
@@ -3,10 +3,20 @@ import { isSSR } from "../utils/helper.ts";
3
3
 
4
4
  import type { MaybeRef } from "vue";
5
5
 
6
+ export interface MutationObserverOptions {
7
+ subtree?: boolean;
8
+ childList?: boolean;
9
+ attributes?: boolean;
10
+ attributeFilter?: string[];
11
+ attributeOldValue?: boolean;
12
+ characterData?: boolean;
13
+ characterDataOldValue?: boolean;
14
+ }
15
+
6
16
  export function useMutationObserver(
7
17
  target: MaybeRef<Element | Element[] | null>,
8
18
  callback: MutationCallback,
9
- config = { childList: true, attributes: true, characterData: true },
19
+ config: MutationObserverOptions = { childList: true, attributes: true, characterData: true },
10
20
  ) {
11
21
  if (isSSR) return;
12
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.607",
3
+ "version": "0.0.609",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -28,7 +28,12 @@ const cellRef = useTemplateRef<HTMLDivElement[]>("cell");
28
28
  const toggleWrapperRef = useTemplateRef<HTMLDivElement[]>("toggle-wrapper");
29
29
  const slots = useSlots();
30
30
 
31
- useMutationObserver(cellRef, setCellTitle);
31
+ useMutationObserver(cellRef, setCellTitle, {
32
+ subtree: true,
33
+ childList: true,
34
+ characterData: true,
35
+ attributes: false,
36
+ });
32
37
 
33
38
  const toggleIconConfig = computed(() => {
34
39
  const nestedRow = props.row?.row;
@@ -87,8 +87,18 @@ watch(
87
87
  const childStyles = childDiv && window.getComputedStyle(childDiv);
88
88
  const childMarginTop = parseFloat(childStyles?.marginTop || "0");
89
89
  const childMarginBottom = parseFloat(childStyles?.marginBottom || "0");
90
-
91
- return elHeight + marginTop + marginBottom + childMarginTop + childMarginBottom;
90
+ const childPaddingTop = parseFloat(childStyles?.paddingTop || "0");
91
+ const childPaddingBottom = parseFloat(childStyles?.paddingBottom || "0");
92
+
93
+ return (
94
+ elHeight +
95
+ marginTop +
96
+ marginBottom +
97
+ childMarginTop +
98
+ childMarginBottom +
99
+ childPaddingTop +
100
+ childPaddingBottom
101
+ );
92
102
  })
93
103
  .reduce((acc, cur) => acc + cur, 0);
94
104
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.607",
4
+ "version": "0.0.609",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",