@summeruse/naive-ui 0.0.2 → 0.1.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @summeruse/naive-ui
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b3513b3: build(naive-ui): 迁移构建工具从 Vite 到 tsdown
8
+
3
9
  ## 0.0.2
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,27 @@
1
+ import * as vue0 from "vue";
2
+ import { GlobalThemeOverrides, NDateLocale, NLocale } from "naive-ui";
3
+ import { BuiltInGlobalTheme } from "naive-ui/es/themes/interface";
4
+
5
+ //#region components/n-provider/index.vue.d.ts
6
+ type __VLS_Props = {
7
+ locale?: NLocale;
8
+ dateLocale?: NDateLocale;
9
+ theme?: BuiltInGlobalTheme;
10
+ themeOverrides?: GlobalThemeOverrides;
11
+ globalStyle?: boolean;
12
+ };
13
+ declare var __VLS_30: {};
14
+ type __VLS_Slots = {} & {
15
+ default?: (props: typeof __VLS_30) => any;
16
+ };
17
+ declare const __VLS_component: vue0.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ globalStyle: boolean;
19
+ }, {}, {}, {}, string, vue0.ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
26
+ //#endregion
27
+ export { _default as NProvider };
@@ -0,0 +1 @@
1
+ this.SummerUse=this.SummerUse||{},this.SummerUse[`naive-ui`]=(function(e,t,n){return e.NProvider=(0,t.defineComponent)({name:`NProvider`,__name:`index`,props:{locale:{},dateLocale:{},theme:{},themeOverrides:{},globalStyle:{type:Boolean,default:!0}},setup(e){return(r,i)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NConfigProvider),{locale:e.locale,"date-locale":e.dateLocale,theme:e.theme,"theme-overrides":e.themeOverrides},{default:(0,t.withCtx)(()=>[e.globalStyle?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NGlobalStyle),{key:0})):(0,t.createCommentVNode)(`v-if`,!0),(0,t.createVNode)((0,t.unref)(n.NModalProvider),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NLoadingBarProvider),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NNotificationProvider),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NMessageProvider),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NDialogProvider),null,{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`default`)]),_:3})]),_:3})]),_:3})]),_:3})]),_:3})]),_:3},8,[`locale`,`date-locale`,`theme`,`theme-overrides`]))}}),e})({},Vue,naive-ui);
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { createBlock, createCommentVNode, createVNode, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
2
2
  import { NConfigProvider, NDialogProvider, NGlobalStyle, NLoadingBarProvider, NMessageProvider, NModalProvider, NNotificationProvider } from "naive-ui";
3
- var n_provider_default = /* @__PURE__ */ defineComponent({
3
+
4
+ //#region components/n-provider/index.vue
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
6
  name: "NProvider",
5
7
  __name: "index",
6
8
  props: {
@@ -10,22 +12,25 @@ var n_provider_default = /* @__PURE__ */ defineComponent({
10
12
  themeOverrides: {},
11
13
  globalStyle: {
12
14
  type: Boolean,
13
- default: !0
15
+ default: true
14
16
  }
15
17
  },
16
- setup(m) {
17
- return (m, h) => (openBlock(), createBlock(unref(NConfigProvider), {
18
- locale: m.locale,
19
- "date-locale": m.dateLocale,
20
- theme: m.theme,
21
- "theme-overrides": m.themeOverrides
22
- }, {
23
- default: withCtx(() => [m.globalStyle ? (openBlock(), createBlock(unref(NGlobalStyle), { key: 0 })) : createCommentVNode("", !0), createVNode(unref(NModalProvider), null, {
24
- default: withCtx(() => [createVNode(unref(NLoadingBarProvider), null, {
25
- default: withCtx(() => [createVNode(unref(NNotificationProvider), null, {
26
- default: withCtx(() => [createVNode(unref(NMessageProvider), null, {
27
- default: withCtx(() => [createVNode(unref(NDialogProvider), null, {
28
- default: withCtx(() => [renderSlot(m.$slots, "default")]),
18
+ setup(__props) {
19
+ return (_ctx, _cache) => {
20
+ return openBlock(), createBlock(unref(NConfigProvider), {
21
+ locale: __props.locale,
22
+ "date-locale": __props.dateLocale,
23
+ theme: __props.theme,
24
+ "theme-overrides": __props.themeOverrides
25
+ }, {
26
+ default: withCtx(() => [__props.globalStyle ? (openBlock(), createBlock(unref(NGlobalStyle), { key: 0 })) : createCommentVNode("v-if", true), createVNode(unref(NModalProvider), null, {
27
+ default: withCtx(() => [createVNode(unref(NLoadingBarProvider), null, {
28
+ default: withCtx(() => [createVNode(unref(NNotificationProvider), null, {
29
+ default: withCtx(() => [createVNode(unref(NMessageProvider), null, {
30
+ default: withCtx(() => [createVNode(unref(NDialogProvider), null, {
31
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
32
+ _: 3
33
+ })]),
29
34
  _: 3
30
35
  })]),
31
36
  _: 3
@@ -35,14 +40,16 @@ var n_provider_default = /* @__PURE__ */ defineComponent({
35
40
  _: 3
36
41
  })]),
37
42
  _: 3
38
- })]),
39
- _: 3
40
- }, 8, [
41
- "locale",
42
- "date-locale",
43
- "theme",
44
- "theme-overrides"
45
- ]));
43
+ }, 8, [
44
+ "locale",
45
+ "date-locale",
46
+ "theme",
47
+ "theme-overrides"
48
+ ]);
49
+ };
46
50
  }
47
51
  });
48
- export { n_provider_default as NProvider };
52
+ var n_provider_default = _sfc_main;
53
+
54
+ //#endregion
55
+ export { n_provider_default as NProvider };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@summeruse/naive-ui",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.1.0",
5
5
  "description": "",
6
6
  "author": "finalsummer",
7
7
  "license": "ISC",
@@ -12,17 +12,15 @@
12
12
  "naive-ui",
13
13
  "vue3"
14
14
  ],
15
- "main": "lib/index.js",
16
- "module": "es/index.mjs",
17
- "unpkg": "dist/index.js",
18
- "jsdelivr": "dist/index.js",
19
- "types": "es/index.d.ts",
15
+ "main": "dist/index.js",
16
+ "module": "dist/index.js",
17
+ "unpkg": "dist/index.iife.min.js",
18
+ "jsdelivr": "dist/index.iife.min.js",
19
+ "types": "dist/index.d.ts",
20
20
  "files": [
21
21
  "CHANGELOG.md",
22
22
  "README.md",
23
- "dist",
24
- "es",
25
- "lib"
23
+ "dist"
26
24
  ],
27
25
  "peerDependencies": {
28
26
  "vue": "^3.5.13"
@@ -34,17 +32,15 @@
34
32
  "@types/node": "^22.13.14",
35
33
  "@vitejs/plugin-vue": "6.0.1",
36
34
  "@vue/tsconfig": "^0.7.0",
37
- "sass-embedded": "^1.86.3",
35
+ "tsdown": "0.18.3",
38
36
  "typescript": "~5.7.2",
39
- "vite": "npm:rolldown-vite@latest",
40
- "vite-plugin-css-injected-by-js": "^3.5.2",
41
- "vite-plugin-dts": "^4.5.3",
37
+ "unplugin-vue": "7.1.0",
42
38
  "vue-tsc": "^2.2.4"
43
39
  },
44
40
  "publishConfig": {
45
41
  "access": "public"
46
42
  },
47
43
  "scripts": {
48
- "build": "vue-tsc -b && vite build"
44
+ "build": "tsdown"
49
45
  }
50
46
  }
@@ -1 +0,0 @@
1
- export * from './n-provider';
@@ -1,2 +0,0 @@
1
- import n_provider_default from "./n-provider/index.mjs";
2
- import "./n-provider/index2.mjs";
@@ -1,2 +0,0 @@
1
- import { default as NProvider } from './index.vue';
2
- export { NProvider };
@@ -1,3 +0,0 @@
1
- import index_vue_vue_type_script_setup_true_lang_default from "./index.vue_vue_type_script_setup_true_lang.mjs";
2
- var n_provider_default = index_vue_vue_type_script_setup_true_lang_default;
3
- export { n_provider_default as default };
@@ -1,28 +0,0 @@
1
- import { GlobalThemeOverrides, NDateLocale, NLocale } from 'naive-ui';
2
- import { BuiltInGlobalTheme } from 'naive-ui/es/themes/interface';
3
- type __VLS_Props = {
4
- locale?: NLocale;
5
- dateLocale?: NDateLocale;
6
- theme?: BuiltInGlobalTheme;
7
- themeOverrides?: GlobalThemeOverrides;
8
- globalStyle?: boolean;
9
- };
10
- declare function __VLS_template(): {
11
- attrs: Partial<{}>;
12
- slots: {
13
- default?(_: {}): any;
14
- };
15
- refs: {};
16
- rootEl: any;
17
- };
18
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
- globalStyle: boolean;
21
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
- export default _default;
24
- type __VLS_WithTemplateSlots<T, S> = T & {
25
- new (): {
26
- $slots: S;
27
- };
28
- };
@@ -1,48 +0,0 @@
1
- import { createBlock, createCommentVNode, createVNode, defineComponent, openBlock, renderSlot, unref, withCtx } from "vue";
2
- import { NConfigProvider, NDialogProvider, NGlobalStyle, NLoadingBarProvider, NMessageProvider, NModalProvider, NNotificationProvider } from "naive-ui";
3
- var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
4
- name: "NProvider",
5
- __name: "index",
6
- props: {
7
- locale: {},
8
- dateLocale: {},
9
- theme: {},
10
- themeOverrides: {},
11
- globalStyle: {
12
- type: Boolean,
13
- default: !0
14
- }
15
- },
16
- setup(m) {
17
- return (m, h) => (openBlock(), createBlock(unref(NConfigProvider), {
18
- locale: m.locale,
19
- "date-locale": m.dateLocale,
20
- theme: m.theme,
21
- "theme-overrides": m.themeOverrides
22
- }, {
23
- default: withCtx(() => [m.globalStyle ? (openBlock(), createBlock(unref(NGlobalStyle), { key: 0 })) : createCommentVNode("", !0), createVNode(unref(NModalProvider), null, {
24
- default: withCtx(() => [createVNode(unref(NLoadingBarProvider), null, {
25
- default: withCtx(() => [createVNode(unref(NNotificationProvider), null, {
26
- default: withCtx(() => [createVNode(unref(NMessageProvider), null, {
27
- default: withCtx(() => [createVNode(unref(NDialogProvider), null, {
28
- default: withCtx(() => [renderSlot(m.$slots, "default")]),
29
- _: 3
30
- })]),
31
- _: 3
32
- })]),
33
- _: 3
34
- })]),
35
- _: 3
36
- })]),
37
- _: 3
38
- })]),
39
- _: 3
40
- }, 8, [
41
- "locale",
42
- "date-locale",
43
- "theme",
44
- "theme-overrides"
45
- ]));
46
- }
47
- });
48
- export { index_vue_vue_type_script_setup_true_lang_default as default };
@@ -1 +0,0 @@
1
- import n_provider_default from "./index.mjs";
package/es/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components';
package/es/index.mjs DELETED
@@ -1,3 +0,0 @@
1
- import n_provider_default from "./components/n-provider/index.mjs";
2
- import "./components/index.mjs";
3
- export { n_provider_default as NProvider };
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
@@ -1 +0,0 @@
1
- export * from './n-provider';
@@ -1 +0,0 @@
1
- const e=require(`./n-provider/index.js`);require(`./n-provider/index2.js`);
@@ -1,2 +0,0 @@
1
- import { default as NProvider } from './index.vue';
2
- export { NProvider };
@@ -1 +0,0 @@
1
- const e=require(`./index.vue_vue_type_script_setup_true_lang.js`);var t=e.default;exports.default=t;
@@ -1,28 +0,0 @@
1
- import { GlobalThemeOverrides, NDateLocale, NLocale } from 'naive-ui';
2
- import { BuiltInGlobalTheme } from 'naive-ui/es/themes/interface';
3
- type __VLS_Props = {
4
- locale?: NLocale;
5
- dateLocale?: NDateLocale;
6
- theme?: BuiltInGlobalTheme;
7
- themeOverrides?: GlobalThemeOverrides;
8
- globalStyle?: boolean;
9
- };
10
- declare function __VLS_template(): {
11
- attrs: Partial<{}>;
12
- slots: {
13
- default?(_: {}): any;
14
- };
15
- refs: {};
16
- rootEl: any;
17
- };
18
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
- globalStyle: boolean;
21
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
- export default _default;
24
- type __VLS_WithTemplateSlots<T, S> = T & {
25
- new (): {
26
- $slots: S;
27
- };
28
- };
@@ -1 +0,0 @@
1
- const e=require(`../../_virtual/rolldown_runtime.js`);let t=require(`vue`);t=e.__toESM(t);let n=require(`naive-ui`);n=e.__toESM(n);var r=(0,t.defineComponent)({name:`NProvider`,__name:`index`,props:{locale:{},dateLocale:{},theme:{},themeOverrides:{},globalStyle:{type:Boolean,default:!0}},setup(e){return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NConfigProvider),{locale:e.locale,"date-locale":e.dateLocale,theme:e.theme,"theme-overrides":e.themeOverrides},{default:(0,t.withCtx)(()=>[e.globalStyle?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NGlobalStyle),{key:0})):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)((0,t.unref)(n.NModalProvider),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NLoadingBarProvider),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NNotificationProvider),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NMessageProvider),null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NDialogProvider),null,{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,`default`)]),_:3})]),_:3})]),_:3})]),_:3})]),_:3})]),_:3},8,[`locale`,`date-locale`,`theme`,`theme-overrides`]))}});exports.default=r;
@@ -1 +0,0 @@
1
- const e=require(`./index.js`);
package/lib/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components';
package/lib/index.js DELETED
@@ -1 +0,0 @@
1
- const e=require(`./components/n-provider/index.js`);require(`./components/index.js`),exports.NProvider=e.default;