@mevdragon/vidfarm-devcli 0.2.8 → 0.2.9

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 (98) hide show
  1. package/.env.example +9 -0
  2. package/GETTING_STARTED.developers.md +1 -26
  3. package/README.md +3 -0
  4. package/SKILL.developer.md +327 -4
  5. package/auto-create-templates/AUTO_CREATE_TEMPLATES.md +475 -0
  6. package/auto-create-templates/extractor-system-prompt.md +113 -0
  7. package/auto-create-templates/production-graph.schema.json +276 -0
  8. package/auto-create-templates/runbook.md +140 -0
  9. package/auto-create-templates/template-plan.schema.json +230 -0
  10. package/auto-create-templates/template-planner-prompt.md +75 -0
  11. package/dist/src/account-pages-legacy.js +9064 -0
  12. package/dist/src/account-pages.js +41 -620
  13. package/dist/src/app.js +6627 -244
  14. package/dist/src/cli.js +386 -26
  15. package/dist/src/config.js +12 -2
  16. package/dist/src/context.js +35 -35
  17. package/dist/src/db.js +1016 -53
  18. package/dist/src/dev-app-legacy.js +693 -0
  19. package/dist/src/dev-app.js +4 -904
  20. package/dist/src/domain.js +1 -1
  21. package/dist/src/editor-chat-history.js +72 -0
  22. package/dist/src/editor-chat.js +202 -0
  23. package/dist/src/frontend/flockposter-cache-store.js +116 -0
  24. package/dist/src/frontend/homepage-client.js +114 -0
  25. package/dist/src/frontend/homepage-shared.js +3 -0
  26. package/dist/src/frontend/homepage-store.js +27 -0
  27. package/dist/src/frontend/homepage-view.js +147 -0
  28. package/dist/src/frontend/page-runtime-client.js +100 -0
  29. package/dist/src/frontend/page-runtime-store.js +8 -0
  30. package/dist/src/frontend/template-editor-chat.js +2261 -0
  31. package/dist/src/homepage.js +695 -371
  32. package/dist/src/lib/template-style-options.js +95 -15
  33. package/dist/src/page-runtime.js +1 -0
  34. package/dist/src/page-shell.js +941 -0
  35. package/dist/src/primitive-context.js +163 -0
  36. package/dist/src/primitive-registry.js +340 -0
  37. package/dist/src/primitive-sdk.js +3 -0
  38. package/dist/src/primitives/remotion/html-image.js +28 -0
  39. package/dist/src/react-page-shell.js +34 -0
  40. package/dist/src/ready-post-schedule-component.js +1514 -0
  41. package/dist/src/registry.js +36 -17
  42. package/dist/src/runtime.js +6 -1
  43. package/dist/src/services/api-call-history.js +245 -0
  44. package/dist/src/services/auth.js +25 -3
  45. package/dist/src/services/billing.js +248 -9
  46. package/dist/src/services/chat-threads.js +88 -0
  47. package/dist/src/services/job-logs.js +14 -7
  48. package/dist/src/services/jobs.js +13 -2
  49. package/dist/src/services/providers.js +552 -133
  50. package/dist/src/services/rate-limits.js +236 -0
  51. package/dist/src/services/remotion.js +143 -16
  52. package/dist/src/services/storage.js +10 -8
  53. package/dist/src/services/template-certification.js +11 -2
  54. package/dist/src/services/template-loader.js +3 -1
  55. package/dist/src/services/template-sources.js +68 -3
  56. package/dist/src/template-editor-pages.js +2309 -0
  57. package/dist/src/template-editor-shell.js +1507 -0
  58. package/dist/src/worker.js +120 -22
  59. package/package.json +27 -4
  60. package/public/assets/homepage-app.js +54 -0
  61. package/public/assets/homepage-client-app.js +54 -0
  62. package/public/assets/page-runtime-client-app.js +68 -0
  63. package/dist/templates/vidfarm_template_0000/src/lib/images.js +0 -202
  64. package/dist/templates/vidfarm_template_0000/src/remotion/Root.js +0 -34
  65. package/dist/templates/vidfarm_template_0000/src/remotion/index.js +0 -3
  66. package/dist/templates/vidfarm_template_0000/src/sdk.js +0 -3
  67. package/dist/templates/vidfarm_template_0000/src/style-options.js +0 -51
  68. package/dist/templates/vidfarm_template_0000/src/template-dna.js +0 -9
  69. package/dist/templates/vidfarm_template_0000/src/template.js +0 -1447
  70. package/templates/vidfarm_template_0000/README.md +0 -100
  71. package/templates/vidfarm_template_0000/SKILL.md +0 -225
  72. package/templates/vidfarm_template_0000/assets/Abel-Regular.ttf +0 -0
  73. package/templates/vidfarm_template_0000/assets/DMSerifDisplay-Regular.ttf +0 -0
  74. package/templates/vidfarm_template_0000/assets/Montserrat[wght].ttf +0 -0
  75. package/templates/vidfarm_template_0000/assets/SourceCodePro[wght].ttf +0 -0
  76. package/templates/vidfarm_template_0000/assets/TikTokSans-SemiBold.ttf +0 -0
  77. package/templates/vidfarm_template_0000/assets/Yesteryear-Regular.ttf +0 -0
  78. package/templates/vidfarm_template_0000/composition.json +0 -11
  79. package/templates/vidfarm_template_0000/package.json +0 -27
  80. package/templates/vidfarm_template_0000/research/preview/.gitkeep +0 -1
  81. package/templates/vidfarm_template_0000/research/source_notes.md +0 -7
  82. package/templates/vidfarm_template_0000/src/lib/images.js +0 -202
  83. package/templates/vidfarm_template_0000/src/lib/images.ts +0 -241
  84. package/templates/vidfarm_template_0000/src/remotion/Root.js +0 -33
  85. package/templates/vidfarm_template_0000/src/remotion/Root.tsx +0 -75
  86. package/templates/vidfarm_template_0000/src/remotion/index.js +0 -3
  87. package/templates/vidfarm_template_0000/src/remotion/index.tsx +0 -4
  88. package/templates/vidfarm_template_0000/src/sdk.js +0 -3
  89. package/templates/vidfarm_template_0000/src/sdk.ts +0 -140
  90. package/templates/vidfarm_template_0000/src/style-options.js +0 -51
  91. package/templates/vidfarm_template_0000/src/style-options.ts +0 -60
  92. package/templates/vidfarm_template_0000/src/template-dna.js +0 -9
  93. package/templates/vidfarm_template_0000/src/template-dna.ts +0 -15
  94. package/templates/vidfarm_template_0000/src/template.js +0 -1447
  95. package/templates/vidfarm_template_0000/src/template.ts +0 -2049
  96. package/templates/vidfarm_template_0000/template.config.json +0 -21
  97. package/templates/vidfarm_template_0000/tmp/solobacterium-moorei-slideshow.request.json +0 -31
  98. package/templates/vidfarm_template_0000/tsconfig.json +0 -19
