vunor 0.0.5 → 0.0.6

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/dist/nuxt.d.ts CHANGED
@@ -0,0 +1,6 @@
1
+ import { NuxtModule } from '@nuxt/schema';
2
+
3
+ declare const index: NuxtModule<any>;
4
+ export default index;
5
+
6
+ export { }
package/dist/theme.d.ts CHANGED
@@ -1,14 +1,170 @@
1
- import { presetVunor } from './theme/preset-vunor';
2
- import { scFromObject } from './theme/utils/shortcut-obj';
3
- import { shortcuts } from './components/shortcuts';
4
- import { TVunorTheme } from './theme/theme';
1
+ import { PresetFactory } from 'unocss';
2
+ import { Theme } from '@unocss/preset-mini';
5
3
 
6
- export { presetVunor }
4
+ export declare const presetVunor: PresetFactory<TVunorTheme, TVunorUnoPresetOpts & {
5
+ palette?: TPaletteOptions;
6
+ }>;
7
7
 
8
- export { scFromObject }
8
+ export declare function scFromObject(obj: TShortcutObject): string;
9
9
 
10
- export { shortcuts }
10
+ export declare const shortcuts: ({
11
+ btn: string;
12
+ 'btn-square': string;
13
+ 'btn-label': string;
14
+ 'btn-icon': string;
15
+ } | {
16
+ card: string;
17
+ } | {
18
+ 'checkbox-root': string;
19
+ checkbox: string;
20
+ 'checkbox-indicator': string;
21
+ 'checkbox-icon': string;
22
+ 'checkbox-label': string;
23
+ } | {
24
+ 'combobox-multi-input': string;
25
+ 'combobox-multi-items': string;
26
+ 'combobox-embedded-input': string;
27
+ 'combobox-c8-icon': string;
28
+ } | {
29
+ 'loading-indicator': string;
30
+ 'loading-indicator-ring': string;
31
+ } | {
32
+ 'menu-root': string;
33
+ 'menu-item': string;
34
+ } | {
35
+ 'rb-container': string;
36
+ 'rb-label': string;
37
+ 'rb-root': string;
38
+ 'rb-item-wrapper': string;
39
+ 'rb-item': string;
40
+ 'rb-item-indicator': string;
41
+ 'rb-item-label': string;
42
+ } | {
43
+ 'select-content': string;
44
+ 'select-scroll-btn': string;
45
+ 'select-grp-label': string;
46
+ 'select-item': string;
47
+ 'select-separator': string;
48
+ } | {
49
+ slider: string;
50
+ 'slider-track': string;
51
+ 'slider-range': string;
52
+ 'slider-thumb': string;
53
+ })[];
11
54
 
12
- export { TVunorTheme }
55
+ declare const themeFactory: (opts: Required<TVunorUnoPresetOpts> & {
56
+ palette?: TPaletteOptions;
57
+ }) => {
58
+ colors: {
59
+ [x: string]: string;
60
+ };
61
+ surfaces: Record<string, [string, string, string, string, string, string]>;
62
+ borderColor: string;
63
+ reverseLightLayers: boolean;
64
+ reverseDarkLayers: boolean;
65
+ lineHeight: {
66
+ fingertip: string;
67
+ 'fingertip-half': string;
68
+ 'fingertip-xs': string;
69
+ 'fingertip-s': string;
70
+ 'fingertip-m': string;
71
+ 'fingertip-l': string;
72
+ 'fingertip-xl': string;
73
+ };
74
+ spacing: Record<string, string>;
75
+ fontWeight: Record<string, string>;
76
+ actualFontHeightFactor: number;
77
+ cardSpacingFactor: {
78
+ regular: number;
79
+ dense: number;
80
+ };
81
+ fontSize: Record<string, [TTypographyNames, Record<string, string>]>;
82
+ width: Record<string, string>;
83
+ height: Record<string, string>;
84
+ maxWidth: Record<string, string>;
85
+ maxHeight: Record<string, string>;
86
+ minWidth: Record<string, string>;
87
+ minHeight: Record<string, string>;
88
+ borderRadius: {
89
+ base: string;
90
+ };
91
+ animation: {
92
+ durations: {
93
+ 'slide-down-and-fade': string;
94
+ 'slide-left-and-fade': string;
95
+ 'slide-up-and-fade': string;
96
+ 'slide-right-and-fade': string;
97
+ 'zoom-fade-in': string;
98
+ };
99
+ keyframes: {
100
+ 'slide-down-and-fade': string;
101
+ 'slide-left-and-fade': string;
102
+ 'slide-up-and-fade': string;
103
+ 'slide-right-and-fade': string;
104
+ 'zoom-fade-in': string;
105
+ 'loading-dashoffset': string;
106
+ 'cb-appear': string;
107
+ };
108
+ };
109
+ };
110
+
111
+ declare interface TPaletteOptions {
112
+ colors?: {
113
+ primary?: string;
114
+ secondary?: string;
115
+ grey?: string;
116
+ neutral?: string;
117
+ good?: string;
118
+ warn?: string;
119
+ error?: string;
120
+ };
121
+ lightest?: number;
122
+ darkest?: number;
123
+ }
124
+
125
+ declare type TScString = string | string[];
126
+
127
+ declare type TShortcutObject = Record<string, Record<string, Record<string, TScString | undefined> | TScString | undefined> | TScString | undefined>;
128
+
129
+ declare interface TTypography {
130
+ size?: number;
131
+ weight?: number;
132
+ boldWeight?: number;
133
+ spacing?: number;
134
+ height?: number;
135
+ font?: string;
136
+ actualHeightFactor?: number;
137
+ actualHeightTopBottomRatio?: number;
138
+ css?: Record<string, string>;
139
+ }
140
+
141
+ declare type TTypographyNames = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subheading' | 'body-l' | 'body' | 'body-s' | 'callout' | 'label' | 'caption' | 'overline';
142
+
143
+ export declare type TVunorTheme = ReturnType<typeof themeFactory> & Theme;
144
+
145
+ declare interface TVunorUnoPresetOpts {
146
+ spacingFactor?: number;
147
+ actualFontHeightFactor?: number;
148
+ actualFontHeightTopBottomRatio?: number;
149
+ cardSpacingFactor?: {
150
+ regular: number;
151
+ dense: number;
152
+ };
153
+ typography?: {
154
+ [name in TTypographyNames]: TTypography | undefined;
155
+ };
156
+ layers?: {
157
+ reverseDark?: boolean;
158
+ reverseLight?: boolean;
159
+ };
160
+ fingertip?: {
161
+ xs?: string;
162
+ s?: string;
163
+ m?: string;
164
+ l?: string;
165
+ xl?: string;
166
+ };
167
+ baseRadius?: string;
168
+ }
13
169
 
