@trebco/treb 36.1.3 → 37.0.0

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 v36.1. Copyright 2018-2026 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
1
+ /*! API v37.0. Copyright 2018-2026 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
2
2
  /*
3
3
  * This file is part of TREB.
4
4
  *
@@ -67,7 +67,6 @@ for (let i = 0; i < process.argv.length; i++) {
67
67
  const build_options = {
68
68
  entryPoints: [
69
69
  { in: 'treb-embed/src/index.ts', out: options.output_filename },
70
- // { in: 'treb-embed/src/export-worker.ts', out: 'treb-export-worker' },
71
70
  { in: 'treb-export/src/index.worker.ts', out: 'treb-export-worker' },
72
71
  ],
73
72
  banner: {
@@ -82,6 +81,11 @@ const build_options = {
82
81
  metafile: true,
83
82
  format: 'esm',
84
83
  external: ['*.wasm', 'node:*'],
84
+ alias: {
85
+ "treb-embed/style/treb-spreadsheet-element.scss": "./treb-embed/style/treb-spreadsheet-element.scss",
86
+ "treb-embed/markup/layout.html": "./treb-embed/markup/layout.html",
87
+ "treb-embed/markup/toolbar.html": "./treb-embed/markup/toolbar.html"
88
+ },
85
89
  define: {
86
90
  'process.env.XLSX_SUPPORT': `${options.xlsx_support}`,
87
91
  'process.env.NODE_ENV': `"${options.version}"`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trebco/treb",
3
- "version": "36.1.3",
3
+ "version": "37.0.0",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "homepage": "https://treb.app",
6
6
  "repository": {
@@ -10,6 +10,70 @@
10
10
  "main": "dist/treb-spreadsheet.mjs",
11
11
  "types": "dist/treb.d.ts",
12
12
  "type": "module",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/treb.d.ts",
16
+ "import": "./dist/treb-spreadsheet.mjs",
17
+ "browser": "./dist/treb-spreadsheet.mjs"
18
+ },
19
+ "./treb-grid": {
20
+ "types": "./build/treb-grid/src/index.d.ts",
21
+ "import": "./build/treb-grid/src/index.js"
22
+ },
23
+ "./treb-grid/*": {
24
+ "types": "./build/treb-grid/*.d.ts",
25
+ "import": "./build/treb-grid/*.js"
26
+ },
27
+ "./treb-charts": {
28
+ "types": "./build/treb-charts/src/index.d.ts",
29
+ "import": "./build/treb-charts/src/index.js"
30
+ },
31
+ "./treb-charts/*": {
32
+ "types": "./build/treb-charts/*.d.ts",
33
+ "import": "./build/treb-charts/*.js"
34
+ },
35
+ "./treb-embed": {
36
+ "types": "./build/treb-embed/src/index.d.ts",
37
+ "import": "./build/treb-embed/src/index.js"
38
+ },
39
+ "./treb-embed/*": {
40
+ "types": "./build/treb-embed/*.d.ts",
41
+ "import": "./build/treb-embed/*.js"
42
+ },
43
+ "./treb-embed/*.html": {
44
+ "import": "./treb-embed/*.html"
45
+ },
46
+ "./treb-calculator": {
47
+ "types": "./build/treb-calculator/src/index.d.ts",
48
+ "import": "./build/treb-calculator/src/index.js"
49
+ },
50
+ "./treb-calculator/*": {
51
+ "types": "./build/treb-calculator/*.d.ts",
52
+ "import": "./build/treb-calculator/*.js"
53
+ },
54
+ "./treb-format": {
55
+ "types": "./build/treb-format/src/index.d.ts",
56
+ "import": "./build/treb-format/src/index.js"
57
+ },
58
+ "./treb-parser": {
59
+ "import": "./build/treb-parser/src/index.js",
60
+ "types": "./build/treb-parser/src/index.d.ts"
61
+ },
62
+ "./treb-utils": {
63
+ "import": "./build/treb-utils/src/index.js",
64
+ "types": "./build/treb-utils/src/index.d.ts"
65
+ },
66
+ "./treb-data-model": {
67
+ "import": "./build/treb-data-model/src/index.js",
68
+ "types": "./build/treb-data-model/src/index.d.ts"
69
+ },
70
+ "./treb-base-types": {
71
+ "import": "./build/treb-base-types/src/index.js",
72
+ "types": "./build/treb-base-types/src/index.d.ts"
73
+ },
74
+ "./esbuild-utils.mjs": "./esbuild-utils.mjs",
75
+ "./package.json": "./package.json"
76
+ },
13
77
  "devDependencies": {
14
78
  "@types/html-minifier": "^4.0.6",
15
79
  "@types/node": "^25.5.0",
@@ -42,7 +106,7 @@
42
106
  "scripts": {
43
107
  "build": "node esbuild-composite.mjs",
44
108
  "dev": "node esbuild-composite.mjs --dev",
45
- "clean": "rm -fr build dist declaration",
109
+ "clean": "rm -fr build dist",
46
110
  "watch": "node --watch esbuild-composite.mjs --watch --dev",
47
111
  "watch-production": "node --watch esbuild-composite.mjs --watch",
48
112
  "tsc": "tsc -b treb-embed/tsconfig.json",
@@ -50,6 +114,6 @@
50
114
  "watch-tsc": "tsc -b treb-embed/tsconfig.json -w",
51
115
  "watch-api": "tsx --watch api-generator/api-generator.ts --config api-config.json",
52
116
  "generate-api": "tsx api-generator/api-generator.ts --config api-config.json",
53
- "release": "npm run rebuild-tsc && npm run build && npm run generate-api"
117
+ "release": "npm run clean && npm run rebuild-tsc && npm run build && npm run generate-api"
54
118
  }
55
119
  }
@@ -23,9 +23,13 @@
23
23
  import { EmbeddedSpreadsheet } from '../embedded-spreadsheet';
24
24
  import type { EmbeddedSpreadsheetOptions } from '../options';
25
25
 
26
- import css from '../../style/treb-spreadsheet-element.scss';
27
- import html from '../../markup/layout.html';
28
- import toolbar_html from '../../markup/toolbar.html';
26
+ import css from 'treb-embed/style/treb-spreadsheet-element.scss';
27
+ import html from 'treb-embed/markup/layout.html';
28
+ import toolbar_html from 'treb-embed/markup/toolbar.html';
29
+
30
+ // import css from '../../style/treb-spreadsheet-element.scss';
31
+ // import html from '../../markup/layout.html';
32
+ // import toolbar_html from '../../markup/toolbar.html';
29
33
 
30
34
  import { NumberFormatCache } from 'treb-format';
31
35
  import { ColorFunctions, type Color, IsThemeColor } from 'treb-base-types';
@@ -111,7 +111,7 @@ import * as ImportExportMessages from 'treb-export/src/import-export-messages';
111
111
  /**
112
112
  * import type for our worker, plus markup files
113
113
  */
