pushfeedback 0.1.75 → 0.1.78

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.
@@ -26,7 +26,9 @@
26
26
  top: 0;
27
27
  width: 100%;
28
28
  z-index: var(--feedback-modal-screnshot-z-index);
29
- transition: opacity 0.2s ease-out;
29
+ transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
30
+ backdrop-filter: blur(4px);
31
+ -webkit-backdrop-filter: blur(4px);
30
32
  }
31
33
 
32
34
  .feedback-overlay--visible {
@@ -40,23 +42,27 @@
40
42
 
41
43
  .feedback-modal-content {
42
44
  background-color: var(--feedback-modal-content-bg-color);
43
- border-color: 1px solid var(--feedback-modal-header-text-color);
45
+ border: 1px solid rgba(0, 0, 0, 0.08);
44
46
  border-radius: var(--feedback-modal-content-border-radius);
45
- box-shadow: 0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);
47
+ box-shadow:
48
+ 0px 0px 0px 1px rgba(0, 0, 0, 0.02),
49
+ 0px 2px 4px rgba(0, 0, 0, 0.04),
50
+ 0px 8px 16px rgba(0, 0, 0, 0.06),
51
+ 0px 16px 32px rgba(0, 0, 0, 0.04);
46
52
  box-sizing: border-box;
47
53
  color: var(--feedback-modal-content-text-color);
48
54
  display: flex;
49
55
  flex-direction: column;
50
56
  left: 50%;
51
57
  max-width: 90%;
52
- padding: 20px;
58
+ padding: 24px;
53
59
  position: fixed;
54
60
  top: 50%;
55
- transform: translate(-50%, -50%) scale(0.95);
61
+ transform: translate(-50%, -50%) scale(0.96);
56
62
  opacity: 0;
57
63
  width: 100%;
58
64
  z-index: var(--feedback-modal-content-z-index);
59
- transition: transform 0.2s ease-out, opacity 0.2s ease-out;
65
+ transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
60
66
  }
61
67
 
62
68
  .feedback-modal-content--open {
@@ -71,38 +77,60 @@
71
77
  font-size: var(--feedback-header-font-size);
72
78
  font-weight: var(--feedback-modal-header-font-weight);
73
79
  justify-content: space-between;
74
- margin-bottom: 20px;
80
+ margin-bottom: 24px;
81
+ letter-spacing: -0.01em;
82
+ }
83
+
84
+ .feedback-modal-header--no-content {
85
+ margin-bottom: 0;
75
86
  }
76
87
 
77
88
  .feedback-modal-rating-buttons {
78
89
  width: 100%;
79
- margin-bottom: 20px;
90
+ margin-bottom: 24px;
91
+ display: flex;
92
+ gap: 4px;
80
93
  }
81
94
 
82
95
  .feedback-modal-rating-button {
83
96
  padding: 0;
84
97
  background-color: transparent;
85
98
  border: transparent;
86
- margin-right: 5px;
99
+ margin-right: 8px;
87
100
  cursor: pointer;
88
101
  }
89
102
 
103
+ /* Star rating buttons - animations are fine here */
104
+ .feedback-modal-rating-buttons--stars .feedback-modal-rating-button {
105
+ transition: transform 0.15s ease, opacity 0.15s ease;
106
+ }
107
+
108
+ .feedback-modal-rating-buttons--stars .feedback-modal-rating-button:hover {
109
+ transform: scale(1.1);
110
+ }
111
+
90
112
  .feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button {
91
- border: 1px solid var(--feedback-modal-button-border-color);
113
+ border: 1.5px solid var(--feedback-modal-button-border-color);
92
114
  border-radius: var(--feedback-modal-button-border-radius);
93
115
  color: var(--feedback-modal-button-text-color);
94
116
  font-size: var(--feedback-modal-button-font-size);
95
-
96
117
  font-weight: 500;
97
- margin-right: 10px;
118
+ margin-right: 12px;
98
119
  justify-content: center;
99
- padding: 5px 10px;
120
+ padding: 10px 16px;
121
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
122
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
123
+ }
124
+
125
+ .feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover {
126
+ transform: translateY(-2px);
127
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
100
128
  }
101
129
 
102
130
  .feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover,
103
131
  .feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected {
104
132
  background-color: var(--feedback-modal-button-bg-color-active);
105
- border: 1px solid var(--feedback-modal-button-border-color-active);
133
+ border: 1.5px solid var(--feedback-modal-button-border-color-active);
106
134
  color: var(--feedback-modal-button-text-color-active);
107
135
  }
108
136
 
@@ -123,7 +151,7 @@
123
151
 
124
152
  .feedback-modal-text textarea {
125
153
  background-color: var(--feedback-modal-input-bg-color);
126
- border: 1px solid var(--feedback-modal-input-border-color);
154
+ border: 1.5px solid var(--feedback-modal-input-border-color);
127
155
  border-radius: var(--feedback-modal-input-border-radius);
128
156
  box-sizing: border-box;
129
157
  color: var(--feedback-modal-input-text-color);
@@ -131,24 +159,34 @@
131
159
  margin-bottom: 20px;
132
160
  height: 100px;
133
161
  min-height: 100px;
134
- padding: 10px;
162
+ padding: 12px;
135
163
  resize: vertical;
136
164
  width: 100%;
165
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
166
+ line-height: 1.5;
167
+ }
168
+
169
+ .feedback-modal-text textarea:hover {
170
+ border-color: rgba(0, 0, 0, 0.2);
137
171
  }
138
172
 
139
173
 
140
174
  .feedback-modal-email input {
141
175
  background-color: var(--feedback-modal-input-bg-color);
142
- border: 1px solid var(--feedback-modal-input-border-color);
176
+ border: 1.5px solid var(--feedback-modal-input-border-color);
143
177
  border-radius: var(--feedback-modal-input-border-radius);
144
178
  box-sizing: border-box;
145
179
  color: var(--feedback-modal-input-text-color);
146
180
  font-size: var(--feedback-modal-input-font-size);
147
181
  margin-bottom: 20px;
148
- height: 40px;
149
- padding: 10px;
182
+ height: 44px;
183
+ padding: 12px;
150
184
  width: 100%;
151
- margin-bottom: 20px;
185
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
186
+ }
187
+
188
+ .feedback-modal-email input:hover {
189
+ border-color: rgba(0, 0, 0, 0.2);
152
190
  }
