@sofereditor/core 0.4.0 → 0.5.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/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -895,8 +895,8 @@ function kebab(prop) {
|
|
|
895
895
|
// src/table-borders.ts
|
|
896
896
|
var TABLE_BORDER_COLOR = "#cbd5e1";
|
|
897
897
|
var TABLE_GUIDE_COLOR = "var(--ed-guide-color, transparent)";
|
|
898
|
-
function cellBorderColors(preset, pos, variant) {
|
|
899
|
-
const on = TABLE_BORDER_COLOR;
|
|
898
|
+
function cellBorderColors(preset, pos, variant, color) {
|
|
899
|
+
const on = color && color.length > 0 ? color : TABLE_BORDER_COLOR;
|
|
900
900
|
const off = variant === "screen" ? TABLE_GUIDE_COLOR : "transparent";
|
|
901
901
|
switch (preset ?? "all") {
|
|
902
902
|
case "horizontal":
|
|
@@ -922,8 +922,8 @@ function cellBorderColors(preset, pos, variant) {
|
|
|
922
922
|
return { top: on, right: on, bottom: on, left: on };
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
|
-
function cellBorderStyle(preset, pos, variant) {
|
|
926
|
-
const c = cellBorderColors(preset, pos, variant);
|
|
925
|
+
function cellBorderStyle(preset, pos, variant, color) {
|
|
926
|
+
const c = cellBorderColors(preset, pos, variant, color);
|
|
927
927
|
return {
|
|
928
928
|
borderTopColor: c.top,
|
|
929
929
|
borderRightColor: c.right,
|