vueless 0.0.784 → 0.0.785

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.
@@ -1,4 +1,5 @@
1
1
  import { ref, watch, watchEffect, getCurrentInstance, toValue, useAttrs, computed } from "vue";
2
+ import { isEqual } from "lodash-es";
2
3
 
3
4
  import { cx, cva, setColor, getColor, vuelessConfig, getMergedConfig } from "../utils/ui.ts";
4
5
  import { isCSR } from "../utils/helper.ts";
@@ -137,7 +138,9 @@ export default function useUI<T>(
137
138
  /**
138
139
  * Updating Vueless attributes.
139
140
  */
140
- function updateVuelessAttrs() {
141
+ function updateVuelessAttrs(newVal: unknown, oldVal: unknown) {
142
+ if (isEqual(newVal, oldVal)) return;
143
+
141
144
  let keyConfig: NestedComponent = {};
142
145
 
143
146
  if (typeof config.value[configKey] === "object") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.784",
3
+ "version": "0.0.785",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -17,8 +17,8 @@ export function createMergeConfigs(cx) {
17
17
  isReplace = false,
18
18
  isVariants = false,
19
19
  }) {
20
- globalConfig = cloneDeep(globalConfig || {});
21
- propsConfig = cloneDeep(propsConfig || {});
20
+ globalConfig = cloneDeep(stringToObject(globalConfig, { addBase: true }));
21
+ propsConfig = cloneDeep(stringToObject(propsConfig, { addBase: true }));
22
22
 
23
23
  const isGlobalConfig = Object.keys(globalConfig).length;
24
24
  const isPropsConfig = Object.keys(propsConfig).length;