flock-core 0.4.0b34__py3-none-any.whl → 0.4.0b36__py3-none-any.whl

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.

Potentially problematic release.


This version of flock-core might be problematic. Click here for more details.

Files changed (63) hide show
  1. flock/__init__.py +53 -8
  2. flock/cli/loaded_flock_cli.py +38 -18
  3. flock/core/api/main.py +138 -39
  4. flock/core/flock.py +48 -3
  5. flock/themes/alabaster.toml +43 -43
  6. flock/themes/guezwhoz.toml +43 -43
  7. flock/themes/wildcherry.toml +43 -43
  8. flock/themes/wombat.toml +43 -43
  9. flock/themes/zenburn.toml +43 -43
  10. flock/webapp/__init__.py +1 -0
  11. flock/webapp/app/__init__.py +0 -0
  12. flock/webapp/app/api/__init__.py +0 -0
  13. flock/webapp/app/api/agent_management.py +270 -0
  14. flock/webapp/app/api/execution.py +173 -0
  15. flock/webapp/app/api/flock_management.py +102 -0
  16. flock/webapp/app/api/registry_viewer.py +30 -0
  17. flock/webapp/app/config.py +87 -0
  18. flock/webapp/app/main.py +1074 -0
  19. flock/webapp/app/models_ui.py +7 -0
  20. flock/webapp/app/services/__init__.py +0 -0
  21. flock/webapp/app/services/flock_service.py +291 -0
  22. flock/webapp/app/templates/theme_mapper.html +326 -0
  23. flock/webapp/app/theme_mapper.py +812 -0
  24. flock/webapp/app/utils.py +85 -0
  25. flock/webapp/run.py +132 -0
  26. flock/webapp/static/css/custom.css +612 -0
  27. flock/webapp/templates/base.html +105 -0
  28. flock/webapp/templates/flock_editor.html +17 -0
  29. flock/webapp/templates/index.html +12 -0
  30. flock/webapp/templates/partials/_agent_detail_form.html +98 -0
  31. flock/webapp/templates/partials/_agent_list.html +19 -0
  32. flock/webapp/templates/partials/_agent_manager_view.html +53 -0
  33. flock/webapp/templates/partials/_agent_manager_view_old.html +19 -0
  34. flock/webapp/templates/partials/_agent_tools_checklist.html +14 -0
  35. flock/webapp/templates/partials/_create_flock_form.html +52 -0
  36. flock/webapp/templates/partials/_dashboard_flock_detail.html +18 -0
  37. flock/webapp/templates/partials/_dashboard_flock_file_list.html +17 -0
  38. flock/webapp/templates/partials/_dashboard_flock_properties_preview.html +29 -0
  39. flock/webapp/templates/partials/_dashboard_upload_flock_form.html +17 -0
  40. flock/webapp/templates/partials/_dynamic_input_form_content.html +22 -0
  41. flock/webapp/templates/partials/_env_vars_table.html +25 -0
  42. flock/webapp/templates/partials/_execution_form.html +48 -0
  43. flock/webapp/templates/partials/_execution_view_container.html +20 -0
  44. flock/webapp/templates/partials/_flock_file_list.html +24 -0
  45. flock/webapp/templates/partials/_flock_properties_form.html +52 -0
  46. flock/webapp/templates/partials/_flock_upload_form.html +17 -0
  47. flock/webapp/templates/partials/_header_flock_status.html +5 -0
  48. flock/webapp/templates/partials/_load_manager_view.html +50 -0
  49. flock/webapp/templates/partials/_registry_table.html +25 -0
  50. flock/webapp/templates/partials/_registry_viewer_content.html +47 -0
  51. flock/webapp/templates/partials/_results_display.html +35 -0
  52. flock/webapp/templates/partials/_settings_env_content.html +10 -0
  53. flock/webapp/templates/partials/_settings_theme_content.html +15 -0
  54. flock/webapp/templates/partials/_settings_view.html +36 -0
  55. flock/webapp/templates/partials/_sidebar.html +70 -0
  56. flock/webapp/templates/partials/_structured_data_view.html +40 -0
  57. flock/webapp/templates/partials/_theme_preview.html +23 -0
  58. flock/webapp/templates/registry_viewer.html +84 -0
  59. {flock_core-0.4.0b34.dist-info → flock_core-0.4.0b36.dist-info}/METADATA +1 -1
  60. {flock_core-0.4.0b34.dist-info → flock_core-0.4.0b36.dist-info}/RECORD +63 -14
  61. {flock_core-0.4.0b34.dist-info → flock_core-0.4.0b36.dist-info}/WHEEL +0 -0
  62. {flock_core-0.4.0b34.dist-info → flock_core-0.4.0b36.dist-info}/entry_points.txt +0 -0
  63. {flock_core-0.4.0b34.dist-info → flock_core-0.4.0b36.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,612 @@
1
+ /* Global styles */
2
+ body {
3
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
4
+ display: grid;
5
+ grid-template-columns: 300px 1fr;
6
+ grid-template-rows: auto 1fr auto;
7
+ grid-template-areas:
8
+ "header header"
9
+ "sidebar main"
10
+ "footer footer";
11
+ min-height: 100vh;
12
+ margin: 0;
13
+ background-color: var(--pico-background-color);
14
+ /* Add body padding here if needed, instead of in base.html <style> */
15
+ /* padding-bottom: 50px; */
16
+ }
17
+
18
+ /* --- Improved Header Styles --- */
19
+ header.top-header {
20
+ grid-area: header;
21
+ border-bottom: 1px solid var(--pico-muted-border-color);
22
+ padding: 0.7rem 1.5rem;
23
+ background-color: var(--pico-card-sectioning-background-color); /* Use custom or fallback */
24
+ display: flex;
25
+ justify-content: space-between;
26
+ align-items: center;
27
+ position: fixed;
28
+ top: 0;
29
+ left: 0;
30
+ right: 0;
31
+ z-index: 1001;
32
+ box-shadow: var(--pico-card-box-shadow, 0 2px 10px rgba(0, 0, 0, 0.2)); /* Use Pico shadow or fallback */
33
+ }
34
+
35
+ header.top-header strong {
36
+ color: var(--pico-color); /* Use theme text color */
37
+ font-weight: 600;
38
+ font-size: 1.2rem;
39
+ letter-spacing: 0.02em;
40
+ }
41
+
42
+ header.top-header small {
43
+ color: var(--pico-muted-color); /* Use muted color */
44
+ font-size: 0.85rem;
45
+ }
46
+
47
+ header.top-header code {
48
+ background: var(--pico-code-background-color); /* Use code background */
49
+ color: var(--pico-code-color); /* Use code text color */
50
+ padding: 0.2em 0.5em;
51
+ border-radius: 4px;
52
+ font-size: 0.85rem;
53
+ }
54
+
55
+ /* --- End Header Styles --- */
56
+
57
+ main.main-content {
58
+ grid-area: main;
59
+ padding: 1.5rem;
60
+ overflow-y: auto;
61
+ margin-top: 3.5rem; /* Needs to match header height */
62
+ background-color: var(--pico-background-color);
63
+ padding-bottom: 50px; /* Add padding here to avoid overlap with fixed footer */
64
+ }
65
+
66
+ footer.main-footer {
67
+ position: fixed;
68
+ left: 0;
69
+ bottom: 0;
70
+ width: 100%;
71
+ background-color: var(--pico-card-background-color);
72
+ border-top: 1px solid var(--pico-muted-border-color);
73
+ padding: 0.5rem 1rem;
74
+ text-align: center;
75
+ z-index: 1000;
76
+ }
77
+
78
+ /* --- Improved Sidebar Styles --- */
79
+ aside.sidebar {
80
+ grid-area: sidebar;
81
+ background: var(--flock-sidebar-background, var(--pico-card-background-color)); /* Use custom or fallback */
82
+ padding: 1.5rem 0;
83
+ border-right: 1px solid var(--pico-muted-border-color);
84
+ margin-top: 3.2rem; /* Adjust if header height changed */
85
+ height: calc(100vh - 3.5rem - 2.1rem); /* Adjust based on header/footer heights */
86
+ position: fixed;
87
+ left: 0;
88
+ bottom: 2.1rem; /* Adjust based on footer height */
89
+ width: 300px; /* Match grid-template-columns */
90
+ z-index: 1000;
91
+ }
92
+
93
+ .sidebar nav h5 {
94
+ margin-bottom: 0.9rem;
95
+ padding-left: 1.5rem;
96
+ color: var(--pico-color); /* Use muted color */
97
+ font-size: 0.85em;
98
+ text-transform: uppercase;
99
+ letter-spacing: 0.08em;
100
+ font-weight: 600;
101
+ }
102
+
103
+ .sidebar nav h5:first-of-type {
104
+ margin-top: 0;
105
+ margin-bottom: 0.9rem;
106
+ }
107
+
108
+ .sidebar nav ul {
109
+ padding-left: 0.5rem;
110
+ padding-right: 0.5rem;
111
+ list-style: none;
112
+ margin-bottom: 1.5rem;
113
+ }
114
+
115
+ .sidebar nav li {
116
+ margin-bottom: 0.2rem;
117
+ }
118
+
119
+ .sidebar hr {
120
+ margin: 1.25rem 1.5rem;
121
+ border-color: var(--pico-muted-border-color); /* Use muted border */
122
+ opacity: 0.5; /* Keep opacity or adjust as needed */
123
+ }
124
+
125
+ /* Links and buttons in sidebar */
126
+ .sidebar nav a,
127
+ .sidebar nav button {
128
+ display: block;
129
+ width: 100%;
130
+ text-align: left;
131
+ margin-bottom: 0;
132
+ padding: 0.7rem 1rem;
133
+ border: none;
134
+ background-color: transparent;
135
+ color: var(--pico-button-base-color); /* Use theme text color */
136
+ text-decoration: none;
137
+ border-radius: 8px;
138
+ font-size: 0.9em;
139
+ cursor: pointer;
140
+ transition: all 0.2s ease-in-out;
141
+ font-weight: 500;
142
+ white-space: nowrap;
143
+ overflow: hidden;
144
+ text-overflow: ellipsis;
145
+ }
146
+
147
+ /* Icons in sidebar buttons */
148
+ .sidebar nav a i,
149
+ .sidebar nav button i {
150
+ width: 24px;
151
+ margin-right: 8px;
152
+ text-align: center;
153
+ color: var(--pico-h2-color); /* Use muted color */
154
+ transition: all 0.2s ease-in-out;
155
+ flex-shrink: 0;
156
+ }
157
+
158
+ .sidebar nav a:hover i,
159
+ .sidebar nav button:hover i,
160
+ .sidebar nav a.active-nav i,
161
+ .sidebar nav button.active-nav i {
162
+ color: var(--pico-primary-inverse); /* Color for icon on active/hover background */
163
+ transform: scale(1.1);
164
+ }
165
+
166
+ /* Remove Pico's default outline styling for buttons if class 'outline' or 'contrast' is used */
167
+ .sidebar nav button.outline,
168
+ .sidebar nav button.contrast {
169
+ border: none;
170
+ background-color: transparent;
171
+ color: var(--pico-muted-color); /* Use theme text color */
172
+ box-shadow: none;
173
+ }
174
+
175
+ .sidebar nav button:focus {
176
+ /* Use Pico's focus style or define a custom one using theme vars */
177
+ box-shadow: 0 0 0 3px var(--pico-primary-focus);
178
+ }
179
+
180
+ .sidebar nav a:hover,
181
+ .sidebar nav button:hover {
182
+ background-color: var(--pico-primary-hover-background, var(--pico-primary-focus)); /* Use hover background or focus as fallback */
183
+ color: var(--pico-primary-inverse); /* Text color on hover background */
184
+ transform: translateX(3px);
185
+ }
186
+
187
+ /* Active navigation item */
188
+ .sidebar nav a[aria-current="page"],
189
+ .sidebar nav button[aria-current="page"],
190
+ .sidebar nav a.active-nav,
191
+ .sidebar nav button.active-nav {
192
+ background-color: var(--pico-primary);
193
+ color: var(--pico-primary-inverse);
194
+ font-weight: 600;
195
+ box-shadow: var(--pico-card-box-shadow); /* Use a standard shadow or define custom */
196
+ }
197
+
198
+ /* --- End Sidebar Styles --- */
199
+
200
+
201
+ /* Message container positioning */
202
+ .message-container {
203
+ position: fixed;
204
+ bottom: 3rem;
205
+ right: 1rem;
206
+ z-index: 1002;
207
+ width: auto;
208
+ max-width: 400px;
209
+ }
210
+
211
+ .message-container > div {
212
+ margin-top: 0.5rem;
213
+ box-shadow: var(--pico-card-box-shadow);
214
+ display: flex;
215
+ justify-content: space-between;
216
+ align-items: center;
217
+ padding: 0.75rem;
218
+ border-radius: var(--pico-border-radius);
219
+ font-weight: 500;
220
+ }
221
+
222
+ .message-container .success {
223
+ background-color: var(--flock-success-color, var(--pico-ins-color)); /* Use custom or Pico fallback */
224
+ color: var(--pico-primary-inverse); /* Assuming success background provides contrast */
225
+ border: 1px solid var(--flock-success-color, var(--pico-ins-color));
226
+ }
227
+
228
+ .message-container .error {
229
+ background-color: var(--flock-error-color, var(--pico-del-color)); /* Use custom or Pico fallback */
230
+ color: var(--pico-primary-inverse); /* Assuming error background provides contrast */
231
+ border: 1px solid var(--flock-error-color, var(--pico-del-color));
232
+ }
233
+
234
+ .message-container .close {
235
+ background: none;
236
+ border: none;
237
+ color: inherit;
238
+ font-size: 1.2rem;
239
+ cursor: pointer;
240
+ padding: 0 0.5rem;
241
+ margin-left: 1rem;
242
+ }
243
+
244
+ /* -- Progress & Loading Indicators -- */
245
+ progress {
246
+ border-radius: 10px;
247
+ height: 8px;
248
+ }
249
+
250
+ progress:indeterminate {
251
+ background: rgba(var(--pico-primary-rgb), 0.2); /* Need RGB version or approximation */
252
+ /* Fallback if RGB not available */
253
+ /* background: var(--pico-loading-bar-background-color); */
254
+ }
255
+
256
+ progress:indeterminate::after {
257
+ /* Fallback if RGB not available */
258
+ /* background-image: var(--pico-loading-bar-indeterminate-background-image); */
259
+ background-image: linear-gradient(90deg, rgba(var(--pico-primary-rgb), 0.2) 0%, var(--pico-primary) 50%, rgba(var(--pico-primary-rgb), 0.2) 100%);
260
+ }
261
+
262
+ .sidebar progress {
263
+ width: 80%;
264
+ margin: 1rem auto;
265
+ display: block;
266
+ }
267
+
268
+ /* Editor Layout - Agent Manager View */
269
+ .editor-grid {
270
+ display: grid;
271
+ grid-template-columns: minmax(250px, 1fr) 2fr;
272
+ gap: var(--pico-spacing);
273
+ align-items: start;
274
+ }
275
+
276
+ #agent-list-panel,
277
+ #agent-detail-panel {
278
+ height: calc(80vh - var(--pico-block-spacing-vertical) * 2);
279
+
280
+ }
281
+
282
+ #agent-list-panel article,
283
+ #agent-detail-panel article {
284
+ background-color: var(--pico-card-background-color);
285
+ padding: var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal);
286
+ height: 100%;
287
+ display: flex;
288
+ flex-direction: column;
289
+ }
290
+
291
+ #agent-list-panel header,
292
+ #agent-detail-panel header {
293
+ /* background-color: var(--pico-card-sectioning-background-color); */
294
+ flex-shrink: 0;
295
+ }
296
+
297
+ #agent-list-panel ul {
298
+ flex-grow: 1;
299
+ overflow-y: auto;
300
+ list-style-type: none;
301
+ padding: 0;
302
+ }
303
+
304
+ #agent-list-panel li {
305
+ padding: 0.75rem;
306
+ border: 1px solid var(--pico-muted-border-color);
307
+ margin-bottom: 0.5rem;
308
+ border-radius: var(--pico-border-radius);
309
+ cursor: pointer;
310
+ transition: background-color 0.2s ease-in-out;
311
+ }
312
+
313
+ #agent-list-panel li:hover,
314
+ #agent-list-panel li.htmx-setting {
315
+ background-color: var(--pico-muted-hover-background-color);
316
+ }
317
+
318
+ #agent-list-panel li.selected-agent {
319
+ background-color: var(--pico-primary-focus); /* Use focus color for selection */
320
+ border-color: var(--pico-primary);
321
+ color: var(--pico-primary-inverse);
322
+ }
323
+
324
+ #agent-list-panel li small {
325
+ color: var(--pico-muted-color);
326
+ }
327
+
328
+ #agent-list-panel .grid {
329
+ margin-top: auto;
330
+ padding-top: 1rem;
331
+ }
332
+
333
+ /* Agent Detail Form Refinements */
334
+ #agent-detail-panel form {
335
+ flex-grow: 1;
336
+ overflow-y: auto;
337
+ padding-right: 0.5rem;
338
+ }
339
+
340
+ #agent-detail-panel fieldset {
341
+ margin-bottom: 1rem;
342
+ padding-bottom: 0.5rem;
343
+ border-bottom: 1px solid var(--pico-muted-border-color);
344
+ }
345
+
346
+ #agent-detail-panel fieldset:last-of-type {
347
+ border-bottom: none;
348
+ margin-bottom: 0;
349
+ }
350
+
351
+ #agent-detail-form-content .grid {
352
+ margin-top: 1rem;
353
+ flex-shrink: 0;
354
+ }
355
+
356
+ /* Buttons and Forms Styling */
357
+ button[type="submit"],
358
+ button.primary {
359
+ color: var(--pico-color);
360
+ background-color: var(--pico-primary);
361
+ border-color: var(--pico-primary);
362
+ box-shadow: var(--pico-card-box-shadow); /* Use standard shadow or focus? */
363
+ }
364
+
365
+ button[type="submit"]:hover,
366
+ button.primary:hover {
367
+ background-color: var(--pico-primary-hover);
368
+ border-color: var(--pico-primary-hover);
369
+ box-shadow: var(--pico-card-box-shadow); /* Enhance shadow on hover? */
370
+ }
371
+
372
+ /* Tool Checklist */
373
+ .tool-checklist {
374
+ max-height: 150px;
375
+ overflow-y: auto;
376
+ border: 1px solid var(--pico-muted-border-color);
377
+ padding: 0.5rem;
378
+ margin-bottom: 0.75rem;
379
+ border-radius: var(--pico-border-radius);
380
+ background-color: var(--pico-form-element-background-color);
381
+ }
382
+
383
+ .tool-checklist label {
384
+ display: block;
385
+ margin-bottom: 0.25rem;
386
+ font-weight: normal;
387
+ }
388
+
389
+ .tool-checklist input[type="checkbox"] {
390
+ margin-right: 0.5rem;
391
+ }
392
+
393
+ .tool-checklist label small {
394
+ color: var(--pico-muted-color);
395
+ }
396
+
397
+ /* Execution & Results Display */
398
+ #execution-panel article {
399
+ margin-bottom: 1rem;
400
+ }
401
+
402
+ #results-display-container {
403
+ margin-top: 0;
404
+ }
405
+
406
+ #results-display {
407
+ background-color: var(--pico-code-background-color);
408
+ color: var(--pico-code-color);
409
+ padding: 1rem;
410
+ border-radius: var(--pico-border-radius);
411
+ overflow-x: auto;
412
+ margin-top: 1rem;
413
+ min-height: 100px;
414
+ border: 1px solid var(--pico-muted-border-color);
415
+ }
416
+
417
+ #results-display pre {
418
+ margin: 0;
419
+ white-space: pre-wrap;
420
+ word-break: break-all;
421
+ }
422
+
423
+ #results-display .structured-table {
424
+ border: 1px solid var(--pico-muted-border-color);
425
+ font-size: 0.9em;
426
+ width: 100%;
427
+ margin-bottom: 0.75rem !important;
428
+ border-collapse: collapse;
429
+ }
430
+
431
+ #results-display .structured-table td,
432
+ #results-display .structured-table th {
433
+ padding: 0.4em 0.6em !important;
434
+ vertical-align: top;
435
+ border-bottom: 1px solid var(--pico-muted-border-color);
436
+ }
437
+
438
+ #results-display .structured-table tr:last-child td {
439
+ border-bottom: none;
440
+ }
441
+
442
+ #results-display .structured-table td[style*="font-weight: bold"] {
443
+ color: var(--pico-secondary); /* Use secondary color for keys? */
444
+ min-width: 120px;
445
+ max-width: 250px;
446
+ word-break: break-word;
447
+ border-right: 1px solid var(--pico-muted-border-color);
448
+ }
449
+
450
+ #results-display .structured-table ul {
451
+ margin-left: 1em;
452
+ padding-left: 1em;
453
+ }
454
+
455
+ /* HTMX Indicators */
456
+ .htmx-indicator {
457
+ display: none;
458
+ opacity: 0;
459
+ transition: opacity 0.3s ease-in-out;
460
+ }
461
+
462
+ .htmx-request .htmx-indicator {
463
+ display: inline-block;
464
+ opacity: 1;
465
+ margin-left: 0.5em;
466
+ }
467
+
468
+ .htmx-request.htmx-indicator {
469
+ display: inline-block;
470
+ opacity: 1;
471
+ }
472
+
473
+ /* Registry Viewer Specific */
474
+ #registry-page-content nav ul[role="group"] {
475
+ margin-bottom: 1rem;
476
+ }
477
+
478
+ #registry-page-content nav ul[role="group"] li button {
479
+ width: 100%;
480
+ }
481
+
482
+ #registry-table-container table {
483
+ margin-top: 1rem;
484
+ }
485
+
486
+ /* Utility for form field errors */
487
+ .field-error {
488
+ color: var(--flock-error-color, var(--pico-del-color)); /* Use custom or fallback */
489
+ font-size: var(--pico-font-size-small);
490
+ margin-top: -0.5rem;
491
+ margin-bottom: 0.5rem;
492
+ }
493
+
494
+ /* Main content headings - ensure consistent vertical alignment */
495
+ main.main-content h1,
496
+ main.main-content h2,
497
+ main.main-content h3 {
498
+ color: var(--pico-color); /* Use theme text color */
499
+ font-weight: 600;
500
+ line-height: 1.2;
501
+ margin-top: 0; /* Reset top margin */
502
+ }
503
+
504
+ main.main-content h1 {
505
+ font-size: 2rem;
506
+ margin-bottom: 1.5rem;
507
+ }
508
+ main.main-content h2 {
509
+ font-size: 1.75rem;
510
+ margin-bottom: 1.25rem;
511
+ }
512
+ main.main-content h3 {
513
+ font-size: 1.5rem;
514
+ margin-bottom: 1rem;
515
+ }
516
+
517
+ /* Panel titles styling for consistency */
518
+ .panel-title {
519
+ margin-top: 0;
520
+ margin-bottom: 1.25rem;
521
+ /* Inherits color from h1/h2/h3 now */
522
+ }
523
+
524
+ /* ==========================================================================
525
+ Two-Pane Flex Layout (Unified)
526
+ ========================================================================== */
527
+
528
+ .two-pane-flex-container {
529
+ display: flex;
530
+ gap: 1.5rem; /* Consistent gap like in execution view */
531
+ border: 1px solid var(--pico-muted-border-color); /* Optional: If the container itself needs a border
532
+ /* border-radius: var(--pico-border-radius); */
533
+ background-color: var(--pico-card-background-color); /* Optional: If the container needs a distinct background */
534
+ }
535
+
536
+ .left-pane {
537
+ flex: 1;
538
+ min-width: 300px; /* Minimum width for the left selection/control pane */
539
+ /* background-color: var(--pico-card-background-color); /* Optional: if left pane needs card-like bg */
540
+ /* border: 1px solid var(--pico-muted-border-color); /* Optional: if left pane needs border */
541
+ /* border-radius: var(--pico-border-radius); */
542
+ display: flex; /* To allow header and scrollable content within */
543
+ flex-direction: column;
544
+
545
+ }
546
+
547
+ /* If the left pane has a content div that should be scrollable (e.g., a list) */
548
+ .left-pane > .scrollable-content {
549
+ flex-grow: 1;
550
+
551
+ }
552
+
553
+ .right-pane-framed {
554
+ flex: 2; /* Right pane takes more space */
555
+ /* background-color: var(--pico-background-color); /* Match execution view's right pane style if it's plain */
556
+ border-left: 1px solid var(--pico-muted-border-color); /* Separator line */
557
+ padding-left: 1.5rem; /* Padding to the left of the separator */
558
+
559
+ }
560
+
561
+ .right-pane-framed > header {
562
+ padding-bottom: 0.75rem; /* Space below the title in the right pane */
563
+ border-bottom: 1px solid var(--pico-muted-border-color); /* Line below title */
564
+ margin-bottom: 1rem; /* Space between header and content */
565
+ }
566
+
567
+ .right-pane-framed > header > h5 {
568
+ margin-bottom: 0; /* Reset Pico's default h5 margin if needed */
569
+ font-size: 1.1rem; /* Consistent header size */
570
+ }
571
+
572
+ /* Styles for item lists within the left-pane if needed globally */
573
+ .item-list-container {
574
+ flex-grow: 1;
575
+
576
+ /* border-top: 1px solid var(--pico-muted-border-color); */
577
+ }
578
+
579
+ ul.item-list {
580
+ list-style-type: none;
581
+ padding: 0;
582
+ margin: 0;
583
+ }
584
+
585
+ ul.item-list li {
586
+ padding: 0.75rem 1rem;
587
+ border-bottom: 1px solid var(--pico-muted-border-color);
588
+ cursor: pointer;
589
+ transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
590
+ }
591
+
592
+ ul.item-list li:last-child {
593
+ border-bottom: none;
594
+ }
595
+
596
+ ul.item-list li:hover,
597
+ ul.item-list li.selected-item {
598
+ background-color: var(--pico-primary-focus); /* Or var(--pico-active-background-color) */
599
+ color: var(--pico-primary-inverse); /* Or var(--pico-active-color) */
600
+ }
601
+
602
+ /* Attempt to override/reset .editor-grid if it's defined elsewhere and conflicts.
603
+ If .editor-grid and .flock-manager-grid are only in <style> tags, they will be removed with the HTML. */
604
+ .editor-grid {
605
+ display: unset;
606
+ grid-template-columns: unset;
607
+ gap: unset;
608
+ height: unset;
609
+ border: unset;
610
+ border-radius: unset;
611
+ background-color: unset;
612
+ }
@@ -0,0 +1,105 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="dark">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>{% block title %}Flock UI{% endblock %}</title>
8
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css" />
9
+ <link rel="stylesheet" href="/static/css/custom.css">
10
+ <!-- Font Awesome for icons -->
11
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
12
+ {# Inject Theme CSS Variables #}
13
+ {% if theme_css %}
14
+ <style>
15
+ /* Start Theme CSS */
16
+ {{ theme_css | safe }}
17
+ /* End Theme CSS */
18
+ </style>
19
+ {% endif %}
20
+ {# End Theme CSS Injection #}
21
+ <script src="https://unpkg.com/htmx.org@1.9.10"
22
+ integrity="sha384-D1Kt99CQMDuVetoL1lrYwg5t+9QdHe7NLX/SoJYkXDFfX37iInKRy5xLSi8nO7UC"
23
+ crossorigin="anonymous"></script>
24
+ <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
25
+ <!-- Removed inline styles as they're in custom.css -->
26
+ </head>
27
+
28
+ <body>
29
+ <header class="top-header">
30
+ <span><strong>🐧 Flock UI 🐤</strong></span>
31
+ <span id="header-flock-status-container" hx-get="/ui/htmx/header-flock-status?ui_mode={{ ui_mode }}"
32
+ hx-trigger="load, flockLoaded from:body, flockCleared from:body" hx-swap="innerHTML">
33
+ <small>Loading status...</small> {# Placeholder while loading #}
34
+ </span>
35
+ </header>
36
+
37
+ <aside class="sidebar" hx-get="/ui/htmx/sidebar?ui_mode={{ ui_mode }}"
38
+ hx-trigger="load, flockLoaded from:body, flockListChanged from:body" hx-swap="innerHTML">
39
+ <p>Loading navigation...</p><progress></progress>
40
+ </aside>
41
+
42
+ <main class="main-content" id="main-content-area">
43
+ {# Initial content is now loaded via HTMX based on the route #}
44
+ <div hx-get="{{ initial_content_url }}" hx-trigger="load" hx-swap="innerHTML">
45
+ <p>Loading content...</p><progress></progress>
46
+ </div>
47
+ {# Render block content if navigating directly and template extends base #}
48
+ {% block content %}{% endblock %}
49
+ </main>
50
+
51
+ <div class="message-container" x-data="messageHandler(
52
+ {{ success_message | tojson | safe if success_message else 'null' }},
53
+ {{ error_message | tojson | safe if error_message else 'null' }}
54
+ )">
55
+ <template x-if="showSuccess && successMsg">
56
+ <div class="success" role="alert" @click="showSuccess = false" style="cursor: pointer;">
57
+ <span x-text="successMsg"></span>
58
+ <button type="button" class="close" aria-label="Dismiss">×</button>
59
+ </div>
60
+ </template>
61
+ <template x-if="showError && errorMsg">
62
+ <div class="error" role="alert" @click="showError = false" style="cursor: pointer;">
63
+ <span x-text="errorMsg"></span>
64
+ <button type="button" class="close" aria-label="Dismiss">×</button>
65
+ </div>
66
+ </template>
67
+ </div>
68
+
69
+ <footer class="main-footer">
70
+ <small>Built with FastAPI, HTMX, Pico.CSS by 🤍 white duck 🦆 - Theme: {{ active_theme_name | default('default') }}</small>
71
+ </footer>
72
+
73
+ <script>
74
+ function messageHandler(initialSuccessMsg, initialErrorMsg) {
75
+ return {
76
+ showSuccess: !!initialSuccessMsg,
77
+ showError: !!initialErrorMsg,
78
+ successMsg: initialSuccessMsg,
79
+ errorMsg: initialErrorMsg,
80
+ init() {
81
+ if (this.successMsg) { setTimeout(() => this.showSuccess = false, 5000); }
82
+ if (this.errorMsg) { setTimeout(() => this.showError = false, 7000); }
83
+
84
+ window.addEventListener('notify', event => {
85
+ if (event.detail.type === 'success') {
86
+ this.successMsg = event.detail.message;
87
+ this.showSuccess = true; this.showError = false;
88
+ setTimeout(() => this.showSuccess = false, 5000);
89
+ }
90
+ if (event.detail.type === 'error') {
91
+ this.errorMsg = event.detail.message;
92
+ this.showError = true; this.showSuccess = false;
93
+ setTimeout(() => this.showError = false, 7000);
94
+ }
95
+ });
96
+ }
97
+ };
98
+ }
99
+ function triggerEvent(eventName, detail = {}) {
100
+ htmx.trigger(document.body, eventName, detail);
101
+ }
102
+ </script>
103
+ </body>
104
+
105
+ </html>