@pinegrow/vite-plugin 3.0.0-beta.133 → 3.0.0-beta.134
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 +1 -1
- package/types.d.ts +30 -2
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
import type { PinegrowTailwindCSSModuleOptions } from '@pinegrow/tailwindcss-plugin'
|
|
2
2
|
import type { PluginOption as VitePluginOption } from 'vite'
|
|
3
3
|
|
|
4
|
+
interface PinegrowExternalPlugin {
|
|
5
|
+
/**
|
|
6
|
+
* Display name in Props Panel and Library Panels
|
|
7
|
+
* Eg, "My Awesome Lib 3.3.1", defaults to key if not provided
|
|
8
|
+
*/
|
|
9
|
+
name?: string
|
|
10
|
+
/**
|
|
11
|
+
* Unique key that doesn't conflict with other pinegrow frameworks
|
|
12
|
+
* Run `Object.values(pinegrow.getFrameworks()).map(fx => fx.key)` in Vue Designer's devtools console for existing keys
|
|
13
|
+
*
|
|
14
|
+
* Allowed characters - alphanumeric with hyphens or period, no spaces
|
|
15
|
+
* Eg, 'my-awesome-lib'
|
|
16
|
+
*/
|
|
17
|
+
key: string
|
|
18
|
+
/**
|
|
19
|
+
* Web-types of component library (or) pinegrow commonjs plugin
|
|
20
|
+
* Must return an absolute path
|
|
21
|
+
*
|
|
22
|
+
* Use path functions according to the project module type (commonjs/module)
|
|
23
|
+
* For eg, path.resolve(__dirname, '../relative-path/my-lib.cjs')
|
|
24
|
+
* (or)
|
|
25
|
+
* import { fileURLToPath, URL } from 'node:url'
|
|
26
|
+
* fileURLToPath(new URL('./relative-path/web-types.json', import.meta.url)) // web-types of component library
|
|
27
|
+
* fileURLToPath(new URL('./relative-path/my-lib.cjs', import.meta.url)) // pinegrow commonjs plugin
|
|
28
|
+
*/
|
|
29
|
+
pluginPath: string
|
|
30
|
+
}
|
|
31
|
+
|
|
4
32
|
export interface LiveDesignerOptions {
|
|
5
33
|
/**
|
|
6
34
|
* Absolute path to the root of a monorepo.
|
|
@@ -46,9 +74,9 @@ export interface LiveDesignerOptions {
|
|
|
46
74
|
|
|
47
75
|
/**
|
|
48
76
|
* Array of Pinegrow plugins (npm package names)
|
|
49
|
-
* To use file-based Pinegrow Plugins, provide the absolute path of the plugin file, for eg, [path.resolve(__dirname, './pg-plugin/index.js')]
|
|
77
|
+
* To use file-based Pinegrow Plugins, provide the absolute path of the plugin file, for eg, [path.resolve(__dirname, './pg-plugin/index.js')] as pluginPath, along with a unique key
|
|
50
78
|
*/
|
|
51
|
-
plugins?: string[]
|
|
79
|
+
plugins?: PinegrowExternalPlugin[] | string | string[]
|
|
52
80
|
|
|
53
81
|
/**
|
|
54
82
|
* Pinegrow TailwindCSS plugin options
|