@vixt/layer-shared 0.6.8 → 0.7.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-PRESENT SoulLyoko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/loading.html CHANGED
@@ -1,135 +1,135 @@
1
- <!-- copy from https://tobiasahlin.com/spinkit/ -->
2
- <div class="loader">
3
- <div class="sk-chase">
4
- <div class="sk-chase-dot"></div>
5
- <div class="sk-chase-dot"></div>
6
- <div class="sk-chase-dot"></div>
7
- <div class="sk-chase-dot"></div>
8
- <div class="sk-chase-dot"></div>
9
- <div class="sk-chase-dot"></div>
10
- </div>
11
- </div>
12
-
13
- <style>
14
- html,
15
- body,
16
- #app {
17
- height: 100%;
18
- margin: 0;
19
- }
20
-
21
- html {
22
- --loader-color: #333;
23
- }
24
-
25
- html.dark {
26
- --loader-color: #fff;
27
- background-color: #121212;
28
- }
29
-
30
- .loader {
31
- height: 100%;
32
- display: flex;
33
- flex-direction: column;
34
- align-items: center;
35
- justify-content: center;
36
- }
37
-
38
- .sk-chase {
39
- width: 40px;
40
- height: 40px;
41
- position: relative;
42
- animation: sk-chase 2.5s infinite linear both;
43
- }
44
-
45
- .sk-chase-dot {
46
- width: 100%;
47
- height: 100%;
48
- position: absolute;
49
- left: 0;
50
- top: 0;
51
- animation: sk-chase-dot 2s infinite ease-in-out both;
52
- }
53
-
54
- .sk-chase-dot:before {
55
- content: '';
56
- display: block;
57
- width: 25%;
58
- height: 25%;
59
- background-color: var(--loader-color);
60
- border-radius: 100%;
61
- animation: sk-chase-dot-before 2s infinite ease-in-out both;
62
- }
63
-
64
- .sk-chase-dot:nth-child(1) {
65
- animation-delay: -1.1s;
66
- }
67
-
68
- .sk-chase-dot:nth-child(2) {
69
- animation-delay: -1s;
70
- }
71
-
72
- .sk-chase-dot:nth-child(3) {
73
- animation-delay: -0.9s;
74
- }
75
-
76
- .sk-chase-dot:nth-child(4) {
77
- animation-delay: -0.8s;
78
- }
79
-
80
- .sk-chase-dot:nth-child(5) {
81
- animation-delay: -0.7s;
82
- }
83
-
84
- .sk-chase-dot:nth-child(6) {
85
- animation-delay: -0.6s;
86
- }
87
-
88
- .sk-chase-dot:nth-child(1):before {
89
- animation-delay: -1.1s;
90
- }
91
-
92
- .sk-chase-dot:nth-child(2):before {
93
- animation-delay: -1s;
94
- }
95
-
96
- .sk-chase-dot:nth-child(3):before {
97
- animation-delay: -0.9s;
98
- }
99
-
100
- .sk-chase-dot:nth-child(4):before {
101
- animation-delay: -0.8s;
102
- }
103
-
104
- .sk-chase-dot:nth-child(5):before {
105
- animation-delay: -0.7s;
106
- }
107
-
108
- .sk-chase-dot:nth-child(6):before {
109
- animation-delay: -0.6s;
110
- }
111
-
112
- @keyframes sk-chase {
113
- 100% {
114
- transform: rotate(360deg);
115
- }
116
- }
117
-
118
- @keyframes sk-chase-dot {
119
- 80%,
120
- 100% {
121
- transform: rotate(360deg);
122
- }
123
- }
124
-
125
- @keyframes sk-chase-dot-before {
126
- 50% {
127
- transform: scale(0.4);
128
- }
129
-
130
- 100%,
131
- 0% {
132
- transform: scale(1);
133
- }
134
- }
135
- </style>
1
+ <!-- copy from https://tobiasahlin.com/spinkit/ -->
2
+ <div class="loader">
3
+ <div class="sk-chase">
4
+ <div class="sk-chase-dot"></div>
5
+ <div class="sk-chase-dot"></div>
6
+ <div class="sk-chase-dot"></div>
7
+ <div class="sk-chase-dot"></div>
8
+ <div class="sk-chase-dot"></div>
9
+ <div class="sk-chase-dot"></div>
10
+ </div>
11
+ </div>
12
+
13
+ <style>
14
+ html,
15
+ body,
16
+ #app {
17
+ height: 100%;
18
+ margin: 0;
19
+ }
20
+
21
+ html {
22
+ --loader-color: #333;
23
+ }
24
+
25
+ html.dark {
26
+ --loader-color: #fff;
27
+ background-color: #121212;
28
+ }
29
+
30
+ .loader {
31
+ height: 100%;
32
+ display: flex;
33
+ flex-direction: column;
34
+ align-items: center;
35
+ justify-content: center;
36
+ }
37
+
38
+ .sk-chase {
39
+ width: 40px;
40
+ height: 40px;
41
+ position: relative;
42
+ animation: sk-chase 2.5s infinite linear both;
43
+ }
44
+
45
+ .sk-chase-dot {
46
+ width: 100%;
47
+ height: 100%;
48
+ position: absolute;
49
+ left: 0;
50
+ top: 0;
51
+ animation: sk-chase-dot 2s infinite ease-in-out both;
52
+ }
53
+
54
+ .sk-chase-dot:before {
55
+ content: '';
56
+ display: block;
57
+ width: 25%;
58
+ height: 25%;
59
+ background-color: var(--loader-color);
60
+ border-radius: 100%;
61
+ animation: sk-chase-dot-before 2s infinite ease-in-out both;
62
+ }
63
+
64
+ .sk-chase-dot:nth-child(1) {
65
+ animation-delay: -1.1s;
66
+ }
67
+
68
+ .sk-chase-dot:nth-child(2) {
69
+ animation-delay: -1s;
70
+ }
71
+
72
+ .sk-chase-dot:nth-child(3) {
73
+ animation-delay: -0.9s;
74
+ }
75
+
76
+ .sk-chase-dot:nth-child(4) {
77
+ animation-delay: -0.8s;
78
+ }
79
+
80
+ .sk-chase-dot:nth-child(5) {
81
+ animation-delay: -0.7s;
82
+ }
83
+
84
+ .sk-chase-dot:nth-child(6) {
85
+ animation-delay: -0.6s;
86
+ }
87
+
88
+ .sk-chase-dot:nth-child(1):before {
89
+ animation-delay: -1.1s;
90
+ }
91
+
92
+ .sk-chase-dot:nth-child(2):before {
93
+ animation-delay: -1s;
94
+ }
95
+
96
+ .sk-chase-dot:nth-child(3):before {
97
+ animation-delay: -0.9s;
98
+ }
99
+
100
+ .sk-chase-dot:nth-child(4):before {
101
+ animation-delay: -0.8s;
102
+ }
103
+
104
+ .sk-chase-dot:nth-child(5):before {
105
+ animation-delay: -0.7s;
106
+ }
107
+
108
+ .sk-chase-dot:nth-child(6):before {
109
+ animation-delay: -0.6s;
110
+ }
111
+
112
+ @keyframes sk-chase {
113
+ 100% {
114
+ transform: rotate(360deg);
115
+ }
116
+ }
117
+
118
+ @keyframes sk-chase-dot {
119
+ 80%,
120
+ 100% {
121
+ transform: rotate(360deg);
122
+ }
123
+ }
124
+
125
+ @keyframes sk-chase-dot-before {
126
+ 50% {
127
+ transform: scale(0.4);
128
+ }
129
+
130
+ 100%,
131
+ 0% {
132
+ transform: scale(1);
133
+ }
134
+ }
135
+ </style>
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@vixt/layer-shared",
3
3
  "type": "module",
