@symbo.ls/create 2.11.305 → 2.11.310
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 +72 -51
- package/dist/cjs/index.js +2 -6
- package/package.json +2 -2
- package/src/index.js +3 -8
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -219,8 +219,8 @@ var require_types = __commonJS({
|
|
|
219
219
|
isNumber: () => isNumber2,
|
|
220
220
|
isObject: () => isObject12,
|
|
221
221
|
isObjectLike: () => isObjectLike3,
|
|
222
|
-
isString: () =>
|
|
223
|
-
isUndefined: () =>
|
|
222
|
+
isString: () => isString12,
|
|
223
|
+
isUndefined: () => isUndefined9
|
|
224
224
|
});
|
|
225
225
|
module2.exports = __toCommonJS12(types_exports);
|
|
226
226
|
var import_node = require_node();
|
|
@@ -229,7 +229,7 @@ var require_types = __commonJS({
|
|
|
229
229
|
return false;
|
|
230
230
|
return typeof arg === "object" && arg.constructor === Object;
|
|
231
231
|
};
|
|
232
|
-
var
|
|
232
|
+
var isString12 = (arg) => typeof arg === "string";
|
|
233
233
|
var isNumber2 = (arg) => typeof arg === "number";
|
|
234
234
|
var isFunction4 = (arg) => typeof arg === "function";
|
|
235
235
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
@@ -242,16 +242,16 @@ var require_types = __commonJS({
|
|
|
242
242
|
return typeof arg === "object";
|
|
243
243
|
};
|
|
244
244
|
var isDefined3 = (arg) => {
|
|
245
|
-
return isObject12(arg) || isObjectLike3(arg) ||
|
|
245
|
+
return isObject12(arg) || isObjectLike3(arg) || isString12(arg) || isNumber2(arg) || isFunction4(arg) || isArray6(arg) || isObjectLike3(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
246
246
|
};
|
|
247
|
-
var
|
|
247
|
+
var isUndefined9 = (arg) => {
|
|
248
248
|
return arg === void 0;
|
|
249
249
|
};
|
|
250
250
|
var TYPES = {
|
|
251
251
|
boolean: isBoolean,
|
|
252
252
|
array: isArray6,
|
|
253
253
|
object: isObject12,
|
|
254
|
-
string:
|
|
254
|
+
string: isString12,
|
|
255
255
|
date: isDate,
|
|
256
256
|
number: isNumber2,
|
|
257
257
|
null: isNull,
|
|
@@ -492,7 +492,7 @@ var require_object = __commonJS({
|
|
|
492
492
|
diff: () => diff,
|
|
493
493
|
diffArrays: () => diffArrays,
|
|
494
494
|
diffObjects: () => diffObjects,
|
|
495
|
-
exec: () =>
|
|
495
|
+
exec: () => exec5,
|
|
496
496
|
flattenRecursive: () => flattenRecursive,
|
|
497
497
|
hasOwnProperty: () => hasOwnProperty,
|
|
498
498
|
isEmpty: () => isEmpty,
|
|
@@ -515,7 +515,7 @@ var require_object = __commonJS({
|
|
|
515
515
|
var import_types = require_types();
|
|
516
516
|
var import_array = require_array();
|
|
517
517
|
var import_string = require_string();
|
|
518
|
-
var
|
|
518
|
+
var exec5 = (param, element, state, context) => {
|
|
519
519
|
if ((0, import_types.isFunction)(param)) {
|
|
520
520
|
return param(
|
|
521
521
|
element,
|
|
@@ -527,7 +527,7 @@ var require_object = __commonJS({
|
|
|
527
527
|
};
|
|
528
528
|
var map2 = (obj, extention, element) => {
|
|
529
529
|
for (const e in extention) {
|
|
530
|
-
obj[e] =
|
|
530
|
+
obj[e] = exec5(extention[e], element);
|
|
531
531
|
}
|
|
532
532
|
};
|
|
533
533
|
var merge4 = (element, obj, excludeFrom = []) => {
|
|
@@ -1852,7 +1852,7 @@ var require_cjs2 = __commonJS({
|
|
|
1852
1852
|
diff: () => diff,
|
|
1853
1853
|
diffArrays: () => diffArrays,
|
|
1854
1854
|
diffObjects: () => diffObjects,
|
|
1855
|
-
exec: () =>
|
|
1855
|
+
exec: () => exec5,
|
|
1856
1856
|
flattenRecursive: () => flattenRecursive,
|
|
1857
1857
|
hasOwnProperty: () => hasOwnProperty,
|
|
1858
1858
|
isEmpty: () => isEmpty,
|
|
@@ -1875,7 +1875,7 @@ var require_cjs2 = __commonJS({
|
|
|
1875
1875
|
var import_types = require_types2();
|
|
1876
1876
|
var import_array = require_array2();
|
|
1877
1877
|
var import_string = require_string2();
|
|
1878
|
-
var
|
|
1878
|
+
var exec5 = (param, element, state, context) => {
|
|
1879
1879
|
if ((0, import_types.isFunction)(param)) {
|
|
1880
1880
|
return param(
|
|
1881
1881
|
element,
|
|
@@ -1887,7 +1887,7 @@ var require_cjs2 = __commonJS({
|
|
|
1887
1887
|
};
|
|
1888
1888
|
var map2 = (obj, extention, element) => {
|
|
1889
1889
|
for (const e in extention) {
|
|
1890
|
-
obj[e] =
|
|
1890
|
+
obj[e] = exec5(extention[e], element);
|
|
1891
1891
|
}
|
|
1892
1892
|
};
|
|
1893
1893
|
var merge5 = (element, obj, excludeFrom = []) => {
|
|
@@ -6730,6 +6730,7 @@ var init_Block = __esm({
|
|
|
6730
6730
|
},
|
|
6731
6731
|
borderWidth: ({ props: props4, deps }) => deps.transformSizeRatio("borderWidth", props4),
|
|
6732
6732
|
padding: ({ props: props4, deps }) => deps.transformSizeRatio("padding", props4),
|
|
6733
|
+
scrollPadding: ({ props: props4, deps }) => deps.transformSizeRatio("scrollPadding", props4),
|
|
6733
6734
|
paddingInline: ({ props: props4, deps }) => {
|
|
6734
6735
|
if (typeof props4.paddingInline !== "string")
|
|
6735
6736
|
return;
|
|
@@ -6922,21 +6923,21 @@ var init_Flex = __esm({
|
|
|
6922
6923
|
},
|
|
6923
6924
|
class: {
|
|
6924
6925
|
flow: ({ props: props4 }) => {
|
|
6925
|
-
const { flow } = props4;
|
|
6926
|
-
if ((0, import_utils6.
|
|
6926
|
+
const { flow, reverse } = props4;
|
|
6927
|
+
if (!(0, import_utils6.isString)(flow))
|
|
6927
6928
|
return;
|
|
6928
|
-
let [direction, wrap] = flow.split(" ");
|
|
6929
|
+
let [direction, wrap] = (flow || "row").split(" ");
|
|
6929
6930
|
if (flow.startsWith("x") || flow.startsWith("row"))
|
|
6930
6931
|
direction = "row";
|
|
6931
6932
|
if (flow.startsWith("y") || flow.startsWith("column"))
|
|
6932
6933
|
direction = "column";
|
|
6933
6934
|
return {
|
|
6934
|
-
flexFlow: (direction || "") + (
|
|
6935
|
+
flexFlow: (direction || "") + (reverse ? "-reverse" : "") + " " + (wrap || "")
|
|
6935
6936
|
};
|
|
6936
6937
|
},
|
|
6937
6938
|
wrap: ({ props: props4 }) => props4.wrap && { flexWrap: props4.wrap },
|
|
6938
6939
|
align: ({ props: props4 }) => {
|
|
6939
|
-
if (
|
|
6940
|
+
if (!(0, import_utils6.isString)(props4.align))
|
|
6940
6941
|
return;
|
|
6941
6942
|
const [alignItems, justifyContent] = props4.align.split(" ");
|
|
6942
6943
|
return { alignItems, justifyContent };
|
|
@@ -16575,13 +16576,9 @@ var init_cjs = __esm({
|
|
|
16575
16576
|
return domqlApp;
|
|
16576
16577
|
};
|
|
16577
16578
|
createAsync = (App, options = import_options2.default, optionsExternalFile) => {
|
|
16579
|
+
const domqlApp = create(App, options, optionsExternalFile);
|
|
16578
16580
|
const redefinedOptions = { ...import_options2.default, ...mergeWithLocalFile2(options, optionsExternalFile) };
|
|
16579
|
-
const
|
|
16580
|
-
(0, import_syncExtend2.applyInspectListener)(domqlApp, redefinedOptions);
|
|
16581
|
-
(0, import_router4.popStateRouter)(domqlApp, redefinedOptions);
|
|
16582
|
-
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
16583
|
-
redefinedOptions.on.create(domqlApp, redefinedOptions);
|
|
16584
|
-
const key = options.key || SYMBOLS_KEY2;
|
|
16581
|
+
const key = redefinedOptions.key || SYMBOLS_KEY2;
|
|
16585
16582
|
(0, import_ferchOnCreate.fetchAsync)(domqlApp, key, { utils: utils3, ...redefinedOptions });
|
|
16586
16583
|
return domqlApp;
|
|
16587
16584
|
};
|
|
@@ -16893,8 +16890,8 @@ var init_style = __esm({
|
|
|
16893
16890
|
return (0, import_scratch8.getColor)(props4.shapeDirectionColor) || (0, import_scratch8.getColor)(props4.borderColor) || (0, import_scratch8.getColor)(props4.backgroundColor) || (0, import_scratch8.getColor)(props4.background);
|
|
16894
16891
|
};
|
|
16895
16892
|
inheritTransition = ({ props: props4, deps }) => {
|
|
16896
|
-
const
|
|
16897
|
-
return
|
|
16893
|
+
const exec5 = Timing.class.transition({ props: props4, deps });
|
|
16894
|
+
return exec5 && exec5.transition;
|
|
16898
16895
|
};
|
|
16899
16896
|
SHAPES = {
|
|
16900
16897
|
rectangle: {},
|
|
@@ -17613,8 +17610,7 @@ var init_Collection = __esm({
|
|
|
17613
17610
|
if ((0, import_utils20.isNot)(param)("array", "object"))
|
|
17614
17611
|
return;
|
|
17615
17612
|
const { __ref: ref } = el;
|
|
17616
|
-
|
|
17617
|
-
param = (0, import_utils20.deepClone)(param);
|
|
17613
|
+
param = (0, import_utils20.deepClone)(param);
|
|
17618
17614
|
if (ref.__collectionCache) {
|
|
17619
17615
|
const equals = JSON.stringify(param) === JSON.stringify(ref.__collectionCache);
|
|
17620
17616
|
if (equals) {
|
|
@@ -17673,17 +17669,18 @@ var init_Collection = __esm({
|
|
|
17673
17669
|
if ((0, import_utils20.isNot)(param)("array", "object"))
|
|
17674
17670
|
return;
|
|
17675
17671
|
const { __ref: ref } = el;
|
|
17672
|
+
param = (0, import_utils20.deepClone)(param);
|
|
17676
17673
|
if (ref.__stateCollectionCache) {
|
|
17677
17674
|
const equals = JSON.stringify(param) === JSON.stringify(ref.__stateCollectionCache);
|
|
17678
17675
|
if (equals) {
|
|
17679
17676
|
ref.__noCollectionDifference = true;
|
|
17680
17677
|
return;
|
|
17681
17678
|
} else {
|
|
17682
|
-
ref.__stateCollectionCache =
|
|
17679
|
+
ref.__stateCollectionCache = param;
|
|
17683
17680
|
delete ref.__noCollectionDifference;
|
|
17684
17681
|
}
|
|
17685
17682
|
} else {
|
|
17686
|
-
ref.__stateCollectionCache =
|
|
17683
|
+
ref.__stateCollectionCache = param;
|
|
17687
17684
|
}
|
|
17688
17685
|
const obj = {
|
|
17689
17686
|
tag: "fragment",
|
|
@@ -17713,17 +17710,18 @@ var init_Collection = __esm({
|
|
|
17713
17710
|
if ((0, import_utils20.isNot)(param)("array", "object"))
|
|
17714
17711
|
return;
|
|
17715
17712
|
const { __ref: ref } = el;
|
|
17713
|
+
param = (0, import_utils20.deepClone)(param);
|
|
17716
17714
|
if (ref.__propsCollectionCache) {
|
|
17717
17715
|
const equals = JSON.stringify(param) === JSON.stringify(ref.__propsCollectionCache);
|
|
17718
17716
|
if (equals) {
|
|
17719
17717
|
ref.__noCollectionDifference = true;
|
|
17720
17718
|
return;
|
|
17721
17719
|
} else {
|
|
17722
|
-
ref.__propsCollectionCache =
|
|
17720
|
+
ref.__propsCollectionCache = param;
|
|
17723
17721
|
delete ref.__noCollectionDifference;
|
|
17724
17722
|
}
|
|
17725
17723
|
} else {
|
|
17726
|
-
ref.__propsCollectionCache =
|
|
17724
|
+
ref.__propsCollectionCache = param;
|
|
17727
17725
|
}
|
|
17728
17726
|
const obj = {
|
|
17729
17727
|
tag: "fragment",
|
|
@@ -17763,7 +17761,27 @@ var init_Position = __esm({
|
|
|
17763
17761
|
left: ({ props: props4, deps }) => deps.getSpacingByKey(props4.left, "left"),
|
|
17764
17762
|
top: ({ props: props4, deps }) => deps.getSpacingByKey(props4.top, "top"),
|
|
17765
17763
|
right: ({ props: props4, deps }) => deps.getSpacingByKey(props4.right, "right"),
|
|
17766
|
-
bottom: ({ props: props4, deps }) => deps.getSpacingByKey(props4.bottom, "bottom")
|
|
17764
|
+
bottom: ({ props: props4, deps }) => deps.getSpacingByKey(props4.bottom, "bottom"),
|
|
17765
|
+
verticalInset: ({ props: props4, deps }) => {
|
|
17766
|
+
const { verticalInset } = props4;
|
|
17767
|
+
if (typeof verticalInset !== "string")
|
|
17768
|
+
return;
|
|
17769
|
+
const vi = verticalInset.split(" ").map((v) => deps.getSpacingByKey(v, "k").k);
|
|
17770
|
+
return {
|
|
17771
|
+
top: vi[0],
|
|
17772
|
+
bottom: vi[1] || vi[0]
|
|
17773
|
+
};
|
|
17774
|
+
},
|
|
17775
|
+
horizontalInset: ({ props: props4, deps }) => {
|
|
17776
|
+
const { horizontalInset } = props4;
|
|
17777
|
+
if (typeof horizontalInset !== "string")
|
|
17778
|
+
return;
|
|
17779
|
+
const vi = horizontalInset.split(" ").map((v) => deps.getSpacingByKey(v, "k").k);
|
|
17780
|
+
return {
|
|
17781
|
+
left: vi[0],
|
|
17782
|
+
right: vi[1] || vi[0]
|
|
17783
|
+
};
|
|
17784
|
+
}
|
|
17767
17785
|
}
|
|
17768
17786
|
};
|
|
17769
17787
|
}
|
|
@@ -18606,8 +18624,8 @@ var init_Link = __esm({
|
|
|
18606
18624
|
attr: {
|
|
18607
18625
|
href: (el) => {
|
|
18608
18626
|
const { context: ctx } = el;
|
|
18609
|
-
const { exec:
|
|
18610
|
-
return
|
|
18627
|
+
const { exec: exec5 } = ctx.utils;
|
|
18628
|
+
return exec5(el.props.href, el) || exec5(el.props, el).href;
|
|
18611
18629
|
},
|
|
18612
18630
|
target: ({ props: props4 }) => props4.target,
|
|
18613
18631
|
"aria-label": ({ props: props4 }) => props4.aria ? props4.aria.label : props4.text,
|
|
@@ -18616,9 +18634,10 @@ var init_Link = __esm({
|
|
|
18616
18634
|
};
|
|
18617
18635
|
RouterLink = {
|
|
18618
18636
|
on: {
|
|
18619
|
-
click: (event, el) => {
|
|
18637
|
+
click: (event, el, s) => {
|
|
18620
18638
|
const { props: props4, context: ctx } = el;
|
|
18621
|
-
const { href, scrollToTop, stopPropagation } = props4;
|
|
18639
|
+
const { href: h, scrollToTop, stopPropagation } = props4;
|
|
18640
|
+
const href = (0, import_utils26.exec)(h, el, s);
|
|
18622
18641
|
if (stopPropagation)
|
|
18623
18642
|
event.stopPropagation();
|
|
18624
18643
|
if (!href)
|
|
@@ -18627,13 +18646,17 @@ var init_Link = __esm({
|
|
|
18627
18646
|
const root = el.__ref.__root;
|
|
18628
18647
|
const linkIsExternal = href.includes("http://") || href.includes("https://") || href.includes("mailto:") || href.includes("tel:");
|
|
18629
18648
|
if (href && !linkIsExternal) {
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
|
|
18633
|
-
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18649
|
+
try {
|
|
18650
|
+
(snippets.router || utils4.router || import_router5.router)(href, root, {}, {
|
|
18651
|
+
scrollToOptions: { behaviour: "instant" },
|
|
18652
|
+
scrollToTop: (0, import_utils26.isDefined)(scrollToTop) ? scrollToTop : true,
|
|
18653
|
+
...routerOptions,
|
|
18654
|
+
...props4.routerOptions
|
|
18655
|
+
});
|
|
18656
|
+
event.preventDefault();
|
|
18657
|
+
} catch (e) {
|
|
18658
|
+
console.warn(e);
|
|
18659
|
+
}
|
|
18637
18660
|
}
|
|
18638
18661
|
}
|
|
18639
18662
|
}
|
|
@@ -18655,6 +18678,7 @@ var init_Video = __esm({
|
|
|
18655
18678
|
tag: "source",
|
|
18656
18679
|
attr: {
|
|
18657
18680
|
src: ({ props: props4 }) => props4.src,
|
|
18681
|
+
type: ({ props: props4 }) => props4.type,
|
|
18658
18682
|
controls: ({ props: props4 }) => props4.controls
|
|
18659
18683
|
}
|
|
18660
18684
|
},
|
|
@@ -18663,6 +18687,7 @@ var init_Video = __esm({
|
|
|
18663
18687
|
},
|
|
18664
18688
|
attr: {
|
|
18665
18689
|
src: ({ props: props4 }) => props4.src,
|
|
18690
|
+
playsinline: ({ props: props4 }) => props4.playsinline,
|
|
18666
18691
|
autoplay: ({ props: props4 }) => props4.autoplay,
|
|
18667
18692
|
loop: ({ props: props4 }) => props4.loop,
|
|
18668
18693
|
poster: ({ props: props4 }) => props4.poster,
|
|
@@ -18732,8 +18757,8 @@ var init_Input = __esm({
|
|
|
18732
18757
|
autocomplete: ({ props: props4 }) => props4.autocomplete,
|
|
18733
18758
|
placeholder: ({ props: props4 }) => props4.placeholder,
|
|
18734
18759
|
value: ({ props: props4, state, deps }) => {
|
|
18735
|
-
const { isString:
|
|
18736
|
-
if (
|
|
18760
|
+
const { isString: isString12, replaceLiteralsWithObjectFields: replaceLiteralsWithObjectFields2 } = deps;
|
|
18761
|
+
if (isString12(props4.value) && props4.value.includes("{{")) {
|
|
18737
18762
|
return replaceLiteralsWithObjectFields2(props4.value, state);
|
|
18738
18763
|
}
|
|
18739
18764
|
return props4.value;
|
|
@@ -23671,13 +23696,9 @@ var create2 = (App, options = options_default2, optionsExternalFile) => {
|
|
|
23671
23696
|
return domqlApp;
|
|
23672
23697
|
};
|
|
23673
23698
|
var createAsync2 = (App, options = options_default2, optionsExternalFile) => {
|
|
23699
|
+
const domqlApp = create2(App, options, optionsExternalFile);
|
|
23674
23700
|
const redefinedOptions = { ...options_default2, ...mergeWithLocalFile3(options, optionsExternalFile) };
|
|
23675
|
-
const
|
|
23676
|
-
applyInspectListener2(domqlApp, redefinedOptions);
|
|
23677
|
-
popStateRouter2(domqlApp, redefinedOptions);
|
|
23678
|
-
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
23679
|
-
redefinedOptions.on.create(domqlApp, redefinedOptions);
|
|
23680
|
-
const key = options.key || SYMBOLS_KEY4;
|
|
23701
|
+
const key = redefinedOptions.key || SYMBOLS_KEY4;
|
|
23681
23702
|
fetchAsync2(domqlApp, key, { utils: utilImports_exports, ...redefinedOptions });
|
|
23682
23703
|
return domqlApp;
|
|
23683
23704
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -57,13 +57,9 @@ const create = (App, options = import_options.default, optionsExternalFile) => {
|
|
|
57
57
|
return domqlApp;
|
|
58
58
|
};
|
|
59
59
|
const createAsync = (App, options = import_options.default, optionsExternalFile) => {
|
|
60
|
+
const domqlApp = create(App, options, optionsExternalFile);
|
|
60
61
|
const redefinedOptions = { ...import_options.default, ...mergeWithLocalFile(options, optionsExternalFile) };
|
|
61
|
-
const
|
|
62
|
-
(0, import_syncExtend.applyInspectListener)(domqlApp, redefinedOptions);
|
|
63
|
-
(0, import_router.popStateRouter)(domqlApp, redefinedOptions);
|
|
64
|
-
if (redefinedOptions.on && redefinedOptions.on.create)
|
|
65
|
-
redefinedOptions.on.create(domqlApp, redefinedOptions);
|
|
66
|
-
const key = options.key || SYMBOLS_KEY;
|
|
62
|
+
const key = redefinedOptions.key || SYMBOLS_KEY;
|
|
67
63
|
(0, import_ferchOnCreate.fetchAsync)(domqlApp, key, { utils, ...redefinedOptions });
|
|
68
64
|
return domqlApp;
|
|
69
65
|
};
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -33,15 +33,10 @@ export const create = (App, options = DEFAULT_CREATE_OPTIONS, optionsExternalFil
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export const createAsync = (App, options = DEFAULT_CREATE_OPTIONS, optionsExternalFile) => {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const domqlApp = createDomqlElement(App, redefinedOptions)
|
|
36
|
+
const domqlApp = create(App, options, optionsExternalFile)
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (redefinedOptions.on && redefinedOptions.on.create) redefinedOptions.on.create(domqlApp, redefinedOptions)
|
|
43
|
-
|
|
44
|
-
const key = options.key || SYMBOLS_KEY
|
|
38
|
+
const redefinedOptions = { ...DEFAULT_CREATE_OPTIONS, ...mergeWithLocalFile(options, optionsExternalFile) }
|
|
39
|
+
const key = redefinedOptions.key || SYMBOLS_KEY
|
|
45
40
|
fetchAsync(domqlApp, key, { utils, ...redefinedOptions })
|
|
46
41
|
|
|
47
42
|
return domqlApp
|