@movable/studio-framework 2.40.0-redondo-beach.1 → 2.40.0-redondo-beach.4
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/index.es.js +24 -18
- package/dist/index.js +24 -18
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -7498,7 +7498,7 @@ var stringMatch = function stringMatch(original, comparable, ignoreRegExp) {
|
|
|
7498
7498
|
};
|
|
7499
7499
|
|
|
7500
7500
|
var studioOverwritableJs = 'var app = new studio[a-zA-Z0-9]*.A\\(\\);';
|
|
7501
|
-
var jsIgnoreRE = new RegExp("\\s|".concat(studioOverwritableJs));
|
|
7501
|
+
var jsIgnoreRE = new RegExp("\\s|".concat(studioOverwritableJs), 'g');
|
|
7502
7502
|
var jsCompareString = "(function(){app.render(document.getElementById('react-root')).then(function(){window.APP_SUCCESSFULLY_RENDERED=true;});})();";
|
|
7503
7503
|
var isPristinePicJsTag = function isPristinePicJsTag(scriptTag) {
|
|
7504
7504
|
var script = scriptTag.innerHTML;
|
|
@@ -7510,8 +7510,16 @@ var isDocumentEligibleForStaticHandling = function isDocumentEligibleForStaticHa
|
|
|
7510
7510
|
|
|
7511
7511
|
var hasTagContainingPristinePicJs = from_1(scriptTags).some(isPristinePicJsTag);
|
|
7512
7512
|
|
|
7513
|
-
if (!hasTagContainingPristinePicJs)
|
|
7514
|
-
|
|
7513
|
+
if (!hasTagContainingPristinePicJs) {
|
|
7514
|
+
console.log('static statis is false - user-altered js detected');
|
|
7515
|
+
return false;
|
|
7516
|
+
}
|
|
7517
|
+
|
|
7518
|
+
if (scriptTags.length > COUNT_OF_SCRIPT_TAGS_COMPILED_BY_STUDIO) {
|
|
7519
|
+
console.log('static statis is false - user-added script tags detected');
|
|
7520
|
+
return false;
|
|
7521
|
+
}
|
|
7522
|
+
|
|
7515
7523
|
return true;
|
|
7516
7524
|
};
|
|
7517
7525
|
|
|
@@ -7554,7 +7562,11 @@ var areAttributesStatic = function areAttributesStatic(attributes) {
|
|
|
7554
7562
|
tags = _step$value$tags === void 0 ? [] : _step$value$tags,
|
|
7555
7563
|
clickthroughDynamicProperty = _step$value.clickthroughDynamicProperty,
|
|
7556
7564
|
conditionalDynamicProperty = _step$value.conditionalDynamicProperty;
|
|
7557
|
-
|
|
7565
|
+
|
|
7566
|
+
if (appliedElementModifiers || clickthroughDynamicProperty || conditionalDynamicProperty) {
|
|
7567
|
+
console.log('static status is false - dynamic properties on canvas detected');
|
|
7568
|
+
return false;
|
|
7569
|
+
}
|
|
7558
7570
|
|
|
7559
7571
|
var _iterator2 = _createForOfIteratorHelper$2(tags),
|
|
7560
7572
|
_step2;
|
|
@@ -7562,7 +7574,11 @@ var areAttributesStatic = function areAttributesStatic(attributes) {
|
|
|
7562
7574
|
try {
|
|
7563
7575
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
7564
7576
|
var tag = _step2.value;
|
|
7565
|
-
|
|
7577
|
+
|
|
7578
|
+
if (!isTagStatic(tag)) {
|
|
7579
|
+
console.log('static status is false - dynamic properties on tag detected');
|
|
7580
|
+
return false;
|
|
7581
|
+
}
|
|
7566
7582
|
}
|
|
7567
7583
|
} catch (err) {
|
|
7568
7584
|
_iterator2.e(err);
|
|
@@ -7704,19 +7720,14 @@ var StudioFramework = /*#__PURE__*/function () {
|
|
|
7704
7720
|
set: function set(target, key, value) {
|
|
7705
7721
|
if (key in target) {
|
|
7706
7722
|
window.RENDERED_STATICALLY = false;
|
|
7707
|
-
console.log("static status is false - overidden StudioFramework class method "
|
|
7723
|
+
console.log("static status is false - overidden StudioFramework class method ", key);
|
|
7708
7724
|
}
|
|
7709
7725
|
|
|
7710
7726
|
return set$2(target, key, value);
|
|
7711
7727
|
}
|
|
7712
7728
|
});
|
|
7713
7729
|
this.setup.call(proxy);
|
|
7714
|
-
|
|
7715
|
-
if (this.shouldPerformStaticCheck) {
|
|
7716
|
-
if (!(window.RENDERED_STATICALLY = areAttributesStatic(opts))) {
|
|
7717
|
-
console.log('static status is false - presentationAttributes are not static');
|
|
7718
|
-
}
|
|
7719
|
-
}
|
|
7730
|
+
if (this.shouldPerformStaticCheck) window.RENDERED_STATICALLY = areAttributesStatic(opts);
|
|
7720
7731
|
} else {
|
|
7721
7732
|
this.setup();
|
|
7722
7733
|
}
|
|
@@ -8473,12 +8484,7 @@ var StudioFramework = /*#__PURE__*/function () {
|
|
|
8473
8484
|
}
|
|
8474
8485
|
|
|
8475
8486
|
if (this.shouldPerformStaticCheck) {
|
|
8476
|
-
if (
|
|
8477
|
-
console.log('static status is false - scripts have been altered by the user');
|
|
8478
|
-
} else {
|
|
8479
|
-
console.log('static status is true - static check has finished');
|
|
8480
|
-
console.log('App is static.');
|
|
8481
|
-
}
|
|
8487
|
+
if (window.RENDERED_STATICALLY = isDocumentEligibleForStaticHandling(targetElement)) console.log('static status is true - static check has finished');
|
|
8482
8488
|
}
|
|
8483
8489
|
|
|
8484
8490
|
if (format === 'html') {
|
package/dist/index.js
CHANGED
|
@@ -7508,7 +7508,7 @@ var stringMatch = function stringMatch(original, comparable, ignoreRegExp) {
|
|
|
7508
7508
|
};
|
|
7509
7509
|
|
|
7510
7510
|
var studioOverwritableJs = 'var app = new studio[a-zA-Z0-9]*.A\\(\\);';
|
|
7511
|
-
var jsIgnoreRE = new RegExp("\\s|".concat(studioOverwritableJs));
|
|
7511
|
+
var jsIgnoreRE = new RegExp("\\s|".concat(studioOverwritableJs), 'g');
|
|
7512
7512
|
var jsCompareString = "(function(){app.render(document.getElementById('react-root')).then(function(){window.APP_SUCCESSFULLY_RENDERED=true;});})();";
|
|
7513
7513
|
var isPristinePicJsTag = function isPristinePicJsTag(scriptTag) {
|
|
7514
7514
|
var script = scriptTag.innerHTML;
|
|
@@ -7520,8 +7520,16 @@ var isDocumentEligibleForStaticHandling = function isDocumentEligibleForStaticHa
|
|
|
7520
7520
|
|
|
7521
7521
|
var hasTagContainingPristinePicJs = from_1(scriptTags).some(isPristinePicJsTag);
|
|
7522
7522
|
|
|
7523
|
-
if (!hasTagContainingPristinePicJs)
|
|
7524
|
-
|
|
7523
|
+
if (!hasTagContainingPristinePicJs) {
|
|
7524
|
+
console.log('static statis is false - user-altered js detected');
|
|
7525
|
+
return false;
|
|
7526
|
+
}
|
|
7527
|
+
|
|
7528
|
+
if (scriptTags.length > COUNT_OF_SCRIPT_TAGS_COMPILED_BY_STUDIO) {
|
|
7529
|
+
console.log('static statis is false - user-added script tags detected');
|
|
7530
|
+
return false;
|
|
7531
|
+
}
|
|
7532
|
+
|
|
7525
7533
|
return true;
|
|
7526
7534
|
};
|
|
7527
7535
|
|
|
@@ -7564,7 +7572,11 @@ var areAttributesStatic = function areAttributesStatic(attributes) {
|
|
|
7564
7572
|
tags = _step$value$tags === void 0 ? [] : _step$value$tags,
|
|
7565
7573
|
clickthroughDynamicProperty = _step$value.clickthroughDynamicProperty,
|
|
7566
7574
|
conditionalDynamicProperty = _step$value.conditionalDynamicProperty;
|
|
7567
|
-
|
|
7575
|
+
|
|
7576
|
+
if (appliedElementModifiers || clickthroughDynamicProperty || conditionalDynamicProperty) {
|
|
7577
|
+
console.log('static status is false - dynamic properties on canvas detected');
|
|
7578
|
+
return false;
|
|
7579
|
+
}
|
|
7568
7580
|
|
|
7569
7581
|
var _iterator2 = _createForOfIteratorHelper$2(tags),
|
|
7570
7582
|
_step2;
|
|
@@ -7572,7 +7584,11 @@ var areAttributesStatic = function areAttributesStatic(attributes) {
|
|
|
7572
7584
|
try {
|
|
7573
7585
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
7574
7586
|
var tag = _step2.value;
|
|
7575
|
-
|
|
7587
|
+
|
|
7588
|
+
if (!isTagStatic(tag)) {
|
|
7589
|
+
console.log('static status is false - dynamic properties on tag detected');
|
|
7590
|
+
return false;
|
|
7591
|
+
}
|
|
7576
7592
|
}
|
|
7577
7593
|
} catch (err) {
|
|
7578
7594
|
_iterator2.e(err);
|
|
@@ -7714,19 +7730,14 @@ var StudioFramework = /*#__PURE__*/function () {
|
|
|
7714
7730
|
set: function set(target, key, value) {
|
|
7715
7731
|
if (key in target) {
|
|
7716
7732
|
window.RENDERED_STATICALLY = false;
|
|
7717
|
-
console.log("static status is false - overidden StudioFramework class method "
|
|
7733
|
+
console.log("static status is false - overidden StudioFramework class method ", key);
|
|
7718
7734
|
}
|
|
7719
7735
|
|
|
7720
7736
|
return set$2(target, key, value);
|
|
7721
7737
|
}
|
|
7722
7738
|
});
|
|
7723
7739
|
this.setup.call(proxy);
|
|
7724
|
-
|
|
7725
|
-
if (this.shouldPerformStaticCheck) {
|
|
7726
|
-
if (!(window.RENDERED_STATICALLY = areAttributesStatic(opts))) {
|
|
7727
|
-
console.log('static status is false - presentationAttributes are not static');
|
|
7728
|
-
}
|
|
7729
|
-
}
|
|
7740
|
+
if (this.shouldPerformStaticCheck) window.RENDERED_STATICALLY = areAttributesStatic(opts);
|
|
7730
7741
|
} else {
|
|
7731
7742
|
this.setup();
|
|
7732
7743
|
}
|
|
@@ -8483,12 +8494,7 @@ var StudioFramework = /*#__PURE__*/function () {
|
|
|
8483
8494
|
}
|
|
8484
8495
|
|
|
8485
8496
|
if (this.shouldPerformStaticCheck) {
|
|
8486
|
-
if (
|
|
8487
|
-
console.log('static status is false - scripts have been altered by the user');
|
|
8488
|
-
} else {
|
|
8489
|
-
console.log('static status is true - static check has finished');
|
|
8490
|
-
console.log('App is static.');
|
|
8491
|
-
}
|
|
8497
|
+
if (window.RENDERED_STATICALLY = isDocumentEligibleForStaticHandling(targetElement)) console.log('static status is true - static check has finished');
|
|
8492
8498
|
}
|
|
8493
8499
|
|
|
8494
8500
|
if (format === 'html') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movable/studio-framework",
|
|
3
|
-
"version": "2.40.0-redondo-beach.
|
|
3
|
+
"version": "2.40.0-redondo-beach.4",
|
|
4
4
|
"description": "A Component library for reactive Studio apps.",
|
|
5
5
|
"author": "Movable Ink",
|
|
6
6
|
"repository": "movableink/studio-framework",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@babel/preset-react": "^7.14.5",
|
|
36
36
|
"@babel/preset-typescript": "^7.13.0",
|
|
37
37
|
"@movable/eslint-config-react": "^1.0.1",
|
|
38
|
-
"@movable/framework-types": "^2.40.0-redondo-beach.
|
|
39
|
-
"@movable/studio-framework-test-helpers": "^2.40.0-redondo-beach.
|
|
38
|
+
"@movable/framework-types": "^2.40.0-redondo-beach.4",
|
|
39
|
+
"@movable/studio-framework-test-helpers": "^2.40.0-redondo-beach.4",
|
|
40
40
|
"@types/qunit": "^2.11.1",
|
|
41
41
|
"@types/qunit-dom": "^0.7.0",
|
|
42
42
|
"@types/react": "^17.0.6",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"volta": {
|
|
69
69
|
"extends": "../../package.json"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "61ab1eb94de2426a822b42f7244b2770125c3699"
|
|
72
72
|
}
|