anubis-ui 1.0.5 β†’ 1.0.7

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
@@ -3,12 +3,23 @@
3
3
 
4
4
  AnubisUI (Autonomous Nominative Utility Based Intuitive Styler) is a Vite plugin that provides dynamic CSS class generation based on configuration files. It automatically generates CSS rules by scanning your Vue files and mapping utility classes to their corresponding styles.
5
5
 
6
+ > __THIS DOESN'T WORK__ ```<div :class="`bg-primary-${props.bg || 'low'}\`" />```
7
+ > <br />
8
+ > Classes must be EXPLICITY written in the code to allow the extraction to work correctly, dynamic classes will not work
9
+ > <br />
10
+ > In the future, some config will allow to generate a bunch of specified classes even if not present in the code
11
+ > <br />
12
+ > Until then, you can create a decoy .vue file filled with the dynamic classes you want
13
+ > <br />
14
+
6
15
  ## Table of Contents
7
16
  1. [Features](#features)
8
17
  2. [Installation](#installation)
9
18
  3. [Configuration](#configuration)
10
- 4. [Usage](#usage)
11
- 5. [Architecture](#architecture)
19
+ 4. [Available Utility Classes](#available-utility-classes)
20
+ 5. [Prefix/Declaration relations](#prefixdeclaration-relations)
21
+ 6. [Architecture](#architecture)
22
+ 7. [Credits](#credits)
12
23
 
13
24
  ## Features
14
25
  - 🎨 Dynamic CSS generation based on utility classes
@@ -48,14 +59,7 @@ css: [
48
59
  ```
49
60
  <sup>quasar.config.js</sup>
50
61
 
51
-
52
- 4. Start adding classes to your *.vue files
53
- ```html
54
- <div class="bg-primary border-neutral-low hover:shadow-low" />
55
- ```
56
- <sup>any .vue file</sup>
57
-
58
- 5. Declare your project colors in the DOM ::root in anyway you want
62
+ 4. Declare your project colors in the DOM ::root in anyway you want
59
63
  <br />
60
64
  Personnaly, i use the following method based on a mixin declaration
61
65
 
@@ -72,7 +76,7 @@ $background-opacity: (
72
76
  90: 0.9
73
77
  );
74
78
 
75
- @mixin setGlobalColors($light, $dark, $name) {
79
+ @mixin setGlobalColors($name, $light, $dark) {
76
80
  @include setRootColors($name, $light, 'body--light');
77
81
  @include setRootColors($name, $dark, 'body--dark');
78
82
  }
@@ -96,15 +100,29 @@ $background-opacity: (
96
100
  ```scss
97
101
  @import './mixins';
98
102
 
99
- @include defineColorLightAndDark('primary', $blue-500, $blue-400);
100
- @include defineColorLightAndDark('secondary', $blue-grey-500, $blue-grey-400);
101
- @include defineColorLightAndDark('accent', $blue-500, $blue-400);
102
- @include defineColorLightAndDark('neutral', $slate-500, $slate-500);
103
- @include defineColorLightAndDark('success', $green-500, $green-400);
104
- @include defineColorLightAndDark('danger', $red-500, $red-400);
103
+ /**...highest... */
104
+ /**...higher... */
105
+ /**...high... */
106
+ @include setGlobalColors('primary', $blue-500, $blue-400);
107
+ /**...low... */
108
+ /**...lower... */
109
+ /**...lowest... */
110
+
111
+ @include setGlobalColors('secondary', $blue-grey-500, $blue-grey-400);
112
+ @include setGlobalColors('accent', $blue-500, $blue-400);
113
+ @include setGlobalColors('neutral', $slate-500, $slate-500);
114
+ @include setGlobalColors('success', $green-500, $green-400);
115
+ @include setGlobalColors('danger', $red-500, $red-400);
105
116
  ```
106
117
  <sup>src/css/_colors_.scss</sup>
107
118
 
119
+
120
+ 5. Start adding classes however you want to (in *.vue files)
121
+ ```html
122
+ <div class="bg-primary border-neutral-low hover:shadow-low" />
123
+ ```
124
+ <sup>any .vue file</sup>
125
+
108
126
  6. Enjoy
109
127
 
110
128
  ## Configuration
@@ -128,6 +146,7 @@ Define your color palette
128
146
  "warning",
129
147
  "danger"
130
148
  ]
149
+ // no need to includes (lowest, lower, low, high, higher, highest) variants as long as the color name is present in the class
131
150
  ```
132
151
  </details>
133
152
 
@@ -218,7 +237,8 @@ Define available states and style prefixes
218
237
  - `bg-{color}` - Background color
219
238
  - `text-{color}` - Text color
220
239
  - `border-{color}` - Border color
221
- - `shadow-{color}` - Box shadow color
240
+ - `inner-border-{color}` - Inner border color (inset box shadow, not compatible with `shadow-`)
241
+ - `shadow-{color}` - Box shadow color (not compatible with `inner-border-`)
222
242
 
223
243
  #### States
224
244
  - `hover:{utility}` - Apply style on hover
@@ -230,25 +250,34 @@ Define available states and style prefixes
230
250
  - `shadow-{color}-{preset}` - Box shadow spread
231
251
  - `inner-border-{color}-{preset}` - Box shadow inset width
232
252
 
253
+ ## Prefix/Declaration relations
254
+ | prefix | declaration |
255
+ |--------------|-----------------------------------------------------------------------------|
256
+ | bg | `background: {color} important;` |
257
+ | text | `color: {color} important;` |
258
+ | border | `border-width: {variation \|\| default} !important; border-color: {color} !important; border-style: solid;` |
259
+ | inner-border | `box-shadow: inset {variation \|\| default} {color} !important;` |
260
+ | shadow | `box-shadow: {variation \|\| default} {color} !important;` |
261
+
233
262
  ## Architecture
234
263
  ### Core Components
235
264
  - **Vite Plugin**: Handles file watching and build process
236
265
  - **Class Extractor**: Scans files for utility classes
237
266
  - **Rule Generator**: Converts utility classes to CSS rules
238
- - **Configuration System**: Manages user preferences and presets
267
+ - **Configuration System**: WIP - Manages user preferences and presets
239
268
 
240
269
  ### File Structure
241
270
  ```
242
- </details>src/
243
-
244
- β”œβ”€β”€ config/ # Configuration files
245
- β”œβ”€β”€ interfaces/ # TypeScript interfaces
246
- β”œβ”€β”€ manual/ # Manually trigger anubis actions
247
- β”œβ”€β”€ tools/
248
- β”‚ β”œβ”€β”€ extract/ # Class extraction logic
249
- β”‚ β”œβ”€β”€ mapping/ # Class to CSS rule mapping
250
- β”‚ └── declaration/ # Style declaration handlers
251
- └── index.ts # Plugin entry point
271
+ β”œβ”€β”€ dist/ # Compiled and generated output
272
+ β”œβ”€β”€ src/
273
+ β”‚ β”œβ”€β”€ config/ # Configuration files
274
+ β”‚ β”œβ”€β”€ interfaces/ # TypeScript interfaces
275
+ β”‚ β”œβ”€β”€ manual/ # Manually trigger anubis actions
276
+ β”‚ └── tools/
277
+ β”‚ β”œβ”€β”€ extract/ # Class extraction logic
278
+ β”‚ β”œβ”€β”€ declaration/ # WIP - Style declaration handlers
279
+ β”‚ └── mapping/ # Class to CSS rule mapping
280
+ └── index.js # Plugin entry point
252
281
  ```
253
282
 
254
283
 
package/package.json CHANGED
@@ -1,8 +1,19 @@
1
1
  {
2
2
  "name": "anubis-ui",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Class-based css generator",
5
5
  "main": "index.js",
6
+ "keywords": [
7
+ "anubis",
8
+ "anubisUI",
9
+ "css",
10
+ "scss",
11
+ "style",
12
+ "plugin",
13
+ "vite",
14
+ "quasar",
15
+ "vue"
16
+ ],
6
17
  "scripts": {
7
18
  "build": "tsc",
8
19
  "preinstall": "npm run build"
@@ -14,7 +14,7 @@ const logo = () => {
14
14
  }
15
15
 
16
16
  const cssHeader = `/*!
17
- * * Anubis v.1.0.5
17
+ * * Anubis v.1.0.6
18
18
  * * Improba
19
19
  * * Released under the MIT License.
20
20
  * */`
package/tsconfig.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "rootDir": "./src",
5
5
  "declaration": true,
6
6
  "module": "commonjs",
7
- "target": "es2018",
7
+ "target": "es2019",
8
8
  "skipLibCheck": true, // Ignore la vΓ©rification des fichiers .d.ts dans node_modules
9
9
  "esModuleInterop": true
10
10
  },