figrecipe 0.5.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.
- figrecipe/__init__.py +220 -819
- figrecipe/_api/__init__.py +48 -0
- figrecipe/_api/_extract.py +108 -0
- figrecipe/_api/_notebook.py +61 -0
- figrecipe/_api/_panel.py +46 -0
- figrecipe/_api/_save.py +191 -0
- figrecipe/_api/_seaborn_proxy.py +34 -0
- figrecipe/_api/_style_manager.py +153 -0
- figrecipe/_api/_subplots.py +333 -0
- figrecipe/_api/_validate.py +82 -0
- figrecipe/_dev/__init__.py +29 -0
- figrecipe/_dev/_plotters.py +76 -0
- figrecipe/_dev/_run_demos.py +56 -0
- figrecipe/_dev/demo_plotters/__init__.py +64 -0
- figrecipe/_dev/demo_plotters/_categories.py +81 -0
- figrecipe/_dev/demo_plotters/_figure_creators.py +119 -0
- figrecipe/_dev/demo_plotters/_helpers.py +31 -0
- figrecipe/_dev/demo_plotters/_registry.py +50 -0
- figrecipe/_dev/demo_plotters/bar_categorical/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/bar_categorical/plot_bar.py +25 -0
- figrecipe/_dev/demo_plotters/bar_categorical/plot_barh.py +25 -0
- figrecipe/_dev/demo_plotters/contour_surface/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_contour.py +30 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_contourf.py +29 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_tricontour.py +28 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_tricontourf.py +28 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_tripcolor.py +29 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_triplot.py +25 -0
- figrecipe/_dev/demo_plotters/distribution/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/distribution/plot_boxplot.py +24 -0
- figrecipe/_dev/demo_plotters/distribution/plot_ecdf.py +24 -0
- figrecipe/_dev/demo_plotters/distribution/plot_hist.py +24 -0
- figrecipe/_dev/demo_plotters/distribution/plot_hist2d.py +25 -0
- figrecipe/_dev/demo_plotters/distribution/plot_violinplot.py +25 -0
- figrecipe/_dev/demo_plotters/image_matrix/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_hexbin.py +25 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_imshow.py +23 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_matshow.py +23 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_pcolor.py +29 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_pcolormesh.py +29 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_spy.py +29 -0
- figrecipe/_dev/demo_plotters/line_curve/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_errorbar.py +28 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_fill.py +29 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_fill_between.py +30 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_fill_betweenx.py +28 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_plot.py +28 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_stackplot.py +29 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_stairs.py +27 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_step.py +27 -0
- figrecipe/_dev/demo_plotters/scatter_points/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/scatter_points/plot_scatter.py +24 -0
- figrecipe/_dev/demo_plotters/special/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/special/plot_eventplot.py +25 -0
- figrecipe/_dev/demo_plotters/special/plot_loglog.py +27 -0
- figrecipe/_dev/demo_plotters/special/plot_pie.py +27 -0
- figrecipe/_dev/demo_plotters/special/plot_semilogx.py +27 -0
- figrecipe/_dev/demo_plotters/special/plot_semilogy.py +27 -0
- figrecipe/_dev/demo_plotters/special/plot_stem.py +27 -0
- figrecipe/_dev/demo_plotters/spectral_signal/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_acorr.py +24 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_angle_spectrum.py +28 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_cohere.py +29 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_csd.py +29 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_magnitude_spectrum.py +28 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_phase_spectrum.py +28 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_psd.py +29 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_specgram.py +30 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_xcorr.py +25 -0
- figrecipe/_dev/demo_plotters/vector_flow/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/vector_flow/plot_barbs.py +30 -0
- figrecipe/_dev/demo_plotters/vector_flow/plot_quiver.py +30 -0
- figrecipe/_dev/demo_plotters/vector_flow/plot_streamplot.py +30 -0
- figrecipe/_editor/__init__.py +278 -0
- figrecipe/_editor/_bbox/__init__.py +43 -0
- figrecipe/_editor/_bbox/_collections.py +177 -0
- figrecipe/_editor/_bbox/_elements.py +159 -0
- figrecipe/_editor/_bbox/_extract.py +256 -0
- figrecipe/_editor/_bbox/_extract_axes.py +370 -0
- figrecipe/_editor/_bbox/_extract_text.py +342 -0
- figrecipe/_editor/_bbox/_lines.py +173 -0
- figrecipe/_editor/_bbox/_transforms.py +146 -0
- figrecipe/_editor/_flask_app.py +258 -0
- figrecipe/_editor/_helpers.py +242 -0
- figrecipe/_editor/_hitmap/__init__.py +76 -0
- figrecipe/_editor/_hitmap/_artists/__init__.py +21 -0
- figrecipe/_editor/_hitmap/_artists/_collections.py +345 -0
- figrecipe/_editor/_hitmap/_artists/_images.py +68 -0
- figrecipe/_editor/_hitmap/_artists/_lines.py +107 -0
- figrecipe/_editor/_hitmap/_artists/_patches.py +163 -0
- figrecipe/_editor/_hitmap/_artists/_text.py +190 -0
- figrecipe/_editor/_hitmap/_colors.py +181 -0
- figrecipe/_editor/_hitmap/_detect.py +137 -0
- figrecipe/_editor/_hitmap/_restore.py +154 -0
- figrecipe/_editor/_hitmap_main.py +182 -0
- figrecipe/_editor/_overrides.py +318 -0
- figrecipe/_editor/_preferences.py +135 -0
- figrecipe/_editor/_render_overrides.py +480 -0
- figrecipe/_editor/_renderer.py +199 -0
- figrecipe/_editor/_routes_axis.py +453 -0
- figrecipe/_editor/_routes_core.py +284 -0
- figrecipe/_editor/_routes_element.py +317 -0
- figrecipe/_editor/_routes_style.py +223 -0
- figrecipe/_editor/_templates/__init__.py +152 -0
- figrecipe/_editor/_templates/_html.py +502 -0
- figrecipe/_editor/_templates/_scripts/__init__.py +120 -0
- figrecipe/_editor/_templates/_scripts/_api.py +228 -0
- figrecipe/_editor/_templates/_scripts/_colors.py +485 -0
- figrecipe/_editor/_templates/_scripts/_core.py +436 -0
- figrecipe/_editor/_templates/_scripts/_debug_snapshot.py +186 -0
- figrecipe/_editor/_templates/_scripts/_element_editor.py +310 -0
- figrecipe/_editor/_templates/_scripts/_files.py +195 -0
- figrecipe/_editor/_templates/_scripts/_hitmap.py +509 -0
- figrecipe/_editor/_templates/_scripts/_inspector.py +315 -0
- figrecipe/_editor/_templates/_scripts/_labels.py +464 -0
- figrecipe/_editor/_templates/_scripts/_legend_drag.py +265 -0
- figrecipe/_editor/_templates/_scripts/_modals.py +226 -0
- figrecipe/_editor/_templates/_scripts/_overlays.py +292 -0
- figrecipe/_editor/_templates/_scripts/_panel_drag.py +334 -0
- figrecipe/_editor/_templates/_scripts/_panel_position.py +279 -0
- figrecipe/_editor/_templates/_scripts/_selection.py +237 -0
- figrecipe/_editor/_templates/_scripts/_tabs.py +89 -0
- figrecipe/_editor/_templates/_scripts/_view_mode.py +107 -0
- figrecipe/_editor/_templates/_scripts/_zoom.py +179 -0
- figrecipe/_editor/_templates/_styles/__init__.py +69 -0
- figrecipe/_editor/_templates/_styles/_base.py +64 -0
- figrecipe/_editor/_templates/_styles/_buttons.py +206 -0
- figrecipe/_editor/_templates/_styles/_color_input.py +123 -0
- figrecipe/_editor/_templates/_styles/_controls.py +265 -0
- figrecipe/_editor/_templates/_styles/_dynamic_props.py +144 -0
- figrecipe/_editor/_templates/_styles/_forms.py +126 -0
- figrecipe/_editor/_templates/_styles/_hitmap.py +184 -0
- figrecipe/_editor/_templates/_styles/_inspector.py +90 -0
- figrecipe/_editor/_templates/_styles/_labels.py +118 -0
- figrecipe/_editor/_templates/_styles/_modals.py +98 -0
- figrecipe/_editor/_templates/_styles/_overlays.py +130 -0
- figrecipe/_editor/_templates/_styles/_preview.py +225 -0
- figrecipe/_editor/_templates/_styles/_selection.py +73 -0
- figrecipe/_params/_DECORATION_METHODS.py +33 -0
- figrecipe/_params/_PLOTTING_METHODS.py +58 -0
- figrecipe/_params/__init__.py +9 -0
- figrecipe/_recorder.py +92 -110
- figrecipe/_recorder_utils.py +124 -0
- figrecipe/_reproducer/__init__.py +18 -0
- figrecipe/_reproducer/_core.py +498 -0
- figrecipe/_reproducer/_custom_plots.py +279 -0
- figrecipe/_reproducer/_seaborn.py +100 -0
- figrecipe/_reproducer/_violin.py +186 -0
- figrecipe/_seaborn.py +14 -9
- figrecipe/_serializer.py +2 -2
- figrecipe/_signatures/README.md +68 -0
- figrecipe/_signatures/__init__.py +12 -2
- figrecipe/_signatures/_kwargs.py +273 -0
- figrecipe/_signatures/_loader.py +114 -57
- figrecipe/_signatures/_parsing.py +147 -0
- figrecipe/_utils/__init__.py +6 -4
- figrecipe/_utils/_crop.py +10 -4
- figrecipe/_utils/_image_diff.py +37 -33
- figrecipe/_utils/_numpy_io.py +0 -1
- figrecipe/_utils/_units.py +11 -3
- figrecipe/_validator.py +12 -3
- figrecipe/_wrappers/_axes.py +193 -170
- figrecipe/_wrappers/_axes_helpers.py +136 -0
- figrecipe/_wrappers/_axes_plots.py +418 -0
- figrecipe/_wrappers/_axes_seaborn.py +157 -0
- figrecipe/_wrappers/_figure.py +277 -18
- figrecipe/_wrappers/_panel_labels.py +127 -0
- figrecipe/_wrappers/_plot_helpers.py +143 -0
- figrecipe/_wrappers/_violin_helpers.py +180 -0
- figrecipe/plt.py +0 -1
- figrecipe/pyplot.py +2 -1
- figrecipe/styles/__init__.py +12 -11
- figrecipe/styles/_dotdict.py +72 -0
- figrecipe/styles/_finalize.py +134 -0
- figrecipe/styles/_fonts.py +77 -0
- figrecipe/styles/_kwargs_converter.py +178 -0
- figrecipe/styles/_plot_styles.py +209 -0
- figrecipe/styles/_style_applier.py +60 -202
- figrecipe/styles/_style_loader.py +73 -121
- figrecipe/styles/_themes.py +151 -0
- figrecipe/styles/presets/MATPLOTLIB.yaml +95 -0
- figrecipe/styles/presets/SCITEX.yaml +181 -0
- figrecipe-0.7.4.dist-info/METADATA +429 -0
- figrecipe-0.7.4.dist-info/RECORD +188 -0
- figrecipe/_reproducer.py +0 -358
- figrecipe-0.5.0.dist-info/METADATA +0 -336
- figrecipe-0.5.0.dist-info/RECORD +0 -26
- {figrecipe-0.5.0.dist-info → figrecipe-0.7.4.dist-info}/WHEEL +0 -0
- {figrecipe-0.5.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
|