figrecipe 0.6.0__py3-none-any.whl → 0.7.4__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.
Files changed (177) hide show
  1. figrecipe/__init__.py +106 -973
  2. figrecipe/_api/__init__.py +48 -0
  3. figrecipe/_api/_extract.py +108 -0
  4. figrecipe/_api/_notebook.py +61 -0
  5. figrecipe/_api/_panel.py +46 -0
  6. figrecipe/_api/_save.py +191 -0
  7. figrecipe/_api/_seaborn_proxy.py +34 -0
  8. figrecipe/_api/_style_manager.py +153 -0
  9. figrecipe/_api/_subplots.py +333 -0
  10. figrecipe/_api/_validate.py +82 -0
  11. figrecipe/_dev/__init__.py +2 -93
  12. figrecipe/_dev/_plotters.py +76 -0
  13. figrecipe/_dev/_run_demos.py +56 -0
  14. figrecipe/_dev/demo_plotters/__init__.py +35 -166
  15. figrecipe/_dev/demo_plotters/_categories.py +81 -0
  16. figrecipe/_dev/demo_plotters/_figure_creators.py +119 -0
  17. figrecipe/_dev/demo_plotters/_helpers.py +31 -0
  18. figrecipe/_dev/demo_plotters/_registry.py +50 -0
  19. figrecipe/_dev/demo_plotters/bar_categorical/__init__.py +4 -0
  20. figrecipe/_dev/demo_plotters/contour_surface/__init__.py +4 -0
  21. figrecipe/_dev/demo_plotters/distribution/__init__.py +4 -0
  22. figrecipe/_dev/demo_plotters/image_matrix/__init__.py +4 -0
  23. figrecipe/_dev/demo_plotters/line_curve/__init__.py +4 -0
  24. figrecipe/_dev/demo_plotters/{plot_plot.py → line_curve/plot_plot.py} +3 -2
  25. figrecipe/_dev/demo_plotters/scatter_points/__init__.py +4 -0
  26. figrecipe/_dev/demo_plotters/special/__init__.py +4 -0
  27. figrecipe/_dev/demo_plotters/{plot_pie.py → special/plot_pie.py} +5 -1
  28. figrecipe/_dev/demo_plotters/spectral_signal/__init__.py +4 -0
  29. figrecipe/_dev/demo_plotters/vector_flow/__init__.py +4 -0
  30. figrecipe/_editor/__init__.py +57 -9
  31. figrecipe/_editor/_bbox/__init__.py +43 -0
  32. figrecipe/_editor/_bbox/_collections.py +177 -0
  33. figrecipe/_editor/_bbox/_elements.py +159 -0
  34. figrecipe/_editor/_bbox/_extract.py +256 -0
  35. figrecipe/_editor/_bbox/_extract_axes.py +370 -0
  36. figrecipe/_editor/_bbox/_extract_text.py +342 -0
  37. figrecipe/_editor/_bbox/_lines.py +173 -0
  38. figrecipe/_editor/_bbox/_transforms.py +146 -0
  39. figrecipe/_editor/_flask_app.py +68 -1039
  40. figrecipe/_editor/_helpers.py +242 -0
  41. figrecipe/_editor/_hitmap/__init__.py +76 -0
  42. figrecipe/_editor/_hitmap/_artists/__init__.py +21 -0
  43. figrecipe/_editor/_hitmap/_artists/_collections.py +345 -0
  44. figrecipe/_editor/_hitmap/_artists/_images.py +68 -0
  45. figrecipe/_editor/_hitmap/_artists/_lines.py +107 -0
  46. figrecipe/_editor/_hitmap/_artists/_patches.py +163 -0
  47. figrecipe/_editor/_hitmap/_artists/_text.py +190 -0
  48. figrecipe/_editor/_hitmap/_colors.py +181 -0
  49. figrecipe/_editor/_hitmap/_detect.py +137 -0
  50. figrecipe/_editor/_hitmap/_restore.py +154 -0
  51. figrecipe/_editor/_hitmap_main.py +182 -0
  52. figrecipe/_editor/_preferences.py +135 -0
  53. figrecipe/_editor/_render_overrides.py +480 -0
  54. figrecipe/_editor/_renderer.py +35 -185
  55. figrecipe/_editor/_routes_axis.py +453 -0
  56. figrecipe/_editor/_routes_core.py +284 -0
  57. figrecipe/_editor/_routes_element.py +317 -0
  58. figrecipe/_editor/_routes_style.py +223 -0
  59. figrecipe/_editor/_templates/__init__.py +78 -1
  60. figrecipe/_editor/_templates/_html.py +109 -13
  61. figrecipe/_editor/_templates/_scripts/__init__.py +120 -0
  62. figrecipe/_editor/_templates/_scripts/_api.py +228 -0
  63. figrecipe/_editor/_templates/_scripts/_colors.py +485 -0
  64. figrecipe/_editor/_templates/_scripts/_core.py +436 -0
  65. figrecipe/_editor/_templates/_scripts/_debug_snapshot.py +186 -0
  66. figrecipe/_editor/_templates/_scripts/_element_editor.py +310 -0
  67. figrecipe/_editor/_templates/_scripts/_files.py +195 -0
  68. figrecipe/_editor/_templates/_scripts/_hitmap.py +509 -0
  69. figrecipe/_editor/_templates/_scripts/_inspector.py +315 -0
  70. figrecipe/_editor/_templates/_scripts/_labels.py +464 -0
  71. figrecipe/_editor/_templates/_scripts/_legend_drag.py +265 -0
  72. figrecipe/_editor/_templates/_scripts/_modals.py +226 -0
  73. figrecipe/_editor/_templates/_scripts/_overlays.py +292 -0
  74. figrecipe/_editor/_templates/_scripts/_panel_drag.py +334 -0
  75. figrecipe/_editor/_templates/_scripts/_panel_position.py +279 -0
  76. figrecipe/_editor/_templates/_scripts/_selection.py +237 -0
  77. figrecipe/_editor/_templates/_scripts/_tabs.py +89 -0
  78. figrecipe/_editor/_templates/_scripts/_view_mode.py +107 -0
  79. figrecipe/_editor/_templates/_scripts/_zoom.py +179 -0
  80. figrecipe/_editor/_templates/_styles/__init__.py +69 -0
  81. figrecipe/_editor/_templates/_styles/_base.py +64 -0
  82. figrecipe/_editor/_templates/_styles/_buttons.py +206 -0
  83. figrecipe/_editor/_templates/_styles/_color_input.py +123 -0
  84. figrecipe/_editor/_templates/_styles/_controls.py +265 -0
  85. figrecipe/_editor/_templates/_styles/_dynamic_props.py +144 -0
  86. figrecipe/_editor/_templates/_styles/_forms.py +126 -0
  87. figrecipe/_editor/_templates/_styles/_hitmap.py +184 -0
  88. figrecipe/_editor/_templates/_styles/_inspector.py +90 -0
  89. figrecipe/_editor/_templates/_styles/_labels.py +118 -0
  90. figrecipe/_editor/_templates/_styles/_modals.py +98 -0
  91. figrecipe/_editor/_templates/_styles/_overlays.py +130 -0
  92. figrecipe/_editor/_templates/_styles/_preview.py +225 -0
  93. figrecipe/_editor/_templates/_styles/_selection.py +73 -0
  94. figrecipe/_params/_DECORATION_METHODS.py +6 -0
  95. figrecipe/_recorder.py +35 -106
  96. figrecipe/_recorder_utils.py +124 -0
  97. figrecipe/_reproducer/__init__.py +18 -0
  98. figrecipe/_reproducer/_core.py +498 -0
  99. figrecipe/_reproducer/_custom_plots.py +279 -0
  100. figrecipe/_reproducer/_seaborn.py +100 -0
  101. figrecipe/_reproducer/_violin.py +186 -0
  102. figrecipe/_signatures/_kwargs.py +273 -0
  103. figrecipe/_signatures/_loader.py +21 -423
  104. figrecipe/_signatures/_parsing.py +147 -0
  105. figrecipe/_wrappers/_axes.py +119 -910
  106. figrecipe/_wrappers/_axes_helpers.py +136 -0
  107. figrecipe/_wrappers/_axes_plots.py +418 -0
  108. figrecipe/_wrappers/_axes_seaborn.py +157 -0
  109. figrecipe/_wrappers/_figure.py +162 -0
  110. figrecipe/_wrappers/_panel_labels.py +127 -0
  111. figrecipe/_wrappers/_plot_helpers.py +143 -0
  112. figrecipe/_wrappers/_violin_helpers.py +180 -0
  113. figrecipe/styles/__init__.py +8 -6
  114. figrecipe/styles/_dotdict.py +72 -0
  115. figrecipe/styles/_finalize.py +134 -0
  116. figrecipe/styles/_fonts.py +77 -0
  117. figrecipe/styles/_kwargs_converter.py +178 -0
  118. figrecipe/styles/_plot_styles.py +209 -0
  119. figrecipe/styles/_style_applier.py +32 -478
  120. figrecipe/styles/_style_loader.py +16 -192
  121. figrecipe/styles/_themes.py +151 -0
  122. figrecipe/styles/presets/MATPLOTLIB.yaml +2 -1
  123. figrecipe/styles/presets/SCITEX.yaml +29 -24
  124. {figrecipe-0.6.0.dist-info → figrecipe-0.7.4.dist-info}/METADATA +37 -2
  125. figrecipe-0.7.4.dist-info/RECORD +188 -0
  126. figrecipe/_editor/_bbox.py +0 -978
  127. figrecipe/_editor/_hitmap.py +0 -937
  128. figrecipe/_editor/_templates/_scripts.py +0 -2778
  129. figrecipe/_editor/_templates/_styles.py +0 -1326
  130. figrecipe/_reproducer.py +0 -975
  131. figrecipe-0.6.0.dist-info/RECORD +0 -90
  132. /figrecipe/_dev/demo_plotters/{plot_bar.py → bar_categorical/plot_bar.py} +0 -0
  133. /figrecipe/_dev/demo_plotters/{plot_barh.py → bar_categorical/plot_barh.py} +0 -0
  134. /figrecipe/_dev/demo_plotters/{plot_contour.py → contour_surface/plot_contour.py} +0 -0
  135. /figrecipe/_dev/demo_plotters/{plot_contourf.py → contour_surface/plot_contourf.py} +0 -0
  136. /figrecipe/_dev/demo_plotters/{plot_tricontour.py → contour_surface/plot_tricontour.py} +0 -0
  137. /figrecipe/_dev/demo_plotters/{plot_tricontourf.py → contour_surface/plot_tricontourf.py} +0 -0
  138. /figrecipe/_dev/demo_plotters/{plot_tripcolor.py → contour_surface/plot_tripcolor.py} +0 -0
  139. /figrecipe/_dev/demo_plotters/{plot_triplot.py → contour_surface/plot_triplot.py} +0 -0
  140. /figrecipe/_dev/demo_plotters/{plot_boxplot.py → distribution/plot_boxplot.py} +0 -0
  141. /figrecipe/_dev/demo_plotters/{plot_ecdf.py → distribution/plot_ecdf.py} +0 -0
  142. /figrecipe/_dev/demo_plotters/{plot_hist.py → distribution/plot_hist.py} +0 -0
  143. /figrecipe/_dev/demo_plotters/{plot_hist2d.py → distribution/plot_hist2d.py} +0 -0
  144. /figrecipe/_dev/demo_plotters/{plot_violinplot.py → distribution/plot_violinplot.py} +0 -0
  145. /figrecipe/_dev/demo_plotters/{plot_hexbin.py → image_matrix/plot_hexbin.py} +0 -0
  146. /figrecipe/_dev/demo_plotters/{plot_imshow.py → image_matrix/plot_imshow.py} +0 -0
  147. /figrecipe/_dev/demo_plotters/{plot_matshow.py → image_matrix/plot_matshow.py} +0 -0
  148. /figrecipe/_dev/demo_plotters/{plot_pcolor.py → image_matrix/plot_pcolor.py} +0 -0
  149. /figrecipe/_dev/demo_plotters/{plot_pcolormesh.py → image_matrix/plot_pcolormesh.py} +0 -0
  150. /figrecipe/_dev/demo_plotters/{plot_spy.py → image_matrix/plot_spy.py} +0 -0
  151. /figrecipe/_dev/demo_plotters/{plot_errorbar.py → line_curve/plot_errorbar.py} +0 -0
  152. /figrecipe/_dev/demo_plotters/{plot_fill.py → line_curve/plot_fill.py} +0 -0
  153. /figrecipe/_dev/demo_plotters/{plot_fill_between.py → line_curve/plot_fill_between.py} +0 -0
  154. /figrecipe/_dev/demo_plotters/{plot_fill_betweenx.py → line_curve/plot_fill_betweenx.py} +0 -0
  155. /figrecipe/_dev/demo_plotters/{plot_stackplot.py → line_curve/plot_stackplot.py} +0 -0
  156. /figrecipe/_dev/demo_plotters/{plot_stairs.py → line_curve/plot_stairs.py} +0 -0
  157. /figrecipe/_dev/demo_plotters/{plot_step.py → line_curve/plot_step.py} +0 -0
  158. /figrecipe/_dev/demo_plotters/{plot_scatter.py → scatter_points/plot_scatter.py} +0 -0
  159. /figrecipe/_dev/demo_plotters/{plot_eventplot.py → special/plot_eventplot.py} +0 -0
  160. /figrecipe/_dev/demo_plotters/{plot_loglog.py → special/plot_loglog.py} +0 -0
  161. /figrecipe/_dev/demo_plotters/{plot_semilogx.py → special/plot_semilogx.py} +0 -0
  162. /figrecipe/_dev/demo_plotters/{plot_semilogy.py → special/plot_semilogy.py} +0 -0
  163. /figrecipe/_dev/demo_plotters/{plot_stem.py → special/plot_stem.py} +0 -0
  164. /figrecipe/_dev/demo_plotters/{plot_acorr.py → spectral_signal/plot_acorr.py} +0 -0
  165. /figrecipe/_dev/demo_plotters/{plot_angle_spectrum.py → spectral_signal/plot_angle_spectrum.py} +0 -0
  166. /figrecipe/_dev/demo_plotters/{plot_cohere.py → spectral_signal/plot_cohere.py} +0 -0
  167. /figrecipe/_dev/demo_plotters/{plot_csd.py → spectral_signal/plot_csd.py} +0 -0
  168. /figrecipe/_dev/demo_plotters/{plot_magnitude_spectrum.py → spectral_signal/plot_magnitude_spectrum.py} +0 -0
  169. /figrecipe/_dev/demo_plotters/{plot_phase_spectrum.py → spectral_signal/plot_phase_spectrum.py} +0 -0
  170. /figrecipe/_dev/demo_plotters/{plot_psd.py → spectral_signal/plot_psd.py} +0 -0
  171. /figrecipe/_dev/demo_plotters/{plot_specgram.py → spectral_signal/plot_specgram.py} +0 -0
  172. /figrecipe/_dev/demo_plotters/{plot_xcorr.py → spectral_signal/plot_xcorr.py} +0 -0
  173. /figrecipe/_dev/demo_plotters/{plot_barbs.py → vector_flow/plot_barbs.py} +0 -0
  174. /figrecipe/_dev/demo_plotters/{plot_quiver.py → vector_flow/plot_quiver.py} +0 -0
  175. /figrecipe/_dev/demo_plotters/{plot_streamplot.py → vector_flow/plot_streamplot.py} +0 -0
  176. {figrecipe-0.6.0.dist-info → figrecipe-0.7.4.dist-info}/WHEEL +0 -0
  177. {figrecipe-0.6.0.dist-info → figrecipe-0.7.4.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Color input component CSS styles for the figure editor.
4
+
5
+ This module contains CSS for:
6
+ - Color swatches and pickers
7
+ - RGB display
8
+ - Custom color inputs
9
+ """
10
+
11
+ STYLES_COLOR_INPUT = """
12
+ /* Color Input Component */
13
+ .color-input-wrapper {
14
+ display: flex;
15
+ align-items: center;
16
+ gap: 8px;
17
+ flex: 1;
18
+ flex-wrap: wrap;
19
+ }
20
+
21
+ .color-swatch {
22
+ width: 28px;
23
+ height: 28px;
24
+ border: 2px solid var(--border-color);
25
+ border-radius: 4px;
26
+ cursor: pointer;
27
+ flex-shrink: 0;
28
+ transition: border-color 0.15s;
29
+ }
30
+
31
+ .color-swatch:hover {
32
+ border-color: var(--accent-color);
33
+ }
34
+
35
+ .color-text-input {
36
+ flex: 1;
37
+ min-width: 80px;
38
+ }
39
+
40
+ .rgb-display {
41
+ font-size: 10px;
42
+ color: var(--text-secondary);
43
+ font-family: monospace;
44
+ white-space: nowrap;
45
+ }
46
+
47
+ .color-preset-select {
48
+ padding: 4px;
49
+ border: 1px solid var(--border-color);
50
+ border-radius: 4px;
51
+ background: var(--bg-primary);
52
+ font-size: 10px;
53
+ cursor: pointer;
54
+ }
55
+
56
+ .color-picker-hidden {
57
+ position: absolute;
58
+ opacity: 0;
59
+ pointer-events: none;
60
+ width: 0;
61
+ height: 0;
62
+ }
63
+
64
+ .color-custom-input {
65
+ padding: 4px 8px;
66
+ border: 1px solid var(--border-color);
67
+ border-radius: 4px;
68
+ background: var(--bg-primary);
69
+ font-size: 11px;
70
+ min-width: 100px;
71
+ }
72
+
73
+ .color-custom-input:focus {
74
+ outline: none;
75
+ border-color: var(--accent-color);
76
+ }
77
+
78
+ .color-select {
79
+ padding: 4px 6px;
80
+ border: 1px solid var(--border-color);
81
+ border-radius: 4px;
82
+ background: var(--bg-primary);
83
+ font-size: 11px;
84
+ min-width: 70px;
85
+ cursor: pointer;
86
+ }
87
+
88
+ /* Color List Component (for pie chart colors array) */
89
+ .color-list-wrapper {
90
+ display: flex;
91
+ flex-direction: column;
92
+ gap: 4px;
93
+ flex: 1;
94
+ }
95
+
96
+ .color-list-item {
97
+ display: flex;
98
+ align-items: center;
99
+ gap: 6px;
100
+ }
101
+
102
+ .color-list-index {
103
+ font-size: 10px;
104
+ color: var(--text-secondary);
105
+ min-width: 18px;
106
+ }
107
+
108
+ .color-swatch-small {
109
+ width: 18px;
110
+ height: 18px;
111
+ border-width: 1px;
112
+ }
113
+
114
+ .color-select-small {
115
+ padding: 2px 4px;
116
+ font-size: 10px;
117
+ min-width: 60px;
118
+ }
119
+ """
120
+
121
+ __all__ = ["STYLES_COLOR_INPUT"]
122
+
123
+ # EOF
@@ -0,0 +1,265 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Controls panel CSS styles for the figure editor.
4
+
5
+ This module contains CSS for:
6
+ - Controls panel layout
7
+ - Tab navigation
8
+ - Sections and form elements
9
+ - Field highlighting
10
+ """
11
+
12
+ STYLES_CONTROLS = """
13
+ /* Controls Panel */
14
+ .controls-panel {
15
+ width: 350px;
16
+ display: flex;
17
+ flex-direction: column;
18
+ background: var(--bg-primary);
19
+ overflow: hidden;
20
+ }
21
+
22
+ .controls-header {
23
+ display: flex;
24
+ justify-content: space-between;
25
+ align-items: center;
26
+ padding: 12px 16px;
27
+ background: var(--bg-secondary);
28
+ border-bottom: 1px solid var(--border-color);
29
+ }
30
+
31
+ .controls-header h2 {
32
+ font-size: 16px;
33
+ font-weight: 600;
34
+ }
35
+
36
+ .controls-actions {
37
+ display: flex;
38
+ gap: 8px;
39
+ }
40
+
41
+ .controls-sections {
42
+ flex: 1;
43
+ overflow-y: auto;
44
+ padding: 8px;
45
+ }
46
+
47
+ /* Tab Navigation */
48
+ .tab-navigation {
49
+ display: flex;
50
+ gap: 0;
51
+ background: var(--bg-secondary);
52
+ border-radius: 8px;
53
+ padding: 4px;
54
+ margin-bottom: 12px;
55
+ }
56
+
57
+ .tab-btn {
58
+ flex: 1;
59
+ padding: 10px 16px;
60
+ font-size: 13px;
61
+ font-weight: 500;
62
+ border: none;
63
+ background: transparent;
64
+ border-radius: 6px;
65
+ cursor: pointer;
66
+ transition: all 0.15s;
67
+ color: var(--text-secondary);
68
+ }
69
+
70
+ .tab-btn:hover {
71
+ background: var(--bg-tertiary);
72
+ color: var(--text-primary);
73
+ }
74
+
75
+ .tab-btn.active {
76
+ background: var(--accent-color);
77
+ color: white;
78
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
79
+ }
80
+
81
+ /* Tab Content */
82
+ .tab-content {
83
+ display: none;
84
+ }
85
+
86
+ .tab-content.active {
87
+ display: block;
88
+ }
89
+
90
+ .tab-hint {
91
+ text-align: center;
92
+ padding: 40px 20px;
93
+ color: var(--text-secondary);
94
+ background: var(--bg-secondary);
95
+ border-radius: 8px;
96
+ margin-bottom: 12px;
97
+ }
98
+
99
+ .tab-hint p {
100
+ margin: 0;
101
+ }
102
+
103
+ .tab-hint .hint-sub {
104
+ font-size: 12px;
105
+ margin-top: 8px;
106
+ opacity: 0.7;
107
+ }
108
+
109
+ /* Selected element panel in Element tab */
110
+ .selected-element-header {
111
+ display: flex;
112
+ align-items: center;
113
+ gap: 10px;
114
+ padding: 12px;
115
+ background: var(--bg-secondary);
116
+ border-radius: 8px;
117
+ margin-bottom: 12px;
118
+ }
119
+
120
+ .element-type-badge {
121
+ padding: 4px 10px;
122
+ font-size: 11px;
123
+ font-weight: 600;
124
+ text-transform: uppercase;
125
+ background: var(--accent-color);
126
+ color: white;
127
+ border-radius: 4px;
128
+ }
129
+
130
+ .element-name {
131
+ font-size: 14px;
132
+ font-weight: 500;
133
+ color: var(--text-primary);
134
+ }
135
+
136
+ /* Legacy toggle styles for backward compatibility */
137
+ .view-mode-toggle {
138
+ display: none; /* Hidden - replaced by tabs */
139
+ }
140
+
141
+ .btn-toggle {
142
+ padding: 6px 12px;
143
+ font-size: 12px;
144
+ font-weight: 500;
145
+ border: 1px solid var(--border-color);
146
+ background: var(--bg-primary);
147
+ border-radius: 4px;
148
+ cursor: pointer;
149
+ transition: all 0.15s;
150
+ }
151
+
152
+ .btn-toggle:hover {
153
+ background: var(--bg-tertiary);
154
+ }
155
+
156
+ .btn-toggle.active {
157
+ background: var(--accent-color);
158
+ border-color: var(--accent-color);
159
+ color: white;
160
+ }
161
+
162
+ .selection-hint {
163
+ margin-left: auto;
164
+ font-size: 11px;
165
+ color: var(--text-secondary);
166
+ font-style: italic;
167
+ }
168
+
169
+ /* Filtering mode: hide non-matching sections */
170
+ .controls-sections.filter-mode .section.section-hidden {
171
+ display: none;
172
+ }
173
+
174
+ .controls-sections.filter-mode .form-row.field-hidden {
175
+ display: none;
176
+ }
177
+
178
+ /* Show matching sections with highlight in filter mode */
179
+ .controls-sections.filter-mode .section.section-visible {
180
+ border-color: var(--accent-color);
181
+ }
182
+
183
+ .controls-sections.filter-mode .section.section-visible summary {
184
+ background: rgba(37, 99, 235, 0.08);
185
+ }
186
+
187
+ [data-theme="dark"] .controls-sections.filter-mode .section.section-visible summary {
188
+ background: rgba(59, 130, 246, 0.12);
189
+ }
190
+
191
+ /* Sections */
192
+ .section {
193
+ margin-bottom: 8px;
194
+ border: 1px solid var(--border-color);
195
+ border-radius: 6px;
196
+ overflow: hidden;
197
+ }
198
+
199
+ .section summary {
200
+ padding: 10px 14px;
201
+ background: var(--bg-secondary);
202
+ cursor: pointer;
203
+ font-weight: 500;
204
+ user-select: none;
205
+ list-style: none;
206
+ display: flex;
207
+ align-items: center;
208
+ }
209
+
210
+ .section summary::before {
211
+ content: '\\25B6';
212
+ font-size: 10px;
213
+ margin-right: 8px;
214
+ transition: transform 0.2s;
215
+ }
216
+
217
+ .section[open] summary::before {
218
+ transform: rotate(90deg);
219
+ }
220
+
221
+ .section-highlighted {
222
+ border-color: var(--accent-color);
223
+ box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
224
+ }
225
+
226
+ .section-highlighted summary {
227
+ background: rgba(37, 99, 235, 0.1);
228
+ border-left: 3px solid var(--accent-color);
229
+ }
230
+
231
+ [data-theme="dark"] .section-highlighted {
232
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
233
+ }
234
+
235
+ [data-theme="dark"] .section-highlighted summary {
236
+ background: rgba(59, 130, 246, 0.15);
237
+ }
238
+
239
+ /* Field highlighting for selected element */
240
+ .field-highlighted {
241
+ background: rgba(37, 99, 235, 0.08);
242
+ border-radius: 4px;
243
+ padding: 6px 8px;
244
+ margin: -6px -8px;
245
+ margin-bottom: 8px;
246
+ border-left: 3px solid var(--accent-color);
247
+ }
248
+
249
+ .field-highlighted:last-child {
250
+ margin-bottom: 0;
251
+ }
252
+
253
+ [data-theme="dark"] .field-highlighted {
254
+ background: rgba(59, 130, 246, 0.12);
255
+ }
256
+
257
+ .section-content {
258
+ padding: 12px 14px;
259
+ background: var(--bg-primary);
260
+ }
261
+ """
262
+
263
+ __all__ = ["STYLES_CONTROLS"]
264
+
265
+ # EOF
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Dynamic call properties CSS styles for the figure editor.
4
+
5
+ This module contains CSS for:
6
+ - Dynamic call properties panel
7
+ - Property sections and fields
8
+ - Type hints and argument display
9
+ """
10
+
11
+ STYLES_DYNAMIC_PROPS = """
12
+ /* Dynamic Call Properties (in right panel) */
13
+ .dynamic-call-properties {
14
+ padding: 12px 16px;
15
+ margin: 8px 0 16px 0;
16
+ background: var(--bg-tertiary);
17
+ border: 1px solid var(--accent-color);
18
+ border-radius: 8px;
19
+ font-size: 12px;
20
+ max-height: 400px;
21
+ overflow-y: auto;
22
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
23
+ }
24
+
25
+ .dynamic-props-header {
26
+ margin-bottom: 8px;
27
+ padding-bottom: 8px;
28
+ border-bottom: 1px solid var(--border-color);
29
+ }
30
+
31
+ .dynamic-props-header strong {
32
+ color: var(--accent-color);
33
+ }
34
+
35
+ .dynamic-props-header .call-id {
36
+ color: var(--text-secondary);
37
+ font-size: 11px;
38
+ margin-left: 8px;
39
+ }
40
+
41
+ .dynamic-props-label {
42
+ font-weight: 500;
43
+ color: var(--text-secondary);
44
+ margin-bottom: 4px;
45
+ font-size: 11px;
46
+ }
47
+
48
+ .dynamic-props-section {
49
+ margin-bottom: 8px;
50
+ }
51
+
52
+ .dynamic-field {
53
+ display: flex;
54
+ align-items: center;
55
+ gap: 8px;
56
+ padding: 4px 0;
57
+ }
58
+
59
+ .dynamic-field label {
60
+ flex: 0 0 120px;
61
+ font-size: 11px;
62
+ color: var(--text-primary);
63
+ }
64
+
65
+ .dynamic-field.unused label {
66
+ color: var(--text-secondary);
67
+ }
68
+
69
+ .dynamic-input {
70
+ flex: 1;
71
+ padding: 4px 8px;
72
+ border: 1px solid var(--border-color);
73
+ border-radius: 4px;
74
+ background: var(--bg-primary);
75
+ font-size: 11px;
76
+ }
77
+
78
+ .dynamic-input[type="checkbox"] {
79
+ flex: 0 0 auto;
80
+ width: 16px;
81
+ height: 16px;
82
+ }
83
+
84
+ .dynamic-props-available {
85
+ margin-top: 8px;
86
+ }
87
+
88
+ .dynamic-props-available summary {
89
+ cursor: pointer;
90
+ font-size: 11px;
91
+ color: var(--text-secondary);
92
+ padding: 4px 0;
93
+ }
94
+
95
+ .dynamic-props-available summary:hover {
96
+ color: var(--accent-color);
97
+ }
98
+
99
+ .more-params {
100
+ font-size: 10px;
101
+ color: var(--text-secondary);
102
+ font-style: italic;
103
+ padding: 4px 0;
104
+ }
105
+
106
+ .arg-field {
107
+ background: var(--bg-secondary);
108
+ border-radius: 4px;
109
+ padding: 4px 8px;
110
+ margin: 2px 0;
111
+ }
112
+
113
+ .arg-value {
114
+ flex: 1;
115
+ font-family: monospace;
116
+ font-size: 11px;
117
+ color: var(--text-secondary);
118
+ text-align: right;
119
+ }
120
+
121
+ .dynamic-field-container {
122
+ margin-bottom: 8px;
123
+ padding-bottom: 8px;
124
+ border-bottom: 1px solid var(--border-color);
125
+ }
126
+
127
+ .dynamic-field-container.unused {
128
+ opacity: 0.7;
129
+ }
130
+
131
+ .type-hint {
132
+ font-size: 10px;
133
+ color: var(--text-secondary);
134
+ font-family: monospace;
135
+ padding: 2px 0 0 0;
136
+ margin-left: 125px;
137
+ word-break: break-word;
138
+ line-height: 1.3;
139
+ }
140
+ """
141
+
142
+ __all__ = ["STYLES_DYNAMIC_PROPS"]
143
+
144
+ # EOF
@@ -0,0 +1,126 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Form elements CSS styles for the figure editor.
4
+
5
+ This module contains CSS for:
6
+ - Form rows and labels
7
+ - Input fields (number, text, checkbox, color, range)
8
+ - Override indicators for modified values
9
+ """
10
+
11
+ STYLES_FORMS = """
12
+ /* Form elements */
13
+ .subsection {
14
+ margin-bottom: 12px;
15
+ }
16
+
17
+ .subsection:last-child {
18
+ margin-bottom: 0;
19
+ }
20
+
21
+ .subsection h4 {
22
+ font-size: 12px;
23
+ font-weight: 600;
24
+ color: var(--text-secondary);
25
+ margin-bottom: 8px;
26
+ text-transform: uppercase;
27
+ letter-spacing: 0.5px;
28
+ }
29
+
30
+ .form-row {
31
+ display: flex;
32
+ align-items: center;
33
+ margin-bottom: 8px;
34
+ }
35
+
36
+ .form-row:last-child {
37
+ margin-bottom: 0;
38
+ }
39
+
40
+ .form-row label {
41
+ flex: 0 0 120px;
42
+ font-size: 13px;
43
+ color: var(--text-secondary);
44
+ }
45
+
46
+ .form-row input[type="number"],
47
+ .form-row input[type="text"],
48
+ .form-row select {
49
+ flex: 1;
50
+ padding: 6px 10px;
51
+ border: 1px solid var(--border-color);
52
+ border-radius: 4px;
53
+ background: var(--bg-primary);
54
+ color: var(--text-primary);
55
+ font-size: 13px;
56
+ }
57
+
58
+ .form-row input[type="number"]:focus,
59
+ .form-row input[type="text"]:focus,
60
+ .form-row select:focus {
61
+ outline: none;
62
+ border-color: var(--accent-color);
63
+ box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
64
+ }
65
+
66
+ /* Override indicator for modified values */
67
+ .form-row.value-modified input,
68
+ .form-row.value-modified select {
69
+ border-color: #f59e0b;
70
+ background: rgba(245, 158, 11, 0.05);
71
+ }
72
+
73
+ .form-row.value-modified label::after {
74
+ content: '●';
75
+ color: #f59e0b;
76
+ margin-left: 4px;
77
+ font-weight: bold;
78
+ }
79
+
80
+ [data-theme="dark"] .form-row.value-modified input,
81
+ [data-theme="dark"] .form-row.value-modified select {
82
+ border-color: #f59e0b;
83
+ background: rgba(245, 158, 11, 0.1);
84
+ }
85
+
86
+ .form-row input[type="checkbox"] {
87
+ width: 18px;
88
+ height: 18px;
89
+ cursor: pointer;
90
+ }
91
+
92
+ .form-row input[type="color"] {
93
+ width: 50px;
94
+ height: 30px;
95
+ padding: 2px;
96
+ border: 1px solid var(--border-color);
97
+ border-radius: 4px;
98
+ cursor: pointer;
99
+ }
100
+
101
+ .form-row input[type="range"] {
102
+ flex: 1;
103
+ margin-right: 8px;
104
+ }
105
+
106
+ .form-row input[type="range"] + span {
107
+ min-width: 30px;
108
+ text-align: right;
109
+ font-size: 12px;
110
+ color: var(--text-secondary);
111
+ }
112
+
113
+ .form-grid {
114
+ display: grid;
115
+ grid-template-columns: 1fr 1fr;
116
+ gap: 8px;
117
+ }
118
+
119
+ .form-grid .form-row label {
120
+ flex: 0 0 60px;
121
+ }
122
+ """
123
+
124
+ __all__ = ["STYLES_FORMS"]
125
+
126
+ # EOF