@symbo.ls/create 2.11.310 → 2.11.315
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 +4065 -2498
- package/dist/cjs/ferchOnCreate.js +10 -10
- package/dist/cjs/initEmotion.js +1 -1
- package/package.json +2 -2
- package/src/ferchOnCreate.js +9 -8
- package/src/initEmotion.js +1 -1
|
@@ -37,16 +37,16 @@ const fetchSync = async (key, options) => {
|
|
|
37
37
|
const fetchAsync = (app, key, options, callback) => {
|
|
38
38
|
if (key && options.editor) {
|
|
39
39
|
try {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
if (options.editor.async) {
|
|
41
|
+
(0, import_fetch.fetchProjectAsync)(key, options, callback || ((data) => {
|
|
42
|
+
if ((0, import_utils.isObject)(data.designsystem)) {
|
|
43
|
+
options.utils.init(data.designsystem);
|
|
44
|
+
}
|
|
45
|
+
if ((0, import_utils.isObject)(data.state)) {
|
|
46
|
+
app.state.set(data.state);
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
50
|
} catch (e) {
|
|
51
51
|
console.error(e);
|
|
52
52
|
}
|
package/dist/cjs/initEmotion.js
CHANGED
|
@@ -45,7 +45,7 @@ const initEmotion = (key, options = {}) => {
|
|
|
45
45
|
initOptions.emotion = import_emotion2.emotion;
|
|
46
46
|
const registry = options.registry || (0, import_emotion.transformDOMQLEmotion)(initOptions.emotion, options);
|
|
47
47
|
const defaultDesignSystem = (0, import_utils.deepClone)(import_default_config.default);
|
|
48
|
-
const designSystem =
|
|
48
|
+
const designSystem = options.useDefaultConfig ? (0, import_utils.deepMerge)(options.designSystem, defaultDesignSystem) : options.designSystem || defaultDesignSystem;
|
|
49
49
|
const scratchSystem = (0, import_init.init)(designSystem, {
|
|
50
50
|
key,
|
|
51
51
|
emotion,
|
package/package.json
CHANGED
package/src/ferchOnCreate.js
CHANGED
|
@@ -16,15 +16,16 @@ export const fetchSync = async (key, options) => {
|
|
|
16
16
|
export const fetchAsync = (app, key, options, callback) => {
|
|
17
17
|
if (key && options.editor) {
|
|
18
18
|
try {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
if (options.editor.async) {
|
|
20
|
+
fetchProjectAsync(key, options, callback || ((data) => {
|
|
21
|
+
if (isObject(data.designsystem)) {
|
|
22
|
+
options.utils.init(data.designsystem)
|
|
23
|
+
}
|
|
24
|
+
if (isObject(data.state)) {
|
|
25
|
+
app.state.set(data.state)
|
|
26
|
+
}
|
|
27
|
+
}))
|
|
26
28
|
}
|
|
27
|
-
if (options.editor.async) fetchProjectAsync(key, options, callback || defaultCallback)
|
|
28
29
|
} catch (e) {
|
|
29
30
|
console.error(e)
|
|
30
31
|
}
|
package/src/initEmotion.js
CHANGED
|
@@ -17,7 +17,7 @@ export const initEmotion = (key, options = {}) => {
|
|
|
17
17
|
|
|
18
18
|
const registry = options.registry || transformDOMQLEmotion(initOptions.emotion, options)
|
|
19
19
|
const defaultDesignSystem = deepClone(DEFAULT_CONFIG)
|
|
20
|
-
const designSystem =
|
|
20
|
+
const designSystem = options.useDefaultConfig ? deepMerge(options.designSystem, defaultDesignSystem) : options.designSystem || defaultDesignSystem
|
|
21
21
|
|
|
22
22
|
const scratchSystem = init(designSystem, {
|
|
23
23
|
key,
|