@symbo.ls/create 2.11.451 → 2.11.452
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 +20 -14
- package/dist/cjs/utilImports.js +1 -1
- package/package.json +4 -4
- package/src/utilImports.js +1 -1
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -11404,21 +11404,21 @@ var require_create3 = __commonJS({
|
|
|
11404
11404
|
var import_ignore = require_ignore2();
|
|
11405
11405
|
var import_inherit = require_inherit2();
|
|
11406
11406
|
var createPropsStack = (element, parent) => {
|
|
11407
|
-
const { props: props2, __ref } = element;
|
|
11408
|
-
const propsStack =
|
|
11407
|
+
const { props: props2, __ref: ref } = element;
|
|
11408
|
+
const propsStack = ref.__props = (0, import_inherit.inheritParentProps)(element, parent);
|
|
11409
11409
|
if ((0, import_utils32.isObject)(props2))
|
|
11410
11410
|
propsStack.push(props2);
|
|
11411
11411
|
else if (props2 === "inherit" && parent.props)
|
|
11412
11412
|
propsStack.push(parent.props);
|
|
11413
11413
|
else if (props2)
|
|
11414
11414
|
propsStack.push(props2);
|
|
11415
|
-
if ((0, import_utils32.isArray)(
|
|
11416
|
-
|
|
11415
|
+
if ((0, import_utils32.isArray)(ref.__extend)) {
|
|
11416
|
+
ref.__extend.forEach((extend) => {
|
|
11417
11417
|
if (extend.props && extend.props !== props2)
|
|
11418
11418
|
propsStack.push(extend.props);
|
|
11419
11419
|
});
|
|
11420
11420
|
}
|
|
11421
|
-
|
|
11421
|
+
ref.__props = propsStack;
|
|
11422
11422
|
return propsStack;
|
|
11423
11423
|
};
|
|
11424
11424
|
var syncProps = (props2, element) => {
|
|
@@ -13077,6 +13077,7 @@ var require_methods2 = __commonJS({
|
|
|
13077
13077
|
const obj = {};
|
|
13078
13078
|
const keyList = keys.call(element);
|
|
13079
13079
|
keyList.forEach((v) => {
|
|
13080
|
+
var _a;
|
|
13080
13081
|
if (excl.includes(v))
|
|
13081
13082
|
return;
|
|
13082
13083
|
const val = element[v];
|
|
@@ -13092,7 +13093,7 @@ var require_methods2 = __commonJS({
|
|
|
13092
13093
|
} else if (v === "props") {
|
|
13093
13094
|
const { __element, update, ...props2 } = element[v];
|
|
13094
13095
|
obj[v] = props2;
|
|
13095
|
-
} else if ((0, import_utils32.isDefined)(val))
|
|
13096
|
+
} else if ((0, import_utils32.isDefined)(val) && !((_a = element.context) == null ? void 0 : _a.methods[v]))
|
|
13096
13097
|
obj[v] = val;
|
|
13097
13098
|
});
|
|
13098
13099
|
return obj;
|
|
@@ -15923,7 +15924,7 @@ var utilImports_exports = {};
|
|
|
15923
15924
|
__export(utilImports_exports, {
|
|
15924
15925
|
applyCSS: () => applyCSS,
|
|
15925
15926
|
init: () => init,
|
|
15926
|
-
|
|
15927
|
+
reinit: () => reinit,
|
|
15927
15928
|
scratchSystem: () => import_scratch2.scratchSystem,
|
|
15928
15929
|
scratchUtils: () => import_scratch2.scratchUtils,
|
|
15929
15930
|
set: () => import_scratch2.set
|
|
@@ -17110,8 +17111,8 @@ var dynamic_default = {};
|
|
|
17110
17111
|
|
|
17111
17112
|
// ../init/index.js
|
|
17112
17113
|
var CONFIG = (0, import_scratch.getActiveConfig)();
|
|
17113
|
-
var mergeWithLocalFile = (config = CONFIG,
|
|
17114
|
-
const rcfile = (0, import_utils2.isObject)(
|
|
17114
|
+
var mergeWithLocalFile = (config = CONFIG, options) => {
|
|
17115
|
+
const rcfile = (0, import_utils2.isObject)(options.localFile) ? options.localFile : dynamic_default || {};
|
|
17115
17116
|
const clonedFile = (0, import_utils2.deepClone)(rcfile.designSystem || {});
|
|
17116
17117
|
return (0, import_utils2.deepMerge)(config, clonedFile);
|
|
17117
17118
|
};
|
|
@@ -17126,7 +17127,7 @@ var SET_OPTIONS = {
|
|
|
17126
17127
|
};
|
|
17127
17128
|
var init = (config, options = SET_OPTIONS) => {
|
|
17128
17129
|
const emotion2 = options.emotion || emotion;
|
|
17129
|
-
const resultConfig = mergeWithLocalFile(config || {});
|
|
17130
|
+
const resultConfig = mergeWithLocalFile(config || {}, options);
|
|
17130
17131
|
const conf = (0, import_scratch.set)({
|
|
17131
17132
|
verbose: options.verbose,
|
|
17132
17133
|
useReset: options.useReset,
|
|
@@ -17165,15 +17166,20 @@ var init = (config, options = SET_OPTIONS) => {
|
|
|
17165
17166
|
var UPDATE_OPTIONS = {
|
|
17166
17167
|
emotion
|
|
17167
17168
|
};
|
|
17168
|
-
var
|
|
17169
|
+
var reinit = (config, options = UPDATE_OPTIONS) => {
|
|
17169
17170
|
const emotion2 = options.emotion || emotion;
|
|
17170
|
-
const resultConfig = mergeWithLocalFile(config || {},
|
|
17171
|
+
const resultConfig = mergeWithLocalFile(config || {}, options);
|
|
17172
|
+
const prevStyles = document.querySelector('[data-emotion="smbls"]');
|
|
17173
|
+
console.log(prevStyles);
|
|
17171
17174
|
const conf = (0, import_scratch.set)({
|
|
17172
17175
|
verbose: false,
|
|
17173
17176
|
...resultConfig
|
|
17174
17177
|
});
|
|
17175
|
-
|
|
17176
|
-
|
|
17178
|
+
if (!options.preventInject) {
|
|
17179
|
+
emotion2.injectGlobal({ ":root": conf.CSS_VARS });
|
|
17180
|
+
emotion2.injectGlobal(conf.RESET);
|
|
17181
|
+
}
|
|
17182
|
+
return conf;
|
|
17177
17183
|
};
|
|
17178
17184
|
var applyCSS = (styles, options = UPDATE_OPTIONS) => {
|
|
17179
17185
|
const emotion2 = options.emotion || emotion;
|
package/dist/cjs/utilImports.js
CHANGED
|
@@ -21,7 +21,7 @@ var utilImports_exports = {};
|
|
|
21
21
|
__export(utilImports_exports, {
|
|
22
22
|
applyCSS: () => import_init.applyCSS,
|
|
23
23
|
init: () => import_init.init,
|
|
24
|
-
|
|
24
|
+
reinit: () => import_init.reinit,
|
|
25
25
|
scratchSystem: () => import_scratch.scratchSystem,
|
|
26
26
|
scratchUtils: () => import_scratch.scratchUtils,
|
|
27
27
|
set: () => import_scratch.set
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.452",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "65799b9b9cb6d7e6e5e3f0cfc0b1140ccc506b2b",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
8
8
|
"dist"
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"@domql/report": "^2.5.0",
|
|
36
36
|
"@domql/router": "^2.5.0",
|
|
37
37
|
"@symbo.ls/fetch": "^2.11.450",
|
|
38
|
-
"@symbo.ls/init": "^2.11.
|
|
38
|
+
"@symbo.ls/init": "^2.11.452",
|
|
39
39
|
"@symbo.ls/scratch": "^2.11.450",
|
|
40
|
-
"@symbo.ls/sync": "^2.11.
|
|
40
|
+
"@symbo.ls/sync": "^2.11.452",
|
|
41
41
|
"@symbo.ls/uikit": "^2.11.451",
|
|
42
42
|
"@symbo.ls/utils": "^2.11.446",
|
|
43
43
|
"domql": "^2.5.0"
|
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,
|
|
8
|
+
export { init, reinit, applyCSS } from '@symbo.ls/init'
|
|
9
9
|
export * from '@domql/report'
|
|
10
10
|
export * from '@domql/router'
|