lapikit 0.0.0-insiders.b20a552 → 0.0.0-insiders.b220311

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.
@@ -47,6 +47,21 @@ export async function css(configuration) {
47
47
  css += '}\n';
48
48
  response += css;
49
49
  }
50
+ //styles
51
+ response += `:root {\n`;
52
+ for (const [name, values] of Object.entries(deepMerge(preset.styles, configuration?.styles || {}))) {
53
+ let css = '';
54
+ if (values && typeof values === 'object') {
55
+ for (const [styleName, styleValue] of Object.entries(values || {})) {
56
+ css += ` --prism-${name}-${styleName}: ${parser(styleValue)};\n`;
57
+ }
58
+ }
59
+ else {
60
+ css += ` --prism-${name}: ${parser(values)};\n`;
61
+ }
62
+ response += css;
63
+ }
64
+ response += '}\n';
50
65
  fsPromises.writeFile(path.resolve(__dirname, '../colors.css'), response);
51
66
  }
52
67
  const parser = (value) => {
@@ -93,4 +93,16 @@ export declare const preset: {
93
93
  };
94
94
  };
95
95
  };
96
+ styles: {
97
+ spacing: string;
98
+ shape: {
99
+ sm: string;
100
+ md: string;
101
+ lg: string;
102
+ xl: string;
103
+ '2xl': string;
104
+ '3xl': string;
105
+ full: string;
106
+ };
107
+ };
96
108
  };
@@ -110,5 +110,17 @@ export const preset = {
110
110
  serif: ['Merriweather', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif']
111
111
  }
112
112
  }
113
+ },
114
+ styles: {
115
+ spacing: '0.125rem', // 2px
116
+ shape: {
117
+ sm: '0.125rem', // 2px
118
+ md: '0.25rem', // 4px
119
+ lg: '0.5rem', // 8px
120
+ xl: '0.75rem', // 12px
121
+ '2xl': '1rem', // 16px
122
+ '3xl': '1.5rem', // 24px
123
+ full: '9999px' // 9999px
124
+ }
113
125
  }
114
126
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lapikit",
3
- "version": "0.0.0-insiders.b20a552",
3
+ "version": "0.0.0-insiders.b220311",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"