tracked-instance 1.0.14 → 1.0.16

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/index.mjs CHANGED
@@ -1646,7 +1646,7 @@ function useTrackedInstance(initialData) {
1646
1646
  });
1647
1647
  const changedData = computed(() => _changedData.value.root);
1648
1648
  const loadData = (newData) => {
1649
- _data.value = { root: newData };
1649
+ _data.value = { root: cloneDeep_default(newData) };
1650
1650
  _originalData.value = {};
1651
1651
  };
1652
1652
  const reset = () => {
@@ -1,6 +1,6 @@
1
- export type DeepPartial<T> = T extends object ? {
2
- [P in keyof T]?: DeepPartial<T[P]>;
3
- } : T;
1
+ export type DeepPartial<Value> = Value extends object ? Value extends Array<infer ArrayValue> ? Array<DeepPartial<ArrayValue>> : {
2
+ [Property in keyof Value]?: DeepPartial<Value[Property]>;
3
+ } : Value;
4
4
  export interface NestedProxyPathItem {
5
5
  target: Record<string, any>;
6
6
  property: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tracked-instance",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "Build large forms and track all changes",
5
5
  "type": "module",
6
6
  "scripts": {