@seip/blue-bird 0.4.5 → 0.4.6

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/.env_example +26 -25
  2. package/AGENTS.md +199 -199
  3. package/README.md +79 -79
  4. package/backend/index.js +13 -13
  5. package/backend/routes/frontend.js +41 -41
  6. package/backend/routes/seo.js +39 -39
  7. package/core/app.js +328 -325
  8. package/core/auth.js +114 -114
  9. package/core/cache.js +44 -44
  10. package/core/cli/component.js +42 -42
  11. package/core/cli/init.js +119 -118
  12. package/core/cli/react.js +435 -435
  13. package/core/cli/route.js +42 -42
  14. package/core/config.js +48 -47
  15. package/core/debug.js +248 -248
  16. package/core/logger.js +100 -100
  17. package/core/middleware.js +27 -27
  18. package/core/router.js +333 -333
  19. package/core/seo.js +95 -100
  20. package/core/template.js +472 -462
  21. package/core/upload.js +76 -76
  22. package/core/validate.js +380 -380
  23. package/frontend/index.html +26 -26
  24. package/frontend/landing.html +69 -69
  25. package/frontend/resources/css/tailwind.css +17 -17
  26. package/frontend/resources/js/App.jsx +70 -70
  27. package/frontend/resources/js/Main.jsx +18 -18
  28. package/frontend/resources/js/blue-bird/components/Button.jsx +67 -67
  29. package/frontend/resources/js/blue-bird/components/Card.jsx +18 -18
  30. package/frontend/resources/js/blue-bird/components/DataTable.jsx +126 -126
  31. package/frontend/resources/js/blue-bird/components/Input.jsx +21 -21
  32. package/frontend/resources/js/blue-bird/components/Label.jsx +12 -12
  33. package/frontend/resources/js/blue-bird/components/LanguageButton.jsx +23 -23
  34. package/frontend/resources/js/blue-bird/components/Link.jsx +15 -15
  35. package/frontend/resources/js/blue-bird/components/Modal.jsx +27 -27
  36. package/frontend/resources/js/blue-bird/components/Skeleton.jsx +44 -44
  37. package/frontend/resources/js/blue-bird/components/Translate.jsx +12 -12
  38. package/frontend/resources/js/blue-bird/components/Typography.jsx +69 -69
  39. package/frontend/resources/js/blue-bird/contexts/LanguageContext.jsx +41 -41
  40. package/frontend/resources/js/blue-bird/contexts/SPAContext.jsx +239 -237
  41. package/frontend/resources/js/blue-bird/contexts/SnackbarContext.jsx +38 -38
  42. package/frontend/resources/js/blue-bird/contexts/ThemeContext.jsx +49 -49
  43. package/frontend/resources/js/blue-bird/locales/en.json +47 -47
  44. package/frontend/resources/js/blue-bird/locales/es.json +47 -47
  45. package/frontend/resources/js/components/Header.jsx +55 -55
  46. package/frontend/resources/js/pages/About.jsx +31 -31
  47. package/frontend/resources/js/pages/Home.jsx +82 -82
  48. package/package.json +57 -57
  49. package/vite.config.js +22 -22
  50. package/frontend/public/robots.txt +0 -0
  51. package/frontend/public/sitemap.xml +0 -0
