@symbo.ls/create 2.11.272 → 2.11.274
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/bundle/index.js +12 -9
- package/dist/cjs/createDomql.js +1 -0
- package/package.json +2 -2
- package/src/createDomql.js +1 -0
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -6043,14 +6043,14 @@ var require_append = __commonJS({
|
|
|
6043
6043
|
var insertNodeAfter = (node2, siblingNode, parentNode) => {
|
|
6044
6044
|
const parent = parentNode || siblingNode.parentNode;
|
|
6045
6045
|
if (siblingNode.nextSibling) {
|
|
6046
|
-
parent
|
|
6046
|
+
parent && parent.insertBefore(node2, siblingNode.nextSibling);
|
|
6047
6047
|
} else {
|
|
6048
|
-
siblingNode
|
|
6048
|
+
siblingNode && siblingNode.insertAdjacentElement("afterend", node2);
|
|
6049
6049
|
}
|
|
6050
6050
|
};
|
|
6051
6051
|
var insertNodeBefore = (node2, siblingNode, parentNode) => {
|
|
6052
|
-
|
|
6053
|
-
|
|
6052
|
+
const parent = parentNode || siblingNode.parentNode;
|
|
6053
|
+
parent && parent.insertBefore(node2, siblingNode);
|
|
6054
6054
|
};
|
|
6055
6055
|
var assignNode = (element, parent, key, attachOptions) => {
|
|
6056
6056
|
parent[key || element.key] = element;
|
|
@@ -7751,7 +7751,7 @@ var require_component = __commonJS({
|
|
|
7751
7751
|
const { context, tag, extend, props: props4, attr, state, childExtend, childProps, on: on2, if: condition } = element;
|
|
7752
7752
|
const hasComponentAttrs = extend || childExtend || props4 || state || on2 || condition || attr;
|
|
7753
7753
|
const extendFromKey = key.includes("+") ? key.split("+") : key.includes("_") ? key.split("_")[0] : key.includes(".") ? key.split(".")[0] : [key];
|
|
7754
|
-
const isExtendKeyComponent = context
|
|
7754
|
+
const isExtendKeyComponent = context && context.components[extendFromKey];
|
|
7755
7755
|
if (element === isExtendKeyComponent)
|
|
7756
7756
|
return element;
|
|
7757
7757
|
else if (!hasComponentAttrs || childProps) {
|
|
@@ -9689,7 +9689,6 @@ var require_update2 = __commonJS({
|
|
|
9689
9689
|
return [snapshotOnCallee, calleeElement];
|
|
9690
9690
|
};
|
|
9691
9691
|
var checkIfOnUpdate = (element, parent, options) => {
|
|
9692
|
-
var _a;
|
|
9693
9692
|
if (!(0, import_utils30.isFunction)(element.if) || !parent)
|
|
9694
9693
|
return;
|
|
9695
9694
|
const ref = element.__ref;
|
|
@@ -9705,13 +9704,15 @@ var require_update2 = __commonJS({
|
|
|
9705
9704
|
}
|
|
9706
9705
|
if (ref.__state) {
|
|
9707
9706
|
element.state = ref.__state;
|
|
9707
|
+
} else if (!ref.__hasRootState) {
|
|
9708
|
+
delete element.state;
|
|
9708
9709
|
}
|
|
9709
|
-
|
|
9710
|
+
element.node && element.node.remove();
|
|
9710
9711
|
const previousElement = element.previousElement();
|
|
9711
9712
|
const nextElement = element.nextElement();
|
|
9712
9713
|
const hasPrevious = previousElement && previousElement.node;
|
|
9713
9714
|
const hasNext = nextElement && nextElement.node;
|
|
9714
|
-
const attachOptions = (
|
|
9715
|
+
const attachOptions = (hasPrevious && hasPrevious.parentNode || hasNext && hasNext.parentNode) && {
|
|
9715
9716
|
position: hasPrevious ? "after" : hasNext ? "before" : null,
|
|
9716
9717
|
node: hasPrevious || hasNext
|
|
9717
9718
|
};
|
|
@@ -10574,7 +10575,7 @@ var toCamelCase = (str) => {
|
|
|
10574
10575
|
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
10575
10576
|
}).replaceAll(/\s+/g, "");
|
|
10576
10577
|
};
|
|
10577
|
-
var toTitleCase = (str) => str
|
|
10578
|
+
var toTitleCase = (str) => str && str.replace(
|
|
10578
10579
|
/\w\S*/g,
|
|
10579
10580
|
(txt) => {
|
|
10580
10581
|
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
@@ -21430,6 +21431,7 @@ var DevFocus = {
|
|
|
21430
21431
|
on: {
|
|
21431
21432
|
init: ({ context }) => {
|
|
21432
21433
|
const { components } = context;
|
|
21434
|
+
console.log(components);
|
|
21433
21435
|
if ((0, import_utils21.isObject)(components)) {
|
|
21434
21436
|
const { Content, ...rest } = components;
|
|
21435
21437
|
for (const key in rest) {
|
|
@@ -22316,6 +22318,7 @@ var createDomqlElement = (App, options) => {
|
|
|
22316
22318
|
designSystem,
|
|
22317
22319
|
snippets,
|
|
22318
22320
|
functions: options.functions,
|
|
22321
|
+
files: options.files,
|
|
22319
22322
|
utils: snippets,
|
|
22320
22323
|
define,
|
|
22321
22324
|
registry,
|
package/dist/cjs/createDomql.js
CHANGED
package/package.json
CHANGED