rimelight-components 2.0.50 → 2.0.52
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.json +1 -1
- package/dist/module.mjs +4 -3
- package/dist/runtime/types/index.d.ts +3 -0
- package/dist/runtime/types/index.js +3 -0
- package/dist/runtime/types/pages.d.ts +6 -1
- package/dist/runtime/types/schemas.d.ts +56 -0
- package/dist/runtime/types/schemas.js +35 -0
- package/package.json +4 -2
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { addTemplate, defineNuxtModule, createResolver,
|
|
1
|
+
import { addTemplate, defineNuxtModule, createResolver, addComponentsDir, addImportsDir } from '@nuxt/kit';
|
|
2
2
|
import { defu } from 'defu';
|
|
3
3
|
import { readdirSync } from 'node:fs';
|
|
4
4
|
import { basename } from 'node:path';
|
|
5
|
+
export * from '../dist/runtime/types/index.js';
|
|
5
6
|
|
|
6
7
|
const name = "rimelight-components";
|
|
7
|
-
const version = "2.0.
|
|
8
|
+
const version = "2.0.52";
|
|
8
9
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
9
10
|
|
|
10
11
|
const defaultOptions = {
|
|
@@ -198,7 +199,6 @@ const module$1 = defineNuxtModule().with({
|
|
|
198
199
|
options
|
|
199
200
|
);
|
|
200
201
|
nuxt.options.build.transpile.push("@nuxt/ui");
|
|
201
|
-
installModule("@nuxt/ui");
|
|
202
202
|
addComponentsDir({
|
|
203
203
|
path: resolve("./runtime/components/"),
|
|
204
204
|
pathPrefix: false,
|
|
@@ -208,6 +208,7 @@ const module$1 = defineNuxtModule().with({
|
|
|
208
208
|
});
|
|
209
209
|
addImportsDir(resolve("./runtime/composables"));
|
|
210
210
|
addImportsDir(resolve("./runtime/utils"));
|
|
211
|
+
nuxt.options.alias["#rimelight"] = resolve("./runtime");
|
|
211
212
|
const blockRendererFiles = readdirSync(
|
|
212
213
|
resolve("./runtime/components/blocks/renderer")
|
|
213
214
|
).filter((name2) => name2.endsWith(".vue"));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Image } from "../types/schemas.js";
|
|
1
2
|
import { type Block } from "./blocks.js";
|
|
2
3
|
export type PageType = "Default" | "Location" | "Species" | "Character" | "Object" | "Tale" | "Item" | "Skill" | "Hero" | "Card" | "Series" | "Episode";
|
|
3
4
|
export interface Property {
|
|
@@ -61,13 +62,17 @@ export interface SeriesProperties extends BasePageProperties {
|
|
|
61
62
|
}
|
|
62
63
|
export interface EpisodeProperties extends BasePageProperties {
|
|
63
64
|
}
|
|
65
|
+
export type Localized<T = string> = Record<string, T>;
|
|
64
66
|
/**
|
|
65
67
|
* Common fields shared by every page regardless of type.
|
|
66
68
|
*/
|
|
67
69
|
interface BasePage {
|
|
68
70
|
id: string;
|
|
69
71
|
slug: string;
|
|
70
|
-
|
|
72
|
+
image?: Image;
|
|
73
|
+
title: Localized<string>;
|
|
74
|
+
description?: Localized<string>;
|
|
75
|
+
tags: Localized<string>[];
|
|
71
76
|
blocks: Block[];
|
|
72
77
|
createdAt: string;
|
|
73
78
|
updatedAt: string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const id: import("drizzle-orm").NotNull<import("drizzle-orm").HasDefault<import("drizzle-orm/pg-core").PgUUIDBuilderInitial<"id">>>;
|
|
3
|
+
export declare const timestamps: {
|
|
4
|
+
updated_at: import("drizzle-orm").HasDefault<import("drizzle-orm/pg-core").PgTimestampBuilderInitial<"updated_at">>;
|
|
5
|
+
created_at: import("drizzle-orm").NotNull<import("drizzle-orm").HasDefault<import("drizzle-orm/pg-core").PgTimestampBuilderInitial<"created_at">>>;
|
|
6
|
+
deleted_at: import("drizzle-orm/pg-core").PgTimestampBuilderInitial<"deleted_at">;
|
|
7
|
+
};
|
|
8
|
+
export declare const linkVariantEnum: z.ZodEnum<{
|
|
9
|
+
link: "link";
|
|
10
|
+
solid: "solid";
|
|
11
|
+
outline: "outline";
|
|
12
|
+
subtle: "subtle";
|
|
13
|
+
soft: "soft";
|
|
14
|
+
ghost: "ghost";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const linkColorEnum: z.ZodEnum<{
|
|
17
|
+
info: "info";
|
|
18
|
+
success: "success";
|
|
19
|
+
warning: "warning";
|
|
20
|
+
error: "error";
|
|
21
|
+
primary: "primary";
|
|
22
|
+
secondary: "secondary";
|
|
23
|
+
neutral: "neutral";
|
|
24
|
+
}>;
|
|
25
|
+
export declare const ImageSchema: z.ZodObject<{
|
|
26
|
+
src: z.ZodString;
|
|
27
|
+
alt: z.ZodString;
|
|
28
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type Image = z.infer<typeof ImageSchema>;
|
|
32
|
+
export declare const LinkSchema: z.ZodObject<{
|
|
33
|
+
label: z.ZodString;
|
|
34
|
+
to: z.ZodURL;
|
|
35
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
36
|
+
trailing: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
info: "info";
|
|
39
|
+
success: "success";
|
|
40
|
+
warning: "warning";
|
|
41
|
+
error: "error";
|
|
42
|
+
primary: "primary";
|
|
43
|
+
secondary: "secondary";
|
|
44
|
+
neutral: "neutral";
|
|
45
|
+
}>>;
|
|
46
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
link: "link";
|
|
48
|
+
solid: "solid";
|
|
49
|
+
outline: "outline";
|
|
50
|
+
subtle: "subtle";
|
|
51
|
+
soft: "soft";
|
|
52
|
+
ghost: "ghost";
|
|
53
|
+
}>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type Link = z.infer<typeof LinkSchema>;
|
|
56
|
+
export type UserAvailability = "available" | "busy" | "invisible";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { uuid, timestamp } from "drizzle-orm/pg-core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { sql } from "drizzle-orm";
|
|
4
|
+
export const id = uuid("id").default(sql`uuidv7()`).notNull();
|
|
5
|
+
export const timestamps = {
|
|
6
|
+
updated_at: timestamp("updated_at", {
|
|
7
|
+
withTimezone: true
|
|
8
|
+
}).$onUpdate(() => /* @__PURE__ */ new Date()),
|
|
9
|
+
created_at: timestamp("created_at", { withTimezone: true }).defaultNow().notNull(),
|
|
10
|
+
deleted_at: timestamp("deleted_at", { withTimezone: true })
|
|
11
|
+
};
|
|
12
|
+
export const linkVariantEnum = z.enum(["solid", "outline", "subtle", "soft", "ghost", "link"]);
|
|
13
|
+
export const linkColorEnum = z.enum([
|
|
14
|
+
"primary",
|
|
15
|
+
"secondary",
|
|
16
|
+
"neutral",
|
|
17
|
+
"error",
|
|
18
|
+
"warning",
|
|
19
|
+
"success",
|
|
20
|
+
"info"
|
|
21
|
+
]);
|
|
22
|
+
export const ImageSchema = z.object({
|
|
23
|
+
src: z.string().min(1, "Image source must be provided."),
|
|
24
|
+
alt: z.string().min(1, "Image alt text must be provided."),
|
|
25
|
+
width: z.number().int().positive().optional(),
|
|
26
|
+
height: z.number().int().positive().optional()
|
|
27
|
+
});
|
|
28
|
+
export const LinkSchema = z.object({
|
|
29
|
+
label: z.string().min(1, "Link label must be provided."),
|
|
30
|
+
to: z.url("Link destination must be a valid URL.").min(1, "Link destination must be provided."),
|
|
31
|
+
icon: z.string().optional(),
|
|
32
|
+
trailing: z.boolean().optional(),
|
|
33
|
+
color: linkColorEnum.optional(),
|
|
34
|
+
variant: linkVariantEnum.optional()
|
|
35
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rimelight-components",
|
|
3
3
|
"description": "A component library by Rimelight Entertainment.",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.52",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -86,10 +86,12 @@
|
|
|
86
86
|
"@vueuse/nuxt": "^14.1.0",
|
|
87
87
|
"date-fns": "^4.1.0",
|
|
88
88
|
"defu": "^6.1.4",
|
|
89
|
+
"drizzle-orm": "^0.45.1",
|
|
89
90
|
"nuxt": "^4.2.2",
|
|
90
91
|
"tailwind-variants": "^3.2.2",
|
|
91
92
|
"uuid": "^13.0.0",
|
|
92
|
-
"vue": "^3.5.25"
|
|
93
|
+
"vue": "^3.5.25",
|
|
94
|
+
"zod": "^4.2.1"
|
|
93
95
|
},
|
|
94
96
|
"devDependencies": {
|
|
95
97
|
"@nuxt/devtools": "^3.1.1",
|