rimelight-components 2.0.64 → 2.0.66

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
- "version": "2.0.64",
3
+ "version": "2.0.66",
4
4
  "docs": "https://rimelight.com/tools/rimelight-components",
5
5
  "configKey": "rimelightComponents",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ 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.64";
7
+ const version = "2.0.66";
8
8
  const homepage = "https://rimelight.com/tools/rimelight-components";
9
9
 
10
10
  const defaultOptions = {
@@ -197,7 +197,7 @@ const module$1 = defineNuxtModule().with({
197
197
  nuxt.options.appConfig.rimelightComponents || {},
198
198
  options
199
199
  );
200
- nuxt.options.build.transpile.push("@nuxt/ui");
200
+ nuxt.options.alias["#rimelight-components"] = resolve("./runtime");
201
201
  addComponentsDir({
202
202
  path: resolve("./runtime/components/"),
203
203
  pathPrefix: false,
@@ -1,5 +1,6 @@
1
+ import { type MaybeRefOrGetter } from 'vue';
1
2
  import type { Page, Localized, PageDefinition } from "../types/pages";
2
- export declare const getLocalizedContent: (field: Localized | undefined, currentLocale: string) => string;
3
+ export declare const getLocalizedContent: <T = string>(field: Localized<T> | undefined, currentLocale: MaybeRefOrGetter<string>) => T | string;
3
4
  /**
4
5
  * Ensures a page strictly adheres to its PageDefinition.
5
6
  * - Adds missing properties and groups in the correct order.
@@ -1,6 +1,8 @@
1
+ import { toValue } from "vue";
1
2
  export const getLocalizedContent = (field, currentLocale) => {
2
3
  if (!field) return "";
3
- return field[currentLocale] || field["en"] || "";
4
+ const locale = toValue(currentLocale);
5
+ return field[locale] ?? field["en"] ?? "";
4
6
  };
5
7
  export function syncPageWithDefinition(page, definition) {
6
8
  if (!definition) return page;
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.64",
4
+ "version": "2.0.66",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",