153
191
 
154
192
  .feedback-modal-privacy {
@@ -158,8 +196,9 @@
158
196
 
159
197
 
160
198
  .feedback-modal-text textarea:focus, .feedback-modal-email input:focus {
161
- border: 1px solid var(--feedback-modal-input-border-color-focused);
199
+ border: 1.5px solid var(--feedback-modal-input-border-color-focused);
162
200
  outline: none;
201
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
163
202
  }
164
203
 
165
204
  .feedback-modal-buttons {
@@ -174,7 +213,7 @@
174
213
  .feedback-modal-button {
175
214
  align-items: center;
176
215
  background-color: transparent;
177
- border: 1px solid var(--feedback-modal-button-border-color);
216
+ border: 1.5px solid var(--feedback-modal-button-border-color);
178
217
  border-radius: var(--feedback-modal-button-border-radius);
179
218
  color: var(--feedback-modal-button-text-color);
180
219
  cursor: pointer;
@@ -182,8 +221,10 @@
182
221
  font-size: var(--feedback-modal-button-font-size);
183
222
  font-weight: 500;
184
223
  justify-content: center;
185
- min-height: 40px;
186
- padding: 5px 10px;
224
+ min-height: 44px;
225
+ padding: 10px 16px;
226
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
227
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
187
228
  }
188
229
 
189
230
  .feedback-modal-button svg {
@@ -201,29 +242,41 @@
201
242
 
202
243
  .feedback-modal-button--submit {
203
244
  background-color: var(--feedback-modal-button-submit-bg-color);
204
- border: 1px solid var(--feedback-modal-button-border-color-active);
245
+ border: 1.5px solid var(--feedback-modal-button-border-color-active);
205
246
  color: var(--feedback-modal-button-submit-text-color);
247
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
206
248
  }
207
249
 
208
250
  .feedback-modal-button:hover,
209
251
  .feedback-modal-button--active {
210
252
  background-color: var(--feedback-modal-button-bg-color-active);
211
- border: 1px solid var(--feedback-modal-button-border-color-active);
253
+ border: 1.5px solid var(--feedback-modal-button-border-color-active);
212
254
  color: var(--feedback-modal-button-text-color-active);
255
+ transform: translateY(-1px);
256
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
213
257
  }
214
258
 
215
259
  .feedback-modal-button--submit:hover{
216
260
  background-color: var(--feedback-modal-button-submit-bg-color-hover);
217
- border: 1px solid var(--feedback-modal-button-submit-border-color-hover);
261
+ border: 1.5px solid var(--feedback-modal-button-submit-border-color-hover);
218
262
  color: var(--feedback-modal-button-submit-text-color-hover);
263
+ transform: translateY(-1px);
264
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
265
+ }
266
+
267
+ .feedback-modal-button--submit:active {
268
+ transform: translateY(0);
269
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
219
270
  }
220
271
 
221
272
 
222
273
  .feedback-modal-input-heading{
223
274
  display: block;
224
275
  font-size: 14px;
225
- font-weight: 300;
226
- padding-bottom: 10px;
276
+ font-weight: 500;
277
+ padding-bottom: 12px;
278
+ color: var(--feedback-modal-header-text-color);
279
+ letter-spacing: -0.01em;
227
280
  }
228
281
 
229
282
  .feedback-modal-footer {
@@ -252,12 +305,25 @@
252
305
  .feedback-modal-close {
253
306
  background-color: var(--feedback-modal-close-bg-color);
254
307
  border: 0;
255
- border-radius: 50%;
308
+ border-radius: 6px;
256
309
  cursor: pointer;
257
- height: 22px;
310
+ height: 32px;
311
+ width: 32px;
258
312
  margin-left: auto;
259
313
  padding: 0;
260
- width: 22px;
314
+ display: flex;
315
+ align-items: center;
316
+ justify-content: center;
317
+ transition: all 0.2s ease;
318
+ }
319
+
320
+ .feedback-modal-close:hover {
321
+ background-color: rgba(0, 0, 0, 0.06);
322
+ transform: scale(1.05);
323
+ }
324
+
325
+ .feedback-modal-close:active {
326
+ transform: scale(0.95);
261
327
  }
262
328
 
263
329
  .feedback-modal-close svg {
@@ -305,7 +371,13 @@
305
371
 
306
372
  .feedback-modal-message {
307
373
  font-size: var(--feedback-modal-message-font-size);
308
- margin-top: 0;
374
+ margin: 0;
375
+ line-height: 1.6;
376
+ color: var(--feedback-modal-content-text-color);
377
+ }
378
+
379
+ .feedback-modal-success {
380
+ text-align: center;
309
381
  }
310
382
 
311
383
 
@@ -324,18 +396,20 @@
324
396
 
325
397
  .screenshot-preview {
326
398
  display: inline-block;
327
- width: 30px;
328
- height: 30px;
399
+ width: 32px;
400
+ height: 32px;
329
401
  overflow: hidden;
330
- border-radius: 4px;
402
+ border-radius: 6px;
331
403
  margin-right: 10px;
332
404
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
333
405
  cursor: pointer;
334
- transition: transform 0.2s ease;
406
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
407
+ border: 2px solid rgba(255, 255, 255, 0.8);
335
408
  }
336
409
 
337
410
  .screenshot-preview:hover {
338
- transform: scale(1.1);
411
+ transform: scale(1.15);
412
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
339
413
  }
340
414
 
341
415
  .screenshot-preview img {
@@ -507,13 +581,16 @@
507
581
 
508
582
  .screenshot-error-content {
509
583
  background: #fee;
510
- border: 1px solid #fcc;
511
- border-radius: 8px;
512
- padding: 12px 16px;
584
+ border: 1.5px solid #fcc;
585
+ border-radius: 10px;
586
+ padding: 14px 18px;
513
587
  display: flex;
514
588
  align-items: center;
515
589
  gap: 12px;
516
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
590
+ box-shadow:
591
+ 0 0 0 1px rgba(197, 48, 48, 0.05),
592
+ 0 4px 6px rgba(0, 0, 0, 0.07),
593
+ 0 10px 20px rgba(0, 0, 0, 0.1);
517
594
  color: #c53030;
518
595
  }
519
596
 
@@ -533,15 +610,66 @@
533
610
  background: none;
534
611
  border: none;
535
612
  cursor: pointer;
536
- padding: 4px;
537
- border-radius: 4px;
613
+ padding: 6px;
614
+ border-radius: 6px;
538
615
  color: #c53030;
539
616
  flex-shrink: 0;
540
- transition: background-color 0.2s ease;
617
+ transition: all 0.2s ease;
618
+ display: flex;
619
+ align-items: center;
620
+ justify-content: center;
541
621
  }
542
622
 
543
623
  .error-close-btn:hover {
544
- background: rgba(197, 48, 48, 0.1);
624
+ background: rgba(197, 48, 48, 0.15);
625
+ transform: scale(1.1);
626
+ }
627
+
628
+ .error-close-btn:active {
629
+ transform: scale(0.95);
630
+ }
631
+
632
+ /* Mobile styles */
633
+ @media screen and (max-width: 768px) {
634
+ .feedback-modal-content {
635
+ width: 100vw;
636
+ height: 100dvh;
637
+ max-width: none;
638
+ border-radius: 0;
639
+ top: 0;
640
+ left: 0;
641
+ transform: scale(0.95);
642
+ padding: 24px 20px;
643
+ display: flex;
644
+ flex-direction: column;
645
+ }
646
+
647
+ .feedback-modal-content--open {
648
+ transform: scale(1);
649
+ }
650
+
651
+ /* Hide screenshot button on mobile */
652
+ .feedback-modal-buttons {
653
+ display: flex;
654
+ flex-direction: column;
655
+ gap: 12px;
656
+ }
657
+
658
+ .feedback-modal-button--screenshot {
659
+ display: none !important;
660
+ }
661
+
662
+ /* Make submit button full width */
663
+ .feedback-modal-button--submit {
664
+ width: 100%;
665
+ }
666
+
667
+ /* Adjust text area for mobile */
668
+ .feedback-modal-text textarea {
669
+ flex: 1;
670
+ min-height: 120px;
671
+ resize: none;
672
+ }
545
673
  }
546
674
 
547
675
 
@@ -258,7 +258,7 @@ export class FeedbackModal {
258
258
  this.selectedRating = newRating;
259
259
  }
260
260
  render() {
261
- return (h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''}` }, this.showCanvasEditor && (h("canvas-editor", { ref: (el) => this.canvasEditorRef = el, "canvas-editor-title": this.screenshotEditorTitle, "canvas-editor-cancel-text": this.screenshotEditorCancelText, "canvas-editor-save-text": this.screenshotEditorSaveText, "screenshot-taking-text": this.screenshotTakingText, "screenshot-attached-text": this.screenshotAttachedText, "screenshot-button-text": this.screenshotButtonText, "auto-start-screenshot": this.autoStartCapture, "existing-screenshot": this.encodedScreenshot || '', "edit-text-button-text": this.screenshotEditTextButtonText, "size-label-text": this.screenshotSizeLabelText, "border-label-text": this.screenshotBorderLabelText, "edit-text-prompt-text": this.screenshotEditTextPromptText, "screenshot-error-general": this.screenshotErrorGeneral, "screenshot-error-permission": this.screenshotErrorPermission, "screenshot-error-not-supported": this.screenshotErrorNotSupported, "screenshot-error-not-found": this.screenshotErrorNotFound, "screenshot-error-cancelled": this.screenshotErrorCancelled, "screenshot-error-browser-not-supported": this.screenshotErrorBrowserNotSupported, "screenshot-error-unexpected": this.screenshotErrorUnexpected, onScreenshotReady: this.handleScreenshotReady, onScreenshotCancelled: this.handleScreenshotCancelled, onScreenshotFailed: this.handleScreenshotError })), this.showScreenshotError && (h("div", { class: "screenshot-error-notification" }, h("div", { class: "screenshot-error-content" }, h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("circle", { cx: "12", cy: "12", r: "10" }), h("line", { x1: "15", y1: "9", x2: "9", y2: "15" }), h("line", { x1: "9", y1: "9", x2: "15", y2: "15" })), h("span", null, this.screenshotError), h("button", { class: "error-close-btn", onClick: () => this.showScreenshotError = false, title: "Close" }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))))), this.showModal && (h("div", { class: `feedback-overlay ${this.isAnimating ? 'feedback-overlay--visible' : ''}` })), this.showModal && (h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.isAnimating ? 'feedback-modal-content--open' : ''}`, ref: (el) => (this.modalContent = el) }, h("div", { class: "feedback-modal-header" }, !this.formSuccess && !this.formError ? (h("span", null, this.modalTitle)) : this.formSuccess ? (h("span", null, this.modalTitleSuccess)) : (h("span", null, this.modalTitleError)), h("button", { class: "feedback-modal-close", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1
261
+ return (h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''}` }, this.showCanvasEditor && (h("canvas-editor", { ref: (el) => this.canvasEditorRef = el, "canvas-editor-title": this.screenshotEditorTitle, "canvas-editor-cancel-text": this.screenshotEditorCancelText, "canvas-editor-save-text": this.screenshotEditorSaveText, "screenshot-taking-text": this.screenshotTakingText, "screenshot-attached-text": this.screenshotAttachedText, "screenshot-button-text": this.screenshotButtonText, "auto-start-screenshot": this.autoStartCapture, "existing-screenshot": this.encodedScreenshot || '', "edit-text-button-text": this.screenshotEditTextButtonText, "size-label-text": this.screenshotSizeLabelText, "border-label-text": this.screenshotBorderLabelText, "edit-text-prompt-text": this.screenshotEditTextPromptText, "screenshot-error-general": this.screenshotErrorGeneral, "screenshot-error-permission": this.screenshotErrorPermission, "screenshot-error-not-supported": this.screenshotErrorNotSupported, "screenshot-error-not-found": this.screenshotErrorNotFound, "screenshot-error-cancelled": this.screenshotErrorCancelled, "screenshot-error-browser-not-supported": this.screenshotErrorBrowserNotSupported, "screenshot-error-unexpected": this.screenshotErrorUnexpected, onScreenshotReady: this.handleScreenshotReady, onScreenshotCancelled: this.handleScreenshotCancelled, onScreenshotFailed: this.handleScreenshotError })), this.showScreenshotError && (h("div", { class: "screenshot-error-notification" }, h("div", { class: "screenshot-error-content" }, h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("circle", { cx: "12", cy: "12", r: "10" }), h("line", { x1: "15", y1: "9", x2: "9", y2: "15" }), h("line", { x1: "9", y1: "9", x2: "15", y2: "15" })), h("span", null, this.screenshotError), h("button", { class: "error-close-btn", onClick: () => this.showScreenshotError = false, title: "Close" }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))))), this.showModal && (h("div", { class: `feedback-overlay ${this.isAnimating ? 'feedback-overlay--visible' : ''}` })), this.showModal && (h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.isAnimating ? 'feedback-modal-content--open' : ''}`, ref: (el) => (this.modalContent = el) }, h("div", { class: `feedback-modal-header ${(this.formSuccess && !this.successMessage) || (this.formError && !this.errorMessage) ? 'feedback-modal-header--no-content' : ''}` }, !this.formSuccess && !this.formError ? (h("span", null, this.modalTitle)) : this.formSuccess ? (h("span", null, this.modalTitleSuccess)) : (h("span", null, this.modalTitleError)), h("button", { class: "feedback-modal-close", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1
262
262
  ? 'feedback-modal-rating-button--selected'
263
263
  : ''}`, onClick: (event) => {
264
264
  event.preventDefault();
@@ -274,7 +274,7 @@ export class FeedbackModal {
274
274
  event.preventDefault();
275
275
  this.handleRatingChange(rating);
276
276
  } }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })))))))))), h("div", { class: "feedback-modal-text" }, h("textarea", { placeholder: this.messagePlaceholder, value: this.formMessage, onInput: (event) => this.handleMessageInput(event) })), !this.hideEmail && (h("div", { class: "feedback-modal-email" }, h("input", { placeholder: this.emailPlaceholder, type: "email", onInput: (event) => this.handleEmailInput(event), value: this.formEmail, required: this.isEmailRequired }))), h("div", { class: "feedback-verification" }, h("input", { type: "text", name: "verification", style: { display: 'none' }, onInput: (event) => this.handleVerification(event), value: this.formVerification })), !this.hidePrivacyPolicy && (h("div", { class: "feedback-modal-privacy" }, h("input", { type: "checkbox", id: "privacyPolicy", onChange: (ev) => this.handleCheckboxChange(ev), required: true }), h("span", { innerHTML: this.privacyPolicyText }))), h("div", { class: `feedback-modal-buttons ${this.hideScreenshotButton ? 'single' : ''}` }, !this.hideScreenshotButton && (h("button", { type: "button", class: `feedback-modal-button feedback-modal-button--screenshot ${this.encodedScreenshot ? 'feedback-modal-button--active' : ''}`, onClick: this.openScreenShot, disabled: this.sending || this.takingScreenshot }, this.encodedScreenshot && (h("div", { class: "screenshot-preview", onClick: this.openCanvasEditor }, h("img", { src: this.encodedScreenshot, alt: "Screenshot Preview" }))), !this.encodedScreenshot && !this.takingScreenshot && (h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, h("path", { d: "M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z" }))), this.takingScreenshot && (h("div", { class: "screenshot-loading" }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#666", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather-loader" }, h("line", { x1: "12", y1: "2", x2: "12", y2: "6" }), h("line", { x1: "12", y1: "18", x2: "12", y2: "22" }), h("line", { x1: "4.93", y1: "4.93", x2: "7.76", y2: "7.76" }), h("line", { x1: "16.24", y1: "16.24", x2: "19.07", y2: "19.07" }), h("line", { x1: "2", y1: "12", x2: "6", y2: "12" }), h("line", { x1: "18", y1: "12", x2: "22", y2: "12" }), h("line", { x1: "4.93", y1: "19.07", x2: "7.76", y2: "16.24" }), h("line", { x1: "16.24", y1: "7.76", x2: "19.07", y2: "4.93" })))), this.takingScreenshot ? this.screenshotTakingText :
277
- this.encodedScreenshot ? this.screenshotAttachedText : this.screenshotButtonText)), h("button", { class: "feedback-modal-button feedback-modal-button--submit", type: "submit", disabled: this.sending }, this.sendButtonText)))) : this.formSuccess && !this.formError ? (h("div", { class: "feedback-modal-success" }, h("p", { class: "feedback-modal-message" }, this.successMessage))) : this.formError && this.formErrorStatus == 404 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage404)) : this.formError && this.formErrorStatus == 403 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage403)) : this.formError ? (h("p", { class: "feedback-modal-message" }, this.errorMessage)) : (h("span", null))), h("div", { class: "feedback-modal-footer" }, h("div", { class: "feedback-logo", style: { display: this.whitelabel ? 'none' : 'block' } }, "Powered by", ' ', h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com")), this.footerText && (h("div", { class: "feedback-footer-text" }, h("span", { innerHTML: this.footerText }))))))));
277
+ this.encodedScreenshot ? this.screenshotAttachedText : this.screenshotButtonText)), h("button", { class: "feedback-modal-button feedback-modal-button--submit", type: "submit", disabled: this.sending }, this.sendButtonText)))) : this.formSuccess && !this.formError ? (h("div", { class: "feedback-modal-success" }, h("p", { class: "feedback-modal-message" }, this.successMessage))) : this.formError && this.formErrorStatus == 404 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage404)) : this.formError && this.formErrorStatus == 403 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage403)) : this.formError ? (h("p", { class: "feedback-modal-message" }, this.errorMessage)) : (h("span", null))), !this.formSuccess && (h("div", { class: "feedback-modal-footer" }, h("div", { class: "feedback-logo", style: { display: this.whitelabel ? 'none' : 'block' } }, "Powered by", ' ', h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com")), this.footerText && (h("div", { class: "feedback-footer-text" }, h("span", { innerHTML: this.footerText })))))))));
278
278
  }
279
279
  componentDidRender() {
280
280
  if (this.showModal) {
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
 
3
- const canvasEditorCss = ":host{display:block}.canvas-editor-wrapper{position:relative}.canvas-editor-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.8);display:flex;align-items:center;justify-content:center;z-index:9999}.canvas-editor-modal{width:95vw;max-width:1400px;max-height:900px;background:var(--feedback-canvas-editor-bg-color, #ffffff);border-radius:8px;border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 10px 40px rgba(0, 0, 0, 0.2)}.canvas-editor-header{background:var(--feedback-canvas-editor-header-bg-color, #f5f5f5);border-bottom:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);padding:12px 16px;display:flex;flex-direction:column;gap:12px}.canvas-editor-title h3{margin:0;font-size:16px;font-weight:600;color:var(--feedback-canvas-editor-tool-text-color, #333)}.canvas-editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.toolbar-section{display:flex;align-items:center;gap:8px}.tool-group{display:flex;align-items:center;gap:4px}.tool-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;cursor:pointer;transition:all 0.2s ease;padding:0}.tool-btn svg{width:18px;height:18px;color:var(--feedback-canvas-editor-tool-text-color, #333)}.tool-btn:hover:not(:disabled){background:var(--feedback-canvas-editor-tool-bg-hover, #f0f0f0)}.tool-btn.active,.tool-btn.active:hover{background:var(--feedback-canvas-editor-tool-bg-active, #0070f4);color:var(--feedback-canvas-editor-tool-text-active, #ffffff)}.tool-btn.active svg{color:var(--feedback-canvas-editor-tool-text-active, #ffffff)}.tool-btn:disabled{opacity:0.4;cursor:not-allowed;color:var(--feedback-canvas-editor-tool-text-color, #333)}.toolbar-divider{width:1px;height:24px;background:var(--feedback-canvas-editor-divider-color, #e0e0e0);margin:0 4px}.undo-btn{background:var(--feedback-canvas-editor-tool-bg-color, #ffffff) !important;border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0) !important}.undo-btn:hover:not(:disabled){background:var(--feedback-canvas-editor-tool-bg-hover, #f0f0f0) !important}.color-palette{display:flex;align-items:center;gap:6px}.color-slot-wrapper{position:relative;display:flex;align-items:center}.color-btn{width:32px;height:32px;border-radius:6px;border:2px solid transparent;cursor:pointer;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0)}.color-btn:hover{transform:scale(1.1)}.color-btn.active{border-color:var(--feedback-primary-color, #0070f4);box-shadow:0 0 0 2px rgba(0, 112, 244, 0.2)}.color-btn.editing{border-color:var(--feedback-primary-color, #0070f4)}.color-picker-dropdown{position:absolute;top:100%;left:0;z-index:1000;margin-top:4px;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;padding:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)}.color-picker-dropdown input[type=\"color\"]{width:40px;height:40px;border:none;border-radius:4px;cursor:pointer}.size-control{display:flex;align-items:center;gap:8px;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;padding:6px 12px}.size-slider{width:80px;height:20px;-webkit-appearance:none;appearance:none;background:transparent;cursor:pointer}.size-slider::-webkit-slider-track{width:100%;height:4px;background:var(--feedback-canvas-editor-slider-track, #e0e0e0);border-radius:2px}.size-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;cursor:pointer}.size-slider::-moz-range-track{width:100%;height:4px;background:var(--feedback-canvas-editor-slider-track, #e0e0e0);border-radius:2px;border:none}.size-slider::-moz-range-thumb{width:16px;height:16px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;border:none;cursor:pointer}.size-slider::-ms-track{width:100%;height:4px;background:var(--feedback-canvas-editor-slider-track, #e0e0e0);border-radius:2px;border:none;color:transparent}.size-slider::-ms-thumb{width:16px;height:16px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;border:none;cursor:pointer}.size-value{font-weight:500;color:var(--feedback-canvas-editor-tool-text-color, #333);font-size:12px;min-width:30px}.selected-annotation-controls{border-left:2px solid var(--feedback-canvas-editor-divider-color, #e0e0e0);padding-left:12px;margin-left:8px;min-width:200px}.text-controls{display:flex;flex-direction:row;align-items:center;gap:12px}.font-size-control,.border-width-control{display:flex;align-items:center;gap:6px}.font-size-control label,.border-width-control label{font-size:12px;color:var(--feedback-canvas-editor-tool-text-color, #333);font-weight:500;min-width:35px}.action-btn{display:flex;align-items:center;gap:6px;padding:5px 12px;border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;transition:all 0.2s ease;min-width:65px;justify-content:center;height:36px}.action-btn.secondary{background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);color:var(--feedback-canvas-editor-tool-text-color, #333);border-color:var(--feedback-canvas-editor-border-color, #e0e0e0)}.action-btn.secondary:hover{background:var(--feedback-canvas-editor-tool-bg-hover, #f0f0f0)}.action-btn.primary{background:var(--feedback-primary-color, #0070f4);color:#ffffff;border-color:var(--feedback-primary-color, #0070f4)}.action-btn.primary:hover{background:#0056cc;border-color:#0056cc}.action-btn.small{height:28px;padding:4px 8px;font-size:12px;min-width:65px}.shape-controls{display:flex;flex-direction:column;gap:8px}.canvas-editor-content{flex:1;display:flex;align-items:center;justify-content:center;padding:16px;background:var(--feedback-canvas-editor-content-bg, #f5f5f5);overflow:hidden;min-height:0;min-width:0}.annotation-canvas{max-width:100%;max-height:100%;width:auto;height:auto;cursor:crosshair;border-radius:6px;box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);background:#ffffff;transition:box-shadow 0.3s ease;object-fit:contain;display:block}.annotation-canvas:hover{box-shadow:0px 2px 4px 0px rgba(60, 64, 67, .35), 0px 4px 12px 4px rgba(60, 64, 67, .20)}@media screen and (max-width: 768px){.canvas-editor-modal{width:100vw;height:100vh;border-radius:0}.canvas-editor-toolbar{flex-direction:column;align-items:stretch;gap:8px}.toolbar-section{justify-content:center}.selected-annotation-controls{border-left:none;border-top:2px solid var(--feedback-canvas-editor-divider-color, #e0e0e0);padding-left:0;padding-top:8px;margin-left:0;margin-top:8px;min-width:auto}}";
3
+ const canvasEditorCss = ":host{display:block}.canvas-editor-wrapper{position:relative}.canvas-editor-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.8);display:flex;align-items:center;justify-content:center;z-index:9999}.canvas-editor-modal{width:95vw;height:95vh;max-width:none;max-height:none;background:var(--feedback-canvas-editor-bg-color, #ffffff);border-radius:12px;border:1px solid rgba(0, 0, 0, 0.08);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.02),\n 0 8px 16px rgba(0, 0, 0, 0.08),\n 0 16px 32px rgba(0, 0, 0, 0.08),\n 0 32px 64px rgba(0, 0, 0, 0.06)}.canvas-editor-header{background:var(--feedback-canvas-editor-header-bg-color, #fafafa);border-bottom:1px solid rgba(0, 0, 0, 0.06);padding:16px 20px;display:flex;flex-direction:column;gap:16px}.canvas-editor-title h3{margin:0;font-size:18px;font-weight:600;color:var(--feedback-canvas-editor-tool-text-color, #1a1a1a);letter-spacing:-0.02em}.canvas-editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.toolbar-section{display:flex;align-items:center;gap:8px}.tool-group{display:flex;align-items:center;gap:4px}.tool-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1.5px solid rgba(0, 0, 0, 0.08);border-radius:8px;cursor:pointer;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);padding:0;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.tool-btn svg{width:18px;height:18px;color:var(--feedback-canvas-editor-tool-text-color, #333)}.tool-btn:hover:not(:disabled){background:var(--feedback-canvas-editor-tool-bg-hover, #f5f5f5);border-color:rgba(0, 0, 0, 0.12);transform:translateY(-1px);box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}.tool-btn.active,.tool-btn.active:hover{background:var(--feedback-canvas-editor-tool-bg-active, #0070f4);color:var(--feedback-canvas-editor-tool-text-active, #ffffff);border-color:var(--feedback-canvas-editor-tool-bg-active, #0070f4);box-shadow:0 2px 8px rgba(0, 112, 244, 0.3)}.tool-btn.active svg{color:var(--feedback-canvas-editor-tool-text-active, #ffffff)}.tool-btn:disabled{opacity:0.4;cursor:not-allowed;color:var(--feedback-canvas-editor-tool-text-color, #333)}.toolbar-divider{width:1px;height:24px;background:var(--feedback-canvas-editor-divider-color, #e0e0e0);margin:0 4px}.undo-btn,.delete-btn{background:var(--feedback-canvas-editor-tool-bg-color, #ffffff) !important;border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0) !important}.undo-btn:hover:not(:disabled),.delete-btn:hover:not(:disabled){background:var(--feedback-canvas-editor-tool-bg-hover, #f0f0f0) !important}.undo-btn:disabled,.delete-btn:disabled{opacity:0.3;cursor:not-allowed}.delete-btn:hover:not(:disabled){background:#fee !important;border-color:#fcc !important}.delete-btn:hover:not(:disabled) svg{color:#c53030}.color-palette{display:flex;align-items:center;gap:6px}.color-slot-wrapper{position:relative;display:flex;align-items:center}.color-btn{width:32px;height:32px;border-radius:8px;border:2px solid transparent;cursor:pointer;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);display:flex;align-items:center;justify-content:center;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:2px solid rgba(0, 0, 0, 0.08);box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.color-btn:hover{transform:translateY(-2px) scale(1.05);box-shadow:0 4px 8px rgba(0, 0, 0, 0.12)}.color-btn.active{border-color:var(--feedback-primary-color, #0070f4);box-shadow:0 0 0 2px rgba(0, 112, 244, 0.2)}.color-btn.editing{border-color:var(--feedback-primary-color, #0070f4)}.color-picker-dropdown{position:absolute;top:100%;left:0;z-index:1000;margin-top:4px;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;padding:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)}.color-picker-dropdown input[type=\"color\"]{width:40px;height:40px;border:none;border-radius:4px;cursor:pointer}.size-control{display:flex;align-items:center;gap:8px;background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);border:1px solid var(--feedback-canvas-editor-border-color, #e0e0e0);border-radius:6px;padding:6px 12px}.size-slider{width:80px;height:14px;-webkit-appearance:none;appearance:none;background:transparent;border-radius:2px;outline:none;cursor:pointer;border:none;position:relative}.size-slider::before{content:'';position:absolute;top:50%;left:0;right:0;height:4px;background:rgba(0, 0, 0, 0.15);border-radius:2px;transform:translateY(-50%);pointer-events:none}.size-slider::-webkit-slider-track{width:100%;height:4px;background:transparent;border-radius:2px;border:none}.size-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;cursor:pointer;position:relative;z-index:1}.size-slider::-moz-range-track{width:100%;height:4px;background:transparent;border-radius:2px;border:none}.size-slider::-moz-range-thumb{width:14px;height:14px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;border:none;cursor:pointer}.size-slider::-ms-track{width:100%;height:4px;background:transparent;border-radius:2px;border:none;color:transparent}.size-slider::-ms-thumb{width:14px;height:14px;background:var(--feedback-primary-color, #0070f4);border-radius:50%;border:none;cursor:pointer}.size-value{font-weight:500;color:var(--feedback-canvas-editor-tool-text-color, #333);font-size:12px;min-width:30px}.selected-annotation-controls{border-left:2px solid var(--feedback-canvas-editor-divider-color, #e0e0e0);padding-left:12px;margin-left:8px;min-width:200px}.text-controls{display:flex;flex-direction:row;align-items:center;gap:12px}.font-size-control,.border-width-control{display:flex;align-items:center;gap:6px}.font-size-control label,.border-width-control label{font-size:12px;color:var(--feedback-canvas-editor-tool-text-color, #333);font-weight:500;min-width:35px}.action-btn{display:flex;align-items:center;gap:8px;padding:0 20px;border:1.5px solid rgba(0, 0, 0, 0.08);border-radius:8px;cursor:pointer;font-size:14px;font-weight:500;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);min-width:80px;justify-content:center;height:40px;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04)}.action-btn.secondary{background:var(--feedback-canvas-editor-tool-bg-color, #ffffff);color:var(--feedback-canvas-editor-tool-text-color, #333);border-color:rgba(0, 0, 0, 0.08)}.action-btn.secondary:hover{background:var(--feedback-canvas-editor-tool-bg-hover, #f5f5f5);border-color:rgba(0, 0, 0, 0.12);transform:translateY(-1px);box-shadow:0 4px 8px rgba(0, 0, 0, 0.08)}.action-btn.primary{background:var(--feedback-primary-color, #0070f4);color:#ffffff;border-color:var(--feedback-primary-color, #0070f4);box-shadow:0 2px 4px rgba(0, 112, 244, 0.2)}.action-btn.primary:hover{background:#0056cc;border-color:#0056cc;transform:translateY(-1px);box-shadow:0 6px 12px rgba(0, 112, 244, 0.3)}.action-btn:active{transform:translateY(0)}.action-btn.small{height:28px;padding:4px 8px;font-size:12px;min-width:65px}.shape-controls{display:flex;flex-direction:column;gap:8px}.canvas-editor-content{flex:1;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--feedback-canvas-editor-content-bg, #f5f5f5);overflow:hidden;min-height:0;min-width:0;position:relative}.canvas-editor-content::-webkit-scrollbar{width:8px;height:8px}.canvas-editor-content::-webkit-scrollbar-track{background:transparent}.canvas-editor-content::-webkit-scrollbar-thumb{background:rgba(0, 0, 0, 0.2);border-radius:4px}.canvas-editor-content::-webkit-scrollbar-thumb:hover{background:rgba(0, 0, 0, 0.3)}.annotation-canvas{max-width:calc(100% - 48px);max-height:calc(100% - 48px);width:auto !important;height:auto !important;cursor:crosshair;border-radius:8px;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.04),\n 0 4px 6px rgba(0, 0, 0, 0.06),\n 0 8px 16px rgba(0, 0, 0, 0.08);background:#ffffff;transition:box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);object-fit:contain;display:block;margin:auto}.annotation-canvas:hover{box-shadow:0 0 0 1px rgba(0, 0, 0, 0.06),\n 0 6px 10px rgba(0, 0, 0, 0.08),\n 0 12px 24px rgba(0, 0, 0, 0.1)}@media screen and (min-width: 1920px){.canvas-editor-modal{width:90vw;height:90vh}.canvas-editor-content{padding:32px}}@media screen and (min-width: 1200px) and (max-width: 1919px){.canvas-editor-modal{width:92vw;height:92vh}.canvas-editor-content{padding:28px}}@media screen and (min-width: 769px) and (max-width: 1199px){.canvas-editor-modal{width:95vw;height:95vh}}@media screen and (max-width: 768px){.canvas-editor-modal{width:100vw;height:100vh;border-radius:0}.canvas-editor-toolbar{flex-direction:column;align-items:stretch;gap:8px}.toolbar-section{justify-content:center}.selected-annotation-controls{border-left:none;border-top:2px solid var(--feedback-canvas-editor-divider-color, #e0e0e0);padding-left:0;padding-top:8px;margin-left:0;margin-top:8px;min-width:auto}.canvas-editor-content{padding:16px}}";
4
4
 
5
5
  const CanvasEditor = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
6
  constructor() {
@@ -10,6 +10,17 @@ const CanvasEditor = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
10
10
  this.screenshotReady = createEvent(this, "screenshotReady", 7);
11
11
  this.screenshotCancelled = createEvent(this, "screenshotCancelled", 7);
12
12
  this.screenshotFailed = createEvent(this, "screenshotFailed", 7);
13
+ this.handleWindowResize = () => {
14
+ // Debounce resize events
15
+ if (this.resizeTimeout) {
16
+ clearTimeout(this.resizeTimeout);
17
+ }
18
+ this.resizeTimeout = setTimeout(() => {
19
+ if (this.showCanvasEditor && this.originalImageData) {
20
+ this.initializeCanvas();
21
+ }
22
+ }, 250);
23
+ };
13
24
  this.openScreenShot = async () => {
14
25
  // Show loading state immediately
15
26
  this.takingScreenshot = true;
@@ -105,14 +116,16 @@ const CanvasEditor = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
105
116
  // Set canvas to original image dimensions
106
117
  this.canvasRef.width = img.width;
107
118
  this.canvasRef.height = img.height;
108
- // Get available container dimensions
109
- const containerWidth = this.canvasRef.parentElement.clientWidth - 32;
110
- const containerHeight = this.canvasRef.parentElement.clientHeight - 32;
119
+ // Get available container dimensions with more generous padding
120
+ const containerWidth = this.canvasRef.parentElement.clientWidth - 48;
121
+ const containerHeight = this.canvasRef.parentElement.clientHeight - 48;
111
122
  // Calculate scale factors for both dimensions
112
123
  const scaleX = containerWidth / img.width;
113
124
  const scaleY = containerHeight / img.height;
114
- // Use the smaller scale to ensure complete image fits
115
- const scale = Math.min(scaleX, scaleY, 1);
125
+ // Use a more aggressive scaling approach for large screens
126
+ // Allow scaling up to 1.5x on very large screens, but still maintain aspect ratio
127
+ const maxScale = window.innerWidth > 1920 ? 1.5 : (window.innerWidth > 1200 ? 1.2 : 1);
128
+ const scale = Math.min(scaleX, scaleY, maxScale);
116
129
  // Calculate final display dimensions
117
130
  const displayWidth = img.width * scale;
118
131
  const displayHeight = img.height * scale;
@@ -264,6 +277,16 @@ const CanvasEditor = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
264
277
  this.annotations = this.annotations.slice(0, -1);
265
278
  this.redrawAnnotations();
266
279
  };
280
+ this.deleteSelectedAnnotation = () => {
281
+ if (this.selectedAnnotation) {
282
+ const index = this.annotations.findIndex(a => a === this.selectedAnnotation);
283
+ if (index !== -1) {
284
+ this.annotations = this.annotations.filter((_, i) => i !== index);
285
+ this.selectedAnnotation = null;
286
+ this.redrawAnnotations();
287
+ }
288
+ }
289
+ };
267
290
  // Handle color slot editing
268
291
  this.handleColorSlotClick = (colorIndex) => {
269
292
  if (this.editingColorIndex === colorIndex) {
@@ -777,6 +800,13 @@ const CanvasEditor = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
777
800
  this.initializeCanvas();
778
801
  }, 100);
779
802
  }
803
+ // Add window resize listener for canvas adaptation
804
+ this.handleWindowResize = this.handleWindowResize.bind(this);
805
+ window.addEventListener('resize', this.handleWindowResize);
806
+ }
807
+ disconnectedCallback() {
808
+ // Clean up resize listener
809
+ window.removeEventListener('resize', this.handleWindowResize);
780
810
  }
781
811
  async captureViewportScreenshot() {
782
812
  try {
@@ -837,7 +867,7 @@ const CanvasEditor = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
837
867
  }
838
868
  render() {
839
869
  var _a, _b, _c, _d, _e, _f;
840
- return (h("div", { class: "canvas-editor-wrapper" }, this.showCanvasEditor && (h("div", { class: "canvas-editor-overlay" }, h("div", { class: "canvas-editor-modal" }, h("div", { class: "canvas-editor-header" }, h("div", { class: "canvas-editor-title" }, h("h3", null, this.canvasEditorTitle)), h("div", { class: "canvas-editor-toolbar" }, h("div", { class: "toolbar-section" }, h("div", { class: "tool-group" }, h("button", { class: `tool-btn ${this.canvasDrawingTool === 'rectangle' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'rectangle', title: "Rectangle" }, h("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }))), h("button", { class: `tool-btn ${this.canvasDrawingTool === 'line' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'line', title: "Line" }, h("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("line", { x1: "5", y1: "12", x2: "19", y2: "12" }))), h("button", { class: `tool-btn ${this.canvasDrawingTool === 'arrow' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'arrow', title: "Arrow" }, h("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("line", { x1: "7", y1: "17", x2: "17", y2: "7" }), h("polyline", { points: "7,7 17,7 17,17" }))), h("button", { class: `tool-btn ${this.canvasDrawingTool === 'text' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'text', title: "Text" }, h("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { points: "4,7 4,4 20,4 20,7" }), h("line", { x1: "9", y1: "20", x2: "15", y2: "20" }), h("line", { x1: "12", y1: "4", x2: "12", y2: "20" }))), h("div", { class: "toolbar-divider" }), h("button", { class: "tool-btn undo-btn", onClick: this.undoLastAnnotation, disabled: this.annotations.length === 0, title: "Undo" }, h("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { points: "1,4 1,10 7,10" }), h("path", { d: "M3.51,15a9,9,0,0,0,14.85-3.36,9,9,0,0,0-9.19-10.15L1.83,10" }))))), h("div", { class: "toolbar-section" }, h("div", { class: "color-palette" }, this.defaultColors.map((color, index) => (h("div", { class: "color-slot-wrapper" }, h("button", { class: `color-btn ${this.canvasDrawingColor === color ? 'active' : ''} ${this.editingColorIndex === index ? 'editing' : ''}`, style: { backgroundColor: color }, onClick: () => this.handleColorSlotClick(index), title: `Color ${index + 1} - Click to customize` }, this.editingColorIndex === index && (h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "white", "stroke-width": "2" }, h("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" })))), this.editingColorIndex === index && this.showColorPicker && (h("div", { class: "color-picker-dropdown" }, h("input", { type: "color", value: color, onInput: (e) => this.handleColorPickerInput(e), onClick: (e) => this.handleColorPickerClick(e) })))))))), (this.selectedAnnotation || this.canvasDrawingTool) && (h("div", { class: "toolbar-section selected-annotation-controls" }, (((_a = this.selectedAnnotation) === null || _a === void 0 ? void 0 : _a.type) === 'text' || (!this.selectedAnnotation && this.canvasDrawingTool === 'text')) && (h("div", { class: "text-controls" }, h("div", { class: "font-size-control" }, h("label", null, this.sizeLabelText), h("input", { type: "range", min: "8", max: "72", value: ((_b = this.selectedAnnotation) === null || _b === void 0 ? void 0 : _b.fontSize) || this.canvasTextSize, onInput: (e) => {
870
+ return (h("div", { class: "canvas-editor-wrapper" }, this.showCanvasEditor && (h("div", { class: "canvas-editor-overlay" }, h("div", { class: "canvas-editor-modal" }, h("div", { class: "canvas-editor-header" }, h("div", { class: "canvas-editor-title" }, h("h3", null, this.canvasEditorTitle)), h("div", { class: "canvas-editor-toolbar" }, h("div", { class: "toolbar-section" }, h("div", { class: "tool-group" }, h("button", { class: `tool-btn ${this.canvasDrawingTool === 'rectangle' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'rectangle', title: "Rectangle" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-square" }, h("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }))), h("button", { class: `tool-btn ${this.canvasDrawingTool === 'line' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'line', title: "Line" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-minus" }, h("path", { d: "M5 12h14" }))), h("button", { class: `tool-btn ${this.canvasDrawingTool === 'arrow' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'arrow', title: "Arrow" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-move-up-right" }, h("path", { d: "M13 5H19V11" }), h("path", { d: "M19 5L5 19" }))), h("button", { class: `tool-btn ${this.canvasDrawingTool === 'text' ? 'active' : ''}`, onClick: () => this.canvasDrawingTool = 'text', title: "Text" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-type" }, h("path", { d: "M12 4v16" }), h("path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" }), h("path", { d: "M9 20h6" }))), h("div", { class: "toolbar-divider" }), h("button", { class: "tool-btn undo-btn", onClick: this.undoLastAnnotation, disabled: this.annotations.length === 0, title: "Undo" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-undo" }, h("path", { d: "M3 7v6h6" }), h("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" }))), this.selectedAnnotation && (h("button", { class: "tool-btn delete-btn", onClick: this.deleteSelectedAnnotation, title: "Delete" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-trash-2" }, h("path", { d: "M3 6h18" }), h("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }), h("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }), h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), h("line", { x1: "14", x2: "14", y1: "11", y2: "17" })))))), h("div", { class: "toolbar-section" }, h("div", { class: "color-palette" }, this.defaultColors.map((color, index) => (h("div", { class: "color-slot-wrapper" }, h("button", { class: `color-btn ${this.canvasDrawingColor === color ? 'active' : ''} ${this.editingColorIndex === index ? 'editing' : ''}`, style: { backgroundColor: color }, onClick: () => this.handleColorSlotClick(index), title: `Color ${index + 1} - Click to customize` }, this.editingColorIndex === index && (h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "white", "stroke-width": "2" }, h("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" })))), this.editingColorIndex === index && this.showColorPicker && (h("div", { class: "color-picker-dropdown" }, h("input", { type: "color", value: color, onInput: (e) => this.handleColorPickerInput(e), onClick: (e) => this.handleColorPickerClick(e) })))))))), (this.selectedAnnotation || this.canvasDrawingTool) && (h("div", { class: "toolbar-section selected-annotation-controls" }, (((_a = this.selectedAnnotation) === null || _a === void 0 ? void 0 : _a.type) === 'text' || (!this.selectedAnnotation && this.canvasDrawingTool === 'text')) && (h("div", { class: "text-controls" }, h("div", { class: "font-size-control" }, h("label", null, this.sizeLabelText), h("input", { type: "range", min: "8", max: "72", value: ((_b = this.selectedAnnotation) === null || _b === void 0 ? void 0 : _b.fontSize) || this.canvasTextSize, onInput: (e) => {
841
871
  const newSize = parseInt(e.target.value);
842
872
  if (this.selectedAnnotation) {
843
873
  this.updateSelectedTextSize(newSize);