4
- "version": "0.6.8",
4
+ "version": "0.7.2",
5
+ "author": "SoulLyoko<https://github.com/SoulLyoko>",
6
+ "license": "MIT",
7
+ "homepage": "https://soullyoko.github.io/vixt/",
8
+ "repository": "https://github.com/SoulLyoko/vixt.git",
5
9
  "main": "vixt.config.ts",
6
10
  "dependencies": {
7
- "@unocss/reset": "catalog:vite",
8
- "vixt": "workspace:*"
11
+ "@unocss/reset": "^66.5.12"
9
12
  }
10
- }
13
+ }
package/src/app.config.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { defineAppConfig } from 'vixt/client'
2
-
3
- const env = useEnv()
4
- console.log('env:', env)
5
-
6
- export default defineAppConfig({
7
- name: 'layer-shared',
8
- })
1
+ import { defineAppConfig } from 'vixt/client'
2
+
3
+ const env = useEnv()
4
+ console.log('env:', env)
5
+
6
+ export default defineAppConfig({
7
+ name: 'layer-shared',
8
+ })
@@ -1,3 +1,3 @@
1
- export function useEnv() {
2
- return getEnv()
3
- }
1
+ export function useEnv() {
2
+ return getEnv()
3
+ }
@@ -1 +1 @@
1
- export const ENV = { error: 'ENV should be overridden' }
1
+ export const ENV = { error: 'ENV should be overridden' }
package/src/hooks/hook.ts CHANGED
@@ -1,3 +1,3 @@
1
- export function useEnv() {
2
- return getEnv()
3
- }
1
+ export function useEnv() {
2
+ return getEnv()
3
+ }
@@ -1,3 +1,3 @@
1
- # Modules
2
-
3
- shared modules for all apps
1
+ # Modules
2
+
3
+ shared modules for all apps
@@ -1,6 +1,6 @@
1
- import { defineVixtModule } from 'vixt'
2
-
3
- export default defineVixtModule(() => {
4
- console.log('layer-shared module1 loaded')
5
- return false
6
- })
1
+ import { defineVixtModule } from 'vixt'
2
+
3
+ export default defineVixtModule(() => {
4
+ console.log('layer-shared module1 loaded')
5
+ return false
6
+ })
@@ -1,6 +1,6 @@
1
- import { defineVixtModule } from 'vixt'
2
-
3
- export default defineVixtModule(() => {
4
- console.log('layer-shared module2 loaded')
5
- return false
6
- })
1
+ import { defineVixtModule } from 'vixt'
2
+
3
+ export default defineVixtModule(() => {
4
+ console.log('layer-shared module2 loaded')
5
+ return false
6
+ })
@@ -1,3 +1,3 @@
1
- # Plugins
2
-
3
- shared plugins for all apps
1
+ # Plugins
2
+
3
+ shared plugins for all apps
@@ -1,15 +1,15 @@
1
- import { defineVixtPlugin } from 'vixt/client'
2
-
3
- declare module '@vixt/core/client' {
4
- interface VixtAppConfig {
5
- pluginConfig?: string
6
- }
7
- }
8
-
9
- export default defineVixtPlugin((vixtApp) => {
10
- console.log('vixtApp:', vixtApp.appConfig)
11
- console.log('layer-shared plugin1 loaded')
12
-
13
- // @ts-expect-error
14
- vixtApp.appConfig.pluginConfig = 0
15
- })
1
+ import { defineVixtPlugin } from 'vixt/client'
2
+
3
+ declare module '@vixt/core/client' {
4
+ interface VixtAppConfig {
5
+ pluginConfig?: string
6
+ }
7
+ }
8
+
9
+ export default defineVixtPlugin((vixtApp) => {
10
+ console.log('vixtApp:', vixtApp.appConfig)
11
+ console.log('layer-shared plugin1 loaded')
12
+
13
+ // @ts-expect-error
14
+ vixtApp.appConfig.pluginConfig = 0
15
+ })
@@ -1,5 +1,5 @@
1
- import { defineVixtPlugin } from 'vixt/client'
2
-
3
- export default defineVixtPlugin(() => {
4
- console.log('layer-shared plugin2 loaded')
5
- })
1
+ import { defineVixtPlugin } from 'vixt/client'
2
+
3
+ export default defineVixtPlugin(() => {
4
+ console.log('layer-shared plugin2 loaded')
5
+ })
package/src/utils/util.ts CHANGED
@@ -1,3 +1,3 @@
1
- export function getEnv() {
2
- return ENV
3
- }
1
+ export function getEnv() {
2
+ return ENV
3
+ }
package/uno.config.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { defineConfig, presetAttributify, presetWind3, transformerAttributifyJsx, transformerDirectives, transformerVariantGroup } from 'unocss'
2
-
3
- export default defineConfig({
4
- presets: [
5
- presetWind3(),
6
- presetAttributify(),
7
- ],
8
- transformers: [
9
- transformerDirectives(),
10
- transformerVariantGroup(),
11
- transformerAttributifyJsx(),
12
- ],
13
- shortcuts: [
14
- ['btn', 'px-4 py-1 rounded inline-block bg-teal-700 text-white cursor-pointer !outline-none hover:bg-teal-800 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
15
- ['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
16
- ],
17
- })
1
+ import { defineConfig, presetAttributify, presetWind3, transformerAttributifyJsx, transformerDirectives, transformerVariantGroup } from 'unocss'
2
+
3
+ export default defineConfig({
4
+ presets: [
5
+ presetWind3(),
6
+ presetAttributify(),
7
+ ],
8
+ transformers: [
9
+ transformerDirectives(),
10
+ transformerVariantGroup(),
11
+ transformerAttributifyJsx(),
12
+ ],
13
+ shortcuts: [
14
+ ['btn', 'px-4 py-1 rounded inline-block bg-teal-700 text-white cursor-pointer !outline-none hover:bg-teal-800 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
15
+ ['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
16
+ ],
17
+ })
package/vixt.config.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { defineVixtConfig } from 'vixt'
2
-
3
- export default defineVixtConfig({
4
- meta: { name: 'layer-shared' },
5
- app: {
6
- css: ['@unocss/reset/tailwind.css'],
7
- },
8
- })
1
+ import { defineVixtConfig } from 'vixt'
2
+
3
+ export default defineVixtConfig({
4
+ meta: { name: 'layer-shared' },
5
+ app: {
6
+ css: ['@unocss/reset/tailwind.css'],
7
+ },
8
+ })
package/tsconfig.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["../vue/.vixt/tsconfig.json", "../react/.vixt/tsconfig.json"]
3
- }