rimelight-components 2.0.3 → 2.0.6

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.mts CHANGED
@@ -5,6 +5,7 @@ interface CalloutOptions {
5
5
  title: string;
6
6
  tooltip: string;
7
7
  }
8
+
8
9
  interface ModuleOptions {
9
10
  /**
10
11
  * Prefix for components
@@ -21,7 +22,47 @@ interface ModuleOptions {
21
22
  source: CalloutOptions;
22
23
  };
23
24
  }
24
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
25
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, {
26
+ enabled: boolean;
27
+ prefix: string;
28
+ callouts: {
29
+ info: {
30
+ icon: string;
31
+ title: string;
32
+ tooltip: string;
33
+ };
34
+ success: {
35
+ icon: string;
36
+ title: string;
37
+ tooltip: string;
38
+ };
39
+ warning: {
40
+ icon: string;
41
+ title: string;
42
+ tooltip: string;
43
+ };
44
+ error: {
45
+ icon: string;
46
+ title: string;
47
+ tooltip: string;
48
+ };
49
+ commentary: {
50
+ icon: string;
51
+ title: string;
52
+ tooltip: string;
53
+ };
54
+ ideation: {
55
+ icon: string;
56
+ title: string;
57
+ tooltip: string;
58
+ };
59
+ source: {
60
+ icon: string;
61
+ title: string;
62
+ tooltip: string;
63
+ };
64
+ };
65
+ }, true>;
25
66
 
26
67
  export { _default as default };
27
68
  export type { ModuleOptions };
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
- "version": "2.0.3",
3
+ "version": "2.0.6",
4
4
  "docs": "https://rimelight.com/tools/rimelight-components",
5
5
  "configKey": "rimelightComponents",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -4,10 +4,11 @@ import { readdirSync } from 'node:fs';
4
4
  import { basename } from 'node:path';
5
5
 
6
6
  const name = "rimelight-components";
7
- const version = "2.0.3";
7
+ const version = "2.0.6";
8
8
  const homepage = "https://rimelight.com/tools/rimelight-components";
9
9
 
10
10
  const defaultOptions = {
11
+ enabled: true,
11
12
  prefix: "RC",
12
13
  callouts: {
13
14
  info: {
@@ -84,7 +85,7 @@ function addBlockMapTemplates(blockNames) {
84
85
  return template;
85
86
  }
86
87
 
87
- const module = defineNuxtModule({
88
+ const module = defineNuxtModule().with({
88
89
  meta: {
89
90
  name,
90
91
  version,
@@ -94,83 +95,87 @@ const module = defineNuxtModule({
94
95
  nuxt: ">=4.0.0"
95
96
  }
96
97
  },
97
- defaults: defaultOptions,
98
98
  hooks: {},
99
- moduleDependencies: {
100
- "@nuxt/image": {
101
- version: ">=1.0.0",
102
- optional: false,
103
- overrides: {},
104
- defaults: {}
105
- },
106
- "@nuxtjs/i18n": {
107
- version: ">=10.1.1",
108
- optional: false,
109
- overrides: {},
110
- defaults: {}
111
- },
112
- "@nuxt/ui": {
113
- version: ">=4.0.0",
114
- optional: false,
115
- overrides: {},
116
- defaults: {
117
- prefix: "U",
118
- theme: {
119
- colors: [
120
- "neutral",
121
- "primary",
122
- "secondary",
123
- "info",
124
- "success",
125
- "warning",
126
- "error",
127
- "commentary",
128
- "ideation",
129
- "source"
130
- ]
99
+ defaults: defaultOptions,
100
+ moduleDependencies(_nuxt) {
101
+ const dependencies = {
102
+ "@nuxt/image": {
103
+ version: ">=1.0.0",
104
+ optional: false,
105
+ overrides: {},
106
+ defaults: {}
107
+ },
108
+ "@nuxtjs/i18n": {
109
+ version: ">=10.1.1",
110
+ optional: false,
111
+ overrides: {},
112
+ defaults: {}
113
+ },
114
+ "@nuxt/ui": {
115
+ version: ">=4.0.0",
116
+ optional: false,
117
+ overrides: {},
118
+ defaults: {
119
+ prefix: "U",
120
+ theme: {
121
+ colors: [
122
+ "neutral",
123
+ "primary",
124
+ "secondary",
125
+ "info",
126
+ "success",
127
+ "warning",
128
+ "error",
129
+ "commentary",
130
+ "ideation",
131
+ "source"
132
+ ]
133
+ }
131
134
  }
135
+ },
136
+ "@vueuse/nuxt": {
137
+ version: ">=13.9.0",
138
+ optional: false,
139
+ overrides: {},
140
+ defaults: {}
141
+ },
142
+ "motion-v/nuxt": {
143
+ version: ">=1.7.2",
144
+ optional: false,
145
+ overrides: {},
146
+ defaults: {}
132
147
  }
133
- },
134
- "@vueuse/nuxt": {
135
- version: ">=13.9.0",
136
- optional: false,
137
- overrides: {},
138
- defaults: {}
139
- },
140
- "motion-v/nuxt": {
141
- version: ">=1.7.2",
142
- optional: false,
143
- overrides: {},
144
- defaults: {}
145
- }
148
+ };
149
+ return dependencies;
150
+ },
151
+ onInstall(_nuxt) {
152
+ console.log(`Setting up ${name}.`);
153
+ },
154
+ onUpgrade(_nuxt, _options, previousVersion) {
155
+ console.log(`Upgrading ${name} from ${previousVersion} to ${version}.`);
146
156
  },
147
157
  setup(options, nuxt) {
148
- const resolver = createResolver(import.meta.url);
158
+ const { resolve } = createResolver(import.meta.url);
149
159
  nuxt.options.appConfig.rimelightComponents = defu(
150
160
  nuxt.options.appConfig.rimelightComponents || {},
151
161
  options
152
162
  );
153
163
  addComponentsDir({
154
- path: resolver.resolve("./runtime/components/"),
164
+ path: resolve("./runtime/components/"),
155
165
  pathPrefix: false,
156
- prefix: options.prefix,
166
+ //TODO Figure out if this can be typed better
167
+ prefix: options.prefix ?? void 0,
157
168
  global: true
158
169
  });
159
- addImportsDir(resolver.resolve("./runtime/composables"));
160
- addImportsDir(resolver.resolve("./runtime/types"));
161
- addImportsDir(resolver.resolve("./runtime/utils"));
170
+ addImportsDir(resolve("./runtime/composables"));
171
+ addImportsDir(resolve("./runtime/types"));
172
+ addImportsDir(resolve("./runtime/utils"));
162
173
  const blockFiles = readdirSync(
163
- resolver.resolve("./runtime/components/blocks")
174
+ resolve("./runtime/components/blocks")
164
175
  ).filter((name2) => name2.endsWith(".vue"));
165
176
  const blockNames = blockFiles.map((file) => basename(file, ".vue"));
166
177
  const template = addBlockMapTemplates(blockNames);
167
178
  nuxt.options.alias["#build/rimelight-blocks-map"] = template.dst;
168
- },
169
- onInstall() {
170
- console.log("Setting up rimelight-components for the first time!");
171
- },
172
- onUpgrade() {
173
- console.log("Upgrading rimelight-components.");
174
179
  }
175
180
  });
176
181
 
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import { useClipboard } from "@vueuse/core";
4
- import { useToast } from "#imports";
4
+ import { useToast } from "@nuxt/ui";
5
5
  const { copy } = useClipboard();
6
6
  const toast = useToast();
7
7
  const { name, hex, rgb, hsl, oklch, cmyk } = defineProps({
@@ -1,6 +1,9 @@
1
- declare module "#build/app.config" {
2
- import type { AppConfig } from "@nuxt/schema"
1
+ import type { ModuleOptions } from "../../module"
3
2
 
4
- const _default: AppConfig
5
- export default _default
3
+ declare module "@nuxt/schema" {
4
+ interface AppConfig {
5
+ rimelightComponents: ModuleOptions
6
+ }
6
7
  }
8
+
9
+ export {}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "name": "rimelight-components",
4
4
  "description": "A component library by Rimelight Entertainment.",
5
- "version": "2.0.3",
5
+ "version": "2.0.6",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/Rimelight-Entertainment/rimelight-components.git"
@@ -74,10 +74,8 @@
74
74
  "lint:fix": "oxlint . --fix",
75
75
  "format": "prettier . --check .",
76
76
  "format:fix": "prettier . --write .",
77
- "test": "vitest run",
78
- "test:watch": "vitest watch",
79
- "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
80
- "release": "bun run lint && bun run test && bun run prepack && changelogen --release && bun publish && git push --follow-tags"
77
+ "test": "vitest",
78
+ "release": "release-it"
81
79
  },
82
80
  "dependencies": {
83
81
  "@nuxt/image": "^1.11.0",