smbls 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/index.js +23 -17
- package/package.json +7 -6
package/dist/cjs/index.js
CHANGED
|
@@ -9777,11 +9777,11 @@ __export(init_exports, {
|
|
|
9777
9777
|
DYNAMIC_JSON: () => import_dynamic.default,
|
|
9778
9778
|
applyCSS: () => applyCSS,
|
|
9779
9779
|
init: () => init,
|
|
9780
|
-
|
|
9780
|
+
reinit: () => reinit,
|
|
9781
9781
|
setClass: () => setClass,
|
|
9782
9782
|
updateVars: () => updateVars
|
|
9783
9783
|
});
|
|
9784
|
-
var import_scratch, import_utils2, import_dynamic, CONFIG, mergeWithLocalFile, SET_OPTIONS, init, UPDATE_OPTIONS,
|
|
9784
|
+
var import_scratch, import_utils2, import_dynamic, CONFIG, mergeWithLocalFile, SET_OPTIONS, init, UPDATE_OPTIONS, reinit, applyCSS, updateVars, setClass;
|
|
9785
9785
|
var init_init = __esm({
|
|
9786
9786
|
"../init/index.js"() {
|
|
9787
9787
|
"use strict";
|
|
@@ -9790,8 +9790,8 @@ var init_init = __esm({
|
|
|
9790
9790
|
init_emotion();
|
|
9791
9791
|
import_dynamic = __toESM(require_dynamic());
|
|
9792
9792
|
CONFIG = (0, import_scratch.getActiveConfig)();
|
|
9793
|
-
mergeWithLocalFile = (config = CONFIG,
|
|
9794
|
-
const rcfile = (0, import_utils2.isObject)(
|
|
9793
|
+
mergeWithLocalFile = (config = CONFIG, options) => {
|
|
9794
|
+
const rcfile = (0, import_utils2.isObject)(options.localFile) ? options.localFile : import_dynamic.default || {};
|
|
9795
9795
|
const clonedFile = (0, import_utils2.deepClone)(rcfile.designSystem || {});
|
|
9796
9796
|
return (0, import_utils2.deepMerge)(config, clonedFile);
|
|
9797
9797
|
};
|
|
@@ -9806,7 +9806,7 @@ var init_init = __esm({
|
|
|
9806
9806
|
};
|
|
9807
9807
|
init = (config, options = SET_OPTIONS) => {
|
|
9808
9808
|
const emotion2 = options.emotion || emotion;
|
|
9809
|
-
const resultConfig = mergeWithLocalFile(config || {});
|
|
9809
|
+
const resultConfig = mergeWithLocalFile(config || {}, options);
|
|
9810
9810
|
const conf = (0, import_scratch.set)({
|
|
9811
9811
|
verbose: options.verbose,
|
|
9812
9812
|
useReset: options.useReset,
|
|
@@ -9845,15 +9845,20 @@ var init_init = __esm({
|
|
|
9845
9845
|
UPDATE_OPTIONS = {
|
|
9846
9846
|
emotion
|
|
9847
9847
|
};
|
|
9848
|
-
|
|
9848
|
+
reinit = (config, options = UPDATE_OPTIONS) => {
|
|
9849
9849
|
const emotion2 = options.emotion || emotion;
|
|
9850
|
-
const resultConfig = mergeWithLocalFile(config || {},
|
|
9850
|
+
const resultConfig = mergeWithLocalFile(config || {}, options);
|
|
9851
|
+
const prevStyles = document.querySelector('[data-emotion="smbls"]');
|
|
9852
|
+
console.log(prevStyles);
|
|
9851
9853
|
const conf = (0, import_scratch.set)({
|
|
9852
9854
|
verbose: false,
|
|
9853
9855
|
...resultConfig
|
|
9854
9856
|
});
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
+
if (!options.preventInject) {
|
|
9858
|
+
emotion2.injectGlobal({ ":root": conf.CSS_VARS });
|
|
9859
|
+
emotion2.injectGlobal(conf.RESET);
|
|
9860
|
+
}
|
|
9861
|
+
return conf;
|
|
9857
9862
|
};
|
|
9858
9863
|
applyCSS = (styles, options = UPDATE_OPTIONS) => {
|
|
9859
9864
|
const emotion2 = options.emotion || emotion;
|
|
@@ -18694,7 +18699,7 @@ var require_utilImports = __commonJS({
|
|
|
18694
18699
|
__export2(utilImports_exports, {
|
|
18695
18700
|
applyCSS: () => import_init2.applyCSS,
|
|
18696
18701
|
init: () => import_init2.init,
|
|
18697
|
-
|
|
18702
|
+
reinit: () => import_init2.reinit,
|
|
18698
18703
|
scratchSystem: () => import_scratch12.scratchSystem,
|
|
18699
18704
|
scratchUtils: () => import_scratch12.scratchUtils,
|
|
18700
18705
|
set: () => import_scratch12.set
|
|
@@ -19470,21 +19475,21 @@ var require_create3 = __commonJS({
|
|
|
19470
19475
|
var import_ignore = require_ignore2();
|
|
19471
19476
|
var import_inherit = require_inherit2();
|
|
19472
19477
|
var createPropsStack = (element, parent) => {
|
|
19473
|
-
const { props: props2, __ref } = element;
|
|
19474
|
-
const propsStack =
|
|
19478
|
+
const { props: props2, __ref: ref } = element;
|
|
19479
|
+
const propsStack = ref.__props = (0, import_inherit.inheritParentProps)(element, parent);
|
|
19475
19480
|
if ((0, import_utils25.isObject)(props2))
|
|
19476
19481
|
propsStack.push(props2);
|
|
19477
19482
|
else if (props2 === "inherit" && parent.props)
|
|
19478
19483
|
propsStack.push(parent.props);
|
|
19479
19484
|
else if (props2)
|
|
19480
19485
|
propsStack.push(props2);
|
|
19481
|
-
if ((0, import_utils25.isArray)(
|
|
19482
|
-
|
|
19486
|
+
if ((0, import_utils25.isArray)(ref.__extend)) {
|
|
19487
|
+
ref.__extend.forEach((extend) => {
|
|
19483
19488
|
if (extend.props && extend.props !== props2)
|
|
19484
19489
|
propsStack.push(extend.props);
|
|
19485
19490
|
});
|
|
19486
19491
|
}
|
|
19487
|
-
|
|
19492
|
+
ref.__props = propsStack;
|
|
19488
19493
|
return propsStack;
|
|
19489
19494
|
};
|
|
19490
19495
|
var syncProps = (props2, element) => {
|
|
@@ -21143,6 +21148,7 @@ var require_methods2 = __commonJS({
|
|
|
21143
21148
|
const obj = {};
|
|
21144
21149
|
const keyList = keys.call(element);
|
|
21145
21150
|
keyList.forEach((v) => {
|
|
21151
|
+
var _a;
|
|
21146
21152
|
if (excl.includes(v))
|
|
21147
21153
|
return;
|
|
21148
21154
|
const val = element[v];
|
|
@@ -21158,7 +21164,7 @@ var require_methods2 = __commonJS({
|
|
|
21158
21164
|
} else if (v === "props") {
|
|
21159
21165
|
const { __element, update, ...props2 } = element[v];
|
|
21160
21166
|
obj[v] = props2;
|
|
21161
|
-
} else if ((0, import_utils25.isDefined)(val))
|
|
21167
|
+
} else if ((0, import_utils25.isDefined)(val) && !((_a = element.context) == null ? void 0 : _a.methods[v]))
|
|
21162
21168
|
obj[v] = val;
|
|
21163
21169
|
});
|
|
21164
21170
|
return obj;
|
|
@@ -30060,7 +30066,7 @@ __export(smbls_exports, {
|
|
|
30060
30066
|
getSystemGlobalTheme: () => getSystemGlobalTheme,
|
|
30061
30067
|
init: () => init,
|
|
30062
30068
|
keySetters: () => keySetters,
|
|
30063
|
-
|
|
30069
|
+
reinit: () => reinit,
|
|
30064
30070
|
setClass: () => setClass,
|
|
30065
30071
|
updateVars: () => updateVars
|
|
30066
30072
|
});
|
package/package.json
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smbls",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.452",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "https://github.com/symbo-ls/smbls",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "65799b9b9cb6d7e6e5e3f0cfc0b1140ccc506b2b",
|
|
7
7
|
"source": "index.js",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"module": "index.js",
|
|
10
10
|
"files": [
|
|
11
11
|
"index.js",
|
|
12
|
+
"package.json",
|
|
12
13
|
"dist"
|
|
13
14
|
],
|
|
14
15
|
"dependencies": {
|
|
15
|
-
"@symbo.ls/cli": "^2.11.
|
|
16
|
-
"@symbo.ls/create": "^2.11.
|
|
16
|
+
"@symbo.ls/cli": "^2.11.452",
|
|
17
|
+
"@symbo.ls/create": "^2.11.452",
|
|
17
18
|
"@symbo.ls/default-config": "^2.11.446",
|
|
18
|
-
"@symbo.ls/init": "^2.11.
|
|
19
|
+
"@symbo.ls/init": "^2.11.452",
|
|
19
20
|
"@symbo.ls/scratch": "^2.11.450",
|
|
20
|
-
"@symbo.ls/sync": "^2.11.
|
|
21
|
+
"@symbo.ls/sync": "^2.11.452",
|
|
21
22
|
"@symbo.ls/uikit": "^2.11.451",
|
|
22
23
|
"@symbo.ls/utils": "^2.11.446",
|
|
23
24
|
"attrs-in-props": "^2.11.446",
|