@frontfriend/tailwind 3.0.4 → 4.0.1

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.
Files changed (51) hide show
  1. package/README.md +94 -1
  2. package/dist/browser.mjs +2 -0
  3. package/dist/browser.mjs.map +7 -0
  4. package/dist/cli.js +47 -41
  5. package/dist/components-config-schema.d.ts +2 -0
  6. package/dist/components-config-schema.js +2 -0
  7. package/dist/components-config-schema.js.map +7 -0
  8. package/dist/ffdc.d.ts +3 -1
  9. package/dist/ffdc.js +1 -1
  10. package/dist/ffdc.js.map +4 -4
  11. package/dist/index.js +3 -3
  12. package/dist/index.js.map +4 -4
  13. package/dist/index.mjs +1 -1
  14. package/dist/index.mjs.map +3 -3
  15. package/dist/lib/core/api-client.js +2 -1
  16. package/dist/lib/core/api-client.js.map +4 -4
  17. package/dist/lib/core/cache-manager.js +11 -2
  18. package/dist/lib/core/component-downloader.js +3 -2
  19. package/dist/lib/core/component-downloader.js.map +4 -4
  20. package/dist/lib/core/components-config-schema.js +2 -0
  21. package/dist/lib/core/components-config-schema.js.map +7 -0
  22. package/dist/lib/core/constants.js +1 -1
  23. package/dist/lib/core/constants.js.map +2 -2
  24. package/dist/lib/core/credentials.js +3 -0
  25. package/dist/lib/core/credentials.js.map +7 -0
  26. package/dist/lib/core/default-config-data.js +2 -0
  27. package/dist/lib/core/default-config-data.js.map +7 -0
  28. package/dist/lib/core/default-config.js +2 -0
  29. package/dist/lib/core/default-config.js.map +7 -0
  30. package/dist/lib/core/env-utils.js +1 -1
  31. package/dist/lib/core/env-utils.js.map +3 -3
  32. package/dist/lib/core/file-utils.js +1 -1
  33. package/dist/lib/core/file-utils.js.map +3 -3
  34. package/dist/lib/core/local-token-reader.js +1 -1
  35. package/dist/lib/core/local-token-reader.js.map +3 -3
  36. package/dist/lib/core/path-utils.js +1 -1
  37. package/dist/lib/core/path-utils.js.map +3 -3
  38. package/dist/lib/core/token-processor.js +3 -1
  39. package/dist/lib/core/token-processor.js.map +3 -3
  40. package/dist/next.js +1 -1
  41. package/dist/next.js.map +4 -4
  42. package/dist/types/index.d.ts +107 -11
  43. package/dist/vite.js +13 -8
  44. package/dist/vite.js.map +4 -4
  45. package/dist/vite.mjs +6 -1
  46. package/dist/vite.mjs.map +3 -3
  47. package/package.json +15 -5
  48. package/scripts/build.js +21 -4
  49. package/scripts/master-components-config.json +953 -0
  50. package/scripts/update-default-config-data.js +690 -0
  51. package/src/theme.css +9 -0
package/scripts/build.js CHANGED
@@ -2,6 +2,9 @@ const esbuild = require('esbuild');
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
4
  const { glob } = require('glob');
5
+ const { writeDefaultConfigData } = require('./update-default-config-data');
6
+
7
+ writeDefaultConfigData();
5
8
 
6
9
  // Clean dist directory
7
10
  const distDir = path.join(__dirname, '..', 'dist');
@@ -72,7 +75,14 @@ export default function frontfriend(): Plugin;`
72
75
  * @param config - Design configuration object
73
76
  * @returns Processed configuration
74
77
  */
75
- export function ffdc(config: Record<string, any> | null | undefined): Record<string, any>;`
78
+ export function ffdc(config: Record<string, any> | null | undefined): Record<string, any>;
79
+ export const componentsConfigSchema: Record<string, any>;
80
+ export function isCSSClassString(value: string): boolean;`
81
+ },
82
+ {
83
+ path: 'components-config-schema.d.ts',
84
+ content: `export const componentsConfigSchema: Record<string, any>;
85
+ export function isCSSClassString(value: string): boolean;`
76
86
  },
77
87
  {
78
88
  path: 'lib/react/utils.d.ts',
@@ -149,11 +159,15 @@ const filesToBundle = [
149
159
  { input: 'lib/core/token-processor.js', output: 'lib/core/token-processor.js' },
150
160
  { input: 'lib/core/errors.js', output: 'lib/core/errors.js' },
151
161
  { input: 'lib/core/constants.js', output: 'lib/core/constants.js' },
162
+ { input: 'lib/core/credentials.js', output: 'lib/core/credentials.js' },
152
163
  { input: 'lib/core/component-downloader.js', output: 'lib/core/component-downloader.js' },
153
164
  { input: 'lib/core/local-token-reader.js', output: 'lib/core/local-token-reader.js' },
154
165
  { input: 'lib/core/file-utils.js', output: 'lib/core/file-utils.js' },
155
166
  { input: 'lib/core/path-utils.js', output: 'lib/core/path-utils.js' },
156
167
  { input: 'lib/core/env-utils.js', output: 'lib/core/env-utils.js' },
168
+ { input: 'lib/core/components-config-schema.js', output: 'lib/core/components-config-schema.js' },
169
+ { input: 'lib/core/default-config-data.js', output: 'lib/core/default-config-data.js' },
170
+ { input: 'lib/core/default-config.js', output: 'lib/core/default-config.js' },
157
171
 
158
172
  // React/Vue utilities
159
173
  { input: 'lib/react/utils.mjs', output: 'lib/react/utils.mjs', format: 'esm' },
@@ -161,11 +175,13 @@ const filesToBundle = [
161
175
 
162
176
  // Main files
163
177
  { input: 'ffdc.js', output: 'ffdc.js' },
178
+ { input: 'lib/core/components-config-schema.js', output: 'components-config-schema.js' },
164
179
  { input: 'runtime.js', output: 'runtime.js' },
165
180
  // CLI will be handled separately to preserve shebang
166
181
  { input: 'next.js', output: 'next.js' },
167
182
  { input: 'vite.js', output: 'vite.js' },
168
183
  { input: 'vite.mjs', output: 'vite.mjs', format: 'esm' },
184
+ { input: 'browser.mjs', output: 'browser.mjs', format: 'esm', platform: 'browser' },
169
185
  ];
170
186
 
171
187
  // Files to copy without bundling (dynamic loaders)
@@ -190,7 +206,7 @@ async function build() {
190
206
  minify: true,
191
207
  sourcemap: true,
192
208
  format: file.format || 'cjs',
193
- platform: 'node',
209
+ platform: file.platform || 'node',
194
210
  target: 'node14',
195
211
  outfile: path.join(distDir, file.output),
196
212
  external: [
@@ -268,7 +284,8 @@ async function build() {
268
284
  './lib/core/errors',
269
285
  './lib/core/env-utils',
270
286
  './lib/core/file-utils',
271
- './lib/core/path-utils'
287
+ './lib/core/path-utils',
288
+ './lib/core/default-config'
272
289
  ],
273
290
  });
274
291
 
@@ -355,4 +372,4 @@ async function build() {
355
372
  build().catch(error => {
356
373
  console.error('Build failed:', error);
357
374
  process.exit(1);
358
- });
375
+ });