14
170
  export { }
package/dist/theme.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import "vue";
2
1
  import R, { defu as w } from "defu";
3
2
  import { presetWind as N } from "unocss";
4
3
  import { palitra as m, color as v } from "@prostojs/palitra";
@@ -175,7 +174,7 @@ const L = {
175
174
  "focus:": "outline-[0.5em]"
176
175
  })
177
176
  })
178
- }, ar = [
177
+ }, nr = [
179
178
  q,
180
179
  M,
181
180
  L,
@@ -755,6 +754,9 @@ const G = [
755
754
  "[&>.icon-color:hover]:": "current-icon-scope-color-500 icon-current"
756
755
  })
757
756
  };
757
+ function n(r, e = 1) {
758
+ return e * 1.618 ** r;
759
+ }
758
760
  function p(r, e, t, c, i) {
759
761
  return {
760
762
  weight: r,
@@ -764,9 +766,6 @@ function p(r, e, t, c, i) {
764
766
  spacing: i
765
767
  };
766
768
  }
767
- function n(r, e = 1) {
768
- return e * 1.618 ** r;
769
- }
770
769
  const Z = {
771
770
  h1: (
772
771
  /* */
@@ -1118,7 +1117,7 @@ const er = {
1118
1117
  xl: "4em"
1119
1118
  },
1120
1119
  baseRadius: `${g(1 / 1.618, 3)}em`
1121
- }, lr = (r) => {
1120
+ }, ar = (r) => {
1122
1121
  const e = w(r, er), t = tr();
1123
1122
  t.preflights || (t.preflights = []), t.preflights.push(E), t.rules || (t.rules = []), t.rules.push(...K);
1124
1123
  const c = P();
@@ -1143,7 +1142,7 @@ function tr() {
1143
1142
  }), r;
1144
1143
  }
1145
1144
  export {
1146
- lr as presetVunor,
1145
+ ar as presetVunor,
1147
1146
  o as scFromObject,
1148
- ar as shortcuts
1147
+ nr as shortcuts
1149
1148
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vunor",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -63,8 +63,9 @@
63
63
  "./utils": "./src/components/utils/index.ts"
64
64
  },
65
65
  "devDependencies": {
66
- "@nuxt/kit": "^3.12.4",
67
66
  "@iconify/utils": "^2.1.23",
67
+ "@nuxt/kit": "^3.12.4",
68
+ "@nuxt/schema": "^3.12.4",
68
69
  "@prostojs/palitra": "^0.0.3",
69
70
  "@tsconfig/node20": "^20.1.4",
70
71
  "@types/node": "^20.12.5",
@@ -80,8 +81,8 @@
80
81
  "unocss-preset-scrollbar": "^0.3.1",
81
82
  "unplugin-auto-import": "^0.17.6",
82
83
  "unplugin-vue-components": "^0.27.0",
84
+ "vite-plugin-dts": "3.8.3",
83
85
  "vite": "^5.3.5",
84
- "vite-plugin-dts": "^4.0.0-beta.2",
85
86
  "vitest": "^1.6.0",
86
87
  "vue-tsc": "^2.0.11"
87
88
  }
@@ -14,6 +14,6 @@ const headers = [
14
14
 
15
15
  export const cardShortcuts = {
16
16
  card: `data-[rounded=true]:rounded-$card-spacing data-[dense=true]:card-dense! ${headers
17
- .map(h => `data-[level=${h}]:card-${h}`)
17
+ .map(header => `data-[level=${header}]:card-${header}`)
18
18
  .join(' ')}`,
19
19
  }