domql 1.5.50 → 1.5.52

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
@@ -3,7 +3,7 @@
3
3
  "description": "DOM rendering Javascript framework at early stage.",
4
4
  "private": false,
5
5
  "author": "symbo.ls",
6
- "version": "1.5.50",
6
+ "version": "1.5.52",
7
7
  "repository": "https://github.com/domql/domql",
8
8
  "publishConfig": {
9
9
  "registry": "https://registry.npmjs.org"
@@ -22,13 +22,6 @@
22
22
  "bump": "npx np"
23
23
  },
24
24
  "source": true,
25
- "dependencies": {
26
- "@domql/utils": "latest",
27
- "@swc/helpers": "^0.4.12"
28
- },
29
- "peerDependencies": {
30
- "@emotion/css": "^11.10.0"
31
- },
32
25
  "devDependencies": {
33
26
  "@babel/core": "^7.16.0",
34
27
  "@babel/eslint-parser": "^7.16.3",
@@ -28,8 +28,7 @@ const create = (element, parent, key, options = OPTIONS.create || {}) => {
28
28
 
29
29
  // if ELEMENT is not given
30
30
  if (element === undefined) {
31
- if (ENV === 'test' || ENV === 'development')
32
- console.warn(key, 'element is undefined in', parent && parent.path)
31
+ if (ENV === 'test' || ENV === 'development') { console.warn(key, 'element is undefined in', parent && parent.path) }
33
32
  element = {}
34
33
  }
35
34
  if (element === null) return
@@ -96,9 +95,9 @@ const create = (element, parent, key, options = OPTIONS.create || {}) => {
96
95
 
97
96
  if (options.components) {
98
97
  const { components } = options
99
- const { extend, component } = element
98
+ const { extend } = element
100
99
  const execExtend = exec(extend, element)
101
- if (isString(execExtend))
100
+ if (isString(execExtend)) {
102
101
  if (components[execExtend]) element.extend = components[execExtend]
103
102
  else {
104
103
  if (ENV === 'test' || ENV === 'development') {
@@ -107,6 +106,7 @@ const create = (element, parent, key, options = OPTIONS.create || {}) => {
107
106
  }
108
107
  element.extend = {}
109
108
  }
109
+ }
110
110
  }
111
111
 
112
112
  // assign context
@@ -228,7 +228,7 @@ const create = (element, parent, key, options = OPTIONS.create || {}) => {
228
228
 
229
229
  export const isKeyComponent = (key) => {
230
230
  const isFirstKeyString = isString(key)
231
- if(!isFirstKeyString) return
231
+ if (!isFirstKeyString) return
232
232
 
233
233
  const firstCharKey = key.slice(0, 1)
234
234
 
@@ -45,4 +45,3 @@ const set = function (params, options, el) {
45
45
  }
46
46
 
47
47
  export default set
48
-
@@ -114,8 +114,8 @@ export default function (element, parent) {
114
114
  const keyInParentState = parent.state[element.__state]
115
115
  if (is(keyInParentState)('object', 'array')) {
116
116
  state = deepClone(keyInParentState)
117
- } else if (is(state)('string', 'number')) {
118
- state = { value: state }
117
+ } else if (is(keyInParentState)('string', 'number')) {
118
+ state = { value: keyInParentState }
119
119
  }
120
120
  }
121
121
  }