@icvdeveloper/common-module 0.0.14 → 0.0.16
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/module.d.ts +19 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +36 -7
- package/package.json +1 -1
package/dist/module.d.ts
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
+
declare enum ConferenceState {
|
|
4
|
+
LIVE = "live",
|
|
5
|
+
MIXED = "mixed",
|
|
6
|
+
ARCHIVED = "archive",
|
|
7
|
+
UPCOMING = "upcoming",
|
|
8
|
+
HIDDEN = "hidden"
|
|
9
|
+
}
|
|
10
|
+
declare enum PresentationType {
|
|
11
|
+
ZOOM = "zoom",
|
|
12
|
+
VIDEO_SLIDE = "video_slide",
|
|
13
|
+
VIDEO = "video",
|
|
14
|
+
AUDIO_SLIDE = "audio_slide",
|
|
15
|
+
AUDIO = "audio",
|
|
16
|
+
EMBED = "embed",
|
|
17
|
+
LINK = "link"
|
|
18
|
+
}
|
|
19
|
+
|
|
3
20
|
interface ModuleOptions {
|
|
4
21
|
portalHash?: null | string;
|
|
5
22
|
apiUrl?: null | string;
|
|
23
|
+
tailwindConfigPath?: null | string;
|
|
6
24
|
}
|
|
7
25
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
8
26
|
|
|
9
|
-
export { ModuleOptions, _default as default };
|
|
27
|
+
export { ConferenceState, ModuleOptions, PresentationType, _default as default };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { join, resolve } from 'path';
|
|
2
2
|
import { fileURLToPath } from 'url';
|
|
3
3
|
import { defineNuxtModule, useLogger, installModule, addPlugin, addAutoImportDir, addComponentsDir } from '@nuxt/kit';
|
|
4
4
|
import svgLoader from 'vite-svg-loader';
|
|
@@ -12,6 +12,25 @@ const __dirname = __cjs_path__.dirname(__filename);
|
|
|
12
12
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
var ConferenceState = /* @__PURE__ */ ((ConferenceState2) => {
|
|
16
|
+
ConferenceState2["LIVE"] = "live";
|
|
17
|
+
ConferenceState2["MIXED"] = "mixed";
|
|
18
|
+
ConferenceState2["ARCHIVED"] = "archive";
|
|
19
|
+
ConferenceState2["UPCOMING"] = "upcoming";
|
|
20
|
+
ConferenceState2["HIDDEN"] = "hidden";
|
|
21
|
+
return ConferenceState2;
|
|
22
|
+
})(ConferenceState || {});
|
|
23
|
+
var PresentationType = /* @__PURE__ */ ((PresentationType2) => {
|
|
24
|
+
PresentationType2["ZOOM"] = "zoom";
|
|
25
|
+
PresentationType2["VIDEO_SLIDE"] = "video_slide";
|
|
26
|
+
PresentationType2["VIDEO"] = "video";
|
|
27
|
+
PresentationType2["AUDIO_SLIDE"] = "audio_slide";
|
|
28
|
+
PresentationType2["AUDIO"] = "audio";
|
|
29
|
+
PresentationType2["EMBED"] = "embed";
|
|
30
|
+
PresentationType2["LINK"] = "link";
|
|
31
|
+
return PresentationType2;
|
|
32
|
+
})(PresentationType || {});
|
|
33
|
+
|
|
15
34
|
const module = defineNuxtModule({
|
|
16
35
|
meta: {
|
|
17
36
|
name: "v3plus-common-module",
|
|
@@ -22,10 +41,12 @@ const module = defineNuxtModule({
|
|
|
22
41
|
},
|
|
23
42
|
defaults: {
|
|
24
43
|
portalHash: null,
|
|
25
|
-
apiUrl: null
|
|
44
|
+
apiUrl: null,
|
|
45
|
+
tailwindConfigPath: null
|
|
26
46
|
},
|
|
27
47
|
async setup(options, nuxt) {
|
|
28
48
|
const logger = useLogger();
|
|
49
|
+
const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url));
|
|
29
50
|
if (nuxt.options.ssr) {
|
|
30
51
|
throw new Error("V3plusCommonModule does not support SSR");
|
|
31
52
|
}
|
|
@@ -49,10 +70,18 @@ const module = defineNuxtModule({
|
|
|
49
70
|
}
|
|
50
71
|
if (!nuxt.options.modules.includes("@nuxtjs/tailwindcss")) {
|
|
51
72
|
logger.info("Installing TailwindCss");
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
73
|
+
const tailwindConfigPath = options.tailwindConfigPath;
|
|
74
|
+
const tailwindConfig = {};
|
|
75
|
+
if (tailwindConfig) {
|
|
76
|
+
tailwindConfig.configPath = tailwindConfigPath;
|
|
77
|
+
}
|
|
78
|
+
tailwindConfig.config = {
|
|
79
|
+
content: [join(runtimeDir, "components/**/*.{vue,js}")]
|
|
80
|
+
};
|
|
81
|
+
await installModule("@nuxtjs/tailwindcss", tailwindConfig);
|
|
55
82
|
logger.success("Tailwindcss installed!");
|
|
83
|
+
} else {
|
|
84
|
+
throw new Error("Remove @nuxtjs/tailwindcss from nuxt.config.js");
|
|
56
85
|
}
|
|
57
86
|
logger.info("Installing SVG loader");
|
|
58
87
|
if (nuxt.options.vite.plugins) {
|
|
@@ -61,7 +90,6 @@ const module = defineNuxtModule({
|
|
|
61
90
|
nuxt.options.vite.plugins = [svgLoader()];
|
|
62
91
|
}
|
|
63
92
|
logger.success("SVG loader installed!");
|
|
64
|
-
const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url));
|
|
65
93
|
nuxt.options.build.transpile.push(runtimeDir);
|
|
66
94
|
addPlugin(resolve(runtimeDir, "plugin"));
|
|
67
95
|
nuxt.options.css.push("nprogress/nprogress.css");
|
|
@@ -74,6 +102,7 @@ const module = defineNuxtModule({
|
|
|
74
102
|
};
|
|
75
103
|
}
|
|
76
104
|
addAutoImportDir(join(runtimeDir, "store"));
|
|
105
|
+
addAutoImportDir(join(runtimeDir, "composables"));
|
|
77
106
|
addComponentsDir({
|
|
78
107
|
path: join(runtimeDir, "components/core"),
|
|
79
108
|
extensions: ["vue"],
|
|
@@ -117,4 +146,4 @@ const module = defineNuxtModule({
|
|
|
117
146
|
}
|
|
118
147
|
});
|
|
119
148
|
|
|
120
|
-
export { module as default };
|
|
149
|
+
export { ConferenceState, PresentationType, module as default };
|