@@ -1,69 +1,69 @@
1
- import React from 'react';
2
-
3
- export default function Typography({ variant = 'p', children, className = '', gradient = false, ...props }) {
4
- const variants = {
5
- h1: "scroll-m-20 font-extrabold tracking-tight",
6
- h2: "scroll-m-20 border-b pb-2 font-semibold tracking-tight first:mt-0",
7
- h3: "scroll-m-20 font-semibold tracking-tight",
8
- h4: "scroll-m-20 font-semibold tracking-tight",
9
- p: "leading-7 [&:not(:first-child)]:mt-6",
10
- blockquote: "mt-6 border-l-2 pl-6 italic",
11
- lead: "text-xl text-slate-700 dark:text-slate-300",
12
- large: "text-lg font-semibold",
13
- small: "text-sm font-medium leading-none",
14
- muted: "text-sm text-slate-500 dark:text-slate-400",
15
- };
16
-
17
- const fromColors = {
18
- blue: 'from-blue-500',
19
- sky: 'from-sky-500',
20
- indigo: 'from-indigo-500',
21
- violet: 'from-violet-500',
22
- purple: 'from-purple-500',
23
- fuchsia: 'from-fuchsia-500',
24
- pink: 'from-pink-500',
25
- rose: 'from-rose-500',
26
- red: 'from-red-500',
27
- orange: 'from-orange-500',
28
- amber: 'from-amber-500',
29
- yellow: 'from-yellow-500',
30
- lime: 'from-lime-500',
31
- green: 'from-green-500',
32
- emerald: 'from-emerald-500',
33
- teal: 'from-teal-500',
34
- cyan: 'from-cyan-500',
35
- };
36
-
37
- const toColors = {
38
- blue: 'to-blue-600',
39
- sky: 'to-sky-600',
40
- indigo: 'to-indigo-600',
41
- violet: 'to-violet-600',
42
- purple: 'to-purple-600',
43
- fuchsia: 'to-fuchsia-600',
44
- pink: 'to-pink-600',
45
- rose: 'to-rose-600',
46
- red: 'to-red-600',
47
- orange: 'to-orange-600',
48
- amber: 'to-amber-600',
49
- yellow: 'to-yellow-600',
50
- lime: 'to-lime-600',
51
- green: 'to-green-600',
52
- emerald: 'to-emerald-600',
53
- teal: 'to-teal-600',
54
- cyan: 'to-cyan-600',
55
- };
56
-
57
- const fromClass = gradient ? (fromColors[gradient.from] || `from-${gradient.from}-400`) : '';
58
- const toClass = gradient ? (toColors[gradient.to] || `to-${gradient.to}-600`) : '';
59
- const gradientText = gradient ? `bg-gradient-to-r ${fromClass} ${toClass} bg-clip-text text-transparent` : '';
60
-
61
- const Component = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p'].includes(variant) ? variant : 'p';
62
- const style = `${variants[variant]} ${className} ${gradientText}`;
63
-
64
- return (
65
- <Component className={style} {...props}>
66
- {children}
67
- </Component>
68
- );
69
- }
1
+ import React from 'react';
2
+
3
+ export default function Typography({ variant = 'p', children, className = '', gradient = false, ...props }) {
4
+ const variants = {
5
+ h1: "scroll-m-20 font-extrabold tracking-tight",
6
+ h2: "scroll-m-20 border-b pb-2 font-semibold tracking-tight first:mt-0",
7
+ h3: "scroll-m-20 font-semibold tracking-tight",
8
+ h4: "scroll-m-20 font-semibold tracking-tight",
9
+ p: "leading-7 [&:not(:first-child)]:mt-6",
10
+ blockquote: "mt-6 border-l-2 pl-6 italic",
11
+ lead: "text-xl text-slate-700 dark:text-slate-300",
12
+ large: "text-lg font-semibold",
13
+ small: "text-sm font-medium leading-none",
14
+ muted: "text-sm text-slate-500 dark:text-slate-400",
15
+ };
16
+
17
+ const fromColors = {
18
+ blue: 'from-blue-500',
19
+ sky: 'from-sky-500',
20
+ indigo: 'from-indigo-500',
21
+ violet: 'from-violet-500',
22
+ purple: 'from-purple-500',
23
+ fuchsia: 'from-fuchsia-500',
24
+ pink: 'from-pink-500',
25
+ rose: 'from-rose-500',
26
+ red: 'from-red-500',
27
+ orange: 'from-orange-500',
28
+ amber: 'from-amber-500',
29
+ yellow: 'from-yellow-500',
30
+ lime: 'from-lime-500',
31
+ green: 'from-green-500',
32
+ emerald: 'from-emerald-500',
33
+ teal: 'from-teal-500',
34
+ cyan: 'from-cyan-500',
35
+ };
36
+
37
+ const toColors = {
38
+ blue: 'to-blue-600',
39
+ sky: 'to-sky-600',
40
+ indigo: 'to-indigo-600',
41
+ violet: 'to-violet-600',
42
+ purple: 'to-purple-600',
43
+ fuchsia: 'to-fuchsia-600',
44
+ pink: 'to-pink-600',
45
+ rose: 'to-rose-600',
46
+ red: 'to-red-600',
47
+ orange: 'to-orange-600',
48
+ amber: 'to-amber-600',
49
+ yellow: 'to-yellow-600',
50
+ lime: 'to-lime-600',
51
+ green: 'to-green-600',
52
+ emerald: 'to-emerald-600',
53
+ teal: 'to-teal-600',
54
+ cyan: 'to-cyan-600',
55
+ };
56
+
57
+ const fromClass = gradient ? (fromColors[gradient.from] || `from-${gradient.from}-400`) : '';
58
+ const toClass = gradient ? (toColors[gradient.to] || `to-${gradient.to}-600`) : '';
59
+ const gradientText = gradient ? `bg-gradient-to-r ${fromClass} ${toClass} bg-clip-text text-transparent` : '';
60
+
61
+ const Component = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p'].includes(variant) ? variant : 'p';
62
+ const style = `${variants[variant]} ${className} ${gradientText}`;
63
+
64
+ return (
65
+ <Component className={style} {...props}>
66
+ {children}
67
+ </Component>
68
+ );
69
+ }
@@ -1,41 +1,41 @@
1
- import React, { createContext, useState, useEffect, useContext } from 'react';
2
- import en from '../locales/en.json';
3
- import es from '../locales/es.json';
4
-
5
- const translations = { en, es };
6
- export const LanguageContext = createContext();
7
-
8
- export const LanguageProvider = ({ children, initialLang }) => {
9
-
10
- const [lang, setLang] = useState(() => localStorage.getItem('blue_bird_lang') || initialLang || 'en');
11
-
12
- useEffect(() => {
13
- localStorage.setItem('blue_bird_lang', lang);
14
- }, [lang]);
15
-
16
- /**
17
- * Translate key into configured language text
18
- * @param {string} key - the string config key
19
- * @returns {string} The translated text
20
- */
21
- const t = (key) => {
22
- const keys = key.split('.');
23
- let value = translations[lang];
24
- for (const k of keys) {
25
- if (value && typeof value === 'object' && value !== null && k in value) {
26
- value = value[k];
27
- } else {
28
- return key;
29
- }
30
- }
31
- return value !== undefined ? value : key;
32
- };
33
-
34
- return (
35
- <LanguageContext.Provider value={{ lang, setLang, t }}>
36
- {children}
37
- </LanguageContext.Provider>
38
- );
39
- };
40
-
41
- export const useLanguage = () => useContext(LanguageContext);
1
+ import React, { createContext, useState, useEffect, useContext } from 'react';
2
+ import en from '../locales/en.json';
3
+ import es from '../locales/es.json';
4
+
5
+ const translations = { en, es };
6
+ export const LanguageContext = createContext();
7
+
8
+ export const LanguageProvider = ({ children, initialLang }) => {
9
+
10
+ const [lang, setLang] = useState(() => localStorage.getItem('blue_bird_lang') || initialLang || 'en');
11
+
12
+ useEffect(() => {
13
+ localStorage.setItem('blue_bird_lang', lang);
14
+ }, [lang]);
15
+
16
+ /**
17
+ * Translate key into configured language text
18
+ * @param {string} key - the string config key
19
+ * @returns {string} The translated text
20
+ */
21
+ const t = (key) => {
22
+ const keys = key.split('.');
23
+ let value = translations[lang];
24
+ for (const k of keys) {
25
+ if (value && typeof value === 'object' && value !== null && k in value) {
26
+ value = value[k];
27
+ } else {
28
+ return key;
29
+ }
30
+ }
31
+ return value !== undefined ? value : key;
32
+ };
33
+
34
+ return (
35
+ <LanguageContext.Provider value={{ lang, setLang, t }}>
36
+ {children}
37
+ </LanguageContext.Provider>
38
+ );
39
+ };
40
+
41
+ export const useLanguage = () => useContext(LanguageContext);