tracked-instance 1.0.16 → 1.0.18

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
@@ -1589,7 +1589,7 @@ function useTrackedInstance(initialData) {
1589
1589
  return result;
1590
1590
  }
1591
1591
  }));
1592
- const _data = createNestedRef({ root: initialData }, (parentThree) => ({
1592
+ const _data = createNestedRef({ root: cloneDeep_default(initialData) }, (parentThree) => ({
1593
1593
  set(target, property, value, receiver) {
1594
1594
  const path = parentThree.concat({ target, property, receiver });
1595
1595
  const oldValue = target[property];
@@ -1,6 +1,6 @@
1
1
  import { ComputedRef, Ref, ShallowRef } from 'vue';
2
2
  import { TrackedInstance } from './tracked-instance';
3
- export interface CollectionItem<Item, Meta> {
3
+ export interface CollectionItem<Item, Meta = undefined> {
4
4
  instance: TrackedInstance<Item>;
5
5
  meta: Meta;
6
6
  isRemoved: Ref<boolean>;
@@ -14,4 +14,4 @@ export interface Collection<Item, Meta> {
14
14
  loadData: (items: Item[]) => void;
15
15
  reset: () => void;
16
16
  }
17
- export declare const useCollection: <Item = any, Meta = any>(createItemMeta?: (instance: TrackedInstance<Item>) => Meta) => Collection<Item, Meta>;
17
+ export declare const useCollection: <Item = any, Meta = undefined>(createItemMeta?: (instance: TrackedInstance<Item>) => Meta) => Collection<Item, Meta>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tracked-instance",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "Build large forms and track all changes",
5
5
  "type": "module",
6
6
  "scripts": {