su-test-component 0.0.0-stage → 1.0.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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar"]
3
+ }
package/README.md CHANGED
@@ -1,3 +1,38 @@
1
- # Temporary Holding Version
1
+ # test-component
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
+
9
+ ## Recommended Browser Setup
10
+
11
+ - Chromium-based browsers (Chrome, Edge, Brave, etc.):
12
+ - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13
+ - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14
+ - Firefox:
15
+ - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16
+ - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
17
+
18
+ ## Customize configuration
19
+
20
+ See [Vite Configuration Reference](https://vite.dev/config/).
21
+
22
+ ## Project Setup
23
+
24
+ ```sh
25
+ npm install
26
+ ```
27
+
28
+ ### Compile and Hot-Reload for Development
29
+
30
+ ```sh
31
+ npm run dev
32
+ ```
33
+
34
+ ### Compile and Minify for Production
35
+
36
+ ```sh
37
+ npm run build
38
+ ```
package/index.html ADDED
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <link rel="icon" href="/favicon.ico">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Vite App</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.js"></script>
12
+ </body>
13
+ </html>
package/jsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "compilerOptions": {
3
+ "paths": {
4
+ "@/*": ["./src/*"]
5
+ }
6
+ },
7
+ "exclude": ["node_modules", "dist"]
8
+ }
package/package.json CHANGED
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "name": "su-test-component",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "main": "./dist/company-ui.umd.cjs",
6
+ "module": "./dist/company-ui.js",
7
+ "scripts": {
8
+ "dev": "vite",
9
+ "build": "vite build",
10
+ "preview": "vite preview"
11
+ },
12
+ "dependencies": {
13
+ "vue": "^3.5.42"
14
+ },
15
+ "devDependencies": {
16
+ "@vitejs/plugin-vue": "^6.0.8",
17
+ "vite": "^8.2.2",
18
+ "vite-plugin-vue-devtools": "^8.2.1"
19
+ },
20
+ "engines": {
21
+ "node": "^22.18.0 || >=24.12.0"
22
+ }
23
+ }
Binary file
package/src/App.vue ADDED
@@ -0,0 +1,13 @@
1
+ <script setup>
2
+ // import HelloWorld from '@/components/HelloWorld.vue'
3
+ // import TheWelcome from '@/components/TheWelcome.vue'
4
+ // import WelcomeItem from '@/components/WelcomeItem.vue'
5
+ </script>
6
+ <template>
7
+ <HelloWorld>你好啊</HelloWorld>
8
+ <WelcomeItem>你好啊</WelcomeItem>
9
+ <TheWelcome>你好啊</TheWelcome>
10
+ </template>
11
+ <style>
12
+
13
+ </style>
@@ -0,0 +1,86 @@
1
+ /* color palette from <https://github.com/vuejs/theme> */
2
+ :root {
3
+ --vt-c-white: #ffffff;
4
+ --vt-c-white-soft: #f8f8f8;
5
+ --vt-c-white-mute: #f2f2f2;
6
+
7
+ --vt-c-black: #181818;
8
+ --vt-c-black-soft: #222222;
9
+ --vt-c-black-mute: #282828;
10
+
11
+ --vt-c-indigo: #2c3e50;
12
+
13
+ --vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
14
+ --vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
15
+ --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
16
+ --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
17
+
18
+ --vt-c-text-light-1: var(--vt-c-indigo);
19
+ --vt-c-text-light-2: rgba(60, 60, 60, 0.66);
20
+ --vt-c-text-dark-1: var(--vt-c-white);
21
+ --vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
22
+ }
23
+
24
+ /* semantic color variables for this project */
25
+ :root {
26
+ --color-background: var(--vt-c-white);
27
+ --color-background-soft: var(--vt-c-white-soft);
28
+ --color-background-mute: var(--vt-c-white-mute);
29
+
30
+ --color-border: var(--vt-c-divider-light-2);
31
+ --color-border-hover: var(--vt-c-divider-light-1);
32
+
33
+ --color-heading: var(--vt-c-text-light-1);
34
+ --color-text: var(--vt-c-text-light-1);
35
+
36
+ --section-gap: 160px;
37
+ }
38
+
39
+ @media (prefers-color-scheme: dark) {
40
+ :root {
41
+ --color-background: var(--vt-c-black);
42
+ --color-background-soft: var(--vt-c-black-soft);
43
+ --color-background-mute: var(--vt-c-black-mute);
44
+
45
+ --color-border: var(--vt-c-divider-dark-2);
46
+ --color-border-hover: var(--vt-c-divider-dark-1);
47
+
48
+ --color-heading: var(--vt-c-text-dark-1);
49
+ --color-text: var(--vt-c-text-dark-2);
50
+ }
51
+ }
52
+
53
+ *,
54
+ *::before,
55
+ *::after {
56
+ box-sizing: border-box;
57
+ margin: 0;
58
+ font-weight: normal;
59
+ }
60
+
61
+ body {
62
+ min-height: 100vh;
63
+ color: var(--color-text);
64
+ background: var(--color-background);
65
+ transition:
66
+ color 0.5s,
67
+ background-color 0.5s;
68
+ line-height: 1.6;
69
+ font-family:
70
+ Inter,
71
+ -apple-system,
72
+ BlinkMacSystemFont,
73
+ 'Segoe UI',
74
+ Roboto,
75
+ Oxygen,
76
+ Ubuntu,
77
+ Cantarell,
78
+ 'Fira Sans',
79
+ 'Droid Sans',
80
+ 'Helvetica Neue',
81
+ sans-serif;
82
+ font-size: 15px;
83
+ text-rendering: optimizeLegibility;
84
+ -webkit-font-smoothing: antialiased;
85
+ -moz-osx-font-smoothing: grayscale;
86
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>
@@ -0,0 +1,35 @@
1
+ @import './base.css';
2
+
3
+ #app {
4
+ max-width: 1280px;
5
+ margin: 0 auto;
6
+ padding: 2rem;
7
+ font-weight: normal;
8
+ }
9
+
10
+ a,
11
+ .green {
12
+ text-decoration: none;
13
+ color: hsla(160, 100%, 37%, 1);
14
+ transition: 0.4s;
15
+ padding: 3px;
16
+ }
17
+
18
+ @media (hover: hover) {
19
+ a:hover {
20
+ background-color: hsla(160, 100%, 37%, 0.2);
21
+ }
22
+ }
23
+
24
+ @media (min-width: 1024px) {
25
+ body {
26
+ display: flex;
27
+ place-items: center;
28
+ }
29
+
30
+ #app {
31
+ display: grid;
32
+ grid-template-columns: 1fr 1fr;
33
+ padding: 0 2rem;
34
+ }
35
+ }
@@ -0,0 +1,12 @@
1
+ import HelloWorld from '@/components/HelloWorld.vue'
2
+ import TheWelcome from '@/components/TheWelcome.vue'
3
+ import WelcomeItem from '@/components/WelcomeItem.vue'
4
+
5
+ export default {
6
+ install(app) {
7
+ app.component(HelloWorld.name,HelloWorld)
8
+ app.component(TheWelcome.name,TheWelcome)
9
+ app.component(WelcomeItem.name,WelcomeItem)
10
+ }
11
+ }
12
+ export {HelloWorld,WelcomeItem,TheWelcome}
@@ -0,0 +1,11 @@
1
+ <script setup>
2
+ defineOptions({
3
+ name:'HelloWorld'
4
+ })
5
+ </script>
6
+ <template>
7
+ <div>我HelloWorld组件</div>
8
+ </template>
9
+ <style>
10
+
11
+ </style>
@@ -0,0 +1,11 @@
1
+ <script setup>
2
+ defineOptions({
3
+ name:'TheWelcome'
4
+ })
5
+ </script>
6
+ <template>
7
+ <div>我是TheWelcome组件</div>
8
+ </template>
9
+ <style>
10
+
11
+ </style>
@@ -0,0 +1,11 @@
1
+ <script setup>
2
+ defineOptions({
3
+ name:'WelcomeItem'
4
+ })
5
+ </script>
6
+ <template>
7
+ <div>我是WelcomeItem组件</div>
8
+ </template>
9
+ <style>
10
+
11
+ </style>
package/src/main.js ADDED
@@ -0,0 +1,8 @@
1
+ import './assets/main.css'
2
+
3
+ import { createApp } from 'vue'
4
+ import App from './App.vue'
5
+ let app = createApp(App)
6
+ import componens from './componens'
7
+ app.use(componens)
8
+ app.mount('#app')
package/vite.config.js ADDED
@@ -0,0 +1,29 @@
1
+ import { fileURLToPath, URL } from 'node:url'
2
+
3
+ import { defineConfig } from 'vite'
4
+ import vue from '@vitejs/plugin-vue'
5
+ import vueDevTools from 'vite-plugin-vue-devtools'
6
+ import { resolve } from 'path';
7
+
8
+ // https://vite.dev/config/
9
+ export default defineConfig({
10
+ plugins: [
11
+ vue(),
12
+ vueDevTools(),
13
+ ],
14
+ build: {
15
+ lib: {
16
+ entry: resolve(__dirname, 'src/componens.js'),
17
+ name: 'CompanyUI',
18
+ fileName: 'company-ui' // 生成 company-ui.es.js 等
19
+ },
20
+ rollupOptions: {
21
+ external: ['vue'], // 永远不要把 Vue 打进去
22
+ output: { globals: { vue: 'Vue' } }
23
+ }},
24
+ resolve: {
25
+ alias: {
26
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
27
+ },
28
+ },
29
+ })