@exem-ui/tailwindcss3 0.2.0 → 0.3.2-next.20260227091619

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/LICENSE CHANGED
@@ -2,189 +2,189 @@
2
2
  Version 2.0, January 2004
3
3
  http://www.apache.org/licenses/
4
4
 
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- Copyright 2025 EXEM Corporation
179
-
180
- Licensed under the Apache License, Version 2.0 (the "License");
181
- you may not use this file except in compliance with the License.
182
- You may obtain a copy of the License at
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Exem Corporation
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
183
 
184
184
  http://www.apache.org/licenses/LICENSE-2.0
185
185
 
186
- Unless required by applicable law or agreed to in writing, software
187
- distributed under the License is distributed on an "AS IS" BASIS,
188
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
- See the License for the specific language governing permissions and
190
- limitations under the License.
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.en.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <h1 align="center">@exem-ui/tailwindcss3</h1>
3
- <p align="center">Tailwind CSS v3 plugin for the EXEM Design System</p>
3
+ <p align="center">Tailwind CSS v3 plugin for the Exem Design System</p>
4
4
  </p>
5
5
 
6
6
  <p align="center">
@@ -19,11 +19,11 @@
19
19
 
20
20
  ## Introduction
21
21
 
22
- `@exem-ui/tailwindcss3` is a plugin that brings the EXEM Design System's colors, radii, shadows, and more directly into your Tailwind CSS v3 project. Apply the full EXEM theme with a single line using the Preset approach.
22
+ `@exem-ui/tailwindcss3` is a plugin that brings the Exem Design System's colors, radii, shadows, and more directly into your Tailwind CSS v3 project.
23
23
 
24
24
  ## Key Features
25
25
 
26
- - **Preset-based Setup** — Apply the full theme with one line in `tailwind.config`
26
+ - **Plugin-based Setup** — Apply the full theme with one line in `tailwind.config`
27
27
  - **450+ Design Tokens** — Colors, radii, shadows, breakpoints auto-mapped
28
28
  - **CSS Variable Sync** — Automatically synchronized with `@exem-ui/core` CSS custom properties
29
29
  - **Zero Runtime** — Processed at build time with no runtime overhead
@@ -47,53 +47,42 @@ yarn add @exem-ui/tailwindcss3 @exem-ui/core
47
47
 
48
48
  ## Usage
49
49
 
50
- ### Preset (Recommended)
51
-
52
- ```ts
53
- // tailwind.config.ts
54
- import { exemPreset } from '@exem-ui/tailwindcss3/preset';
55
-
56
- export default {
57
- presets: [exemPreset],
58
- content: ['./src/**/*.{ts,tsx}'],
59
- };
60
- ```
61
-
62
- ### Plugin
63
-
64
50
  ```ts
65
51
  // tailwind.config.ts
66
- import { exemPlugin } from '@exem-ui/tailwindcss3';
52
+ import exemPlugin from "@exem-ui/tailwindcss3/plugin";
67
53
 
68
54
  export default {
55
+ darkMode: "class",
69
56
  plugins: [exemPlugin],
70
- content: ['./src/**/*.{ts,tsx}'],
57
+ content: ["./src/**/*.{ts,tsx}"],
71
58
  };
72
59
  ```
73
60
 
74
61
  ### Using Tailwind Utilities
75
62
 
76
63
  ```html
77
- <!-- Use EXEM design tokens as Tailwind classes -->
78
- <div class="bg-solid-accent-default text-text-inverse rounded-medium shadow-medium">
79
- EXEM styled content
64
+ <!-- Use Exem design tokens as Tailwind classes -->
65
+ <div
66
+ class="bg-solid-accent-default text-text-inverse rounded-medium shadow-medium"
67
+ >
68
+ Exem styled content
80
69
  </div>
81
70
  ```
82
71
 
83
72
  ## Export Map
84
73
 
85
- | Path | Description |
86
- |------|-------------|
87
- | `@exem-ui/tailwindcss3` | Main entry (plugin) |
88
- | `@exem-ui/tailwindcss3/preset` | Tailwind Preset |
74
+ | Path | Description |
75
+ | ------------------------------ | -------------------- |
76
+ | `@exem-ui/tailwindcss3` | Main entry (plugin) |
77
+ | `@exem-ui/tailwindcss3/plugin` | Plugin direct import |
89
78
 
90
79
  ## Related Packages
91
80
 
