@trebco/treb 23.6.5 → 25.0.0-rc2
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.
- package/.eslintignore +8 -0
- package/.eslintrc.js +164 -0
- package/README-shadow-DOM.md +88 -0
- package/README.md +37 -130
- package/api-config.json +29 -0
- package/api-generator/api-generator-types.ts +82 -0
- package/api-generator/api-generator.ts +1172 -0
- package/api-generator/package.json +3 -0
- package/build/treb-spreadsheet.mjs +14 -0
- package/{treb.d.ts → build/treb.d.ts} +323 -271
- package/esbuild-custom-element.mjs +336 -0
- package/esbuild.js +305 -0
- package/package.json +49 -14
- package/treb-base-types/package.json +5 -0
- package/treb-base-types/src/api_types.ts +36 -0
- package/treb-base-types/src/area.ts +583 -0
- package/treb-base-types/src/basic_types.ts +45 -0
- package/treb-base-types/src/cell.ts +612 -0
- package/treb-base-types/src/cells.ts +1066 -0
- package/treb-base-types/src/color.ts +124 -0
- package/treb-base-types/src/import.ts +71 -0
- package/treb-base-types/src/index-standalone.ts +29 -0
- package/treb-base-types/src/index.ts +42 -0
- package/treb-base-types/src/layout.ts +47 -0
- package/treb-base-types/src/localization.ts +187 -0
- package/treb-base-types/src/rectangle.ts +145 -0
- package/treb-base-types/src/render_text.ts +72 -0
- package/treb-base-types/src/style.ts +545 -0
- package/treb-base-types/src/table.ts +109 -0
- package/treb-base-types/src/text_part.ts +54 -0
- package/treb-base-types/src/theme.ts +608 -0
- package/treb-base-types/src/union.ts +152 -0
- package/treb-base-types/src/value-type.ts +164 -0
- package/treb-base-types/style/resizable.css +59 -0
- package/treb-calculator/modern.tsconfig.json +11 -0
- package/treb-calculator/package.json +5 -0
- package/treb-calculator/src/calculator.ts +2546 -0
- package/treb-calculator/src/complex-math.ts +558 -0
- package/treb-calculator/src/dag/array-vertex.ts +198 -0
- package/treb-calculator/src/dag/graph.ts +951 -0
- package/treb-calculator/src/dag/leaf_vertex.ts +118 -0
- package/treb-calculator/src/dag/spreadsheet_vertex.ts +327 -0
- package/treb-calculator/src/dag/spreadsheet_vertex_base.ts +44 -0
- package/treb-calculator/src/dag/vertex.ts +352 -0
- package/treb-calculator/src/descriptors.ts +162 -0
- package/treb-calculator/src/expression-calculator.ts +1069 -0
- package/treb-calculator/src/function-error.ts +103 -0
- package/treb-calculator/src/function-library.ts +103 -0
- package/treb-calculator/src/functions/base-functions.ts +1214 -0
- package/treb-calculator/src/functions/checkbox.ts +164 -0
- package/treb-calculator/src/functions/complex-functions.ts +253 -0
- package/treb-calculator/src/functions/finance-functions.ts +399 -0
- package/treb-calculator/src/functions/information-functions.ts +102 -0
- package/treb-calculator/src/functions/matrix-functions.ts +182 -0
- package/treb-calculator/src/functions/sparkline.ts +335 -0
- package/treb-calculator/src/functions/statistics-functions.ts +350 -0
- package/treb-calculator/src/functions/text-functions.ts +298 -0
- package/treb-calculator/src/index.ts +27 -0
- package/treb-calculator/src/notifier-types.ts +59 -0
- package/treb-calculator/src/primitives.ts +428 -0
- package/treb-calculator/src/utilities.ts +305 -0
- package/treb-charts/package.json +5 -0
- package/treb-charts/src/chart-functions.ts +156 -0
- package/treb-charts/src/chart-types.ts +230 -0
- package/treb-charts/src/chart.ts +1288 -0
- package/treb-charts/src/index.ts +24 -0
- package/treb-charts/src/main.ts +37 -0
- package/treb-charts/src/rectangle.ts +52 -0
- package/treb-charts/src/renderer.ts +1841 -0
- package/treb-charts/src/util.ts +122 -0
- package/treb-charts/style/charts.scss +221 -0
- package/treb-charts/style/old-charts.scss +250 -0
- package/treb-embed/markup/layout.html +137 -0
- package/treb-embed/markup/toolbar.html +175 -0
- package/treb-embed/modern.tsconfig.json +25 -0
- package/treb-embed/src/custom-element/content-types.d.ts +18 -0
- package/treb-embed/src/custom-element/global.d.ts +11 -0
- package/treb-embed/src/custom-element/spreadsheet-constructor.ts +1228 -0
- package/treb-embed/src/custom-element/treb-global.ts +44 -0
- package/treb-embed/src/custom-element/treb-spreadsheet-element.ts +52 -0
- package/treb-embed/src/embedded-spreadsheet.ts +5358 -0
- package/treb-embed/src/index.ts +16 -0
- package/treb-embed/src/language-model.ts +41 -0
- package/treb-embed/src/options.ts +298 -0
- package/treb-embed/src/progress-dialog.ts +228 -0
- package/treb-embed/src/selection-state.ts +16 -0
- package/treb-embed/src/spinner.ts +42 -0
- package/treb-embed/src/toolbar-message.ts +96 -0
- package/treb-embed/src/types.ts +167 -0
- package/treb-embed/style/autocomplete.scss +103 -0
- package/treb-embed/style/dark-theme.scss +114 -0
- package/treb-embed/style/defaults.scss +36 -0
- package/treb-embed/style/dialog.scss +181 -0
- package/treb-embed/style/dropdown-select.scss +101 -0
- package/treb-embed/style/formula-bar.scss +193 -0
- package/treb-embed/style/grid.scss +374 -0
- package/treb-embed/style/layout.scss +424 -0
- package/treb-embed/style/mouse-mask.scss +67 -0
- package/treb-embed/style/note.scss +92 -0
- package/treb-embed/style/overlay-editor.scss +102 -0
- package/treb-embed/style/spinner.scss +92 -0
- package/treb-embed/style/tab-bar.scss +228 -0
- package/treb-embed/style/table.scss +80 -0
- package/treb-embed/style/theme-defaults.scss +444 -0
- package/treb-embed/style/toolbar.scss +416 -0
- package/treb-embed/style/tooltip.scss +68 -0
- package/treb-embed/style/treb-icons.scss +130 -0
- package/treb-embed/style/treb-spreadsheet-element.scss +20 -0
- package/treb-embed/style/z-index.scss +43 -0
- package/treb-export/docs/charts.md +68 -0
- package/treb-export/modern.tsconfig.json +19 -0
- package/treb-export/package.json +4 -0
- package/treb-export/src/address-type.ts +77 -0
- package/treb-export/src/base-template.ts +22 -0
- package/treb-export/src/column-width.ts +85 -0
- package/treb-export/src/drawing2/chart-template-components2.ts +389 -0
- package/treb-export/src/drawing2/chart2.ts +282 -0
- package/treb-export/src/drawing2/column-chart-template2.ts +521 -0
- package/treb-export/src/drawing2/donut-chart-template2.ts +296 -0
- package/treb-export/src/drawing2/drawing2.ts +355 -0
- package/treb-export/src/drawing2/embedded-image.ts +71 -0
- package/treb-export/src/drawing2/scatter-chart-template2.ts +555 -0
- package/treb-export/src/export-worker/export-worker.ts +99 -0
- package/treb-export/src/export-worker/index-modern.ts +22 -0
- package/treb-export/src/export2.ts +2204 -0
- package/treb-export/src/import2.ts +882 -0
- package/treb-export/src/relationship.ts +36 -0
- package/treb-export/src/shared-strings2.ts +128 -0
- package/treb-export/src/template-2.ts +22 -0
- package/treb-export/src/unescape_xml.ts +47 -0
- package/treb-export/src/workbook-sheet2.ts +182 -0
- package/treb-export/src/workbook-style2.ts +1285 -0
- package/treb-export/src/workbook-theme2.ts +88 -0
- package/treb-export/src/workbook2.ts +491 -0
- package/treb-export/src/xml-utils.ts +201 -0
- package/treb-export/template/base/[Content_Types].xml +2 -0
- package/treb-export/template/base/_rels/.rels +2 -0
- package/treb-export/template/base/docProps/app.xml +2 -0
- package/treb-export/template/base/docProps/core.xml +12 -0
- package/treb-export/template/base/xl/_rels/workbook.xml.rels +2 -0
- package/treb-export/template/base/xl/sharedStrings.xml +2 -0
- package/treb-export/template/base/xl/styles.xml +2 -0
- package/treb-export/template/base/xl/theme/theme1.xml +2 -0
- package/treb-export/template/base/xl/workbook.xml +2 -0
- package/treb-export/template/base/xl/worksheets/sheet1.xml +2 -0
- package/treb-export/template/base.xlsx +0 -0
- package/treb-format/package.json +8 -0
- package/treb-format/src/format.test.ts +213 -0
- package/treb-format/src/format.ts +942 -0
- package/treb-format/src/format_cache.ts +199 -0
- package/treb-format/src/format_parser.ts +723 -0
- package/treb-format/src/index.ts +25 -0
- package/treb-format/src/number_format_section.ts +100 -0
- package/treb-format/src/value_parser.ts +337 -0
- package/treb-grid/package.json +5 -0
- package/treb-grid/src/editors/autocomplete.ts +394 -0
- package/treb-grid/src/editors/autocomplete_matcher.ts +260 -0
- package/treb-grid/src/editors/formula_bar.ts +473 -0
- package/treb-grid/src/editors/formula_editor_base.ts +910 -0
- package/treb-grid/src/editors/overlay_editor.ts +511 -0
- package/treb-grid/src/index.ts +37 -0
- package/treb-grid/src/layout/base_layout.ts +2618 -0
- package/treb-grid/src/layout/grid_layout.ts +299 -0
- package/treb-grid/src/layout/rectangle_cache.ts +86 -0
- package/treb-grid/src/render/selection-renderer.ts +414 -0
- package/treb-grid/src/render/svg_header_overlay.ts +93 -0
- package/treb-grid/src/render/svg_selection_block.ts +187 -0
- package/treb-grid/src/render/tile_renderer.ts +2122 -0
- package/treb-grid/src/types/annotation.ts +216 -0
- package/treb-grid/src/types/border_constants.ts +34 -0
- package/treb-grid/src/types/clipboard_data.ts +31 -0
- package/treb-grid/src/types/data_model.ts +334 -0
- package/treb-grid/src/types/drag_mask.ts +81 -0
- package/treb-grid/src/types/grid.ts +7743 -0
- package/treb-grid/src/types/grid_base.ts +3644 -0
- package/treb-grid/src/types/grid_command.ts +470 -0
- package/treb-grid/src/types/grid_events.ts +124 -0
- package/treb-grid/src/types/grid_options.ts +97 -0
- package/treb-grid/src/types/grid_selection.ts +60 -0
- package/treb-grid/src/types/named_range.ts +369 -0
- package/treb-grid/src/types/scale-control.ts +202 -0
- package/treb-grid/src/types/serialize_options.ts +72 -0
- package/treb-grid/src/types/set_range_options.ts +52 -0
- package/treb-grid/src/types/sheet.ts +3099 -0
- package/treb-grid/src/types/sheet_types.ts +95 -0
- package/treb-grid/src/types/tab_bar.ts +464 -0
- package/treb-grid/src/types/tile.ts +59 -0
- package/treb-grid/src/types/update_flags.ts +75 -0
- package/treb-grid/src/util/dom_utilities.ts +44 -0
- package/treb-grid/src/util/fontmetrics2.ts +179 -0
- package/treb-grid/src/util/ua.ts +104 -0
- package/treb-logo.svg +18 -0
- package/treb-parser/package.json +5 -0
- package/treb-parser/src/csv-parser.ts +122 -0
- package/treb-parser/src/index.ts +25 -0
- package/treb-parser/src/md-parser.ts +526 -0
- package/treb-parser/src/parser-types.ts +397 -0
- package/treb-parser/src/parser.test.ts +298 -0
- package/treb-parser/src/parser.ts +2673 -0
- package/treb-utils/package.json +5 -0
- package/treb-utils/src/dispatch.ts +57 -0
- package/treb-utils/src/event_source.ts +147 -0
- package/treb-utils/src/ievent_source.ts +33 -0
- package/treb-utils/src/index.ts +31 -0
- package/treb-utils/src/measurement.ts +174 -0
- package/treb-utils/src/resizable.ts +160 -0
- package/treb-utils/src/scale.ts +137 -0
- package/treb-utils/src/serialize_html.ts +124 -0
- package/treb-utils/src/template.ts +70 -0
- package/treb-utils/src/validate_uri.ts +61 -0
- package/tsconfig.json +10 -0
- package/tsproject.json +30 -0
- package/util/license-plugin-esbuild.js +86 -0
- package/util/list-css-vars.sh +46 -0
- package/README-esm.md +0 -37
- package/treb-bundle.css +0 -2
- package/treb-bundle.mjs +0 -15
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of TREB.
|
|
3
|
+
*
|
|
4
|
+
* TREB is free software: you can redistribute it and/or modify it under the
|
|
5
|
+
* terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
* Foundation, either version 3 of the License, or (at your option) any
|
|
7
|
+
* later version.
|
|
8
|
+
*
|
|
9
|
+
* TREB is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
10
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
11
|
+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
12
|
+
* details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License along
|
|
15
|
+
* with TREB. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
*
|
|
17
|
+
* Copyright 2022-2023 trebco, llc.
|
|
18
|
+
* info@treb.app
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* new theme! should add a class name (use treb-main?)
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* we're using variables for selection colors because the colors are used
|
|
28
|
+
* in more than one place; that's a drawback of using CSS, but I think overall
|
|
29
|
+
* the benefits are still worth it.
|
|
30
|
+
*
|
|
31
|
+
* just FYI primary selection color is used in header overlay; and alternate
|
|
32
|
+
* selection color is used to highlight in formula editors (TODO/WIP).
|
|
33
|
+
*/
|
|
34
|
+
// $primary-selection-color: rgb(64, 192, 64);
|
|
35
|
+
$primary-selection-color: #4caaf1;
|
|
36
|
+
$primary-selection-color-unfocused: #acc0cf;
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
$alternate-selection-color-1: rgb(251, 177, 60);
|
|
40
|
+
//$alternate-selection-color-2: rgb(87, 184, 255);
|
|
41
|
+
$alternate-selection-color-2: rgb(64, 192, 64);
|
|
42
|
+
$alternate-selection-color-3: rgb(182, 109, 13);
|
|
43
|
+
$alternate-selection-color-4: rgb(33, 118, 174);
|
|
44
|
+
$alternate-selection-color-5: rgb(254, 104, 71);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* slightly darkening colors for text highlighting
|
|
48
|
+
* algo: convert to HSL; if L > .5, regenerate with L = .5; back to RGB (why?)
|
|
49
|
+
*/
|
|
50
|
+
$text-reference-color-1: rgb(250, 155, 5);
|
|
51
|
+
//$text-reference-color-2: rgb(0, 147, 255);
|
|
52
|
+
$text-reference-color-2: rgb(58, 173, 58);
|
|
53
|
+
$text-reference-color-3: rgb(182, 109, 13);
|
|
54
|
+
$text-reference-color-4: rgb(33, 118, 174);
|
|
55
|
+
$text-reference-color-5: rgb(254, 47, 1);
|
|
56
|
+
|
|
57
|
+
.treb-layout {
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* move primary selection focus color to focus-within on the top-level
|
|
61
|
+
* node, and use a (new) unfocused selection color. name?
|
|
62
|
+
*
|
|
63
|
+
* this has to be as specific as the inside version
|
|
64
|
+
*/
|
|
65
|
+
.treb-container:focus-within {
|
|
66
|
+
// .treb-main {
|
|
67
|
+
.treb-grid-selection .primary-selection, .treb-header-overlay {
|
|
68
|
+
color: var(--treb-selection-color, $primary-selection-color);
|
|
69
|
+
}
|
|
70
|
+
// }
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
|
|
77
|
+
theme colors (new). these are in addition to the cell text and background,
|
|
78
|
+
which are technically theme colors as well and should maybe move into this
|
|
79
|
+
section? not sure
|
|
80
|
+
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
.theme-color-1 { color: var(--treb-theme-color-1, #E7E6E6); }
|
|
84
|
+
.theme-color-2 { color: var(--treb-theme-color-2, #44546A); }
|
|
85
|
+
.theme-color-3 { color: var(--treb-theme-color-3, #4472C4); }
|
|
86
|
+
.theme-color-4 { color: var(--treb-theme-color-4, #ED7D31); }
|
|
87
|
+
.theme-color-5 { color: var(--treb-theme-color-5, #A5A5A5); }
|
|
88
|
+
.theme-color-6 { color: var(--treb-theme-color-6, #FFC000); }
|
|
89
|
+
.theme-color-7 { color: var(--treb-theme-color-7, #5B9BD5); }
|
|
90
|
+
.theme-color-8 { color: var(--treb-theme-color-8, #70AD47); }
|
|
91
|
+
.theme-color-9 { color: var(--treb-theme-color-9, #0563C1); }
|
|
92
|
+
.theme-color-10 { color: var(--treb-theme-color-10, #954F72); }
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
|
|
96
|
+
NOTE: much of the theme/style is supplied by the embed lib, which
|
|
97
|
+
sets things like font. we decided to leave it there because it's applied
|
|
98
|
+
to more than just the treb-main node (also to the dialog), so it's easier
|
|
99
|
+
to keep it consistent over there.
|
|
100
|
+
|
|
101
|
+
We have the children, grid-specific, in here. you can still use a single
|
|
102
|
+
theme to override.
|
|
103
|
+
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* offset colors. for some special cases (theme tables) we use offsets
|
|
108
|
+
* against theme colors, selecting a color based on the lightness value
|
|
109
|
+
* of another color.
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
/** offset dark is the DARK color applied against LIGHT backgrounds */
|
|
113
|
+
.treb-offset-dark { color: #000; }
|
|
114
|
+
|
|
115
|
+
/** offset light is the LIGHT color applied against DARK backgrounds */
|
|
116
|
+
.treb-offset-light { color: #fff; }
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* highlight in the corner of a cell when there's a comment. this is painted.
|
|
120
|
+
*/
|
|
121
|
+
.note-marker {
|
|
122
|
+
background: var(--treb-note-marker-color, #6FAB20);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* grid row/column headers. these are painted, so this CSS is read,
|
|
127
|
+
* instead of applied.
|
|
128
|
+
*/
|
|
129
|
+
.grid-headers {
|
|
130
|
+
font-family: var(--treb-grid-header-font-family, inherit);
|
|
131
|
+
font-size: var(--treb-grid-header-font-size, 10pt);
|
|
132
|
+
font-weight: var(--treb-grid-header-font-weight, normal);
|
|
133
|
+
font-style: var(--treb-grid-header-font-style, normal);
|
|
134
|
+
background: var(--treb-grid-header-background, rgb(238, 238, 242));
|
|
135
|
+
|
|
136
|
+
// for these two fall back to grid values, then defaults
|
|
137
|
+
color: var(--treb-grid-header-color, var(--treb-grid-default-color, #666));
|
|
138
|
+
stroke: var(--treb-grid-header-grid-color, var(--treb-grid-grid-color, rgb(204, 204, 212)));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* cells in the grid. background is the unstyled background color
|
|
143
|
+
* (should probably be in grid, not here).
|
|
144
|
+
*
|
|
145
|
+
* everything can be overridden by cell/column/row/sheet styles.
|
|
146
|
+
*
|
|
147
|
+
* stroke here is the color for grid lines. that used to be a separate
|
|
148
|
+
* section, but it seems superfluous.
|
|
149
|
+
*/
|
|
150
|
+
.grid-cells {
|
|
151
|
+
font-family: var(--treb-grid-font-family, inherit);
|
|
152
|
+
font-size: var(--treb-grid-font-size, 14px);
|
|
153
|
+
color: var(--treb-grid-default-color, inherit);
|
|
154
|
+
stroke: var(--treb-grid-grid-color, rgb(204, 204, 212));
|
|
155
|
+
background: var(--treb-grid-background, #fff);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.grid-background {
|
|
159
|
+
background-image: var(--treb-grid-background-image, none);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* this is used for freeze-area highlights
|
|
164
|
+
*/
|
|
165
|
+
.frozen-selection {
|
|
166
|
+
&.highlight-area {
|
|
167
|
+
background: rgba(87, 184, 255, .25);
|
|
168
|
+
border-left-color: rgba(33, 118, 174, 1); /* not using */
|
|
169
|
+
border-bottom-color: rgba(33, 118, 174, 1); /* not using */
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* tooltip when entering formula
|
|
175
|
+
* FIXME: could go into some sort of container with the list? (...)
|
|
176
|
+
*/
|
|
177
|
+
.treb-autocomplete-tooltip {
|
|
178
|
+
|
|
179
|
+
font-size: 14px; /* FIXME: relative */
|
|
180
|
+
border-radius: 2px;
|
|
181
|
+
|
|
182
|
+
background: var(--treb-autocomplete-tooltip-background, #fffbb5);
|
|
183
|
+
color: var(--treb-autocomplete-tooltip-color, inherit);
|
|
184
|
+
border: 1px solid var(--treb-autocomplete-tooltip-border-color, unset);
|
|
185
|
+
|
|
186
|
+
& .active-argument {
|
|
187
|
+
font-weight: 700;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
& .function-description {
|
|
191
|
+
font-style: italic;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
padding: 3px 8px;
|
|
195
|
+
margin: 4px 0px;
|
|
196
|
+
line-height: normal;
|
|
197
|
+
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* autocomplete for functions (and names)
|
|
202
|
+
*/
|
|
203
|
+
.treb-autocomplete {
|
|
204
|
+
|
|
205
|
+
font-size: 14px; /* FIXME: relative? could be larger, actually */
|
|
206
|
+
background: var(--treb-autocomplete-background, #fff);
|
|
207
|
+
border-radius: 2px;
|
|
208
|
+
border: 1px solid var(--treb-autocomplete-border-color, var(--treb-ui-border-color, #ccc));
|
|
209
|
+
box-shadow: $default-box-shadow;
|
|
210
|
+
|
|
211
|
+
li {
|
|
212
|
+
color: var(--treb-autocomplete-entry-color, #333);
|
|
213
|
+
a.selected {
|
|
214
|
+
// background: #339966;
|
|
215
|
+
background: var(--treb-autocomplete-selected-entry-background, #2e8dd6);
|
|
216
|
+
color: var(--treb-autocomplete-selected-entry-color, #fff);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** header overlays (indicate selection) */
|
|
223
|
+
.treb-header-overlay {
|
|
224
|
+
|
|
225
|
+
stroke: none;
|
|
226
|
+
color: var(--treb-selection-color-unfocused, var(--treb-selection-color, $primary-selection-color));
|
|
227
|
+
|
|
228
|
+
.treb-overlay {
|
|
229
|
+
fill: rgb(0, 0, 0); /* FIXME: use color? */
|
|
230
|
+
stroke: none;
|
|
231
|
+
opacity: 0.05;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.treb-highlight {
|
|
235
|
+
fill: currentColor;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* these are highlight colors in editors. we are not consolidating
|
|
242
|
+
* because we may need to adjust a little bit (some are too light to
|
|
243
|
+
* be useful).
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
.treb-editor-container > div, .treb-overlay-editor {
|
|
247
|
+
|
|
248
|
+
/* span:nth-of-type(1n) { */
|
|
249
|
+
span.highlight-1 {
|
|
250
|
+
color: $text-reference-color-1;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* span:nth-of-type(2n) { */
|
|
254
|
+
span.highlight-2 {
|
|
255
|
+
color: $text-reference-color-2;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* span:nth-of-type(3n) { */
|
|
259
|
+
span.highlight-3 {
|
|
260
|
+
color: $text-reference-color-3;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* span:nth-of-type(4n) { */
|
|
264
|
+
span.highlight-4 {
|
|
265
|
+
color: $text-reference-color-4;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* span:nth-of-type(5n) { */
|
|
269
|
+
span.highlight-5 {
|
|
270
|
+
color: $text-reference-color-5;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* selections
|
|
277
|
+
*/
|
|
278
|
+
.treb-grid-selection, .frozen-selection {
|
|
279
|
+
|
|
280
|
+
/** common */
|
|
281
|
+
.selection {
|
|
282
|
+
stroke-width: var(--treb-selection-stroke-width, 2px);
|
|
283
|
+
.outline {
|
|
284
|
+
stroke: currentColor;
|
|
285
|
+
fill: none;
|
|
286
|
+
}
|
|
287
|
+
.fill {
|
|
288
|
+
stroke: none;
|
|
289
|
+
fill: currentColor;
|
|
290
|
+
opacity: var(--treb-selection-fill-opacity, .1);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** common to alternate selections */
|
|
295
|
+
.alternate-selection {
|
|
296
|
+
stroke-dasharray: var(--treb-alternate-selection-dasharray, 3 2);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.alternate-selection:nth-of-type(1n) {
|
|
300
|
+
color: $alternate-selection-color-1;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.alternate-selection:nth-of-type(2n) {
|
|
304
|
+
color: $alternate-selection-color-2;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.alternate-selection:nth-of-type(3n) {
|
|
308
|
+
color: $alternate-selection-color-3;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.alternate-selection:nth-of-type(4n) {
|
|
312
|
+
color: $alternate-selection-color-4;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.alternate-selection:nth-of-type(5n) {
|
|
316
|
+
color: $alternate-selection-color-5;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* primary selection has a separate fill node, because the "target" is
|
|
321
|
+
* not filled
|
|
322
|
+
*/
|
|
323
|
+
.primary-selection {
|
|
324
|
+
color: var(--treb-selection-color-unfocused, var(--treb-selection-color, $primary-selection-color));
|
|
325
|
+
|
|
326
|
+
.nub {
|
|
327
|
+
stroke: #fff; // <-- ? maybe grid background color?
|
|
328
|
+
fill: currentColor;
|
|
329
|
+
stroke-width: 1px;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* column/row size tooltip
|
|
336
|
+
* TODO/FIXME: should this have a box-shadow?
|
|
337
|
+
*/
|
|
338
|
+
.treb-tooltip {
|
|
339
|
+
|
|
340
|
+
font-size: 11pt; /** FIXME: relative */
|
|
341
|
+
|
|
342
|
+
background: var(--treb-resize-tooltip-background, rgba(0, 0, 0, .8));
|
|
343
|
+
color: var(--treb-resize-tooltip-color, #fff);
|
|
344
|
+
border-color: var(--treb-resize-tooltip-background, rgba(0, 0, 0, .8)); /* for arrow */
|
|
345
|
+
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* styling the tab bar, at bottom; includes the add-tab tab and
|
|
350
|
+
* remove tab button
|
|
351
|
+
*/
|
|
352
|
+
.treb-spreadsheet-footer {
|
|
353
|
+
|
|
354
|
+
font-size: 14px; /* FIXME: could be relative? */
|
|
355
|
+
|
|
356
|
+
.treb-spreadsheet-tabs > li, .treb-add-tab {
|
|
357
|
+
background: var(--treb-tab-bar-tab-background, rgb(238, 238, 242));
|
|
358
|
+
color: var(--treb-tab-bar-tab-color, var(--treb-ui-color, inherit));
|
|
359
|
+
|
|
360
|
+
&[selected] {
|
|
361
|
+
background: var(--treb-tab-bar-active-tab-background, #fff);
|
|
362
|
+
color: var(--treb-tab-bar-active-tab-color, var(--treb-ui-color, inherit));
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* formula bar and address label. includes f(x) button which we don't use ATM
|
|
370
|
+
*
|
|
371
|
+
* FIXME: a lot of formula bar styling is in a separate stylesheet
|
|
372
|
+
* (formula-bar.scss); that's OK for layout styling but colors and fonts
|
|
373
|
+
* should centralize here. TODO/WIP.
|
|
374
|
+
*/
|
|
375
|
+
.treb-formula-bar {
|
|
376
|
+
.treb-address-label, .treb-editor-container {
|
|
377
|
+
background: var(--treb-formula-bar-background, transparent);
|
|
378
|
+
color: var(--treb-formula-bar-color, var(--treb-ui-color, inherit));
|
|
379
|
+
|
|
380
|
+
&[locked] {
|
|
381
|
+
background: var(--treb-formula-bar-locked-background, rgb(238, 244, 252));
|
|
382
|
+
position: relative;
|
|
383
|
+
|
|
384
|
+
&:after {
|
|
385
|
+
position: absolute;
|
|
386
|
+
right: 2px;
|
|
387
|
+
top: 2px;
|
|
388
|
+
content: '';
|
|
389
|
+
width: 12px;
|
|
390
|
+
height: 12px;
|
|
391
|
+
opacity: .4;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* NOTE: recent updates to webpack (v5ish) require a new option
|
|
395
|
+
* to css-loader, otherwise it rewrites this with a URL API function
|
|
396
|
+
* which breaks IE11.
|
|
397
|
+
*
|
|
398
|
+
* (removed nasty comment about webpack)
|
|
399
|
+
*
|
|
400
|
+
* FIXME: this makes theming the lock icon impossible. use a node.
|
|
401
|
+
*/
|
|
402
|
+
// background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M416 224H400V144C400 65 335 0 256 0S112 65 112 144V224H96C61 224 32 253 32 288V448C32 483 61 512 96 512H416C451 512 480 483 480 448V288C480 253 451 224 416 224ZM176 144C176 100 212 64 256 64S336 100 336 144V224H176V144Z' fill='currentColor'/%3E%3C/svg%3E");
|
|
403
|
+
|
|
404
|
+
--icon: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M416 224H400V144C400 65 335 0 256 0S112 65 112 144V224H96C61 224 32 253 32 288V448C32 483 61 512 96 512H416C451 512 480 483 480 448V288C480 253 451 224 416 224ZM176 144C176 100 212 64 256 64S336 100 336 144V224H176V144Z' fill='currentColor'/%3E%3C/svg%3E");
|
|
405
|
+
|
|
406
|
+
background: var(--treb-formula-bar-lock-icon-color, currentColor);
|
|
407
|
+
mask-position: center;
|
|
408
|
+
-webkit-mask-position: center;
|
|
409
|
+
mask-repeat: no-repeat;
|
|
410
|
+
-webkit-mask-repeat: no-repeat;
|
|
411
|
+
mask-image: var(--icon);
|
|
412
|
+
-webkit-mask-image: var(--icon);
|
|
413
|
+
mask-size: 12px 12px;
|
|
414
|
+
-webkit-mask-size: 12px 12px;
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* special override for windows, using calibri (which is too small).
|
|
430
|
+
* you should still be able to override with a regular theme style,
|
|
431
|
+
* or (potentially) also override for windows specifically. fancy!
|
|
432
|
+
*/
|
|
433
|
+
.treb-ua-windows .grid-cells {
|
|
434
|
+
font-size: var(--treb-grid-font-size-windows, var(--treb-grid-font-size, 12pt));
|
|
435
|
+
font-family: var(--treb-grid-font-family-windows, var(--treb-grid-font-family, "Calibri", $font-stack)); // does this actually work? is this included? (...)
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.treb-ua-osx .grid-cells {
|
|
439
|
+
font-size: var(--treb-grid-font-size-osx, var(--treb-grid-font-size, 10pt)); // slightly smaller default
|
|
440
|
+
font-family: var(--treb-grid-font-family-osx, var(--treb-grid-font-family, inherit));
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
}
|
|
444
|
+
|