@movable/studio-framework 2.40.0-redondo-beach → 2.40.0-redondo-beach.3

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 CHANGED
@@ -7510,8 +7510,19 @@ var isDocumentEligibleForStaticHandling = function isDocumentEligibleForStaticHa
7510
7510
 
7511
7511
  var hasTagContainingPristinePicJs = from_1(scriptTags).some(isPristinePicJsTag);
7512
7512
 
7513
- if (!hasTagContainingPristinePicJs) return false;
7514
- if (scriptTags.length > COUNT_OF_SCRIPT_TAGS_COMPILED_BY_STUDIO) return false;
7513
+ if (!hasTagContainingPristinePicJs) {
7514
+ console.log('static statis is false - user-altered js detected');
7515
+ console.log(from_1(scriptTags).map(function (t) {
7516
+ return t.innerHTML;
7517
+ }));
7518
+ return false;
7519
+ }
7520
+
7521
+ if (scriptTags.length > COUNT_OF_SCRIPT_TAGS_COMPILED_BY_STUDIO) {
7522
+ console.log('static statis is false - user-added script tags detected');
7523
+ return false;
7524
+ }
7525
+
7515
7526
  return true;
7516
7527
  };
7517
7528
 
@@ -7554,7 +7565,11 @@ var areAttributesStatic = function areAttributesStatic(attributes) {
7554
7565
  tags = _step$value$tags === void 0 ? [] : _step$value$tags,
7555
7566
  clickthroughDynamicProperty = _step$value.clickthroughDynamicProperty,
7556
7567
  conditionalDynamicProperty = _step$value.conditionalDynamicProperty;
7557
- if (appliedElementModifiers || clickthroughDynamicProperty || conditionalDynamicProperty) return false;
7568
+
7569
+ if (appliedElementModifiers || clickthroughDynamicProperty || conditionalDynamicProperty) {
7570
+ console.log('static status is false - dynamic properties on canvas detected');
7571
+ return false;
7572
+ }
7558
7573
 
7559
7574
  var _iterator2 = _createForOfIteratorHelper$2(tags),
7560
7575
  _step2;
@@ -7562,7 +7577,11 @@ var areAttributesStatic = function areAttributesStatic(attributes) {
7562
7577
  try {
7563
7578
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
7564
7579
  var tag = _step2.value;
7565
- if (!isTagStatic(tag)) return false;
7580
+
7581
+ if (!isTagStatic(tag)) {
7582
+ console.log('static status is false - dynamic properties on tag detected');
7583
+ return false;
7584
+ }
7566
7585
  }
7567
7586
  } catch (err) {
7568
7587
  _iterator2.e(err);
@@ -7675,7 +7694,12 @@ var StudioFramework = /*#__PURE__*/function () {
7675
7694
  namespacedOptions = _opts$namespacedOptio === void 0 ? [] : _opts$namespacedOptio,
7676
7695
  _opts$queryParams = opts.queryParams,
7677
7696
  queryParams = _opts$queryParams === void 0 ? {} : _opts$queryParams;
7678
- if ((_window$MICapture = window.MICapture) !== null && _window$MICapture !== void 0 && _window$MICapture.isPreview) window.RENDERED_STATICALLY = true;
7697
+
7698
+ if ((_window$MICapture = window.MICapture) !== null && _window$MICapture !== void 0 && _window$MICapture.isPreview) {
7699
+ console.log('static status is true - static check has started');
7700
+ window.RENDERED_STATICALLY = true;
7701
+ }
7702
+
7679
7703
  this.options = options;
7680
7704
  this.namespacedOptions = namespacedOptions;
7681
7705
  this.customProps = customProps;
@@ -7697,7 +7721,11 @@ var StudioFramework = /*#__PURE__*/function () {
7697
7721
  if (this.shouldPerformStaticCheck) {
7698
7722
  var proxy = new Proxy(this, {
7699
7723
  set: function set(target, key, value) {
7700
- if (key in target) window.RENDERED_STATICALLY = false;
7724
+ if (key in target) {
7725
+ window.RENDERED_STATICALLY = false;
7726
+ console.log("static status is false - overidden StudioFramework class method ", key);
7727
+ }
7728
+
7701
7729
  return set$2(target, key, value);
7702
7730
  }
7703
7731
  });
@@ -8458,34 +8486,35 @@ var StudioFramework = /*#__PURE__*/function () {
8458
8486
  this.setupAnimation();
8459
8487
  }
8460
8488
 
8461
- if (this.shouldPerformStaticCheck && !isDocumentEligibleForStaticHandling(targetElement)) window.RENDERED_STATICALLY = false;
8462
- if (window.RENDERED_STATICALLY) console.log('App is static.');
8489
+ if (this.shouldPerformStaticCheck) {
8490
+ if (window.RENDERED_STATICALLY = isDocumentEligibleForStaticHandling(targetElement)) console.log('static status is true - static check has finished');
8491
+ }
8463
8492
 
8464
8493
  if (format === 'html') {
8465
8494
  cleanHTML(targetElement);
8466
8495
  addBrowserContent(targetElement);
8467
8496
  }
8468
8497
 
8469
- _context7.next = 30;
8498
+ _context7.next = 29;
8470
8499
  break;
8471
8500
 
8472
- case 26:
8473
- _context7.prev = 26;
8501
+ case 25:
8502
+ _context7.prev = 25;
8474
8503
  _context7.t0 = _context7["catch"](1);
8475
8504
  wrappedError = StudioErrorWrapper(_context7.t0).setCanvas(currentCanvas);
8476
8505
  this.handleRenderError(wrappedError);
8477
8506
 
8478
- case 30:
8479
- _context7.prev = 30;
8507
+ case 29:
8508
+ _context7.prev = 29;
8480
8509
  CD.resume();
8481
- return _context7.finish(30);
8510
+ return _context7.finish(29);
8482
8511
 
8483
- case 33:
8512
+ case 32:
8484
8513
  case "end":
8485
8514
  return _context7.stop();
8486
8515
  }
8487
8516
  }
8488
- }, _callee7, this, [[1, 26, 30, 33]]);
8517
+ }, _callee7, this, [[1, 25, 29, 32]]);
8489
8518
  }));
