@jsfkit/types 1.2.0 → 1.3.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +39 -20
  2. package/package.json +6 -6
package/dist/index.d.ts CHANGED
@@ -26,6 +26,42 @@ type Comment = {
26
26
  t: string;
27
27
  };
28
28
 
29
+ /**
30
+ * A cell coordinate in an uppercase A1-style reference format (e.g. `AG14`).
31
+ *
32
+ * The lower top-left bounds of the reference are A1-inclusive, and the upper bottom-right bound are
33
+ * `XFD1048576` inclusive.
34
+ *
35
+ * @pattern ^[A-Z]{1,3}[0-9]{1,7}$
36
+ */
37
+ type CellId = string;
38
+
39
+ /**
40
+ * A cell coordinate range in an uppercase A1-style reference format (e.g. `H6:J36`).
41
+ *
42
+ * The range consists of two {@link CellId | CellIds} separated by a colon (`:`) character.
43
+ *
44
+ * @pattern ^([A-Z]{1,3}[0-9]{1,7}):([A-Z]{1,3}[0-9]{1,7})$
45
+ */
46
+ type CellRange = string;
47
+
48
+ /**
49
+ * Data table configuration, present on the master cell of a data table range.
50
+ * Represents an Excel What-If Analysis data table.
51
+ */
52
+ type DataTable = {
53
+ /** Range of cells the data table manages (e.g., "D3:D5") */
54
+ ref: CellRange;
55
+ /** Primary input cell reference to substitute */
56
+ r1: CellId;
57
+ /** Secondary input cell reference, for 2D data tables */
58
+ r2?: CellId;
59
+ /** Whether one-dimensional data table is a row (true) or a column (false/absent) */
60
+ dtr?: boolean;
61
+ /** Whether this is a two-dimensional data table */
62
+ dt2D?: boolean;
63
+ };
64
+
29
65
  /**
30
66
  * A whole number without a fractional value.
31
67
  */
@@ -75,27 +111,10 @@ type Cell = {
75
111
  * property).
76
112
  */
77
113
  t?: CellValueType;
114
+ /** Data table configuration. Present on the master cell of a data table range. */
115
+ dt?: DataTable;
78
116
  };
79
117
 
80
- /**
81
- * A cell coordinate in an uppercase A1-style reference format (e.g. `AG14`).
82
- *
83
- * The lower top-left bounds of the reference are A1-inclusive, and the upper bottom-right bound are
84
- * `XFD1048576` inclusive.
85
- *
86
- * @pattern ^[A-Z]{1,3}[0-9]{1,3}$
87
- */
88
- type CellId = string;
89
-
90
- /**
91
- * A cell coordinate range in an uppercase A1-style reference format (e.g. `H6:J36`).
92
- *
93
- * The range consists of two {@link CellId | CellIds} separated by a colon (`:`) character.
94
- *
95
- * @pattern ^([A-Z]{1,3}[0-9]{1,3}):([A-Z]{1,3}[0-9]{1,3})$
96
- */
97
- type CellRange = string;
98
-
99
118
  /**
100
119
  * A defined name (also called "named range") is a labelled reference to a cell, range, constant or
101
120
  * formula. Meaningful labels can make formula expressions more readable and more robust to
@@ -881,4 +900,4 @@ type Workbook = {
881
900
  people?: Person[];
882
901
  };
883
902
 
884
- export type { BorderStyle, CalcProps, Cell, CellId, CellRange, CellValueType, Color, Comment, DefinedName, External, ExternalWorksheet, GridSize, HAlign, HyperlinkTextRun, MentionTextRun, Note, PatternStyle, Person, PixelValue, Style, Table, TableColumn, TableColumnDataType, TableStyle, TableStyleName, TextRun, ThreadedComment, Underline, VAlign, Workbook, WorkbookView, Worksheet, WorksheetDefaults, WorksheetLayoutScales, WorksheetView };
903
+ export type { BorderStyle, CalcProps, Cell, CellId, CellRange, CellValueType, Color, Comment, DataTable, DefinedName, External, ExternalWorksheet, GridSize, HAlign, HyperlinkTextRun, MentionTextRun, Note, PatternStyle, Person, PixelValue, Style, Table, TableColumn, TableColumnDataType, TableStyle, TableStyleName, TextRun, ThreadedComment, Underline, VAlign, Workbook, WorkbookView, Worksheet, WorksheetDefaults, WorksheetLayoutScales, WorksheetView };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsfkit/types",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "TypeScript types for JSF: a JSON spreadsheet representation",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,13 +41,13 @@
41
41
  "release": "PACKAGE_VERSION=$(jq -r .version package.json) && echo \"About to tag and push v$PACKAGE_VERSION. Continue? (y/n)\" && read -r REPLY && [ \"$REPLY\" = \"y\" ] && git tag --annotate v$PACKAGE_VERSION --message=v$PACKAGE_VERSION && git push origin v$PACKAGE_VERSION"
42
42
  },
43
43
  "devDependencies": {
44
- "@borgar/eslint-config": "^4.0.0",
44
+ "@borgar/eslint-config": "^4.0.1",
45
45
  "@eslint/js": "^9.38.0",
46
46
  "eslint": "^9.38.0",
47
- "globals": "^16.4.0",
48
- "tsup": "^8.5.0",
49
- "typedoc": "^0.28.14",
47
+ "globals": "^17.3.0",
48
+ "tsup": "^8.5.1",
49
+ "typedoc": "^0.28.17",
50
50
  "typescript": "^5.9.3",
51
- "typescript-eslint": "^8.46.1"
51
+ "typescript-eslint": "^8.56.0"
52
52
  }
53
53
  }