@product7/product7-js 0.1.9 → 0.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@product7/product7-js",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "description": "JavaScript SDK for integrating Product7 feedback widgets into any website",
5
5
  "main": "dist/product7-js.js",
6
6
  "module": "src/index.js",
@@ -35,13 +35,7 @@ export class BaseAPIService {
35
35
  if (!env || env === 'production') {
36
36
  const hostname =
37
37
  (typeof window !== 'undefined' && window.location?.hostname) || '';
38
- const isLocal =
39
- hostname === 'localhost' ||
40
- hostname === '127.0.0.1' ||
41
- /^192\.168\./.test(hostname) ||
42
- /^10\./.test(hostname) ||
43
- /^172\.(1[6-9]|2\d|3[01])\./.test(hostname);
44
- if (hostname.includes('staging') || isLocal) {
38
+ if (hostname.includes('staging')) {
45
39
  env = 'staging';
46
40
  }
47
41
  }
@@ -727,12 +727,7 @@ export class Product7 {
727
727
 
728
728
  const hostname = window.location.hostname.toLowerCase();
729
729
 
730
- if (
731
- hostname.includes('staging') ||
732
- hostname.includes('localhost') ||
733
- hostname.includes('127.0.0.1') ||
734
- hostname.includes('.local')
735
- ) {
730
+ if (hostname.includes('staging')) {
736
731
  return 'staging';
737
732
  }
738
733
 
@@ -616,8 +616,8 @@ export const messengerViewsStyles = `
616
616
 
617
617
  .messenger-help-collection-icon {
618
618
  flex-shrink: 0;
619
- width: 2.75rem;
620
- height: 2.75rem;
619
+ width: 2.25rem;
620
+ height: 2.25rem;
621
621
  display: flex;
622
622
  align-items: center;
623
623
  justify-content: center;
@@ -625,14 +625,14 @@ export const messengerViewsStyles = `
625
625
  }
626
626
 
627
627
  .messenger-help-collection-icon svg {
628
- width: 2rem;
629
- height: 2rem;
628
+ width: 1.5rem;
629
+ height: 1.5rem;
630
630
  display: block;
631
631
  flex-shrink: 0;
632
632
  }
633
633
 
634
634
  .messenger-help-collection-icon iconify-icon {
635
- font-size: 2rem;
635
+ font-size: 1.5rem;
636
636
  width: 1em;
637
637
  height: 1em;
638
638
  display: block;
@@ -370,7 +370,7 @@ export const surveyStyles = `
370
370
 
371
371
  .feedback-survey-stars {
372
372
  display: flex;
373
- gap: var(--spacing-2);
373
+ gap: var(--spacing-4);
374
374
  justify-content: center;
375
375
  }
376
376
 
@@ -378,9 +378,9 @@ export const surveyStyles = `
378
378
  background: none;
379
379
  border: none;
380
380
  cursor: pointer;
381
- font-size: 2rem;
381
+ font-size: 2.75rem;
382
382
  color: var(--color-neutral-300);
383
- padding: 0 2px;
383
+ padding: 0;
384
384
  line-height: 1;
385
385
  transition: color var(--transition-fast), transform var(--transition-fast);
386
386
  }