@pikacss/unplugin-pikacss 0.0.39 → 0.0.41
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/dist/esbuild.d.cts +1 -1
- package/dist/esbuild.d.mts +3 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/rolldown.d.cts +1 -1
- package/dist/rolldown.d.mts +3 -3
- package/dist/rollup.d.cts +1 -1
- package/dist/rollup.d.mts +1 -1
- package/dist/rspack.d.cts +1 -1
- package/dist/rspack.d.mts +1 -1
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.mts +1 -1
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.mts +1 -1
- package/package.json +2 -13
- package/README.md +0 -237
- package/dist/farm.cjs +0 -15
- package/dist/farm.d.cts +0 -8
- package/dist/farm.d.mts +0 -8
- package/dist/farm.mjs +0 -10
- /package/dist/{types-BHUcssZN.d.cts → types-BRfLr7ch.d.mts} +0 -0
- /package/dist/{types-Df8aMUxe.d.mts → types-CtaD-Nki.d.cts} +0 -0
package/dist/esbuild.d.cts
CHANGED
package/dist/esbuild.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-
|
|
2
|
-
import * as
|
|
1
|
+
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-BRfLr7ch.mjs";
|
|
2
|
+
import * as unplugin2 from "unplugin";
|
|
3
3
|
export * from "@pikacss/integration";
|
|
4
4
|
|
|
5
5
|
//#region src/esbuild.d.ts
|
|
6
|
-
declare const _default: (options?: PluginOptions | undefined) =>
|
|
6
|
+
declare const _default: (options?: PluginOptions | undefined) => unplugin2.EsbuildPlugin;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { PluginOptions, ResolvedPluginOptions, _default as default };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-
|
|
1
|
+
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-CtaD-Nki.cjs";
|
|
2
2
|
import * as unplugin0 from "unplugin";
|
|
3
3
|
import { UnpluginFactory } from "unplugin";
|
|
4
4
|
export * from "@pikacss/integration";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-
|
|
1
|
+
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-BRfLr7ch.mjs";
|
|
2
2
|
import * as unplugin0 from "unplugin";
|
|
3
3
|
import { UnpluginFactory } from "unplugin";
|
|
4
4
|
export * from "@pikacss/integration";
|
package/dist/rolldown.d.cts
CHANGED
package/dist/rolldown.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-
|
|
2
|
-
import * as
|
|
1
|
+
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-BRfLr7ch.mjs";
|
|
2
|
+
import * as unplugin0 from "unplugin";
|
|
3
3
|
export * from "@pikacss/integration";
|
|
4
4
|
|
|
5
5
|
//#region src/rolldown.d.ts
|
|
6
|
-
declare const _default: (options?: PluginOptions | undefined) =>
|
|
6
|
+
declare const _default: (options?: PluginOptions | undefined) => unplugin0.RolldownPlugin<any> | unplugin0.RolldownPlugin<any>[];
|
|
7
7
|
//#endregion
|
|
8
8
|
export { PluginOptions, ResolvedPluginOptions, _default as default };
|
package/dist/rollup.d.cts
CHANGED
package/dist/rollup.d.mts
CHANGED
package/dist/rspack.d.cts
CHANGED
package/dist/rspack.d.mts
CHANGED
package/dist/vite.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-
|
|
1
|
+
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-CtaD-Nki.cjs";
|
|
2
2
|
import "./index.cjs";
|
|
3
3
|
import { Plugin } from "vite";
|
|
4
4
|
export * from "@pikacss/integration";
|
package/dist/vite.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-
|
|
1
|
+
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-BRfLr7ch.mjs";
|
|
2
2
|
import "./index.mjs";
|
|
3
3
|
import { Plugin } from "vite";
|
|
4
4
|
export * from "@pikacss/integration";
|
package/dist/webpack.d.cts
CHANGED
package/dist/webpack.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikacss/unplugin-pikacss",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.41",
|
|
5
5
|
"author": "DevilTea <ch19980814@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"webpack-plugin",
|
|
24
24
|
"esbuild-plugin",
|
|
25
25
|
"rspack-plugin",
|
|
26
|
-
"farm-plugin",
|
|
27
26
|
"rolldown-plugin"
|
|
28
27
|
],
|
|
29
28
|
"exports": {
|
|
@@ -87,16 +86,6 @@
|
|
|
87
86
|
"default": "./dist/rspack.cjs"
|
|
88
87
|
}
|
|
89
88
|
},
|
|
90
|
-
"./farm": {
|
|
91
|
-
"import": {
|
|
92
|
-
"types": "./dist/farm.d.mts",
|
|
93
|
-
"default": "./dist/farm.mjs"
|
|
94
|
-
},
|
|
95
|
-
"require": {
|
|
96
|
-
"types": "./dist/farm.d.cts",
|
|
97
|
-
"default": "./dist/farm.cjs"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
89
|
"./rolldown": {
|
|
101
90
|
"import": {
|
|
102
91
|
"types": "./dist/rolldown.d.mts",
|
|
@@ -129,7 +118,7 @@
|
|
|
129
118
|
"pathe": "^2.0.3",
|
|
130
119
|
"perfect-debounce": "^2.0.0",
|
|
131
120
|
"unplugin": "^2.3.11",
|
|
132
|
-
"@pikacss/integration": "0.0.
|
|
121
|
+
"@pikacss/integration": "0.0.41"
|
|
133
122
|
},
|
|
134
123
|
"devDependencies": {
|
|
135
124
|
"@farmfe/core": "^1.7.11",
|
package/README.md
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
# @pikacss/unplugin-pikacss
|
|
2
|
-
|
|
3
|
-
Universal plugin for PikaCSS that works with multiple bundlers.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pnpm add @pikacss/unplugin-pikacss
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
### Vite
|
|
14
|
-
|
|
15
|
-
For full Vite support with hot reloading and build optimizations, use the Vite-specific export:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
// vite.config.ts
|
|
19
|
-
import PikaCSSPlugin from '@pikacss/unplugin-pikacss/vite'
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
plugins: [
|
|
23
|
-
PikaCSSPlugin({
|
|
24
|
-
// options
|
|
25
|
-
}),
|
|
26
|
-
],
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Rollup
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
// rollup.config.js
|
|
34
|
-
import PikaCSSPlugin from '@pikacss/unplugin-pikacss/rollup'
|
|
35
|
-
|
|
36
|
-
export default {
|
|
37
|
-
plugins: [
|
|
38
|
-
PikaCSSPlugin({
|
|
39
|
-
// options
|
|
40
|
-
}),
|
|
41
|
-
],
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Webpack
|
|
46
|
-
|
|
47
|
-
```ts
|
|
48
|
-
// webpack.config.js
|
|
49
|
-
import PikaCSSPlugin from '@pikacss/unplugin-pikacss/webpack'
|
|
50
|
-
|
|
51
|
-
export default {
|
|
52
|
-
plugins: [
|
|
53
|
-
PikaCSSPlugin({
|
|
54
|
-
// options
|
|
55
|
-
}),
|
|
56
|
-
],
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### esbuild
|
|
61
|
-
|
|
62
|
-
```ts
|
|
63
|
-
// esbuild.config.js
|
|
64
|
-
import PikaCSSPlugin from '@pikacss/unplugin-pikacss/esbuild'
|
|
65
|
-
import esbuild from 'esbuild'
|
|
66
|
-
|
|
67
|
-
esbuild.build({
|
|
68
|
-
plugins: [
|
|
69
|
-
PikaCSSPlugin({
|
|
70
|
-
// options
|
|
71
|
-
}),
|
|
72
|
-
],
|
|
73
|
-
})
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Rspack
|
|
77
|
-
|
|
78
|
-
```ts
|
|
79
|
-
// rspack.config.js
|
|
80
|
-
import PikaCSSPlugin from '@pikacss/unplugin-pikacss/rspack'
|
|
81
|
-
|
|
82
|
-
export default {
|
|
83
|
-
plugins: [
|
|
84
|
-
PikaCSSPlugin({
|
|
85
|
-
// options
|
|
86
|
-
}),
|
|
87
|
-
],
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Farm
|
|
92
|
-
|
|
93
|
-
```ts
|
|
94
|
-
// farm.config.ts
|
|
95
|
-
import PikaCSSPlugin from '@pikacss/unplugin-pikacss/farm'
|
|
96
|
-
|
|
97
|
-
export default {
|
|
98
|
-
plugins: [
|
|
99
|
-
PikaCSSPlugin({
|
|
100
|
-
// options
|
|
101
|
-
}),
|
|
102
|
-
],
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Rolldown
|
|
107
|
-
|
|
108
|
-
```ts
|
|
109
|
-
// rolldown.config.js
|
|
110
|
-
import PikaCSSPlugin from '@pikacss/unplugin-pikacss/rolldown'
|
|
111
|
-
|
|
112
|
-
export default {
|
|
113
|
-
plugins: [
|
|
114
|
-
PikaCSSPlugin({
|
|
115
|
-
// options
|
|
116
|
-
}),
|
|
117
|
-
],
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Options
|
|
122
|
-
|
|
123
|
-
```ts
|
|
124
|
-
interface PluginOptions {
|
|
125
|
-
/**
|
|
126
|
-
* Specify file patterns to scan for detecting pika() function calls.
|
|
127
|
-
*
|
|
128
|
-
* @default { include: ['**/*.{js,ts,jsx,tsx,vue}'], exclude: ['node_modules/**'] }
|
|
129
|
-
*/
|
|
130
|
-
scan?: {
|
|
131
|
-
include?: string | string[]
|
|
132
|
-
exclude?: string | string[]
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Configuration object or path to a configuration file for the PikaCSS engine.
|
|
137
|
-
* Can pass a config object directly or a config file path (e.g., 'pika.config.ts').
|
|
138
|
-
*/
|
|
139
|
-
config?: EngineConfig | string
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Whether to automatically create a configuration file when needed.
|
|
143
|
-
* @default true
|
|
144
|
-
*/
|
|
145
|
-
autoCreateConfig?: boolean
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* The name of the PikaCSS function in source code.
|
|
149
|
-
* @default 'pika'
|
|
150
|
-
*/
|
|
151
|
-
fnName?: string
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* The format of the generated atomic style class names.
|
|
155
|
-
* - `'string'`: Returns a space-separated string (e.g., "a b c")
|
|
156
|
-
* - `'array'`: Returns an array of class names (e.g., ['a', 'b', 'c'])
|
|
157
|
-
* - `'inline'`: Returns inline format
|
|
158
|
-
* @default 'string'
|
|
159
|
-
*/
|
|
160
|
-
transformedFormat?: 'string' | 'array' | 'inline'
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Configuration for TypeScript code generation.
|
|
164
|
-
* - `true`: Auto-generate as 'pika.gen.ts'
|
|
165
|
-
* - string: Use the specified file path
|
|
166
|
-
* - `false`: Disable TypeScript code generation
|
|
167
|
-
* @default true
|
|
168
|
-
*/
|
|
169
|
-
tsCodegen?: boolean | string
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Configuration for CSS code generation.
|
|
173
|
-
* - `true`: Auto-generate as 'pika.gen.css'
|
|
174
|
-
* - string: Use the specified file path
|
|
175
|
-
* @default true
|
|
176
|
-
*/
|
|
177
|
-
cssCodegen?: boolean | string
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Setup Steps
|
|
182
|
-
|
|
183
|
-
### 1. Install and Configure Plugin
|
|
184
|
-
|
|
185
|
-
Add the plugin to your build tool configuration (see examples above).
|
|
186
|
-
|
|
187
|
-
### 2. Create Config File
|
|
188
|
-
|
|
189
|
-
Create `pika.config.ts` in your project root:
|
|
190
|
-
|
|
191
|
-
```ts
|
|
192
|
-
import { defineEngineConfig } from '@pikacss/unplugin-pikacss'
|
|
193
|
-
|
|
194
|
-
export default defineEngineConfig({
|
|
195
|
-
// Your PikaCSS configuration
|
|
196
|
-
plugins: []
|
|
197
|
-
})
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### 3. Import Virtual CSS Module
|
|
201
|
-
|
|
202
|
-
In your application entry file:
|
|
203
|
-
|
|
204
|
-
```ts
|
|
205
|
-
import 'pika.css'
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### 4. Use in Your Code
|
|
209
|
-
|
|
210
|
-
```ts
|
|
211
|
-
// Direct style object
|
|
212
|
-
const classes = pika({
|
|
213
|
-
display: 'flex',
|
|
214
|
-
alignItems: 'center',
|
|
215
|
-
gap: '1rem'
|
|
216
|
-
})
|
|
217
|
-
|
|
218
|
-
// Using shortcuts
|
|
219
|
-
const centered = pika('flex-center')
|
|
220
|
-
|
|
221
|
-
// Combining shortcuts with styles
|
|
222
|
-
const styled = pika('flex-center', { color: 'blue' })
|
|
223
|
-
|
|
224
|
-
// Multiple shortcuts
|
|
225
|
-
const multi = pika('btn', 'shadow', { margin: '1rem' })
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
## Migration from @pikacss/vite-plugin-pikacss
|
|
229
|
-
|
|
230
|
-
If you were using `@pikacss/vite-plugin-pikacss`, you can migrate to `@pikacss/unplugin-pikacss/vite`:
|
|
231
|
-
|
|
232
|
-
```diff
|
|
233
|
-
- import PikaCSSPlugin from '@pikacss/vite-plugin-pikacss'
|
|
234
|
-
+ import PikaCSSPlugin from '@pikacss/unplugin-pikacss/vite'
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
The API is fully compatible.
|
package/dist/farm.cjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const require_src = require('./src-BsRreiwW.cjs');
|
|
2
|
-
let unplugin = require("unplugin");
|
|
3
|
-
|
|
4
|
-
//#region src/farm.ts
|
|
5
|
-
var farm_default = (0, unplugin.createFarmPlugin)(require_src.unpluginFactory);
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
module.exports = farm_default;
|
|
9
|
-
var _pikacss_integration = require("@pikacss/integration");
|
|
10
|
-
Object.keys(_pikacss_integration).forEach(function (k) {
|
|
11
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return _pikacss_integration[k]; }
|
|
14
|
-
});
|
|
15
|
-
});
|
package/dist/farm.d.cts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-BHUcssZN.cjs";
|
|
2
|
-
import { JsPlugin } from "@farmfe/core";
|
|
3
|
-
export * from "@pikacss/integration";
|
|
4
|
-
|
|
5
|
-
//#region src/farm.d.ts
|
|
6
|
-
declare const _default: (options?: PluginOptions | undefined) => JsPlugin;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { PluginOptions, ResolvedPluginOptions, _default as default };
|
package/dist/farm.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { n as ResolvedPluginOptions, t as PluginOptions } from "./types-Df8aMUxe.mjs";
|
|
2
|
-
import { JsPlugin } from "@farmfe/core";
|
|
3
|
-
export * from "@pikacss/integration";
|
|
4
|
-
|
|
5
|
-
//#region src/farm.d.ts
|
|
6
|
-
declare const _default: (options?: PluginOptions | undefined) => JsPlugin;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { PluginOptions, ResolvedPluginOptions, _default as default };
|
package/dist/farm.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { unpluginFactory } from "./index.mjs";
|
|
2
|
-
import { createFarmPlugin } from "unplugin";
|
|
3
|
-
|
|
4
|
-
export * from "@pikacss/integration"
|
|
5
|
-
|
|
6
|
-
//#region src/farm.ts
|
|
7
|
-
var farm_default = createFarmPlugin(unpluginFactory);
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { farm_default as default };
|
|
File without changes
|
|
File without changes
|