@stevederico/skateboard-ui 1.0.9 → 1.1.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
  # CHANGELOG
2
+ 1.1.0
3
+
4
+ Remove Vite build utilities
5
+ Fix TailwindCSS v4 compatibility
6
+ Make pure component library
7
+ Move build config to app
8
+
2
9
  1.0.9
3
10
 
4
11
  Add cookie exclusions
package/Utilities.js CHANGED
@@ -563,279 +563,4 @@ export function useForm(initialValues, onSubmit) {
563
563
  return { values, handleChange, handleSubmit, reset, submitting, error };
564
564
  }
565
565
 
566
- // ===== VITE BUILD CONFIG UTILITIES =====
567
-
568
- /**
569
- * Custom logger plugin for Vite
570
- */
571
- export const customLoggerPlugin = () => {
572
- return {
573
- name: 'custom-logger',
574
- configureServer(server) {
575
- server.printUrls = () => {
576
- console.log(`🖥️ React is running on http://localhost:${server.config.server.port || 5173}`);
577
- };
578
- }
579
- };
580
- };
581
-
582
- /**
583
- * HTML replacement plugin
584
- * Replaces {{APP_NAME}}, {{TAGLINE}}, {{COMPANY_WEBSITE}} in index.html
585
- */
586
- export const htmlReplacePlugin = () => {
587
- return {
588
- name: 'html-replace',
589
- async transformIndexHtml(html) {
590
- const { readFileSync } = await import('node:fs');
591
- const constants = JSON.parse(readFileSync('src/constants.json', 'utf8'));
592
-
593
- return html
594
- .replace(/{{APP_NAME}}/g, constants.appName)
595
- .replace(/{{TAGLINE}}/g, constants.tagline)
596
- .replace(/{{COMPANY_WEBSITE}}/g, constants.companyWebsite);
597
- }
598
- };
599
- };
600
-
601
- /**
602
- * Dynamic robots.txt plugin
603
- */
604
- export const dynamicRobotsPlugin = () => {
605
- return {
606
- name: 'dynamic-robots',
607
- async generateBundle() {
608
- const { readFileSync } = await import('node:fs');
609
- const constants = JSON.parse(readFileSync('src/constants.json', 'utf8'));
610
- const website = constants.companyWebsite.startsWith('http')
611
- ? constants.companyWebsite
612
- : `https://${constants.companyWebsite}`;
613
-
614
- const robotsContent = `User-agent: Googlebot
615
- Disallow: /app/
616
- Disallow: /console/
617
- Disallow: /signin/
618
- Disallow: /signup/
619
-
620
- User-agent: Bingbot
621
- Disallow: /app/
622
- Disallow: /console/
623
- Disallow: /signin/
624
- Disallow: /signup/
625
-
626
- User-agent: Applebot
627
- Disallow: /app/
628
- Disallow: /console/
629
- Disallow: /signin/
630
- Disallow: /signup/
631
-
632
- User-agent: facebookexternalhit
633
- Disallow: /app/
634
- Disallow: /console/
635
- Disallow: /signin/
636
- Disallow: /signup/
637
-
638
- User-agent: Facebot
639
- Disallow: /app/
640
- Disallow: /console/
641
- Disallow: /signin/
642
- Disallow: /signup/
643
-
644
- User-agent: Twitterbot
645
- Disallow: /app/
646
- Disallow: /console/
647
- Disallow: /signin/
648
- Disallow: /signup/
649
-
650
- User-agent: *
651
- Disallow: /
652
-
653
- Sitemap: ${website}/sitemap.xml
654
- `;
655
-
656
- this.emitFile({
657
- type: 'asset',
658
- fileName: 'robots.txt',
659
- source: robotsContent
660
- });
661
- }
662
- };
663
- };
664
-
665
- /**
666
- * Dynamic sitemap.xml plugin
667
- */
668
- export const dynamicSitemapPlugin = () => {
669
- return {
670
- name: 'dynamic-sitemap',
671
- async generateBundle() {
672
- const { readFileSync } = await import('node:fs');
673
- const constants = JSON.parse(readFileSync('src/constants.json', 'utf8'));
674
- const website = constants.companyWebsite.startsWith('http')
675
- ? constants.companyWebsite
676
- : `https://${constants.companyWebsite}`;
677
-
678
- const currentDate = new Date().toISOString().split('T')[0];
679
-
680
- const sitemapContent = `<?xml version="1.0" encoding="UTF-8"?>
681
- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
682
- <url>
683
- <loc>${website}/</loc>
684
- <lastmod>${currentDate}</lastmod>
685
- <changefreq>weekly</changefreq>
686
- <priority>1.0</priority>
687
- </url>
688
- <url>
689
- <loc>${website}/terms</loc>
690
- <lastmod>${currentDate}</lastmod>
691
- <changefreq>monthly</changefreq>
692
- <priority>0.8</priority>
693
- </url>
694
- <url>
695
- <loc>${website}/privacy</loc>
696
- <lastmod>${currentDate}</lastmod>
697
- <changefreq>monthly</changefreq>
698
- <priority>0.8</priority>
699
- </url>
700
- <url>
701
- <loc>${website}/subs</loc>
702
- <lastmod>${currentDate}</lastmod>
703
- <changefreq>monthly</changefreq>
704
- <priority>0.7</priority>
705
- </url>
706
- <url>
707
- <loc>${website}/eula</loc>
708
- <lastmod>${currentDate}</lastmod>
709
- <changefreq>monthly</changefreq>
710
- <priority>0.7</priority>
711
- </url>
712
- </urlset>`;
713
-
714
- this.emitFile({
715
- type: 'asset',
716
- fileName: 'sitemap.xml',
717
- source: sitemapContent
718
- });
719
- }
720
- };
721
- };
722
-
723
- /**
724
- * Dynamic manifest.json plugin
725
- */
726
- export const dynamicManifestPlugin = () => {
727
- return {
728
- name: 'dynamic-manifest',
729
- async generateBundle() {
730
- const { readFileSync } = await import('node:fs');
731
- const constants = JSON.parse(readFileSync('src/constants.json', 'utf8'));
732
-
733
- const manifestContent = {
734
- short_name: constants.appName,
735
- name: constants.appName,
736
- description: constants.tagline,
737
- icons: [
738
- {
739
- src: "/icons/icon.svg",
740
- sizes: "192x192",
741
- type: "image/svg+xml"
742
- }
743
- ],
744
- start_url: "./app",
745
- display: "standalone",
746
- theme_color: "#000000",
747
- background_color: "#ffffff"
748
- };
749
-
750
- this.emitFile({
751
- type: 'asset',
752
- fileName: 'manifest.json',
753
- source: JSON.stringify(manifestContent, null, 2)
754
- });
755
- }
756
- };
757
- };
758
-
759
- /**
760
- * Complete Vite config generator
761
- * Returns standard skateboard config with optional overrides
762
- */
763
- export async function getSkateboardViteConfig(customConfig = {}) {
764
- const [react, tailwindcss, { resolve }, path] = await Promise.all([
765
- import('@vitejs/plugin-react-swc').then(m => m.default),
766
- import('@tailwindcss/vite').then(m => m.default),
767
- import('node:path'),
768
- import('node:path')
769
- ]);
770
-
771
- return {
772
- plugins: [
773
- react(),
774
- tailwindcss(),
775
- customLoggerPlugin(),
776
- htmlReplacePlugin(),
777
- dynamicRobotsPlugin(),
778
- dynamicSitemapPlugin(),
779
- dynamicManifestPlugin(),
780
- ...(customConfig.plugins || [])
781
- ],
782
- esbuild: {
783
- drop: []
784
- },
785
- resolve: {
786
- alias: {
787
- '@': resolve(process.cwd(), './src'),
788
- '@package': path.resolve(process.cwd(), 'package.json'),
789
- '@root': path.resolve(process.cwd()),
790
- 'react/jsx-runtime': path.resolve(process.cwd(), 'node_modules/react/jsx-runtime.js'),
791
- ...(customConfig.resolve?.alias || {})
792
- }
793
- },
794
- optimizeDeps: {
795
- include: [
796
- 'react',
797
- 'react-dom',
798
- 'react-dom/client',
799
- '@radix-ui/react-slot',
800
- ...(customConfig.optimizeDeps?.include || [])
801
- ],
802
- exclude: [
803
- '@swc/core',
804
- '@swc/core-darwin-arm64',
805
- '@swc/wasm',
806
- '@tailwindcss/oxide',
807
- '@tailwindcss/oxide-darwin-arm64',
808
- 'lightningcss',
809
- 'fsevents',
810
- 'cookie',
811
- 'set-cookie-parser',
812
- ...(customConfig.optimizeDeps?.exclude || [])
813
- ],
814
- esbuildOptions: {
815
- target: 'esnext',
816
- define: {
817
- global: 'globalThis'
818
- },
819
- ...(customConfig.optimizeDeps?.esbuildOptions || {})
820
- }
821
- },
822
- server: {
823
- host: 'localhost',
824
- open: false,
825
- port: 5173,
826
- strictPort: false,
827
- hmr: {
828
- port: 5173,
829
- overlay: false,
830
- },
831
- watch: {
832
- usePolling: false,
833
- ignored: ['**/node_modules/**', '**/.git/**']
834
- },
835
- ...(customConfig.server || {})
836
- },
837
- logLevel: 'error',
838
- ...customConfig
839
- };
840
- }
841
566
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stevederico/skateboard-ui",
3
3
  "private": false,
4
- "version": "1.0.9",
4
+ "version": "1.1.1",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./AppSidebar": {