@uniformdev/canvas 20.77.0 → 20.77.1-alpha.10.sha-3381091ae6

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.esm.js CHANGED
@@ -3796,10 +3796,13 @@ var getParameterAttributes = ({
3796
3796
  };
3797
3797
 
3798
3798
  // src/utils/isAllowedReferrer.ts
3799
+ var ALLOWED_REFERRER_ORIGIN = /^https:\/\/([\w-]+\.)*(uniform\.(app|wtf)|uniformcode\.ai)$|^https?:\/\/localhost:\d{4}$/;
3799
3800
  var isAllowedReferrer = (referrer) => {
3800
- return Boolean(
3801
- referrer == null ? void 0 : referrer.match(/(^https:\/\/|\.)(uniform.app|uniform.wtf|uniformcode.ai|localhost:\d{4})\//)
3802
- );
3801
+ try {
3802
+ return ALLOWED_REFERRER_ORIGIN.test(new URL(referrer != null ? referrer : "").origin);
3803
+ } catch (e) {
3804
+ return false;
3805
+ }
3803
3806
  };
3804
3807
 
3805
3808
  // src/utils/isSystemComponentDefinition.ts
package/dist/index.js CHANGED
@@ -4011,10 +4011,13 @@ var getParameterAttributes = ({
4011
4011
  };
4012
4012
 
4013
4013
  // src/utils/isAllowedReferrer.ts
4014
+ var ALLOWED_REFERRER_ORIGIN = /^https:\/\/([\w-]+\.)*(uniform\.(app|wtf)|uniformcode\.ai)$|^https?:\/\/localhost:\d{4}$/;
4014
4015
  var isAllowedReferrer = (referrer) => {
4015
- return Boolean(
4016
- referrer == null ? void 0 : referrer.match(/(^https:\/\/|\.)(uniform.app|uniform.wtf|uniformcode.ai|localhost:\d{4})\//)
4017
- );
4016
+ try {
4017
+ return ALLOWED_REFERRER_ORIGIN.test(new URL(referrer != null ? referrer : "").origin);
4018
+ } catch (e) {
4019
+ return false;
4020
+ }
4018
4021
  };
4019
4022
 
4020
4023
  // src/utils/isSystemComponentDefinition.ts
package/dist/index.mjs CHANGED
@@ -3796,10 +3796,13 @@ var getParameterAttributes = ({
3796
3796
  };
3797
3797
 
3798
3798
  // src/utils/isAllowedReferrer.ts
3799
+ var ALLOWED_REFERRER_ORIGIN = /^https:\/\/([\w-]+\.)*(uniform\.(app|wtf)|uniformcode\.ai)$|^https?:\/\/localhost:\d{4}$/;
3799
3800
  var isAllowedReferrer = (referrer) => {
3800
- return Boolean(
3801
- referrer == null ? void 0 : referrer.match(/(^https:\/\/|\.)(uniform.app|uniform.wtf|uniformcode.ai|localhost:\d{4})\//)
3802
- );
3801
+ try {
3802
+ return ALLOWED_REFERRER_ORIGIN.test(new URL(referrer != null ? referrer : "").origin);
3803
+ } catch (e) {
3804
+ return false;
3805
+ }
3803
3806
  };
3804
3807
 
3805
3808
  // src/utils/isSystemComponentDefinition.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas",
3
- "version": "20.77.0",
3
+ "version": "20.77.1-alpha.10.sha-3381091ae6",
4
4
  "description": "Common functionality and types for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -36,9 +36,9 @@
36
36
  "svix": "1.96.0"
37
37
  },
38
38
  "dependencies": {
39
- "@uniformdev/assets": "20.77.0",
40
- "@uniformdev/context": "20.77.0",
41
- "@uniformdev/richtext": "20.77.0",
39
+ "@uniformdev/assets": "20.77.1-alpha.10.sha-3381091ae6",
40
+ "@uniformdev/context": "20.77.1-alpha.10.sha-3381091ae6",
41
+ "@uniformdev/richtext": "20.77.1-alpha.10.sha-3381091ae6",
42
42
  "immer": "10.2.0",
43
43
  "p-limit": "6.2.0",
44
44
  "p-retry": "6.2.1",
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "f994c88e282d803eae476fb5078e106ab66c38e0"
53
+ "gitHead": "3381091ae65d8f50effdea93e6971c369203ecaf"
54
54
  }