@pinegrow/vite-plugin 3.0.0-beta.132 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.d.ts +47 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinegrow/vite-plugin",
3
- "version": "3.0.0-beta.132",
3
+ "version": "3.0.0-beta.134",
4
4
  "description": "Pinegrow Vite Plugin",
5
5
  "type": "module",
6
6
  "files": [
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.
@@ -20,6 +48,23 @@ export interface LiveDesignerOptions {
20
48
  */
21
49
  devtoolsKey?: string
22
50
 
51
+ /**
52
+ * Preferred format for icons in icon-picker - https://github.com/antfu/icones/blob/main/src/utils/case.ts
53
+ * To see the different formats, go to https://icones.js.org/collection/mdi, turn off name copying mode if active, select an icon. In the bottom drawer, next to the icon-name & copy icon, there is dropup icon. Click the drop-up to see the different formats.
54
+ * * @default 'unocss' // For eg, i-material-symbols-home
55
+ *
56
+ */
57
+ iconPreferredCase?:
58
+ | 'unocss'
59
+ | 'bare'
60
+ | 'barePascal'
61
+ | 'iconify'
62
+ | 'dash'
63
+ | 'camel'
64
+ | 'pascal'
65
+ | 'component'
66
+ | 'componentKebab'
67
+
23
68
  /**
24
69
  * Router history modes - 'html5', 'hash'
25
70
  * @default 'html5'
@@ -29,9 +74,9 @@ export interface LiveDesignerOptions {
29
74
 
30
75
  /**
31
76
  * Array of Pinegrow plugins (npm package names)
32
- * 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
33
78
  */
34
- plugins?: string[]
79
+ plugins?: PinegrowExternalPlugin[] | string | string[]
35
80
 
36
81
  /**
37
82
  * Pinegrow TailwindCSS plugin options