@plurid/plurid-engine 0.0.0-10 → 0.0.0-11
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/distribution/index.es.js
CHANGED
|
@@ -4,14 +4,6 @@ import { objects, uuid, mathematics } from "@plurid/plurid-functions";
|
|
|
4
4
|
|
|
5
5
|
import themes, { THEME_NAMES } from "@plurid/plurid-themes";
|
|
6
6
|
|
|
7
|
-
const specifiedOrDefault = (path, type, configuration) => {
|
|
8
|
-
const item = objects.getNested(configuration, path);
|
|
9
|
-
if (typeof item === type) {
|
|
10
|
-
return item;
|
|
11
|
-
}
|
|
12
|
-
return objects.getNested(defaultConfiguration, path);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
7
|
const resolveTheme = (theme, type) => {
|
|
16
8
|
if (!theme) {
|
|
17
9
|
return "plurid";
|
|
@@ -38,6 +30,13 @@ const merge = (configuration, target) => {
|
|
|
38
30
|
if (!configuration) {
|
|
39
31
|
return Object.assign({}, targetConfiguration);
|
|
40
32
|
}
|
|
33
|
+
const specifiedOrDefault = (path, type, configuration) => {
|
|
34
|
+
const item = objects.getNested(configuration, path);
|
|
35
|
+
if (typeof item === type) {
|
|
36
|
+
return item;
|
|
37
|
+
}
|
|
38
|
+
return objects.getNested(targetConfiguration, path);
|
|
39
|
+
};
|
|
41
40
|
const layout = configuration && configuration.space && typeof configuration.space.layout === "object" ? configuration.space.layout : targetConfiguration.space.layout;
|
|
42
41
|
const mergedConfiguration = Object.assign(Object.assign({}, targetConfiguration), {
|
|
43
42
|
global: {
|