simple-web-lib 0.0.2 → 0.0.4

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/README.md CHANGED
@@ -1,72 +1,72 @@
1
- # Simple Web Library
2
-
3
- 一个简单的组件库示例,用于演示如何构建一个具有国际化支持的 Vue 3 组件库,并使用 VitePress 编写文档。
4
-
5
- ## 特性
6
-
7
- - **Vue 3 支持**: 使用 Composition API 和最新的 Vue 3 特性
8
- - **国际化**: 基于 vue-i18n 的完整国际化支持
9
- - **VitePress 文档**: 使用 VitePress 构建美观的文档站点
10
- - **TypeScript**: 完整的 TypeScript 支持
11
- - **按需加载**: 支持按需加载组件
12
-
13
- ## 安装
14
-
15
- ```bash
16
- npm install simple-web-lib
17
- ```
18
-
19
- ## 使用
20
-
21
- ### 完整引入
22
-
23
- ```javascript
24
- import { createApp } from 'vue'
25
- import SimpleWebLib from 'simple-web-lib'
26
- import 'simple-web-lib/dist/style.css'
27
-
28
- import App from './App.vue'
29
-
30
- const app = createApp(App)
31
-
32
- app.use(SimpleWebLib)
33
- app.mount('#app')
34
- ```
35
-
36
- ### 按需引入
37
-
38
- ```javascript
39
- import { createApp } from 'vue'
40
- import { SimpleButton, SimpleCard } from 'simple-web-lib'
41
- import 'simple-web-lib/dist/style.css'
42
-
43
- import App from './App.vue'
44
-
45
- const app = createApp(App)
46
-
47
- // 分别安装组件
48
- app.use(SimpleButton)
49
- app.use(SimpleCard)
50
-
51
- app.mount('#app')
52
- ```
53
-
54
- ## 开发
55
-
56
- ```bash
57
- # 安装依赖
58
- npm install
59
-
60
- # 启动文档站点
61
- npm run docs:dev
62
-
63
- # 构建文档
64
- npm run docs:build
65
-
66
- # 构建组件库
67
- npm run lib:build
68
- ```
69
-
70
- ## 许可证
71
-
1
+ # Simple Web Library
2
+
3
+ 一个简单的组件库示例,用于演示如何构建一个具有国际化支持的 Vue 3 组件库,并使用 VitePress 编写文档。
4
+
5
+ ## 特性
6
+
7
+ - **Vue 3 支持**: 使用 Composition API 和最新的 Vue 3 特性
8
+ - **国际化**: 基于 vue-i18n 的完整国际化支持
9
+ - **VitePress 文档**: 使用 VitePress 构建美观的文档站点
10
+ - **TypeScript**: 完整的 TypeScript 支持
11
+ - **按需加载**: 支持按需加载组件
12
+
13
+ ## 安装
14
+
15
+ ```bash
16
+ npm install simple-web-lib
17
+ ```
18
+
19
+ ## 使用
20
+
21
+ ### 完整引入
22
+
23
+ ```javascript
24
+ import { createApp } from 'vue'
25
+ import SimpleWebLib from 'simple-web-lib'
26
+ import 'simple-web-lib/dist/style.css'
27
+
28
+ import App from './App.vue'
29
+
30
+ const app = createApp(App)
31
+
32
+ app.use(SimpleWebLib)
33
+ app.mount('#app')
34
+ ```
35
+
36
+ ### 按需引入
37
+
38
+ ```javascript
39
+ import { createApp } from 'vue'
40
+ import { SimpleButton, SimpleCard } from 'simple-web-lib'
41
+ import 'simple-web-lib/dist/style.css'
42
+
43
+ import App from './App.vue'
44
+
45
+ const app = createApp(App)
46
+
47
+ // 分别安装组件
48
+ app.use(SimpleButton)
49
+ app.use(SimpleCard)
50
+
51
+ app.mount('#app')
52
+ ```
53
+
54
+ ## 开发
55
+
56
+ ```bash
57
+ # 安装依赖
58
+ npm install
59
+
60
+ # 启动文档站点
61
+ npm run docs:dev
62
+
63
+ # 构建文档
64
+ npm run docs:build
65
+
66
+ # 构建组件库
67
+ npm run lib:build
68
+ ```
69
+
70
+ ## 许可证
71
+
72
72
  MIT
@@ -17,7 +17,7 @@ const zr = {
17
17
  for (const [a, s] of t)
18
18
  n[a] = s;
19
19
  return n;
20
- }, sn = /* @__PURE__ */ Qn(ea, [["__scopeId", "data-v-916874a8"]]);
20
+ }, sn = /* @__PURE__ */ Qn(ea, [["__scopeId", "data-v-95250393"]]);
21
21
  function ta(e) {
22
22
  e.component(sn.name || "SimpleButton", sn);
23
23
  }
