@trebco/treb 31.8.2 → 31.9.1

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/dist/treb.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /*! API v31.8. Copyright 2018-2024 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
1
+ /*! API v31.9. Copyright 2018-2024 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
2
2
 
3
3
  /**
4
4
  * add our tag to the map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trebco/treb",
3
- "version": "31.8.2",
3
+ "version": "31.9.1",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "homepage": "https://treb.app",
6
6
  "repository": {
@@ -16,7 +16,7 @@
16
16
  "@types/uzip": "^0.20201231.0",
17
17
  "base64-js": "^1.5.1",
18
18
  "cssnano": "^7.0.4",
19
- "esbuild": "^0.23.1",
19
+ "esbuild": "^0.24.0",
20
20
  "eslint": "^9.9.1",
21
21
  "fast-xml-parser": "^4.0.7",
22
22
  "html-minifier-terser": "^7.2.0",
@@ -19,6 +19,10 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use 'z-index.scss' as *;
23
+ @use 'defaults.scss' as *;
24
+
25
+
22
26
  /**
23
27
  * this is getting attached to the document (why? b/c fixed pos?)
24
28
  * so it inherits a lot. that's not good.
@@ -19,6 +19,9 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use 'z-index.scss' as *;
23
+ @use 'defaults.scss' as *;
24
+
22
25
  .treb-main.treb-main {
23
26
 
24
27
  .treb-dropdown-caret {
@@ -19,6 +19,8 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use './defaults.scss' as *;
23
+
22
24
  //
23
25
  // thanks to
24
26
  // https://modernfontstacks.com/
@@ -21,20 +21,20 @@
21
21
 
22
22
  // sass vars only
23
23
 
24
- @import 'z-index.scss';
25
- @import 'defaults.scss';
24
+ @use 'z-index.scss' as *;
25
+ @use 'defaults.scss' as *;
26
26
 
27
27
  // clean, no imports (but use sass vars)
28
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';
29
+ @use 'mouse-mask.scss';
30
+ @use 'note.scss';
31
+ @use 'table.scss';
32
+ @use 'tooltip.scss';
33
+ @use 'dropdown-select.scss';
34
+ @use 'autocomplete.scss';
35
+ @use 'formula-bar.scss';
36
+ @use 'tab-bar.scss';
37
+ @use 'overlay-editor.scss';
38
38
 
39
39
  .treb-main.treb-main {
40
40
 
@@ -1,13 +1,16 @@
1
1
 
2
- @import './grid.scss';
3
- @import './theme-defaults.scss';
4
- @import './dark-theme.scss';
5
- @import '../../treb-charts/style/charts.scss';
6
- @import './dialog.scss';
7
- @import './spinner.scss';
8
- @import './treb-icons.scss';
9
- @import './toolbar.scss';
10
- @import './font-stacks.scss';
2
+ @use './defaults.scss' as *;
3
+ @use './z-index.scss' as *;
4
+
5
+ @use './grid.scss';
6
+ @use './theme-defaults.scss';
7
+ @use './dark-theme.scss';
8
+ @use '../../treb-charts/style/charts.scss';
9
+ @use './dialog.scss';
10
+ @use './spinner.scss';
11
+ @use './treb-icons.scss';
12
+ @use './toolbar.scss';
13
+ @use './font-stacks.scss';
11
14
 
12
15
  /*
13
16
  * switching to a double-selector to increase specificity. the particular
@@ -19,6 +19,9 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use 'z-index.scss' as *;
23
+ @use 'defaults.scss' as *;
24
+
22
25
  .treb-main.treb-main {
23
26
 
24
27
  /**
@@ -19,6 +19,10 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use 'z-index.scss' as *;
23
+ @use 'defaults.scss' as *;
24
+
25
+
22
26
  .treb-main.treb-main {
23
27
 
24
28
  // are these exactly the same? clearly we copied-and-pasted
@@ -19,6 +19,9 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use 'z-index.scss' as *;
23
+ @use 'defaults.scss' as *;
24
+
22
25
  .treb-main.treb-main {
23
26
 
24
27
  .treb-grid {
@@ -19,6 +19,10 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use 'z-index.scss' as *;
23
+ @use 'defaults.scss' as *;
24
+
25
+
22
26
  .treb-main.treb-main {
23
27
 
24
28
  .treb-mouse-mask .ghost-tab {
@@ -19,6 +19,9 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use 'z-index.scss' as *;
23
+ @use 'defaults.scss' as *;
24
+
22
25
  .treb-main.treb-main {
23
26
 
24
27
  .treb-sort-button {
@@ -19,6 +19,8 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use './defaults.scss' as *;
23
+
22
24
  /**
23
25
  * we're using variables for selection colors because the colors are used
24
26
  * in more than one place; that's a drawback of using CSS, but I think overall
@@ -19,6 +19,10 @@
19
19
  *
20
20
  */
