@resee-movies/nuxt-ux 0.1.0 → 0.2.1

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.
Files changed (31) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -0
  3. package/dist/runtime/components/Button.vue.d.ts +2 -2
  4. package/dist/runtime/components/Card.vue +4 -0
  5. package/dist/runtime/components/Card.vue.d.ts +10 -13
  6. package/dist/runtime/components/Dialog.vue.d.ts +2 -2
  7. package/dist/runtime/components/Drawer.vue.d.ts +2 -2
  8. package/dist/runtime/components/Heading.vue +4 -0
  9. package/dist/runtime/components/Heading.vue.d.ts +6 -9
  10. package/dist/runtime/components/Icon.vue.d.ts +2 -2
  11. package/dist/runtime/components/IconTextPair.vue.d.ts +2 -2
  12. package/dist/runtime/components/Image.vue.d.ts +3 -3
  13. package/dist/runtime/components/LayoutPageColumn.vue +1 -1
  14. package/dist/runtime/components/LayoutPageColumn.vue.d.ts +2 -2
  15. package/dist/runtime/components/LayoutPageContainer.vue.d.ts +2 -2
  16. package/dist/runtime/components/Link.vue +4 -2
  17. package/dist/runtime/components/Link.vue.d.ts +3 -3
  18. package/dist/runtime/components/LoadingIndicator.vue +4 -0
  19. package/dist/runtime/components/LoadingIndicator.vue.d.ts +3 -3
  20. package/dist/runtime/components/Lorem.vue +4 -0
  21. package/dist/runtime/components/Lorem.vue.d.ts +3 -3
  22. package/dist/runtime/components/Message.vue.d.ts +2 -2
  23. package/dist/runtime/components/ProgressBar.vue +4 -0
  24. package/dist/runtime/components/ProgressBar.vue.d.ts +3 -3
  25. package/dist/runtime/components/Tag.vue +4 -0
  26. package/dist/runtime/components/Tag.vue.d.ts +3 -3
  27. package/dist/runtime/config.d.ts +18 -0
  28. package/dist/runtime/config.js +14 -0
  29. package/package.json +5 -2
  30. package/dist/runtime/composables/use-nuxt-ux-config.d.ts +0 -24
  31. package/dist/runtime/composables/use-nuxt-ux-config.js +0 -15
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@resee-movies/nuxt-ux",
3
3
  "configKey": "ux",
