@salesforcedevs/docs-components 0.0.0 → 0.0.1-edit

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.
Files changed (84) hide show
  1. package/lwc.config.json +11 -2
  2. package/package.json +14 -13
  3. package/src/modules/doc/{amfReference/utils.ts → amfModelParser/amfModelParser.ts} +10 -5
  4. package/src/modules/doc/amfReference/amfReference.css +23 -3
  5. package/src/modules/doc/amfReference/amfReference.html +34 -21
  6. package/src/modules/doc/amfReference/amfReference.ts +225 -92
  7. package/src/modules/doc/amfReference/types.ts +3 -11
  8. package/src/modules/doc/amfTopic/amfTopic.css +20 -0
  9. package/src/modules/doc/amfTopic/amfTopic.ts +35 -18
  10. package/src/modules/doc/amfTopic/types.ts +15 -13
  11. package/src/modules/doc/amfTopic/utils.ts +12 -6
  12. package/src/modules/doc/breadcrumbItem/breadcrumbItem.ts +17 -10
  13. package/src/modules/doc/breadcrumbs/breadcrumbs.html +7 -9
  14. package/src/modules/doc/breadcrumbs/breadcrumbs.ts +30 -34
  15. package/src/modules/doc/chat/README.md +179 -0
  16. package/src/modules/doc/chat/chat.css +818 -0
  17. package/src/modules/doc/chat/chat.html +241 -0
  18. package/src/modules/doc/chat/chat.ts +586 -0
  19. package/src/modules/doc/componentPlayground/componentPlayground.css +22 -0
  20. package/src/modules/doc/componentPlayground/componentPlayground.html +20 -0
  21. package/src/modules/doc/componentPlayground/componentPlayground.ts +29 -0
  22. package/src/modules/doc/content/content.css +70 -76
  23. package/src/modules/doc/content/content.html +1 -0
  24. package/src/modules/doc/content/content.ts +24 -45
  25. package/src/modules/doc/contentCallout/contentCallout.css +10 -7
  26. package/src/modules/doc/contentCallout/contentCallout.html +11 -4
  27. package/src/modules/doc/contentCallout/contentCallout.ts +8 -1
  28. package/src/modules/doc/contentLayout/contentLayout.css +1 -98
  29. package/src/modules/doc/contentLayout/contentLayout.html +37 -19
  30. package/src/modules/doc/contentLayout/contentLayout.ts +298 -89
  31. package/src/modules/doc/doDont/doDont.css +47 -0
  32. package/src/modules/doc/doDont/doDont.html +27 -0
  33. package/src/modules/doc/doDont/doDont.ts +17 -0
  34. package/src/modules/doc/editFile/editFile.css +514 -0
  35. package/src/modules/doc/editFile/editFile.html +164 -0
  36. package/src/modules/doc/editFile/editFile.ts +213 -0
  37. package/src/modules/doc/header/header.css +65 -36
  38. package/src/modules/doc/header/header.html +41 -139
  39. package/src/modules/doc/header/header.ts +54 -76
  40. package/src/modules/doc/heading/heading.css +16 -37
  41. package/src/modules/doc/heading/heading.html +4 -4
  42. package/src/modules/doc/heading/heading.ts +12 -10
  43. package/src/modules/doc/headingAnchor/headingAnchor.css +2 -2
  44. package/src/modules/doc/headingAnchor/headingAnchor.ts +2 -2
  45. package/src/modules/doc/headingContent/headingContent.css +1 -1
  46. package/src/modules/doc/headingContent/headingContent.html +2 -2
  47. package/src/modules/doc/headingContent/headingContent.ts +2 -2
  48. package/src/modules/doc/lwcContentLayout/lwcContentLayout.css +1 -0
  49. package/src/modules/doc/lwcContentLayout/lwcContentLayout.html +68 -0
  50. package/src/modules/doc/lwcContentLayout/lwcContentLayout.ts +168 -0
  51. package/src/modules/doc/overview/overview.css +40 -0
  52. package/src/modules/doc/overview/overview.html +34 -0
  53. package/src/modules/doc/overview/overview.ts +12 -0
  54. package/src/modules/doc/phase/phase.css +18 -3
  55. package/src/modules/doc/phase/phase.html +12 -2
  56. package/src/modules/doc/phase/phase.ts +44 -8
  57. package/src/modules/doc/specificationContent/specificationContent.css +36 -0
  58. package/src/modules/doc/specificationContent/specificationContent.html +171 -0
  59. package/src/modules/doc/specificationContent/specificationContent.ts +127 -0
  60. package/src/modules/doc/sprigSurvey/sprigSurvey.html +20 -0
  61. package/src/modules/doc/sprigSurvey/sprigSurvey.scoped.css +16 -0
  62. package/src/modules/doc/sprigSurvey/sprigSurvey.ts +16 -0
  63. package/src/modules/doc/toc/toc.html +1 -3
  64. package/src/modules/doc/toc/toc.ts +1 -1
  65. package/src/modules/doc/toolbar/toolbar.ts +6 -6
  66. package/src/modules/doc/versionPicker/versionPicker.css +64 -0
  67. package/src/modules/doc/versionPicker/versionPicker.html +38 -0
  68. package/src/modules/doc/versionPicker/versionPicker.ts +65 -0
  69. package/src/modules/doc/xmlContent/types.ts +9 -3
  70. package/src/modules/doc/xmlContent/utils.ts +3 -1
  71. package/src/modules/doc/xmlContent/xmlContent.css +26 -4
  72. package/src/modules/doc/xmlContent/xmlContent.html +29 -17
  73. package/src/modules/doc/xmlContent/xmlContent.ts +212 -79
  74. package/src/modules/docHelpers/amfStyle/amfStyle.css +6 -6
  75. package/src/modules/docHelpers/contentLayoutStyle/contentLayoutStyle.css +131 -0
  76. package/src/modules/docHelpers/imgStyle/imgStyle.css +59 -0
  77. package/src/modules/docHelpers/status/status.css +1 -1
  78. package/src/modules/docUtils/{SearchSyncer/SearchSyncer.ts → searchSyncer/searchSyncer.ts} +1 -0
  79. package/src/modules/docUtils/utils/__mocks__/coveo.analytics.ts +16 -0
  80. package/src/modules/docUtils/utils/coveo.analytics.d.ts +10 -0
  81. package/src/modules/docUtils/utils/utils.ts +32 -0
  82. package/LICENSE +0 -12
  83. package/src/modules/docBaseElements/lightningElementWithState/lightningElementWithState.ts +0 -93
  84. package/src/modules/docHelpers/phaseContentLayout/phaseContentLayout.css +0 -39
