@symbo.ls/create 2.11.135 → 2.11.138
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 +477 -94
- package/dist/cjs/index.js +16 -6
- package/package.json +2 -2
- package/src/index.js +14 -7
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -1707,14 +1707,14 @@ var require_classList = __commonJS({
|
|
|
1707
1707
|
var classList_exports = {};
|
|
1708
1708
|
__export2(classList_exports, {
|
|
1709
1709
|
applyClassListOnNode: () => applyClassListOnNode2,
|
|
1710
|
-
|
|
1710
|
+
assignKeyAsClassname: () => assignKeyAsClassname,
|
|
1711
1711
|
classList: () => classList2,
|
|
1712
1712
|
classify: () => classify2,
|
|
1713
1713
|
default: () => classList_default
|
|
1714
1714
|
});
|
|
1715
1715
|
module2.exports = __toCommonJS2(classList_exports);
|
|
1716
1716
|
var import_utils25 = require_cjs();
|
|
1717
|
-
var
|
|
1717
|
+
var assignKeyAsClassname = (element) => {
|
|
1718
1718
|
const { key } = element;
|
|
1719
1719
|
if (element.class === true)
|
|
1720
1720
|
element.class = key;
|
|
@@ -1829,7 +1829,7 @@ var require_set = __commonJS({
|
|
|
1829
1829
|
});
|
|
1830
1830
|
module2.exports = __toCommonJS2(set_exports);
|
|
1831
1831
|
var import_utils25 = require_cjs();
|
|
1832
|
-
var import_create = __toESM2(
|
|
1832
|
+
var import_create = __toESM2(require_create4(), 1);
|
|
1833
1833
|
var import_options3 = __toESM2(require_options(), 1);
|
|
1834
1834
|
var import_mixins = require_mixins();
|
|
1835
1835
|
var import_content = require_content();
|
|
@@ -2572,9 +2572,9 @@ var require_updateState = __commonJS({
|
|
|
2572
2572
|
}
|
|
2573
2573
|
});
|
|
2574
2574
|
|
|
2575
|
-
// ../../node_modules/@domql/state/dist/cjs/
|
|
2576
|
-
var
|
|
2577
|
-
"../../node_modules/@domql/state/dist/cjs/
|
|
2575
|
+
// ../../node_modules/@domql/state/dist/cjs/create.js
|
|
2576
|
+
var require_create2 = __commonJS({
|
|
2577
|
+
"../../node_modules/@domql/state/dist/cjs/create.js"(exports, module2) {
|
|
2578
2578
|
"use strict";
|
|
2579
2579
|
var __defProp2 = Object.defineProperty;
|
|
2580
2580
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -2593,11 +2593,12 @@ var require_createState = __commonJS({
|
|
|
2593
2593
|
return to;
|
|
2594
2594
|
};
|
|
2595
2595
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
2596
|
-
var
|
|
2597
|
-
__export2(
|
|
2596
|
+
var create_exports = {};
|
|
2597
|
+
__export2(create_exports, {
|
|
2598
|
+
applyInitialState: () => applyInitialState,
|
|
2598
2599
|
createState: () => createState
|
|
2599
2600
|
});
|
|
2600
|
-
module2.exports = __toCommonJS2(
|
|
2601
|
+
module2.exports = __toCommonJS2(create_exports);
|
|
2601
2602
|
var import_event = require_cjs3();
|
|
2602
2603
|
var import_utils25 = require_cjs();
|
|
2603
2604
|
var import_ignore = require_ignore();
|
|
@@ -2605,7 +2606,9 @@ var require_createState = __commonJS({
|
|
|
2605
2606
|
var import_updateState = require_updateState();
|
|
2606
2607
|
var import_inherit = require_inherit();
|
|
2607
2608
|
var createState = function(element, parent, options) {
|
|
2608
|
-
|
|
2609
|
+
element.state = applyInitialState(element, parent, options);
|
|
2610
|
+
};
|
|
2611
|
+
var applyInitialState = function(element, parent, options) {
|
|
2609
2612
|
const objectizeState = checkForTypes(element);
|
|
2610
2613
|
if (objectizeState === false)
|
|
2611
2614
|
return parent.state || {};
|
|
@@ -2621,14 +2624,6 @@ var require_createState = __commonJS({
|
|
|
2621
2624
|
const dependentState = applyDependentState(element, element.state);
|
|
2622
2625
|
if (dependentState)
|
|
2623
2626
|
element.state = dependentState;
|
|
2624
|
-
if (skipApplyMethods) {
|
|
2625
|
-
if (element.parent && element.parent.state) {
|
|
2626
|
-
element.state.parent = element.parent.state;
|
|
2627
|
-
} else {
|
|
2628
|
-
element.state.parent = {};
|
|
2629
|
-
}
|
|
2630
|
-
return element.state;
|
|
2631
|
-
}
|
|
2632
2627
|
applyMethods(element);
|
|
2633
2628
|
(0, import_event.triggerEventOn)("stateCreated", element);
|
|
2634
2629
|
return element.state;
|
|
@@ -2701,7 +2696,7 @@ var require_createState = __commonJS({
|
|
|
2701
2696
|
} else {
|
|
2702
2697
|
Object.setPrototypeOf(state, proto);
|
|
2703
2698
|
}
|
|
2704
|
-
if (state.parent)
|
|
2699
|
+
if (state.parent && state.parent.__children)
|
|
2705
2700
|
state.parent.__children[element.key] = state;
|
|
2706
2701
|
};
|
|
2707
2702
|
}
|
|
@@ -2728,7 +2723,7 @@ var require_cjs5 = __commonJS({
|
|
|
2728
2723
|
var state_exports = {};
|
|
2729
2724
|
module2.exports = __toCommonJS2(state_exports);
|
|
2730
2725
|
__reExport2(state_exports, require_ignore(), module2.exports);
|
|
2731
|
-
__reExport2(state_exports,
|
|
2726
|
+
__reExport2(state_exports, require_create2(), module2.exports);
|
|
2732
2727
|
__reExport2(state_exports, require_updateState(), module2.exports);
|
|
2733
2728
|
__reExport2(state_exports, require_methods(), module2.exports);
|
|
2734
2729
|
__reExport2(state_exports, require_inherit(), module2.exports);
|
|
@@ -3215,7 +3210,7 @@ var require_inherit2 = __commonJS({
|
|
|
3215
3210
|
});
|
|
3216
3211
|
|
|
3217
3212
|
// ../../node_modules/@domql/element/dist/cjs/props/create.js
|
|
3218
|
-
var
|
|
3213
|
+
var require_create3 = __commonJS({
|
|
3219
3214
|
"../../node_modules/@domql/element/dist/cjs/props/create.js"(exports, module2) {
|
|
3220
3215
|
"use strict";
|
|
3221
3216
|
var __defProp2 = Object.defineProperty;
|
|
@@ -3282,9 +3277,11 @@ var require_create2 = __commonJS({
|
|
|
3282
3277
|
};
|
|
3283
3278
|
var createProps = function(element, parent, cached) {
|
|
3284
3279
|
const propsStack = cached || createPropsStack(element, parent);
|
|
3285
|
-
const { __ref } = element;
|
|
3280
|
+
const { __ref: ref } = element;
|
|
3281
|
+
if (!ref.__if)
|
|
3282
|
+
return;
|
|
3286
3283
|
if (propsStack.length) {
|
|
3287
|
-
|
|
3284
|
+
ref.__props = propsStack;
|
|
3288
3285
|
syncProps(propsStack, element);
|
|
3289
3286
|
element.props.update = update;
|
|
3290
3287
|
}
|
|
@@ -3323,7 +3320,7 @@ var require_update = __commonJS({
|
|
|
3323
3320
|
updateProps: () => updateProps
|
|
3324
3321
|
});
|
|
3325
3322
|
module2.exports = __toCommonJS2(update_exports);
|
|
3326
|
-
var import_create =
|
|
3323
|
+
var import_create = require_create3();
|
|
3327
3324
|
var import_inherit = require_inherit2();
|
|
3328
3325
|
var updateProps = (newProps, element, parent) => {
|
|
3329
3326
|
const { __ref } = element;
|
|
@@ -3361,7 +3358,7 @@ var require_props = __commonJS({
|
|
|
3361
3358
|
var props_exports = {};
|
|
3362
3359
|
module2.exports = __toCommonJS2(props_exports);
|
|
3363
3360
|
__reExport2(props_exports, require_ignore2(), module2.exports);
|
|
3364
|
-
__reExport2(props_exports,
|
|
3361
|
+
__reExport2(props_exports, require_create3(), module2.exports);
|
|
3365
3362
|
__reExport2(props_exports, require_inherit2(), module2.exports);
|
|
3366
3363
|
__reExport2(props_exports, require_update(), module2.exports);
|
|
3367
3364
|
}
|
|
@@ -3840,6 +3837,8 @@ var require_component = __commonJS({
|
|
|
3840
3837
|
};
|
|
3841
3838
|
var applyComponentFromContext = (element, parent, options) => {
|
|
3842
3839
|
const { context } = element;
|
|
3840
|
+
if (!context || !context.components)
|
|
3841
|
+
return;
|
|
3843
3842
|
const { components } = context;
|
|
3844
3843
|
const { extend } = element;
|
|
3845
3844
|
const execExtend = (0, import_utils25.exec)(extend, element);
|
|
@@ -4067,13 +4066,15 @@ var require_applyParam = __commonJS({
|
|
|
4067
4066
|
var import_utils25 = require_cjs();
|
|
4068
4067
|
var import_mixins = require_mixins();
|
|
4069
4068
|
var applyParam = (param, element, options) => {
|
|
4070
|
-
const { node: node2, context } = element;
|
|
4069
|
+
const { node: node2, context, __ref: ref } = element;
|
|
4071
4070
|
const prop = element[param];
|
|
4072
4071
|
const DOMQLProperty = import_mixins.registry[param];
|
|
4073
4072
|
const DOMQLPropertyFromContext = context && context.registry && context.registry[param];
|
|
4074
4073
|
const isGlobalTransformer = DOMQLPropertyFromContext || DOMQLProperty;
|
|
4075
4074
|
const hasDefine = element.define && element.define[param];
|
|
4076
4075
|
const hasContextDefine = context && context.define && context.define[param];
|
|
4076
|
+
if (!ref.__if)
|
|
4077
|
+
return;
|
|
4077
4078
|
if (isGlobalTransformer && !hasContextDefine) {
|
|
4078
4079
|
if ((0, import_utils25.isFunction)(isGlobalTransformer)) {
|
|
4079
4080
|
isGlobalTransformer(prop, element, node2, options);
|
|
@@ -4126,7 +4127,7 @@ var require_node2 = __commonJS({
|
|
|
4126
4127
|
var import_event = require_cjs3();
|
|
4127
4128
|
var import_render = require_cjs4();
|
|
4128
4129
|
var import_methods = require_methods2();
|
|
4129
|
-
var import_create = __toESM2(
|
|
4130
|
+
var import_create = __toESM2(require_create4(), 1);
|
|
4130
4131
|
var import_iterate = require_iterate();
|
|
4131
4132
|
var import_mixins = require_mixins();
|
|
4132
4133
|
var import_applyParam = require_applyParam();
|
|
@@ -4150,8 +4151,6 @@ var require_node2 = __commonJS({
|
|
|
4150
4151
|
if ((0, import_utils25.isFunction)(node2.setAttribute))
|
|
4151
4152
|
node2.setAttribute("key", element.key);
|
|
4152
4153
|
}
|
|
4153
|
-
if (!ref.__if)
|
|
4154
|
-
return element;
|
|
4155
4154
|
if (element.tag !== "string" || element.tag !== "fragment") {
|
|
4156
4155
|
(0, import_iterate.throughInitialDefine)(element);
|
|
4157
4156
|
(0, import_iterate.throughInitialExec)(element);
|
|
@@ -4631,7 +4630,7 @@ var require_update2 = __commonJS({
|
|
|
4631
4630
|
var import_props = require_props();
|
|
4632
4631
|
var import_state3 = require_cjs5();
|
|
4633
4632
|
var import_utils26 = require_utils();
|
|
4634
|
-
var import_create = __toESM2(
|
|
4633
|
+
var import_create = __toESM2(require_create4(), 1);
|
|
4635
4634
|
var import_iterate = require_iterate();
|
|
4636
4635
|
var import_mixins = require_mixins();
|
|
4637
4636
|
var import_applyParam = require_applyParam();
|
|
@@ -4883,7 +4882,7 @@ var require_set2 = __commonJS({
|
|
|
4883
4882
|
});
|
|
4884
4883
|
|
|
4885
4884
|
// ../../node_modules/@domql/element/dist/cjs/create.js
|
|
4886
|
-
var
|
|
4885
|
+
var require_create4 = __commonJS({
|
|
4887
4886
|
"../../node_modules/@domql/element/dist/cjs/create.js"(exports, module2) {
|
|
4888
4887
|
"use strict";
|
|
4889
4888
|
var __create2 = Object.create;
|
|
@@ -4919,7 +4918,6 @@ var require_create3 = __commonJS({
|
|
|
4919
4918
|
});
|
|
4920
4919
|
module2.exports = __toCommonJS2(create_exports);
|
|
4921
4920
|
var import_node = __toESM2(require_node2(), 1);
|
|
4922
|
-
var import_utils25 = require_cjs();
|
|
4923
4921
|
var import_tree = require_tree();
|
|
4924
4922
|
var import_registry = require_cjs6();
|
|
4925
4923
|
var import_event = require_cjs3();
|
|
@@ -4933,19 +4931,52 @@ var require_create3 = __commonJS({
|
|
|
4933
4931
|
var import_set = require_set2();
|
|
4934
4932
|
var import_classList = require_classList();
|
|
4935
4933
|
var import_iterate = require_iterate();
|
|
4934
|
+
var import_utils25 = require_cjs();
|
|
4936
4935
|
var import_options3 = __toESM2(require_options(), 1);
|
|
4937
4936
|
var import_component = require_component();
|
|
4938
4937
|
var ENV2 = "development";
|
|
4939
4938
|
var create2 = (element, parent, key, options = import_options3.default.create || {}) => {
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4939
|
+
cacheOptions(element, options);
|
|
4940
|
+
if (checkIfPrimitive(element)) {
|
|
4941
|
+
return applyValueAsText(element, parent, key);
|
|
4943
4942
|
}
|
|
4943
|
+
element = redefineElement(element, parent, key, options);
|
|
4944
|
+
parent = redefineParent(element, parent, key);
|
|
4945
|
+
key = createKey(element, parent, key);
|
|
4946
|
+
const ref = addRef(element, parent, key);
|
|
4947
|
+
applyContext(element, parent, options);
|
|
4948
|
+
(0, import_component.applyComponentFromContext)(element, parent, options);
|
|
4949
|
+
(0, import_extend.applyExtend)(element, parent, options);
|
|
4950
|
+
element.key = key;
|
|
4951
|
+
if (options.onlyResolveExtends) {
|
|
4952
|
+
return onlyResolveExtends(element, parent, options);
|
|
4953
|
+
}
|
|
4954
|
+
replaceOptions(element, parent, options);
|
|
4955
|
+
addCaching(element, parent);
|
|
4956
|
+
(0, import_set.addMethods)(element, parent);
|
|
4957
|
+
(0, import_state3.createState)(element, parent);
|
|
4958
|
+
createIfConditionFlag(element, parent);
|
|
4959
|
+
if (element.node && ref.__if) {
|
|
4960
|
+
return (0, import_render.assignNode)(element, parent, key);
|
|
4961
|
+
}
|
|
4962
|
+
(0, import_props.createProps)(element, parent);
|
|
4963
|
+
(0, import_component.applyVariant)(element, parent);
|
|
4964
|
+
const onInit = (0, import_event.triggerEventOn)("init", element, options);
|
|
4965
|
+
if (onInit === false)
|
|
4966
|
+
return element;
|
|
4967
|
+
(0, import_event.triggerEventOn)("beforeClassAssign", element, options);
|
|
4968
|
+
(0, import_classList.assignKeyAsClassname)(element);
|
|
4969
|
+
renderElement(element, parent, options);
|
|
4970
|
+
addElementIntoParentChildren(element, parent);
|
|
4971
|
+
(0, import_event.triggerEventOn)("complete", element, options);
|
|
4972
|
+
return element;
|
|
4973
|
+
};
|
|
4974
|
+
var createBasedOnType = (element, parent, key, options) => {
|
|
4944
4975
|
if (element === void 0) {
|
|
4945
4976
|
if (ENV2 === "test" || ENV2 === "development") {
|
|
4946
4977
|
console.warn(key, "element is undefined in", parent && parent.__ref && parent.__ref.path);
|
|
4947
4978
|
}
|
|
4948
|
-
|
|
4979
|
+
return {};
|
|
4949
4980
|
}
|
|
4950
4981
|
if ((0, import_utils25.isString)(key) && key.slice(0, 2 === "__")) {
|
|
4951
4982
|
if (ENV2 === "test" || ENV2 === "development") {
|
|
@@ -4955,65 +4986,58 @@ var require_create3 = __commonJS({
|
|
|
4955
4986
|
if (element === null)
|
|
4956
4987
|
return;
|
|
4957
4988
|
if (element === true)
|
|
4958
|
-
|
|
4989
|
+
return { text: true };
|
|
4959
4990
|
if (element.__hash) {
|
|
4960
|
-
|
|
4991
|
+
return { extend: element };
|
|
4961
4992
|
}
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4993
|
+
return element;
|
|
4994
|
+
};
|
|
4995
|
+
var redefineElement = (element, parent, key, options) => {
|
|
4996
|
+
const elementWrapper = createBasedOnType(element, parent, key, options);
|
|
4997
|
+
if ((0, import_component.checkIfKeyIsComponent)(key)) {
|
|
4998
|
+
return (0, import_component.applyKeyComponentAsExtend)(elementWrapper, parent, key);
|
|
4966
4999
|
}
|
|
4967
|
-
if (
|
|
4968
|
-
|
|
5000
|
+
if (checkIfMedia(key)) {
|
|
5001
|
+
return applyMediaProps2(elementWrapper, parent, key);
|
|
4969
5002
|
}
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
5003
|
+
return elementWrapper;
|
|
5004
|
+
};
|
|
5005
|
+
var redefineParent = (element, parent, key, options) => {
|
|
5006
|
+
if (!parent)
|
|
5007
|
+
return import_tree.ROOT;
|
|
5008
|
+
if ((0, import_utils25.isNode)(parent)) {
|
|
5009
|
+
const parentNodeWrapper = { key: ":root", node: parent };
|
|
5010
|
+
import_tree.ROOT[`${key}_parent`] = parentNodeWrapper;
|
|
5011
|
+
return parentNodeWrapper;
|
|
4973
5012
|
}
|
|
4974
|
-
|
|
4975
|
-
|
|
5013
|
+
return parent;
|
|
5014
|
+
};
|
|
5015
|
+
var cacheOptions = (element, options) => {
|
|
5016
|
+
if (options && !import_options3.default.create) {
|
|
5017
|
+
import_options3.default.create = options;
|
|
5018
|
+
import_options3.default.create.context = element.context || options.context;
|
|
4976
5019
|
}
|
|
5020
|
+
};
|
|
5021
|
+
var createKey = (element, parent, key) => {
|
|
5022
|
+
return (key || element.key || (0, import_utils25.generateKey)()).toString();
|
|
5023
|
+
};
|
|
5024
|
+
var addRef = (element, parent) => {
|
|
4977
5025
|
if (element.__ref)
|
|
4978
5026
|
element.__ref.origin = element;
|
|
4979
5027
|
else
|
|
4980
5028
|
element.__ref = { origin: element };
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
if (context && context.components) {
|
|
4985
|
-
(0, import_component.applyComponentFromContext)(element, parent, options);
|
|
4986
|
-
}
|
|
4987
|
-
(0, import_extend.applyExtend)(element, parent, options);
|
|
4988
|
-
element.key = assignedKey;
|
|
4989
|
-
if (options.onlyResolveExtends) {
|
|
4990
|
-
return onlyResolveExtends(element, parent, options);
|
|
4991
|
-
}
|
|
5029
|
+
return element.__ref;
|
|
5030
|
+
};
|
|
5031
|
+
var replaceOptions = (element, parent, options) => {
|
|
4992
5032
|
if (Object.keys(options).length) {
|
|
4993
5033
|
import_mixins.registry.defaultOptions = options;
|
|
4994
5034
|
if (options.ignoreChildExtend)
|
|
4995
5035
|
delete options.ignoreChildExtend;
|
|
4996
5036
|
}
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
element.state = (0, import_state3.createState)(element, parent);
|
|
5000
|
-
checkIf(element, parent);
|
|
5001
|
-
if (element.node && __ref.__if) {
|
|
5002
|
-
return (0, import_render.assignNode)(element, parent, assignedKey);
|
|
5003
|
-
}
|
|
5004
|
-
if (__ref.__if)
|
|
5005
|
-
(0, import_props.createProps)(element, parent);
|
|
5006
|
-
(0, import_component.applyVariant)(element, parent);
|
|
5007
|
-
const initReturns = (0, import_event.triggerEventOn)("init", element, options);
|
|
5008
|
-
if (initReturns === false)
|
|
5009
|
-
return element;
|
|
5010
|
-
(0, import_event.triggerEventOn)("beforeClassAssign", element, options);
|
|
5011
|
-
(0, import_classList.assignClass)(element);
|
|
5012
|
-
renderElement(element, parent, options);
|
|
5037
|
+
};
|
|
5038
|
+
var addElementIntoParentChildren = (element, parent) => {
|
|
5013
5039
|
if (parent.__ref && parent.__ref.__children)
|
|
5014
5040
|
parent.__ref.__children.push(element.key);
|
|
5015
|
-
(0, import_event.triggerEventOn)("complete", element, options);
|
|
5016
|
-
return element;
|
|
5017
5041
|
};
|
|
5018
5042
|
var renderElement = (element, parent, options) => {
|
|
5019
5043
|
const { __ref: ref, key } = element;
|
|
@@ -5042,7 +5066,7 @@ var require_create3 = __commonJS({
|
|
|
5042
5066
|
if (!element.context)
|
|
5043
5067
|
element.context = parent.context || options.context || import_tree.ROOT.context;
|
|
5044
5068
|
};
|
|
5045
|
-
var
|
|
5069
|
+
var createIfConditionFlag = (element, parent) => {
|
|
5046
5070
|
const { __ref: ref } = element;
|
|
5047
5071
|
if ((0, import_utils25.isFunction)(element.if)) {
|
|
5048
5072
|
const ifPassed = element.if(element, element.state);
|
|
@@ -5096,8 +5120,6 @@ var require_create3 = __commonJS({
|
|
|
5096
5120
|
__ref.__attr = {};
|
|
5097
5121
|
if (!element.props)
|
|
5098
5122
|
element.props = {};
|
|
5099
|
-
if (!element.state)
|
|
5100
|
-
element.state = element.parent.state || {};
|
|
5101
5123
|
(0, import_state3.createState)(element, parent, { skipApplyMethods: true, ...options });
|
|
5102
5124
|
(0, import_props.createProps)(element, parent);
|
|
5103
5125
|
(0, import_component.applyVariant)(element, parent);
|
|
@@ -5115,13 +5137,10 @@ var require_create3 = __commonJS({
|
|
|
5115
5137
|
create2((0, import_utils25.exec)(prop, element), element, param, options);
|
|
5116
5138
|
}
|
|
5117
5139
|
}
|
|
5118
|
-
delete element.parent;
|
|
5119
5140
|
delete element.update;
|
|
5120
5141
|
delete element.__element;
|
|
5121
5142
|
delete element.props.update;
|
|
5122
5143
|
delete element.props.__element;
|
|
5123
|
-
delete element.state.__element;
|
|
5124
|
-
delete element.state.__element;
|
|
5125
5144
|
if (!options.keepRef)
|
|
5126
5145
|
delete element.__ref;
|
|
5127
5146
|
return element;
|
|
@@ -5232,7 +5251,7 @@ var require_cjs9 = __commonJS({
|
|
|
5232
5251
|
});
|
|
5233
5252
|
module2.exports = __toCommonJS2(element_exports);
|
|
5234
5253
|
var import_tree = require_tree();
|
|
5235
|
-
var import_create = __toESM2(
|
|
5254
|
+
var import_create = __toESM2(require_create4(), 1);
|
|
5236
5255
|
var import_node = __toESM2(require_node2(), 1);
|
|
5237
5256
|
var import_define3 = __toESM2(require_define(), 1);
|
|
5238
5257
|
var import_update = __toESM2(require_update2(), 1);
|
|
@@ -14170,18 +14189,26 @@ __export(domql_exports, {
|
|
|
14170
14189
|
Avatar: () => Avatar,
|
|
14171
14190
|
AvatarBundle: () => AvatarBundle,
|
|
14172
14191
|
AvatarChooser: () => AvatarChooser,
|
|
14192
|
+
AvatarWithIndicator: () => AvatarWithIndicator,
|
|
14173
14193
|
Block: () => Block,
|
|
14174
14194
|
Box: () => Box,
|
|
14175
14195
|
Br: () => Br,
|
|
14176
14196
|
Button: () => Button,
|
|
14177
14197
|
ButtonSet: () => ButtonSet,
|
|
14178
14198
|
Caption: () => Caption,
|
|
14199
|
+
Card: () => Card,
|
|
14200
|
+
CardLabel: () => CardLabel,
|
|
14201
|
+
ChatUser: () => ChatUser,
|
|
14202
|
+
ChatUserWithButtonSet: () => ChatUserWithButtonSet,
|
|
14203
|
+
ChatUserWithNotification: () => ChatUserWithNotification,
|
|
14204
|
+
ChatUserWithUploadedFile: () => ChatUserWithUploadedFile,
|
|
14179
14205
|
CheckBoxWithLabel: () => CheckBoxWithLabel,
|
|
14180
14206
|
Checkbox: () => Checkbox,
|
|
14181
14207
|
Circle: () => Circle,
|
|
14182
14208
|
CircleButton: () => CircleButton,
|
|
14183
14209
|
Clickable: () => Clickable,
|
|
14184
14210
|
Collection: () => Collection,
|
|
14211
|
+
DateIndicator: () => DateIndicator,
|
|
14185
14212
|
DatePicker: () => DatePicker,
|
|
14186
14213
|
DatePickerDay: () => DatePickerDay,
|
|
14187
14214
|
DatePickerGrid: () => DatePickerGrid,
|
|
@@ -14218,6 +14245,8 @@ __export(domql_exports, {
|
|
|
14218
14245
|
IconText: () => IconText2,
|
|
14219
14246
|
Iframe: () => Iframe,
|
|
14220
14247
|
Img: () => Img,
|
|
14248
|
+
IndicatorDot: () => IndicatorDot,
|
|
14249
|
+
InfoSet: () => InfoSet,
|
|
14221
14250
|
Input: () => Input2,
|
|
14222
14251
|
Interaction: () => Interaction,
|
|
14223
14252
|
Italic: () => Italic,
|
|
@@ -14227,6 +14256,7 @@ __export(domql_exports, {
|
|
|
14227
14256
|
List: () => List,
|
|
14228
14257
|
Media: () => Media,
|
|
14229
14258
|
Notification: () => Notification,
|
|
14259
|
+
NotificationAlert: () => NotificationAlert,
|
|
14230
14260
|
NumberInput: () => NumberInput,
|
|
14231
14261
|
Overflow: () => Overflow,
|
|
14232
14262
|
P: () => P,
|
|
@@ -14252,6 +14282,7 @@ __export(domql_exports, {
|
|
|
14252
14282
|
Subhead: () => Subhead,
|
|
14253
14283
|
Svg: () => Svg,
|
|
14254
14284
|
Tab: () => Tab,
|
|
14285
|
+
Table: () => Table,
|
|
14255
14286
|
Text: () => Text,
|
|
14256
14287
|
Textarea: () => Textarea,
|
|
14257
14288
|
Theme: () => Theme,
|
|
@@ -14271,6 +14302,7 @@ __export(domql_exports, {
|
|
|
14271
14302
|
UploadModalLabel: () => UploadModalLabel,
|
|
14272
14303
|
UploadProgress: () => UploadProgress,
|
|
14273
14304
|
UploadResult: () => UploadResult,
|
|
14305
|
+
User: () => User,
|
|
14274
14306
|
Video: () => Video,
|
|
14275
14307
|
XYZ: () => XYZ,
|
|
14276
14308
|
calendar: () => calendar,
|
|
@@ -15611,6 +15643,57 @@ var KangorooButton = {
|
|
|
15611
15643
|
childExtend: IconText
|
|
15612
15644
|
};
|
|
15613
15645
|
|
|
15646
|
+
// ../../uikit/domql/Accessories/index.js
|
|
15647
|
+
var IndicatorDot = {
|
|
15648
|
+
props: {
|
|
15649
|
+
boxSize: "Y+V1",
|
|
15650
|
+
background: "#04F214",
|
|
15651
|
+
round: "100%",
|
|
15652
|
+
border: "solid, black 0",
|
|
15653
|
+
borderWidth: "1px"
|
|
15654
|
+
}
|
|
15655
|
+
};
|
|
15656
|
+
var NotificationAlert = {
|
|
15657
|
+
span: { props: { text: "2" } },
|
|
15658
|
+
props: {
|
|
15659
|
+
background: "#0474F2",
|
|
15660
|
+
boxSize: "fit-content",
|
|
15661
|
+
padding: "- X",
|
|
15662
|
+
round: "Y+V",
|
|
15663
|
+
span: {
|
|
15664
|
+
fontSize: "Y",
|
|
15665
|
+
color: "white"
|
|
15666
|
+
}
|
|
15667
|
+
}
|
|
15668
|
+
};
|
|
15669
|
+
var DateIndicator = {
|
|
15670
|
+
extend: Flex,
|
|
15671
|
+
days: { ...[{ props: { text: "monday" } }] },
|
|
15672
|
+
time: {
|
|
15673
|
+
extend: Flex,
|
|
15674
|
+
hour: { props: { text: "2" } },
|
|
15675
|
+
":after": { content: ":" },
|
|
15676
|
+
minutes: { props: { text: "20" } }
|
|
15677
|
+
},
|
|
15678
|
+
timeFormat: {
|
|
15679
|
+
...[
|
|
15680
|
+
{ props: { text: "am" } },
|
|
15681
|
+
{ props: { text: "pm", display: "none" } }
|
|
15682
|
+
]
|
|
15683
|
+
},
|
|
15684
|
+
props: {
|
|
15685
|
+
gap: "Y",
|
|
15686
|
+
childProps: {
|
|
15687
|
+
fontWeight: "400",
|
|
15688
|
+
color: "#A3A3A8"
|
|
15689
|
+
},
|
|
15690
|
+
days: { childProps: { textTransform: "capitalize" } },
|
|
15691
|
+
timeFormat: {
|
|
15692
|
+
textTransform: "uppercase"
|
|
15693
|
+
}
|
|
15694
|
+
}
|
|
15695
|
+
};
|
|
15696
|
+
|
|
15614
15697
|
// ../../uikit/domql/Avatar/index.js
|
|
15615
15698
|
var Avatar = {
|
|
15616
15699
|
extend: Img,
|
|
@@ -15618,13 +15701,27 @@ var Avatar = {
|
|
|
15618
15701
|
display: "block",
|
|
15619
15702
|
avatarType: "initials",
|
|
15620
15703
|
borderRadius: "100%",
|
|
15621
|
-
boxSize: "
|
|
15704
|
+
boxSize: "A+A",
|
|
15622
15705
|
cursor: "pointer"
|
|
15623
15706
|
},
|
|
15624
15707
|
attr: {
|
|
15625
15708
|
src: ({ key, props: props6 }) => props6.src || `https://avatars.dicebear.com/api/${props6.avatarType || "adventurer-neutral"}/${props6.key || key}.svg`
|
|
15626
15709
|
}
|
|
15627
15710
|
};
|
|
15711
|
+
var AvatarWithIndicator = {
|
|
15712
|
+
avatar: { extend: Avatar },
|
|
15713
|
+
indicator: { extend: IndicatorDot },
|
|
15714
|
+
props: {
|
|
15715
|
+
boxSize: "fit-content fit-content",
|
|
15716
|
+
round: "100%",
|
|
15717
|
+
position: "relative",
|
|
15718
|
+
indicator: {
|
|
15719
|
+
position: "absolute",
|
|
15720
|
+
bottom: "0",
|
|
15721
|
+
right: "0"
|
|
15722
|
+
}
|
|
15723
|
+
}
|
|
15724
|
+
};
|
|
15628
15725
|
var AvatarBundle = {
|
|
15629
15726
|
extend: Flex,
|
|
15630
15727
|
childExtend: {
|
|
@@ -17500,8 +17597,8 @@ var Pills = {
|
|
|
17500
17597
|
}
|
|
17501
17598
|
}),
|
|
17502
17599
|
on: {
|
|
17503
|
-
click: (e, el
|
|
17504
|
-
|
|
17600
|
+
click: (e, el) => {
|
|
17601
|
+
el.state.update({ active: parseInt(el.key) });
|
|
17505
17602
|
}
|
|
17506
17603
|
}
|
|
17507
17604
|
},
|
|
@@ -17685,6 +17782,282 @@ var Steps = {
|
|
|
17685
17782
|
$setPropsCollection: ({ props: props6 }) => props6.options
|
|
17686
17783
|
};
|
|
17687
17784
|
|
|
17785
|
+
// ../../uikit/domql/Table/index.js
|
|
17786
|
+
var Table = {};
|
|
17787
|
+
|
|
17788
|
+
// ../../uikit/domql/InfoSet/index.js
|
|
17789
|
+
var InfoSet = {
|
|
17790
|
+
extend: Flex,
|
|
17791
|
+
childExtend: Flex,
|
|
17792
|
+
props: {
|
|
17793
|
+
flow: "column",
|
|
17794
|
+
childProps: {
|
|
17795
|
+
title: {
|
|
17796
|
+
fontSize: "Z",
|
|
17797
|
+
fontWeight: "500"
|
|
17798
|
+
},
|
|
17799
|
+
subTitle: {
|
|
17800
|
+
fontSize: "Y",
|
|
17801
|
+
color: "#A3A3A8"
|
|
17802
|
+
}
|
|
17803
|
+
}
|
|
17804
|
+
}
|
|
17805
|
+
};
|
|
17806
|
+
|
|
17807
|
+
// ../../uikit/domql/User/index.js
|
|
17808
|
+
var User = {
|
|
17809
|
+
extend: Flex,
|
|
17810
|
+
image: { extend: AvatarWithIndicator },
|
|
17811
|
+
infos: {
|
|
17812
|
+
extend: InfoSet,
|
|
17813
|
+
...[
|
|
17814
|
+
{
|
|
17815
|
+
title: { props: { text: "Erin Schleifer" } },
|
|
17816
|
+
subTitle: { caption: { props: { text: "email@symbols.com" } } }
|
|
17817
|
+
}
|
|
17818
|
+
]
|
|
17819
|
+
},
|
|
17820
|
+
props: {
|
|
17821
|
+
boxSize: "fit-content",
|
|
17822
|
+
align: "center flex-start",
|
|
17823
|
+
gap: "A",
|
|
17824
|
+
infos: {
|
|
17825
|
+
childProps: {
|
|
17826
|
+
flow: "column",
|
|
17827
|
+
subTitle: { caption: { whiteSpace: "nowrap" } }
|
|
17828
|
+
}
|
|
17829
|
+
}
|
|
17830
|
+
}
|
|
17831
|
+
};
|
|
17832
|
+
|
|
17833
|
+
// ../../uikit/domql/Chat/index.js
|
|
17834
|
+
var ChatUser = {
|
|
17835
|
+
extend: User,
|
|
17836
|
+
image: {},
|
|
17837
|
+
infos: {
|
|
17838
|
+
...[
|
|
17839
|
+
{
|
|
17840
|
+
title: {},
|
|
17841
|
+
subTitle: {
|
|
17842
|
+
extend: DateIndicator,
|
|
17843
|
+
caption: null
|
|
17844
|
+
}
|
|
17845
|
+
},
|
|
17846
|
+
{ chatText: { props: { text: "Can you please review the latest design?" } } }
|
|
17847
|
+
]
|
|
17848
|
+
},
|
|
17849
|
+
props: {
|
|
17850
|
+
align: "flex-start flex-start",
|
|
17851
|
+
image: { fontSize: "C" },
|
|
17852
|
+
infos: {
|
|
17853
|
+
gap: "Y",
|
|
17854
|
+
childProps: {
|
|
17855
|
+
flow: "row",
|
|
17856
|
+
align: "center space-between",
|
|
17857
|
+
chatText: {
|
|
17858
|
+
fontSize: "Z",
|
|
17859
|
+
background: "#252527",
|
|
17860
|
+
padding: "Z+W2 A+W",
|
|
17861
|
+
round: "Z+W2"
|
|
17862
|
+
}
|
|
17863
|
+
}
|
|
17864
|
+
}
|
|
17865
|
+
}
|
|
17866
|
+
};
|
|
17867
|
+
var ChatUserWithUploadedFile = {
|
|
17868
|
+
extend: ChatUser,
|
|
17869
|
+
image: {},
|
|
17870
|
+
infos: {
|
|
17871
|
+
...[
|
|
17872
|
+
{},
|
|
17873
|
+
{
|
|
17874
|
+
chatText: null,
|
|
17875
|
+
uploadedFile: {
|
|
17876
|
+
extend: UploadResult,
|
|
17877
|
+
FileIcon: {},
|
|
17878
|
+
Flex: {
|
|
17879
|
+
H6: { text: "File.jpg" },
|
|
17880
|
+
caption: {
|
|
17881
|
+
extend: Flex,
|
|
17882
|
+
value: { props: { text: "1.2" } },
|
|
17883
|
+
mb: "mb"
|
|
17884
|
+
},
|
|
17885
|
+
Captions: null,
|
|
17886
|
+
UploadProgress: null
|
|
17887
|
+
}
|
|
17888
|
+
}
|
|
17889
|
+
}
|
|
17890
|
+
]
|
|
17891
|
+
},
|
|
17892
|
+
props: {
|
|
17893
|
+
infos: {
|
|
17894
|
+
childProps: {
|
|
17895
|
+
uploadedFile: {
|
|
17896
|
+
background: "#1C1C1F",
|
|
17897
|
+
minWidth: "G",
|
|
17898
|
+
align: "center flex-start",
|
|
17899
|
+
FileIcon: {
|
|
17900
|
+
background: "#3F3F43",
|
|
17901
|
+
boxSize: `${54 / 16}em`,
|
|
17902
|
+
Icon: { fontSize: `${24 / 16}em` }
|
|
17903
|
+
},
|
|
17904
|
+
Flex: {
|
|
17905
|
+
H6: {
|
|
17906
|
+
fontSize: "Z",
|
|
17907
|
+
fontWeight: "500"
|
|
17908
|
+
},
|
|
17909
|
+
caption: {
|
|
17910
|
+
fontSize: "Z",
|
|
17911
|
+
color: "#A3A3A8",
|
|
17912
|
+
textTransform: "uppercase"
|
|
17913
|
+
}
|
|
17914
|
+
}
|
|
17915
|
+
}
|
|
17916
|
+
}
|
|
17917
|
+
}
|
|
17918
|
+
}
|
|
17919
|
+
};
|
|
17920
|
+
var ChatUserWithButtonSet = {
|
|
17921
|
+
extend: User,
|
|
17922
|
+
image: {},
|
|
17923
|
+
infos: {
|
|
17924
|
+
...[
|
|
17925
|
+
{
|
|
17926
|
+
title: { props: { text: "Justin Dorwart" } },
|
|
17927
|
+
subTitle: { caption: { props: { text: "Active now" } } }
|
|
17928
|
+
},
|
|
17929
|
+
{
|
|
17930
|
+
extend: ButtonSet,
|
|
17931
|
+
...[
|
|
17932
|
+
{ props: { icon: "phone" } },
|
|
17933
|
+
{ props: { icon: "video" } },
|
|
17934
|
+
{ props: { icon: "info" } }
|
|
17935
|
+
]
|
|
17936
|
+
}
|
|
17937
|
+
]
|
|
17938
|
+
},
|
|
17939
|
+
props: {
|
|
17940
|
+
background: "#1C1C1F",
|
|
17941
|
+
padding: "A B",
|
|
17942
|
+
round: "A",
|
|
17943
|
+
image: { fontSize: `${24 / 16}em` },
|
|
17944
|
+
infos: {
|
|
17945
|
+
flow: "row",
|
|
17946
|
+
gap: "D",
|
|
17947
|
+
alignItems: "center",
|
|
17948
|
+
childProps: {
|
|
17949
|
+
"&:last-child": {
|
|
17950
|
+
flow: "row",
|
|
17951
|
+
gap: "Y+V",
|
|
17952
|
+
"& > button": {
|
|
17953
|
+
boxSize: "B+Y",
|
|
17954
|
+
background: "#141416",
|
|
17955
|
+
round: "A",
|
|
17956
|
+
"& > svg": {
|
|
17957
|
+
fontSize: "C",
|
|
17958
|
+
color: "white"
|
|
17959
|
+
}
|
|
17960
|
+
}
|
|
17961
|
+
},
|
|
17962
|
+
title: {
|
|
17963
|
+
fontSize: "C",
|
|
17964
|
+
fontWeight: "700"
|
|
17965
|
+
}
|
|
17966
|
+
}
|
|
17967
|
+
}
|
|
17968
|
+
}
|
|
17969
|
+
};
|
|
17970
|
+
var ChatUserWithNotification = {
|
|
17971
|
+
extend: ChatUser,
|
|
17972
|
+
image: {},
|
|
17973
|
+
infos: {
|
|
17974
|
+
...[
|
|
17975
|
+
{
|
|
17976
|
+
title: {},
|
|
17977
|
+
subTitle: { days: null }
|
|
17978
|
+
},
|
|
17979
|
+
{
|
|
17980
|
+
chatText: { props: { text: "Hey team, Ive finished the re..." } },
|
|
17981
|
+
notification: { extend: NotificationAlert }
|
|
17982
|
+
}
|
|
17983
|
+
]
|
|
17984
|
+
},
|
|
17985
|
+
props: {
|
|
17986
|
+
background: "#141416",
|
|
17987
|
+
padding: "A",
|
|
17988
|
+
round: "Z",
|
|
17989
|
+
infos: {
|
|
17990
|
+
childProps: {
|
|
17991
|
+
":last-child": { gap: "D" },
|
|
17992
|
+
title: { fontSize: "A" },
|
|
17993
|
+
chatText: {
|
|
17994
|
+
padding: "0",
|
|
17995
|
+
background: "transparent",
|
|
17996
|
+
color: "#A3A3A8",
|
|
17997
|
+
minWidth: "F+C",
|
|
17998
|
+
maxWidth: "F+C"
|
|
17999
|
+
}
|
|
18000
|
+
}
|
|
18001
|
+
}
|
|
18002
|
+
}
|
|
18003
|
+
};
|
|
18004
|
+
|
|
18005
|
+
// ../../uikit/domql/Card/index.js
|
|
18006
|
+
var CardLabel = {
|
|
18007
|
+
props: {
|
|
18008
|
+
text: "-2.902x",
|
|
18009
|
+
fontSize: "Y",
|
|
18010
|
+
background: "#F4454E",
|
|
18011
|
+
boxSize: "fit-content fit-content",
|
|
18012
|
+
padding: "W Y",
|
|
18013
|
+
round: "Y"
|
|
18014
|
+
}
|
|
18015
|
+
};
|
|
18016
|
+
var Card = {
|
|
18017
|
+
extend: InfoSet,
|
|
18018
|
+
heading: {
|
|
18019
|
+
title: { props: { text: "Total crypto assets" } },
|
|
18020
|
+
icon: { extend: Icon, props: { name: "arrowUpRight" } }
|
|
18021
|
+
},
|
|
18022
|
+
content: {
|
|
18023
|
+
extend: Flex,
|
|
18024
|
+
amount: { props: { text: "$ 12,759" } },
|
|
18025
|
+
percent: {
|
|
18026
|
+
extend: CardLabel,
|
|
18027
|
+
props: { text: "+ 8.8%" }
|
|
18028
|
+
}
|
|
18029
|
+
},
|
|
18030
|
+
footer: {
|
|
18031
|
+
subTitle: {
|
|
18032
|
+
extend: Flex,
|
|
18033
|
+
caption: { props: { text: "Last update:" } },
|
|
18034
|
+
span: { props: { text: "an hour ago" } }
|
|
18035
|
+
}
|
|
18036
|
+
},
|
|
18037
|
+
props: {
|
|
18038
|
+
minWidth: "G",
|
|
18039
|
+
maxWidth: "G",
|
|
18040
|
+
padding: "A",
|
|
18041
|
+
round: "Z+V",
|
|
18042
|
+
gap: "Y",
|
|
18043
|
+
style: { background: "linear-gradient(to right, rgba(4, 116, 242, 1), rgba(0, 48, 103, 1))" },
|
|
18044
|
+
childProps: {
|
|
18045
|
+
alignItems: "center",
|
|
18046
|
+
title: { fontWeight: "700" },
|
|
18047
|
+
icon: { fontSize: "C", color: "#A3A3A8" },
|
|
18048
|
+
amount: { fontSize: `${24 / 16}em`, fontWeight: "700" },
|
|
18049
|
+
percent: { padding: "Y Z", background: "#04040466" },
|
|
18050
|
+
subTitle: {
|
|
18051
|
+
gap: "Y",
|
|
18052
|
+
caption: { color: "rgba(224, 224, 226, 1)" },
|
|
18053
|
+
span: { color: "rgba(233, 233, 234, 1)" }
|
|
18054
|
+
}
|
|
18055
|
+
},
|
|
18056
|
+
heading: { justifyContent: "space-between" },
|
|
18057
|
+
content: { gap: "Y" }
|
|
18058
|
+
}
|
|
18059
|
+
};
|
|
18060
|
+
|
|
17688
18061
|
// src/define.js
|
|
17689
18062
|
var defaultDefine = {
|
|
17690
18063
|
routes: (param) => param,
|
|
@@ -21643,6 +22016,8 @@ var create = async (App, options = options_default, optionsExternalFile) => {
|
|
|
21643
22016
|
if (appIsKey)
|
|
21644
22017
|
App = {};
|
|
21645
22018
|
await fetchSync(key, options);
|
|
22019
|
+
if (typeof document === "undefined")
|
|
22020
|
+
window.document = {};
|
|
21646
22021
|
const doc = options.parent || options.document || document;
|
|
21647
22022
|
const [scratchSystem2, emotion4, registry] = initEmotion(key, options);
|
|
21648
22023
|
const state = options.state || {};
|
|
@@ -21692,7 +22067,15 @@ var createSync = (App, options = options_default, optionsExternalFile) => {
|
|
|
21692
22067
|
const key = options.key || SYMBOLS_KEY || (appIsKey ? App : "");
|
|
21693
22068
|
if (appIsKey)
|
|
21694
22069
|
App = {};
|
|
21695
|
-
|
|
22070
|
+
if (typeof document === "undefined")
|
|
22071
|
+
document = { body: {} };
|
|
22072
|
+
let parent;
|
|
22073
|
+
if (options.parent)
|
|
22074
|
+
parent = options.parent;
|
|
22075
|
+
else if (options.document)
|
|
22076
|
+
parent = options.document;
|
|
22077
|
+
else
|
|
22078
|
+
parent = document.body;
|
|
21696
22079
|
const [scratchSystem2, emotion4, registry] = initEmotion(key, options);
|
|
21697
22080
|
const state = options.state || {};
|
|
21698
22081
|
const pages = options.pages || {};
|
|
@@ -21703,7 +22086,7 @@ var createSync = (App, options = options_default, optionsExternalFile) => {
|
|
|
21703
22086
|
const extend = applySyncDebug([App], options);
|
|
21704
22087
|
const domqlApp = import_domql.default.create({
|
|
21705
22088
|
extend,
|
|
21706
|
-
//routes: options.pages,
|
|
22089
|
+
// routes: options.pages,
|
|
21707
22090
|
state,
|
|
21708
22091
|
context: {
|
|
21709
22092
|
key,
|
|
@@ -21716,11 +22099,11 @@ var createSync = (App, options = options_default, optionsExternalFile) => {
|
|
|
21716
22099
|
define: define2,
|
|
21717
22100
|
registry,
|
|
21718
22101
|
emotion: emotion4,
|
|
21719
|
-
//routerOptions,
|
|
21720
|
-
document
|
|
22102
|
+
// routerOptions,
|
|
22103
|
+
document
|
|
21721
22104
|
}
|
|
21722
|
-
},
|
|
21723
|
-
//extend: [uikit.Box],
|
|
22105
|
+
}, parent, key, {
|
|
22106
|
+
// extend: [uikit.Box],
|
|
21724
22107
|
verbose: options.verbose,
|
|
21725
22108
|
...options.domqlOptions
|
|
21726
22109
|
});
|
package/dist/cjs/index.js
CHANGED
|
@@ -56,6 +56,8 @@ const create = async (App, options = import_options.default, optionsExternalFile
|
|
|
56
56
|
if (appIsKey)
|
|
57
57
|
App = {};
|
|
58
58
|
await (0, import_ferchOnCreate.fetchSync)(key, options);
|
|
59
|
+
if (typeof document === "undefined")
|
|
60
|
+
window.document = {};
|
|
59
61
|
const doc = options.parent || options.document || document;
|
|
60
62
|
const [scratchSystem, emotion, registry] = (0, import_initEmotion.initEmotion)(key, options);
|
|
61
63
|
const state = options.state || {};
|
|
@@ -105,7 +107,15 @@ const createSync = (App, options = import_options.default, optionsExternalFile)
|
|
|
105
107
|
const key = options.key || SYMBOLS_KEY || (appIsKey ? App : "");
|
|
106
108
|
if (appIsKey)
|
|
107
109
|
App = {};
|
|
108
|
-
|
|
110
|
+
if (typeof document === "undefined")
|
|
111
|
+
document = { body: {} };
|
|
112
|
+
let parent;
|
|
113
|
+
if (options.parent)
|
|
114
|
+
parent = options.parent;
|
|
115
|
+
else if (options.document)
|
|
116
|
+
parent = options.document;
|
|
117
|
+
else
|
|
118
|
+
parent = document.body;
|
|
109
119
|
const [scratchSystem, emotion, registry] = (0, import_initEmotion.initEmotion)(key, options);
|
|
110
120
|
const state = options.state || {};
|
|
111
121
|
const pages = options.pages || {};
|
|
@@ -116,7 +126,7 @@ const createSync = (App, options = import_options.default, optionsExternalFile)
|
|
|
116
126
|
const extend = (0, import_syncExtend.applySyncDebug)([App], options);
|
|
117
127
|
const domqlApp = import_domql.default.create({
|
|
118
128
|
extend,
|
|
119
|
-
//routes: options.pages,
|
|
129
|
+
// routes: options.pages,
|
|
120
130
|
state,
|
|
121
131
|
context: {
|
|
122
132
|
key,
|
|
@@ -129,11 +139,11 @@ const createSync = (App, options = import_options.default, optionsExternalFile)
|
|
|
129
139
|
define,
|
|
130
140
|
registry,
|
|
131
141
|
emotion,
|
|
132
|
-
//routerOptions,
|
|
133
|
-
document
|
|
142
|
+
// routerOptions,
|
|
143
|
+
document
|
|
134
144
|
}
|
|
135
|
-
},
|
|
136
|
-
//extend: [uikit.Box],
|
|
145
|
+
}, parent, key, {
|
|
146
|
+
// extend: [uikit.Box],
|
|
137
147
|
verbose: options.verbose,
|
|
138
148
|
...options.domqlOptions
|
|
139
149
|
});
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -31,6 +31,7 @@ export const create = async (App, options = DEFAULT_CREATE_OPTIONS, optionsExter
|
|
|
31
31
|
if (appIsKey) App = {}
|
|
32
32
|
await fetchSync(key, options)
|
|
33
33
|
|
|
34
|
+
if (typeof (document) === 'undefined') window.document = {}
|
|
34
35
|
const doc = options.parent || options.document || document
|
|
35
36
|
const [scratchSystem, emotion, registry] = initEmotion(key, options)
|
|
36
37
|
|
|
@@ -87,7 +88,13 @@ export const createSync = (App, options = DEFAULT_CREATE_OPTIONS, optionsExterna
|
|
|
87
88
|
|
|
88
89
|
if (appIsKey) App = {}
|
|
89
90
|
|
|
90
|
-
|
|
91
|
+
// Set parent
|
|
92
|
+
if (typeof (document) === 'undefined') document = { body: {} }
|
|
93
|
+
let parent
|
|
94
|
+
if (options.parent) parent = options.parent
|
|
95
|
+
else if (options.document) parent = options.document
|
|
96
|
+
else parent = document.body
|
|
97
|
+
|
|
91
98
|
const [scratchSystem, emotion, registry] = initEmotion(key, options)
|
|
92
99
|
|
|
93
100
|
const state = options.state || {}
|
|
@@ -97,12 +104,12 @@ export const createSync = (App, options = DEFAULT_CREATE_OPTIONS, optionsExterna
|
|
|
97
104
|
const snippets = { ...utils, ...utils.scratchUtils, ...(options.snippets || {}) }
|
|
98
105
|
const define = options.define || defaultDefine
|
|
99
106
|
|
|
100
|
-
//const routerOptions = initRouter(App, options) // eslint-disable-line
|
|
107
|
+
// const routerOptions = initRouter(App, options) // eslint-disable-line
|
|
101
108
|
const extend = applySyncDebug([App], options)
|
|
102
109
|
|
|
103
110
|
const domqlApp = DOM.create({
|
|
104
111
|
extend,
|
|
105
|
-
//routes: options.pages,
|
|
112
|
+
// routes: options.pages,
|
|
106
113
|
state,
|
|
107
114
|
context: {
|
|
108
115
|
key,
|
|
@@ -115,11 +122,11 @@ export const createSync = (App, options = DEFAULT_CREATE_OPTIONS, optionsExterna
|
|
|
115
122
|
define,
|
|
116
123
|
registry,
|
|
117
124
|
emotion,
|
|
118
|
-
//routerOptions,
|
|
119
|
-
document
|
|
125
|
+
// routerOptions,
|
|
126
|
+
document
|
|
120
127
|
}
|
|
121
|
-
},
|
|
122
|
-
//extend: [uikit.Box],
|
|
128
|
+
}, parent, key, {
|
|
129
|
+
// extend: [uikit.Box],
|
|
123
130
|
verbose: options.verbose,
|
|
124
131
|
...options.domqlOptions
|
|
125
132
|
})
|