4
- "version": "0.1.0",
4
+ "version": "0.2.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.0"
package/dist/module.mjs CHANGED
@@ -203,6 +203,7 @@ const module = defineNuxtModule({
203
203
  const composables = resolver.resolve("./runtime/composables/");
204
204
  const server = resolver.resolve("./runtime/server/");
205
205
  const stylesheet = resolver.resolve("./runtime/theme/css/styles.css");
206
+ nuxt.options.alias["#resee-ux"] = resolver.resolve("./runtime");
206
207
  const sources = options.tailwind?.sources?.slice() ?? [];
207
208
  const plugins = options.tailwind?.plugins?.slice() ?? [];
208
209
  const imports = options.tailwind?.plugins?.slice() ?? [];
@@ -13,7 +13,7 @@ import type { IconTextPairProps } from './IconTextPair.vue.js';
13
13
  * When "grow", causes the button to expand to the full width of its container, and
14
14
  * increase its font size when at the small breakpoint.
15
15
  */
16
- export type ButtonProps = {
16
+ export interface ButtonProps extends IconTextPairProps {
17
17
  is?: string | Component;
18
18
  severity?: StyleStatusLevel | 'unset';
19
19
  bordered?: boolean;
@@ -25,7 +25,7 @@ export type ButtonProps = {
25
25
  tooltip?: string;
26
26
  disabledTooltip?: string;
27
27
  onClick?: ((evt: Event) => void | Promise<void>) | ((evt: Event) => void | Promise<void>)[];
28
- } & IconTextPairProps;
28
+ }
29
29
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
30
30
  click: (evt: Event) => any;
31
31
  }, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{
@@ -12,6 +12,10 @@
12
12
  </Component>
13
13
  </template>
14
14
 
15
+ <script>
16
+
17
+ </script>
18
+
15
19
  <script setup>
16
20
  import { useSlots } from "#imports";
17
21
  const props = defineProps({
@@ -1,20 +1,17 @@
1
- type __VLS_Props = {
1
+ export interface CardProps {
2
2
  is?: string;
3
3
  interactive?: boolean;
4
- };
5
- declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {};
6
- type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_7) => any;
8
- } & {
9
- image?: (props: typeof __VLS_9) => any;
10
- } & {
11
- content?: (props: typeof __VLS_11) => any;
12
- };
13
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
4
+ }
5
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {
14
6
  is: string;
15
7
  interactive: boolean;
16
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
9
+ default?: (props: {}) => any;
10
+ } & {
11
+ image?: (props: {}) => any;
12
+ } & {
13
+ content?: (props: {}) => any;
14
+ }>;
18
15
  declare const _default: typeof __VLS_export;
19
16
  export default _default;
20
17
  type __VLS_WithSlots<T, S> = T & {
@@ -1,8 +1,8 @@
1
1
  import type { DialogProps as PrimeDialogProps } from 'primevue';
2
- export type DialogProps = {
2
+ export interface DialogProps extends PrimeDialogProps {
3
3
  size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
4
4
  showHeaderText?: boolean;
5
- } & PrimeDialogProps;
5
+ }
6
6
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
7
  "update:visible": (visible: boolean) => any;
8
8
  }, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
@@ -1,7 +1,7 @@
1
1
  import type { DrawerProps as PrimeDrawerProps } from 'primevue';
2
- export type DrawerProps = {
2
+ export interface DrawerProps extends PrimeDrawerProps {
3
3
  showHeaderText?: boolean;
4
- } & PrimeDrawerProps;
4
+ }
5
5
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<DrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
6
6
  "update:visible": (visible: boolean) => any;
7
7
  }, string, import("vue").PublicProps, Readonly<DrawerProps> & Readonly<{
@@ -4,6 +4,10 @@
4
4
  </Component>
5
5
  </template>
6
6
 
7
+ <script>
8
+
9
+ </script>
10
+
7
11
  <script setup>
8
12
  import { computed } from "vue";
9
13
  const props = defineProps({
@@ -1,16 +1,13 @@
1
- type __VLS_Props = {
1
+ export interface HeadingProps {
2
2
  text?: string | null;
3
3
  level?: '1' | '2' | '3' | '4' | '5' | '6' | 1 | 2 | 3 | 4 | 5 | 6;
4
- };
5
- declare var __VLS_7: {};
6
- type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_7) => any;
8
- };
9
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
4
+ }
5
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<HeadingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HeadingProps> & Readonly<{}>, {
10
6
  text: string | null;
11
7
  level: "1" | "2" | "3" | "4" | "5" | "6" | 1 | 2 | 3 | 4 | 5 | 6;
12
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
9
+ default?: (props: {}) => any;
10
+ }>;
14
11
  declare const _default: typeof __VLS_export;
15
12
  export default _default;
16
13
  type __VLS_WithSlots<T, S> = T & {
@@ -1,9 +1,9 @@
1
- export type IconProps = {
1
+ export interface IconProps {
2
2
  name?: string;
3
3
  loading?: boolean;
4
4
  size?: 'sm' | 'md' | 'lg' | 'xl';
5
5
  colorCycle?: boolean;
6
- };
6
+ }
7
7
  declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {
8
8
  size: "sm" | "md" | "lg" | "xl";
9
9
  name: string;
@@ -1,5 +1,5 @@
1
1
  import type { IconProps } from './Icon.vue.js';
2
- export type IconTextPairProps = {
2
+ export interface IconTextPairProps {
3
3
  text?: string;
4
4
  icon?: string;
5
5
  trailingIcon?: string;
@@ -8,7 +8,7 @@ export type IconTextPairProps = {
8
8
  layout?: 'column' | 'row';
9
9
  spacing?: 'wide' | 'normal';
10
10
  loading?: boolean;
11
- };
11
+ }
12
12
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<IconTextPairProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconTextPairProps> & Readonly<{}>, {
13
13
  loading: boolean;
14
14
  icon: string;
@@ -5,7 +5,7 @@ import type { TmdbImageSize } from '@resee-movies/utilities/tmdb/get-tmdb-image-
5
5
  import type { LoadImageType } from '../composables/use-load-image.js';
6
6
  import type { HTMLElementClassNames } from '../types/index.js';
7
7
  import type { IconProps } from './Icon.vue.js';
8
- export type UiImgProps = {
8
+ export interface ImageProps {
9
9
  src: ImageFileDescriptor | null | undefined;
10
10
  alt?: string | null | ((error: unknown) => string);
11
11
  type?: LoadImageType;
@@ -22,7 +22,7 @@ export type UiImgProps = {
22
22
  beveled?: boolean;
23
23
  raised?: boolean;
24
24
  overlayClasses?: HTMLElementClassNames;
25
- };
25
+ }
26
26
  export declare const AspectRatioClassNames: {
27
27
  readonly '1/1': "aspect-square";
28
28
  readonly square: "aspect-square";
@@ -38,7 +38,7 @@ export declare const ObjectFitClassNames: {
38
38
  readonly contain: "object-contain";
39
39
  readonly inside: "object-contain";
40
40
  };
41
- declare const __VLS_export: import("vue").DefineComponent<UiImgProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UiImgProps> & Readonly<{}>, {
41
+ declare const __VLS_export: import("vue").DefineComponent<ImageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageProps> & Readonly<{}>, {
42
42
  type: LoadImageType;
43
43
  loading: "lazy" | "eager";
44
44
  iconSize: "sm" | "md" | "lg" | "xl";
@@ -8,7 +8,7 @@
8
8
  </template>
9
9
 
10
10
  <script>
11
-
11
+ ;
12
12
  </script>
13
13
 
14
14
  <script setup>
@@ -1,7 +1,7 @@
1
- export type LayoutPageColumn = {
1
+ export interface LayoutPageColumn {
2
2
  is?: string;
3
3
  layout?: 'main' | 'vista';
4
- };
4
+ }
5
5
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LayoutPageColumn, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LayoutPageColumn> & Readonly<{}>, {
6
6
  layout: "main" | "vista";
7
7
  is: string;
@@ -1,9 +1,9 @@
1
1
  import type { HintedString } from '../types/index.js';
2
- export type LayoutPageContainerProps = {
2
+ export interface LayoutPageContainerProps {
3
3
  is?: HintedString<'div' | 'main' | 'section' | 'article' | 'nav'>;
4
4
  glassEffect?: boolean;
5
5
  accentColor?: string;
6
- };
6
+ }
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LayoutPageContainerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LayoutPageContainerProps> & Readonly<{}>, {
8
8
  is: HintedString<"div" | "main" | "section" | "article" | "nav">;
9
9
  glassEffect: boolean;
@@ -12,12 +12,14 @@
12
12
  </template>
13
13
 
14
14
  <script>
15
- import { useNuxtUxConfig } from "../composables/use-nuxt-ux-config";
15
+
16
16
  </script>
17
17
 
18
18
  <script setup>
19
+ import { resolveComponent } from "vue";
20
+ import { getReseeUxConstant } from "../config";
19
21
  import Button from "./Button.vue";
20
- const LinkComponent = useNuxtUxConfig().getConfig("UiLinkBaseComponent");
22
+ const LinkComponent = getReseeUxConstant("UiLinkBaseComponent") ?? resolveComponent("NuxtLink");
21
23
  const props = defineProps({
22
24
  to: { type: null, required: true },
23
25
  external: { type: Boolean, required: false, default: false },
@@ -1,14 +1,14 @@
1
1
  import type { RouteLocationRaw } from 'vue-router';
2
2
  import type { ButtonProps } from './Button.vue.js';
3
- export type UiLinkProps = {
3
+ export interface LinkProps extends /* @vue-ignore */ Omit<ButtonProps, 'bordered' | 'variant' | 'spacing'> {
4
4
  to: RouteLocationRaw;
5
5
  external?: boolean;
6
6
  target?: '_blank' | '_parent' | '_self' | '_top';
7
7
  underline?: boolean;
8
8
  variant?: ButtonProps['variant'];
9
9
  spacing?: ButtonProps['spacing'];
10
- } & /* @vue-ignore */ Omit<ButtonProps, 'bordered' | 'variant' | 'spacing'>;
11
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<UiLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UiLinkProps> & Readonly<{}>, {
10
+ }
11
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
12
12
  target: "_blank" | "_parent" | "_self" | "_top";
13
13
  spacing: "wide" | "normal";
14
14
  variant: "a" | "btn";
@@ -2,6 +2,10 @@
2
2
  <PrimeProgressSpinner :class="['indicator', props.size]" />
3
3
  </template>
4
4
 
5
+ <script>
6
+
7
+ </script>
8
+
5
9
  <script setup>
6
10
  import { ProgressSpinner as PrimeProgressSpinner } from "primevue";
7
11
  const props = defineProps({
@@ -1,8 +1,8 @@
1
1
  import type { IconProps } from './Icon.vue.js';
2
- type __VLS_Props = {
2
+ export interface LoadingIndicatorProps {
3
3
  size?: IconProps['size'];
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
4
+ }
5
+ declare const __VLS_export: import("vue").DefineComponent<LoadingIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LoadingIndicatorProps> & Readonly<{}>, {
6
6
  size: "sm" | "md" | "lg" | "xl";
7
7
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
8
  declare const _default: typeof __VLS_export;
@@ -10,6 +10,10 @@
10
10
  </template>
11
11
  </template>
12
12
 
13
+ <script>
14
+
15
+ </script>
16
+
13
17
  <script setup>
14
18
  import { useId, useState } from "#imports";
15
19
  import { computed } from "vue";
@@ -1,4 +1,4 @@
1
- type __VLS_Props = {
1
+ export interface LoremProps {
2
2
  type?: 'words' | 'sentences' | 'paragraphs';
3
3
  min?: string | number;
4
4
  max?: string | number;
@@ -8,8 +8,8 @@ type __VLS_Props = {
8
8
  maxSentenceCount?: string | number;
9
9
  minWordCount?: string | number;
10
10
  maxWordCount?: string | number;
11
- };
12
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ }
12
+ declare const __VLS_export: import("vue").DefineComponent<LoremProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LoremProps> & Readonly<{}>, {
13
13
  type: "words" | "sentences" | "paragraphs";
14
14
  min: string | number;
15
15
  max: string | number;
@@ -1,11 +1,11 @@
1
1
  import type { StatusLevel } from '../types/index.js';
2
- export type MessageProps = {
2
+ export interface MessageProps {
3
3
  severity?: StatusLevel;
4
4
  text?: string;
5
5
  class?: string;
6
6
  style?: string;
7
7
  accented?: boolean;
8
- };
8
+ }
9
9
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<MessageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MessageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
10
10
  default?: (props: {}) => any;
11
11
  }>;
@@ -8,6 +8,10 @@
8
8
  />
9
9
  </template>
10
10
 
11
+ <script>
12
+
13
+ </script>
14
+
11
15
  <script setup>
12
16
  import { computed } from "vue";
13
17
  import PrimeProgressBar from "primevue/progressbar";
@@ -1,9 +1,9 @@
1
- type __VLS_Props = {
1
+ export interface ProgressBarProps {
2
2
  value?: number | undefined;
3
3
  showValue?: boolean;
4
4
  indeterminate?: boolean;
5
- };
6
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
5
+ }
6
+ declare const __VLS_export: import("vue").DefineComponent<ProgressBarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProgressBarProps> & Readonly<{}>, {
7
7
  value: number;
8
8
  showValue: boolean;
9
9
  indeterminate: boolean;
@@ -13,6 +13,10 @@
13
13
  </PrimeTag>
14
14
  </template>
15
15
 
16
+ <script>
17
+
18
+ </script>
19
+
16
20
  <script setup>
17
21
  import PrimeTag from "primevue/tag";
18
22
  import vPrimeTooltip from "primevue/tooltip";
@@ -1,12 +1,12 @@
1
1
  import type { StatusLevel } from '../types/index.js';
2
- type __VLS_Props = {
2
+ export interface TagProps {
3
3
  text?: string;
4
4
  icon?: string;
5
5
  severity?: StatusLevel;
6
6
  size?: 'sm' | 'md' | 'lg';
7
7
  tooltip?: string;
8
- };
9
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
+ }
9
+ declare const __VLS_export: import("vue").DefineComponent<TagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TagProps> & Readonly<{}>, {
10
10
  size: "sm" | "md" | "lg";
11
11
  icon: string;
12
12
  text: string;
@@ -0,0 +1,18 @@
1
+ import { type Component } from 'vue';
2
+ /**
3
+ * Runtime constants can be set once and then used throughout this package.
4
+ */
5
+ export type ReseeUxRuntimeConstants = {
6
+ UiLinkBaseComponent?: Component;
7
+ };
8
+ export type ConstantsKey = keyof ReseeUxRuntimeConstants;
9
+ export type ConstantsValue<K extends ConstantsKey> = ReseeUxRuntimeConstants[K];
10
+ /**
11
+ * Set one or more ReSee UX package global constants.
12
+ */
13
+ export declare function setReseeUxConstant(values: Partial<ReseeUxRuntimeConstants>): void;
14
+ export declare function setReseeUxConstant<K extends ConstantsKey>(key: K, value: ConstantsValue<K>): void;
15
+ /**
16
+ * Retrieve a ReSee UX package global constant.
17
+ */
18
+ export declare function getReseeUxConstant<K extends ConstantsKey>(key: K): ConstantsValue<K>;
@@ -0,0 +1,14 @@
1
+ import { isObjectLike } from "@resee-movies/utilities/objects/is-object-like";
2
+ const RuntimeConstants = {
3
+ UiLinkBaseComponent: void 0
4
+ };
5
+ export function setReseeUxConstant(keyOrObject, valueOrUndef) {
6
+ if (isObjectLike(keyOrObject)) {
7
+ Object.assign(RuntimeConstants, keyOrObject);
8
+ } else if (valueOrUndef) {
9
+ RuntimeConstants[keyOrObject] = valueOrUndef;
10
+ }
11
+ }
12
+ export function getReseeUxConstant(key) {
13
+ return RuntimeConstants[key];
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resee-movies/nuxt-ux",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "The next-gen user experience library for ReSee Movies - currently in development. ",
5
5
  "repository": {
6
6
  "url": "https://github.com/ReSee-Movies/nuxt-ux.git"
@@ -13,11 +13,14 @@
13
13
  "types": "./dist/types.d.mts",
14
14
  "import": "./dist/module.mjs"
15
15
  },
16
+ "./config": {
17
+ "import": "./dist/runtime/config.js"
18
+ },
16
19
  "./components/*": {
17
20
  "import": "./dist/runtime/components/*"
18
21
  },
19
22
  "./composables/*": {
20
- "import": "./dist/runtime/composables/*"
23
+ "import": "./dist/runtime/composables/*.js"
21
24
  },
22
25
  "./types": {
23
26
  "types": "./dist/runtime/types/index.d.ts"
@@ -1,24 +0,0 @@
1
- declare const NuxtUxConfig: {
2
- UiLinkBaseComponent: import("vue").ShallowRef<import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>> | import("vue").ShallowRef<import("vue").FunctionalComponent<any, {}, any, {}>, import("vue").FunctionalComponent<any, {}, any, {}>> | import("vue").ShallowRef<{
3
- new (...args: any[]): any;
4
- __isFragment?: never;
5
- __isTeleport?: never;
6
- __isSuspense?: never;
7
- }, {
8
- new (...args: any[]): any;
9
- __isFragment?: never;
10
- __isTeleport?: never;
11
- __isSuspense?: never;
12
- }>;
13
- };
14
- export type NuxtUxConfigPropName = keyof typeof NuxtUxConfig;
15
- export type NuxtUxConfigPropValue<K extends NuxtUxConfigPropName> = (typeof NuxtUxConfig)[K];
16
- /**
17
- * Exposes `getConfig` and `setConfig` methods for manipulating module-level
18
- * configuration at runtime.
19
- */
20
- export declare function useNuxtUxConfig(): {
21
- setConfig<K extends NuxtUxConfigPropName>(key: K, value: NuxtUxConfigPropValue<K>): void;
22
- getConfig<K extends NuxtUxConfigPropName>(key: K): NuxtUxConfigPropValue<K>;
23
- };
24
- export {};
@@ -1,15 +0,0 @@
1
- import { NuxtLink } from "#components";
2
- import { isRef, shallowRef } from "vue";
3
- const NuxtUxConfig = {
4
- UiLinkBaseComponent: shallowRef(NuxtLink)
5
- };
6
- export function useNuxtUxConfig() {
7
- return {
8
- setConfig(key, value) {
9
- NuxtUxConfig[key] = isRef(value) ? value : shallowRef(value);
10
- },
11
- getConfig(key) {
12
- return NuxtUxConfig[key];
13
- }
14
- };
15
- }