@oxog/pigment 1.0.2 → 1.1.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-ChElNHaA.d.cts → index-CLqJXFfX.d.cts} +8 -0
- package/dist/{index-ChElNHaA.d.ts → index-CLqJXFfX.d.ts} +8 -0
- package/dist/index.cjs +514 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +514 -84
- package/dist/index.js.map +1 -1
- package/dist/plugins/index.cjs +511 -79
- package/dist/plugins/index.cjs.map +1 -1
- package/dist/plugins/index.d.cts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +511 -79
- package/dist/plugins/index.js.map +1 -1
- package/package.json +37 -21
|
@@ -23,6 +23,8 @@ type Style = {
|
|
|
23
23
|
background?: boolean;
|
|
24
24
|
};
|
|
25
25
|
type Pigment = {
|
|
26
|
+
/** Returns the (styled) text when colors are supported, otherwise an empty string */
|
|
27
|
+
visible: (text: string) => string;
|
|
26
28
|
bold: Pigment;
|
|
27
29
|
dim: Pigment;
|
|
28
30
|
italic: Pigment;
|
|
@@ -102,6 +104,12 @@ interface PigmentContext {
|
|
|
102
104
|
colorSupport: ColorSupport;
|
|
103
105
|
/** Registered styles map */
|
|
104
106
|
styles?: Map<string, StyleFunction>;
|
|
107
|
+
environment?: {
|
|
108
|
+
isCI: boolean;
|
|
109
|
+
noColor: boolean;
|
|
110
|
+
forceColor: boolean;
|
|
111
|
+
term: string;
|
|
112
|
+
};
|
|
105
113
|
/** Colors map */
|
|
106
114
|
colors?: {
|
|
107
115
|
foreground: Record<string, number>;
|
|
@@ -23,6 +23,8 @@ type Style = {
|
|
|
23
23
|
background?: boolean;
|
|
24
24
|
};
|
|
25
25
|
type Pigment = {
|
|
26
|
+
/** Returns the (styled) text when colors are supported, otherwise an empty string */
|
|
27
|
+
visible: (text: string) => string;
|
|
26
28
|
bold: Pigment;
|
|
27
29
|
dim: Pigment;
|
|
28
30
|
italic: Pigment;
|
|
@@ -102,6 +104,12 @@ interface PigmentContext {
|
|
|
102
104
|
colorSupport: ColorSupport;
|
|
103
105
|
/** Registered styles map */
|
|
104
106
|
styles?: Map<string, StyleFunction>;
|
|
107
|
+
environment?: {
|
|
108
|
+
isCI: boolean;
|
|
109
|
+
noColor: boolean;
|
|
110
|
+
forceColor: boolean;
|
|
111
|
+
term: string;
|
|
112
|
+
};
|
|
105
113
|
/** Colors map */
|
|
106
114
|
colors?: {
|
|
107
115
|
foreground: Record<string, number>;
|