@symbo.ls/create 2.11.271 → 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 +17 -9
- package/dist/cjs/createDomql.js +1 -0
- package/dist/cjs/utilImports.js +1 -0
- package/package.json +2 -2
- package/src/createDomql.js +1 -0
- package/src/utilImports.js +1 -1
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
|
};
|
|
@@ -10511,6 +10512,7 @@ var import_utils29 = __toESM(require_cjs(), 1);
|
|
|
10511
10512
|
// src/utilImports.js
|
|
10512
10513
|
var utilImports_exports = {};
|
|
10513
10514
|
__export(utilImports_exports, {
|
|
10515
|
+
applyCSS: () => applyCSS,
|
|
10514
10516
|
arrayzeValue: () => arrayzeValue,
|
|
10515
10517
|
copyStringToClipboard: () => copyStringToClipboard,
|
|
10516
10518
|
findClosestNumber: () => findClosestNumber,
|
|
@@ -10573,7 +10575,7 @@ var toCamelCase = (str) => {
|
|
|
10573
10575
|
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
10574
10576
|
}).replaceAll(/\s+/g, "");
|
|
10575
10577
|
};
|
|
10576
|
-
var toTitleCase = (str) => str
|
|
10578
|
+
var toTitleCase = (str) => str && str.replace(
|
|
10577
10579
|
/\w\S*/g,
|
|
10578
10580
|
(txt) => {
|
|
10579
10581
|
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
@@ -12015,6 +12017,10 @@ var reInit = (config, RC_FILE, options = UPDATE_OPTIONS) => {
|
|
|
12015
12017
|
emotion2.injectGlobal({ ":root": conf.CSS_VARS });
|
|
12016
12018
|
emotion2.injectGlobal(conf.RESET);
|
|
12017
12019
|
};
|
|
12020
|
+
var applyCSS = (styles, options = UPDATE_OPTIONS) => {
|
|
12021
|
+
const emotion2 = options.emotion || emotion;
|
|
12022
|
+
emotion2.injectGlobal(styles);
|
|
12023
|
+
};
|
|
12018
12024
|
|
|
12019
12025
|
// src/utilImports.js
|
|
12020
12026
|
__reExport(utilImports_exports, __toESM(require_cjs3(), 1));
|
|
@@ -21425,6 +21431,7 @@ var DevFocus = {
|
|
|
21425
21431
|
on: {
|
|
21426
21432
|
init: ({ context }) => {
|
|
21427
21433
|
const { components } = context;
|
|
21434
|
+
console.log(components);
|
|
21428
21435
|
if ((0, import_utils21.isObject)(components)) {
|
|
21429
21436
|
const { Content, ...rest } = components;
|
|
21430
21437
|
for (const key in rest) {
|
|
@@ -22311,6 +22318,7 @@ var createDomqlElement = (App, options) => {
|
|
|
22311
22318
|
designSystem,
|
|
22312
22319
|
snippets,
|
|
22313
22320
|
functions: options.functions,
|
|
22321
|
+
files: options.files,
|
|
22314
22322
|
utils: snippets,
|
|
22315
22323
|
define,
|
|
22316
22324
|
registry,
|
package/dist/cjs/createDomql.js
CHANGED
package/dist/cjs/utilImports.js
CHANGED
|
@@ -19,6 +19,7 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
20
|
var utilImports_exports = {};
|
|
21
21
|
__export(utilImports_exports, {
|
|
22
|
+
applyCSS: () => import_init.applyCSS,
|
|
22
23
|
init: () => import_init.init,
|
|
23
24
|
reInit: () => import_init.reInit,
|
|
24
25
|
scratchSystem: () => import_scratch.scratchSystem,
|
package/package.json
CHANGED
package/src/createDomql.js
CHANGED
package/src/utilImports.js
CHANGED
|
@@ -5,6 +5,6 @@ import { scratchUtils, scratchSystem, set } from '@symbo.ls/scratch'
|
|
|
5
5
|
export { scratchUtils, scratchSystem, set }
|
|
6
6
|
export * from '@domql/utils'
|
|
7
7
|
export * from '@symbo.ls/utils'
|
|
8
|
-
export { init, reInit } from '@symbo.ls/init'
|
|
8
|
+
export { init, reInit, applyCSS } from '@symbo.ls/init'
|
|
9
9
|
export * from '@domql/report'
|
|
10
10
|
export * from '@domql/router'
|