@scrider/formatter 1.10.5 → 1.10.6

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/index.d.cts CHANGED
@@ -32,8 +32,8 @@ interface TablePresentation {
32
32
  }
33
33
  /** Default table border (HTML / clipboard / PDF host should share). */
34
34
  declare const TABLE_BORDER_COLOR = "#e7e7e7";
35
- /** Header shade fill — matches editor light `--color-bg-hover` family. */
36
- declare const TABLE_HEADER_BG = "#f5f5f5";
35
+ /** Header shade fill — matches editor light `--color-bg-hover` (`#e9ecef`). */
36
+ declare const TABLE_HEADER_BG = "#e9ecef";
37
37
  /**
38
38
  * Zebra body-row fill — canon aligned with editor/demo light
39
39
  * `--color-table-zebra` (`#f6f8fa`, arch-set1 #12).
@@ -50,8 +50,12 @@ interface ResolvedTablePresentation {
50
50
  defaultCellAlign: TableCellAlign;
51
51
  }
52
52
  declare function resolveTablePresentation(presentation?: TablePresentation): ResolvedTablePresentation;
53
- /** Match CSS `tr:nth-child(even) td` when header rows precede body in `<table>`. */
54
- declare function isZebraBodyRow(headerRowCount: number, bodyRowIndex: number): boolean;
53
+ /**
54
+ * Match editor/CSS zebra on `tbody tr:nth-child(even) td`.
55
+ * First body row stays light; 2nd, 4th, … get {@link TABLE_ZEBRA_BG}.
56
+ * `headerRowCount` is unused (thead/tbody split) — kept for call-site stability.
57
+ */
58
+ declare function isZebraBodyRow(_headerRowCount: number, bodyRowIndex: number): boolean;
55
59
 
56
60
  /**
57
61
  * Document-level metadata (Scrider format extension).
package/dist/index.d.ts CHANGED
@@ -32,8 +32,8 @@ interface TablePresentation {
32
32
  }
33
33
  /** Default table border (HTML / clipboard / PDF host should share). */
34
34
  declare const TABLE_BORDER_COLOR = "#e7e7e7";
35
- /** Header shade fill — matches editor light `--color-bg-hover` family. */
36
- declare const TABLE_HEADER_BG = "#f5f5f5";
35
+ /** Header shade fill — matches editor light `--color-bg-hover` (`#e9ecef`). */
36
+ declare const TABLE_HEADER_BG = "#e9ecef";
37
37
  /**
38
38
  * Zebra body-row fill — canon aligned with editor/demo light
39
39
  * `--color-table-zebra` (`#f6f8fa`, arch-set1 #12).
@@ -50,8 +50,12 @@ interface ResolvedTablePresentation {
50
50
  defaultCellAlign: TableCellAlign;
51
51
  }
52
52
  declare function resolveTablePresentation(presentation?: TablePresentation): ResolvedTablePresentation;
53
- /** Match CSS `tr:nth-child(even) td` when header rows precede body in `<table>`. */
54
- declare function isZebraBodyRow(headerRowCount: number, bodyRowIndex: number): boolean;
53
+ /**
54
+ * Match editor/CSS zebra on `tbody tr:nth-child(even) td`.
55
+ * First body row stays light; 2nd, 4th, … get {@link TABLE_ZEBRA_BG}.
56
+ * `headerRowCount` is unused (thead/tbody split) — kept for call-site stability.
57
+ */
58
+ declare function isZebraBodyRow(_headerRowCount: number, bodyRowIndex: number): boolean;
55
59
 
56
60
  /**
57
61
  * Document-level metadata (Scrider format extension).
package/dist/index.js CHANGED
@@ -3214,7 +3214,7 @@ function headingPolicyStyleParts(tag, blockAttributes, policy) {
3214
3214
 
3215
3215
  // src/conversion/html/table-presentation.ts
3216
3216
  var TABLE_BORDER_COLOR = "#e7e7e7";
3217
- var TABLE_HEADER_BG = "#f5f5f5";
3217
+ var TABLE_HEADER_BG = "#e9ecef";
3218
3218
  var TABLE_ZEBRA_BG = "#f6f8fa";
3219
3219
  var DEFAULT_BORDER_COLOR = TABLE_BORDER_COLOR;
3220
3220
  var DEFAULT_HEADER_BG = TABLE_HEADER_BG;
@@ -3232,8 +3232,8 @@ function resolveTablePresentation(presentation) {
3232
3232
  defaultCellAlign: presentation?.defaultCellAlign ?? "left"
3233
3233
  };
3234
3234
  }
3235
- function isZebraBodyRow(headerRowCount, bodyRowIndex) {
3236
- return (headerRowCount + bodyRowIndex + 1) % 2 === 0;
3235
+ function isZebraBodyRow(_headerRowCount, bodyRowIndex) {
3236
+ return bodyRowIndex % 2 === 1;
3237
3237
  }
3238
3238
  function isTableCellAlign(value) {
3239
3239
  return value === "left" || value === "center" || value === "right";