@visulima/fmt 2.0.0-alpha.8 → 2.0.0-alpha.9
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 +7 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/inspect-colors.d.cts +2 -3
- package/dist/inspect-colors.d.mts +2 -3
- package/dist/inspect-colors.d.ts +2 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## @visulima/fmt [2.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/fmt@2.0.0-alpha.8...@visulima/fmt@2.0.0-alpha.9) (2026-04-15)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **fmt:** export CssObject type and type previousCss explicitly ([e1e7e53](https://github.com/visulima/visulima/commit/e1e7e5357c9920945d3cbe49f073291f1f104208))
|
|
6
|
+
* **terminal:** resolve eslint and formatting issues ([8f30389](https://github.com/visulima/visulima/commit/8f30389deb9ff81e7afce0aa064ef11fcb179f23))
|
|
7
|
+
|
|
1
8
|
## @visulima/fmt [2.0.0-alpha.8](https://github.com/visulima/visulima/compare/@visulima/fmt@2.0.0-alpha.7...@visulima/fmt@2.0.0-alpha.8) (2026-04-08)
|
|
2
9
|
|
|
3
10
|
### Bug Fixes
|
package/dist/index.cjs
CHANGED
|
@@ -326,7 +326,7 @@ const parseCss = (cssString) => {
|
|
|
326
326
|
}
|
|
327
327
|
return css;
|
|
328
328
|
};
|
|
329
|
-
const cssToAnsi = (css, previousCss
|
|
329
|
+
const cssToAnsi = (css, previousCss) => {
|
|
330
330
|
previousCss = previousCss ?? getDefaultCss();
|
|
331
331
|
let ansi = "";
|
|
332
332
|
if (!colorEquals(css.backgroundColor, previousCss.backgroundColor)) {
|
|
@@ -504,7 +504,7 @@ const format = (fmt, arguments_ = [], options = {}) => {
|
|
|
504
504
|
let a = 1 - offset;
|
|
505
505
|
let lastPosition = -1;
|
|
506
506
|
let usedStyle = false;
|
|
507
|
-
let previousCss
|
|
507
|
+
let previousCss;
|
|
508
508
|
for (let index = 0; index < fmt.length; ) {
|
|
509
509
|
if (fmt.codePointAt(index) === CHAR_PERCENT && index + 1 < fmt.length) {
|
|
510
510
|
lastPosition = lastPosition > -1 ? lastPosition : 0;
|
package/dist/index.mjs
CHANGED
|
@@ -322,7 +322,7 @@ const parseCss = (cssString) => {
|
|
|
322
322
|
}
|
|
323
323
|
return css;
|
|
324
324
|
};
|
|
325
|
-
const cssToAnsi = (css, previousCss
|
|
325
|
+
const cssToAnsi = (css, previousCss) => {
|
|
326
326
|
previousCss = previousCss ?? getDefaultCss();
|
|
327
327
|
let ansi = "";
|
|
328
328
|
if (!colorEquals(css.backgroundColor, previousCss.backgroundColor)) {
|
|
@@ -500,7 +500,7 @@ const format = (fmt, arguments_ = [], options = {}) => {
|
|
|
500
500
|
let a = 1 - offset;
|
|
501
501
|
let lastPosition = -1;
|
|
502
502
|
let usedStyle = false;
|
|
503
|
-
let previousCss
|
|
503
|
+
let previousCss;
|
|
504
504
|
for (let index = 0; index < fmt.length; ) {
|
|
505
505
|
if (fmt.codePointAt(index) === CHAR_PERCENT && index + 1 < fmt.length) {
|
|
506
506
|
lastPosition = lastPosition > -1 ? lastPosition : 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type CssObject = {
|
|
1
|
+
export type CssObject = {
|
|
2
2
|
__proto__: null;
|
|
3
3
|
backgroundColor: string | null;
|
|
4
4
|
color: string | null;
|
|
@@ -8,5 +8,4 @@ type CssObject = {
|
|
|
8
8
|
textDecorationLine: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const parseCss: (cssString: string) => CssObject;
|
|
11
|
-
export declare const cssToAnsi: (css: CssObject, previousCss?: CssObject
|
|
12
|
-
export {};
|
|
11
|
+
export declare const cssToAnsi: (css: CssObject, previousCss?: CssObject) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type CssObject = {
|
|
1
|
+
export type CssObject = {
|
|
2
2
|
__proto__: null;
|
|
3
3
|
backgroundColor: string | null;
|
|
4
4
|
color: string | null;
|
|
@@ -8,5 +8,4 @@ type CssObject = {
|
|
|
8
8
|
textDecorationLine: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const parseCss: (cssString: string) => CssObject;
|
|
11
|
-
export declare const cssToAnsi: (css: CssObject, previousCss?: CssObject
|
|
12
|
-
export {};
|
|
11
|
+
export declare const cssToAnsi: (css: CssObject, previousCss?: CssObject) => string;
|
package/dist/inspect-colors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type CssObject = {
|
|
1
|
+
export type CssObject = {
|
|
2
2
|
__proto__: null;
|
|
3
3
|
backgroundColor: string | null;
|
|
4
4
|
color: string | null;
|
|
@@ -8,5 +8,4 @@ type CssObject = {
|
|
|
8
8
|
textDecorationLine: string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const parseCss: (cssString: string) => CssObject;
|
|
11
|
-
export declare const cssToAnsi: (css: CssObject, previousCss?: CssObject
|
|
12
|
-
export {};
|
|
11
|
+
export declare const cssToAnsi: (css: CssObject, previousCss?: CssObject) => string;
|