Skip to content

Commit aaca648

Browse files
authored
feat: migrate to external @tenphi/tasty package (#1059)
1 parent 853779e commit aaca648

347 files changed

Lines changed: 953 additions & 45210 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"@cube-dev/ui-kit": minor
3+
---
4+
5+
Migrate from internal tasty module to external `@tenphi/tasty` package.
6+
7+
**Breaking changes:**
8+
- Removed sub-path exports: `@cube-dev/ui-kit/tasty/static`, `@cube-dev/ui-kit/tasty/zero`, `@cube-dev/ui-kit/tasty/zero/babel`, `@cube-dev/ui-kit/tasty/zero/next`
9+
- Consumers should import these directly from `@tenphi/tasty/static`, `@tenphi/tasty/zero`, `@tenphi/tasty/babel-plugin`, `@tenphi/tasty/next` instead
10+
11+
**Internal changes:**
12+
- Removed internal `src/tasty/` directory (~133 files)
13+
- All internal imports now use `@tenphi/tasty` package
14+
- Fixed module augmentations in `src/tasty-augment.d.ts` to target `@tenphi/tasty` instead of removed internal modules
15+
- Added `isDevEnv` utility to `src/utils/is-dev-env.ts`

.cursor/rules/guidelines.mdc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ Build tool: `tsdown` (config in `tsdown.config.ts`). Uses unbundled ESM output.
4141

4242
# Stack
4343

44-
- `tasty` style helper.
45-
- `src/tasty` - sources
46-
- `src/stories/Tasty.docs.mdx` - documentation
47-
- `src/stories/Styles.docs.mdx` - custom tasty styles documentation
44+
- `tasty` style helper — external package `@tenphi/tasty`.
45+
- Documentation: https://github.com/tenphi/tasty
4846
- `src/stories/CreateComponent.docs.mdx` - create components using tasty helper.
4947
- Storybook v8.6
5048
- React and React DOM v18

.junie/guidelines.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ Specific test: `$ pnpm test -- {TestFileName}`
3434

3535
# Stack
3636

37-
- `tasty` style helper.
38-
- `src/tasty` - sources
39-
- `src/stories/Tasty.docs.mdx` - documentation
40-
- `src/stories/Styles.docs.mdx` - custom tasty styles documentation
37+
- `tasty` style helper — external package `@tenphi/tasty`.
38+
- Documentation: https://github.com/tenphi/tasty
4139
- `src/stories/CreateComponent.docs.mdx` - create components using tasty helper.
4240
- Storybook v8.6
4341
- React and React DOM v18

.size-limit.cjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ module.exports = [
2727
path: './dist/index.js',
2828
webpack: true,
2929
import: '{ Button }',
30-
limit: '62kB',
31-
},
32-
{
33-
name: 'Tree shaking (just tasty)',
34-
path: './dist/index.js',
35-
webpack: true,
36-
import: '{ tasty }',
37-
limit: '38kB',
30+
limit: '63kB',
3831
},
3932
];

eslint.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// eslint.config.js
22
import js from '@eslint/js';
3+
import tastyPlugin from '@tenphi/eslint-plugin-tasty';
34
import tseslint from '@typescript-eslint/eslint-plugin';
45
import parser from '@typescript-eslint/parser';
56
import importPlugin from 'eslint-plugin-import';
@@ -13,6 +14,9 @@ export default [
1314
// Base JS recommended rules
1415
js.configs.recommended,
1516

17+
// Tasty styling rules
18+
tastyPlugin.configs.recommended,
19+
1620
// Base configuration for all files
1721
{
1822
files: ['**/*.{js,jsx,ts,tsx,mjs,cjs}'],

package.json

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,19 @@
1010
"module": "./dist/index.js",
1111
"types": "./dist/index.d.ts",
1212
"sideEffects": false,
13-
"packageManager": "pnpm@10.30.0",
13+
"packageManager": "pnpm@10.30.3",
1414
"exports": {
1515
".": {
1616
"import": "./dist/index.js",
1717
"types": "./dist/index.d.ts"
18-
},
19-
"./tasty/static": {
20-
"import": "./dist/tasty/static/index.js",
21-
"types": "./dist/tasty/static/index.d.ts"
22-
},
23-
"./tasty/zero": {
24-
"import": "./dist/tasty/zero/index.js",
25-
"types": "./dist/tasty/zero/index.d.ts"
26-
},
27-
"./tasty/zero/babel": {
28-
"import": "./dist/tasty/zero/babel.js",
29-
"types": "./dist/tasty/zero/babel.d.ts"
30-
},
31-
"./tasty/zero/next": {
32-
"import": "./dist/tasty/zero/next.js",
33-
"types": "./dist/tasty/zero/next.d.ts"
3418
}
3519
},
3620
"files": [
3721
"dist/**/*.js",
3822
"dist/**/*.d.ts",
3923
"dist/**/*.map",
4024
"dist/README.md",
41-
"dist/CHANGELOG.md",
42-
"dist/tasty.config.ts"
25+
"dist/CHANGELOG.md"
4326
],
4427
"scripts": {
4528
"start": "pnpm storybook",
@@ -77,8 +60,6 @@
7760
"react-dom": "^18.0.0 || ^19.0.0"
7861
},
7962
"dependencies": {
80-
"@babel/helper-plugin-utils": "^7.24.0",
81-
"@babel/types": "^7.24.0",
8263
"@internationalized/date": "^3.10.1",
8364
"@react-aria/focus": "^3.21.3",
8465
"@react-aria/i18n": "^3.12.14",
@@ -91,6 +72,7 @@
9172
"@react-types/shared": "^3.32.1",
9273
"@tabler/icons-react": "^3.31.0",
9374
"@tanstack/react-virtual": "^3.13.12",
75+
"@tenphi/tasty": "0.5.4",
9476
"clipboard-copy": "^4.0.1",
9577
"clsx": "^1.1.1",
9678
"diff": "^8.0.3",
@@ -129,6 +111,7 @@
129111
"@storybook/addon-docs": "^10.2.3",
130112
"@storybook/addon-links": "^10.2.3",
131113
"@storybook/react-vite": "^10.2.3",
114+
"@tenphi/eslint-plugin-tasty": "^0.3.0",
132115
"@testing-library/dom": "^10.4.1",
133116
"@testing-library/jest-dom": "^6.7.0",
134117
"@testing-library/react": "^16.3.0",
@@ -193,4 +176,4 @@
193176
"node": ">=22.14.0",
194177
"pnpm": "^10.0.0"
195178
}
196-
}
179+
}

0 commit comments

Comments
 (0)