@symbo.ls/atoms 2.11.283 → 2.11.284

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.
Files changed (3) hide show
  1. package/Collection.js +16 -16
  2. package/Media.js +2 -1
  3. package/package.json +2 -2
package/Collection.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  import { isState, getChildStateInKey } from '@domql/state'
4
- import { isString, isNot, isArray, isObject, isObjectLike, deepDiff, deepClone } from '@domql/utils'
4
+ import { isString, isNot, isArray, isObject, isObjectLike, deepClone } from '@domql/utils'
5
5
 
6
6
  export const Collection = {
7
7
  define: {
@@ -18,13 +18,13 @@ export const Collection = {
18
18
  const { __ref: ref } = el
19
19
 
20
20
  if (ref.__collectionCache) {
21
- const d = deepDiff(param, ref.__collectionCache) // eslint-disable-line
22
- if (Object.keys(d).length) {
23
- ref.__collectionCache = deepClone(param)
24
- delete ref.__noCollectionDifference
25
- } else {
21
+ const equals = JSON.stringify(param) === JSON.stringify(ref.__collectionCache)
22
+ if (equals) {
26
23
  ref.__noCollectionDifference = true
27
24
  return
25
+ } else {
26
+ ref.__collectionCache = deepClone(param)
27
+ delete ref.__noCollectionDifference
28
28
  }
29
29
  } else {
30
30
  ref.__collectionCache = deepClone(param)
@@ -84,13 +84,13 @@ export const Collection = {
84
84
  const { __ref: ref } = el
85
85
 
86
86
  if (ref.__stateCollectionCache) {
87
- const d = deepDiff(param, ref.__stateCollectionCache) // eslint-disable-line
88
- if (Object.keys(d).length) {
89
- ref.__stateCollectionCache = deepClone(param)
90
- delete ref.__noCollectionDifference
91
- } else {
87
+ const equals = JSON.stringify(param) === JSON.stringify(ref.__stateCollectionCache)
88
+ if (equals) {
92
89
  ref.__noCollectionDifference = true
93
90
  return
91
+ } else {
92
+ ref.__stateCollectionCache = deepClone(param)
93
+ delete ref.__noCollectionDifference
94
94
  }
95
95
  } else {
96
96
  ref.__stateCollectionCache = deepClone(param)
@@ -127,13 +127,13 @@ export const Collection = {
127
127
  const { __ref: ref } = el
128
128
 
129
129
  if (ref.__propsCollectionCache) {
130
- const d = deepDiff(param, ref.__propsCollectionCache) // eslint-disable-line
131
- if (Object.keys(d).length) {
132
- ref.__propsCollectionCache = deepClone(param)
133
- delete ref.__noCollectionDifference
134
- } else {
130
+ const equals = JSON.stringify(param) === JSON.stringify(ref.__propsCollectionCache) // eslint-disable-line
131
+ if (equals) {
135
132
  ref.__noCollectionDifference = true
136
133
  return
134
+ } else {
135
+ ref.__propsCollectionCache = deepClone(param)
136
+ delete ref.__noCollectionDifference
137
137
  }
138
138
  } else {
139
139
  ref.__propsCollectionCache = deepClone(param)
package/Media.js CHANGED
@@ -161,7 +161,7 @@ const beforeClassAssign = (element, s) => {
161
161
  props.update({
162
162
  themeModifier: globalTheme
163
163
  }, {
164
- preventUpdateListener: true,
164
+ preventListeners: true,
165
165
  preventRecursive: true,
166
166
  isForced: true,
167
167
  preventDefineUpdate: true
@@ -185,6 +185,7 @@ const beforeClassAssign = (element, s) => {
185
185
  spacingRatio: parentProps.spacingRatio,
186
186
  inheritSpacingRatio: true
187
187
  }, {
188
+ preventListeners: true,
188
189
  preventRecursive: true,
189
190
  isForced: true,
190
191
  preventDefineUpdate: true
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "2.11.283",
3
+ "version": "2.11.284",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "53d59fcbc506dc1e61b93dc5b79a8a1f5b0ec01a",
6
+ "gitHead": "ce9854b8d9a5c8782740df60f3c961838e373c85",
7
7
  "dependencies": {
8
8
  "@domql/state": "latest",
9
9
  "@domql/utils": "latest",