figrecipe 0.6.0__py3-none-any.whl → 0.9.0__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 (269) hide show
  1. figrecipe/__init__.py +161 -1030
  2. figrecipe/__main__.py +12 -0
  3. figrecipe/_api/__init__.py +48 -0
  4. figrecipe/_api/_extract.py +108 -0
  5. figrecipe/_api/_notebook.py +61 -0
  6. figrecipe/_api/_panel.py +113 -0
  7. figrecipe/_api/_save.py +287 -0
  8. figrecipe/_api/_seaborn_proxy.py +34 -0
  9. figrecipe/_api/_style_manager.py +153 -0
  10. figrecipe/_api/_subplots.py +333 -0
  11. figrecipe/_api/_validate.py +82 -0
  12. figrecipe/_cli/__init__.py +7 -0
  13. figrecipe/_cli/_compose.py +87 -0
  14. figrecipe/_cli/_convert.py +117 -0
  15. figrecipe/_cli/_crop.py +82 -0
  16. figrecipe/_cli/_edit.py +70 -0
  17. figrecipe/_cli/_extract.py +128 -0
  18. figrecipe/_cli/_fonts.py +47 -0
  19. figrecipe/_cli/_info.py +67 -0
  20. figrecipe/_cli/_main.py +58 -0
  21. figrecipe/_cli/_reproduce.py +79 -0
  22. figrecipe/_cli/_style.py +77 -0
  23. figrecipe/_cli/_validate.py +66 -0
  24. figrecipe/_cli/_version.py +50 -0
  25. figrecipe/_composition/__init__.py +32 -0
  26. figrecipe/_composition/_alignment.py +452 -0
  27. figrecipe/_composition/_compose.py +179 -0
  28. figrecipe/_composition/_import_axes.py +127 -0
  29. figrecipe/_composition/_visibility.py +125 -0
  30. figrecipe/_dev/__init__.py +4 -93
  31. figrecipe/_dev/_plotters.py +76 -0
  32. figrecipe/_dev/_run_demos.py +56 -0
  33. figrecipe/_dev/browser/__init__.py +69 -0
  34. figrecipe/_dev/browser/_audio.py +240 -0
  35. figrecipe/_dev/browser/_caption.py +356 -0
  36. figrecipe/_dev/browser/_click_effect.py +146 -0
  37. figrecipe/_dev/browser/_cursor.py +196 -0
  38. figrecipe/_dev/browser/_highlight.py +105 -0
  39. figrecipe/_dev/browser/_narration.py +237 -0
  40. figrecipe/_dev/browser/_recorder.py +446 -0
  41. figrecipe/_dev/browser/_utils.py +178 -0
  42. figrecipe/_dev/browser/_video_trim/__init__.py +152 -0
  43. figrecipe/_dev/browser/_video_trim/_detection.py +223 -0
  44. figrecipe/_dev/browser/_video_trim/_markers.py +140 -0
  45. figrecipe/_dev/demo_plotters/__init__.py +35 -166
  46. figrecipe/_dev/demo_plotters/_categories.py +81 -0
  47. figrecipe/_dev/demo_plotters/_figure_creators.py +119 -0
  48. figrecipe/_dev/demo_plotters/_helpers.py +31 -0
  49. figrecipe/_dev/demo_plotters/_registry.py +50 -0
  50. figrecipe/_dev/demo_plotters/bar_categorical/__init__.py +4 -0
  51. figrecipe/_dev/demo_plotters/contour_surface/__init__.py +4 -0
  52. figrecipe/_dev/demo_plotters/distribution/__init__.py +4 -0
  53. figrecipe/_dev/demo_plotters/image_matrix/__init__.py +4 -0
  54. figrecipe/_dev/demo_plotters/line_curve/__init__.py +4 -0
  55. figrecipe/_dev/demo_plotters/{plot_plot.py → line_curve/plot_plot.py} +3 -2
  56. figrecipe/_dev/demo_plotters/scatter_points/__init__.py +4 -0
  57. figrecipe/_dev/demo_plotters/special/__init__.py +4 -0
  58. figrecipe/_dev/demo_plotters/{plot_pie.py → special/plot_pie.py} +5 -1
  59. figrecipe/_dev/demo_plotters/spectral_signal/__init__.py +4 -0
  60. figrecipe/_dev/demo_plotters/vector_flow/__init__.py +4 -0
  61. figrecipe/_editor/__init__.py +61 -13
  62. figrecipe/_editor/_bbox/__init__.py +43 -0
  63. figrecipe/_editor/_bbox/_collections.py +177 -0
  64. figrecipe/_editor/_bbox/_elements.py +159 -0
  65. figrecipe/_editor/_bbox/_extract.py +402 -0
  66. figrecipe/_editor/_bbox/_extract_axes.py +370 -0
  67. figrecipe/_editor/_bbox/_extract_text.py +466 -0
  68. figrecipe/_editor/_bbox/_lines.py +173 -0
  69. figrecipe/_editor/_bbox/_transforms.py +146 -0
  70. figrecipe/_editor/_call_overrides.py +183 -0
  71. figrecipe/_editor/_datatable_plot_handlers.py +249 -0
  72. figrecipe/_editor/_figure_layout.py +211 -0
  73. figrecipe/_editor/_flask_app.py +200 -1030
  74. figrecipe/_editor/_helpers.py +251 -0
  75. figrecipe/_editor/_hitmap/__init__.py +76 -0
  76. figrecipe/_editor/_hitmap/_artists/__init__.py +21 -0
  77. figrecipe/_editor/_hitmap/_artists/_collections.py +345 -0
  78. figrecipe/_editor/_hitmap/_artists/_images.py +68 -0
  79. figrecipe/_editor/_hitmap/_artists/_lines.py +107 -0
  80. figrecipe/_editor/_hitmap/_artists/_patches.py +163 -0
  81. figrecipe/_editor/_hitmap/_artists/_text.py +190 -0
  82. figrecipe/_editor/_hitmap/_colors.py +181 -0
  83. figrecipe/_editor/_hitmap/_detect.py +194 -0
  84. figrecipe/_editor/_hitmap/_restore.py +154 -0
  85. figrecipe/_editor/_hitmap_main.py +182 -0
  86. figrecipe/_editor/_overrides.py +4 -1
  87. figrecipe/_editor/_plot_types_registry.py +190 -0
  88. figrecipe/_editor/_preferences.py +135 -0
  89. figrecipe/_editor/_render_overrides.py +507 -0
  90. figrecipe/_editor/_renderer.py +81 -186
  91. figrecipe/_editor/_routes_annotation.py +114 -0
  92. figrecipe/_editor/_routes_axis.py +482 -0
  93. figrecipe/_editor/_routes_captions.py +130 -0
  94. figrecipe/_editor/_routes_composition.py +270 -0
  95. figrecipe/_editor/_routes_core.py +126 -0
  96. figrecipe/_editor/_routes_datatable.py +364 -0
  97. figrecipe/_editor/_routes_element.py +335 -0
  98. figrecipe/_editor/_routes_files.py +443 -0
  99. figrecipe/_editor/_routes_image.py +200 -0
  100. figrecipe/_editor/_routes_snapshot.py +94 -0
  101. figrecipe/_editor/_routes_style.py +243 -0
  102. figrecipe/_editor/_templates/__init__.py +116 -1
  103. figrecipe/_editor/_templates/_html.py +154 -64
  104. figrecipe/_editor/_templates/_html_components/__init__.py +13 -0
  105. figrecipe/_editor/_templates/_html_components/_composition_toolbar.py +79 -0
  106. figrecipe/_editor/_templates/_html_components/_file_browser.py +41 -0
  107. figrecipe/_editor/_templates/_html_datatable.py +92 -0
  108. figrecipe/_editor/_templates/_scripts/__init__.py +178 -0
  109. figrecipe/_editor/_templates/_scripts/_accordion.py +328 -0
  110. figrecipe/_editor/_templates/_scripts/_annotation_drag.py +504 -0
  111. figrecipe/_editor/_templates/_scripts/_api.py +228 -0
  112. figrecipe/_editor/_templates/_scripts/_canvas_context_menu.py +182 -0
  113. figrecipe/_editor/_templates/_scripts/_captions.py +231 -0
  114. figrecipe/_editor/_templates/_scripts/_colors.py +485 -0
  115. figrecipe/_editor/_templates/_scripts/_composition.py +283 -0
  116. figrecipe/_editor/_templates/_scripts/_core.py +493 -0
  117. figrecipe/_editor/_templates/_scripts/_datatable/__init__.py +59 -0
  118. figrecipe/_editor/_templates/_scripts/_datatable/_cell_edit.py +97 -0
  119. figrecipe/_editor/_templates/_scripts/_datatable/_clipboard.py +164 -0
  120. figrecipe/_editor/_templates/_scripts/_datatable/_context_menu.py +221 -0
  121. figrecipe/_editor/_templates/_scripts/_datatable/_core.py +150 -0
  122. figrecipe/_editor/_templates/_scripts/_datatable/_editable.py +511 -0
  123. figrecipe/_editor/_templates/_scripts/_datatable/_import.py +161 -0
  124. figrecipe/_editor/_templates/_scripts/_datatable/_plot.py +261 -0
  125. figrecipe/_editor/_templates/_scripts/_datatable/_selection.py +438 -0
  126. figrecipe/_editor/_templates/_scripts/_datatable/_table.py +256 -0
  127. figrecipe/_editor/_templates/_scripts/_datatable/_tabs.py +354 -0
  128. figrecipe/_editor/_templates/_scripts/_debug_snapshot.py +186 -0
  129. figrecipe/_editor/_templates/_scripts/_element_editor.py +325 -0
  130. figrecipe/_editor/_templates/_scripts/_files.py +429 -0
  131. figrecipe/_editor/_templates/_scripts/_files_context_menu.py +240 -0
  132. figrecipe/_editor/_templates/_scripts/_hitmap.py +512 -0
  133. figrecipe/_editor/_templates/_scripts/_image_drop.py +428 -0
  134. figrecipe/_editor/_templates/_scripts/_inspector.py +315 -0
  135. figrecipe/_editor/_templates/_scripts/_labels.py +464 -0
  136. figrecipe/_editor/_templates/_scripts/_legend_drag.py +270 -0
  137. figrecipe/_editor/_templates/_scripts/_modals.py +226 -0
  138. figrecipe/_editor/_templates/_scripts/_multi_select.py +198 -0
  139. figrecipe/_editor/_templates/_scripts/_overlays.py +292 -0
  140. figrecipe/_editor/_templates/_scripts/_panel_drag.py +505 -0
  141. figrecipe/_editor/_templates/_scripts/_panel_drag_snapshot.py +33 -0
  142. figrecipe/_editor/_templates/_scripts/_panel_position.py +463 -0
  143. figrecipe/_editor/_templates/_scripts/_panel_resize.py +230 -0
  144. figrecipe/_editor/_templates/_scripts/_panel_snap.py +307 -0
  145. figrecipe/_editor/_templates/_scripts/_region_select.py +255 -0
  146. figrecipe/_editor/_templates/_scripts/_selection.py +244 -0
  147. figrecipe/_editor/_templates/_scripts/_sync.py +242 -0
  148. figrecipe/_editor/_templates/_scripts/_tabs.py +89 -0
  149. figrecipe/_editor/_templates/_scripts/_undo_redo.py +348 -0
  150. figrecipe/_editor/_templates/_scripts/_view_mode.py +107 -0
  151. figrecipe/_editor/_templates/_scripts/_zoom.py +212 -0
  152. figrecipe/_editor/_templates/_styles/__init__.py +78 -0
  153. figrecipe/_editor/_templates/_styles/_base.py +111 -0
  154. figrecipe/_editor/_templates/_styles/_buttons.py +327 -0
  155. figrecipe/_editor/_templates/_styles/_color_input.py +123 -0
  156. figrecipe/_editor/_templates/_styles/_composition.py +87 -0
  157. figrecipe/_editor/_templates/_styles/_controls.py +430 -0
  158. figrecipe/_editor/_templates/_styles/_datatable/__init__.py +40 -0
  159. figrecipe/_editor/_templates/_styles/_datatable/_editable.py +203 -0
  160. figrecipe/_editor/_templates/_styles/_datatable/_panel.py +268 -0
  161. figrecipe/_editor/_templates/_styles/_datatable/_table.py +479 -0
  162. figrecipe/_editor/_templates/_styles/_datatable/_toolbar.py +384 -0
  163. figrecipe/_editor/_templates/_styles/_datatable/_vars.py +123 -0
  164. figrecipe/_editor/_templates/_styles/_dynamic_props.py +144 -0
  165. figrecipe/_editor/_templates/_styles/_file_browser.py +466 -0
  166. figrecipe/_editor/_templates/_styles/_forms.py +224 -0
  167. figrecipe/_editor/_templates/_styles/_hitmap.py +191 -0
  168. figrecipe/_editor/_templates/_styles/_inspector.py +90 -0
  169. figrecipe/_editor/_templates/_styles/_labels.py +118 -0
  170. figrecipe/_editor/_templates/_styles/_modals.py +127 -0
  171. figrecipe/_editor/_templates/_styles/_overlays.py +130 -0
  172. figrecipe/_editor/_templates/_styles/_preview.py +430 -0
  173. figrecipe/_editor/_templates/_styles/_selection.py +73 -0
  174. figrecipe/_editor/_templates/_styles/_spinner.py +117 -0
  175. figrecipe/_editor/static/audio/click.mp3 +0 -0
  176. figrecipe/_editor/static/click.mp3 +0 -0
  177. figrecipe/_editor/static/icons/favicon.ico +0 -0
  178. figrecipe/_integrations/__init__.py +17 -0
  179. figrecipe/_integrations/_scitex_stats.py +298 -0
  180. figrecipe/_params/_DECORATION_METHODS.py +8 -0
  181. figrecipe/_recorder.py +63 -109
  182. figrecipe/_recorder_utils.py +124 -0
  183. figrecipe/_reproducer/__init__.py +18 -0
  184. figrecipe/_reproducer/_core.py +509 -0
  185. figrecipe/_reproducer/_custom_plots.py +279 -0
  186. figrecipe/_reproducer/_seaborn.py +100 -0
  187. figrecipe/_reproducer/_violin.py +186 -0
  188. figrecipe/_signatures/_kwargs.py +273 -0
  189. figrecipe/_signatures/_loader.py +21 -423
  190. figrecipe/_signatures/_parsing.py +147 -0
  191. figrecipe/_utils/__init__.py +3 -0
  192. figrecipe/_utils/_bundle.py +205 -0
  193. figrecipe/_wrappers/_axes.py +252 -895
  194. figrecipe/_wrappers/_axes_helpers.py +136 -0
  195. figrecipe/_wrappers/_axes_plots.py +418 -0
  196. figrecipe/_wrappers/_axes_seaborn.py +157 -0
  197. figrecipe/_wrappers/_caption_generator.py +218 -0
  198. figrecipe/_wrappers/_figure.py +188 -1
  199. figrecipe/_wrappers/_panel_labels.py +127 -0
  200. figrecipe/_wrappers/_plot_helpers.py +143 -0
  201. figrecipe/_wrappers/_stat_annotation.py +274 -0
  202. figrecipe/_wrappers/_violin_helpers.py +180 -0
  203. figrecipe/styles/__init__.py +8 -6
  204. figrecipe/styles/_dotdict.py +72 -0
  205. figrecipe/styles/_finalize.py +134 -0
  206. figrecipe/styles/_fonts.py +77 -0
  207. figrecipe/styles/_kwargs_converter.py +178 -0
  208. figrecipe/styles/_plot_styles.py +209 -0
  209. figrecipe/styles/_style_applier.py +42 -480
  210. figrecipe/styles/_style_loader.py +16 -192
  211. figrecipe/styles/_themes.py +151 -0
  212. figrecipe/styles/presets/MATPLOTLIB.yaml +2 -1
  213. figrecipe/styles/presets/SCITEX.yaml +40 -28
  214. figrecipe-0.9.0.dist-info/METADATA +427 -0
  215. figrecipe-0.9.0.dist-info/RECORD +277 -0
  216. figrecipe-0.9.0.dist-info/entry_points.txt +2 -0
  217. figrecipe/_editor/_bbox.py +0 -978
  218. figrecipe/_editor/_hitmap.py +0 -937
  219. figrecipe/_editor/_templates/_scripts.py +0 -2778
  220. figrecipe/_editor/_templates/_styles.py +0 -1326
  221. figrecipe/_reproducer.py +0 -975
  222. figrecipe-0.6.0.dist-info/METADATA +0 -394
  223. figrecipe-0.6.0.dist-info/RECORD +0 -90
  224. /figrecipe/_dev/demo_plotters/{plot_bar.py → bar_categorical/plot_bar.py} +0 -0
  225. /figrecipe/_dev/demo_plotters/{plot_barh.py → bar_categorical/plot_barh.py} +0 -0
  226. /figrecipe/_dev/demo_plotters/{plot_contour.py → contour_surface/plot_contour.py} +0 -0
  227. /figrecipe/_dev/demo_plotters/{plot_contourf.py → contour_surface/plot_contourf.py} +0 -0
  228. /figrecipe/_dev/demo_plotters/{plot_tricontour.py → contour_surface/plot_tricontour.py} +0 -0
  229. /figrecipe/_dev/demo_plotters/{plot_tricontourf.py → contour_surface/plot_tricontourf.py} +0 -0
  230. /figrecipe/_dev/demo_plotters/{plot_tripcolor.py → contour_surface/plot_tripcolor.py} +0 -0
  231. /figrecipe/_dev/demo_plotters/{plot_triplot.py → contour_surface/plot_triplot.py} +0 -0
  232. /figrecipe/_dev/demo_plotters/{plot_boxplot.py → distribution/plot_boxplot.py} +0 -0
  233. /figrecipe/_dev/demo_plotters/{plot_ecdf.py → distribution/plot_ecdf.py} +0 -0
  234. /figrecipe/_dev/demo_plotters/{plot_hist.py → distribution/plot_hist.py} +0 -0
  235. /figrecipe/_dev/demo_plotters/{plot_hist2d.py → distribution/plot_hist2d.py} +0 -0
  236. /figrecipe/_dev/demo_plotters/{plot_violinplot.py → distribution/plot_violinplot.py} +0 -0
  237. /figrecipe/_dev/demo_plotters/{plot_hexbin.py → image_matrix/plot_hexbin.py} +0 -0
  238. /figrecipe/_dev/demo_plotters/{plot_imshow.py → image_matrix/plot_imshow.py} +0 -0
  239. /figrecipe/_dev/demo_plotters/{plot_matshow.py → image_matrix/plot_matshow.py} +0 -0
  240. /figrecipe/_dev/demo_plotters/{plot_pcolor.py → image_matrix/plot_pcolor.py} +0 -0
  241. /figrecipe/_dev/demo_plotters/{plot_pcolormesh.py → image_matrix/plot_pcolormesh.py} +0 -0
  242. /figrecipe/_dev/demo_plotters/{plot_spy.py → image_matrix/plot_spy.py} +0 -0
  243. /figrecipe/_dev/demo_plotters/{plot_errorbar.py → line_curve/plot_errorbar.py} +0 -0
  244. /figrecipe/_dev/demo_plotters/{plot_fill.py → line_curve/plot_fill.py} +0 -0
  245. /figrecipe/_dev/demo_plotters/{plot_fill_between.py → line_curve/plot_fill_between.py} +0 -0
  246. /figrecipe/_dev/demo_plotters/{plot_fill_betweenx.py → line_curve/plot_fill_betweenx.py} +0 -0
  247. /figrecipe/_dev/demo_plotters/{plot_stackplot.py → line_curve/plot_stackplot.py} +0 -0
  248. /figrecipe/_dev/demo_plotters/{plot_stairs.py → line_curve/plot_stairs.py} +0 -0
  249. /figrecipe/_dev/demo_plotters/{plot_step.py → line_curve/plot_step.py} +0 -0
  250. /figrecipe/_dev/demo_plotters/{plot_scatter.py → scatter_points/plot_scatter.py} +0 -0
  251. /figrecipe/_dev/demo_plotters/{plot_eventplot.py → special/plot_eventplot.py} +0 -0
  252. /figrecipe/_dev/demo_plotters/{plot_loglog.py → special/plot_loglog.py} +0 -0
  253. /figrecipe/_dev/demo_plotters/{plot_semilogx.py → special/plot_semilogx.py} +0 -0
  254. /figrecipe/_dev/demo_plotters/{plot_semilogy.py → special/plot_semilogy.py} +0 -0
  255. /figrecipe/_dev/demo_plotters/{plot_stem.py → special/plot_stem.py} +0 -0
  256. /figrecipe/_dev/demo_plotters/{plot_acorr.py → spectral_signal/plot_acorr.py} +0 -0
  257. /figrecipe/_dev/demo_plotters/{plot_angle_spectrum.py → spectral_signal/plot_angle_spectrum.py} +0 -0
  258. /figrecipe/_dev/demo_plotters/{plot_cohere.py → spectral_signal/plot_cohere.py} +0 -0
  259. /figrecipe/_dev/demo_plotters/{plot_csd.py → spectral_signal/plot_csd.py} +0 -0
  260. /figrecipe/_dev/demo_plotters/{plot_magnitude_spectrum.py → spectral_signal/plot_magnitude_spectrum.py} +0 -0
  261. /figrecipe/_dev/demo_plotters/{plot_phase_spectrum.py → spectral_signal/plot_phase_spectrum.py} +0 -0
  262. /figrecipe/_dev/demo_plotters/{plot_psd.py → spectral_signal/plot_psd.py} +0 -0
  263. /figrecipe/_dev/demo_plotters/{plot_specgram.py → spectral_signal/plot_specgram.py} +0 -0
  264. /figrecipe/_dev/demo_plotters/{plot_xcorr.py → spectral_signal/plot_xcorr.py} +0 -0
  265. /figrecipe/_dev/demo_plotters/{plot_barbs.py → vector_flow/plot_barbs.py} +0 -0
  266. /figrecipe/_dev/demo_plotters/{plot_quiver.py → vector_flow/plot_quiver.py} +0 -0
  267. /figrecipe/_dev/demo_plotters/{plot_streamplot.py → vector_flow/plot_streamplot.py} +0 -0
  268. {figrecipe-0.6.0.dist-info → figrecipe-0.9.0.dist-info}/WHEEL +0 -0
  269. {figrecipe-0.6.0.dist-info → figrecipe-0.9.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,191 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Hitmap overlay CSS styles for the figure editor.
4
+
5
+ This module contains CSS for:
6
+ - Hitregion overlay and visibility modes
7
+ - Hitregion rectangles, polylines, circles
8
+ - Scatter groups and labels
9
+ - Group hover highlights
10
+ """
11
+
12
+ STYLES_HITMAP = """
13
+ /* Hit Region Overlay */
14
+ .hitregion-overlay {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ width: 100%;
19
+ height: 100%;
20
+ pointer-events: auto; /* Allow clicks on empty areas to deselect */
21
+ z-index: 10; /* Above the preview image */
22
+ }
23
+
24
+ /* Always display overlay for hover detection, but control visibility via children */
25
+ .hitregion-overlay.visible .hitregion-rect,
26
+ .hitregion-overlay.visible .hitregion-polyline {
27
+ opacity: 1;
28
+ stroke: rgba(128, 128, 128, 0.3); /* Slight visible stroke in visible mode */
29
+ }
30
+
31
+ .hitregion-overlay.visible .hitregion-polyline {
32
+ stroke: rgba(128, 128, 128, 0.2);
33
+ stroke-width: 6;
34
+ }
35
+
36
+ /* Hover-only mode: invisible until hovered */
37
+ .hitregion-overlay.hover-mode .hitregion-rect,
38
+ .hitregion-overlay.hover-mode .hitregion-polyline {
39
+ opacity: 0;
40
+ }
41
+
42
+ .hitregion-overlay.hover-mode .hitregion-rect:hover,
43
+ .hitregion-overlay.hover-mode .hitregion-polyline:hover {
44
+ opacity: 1;
45
+ }
46
+
47
+ .hitregion-rect {
48
+ --element-color: #888888; /* Default fallback */
49
+ fill: transparent;
50
+ stroke: transparent;
51
+ stroke-width: 2;
52
+ stroke-dasharray: 6, 3;
53
+ pointer-events: all;
54
+ cursor: pointer;
55
+ transition: fill 0.2s, stroke 0.2s, filter 0.2s, opacity 0.15s;
56
+ }
57
+
58
+ .hitregion-rect:hover {
59
+ fill: var(--element-color);
60
+ fill-opacity: 0.2;
61
+ stroke: var(--element-color);
62
+ stroke-opacity: 0.8;
63
+ stroke-width: 3;
64
+ stroke-dasharray: none;
65
+ filter: none;
66
+ }
67
+
68
+ /* Axes regions: disable pointer events to let clicks pass through to
69
+ elements inside (pie, scatter, bar, etc.). Axes selection happens via
70
+ the panel drag system which uses mousedown on the preview area. */
71
+ .hitregion-rect.axes-region {
72
+ pointer-events: none;
73
+ }
74
+
75
+ .hitregion-polyline {
76
+ --element-color: #888888; /* Default fallback */
77
+ fill: none !important;
78
+ stroke: transparent;
79
+ stroke-width: 8;
80
+ stroke-linecap: round;
81
+ stroke-linejoin: round;
82
+ pointer-events: stroke;
83
+ cursor: pointer;
84
+ transition: stroke 0.15s, opacity 0.15s;
85
+ }
86
+
87
+ .hitregion-polyline:hover {
88
+ fill: none !important;
89
+ stroke: var(--element-color);
90
+ stroke-width: 8;
91
+ stroke-opacity: 0.4;
92
+ filter: none;
93
+ }
94
+
95
+ /* Scatter point circles */
96
+ .scatter-group {
97
+ --element-color: #888888; /* Default fallback */
98
+ pointer-events: all;
99
+ }
100
+
101
+ .hitregion-circle {
102
+ fill: transparent;
103
+ stroke: transparent;
104
+ stroke-width: 1;
105
+ pointer-events: all;
106
+ cursor: pointer;
107
+ opacity: 1; /* Explicit default */
108
+ transition: fill 0.15s, stroke 0.15s, opacity 0.15s;
109
+ }
110
+
111
+ .hitregion-circle:hover,
112
+ .hitregion-circle.hovered {
113
+ fill: var(--element-color);
114
+ fill-opacity: 0.2;
115
+ stroke: var(--element-color);
116
+ stroke-opacity: 0.5;
117
+ stroke-width: 1;
118
+ filter: none;
119
+ }
120
+
121
+ /* When any circle in the group is hovered, highlight ALL circles in the group */
122
+ .scatter-group:hover .hitregion-circle,
123
+ .scatter-group.hovered .hitregion-circle {
124
+ fill: var(--element-color);
125
+ fill-opacity: 0.15;
126
+ stroke: var(--element-color);
127
+ stroke-opacity: 0.4;
128
+ stroke-width: 1;
129
+ filter: none;
130
+ }
131
+
132
+ /* Scatter circles visibility modes */
133
+ .hitregion-overlay.visible .hitregion-circle,
134
+ .hitregion-overlay.visible .scatter-group {
135
+ opacity: 1;
136
+ }
137
+
138
+ .hitregion-overlay.hover-mode .hitregion-circle {
139
+ opacity: 0;
140
+ }
141
+
142
+ .hitregion-overlay.hover-mode .scatter-group:hover .hitregion-circle,
143
+ .hitregion-overlay.hover-mode .hitregion-circle:hover {
144
+ opacity: 1;
145
+ }
146
+
147
+ .hitregion-label {
148
+ font-size: 10px;
149
+ fill: var(--text-primary);
150
+ pointer-events: none;
151
+ opacity: 0;
152
+ transition: opacity 0.15s;
153
+ }
154
+
155
+ .hitregion-rect:hover + .hitregion-label,
156
+ .hitregion-group:hover .hitregion-label,
157
+ .hitregion-group.hovered .hitregion-label,
158
+ .scatter-group:hover ~ .hitregion-label,
159
+ .scatter-group.hovered ~ .hitregion-label,
160
+ .hitregion-polyline:hover + .hitregion-label {
161
+ opacity: 1;
162
+ }
163
+
164
+ #btn-show-hitmap.active {
165
+ background: var(--accent-color);
166
+ color: white;
167
+ border-color: var(--accent-color);
168
+ }
169
+
170
+ /* Group hover highlight - all elements in same logical group */
171
+ .group-hovered {
172
+ opacity: 1 !important;
173
+ }
174
+
175
+ .group-hovered .hitregion-polyline,
176
+ .group-hovered .hitregion-rect,
177
+ .group-hovered .hitregion-circle {
178
+ stroke: var(--accent-color) !important;
179
+ stroke-width: 3 !important;
180
+ fill: var(--selection-color) !important;
181
+ }
182
+
183
+ .hitregion-group.group-hovered .hitregion-label {
184
+ opacity: 1 !important;
185
+ font-weight: bold;
186
+ }
187
+ """
188
+
189
+ __all__ = ["STYLES_HITMAP"]
190
+
191
+ # EOF
@@ -0,0 +1,90 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Element inspector CSS styles for the figure editor.
4
+
5
+ This module contains CSS for:
6
+ - Element inspector overlay
7
+ - Inspector box hover states
8
+ - Inspector labels and notifications
9
+ """
10
+
11
+ STYLES_INSPECTOR = """
12
+ /* ==================== ELEMENT INSPECTOR ==================== */
13
+ .element-inspector-overlay {
14
+ position: fixed;
15
+ top: 0;
16
+ left: 0;
17
+ width: 100%;
18
+ height: 100%;
19
+ pointer-events: none;
20
+ z-index: 999999;
21
+ }
22
+
23
+ .element-inspector-box {
24
+ position: absolute;
25
+ border: 2px solid;
26
+ box-sizing: border-box;
27
+ pointer-events: auto;
28
+ cursor: pointer;
29
+ transition: all 0.15s;
30
+ background: rgba(255, 255, 255, 0.01);
31
+ }
32
+
33
+ .element-inspector-box:hover {
34
+ border-width: 3px;
35
+ background: rgba(59, 130, 246, 0.15);
36
+ box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6), 0 0 12px rgba(59, 130, 246, 0.4);
37
+ }
38
+
39
+ .element-inspector-label {
40
+ position: absolute;
41
+ background: rgba(0, 0, 0, 0.9);
42
+ color: white;
43
+ padding: 2px 6px;
44
+ font-size: 10px;
45
+ font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
46
+ border-radius: 3px;
47
+ white-space: nowrap;
48
+ pointer-events: auto;
49
+ cursor: pointer;
50
+ z-index: 1000000;
51
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
52
+ line-height: 1.4;
53
+ max-width: 300px;
54
+ overflow: hidden;
55
+ text-overflow: ellipsis;
56
+ }
57
+
58
+ .element-inspector-label:hover {
59
+ background: rgba(40, 40, 40, 0.95);
60
+ transform: scale(1.05);
61
+ }
62
+
63
+ .element-inspector-label .tag { color: #CE9178; }
64
+ .element-inspector-label .id { color: #4EC9B0; font-weight: bold; }
65
+ .element-inspector-label .class { color: #9CDCFE; }
66
+
67
+ .element-inspector-notification {
68
+ position: fixed;
69
+ bottom: 20px;
70
+ right: 20px;
71
+ background: linear-gradient(135deg, #10b981 0%, #059669 100%);
72
+ color: white;
73
+ padding: 12px 20px;
74
+ border-radius: 8px;
75
+ font-size: 14px;
76
+ font-weight: 500;
77
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
78
+ z-index: 10000000;
79
+ animation: slideInRight 0.3s ease;
80
+ }
81
+
82
+ @keyframes slideInRight {
83
+ from { transform: translateX(100px); opacity: 0; }
84
+ to { transform: translateX(0); opacity: 1; }
85
+ }
86
+ """
87
+
88
+ __all__ = ["STYLES_INSPECTOR"]
89
+
90
+ # EOF
@@ -0,0 +1,118 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Label and legend CSS styles for the figure editor.
4
+
5
+ This module contains CSS for:
6
+ - Axis type toggle buttons
7
+ - Label input fields
8
+ - Legend position and label styling
9
+ """
10
+
11
+ STYLES_LABELS = """
12
+ /* Axis Type Toggle */
13
+ .axis-type-toggle {
14
+ display: flex;
15
+ gap: 0;
16
+ border: 1px solid var(--border-color);
17
+ border-radius: 4px;
18
+ overflow: hidden;
19
+ flex: 1;
20
+ }
21
+
22
+ .axis-type-btn {
23
+ flex: 1;
24
+ padding: 6px 12px;
25
+ font-size: 12px;
26
+ border: none;
27
+ background: var(--bg-primary);
28
+ color: var(--text-secondary);
29
+ cursor: pointer;
30
+ transition: all 0.15s;
31
+ border-radius: 0;
32
+ }
33
+
34
+ .axis-type-btn:first-child {
35
+ border-right: 1px solid var(--border-color);
36
+ }
37
+
38
+ .axis-type-btn:hover {
39
+ background: var(--bg-secondary);
40
+ color: var(--text-primary);
41
+ }
42
+
43
+ .axis-type-btn.active {
44
+ background: var(--accent-color);
45
+ color: white;
46
+ }
47
+
48
+ /* Label input styling */
49
+ .label-input {
50
+ flex: 1;
51
+ padding: 6px 10px;
52
+ border: 1px solid var(--border-color);
53
+ border-radius: 4px;
54
+ background: var(--bg-primary);
55
+ color: var(--text-primary);
56
+ font-size: 13px;
57
+ }
58
+
59
+ .label-input:focus {
60
+ outline: none;
61
+ border-color: var(--accent-color);
62
+ box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
63
+ }
64
+
65
+ /* Legend custom position */
66
+ .legend-custom-pos {
67
+ margin-top: 8px;
68
+ padding: 8px;
69
+ background: var(--bg-secondary);
70
+ border-radius: 4px;
71
+ }
72
+
73
+ .form-hint {
74
+ font-size: 11px;
75
+ color: var(--text-secondary);
76
+ margin-top: 4px;
77
+ font-style: italic;
78
+ }
79
+
80
+ /* Legend labels editor */
81
+ .legend-labels-container {
82
+ margin-top: 8px;
83
+ }
84
+
85
+ .legend-label-item {
86
+ display: flex;
87
+ align-items: center;
88
+ gap: 8px;
89
+ margin-bottom: 6px;
90
+ }
91
+
92
+ .legend-label-color {
93
+ width: 16px;
94
+ height: 16px;
95
+ border-radius: 3px;
96
+ border: 1px solid var(--border-color);
97
+ flex-shrink: 0;
98
+ }
99
+
100
+ .legend-label-input {
101
+ flex: 1;
102
+ padding: 4px 8px;
103
+ border: 1px solid var(--border-color);
104
+ border-radius: 4px;
105
+ background: var(--bg-primary);
106
+ color: var(--text-primary);
107
+ font-size: 12px;
108
+ }
109
+
110
+ .legend-label-input:focus {
111
+ outline: none;
112
+ border-color: var(--accent-color);
113
+ }
114
+ """
115
+
116
+ __all__ = ["STYLES_LABELS"]
117
+
118
+ # EOF
@@ -0,0 +1,127 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Modal and shortcuts CSS styles for the figure editor.
4
+
5
+ This module contains CSS for:
6
+ - Shortcuts button
7
+ - Shortcuts modal layout
8
+ - Keyboard key (kbd) styling
9
+ """
10
+
11
+ STYLES_MODALS = """
12
+ /* Keyboard Shortcuts Button */
13
+ .btn-shortcuts {
14
+ padding: 6px 10px;
15
+ font-size: 16px;
16
+ background: var(--bg-primary);
17
+ border: 1px solid var(--border-color);
18
+ border-radius: 4px;
19
+ cursor: pointer;
20
+ transition: all 0.15s;
21
+ }
22
+
23
+ .btn-shortcuts:hover {
24
+ background: var(--bg-secondary);
25
+ border-color: var(--accent-color);
26
+ }
27
+
28
+ /* Shortcuts Modal */
29
+ .shortcuts-modal-content {
30
+ max-width: 500px;
31
+ width: 90%;
32
+ }
33
+
34
+ .shortcuts-content {
35
+ padding: 20px;
36
+ max-height: 60vh;
37
+ overflow-y: auto;
38
+ }
39
+
40
+ .shortcut-section {
41
+ margin-bottom: 20px;
42
+ }
43
+
44
+ .shortcut-section:last-child {
45
+ margin-bottom: 0;
46
+ }
47
+
48
+ .shortcut-section h4 {
49
+ font-size: 13px;
50
+ font-weight: 600;
51
+ color: var(--accent-color);
52
+ margin-bottom: 12px;
53
+ padding-bottom: 6px;
54
+ border-bottom: 1px solid var(--border-color);
55
+ }
56
+
57
+ .shortcut-row {
58
+ display: flex;
59
+ align-items: center;
60
+ padding: 6px 0;
61
+ gap: 16px;
62
+ }
63
+
64
+ .shortcut-keys {
65
+ flex: 0 0 180px;
66
+ text-align: left;
67
+ white-space: nowrap;
68
+ }
69
+
70
+ .shortcut-desc {
71
+ flex: 1;
72
+ color: var(--text-secondary);
73
+ font-size: 13px;
74
+ text-align: left;
75
+ }
76
+
77
+ kbd {
78
+ display: inline-block;
79
+ padding: 3px 8px;
80
+ font-size: 12px;
81
+ font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
82
+ background: var(--bg-secondary);
83
+ border: 1px solid var(--border-color);
84
+ border-radius: 4px;
85
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
86
+ color: var(--text-primary);
87
+ margin: 0 2px;
88
+ }
89
+
90
+ [data-theme="dark"] kbd {
91
+ background: var(--bg-tertiary);
92
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
93
+ }
94
+
95
+ /* Debug shortcuts section */
96
+ .debug-shortcuts {
97
+ border: 1px dashed #f59e0b;
98
+ border-radius: 6px;
99
+ padding: 12px;
100
+ background: rgba(245, 158, 11, 0.05);
101
+ }
102
+
103
+ .debug-shortcuts h4 {
104
+ color: #f59e0b;
105
+ border-bottom-color: #f59e0b;
106
+ }
107
+
108
+ .debug-badge {
109
+ font-size: 9px;
110
+ font-weight: 600;
111
+ background: #f59e0b;
112
+ color: #000;
113
+ padding: 2px 6px;
114
+ border-radius: 3px;
115
+ margin-left: 8px;
116
+ vertical-align: middle;
117
+ }
118
+
119
+ /* Shortcuts button in toolbar */
120
+ .btn-shortcuts {
121
+ font-size: 16px;
122
+ }
123
+ """
124
+
125
+ __all__ = ["STYLES_MODALS"]
126
+
127
+ # EOF
@@ -0,0 +1,130 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """Ruler, grid, and column overlay CSS styles for the figure editor.
4
+
5
+ This module contains CSS for:
6
+ - Ruler overlay with measurements
7
+ - Grid overlay (1mm and 5mm lines)
8
+ - Column guide overlay
9
+ """
10
+
11
+ STYLES_OVERLAYS = """
12
+ /* Ruler & Grid toggle button */
13
+ .btn-ruler {
14
+ padding: 6px 12px;
15
+ font-size: 13px;
16
+ }
17
+
18
+ .btn-ruler.active {
19
+ background: var(--accent-color);
20
+ color: white;
21
+ border-color: var(--accent-color);
22
+ }
23
+
24
+ /* Ruler, Grid, Column overlays */
25
+ .ruler-overlay,
26
+ .grid-overlay,
27
+ .column-overlay {
28
+ position: absolute;
29
+ top: 0;
30
+ left: 0;
31
+ width: 100%;
32
+ height: 100%;
33
+ pointer-events: none;
34
+ z-index: 15; /* Above hitregion-overlay (z-index: 10) */
35
+ display: none;
36
+ }
37
+
38
+ .ruler-overlay.visible,
39
+ .grid-overlay.visible,
40
+ .column-overlay.visible {
41
+ display: block;
42
+ }
43
+
44
+ /* Ruler styles */
45
+ .ruler-line {
46
+ stroke: #ff6600;
47
+ stroke-width: 1;
48
+ }
49
+
50
+ .ruler-line-major {
51
+ stroke: #ff6600;
52
+ stroke-width: 1.5;
53
+ }
54
+
55
+ .ruler-text {
56
+ fill: #ff6600;
57
+ font-size: 10px;
58
+ font-family: monospace;
59
+ }
60
+
61
+ .ruler-bg {
62
+ fill: rgba(255, 255, 255, 0.85);
63
+ }
64
+
65
+ [data-theme="dark"] .ruler-bg {
66
+ fill: rgba(30, 30, 30, 0.85);
67
+ }
68
+
69
+ [data-theme="dark"] .ruler-line,
70
+ [data-theme="dark"] .ruler-line-major {
71
+ stroke: #ff9944;
72
+ }
73
+
74
+ [data-theme="dark"] .ruler-text {
75
+ fill: #ff9944;
76
+ }
77
+
78
+ /* Grid styles */
79
+ .grid-line-1mm {
80
+ stroke: rgba(100, 100, 255, 0.2);
81
+ stroke-width: 0.5;
82
+ }
83
+
84
+ .grid-line-5mm {
85
+ stroke: rgba(100, 100, 255, 0.5);
86
+ stroke-width: 1;
87
+ }
88
+
89
+ [data-theme="dark"] .grid-line-1mm {
90
+ stroke: rgba(150, 150, 255, 0.2);
91
+ }
92
+
93
+ [data-theme="dark"] .grid-line-5mm {
94
+ stroke: rgba(150, 150, 255, 0.5);
95
+ }
96
+
97
+ /* Column guide styles */
98
+ .column-line {
99
+ stroke: #2e8b57;
100
+ stroke-width: 2;
101
+ stroke-dasharray: 8, 4;
102
+ }
103
+
104
+ .column-text {
105
+ fill: #2e8b57;
106
+ font-size: 12px;
107
+ font-family: monospace;
108
+ font-weight: bold;
109
+ }
110
+
111
+ .column-bg {
112
+ fill: rgba(255, 255, 255, 0.8);
113
+ }
114
+
115
+ [data-theme="dark"] .column-line {
116
+ stroke: #66c68a;
117
+ }
118
+
119
+ [data-theme="dark"] .column-text {
120
+ fill: #66c68a;
121
+ }
122
+
123
+ [data-theme="dark"] .column-bg {
124
+ fill: rgba(30, 30, 30, 0.8);
125
+ }
126
+ """
127
+
128
+ __all__ = ["STYLES_OVERLAYS"]
129
+
130
+ # EOF