braid-design-system 32.20.0 → 32.22.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/CHANGELOG.md +145 -0
- package/codemod/dist/index.js +115 -99
- package/codemod/dist/wrapper.js +4846 -46474
- package/dist/index.cjs +4 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -0
- package/dist/lib/components/Accordion/AccordionItem.cjs +3 -4
- package/dist/lib/components/Accordion/AccordionItem.mjs +3 -4
- package/dist/lib/components/Actions/Actions.cjs +2 -1
- package/dist/lib/components/Actions/Actions.mjs +2 -1
- package/dist/lib/components/Autosuggest/Autosuggest.cjs +32 -1
- package/dist/lib/components/Autosuggest/Autosuggest.mjs +32 -2
- package/dist/lib/components/Autosuggest/filterSuggestions.cjs +5 -6
- package/dist/lib/components/Autosuggest/filterSuggestions.mjs +5 -5
- package/dist/lib/components/Badge/Badge.cjs +42 -27
- package/dist/lib/components/Badge/Badge.css.cjs +16 -0
- package/dist/lib/components/Badge/Badge.css.mjs +17 -0
- package/dist/lib/components/Badge/Badge.mjs +42 -27
- package/dist/lib/components/Column/Column.cjs +13 -1
- package/dist/lib/components/Column/Column.mjs +13 -1
- package/dist/lib/components/FieldLabel/FieldLabel.cjs +2 -2
- package/dist/lib/components/FieldLabel/FieldLabel.mjs +2 -2
- package/dist/lib/components/MenuItemCheckbox/MenuItemCheckbox.cjs +1 -1
- package/dist/lib/components/MenuItemCheckbox/MenuItemCheckbox.mjs +1 -1
- package/dist/lib/components/MonthPicker/MonthPicker.cjs +1 -1
- package/dist/lib/components/MonthPicker/MonthPicker.mjs +1 -1
- package/dist/lib/components/RadioGroup/RadioGroup.cjs +4 -13
- package/dist/lib/components/RadioGroup/RadioGroup.mjs +4 -13
- package/dist/lib/components/Spread/Spread.cjs +35 -0
- package/dist/lib/components/Spread/Spread.css.cjs +27 -0
- package/dist/lib/components/Spread/Spread.css.mjs +28 -0
- package/dist/lib/components/Spread/Spread.mjs +36 -0
- package/dist/lib/components/Spread/Spread.playroom.cjs +9 -0
- package/dist/lib/components/Spread/Spread.playroom.mjs +10 -0
- package/dist/lib/components/Tabs/Tab.cjs +19 -10
- package/dist/lib/components/Tabs/Tab.mjs +20 -11
- package/dist/lib/components/Tabs/Tabs.cjs +6 -3
- package/dist/lib/components/Tabs/Tabs.css.cjs +10 -2
- package/dist/lib/components/Tabs/Tabs.css.mjs +10 -2
- package/dist/lib/components/Tabs/Tabs.mjs +6 -3
- package/dist/lib/components/Tabs/Tabs.playroom.cjs +8 -1
- package/dist/lib/components/Tabs/Tabs.playroom.mjs +8 -1
- package/dist/lib/components/icons/IconHash/IconHash.cjs +10 -0
- package/dist/lib/components/icons/IconHash/IconHash.mjs +11 -0
- package/dist/lib/components/icons/IconHash/IconHashSvg.cjs +20 -0
- package/dist/lib/components/icons/IconHash/IconHashSvg.mjs +21 -0
- package/dist/lib/components/private/Field/Field.cjs +107 -105
- package/dist/lib/components/private/Field/Field.mjs +107 -105
- package/dist/lib/components/private/FieldGroup/FieldGroup.cjs +20 -18
- package/dist/lib/components/private/FieldGroup/FieldGroup.mjs +20 -18
- package/dist/lib/components/private/InlineField/InlineField.cjs +31 -25
- package/dist/lib/components/private/InlineField/InlineField.mjs +31 -25
- package/dist/lib/components/useToast/ToastContext.cjs +3 -2
- package/dist/lib/components/useToast/ToastContext.mjs +3 -2
- package/dist/lib/playroom/snippets/Actions.cjs +2 -8
- package/dist/lib/playroom/snippets/Actions.mjs +2 -8
- package/dist/lib/playroom/snippets/Card.cjs +5 -5
- package/dist/lib/playroom/snippets/Card.mjs +5 -5
- package/dist/lib/playroom/snippets/Columns.cjs +8 -8
- package/dist/lib/playroom/snippets/Columns.mjs +8 -8
- package/dist/lib/playroom/snippets/Inline.cjs +4 -14
- package/dist/lib/playroom/snippets/Inline.mjs +4 -14
- package/dist/lib/playroom/snippets/Spread.cjs +15 -0
- package/dist/lib/playroom/snippets/Spread.mjs +16 -0
- package/dist/lib/playroom/snippets/Stack.cjs +17 -14
- package/dist/lib/playroom/snippets/Stack.mjs +17 -14
- package/dist/lib/playroom/snippets/Tabs.cjs +12 -12
- package/dist/lib/playroom/snippets/Tabs.mjs +12 -12
- package/dist/lib/playroom/snippets/Tiles.cjs +2 -8
- package/dist/lib/playroom/snippets/Tiles.mjs +2 -8
- package/dist/lib/playroom/snippets.cjs +2 -0
- package/dist/lib/playroom/snippets.mjs +28 -26
- package/dist/lib/themes/makeVanillaTheme.cjs +1 -1
- package/dist/lib/themes/makeVanillaTheme.mjs +1 -1
- package/dist/playroom/components.cjs +4 -0
- package/dist/playroom/components.d.mts +1 -1
- package/dist/playroom/components.d.ts +1 -1
- package/dist/playroom/components.mjs +4 -0
- package/dist/wireframe.chunk.d.ts +326 -201
- package/package.json +16 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,150 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 32.22.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Column:** Add support for hide above/below breakpoint ([#1553](https://github.com/seek-oss/braid-design-system/pull/1553))
|
|
8
|
+
|
|
9
|
+
Introduce new `hideAbove` and `hideBelow` props on column for responsively hiding columns across breakpoint.
|
|
10
|
+
|
|
11
|
+
These props can be used either separately or in combination to optimise content display across different screen sizes.
|
|
12
|
+
|
|
13
|
+
**EXAMPLE USAGE:**
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<Columns space="small">
|
|
17
|
+
<Column>
|
|
18
|
+
<Placeholder height={60} label="Always visible" />
|
|
19
|
+
</Column>
|
|
20
|
+
<Column hideBelow="tablet">
|
|
21
|
+
<Placeholder height={60} label="Tablet and above" />
|
|
22
|
+
</Column>
|
|
23
|
+
<Column hideAbove="mobile">
|
|
24
|
+
<Placeholder height={60} label="Mobile Only" />
|
|
25
|
+
</Column>
|
|
26
|
+
</Columns>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- **Badge:** Enable usage inside typographic components ([#1547](https://github.com/seek-oss/braid-design-system/pull/1547))
|
|
30
|
+
|
|
31
|
+
A `Badge` can now be nested inside typographic components, e.g. `Text` and `Heading`, as an inline element alongside text.
|
|
32
|
+
Previously a `Badge` had to be aligned against text using an `Inline` component, which would result in the `Badge` dropping below the text when the copy wrapped.
|
|
33
|
+
|
|
34
|
+
**EXAMPLE USAGE:**
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
<Text>
|
|
38
|
+
Lorem ipsum velit in <Badge>amet</Badge>.
|
|
39
|
+
</Text>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- **Tabs:** Add `size` support ([#1550](https://github.com/seek-oss/braid-design-system/pull/1550))
|
|
43
|
+
|
|
44
|
+
Introduces the ability to customise the `size` of the `Tab` components in the tab list.
|
|
45
|
+
Available sizes are `standard` (default) and `small`.
|
|
46
|
+
|
|
47
|
+
**EXAMPLE USAGE:**
|
|
48
|
+
|
|
49
|
+
```jsx
|
|
50
|
+
<Tabs size="small">
|
|
51
|
+
<Tab>First tab</Tab>
|
|
52
|
+
<Tab>Second tab</Tab>
|
|
53
|
+
<Tab>Third tab</Tab>
|
|
54
|
+
</Tabs>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- **Spread:** Add new layout component ([#1554](https://github.com/seek-oss/braid-design-system/pull/1554))
|
|
58
|
+
|
|
59
|
+
Introduce a new layout component, `Spread`, used to justify content with both an equally distributed and a specified minimum amount of space in between each child.
|
|
60
|
+
|
|
61
|
+
**EXAMPLE USAGE:**
|
|
62
|
+
|
|
63
|
+
The `Spread` component works horizontally by default:
|
|
64
|
+
|
|
65
|
+
```jsx
|
|
66
|
+
<Spread space="small" alignY="center">
|
|
67
|
+
<Heading level="4">Heading</Heading>
|
|
68
|
+
|
|
69
|
+
<OverflowMenu label="Options">
|
|
70
|
+
<MenuItem>First</MenuItem>
|
|
71
|
+
<MenuItem>Second</MenuItem>
|
|
72
|
+
</OverflowMenu>
|
|
73
|
+
</Spread>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
But can be switched to `vertical` via the `direction` prop:
|
|
77
|
+
|
|
78
|
+
```jsx
|
|
79
|
+
<Spread space="large" direction="vertical">
|
|
80
|
+
<Stack space="small">
|
|
81
|
+
<Heading level="4">Heading</Heading>
|
|
82
|
+
<Text>Text</Text>
|
|
83
|
+
</Stack>
|
|
84
|
+
|
|
85
|
+
<Text size="small" tone="secondary">
|
|
86
|
+
Date
|
|
87
|
+
</Text>
|
|
88
|
+
</Spread>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Move `badge` slot inside label ([#1547](https://github.com/seek-oss/braid-design-system/pull/1547))
|
|
94
|
+
|
|
95
|
+
Relocate the `badge` slot inside the `label` slot enabling the `Badge` to sit alongside the last word in wrapping lines of text.
|
|
96
|
+
|
|
97
|
+
## 32.21.0
|
|
98
|
+
|
|
99
|
+
### Minor Changes
|
|
100
|
+
|
|
101
|
+
- **IconHash:** Add component ([#1543](https://github.com/seek-oss/braid-design-system/pull/1543))
|
|
102
|
+
|
|
103
|
+
**EXAMPLE USAGE:**
|
|
104
|
+
|
|
105
|
+
```jsx
|
|
106
|
+
<IconHash />
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- Improve internal form field spacing ([#1541](https://github.com/seek-oss/braid-design-system/pull/1541))
|
|
110
|
+
|
|
111
|
+
Refined the spacing between internal elements of form fields to align with the latest spacing guidelines.
|
|
112
|
+
|
|
113
|
+
This change impacts the `Stack` spacing between `label` and `description`, the form field itself and the `message` slots.
|
|
114
|
+
|
|
115
|
+
- **Autosuggest:** Add `suggestionHighlight` prop ([#1536](https://github.com/seek-oss/braid-design-system/pull/1536))
|
|
116
|
+
|
|
117
|
+
Introduces the `suggestionHighlight` prop, which uses the input value to automatically highlight either the `matching` or `remaining` portion of each suggestion.
|
|
118
|
+
|
|
119
|
+
**EXAMPLE USAGE:**
|
|
120
|
+
|
|
121
|
+
```jsx
|
|
122
|
+
<Autosuggest suggestionHighlight="matching">
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- Refine the Checkbox, Radio, Toggle & MenuItemCheckbox size ([#1541](https://github.com/seek-oss/braid-design-system/pull/1541))
|
|
128
|
+
|
|
129
|
+
Refines the size of the inline field elements including the `RadioItem`, `Checkbox`, `Toggle` and `MenuItemCheckbox` components.
|
|
130
|
+
|
|
131
|
+
Primarily impacts consumers of the `seekJobs` theme, seeing a reduction across all sizes.
|
|
132
|
+
|
|
133
|
+
- Ensure no space above field with `undefined` label ([#1541](https://github.com/seek-oss/braid-design-system/pull/1541))
|
|
134
|
+
|
|
135
|
+
Fixes an issue where passing `undefined` as the `label` to a form field would result in an unwanted space above the field.
|
|
136
|
+
|
|
137
|
+
- **Badge:** Ensure label follows correct tone ([#1544](https://github.com/seek-oss/braid-design-system/pull/1544))
|
|
138
|
+
|
|
139
|
+
Ensure that the foreground text of a `Badge` always follows the correct tone for the background colour.
|
|
140
|
+
Fixes a bug where using a `Badge` in a `List` that overrides the default tone would result in the `Badge` text following the `List` tone instead of the `Badge` tone.
|
|
141
|
+
|
|
142
|
+
- Fix warning in React 18.3.0 when using useToast. ([#1534](https://github.com/seek-oss/braid-design-system/pull/1534))
|
|
143
|
+
|
|
144
|
+
- **MonthPicker:** Reduce space between month and year fields ([#1541](https://github.com/seek-oss/braid-design-system/pull/1541))
|
|
145
|
+
|
|
146
|
+
Reducing the space between month and year fields to improve correlation between the two fields within the greater context of a form.
|
|
147
|
+
|
|
3
148
|
## 32.20.0
|
|
4
149
|
|
|
5
150
|
### Minor Changes
|
package/codemod/dist/index.js
CHANGED
|
@@ -7319,98 +7319,106 @@ var import_fast_glob = __toESM(require_out4());
|
|
|
7319
7319
|
var import_workerpool = __toESM(require_src());
|
|
7320
7320
|
var import_cli_progress = __toESM(require_cli_progress());
|
|
7321
7321
|
|
|
7322
|
-
// ../../../node_modules/.pnpm/chalk@5.0
|
|
7322
|
+
// ../../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
7323
7323
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
7324
7324
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
7325
7325
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
7326
7326
|
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
7327
|
+
var styles = {
|
|
7328
|
+
modifier: {
|
|
7329
|
+
reset: [0, 0],
|
|
7330
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
7331
|
+
bold: [1, 22],
|
|
7332
|
+
dim: [2, 22],
|
|
7333
|
+
italic: [3, 23],
|
|
7334
|
+
underline: [4, 24],
|
|
7335
|
+
overline: [53, 55],
|
|
7336
|
+
inverse: [7, 27],
|
|
7337
|
+
hidden: [8, 28],
|
|
7338
|
+
strikethrough: [9, 29]
|
|
7339
|
+
},
|
|
7340
|
+
color: {
|
|
7341
|
+
black: [30, 39],
|
|
7342
|
+
red: [31, 39],
|
|
7343
|
+
green: [32, 39],
|
|
7344
|
+
yellow: [33, 39],
|
|
7345
|
+
blue: [34, 39],
|
|
7346
|
+
magenta: [35, 39],
|
|
7347
|
+
cyan: [36, 39],
|
|
7348
|
+
white: [37, 39],
|
|
7349
|
+
// Bright color
|
|
7350
|
+
blackBright: [90, 39],
|
|
7351
|
+
gray: [90, 39],
|
|
7352
|
+
// Alias of `blackBright`
|
|
7353
|
+
grey: [90, 39],
|
|
7354
|
+
// Alias of `blackBright`
|
|
7355
|
+
redBright: [91, 39],
|
|
7356
|
+
greenBright: [92, 39],
|
|
7357
|
+
yellowBright: [93, 39],
|
|
7358
|
+
blueBright: [94, 39],
|
|
7359
|
+
magentaBright: [95, 39],
|
|
7360
|
+
cyanBright: [96, 39],
|
|
7361
|
+
whiteBright: [97, 39]
|
|
7362
|
+
},
|
|
7363
|
+
bgColor: {
|
|
7364
|
+
bgBlack: [40, 49],
|
|
7365
|
+
bgRed: [41, 49],
|
|
7366
|
+
bgGreen: [42, 49],
|
|
7367
|
+
bgYellow: [43, 49],
|
|
7368
|
+
bgBlue: [44, 49],
|
|
7369
|
+
bgMagenta: [45, 49],
|
|
7370
|
+
bgCyan: [46, 49],
|
|
7371
|
+
bgWhite: [47, 49],
|
|
7372
|
+
// Bright color
|
|
7373
|
+
bgBlackBright: [100, 49],
|
|
7374
|
+
bgGray: [100, 49],
|
|
7375
|
+
// Alias of `bgBlackBright`
|
|
7376
|
+
bgGrey: [100, 49],
|
|
7377
|
+
// Alias of `bgBlackBright`
|
|
7378
|
+
bgRedBright: [101, 49],
|
|
7379
|
+
bgGreenBright: [102, 49],
|
|
7380
|
+
bgYellowBright: [103, 49],
|
|
7381
|
+
bgBlueBright: [104, 49],
|
|
7382
|
+
bgMagentaBright: [105, 49],
|
|
7383
|
+
bgCyanBright: [106, 49],
|
|
7384
|
+
bgWhiteBright: [107, 49]
|
|
7385
|
+
}
|
|
7386
|
+
};
|
|
7387
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
7388
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
7389
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
7390
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
7327
7391
|
function assembleStyles() {
|
|
7328
7392
|
const codes = /* @__PURE__ */ new Map();
|
|
7329
|
-
const
|
|
7330
|
-
modifier: {
|
|
7331
|
-
reset: [0, 0],
|
|
7332
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
7333
|
-
bold: [1, 22],
|
|
7334
|
-
dim: [2, 22],
|
|
7335
|
-
italic: [3, 23],
|
|
7336
|
-
underline: [4, 24],
|
|
7337
|
-
overline: [53, 55],
|
|
7338
|
-
inverse: [7, 27],
|
|
7339
|
-
hidden: [8, 28],
|
|
7340
|
-
strikethrough: [9, 29]
|
|
7341
|
-
},
|
|
7342
|
-
color: {
|
|
7343
|
-
black: [30, 39],
|
|
7344
|
-
red: [31, 39],
|
|
7345
|
-
green: [32, 39],
|
|
7346
|
-
yellow: [33, 39],
|
|
7347
|
-
blue: [34, 39],
|
|
7348
|
-
magenta: [35, 39],
|
|
7349
|
-
cyan: [36, 39],
|
|
7350
|
-
white: [37, 39],
|
|
7351
|
-
// Bright color
|
|
7352
|
-
blackBright: [90, 39],
|
|
7353
|
-
redBright: [91, 39],
|
|
7354
|
-
greenBright: [92, 39],
|
|
7355
|
-
yellowBright: [93, 39],
|
|
7356
|
-
blueBright: [94, 39],
|
|
7357
|
-
magentaBright: [95, 39],
|
|
7358
|
-
cyanBright: [96, 39],
|
|
7359
|
-
whiteBright: [97, 39]
|
|
7360
|
-
},
|
|
7361
|
-
bgColor: {
|
|
7362
|
-
bgBlack: [40, 49],
|
|
7363
|
-
bgRed: [41, 49],
|
|
7364
|
-
bgGreen: [42, 49],
|
|
7365
|
-
bgYellow: [43, 49],
|
|
7366
|
-
bgBlue: [44, 49],
|
|
7367
|
-
bgMagenta: [45, 49],
|
|
7368
|
-
bgCyan: [46, 49],
|
|
7369
|
-
bgWhite: [47, 49],
|
|
7370
|
-
// Bright color
|
|
7371
|
-
bgBlackBright: [100, 49],
|
|
7372
|
-
bgRedBright: [101, 49],
|
|
7373
|
-
bgGreenBright: [102, 49],
|
|
7374
|
-
bgYellowBright: [103, 49],
|
|
7375
|
-
bgBlueBright: [104, 49],
|
|
7376
|
-
bgMagentaBright: [105, 49],
|
|
7377
|
-
bgCyanBright: [106, 49],
|
|
7378
|
-
bgWhiteBright: [107, 49]
|
|
7379
|
-
}
|
|
7380
|
-
};
|
|
7381
|
-
styles2.color.gray = styles2.color.blackBright;
|
|
7382
|
-
styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
|
|
7383
|
-
styles2.color.grey = styles2.color.blackBright;
|
|
7384
|
-
styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
|
|
7385
|
-
for (const [groupName, group] of Object.entries(styles2)) {
|
|
7393
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
7386
7394
|
for (const [styleName, style] of Object.entries(group)) {
|
|
7387
|
-
|
|
7395
|
+
styles[styleName] = {
|
|
7388
7396
|
open: `\x1B[${style[0]}m`,
|
|
7389
7397
|
close: `\x1B[${style[1]}m`
|
|
7390
7398
|
};
|
|
7391
|
-
group[styleName] =
|
|
7399
|
+
group[styleName] = styles[styleName];
|
|
7392
7400
|
codes.set(style[0], style[1]);
|
|
7393
7401
|
}
|
|
7394
|
-
Object.defineProperty(
|
|
7402
|
+
Object.defineProperty(styles, groupName, {
|
|
7395
7403
|
value: group,
|
|
7396
7404
|
enumerable: false
|
|
7397
7405
|
});
|
|
7398
7406
|
}
|
|
7399
|
-
Object.defineProperty(
|
|
7407
|
+
Object.defineProperty(styles, "codes", {
|
|
7400
7408
|
value: codes,
|
|
7401
7409
|
enumerable: false
|
|
7402
7410
|
});
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
Object.defineProperties(
|
|
7411
|
+
styles.color.close = "\x1B[39m";
|
|
7412
|
+
styles.bgColor.close = "\x1B[49m";
|
|
7413
|
+
styles.color.ansi = wrapAnsi16();
|
|
7414
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
7415
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
7416
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
7417
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
7418
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
7419
|
+
Object.defineProperties(styles, {
|
|
7412
7420
|
rgbToAnsi256: {
|
|
7413
|
-
value
|
|
7421
|
+
value(red, green, blue) {
|
|
7414
7422
|
if (red === green && green === blue) {
|
|
7415
7423
|
if (red < 8) {
|
|
7416
7424
|
return 16;
|
|
@@ -7425,12 +7433,12 @@ function assembleStyles() {
|
|
|
7425
7433
|
enumerable: false
|
|
7426
7434
|
},
|
|
7427
7435
|
hexToRgb: {
|
|
7428
|
-
value
|
|
7429
|
-
const matches = /
|
|
7436
|
+
value(hex) {
|
|
7437
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
7430
7438
|
if (!matches) {
|
|
7431
7439
|
return [0, 0, 0];
|
|
7432
7440
|
}
|
|
7433
|
-
let
|
|
7441
|
+
let [colorString] = matches;
|
|
7434
7442
|
if (colorString.length === 3) {
|
|
7435
7443
|
colorString = [...colorString].map((character) => character + character).join("");
|
|
7436
7444
|
}
|
|
@@ -7446,11 +7454,11 @@ function assembleStyles() {
|
|
|
7446
7454
|
enumerable: false
|
|
7447
7455
|
},
|
|
7448
7456
|
hexToAnsi256: {
|
|
7449
|
-
value: (hex) =>
|
|
7457
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
7450
7458
|
enumerable: false
|
|
7451
7459
|
},
|
|
7452
7460
|
ansi256ToAnsi: {
|
|
7453
|
-
value
|
|
7461
|
+
value(code) {
|
|
7454
7462
|
if (code < 8) {
|
|
7455
7463
|
return 30 + code;
|
|
7456
7464
|
}
|
|
@@ -7484,24 +7492,24 @@ function assembleStyles() {
|
|
|
7484
7492
|
enumerable: false
|
|
7485
7493
|
},
|
|
7486
7494
|
rgbToAnsi: {
|
|
7487
|
-
value: (red, green, blue) =>
|
|
7495
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
7488
7496
|
enumerable: false
|
|
7489
7497
|
},
|
|
7490
7498
|
hexToAnsi: {
|
|
7491
|
-
value: (hex) =>
|
|
7499
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
7492
7500
|
enumerable: false
|
|
7493
7501
|
}
|
|
7494
7502
|
});
|
|
7495
|
-
return
|
|
7503
|
+
return styles;
|
|
7496
7504
|
}
|
|
7497
7505
|
var ansiStyles = assembleStyles();
|
|
7498
7506
|
var ansi_styles_default = ansiStyles;
|
|
7499
7507
|
|
|
7500
|
-
// ../../../node_modules/.pnpm/chalk@5.0
|
|
7508
|
+
// ../../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
7501
7509
|
var import_node_process = __toESM(require("process"), 1);
|
|
7502
7510
|
var import_node_os = __toESM(require("os"), 1);
|
|
7503
7511
|
var import_node_tty = __toESM(require("tty"), 1);
|
|
7504
|
-
function hasFlag(flag, argv = import_node_process.default.argv) {
|
|
7512
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
|
7505
7513
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
7506
7514
|
const position = argv.indexOf(prefix + flag);
|
|
7507
7515
|
const terminatorPosition = argv.indexOf("--");
|
|
@@ -7553,6 +7561,9 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
7553
7561
|
return 2;
|
|
7554
7562
|
}
|
|
7555
7563
|
}
|
|
7564
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
7565
|
+
return 1;
|
|
7566
|
+
}
|
|
7556
7567
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
7557
7568
|
return 0;
|
|
7558
7569
|
}
|
|
@@ -7568,7 +7579,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
7568
7579
|
return 1;
|
|
7569
7580
|
}
|
|
7570
7581
|
if ("CI" in env) {
|
|
7571
|
-
if (
|
|
7582
|
+
if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
|
|
7583
|
+
return 3;
|
|
7584
|
+
}
|
|
7585
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
7572
7586
|
return 1;
|
|
7573
7587
|
}
|
|
7574
7588
|
return min;
|
|
@@ -7576,19 +7590,21 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
7576
7590
|
if ("TEAMCITY_VERSION" in env) {
|
|
7577
7591
|
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
7578
7592
|
}
|
|
7579
|
-
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
7580
|
-
return 1;
|
|
7581
|
-
}
|
|
7582
7593
|
if (env.COLORTERM === "truecolor") {
|
|
7583
7594
|
return 3;
|
|
7584
7595
|
}
|
|
7596
|
+
if (env.TERM === "xterm-kitty") {
|
|
7597
|
+
return 3;
|
|
7598
|
+
}
|
|
7585
7599
|
if ("TERM_PROGRAM" in env) {
|
|
7586
7600
|
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
7587
7601
|
switch (env.TERM_PROGRAM) {
|
|
7588
|
-
case "iTerm.app":
|
|
7602
|
+
case "iTerm.app": {
|
|
7589
7603
|
return version >= 3 ? 3 : 2;
|
|
7590
|
-
|
|
7604
|
+
}
|
|
7605
|
+
case "Apple_Terminal": {
|
|
7591
7606
|
return 2;
|
|
7607
|
+
}
|
|
7592
7608
|
}
|
|
7593
7609
|
}
|
|
7594
7610
|
if (/-256(color)?$/i.test(env.TERM)) {
|
|
@@ -7615,7 +7631,7 @@ var supportsColor = {
|
|
|
7615
7631
|
};
|
|
7616
7632
|
var supports_color_default = supportsColor;
|
|
7617
7633
|
|
|
7618
|
-
// ../../../node_modules/.pnpm/chalk@5.0
|
|
7634
|
+
// ../../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
7619
7635
|
function stringReplaceAll(string, substring, replacer) {
|
|
7620
7636
|
let index = string.indexOf(substring);
|
|
7621
7637
|
if (index === -1) {
|
|
@@ -7625,7 +7641,7 @@ function stringReplaceAll(string, substring, replacer) {
|
|
|
7625
7641
|
let endIndex = 0;
|
|
7626
7642
|
let returnValue = "";
|
|
7627
7643
|
do {
|
|
7628
|
-
returnValue += string.
|
|
7644
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
7629
7645
|
endIndex = index + substringLength;
|
|
7630
7646
|
index = string.indexOf(substring, endIndex);
|
|
7631
7647
|
} while (index !== -1);
|
|
@@ -7637,7 +7653,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
7637
7653
|
let returnValue = "";
|
|
7638
7654
|
do {
|
|
7639
7655
|
const gotCR = string[index - 1] === "\r";
|
|
7640
|
-
returnValue += string.
|
|
7656
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
7641
7657
|
endIndex = index + 1;
|
|
7642
7658
|
index = string.indexOf("\n", endIndex);
|
|
7643
7659
|
} while (index !== -1);
|
|
@@ -7645,7 +7661,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
7645
7661
|
return returnValue;
|
|
7646
7662
|
}
|
|
7647
7663
|
|
|
7648
|
-
// ../../../node_modules/.pnpm/chalk@5.0
|
|
7664
|
+
// ../../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
7649
7665
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
7650
7666
|
var GENERATOR = Symbol("GENERATOR");
|
|
7651
7667
|
var STYLER = Symbol("STYLER");
|
|
@@ -7656,7 +7672,7 @@ var levelMapping = [
|
|
|
7656
7672
|
"ansi256",
|
|
7657
7673
|
"ansi16m"
|
|
7658
7674
|
];
|
|
7659
|
-
var
|
|
7675
|
+
var styles2 = /* @__PURE__ */ Object.create(null);
|
|
7660
7676
|
var applyOptions = (object, options = {}) => {
|
|
7661
7677
|
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
7662
7678
|
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
@@ -7675,7 +7691,7 @@ function createChalk(options) {
|
|
|
7675
7691
|
}
|
|
7676
7692
|
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
7677
7693
|
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
7678
|
-
|
|
7694
|
+
styles2[styleName] = {
|
|
7679
7695
|
get() {
|
|
7680
7696
|
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
7681
7697
|
Object.defineProperty(this, styleName, { value: builder });
|
|
@@ -7683,7 +7699,7 @@ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
|
7683
7699
|
}
|
|
7684
7700
|
};
|
|
7685
7701
|
}
|
|
7686
|
-
|
|
7702
|
+
styles2.visible = {
|
|
7687
7703
|
get() {
|
|
7688
7704
|
const builder = createBuilder(this, this[STYLER], true);
|
|
7689
7705
|
Object.defineProperty(this, "visible", { value: builder });
|
|
@@ -7707,7 +7723,7 @@ var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
|
7707
7723
|
};
|
|
7708
7724
|
var usedModels = ["rgb", "hex", "ansi256"];
|
|
7709
7725
|
for (const model of usedModels) {
|
|
7710
|
-
|
|
7726
|
+
styles2[model] = {
|
|
7711
7727
|
get() {
|
|
7712
7728
|
const { level } = this;
|
|
7713
7729
|
return function(...arguments_) {
|
|
@@ -7717,7 +7733,7 @@ for (const model of usedModels) {
|
|
|
7717
7733
|
}
|
|
7718
7734
|
};
|
|
7719
7735
|
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
7720
|
-
|
|
7736
|
+
styles2[bgModel] = {
|
|
7721
7737
|
get() {
|
|
7722
7738
|
const { level } = this;
|
|
7723
7739
|
return function(...arguments_) {
|
|
@@ -7729,7 +7745,7 @@ for (const model of usedModels) {
|
|
|
7729
7745
|
}
|
|
7730
7746
|
var proto = Object.defineProperties(() => {
|
|
7731
7747
|
}, {
|
|
7732
|
-
...
|
|
7748
|
+
...styles2,
|
|
7733
7749
|
level: {
|
|
7734
7750
|
enumerable: true,
|
|
7735
7751
|
get() {
|
|
@@ -7787,7 +7803,7 @@ var applyStyle = (self2, string) => {
|
|
|
7787
7803
|
}
|
|
7788
7804
|
return openAll + string + closeAll;
|
|
7789
7805
|
};
|
|
7790
|
-
Object.defineProperties(createChalk.prototype,
|
|
7806
|
+
Object.defineProperties(createChalk.prototype, styles2);
|
|
7791
7807
|
var chalk = createChalk();
|
|
7792
7808
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
7793
7809
|
var source_default = chalk;
|