@byyuurin/ui 0.0.7 → 0.0.8

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 (121) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +5 -5
  3. package/dist/module.mjs.map +1 -1
  4. package/dist/runtime/app/injections.d.ts +16 -0
  5. package/dist/runtime/app/injections.js +31 -0
  6. package/dist/runtime/components/Accordion.vue +20 -20
  7. package/dist/runtime/components/Alert.vue +22 -15
  8. package/dist/runtime/components/App.vue +15 -15
  9. package/dist/runtime/components/Avatar.vue +73 -0
  10. package/dist/runtime/components/AvatarGroup.vue +90 -0
  11. package/dist/runtime/components/Badge.vue +15 -10
  12. package/dist/runtime/components/Breadcrumb.vue +105 -0
  13. package/dist/runtime/components/Button.vue +13 -13
  14. package/dist/runtime/components/ButtonGroup.vue +12 -10
  15. package/dist/runtime/components/Card.vue +7 -2
  16. package/dist/runtime/components/Carousel.vue +19 -12
  17. package/dist/runtime/components/Checkbox.vue +13 -9
  18. package/dist/runtime/components/Chip.vue +17 -12
  19. package/dist/runtime/components/Collapsible.vue +3 -3
  20. package/dist/runtime/components/Drawer.vue +14 -15
  21. package/dist/runtime/components/Input.vue +24 -24
  22. package/dist/runtime/components/InputNumber.vue +7 -5
  23. package/dist/runtime/components/Kbd.vue +51 -0
  24. package/dist/runtime/components/Link.vue +10 -10
  25. package/dist/runtime/components/LinkBase.vue +1 -1
  26. package/dist/runtime/components/Modal.vue +11 -8
  27. package/dist/runtime/components/ModalProvider.vue +2 -1
  28. package/dist/runtime/components/Pagination.vue +30 -30
  29. package/dist/runtime/components/PinInput.vue +7 -7
  30. package/dist/runtime/components/Popover.vue +7 -7
  31. package/dist/runtime/components/Progress.vue +165 -0
  32. package/dist/runtime/components/RadioGroup.vue +33 -29
  33. package/dist/runtime/components/Select.vue +40 -40
  34. package/dist/runtime/components/Skeleton.vue +33 -0
  35. package/dist/runtime/components/Slider.vue +6 -6
  36. package/dist/runtime/components/Switch.vue +11 -12
  37. package/dist/runtime/components/Table.vue +19 -11
  38. package/dist/runtime/components/Tabs.vue +22 -18
  39. package/dist/runtime/components/Textarea.vue +11 -11
  40. package/dist/runtime/components/Toast.vue +14 -13
  41. package/dist/runtime/components/Toaster.vue +4 -4
  42. package/dist/runtime/components/Tooltip.vue +7 -7
  43. package/dist/runtime/composables/useAvatarGroup.d.ts +4 -0
  44. package/dist/runtime/composables/useAvatarGroup.js +8 -0
  45. package/dist/runtime/composables/useButtonGroup.d.ts +4 -12
  46. package/dist/runtime/composables/useButtonGroup.js +1 -6
  47. package/dist/runtime/composables/useComponentIcons.d.ts +9 -9
  48. package/dist/runtime/composables/useComponentIcons.js +11 -11
  49. package/dist/runtime/composables/useKbd.d.ts +35 -0
  50. package/dist/runtime/composables/useKbd.js +49 -0
  51. package/dist/runtime/composables/useLocale.d.ts +8 -0
  52. package/dist/runtime/composables/useLocale.js +22 -0
  53. package/dist/runtime/composables/useModal.d.ts +1 -6
  54. package/dist/runtime/composables/useModal.js +1 -6
  55. package/dist/runtime/composables/useTheme.d.ts +0 -4
  56. package/dist/runtime/composables/useTheme.js +2 -12
  57. package/dist/runtime/index.d.ts +6 -0
  58. package/dist/runtime/index.js +6 -0
  59. package/dist/runtime/locale/en.d.ts +2 -0
  60. package/dist/runtime/locale/en.js +28 -0
  61. package/dist/runtime/locale/index.d.ts +2 -0
  62. package/dist/runtime/locale/index.js +2 -0
  63. package/dist/runtime/locale/zh-tw.d.ts +2 -0
  64. package/dist/runtime/locale/zh-tw.js +28 -0
  65. package/dist/runtime/theme/accordion.d.ts +6 -6
  66. package/dist/runtime/theme/accordion.js +2 -2
  67. package/dist/runtime/theme/app.d.ts +6 -6
  68. package/dist/runtime/theme/app.js +7 -7
  69. package/dist/runtime/theme/avatar-group.d.ts +52 -0
  70. package/dist/runtime/theme/avatar-group.js +32 -0
  71. package/dist/runtime/theme/avatar.d.ts +56 -0
  72. package/dist/runtime/theme/avatar.js +34 -0
  73. package/dist/runtime/theme/breadcrumb.d.ts +67 -0
  74. package/dist/runtime/theme/breadcrumb.js +44 -0
  75. package/dist/runtime/theme/button.d.ts +8 -8
  76. package/dist/runtime/theme/button.js +9 -9
  77. package/dist/runtime/theme/chip.d.ts +4 -4
  78. package/dist/runtime/theme/chip.js +2 -2
  79. package/dist/runtime/theme/drawer.js +2 -2
  80. package/dist/runtime/theme/index.d.ts +6 -0
  81. package/dist/runtime/theme/index.js +6 -0
  82. package/dist/runtime/theme/input-number.d.ts +6 -0
  83. package/dist/runtime/theme/input-number.js +5 -2
  84. package/dist/runtime/theme/input.d.ts +12 -12
  85. package/dist/runtime/theme/input.js +12 -12
  86. package/dist/runtime/theme/kbd.d.ts +39 -0
  87. package/dist/runtime/theme/kbd.js +26 -0
  88. package/dist/runtime/theme/modal.js +2 -2
  89. package/dist/runtime/theme/popover.js +1 -1
  90. package/dist/runtime/theme/progress.d.ts +122 -0
  91. package/dist/runtime/theme/progress.js +95 -0
  92. package/dist/runtime/theme/select.d.ts +18 -18
  93. package/dist/runtime/theme/select.js +16 -16
  94. package/dist/runtime/theme/skeleton.d.ts +8 -0
  95. package/dist/runtime/theme/skeleton.js +7 -0
  96. package/dist/runtime/theme/switch.js +1 -1
  97. package/dist/runtime/theme/tabs.d.ts +2 -2
  98. package/dist/runtime/theme/tabs.js +1 -1
  99. package/dist/runtime/theme/toast.js +2 -2
  100. package/dist/runtime/theme/tooltip.js +1 -1
  101. package/dist/runtime/types/components.d.ts +6 -0
  102. package/dist/runtime/types/index.d.ts +1 -0
  103. package/dist/runtime/types/index.js +1 -0
  104. package/dist/runtime/types/locale.d.ts +23 -0
  105. package/dist/runtime/types/locale.js +0 -0
  106. package/dist/runtime/types/utils.d.ts +1 -1
  107. package/dist/runtime/utils/index.d.ts +6 -1
  108. package/dist/runtime/utils/index.js +6 -4
  109. package/dist/runtime/utils/link.d.ts +1 -1
  110. package/dist/runtime/utils/translator.d.ts +18 -0
  111. package/dist/runtime/utils/translator.js +8 -0
  112. package/dist/shared/ui.ba24b380.mjs +4 -0
  113. package/dist/shared/ui.ba24b380.mjs.map +1 -0
  114. package/dist/unplugin.mjs +3 -12
  115. package/dist/unplugin.mjs.map +1 -1
  116. package/dist/vite.mjs +1 -1
  117. package/package.json +24 -13
  118. package/dist/shared/ui.d1728164.mjs +0 -4
  119. package/dist/shared/ui.d1728164.mjs.map +0 -1
  120. /package/dist/runtime/{composables/defineInjection.d.ts → utils/vue.d.ts} +0 -0
  121. /package/dist/runtime/{composables/defineInjection.js → utils/vue.js} +0 -0
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ base: string;
3
+ slots: undefined;
4
+ variants: {};
5
+ compoundVariants: import("@byyuurin/ui-kit").CVCompoundVariants<{}, undefined, "animate-pulse rounded-ui-base bg-soft-ui-fill/10">;
6
+ defaultVariants: import("@byyuurin/ui-kit").CVDefaultVariants<{}, undefined>;
7
+ };
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { ct } from "@byyuurin/ui-kit";
2
+ export default ct(
3
+ /* @unocss-include */
4
+ {
5
+ base: "animate-pulse rounded-ui-base bg-soft-ui-fill/10"
6
+ }
7
+ );
@@ -3,7 +3,7 @@ export default ct(
3
3
  /* @unocss-include */
4
4
  {
5
5
  slots: {
6
- root: "relative flex items-start",
6
+ root: "relative inline-flex items-start",
7
7
  base: [
8
8
  "inline-flex items-center shrink-0 rounded-ui-switch border-2 border-transparent transition-colors duration-200",
9
9
  "outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ui-cb/80",
@@ -6,7 +6,7 @@ declare const _default: {
6
6
  indicator: string;
7
7
  trigger: string[];
8
8
  content: string;
9
- prefixIcon: string;
9
+ leadingIcon: string;
10
10
  label: string;
11
11
  };
12
12
  variants: {
@@ -142,7 +142,7 @@ declare const _default: {
142
142
  indicator: string;
143
143
  trigger: string[];
144
144
  content: string;
145
- prefixIcon: string;
145
+ leadingIcon: string;
146
146
  label: string;
147
147
  }, undefined>;
148
148
  defaultVariants: {
@@ -12,7 +12,7 @@ export default ct(
12
12
  "disabled:cursor-not-allowed disabled:opacity-50"
13
13
  ],
14
14
  content: "w-full focus:outline-none",
15
- prefixIcon: "shrink-0 size-1.5em",
15
+ leadingIcon: "shrink-0 size-1.5em",
16
16
  label: "truncate"
17
17
  },
18
18
  variants: {
@@ -7,7 +7,7 @@ export default ct(
7
7
  wrapper: "w-0 flex-1 flex flex-col gap-1",
8
8
  title: "text-base font-medium color-ui-cb",
9
9
  description: "text-sm color-ui-cb/80",
10
- icon: "shrink-0 size-6 color-ui-cb",
10
+ icon: "shrink-0 size-1.25em color-ui-cb",
11
11
  avatar: "shrink-0",
12
12
  avatarSize: "2xl",
13
13
  actions: "flex flex-wrap gap-1.5 shrink-0",
@@ -22,7 +22,7 @@ export default ct(
22
22
  },
23
23
  vertical: {
24
24
  root: "items-start",
25
- actions: "items-start mt-2.5"
25
+ actions: "items-start"
26
26
  }
27
27
  },
28
28
  title: {
@@ -3,7 +3,7 @@ export default ct(
3
3
  /* @unocss-include */
4
4
  {
5
5
  slots: {
6
- content: "flex items-center gap-1 bg-ui-cx color-ui-base shadow-sm rounded-ui-base ring ring-ui-base/10 h-6 px-2 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
6
+ content: "z-1 flex items-center gap-1 bg-ui-cx color-ui-base shadow-sm rounded-ui-base ring ring-ui-base/10 h-6 px-2 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
7
7
  arrow: "fill-ui-cx stroke-ui-cb/10",
8
8
  text: "truncate"
9
9
  }
@@ -1,7 +1,10 @@
1
1
  export type * from '../components/Accordion.vue';
2
2
  export type * from '../components/Alert.vue';
3
3
  export type * from '../components/App.vue';
4
+ export type * from '../components/Avatar.vue';
5
+ export type * from '../components/AvatarGroup.vue';
4
6
  export type * from '../components/Badge.vue';
7
+ export type * from '../components/Breadcrumb.vue';
5
8
  export type * from '../components/Button.vue';
6
9
  export type * from '../components/ButtonGroup.vue';
7
10
  export type * from '../components/Card.vue';
@@ -12,15 +15,18 @@ export type * from '../components/Collapsible.vue';
12
15
  export type * from '../components/Drawer.vue';
13
16
  export type * from '../components/Input.vue';
14
17
  export type * from '../components/InputNumber.vue';
18
+ export type * from '../components/Kbd.vue';
15
19
  export type * from '../components/Link.vue';
16
20
  export type * from '../components/Modal.vue';
17
21
  export type * from '../components/Pagination.vue';
18
22
  export type * from '../components/PinInput.vue';
19
23
  export type * from '../components/Popover.vue';
24
+ export type * from '../components/Progress.vue';
20
25
  export type * from '../components/RadioGroup.vue';
21
26
  export type * from '../components/ScrollArea.vue';
22
27
  export type * from '../components/Select.vue';
23
28
  export type * from '../components/Separator.vue';
29
+ export type * from '../components/Skeleton.vue';
24
30
  export type * from '../components/Slider.vue';
25
31
  export type * from '../components/Switch.vue';
26
32
  export type * from '../components/Table.vue';
@@ -1,5 +1,6 @@
1
1
  import type * as theme from '../theme/index.js';
2
2
  import type { PartialTheme } from './utils.js';
3
3
  export * from './components.js';
4
+ export * from './locale.js';
4
5
  export * from './utils.js';
5
6
  export type ThemeExtension = PartialTheme<typeof theme>;
@@ -1,2 +1,3 @@
1
1
  export * from "./components.js";
2
+ export * from "./locale.js";
2
3
  export * from "./utils.js";
@@ -0,0 +1,23 @@
1
+ export interface Messages {
2
+ alert: {
3
+ close: string;
4
+ };
5
+ carousel: {
6
+ prev: string;
7
+ next: string;
8
+ goto: string;
9
+ };
10
+ inputNumber: {
11
+ increment: string;
12
+ decrement: string;
13
+ };
14
+ modal: {
15
+ close: string;
16
+ };
17
+ table: {
18
+ noData: string;
19
+ };
20
+ toast: {
21
+ close: string;
22
+ };
23
+ }
File without changes
@@ -2,7 +2,7 @@ import type { ClassValue, CVReturnType, VariantProps } from '@byyuurin/ui-kit';
2
2
  export type HintString<T extends string> = T & (string & {});
3
3
  export type MaybeArray<T> = T | T[];
4
4
  export type MaybeArrayOfArray<T> = T[] | T[][];
5
- export type MaybeArrayOfArrayItem<T> = T extends Array<infer V1> ? T extends Array<infer V2> ? V2 : V1 : never;
5
+ export type MaybeArrayOfArrayItem<T> = T extends Array<infer V1> ? V1 extends Array<infer V2> ? V2 : V1 : never;
6
6
  export type PartialTheme<T> = {
7
7
  [P in keyof T as T[P] extends undefined ? never : P]?: T[P] extends Array<infer V> ? V extends string ? string : V[] : T[P] extends object ? PartialTheme<T[P]> : T[P] extends string ? string : T[P];
8
8
  };
@@ -1,9 +1,14 @@
1
+ import type { Messages } from '../types/index.js';
2
+ import type { Locale } from './translator.js';
1
3
  export * from './extend-theme.js';
2
4
  export * from './link.js';
3
5
  export * from './styler.js';
6
+ export * from './translator.js';
7
+ export * from './vue.js';
8
+ export { looseToNumber } from '@vue/shared';
9
+ export declare function defineLocale(locale: Locale<Messages>): Locale<Messages>;
4
10
  export declare function pick<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Pick<Data, Keys>;
5
11
  export declare function omit<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Omit<Data, Keys>;
6
12
  export declare function get(object: Record<string, any> | undefined, path: (string | number)[] | string, defaultValue?: any): any;
7
13
  export declare function set(object: Record<string, any>, path: (string | number)[] | string, value: any): void;
8
- export declare function looseToNumber(value: any): any;
9
14
  export declare function compare<T>(value?: T, currentValue?: T, comparator?: string | ((a: T, b: T) => boolean)): boolean;
@@ -2,6 +2,12 @@ import { isEqual } from "ohash";
2
2
  export * from "./extend-theme.js";
3
3
  export * from "./link.js";
4
4
  export * from "./styler.js";
5
+ export * from "./translator.js";
6
+ export * from "./vue.js";
7
+ export { looseToNumber } from "@vue/shared";
8
+ export function defineLocale(locale) {
9
+ return locale;
10
+ }
5
11
  export function pick(data, keys) {
6
12
  const result = {};
7
13
  for (const key of keys)
@@ -44,10 +50,6 @@ export function set(object, path, value) {
44
50
  return acc[key];
45
51
  }, object);
46
52
  }
47
- export function looseToNumber(value) {
48
- const n = Number.parseFloat(value);
49
- return Number.isNaN(n) ? value : n;
50
- }
51
53
  export function compare(value, currentValue, comparator) {
52
54
  if (value === void 0 || currentValue === void 0)
53
55
  return false;
@@ -6,6 +6,7 @@ export declare function pickLinkProps(link: LinkProps & {
6
6
  disabled: any;
7
7
  title: any;
8
8
  active: any;
9
+ to: any;
9
10
  type: any;
10
11
  replace: any;
11
12
  activeClass: any;
@@ -26,5 +27,4 @@ export declare function pickLinkProps(link: LinkProps & {
26
27
  prefetchedClass: any;
27
28
  rel: any;
28
29
  target: any;
29
- to: any;
30
30
  };
@@ -0,0 +1,18 @@
1
+ type DepthLimit = [1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
2
+ type DepthReduce<N extends number> = N extends keyof DepthLimit ? DepthLimit[N] : 0;
3
+ export type FlatObjectPath<T, ParentPath extends string = '', Depth extends number = 5> = Depth extends 0 ? never : T extends Record<string, any> ? {
4
+ [TK in keyof T]: T[TK] extends Record<string, any> ? FlatObjectPath<T[TK], ParentPath extends '' ? TK & string : `${ParentPath}.${TK & string}`, DepthReduce<Depth>> : ParentPath extends '' ? TK & string : `${ParentPath}.${TK & string}`;
5
+ }[keyof T] : never;
6
+ export type Direction = 'ltr' | 'rtl';
7
+ export interface Locale<M> {
8
+ name: string;
9
+ code: string;
10
+ /** @default "ltr" */
11
+ dir?: Direction;
12
+ messages: M;
13
+ }
14
+ export type TranslatorOptions = Record<string, string | number>;
15
+ export type Translator<M = Record<string, string>> = (path: FlatObjectPath<M>, options?: TranslatorOptions) => string;
16
+ export declare function translate<M>(locale: Locale<M>, path: string, options?: TranslatorOptions): string;
17
+ export declare function createTranslator<M>(locale: Locale<M>): Translator<M>;
18
+ export {};
@@ -0,0 +1,8 @@
1
+ import { get } from "./index.js";
2
+ export function translate(locale, path, options = {}) {
3
+ const prop = get(locale, `messages.${path}`, path);
4
+ return prop.replace(/\{(\w+)\}/g, (_, key) => `${options[key] ?? key}`);
5
+ }
6
+ export function createTranslator(locale) {
7
+ return (path, options) => translate(locale, path, options);
8
+ }
@@ -0,0 +1,4 @@
1
+ const name = "@byyuurin/ui";
2
+
3
+ export { name as n };
4
+ //# sourceMappingURL=ui.ba24b380.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.ba24b380.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/dist/unplugin.mjs CHANGED
@@ -7,7 +7,7 @@ import { globSync } from 'tinyglobby';
7
7
  import AutoImportComponents from 'unplugin-vue-components';
8
8
  import MagicString from 'magic-string';
9
9
  import { resolvePathSync } from 'mlly';
10
- import { p as packageName } from './shared/ui.d1728164.mjs';
10
+ import { n as name } from './shared/ui.ba24b380.mjs';
11
11
 
12
12
  function AutoImportPlugin(options, meta) {
13
13
  const pluginOptions = defu(options.autoImport, {
@@ -21,19 +21,10 @@ function ComponentImportPlugin(options, meta) {
21
21
  const { prefix = "U" } = options;
22
22
  const components = globSync("**/*.vue", { cwd: join(runtimeDir, "components") });
23
23
  const componentNames = new Set(components.map((c) => `${prefix}${c.replace(/\.vue$/, "")}`));
24
- const overrides = globSync("**/*.vue", { cwd: join(runtimeDir, "vue/components") });
25
- const overrideNames = new Set(overrides.map((c) => `${prefix}${c.replace(/\.vue$/, "")}`));
26
24
  const pluginOptions = defu(options.components, {
27
25
  dts: options.dts ?? true,
28
- exclude: [
29
- /[\\/]node_modules[\\/](?!\.pnpm|@byyuurin\/ui)/,
30
- /[\\/]\.git[\\/]/,
31
- /[\\/]\.nuxt[\\/]/
32
- ],
33
26
  resolvers: [
34
27
  (componentName) => {
35
- if (overrideNames.has(componentName))
36
- return { name: "default", from: join(runtimeDir, "vue/components", `${componentName.slice(prefix.length)}.vue`) };
37
28
  if (componentNames.has(componentName))
38
29
  return { name: "default", from: join(runtimeDir, "components", `${componentName.slice(prefix.length)}.vue`) };
39
30
  }
@@ -83,7 +74,7 @@ const unplugin = createUnplugin((options = {}, meta) => {
83
74
  config() {
84
75
  return {
85
76
  optimizeDeps: {
86
- include: [`${packageName}/unocss`]
77
+ include: [`${name}/unocss`]
87
78
  }
88
79
  };
89
80
  },
@@ -93,7 +84,7 @@ const unplugin = createUnplugin((options = {}, meta) => {
93
84
  "unplugin-vue-components"
94
85
  ];
95
86
  const plugins = config.plugins || [];
96
- const makeMessage = (pluginName) => `[${packageName}] Multiple instances of \`${pluginName}\` detected. ${packageName} includes \`${pluginName}\` already, and you can configure it using \`${pluginName}\` option in ${packageName} module options.`;
87
+ const makeMessage = (pluginName) => `[${name}] Multiple instances of \`${pluginName}\` detected. ${name} includes \`${pluginName}\` already, and you can configure it using \`${pluginName}\` option in ${name} module options.`;
97
88
  for (const pluginName of checkPluginNames) {
98
89
  if (plugins.filter((i) => i.name === pluginName).length > 1)
99
90
  throw new Error(makeMessage(pluginName));
@@ -1 +1 @@
1
- {"version":3,"file":"unplugin.mjs","sources":["../src/_unplugin/auto-import.ts","../src/_unplugin/components.ts","../src/_unplugin/nuxt-environment.ts","../src/unplugin.ts"],"sourcesContent":["import { defu } from 'defu'\nimport { join } from 'pathe'\nimport type { UnpluginContextMeta, UnpluginOptions } from 'unplugin'\nimport AutoImport from 'unplugin-auto-import'\nimport type { Options as AutoImportOptions } from 'unplugin-auto-import/types'\nimport type { UIOptions } from '../unplugin'\nimport { runtimeDir } from '../unplugin'\n\n/** This plugin adds all the UI composables as auto-imports. */\n// ref: https://github.com/nuxt/ui/blob/6c20f8a9ea03273a795c5f88c071830decd54c1e/src/plugins/auto-import.ts\nexport default function AutoImportPlugin(options: UIOptions, meta: UnpluginContextMeta): UnpluginOptions {\n const pluginOptions = defu(options.autoImport, <AutoImportOptions>{\n dts: options.dts ?? true,\n dirs: [join(runtimeDir, 'composables')],\n })\n\n return AutoImport.raw(pluginOptions, meta) as UnpluginOptions\n}\n","import { defu } from 'defu'\r\nimport { join } from 'pathe'\r\nimport { globSync } from 'tinyglobby'\r\nimport type { UnpluginContextMeta, UnpluginOptions } from 'unplugin'\r\nimport AutoImportComponents from 'unplugin-vue-components'\r\nimport type { Options as ComponentsOptions } from 'unplugin-vue-components/types'\r\nimport type { UIOptions } from '../unplugin'\r\nimport { runtimeDir } from '../unplugin'\r\n\r\n/** This plugin adds all the Nuxt UI components as auto-imports. */\r\n// ref: https://github.com/nuxt/ui/tree/6c20f8a9ea03273a795c5f88c071830decd54c1e/src/plugins/components.ts\r\nexport default function ComponentImportPlugin(options: UIOptions, meta: UnpluginContextMeta) {\r\n const { prefix = 'U' } = options\r\n const components = globSync('**/*.vue', { cwd: join(runtimeDir, 'components') })\r\n const componentNames = new Set(components.map((c) => `${prefix}${c.replace(/\\.vue$/, '')}`))\r\n\r\n const overrides = globSync('**/*.vue', { cwd: join(runtimeDir, 'vue/components') })\r\n const overrideNames = new Set(overrides.map((c) => `${prefix}${c.replace(/\\.vue$/, '')}`))\r\n\r\n const pluginOptions = defu(options.components, <ComponentsOptions>{\r\n dts: options.dts ?? true,\r\n exclude: [\r\n /[\\\\/]node_modules[\\\\/](?!\\.pnpm|@byyuurin\\/ui)/,\r\n /[\\\\/]\\.git[\\\\/]/,\r\n /[\\\\/]\\.nuxt[\\\\/]/,\r\n ],\r\n resolvers: [\r\n (componentName) => {\r\n if (overrideNames.has(componentName))\r\n return { name: 'default', from: join(runtimeDir, 'vue/components', `${componentName.slice(prefix.length)}.vue`) }\r\n\r\n if (componentNames.has(componentName))\r\n return { name: 'default', from: join(runtimeDir, 'components', `${componentName.slice(prefix.length)}.vue`) }\r\n },\r\n ],\r\n })\r\n\r\n return AutoImportComponents.raw(pluginOptions, meta) as UnpluginOptions\r\n}\r\n","import MagicString from 'magic-string'\nimport { resolvePathSync } from 'mlly'\nimport { normalize } from 'pathe'\nimport type { UnpluginOptions } from 'unplugin'\nimport { runtimeDir } from '../unplugin'\n\n/**\n * This plugin normalises Nuxt environment (#imports) and `import.meta.client` within the UI components.\n */\n// ref: https://github.com/nuxt/ui/blob/0f99a4cdbcbca3090ef0a58f475be46de4eeb9ff/src/plugins/nuxt-environment.ts\nexport default function NuxtEnvironmentPlugin(): UnpluginOptions {\n const stubPath = resolvePathSync('../runtime/vue/stubs', { extensions: ['.ts', '.mjs', '.js'], url: import.meta.url })\n const name = 'byyuurin:ui'\n const resolveId = '#imports'\n\n return {\n name,\n enforce: 'pre',\n resolveId(id) {\n // this is implemented here rather than in a vite `config` hook for cross-builder support\n if (id === resolveId)\n return stubPath\n },\n transformInclude(id) {\n return normalize(id).includes(runtimeDir)\n },\n transform(code) {\n if (code.includes('import.meta.client')) {\n const s = new MagicString(code)\n s.replaceAll('import.meta.client', 'true')\n\n if (s.hasChanged()) {\n return {\n code: s.toString(),\n map: s.generateMap({ hires: true }),\n }\n }\n }\n },\n }\n}\n","import { fileURLToPath } from 'node:url'\r\nimport { normalize } from 'pathe'\r\nimport type { UnpluginOptions } from 'unplugin'\r\nimport { createUnplugin } from 'unplugin'\r\nimport type { Options as AutoImportOptions } from 'unplugin-auto-import/types'\r\nimport type { Options as ComponentsOptions } from 'unplugin-vue-components/types'\r\nimport AutoImportPlugin from './_unplugin/auto-import'\r\nimport ComponentImportPlugin from './_unplugin/components'\r\nimport NuxtEnvironmentPlugin from './_unplugin/nuxt-environment'\r\nimport { packageName } from './shared'\r\n\r\nexport const runtimeDir = normalize(fileURLToPath(new URL('runtime', import.meta.url)))\r\n\r\nexport interface UIOptions {\r\n /**\r\n * prefix for components used in templates\r\n *\r\n * @default \"U\"\r\n */\r\n prefix?: string\r\n /** Whether to generate declaration files for auto-imported components. */\r\n dts?: boolean\r\n /**\r\n * Override options for `unplugin-auto-import`\r\n */\r\n autoImport?: Partial<AutoImportOptions>\r\n /**\r\n * Override options for `unplugin-vue-components`\r\n */\r\n components?: Partial<ComponentsOptions>\r\n}\r\n\r\nexport const unplugin = createUnplugin<UIOptions | undefined>((options: UIOptions = {}, meta) => {\r\n return [\r\n NuxtEnvironmentPlugin(),\r\n ComponentImportPlugin(options, meta),\r\n AutoImportPlugin(options, meta),\r\n <UnpluginOptions>{\r\n name: 'byyuurin:ui:plugins-duplication-detection',\r\n vite: {\r\n config() {\r\n return {\r\n optimizeDeps: {\r\n include: [`${packageName}/unocss`],\r\n },\r\n }\r\n },\r\n configResolved(config) {\r\n const checkPluginNames = [\r\n 'unplugin-auto-import',\r\n 'unplugin-vue-components',\r\n ]\r\n const plugins = config.plugins || []\r\n\r\n const makeMessage = (pluginName: string) => `[${packageName}] Multiple instances of \\`${pluginName}\\` detected. ${packageName} includes \\`${pluginName}\\` already, and you can configure it using \\`${pluginName}\\` option in ${packageName} module options.`\r\n\r\n for (const pluginName of checkPluginNames) {\r\n if (plugins.filter((i) => i.name === pluginName).length > 1)\r\n throw new Error(makeMessage(pluginName))\r\n }\r\n },\r\n },\r\n },\r\n ]\r\n})\r\n"],"names":[],"mappings":";;;;;;;;;;;AAUwB,SAAA,gBAAA,CAAiB,SAAoB,IAA4C,EAAA;AACvG,EAAM,MAAA,aAAA,GAAgB,IAAK,CAAA,OAAA,CAAQ,UAA+B,EAAA;AAAA,IAChE,GAAA,EAAK,QAAQ,GAAO,IAAA,IAAA;AAAA,IACpB,IAAM,EAAA,CAAC,IAAK,CAAA,UAAA,EAAY,aAAa,CAAC,CAAA;AAAA,GACvC,CAAA,CAAA;AAED,EAAO,OAAA,UAAA,CAAW,GAAI,CAAA,aAAA,EAAe,IAAI,CAAA,CAAA;AAC3C;;ACNwB,SAAA,qBAAA,CAAsB,SAAoB,IAA2B,EAAA;AAC3F,EAAM,MAAA,EAAE,MAAS,GAAA,GAAA,EAAQ,GAAA,OAAA,CAAA;AACzB,EAAM,MAAA,UAAA,GAAa,SAAS,UAAY,EAAA,EAAE,KAAK,IAAK,CAAA,UAAA,EAAY,YAAY,CAAA,EAAG,CAAA,CAAA;AAC/E,EAAA,MAAM,iBAAiB,IAAI,GAAA,CAAI,UAAW,CAAA,GAAA,CAAI,CAAC,CAAM,KAAA,CAAA,EAAG,MAAM,CAAA,EAAG,EAAE,OAAQ,CAAA,QAAA,EAAU,EAAE,CAAC,EAAE,CAAC,CAAA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AAI,CAAA;AAAA,IACnC,gBAAA,CAAiB,SAAS,IAAI,CAAA;AAAA,IACb;AAAA,MACf,IAAM,EAAA,2CAAA;AAAA,MACN,IAAM,EAAA;AAAA,QACJ,MAAS,GAAA;AACP,UAAO,OAAA;AAAA,YACL,YAAc,EAAA;AAAA,cACZ,OAAS,EAAA,CAAC,CAAG,EAAA,WAAW,CAAS,OAAA,CAAA,CAAA;AAAA,aACnC;AAAA,WACF,CAAA;AAAA,SACF;AAAA,QACA,eAAe,MAAQ,EAAA;AACrB,UAAA,MAAM,gBAAmB,GAAA;AAAA,YACvB,sBAAA;AAAA,YACA,yBAAA;AAAA,WACF,CAAA;AACA,UAAM,MAAA,OAAA,GAAU,MAAO,CAAA,OAAA,IAAW,EAAC,CAAA;AAEnC,UAAA,MAAM,WAAc,GAAA,CAAC,UAAuB,KAAA,CAAA,CAAA,EAAI,WAAW,CAA6B,0BAAA,EAAA,UAAU,CAAgB,aAAA,EAAA,WAAW,CAAe,YAAA,EAAA,UAAU,CAAgD,6CAAA,EAAA,UAAU,gBAAgB,WAAW,CAAA,gBAAA,CAAA,CAAA;AAE3O,UAAA,KAAA,MAAW,cAAc,gBAAkB,EAAA;AACzC,YAAI,IAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,EAAE,IAAS,KAAA,UAAU,EAAE,MAAS,GAAA,CAAA;AACxD,cAAA,MAAM,IAAI,KAAA,CAAM,WAAY,CAAA,UAAU,CAAC,CAAA,CAAA;AAAA,WAC3C;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,GACF,CAAA;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"unplugin.mjs","sources":["../src/_unplugin/auto-import.ts","../src/_unplugin/components.ts","../src/_unplugin/nuxt-environment.ts","../src/unplugin.ts"],"sourcesContent":["import { defu } from 'defu'\nimport { join } from 'pathe'\nimport type { UnpluginContextMeta, UnpluginOptions } from 'unplugin'\nimport AutoImport from 'unplugin-auto-import'\nimport type { Options as AutoImportOptions } from 'unplugin-auto-import/types'\nimport type { UIOptions } from '../unplugin'\nimport { runtimeDir } from '../unplugin'\n\n/** This plugin adds all the UI composables as auto-imports. */\n// ref: https://github.com/nuxt/ui/blob/6c20f8a9ea03273a795c5f88c071830decd54c1e/src/plugins/auto-import.ts\nexport default function AutoImportPlugin(options: UIOptions, meta: UnpluginContextMeta): UnpluginOptions {\n const pluginOptions = defu(options.autoImport, <AutoImportOptions>{\n dts: options.dts ?? true,\n dirs: [join(runtimeDir, 'composables')],\n })\n\n return AutoImport.raw(pluginOptions, meta) as UnpluginOptions\n}\n","import { defu } from 'defu'\r\nimport { join } from 'pathe'\r\nimport { globSync } from 'tinyglobby'\r\nimport type { UnpluginContextMeta, UnpluginOptions } from 'unplugin'\r\nimport AutoImportComponents from 'unplugin-vue-components'\r\nimport type { Options as ComponentsOptions } from 'unplugin-vue-components/types'\r\nimport type { UIOptions } from '../unplugin'\r\nimport { runtimeDir } from '../unplugin'\r\n\r\n/** This plugin adds all the Nuxt UI components as auto-imports. */\r\n// ref: https://github.com/nuxt/ui/tree/6c20f8a9ea03273a795c5f88c071830decd54c1e/src/plugins/components.ts\r\nexport default function ComponentImportPlugin(options: UIOptions, meta: UnpluginContextMeta) {\r\n const { prefix = 'U' } = options\r\n const components = globSync('**/*.vue', { cwd: join(runtimeDir, 'components') })\r\n const componentNames = new Set(components.map((c) => `${prefix}${c.replace(/\\.vue$/, '')}`))\r\n\r\n const pluginOptions = defu(options.components, <ComponentsOptions>{\r\n dts: options.dts ?? true,\r\n resolvers: [\r\n (componentName) => {\r\n if (componentNames.has(componentName))\r\n return { name: 'default', from: join(runtimeDir, 'components', `${componentName.slice(prefix.length)}.vue`) }\r\n },\r\n ],\r\n })\r\n\r\n return AutoImportComponents.raw(pluginOptions, meta) as UnpluginOptions\r\n}\r\n","import MagicString from 'magic-string'\nimport { resolvePathSync } from 'mlly'\nimport { normalize } from 'pathe'\nimport type { UnpluginOptions } from 'unplugin'\nimport { runtimeDir } from '../unplugin'\n\n/**\n * This plugin normalises Nuxt environment (#imports) and `import.meta.client` within the UI components.\n */\n// ref: https://github.com/nuxt/ui/blob/0f99a4cdbcbca3090ef0a58f475be46de4eeb9ff/src/plugins/nuxt-environment.ts\nexport default function NuxtEnvironmentPlugin(): UnpluginOptions {\n const stubPath = resolvePathSync('../runtime/vue/stubs', { extensions: ['.ts', '.mjs', '.js'], url: import.meta.url })\n const name = 'byyuurin:ui'\n const resolveId = '#imports'\n\n return {\n name,\n enforce: 'pre',\n resolveId(id) {\n // this is implemented here rather than in a vite `config` hook for cross-builder support\n if (id === resolveId)\n return stubPath\n },\n transformInclude(id) {\n return normalize(id).includes(runtimeDir)\n },\n transform(code) {\n if (code.includes('import.meta.client')) {\n const s = new MagicString(code)\n s.replaceAll('import.meta.client', 'true')\n\n if (s.hasChanged()) {\n return {\n code: s.toString(),\n map: s.generateMap({ hires: true }),\n }\n }\n }\n },\n }\n}\n","import { fileURLToPath } from 'node:url'\r\nimport { normalize } from 'pathe'\r\nimport type { UnpluginOptions } from 'unplugin'\r\nimport { createUnplugin } from 'unplugin'\r\nimport type { Options as AutoImportOptions } from 'unplugin-auto-import/types'\r\nimport type { Options as ComponentsOptions } from 'unplugin-vue-components/types'\r\nimport AutoImportPlugin from './_unplugin/auto-import'\r\nimport ComponentImportPlugin from './_unplugin/components'\r\nimport NuxtEnvironmentPlugin from './_unplugin/nuxt-environment'\r\nimport { packageName } from './shared'\r\n\r\nexport const runtimeDir = normalize(fileURLToPath(new URL('runtime', import.meta.url)))\r\n\r\nexport interface UIOptions {\r\n /**\r\n * prefix for components used in templates\r\n *\r\n * @default \"U\"\r\n */\r\n prefix?: string\r\n /** Whether to generate declaration files for auto-imported components. */\r\n dts?: boolean\r\n /**\r\n * Override options for `unplugin-auto-import`\r\n */\r\n autoImport?: Partial<AutoImportOptions>\r\n /**\r\n * Override options for `unplugin-vue-components`\r\n */\r\n components?: Partial<ComponentsOptions>\r\n}\r\n\r\nexport const unplugin = createUnplugin<UIOptions | undefined>((options: UIOptions = {}, meta) => {\r\n return [\r\n NuxtEnvironmentPlugin(),\r\n ComponentImportPlugin(options, meta),\r\n AutoImportPlugin(options, meta),\r\n <UnpluginOptions>{\r\n name: 'byyuurin:ui:plugins-duplication-detection',\r\n vite: {\r\n config() {\r\n return {\r\n optimizeDeps: {\r\n include: [`${packageName}/unocss`],\r\n },\r\n }\r\n },\r\n configResolved(config) {\r\n const checkPluginNames = [\r\n 'unplugin-auto-import',\r\n 'unplugin-vue-components',\r\n ]\r\n const plugins = config.plugins || []\r\n\r\n const makeMessage = (pluginName: string) => `[${packageName}] Multiple instances of \\`${pluginName}\\` detected. ${packageName} includes \\`${pluginName}\\` already, and you can configure it using \\`${pluginName}\\` option in ${packageName} module options.`\r\n\r\n for (const pluginName of checkPluginNames) {\r\n if (plugins.filter((i) => i.name === pluginName).length > 1)\r\n throw new Error(makeMessage(pluginName))\r\n }\r\n },\r\n },\r\n },\r\n ]\r\n})\r\n"],"names":["packageName"],"mappings":";;;;;;;;;;;AAUwB,SAAA,gBAAA,CAAiB,SAAoB,IAA4C,EAAA;AACvG,EAAM,MAAA,aAAA,GAAgB,IAAK,CAAA,OAAA,CAAQ,UAA+B,EAAA;AAAA,IAChE,GAAA,EAAK,QAAQ,GAAO,IAAA,IAAA;AAAA,IACpB,IAAM,EAAA,CAAC,IAAK,CAAA,UAAA,EAAY,aAAa,CAAC,CAAA;AAAA,GACvC,CAAA,CAAA;AAED,EAAO,OAAA,UAAA,CAAW,GAAI,CAAA,aAAA,EAAe,IAAI,CAAA,CAAA;AAC3C;;ACNwB,SAAA,qBAAA,CAAsB,SAAoB,IAA2B,EAAA;AAC3F,EAAM,MAAA,EAAE,MAAS,GAAA,GAAA,EAAQ,GAAA,OAAA,CAAA;AACzB,EAAM,MAAA,UAAA,GAAa,SAAS,UAAY,EAAA,EAAE,KAAK,IAAK,CAAA,UAAA,EAAY,YAAY,CAAA,EAAG,CAAA,CAAA;AAC/E,EAAA,MAAM,iBAAiB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W,EAAC,CAAA;AAEnC,UAAA,MAAM,WAAc,GAAA,CAAC,UAAuB,KAAA,CAAA,CAAA,EAAIA,IAAW,CAA6B,0BAAA,EAAA,UAAU,CAAgB,aAAA,EAAAA,IAAW,CAAe,YAAA,EAAA,UAAU,CAAgD,6CAAA,EAAA,UAAU,gBAAgBA,IAAW,CAAA,gBAAA,CAAA,CAAA;AAE3O,UAAA,KAAA,MAAW,cAAc,gBAAkB,EAAA;AACzC,YAAI,IAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,EAAE,IAAS,KAAA,UAAU,EAAE,MAAS,GAAA,CAAA;AACxD,cAAA,MAAM,IAAI,KAAA,CAAM,WAAY,CAAA,UAAU,CAAC,CAAA,CAAA;AAAA,WAC3C;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,GACF,CAAA;AACF,CAAC;;;;"}
package/dist/vite.mjs CHANGED
@@ -8,7 +8,7 @@ import 'tinyglobby';
8
8
  import 'unplugin-vue-components';
9
9
  import 'magic-string';
10
10
  import 'mlly';
11
- import './shared/ui.d1728164.mjs';
11
+ import './shared/ui.ba24b380.mjs';
12
12
 
13
13
  const vite = unplugin.vite;
14
14
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@byyuurin/ui",
3
3
  "type": "module",
4
- "version": "0.0.7",
4
+ "version": "0.0.8",
5
5
  "description": "",
6
6
  "author": "Yuurin <byyuurin@gmail.com>",
7
7
  "license": "MIT",
@@ -38,7 +38,15 @@
38
38
  "types": "./dist/runtime/index.d.ts",
39
39
  "default": "./dist/runtime/index.js"
40
40
  },
41
- "./runtime/*": "./dist/runtime/*"
41
+ "./runtime/*": "./dist/runtime/*",
42
+ "./utils/*": {
43
+ "types": "./dist/runtime/utils/*.d.ts",
44
+ "default": "./dist/runtime/utils/*.js"
45
+ },
46
+ "./locale": {
47
+ "types": "./dist/runtime/locale/index.d.ts",
48
+ "default": "./dist/runtime/locale/index.js"
49
+ }
42
50
  },
43
51
  "main": "dist/runtime/index.js",
44
52
  "module": "dist/runtime/index.js",
@@ -58,13 +66,14 @@
58
66
  }
59
67
  },
60
68
  "dependencies": {
61
- "@byyuurin/ui-kit": "^0.4.2",
69
+ "@byyuurin/ui-kit": "^0.4.3",
62
70
  "@nuxt/kit": "^3.15.4",
63
71
  "@tanstack/vue-table": "^8.21.2",
64
72
  "@unocss/core": "^65.5.0",
65
73
  "@unocss/preset-mini": "^65.5.0",
66
74
  "@unocss/preset-uno": "^65.5.0",
67
- "@vueuse/core": "^12.8.2",
75
+ "@vue/shared": "^3.5.13",
76
+ "@vueuse/core": "^13.0.0",
68
77
  "defu": "^6.1.4",
69
78
  "embla-carousel": "^8.5.2",
70
79
  "embla-carousel-auto-height": "^8.5.2",
@@ -86,20 +95,21 @@
86
95
  "unplugin-auto-import": "^19.1.1",
87
96
  "unplugin-vue-components": "^28.4.1",
88
97
  "vaul-vue": "^0.3.0",
89
- "vue-component-type-helpers": "^2.2.8"
98
+ "vue-component-type-helpers": "^2.2.8",
99
+ "vue-router": "^4.5.0"
90
100
  },
91
101
  "devDependencies": {
92
- "@antfu/ni": "^23.3.1",
102
+ "@antfu/ni": "^24.1.0",
93
103
  "@byyuurin/eslint-config": "^1.7.2",
94
- "@nuxt/eslint-config": "^1.1.0",
104
+ "@nuxt/eslint-config": "^1.2.0",
95
105
  "@nuxt/module-builder": "^0.8.4",
96
106
  "@nuxt/schema": "^3.15.4",
97
- "@nuxt/test-utils": "^3.17.1",
98
- "@types/node": "^22.13.9",
107
+ "@nuxt/test-utils": "^3.17.2",
108
+ "@types/node": "^22.13.10",
99
109
  "@unocss/reset": "^65.5.0",
100
110
  "@vitejs/plugin-vue": "^5.2.1",
101
111
  "bumpp": "^10.0.3",
102
- "eslint": "^9.21.0",
112
+ "eslint": "^9.22.0",
103
113
  "eslint-plugin-format": "1.0.1",
104
114
  "esno": "^4.8.0",
105
115
  "lint-staged": "^15.4.3",
@@ -108,13 +118,14 @@
108
118
  "typescript": "~5.6.3",
109
119
  "unocss": "^65.5.0",
110
120
  "vite": "^6.2.1",
111
- "vite-plugin-inspect": "^10.3.0",
121
+ "vite-plugin-inspect": "^11.0.0",
112
122
  "vitest": "^3.0.8",
113
123
  "vue": "^3.5.13",
114
124
  "vue-tsc": "^2.2.8"
115
125
  },
116
126
  "resolutions": {
117
- "@byyuurin/ui": "workspace:*"
127
+ "@byyuurin/ui": "workspace:*",
128
+ "vue-tsc": "2.2.0"
118
129
  },
119
130
  "simple-git-hooks": {
120
131
  "pre-commit": "pnpm lint-staged"
@@ -131,6 +142,6 @@
131
142
  "release": "bumpp && pnpm publish",
132
143
  "start": "esno src/index.ts",
133
144
  "test": "vitest",
134
- "test:types": "vue-tsc --noEmit && cd playground/nuxt && vue-tsc --noEmit"
145
+ "test:types": "vue-tsc --noEmit && nuxi typecheck playground/nuxt"
135
146
  }
136
147
  }
@@ -1,4 +0,0 @@
1
- const packageName = "@byyuurin/ui";
2
-
3
- export { packageName as p };
4
- //# sourceMappingURL=ui.d1728164.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui.d1728164.mjs","sources":["../../src/shared.ts"],"sourcesContent":["export const packageName = '@byyuurin/ui'\n"],"names":[],"mappings":"AAAO,MAAM,WAAc,GAAA;;;;"}