@@ -38,7 +38,7 @@ const na = {
38
38
  ])
39
39
  ]));
40
40
  }
41
- }), ln = /* @__PURE__ */ Qn(oa, [["__scopeId", "data-v-df720db0"]]);
41
+ }), ln = /* @__PURE__ */ Qn(oa, [["__scopeId", "data-v-4c8694ba"]]);
42
42
  function ia(e) {
43
43
  e.component(ln.name || "SimpleCard", ln);
44
44
  }
@@ -1,4 +1,4 @@
1
- (function(ge,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],D):(ge=typeof globalThis<"u"?globalThis:ge||self,D(ge.SimpleWebLib={},ge.Vue))})(this,function(ge,D){"use strict";const Ur={name:"SimpleButton"},wr=D.defineComponent({...Ur,setup(e){const t=D.ref(0),n=()=>{t.value++};return(a,s)=>(D.openBlock(),D.createElementBlock("button",{class:"simple-button",onClick:n},D.toDisplayString(a.$t("simpleButton.clickMe"))+" ("+D.toDisplayString(t.value)+") ",1))}}),zt=(e,t)=>{const n=e.__vccOpts||e;for(const[a,s]of t)n[a]=s;return n},en=zt(wr,[["__scopeId","data-v-916874a8"]]);function Vr(e){e.component(en.name||"SimpleButton",en)}const tn={install:Vr},$r={class:"simple-card"},Wr={class:"simple-card__header"},Gr={class:"simple-card__body"},Hr={name:"SimpleCard"},xr=D.defineComponent({...Hr,setup(e){return(t,n)=>(D.openBlock(),D.createElementBlock("div",$r,[D.createElementVNode("div",Wr,[D.createElementVNode("h3",null,D.toDisplayString(t.$t("simpleCard.title")),1)]),D.createElementVNode("div",Gr,[D.createElementVNode("p",null,D.toDisplayString(t.$t("simpleCard.content")),1),D.renderSlot(t.$slots,"default",{},void 0,!0)])]))}}),nn=zt(xr,[["__scopeId","data-v-df720db0"]]);function Yr(e){e.component(nn.name||"SimpleCard",nn)}const rn={install:Yr};/*!
1
+ (function(ge,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],D):(ge=typeof globalThis<"u"?globalThis:ge||self,D(ge.SimpleWebLib={},ge.Vue))})(this,function(ge,D){"use strict";const Ur={name:"SimpleButton"},wr=D.defineComponent({...Ur,setup(e){const t=D.ref(0),n=()=>{t.value++};return(a,s)=>(D.openBlock(),D.createElementBlock("button",{class:"simple-button",onClick:n},D.toDisplayString(a.$t("simpleButton.clickMe"))+" ("+D.toDisplayString(t.value)+") ",1))}}),zt=(e,t)=>{const n=e.__vccOpts||e;for(const[a,s]of t)n[a]=s;return n},en=zt(wr,[["__scopeId","data-v-95250393"]]);function Vr(e){e.component(en.name||"SimpleButton",en)}const tn={install:Vr},$r={class:"simple-card"},Wr={class:"simple-card__header"},Gr={class:"simple-card__body"},Hr={name:"SimpleCard"},xr=D.defineComponent({...Hr,setup(e){return(t,n)=>(D.openBlock(),D.createElementBlock("div",$r,[D.createElementVNode("div",Wr,[D.createElementVNode("h3",null,D.toDisplayString(t.$t("simpleCard.title")),1)]),D.createElementVNode("div",Gr,[D.createElementVNode("p",null,D.toDisplayString(t.$t("simpleCard.content")),1),D.renderSlot(t.$slots,"default",{},void 0,!0)])]))}}),nn=zt(xr,[["__scopeId","data-v-4c8694ba"]]);function Yr(e){e.component(nn.name||"SimpleCard",nn)}const rn={install:Yr};/*!
2
2
  * shared v9.14.5
3
3
  * (c) 2025 kazuya kawaguchi
4
4
  * Released under the MIT License.
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- .simple-button[data-v-916874a8]{padding:10px 20px;background-color:#409eff;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:16px}.simple-button[data-v-916874a8]:hover{background-color:#66b1ff}.simple-card[data-v-df720db0]{border:1px solid #ebeef5;border-radius:4px;background-color:#fff;overflow:hidden;box-shadow:0 2px 12px #0000001a}.simple-card__header[data-v-df720db0]{padding:18px 20px;border-bottom:1px solid #ebeef5;font-size:16px;font-weight:700;color:#303133}.simple-card__body[data-v-df720db0]{padding:20px;color:#606266}
1
+ .simple-button[data-v-95250393]{padding:10px 20px;background-color:#409eff;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:16px}.simple-button[data-v-95250393]:hover{background-color:#66b1ff}.simple-card[data-v-4c8694ba]{border:1px solid #ebeef5;border-radius:4px;background-color:#fff;overflow:hidden;box-shadow:0 2px 12px #0000001a}.simple-card__header[data-v-4c8694ba]{padding:18px 20px;border-bottom:1px solid #ebeef5;font-size:16px;font-weight:700;color:#303133}.simple-card__body[data-v-4c8694ba]{padding:20px;color:#606266}
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "simple-web-lib",
3
- "version": "0.0.2",
4
- "description": "A simple component library with VitePress documentation and i18n support",
5
- "main": "lib/simple-web-lib.umd.js",
6
- "module": "lib/simple-web-lib.es.js",
7
- "unpkg": "lib/simple-web-lib.umd.js",
8
- "style": "lib/style.css",
9
- "type": "module",
10
- "files": [
11
- "lib"
12
- ],
13
- "scripts": {
14
- "dev": "vite",
15
- "build": "vite build",
16
- "lib": "vite build --mode lib",
17
- "docs:dev": "vitepress dev docs",
18
- "docs:build": "vitepress build docs",
19
- "docs:serve": "vitepress serve docs"
20
- },
21
- "keywords": [
22
- "vue",
23
- "component-library",
24
- "vitepress",
25
- "i18n",
26
- "typescript"
27
- ],
28
- "author": "Mr.Fang",
29
- "license": "MIT",
30
- "homepage": "https://github.com/your-username/simple-web-lib#readme",
31
- "repository": {
32
- "type": "git",
33
- "url": "https://github.com/your-username/simple-web-lib.git"
34
- },
35
- "bugs": {
36
- "url": "https://github.com/your-username/simple-web-lib/issues"
37
- },
38
- "peerDependencies": {
39
- "vue": "^3.5.13",
40
- "vue-i18n": "^9.14.0"
41
- },
42
- "devDependencies": {
43
- "@vitejs/plugin-vue": "^5.0.0",
44
- "@vitepress-demo-preview/component": "^2.3.2",
45
- "@vitepress-demo-preview/plugin": "^1.2.3",
46
- "typescript": "^5.0.2",
47
- "vite": "^5.0.0",
48
- "vitepress": "^1.0.0-rc.4",
49
- "vue": "^3.5.13",
50
- "vue-i18n": "^9.14.0"
51
- },
52
- "dependencies": {
53
- "element-plus": "^2.8.0"
54
- }
55
- }
1
+ {
2
+ "name": "simple-web-lib",
3
+ "version": "0.0.4",
4
+ "description": "A Simple Web Library with VitePress documentation and i18n support",
5
+ "main": "./lib/simple-web-lib.umd.js",
6
+ "module": "./lib/simple-web-lib.es.js",
7
+ "unpkg": "./lib/simple-web-lib.umd.js",
8
+ "style": "./lib/style.css",
9
+ "type": "module",
10
+ "files": [
11
+ "lib"
12
+ ],
13
+ "exports": {
14
+ ".": {
15
+ "import": "./lib/simple-web-lib.es.js",
16
+ "require": "./lib/simple-web-lib.umd.js"
17
+ }
18
+ },
19
+ "scripts": {
20
+ "dev": "vite",
21
+ "build": "vite build",
22
+ "preview": "vite preview",
23
+ "lib": "vite build --mode lib",
24
+ "docs:dev": "vitepress dev docs",
25
+ "docs:build": "vitepress build docs",
26
+ "docs:serve": "vitepress serve docs"
27
+ },
28
+ "keywords": [
29
+ "vue",
30
+ "component-library",
31
+ "vitepress",
32
+ "i18n",
33
+ "typescript"
34
+ ],
35
+ "author": "Mr.Fang",
36
+ "license": "MIT",
37
+ "peerDependencies": {
38
+ "vue": "^3.5.13",
39
+ "vue-i18n": "^9.14.0"
40
+ },
41
+ "devDependencies": {
42
+ "@vitejs/plugin-vue": "^5.0.0",
43
+ "@vitepress-demo-preview/component": "^2.3.2",
44
+ "@vitepress-demo-preview/plugin": "^1.2.3",
45
+ "typescript": "^5.0.2",
46
+ "vite": "^5.0.0",
47
+ "vitepress": "^1.0.0-rc.4",
48
+ "vue": "^3.5.13",
49
+ "vue-i18n": "^9.14.0"
50
+ },
51
+ "dependencies": {
52
+ "element-plus": "^2.8.0",
53
+ "simple-web-lib": "^0.0.3"
54
+ }
55
+ }