@trebco/treb 23.6.2 → 25.0.0-rc1
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} +293 -299
- package/esbuild-custom-element.mjs +336 -0
- package/esbuild.js +305 -0
- package/package.json +43 -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 +1227 -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 +5362 -0
- package/treb-embed/src/index.ts +16 -0
- package/treb-embed/src/language-model.ts +41 -0
- package/treb-embed/src/options.ts +320 -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,101 @@
|
|
|
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
|
+
.treb-layout {
|
|
23
|
+
|
|
24
|
+
.treb-dropdown-caret {
|
|
25
|
+
|
|
26
|
+
display: none;
|
|
27
|
+
position: absolute;
|
|
28
|
+
width: 20px;
|
|
29
|
+
height: 20px;
|
|
30
|
+
|
|
31
|
+
background: var(--treb-dropdown-caret-background, #fff);
|
|
32
|
+
border: 1px solid var(--treb-dropdown-caret-border-color, #ccc);
|
|
33
|
+
border-radius: 2px;
|
|
34
|
+
|
|
35
|
+
box-shadow: $default-box-shadow;
|
|
36
|
+
z-index: $z-index-dropdown-caret;
|
|
37
|
+
|
|
38
|
+
& path {
|
|
39
|
+
fill: none;
|
|
40
|
+
stroke: var(--treb-dropdown-caret-color, #444);
|
|
41
|
+
stroke-linecap: round;
|
|
42
|
+
stroke-linejoin: round;
|
|
43
|
+
stroke-width: 2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.treb-dropdown-list {
|
|
49
|
+
|
|
50
|
+
position: absolute;
|
|
51
|
+
display: none;
|
|
52
|
+
box-shadow: $default-box-shadow;
|
|
53
|
+
z-index: $z-index-dropdown-caret;
|
|
54
|
+
background: var(--treb-dropdown-background, #fff);
|
|
55
|
+
font-size: 10pt;
|
|
56
|
+
color: var(--treb-dropdown-color, inherit);
|
|
57
|
+
border: 1px solid var(--treb-dropdown-border-color, unset);
|
|
58
|
+
|
|
59
|
+
& div {
|
|
60
|
+
padding: 2px;
|
|
61
|
+
cursor: default;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
& div.selected {
|
|
65
|
+
background: var(--treb-dropdown-selected-background, #555);
|
|
66
|
+
color: var(--treb-dropdown-selected-color, #fff);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
text-align: left;
|
|
70
|
+
|
|
71
|
+
max-height: 10em;
|
|
72
|
+
overflow-y: auto;
|
|
73
|
+
outline: none;
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.treb-dropdown-caret.active {
|
|
78
|
+
background: var(--treb-dropdown-caret-active-background, #eee);
|
|
79
|
+
|
|
80
|
+
& + .treb-dropdown-list {
|
|
81
|
+
display: block;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* FIXME: this should move, it's used in dropdowns but it
|
|
88
|
+
* is more general (should be used for all errors)
|
|
89
|
+
*/
|
|
90
|
+
.treb-error-highlight {
|
|
91
|
+
transition: opacity 0.15s ease-in-out;
|
|
92
|
+
background: rgba(255, 0, 0, .25);
|
|
93
|
+
opacity: 0;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
position: absolute;
|
|
96
|
+
z-index: $z-index-error-highlight;
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
.treb-layout {
|
|
23
|
+
|
|
24
|
+
.treb-formula-bar {
|
|
25
|
+
|
|
26
|
+
grid-area: 1/1/2/2;
|
|
27
|
+
|
|
28
|
+
// min-height: 3em; // FIXME
|
|
29
|
+
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
text-align: left;
|
|
33
|
+
|
|
34
|
+
&[hidden] {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
padding: 0px 2px 12px 2px; // FIXME: use ems?
|
|
39
|
+
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
overflow-x: hidden;
|
|
42
|
+
/* last ditch for IE11 */
|
|
43
|
+
|
|
44
|
+
/** label for selection address */
|
|
45
|
+
.treb-address-label {
|
|
46
|
+
|
|
47
|
+
width: 95px;
|
|
48
|
+
min-width: 95px;
|
|
49
|
+
|
|
50
|
+
min-height: 1.5em;
|
|
51
|
+
height: 1.75em;
|
|
52
|
+
border: 1px solid var(--treb-formula-bar-border-color, var(--treb-ui-border-color, #ccc));
|
|
53
|
+
border-radius: 2px;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
padding-left: 3px;
|
|
58
|
+
|
|
59
|
+
margin-right: 6px;
|
|
60
|
+
|
|
61
|
+
&>div {
|
|
62
|
+
outline: none;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
text-overflow: ellipsis;
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.expand-button {
|
|
70
|
+
background: transparent;
|
|
71
|
+
border: 0;
|
|
72
|
+
border-radius: 2px;
|
|
73
|
+
margin-left: 2px;
|
|
74
|
+
padding: 1px;
|
|
75
|
+
outline: none;
|
|
76
|
+
height: 1.75em;
|
|
77
|
+
|
|
78
|
+
&::after {
|
|
79
|
+
content: ' ';
|
|
80
|
+
border: 5px solid transparent;
|
|
81
|
+
position: relative;
|
|
82
|
+
display: inline-block;
|
|
83
|
+
border-top-color: #999;
|
|
84
|
+
padding: 0;
|
|
85
|
+
margin: 0;
|
|
86
|
+
top: -6px;
|
|
87
|
+
transition: transform .15s ease;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&[expanded] {
|
|
92
|
+
.expand-button::after {
|
|
93
|
+
transform: rotate(180deg) translateY(6px);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.treb-editor-container {
|
|
98
|
+
border: 1px solid var(--treb-formula-bar-border-color, var(--treb-ui-border-color, #ccc));
|
|
99
|
+
|
|
100
|
+
border-radius: 2px;
|
|
101
|
+
flex-grow: 1;
|
|
102
|
+
|
|
103
|
+
height: 1.75em;
|
|
104
|
+
|
|
105
|
+
display: flex;
|
|
106
|
+
min-width: 0px;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&[expanded] {
|
|
113
|
+
.treb-editor-container {
|
|
114
|
+
transition: height .1s ease-in-out;
|
|
115
|
+
height: 4.5em;
|
|
116
|
+
|
|
117
|
+
&>div {
|
|
118
|
+
overflow-y: auto;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.treb-editor-container>div {
|
|
124
|
+
width: 100%;
|
|
125
|
+
margin: 2px;
|
|
126
|
+
outline: none;
|
|
127
|
+
overflow-y: hidden;
|
|
128
|
+
overflow-x: hidden;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 1.35 is better on safari, seems like a wash on windows.
|
|
132
|
+
* can we browser-limit this? (...)
|
|
133
|
+
*/
|
|
134
|
+
line-height: 1.35;
|
|
135
|
+
/* normal; */
|
|
136
|
+
|
|
137
|
+
flex-grow: 1;
|
|
138
|
+
/* keeps content at the top */
|
|
139
|
+
min-height: 1em;
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
/* I don't like this, let's figure out a better way w/ wrapping */
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* FIXME: we're using this for a single-line formula, but
|
|
147
|
+
* it needs to come out for multiline (if we do that).
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
/*
|
|
151
|
+
white-space: nowrap;
|
|
152
|
+
text-overflow: ellipsis;
|
|
153
|
+
|
|
154
|
+
&:focus {
|
|
155
|
+
text-overflow: clip;
|
|
156
|
+
}
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** f(x) button, optional */
|
|
162
|
+
.formula-button {
|
|
163
|
+
border: 1px solid #ccc;
|
|
164
|
+
border-radius: 2px;
|
|
165
|
+
margin-left: 6px;
|
|
166
|
+
height: 1.75em;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
white-space: nowrap;
|
|
169
|
+
|
|
170
|
+
.text-1 {
|
|
171
|
+
font-style: italic;
|
|
172
|
+
|
|
173
|
+
&:after {
|
|
174
|
+
content: 'f';
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
padding-right: .1em;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.text-2 {
|
|
181
|
+
font-size: .7em;
|
|
182
|
+
|
|
183
|
+
&:after {
|
|
184
|
+
content: '(x)';
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
}
|
|
@@ -0,0 +1,374 @@
|
|
|
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
|
+
// sass vars only
|
|
23
|
+
|
|
24
|
+
@import 'z-index.scss';
|
|
25
|
+
@import 'defaults.scss';
|
|
26
|
+
|
|
27
|
+
// clean, no imports (but use sass vars)
|
|
28
|
+
|
|
29
|
+
@import 'mouse-mask.scss';
|
|
30
|
+
@import 'note.scss';
|
|
31
|
+
@import 'table.scss';
|
|
32
|
+
@import 'tooltip.scss';
|
|
33
|
+
@import 'dropdown-select.scss';
|
|
34
|
+
@import 'autocomplete.scss';
|
|
35
|
+
@import 'formula-bar.scss';
|
|
36
|
+
@import 'tab-bar.scss';
|
|
37
|
+
@import 'overlay-editor.scss';
|
|
38
|
+
|
|
39
|
+
.treb-layout {
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
/*
|
|
43
|
+
* new: we need the rendering buffer to inherit font size. so
|
|
44
|
+
* we add it as a child of contents, but it's not displayed.
|
|
45
|
+
* still seems to paint OK.
|
|
46
|
+
*/
|
|
47
|
+
.treb-buffer-canvas {
|
|
48
|
+
position: absolute;
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.treb-spreadsheet-body {
|
|
53
|
+
grid-area: 2/1/3/2;
|
|
54
|
+
-webkit-overflow-scrolling: touch;
|
|
55
|
+
-webkit-tap-highlight-color: transparent;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
display: flex;
|
|
58
|
+
position: relative;
|
|
59
|
+
z-index: 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.treb-grid {
|
|
63
|
+
|
|
64
|
+
flex-grow: 1;
|
|
65
|
+
order: 2;
|
|
66
|
+
position: relative;
|
|
67
|
+
overflow: scroll;
|
|
68
|
+
-webkit-overflow-scrolling: touch;
|
|
69
|
+
-webkit-tap-highlight-color: transparent;
|
|
70
|
+
outline: none;
|
|
71
|
+
|
|
72
|
+
// --- merging from old (split) layout ---
|
|
73
|
+
|
|
74
|
+
display: grid;
|
|
75
|
+
grid-template-columns: 100px auto;
|
|
76
|
+
grid-template-rows: 20px auto;
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
.tile-cover {
|
|
80
|
+
|
|
81
|
+
/** specific layout for main grid cover */
|
|
82
|
+
&.grid-cover {
|
|
83
|
+
grid-area: 2/2/3/3;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** specific layout for column header cover */
|
|
87
|
+
&.column-header-cover {
|
|
88
|
+
grid-area: 1/2/2/3;
|
|
89
|
+
position: -webkit-sticky;
|
|
90
|
+
position: sticky;
|
|
91
|
+
top: 0px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** specific layout for row header cover */
|
|
95
|
+
&.row-header-cover {
|
|
96
|
+
grid-area: 2/1/3/2;
|
|
97
|
+
position: -webkit-sticky;
|
|
98
|
+
position: sticky;
|
|
99
|
+
left: 0px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** selection stacks over the grid but under the cover */
|
|
104
|
+
.treb-grid-selection {
|
|
105
|
+
grid-area: 1/1/2/2;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** corner node to cover headers as they scroll across/down */
|
|
109
|
+
.treb-corner {
|
|
110
|
+
grid-area: 1/1/2/2;
|
|
111
|
+
position: -webkit-sticky;
|
|
112
|
+
position: sticky;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** contains row header tiles */
|
|
116
|
+
.treb-left-header {
|
|
117
|
+
grid-area: 2/1/3/2;
|
|
118
|
+
position: -webkit-sticky;
|
|
119
|
+
position: sticky;
|
|
120
|
+
display: grid;
|
|
121
|
+
grid-template-columns: auto;
|
|
122
|
+
grid-template-rows: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** contains column header tiles */
|
|
126
|
+
.treb-top-header {
|
|
127
|
+
grid-area: 1/2/2/3;
|
|
128
|
+
position: -webkit-sticky;
|
|
129
|
+
position: sticky;
|
|
130
|
+
display: grid;
|
|
131
|
+
grid-template-columns: auto;
|
|
132
|
+
grid-template-rows: auto;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** contains main grid tiles */
|
|
136
|
+
.treb-contents {
|
|
137
|
+
grid-area: 2/2/3/3;
|
|
138
|
+
display: grid;
|
|
139
|
+
grid-template-columns: auto;
|
|
140
|
+
grid-template-rows: auto;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
// ---
|
|
145
|
+
|
|
146
|
+
&.safari {
|
|
147
|
+
|
|
148
|
+
// WTF is this stuff?
|
|
149
|
+
|
|
150
|
+
&::-webkit-scrollbar {
|
|
151
|
+
-webkit-appearance: none;
|
|
152
|
+
width: 7px;
|
|
153
|
+
height: 7px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&::-webkit-scrollbar-thumb {
|
|
157
|
+
border-radius: 4px;
|
|
158
|
+
background-color: rgba(0, 0, 0, .25);
|
|
159
|
+
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
canvas {
|
|
165
|
+
border: 0;
|
|
166
|
+
margin: 0;
|
|
167
|
+
padding: 0;
|
|
168
|
+
background: transparent;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.nub-select {
|
|
172
|
+
cursor: crosshair;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.link-pointer {
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.mock-selection-node {
|
|
180
|
+
background: red;
|
|
181
|
+
position: fixed;
|
|
182
|
+
left: -100px;
|
|
183
|
+
top: -100px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/** covers for canvas nodes to intercept events */
|
|
187
|
+
.tile-cover {
|
|
188
|
+
background: transparent;
|
|
189
|
+
position: relative;
|
|
190
|
+
z-index: $z-index-tile-cover;
|
|
191
|
+
|
|
192
|
+
/** specific layout for column header cover */
|
|
193
|
+
&.column-header-cover {
|
|
194
|
+
|
|
195
|
+
/** style is attached when mousing over a column boundary */
|
|
196
|
+
&.resize {
|
|
197
|
+
cursor: col-resize;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
z-index: $z-index-header-tile-cover;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** specific layout for row header cover */
|
|
204
|
+
&.row-header-cover {
|
|
205
|
+
|
|
206
|
+
/** style is attached when mousing over a row boundary */
|
|
207
|
+
&.resize {
|
|
208
|
+
cursor: row-resize;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
z-index: $z-index-header-tile-cover;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.treb-annotation-container,
|
|
217
|
+
.frozen-annotation-container {
|
|
218
|
+
position: absolute;
|
|
219
|
+
top: 0px;
|
|
220
|
+
left: 0px;
|
|
221
|
+
|
|
222
|
+
.annotation {
|
|
223
|
+
position: absolute;
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
pointer-events: auto;
|
|
226
|
+
background: rgba(255, 255, 255, .5);
|
|
227
|
+
border: 1px solid #999;
|
|
228
|
+
z-index: 1;
|
|
229
|
+
|
|
230
|
+
.annotation-content {
|
|
231
|
+
position: absolute;
|
|
232
|
+
top: 0px;
|
|
233
|
+
left: 0px;
|
|
234
|
+
height: 100%;
|
|
235
|
+
width: 100%;
|
|
236
|
+
font-family: inherit;
|
|
237
|
+
font-size: inherit;
|
|
238
|
+
z-index: 1;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.annotation-move-target {
|
|
242
|
+
position: absolute;
|
|
243
|
+
z-index: 2;
|
|
244
|
+
cursor: move;
|
|
245
|
+
top: 0px;
|
|
246
|
+
left: 0px;
|
|
247
|
+
height: 10%;
|
|
248
|
+
min-height: 14px;
|
|
249
|
+
width: 100%;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.annotation-resize-target {
|
|
253
|
+
position: absolute;
|
|
254
|
+
z-index: 3;
|
|
255
|
+
cursor: nwse-resize;
|
|
256
|
+
bottom: 0px;
|
|
257
|
+
right: 0px;
|
|
258
|
+
width: 10%;
|
|
259
|
+
height: 10%;
|
|
260
|
+
min-height: 14px;
|
|
261
|
+
min-width: 14px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&:focus,
|
|
265
|
+
&.retain-focus,
|
|
266
|
+
&.clone-focus {
|
|
267
|
+
// outline: 2px solid lightblue;
|
|
268
|
+
// box-shadow: 0 0 0 3px #0ea5e954;
|
|
269
|
+
box-shadow: 0px 0px 0px 3px rgba(14, 165, 233, 0.33); // IE can't handle RGBA hex
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** what is this? */
|
|
275
|
+
.move-buffer {
|
|
276
|
+
position: absolute;
|
|
277
|
+
border: 1px solid red;
|
|
278
|
+
height: 10%;
|
|
279
|
+
top: 0px;
|
|
280
|
+
width: 100%;
|
|
281
|
+
left: 0px;
|
|
282
|
+
cursor: move;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
z-index: $z-index-annotations;
|
|
286
|
+
pointer-events: none;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/** selection stacks over the grid but under the cover */
|
|
290
|
+
.treb-grid-selection {
|
|
291
|
+
background: transparent;
|
|
292
|
+
position: absolute;
|
|
293
|
+
z-index: $z-index-grid-selection;
|
|
294
|
+
-moz-transform: scale(1); // firefox anti-blur
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/** separate selection node for frozen rows/columns (needs different stacking) */
|
|
298
|
+
.frozen-selection {
|
|
299
|
+
|
|
300
|
+
/* background: transparent; */
|
|
301
|
+
transition: background .33s;
|
|
302
|
+
|
|
303
|
+
position: absolute;
|
|
304
|
+
z-index: $z-index-frozen-selection;
|
|
305
|
+
overflow: hidden; // needed for IE11 (put in legacy?)
|
|
306
|
+
-moz-transform: scale(1); // firefox anti-blur
|
|
307
|
+
pointer-events: none;
|
|
308
|
+
|
|
309
|
+
&.frozen-selection-rows {
|
|
310
|
+
border-bottom: 1px solid transparent;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&.frozen-selection-columns {
|
|
314
|
+
border-right: 1px solid transparent;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/** separate annotation node for frozen row/column/corner */
|
|
320
|
+
.frozen-annotation-container {
|
|
321
|
+
|
|
322
|
+
position: absolute;
|
|
323
|
+
top: 0px;
|
|
324
|
+
left: 0px;
|
|
325
|
+
overflow: hidden;
|
|
326
|
+
width: 100%;
|
|
327
|
+
height: 100%;
|
|
328
|
+
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* corner node to cover headers as they scroll across/down. this is now
|
|
333
|
+
* used for freeze panes; row/column headers are rendered in the corner
|
|
334
|
+
* and in the case of both frozen rows and columns, the fixed bit is
|
|
335
|
+
* rendered to the corner.
|
|
336
|
+
*/
|
|
337
|
+
.treb-corner {
|
|
338
|
+
|
|
339
|
+
top: 0px;
|
|
340
|
+
left: 0px;
|
|
341
|
+
z-index: $z-index-corner;
|
|
342
|
+
|
|
343
|
+
canvas {
|
|
344
|
+
position: absolute;
|
|
345
|
+
top: 0px;
|
|
346
|
+
left: 0px;
|
|
347
|
+
pointer-events: none;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** contains row header tiles */
|
|
353
|
+
.treb-left-header {
|
|
354
|
+
left: 0px;
|
|
355
|
+
z-index: $z-index-headers;
|
|
356
|
+
pointer-events: none;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/** contains column header tiles */
|
|
360
|
+
.treb-top-header {
|
|
361
|
+
top: 0px;
|
|
362
|
+
z-index: $z-index-headers;
|
|
363
|
+
pointer-events: none;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/** contains main grid tiles */
|
|
367
|
+
.treb-contents {
|
|
368
|
+
height: 2000px;
|
|
369
|
+
width: 2000px;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
}
|