@quario/csv 0.5.0 → 0.7.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/CHANGELOG.md +14 -0
- package/README.md +10 -6
- package/lib/index.js +4 -7
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.0] - 2026-09-07
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Styled runs flatten to their joined text.** A cell value written as a list of
|
|
15
|
+
styled runs writes the runs' text as one field. This target withdraws every
|
|
16
|
+
style, and a run's is no different.
|
|
17
|
+
|
|
18
|
+
## [0.6.0] - 2026-09-07
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Requires quario ^0.6.0
|
|
23
|
+
|
|
10
24
|
## [0.5.0] - 2026-09-05
|
|
11
25
|
|
|
12
26
|
### Added
|
package/README.md
CHANGED
|
@@ -82,12 +82,13 @@ blocks the host. Render-time failures reject with located errors.
|
|
|
82
82
|
|
|
83
83
|
The banded walk flattened as records in render order: report-header items, then per group
|
|
84
84
|
instance its header items, nested content, and footer items, then the table's header record,
|
|
85
|
-
data records, and total
|
|
85
|
+
data records, and total records, then report-footer items. Grouping exists as that order
|
|
86
86
|
alone. Group boundaries add no records of their own, and `break: "page"` and `reset: "page"`
|
|
87
87
|
are ignored. This target is unpaginated: `report-start.page` band closures are ignored.
|
|
88
88
|
|
|
89
|
-
Each item takes one record with one field
|
|
90
|
-
|
|
89
|
+
Each item takes one record with one field; a split takes one record with a field per slot, and a
|
|
90
|
+
spanning cell writes empty fields for the columns it covers so positions hold. A report that is one
|
|
91
|
+
table and no other bands has its column headers as record 1; any other band makes the file ragged.
|
|
91
92
|
|
|
92
93
|
### Typed fields
|
|
93
94
|
|
|
@@ -103,10 +104,13 @@ does not mangle.
|
|
|
103
104
|
|
|
104
105
|
A hidden cell keeps its column slot as an empty field.
|
|
105
106
|
|
|
106
|
-
###
|
|
107
|
+
### Withdrawn, and the unread page bands
|
|
107
108
|
|
|
108
|
-
`style`, column `width`,
|
|
109
|
-
|
|
109
|
+
`style`, column `width`, slot `width`, page columns and images are withdrawn: a record carries no
|
|
110
|
+
presentation, no width and no page, so there is nothing here for any of them to resolve against. An
|
|
111
|
+
image emits no record, though an image in a slot still writes its empty field. Page bands are the
|
|
112
|
+
one unread declaration — this target never calls their closures, so an expression inside one is
|
|
113
|
+
never evaluated and never raises here.
|
|
110
114
|
|
|
111
115
|
### Text shape
|
|
112
116
|
|
package/lib/index.js
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* banded walk onto records in render order. A cell that is one bare
|
|
5
5
|
* interpolation keeps a typed string (a number stays decimal, a Date ISO 8601
|
|
6
6
|
* UTC); every other cell is display text, then the formula-injection guard,
|
|
7
|
-
* then RFC 4180 quoting.
|
|
7
|
+
* then RFC 4180 quoting. Styled runs flatten to their joined text -- the join
|
|
8
|
+
* is over the cell's one `tokens` array, so a run needs no branch here.
|
|
9
|
+
* Styles, widths, page bands, and images go unread.
|
|
8
10
|
* The unlicensed marking is a trailing line, so record 1 stays the report's.
|
|
9
11
|
*/
|
|
10
12
|
import { display, text, typed, walk } from "quario";
|
|
@@ -88,12 +90,7 @@ export function csv() {
|
|
|
88
90
|
split = null;
|
|
89
91
|
},
|
|
90
92
|
"table-start": (event) => {
|
|
91
|
-
out +=
|
|
92
|
-
spread(
|
|
93
|
-
event.columns
|
|
94
|
-
.filter((/** @type {any} */ column) => column.header)
|
|
95
|
-
.map((/** @type {any} */ column) => column.header),
|
|
96
|
-
).join(",") + "\n";
|
|
93
|
+
out += spread(event.header.cells).join(",") + "\n";
|
|
97
94
|
},
|
|
98
95
|
row: record,
|
|
99
96
|
"total-row": record,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quario/csv",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "The CSV render target for quario — in the makings, not yet released",
|
|
5
5
|
"homepage": "https://getquario.com",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@arethetypeswrong/cli": "^0.18.3",
|
|
40
40
|
"@size-limit/preset-small-lib": "^13.0.3",
|
|
41
|
-
"quario": "^0.
|
|
41
|
+
"quario": "^0.7.0",
|
|
42
42
|
"size-limit": "^13.0.3",
|
|
43
43
|
"typescript": "^7.0.2"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"quario": "^0.
|
|
46
|
+
"quario": "^0.7.0"
|
|
47
47
|
},
|
|
48
48
|
"size-limit": [
|
|
49
49
|
{
|