21
21
 
22
+ @use 'z-index.scss' as *;
23
+ @use 'defaults.scss' as *;
24
+
25
+
22
26
  .treb-main.treb-main {
23
27
 
24
28
  .treb-tooltip {
@@ -1,5 +1,5 @@
1
1
 
2
- @import 'layout.scss';
2
+ @use 'layout.scss';
3
3
 
4
4
  /**
5
5
  * default styles for custom element. we basically want
@@ -983,45 +983,6 @@ export class StyleCache {
983
983
  const new_fill: Fill = {...fill};
984
984
  this.fills.push(new_fill);
985
985
 
986
- /*
987
- // add the node structure
988
-
989
- if (!this.dom) throw new Error('missing dom');
990
- const fills = this.dom.find('./fills');
991
-
992
- if (!fills) throw new Error('fills not found');
993
- fills.attrib.count = (Number(fills.attrib.count || 0) + 1).toString();
994
-
995
- const new_element = Element('fill');
996
- const pattern_fill = Element('patternFill', { patternType: fill.pattern_type });
997
-
998
- switch (fill.pattern_type) {
999
- case 'none':
1000
- break;
1001
- case 'solid':
1002
- if (fill.fg_color) {
1003
- const attrs: Record<string, string> = {};
1004
-
1005
- if (fill.fg_color.argb) { attrs.rgb = fill.fg_color.argb; }
1006
- if (fill.fg_color.indexed) { attrs.indexed = fill.fg_color.indexed.toString(); }
1007
- if (fill.fg_color.tint) { attrs.tint = fill.fg_color.tint.toString(); }
1008
- if (typeof fill.fg_color.theme !== 'undefined') { attrs.theme = fill.fg_color.theme.toString(); }
1009
-
1010
- pattern_fill.append(Element('fgColor', attrs));
1011
- }
1012
- break;
1013
- case 'gray':
1014
-
1015
- // ...
1016
-
1017
- break;
1018
- }
1019
-
1020
- new_element.append(pattern_fill);
1021
-
1022
- fills.append(new_element);
1023
- */
1024
-
1025
986
  return this.fills.length - 1;
1026
987
  }
1027
988
 
@@ -78,7 +78,7 @@ export class SVGSelectionBlock {
78
78
  // and use currentColor, but we can't set opacity separately so we
79
79
  // need another node. which is a waste, but ergonomics ftw!
80
80
 
81
- this.fill = DOM.SVG('rect', 'fill');
81
+ this.fill = DOM.SVG('rect', 'treb-selection-fill');
82
82
 
83
83
  // this.SetThemeColor(0);
84
84
  // if (theme.additional_selection_line_dash_array) {
@@ -95,42 +95,6 @@ export class SVGSelectionBlock {
95
95
  this.g.setAttribute('transform', `translate(${offset.x}, ${offset.y})`);
96
96
  }
97
97
 
98
- /*
99
- public SetThemeColor(index = 0) {
100
-
101
- if (Array.isArray(this.theme.additional_selection_color)) {
102
- if (index >= this.theme.additional_selection_color.length) {
103
- index = index % this.theme.additional_selection_color.length;
104
- }
105
- }
106
-
107
- if (this.theme.additional_selection_overlay_color) {
108
- if (typeof this.theme.additional_selection_overlay_color === 'string') {
109
- this.outline.setAttribute('fill', this.theme.additional_selection_overlay_color);
110
- }
111
- else {
112
- this.outline.setAttribute('fill', this.theme.additional_selection_overlay_color[index] || '');
113
- }
114
- }
115
- else {
116
- this.outline.setAttribute('fill', '');
117
- }
118
-
119
- if (this.theme.additional_selection_color) {
120
- if (typeof this.theme.additional_selection_color === 'string') {
121
- this.outline.setAttribute('stroke', this.theme.additional_selection_color);
122
- }
123
- else {
124
- this.outline.setAttribute('stroke', this.theme.additional_selection_color[index] || '');
125
- }
126
- }
127
- else {
128
- this.outline.setAttribute('stroke', '');
129
- }
130
-
131
- }
132
- */
133
-
134
98
  public Show(show = true) {
135
99
  this.g.style.display = show ? 'block' : 'none';
136
100
  }