8490
8519
 
8491
8520
  function render(_x6) {
package/dist/index.js CHANGED
@@ -7520,8 +7520,19 @@ var isDocumentEligibleForStaticHandling = function isDocumentEligibleForStaticHa
7520
7520
 
7521
7521
  var hasTagContainingPristinePicJs = from_1(scriptTags).some(isPristinePicJsTag);
7522
7522
 
7523
- if (!hasTagContainingPristinePicJs) return false;
7524
- if (scriptTags.length > COUNT_OF_SCRIPT_TAGS_COMPILED_BY_STUDIO) return false;
7523
+ if (!hasTagContainingPristinePicJs) {
7524
+ console.log('static statis is false - user-altered js detected');
7525
+ console.log(from_1(scriptTags).map(function (t) {
7526
+ return t.innerHTML;
7527
+ }));
7528
+ return false;
7529
+ }
7530
+
7531
+ if (scriptTags.length > COUNT_OF_SCRIPT_TAGS_COMPILED_BY_STUDIO) {
7532
+ console.log('static statis is false - user-added script tags detected');
7533
+ return false;
7534
+ }
7535
+
7525
7536
  return true;
7526
7537
  };
7527
7538
 
@@ -7564,7 +7575,11 @@ var areAttributesStatic = function areAttributesStatic(attributes) {
7564
7575
  tags = _step$value$tags === void 0 ? [] : _step$value$tags,
7565
7576
  clickthroughDynamicProperty = _step$value.clickthroughDynamicProperty,
7566
7577
  conditionalDynamicProperty = _step$value.conditionalDynamicProperty;
7567
- if (appliedElementModifiers || clickthroughDynamicProperty || conditionalDynamicProperty) return false;
7578
+
7579
+ if (appliedElementModifiers || clickthroughDynamicProperty || conditionalDynamicProperty) {
7580
+ console.log('static status is false - dynamic properties on canvas detected');
7581
+ return false;
7582
+ }
7568
7583
 
7569
7584
  var _iterator2 = _createForOfIteratorHelper$2(tags),
7570
7585
  _step2;
@@ -7572,7 +7587,11 @@ var areAttributesStatic = function areAttributesStatic(attributes) {
7572
7587
  try {
7573
7588
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
7574
7589
  var tag = _step2.value;
7575
- if (!isTagStatic(tag)) return false;
7590
+
7591
+ if (!isTagStatic(tag)) {
7592
+ console.log('static status is false - dynamic properties on tag detected');
7593
+ return false;
7594
+ }
7576
7595
  }
7577
7596
  } catch (err) {
7578
7597
  _iterator2.e(err);
@@ -7685,7 +7704,12 @@ var StudioFramework = /*#__PURE__*/function () {
7685
7704
  namespacedOptions = _opts$namespacedOptio === void 0 ? [] : _opts$namespacedOptio,
7686
7705
  _opts$queryParams = opts.queryParams,
7687
7706
  queryParams = _opts$queryParams === void 0 ? {} : _opts$queryParams;
7688
- if ((_window$MICapture = window.MICapture) !== null && _window$MICapture !== void 0 && _window$MICapture.isPreview) window.RENDERED_STATICALLY = true;
7707
+
7708
+ if ((_window$MICapture = window.MICapture) !== null && _window$MICapture !== void 0 && _window$MICapture.isPreview) {
7709
+ console.log('static status is true - static check has started');
7710
+ window.RENDERED_STATICALLY = true;
7711
+ }
7712
+
7689
7713
  this.options = options;
7690
7714
  this.namespacedOptions = namespacedOptions;
7691
7715
  this.customProps = customProps;
@@ -7707,7 +7731,11 @@ var StudioFramework = /*#__PURE__*/function () {
7707
7731
  if (this.shouldPerformStaticCheck) {
7708
7732
  var proxy = new Proxy(this, {
7709
7733
  set: function set(target, key, value) {
7710
- if (key in target) window.RENDERED_STATICALLY = false;
7734
+ if (key in target) {
7735
+ window.RENDERED_STATICALLY = false;
7736
+ console.log("static status is false - overidden StudioFramework class method ", key);
7737
+ }
7738
+
7711
7739
  return set$2(target, key, value);
7712
7740
  }
7713
7741
  });
@@ -8468,34 +8496,35 @@ var StudioFramework = /*#__PURE__*/function () {
8468
8496
  this.setupAnimation();
8469
8497
  }
8470
8498
 
8471
- if (this.shouldPerformStaticCheck && !isDocumentEligibleForStaticHandling(targetElement)) window.RENDERED_STATICALLY = false;
8472
- if (window.RENDERED_STATICALLY) console.log('App is static.');
8499
+ if (this.shouldPerformStaticCheck) {
8500
+ if (window.RENDERED_STATICALLY = isDocumentEligibleForStaticHandling(targetElement)) console.log('static status is true - static check has finished');
8501
+ }
8473
8502
 
8474
8503
  if (format === 'html') {
8475
8504
  cleanHTML(targetElement);
8476
8505
  addBrowserContent(targetElement);
8477
8506
  }
8478
8507
 
8479
- _context7.next = 30;
8508
+ _context7.next = 29;
8480
8509
  break;
8481
8510
 
8482
- case 26:
8483
- _context7.prev = 26;
8511
+ case 25:
8512
+ _context7.prev = 25;
8484
8513
  _context7.t0 = _context7["catch"](1);
8485
8514
  wrappedError = StudioErrorWrapper(_context7.t0).setCanvas(currentCanvas);
8486
8515
  this.handleRenderError(wrappedError);
8487
8516
 
8488
- case 30:
8489
- _context7.prev = 30;
8517
+ case 29:
8518
+ _context7.prev = 29;
8490
8519
  CD__default['default'].resume();
8491
- return _context7.finish(30);
8520
+ return _context7.finish(29);
8492
8521
 
8493
- case 33:
8522
+ case 32:
8494
8523
  case "end":
8495
8524
  return _context7.stop();
8496
8525
  }
8497
8526
  }
8498
- }, _callee7, this, [[1, 26, 30, 33]]);
8527
+ }, _callee7, this, [[1, 25, 29, 32]]);
8499
8528
  }));
8500
8529
 
8501
8530
  function render(_x6) {
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.3",
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.3",
39
+ "@movable/studio-framework-test-helpers": "^2.40.0-redondo-beach.3",
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": "982821b947e7334c59c34609dcab01e622fbb898"
71
+ "gitHead": "61ab1eb94de2426a822b42f7244b2770125c3699"
72
72
  }