Skip to content

Commit dfc587e

Browse files
committed
refactor: revert themes subpath
1 parent 7a4b4df commit dfc587e

File tree

9 files changed

+6
-189
lines changed

9 files changed

+6
-189
lines changed

packages/core/build.config.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,5 @@ import { defineBuildConfig } from 'unbuild';
33
// @see https://github.com/unjs/unbuild
44
export default defineBuildConfig({
55
preset: '../../build.preset',
6-
entries: [
7-
{
8-
name: 'index',
9-
input: 'src/prompts/index',
10-
},
11-
{
12-
name: 'themes',
13-
input: 'src/themes/index',
14-
},
15-
],
6+
entries: ['src/index'],
167
});

packages/core/package.json

-13
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,9 @@
1010
"import": "./dist/index.mjs",
1111
"require": "./dist/index.cjs"
1212
},
13-
"./themes": {
14-
"types": "./dist/themes.d.ts",
15-
"import": "./dist/themes.mjs",
16-
"require": "./dist/themes.cjs"
17-
},
1813
"./package.json": "./package.json"
1914
},
2015
"types": "./dist/index.d.ts",
21-
"typesVersions": {
22-
"*": {
23-
"themes": [
24-
"./dist/themes.d.ts"
25-
]
26-
}
27-
},
2816
"repository": {
2917
"type": "git",
3018
"url": "https://github.com/natemoo-re/clack",
@@ -63,7 +51,6 @@
6351
"test": "vitest run"
6452
},
6553
"dependencies": {
66-
"is-unicode-supported": "^1.3.0",
6754
"picocolors": "^1.0.0",
6855
"sisteransi": "^1.0.5"
6956
},

packages/core/src/prompts/index.ts

-10
This file was deleted.

packages/core/src/themes/default.ts

-105
This file was deleted.

packages/core/src/themes/index.ts

-3
This file was deleted.

packages/core/src/themes/symbols.ts

-30
This file was deleted.

packages/core/src/themes/types.ts

-10
This file was deleted.

packages/prompts/src/index.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import { cursor, erase } from "sisteransi";
2020
export { isCancel } from '@clack/core';
2121
export { updateSettings, type ClackSettings } from '@clack/core';
2222

23-
import { defaultTheme, S } from '@clack/core/themes';
24-
2523
const unicode = isUnicodeSupported();
2624
const s = (c: string, fallback: string) => (unicode ? c : fallback);
2725

@@ -243,7 +241,7 @@ export interface PasswordOptions {
243241
export const password = (opts: PasswordOptions) => {
244242
return new PasswordPrompt({
245243
validate: opts.validate,
246-
mask: opts.mask ?? S.PASSWORD_MASK,
244+
mask: opts.mask ?? S_PASSWORD_MASK,
247245
render() {
248246
return applyTheme({
249247
ctx: this,
@@ -483,7 +481,7 @@ export const multiselect = <Value>(opts: MultiSelectOptions<Value>) => {
483481
if (state === "submitted") {
484482
return `${color.dim(label)}`;
485483
}
486-
return `${color.dim(S.CHECKBOX_INACTIVE)} ${color.dim(label)}`;
484+
return `${color.dim(S_CHECKBOX_INACTIVE)} ${color.dim(label)}`;
487485
};
488486

489487
return new MultiSelectPrompt({
@@ -728,7 +726,7 @@ export const groupMultiselect = <Value>(
728726
}
729727
return opt(option, active ? "active" : "inactive", options);
730728
})
731-
.join(`\n${color.yellow(S.BAR)} `)}\n${footer}\n`;
729+
.join(`\n${color.yellow(S_BAR)} `)}\n${footer}\n`;
732730
}
733731
default: {
734732
return `${title}\n${color.cyan(S_BAR)} ${this.options
@@ -757,7 +755,7 @@ export const groupMultiselect = <Value>(
757755
}
758756
return opt(option, active ? "active" : "inactive", options);
759757
})
760-
.join(`\n${color.cyan(S.BAR)} `)}\n${color.cyan(S.BAR_END)}\n`;
758+
.join(`\n${color.cyan(S_BAR)} `)}\n${color.cyan(S_BAR_END)}\n`;
761759
}
762760
}
763761
},
@@ -986,7 +984,7 @@ export const spinner = () => {
986984
clearPrevMessage();
987985
const step =
988986
code === 0
989-
? color.green(S.STEP_SUBMIT)
987+
? color.green(S_STEP_SUBMIT)
990988
: code === 1
991989
? color.red(S_STEP_CANCEL)
992990
: color.red(S_STEP_ERROR);

pnpm-lock.yaml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)