@domql/element 2.4.11 → 2.5.0
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/LICENSE +21 -0
- package/create.js +1 -2
- package/dist/cjs/create.js +2 -3
- package/package.json +4 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 symbo.ls
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/create.js
CHANGED
|
@@ -4,8 +4,7 @@ import createNode from './node'
|
|
|
4
4
|
import { ROOT } from './tree'
|
|
5
5
|
import { TAGS } from '@domql/registry'
|
|
6
6
|
import { triggerEventOn } from '@domql/event'
|
|
7
|
-
import { appendNode, assignNode } from '@domql/render'
|
|
8
|
-
import { cacheNode, detectTag } from '@domql/node'
|
|
7
|
+
import { appendNode, assignNode, cacheNode, detectTag } from '@domql/render'
|
|
9
8
|
import { createState } from '@domql/state'
|
|
10
9
|
|
|
11
10
|
import { isMethod } from './methods'
|
package/dist/cjs/create.js
CHANGED
|
@@ -36,7 +36,6 @@ var import_tree = require("./tree");
|
|
|
36
36
|
var import_registry = require("@domql/registry");
|
|
37
37
|
var import_event = require("@domql/event");
|
|
38
38
|
var import_render = require("@domql/render");
|
|
39
|
-
var import_node2 = require("@domql/node");
|
|
40
39
|
var import_state = require("@domql/state");
|
|
41
40
|
var import_methods = require("./methods");
|
|
42
41
|
var import_props = require("./props");
|
|
@@ -185,7 +184,7 @@ const createIfConditionFlag = (element, parent) => {
|
|
|
185
184
|
if ((0, import_utils.isFunction)(element.if)) {
|
|
186
185
|
const ifPassed = element.if(element, element.state);
|
|
187
186
|
if (!ifPassed) {
|
|
188
|
-
const ifFragment = (0,
|
|
187
|
+
const ifFragment = (0, import_render.cacheNode)({ tag: "fragment" });
|
|
189
188
|
ref.__ifFragment = (0, import_render.appendNode)(ifFragment, parent.node);
|
|
190
189
|
delete ref.__if;
|
|
191
190
|
} else
|
|
@@ -227,7 +226,7 @@ const addCaching = (element, parent) => {
|
|
|
227
226
|
};
|
|
228
227
|
const onlyResolveExtends = (element, parent, options) => {
|
|
229
228
|
const { __ref } = element;
|
|
230
|
-
element.tag = (0,
|
|
229
|
+
element.tag = (0, import_render.detectTag)(element);
|
|
231
230
|
if (!__ref.__exec)
|
|
232
231
|
__ref.__exec = {};
|
|
233
232
|
if (!__ref.__attr)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@domql/event": "latest",
|
|
29
|
-
"@domql/node": "
|
|
30
|
-
"@domql/render": "
|
|
29
|
+
"@domql/node": "latest",
|
|
30
|
+
"@domql/render": "latest",
|
|
31
31
|
"@domql/state": "latest",
|
|
32
32
|
"@domql/utils": "latest"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "1caef4529af5d71b96bac356e3420a686df28052",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|