@casoon/opengrid 0.11.0 → 0.13.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 CHANGED
@@ -18,6 +18,107 @@ Two things belong in every release entry and are easy to leave out:
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [0.13.0] — 2026-10-10
22
+
23
+ **Screen-reader pairings tested: none yet** ([issue #5](https://github.com/casoon/opengrid/issues/5)).
24
+ **Browsers:** Chromium (the whole e2e suite: 1155 passed). Firefox and WebKit on Linux (`gh workflow run ci.yml -f browsers=true`): 1141 passed, 19 skipped by design — no failures; the two of [#157](https://github.com/casoon/opengrid/issues/157) are gone.
25
+
26
+ A tree that sums its subtrees and exports whole: a column's aggregate shows on every node with
27
+ children beside its own value, and `get_query()` on a tree asks for every node, flat, with its
28
+ level and path. Beside it, two Firefox fixes the new browser run found.
29
+
30
+ **Module sizes** (brotli, `just measure-modules`): the elements 244.1 → 249.7 KiB, the engine
31
+ 133.8 → 139.9 KiB, measured against v0.12.0 — both past their bounds, which this release raises
32
+ (`scripts/module-budget.txt`).
33
+
34
+ **What breaks:**
35
+ - Rust: `TreeSpec` has a new public field, `aggregate` (`aggregate: Vec::new()` in a struct
36
+ literal); `ValidatedTree` has `aggregate` and `aggregate_schema`; `TreeLevel` has
37
+ `aggregate_schema`, `aggregates` and `flat` and is no longer `Eq`;
38
+ `opengrid_columns::wire::TreeSection` has `aggregates` and `flat` and is no longer `Eq`;
39
+ `TreeSpec` and `ValidatedTree` also have `flat`.
40
+
41
+ ### Added
42
+
43
+ - **The whole tree, flat** ([#166](https://github.com/casoon/opengrid/issues/166), rule T8).
44
+ `tree.flat: true` answers every visible node of a tree depth-first, siblings in the query's
45
+ order, paged like any query; each row's level, its path of keys and — with a filter — whether
46
+ it matches come back as `tree.flat`, in JSON and in the binary form. A source field named
47
+ `level` or `path` (or `match`, with a filter) is refused. Four conformance cases (T8) pass on
48
+ every path.
49
+ - **A tree exports whole and flat** ([#166](https://github.com/casoon/opengrid/issues/166)).
50
+ `get_query()` on a grid with `tree` asks for every node of the reader's view, not only the
51
+ open ones; `exportRows` and the server's export write it with `level`, `path` and, with a
52
+ filter, `match` after the query's columns — the path joined (`1 / 2 / 4`) in CSV and XLSX,
53
+ an array in JSON. The server answers a tree's export the way it answers its query, tenant
54
+ rule included, and hands it out in pieces. A worker's answers — the binary form — export a
55
+ tree the same way.
56
+ - **Subtree aggregates, in the engine and on the server** ([#165](https://github.com/casoon/opengrid/issues/165), rule T7).
57
+ A tree query takes `tree.aggregate: [{ field?, fn, as }]` and answers, per node of the level,
58
+ the aggregate over the node and all its descendants — from the raw rows, the functions and
59
+ types of grouping (S12); with a filter over the subtree's matches only, context does not
60
+ count. The values come back beside the rows as `tree.aggregates`, in JSON and as one more
61
+ table in the binary form, which a reader from before them refuses. Every source answers it:
62
+ the engine in the tab and the worker, and the server over a file, the rows tier, SQLite and
63
+ PostgreSQL. Four conformance cases (T7) pass on every path.
64
+ - **Subtree summaries in the grid's tree** ([#165](https://github.com/casoon/opengrid/issues/165)).
65
+ A column's aggregate — from `set_columns`, the column menu or the view, as in groups — shows on
66
+ every node with children beside its own value, `120 · Σ 1,450`, and is said with the new text
67
+ `subtreeCell` ("120. Sum of the subtree: 1,450"); a node without a value of its own says only
68
+ the summary, with `subtreeOnly` ("Sum of the subtree: 1,450"). A leaf shows its own value; a
69
+ summary the column's type cannot take is said once, as in groups.
70
+ - **A guide to the tree** ([#167](https://github.com/casoon/opengrid/issues/167)): *A tree in the
71
+ grid* — from a parent field to the flat export.
72
+
73
+ ### Fixed
74
+
75
+ - **Firefox: no unnamed tab stop in the narrow toolbar** ([#157](https://github.com/casoon/opengrid/issues/157)).
76
+ The toolbar's row scrolls sideways on a narrow grid, and Firefox made the scroll container a
77
+ stop of its own before the first button. It is out of the tab order now; every button is still
78
+ reached by `Tab` and scrolls into view.
79
+
80
+ ## [0.12.0] — 2026-10-09
81
+
82
+ **Screen-reader pairings tested: none yet** ([issue #5](https://github.com/casoon/opengrid/issues/5)).
83
+ **Browsers:** Chromium (the whole e2e suite: 1138 passed; a GC test of the Angular example passed on
84
+ its retry). Firefox and WebKit on Linux (`gh workflow run ci.yml -f browsers=true`): 561 passed in
85
+ each; Firefox still has the two failures of [#157](https://github.com/casoon/opengrid/issues/157),
86
+ WebKit failed the new CSP test on a reading of the tbody's position WebKit computes as `static`
87
+ for any grid — the test, not the grid ([#162](https://github.com/casoon/opengrid/pull/162)).
88
+
89
+ Typing into a cell edits it, as in a spreadsheet, and `<opengrid-grid>` draws under a
90
+ `style-src` without `'unsafe-inline'`.
91
+
92
+ **What breaks:** nothing in the API. The grid's shadow root has no `<style>` element any more;
93
+ its look needs `adoptedStyleSheets` (see *Fixed*).
94
+
95
+ **Module sizes** (brotli, `just measure-modules`): the elements 243.5 → 244.1 KiB, inside their
96
+ bound; the engine is unchanged.
97
+
98
+ ### Added
99
+
100
+ - **Typing opens the editor.** On a data cell a typed character opens the editor with that
101
+ character in it — replacing the value in a text or number field, as in a spreadsheet — and in a
102
+ select it picks the one choice that is the character or starts with it; `Enter` still commits,
103
+ `Escape` still discards. `F2` opens the editor as `Enter` does. Both are the WAI-ARIA grid
104
+ pattern's; a marks sheet is filled by focusing a cell and typing the mark. `Space` keeps
105
+ selecting the row, a `Ctrl`/`Cmd` shortcut is not typing, and read-only columns, a grouped grid
106
+ and a tree open no editor this way either.
107
+
108
+ ### Fixed
109
+
110
+ - **`<opengrid-grid>` under a `style-src` without `'unsafe-inline'`.** A page whose policy allows
111
+ styles only from files and hashes — no `'unsafe-inline'`, no nonce — refused the `<style>`
112
+ element in the grid's shadow root and every `style` attribute it set: the grid drew without its
113
+ look, its column widths and its row positions, and the console filled with refusals. The look
114
+ is now a constructed stylesheet adopted into the shadow root (as table and pivot already did),
115
+ the column widths a second adopted sheet of each grid's own, and every inline style is written
116
+ through the CSSOM (`element.style`), which `style-src` does not govern. The shadow root has no
117
+ `<style>` element any more. Needs `adoptedStyleSheets` — every browser of the baseline (Chrome
118
+ and Edge 73+, Firefox 101+, Safari 16.4+); there is no fallback. Tested under
119
+ `script-src 'self' 'wasm-unsafe-eval'; style-src 'self'` with editing, choices, read-only
120
+ columns, widths and scrolling.
121
+
21
122
  ## [0.11.0] — 2026-10-08
22
123
 
23
124
  **Screen-reader pairings tested: none yet** ([issue #5](https://github.com/casoon/opengrid/issues/5)).
Binary file
package/loader.d.ts CHANGED
@@ -740,6 +740,8 @@ export type TextKey =
740
740
  | "pivotFilterLabel"
741
741
  | "pivotFilterHint"
742
742
  | "treeContext"
743
+ | "subtreeCell"
744
+ | "subtreeOnly"
743
745
  | "treeOrphans"
744
746
  | "treeLevelTooLarge"
745
747
  | "treeRefused"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casoon/opengrid",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "description": "Accessible data grid, table and pivot as web components, driven by a portable Rust/WASM query engine — with React, Vue and Svelte components.",
6
6
  "keywords": [
@@ -1,9 +1,9 @@
1
1
  /* @ts-self-types="./opengrid_web_components.d.ts" */
2
- import { __opengrid_intl_formatter } from './snippets/opengrid-web-components-04a0bde4d39568d3/inline0.js';
3
- import { __opengrid_define_element } from './snippets/opengrid-web-core-8c4306a3e0319748/inline1.js';
4
- import * as import1 from "./snippets/opengrid-web-core-8c4306a3e0319748/inline0.js"
5
- import * as import2 from "./snippets/opengrid-web-core-8c4306a3e0319748/inline0.js"
6
- import * as import3 from "./snippets/opengrid-web-core-8c4306a3e0319748/inline0.js"
2
+ import { __opengrid_intl_formatter } from './snippets/opengrid-web-components-ad6dc2c80732d2d3/inline0.js';
3
+ import { __opengrid_define_element } from './snippets/opengrid-web-core-19b41f3fd18cf51f/inline1.js';
4
+ import * as import1 from "./snippets/opengrid-web-core-19b41f3fd18cf51f/inline0.js"
5
+ import * as import2 from "./snippets/opengrid-web-core-19b41f3fd18cf51f/inline0.js"
6
+ import * as import3 from "./snippets/opengrid-web-core-19b41f3fd18cf51f/inline0.js"
7
7
 
8
8
 
9
9
  /**
@@ -317,10 +317,10 @@ function __wbg_get_imports() {
317
317
  const ret = Error(getStringFromWasm0(arg0, arg1));
318
318
  return ret;
319
319
  },
320
- __wbg___opengrid_define_element_1a8e6a7af087e9e4: function(arg0, arg1, arg2, arg3, arg4, arg5) {
320
+ __wbg___opengrid_define_element_dc83f3c3aea1a1c1: function(arg0, arg1, arg2, arg3, arg4, arg5) {
321
321
  __opengrid_define_element(getStringFromWasm0(arg0, arg1), arg2, arg3, arg4, arg5);
322
322
  },
323
- __wbg___opengrid_intl_formatter_8256df1502ec6039: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
323
+ __wbg___opengrid_intl_formatter_77f1e896c6fe6b8d: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
324
324
  const ret = __opengrid_intl_formatter(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), arg4);
325
325
  return ret;
326
326
  }, arguments); },
@@ -383,6 +383,10 @@ function __wbg_get_imports() {
383
383
  __wbg_addEventListener_d85450ee1320c989: function() { return handleError(function (arg0, arg1, arg2, arg3) {
384
384
  arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
385
385
  }, arguments); },
386
+ __wbg_adoptedStyleSheets_29ecb7d2ba97edad: function(arg0) {
387
+ const ret = arg0.adoptedStyleSheets;
388
+ return ret;
389
+ },
386
390
  __wbg_altKey_50f830d1793a2eea: function(arg0) {
387
391
  const ret = arg0.altKey;
388
392
  return ret;
@@ -552,6 +556,16 @@ function __wbg_get_imports() {
552
556
  const ret = result;
553
557
  return ret;
554
558
  },
559
+ __wbg_instanceof_CssStyleSheet_69eb2b4dfaec58a9: function(arg0) {
560
+ let result;
561
+ try {
562
+ result = arg0 instanceof CSSStyleSheet;
563
+ } catch (_) {
564
+ result = false;
565
+ }
566
+ const ret = result;
567
+ return ret;
568
+ },
555
569
  __wbg_instanceof_Element_beebfaab75d12d9d: function(arg0) {
556
570
  let result;
557
571
  try {
@@ -656,6 +670,10 @@ function __wbg_get_imports() {
656
670
  const ret = Array.isArray(arg0);
657
671
  return ret;
658
672
  },
673
+ __wbg_isComposing_919a0fdf6ac030c9: function(arg0) {
674
+ const ret = arg0.isComposing;
675
+ return ret;
676
+ },
659
677
  __wbg_isConnected_c24b5a7bb035eae0: function(arg0) {
660
678
  const ret = arg0.isConnected;
661
679
  return ret;
@@ -742,6 +760,10 @@ function __wbg_get_imports() {
742
760
  __wbg_observe_f27242eadc2ebd47: function(arg0, arg1) {
743
761
  arg0.observe(arg1);
744
762
  },
763
+ __wbg_of_5f1b88183ddb5d94: function(arg0, arg1) {
764
+ const ret = Array.of(arg0, arg1);
765
+ return ret;
766
+ },
745
767
  __wbg_of_85f52f8b6491a7ca: function(arg0) {
746
768
  const ret = Array.of(arg0);
747
769
  return ret;
@@ -863,6 +885,9 @@ function __wbg_get_imports() {
863
885
  __wbg_set_composed_4b360b2fea1c1905: function(arg0, arg1) {
864
886
  arg0.composed = arg1 !== 0;
865
887
  },
888
+ __wbg_set_cssText_1d203a1b8ff80e20: function(arg0, arg1, arg2) {
889
+ arg0.cssText = getStringFromWasm0(arg1, arg2);
890
+ },
866
891
  __wbg_set_detail_564ad103413aa5dc: function(arg0, arg1) {
867
892
  arg0.detail = arg1;
868
893
  },
@@ -993,7 +1018,7 @@ function __wbg_get_imports() {
993
1018
  return ret;
994
1019
  },
995
1020
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
996
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 209, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1021
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 215, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
997
1022
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6af9200f0870d488___convert__closures_____invoke___wasm_bindgen_6af9200f0870d488___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_6af9200f0870d488___JsError___true_);
998
1023
  return ret;
999
1024
  },
@@ -1023,7 +1048,7 @@ function __wbg_get_imports() {
1023
1048
  return ret;
1024
1049
  },
1025
1050
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
1026
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [U32], shim_idx: 195, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1051
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [U32], shim_idx: 201, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1027
1052
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6af9200f0870d488___convert__closures_____invoke___u32______true_);
1028
1053
  return ret;
1029
1054
  },
@@ -1055,9 +1080,9 @@ function __wbg_get_imports() {
1055
1080
  return {
1056
1081
  __proto__: null,
1057
1082
  "./opengrid_web_components_bg.js": import0,
1058
- "./snippets/opengrid-web-core-8c4306a3e0319748/inline0.js": import1,
1059
- "./snippets/opengrid-web-core-8c4306a3e0319748/inline0.js": import2,
1060
- "./snippets/opengrid-web-core-8c4306a3e0319748/inline0.js": import3,
1083
+ "./snippets/opengrid-web-core-19b41f3fd18cf51f/inline0.js": import1,
1084
+ "./snippets/opengrid-web-core-19b41f3fd18cf51f/inline0.js": import2,
1085
+ "./snippets/opengrid-web-core-19b41f3fd18cf51f/inline0.js": import3,
1061
1086
  };
1062
1087
  }
1063
1088
 
Binary file