92
- | Package | Description |
93
- |---------|-------------|
94
- | [@exem-ui/core](https://www.npmjs.com/package/@exem-ui/core) | Design tokens, CSS variables |
95
- | [@exem-ui/react](https://www.npmjs.com/package/@exem-ui/react) | React UI components |
96
- | [@exem-ui/tailwindcss4](https://www.npmjs.com/package/@exem-ui/tailwindcss4) | Tailwind CSS v4 theme |
81
+ | Package | Description |
82
+ | ---------------------------------------------------------------------------- | ---------------------------- |
83
+ | [@exem-ui/core](https://www.npmjs.com/package/@exem-ui/core) | Design tokens, CSS variables |
84
+ | [@exem-ui/react](https://www.npmjs.com/package/@exem-ui/react) | React UI components |
85
+ | [@exem-ui/tailwindcss4](https://www.npmjs.com/package/@exem-ui/tailwindcss4) | Tailwind CSS v4 theme |
97
86
 
98
87
  ## License
99
88
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <h1 align="center">@exem-ui/tailwindcss3</h1>
3
- <p align="center">EXEM 디자인 시스템을 위한 Tailwind CSS v3 플러그인</p>
3
+ <p align="center">Exem 디자인 시스템을 위한 Tailwind CSS v3 플러그인</p>
4
4
  </p>
5
5
 
6
6
  <p align="center">
@@ -19,11 +19,11 @@
19
19
 
20
20
  ## 소개
21
21
 
22
- `@exem-ui/tailwindcss3`는 EXEM 디자인 시스템의 색상, 반경, 그림자 등을 Tailwind CSS v3 프로젝트에서 바로 사용할 수 있게 해주는 플러그인입니다. Preset 방식으로 한 줄 설정만으로 EXEM 테마를 적용할 수 있습니다.
22
+ `@exem-ui/tailwindcss3`는 Exem 디자인 시스템의 색상, 반경, 그림자 등을 Tailwind CSS v3 프로젝트에서 바로 사용할 수 있게 해주는 플러그인입니다.
23
23
 
24
24
  ## 주요 특징
25
25
 
26
- - **Preset 기반 설정** — `tailwind.config`에 한 줄 추가로 전체 테마 적용
26
+ - **플러그인 기반 설정** — `tailwind.config`에 한 줄 추가로 전체 테마 적용
27
27
  - **450+ 디자인 토큰** — 색상, 반경, 그림자, 브레이크포인트 자동 매핑
28
28
  - **CSS 변수 연동** — `@exem-ui/core`의 CSS 커스텀 프로퍼티와 자동 동기화
29
29
  - **Zero Runtime** — 빌드 타임에 처리되어 런타임 오버헤드 없음
@@ -49,39 +49,22 @@ yarn add @exem-ui/tailwindcss3 @exem-ui/core
49
49
 
50
50
  ### 1. Tailwind 설정
51
51
 
52
- #### Preset 방식 (권장)
53
-
54
- ```ts
55
- // tailwind.config.ts
56
- import { exemPreset } from '@exem-ui/tailwindcss3/preset';
57
-
58
- export default {
59
- presets: [exemPreset],
60
- darkMode: 'class',
61
- content: ['./src/**/*.{ts,tsx}'],
62
- };
63
- ```
64
-
65
- #### 플러그인 방식
66
-
67
52
  ```ts
68
53
  // tailwind.config.ts
69
- import { exemPlugin } from '@exem-ui/tailwindcss3';
54
+ import exemPlugin from "@exem-ui/tailwindcss3/plugin";
70
55
 
71
56
  export default {
57
+ darkMode: "class",
72
58
  plugins: [exemPlugin],
73
- darkMode: 'class',
74
- content: ['./src/**/*.{ts,tsx}'],
59
+ content: ["./src/**/*.{ts,tsx}"],
75
60
  };
76
61
  ```
77
62
 
78
- > Preset 방식은 플러그인 등록 + 테마 확장을 한 번에 처리합니다.
79
-
80
63
  ### 2. CSS 설정
81
64
 
82
65
  ```css
83
66
  /* globals.css */
84
- @import '@exem-ui/core/css';
67
+ @import "@exem-ui/core/css";
85
68
 
86
69
  @tailwind base;
87
70
  @tailwind components;
@@ -91,26 +74,28 @@ export default {
91
74
  ### Tailwind 유틸리티 사용
92
75
 
93
76
  ```html
94
- <!-- EXEM 디자인 토큰을 Tailwind 클래스로 직접 사용 -->
95
- <div class="bg-solid-accent-default text-text-inverse rounded-medium shadow-medium">
96
- EXEM 스타일 적용됨
77
+ <!-- Exem 디자인 토큰을 Tailwind 클래스로 직접 사용 -->
78
+ <div
79
+ class="bg-solid-accent-default text-text-inverse rounded-medium shadow-medium"
80
+ >
81
+ Exem 스타일 적용됨
97
82
  </div>
98
83
  ```
99
84
 
100
85
  ## Export Map
101
86
 
102
- | 경로 | 설명 |
103
- |------|------|
104
- | `@exem-ui/tailwindcss3` | 메인 엔트리 (플러그인) |
105
- | `@exem-ui/tailwindcss3/preset` | Tailwind Preset (권장) |
87
+ | 경로 | 설명 |
88
+ | ------------------------------ | ---------------------- |
89
+ | `@exem-ui/tailwindcss3` | 메인 엔트리 (플러그인) |
90
+ | `@exem-ui/tailwindcss3/plugin` | 플러그인 직접 import |
106
91
 
107
92
  ## 관련 패키지
108
93
 
109
- | 패키지 | 설명 |
110
- |--------|------|
111
- | [@exem-ui/core](https://www.npmjs.com/package/@exem-ui/core) | 디자인 토큰, CSS 변수 |
112
- | [@exem-ui/react](https://www.npmjs.com/package/@exem-ui/react) | React UI 컴포넌트 |
113
- | [@exem-ui/tailwindcss4](https://www.npmjs.com/package/@exem-ui/tailwindcss4) | Tailwind CSS v4 테마 |
94
+ | 패키지 | 설명 |
95
+ | ---------------------------------------------------------------------------- | --------------------- |
96
+ | [@exem-ui/core](https://www.npmjs.com/package/@exem-ui/core) | 디자인 토큰, CSS 변수 |
97
+ | [@exem-ui/react](https://www.npmjs.com/package/@exem-ui/react) | React UI 컴포넌트 |
98
+ | [@exem-ui/tailwindcss4](https://www.npmjs.com/package/@exem-ui/tailwindcss4) | Tailwind CSS v4 테마 |
114
99
 
115
100
  ## 라이선스
116
101
 
@@ -92,5 +92,5 @@ var plugin_default = plugin(
92
92
  );
93
93
 
94
94
  export { plugin_default };
95
- //# sourceMappingURL=chunk-GQI4KKR5.mjs.map
96
- //# sourceMappingURL=chunk-GQI4KKR5.mjs.map
95
+ //# sourceMappingURL=chunk-NS2LEUJB.mjs.map
96
+ //# sourceMappingURL=chunk-NS2LEUJB.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/plugin.ts"],"names":[],"mappings":";;;;AAgBA,SAAS,gBAAgB,SAAA,EAAkC;AACzD,EAAA,MAAM,QAAA,uBAAe,GAAA,EAAY;AAEjC,EAAA,KAAA,MAAW,O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ACE;AAAA,UACE,CAAC,CAAA,YAAA,EAAe,IAAI,CAAA,CAAE,GAAG,CAAC,SAAA,MAAuB;AAAA,YAC/C,eAAA,EAAiB,CAAA,gBAAA,EAAmB,SAAS,CAAA,EAAA,EAAK,UAAU,CAAA,CAAA;AAAA,WAC9D;AAAA,SACF;AAAA,QACA;AAAA,UACE,MAAA,EAAQ,EAAE,GAAG,kBAAA;AAAmB;AAClC,OACF;AAAA,IACF;AAAA,EACF,CAAA;AAAA,EACA;AAAA,IACE,UAAU,wBAAA,EAAyB;AAAA,IACnC,KAAA,EAAO;AAAA,MACL,OAAA,EAAS;AAAA,QACP,GAAG;AAAA,OACL;AAAA,MACA,SAAA,EAAW;AAAA,QACT,GAAG;AAAA,OACL;AAAA,MACA,QAAA,EAAU;AAAA,QACR,GAAG;AAAA,OACL;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,MAAA,EAAQ;AAAA,UACN,GAAG;AAAA,SACL;AAAA,QACA,YAAA,EAAc;AAAA,UACZ,GAAG;AAAA;AACL;AACF;AACF;AAEJ","file":"chunk-GQI4KKR5.mjs","sourcesContent":["import {\n breakpoint,\n colorKebab,\n fontPreset,\n gradientDirections,\n gradientTokens,\n radius,\n shadow,\n textPreset,\n} from '@exem-ui/core/tailwindcss';\nimport plugin from 'tailwindcss/plugin';\n\n/**\n * 토큰에서 prefix 그룹을 추출하는 함수.\n * 예: 'text-primary' -> 'text', 'solid-accent-default' -> 'solid'\n */\nfunction extractPrefixes(tokenKeys: string[]): Set<string> {\n const prefixes = new Set<string>();\n\n for (const key of tokenKeys) {\n const firstPart = key.split('-')[0];\n if (firstPart) {\n prefixes.add(firstPart);\n }\n }\n\n return prefixes;\n}\n\n/**\n * 동적으로 safelist 패턴을 생성합니다.\n * 토큰에서 자동으로 prefix를 추출하여 패턴을 만듭니다.\n * 토큰이 변경되면 safelist도 자동으로 업데이트됩니다.\n */\nfunction generateSafelistPatterns() {\n const colorKeys = Object.keys(colorKebab);\n const radiusKeys = Object.keys(radius);\n const shadowKeys = Object.keys(shadow);\n\n const colorPrefixes = extractPrefixes(colorKeys);\n const patterns: Array<{ pattern: RegExp }> = [];\n\n // 배경색 패턴 (bg-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^bg-${prefix}-.+$`) });\n }\n\n // 텍스트 색상 패턴 (text-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^text-${prefix}-.+$`) });\n }\n\n // 보더 색상 패턴 (border-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^border-${prefix}-.+$`) });\n }\n\n // 반경 패턴 (rounded-)\n for (const key of radiusKeys) {\n patterns.push({ pattern: new RegExp(`^rounded-${key}$`) });\n }\n\n // 그림자 패턴 (shadow-)\n for (const key of shadowKeys) {\n patterns.push({ pattern: new RegExp(`^shadow-${key}$`) });\n }\n\n // 폰트 크기 패턴\n patterns.push({ pattern: /^text-(header|title|body|caption)-.+$/ });\n patterns.push({ pattern: /^text-code$/ });\n\n // 폰트 스타일 패턴 (fontPreset 토큰에서 자동 생성)\n const fontPresetKeys = Object.keys(fontPreset).join('|');\n patterns.push({ pattern: new RegExp(`^font-(${fontPresetKeys})$`) });\n\n return patterns;\n}\n\n/**\n * EXEM 디자인 시스템 Tailwind CSS(v3.x) 플러그인.\n *\n * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고\n * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.\n *\n * 제공 기능:\n * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)\n * - 반경: weak, medium, strong, hard (extend)\n * - 그림자: weak, medium, strong, hard\n * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code\n * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등\n * - 브레이크포인트: md, lg, xl\n * - 동적 safelist: 토큰 기반 자동 패턴 생성\n *\n * @example\n * ```ts\n * // tailwind.config.ts\n * import exemPlugin from '@exem-ui/tailwindcss3';\n *\n * export default {\n * plugins: [exemPlugin],\n * };\n * ```\n */\nexport default plugin(\n ({ matchUtilities, addUtilities }) => {\n // font-* 유틸리티 (fontWeight + lineHeight)\n const fontUtilities: Record<string, Record<string, string>> = {};\n for (const [name, value] of Object.entries(fontPreset)) {\n fontUtilities[`.font-${name}`] = {\n 'font-weight': value.fontWeight,\n 'line-height': value.lineHeight,\n };\n }\n addUtilities(fontUtilities);\n\n // text-code: font-family 오버라이드 (font-size는 theme.fontSize에서 처리)\n addUtilities({\n '.text-code': {\n 'font-family': \"'JetBrains Mono', monospace\",\n },\n });\n\n for (const [name, colorStops] of Object.entries(gradientTokens)) {\n matchUtilities(\n {\n [`bg-gradient-${name}`]: (direction: string) => ({\n backgroundImage: `linear-gradient(${direction}, ${colorStops})`,\n }),\n },\n {\n values: { ...gradientDirections },\n },\n );\n }\n },\n {\n safelist: generateSafelistPatterns(),\n theme: {\n screens: {\n ...breakpoint,\n },\n boxShadow: {\n ...shadow,\n },\n fontSize: {\n ...textPreset,\n },\n extend: {\n colors: {\n ...colorKebab,\n },\n borderRadius: {\n ...radius,\n },\n },\n },\n },\n);\n"]}
1
+ {"version":3,"sources":["../src/plugin.ts"],"names":[],"mappings":";;;;AAgBA,SAAS,gBAAgB,SAAA,EAAkC;AACzD,EAAA,MAAM,QAAA,uBAAe,GAAA,EAAY;AAEjC,EAAA,KAAA,MAAW,OAAO,SAAA,EAAW;AAC3B,IAAA,MAAM,SAAA,GAAY,GAAA,CAAI,KAAA,CAAM,GAAG,EAAE,CAAC,CAAA;AAClC,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,QAAA,CAAS,IAAI,SAAS,CAAA;AAAA,IACxB;AAAA,EACF;AAEA,EAAA,OAAO,QAAA;AACT;AAOA,SAAS,wBAAA,GAA2B;AAClC,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,IAAA,CAAK,UAAU,CAAA;AACxC,EAAA,MAAM,UAAA,GAAa,MAAA,CAAO,IAAA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O;AAAA,MACL,OAAA,EAAS;AAAA,QACP,GAAG;AAAA,OACL;AAAA,MACA,SAAA,EAAW;AAAA,QACT,GAAG;AAAA,OACL;AAAA,MACA,QAAA,EAAU;AAAA,QACR,GAAG;AAAA,OACL;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,MAAA,EAAQ;AAAA,UACN,GAAG;AAAA,SACL;AAAA,QACA,YAAA,EAAc;AAAA,UACZ,GAAG;AAAA;AACL;AACF;AACF;AAEJ","file":"chunk-NS2LEUJB.mjs","sourcesContent":["import {\n breakpoint,\n colorKebab,\n fontPreset,\n gradientDirections,\n gradientTokens,\n radius,\n shadow,\n textPreset,\n} from '@exem-ui/core/tailwindcss';\nimport plugin from 'tailwindcss/plugin';\n\n/**\n * 토큰에서 prefix 그룹을 추출하는 함수.\n * 예: 'text-primary' -> 'text', 'solid-accent-default' -> 'solid'\n */\nfunction extractPrefixes(tokenKeys: string[]): Set<string> {\n const prefixes = new Set<string>();\n\n for (const key of tokenKeys) {\n const firstPart = key.split('-')[0];\n if (firstPart) {\n prefixes.add(firstPart);\n }\n }\n\n return prefixes;\n}\n\n/**\n * 동적으로 safelist 패턴을 생성합니다.\n * 토큰에서 자동으로 prefix를 추출하여 패턴을 만듭니다.\n * 토큰이 변경되면 safelist도 자동으로 업데이트됩니다.\n */\nfunction generateSafelistPatterns() {\n const colorKeys = Object.keys(colorKebab);\n const radiusKeys = Object.keys(radius);\n const shadowKeys = Object.keys(shadow);\n\n const colorPrefixes = extractPrefixes(colorKeys);\n const patterns: Array<{ pattern: RegExp }> = [];\n\n // 배경색 패턴 (bg-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^bg-${prefix}-.+$`) });\n }\n\n // 텍스트 색상 패턴 (text-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^text-${prefix}-.+$`) });\n }\n\n // 보더 색상 패턴 (border-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^border-${prefix}-.+$`) });\n }\n\n // 반경 패턴 (rounded-)\n for (const key of radiusKeys) {\n patterns.push({ pattern: new RegExp(`^rounded-${key}$`) });\n }\n\n // 그림자 패턴 (shadow-)\n for (const key of shadowKeys) {\n patterns.push({ pattern: new RegExp(`^shadow-${key}$`) });\n }\n\n // 폰트 크기 패턴\n patterns.push({ pattern: /^text-(header|title|body|caption)-.+$/ });\n patterns.push({ pattern: /^text-code$/ });\n\n // 폰트 스타일 패턴 (fontPreset 토큰에서 자동 생성)\n const fontPresetKeys = Object.keys(fontPreset).join('|');\n patterns.push({ pattern: new RegExp(`^font-(${fontPresetKeys})$`) });\n\n return patterns;\n}\n\n/**\n * Exem 디자인 시스템 Tailwind CSS(v3.x) 플러그인.\n *\n * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고\n * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.\n *\n * 제공 기능:\n * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)\n * - 반경: weak, medium, strong, hard (extend)\n * - 그림자: weak, medium, strong, hard\n * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code\n * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등\n * - 브레이크포인트: md, lg, xl\n * - 동적 safelist: 토큰 기반 자동 패턴 생성\n *\n * @example\n * ```ts\n * // tailwind.config.ts\n * import exemPlugin from '@exem-ui/tailwindcss3';\n *\n * export default {\n * plugins: [exemPlugin],\n * };\n * ```\n */\nexport default plugin(\n ({ matchUtilities, addUtilities }) => {\n // font-* 유틸리티 (fontWeight + lineHeight)\n const fontUtilities: Record<string, Record<string, string>> = {};\n for (const [name, value] of Object.entries(fontPreset)) {\n fontUtilities[`.font-${name}`] = {\n 'font-weight': value.fontWeight,\n 'line-height': value.lineHeight,\n };\n }\n addUtilities(fontUtilities);\n\n // text-code: font-family 오버라이드 (font-size는 theme.fontSize에서 처리)\n addUtilities({\n '.text-code': {\n 'font-family': \"'JetBrains Mono', monospace\",\n },\n });\n\n for (const [name, colorStops] of Object.entries(gradientTokens)) {\n matchUtilities(\n {\n [`bg-gradient-${name}`]: (direction: string) => ({\n backgroundImage: `linear-gradient(${direction}, ${colorStops})`,\n }),\n },\n {\n values: { ...gradientDirections },\n },\n );\n }\n },\n {\n safelist: generateSafelistPatterns(),\n theme: {\n screens: {\n ...breakpoint,\n },\n boxShadow: {\n ...shadow,\n },\n fontSize: {\n ...textPreset,\n },\n extend: {\n colors: {\n ...colorKebab,\n },\n borderRadius: {\n ...radius,\n },\n },\n },\n },\n);\n"]}
package/dist/index.d.mts CHANGED
@@ -1,33 +1,6 @@
1
- import * as tailwindcss_types_config from 'tailwindcss/types/config';
1
+ import _default from './plugin.mjs';
2
+ import 'tailwindcss/types/config';
3
+
2
4
 
3
- /**
4
- * EXEM 디자인 시스템 Tailwind CSS(v3.x) 플러그인.
5
- *
6
- * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고
7
- * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.
8
- *
9
- * 제공 기능:
10
- * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)
11
- * - 반경: weak, medium, strong, hard (extend)
12
- * - 그림자: weak, medium, strong, hard
13
- * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code
14
- * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등
15
- * - 브레이크포인트: md, lg, xl
16
- * - 동적 safelist: 토큰 기반 자동 패턴 생성
17
- *
18
- * @example
19
- * ```ts
20
- * // tailwind.config.ts
21
- * import exemPlugin from '@exem-ui/tailwindcss3';
22
- *
23
- * export default {
24
- * plugins: [exemPlugin],
25
- * };
26
- * ```
27
- */
28
- declare const _default: {
29
- handler: tailwindcss_types_config.PluginCreator;
30
- config?: Partial<tailwindcss_types_config.Config>;
31
- };
32
5
 
33
6
  export { _default as default };
package/dist/index.d.ts CHANGED
@@ -1,33 +1,6 @@
1
- import * as tailwindcss_types_config from 'tailwindcss/types/config';
1
+ import _default from './plugin.js';
2
+ import 'tailwindcss/types/config';
3
+
2
4
 
3
- /**
4
- * EXEM 디자인 시스템 Tailwind CSS(v3.x) 플러그인.
5
- *
6
- * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고
7
- * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.
8
- *
9
- * 제공 기능:
10
- * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)
11
- * - 반경: weak, medium, strong, hard (extend)
12
- * - 그림자: weak, medium, strong, hard
13
- * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code
14
- * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등
15
- * - 브레이크포인트: md, lg, xl
16
- * - 동적 safelist: 토큰 기반 자동 패턴 생성
17
- *
18
- * @example
19
- * ```ts
20
- * // tailwind.config.ts
21
- * import exemPlugin from '@exem-ui/tailwindcss3';
22
- *
23
- * export default {
24
- * plugins: [exemPlugin],
25
- * };
26
- * ```
27
- */
28
- declare const _default: {
29
- handler: tailwindcss_types_config.PluginCreator;
30
- config?: Partial<tailwindcss_types_config.Config>;
31
- };
32
5
 
33
6
  export { _default as default };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/plugin.ts","../src/index.ts"],"names":["colorKebab","radius","shadow","fontPreset","plugin","gradientTokens","gradientDirections","breakpoint","textPreset"],"mappings":";;;;;;;;;;AAgBA,SAAS,gBAAgB,SAAA,EAAkC;AACzD,EAAA,MAAM,QAAA,uBAAe,GAAA,EAAY;AAEjC,EAAA,KAAA,MAAW,OAAO,SAAA,EAAW;AAC3B,IAAA,MAAM,SAAA,GAAY,GAAA,CAAI,KAAA,CAAM,GAAG,EAAE,CAAC,CAAA;AAClC,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,QAAA,CAAS,IAAI,SAAS,CAAA;AAAA,IACxB;AAAA,EACF;AAEA,EAAA,OA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ACF;AAAA,QACA;AAAA,UACE,MAAA,EAAQ,EAAE,GAAGC,8BAAA;AAAmB;AAClC,OACF;AAAA,IACF;AAAA,EACF,CAAA;AAAA,EACA;AAAA,IACE,UAAU,wBAAA,EAAyB;AAAA,IACnC,KAAA,EAAO;AAAA,MACL,OAAA,EAAS;AAAA,QACP,GAAGC;AAAA,OACL;AAAA,MACA,SAAA,EAAW;AAAA,QACT,GAAGL;AAAA,OACL;AAAA,MACA,QAAA,EAAU;AAAA,QACR,GAAGM;AAAA,OACL;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,MAAA,EAAQ;AAAA,UACN,GAAGR;AAAA,SACL;AAAA,QACA,YAAA,EAAc;AAAA,UACZ,GAAGC;AAAA;AACL;AACF;AACF;AAEJ,CAAA;;;AC3JA,IAAO,WAAA,GAAQ","file":"index.js","sourcesContent":["import {\n breakpoint,\n colorKebab,\n fontPreset,\n gradientDirections,\n gradientTokens,\n radius,\n shadow,\n textPreset,\n} from '@exem-ui/core/tailwindcss';\nimport plugin from 'tailwindcss/plugin';\n\n/**\n * 토큰에서 prefix 그룹을 추출하는 함수.\n * 예: 'text-primary' -> 'text', 'solid-accent-default' -> 'solid'\n */\nfunction extractPrefixes(tokenKeys: string[]): Set<string> {\n const prefixes = new Set<string>();\n\n for (const key of tokenKeys) {\n const firstPart = key.split('-')[0];\n if (firstPart) {\n prefixes.add(firstPart);\n }\n }\n\n return prefixes;\n}\n\n/**\n * 동적으로 safelist 패턴을 생성합니다.\n * 토큰에서 자동으로 prefix를 추출하여 패턴을 만듭니다.\n * 토큰이 변경되면 safelist도 자동으로 업데이트됩니다.\n */\nfunction generateSafelistPatterns() {\n const colorKeys = Object.keys(colorKebab);\n const radiusKeys = Object.keys(radius);\n const shadowKeys = Object.keys(shadow);\n\n const colorPrefixes = extractPrefixes(colorKeys);\n const patterns: Array<{ pattern: RegExp }> = [];\n\n // 배경색 패턴 (bg-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^bg-${prefix}-.+$`) });\n }\n\n // 텍스트 색상 패턴 (text-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^text-${prefix}-.+$`) });\n }\n\n // 보더 색상 패턴 (border-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^border-${prefix}-.+$`) });\n }\n\n // 반경 패턴 (rounded-)\n for (const key of radiusKeys) {\n patterns.push({ pattern: new RegExp(`^rounded-${key}$`) });\n }\n\n // 그림자 패턴 (shadow-)\n for (const key of shadowKeys) {\n patterns.push({ pattern: new RegExp(`^shadow-${key}$`) });\n }\n\n // 폰트 크기 패턴\n patterns.push({ pattern: /^text-(header|title|body|caption)-.+$/ });\n patterns.push({ pattern: /^text-code$/ });\n\n // 폰트 스타일 패턴 (fontPreset 토큰에서 자동 생성)\n const fontPresetKeys = Object.keys(fontPreset).join('|');\n patterns.push({ pattern: new RegExp(`^font-(${fontPresetKeys})$`) });\n\n return patterns;\n}\n\n/**\n * EXEM 디자인 시스템 Tailwind CSS(v3.x) 플러그인.\n *\n * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고\n * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.\n *\n * 제공 기능:\n * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)\n * - 반경: weak, medium, strong, hard (extend)\n * - 그림자: weak, medium, strong, hard\n * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code\n * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등\n * - 브레이크포인트: md, lg, xl\n * - 동적 safelist: 토큰 기반 자동 패턴 생성\n *\n * @example\n * ```ts\n * // tailwind.config.ts\n * import exemPlugin from '@exem-ui/tailwindcss3';\n *\n * export default {\n * plugins: [exemPlugin],\n * };\n * ```\n */\nexport default plugin(\n ({ matchUtilities, addUtilities }) => {\n // font-* 유틸리티 (fontWeight + lineHeight)\n const fontUtilities: Record<string, Record<string, string>> = {};\n for (const [name, value] of Object.entries(fontPreset)) {\n fontUtilities[`.font-${name}`] = {\n 'font-weight': value.fontWeight,\n 'line-height': value.lineHeight,\n };\n }\n addUtilities(fontUtilities);\n\n // text-code: font-family 오버라이드 (font-size는 theme.fontSize에서 처리)\n addUtilities({\n '.text-code': {\n 'font-family': \"'JetBrains Mono', monospace\",\n },\n });\n\n for (const [name, colorStops] of Object.entries(gradientTokens)) {\n matchUtilities(\n {\n [`bg-gradient-${name}`]: (direction: string) => ({\n backgroundImage: `linear-gradient(${direction}, ${colorStops})`,\n }),\n },\n {\n values: { ...gradientDirections },\n },\n );\n }\n },\n {\n safelist: generateSafelistPatterns(),\n theme: {\n screens: {\n ...breakpoint,\n },\n boxShadow: {\n ...shadow,\n },\n fontSize: {\n ...textPreset,\n },\n extend: {\n colors: {\n ...colorKebab,\n },\n borderRadius: {\n ...radius,\n },\n },\n },\n },\n);\n","import plugin from './plugin';\n\nexport default plugin;\n"]}
1
+ {"version":3,"sources":["../src/plugin.ts","../src/index.ts"],"names":["colorKebab","radius","shadow","fontPreset","plugin","gradientTokens","gradientDirections","breakpoint","textPreset"],"mappings":";;;;;;;;;;AAgBA,SAAS,gBAAgB,SAAA,EAAkC;AACzD,EAAA,MAAM,QAAA,uBAAe,GAAA,EAAY;AAEjC,EAAA,KAAA,MAAW,OAAO,SAAA,EAAW;AAC3B,IAAA,MAAM,SAAA,GAAY,GAAA,CAAI,KAAA,CAAM,GAAG,EAAE,CAAC,CAAA;AAClC,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,QAAA,CAAS,IAAI,SAAS,CAAA;AAAA,IACxB;AAAA,EACF;AAEA,EAAA,OAAO,QAAA;AACT;AAOA,SAAS,wBAAA,GAA2B;AAClC,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,IAAA,CAAKA,sBAAU,CAAA;AACxC,EAAA,MAAM,UAAA,GAAa,MAAA,CAAO,IAAA,CAAKC,kBAAM,CAAA;AACrC,EAAA,MAAM,UAAA,GAAa,MAAA,C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A,OACL;AAAA,MACA,SAAA,EAAW;AAAA,QACT,GAAGL;AAAA,OACL;AAAA,MACA,QAAA,EAAU;AAAA,QACR,GAAGM;AAAA,OACL;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,MAAA,EAAQ;AAAA,UACN,GAAGR;AAAA,SACL;AAAA,QACA,YAAA,EAAc;AAAA,UACZ,GAAGC;AAAA;AACL;AACF;AACF;AAEJ,CAAA;;;AC3JA,IAAO,WAAA,GAAQ","file":"index.js","sourcesContent":["import {\n breakpoint,\n colorKebab,\n fontPreset,\n gradientDirections,\n gradientTokens,\n radius,\n shadow,\n textPreset,\n} from '@exem-ui/core/tailwindcss';\nimport plugin from 'tailwindcss/plugin';\n\n/**\n * 토큰에서 prefix 그룹을 추출하는 함수.\n * 예: 'text-primary' -> 'text', 'solid-accent-default' -> 'solid'\n */\nfunction extractPrefixes(tokenKeys: string[]): Set<string> {\n const prefixes = new Set<string>();\n\n for (const key of tokenKeys) {\n const firstPart = key.split('-')[0];\n if (firstPart) {\n prefixes.add(firstPart);\n }\n }\n\n return prefixes;\n}\n\n/**\n * 동적으로 safelist 패턴을 생성합니다.\n * 토큰에서 자동으로 prefix를 추출하여 패턴을 만듭니다.\n * 토큰이 변경되면 safelist도 자동으로 업데이트됩니다.\n */\nfunction generateSafelistPatterns() {\n const colorKeys = Object.keys(colorKebab);\n const radiusKeys = Object.keys(radius);\n const shadowKeys = Object.keys(shadow);\n\n const colorPrefixes = extractPrefixes(colorKeys);\n const patterns: Array<{ pattern: RegExp }> = [];\n\n // 배경색 패턴 (bg-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^bg-${prefix}-.+$`) });\n }\n\n // 텍스트 색상 패턴 (text-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^text-${prefix}-.+$`) });\n }\n\n // 보더 색상 패턴 (border-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^border-${prefix}-.+$`) });\n }\n\n // 반경 패턴 (rounded-)\n for (const key of radiusKeys) {\n patterns.push({ pattern: new RegExp(`^rounded-${key}$`) });\n }\n\n // 그림자 패턴 (shadow-)\n for (const key of shadowKeys) {\n patterns.push({ pattern: new RegExp(`^shadow-${key}$`) });\n }\n\n // 폰트 크기 패턴\n patterns.push({ pattern: /^text-(header|title|body|caption)-.+$/ });\n patterns.push({ pattern: /^text-code$/ });\n\n // 폰트 스타일 패턴 (fontPreset 토큰에서 자동 생성)\n const fontPresetKeys = Object.keys(fontPreset).join('|');\n patterns.push({ pattern: new RegExp(`^font-(${fontPresetKeys})$`) });\n\n return patterns;\n}\n\n/**\n * Exem 디자인 시스템 Tailwind CSS(v3.x) 플러그인.\n *\n * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고\n * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.\n *\n * 제공 기능:\n * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)\n * - 반경: weak, medium, strong, hard (extend)\n * - 그림자: weak, medium, strong, hard\n * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code\n * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등\n * - 브레이크포인트: md, lg, xl\n * - 동적 safelist: 토큰 기반 자동 패턴 생성\n *\n * @example\n * ```ts\n * // tailwind.config.ts\n * import exemPlugin from '@exem-ui/tailwindcss3';\n *\n * export default {\n * plugins: [exemPlugin],\n * };\n * ```\n */\nexport default plugin(\n ({ matchUtilities, addUtilities }) => {\n // font-* 유틸리티 (fontWeight + lineHeight)\n const fontUtilities: Record<string, Record<string, string>> = {};\n for (const [name, value] of Object.entries(fontPreset)) {\n fontUtilities[`.font-${name}`] = {\n 'font-weight': value.fontWeight,\n 'line-height': value.lineHeight,\n };\n }\n addUtilities(fontUtilities);\n\n // text-code: font-family 오버라이드 (font-size는 theme.fontSize에서 처리)\n addUtilities({\n '.text-code': {\n 'font-family': \"'JetBrains Mono', monospace\",\n },\n });\n\n for (const [name, colorStops] of Object.entries(gradientTokens)) {\n matchUtilities(\n {\n [`bg-gradient-${name}`]: (direction: string) => ({\n backgroundImage: `linear-gradient(${direction}, ${colorStops})`,\n }),\n },\n {\n values: { ...gradientDirections },\n },\n );\n }\n },\n {\n safelist: generateSafelistPatterns(),\n theme: {\n screens: {\n ...breakpoint,\n },\n boxShadow: {\n ...shadow,\n },\n fontSize: {\n ...textPreset,\n },\n extend: {\n colors: {\n ...colorKebab,\n },\n borderRadius: {\n ...radius,\n },\n },\n },\n },\n);\n","import plugin from './plugin';\n\nexport default plugin;\n"]}
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { plugin_default } from './chunk-GQI4KKR5.mjs';
1
+ import { plugin_default } from './chunk-NS2LEUJB.mjs';
2
2
 
3
3
  // src/index.ts
4
4
  var src_default = plugin_default;
@@ -0,0 +1,33 @@
1
+ import * as tailwindcss_types_config from 'tailwindcss/types/config';
2
+
3
+ /**
4
+ * Exem 디자인 시스템 Tailwind CSS(v3.x) 플러그인.
5
+ *
6
+ * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고
7
+ * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.
8
+ *
9
+ * 제공 기능:
10
+ * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)
11
+ * - 반경: weak, medium, strong, hard (extend)
12
+ * - 그림자: weak, medium, strong, hard
13
+ * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code
14
+ * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등
15
+ * - 브레이크포인트: md, lg, xl
16
+ * - 동적 safelist: 토큰 기반 자동 패턴 생성
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * // tailwind.config.ts
21
+ * import exemPlugin from '@exem-ui/tailwindcss3';
22
+ *
23
+ * export default {
24
+ * plugins: [exemPlugin],
25
+ * };
26
+ * ```
27
+ */
28
+ declare const _default: {
29
+ handler: tailwindcss_types_config.PluginCreator;
30
+ config?: Partial<tailwindcss_types_config.Config>;
31
+ };
32
+
33
+ export { _default as default };
@@ -0,0 +1,33 @@
1
+ import * as tailwindcss_types_config from 'tailwindcss/types/config';
2
+
3
+ /**
4
+ * Exem 디자인 시스템 Tailwind CSS(v3.x) 플러그인.
5
+ *
6
+ * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고
7
+ * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.
8
+ *
9
+ * 제공 기능:
10
+ * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)
11
+ * - 반경: weak, medium, strong, hard (extend)
12
+ * - 그림자: weak, medium, strong, hard
13
+ * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code
14
+ * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등
15
+ * - 브레이크포인트: md, lg, xl
16
+ * - 동적 safelist: 토큰 기반 자동 패턴 생성
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * // tailwind.config.ts
21
+ * import exemPlugin from '@exem-ui/tailwindcss3';
22
+ *
23
+ * export default {
24
+ * plugins: [exemPlugin],
25
+ * };
26
+ * ```
27
+ */
28
+ declare const _default: {
29
+ handler: tailwindcss_types_config.PluginCreator;
30
+ config?: Partial<tailwindcss_types_config.Config>;
31
+ };
32
+
33
+ export { _default as default };
@@ -97,13 +97,6 @@ var plugin_default = plugin__default.default(
97
97
  }
98
98
  );
99
99
 
100
- // src/preset.ts
101
- var preset = {
102
- content: [],
103
- plugins: [plugin_default]
104
- };
105
- var preset_default = preset;
106
-
107
- module.exports = preset_default;
108
- //# sourceMappingURL=preset.js.map
109
- //# sourceMappingURL=preset.js.map
100
+ module.exports = plugin_default;
101
+ //# sourceMappingURL=plugin.js.map
102
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/plugin.ts"],"names":["colorKebab","radius","shadow","fontPreset","plugin","gradientTokens","gradientDir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EAAe;AAAA;AACjB,KACD,CAAA;AAED,IAAA,KAAA,MAAW,CAAC,IAAA,EAAM,UAAU,KAAK,MAAA,CAAO,OAAA,CAAQE,0BAAc,CAAA,EAAG;AAC/D,MAAA,cAAA;AAAA,QACE;AAAA,UACE,CAAC,CAAA,YAAA,EAAe,IAAI,CAAA,CAAE,GAAG,CAAC,SAAA,MAAuB;AAAA,YAC/C,eAAA,EAAiB,CAAA,gBAAA,EAAmB,SAAS,CAAA,EAAA,EAAK,UAAU,CAAA,CAAA;AAAA,WAC9D;AAAA,SACF;AAAA,QACA;AAAA,UACE,MAAA,EAAQ,EAAE,GAAGC,8BAAA;AAAmB;AAClC,OACF;AAAA,IACF;AAAA,EACF,CAAA;AAAA,EACA;AAAA,IACE,UAAU,wBAAA,EAAyB;AAAA,IACnC,KAAA,EAAO;AAAA,MACL,OAAA,EAAS;AAAA,QACP,GAAGC;AAAA,OACL;AAAA,MACA,SAAA,EAAW;AAAA,QACT,GAAGL;AAAA,OACL;AAAA,MACA,QAAA,EAAU;AAAA,QACR,GAAGM;AAAA,OACL;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,MAAA,EAAQ;AAAA,UACN,GAAGR;AAAA,SACL;AAAA,QACA,YAAA,EAAc;AAAA,UACZ,GAAGC;AAAA;AACL;AACF;AACF;AAEJ","file":"plugin.js","sourcesContent":["import {\n breakpoint,\n colorKebab,\n fontPreset,\n gradientDirections,\n gradientTokens,\n radius,\n shadow,\n textPreset,\n} from '@exem-ui/core/tailwindcss';\nimport plugin from 'tailwindcss/plugin';\n\n/**\n * 토큰에서 prefix 그룹을 추출하는 함수.\n * 예: 'text-primary' -> 'text', 'solid-accent-default' -> 'solid'\n */\nfunction extractPrefixes(tokenKeys: string[]): Set<string> {\n const prefixes = new Set<string>();\n\n for (const key of tokenKeys) {\n const firstPart = key.split('-')[0];\n if (firstPart) {\n prefixes.add(firstPart);\n }\n }\n\n return prefixes;\n}\n\n/**\n * 동적으로 safelist 패턴을 생성합니다.\n * 토큰에서 자동으로 prefix를 추출하여 패턴을 만듭니다.\n * 토큰이 변경되면 safelist도 자동으로 업데이트됩니다.\n */\nfunction generateSafelistPatterns() {\n const colorKeys = Object.keys(colorKebab);\n const radiusKeys = Object.keys(radius);\n const shadowKeys = Object.keys(shadow);\n\n const colorPrefixes = extractPrefixes(colorKeys);\n const patterns: Array<{ pattern: RegExp }> = [];\n\n // 배경색 패턴 (bg-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^bg-${prefix}-.+$`) });\n }\n\n // 텍스트 색상 패턴 (text-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^text-${prefix}-.+$`) });\n }\n\n // 보더 색상 패턴 (border-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^border-${prefix}-.+$`) });\n }\n\n // 반경 패턴 (rounded-)\n for (const key of radiusKeys) {\n patterns.push({ pattern: new RegExp(`^rounded-${key}$`) });\n }\n\n // 그림자 패턴 (shadow-)\n for (const key of shadowKeys) {\n patterns.push({ pattern: new RegExp(`^shadow-${key}$`) });\n }\n\n // 폰트 크기 패턴\n patterns.push({ pattern: /^text-(header|title|body|caption)-.+$/ });\n patterns.push({ pattern: /^text-code$/ });\n\n // 폰트 스타일 패턴 (fontPreset 토큰에서 자동 생성)\n const fontPresetKeys = Object.keys(fontPreset).join('|');\n patterns.push({ pattern: new RegExp(`^font-(${fontPresetKeys})$`) });\n\n return patterns;\n}\n\n/**\n * Exem 디자인 시스템 Tailwind CSS(v3.x) 플러그인.\n *\n * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고\n * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.\n *\n * 제공 기능:\n * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)\n * - 반경: weak, medium, strong, hard (extend)\n * - 그림자: weak, medium, strong, hard\n * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code\n * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등\n * - 브레이크포인트: md, lg, xl\n * - 동적 safelist: 토큰 기반 자동 패턴 생성\n *\n * @example\n * ```ts\n * // tailwind.config.ts\n * import exemPlugin from '@exem-ui/tailwindcss3';\n *\n * export default {\n * plugins: [exemPlugin],\n * };\n * ```\n */\nexport default plugin(\n ({ matchUtilities, addUtilities }) => {\n // font-* 유틸리티 (fontWeight + lineHeight)\n const fontUtilities: Record<string, Record<string, string>> = {};\n for (const [name, value] of Object.entries(fontPreset)) {\n fontUtilities[`.font-${name}`] = {\n 'font-weight': value.fontWeight,\n 'line-height': value.lineHeight,\n };\n }\n addUtilities(fontUtilities);\n\n // text-code: font-family 오버라이드 (font-size는 theme.fontSize에서 처리)\n addUtilities({\n '.text-code': {\n 'font-family': \"'JetBrains Mono', monospace\",\n },\n });\n\n for (const [name, colorStops] of Object.entries(gradientTokens)) {\n matchUtilities(\n {\n [`bg-gradient-${name}`]: (direction: string) => ({\n backgroundImage: `linear-gradient(${direction}, ${colorStops})`,\n }),\n },\n {\n values: { ...gradientDirections },\n },\n );\n }\n },\n {\n safelist: generateSafelistPatterns(),\n theme: {\n screens: {\n ...breakpoint,\n },\n boxShadow: {\n ...shadow,\n },\n fontSize: {\n ...textPreset,\n },\n extend: {\n colors: {\n ...colorKebab,\n },\n borderRadius: {\n ...radius,\n },\n },\n },\n },\n);\n"]}
@@ -0,0 +1,3 @@
1
+ export { plugin_default as default } from './chunk-NS2LEUJB.mjs';
2
+ //# sourceMappingURL=plugin.mjs.map
3
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"plugin.mjs"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@exem-ui/tailwindcss3",
3
- "version": "0.2.0",
4
- "description": "EXEM Design System - Tailwind CSS 3 Plugin",
5
- "author": "EXEM Design Team",
3
+ "version": "0.3.2-next.20260227091619",
4
+ "description": "Exem Design System - Tailwind CSS 3 Plugin",
5
+ "author": "Exem Design Team",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.mjs",
@@ -13,10 +13,10 @@
13
13
  "import": "./dist/index.mjs",
14
14
  "require": "./dist/index.js"
15
15
  },
16
- "./preset": {
17
- "types": "./dist/preset.d.ts",
18
- "import": "./dist/preset.mjs",
19
- "require": "./dist/preset.js"
16
+ "./plugin": {
17
+ "types": "./dist/plugin.d.ts",
18
+ "import": "./dist/plugin.mjs",
19
+ "require": "./dist/plugin.js"
20
20
  }
21
21
  },
22
22
  "sideEffects": false,
@@ -44,7 +44,7 @@
44
44
  "css"
45
45
  ],
46
46
  "dependencies": {
47
- "@exem-ui/core": "0.2.0"
47
+ "@exem-ui/core": "0.3.2-next.20260227091619"
48
48
  },
49
49
  "devDependencies": {
50
50
  "tailwindcss": "^3.4.18",
package/dist/preset.d.mts DELETED
@@ -1,21 +0,0 @@
1
- import { Config } from 'tailwindcss';
2
-
3
- /**
4
- * EXEM 디자인 시스템 Tailwind CSS v3 프리셋.
5
- * 플러그인 + content 경로를 포함하는 완전한 설정입니다.
6
- * 기존 `@exem-ui/ui`의 Tailwind preset 기능을 대체합니다.
7
- *
8
- * @example
9
- * ```ts
10
- * // tailwind.config.ts
11
- * import exemPreset from '@exem-ui/tailwindcss3/preset';
12
- *
13
- * export default {
14
- * presets: [exemPreset],
15
- * content: ['./src/**\/*.{ts,tsx}'],
16
- * } satisfies Config;
17
- * ```
18
- */
19
- declare const preset: Config;
20
-
21
- export { preset as default };
package/dist/preset.d.ts DELETED
@@ -1,21 +0,0 @@
1
- import { Config } from 'tailwindcss';
2
-
3
- /**
4
- * EXEM 디자인 시스템 Tailwind CSS v3 프리셋.
5
- * 플러그인 + content 경로를 포함하는 완전한 설정입니다.
6
- * 기존 `@exem-ui/ui`의 Tailwind preset 기능을 대체합니다.
7
- *
8
- * @example
9
- * ```ts
10
- * // tailwind.config.ts
11
- * import exemPreset from '@exem-ui/tailwindcss3/preset';
12
- *
13
- * export default {
14
- * presets: [exemPreset],
15
- * content: ['./src/**\/*.{ts,tsx}'],
16
- * } satisfies Config;
17
- * ```
18
- */
19
- declare const preset: Config;
20
-
21
- export { preset as default };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/plugin.ts","../src/preset.ts"],"names":["colorKebab","radius","shadow","fontPreset","plugin","gradientTokens","gradientDirections","breakpoint","textPreset"],"mappings":";;;;;;;;;;AAgBA,SAAS,gBAAgB,SAAA,EAAkC;AACzD,EAAA,MAAM,QAAA,uBAAe,GAAA,EAAY;AAEjC,EAAA,KAAA,MAAW,OAAO,SAAA,EAAW;AAC3B,IAAA,MAAM,SAAA,GAAY,GAAA,CAAI,KAAA,CAAM,GAAG,EAAE,CAAC,CAAA;AAClC,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,QAAA,CAAS,IAAI,SAAS,CAAA;AAAA,IACxB;AAAA,EACF;AAEA,EAAA,OAAO,QAAA;AACT;AAOA,SAAS,wBAAA,GAA2B;AAClC,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,IAAA,CAAKA,sBAAU,CAAA;AACxC,EAAA,MAAM,UAAA,GAAa,MAAA,CAAO,IAAA,CAAKC,kBAAM,CAAA;AACrC,EAAA,MAAM,UAAA,GAAa,MAAA,CAAO,IAAA,CAAKC,kBAAM,CAAA;AAErC,EAAA,MAAM,aAAA,GAAgB,gBAAgB,SAAS,CAAA;AAC/C,EAAA,MAAM,WAAuC,EAAC;AAG9C,EAAA,KAAA,MAAW,UAAU,aAAA,EAAe;AAClC,IAAA,QAAA,CAAS,IAAA,CAAK,EAAE,OAAA,EAAS,IAAI,OAAO,CAAA,IAAA,EAAO,MAAM,CAAA,IAAA,CAAM,CAAA,EAAG,CAAA;AAAA,EAC5D;AAGA,EAAA,KAAA,MAAW,UAAU,aAAA,EAAe;AAClC,IAAA,QAAA,CAAS,IAAA,CAAK,EAAE,OAAA,EAAS,IAAI,OAAO,C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import {\n breakpoint,\n colorKebab,\n fontPreset,\n gradientDirections,\n gradientTokens,\n radius,\n shadow,\n textPreset,\n} from '@exem-ui/core/tailwindcss';\nimport plugin from 'tailwindcss/plugin';\n\n/**\n * 토큰에서 prefix 그룹을 추출하는 함수.\n * 예: 'text-primary' -> 'text', 'solid-accent-default' -> 'solid'\n */\nfunction extractPrefixes(tokenKeys: string[]): Set<string> {\n const prefixes = new Set<string>();\n\n for (const key of tokenKeys) {\n const firstPart = key.split('-')[0];\n if (firstPart) {\n prefixes.add(firstPart);\n }\n }\n\n return prefixes;\n}\n\n/**\n * 동적으로 safelist 패턴을 생성합니다.\n * 토큰에서 자동으로 prefix를 추출하여 패턴을 만듭니다.\n * 토큰이 변경되면 safelist도 자동으로 업데이트됩니다.\n */\nfunction generateSafelistPatterns() {\n const colorKeys = Object.keys(colorKebab);\n const radiusKeys = Object.keys(radius);\n const shadowKeys = Object.keys(shadow);\n\n const colorPrefixes = extractPrefixes(colorKeys);\n const patterns: Array<{ pattern: RegExp }> = [];\n\n // 배경색 패턴 (bg-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^bg-${prefix}-.+$`) });\n }\n\n // 텍스트 색상 패턴 (text-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^text-${prefix}-.+$`) });\n }\n\n // 보더 색상 패턴 (border-)\n for (const prefix of colorPrefixes) {\n patterns.push({ pattern: new RegExp(`^border-${prefix}-.+$`) });\n }\n\n // 반경 패턴 (rounded-)\n for (const key of radiusKeys) {\n patterns.push({ pattern: new RegExp(`^rounded-${key}$`) });\n }\n\n // 그림자 패턴 (shadow-)\n for (const key of shadowKeys) {\n patterns.push({ pattern: new RegExp(`^shadow-${key}$`) });\n }\n\n // 폰트 크기 패턴\n patterns.push({ pattern: /^text-(header|title|body|caption)-.+$/ });\n patterns.push({ pattern: /^text-code$/ });\n\n // 폰트 스타일 패턴 (fontPreset 토큰에서 자동 생성)\n const fontPresetKeys = Object.keys(fontPreset).join('|');\n patterns.push({ pattern: new RegExp(`^font-(${fontPresetKeys})$`) });\n\n return patterns;\n}\n\n/**\n * EXEM 디자인 시스템 Tailwind CSS(v3.x) 플러그인.\n *\n * `@exem-ui/core/tailwindcss` 공통 토큰을 활용하여 Tailwind 테마를 확장하고\n * 동적 그라데이션 유틸리티와 자동 safelist를 제공합니다.\n *\n * 제공 기능:\n * - 색상: `@exem-ui/core` 디자인 토큰 색상 (extend)\n * - 반경: weak, medium, strong, hard (extend)\n * - 그림자: weak, medium, strong, hard\n * - 타이포그래피: text-header-1/2, text-title-1/2, text-body-1/2/3, text-caption, text-code\n * - 동적 그라데이션: bg-gradient-exem-logo-[to-right] 등\n * - 브레이크포인트: md, lg, xl\n * - 동적 safelist: 토큰 기반 자동 패턴 생성\n *\n * @example\n * ```ts\n * // tailwind.config.ts\n * import exemPlugin from '@exem-ui/tailwindcss3';\n *\n * export default {\n * plugins: [exemPlugin],\n * };\n * ```\n */\nexport default plugin(\n ({ matchUtilities, addUtilities }) => {\n // font-* 유틸리티 (fontWeight + lineHeight)\n const fontUtilities: Record<string, Record<string, string>> = {};\n for (const [name, value] of Object.entries(fontPreset)) {\n fontUtilities[`.font-${name}`] = {\n 'font-weight': value.fontWeight,\n 'line-height': value.lineHeight,\n };\n }\n addUtilities(fontUtilities);\n\n // text-code: font-family 오버라이드 (font-size는 theme.fontSize에서 처리)\n addUtilities({\n '.text-code': {\n 'font-family': \"'JetBrains Mono', monospace\",\n },\n });\n\n for (const [name, colorStops] of Object.entries(gradientTokens)) {\n matchUtilities(\n {\n [`bg-gradient-${name}`]: (direction: string) => ({\n backgroundImage: `linear-gradient(${direction}, ${colorStops})`,\n }),\n },\n {\n values: { ...gradientDirections },\n },\n );\n }\n },\n {\n safelist: generateSafelistPatterns(),\n theme: {\n screens: {\n ...breakpoint,\n },\n boxShadow: {\n ...shadow,\n },\n fontSize: {\n ...textPreset,\n },\n extend: {\n colors: {\n ...colorKebab,\n },\n borderRadius: {\n ...radius,\n },\n },\n },\n },\n);\n","import type { Config } from 'tailwindcss';\nimport exemPlugin from './plugin';\n\n/**\n * EXEM 디자인 시스템 Tailwind CSS v3 프리셋.\n * 플러그인 + content 경로를 포함하는 완전한 설정입니다.\n * 기존 `@exem-ui/ui`의 Tailwind preset 기능을 대체합니다.\n *\n * @example\n * ```ts\n * // tailwind.config.ts\n * import exemPreset from '@exem-ui/tailwindcss3/preset';\n *\n * export default {\n * presets: [exemPreset],\n * content: ['./src/**\\/*.{ts,tsx}'],\n * } satisfies Config;\n * ```\n */\nconst preset: Config = {\n content: [],\n plugins: [exemPlugin],\n};\n\nexport default preset;\n"]}
package/dist/preset.mjs DELETED
@@ -1,12 +0,0 @@
1
- import { plugin_default } from './chunk-GQI4KKR5.mjs';
2
-
3
- // src/preset.ts
4
- var preset = {
5
- content: [],
6
- plugins: [plugin_default]
7
- };
8
- var preset_default = preset;
9
-
10
- export { preset_default as default };
11
- //# sourceMappingURL=preset.mjs.map
12
- //# sourceMappingURL=preset.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/preset.ts"],"names":[],"mappings":";;;AAmBA,IAAM,MAAA,GAAiB;AAAA,EACrB,SAAS,EAAC;AAAA,EACV,OAAA,EAAS,CAAC,cAAU;AACtB,CAAA;AAEA,IAAO,cAAA,GAAQ","file":"preset.mjs","sourcesContent":["import type { Config } from 'tailwindcss';\nimport exemPlugin from './plugin';\n\n/**\n * EXEM 디자인 시스템 Tailwind CSS v3 프리셋.\n * 플러그인 + content 경로를 포함하는 완전한 설정입니다.\n * 기존 `@exem-ui/ui`의 Tailwind preset 기능을 대체합니다.\n *\n * @example\n * ```ts\n * // tailwind.config.ts\n * import exemPreset from '@exem-ui/tailwindcss3/preset';\n *\n * export default {\n * presets: [exemPreset],\n * content: ['./src/**\\/*.{ts,tsx}'],\n * } satisfies Config;\n * ```\n */\nconst preset: Config = {\n content: [],\n plugins: [exemPlugin],\n};\n\nexport default preset;\n"]}