@domql/element 2.5.77 → 2.5.78

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/cjs/set.js CHANGED
@@ -38,7 +38,6 @@ var import_options = __toESM(require("./cache/options"), 1);
38
38
  var import_mixins = require("./mixins");
39
39
  var import_content = require("./mixins/content");
40
40
  const resetElement = (params, element, options) => {
41
- const perf = performance.now();
42
41
  if (!options.preventRemove)
43
42
  (0, import_content.removeContent)(element, options);
44
43
  (0, import_create.default)(params, element, options.contentElementKey || "content", {
@@ -53,7 +53,8 @@ const UPDATE_DEFAULT_OPTIONS = {
53
53
  calleeElement: false,
54
54
  excludes: import_utils2.METHODS_EXL
55
55
  };
56
- const update = function(params = {}, options = UPDATE_DEFAULT_OPTIONS) {
56
+ const update = function(params = {}, opts = UPDATE_DEFAULT_OPTIONS) {
57
+ const options = (0, import_utils2.deepClone)((0, import_utils2.deepMerge)(opts, UPDATE_DEFAULT_OPTIONS));
57
58
  const element = this;
58
59
  const { parent, node, key } = element;
59
60
  const { excludes, preventInheritAtCurrentState } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.5.77",
3
+ "version": "2.5.78",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -31,7 +31,7 @@
31
31
  "@domql/state": "latest",
32
32
  "@domql/utils": "latest"
33
33
  },
34
- "gitHead": "20db0bd2a45b9f1037d8ca6a7fb3fd66197a3056",
34
+ "gitHead": "053f137856aad06574e99486357f486d6d724132",
35
35
  "devDependencies": {
36
36
  "@babel/core": "^7.12.0"
37
37
  }
package/set.js CHANGED
@@ -8,7 +8,6 @@ import { registry } from './mixins'
8
8
  import { removeContent } from './mixins/content'
9
9
 
10
10
  export const resetElement = (params, element, options) => {
11
- const perf = performance.now()
12
11
  if (!options.preventRemove) removeContent(element, options)
13
12
  create(params, element, options.contentElementKey || 'content', {
14
13
  ignoreChildExtend: true,
package/update.js CHANGED
@@ -19,7 +19,7 @@ import { isMethod } from './methods'
19
19
  import { updateProps } from './props'
20
20
  import { createState, findInheritedState } from '@domql/state'
21
21
 
22
- import { METHODS_EXL, isVariant } from './utils'
22
+ import { METHODS_EXL, deepClone, isVariant, deepMerge } from './utils'
23
23
  import create from './create'
24
24
  import { throughUpdatedDefine, throughUpdatedExec } from './iterate'
25
25
  import { registry } from './mixins'
@@ -39,7 +39,8 @@ const UPDATE_DEFAULT_OPTIONS = {
39
39
  excludes: METHODS_EXL
40
40
  }
41
41
 
42
- const update = function (params = {}, options = UPDATE_DEFAULT_OPTIONS) {
42
+ const update = function (params = {}, opts = UPDATE_DEFAULT_OPTIONS) {
43
+ const options = deepClone(deepMerge(opts, UPDATE_DEFAULT_OPTIONS))
43
44
  const element = this
44
45
  const { parent, node, key } = element
45
46
  const { excludes, preventInheritAtCurrentState } = options