@akad/design-system 0.1.0-beta.1 → 0.1.0-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akad/design-system",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.3",
4
4
  "main": "react/react.js",
5
5
  "types": "react/main.d.ts",
6
6
  "author": "Gabriel Mule <gabemule@gmail.com>",
@@ -55,3 +55,26 @@ export declare const getSchemaProperties: (schemaId: string, formSchema: JSONSch
55
55
  * @returns return input type, i.e password or email. If it's not defined, returns text as default.
56
56
  */
57
57
  export declare const getInputTypeByFormat: (definition: object) => string;
58
+ /**
59
+ * Performs a deep equality comparison between two values.
60
+ *
61
+ * @template T - The type of the values being compared.
62
+ * @param {T} value - The first value to compare.
63
+ * @param {T} other - The second value to compare.
64
+ * @param {WeakSet} [visited=new WeakSet()] - A WeakSet to keep track of visited objects to handle circular references.
65
+ * @returns {boolean} Returns `true` if the values are deeply equal, `false` otherwise.
66
+ *
67
+ * @description
68
+ * The `isEqual` function performs a deep equality comparison between two values of any type.
69
+ * It handles primitive types, `null`, arrays, and objects.
70
+ *
71
+ * - If both values are primitives, it uses `Object.is()` for comparison.
72
+ * - If both values are `null`, it returns `true`.
73
+ * - If the values have different types, it returns `false`.
74
+ * - If the values are the same reference, it returns `true`.
75
+ * - If the values are arrays, it compares their lengths and recursively compares each element.
76
+ * - If the values are objects, it compares the number of keys and recursively compares each key-value pair.
77
+ * - It handles circular references by keeping track of visited objects using a `WeakSet`.
78
+ *
79
+ */
80
+ export declare function isEqual<T>(value: T, other: T, visited?: WeakSet<object>): boolean;
@@ -27,5 +27,5 @@ export declare const useStepper: (initialState?: DsStepProps[], selectedState?:
27
27
  isStep: (stepParam: number | string | DsStepProps) => boolean;
28
28
  isLastStep: boolean;
29
29
  disableSteps: (stepNameParam: string | Array<string>) => DsStepProps[];
30
- disableStepsAfter: (stepNameParam: string) => DsStepProps[];
30
+ disableStepsAfter: (stepNameParam: string) => void;
31
31
  }[];