@sheetxl/grid-react 0.8.0-beta.17 → 0.8.0-beta.19

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/grid-react",
3
3
  "description": "Grid React - Advanced grid component for React",
4
- "version": "0.8.0-beta.17",
4
+ "version": "0.8.0-beta.19",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
7
7
  "exports": {
@@ -40,8 +40,8 @@
40
40
  "table"
41
41
  ],
42
42
  "dependencies": {
43
- "@sheetxl/utils": "^0.8.0-beta.17",
44
- "@sheetxl/utils-react": "^0.8.0-beta.17",
43
+ "@sheetxl/utils": "^0.8.0-beta.19",
44
+ "@sheetxl/utils-react": "^0.8.0-beta.19",
45
45
  "clsx": "^2.1.1",
46
46
  "react-merge-refs": "^3.0.2"
47
47
  },
@@ -20,11 +20,15 @@ export declare const LayerOrderContext: import('react').Context<number>;
20
20
  */
21
21
  export declare const LayerScopeContext: import('react').Context<boolean>;
22
22
  /**
23
- * Normalize the layers (the grid's children) for rendering: sort by `zIndex` and stamp each with its
24
- * **derived order index** (its position in the sorted list = its effective z). A non-array passes
25
- * through unchanged.
23
+ * Normalize the layers (the grid's children) for rendering: flatten nested arrays, sort by `zIndex`
24
+ * and stamp each with its **derived order index** (its position in the sorted list = its effective z).
25
+ * A non-array passes through unchanged.
26
26
  *
27
27
  * @remarks
28
+ * Nested arrays are flattened first, so a host's array of layers placed as one entry among the
29
+ * built-in ones still gives each of its layers its own `zIndex` and its own slot. A flattened layer
30
+ * keeps its own key, so keys must be unique across the whole stack, not only within their array.
31
+ *
28
32
  * Ordering matches the CSS model: sort by `zIndex` **ascending** (higher paints later = on top); a layer
29
33
  * without a `zIndex` counts as `0`, and `Array.prototype.sort` is stable so same-`zIndex` layers keep
30
34
  * **declaration order** — exactly as `z-index: auto` behaves. The `zIndex` is read off the top-level