@symbo.ls/create 2.11.204 → 2.11.208
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 +1312 -525
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/initEmotion.js +4 -1
- package/dist/cjs/options.js +1 -0
- package/package.json +3 -3
- package/src/index.js +1 -1
- package/src/initEmotion.js +5 -1
- package/src/options.js +1 -0
package/dist/cjs/index.js
CHANGED
|
@@ -51,7 +51,7 @@ const mergeWithLocalFile = (options, optionsExternalFile) => {
|
|
|
51
51
|
};
|
|
52
52
|
const create = async (App, options = import_options.default, optionsExternalFile) => {
|
|
53
53
|
const appIsKey = (0, import_utils.isString)(App);
|
|
54
|
-
options = mergeWithLocalFile(options, optionsExternalFile);
|
|
54
|
+
options = (0, import_utils.deepMerge)(mergeWithLocalFile(options, optionsExternalFile), import_options.default);
|
|
55
55
|
const key = options.key || SYMBOLS_KEY || (appIsKey ? App : "");
|
|
56
56
|
if (appIsKey)
|
|
57
57
|
App = {};
|
package/dist/cjs/initEmotion.js
CHANGED
|
@@ -34,7 +34,9 @@ module.exports = __toCommonJS(initEmotion_exports);
|
|
|
34
34
|
var import_emotion = require("@domql/emotion");
|
|
35
35
|
var import_emotion2 = require("@symbo.ls/emotion");
|
|
36
36
|
var import_init = require("@symbo.ls/init");
|
|
37
|
+
var import_utils = require("@domql/utils");
|
|
37
38
|
var import_options = __toESM(require("./options"), 1);
|
|
39
|
+
var import_default_config = __toESM(require("@symbo.ls/default-config"), 1);
|
|
38
40
|
const initEmotion = (key, options = import_options.default) => {
|
|
39
41
|
const doc = options.parent || options.document || document;
|
|
40
42
|
const initOptions = options.initOptions || {};
|
|
@@ -42,7 +44,8 @@ const initEmotion = (key, options = import_options.default) => {
|
|
|
42
44
|
if (!initOptions.emotion)
|
|
43
45
|
initOptions.emotion = emotion;
|
|
44
46
|
const registry = options.registry || (0, import_emotion.transformDOMQLEmotion)(initOptions.emotion, options);
|
|
45
|
-
const
|
|
47
|
+
const designSystem = options.designSystem || (options.defaultConfig ? (0, import_utils.deepClone)(import_default_config.default) : {});
|
|
48
|
+
const scratchSystem = (0, import_init.init)(designSystem, {
|
|
46
49
|
key,
|
|
47
50
|
emotion,
|
|
48
51
|
verbose: options.verbose,
|
package/dist/cjs/options.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.208",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "a81b741e63bbb9a0b3b74773eb7a4f86b01d08f3",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
8
8
|
"dist"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"copy:package:cjs": "cp ../../build/package-cjs.json dist/cjs/package.json",
|
|
26
26
|
"build:esm": "npx esbuild ./src/*.js --target=es2020 --format=esm --outdir=dist/esm",
|
|
27
27
|
"build:cjs": "npx esbuild ./src/*.js --target=node16 --format=cjs --outdir=dist/cjs",
|
|
28
|
-
"build:cjs:bundle": "npx esbuild ./src/index.js --target=node16 --format=cjs --outdir=dist/cjs/bundle --bundle ",
|
|
28
|
+
"build:cjs:bundle": "npx esbuild ./src/index.js --target=node16 --format=cjs --outdir=dist/cjs/bundle --bundle --loader:.svg=empty",
|
|
29
29
|
"build:iife": "npx esbuild ./src/index.js --target=es2020 --format=iife --outdir=dist/iife --bundle --minify",
|
|
30
30
|
"build": "yarn build:cjs; yarn build:cjs:bundle",
|
|
31
31
|
"prepublish": "rimraf -I dist && yarn build && yarn copy:package:cjs"
|
package/src/index.js
CHANGED
|
@@ -24,7 +24,7 @@ const mergeWithLocalFile = (options, optionsExternalFile) => {
|
|
|
24
24
|
|
|
25
25
|
export const create = async (App, options = DEFAULT_CREATE_OPTIONS, optionsExternalFile) => {
|
|
26
26
|
const appIsKey = isString(App)
|
|
27
|
-
options = mergeWithLocalFile(options, optionsExternalFile)
|
|
27
|
+
options = deepMerge(mergeWithLocalFile(options, optionsExternalFile), DEFAULT_CREATE_OPTIONS)
|
|
28
28
|
|
|
29
29
|
const key = options.key || SYMBOLS_KEY || (appIsKey ? App : '')
|
|
30
30
|
|
package/src/initEmotion.js
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
import { transformDOMQLEmotion } from '@domql/emotion'
|
|
4
4
|
import { emotion as defaultEmotion } from '@symbo.ls/emotion'
|
|
5
5
|
import { init } from '@symbo.ls/init'
|
|
6
|
+
import { deepClone } from '@domql/utils'
|
|
6
7
|
|
|
7
8
|
import DEFAULT_CREATE_OPTIONS from './options'
|
|
9
|
+
import DEFAULT_CONFIG from '@symbo.ls/default-config'
|
|
8
10
|
|
|
9
11
|
export const initEmotion = (key, options = DEFAULT_CREATE_OPTIONS) => {
|
|
10
12
|
const doc = options.parent || options.document || document
|
|
@@ -13,7 +15,9 @@ export const initEmotion = (key, options = DEFAULT_CREATE_OPTIONS) => {
|
|
|
13
15
|
if (!initOptions.emotion) initOptions.emotion = emotion
|
|
14
16
|
const registry = options.registry || transformDOMQLEmotion(initOptions.emotion, options)
|
|
15
17
|
|
|
16
|
-
const
|
|
18
|
+
const designSystem = options.designSystem || (options.defaultConfig ? deepClone(DEFAULT_CONFIG) : {})
|
|
19
|
+
|
|
20
|
+
const scratchSystem = init(designSystem, {
|
|
17
21
|
key,
|
|
18
22
|
emotion,
|
|
19
23
|
verbose: options.verbose,
|