@kayjs/icons 2.0.0-beta.1 → 2.0.0-beta.2
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/package.json +2 -2
- package/src/index.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kayjs/icons",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.2",
|
|
4
4
|
"description": "Compile-time Iconify SVG icon plugin (~icons/<set>/<name>) for Kay v2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"directory": "packages/plugin-icons"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@kayjs/kay": "^2.0.0-beta.
|
|
24
|
+
"@kayjs/kay": "^2.0.0-beta.2"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/src/index.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { BunPlugin } from 'bun'
|
|
6
6
|
import type { KayPlugin } from '@kayjs/kay/server'
|
|
7
7
|
import type { IconData, IconifyIcon, IconSet } from './types'
|
|
8
|
+
import { definePlugin } from '@kayjs/kay/server'
|
|
8
9
|
|
|
9
10
|
export { Icon } from './Icon'
|
|
10
11
|
export type { IconComponentProps } from './Icon'
|
|
@@ -84,7 +85,7 @@ export interface IconsPluginOptions {
|
|
|
84
85
|
export function icons(options: IconsPluginOptions = {}): KayPlugin {
|
|
85
86
|
const cache = new Map<string, IconSet>(Object.entries(options.sets ?? {}))
|
|
86
87
|
|
|
87
|
-
return {
|
|
88
|
+
return definePlugin({
|
|
88
89
|
name: '@kayjs/icons',
|
|
89
90
|
bunPlugins: ({ root }): BunPlugin[] => [{
|
|
90
91
|
name: 'kayjs-icons',
|
|
@@ -116,5 +117,5 @@ export function icons(options: IconsPluginOptions = {}): KayPlugin {
|
|
|
116
117
|
})
|
|
117
118
|
},
|
|
118
119
|
}],
|
|
119
|
-
}
|
|
120
|
+
})
|
|
120
121
|
}
|