114
- import './content-types.d.ts';
114
+ // import './content-types.d.ts';
115
115
  import { CreateWorker, type WorkerProxy } from 'treb-base-types';
116
116
 
117
117
  // --- types -------------------------------------------------------------------
@@ -883,7 +883,7 @@ export class EmbeddedSpreadsheet<USER_DATA_TYPE = unknown> {
883
883
  // else? (A: it was)
884
884
 
885
885
  if (options.custom_grid) {
886
- this.grid = options.custom_grid(
886
+ this.grid = options.custom_grid.call(this,
887
887
  grid_options,
888
888
  this.model,
889
889
  undefined,
@@ -32,7 +32,7 @@ export type StatsFunction = (data: CellValue|CellValue[][]|undefined) => StatsEn
32
32
  * the embedded spreadsheet options? they are never (AFAICT) used
33
33
  * independently. maybe that's recent.
34
34
  */
35
- export interface GridOptions {
35
+ export type GridOptions = {
36
36
 
37
37
  /** can expand rows/columns */
38
38
  expand?: boolean;
package/tsproject.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "declaration": true,
4
- "declarationDir": "declaration",
5
4
  "target": "esnext",
6
5
  "module": "esnext",
6
+ "moduleResolution": "bundler",
7
7
  "strict": true,
8
8
  "composite": true,
9
9
  "outDir": "./build",
10
10
  "experimentalDecorators": true,
11
11
  "sourceMap": true,
12
12
  "resolveJsonModule": true,
13
- "moduleResolution": "bundler",
14
13
  "rootDir": ".",
15
14
  "importHelpers": true,
16
15
  "noEmitHelpers": true,