@symbo.ls/create 2.11.132 → 2.11.135
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 +19 -14
- package/dist/cjs/define.js +1 -0
- package/dist/cjs/index.js +6 -2
- package/package.json +2 -2
- package/src/define.js +1 -0
- package/src/index.js +7 -2
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -3719,9 +3719,9 @@ var require_extend = __commonJS({
|
|
|
3719
3719
|
if (props6 && props6.ignoreChildExtend)
|
|
3720
3720
|
return;
|
|
3721
3721
|
childExtendStack = (0, import_utils26.getExtendStack)(parent.childExtend);
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
const canExtendRecursive =
|
|
3722
|
+
const ignoreChildExtendRecursive = props6 && props6.ignoreChildExtendRecursive;
|
|
3723
|
+
if (parent.childExtendRecursive && !ignoreChildExtendRecursive) {
|
|
3724
|
+
const canExtendRecursive = element.key !== "__text";
|
|
3725
3725
|
if (canExtendRecursive) {
|
|
3726
3726
|
const childExtendRecursiveStack = (0, import_utils26.getExtendStack)(parent.childExtendRecursive);
|
|
3727
3727
|
childExtendStack = childExtendStack.concat(childExtendRecursiveStack);
|
|
@@ -4987,7 +4987,7 @@ var require_create3 = __commonJS({
|
|
|
4987
4987
|
(0, import_extend.applyExtend)(element, parent, options);
|
|
4988
4988
|
element.key = assignedKey;
|
|
4989
4989
|
if (options.onlyResolveExtends) {
|
|
4990
|
-
return
|
|
4990
|
+
return onlyResolveExtends(element, parent, options);
|
|
4991
4991
|
}
|
|
4992
4992
|
if (Object.keys(options).length) {
|
|
4993
4993
|
import_mixins.registry.defaultOptions = options;
|
|
@@ -5087,7 +5087,7 @@ var require_create3 = __commonJS({
|
|
|
5087
5087
|
ref.__path = parentRef.__path.concat(element.key);
|
|
5088
5088
|
}
|
|
5089
5089
|
};
|
|
5090
|
-
var
|
|
5090
|
+
var onlyResolveExtends = (element, parent, options) => {
|
|
5091
5091
|
const { __ref } = element;
|
|
5092
5092
|
element.tag = (0, import_node2.detectTag)(element);
|
|
5093
5093
|
if (!__ref.__exec)
|
|
@@ -5097,8 +5097,8 @@ var require_create3 = __commonJS({
|
|
|
5097
5097
|
if (!element.props)
|
|
5098
5098
|
element.props = {};
|
|
5099
5099
|
if (!element.state)
|
|
5100
|
-
element.state = {};
|
|
5101
|
-
(0, import_state3.createState)(element, parent, { skipApplyMethods: true });
|
|
5100
|
+
element.state = element.parent.state || {};
|
|
5101
|
+
(0, import_state3.createState)(element, parent, { skipApplyMethods: true, ...options });
|
|
5102
5102
|
(0, import_props.createProps)(element, parent);
|
|
5103
5103
|
(0, import_component.applyVariant)(element, parent);
|
|
5104
5104
|
(0, import_iterate.throughInitialExec)(element, options.propsExcludedFromExec);
|
|
@@ -5106,12 +5106,12 @@ var require_create3 = __commonJS({
|
|
|
5106
5106
|
const prop = element[param];
|
|
5107
5107
|
if ((0, import_utils25.isUndefined)(prop) || (0, import_methods.isMethod)(param) || (0, import_utils25.isObject)(import_mixins.registry[param]) || (0, import_component.isVariant)(param))
|
|
5108
5108
|
continue;
|
|
5109
|
-
const
|
|
5110
|
-
const
|
|
5111
|
-
const
|
|
5112
|
-
if (
|
|
5109
|
+
const hasDefine = element.define && element.define[param];
|
|
5110
|
+
const contextHasDefine = element.context && element.context.define && element.context.define[param];
|
|
5111
|
+
const optionsHasDefine = options.define && options.define[param];
|
|
5112
|
+
if (import_mixins.registry[param] && !optionsHasDefine) {
|
|
5113
5113
|
continue;
|
|
5114
|
-
else if (element[param] && !
|
|
5114
|
+
} else if (element[param] && !hasDefine && !optionsHasDefine && !contextHasDefine) {
|
|
5115
5115
|
create2((0, import_utils25.exec)(prop, element), element, param, options);
|
|
5116
5116
|
}
|
|
5117
5117
|
}
|
|
@@ -17688,6 +17688,7 @@ var Steps = {
|
|
|
17688
17688
|
// src/define.js
|
|
17689
17689
|
var defaultDefine = {
|
|
17690
17690
|
routes: (param) => param,
|
|
17691
|
+
deps: (param, el) => param || el.parent.deps,
|
|
17691
17692
|
$router: (param, el) => {
|
|
17692
17693
|
if (!param)
|
|
17693
17694
|
return;
|
|
@@ -21694,28 +21695,32 @@ var createSync = (App, options = options_default, optionsExternalFile) => {
|
|
|
21694
21695
|
const doc = options.parent || options.document || document;
|
|
21695
21696
|
const [scratchSystem2, emotion4, registry] = initEmotion(key, options);
|
|
21696
21697
|
const state = options.state || {};
|
|
21698
|
+
const pages = options.pages || {};
|
|
21697
21699
|
const components = options.components ? { ...domql_exports, ...options.components } : domql_exports;
|
|
21698
21700
|
const designSystem = scratchSystem2 || {};
|
|
21699
|
-
const snippets = { ...utilImports_exports, ...options.snippets || {} };
|
|
21701
|
+
const snippets = { ...utilImports_exports, ...import_scratch2.scratchUtils, ...options.snippets || {} };
|
|
21700
21702
|
const define2 = options.define || defaultDefine;
|
|
21701
21703
|
const extend = applySyncDebug([App], options);
|
|
21702
21704
|
const domqlApp = import_domql.default.create({
|
|
21703
21705
|
extend,
|
|
21706
|
+
//routes: options.pages,
|
|
21704
21707
|
state,
|
|
21705
21708
|
context: {
|
|
21706
21709
|
key,
|
|
21707
21710
|
components,
|
|
21708
21711
|
state,
|
|
21712
|
+
pages,
|
|
21709
21713
|
designSystem,
|
|
21710
21714
|
snippets,
|
|
21711
21715
|
utils: snippets,
|
|
21712
21716
|
define: define2,
|
|
21713
21717
|
registry,
|
|
21714
21718
|
emotion: emotion4,
|
|
21719
|
+
//routerOptions,
|
|
21715
21720
|
document: doc
|
|
21716
21721
|
}
|
|
21717
21722
|
}, doc.body, key, {
|
|
21718
|
-
//
|
|
21723
|
+
//extend: [uikit.Box],
|
|
21719
21724
|
verbose: options.verbose,
|
|
21720
21725
|
...options.domqlOptions
|
|
21721
21726
|
});
|
package/dist/cjs/define.js
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -108,28 +108,32 @@ const createSync = (App, options = import_options.default, optionsExternalFile)
|
|
|
108
108
|
const doc = options.parent || options.document || document;
|
|
109
109
|
const [scratchSystem, emotion, registry] = (0, import_initEmotion.initEmotion)(key, options);
|
|
110
110
|
const state = options.state || {};
|
|
111
|
+
const pages = options.pages || {};
|
|
111
112
|
const components = options.components ? { ...uikit, ...options.components } : uikit;
|
|
112
113
|
const designSystem = scratchSystem || {};
|
|
113
|
-
const snippets = { ...utils, ...options.snippets || {} };
|
|
114
|
+
const snippets = { ...utils, ...utils.scratchUtils, ...options.snippets || {} };
|
|
114
115
|
const define = options.define || import_define.defaultDefine;
|
|
115
116
|
const extend = (0, import_syncExtend.applySyncDebug)([App], options);
|
|
116
117
|
const domqlApp = import_domql.default.create({
|
|
117
118
|
extend,
|
|
119
|
+
//routes: options.pages,
|
|
118
120
|
state,
|
|
119
121
|
context: {
|
|
120
122
|
key,
|
|
121
123
|
components,
|
|
122
124
|
state,
|
|
125
|
+
pages,
|
|
123
126
|
designSystem,
|
|
124
127
|
snippets,
|
|
125
128
|
utils: snippets,
|
|
126
129
|
define,
|
|
127
130
|
registry,
|
|
128
131
|
emotion,
|
|
132
|
+
//routerOptions,
|
|
129
133
|
document: doc
|
|
130
134
|
}
|
|
131
135
|
}, doc.body, key, {
|
|
132
|
-
//
|
|
136
|
+
//extend: [uikit.Box],
|
|
133
137
|
verbose: options.verbose,
|
|
134
138
|
...options.domqlOptions
|
|
135
139
|
});
|
package/package.json
CHANGED
package/src/define.js
CHANGED
package/src/index.js
CHANGED
|
@@ -91,30 +91,35 @@ export const createSync = (App, options = DEFAULT_CREATE_OPTIONS, optionsExterna
|
|
|
91
91
|
const [scratchSystem, emotion, registry] = initEmotion(key, options)
|
|
92
92
|
|
|
93
93
|
const state = options.state || {}
|
|
94
|
+
const pages = options.pages || {}
|
|
94
95
|
const components = options.components ? { ...uikit, ...options.components } : uikit
|
|
95
96
|
const designSystem = scratchSystem || {}
|
|
96
|
-
const snippets = { ...utils, ...(options.snippets || {}) }
|
|
97
|
+
const snippets = { ...utils, ...utils.scratchUtils, ...(options.snippets || {}) }
|
|
97
98
|
const define = options.define || defaultDefine
|
|
98
99
|
|
|
100
|
+
//const routerOptions = initRouter(App, options) // eslint-disable-line
|
|
99
101
|
const extend = applySyncDebug([App], options)
|
|
100
102
|
|
|
101
103
|
const domqlApp = DOM.create({
|
|
102
104
|
extend,
|
|
105
|
+
//routes: options.pages,
|
|
103
106
|
state,
|
|
104
107
|
context: {
|
|
105
108
|
key,
|
|
106
109
|
components,
|
|
107
110
|
state,
|
|
111
|
+
pages,
|
|
108
112
|
designSystem,
|
|
109
113
|
snippets,
|
|
110
114
|
utils: snippets,
|
|
111
115
|
define,
|
|
112
116
|
registry,
|
|
113
117
|
emotion,
|
|
118
|
+
//routerOptions,
|
|
114
119
|
document: doc
|
|
115
120
|
}
|
|
116
121
|
}, doc.body, key, {
|
|
117
|
-
//
|
|
122
|
+
//extend: [uikit.Box],
|
|
118
123
|
verbose: options.verbose,
|
|
119
124
|
...options.domqlOptions
|
|
120
125
|
})
|