@newlogic-digital/core 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  root
16
16
  } from "./modules/Core.js";
17
17
 
18
- import { tailwindColors, tailwindColorsRgba, tailwindVariables, tailwindColorsAccent } from './modules/tailwind/index.js'
18
+ import { tailwindColors, tailwindColorsRgba, tailwindVariables, tailwindColorsAccent, tailwindColorsCurrent } from './modules/tailwind/index.js'
19
19
 
20
20
  const defineConfig = (config) => new Core().init(config);
21
21
 
@@ -25,6 +25,7 @@ export {
25
25
  tailwindVariables,
26
26
  tailwindColorsRgba,
27
27
  tailwindColorsAccent,
28
+ tailwindColorsCurrent,
28
29
  Core,
29
30
  Utils,
30
31
  Styles,
package/modules/Serve.js CHANGED
@@ -67,9 +67,6 @@ export const Serve = new class {
67
67
  fsServe: {
68
68
  strict: false
69
69
  },
70
- hmr: {
71
- host: 'localhost'
72
- },
73
70
  watch: {
74
71
  ignored: ['**/node_modules/**', '**/.git/**', '**/src/templates/**', '**/src/main.json', `**/${Config.paths.output.root}/*.html`]
75
72
  }
@@ -83,6 +80,9 @@ export const Serve = new class {
83
80
  https: {
84
81
  key: fs.readFileSync(path.join(os.homedir(),'.ssh/localhost-key.pem')),
85
82
  cert: fs.readFileSync(path.join(os.homedir(),'.ssh/localhost.pem')),
83
+ },
84
+ hmr: {
85
+ host: 'localhost'
86
86
  }
87
87
  }
88
88
  })
@@ -35,8 +35,21 @@ const tailwindColorsAccent = (colors = []) => {
35
35
  const result = {};
36
36
 
37
37
  colors.forEach(color => {
38
- result[`.accent-color-${color}`] = {
39
- '--color-accent': `var(--color-${color})`
38
+ result[`.accent-${color}`] = {
39
+ '--color-accent': `var(--color-${color})`,
40
+ 'accent-color': 'rgb(var(--color-accent))'
41
+ };
42
+ });
43
+
44
+ return result
45
+ };
46
+
47
+ const tailwindColorsCurrent = (colors = []) => {
48
+ const result = {};
49
+
50
+ colors.forEach(color => {
51
+ result[`.text-${color}`] = {
52
+ '--color-current': `var(--color-${color})`
40
53
  };
41
54
  });
42
55
 
@@ -53,5 +66,6 @@ const tailwindVariables = (type, variables = [], values = {}) => {
53
66
 
54
67
  exports.tailwindColors = tailwindColors;
55
68
  exports.tailwindColorsAccent = tailwindColorsAccent;
69
+ exports.tailwindColorsCurrent = tailwindColorsCurrent;
56
70
  exports.tailwindColorsRgba = tailwindColorsRgba;
57
71
  exports.tailwindVariables = tailwindVariables;
@@ -31,14 +31,27 @@ const tailwindColorsAccent = (colors = []) => {
31
31
  const result = {}
32
32
 
33
33
  colors.forEach(color => {
34
- result[`.accent-color-${color}`] = {
35
- '--color-accent': `var(--color-${color})`
34
+ result[`.accent-${color}`] = {
35
+ '--color-accent': `var(--color-${color})`,
36
+ 'accent-color': 'rgb(var(--color-accent))'
36
37
  }
37
38
  })
38
39
 
39
40
  return result
40
41
  }
41
42
 
43
+ const tailwindColorsCurrent = (colors = []) => {
44
+ const result = {};
45
+
46
+ colors.forEach(color => {
47
+ result[`.text-${color}`] = {
48
+ '--color-current': `var(--color-${color})`
49
+ };
50
+ });
51
+
52
+ return result
53
+ };
54
+
42
55
  const tailwindVariables = (type, variables = [], values = {}) => {
43
56
  variables.forEach(name => {
44
57
  values[name] = `var(--${type}-${name})`
@@ -47,4 +60,4 @@ const tailwindVariables = (type, variables = [], values = {}) => {
47
60
  return values
48
61
  }
49
62
 
50
- export { tailwindColors, tailwindVariables, tailwindColorsRgba, tailwindColorsAccent }
63
+ export { tailwindColors, tailwindVariables, tailwindColorsRgba, tailwindColorsAccent, tailwindColorsCurrent }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newlogic-digital/core",
3
3
  "type": "module",
4
- "version": "0.9.3",
4
+ "version": "0.9.4",
5
5
  "main": "index.js",
6
6
  "author": "New Logic Studio s.r.o.",
7
7
  "description": "Set of tools that can be used to create modern web applications",