figrecipe 0.7.4__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.
- figrecipe/__init__.py +74 -76
- figrecipe/__main__.py +12 -0
- figrecipe/_api/_panel.py +67 -0
- figrecipe/_api/_save.py +100 -4
- figrecipe/_cli/__init__.py +7 -0
- figrecipe/_cli/_compose.py +87 -0
- figrecipe/_cli/_convert.py +117 -0
- figrecipe/_cli/_crop.py +82 -0
- figrecipe/_cli/_edit.py +70 -0
- figrecipe/_cli/_extract.py +128 -0
- figrecipe/_cli/_fonts.py +47 -0
- figrecipe/_cli/_info.py +67 -0
- figrecipe/_cli/_main.py +58 -0
- figrecipe/_cli/_reproduce.py +79 -0
- figrecipe/_cli/_style.py +77 -0
- figrecipe/_cli/_validate.py +66 -0
- figrecipe/_cli/_version.py +50 -0
- figrecipe/_composition/__init__.py +32 -0
- figrecipe/_composition/_alignment.py +452 -0
- figrecipe/_composition/_compose.py +179 -0
- figrecipe/_composition/_import_axes.py +127 -0
- figrecipe/_composition/_visibility.py +125 -0
- figrecipe/_dev/__init__.py +2 -0
- figrecipe/_dev/browser/__init__.py +69 -0
- figrecipe/_dev/browser/_audio.py +240 -0
- figrecipe/_dev/browser/_caption.py +356 -0
- figrecipe/_dev/browser/_click_effect.py +146 -0
- figrecipe/_dev/browser/_cursor.py +196 -0
- figrecipe/_dev/browser/_highlight.py +105 -0
- figrecipe/_dev/browser/_narration.py +237 -0
- figrecipe/_dev/browser/_recorder.py +446 -0
- figrecipe/_dev/browser/_utils.py +178 -0
- figrecipe/_dev/browser/_video_trim/__init__.py +152 -0
- figrecipe/_dev/browser/_video_trim/_detection.py +223 -0
- figrecipe/_dev/browser/_video_trim/_markers.py +140 -0
- figrecipe/_editor/__init__.py +36 -36
- figrecipe/_editor/_bbox/_extract.py +155 -9
- figrecipe/_editor/_bbox/_extract_text.py +124 -0
- figrecipe/_editor/_call_overrides.py +183 -0
- figrecipe/_editor/_datatable_plot_handlers.py +249 -0
- figrecipe/_editor/_figure_layout.py +211 -0
- figrecipe/_editor/_flask_app.py +157 -16
- figrecipe/_editor/_helpers.py +17 -8
- figrecipe/_editor/_hitmap/_detect.py +89 -32
- figrecipe/_editor/_hitmap_main.py +4 -4
- figrecipe/_editor/_overrides.py +4 -1
- figrecipe/_editor/_plot_types_registry.py +190 -0
- figrecipe/_editor/_render_overrides.py +38 -11
- figrecipe/_editor/_renderer.py +46 -1
- figrecipe/_editor/_routes_annotation.py +114 -0
- figrecipe/_editor/_routes_axis.py +35 -6
- figrecipe/_editor/_routes_captions.py +130 -0
- figrecipe/_editor/_routes_composition.py +270 -0
- figrecipe/_editor/_routes_core.py +15 -173
- figrecipe/_editor/_routes_datatable.py +364 -0
- figrecipe/_editor/_routes_element.py +37 -19
- figrecipe/_editor/_routes_files.py +443 -0
- figrecipe/_editor/_routes_image.py +200 -0
- figrecipe/_editor/_routes_snapshot.py +94 -0
- figrecipe/_editor/_routes_style.py +28 -8
- figrecipe/_editor/_templates/__init__.py +40 -2
- figrecipe/_editor/_templates/_html.py +97 -103
- figrecipe/_editor/_templates/_html_components/__init__.py +13 -0
- figrecipe/_editor/_templates/_html_components/_composition_toolbar.py +79 -0
- figrecipe/_editor/_templates/_html_components/_file_browser.py +41 -0
- figrecipe/_editor/_templates/_html_datatable.py +92 -0
- figrecipe/_editor/_templates/_scripts/__init__.py +58 -0
- figrecipe/_editor/_templates/_scripts/_accordion.py +328 -0
- figrecipe/_editor/_templates/_scripts/_annotation_drag.py +504 -0
- figrecipe/_editor/_templates/_scripts/_api.py +1 -1
- figrecipe/_editor/_templates/_scripts/_canvas_context_menu.py +182 -0
- figrecipe/_editor/_templates/_scripts/_captions.py +231 -0
- figrecipe/_editor/_templates/_scripts/_composition.py +283 -0
- figrecipe/_editor/_templates/_scripts/_core.py +94 -37
- figrecipe/_editor/_templates/_scripts/_datatable/__init__.py +59 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_cell_edit.py +97 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_clipboard.py +164 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_context_menu.py +221 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_core.py +150 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_editable.py +511 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_import.py +161 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_plot.py +261 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_selection.py +438 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_table.py +256 -0
- figrecipe/_editor/_templates/_scripts/_datatable/_tabs.py +354 -0
- figrecipe/_editor/_templates/_scripts/_element_editor.py +17 -2
- figrecipe/_editor/_templates/_scripts/_files.py +274 -40
- figrecipe/_editor/_templates/_scripts/_files_context_menu.py +240 -0
- figrecipe/_editor/_templates/_scripts/_hitmap.py +87 -84
- figrecipe/_editor/_templates/_scripts/_image_drop.py +428 -0
- figrecipe/_editor/_templates/_scripts/_legend_drag.py +5 -0
- figrecipe/_editor/_templates/_scripts/_multi_select.py +198 -0
- figrecipe/_editor/_templates/_scripts/_panel_drag.py +219 -48
- figrecipe/_editor/_templates/_scripts/_panel_drag_snapshot.py +33 -0
- figrecipe/_editor/_templates/_scripts/_panel_position.py +238 -54
- figrecipe/_editor/_templates/_scripts/_panel_resize.py +230 -0
- figrecipe/_editor/_templates/_scripts/_panel_snap.py +307 -0
- figrecipe/_editor/_templates/_scripts/_region_select.py +255 -0
- figrecipe/_editor/_templates/_scripts/_selection.py +8 -1
- figrecipe/_editor/_templates/_scripts/_sync.py +242 -0
- figrecipe/_editor/_templates/_scripts/_undo_redo.py +348 -0
- figrecipe/_editor/_templates/_scripts/_zoom.py +52 -19
- figrecipe/_editor/_templates/_styles/__init__.py +9 -0
- figrecipe/_editor/_templates/_styles/_base.py +47 -0
- figrecipe/_editor/_templates/_styles/_buttons.py +127 -6
- figrecipe/_editor/_templates/_styles/_composition.py +87 -0
- figrecipe/_editor/_templates/_styles/_controls.py +168 -3
- figrecipe/_editor/_templates/_styles/_datatable/__init__.py +40 -0
- figrecipe/_editor/_templates/_styles/_datatable/_editable.py +203 -0
- figrecipe/_editor/_templates/_styles/_datatable/_panel.py +268 -0
- figrecipe/_editor/_templates/_styles/_datatable/_table.py +479 -0
- figrecipe/_editor/_templates/_styles/_datatable/_toolbar.py +384 -0
- figrecipe/_editor/_templates/_styles/_datatable/_vars.py +123 -0
- figrecipe/_editor/_templates/_styles/_dynamic_props.py +5 -5
- figrecipe/_editor/_templates/_styles/_file_browser.py +466 -0
- figrecipe/_editor/_templates/_styles/_forms.py +98 -0
- figrecipe/_editor/_templates/_styles/_hitmap.py +7 -0
- figrecipe/_editor/_templates/_styles/_modals.py +29 -0
- figrecipe/_editor/_templates/_styles/_overlays.py +5 -5
- figrecipe/_editor/_templates/_styles/_preview.py +213 -8
- figrecipe/_editor/_templates/_styles/_spinner.py +117 -0
- figrecipe/_editor/static/audio/click.mp3 +0 -0
- figrecipe/_editor/static/click.mp3 +0 -0
- figrecipe/_editor/static/icons/favicon.ico +0 -0
- figrecipe/_integrations/__init__.py +17 -0
- figrecipe/_integrations/_scitex_stats.py +298 -0
- figrecipe/_params/_DECORATION_METHODS.py +2 -0
- figrecipe/_recorder.py +28 -3
- figrecipe/_reproducer/_core.py +60 -49
- figrecipe/_utils/__init__.py +3 -0
- figrecipe/_utils/_bundle.py +205 -0
- figrecipe/_wrappers/_axes.py +150 -2
- figrecipe/_wrappers/_caption_generator.py +218 -0
- figrecipe/_wrappers/_figure.py +26 -1
- figrecipe/_wrappers/_stat_annotation.py +274 -0
- figrecipe/styles/_style_applier.py +10 -2
- figrecipe/styles/presets/SCITEX.yaml +11 -4
- {figrecipe-0.7.4.dist-info → figrecipe-0.9.0.dist-info}/METADATA +144 -146
- figrecipe-0.9.0.dist-info/RECORD +277 -0
- figrecipe-0.9.0.dist-info/entry_points.txt +2 -0
- figrecipe-0.7.4.dist-info/RECORD +0 -188
- {figrecipe-0.7.4.dist-info → figrecipe-0.9.0.dist-info}/WHEEL +0 -0
- {figrecipe-0.7.4.dist-info → figrecipe-0.9.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""CSS styles for datatable spreadsheet table."""
|
|
4
|
+
|
|
5
|
+
CSS_DATATABLE_TABLE = """
|
|
6
|
+
/* Spreadsheet container */
|
|
7
|
+
.datatable-content {
|
|
8
|
+
flex: 1;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
padding: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Spreadsheet table styles */
|
|
14
|
+
.datatable-table {
|
|
15
|
+
width: 100%;
|
|
16
|
+
border-collapse: collapse;
|
|
17
|
+
font-size: 11px;
|
|
18
|
+
table-layout: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.datatable-table th,
|
|
22
|
+
.datatable-table td {
|
|
23
|
+
padding: 4px 8px;
|
|
24
|
+
border: 1px solid var(--border-color);
|
|
25
|
+
text-align: left;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
max-width: 150px;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.datatable-table th {
|
|
33
|
+
background: var(--header-bg) !important; /* Theme-aware solid background */
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
position: sticky;
|
|
36
|
+
top: 0;
|
|
37
|
+
z-index: 10;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Ensure all elements inside header have opaque backgrounds */
|
|
41
|
+
.datatable-table th * {
|
|
42
|
+
background-color: inherit;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.datatable-table th input,
|
|
46
|
+
.datatable-table th select {
|
|
47
|
+
background: var(--header-input-bg) !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Corner cell (row-num in header) needs highest z-index */
|
|
51
|
+
.datatable-table thead th.row-num {
|
|
52
|
+
z-index: 20;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.datatable-table th.selected {
|
|
56
|
+
background: var(--accent-color) !important;
|
|
57
|
+
color: white;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Highlight entire column when header is selected */
|
|
61
|
+
.datatable-table td.col-selected {
|
|
62
|
+
background: var(--cell-selected-bg) !important; /* Theme-aware selection */
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.datatable-table td {
|
|
66
|
+
background: var(--bg-primary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.datatable-table tr:hover td {
|
|
70
|
+
background: var(--cell-hover-bg);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Column header with checkbox */
|
|
74
|
+
.datatable-col-header {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 4px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.datatable-col-header input[type="checkbox"] {
|
|
81
|
+
margin: 0;
|
|
82
|
+
width: 14px;
|
|
83
|
+
height: 14px;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.datatable-col-header .col-name {
|
|
88
|
+
flex: 1;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.datatable-col-header .col-type {
|
|
94
|
+
font-size: 9px;
|
|
95
|
+
color: var(--text-secondary);
|
|
96
|
+
background: var(--bg-secondary);
|
|
97
|
+
padding: 1px 4px;
|
|
98
|
+
border-radius: 2px;
|
|
99
|
+
font-weight: normal;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Row number column - sticky for horizontal scroll */
|
|
103
|
+
.datatable-table th.row-num,
|
|
104
|
+
.datatable-table td.row-num {
|
|
105
|
+
width: 40px;
|
|
106
|
+
min-width: 40px;
|
|
107
|
+
max-width: 40px;
|
|
108
|
+
text-align: center;
|
|
109
|
+
background: var(--row-num-bg) !important; /* Theme-aware solid background */
|
|
110
|
+
color: var(--text-secondary);
|
|
111
|
+
font-size: 10px;
|
|
112
|
+
position: sticky;
|
|
113
|
+
left: 0;
|
|
114
|
+
z-index: 5;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Ensure header row-num is above data row-num */
|
|
118
|
+
.datatable-table th.row-num {
|
|
119
|
+
z-index: 15;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Column header color linking with variables - theme-aware monochrome */
|
|
123
|
+
.datatable-table th.var-linked {
|
|
124
|
+
position: relative;
|
|
125
|
+
background: var(--var-linked-bg) !important;
|
|
126
|
+
color: var(--text-primary);
|
|
127
|
+
box-shadow: inset 0 -4px 0 var(--accent-color);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Also highlight cells in linked columns - theme-aware */
|
|
131
|
+
.datatable-table td.var-linked-cell {
|
|
132
|
+
background: var(--var-linked-cell-bg) !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Color classes for column headers - disabled for cleaner monochrome design */
|
|
136
|
+
.datatable-table th.var-color-0,
|
|
137
|
+
.datatable-table th.var-color-1,
|
|
138
|
+
.datatable-table th.var-color-2,
|
|
139
|
+
.datatable-table th.var-color-3,
|
|
140
|
+
.datatable-table th.var-color-4,
|
|
141
|
+
.datatable-table th.var-color-5 {
|
|
142
|
+
/* No color overrides - uses accent-color via var-linked class */
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* box-shadow is used for bottom border color in var-linked headers */
|
|
146
|
+
|
|
147
|
+
/* Canvas-linked column highlight */
|
|
148
|
+
.datatable-table th.canvas-linked {
|
|
149
|
+
background: var(--accent-color) !important;
|
|
150
|
+
color: white !important;
|
|
151
|
+
animation: canvas-link-pulse 1s ease-in-out;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.datatable-table th.canvas-linked .col-name,
|
|
155
|
+
.datatable-table th.canvas-linked .col-name-input,
|
|
156
|
+
.datatable-table th.canvas-linked .col-type {
|
|
157
|
+
color: white !important;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.datatable-table th.canvas-linked .col-type {
|
|
161
|
+
background: rgba(255,255,255,0.2);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Highlighted data cells */
|
|
165
|
+
.datatable-table td.canvas-linked {
|
|
166
|
+
background: rgba(59, 130, 246, 0.15) !important;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
[data-theme="dark"] .datatable-table td.canvas-linked {
|
|
170
|
+
background: rgba(59, 130, 246, 0.2) !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@keyframes canvas-link-pulse {
|
|
174
|
+
0% { box-shadow: 0 0 0 0 rgba(74, 158, 255, 0.7); }
|
|
175
|
+
50% { box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.4); }
|
|
176
|
+
100% { box-shadow: 0 0 0 0 rgba(74, 158, 255, 0); }
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* Smart cell truncation with span wrapper (vis_app pattern) */
|
|
180
|
+
.datatable-table td .cell-text {
|
|
181
|
+
display: block;
|
|
182
|
+
overflow: hidden;
|
|
183
|
+
text-overflow: ellipsis;
|
|
184
|
+
white-space: nowrap;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Cell selection styles - theme-aware solid colors */
|
|
188
|
+
.datatable-table td.cell-selected {
|
|
189
|
+
background: var(--cell-selected-bg) !important;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.datatable-table td.cell-current {
|
|
193
|
+
background: var(--cell-selected-bg) !important;
|
|
194
|
+
outline: 2px solid var(--accent-color);
|
|
195
|
+
outline-offset: -2px;
|
|
196
|
+
z-index: 5;
|
|
197
|
+
position: relative;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.datatable-table td:focus {
|
|
201
|
+
outline: 2px solid var(--accent-color);
|
|
202
|
+
outline-offset: -2px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Cell editing mode */
|
|
206
|
+
.datatable-table td.cell-editing {
|
|
207
|
+
padding: 0;
|
|
208
|
+
background: var(--bg-primary) !important;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.datatable-table td .cell-edit-input {
|
|
212
|
+
width: 100%;
|
|
213
|
+
height: 100%;
|
|
214
|
+
padding: 4px 8px;
|
|
215
|
+
border: none;
|
|
216
|
+
background: var(--bg-primary);
|
|
217
|
+
color: var(--text-primary);
|
|
218
|
+
font-size: 11px;
|
|
219
|
+
font-family: inherit;
|
|
220
|
+
box-sizing: border-box;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.datatable-table td .cell-edit-input:focus {
|
|
224
|
+
outline: none;
|
|
225
|
+
box-shadow: inset 0 0 0 2px var(--accent-color);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* Make cells focusable for keyboard navigation */
|
|
229
|
+
.datatable-table td[tabindex] {
|
|
230
|
+
cursor: cell;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* Visual feedback - copy flash animation */
|
|
234
|
+
.datatable-table td.copy-flash {
|
|
235
|
+
animation: copy-flash 0.3s ease-out;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@keyframes copy-flash {
|
|
239
|
+
0% { background: var(--accent-color); }
|
|
240
|
+
100% { background: inherit; }
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* Marching ants border for copied cells (Excel-style) */
|
|
244
|
+
.datatable-table td.copy-border-top {
|
|
245
|
+
border-top: 2px dashed #4a9eff !important;
|
|
246
|
+
animation: march-top 0.4s linear infinite;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.datatable-table td.copy-border-bottom {
|
|
250
|
+
border-bottom: 2px dashed #4a9eff !important;
|
|
251
|
+
animation: march-bottom 0.4s linear infinite;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.datatable-table td.copy-border-left {
|
|
255
|
+
border-left: 2px dashed #4a9eff !important;
|
|
256
|
+
animation: march-left 0.4s linear infinite;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.datatable-table td.copy-border-right {
|
|
260
|
+
border-right: 2px dashed #4a9eff !important;
|
|
261
|
+
animation: march-right 0.4s linear infinite;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* Marching ants animation keyframes */
|
|
265
|
+
@keyframes march-top {
|
|
266
|
+
0% { border-top-style: dashed; }
|
|
267
|
+
50% { border-top-style: dotted; }
|
|
268
|
+
100% { border-top-style: dashed; }
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
@keyframes march-bottom {
|
|
272
|
+
0% { border-bottom-style: dashed; }
|
|
273
|
+
50% { border-bottom-style: dotted; }
|
|
274
|
+
100% { border-bottom-style: dashed; }
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
@keyframes march-left {
|
|
278
|
+
0% { border-left-style: dashed; }
|
|
279
|
+
50% { border-left-style: dotted; }
|
|
280
|
+
100% { border-left-style: dashed; }
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
@keyframes march-right {
|
|
284
|
+
0% { border-right-style: dashed; }
|
|
285
|
+
50% { border-right-style: dotted; }
|
|
286
|
+
100% { border-right-style: dashed; }
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* Cut cells appear faded */
|
|
290
|
+
.datatable-table td.cut-pending {
|
|
291
|
+
opacity: 0.5;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* Editable table styles - uses span cells with contenteditable for editing */
|
|
295
|
+
.datatable-table.editable td {
|
|
296
|
+
padding: 4px 8px;
|
|
297
|
+
cursor: cell;
|
|
298
|
+
position: relative;
|
|
299
|
+
user-select: none;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* Cell content span for truncation */
|
|
303
|
+
.datatable-table.editable td .cell-text {
|
|
304
|
+
display: block;
|
|
305
|
+
overflow: hidden;
|
|
306
|
+
text-overflow: ellipsis;
|
|
307
|
+
white-space: nowrap;
|
|
308
|
+
pointer-events: none; /* Let clicks pass through to td */
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.datatable-table.editable td:hover {
|
|
312
|
+
background: var(--cell-hover-bg) !important;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* Cell selection highlight - theme-aware */
|
|
316
|
+
.datatable-table.editable td.cell-selected {
|
|
317
|
+
background: var(--cell-selected-bg) !important;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* Current cell (keyboard focus target) */
|
|
321
|
+
.datatable-table.editable td.cell-current {
|
|
322
|
+
background: var(--cell-selected-bg) !important;
|
|
323
|
+
outline: 2px solid var(--accent-color);
|
|
324
|
+
outline-offset: -2px;
|
|
325
|
+
z-index: 5;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/* Focus state for keyboard navigation */
|
|
329
|
+
.datatable-table.editable td:focus {
|
|
330
|
+
outline: 2px solid var(--accent-color);
|
|
331
|
+
outline-offset: -2px;
|
|
332
|
+
z-index: 5;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/* Cell editing mode - contenteditable active */
|
|
336
|
+
.datatable-table.editable td.cell-editing {
|
|
337
|
+
background: var(--bg-primary) !important;
|
|
338
|
+
user-select: text;
|
|
339
|
+
cursor: text;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.datatable-table.editable td.cell-editing .cell-text {
|
|
343
|
+
display: none; /* Hide span during edit */
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/* Input element created during editing */
|
|
347
|
+
.datatable-table.editable td .cell-edit-input {
|
|
348
|
+
width: 100%;
|
|
349
|
+
height: 100%;
|
|
350
|
+
padding: 4px 8px;
|
|
351
|
+
margin: -4px -8px;
|
|
352
|
+
border: none;
|
|
353
|
+
background: var(--bg-primary);
|
|
354
|
+
color: var(--text-primary);
|
|
355
|
+
font-size: 11px;
|
|
356
|
+
font-family: inherit;
|
|
357
|
+
box-sizing: content-box;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.datatable-table.editable td .cell-edit-input:focus {
|
|
361
|
+
outline: none;
|
|
362
|
+
box-shadow: inset 0 0 0 2px var(--accent-color);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* Row hover highlighting for editable table */
|
|
366
|
+
.datatable-table.editable tr:hover td {
|
|
367
|
+
background: rgba(74, 158, 255, 0.05);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/* Row number highlight on row hover */
|
|
371
|
+
.datatable-table.editable tr:hover td.row-num {
|
|
372
|
+
background: var(--accent-color) !important;
|
|
373
|
+
color: white !important;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/* Column header editable styles */
|
|
377
|
+
.editable-header {
|
|
378
|
+
display: flex;
|
|
379
|
+
align-items: center;
|
|
380
|
+
gap: 4px;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.editable-header .col-name-input {
|
|
384
|
+
flex: 1;
|
|
385
|
+
min-width: 40px;
|
|
386
|
+
padding: 2px 4px;
|
|
387
|
+
border: 1px solid transparent;
|
|
388
|
+
border-radius: 2px;
|
|
389
|
+
background: transparent;
|
|
390
|
+
font-size: 11px;
|
|
391
|
+
font-weight: 600;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.editable-header .col-name-input:hover {
|
|
395
|
+
border-color: var(--border-color);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.editable-header .col-name-input:focus {
|
|
399
|
+
outline: none;
|
|
400
|
+
border-color: var(--accent-color);
|
|
401
|
+
background: var(--bg-primary);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.editable-header .col-type-select {
|
|
405
|
+
padding: 2px 4px;
|
|
406
|
+
border: 1px solid var(--border-color);
|
|
407
|
+
border-radius: 2px;
|
|
408
|
+
background: var(--bg-secondary);
|
|
409
|
+
font-size: 10px;
|
|
410
|
+
cursor: pointer;
|
|
411
|
+
min-width: 42px;
|
|
412
|
+
color: var(--text-primary);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Context menu styles */
|
|
416
|
+
.datatable-context-menu {
|
|
417
|
+
position: fixed;
|
|
418
|
+
background: var(--bg-primary);
|
|
419
|
+
border: 1px solid var(--border-color);
|
|
420
|
+
border-radius: 4px;
|
|
421
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
422
|
+
z-index: 1000;
|
|
423
|
+
min-width: 160px;
|
|
424
|
+
padding: 4px 0;
|
|
425
|
+
font-size: 12px;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.datatable-context-menu .context-menu-item {
|
|
429
|
+
padding: 6px 12px;
|
|
430
|
+
cursor: pointer;
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: center;
|
|
433
|
+
gap: 8px;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.datatable-context-menu .context-menu-item:hover {
|
|
437
|
+
background: var(--bg-secondary);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.datatable-context-menu .context-menu-item .shortcut {
|
|
441
|
+
margin-left: auto;
|
|
442
|
+
color: var(--text-secondary);
|
|
443
|
+
font-size: 10px;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.datatable-context-menu .context-menu-divider {
|
|
447
|
+
height: 1px;
|
|
448
|
+
background: var(--border-color);
|
|
449
|
+
margin: 4px 0;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* Load status indicator for infinite scroll */
|
|
453
|
+
.datatable-load-status {
|
|
454
|
+
padding: 6px 12px;
|
|
455
|
+
font-size: 11px;
|
|
456
|
+
color: var(--text-secondary);
|
|
457
|
+
text-align: center;
|
|
458
|
+
background: var(--bg-secondary);
|
|
459
|
+
border-top: 1px solid var(--border-color);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/* Editable table scroll container */
|
|
463
|
+
.editable-table-scroll {
|
|
464
|
+
flex: 1;
|
|
465
|
+
overflow: auto;
|
|
466
|
+
min-height: 0; /* Allow flex shrinking */
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.editable-table-wrapper {
|
|
470
|
+
display: flex;
|
|
471
|
+
flex-direction: column;
|
|
472
|
+
flex: 1;
|
|
473
|
+
min-height: 0; /* Allow flex shrinking */
|
|
474
|
+
}
|
|
475
|
+
"""
|
|
476
|
+
|
|
477
|
+
__all__ = ["CSS_DATATABLE_TABLE"]
|
|
478
|
+
|
|
479
|
+
# EOF
|