@@ -0,0 +1,1507 @@
1
+ import { escapeAttribute, escapeHtml } from "./page-shell.js";
2
+ export const TEMPLATE_EDITOR_SHELL_STYLES = `
3
+ .editor-workbench {
4
+ min-height: 100%;
5
+ height: 100%;
6
+ padding: 96px 432px 28px 0;
7
+ overflow: hidden;
8
+ min-width: 0;
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ .editor-main {
13
+ min-height: 0;
14
+ height: 100%;
15
+ overflow-x: hidden;
16
+ overflow-y: auto;
17
+ overflow: auto;
18
+ padding-right: 10px;
19
+ }
20
+
21
+ .editor-floating-nav {
22
+ position: fixed;
23
+ top: 20px;
24
+ left: 20px;
25
+ right: 452px;
26
+ z-index: 60;
27
+ display: flex;
28
+ flex-wrap: wrap;
29
+ align-items: center;
30
+ gap: 10px;
31
+ max-width: none;
32
+ padding: 12px 14px;
33
+ border: 1px solid rgba(255, 255, 255, 0.84);
34
+ border-radius: 24px;
35
+ background: rgba(255, 252, 247, 0.9);
36
+ box-shadow: var(--shadow);
37
+ backdrop-filter: blur(16px);
38
+ }
39
+
40
+ .editor-back-link {
41
+ display: inline-flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ min-height: 40px;
45
+ padding: 0 14px;
46
+ border: 1px solid rgba(191, 164, 109, 0.34);
47
+ border-radius: 999px;
48
+ background: #dbc17a;
49
+ color: #243041;
50
+ text-decoration: none;
51
+ font-size: 0.9rem;
52
+ font-weight: 700;
53
+ white-space: nowrap;
54
+ }
55
+
56
+ .editor-nav-title {
57
+ min-width: 0;
58
+ margin: 0 4px 0 2px;
59
+ font-family: "Instrument Serif", serif;
60
+ font-size: 1.4rem;
61
+ line-height: 0.95;
62
+ letter-spacing: -0.04em;
63
+ color: #1f2635;
64
+ }
65
+
66
+ .editor-right-rail {
67
+ position: fixed;
68
+ top: 0;
69
+ right: 0;
70
+ bottom: 0;
71
+ z-index: 30;
72
+ width: 432px;
73
+ overflow: hidden;
74
+ }
75
+
76
+ .editor-chat-panel {
77
+ height: 100%;
78
+ min-width: 0;
79
+ display: flex;
80
+ overflow: hidden;
81
+ border-left: 1px solid rgba(255, 255, 255, 0.84);
82
+ background: rgba(255, 252, 247, 0.92);
83
+ }
84
+
85
+ .vf-editor-chat-shell,
86
+ .vf-editor-chat-thread {
87
+ height: 100%;
88
+ min-height: 0;
89
+ }
90
+
91
+ .vf-editor-chat-shell {
92
+ display: flex;
93
+ flex-direction: column;
94
+ min-height: 100%;
95
+ min-width: 0;
96
+ width: 100%;
97
+ }
98
+
99
+ .vf-editor-chat-mobile-fab,
100
+ .vf-editor-chat-minimize {
101
+ display: none;
102
+ }
103
+
104
+ .vf-editor-chat-thread {
105
+ flex: 1 1 auto;
106
+ min-height: 0;
107
+ min-width: 0;
108
+ display: flex;
109
+ flex-direction: column;
110
+ overflow: hidden;
111
+ background:
112
+ radial-gradient(circle at top right, rgba(219, 193, 122, 0.12), transparent 26%),
113
+ linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(252, 247, 238, 0.94));
114
+ }
115
+
116
+ .vf-editor-chat-header {
117
+ min-width: 0;
118
+ padding: 8px 8px 6px;
119
+ border-bottom: 1px solid rgba(191, 164, 109, 0.14);
120
+ background: rgba(255, 251, 244, 0.76);
121
+ backdrop-filter: blur(12px);
122
+ }
123
+
124
+ .vf-editor-chat-header-row {
125
+ display: flex;
126
+ align-items: flex-start;
127
+ justify-content: space-between;
128
+ gap: 12px;
129
+ }
130
+
131
+ .vf-editor-chat-header-title {
132
+ color: #8d99ae;
133
+ font-size: 0.78rem;
134
+ font-weight: 800;
135
+ letter-spacing: 0.16em;
136
+ text-transform: uppercase;
137
+ }
138
+
139
+ .vf-editor-chat-header-subtitle {
140
+ margin-top: 4px;
141
+ color: #334155;
142
+ font-size: 0.92rem;
143
+ font-weight: 700;
144
+ line-height: 1.3;
145
+ }
146
+
147
+ .vf-editor-chat-new-thread {
148
+ all: unset;
149
+ display: inline-flex;
150
+ align-items: center;
151
+ justify-content: center;
152
+ min-height: 30px;
153
+ padding: 0 10px;
154
+ border-radius: 12px;
155
+ border: 1px solid rgba(191, 164, 109, 0.34);
156
+ background: rgba(255, 255, 255, 0.92);
157
+ color: #243041;
158
+ font-size: 0.78rem;
159
+ font-weight: 700;
160
+ white-space: nowrap;
161
+ }
162
+
163
+ .vf-editor-chat-thread-list {
164
+ display: flex;
165
+ flex-wrap: nowrap;
166
+ gap: 4px;
167
+ margin-top: 8px;
168
+ width: 100%;
169
+ max-width: 100%;
170
+ min-width: 0;
171
+ overflow-x: auto;
172
+ overflow-y: hidden;
173
+ padding: 0 4px 5px 0;
174
+ overscroll-behavior-x: contain;
175
+ scrollbar-width: thin;
176
+ -webkit-overflow-scrolling: touch;
177
+ }
178
+
179
+ .vf-editor-chat-thread-list::-webkit-scrollbar {
180
+ height: 6px;
181
+ }
182
+
183
+ .vf-editor-chat-thread-list::-webkit-scrollbar-thumb {
184
+ border-radius: 999px;
185
+ background: rgba(191, 164, 109, 0.42);
186
+ }
187
+
188
+ .vf-editor-chat-tracer-bar {
189
+ display: grid;
190
+ gap: 8px;
191
+ margin-top: 10px;
192
+ padding-top: 10px;
193
+ border-top: 1px solid rgba(191, 164, 109, 0.12);
194
+ }
195
+
196
+ .vf-editor-chat-tracer-bar-head {
197
+ display: flex;
198
+ align-items: center;
199
+ justify-content: space-between;
200
+ gap: 8px;
201
+ }
202
+
203
+ .vf-editor-chat-tracer-label {
204
+ color: #8d99ae;
205
+ font-size: 0.72rem;
206
+ font-weight: 800;
207
+ letter-spacing: 0.14em;
208
+ text-transform: uppercase;
209
+ }
210
+
211
+ .vf-editor-chat-tracer-add {
212
+ all: unset;
213
+ display: inline-flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ min-height: 28px;
217
+ padding: 0 10px;
218
+ border-radius: 999px;
219
+ border: 1px solid rgba(191, 164, 109, 0.34);
220
+ background: rgba(255, 255, 255, 0.92);
221
+ color: #243041;
222
+ font-size: 0.74rem;
223
+ font-weight: 700;
224
+ white-space: nowrap;
225
+ }
226
+
227
+ .vf-editor-chat-tracer-list {
228
+ display: flex;
229
+ flex-wrap: wrap;
230
+ gap: 6px;
231
+ }
232
+
233
+ .vf-editor-chat-tracer-chip {
234
+ display: inline-flex;
235
+ align-items: center;
236
+ gap: 6px;
237
+ min-height: 30px;
238
+ padding: 0 4px 0 10px;
239
+ border-radius: 999px;
240
+ border: 1px solid rgba(191, 164, 109, 0.24);
241
+ background: rgba(255, 255, 255, 0.84);
242
+ }
243
+
244
+ .vf-editor-chat-tracer-chip[data-active="true"] {
245
+ border-color: rgba(219, 193, 122, 0.82);
246
+ background: linear-gradient(180deg, rgba(219, 193, 122, 0.22), rgba(255, 255, 255, 0.92));
247
+ }
248
+
249
+ .vf-editor-chat-tracer-chip-button,
250
+ .vf-editor-chat-tracer-chip-remove {
251
+ all: unset;
252
+ color: inherit;
253
+ }
254
+
255
+ .vf-editor-chat-tracer-chip-button {
256
+ display: inline-flex;
257
+ align-items: center;
258
+ min-width: 0;
259
+ font-size: 0.74rem;
260
+ font-weight: 800;
261
+ color: #334155;
262
+ }
263
+
264
+ .vf-editor-chat-tracer-chip-text {
265
+ display: inline-block;
266
+ max-width: 184px;
267
+ overflow: hidden;
268
+ text-overflow: ellipsis;
269
+ white-space: nowrap;
270
+ }
271
+
272
+ .vf-editor-chat-tracer-chip-remove {
273
+ display: inline-flex;
274
+ align-items: center;
275
+ justify-content: center;
276
+ width: 18px;
277
+ height: 18px;
278
+ border-radius: 999px;
279
+ color: #617087;
280
+ font-size: 0.9rem;
281
+ line-height: 1;
282
+ }
283
+
284
+ .vf-editor-chat-tracer-help {
285
+ color: #617087;
286
+ font-size: 0.72rem;
287
+ line-height: 1.45;
288
+ }
289
+
290
+ .vf-editor-chat-thread-chip {
291
+ display: inline-flex;
292
+ align-items: center;
293
+ gap: 2px;
294
+ flex: 0 0 auto;
295
+ width: auto;
296
+ max-width: 184px;
297
+ min-width: 0;
298
+ padding: 0 4px;
299
+ border: 1px solid rgba(191, 164, 109, 0.16);
300
+ border-radius: 8px;
301
+ background: rgba(255, 255, 255, 0.75);
302
+ color: #243041;
303
+ transition:
304
+ border-color 140ms ease,
305
+ background 140ms ease;
306
+ }
307
+
308
+ .vf-editor-chat-thread-chip[data-active="true"] {
309
+ border-color: rgba(219, 193, 122, 0.82);
310
+ background: linear-gradient(180deg, rgba(219, 193, 122, 0.22), rgba(255, 255, 255, 0.92));
311
+ }
312
+
313
+ .vf-editor-chat-thread-chip-main {
314
+ all: unset;
315
+ display: inline-block;
316
+ flex: 0 1 auto;
317
+ min-width: 0;
318
+ width: auto;
319
+ max-width: 148px;
320
+ padding: 3px 0;
321
+ margin: 0;
322
+ border: 0;
323
+ border-radius: 0;
324
+ background: transparent;
325
+ text-align: left;
326
+ color: inherit;
327
+ box-shadow: none;
328
+ min-height: 0;
329
+ appearance: none;
330
+ -webkit-appearance: none;
331
+ font: inherit;
332
+ outline: none;
333
+ }
334
+
335
+ .vf-editor-chat-thread-menu-wrap {
336
+ position: relative;
337
+ display: inline-flex;
338
+ flex: 0 0 auto;
339
+ }
340
+
341
+ .vf-editor-chat-thread-chip-menu {
342
+ all: unset;
343
+ display: inline-flex;
344
+ align-items: center;
345
+ justify-content: center;
346
+ flex: 0 0 auto;
347
+ width: 20px;
348
+ min-width: 20px;
349
+ height: 20px;
350
+ padding: 0;
351
+ border: 0;
352
+ border-radius: 999px;
353
+ background: transparent;
354
+ color: #617087;
355
+ box-shadow: none;
356
+ font-size: 0.72rem;
357
+ font-weight: 900;
358
+ line-height: 1;
359
+ opacity: 0.8;
360
+ }
361
+
362
+ .vf-editor-chat-thread-chip-menu:hover {
363
+ background: rgba(219, 193, 122, 0.18);
364
+ opacity: 1;
365
+ }
366
+
367
+ .vf-editor-chat-thread-menu {
368
+ position: fixed;
369
+ z-index: 1000;
370
+ display: grid;
371
+ gap: 2px;
372
+ min-width: 138px;
373
+ padding: 6px;
374
+ border: 1px solid rgba(191, 164, 109, 0.28);
375
+ border-radius: 10px;
376
+ background: rgba(255, 252, 247, 0.98);
377
+ box-shadow: 0 14px 34px rgba(37, 45, 61, 0.16);
378
+ }
379
+
380
+ .vf-editor-chat-thread-menu button {
381
+ all: unset;
382
+ padding: 8px 9px;
383
+ border-radius: 7px;
384
+ color: #324156;
385
+ font-size: 0.76rem;
386
+ font-weight: 800;
387
+ white-space: nowrap;
388
+ }
389
+
390
+ .vf-editor-chat-thread-menu button:hover {
391
+ background: rgba(219, 193, 122, 0.16);
392
+ }
393
+
394
+ .vf-editor-chat-thread-menu button[data-danger="true"] {
395
+ color: #8d4a3b;
396
+ }
397
+
398
+ .vf-editor-chat-thread-chip-title {
399
+ display: block;
400
+ max-width: 100%;
401
+ overflow: hidden;
402
+ text-overflow: ellipsis;
403
+ white-space: nowrap;
404
+ font-size: 0.74rem;
405
+ font-weight: 800;
406
+ line-height: 1.2;
407
+ }
408
+
409
+ .vf-editor-chat-thread-chip-tracers,
410
+ .vf-editor-chat-thread-chip-preview,
411
+ .vf-editor-chat-thread-empty {
412
+ display: block;
413
+ overflow: hidden;
414
+ text-overflow: ellipsis;
415
+ white-space: nowrap;
416
+ color: #617087;
417
+ font-size: 0.68rem;
418
+ line-height: 1.25;
419
+ }
420
+
421
+ .vf-editor-chat-thread-chip-tracers {
422
+ max-width: 100%;
423
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
424
+ font-size: 0.62rem;
425
+ }
426
+
427
+ .vf-editor-chat-empty h2,
428
+ .vf-editor-chat-disabled h2 {
429
+ margin: 0;
430
+ font-family: inherit;
431
+ font-size: 1.35rem;
432
+ line-height: 1.08;
433
+ letter-spacing: -0.03em;
434
+ color: #1f2635;
435
+ }
436
+
437
+ .vf-editor-chat-kicker {
438
+ color: #8d99ae;
439
+ font-size: 0.75rem;
440
+ font-weight: 700;
441
+ letter-spacing: 0.18em;
442
+ text-transform: uppercase;
443
+ }
444
+
445
+ .vf-editor-chat-viewport {
446
+ min-height: 0;
447
+ flex: 1 1 0;
448
+ overflow: auto;
449
+ overscroll-behavior: contain;
450
+ padding: 8px 8px 10px;
451
+ }
452
+
453
+ .vf-editor-chat-empty,
454
+ .vf-editor-chat-disabled {
455
+ display: grid;
456
+ gap: 8px;
457
+ margin: 0;
458
+ padding: 12px;
459
+ border: 1px solid rgba(191, 164, 109, 0.18);
460
+ border-radius: 10px;
461
+ background: rgba(255, 255, 255, 0.86);
462
+ box-shadow: 0 10px 20px rgba(15, 23, 42, 0.035);
463
+ }
464
+
465
+ .vf-editor-chat-empty p,
466
+ .vf-editor-chat-disabled p {
467
+ color: #617087;
468
+ line-height: 1.7;
469
+ }
470
+
471
+ .vf-editor-chat-message {
472
+ display: flex;
473
+ flex-direction: column;
474
+ align-items: flex-start;
475
+ gap: 6px;
476
+ min-width: 0;
477
+ margin-bottom: 14px;
478
+ }
479
+
480
+ .vf-editor-chat-message.is-user {
481
+ align-items: flex-end;
482
+ }
483
+
484
+ .vf-editor-chat-message-meta {
485
+ font-size: 0.72rem;
486
+ font-weight: 700;
487
+ letter-spacing: 0.12em;
488
+ text-transform: uppercase;
489
+ color: #8d99ae;
490
+ }
491
+
492
+ .vf-editor-chat-message.is-user .vf-editor-chat-message-meta {
493
+ text-align: right;
494
+ }
495
+
496
+ .vf-editor-chat-bubble {
497
+ display: grid;
498
+ justify-items: start;
499
+ gap: 8px;
500
+ max-width: min(100%, 340px);
501
+ width: auto;
502
+ min-width: 0;
503
+ padding: 10px 12px;
504
+ border-radius: 10px;
505
+ border: 1px solid rgba(191, 164, 109, 0.18);
506
+ background: rgba(255, 255, 255, 0.9);
507
+ box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
508
+ }
509
+
510
+ .vf-editor-chat-bubble[data-pending="true"] {
511
+ background:
512
+ linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 248, 240, 0.96)),
513
+ linear-gradient(90deg, rgba(219, 193, 122, 0.08), rgba(255, 255, 255, 0.4), rgba(219, 193, 122, 0.08));
514
+ }
515
+
516
+ .vf-editor-chat-message.is-assistant .vf-editor-chat-bubble {
517
+ align-self: flex-start;
518
+ border-top-left-radius: 4px;
519
+ }
520
+
521
+ .vf-editor-chat-message.is-user .vf-editor-chat-bubble {
522
+ align-self: flex-end;
523
+ border-top-right-radius: 4px;
524
+ max-width: min(82%, 340px);
525
+ background: linear-gradient(180deg, rgba(219, 193, 122, 0.32), rgba(255, 255, 255, 0.94));
526
+ }
527
+
528
+ .vf-editor-chat-viewport .vf-editor-chat-message-attachment-thumb,
529
+ .vf-editor-chat-composer-images .vf-editor-chat-message-attachment-thumb {
530
+ width: min(220px, 100%);
531
+ max-width: min(220px, 100%);
532
+ }
533
+
534
+ .vf-editor-chat-message-body {
535
+ display: block;
536
+ width: 100%;
537
+ color: #334155;
538
+ line-height: 1.6;
539
+ font-size: 0.92rem;
540
+ white-space: pre-wrap;
541
+ word-break: break-word;
542
+ overflow-wrap: break-word;
543
+ text-align: left;
544
+ }
545
+
546
+ .vf-editor-chat-message-body p + p {
547
+ margin-top: 0.8em;
548
+ }
549
+
550
+ .vf-editor-chat-message-body a {
551
+ color: #8a6b1b;
552
+ text-decoration: underline;
553
+ text-underline-offset: 0.16em;
554
+ word-break: break-word;
555
+ }
556
+
557
+ .vf-editor-chat-message-body strong {
558
+ font-weight: 800;
559
+ color: #243041;
560
+ }
561
+
562
+ .vf-editor-chat-message-body em {
563
+ font-style: italic;
564
+ }
565
+
566
+ .vf-editor-chat-message-body code {
567
+ padding: 0.08rem 0.32rem;
568
+ border-radius: 0.35rem;
569
+ background: rgba(36, 48, 65, 0.08);
570
+ color: #243041;
571
+ font-size: 0.88em;
572
+ font-family: "SFMono-Regular", "Menlo", monospace;
573
+ }
574
+
575
+ .vf-editor-chat-message-body pre {
576
+ margin: 0;
577
+ padding: 10px 11px;
578
+ border-radius: 10px;
579
+ background: rgba(36, 48, 65, 0.06);
580
+ overflow: auto;
581
+ }
582
+
583
+ .vf-editor-chat-message-body pre code {
584
+ padding: 0;
585
+ background: transparent;
586
+ font-size: 0.82em;
587
+ white-space: pre-wrap;
588
+ }
589
+
590
+ .vf-editor-chat-message-body ul,
591
+ .vf-editor-chat-message-body ol {
592
+ margin: 0;
593
+ padding-left: 1.2rem;
594
+ }
595
+
596
+ .vf-editor-chat-message-body li + li {
597
+ margin-top: 0.28rem;
598
+ }
599
+
600
+ .vf-editor-chat-http-list {
601
+ display: grid;
602
+ gap: 6px;
603
+ width: 100%;
604
+ }
605
+
606
+ .vf-editor-chat-http-card {
607
+ width: 100%;
608
+ border-radius: 8px;
609
+ border: 1px solid rgba(191, 164, 109, 0.18);
610
+ background: rgba(248, 244, 235, 0.82);
611
+ overflow: hidden;
612
+ }
613
+
614
+ .vf-editor-chat-http-card-header {
615
+ all: unset;
616
+ display: flex;
617
+ align-items: center;
618
+ gap: 6px;
619
+ min-width: 0;
620
+ width: 100%;
621
+ box-sizing: border-box;
622
+ padding: 6px 8px;
623
+ cursor: pointer;
624
+ }
625
+
626
+ .vf-editor-chat-http-pill,
627
+ .vf-editor-chat-http-status {
628
+ display: inline-flex;
629
+ align-items: center;
630
+ min-height: 18px;
631
+ padding: 0 6px;
632
+ border-radius: 999px;
633
+ font-size: 0.62rem;
634
+ font-weight: 800;
635
+ letter-spacing: 0.04em;
636
+ background: rgba(255, 255, 255, 0.92);
637
+ color: #3f4a5d;
638
+ flex: 0 0 auto;
639
+ }
640
+
641
+ .vf-editor-chat-http-status[data-error="true"] {
642
+ color: #a33c32;
643
+ background: rgba(245, 213, 208, 0.92);
644
+ }
645
+
646
+ .vf-editor-chat-http-status[data-success="true"] {
647
+ color: #1f6a3a;
648
+ background: rgba(214, 240, 222, 0.96);
649
+ }
650
+
651
+ .vf-editor-chat-http-url {
652
+ min-width: 0;
653
+ flex: 1 1 auto;
654
+ color: #526179;
655
+ font-size: 0.68rem;
656
+ line-height: 1.25;
657
+ white-space: nowrap;
658
+ overflow: hidden;
659
+ text-overflow: ellipsis;
660
+ }
661
+
662
+ .vf-editor-chat-http-expand {
663
+ display: inline-flex;
664
+ align-items: center;
665
+ justify-content: center;
666
+ width: 16px;
667
+ min-width: 16px;
668
+ height: 16px;
669
+ border-radius: 999px;
670
+ background: rgba(255, 255, 255, 0.92);
671
+ color: #617087;
672
+ font-size: 0.8rem;
673
+ line-height: 1;
674
+ flex: 0 0 auto;
675
+ }
676
+
677
+ .vf-editor-chat-http-card-body {
678
+ display: grid;
679
+ gap: 6px;
680
+ padding: 0 8px 8px;
681
+ }
682
+
683
+ .vf-editor-chat-http-card-body.is-modal {
684
+ padding: 14px;
685
+ gap: 10px;
686
+ }
687
+
688
+ .vf-editor-chat-http-modal-backdrop {
689
+ position: fixed;
690
+ inset: 0;
691
+ z-index: 120;
692
+ display: flex;
693
+ align-items: center;
694
+ justify-content: center;
695
+ padding: 18px;
696
+ background: rgba(31, 38, 53, 0.42);
697
+ backdrop-filter: blur(8px);
698
+ }
699
+
700
+ .vf-editor-chat-http-modal-backdrop[hidden] {
701
+ display: none;
702
+ }
703
+
704
+ .vf-editor-chat-http-modal {
705
+ width: min(860px, calc(100vw - 36px));
706
+ max-height: min(82vh, 920px);
707
+ overflow: auto;
708
+ border-radius: 18px;
709
+ border: 1px solid rgba(191, 164, 109, 0.2);
710
+ background: rgba(255, 251, 244, 0.98);
711
+ box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
712
+ }
713
+
714
+ .vf-editor-chat-http-modal-header {
715
+ display: flex;
716
+ align-items: flex-start;
717
+ justify-content: space-between;
718
+ gap: 10px;
719
+ padding: 14px;
720
+ border-bottom: 1px solid rgba(191, 164, 109, 0.14);
721
+ position: sticky;
722
+ top: 0;
723
+ background: rgba(255, 251, 244, 0.98);
724
+ }
725
+
726
+ .vf-editor-chat-http-modal-header-main {
727
+ display: flex;
728
+ align-items: center;
729
+ gap: 8px;
730
+ min-width: 0;
731
+ flex-wrap: wrap;
732
+ }
733
+
734
+ .vf-editor-chat-http-modal-url {
735
+ min-width: 0;
736
+ color: #334155;
737
+ font-size: 0.78rem;
738
+ line-height: 1.4;
739
+ word-break: break-word;
740
+ overflow-wrap: anywhere;
741
+ flex: 1 1 320px;
742
+ }
743
+
744
+ .vf-editor-chat-http-modal-close {
745
+ all: unset;
746
+ display: inline-flex;
747
+ align-items: center;
748
+ justify-content: center;
749
+ width: 30px;
750
+ min-width: 30px;
751
+ height: 30px;
752
+ border-radius: 999px;
753
+ background: rgba(36, 48, 65, 0.08);
754
+ color: #617087;
755
+ font-size: 1.2rem;
756
+ line-height: 1;
757
+ cursor: pointer;
758
+ }
759
+
760
+ .vf-editor-chat-http-note,
761
+ .vf-editor-chat-http-label {
762
+ color: #7b879b;
763
+ font-size: 0.68rem;
764
+ font-weight: 800;
765
+ letter-spacing: 0.08em;
766
+ text-transform: uppercase;
767
+ }
768
+
769
+ .vf-editor-chat-http-block {
770
+ display: grid;
771
+ gap: 4px;
772
+ }
773
+
774
+ .vf-editor-chat-http-pre {
775
+ margin: 0;
776
+ padding: 6px 7px;
777
+ border-radius: 6px;
778
+ background: rgba(255, 255, 255, 0.9);
779
+ color: #334155;
780
+ font-size: 0.66rem;
781
+ line-height: 1.4;
782
+ white-space: pre-wrap;
783
+ word-break: break-word;
784
+ overflow-wrap: anywhere;
785
+ max-height: 180px;
786
+ overflow: auto;
787
+ }
788
+
789
+ .vf-editor-chat-message-status,
790
+ .vf-editor-chat-runtime-status {
791
+ display: inline-flex;
792
+ align-items: center;
793
+ gap: 8px;
794
+ color: #8a6b1b;
795
+ font-size: 0.78rem;
796
+ font-weight: 700;
797
+ line-height: 1.35;
798
+ }
799
+
800
+ .vf-editor-chat-status-dot {
801
+ width: 8px;
802
+ height: 8px;
803
+ border-radius: 999px;
804
+ background: #dbc17a;
805
+ box-shadow: 0 0 0 6px rgba(219, 193, 122, 0.14);
806
+ animation: vf-editor-chat-pulse 1.35s ease-in-out infinite;
807
+ }
808
+
809
+ .vf-editor-chat-message-loading {
810
+ display: inline-flex;
811
+ align-items: center;
812
+ gap: 5px;
813
+ min-height: 18px;
814
+ }
815
+
816
+ .vf-editor-chat-message-loading span {
817
+ width: 7px;
818
+ height: 7px;
819
+ border-radius: 999px;
820
+ background: rgba(141, 153, 174, 0.72);
821
+ animation: vf-editor-chat-bounce 1s ease-in-out infinite;
822
+ }
823
+
824
+ .vf-editor-chat-message-loading span:nth-child(2) {
825
+ animation-delay: 120ms;
826
+ }
827
+
828
+ .vf-editor-chat-message-loading span:nth-child(3) {
829
+ animation-delay: 240ms;
830
+ }
831
+
832
+ .vf-editor-chat-message-attachments,
833
+ .vf-editor-chat-composer-attachments {
834
+ display: flex;
835
+ flex-wrap: wrap;
836
+ gap: 8px;
837
+ }
838
+
839
+ .vf-editor-chat-message-attachments {
840
+ flex-direction: column;
841
+ align-items: flex-start;
842
+ width: 100%;
843
+ min-width: 0;
844
+ }
845
+
846
+ .vf-editor-chat-message-attachment-row {
847
+ display: grid;
848
+ gap: 8px;
849
+ width: fit-content;
850
+ max-width: 100%;
851
+ min-width: 0;
852
+ }
853
+
854
+ .vf-editor-chat-message-preview-link {
855
+ display: inline-flex;
856
+ width: fit-content;
857
+ max-width: 100%;
858
+ text-decoration: none;
859
+ }
860
+
861
+ .vf-editor-chat-message-thumb-button {
862
+ all: unset;
863
+ position: relative;
864
+ display: inline-flex;
865
+ width: fit-content;
866
+ max-width: 100%;
867
+ cursor: zoom-in;
868
+ }
869
+
870
+ .vf-editor-chat-message-thumb-button.is-image {
871
+ flex: 0 0 86px;
872
+ width: 86px;
873
+ height: 86px;
874
+ border-radius: 8px;
875
+ overflow: hidden;
876
+ background: rgba(255, 255, 255, 0.96);
877
+ }
878
+
879
+ .vf-editor-chat-message-attachment-thumb {
880
+ width: min(240px, 100%);
881
+ max-width: 100%;
882
+ max-height: 180px;
883
+ border-radius: 12px;
884
+ object-fit: contain;
885
+ border: 1px solid rgba(191, 164, 109, 0.22);
886
+ }
887
+
888
+ .vf-editor-chat-message-thumb-button.is-image .vf-editor-chat-message-attachment-thumb {
889
+ width: 86px;
890
+ max-width: 86px;
891
+ height: 86px;
892
+ max-height: 86px;
893
+ border-radius: 8px;
894
+ object-fit: cover;
895
+ }
896
+
897
+ .vf-editor-chat-message-image-rail {
898
+ display: flex;
899
+ gap: 8px;
900
+ width: 100%;
901
+ max-width: 100%;
902
+ min-width: 0;
903
+ overflow-x: auto;
904
+ overflow-y: hidden;
905
+ padding: 1px 2px 5px;
906
+ scrollbar-width: thin;
907
+ }
908
+
909
+ .vf-editor-chat-message-thumb-fallback {
910
+ display: flex;
911
+ align-items: center;
912
+ justify-content: center;
913
+ box-sizing: border-box;
914
+ width: 86px;
915
+ height: 86px;
916
+ padding: 8px;
917
+ border: 1px dashed rgba(141, 153, 174, 0.5);
918
+ border-radius: 8px;
919
+ background: rgba(248, 244, 235, 0.9);
920
+ color: #7b879b;
921
+ font-size: 0.66rem;
922
+ font-weight: 800;
923
+ line-height: 1.15;
924
+ text-align: center;
925
+ }
926
+
927
+ .vf-editor-chat-message-video-thumb {
928
+ background: rgba(255, 255, 255, 0.96);
929
+ }
930
+
931
+ .vf-editor-chat-message-video-play {
932
+ position: absolute;
933
+ left: 50%;
934
+ top: 50%;
935
+ width: 38px;
936
+ height: 38px;
937
+ transform: translate(-50%, -50%);
938
+ display: inline-flex;
939
+ align-items: center;
940
+ justify-content: center;
941
+ border-radius: 999px;
942
+ background: rgba(18, 24, 34, 0.74);
943
+ box-shadow: 0 10px 26px rgba(12, 18, 28, 0.24);
944
+ pointer-events: none;
945
+ }
946
+
947
+ .vf-editor-chat-message-video-play::before {
948
+ content: "";
949
+ display: block;
950
+ width: 0;
951
+ height: 0;
952
+ margin-left: 3px;
953
+ border-top: 8px solid transparent;
954
+ border-bottom: 8px solid transparent;
955
+ border-left: 12px solid #fff8ee;
956
+ }
957
+
958
+ .vf-editor-chat-media-modal-backdrop {
959
+ position: fixed;
960
+ inset: 0;
961
+ z-index: 125;
962
+ display: flex;
963
+ align-items: center;
964
+ justify-content: center;
965
+ padding: 20px;
966
+ background: rgba(31, 38, 53, 0.58);
967
+ backdrop-filter: blur(10px);
968
+ }
969
+
970
+ .vf-editor-chat-media-modal {
971
+ width: min(920px, calc(100vw - 40px));
972
+ max-height: min(88vh, 980px);
973
+ overflow: hidden;
974
+ border-radius: 20px;
975
+ border: 1px solid rgba(191, 164, 109, 0.24);
976
+ background: rgba(255, 251, 244, 0.99);
977
+ box-shadow: 0 28px 64px rgba(15, 23, 42, 0.28);
978
+ }
979
+
980
+ .vf-editor-chat-media-modal-header {
981
+ display: flex;
982
+ align-items: center;
983
+ justify-content: space-between;
984
+ gap: 12px;
985
+ padding: 14px 16px;
986
+ border-bottom: 1px solid rgba(191, 164, 109, 0.14);
987
+ }
988
+
989
+ .vf-editor-chat-media-modal-link {
990
+ min-width: 0;
991
+ color: #8a6b1b;
992
+ font-size: 0.92rem;
993
+ font-weight: 700;
994
+ line-height: 1.35;
995
+ word-break: break-word;
996
+ overflow-wrap: anywhere;
997
+ }
998
+
999
+ .vf-editor-chat-media-modal-close {
1000
+ all: unset;
1001
+ display: inline-flex;
1002
+ align-items: center;
1003
+ justify-content: center;
1004
+ width: 32px;
1005
+ min-width: 32px;
1006
+ height: 32px;
1007
+ border-radius: 999px;
1008
+ background: rgba(36, 48, 65, 0.08);
1009
+ color: #617087;
1010
+ font-size: 1.2rem;
1011
+ line-height: 1;
1012
+ cursor: pointer;
1013
+ }
1014
+
1015
+ .vf-editor-chat-media-modal-body {
1016
+ display: flex;
1017
+ align-items: center;
1018
+ justify-content: center;
1019
+ padding: 18px;
1020
+ max-height: calc(88vh - 76px);
1021
+ background: linear-gradient(180deg, rgba(255, 251, 244, 0.98), rgba(248, 242, 231, 0.96));
1022
+ }
1023
+
1024
+ .vf-editor-chat-media-modal-image,
1025
+ .vf-editor-chat-media-modal-video {
1026
+ width: auto;
1027
+ max-width: 100%;
1028
+ max-height: calc(88vh - 112px);
1029
+ border-radius: 16px;
1030
+ border: 1px solid rgba(191, 164, 109, 0.18);
1031
+ background: rgba(255, 255, 255, 0.96);
1032
+ object-fit: contain;
1033
+ }
1034
+
1035
+ .vf-editor-chat-attachment {
1036
+ display: inline-flex;
1037
+ align-items: center;
1038
+ gap: 8px;
1039
+ min-height: 32px;
1040
+ padding: 0 10px;
1041
+ border-radius: 999px;
1042
+ border: 1px solid rgba(191, 164, 109, 0.24);
1043
+ background: rgba(252, 248, 240, 0.98);
1044
+ color: #4b5568;
1045
+ max-width: 100%;
1046
+ }
1047
+
1048
+ .vf-editor-chat-attachment-name {
1049
+ display: inline-flex;
1050
+ min-width: 0;
1051
+ overflow: hidden;
1052
+ text-overflow: ellipsis;
1053
+ white-space: nowrap;
1054
+ font-size: 0.78rem;
1055
+ font-weight: 700;
1056
+ }
1057
+
1058
+ .vf-editor-chat-attachment-remove {
1059
+ display: inline-flex;
1060
+ align-items: center;
1061
+ justify-content: center;
1062
+ width: 18px;
1063
+ height: 18px;
1064
+ padding: 0;
1065
+ border: 0;
1066
+ border-radius: 999px;
1067
+ background: rgba(36, 48, 65, 0.08);
1068
+ color: #617087;
1069
+ cursor: pointer;
1070
+ box-shadow: none;
1071
+ min-height: 0;
1072
+ }
1073
+
1074
+ .vf-editor-chat-footer {
1075
+ padding: 0;
1076
+ border-top: 1px solid rgba(191, 164, 109, 0.14);
1077
+ background: rgba(255, 251, 244, 0.9);
1078
+ backdrop-filter: blur(16px);
1079
+ }
1080
+
1081
+ .vf-editor-chat-composer {
1082
+ display: grid;
1083
+ gap: 6px;
1084
+ padding: 4px 6px;
1085
+ border: 0;
1086
+ border-radius: 0;
1087
+ background: rgba(255, 255, 255, 0.92);
1088
+ box-shadow: none;
1089
+ }
1090
+
1091
+ .vf-editor-chat-composer-attachments-strip {
1092
+ display: flex;
1093
+ gap: 8px;
1094
+ overflow-x: auto;
1095
+ overflow-y: hidden;
1096
+ padding-bottom: 2px;
1097
+ scrollbar-width: thin;
1098
+ }
1099
+
1100
+ .vf-editor-chat-composer-attachment-item {
1101
+ display: flex;
1102
+ align-items: center;
1103
+ gap: 8px;
1104
+ flex: 0 0 auto;
1105
+ min-width: 0;
1106
+ max-width: 190px;
1107
+ padding: 6px 8px;
1108
+ border: 1px solid rgba(191, 164, 109, 0.22);
1109
+ border-radius: 12px;
1110
+ background: rgba(252, 248, 240, 0.94);
1111
+ }
1112
+
1113
+ .vf-editor-chat-composer-attachment-thumb,
1114
+ .vf-editor-chat-composer-attachment-file {
1115
+ width: 42px;
1116
+ min-width: 42px;
1117
+ height: 42px;
1118
+ border-radius: 8px;
1119
+ border: 1px solid rgba(191, 164, 109, 0.2);
1120
+ background: rgba(255, 255, 255, 0.92);
1121
+ }
1122
+
1123
+ .vf-editor-chat-composer-attachment-thumb {
1124
+ object-fit: cover;
1125
+ }
1126
+
1127
+ .vf-editor-chat-composer-attachment-file {
1128
+ display: inline-flex;
1129
+ align-items: center;
1130
+ justify-content: center;
1131
+ color: #617087;
1132
+ font-size: 0.82rem;
1133
+ font-weight: 800;
1134
+ }
1135
+
1136
+ .vf-editor-chat-composer-attachment-meta {
1137
+ min-width: 0;
1138
+ flex: 1 1 auto;
1139
+ }
1140
+
1141
+ .vf-editor-chat-composer-attachment-name {
1142
+ display: block;
1143
+ overflow: hidden;
1144
+ text-overflow: ellipsis;
1145
+ white-space: nowrap;
1146
+ color: #334155;
1147
+ font-size: 0.76rem;
1148
+ font-weight: 700;
1149
+ line-height: 1.2;
1150
+ }
1151
+
1152
+ .vf-editor-chat-composer-attachment-remove {
1153
+ all: unset;
1154
+ display: inline-flex;
1155
+ align-items: center;
1156
+ justify-content: center;
1157
+ width: 16px;
1158
+ min-width: 16px;
1159
+ height: 16px;
1160
+ padding: 0;
1161
+ border: 0;
1162
+ border-radius: 999px;
1163
+ background: transparent;
1164
+ color: #7b879b;
1165
+ box-shadow: none;
1166
+ font-size: 0.95rem;
1167
+ line-height: 1;
1168
+ }
1169
+
1170
+ .vf-editor-chat-composer-row {
1171
+ display: grid;
1172
+ grid-template-columns: auto minmax(0, 1fr) auto;
1173
+ align-items: flex-start;
1174
+ gap: 6px;
1175
+ }
1176
+
1177
+ .vf-editor-chat-attach-button,
1178
+ .vf-editor-chat-send-button {
1179
+ all: unset;
1180
+ display: inline-flex;
1181
+ align-items: center;
1182
+ justify-content: center;
1183
+ min-height: 32px;
1184
+ height: 32px;
1185
+ border-radius: 8px;
1186
+ border: 1px solid rgba(191, 164, 109, 0.34);
1187
+ background: rgba(255, 255, 255, 0.92);
1188
+ color: #243041;
1189
+ font-weight: 700;
1190
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
1191
+ }
1192
+
1193
+ .vf-editor-chat-attach-button {
1194
+ width: 32px;
1195
+ min-width: 32px;
1196
+ padding: 0;
1197
+ font-size: 1.1rem;
1198
+ line-height: 1;
1199
+ }
1200
+
1201
+ .vf-editor-chat-send-button {
1202
+ padding: 0 12px;
1203
+ background: #dbc17a;
1204
+ }
1205
+
1206
+ .vf-editor-chat-attach-button:disabled,
1207
+ .vf-editor-chat-send-button:disabled,
1208
+ .vf-editor-chat-new-thread:disabled {
1209
+ opacity: 0.58;
1210
+ cursor: not-allowed;
1211
+ }
1212
+
1213
+ .vf-editor-chat-input {
1214
+ all: unset;
1215
+ display: block;
1216
+ width: 100%;
1217
+ min-height: 96px;
1218
+ max-height: 180px;
1219
+ padding: 10px 0;
1220
+ background: transparent;
1221
+ box-shadow: none;
1222
+ color: #243041;
1223
+ font-size: 0.88rem;
1224
+ line-height: 1.45;
1225
+ resize: none;
1226
+ border: 0;
1227
+ }
1228
+
1229
+ .vf-editor-chat-input:focus {
1230
+ border: 0;
1231
+ box-shadow: none;
1232
+ }
1233
+
1234
+ .vf-editor-chat-input::placeholder {
1235
+ color: #7b879b;
1236
+ }
1237
+
1238
+ .vf-editor-chat-error {
1239
+ margin: 10px 10px 0;
1240
+ padding: 12px 14px;
1241
+ border-radius: 10px;
1242
+ border: 1px solid rgba(155, 45, 45, 0.18);
1243
+ background: rgba(155, 45, 45, 0.08);
1244
+ color: #8b1e1e;
1245
+ font-size: 0.88rem;
1246
+ }
1247
+
1248
+ @keyframes vf-editor-chat-bounce {
1249
+ 0%, 80%, 100% {
1250
+ transform: translateY(0);
1251
+ opacity: 0.55;
1252
+ }
1253
+ 40% {
1254
+ transform: translateY(-3px);
1255
+ opacity: 1;
1256
+ }
1257
+ }
1258
+
1259
+ @keyframes vf-editor-chat-pulse {
1260
+ 0%, 100% {
1261
+ box-shadow: 0 0 0 0 rgba(219, 193, 122, 0.26);
1262
+ }
1263
+ 50% {
1264
+ box-shadow: 0 0 0 6px rgba(219, 193, 122, 0.08);
1265
+ }
1266
+ }
1267
+
1268
+ @media (max-width: 1180px) {
1269
+ .editor-workbench {
1270
+ padding-top: 0;
1271
+ padding-right: 0;
1272
+ padding-bottom: 18px;
1273
+ }
1274
+
1275
+ .editor-main {
1276
+ overflow-x: hidden;
1277
+ overflow-y: auto;
1278
+ }
1279
+
1280
+ .editor-floating-nav {
1281
+ position: sticky;
1282
+ top: 16px;
1283
+ left: auto;
1284
+ max-width: none;
1285
+ margin: 0 0 16px;
1286
+ }
1287
+
1288
+ .editor-right-rail {
1289
+ position: static;
1290
+ width: auto;
1291
+ height: 45vh;
1292
+ min-height: 240px;
1293
+ margin-top: 18px;
1294
+ }
1295
+
1296
+ .vf-editor-chat-thread-chip {
1297
+ max-width: 180px;
1298
+ }
1299
+
1300
+ .vf-editor-chat-message.is-assistant .vf-editor-chat-bubble,
1301
+ .vf-editor-chat-message.is-user .vf-editor-chat-bubble {
1302
+ max-width: min(100%, 340px);
1303
+ }
1304
+ }
1305
+
1306
+ @media (max-width: 767px) {
1307
+ .editor-workbench {
1308
+ padding-bottom: 12px;
1309
+ }
1310
+
1311
+ .editor-floating-nav {
1312
+ top: 8px;
1313
+ grid-template-columns: auto minmax(0, 1fr) auto;
1314
+ gap: 8px;
1315
+ padding: 8px;
1316
+ border-radius: 18px;
1317
+ }
1318
+
1319
+ .editor-nav-title {
1320
+ min-width: 0;
1321
+ overflow: hidden;
1322
+ text-overflow: ellipsis;
1323
+ white-space: nowrap;
1324
+ }
1325
+
1326
+ .editor-right-rail {
1327
+ position: fixed !important;
1328
+ inset: 0;
1329
+ z-index: 110;
1330
+ width: 100%;
1331
+ height: 100svh;
1332
+ min-height: 0;
1333
+ margin: 0;
1334
+ border-radius: 0;
1335
+ overflow: visible;
1336
+ pointer-events: none;
1337
+ }
1338
+
1339
+ .editor-chat-panel {
1340
+ height: 100%;
1341
+ border-left: 0;
1342
+ background: transparent;
1343
+ pointer-events: none;
1344
+ }
1345
+
1346
+ .vf-editor-chat-shell {
1347
+ height: 100%;
1348
+ min-height: 0;
1349
+ pointer-events: none;
1350
+ }
1351
+
1352
+ .vf-editor-chat-shell[data-mobile-open="true"] {
1353
+ pointer-events: auto;
1354
+ }
1355
+
1356
+ .vf-editor-chat-mobile-fab {
1357
+ all: unset;
1358
+ position: fixed;
1359
+ right: 18px;
1360
+ bottom: calc(18px + env(safe-area-inset-bottom));
1361
+ z-index: 2;
1362
+ display: inline-flex;
1363
+ align-items: center;
1364
+ justify-content: center;
1365
+ width: 58px;
1366
+ height: 58px;
1367
+ border-radius: 999px;
1368
+ border: 1px solid rgba(255, 255, 255, 0.86);
1369
+ background:
1370
+ radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.36), transparent 30%),
1371
+ linear-gradient(180deg, #e2c675, #c79f3b);
1372
+ color: #243041;
1373
+ box-shadow:
1374
+ 0 18px 36px rgba(102, 82, 43, 0.24),
1375
+ 0 0 0 1px rgba(102, 82, 43, 0.14) inset;
1376
+ pointer-events: auto;
1377
+ transition:
1378
+ transform 160ms ease,
1379
+ opacity 160ms ease,
1380
+ box-shadow 160ms ease;
1381
+ }
1382
+
1383
+ .vf-editor-chat-mobile-fab:active {
1384
+ transform: translateY(1px) scale(0.98);
1385
+ }
1386
+
1387
+ .vf-editor-chat-mobile-fab svg {
1388
+ width: 29px;
1389
+ height: 29px;
1390
+ fill: none;
1391
+ stroke: currentColor;
1392
+ stroke-width: 1.9;
1393
+ stroke-linecap: round;
1394
+ stroke-linejoin: round;
1395
+ }
1396
+
1397
+ .vf-editor-chat-shell[data-mobile-open="true"] .vf-editor-chat-mobile-fab {
1398
+ opacity: 0;
1399
+ transform: scale(0.86);
1400
+ pointer-events: none;
1401
+ }
1402
+
1403
+ .vf-editor-chat-thread {
1404
+ position: fixed;
1405
+ inset: 0;
1406
+ z-index: 1;
1407
+ display: none;
1408
+ width: 100%;
1409
+ height: 100svh;
1410
+ border-radius: 0;
1411
+ background:
1412
+ radial-gradient(circle at top right, rgba(219, 193, 122, 0.12), transparent 30%),
1413
+ linear-gradient(180deg, rgba(255, 252, 247, 0.99), rgba(252, 247, 238, 0.98));
1414
+ box-shadow: none;
1415
+ pointer-events: auto;
1416
+ }
1417
+
1418
+ .vf-editor-chat-shell[data-mobile-open="true"] .vf-editor-chat-thread {
1419
+ display: flex;
1420
+ }
1421
+
1422
+ .vf-editor-chat-minimize {
1423
+ all: unset;
1424
+ display: inline-flex;
1425
+ align-items: center;
1426
+ justify-content: center;
1427
+ flex: 0 0 auto;
1428
+ width: 34px;
1429
+ height: 34px;
1430
+ border-radius: 999px;
1431
+ border: 1px solid rgba(191, 164, 109, 0.24);
1432
+ background: rgba(255, 255, 255, 0.9);
1433
+ color: #617087;
1434
+ font-size: 1.35rem;
1435
+ line-height: 1;
1436
+ }
1437
+
1438
+ .vf-editor-chat-header-row {
1439
+ align-items: flex-start;
1440
+ justify-content: flex-start;
1441
+ gap: 8px;
1442
+ }
1443
+
1444
+ .vf-editor-chat-header-row > div:first-child {
1445
+ flex: 1 1 auto;
1446
+ min-width: 0;
1447
+ }
1448
+
1449
+ .vf-editor-chat-new-thread,
1450
+ .vf-editor-chat-minimize {
1451
+ flex: 0 0 auto;
1452
+ }
1453
+
1454
+ .vf-editor-chat-header,
1455
+ .vf-editor-chat-tracer-bar,
1456
+ .vf-editor-chat-footer {
1457
+ padding-left: 12px;
1458
+ padding-right: 12px;
1459
+ }
1460
+
1461
+ .vf-editor-chat-message.is-assistant .vf-editor-chat-bubble,
1462
+ .vf-editor-chat-message.is-user .vf-editor-chat-bubble {
1463
+ max-width: 100%;
1464
+ }
1465
+
1466
+ .vf-editor-chat-thread-chip {
1467
+ max-width: 72vw;
1468
+ }
1469
+ }
1470
+ `;
1471
+ export const TEMPLATE_EDITOR_SHELL_SCRIPT = `
1472
+ document.addEventListener("click", async (event) => {
1473
+ const target = event.target;
1474
+ if (!(target instanceof HTMLElement)) {
1475
+ return;
1476
+ }
1477
+ const button = target.closest("[data-editor-copy]");
1478
+ if (!(button instanceof HTMLButtonElement)) {
1479
+ return;
1480
+ }
1481
+ const value = button.getAttribute("data-editor-copy") || "";
1482
+ if (!value) {
1483
+ return;
1484
+ }
1485
+ try {
1486
+ await navigator.clipboard.writeText(value);
1487
+ button.setAttribute("data-copied", "true");
1488
+ const original = button.textContent || "";
1489
+ button.textContent = "Copied";
1490
+ window.setTimeout(() => {
1491
+ button.textContent = original;
1492
+ button.setAttribute("data-copied", "false");
1493
+ }, 1200);
1494
+ } catch {}
1495
+ });
1496
+ `;
1497
+ export function renderTemplateEditorChrome(input) {
1498
+ return `
1499
+ <nav class="editor-floating-nav" aria-label="Template editor">
1500
+ <a class="editor-back-link" href="${escapeAttribute(input.backHref)}">Back</a>
1501
+ <div class="editor-nav-title">${escapeHtml(input.templateTitle)}</div>
1502
+ </nav>
1503
+ <aside class="editor-right-rail" aria-label="Chat panel">
1504
+ <div class="editor-chat-panel" data-template-editor-chat-root></div>
1505
+ </aside>
1506
+ `;
1507
+ }