@opencloud-eu/extension-sdk 4.0.0 → 4.1.0-alpha.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/README.md +8 -0
- package/index.mjs +3 -1
- package/package.json +3 -3
- package/tailwind.css +14 -0
package/README.md
CHANGED
|
@@ -37,3 +37,11 @@ export default defineConfig({
|
|
|
37
37
|
}
|
|
38
38
|
})
|
|
39
39
|
```
|
|
40
|
+
|
|
41
|
+
### Tailwind CSS
|
|
42
|
+
|
|
43
|
+
The extension-sdk comes with a preconfigured Tailwind CSS setup for extension development. To use it, simply import the provided CSS file in your main application file. Note that Tailwind classes need to be prefixed via `ext:` in extensions to avoid style conflicts.
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import '@opencloud-eu/extension-sdk/tailwind.css'
|
|
47
|
+
```
|
package/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import { mergeConfig, searchForWorkspaceRoot } from 'vite'
|
|
|
6
6
|
import { join } from 'path'
|
|
7
7
|
import { cwd } from 'process'
|
|
8
8
|
import { readFileSync, existsSync } from 'fs'
|
|
9
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
9
10
|
|
|
10
11
|
import vue from '@vitejs/plugin-vue'
|
|
11
12
|
|
|
@@ -140,7 +141,8 @@ export const defineConfig = (overrides = {}) => {
|
|
|
140
141
|
customElement: false,
|
|
141
142
|
...(isTesting && { template: { compilerOptions: { whitespace: 'preserve' } } })
|
|
142
143
|
}),
|
|
143
|
-
manifestPlugin()
|
|
144
|
+
manifestPlugin(),
|
|
145
|
+
tailwindcss()
|
|
144
146
|
],
|
|
145
147
|
test: {
|
|
146
148
|
globals: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencloud-eu/extension-sdk",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.1.0-alpha.2",
|
|
4
4
|
"description": "OpenCloud Web Extension SDK",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"main": "index.mjs",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"directory": "packages/extension-sdk"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@tailwindcss/vite": "^4.1.11",
|
|
17
18
|
"@vitejs/plugin-vue": "^6.0.0"
|
|
18
19
|
},
|
|
19
20
|
"peerDependencies": {
|
|
20
|
-
"vite": "^5 || ^6.0.0 || ^7.0.0"
|
|
21
|
-
"sass": "^1.79.5"
|
|
21
|
+
"vite": "^5 || ^6.0.0 || ^7.0.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/tailwind.css
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@layer theme, base, components, utilities;
|
|
2
|
+
@import 'tailwindcss/theme.css' layer(theme) prefix(ext);
|
|
3
|
+
@import 'tailwindcss/utilities.css' layer(utilities) prefix(ext);
|
|
4
|
+
|
|
5
|
+
@theme {
|
|
6
|
+
--font-sans: var(--oc-font-family);
|
|
7
|
+
|
|
8
|
+
--spacing: 4px;
|
|
9
|
+
--breakpoint-xs: 580px;
|
|
10
|
+
--breakpoint-sm: 640px;
|
|
11
|
+
--breakpoint-md: 960px;
|
|
12
|
+
--breakpoint-lg: 1200px;
|
|
13
|
+
--breakpoint-xl: 1600px;
|
|
14
|
+
}
|