Skip to content

Commit 19a637d

Browse files
committed
refactor(utils): move extract-theme to a separate package
1 parent 8c07955 commit 19a637d

33 files changed

+383
-35
lines changed

apps/website/src/components/copy-css-config/copy-css-config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { component$, useSignal } from '@builder.io/qwik';
22
import { Modal } from '@qwik-ui/headless';
33
import { Button } from '~/components/ui';
4-
import { extractThemeCSS } from '@qwik-ui/utils';
4+
import { extractThemeCSS } from '@qwik-ui/extract-theme';
55
import { LuX } from '@qwikest/icons/lucide';
66
import { useTheme } from '@qwik-ui/themes';
77
import globalCSS from '~/global.css?raw';

apps/website/src/components/make-it-yours/make-it-yours.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
ThemeModes,
88
ThemePrimaryColors,
99
ThemeStyles,
10-
cn,
11-
} from '@qwik-ui/utils';
10+
} from '@qwik-ui/extract-theme';
11+
import { cn } from '@qwik-ui/utils';
1212
import { LuSlidersHorizontal, LuX } from '@qwikest/icons/lucide';
1313
import { useTheme } from '@qwik-ui/themes';
1414

apps/website/src/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
ThemeModes,
1616
ThemePrimaryColors,
1717
ThemeStyles,
18-
} from '@qwik-ui/utils';
18+
} from '@qwik-ui/extract-theme';
1919
import { ModulePreload } from './components/module-preload/module-preload';
2020

2121
export default component$(() => {

packages/cli/bin/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
ThemePrimaryColors,
2828
ThemeStyle,
2929
ThemeStyles,
30-
} from '@qwik-ui/utils';
30+
} from '@qwik-ui/extract-theme';
3131
import { bgRgb, bold, cyan, green, red } from 'ansis';
3232
import { execSync } from 'child_process';
3333
import { existsSync, readFileSync, writeFileSync } from 'fs';

packages/cli/src/generators/setup-tailwind/schema.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ThemeConfig } from '@qwik-ui/utils';
1+
import type { ThemeConfig } from '@qwik-ui/extract-theme';
22

33
export interface SetupTailwindGeneratorSchema extends ThemeConfig {
44
projectRoot?: string;

packages/cli/src/generators/setup-tailwind/setup-tailwind-generator.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing';
2-
import { ThemeBorderRadiuses, ThemePrimaryColors, ThemeStyles } from '@qwik-ui/utils';
2+
import {
3+
ThemeBorderRadiuses,
4+
ThemePrimaryColors,
5+
ThemeStyles,
6+
} from '@qwik-ui/extract-theme';
37
import { SetupTailwindGeneratorSchema } from './schema';
48
import { setupTailwindGenerator } from './setup-tailwind-generator';
59

packages/cli/src/generators/setup-tailwind/setup-tailwind-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
extractBetweenComments,
88
extractThemeCSS,
99
type ThemeConfig,
10-
} from '@qwik-ui/utils';
10+
} from '@qwik-ui/extract-theme';
1111
import { readFileSync } from 'fs';
1212
import { join } from 'path';
1313
import { getKitRoot } from '../../_shared/get-kit-root';

packages/extract-theme/.eslintrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
}
17+
]
18+
}

packages/extract-theme/CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Changelog
2+
3+
## 0.3.1
4+
5+
### Patch Changes
6+
7+
- ✨ new inline component utilities (by [@thejackshelton](https://github.com/thejackshelton) in [#937](https://github.com/qwikifiers/qwik-ui/pull/937))
8+
9+
## 0.3.0
10+
11+
### Minor Changes
12+
13+
- Changed enums to const maps in utils (by [@shairez](https://github.com/shairez) in [#914](https://github.com/qwikifiers/qwik-ui/pull/914))
14+
15+
## 0.2.1
16+
17+
### Patch Changes
18+
19+
- ✨ added `extractThemeCSS` (by [@shairez](https://github.com/shairez) in [#604](https://github.com/qwikifiers/qwik-ui/pull/604))
20+
21+
## 0.2.0
22+
23+
### Minor Changes
24+
25+
- Removed `useOrdinal` (by [@shairez](https://github.com/shairez) in [`4043d29`](https://github.com/qwikifiers/qwik-ui/commit/4043d29dcc39b03f16c79d659da592af3fbeafeb))
26+
27+
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
28+
29+
## [0.1.1](https://github.com/qwikifiers/qwik-ui/compare/utils-0.1.0...utils-0.1.1) (2024-01-09)
30+
31+
# [0.1.0](https://github.com/qwikifiers/qwik-ui/compare/utils-0.0.3...utils-0.1.0) (2023-12-16)
32+
33+
### Bug Fixes
34+
35+
- **docs:** add install / related docs / merge with main ([bb1b62c](https://github.com/qwikifiers/qwik-ui/commit/bb1b62cd87d376858fd706e9b5344603be87127c))
36+
- **everything:** fix 1.3 craziness ([0b20d97](https://github.com/qwikifiers/qwik-ui/commit/0b20d97af41f75bc7e1215391fd1c202ee8a9366))
37+
38+
## [0.0.3](https://github.com/qwikifiers/qwik-ui/compare/utils-0.0.2...utils-0.0.3) (2023-12-01)
39+
40+
## [0.0.2](https://github.com/qwikifiers/qwik-ui/compare/utils-0.0.1...utils-0.0.2) (2023-12-01)
41+
42+
## 0.0.1 (2023-11-30)

packages/extract-theme/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 HiRez.io, Qwikifiers
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)