@@ -0,0 +1,514 @@
1
+ /* Host container */
2
+ :host {
3
+ font-family: "Salesforce Sans", -apple-system, BlinkMacSystemFont,
4
+ "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
5
+ sans-serif;
6
+ }
7
+
8
+ /* Edit File Trigger Button - positioned in top right corner */
9
+ .edit-file-trigger {
10
+ position: fixed;
11
+ top: 20px;
12
+ right: 20px;
13
+ background: linear-gradient(135deg, #0176d3 0%, #005fb2 100%);
14
+ color: white;
15
+ border: none;
16
+ border-radius: 12px;
17
+ padding: 12px 16px;
18
+ cursor: pointer;
19
+ z-index: 1000;
20
+ display: flex;
21
+ align-items: center;
22
+ gap: 8px;
23
+ box-shadow: 0 4px 16px rgb(1 118 211 / 25%), 0 2px 8px rgb(1 118 211 / 15%);
24
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
25
+ font-size: 14px;
26
+ font-weight: 500;
27
+ letter-spacing: 0.02em;
28
+ backdrop-filter: blur(10px);
29
+ }
30
+
31
+ .edit-file-trigger:hover:not(:disabled) {
32
+ background: linear-gradient(135deg, #005fb2 0%, #003e73 100%);
33
+ transform: translateY(-2px);
34
+ box-shadow: 0 6px 20px rgb(1 118 211 / 35%), 0 4px 12px rgb(1 118 211 / 25%);
35
+ }
36
+
37
+ .edit-file-trigger:active:not(:disabled) {
38
+ transform: translateY(0);
39
+ box-shadow: 0 2px 8px rgb(1 118 211 / 30%);
40
+ }
41
+
42
+ .edit-file-trigger:disabled {
43
+ background: #d8dde6;
44
+ color: #706e6b;
45
+ cursor: not-allowed;
46
+ transform: none;
47
+ box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
48
+ }
49
+
50
+ .edit-file-icon {
51
+ width: 18px;
52
+ height: 18px;
53
+ flex-shrink: 0;
54
+ }
55
+
56
+ .edit-file-trigger-text {
57
+ font-weight: 500;
58
+ white-space: nowrap;
59
+ }
60
+
61
+ /* Overlay */
62
+ .edit-file-overlay {
63
+ position: fixed;
64
+ top: 0;
65
+ left: 0;
66
+ width: 100%;
67
+ height: 100%;
68
+ background: rgb(0 0 0 / 50%);
69
+ backdrop-filter: blur(4px);
70
+ z-index: 10000;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ opacity: 0;
75
+ visibility: hidden;
76
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
77
+ padding: 20px;
78
+ box-sizing: border-box;
79
+ }
80
+
81
+ .edit-file-overlay_open {
82
+ opacity: 1;
83
+ visibility: visible;
84
+ }
85
+
86
+ /* Popover */
87
+ .edit-file-popover {
88
+ background: white;
89
+ border-radius: 16px;
90
+ box-shadow: 0 20px 60px rgb(0 0 0 / 20%), 0 8px 24px rgb(0 0 0 / 15%);
91
+ width: 100%;
92
+ max-width: 900px;
93
+ max-height: 90vh;
94
+ display: flex;
95
+ flex-direction: column;
96
+ transform: scale(0.9) translateY(20px);
97
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
98
+ overflow: hidden;
99
+ }
100
+
101
+ .edit-file-popover_open {
102
+ transform: scale(1) translateY(0);
103
+ }
104
+
105
+ /* Popover Header */
106
+ .edit-file-header {
107
+ padding: 24px 24px 20px;
108
+ border-bottom: 1px solid #e5e7ea;
109
+ display: flex;
110
+ align-items: flex-start;
111
+ justify-content: space-between;
112
+ gap: 16px;
113
+ background: linear-gradient(180deg, #fafbfc 0%, #f7f9fb 100%);
114
+ position: relative;
115
+ }
116
+
117
+ .edit-file-title {
118
+ margin: 0;
119
+ font-size: 24px;
120
+ font-weight: 700;
121
+ color: #181818;
122
+ letter-spacing: -0.02em;
123
+ }
124
+
125
+ .edit-file-filename {
126
+ margin: 8px 0 0;
127
+ font-size: 14px;
128
+ color: #706e6b;
129
+ display: flex;
130
+ align-items: center;
131
+ gap: 6px;
132
+ font-weight: 500;
133
+ }
134
+
135
+ .edit-file-file-icon {
136
+ width: 16px;
137
+ height: 16px;
138
+ color: #0176d3;
139
+ }
140
+
141
+ .edit-file-close {
142
+ width: 40px;
143
+ height: 40px;
144
+ border: none;
145
+ background: transparent;
146
+ border-radius: 10px;
147
+ cursor: pointer;
148
+ display: flex;
149
+ align-items: center;
150
+ justify-content: center;
151
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
152
+ color: #706e6b;
153
+ flex-shrink: 0;
154
+ }
155
+
156
+ .edit-file-close:hover {
157
+ background: #f3f3f3;
158
+ color: #181818;
159
+ transform: scale(1.05);
160
+ }
161
+
162
+ .edit-file-close-icon {
163
+ width: 20px;
164
+ height: 20px;
165
+ }
166
+
167
+ /* Popover Content */
168
+ .edit-file-content {
169
+ flex: 1;
170
+ padding: 24px;
171
+ overflow-y: auto;
172
+ min-height: 0;
173
+ }
174
+
175
+ /* Loading State */
176
+ .edit-file-loading {
177
+ display: flex;
178
+ flex-direction: column;
179
+ align-items: center;
180
+ justify-content: center;
181
+ padding: 60px 20px;
182
+ gap: 16px;
183
+ }
184
+
185
+ .edit-file-spinner {
186
+ width: 32px;
187
+ height: 32px;
188
+ border: 3px solid #e5e7ea;
189
+ border-top: 3px solid #0176d3;
190
+ border-radius: 50%;
191
+ animation: edit-file-spin 1s linear infinite;
192
+ }
193
+
194
+ .edit-file-loading-text {
195
+ margin: 0;
196
+ color: #706e6b;
197
+ font-size: 16px;
198
+ font-weight: 500;
199
+ }
200
+
201
+ /* Error State */
202
+ .edit-file-error {
203
+ display: flex;
204
+ align-items: center;
205
+ gap: 12px;
206
+ padding: 16px 20px;
207
+ background: #fef7f7;
208
+ border: 1px solid #fecaca;
209
+ border-radius: 12px;
210
+ color: #dc2626;
211
+ margin-bottom: 20px;
212
+ }
213
+
214
+ .edit-file-error-icon {
215
+ width: 20px;
216
+ height: 20px;
217
+ flex-shrink: 0;
218
+ }
219
+
220
+ .edit-file-error-text {
221
+ font-size: 14px;
222
+ font-weight: 500;
223
+ }
224
+
225
+ /* Editor */
226
+ .edit-file-editor {
227
+ width: 100%;
228
+ }
229
+
230
+ .edit-file-label {
231
+ display: block;
232
+ margin-bottom: 8px;
233
+ font-size: 14px;
234
+ font-weight: 600;
235
+ color: #181818;
236
+ }
237
+
238
+ .edit-file-textarea {
239
+ width: 100%;
240
+ min-height: 400px;
241
+ padding: 16px;
242
+ border: 2px solid #e5e7ea;
243
+ border-radius: 12px;
244
+ font-family: "SF Mono", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
245
+ font-size: 14px;
246
+ line-height: 1.5;
247
+ resize: vertical;
248
+ outline: none;
249
+ background: #fafbfc;
250
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
251
+ box-sizing: border-box;
252
+ }
253
+
254
+ .edit-file-textarea:focus {
255
+ border-color: #0176d3;
256
+ background: white;
257
+ box-shadow: 0 0 0 3px rgb(1 118 211 / 10%);
258
+ }
259
+
260
+ .edit-file-textarea::placeholder {
261
+ color: #9ca3af;
262
+ }
263
+
264
+ /* Popover Footer */
265
+ .edit-file-footer {
266
+ padding: 20px 24px 24px;
267
+ border-top: 1px solid #e5e7ea;
268
+ display: flex;
269
+ align-items: center;
270
+ justify-content: space-between;
271
+ gap: 16px;
272
+ background: linear-gradient(180deg, #fafbfc 0%, #f7f9fb 100%);
273
+ }
274
+
275
+ /* Status Indicators */
276
+ .edit-file-status {
277
+ display: flex;
278
+ align-items: center;
279
+ gap: 8px;
280
+ font-size: 14px;
281
+ font-weight: 500;
282
+ }
283
+
284
+ .edit-file-saving {
285
+ display: flex;
286
+ align-items: center;
287
+ gap: 8px;
288
+ color: #0176d3;
289
+ }
290
+
291
+ .edit-file-mini-spinner {
292
+ width: 16px;
293
+ height: 16px;
294
+ border: 2px solid #e5e7ea;
295
+ border-top: 2px solid #0176d3;
296
+ border-radius: 50%;
297
+ animation: edit-file-spin 1s linear infinite;
298
+ }
299
+
300
+ .edit-file-unchanged {
301
+ color: #706e6b;
302
+ }
303
+
304
+ .edit-file-modified {
305
+ color: #059669;
306
+ position: relative;
307
+ }
308
+
309
+ .edit-file-modified::before {
310
+ content: "●";
311
+ margin-right: 6px;
312
+ color: #059669;
313
+ }
314
+
315
+ /* Action Buttons */
316
+ .edit-file-actions {
317
+ display: flex;
318
+ gap: 12px;
319
+ }
320
+
321
+ .edit-file-button {
322
+ padding: 12px 24px;
323
+ border-radius: 10px;
324
+ font-size: 14px;
325
+ font-weight: 600;
326
+ cursor: pointer;
327
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
328
+ display: flex;
329
+ align-items: center;
330
+ gap: 8px;
331
+ border: none;
332
+ white-space: nowrap;
333
+ }
334
+
335
+ .edit-file-button_secondary {
336
+ background: #f3f3f3;
337
+ color: #181818;
338
+ border: 1px solid #e5e7ea;
339
+ }
340
+
341
+ .edit-file-button_secondary:hover:not(:disabled) {
342
+ background: #e5e7ea;
343
+ transform: translateY(-1px);
344
+ }
345
+
346
+ .edit-file-button_primary {
347
+ background: linear-gradient(135deg, #0176d3 0%, #005fb2 100%);
348
+ color: white;
349
+ }
350
+
351
+ .edit-file-button_primary:hover:not(:disabled) {
352
+ background: linear-gradient(135deg, #005fb2 0%, #003e73 100%);
353
+ transform: translateY(-1px);
354
+ box-shadow: 0 4px 12px rgb(1 118 211 / 25%);
355
+ }
356
+
357
+ .edit-file-button_disabled {
358
+ background: #d8dde6 !important;
359
+ color: #706e6b !important;
360
+ cursor: not-allowed !important;
361
+ transform: none !important;
362
+ box-shadow: none !important;
363
+ }
364
+
365
+ .edit-file-button:disabled {
366
+ background: #d8dde6;
367
+ color: #706e6b;
368
+ cursor: not-allowed;
369
+ transform: none;
370
+ box-shadow: none;
371
+ }
372
+
373
+ .edit-file-button-spinner {
374
+ width: 16px;
375
+ height: 16px;
376
+ border: 2px solid transparent;
377
+ border-top: 2px solid currentColor;
378
+ border-radius: 50%;
379
+ animation: edit-file-spin 1s linear infinite;
380
+ }
381
+
382
+ /* Animations */
383
+ @keyframes edit-file-spin {
384
+ to {
385
+ transform: rotate(360deg);
386
+ }
387
+ }
388
+
389
+ /* Responsive Design */
390
+ @media (max-width: 768px) {
391
+ .edit-file-trigger {
392
+ top: 16px;
393
+ right: 16px;
394
+ padding: 10px 14px;
395
+ font-size: 13px;
396
+ }
397
+
398
+ .edit-file-trigger-text {
399
+ display: none;
400
+ }
401
+
402
+ .edit-file-overlay {
403
+ padding: 16px;
404
+ }
405
+
406
+ .edit-file-popover {
407
+ max-width: 100%;
408
+ max-height: 95vh;
409
+ }
410
+
411
+ .edit-file-header {
412
+ padding: 20px 20px 16px;
413
+ }
414
+
415
+ .edit-file-title {
416
+ font-size: 20px;
417
+ }
418
+
419
+ .edit-file-content {
420
+ padding: 20px;
421
+ }
422
+
423
+ .edit-file-textarea {
424
+ min-height: 300px;
425
+ font-size: 13px;
426
+ }
427
+
428
+ .edit-file-footer {
429
+ padding: 16px 20px 20px;
430
+ flex-direction: column;
431
+ align-items: stretch;
432
+ gap: 12px;
433
+ }
434
+
435
+ .edit-file-actions {
436
+ width: 100%;
437
+ justify-content: stretch;
438
+ }
439
+
440
+ .edit-file-button {
441
+ flex: 1;
442
+ justify-content: center;
443
+ }
444
+ }
445
+
446
+ @media (max-width: 480px) {
447
+ .edit-file-trigger {
448
+ top: 12px;
449
+ right: 12px;
450
+ padding: 8px 12px;
451
+ }
452
+
453
+ .edit-file-overlay {
454
+ padding: 12px;
455
+ }
456
+
457
+ .edit-file-header {
458
+ padding: 16px;
459
+ }
460
+
461
+ .edit-file-title {
462
+ font-size: 18px;
463
+ }
464
+
465
+ .edit-file-content {
466
+ padding: 16px;
467
+ }
468
+
469
+ .edit-file-footer {
470
+ padding: 12px 16px 16px;
471
+ }
472
+
473
+ .edit-file-textarea {
474
+ min-height: 250px;
475
+ padding: 12px;
476
+ }
477
+ }
478
+
479
+ /* Accessibility improvements */
480
+ @media (prefers-reduced-motion: reduce) {
481
+ .edit-file-trigger,
482
+ .edit-file-overlay,
483
+ .edit-file-popover,
484
+ .edit-file-close,
485
+ .edit-file-button,
486
+ .edit-file-textarea {
487
+ transition: none;
488
+ }
489
+
490
+ .edit-file-spinner,
491
+ .edit-file-mini-spinner,
492
+ .edit-file-button-spinner {
493
+ animation: none;
494
+ }
495
+ }
496
+
497
+ /* High contrast mode support */
498
+ @media (prefers-contrast: high) {
499
+ .edit-file-trigger {
500
+ border: 2px solid;
501
+ }
502
+
503
+ .edit-file-popover {
504
+ border: 2px solid #000;
505
+ }
506
+
507
+ .edit-file-textarea {
508
+ border: 2px solid #000;
509
+ }
510
+
511
+ .edit-file-button {
512
+ border: 2px solid;
513
+ }
514
+ }
@@ -0,0 +1,164 @@
1
+ <template>
2
+ <!-- Edit File Trigger Button -->
3
+ <button
4
+ class="edit-file-trigger"
5
+ onclick={handleEditClick}
6
+ disabled={disabled}
7
+ aria-label="Edit file"
8
+ title="Edit file"
9
+ >
10
+ <svg
11
+ class="edit-file-icon"
12
+ viewBox="0 0 24 24"
13
+ fill="none"
14
+ stroke="currentColor"
15
+ >
16
+ <path
17
+ stroke-linecap="round"
18
+ stroke-linejoin="round"
19
+ stroke-width="2"
20
+ d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
21
+ />
22
+ </svg>
23
+ <span class="edit-file-trigger-text">Edit</span>
24
+ </button>
25
+
26
+ <!-- Popover Overlay -->
27
+ <template lwc:if={isPopoverOpen}>
28
+ <div
29
+ class={overlayClass}
30
+ onclick={handleOverlayClick}
31
+ >
32
+ <div class={popoverClass}>
33
+ <!-- Popover Header -->
34
+ <div class="edit-file-header">
35
+ <h2 class="edit-file-title">{title}</h2>
36
+ <template lwc:if={fileName}>
37
+ <p class="edit-file-filename">
38
+ <svg
39
+ class="edit-file-file-icon"
40
+ viewBox="0 0 24 24"
41
+ fill="none"
42
+ stroke="currentColor"
43
+ >
44
+ <path
45
+ stroke-linecap="round"
46
+ stroke-linejoin="round"
47
+ stroke-width="2"
48
+ d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
49
+ />
50
+ </svg>
51
+ {fileName}
52
+ </p>
53
+ </template>
54
+ <button
55
+ class="edit-file-close"
56
+ onclick={handleCancel}
57
+ aria-label="Close editor"
58
+ >
59
+ <svg
60
+ class="edit-file-close-icon"
61
+ viewBox="0 0 24 24"
62
+ fill="none"
63
+ stroke="currentColor"
64
+ >
65
+ <path
66
+ stroke-linecap="round"
67
+ stroke-linejoin="round"
68
+ stroke-width="2"
69
+ d="M6 18L18 6M6 6l12 12"
70
+ />
71
+ </svg>
72
+ </button>
73
+ </div>
74
+
75
+ <!-- Popover Content -->
76
+ <div class="edit-file-content">
77
+ <!-- Loading State -->
78
+ <template lwc:if={isLoading}>
79
+ <div class="edit-file-loading">
80
+ <div class="edit-file-spinner"></div>
81
+ <p class="edit-file-loading-text">Loading file content...</p>
82
+ </div>
83
+ </template>
84
+
85
+ <!-- Error Message -->
86
+ <template lwc:if={errorMessage}>
87
+ <div class="edit-file-error">
88
+ <svg
89
+ class="edit-file-error-icon"
90
+ viewBox="0 0 24 24"
91
+ fill="none"
92
+ stroke="currentColor"
93
+ >
94
+ <circle cx="12" cy="12" r="10"></circle>
95
+ <line x1="15" y1="9" x2="9" y2="15"></line>
96
+ <line x1="9" y1="9" x2="15" y2="15"></line>
97
+ </svg>
98
+ <span class="edit-file-error-text">{errorMessage}</span>
99
+ </div>
100
+ </template>
101
+
102
+ <!-- Content Editor -->
103
+ <template lwc:if={fileContent}>
104
+ <div class="edit-file-editor">
105
+ <label class="edit-file-label" for="file-content">
106
+ File Content
107
+ </label>
108
+ <textarea
109
+ id="file-content"
110
+ class="edit-file-textarea"
111
+ value={fileContent}
112
+ oninput={handleContentChange}
113
+ placeholder="Enter file content..."
114
+ rows="20"
115
+ spellcheck="false"
116
+ ></textarea>
117
+ </div>
118
+ </template>
119
+ </div>
120
+
121
+ <!-- Popover Footer -->
122
+ <div class="edit-file-footer">
123
+ <div class="edit-file-status">
124
+ <template lwc:if={isSaving}>
125
+ <div class="edit-file-saving">
126
+ <div class="edit-file-mini-spinner"></div>
127
+ <span>Saving...</span>
128
+ </div>
129
+ </template>
130
+ <template lwc:elseif={isContentUnchanged}>
131
+ <span class="edit-file-unchanged">No changes</span>
132
+ </template>
133
+ <template lwc:else>
134
+ <span class="edit-file-modified">Modified</span>
135
+ </template>
136
+ </div>
137
+
138
+ <div class="edit-file-actions">
139
+ <button
140
+ class="edit-file-button edit-file-button_secondary"
141
+ onclick={handleCancel}
142
+ disabled={isSaving}
143
+ >
144
+ Cancel
145
+ </button>
146
+ <button
147
+ class={saveButtonClass}
148
+ onclick={handleSave}
149
+ disabled={isSaving}
150
+ >
151
+ <template lwc:if={isSaving}>
152
+ <div class="edit-file-button-spinner"></div>
153
+ Saving...
154
+ </template>
155
+ <template lwc:else>
156
+ Save
157
+ </template>
158
+ </button>
159
+ </div>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ </template>
164
+ </template>