juxscript 1.0.4 → 1.0.5

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/lib/jux.ts CHANGED
@@ -49,6 +49,7 @@ import { fileupload, FileUpload, type FileUploadOptions } from './components/fil
49
49
  import { req, Req, type RequestInfo } from './components/req.js';
50
50
  import { heading, Heading, type HeadingOptions } from './components/heading.js';
51
51
  import { paragraph, Paragraph, type ParagraphOptions } from './components/paragraph.js';
52
+ import { barchart, BarChart, type BarChartOptions, type BarChartDataPoint } from './components/barchart.js';
52
53
 
53
54
 
54
55
  /* -------------------------
@@ -103,7 +104,9 @@ export type {
103
104
  FileUploadOptions,
104
105
  RequestInfo,
105
106
  HeadingOptions,
106
- ParagraphOptions
107
+ ParagraphOptions,
108
+ BarChartOptions,
109
+ BarChartDataPoint
107
110
  };
108
111
 
109
112
  /* -------------------------
@@ -154,7 +157,8 @@ export {
154
157
  FileUpload,
155
158
  Req,
156
159
  Heading,
157
- Paragraph
160
+ Paragraph,
161
+ BarChart
158
162
  };
159
163
 
160
164
  /* -------------------------
@@ -211,6 +215,7 @@ export interface JuxAPI {
211
215
  fileupload: typeof fileupload;
212
216
  heading: typeof heading;
213
217
  paragraph: typeof paragraph;
218
+ barchart: typeof barchart;
214
219
  }
215
220
 
216
221
  /* -------------------------
@@ -283,6 +288,7 @@ class Jux implements JuxAPI {
283
288
  fileupload = fileupload;
284
289
  heading = heading;
285
290
  paragraph = paragraph;
291
+ barchart = barchart;
286
292
  }
287
293
 
288
294
  /**
@@ -138,7 +138,7 @@ body {
138
138
  "header header"
139
139
  "sidebar main"
140
140
  "footer footer";
141
- grid-template-columns: 250px 1fr;
141
+ grid-template-columns: 350px 1fr;
142
142
  grid-template-rows: auto 1fr auto;
143
143
  min-height: 100vh;
144
144
  }
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Chart themes for Jux
3
+ * Each theme defines colors and optional font customization
4
+ */
5
+
6
+ export const googleTheme = {
7
+ name: 'Google',
8
+ colors: [
9
+ '#4285F4', // Google Blue
10
+ '#EA4335', // Google Red
11
+ '#FBBC04', // Google Yellow
12
+ '#34A853', // Google Green
13
+ '#FF6D01', // Orange
14
+ '#46BDC6', // Cyan
15
+ ],
16
+ variables: {
17
+ '--chart-font-family': "'Roboto', sans-serif",
18
+ },
19
+ font: 'https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap'
20
+ };
21
+
22
+ export const seriesaTheme = {
23
+ name: 'Series A',
24
+ colors: [
25
+ '#667eea', // Purple
26
+ '#764ba2', // Dark Purple
27
+ '#f093fb', // Pink
28
+ '#4facfe', // Blue
29
+ '#00f2fe', // Cyan
30
+ '#43e97b', // Green
31
+ ],
32
+ variables: {
33
+ '--chart-font-family': "'Inter', sans-serif",
34
+ },
35
+ font: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'
36
+ };
37
+
38
+ export const hrTheme = {
39
+ name: 'HR',
40
+ colors: [
41
+ '#FF6B6B', // Coral Red
42
+ '#4ECDC4', // Turquoise
43
+ '#45B7D1', // Sky Blue
44
+ '#FFA07A', // Light Salmon
45
+ '#98D8C8', // Mint
46
+ '#F7DC6F', // Pale Yellow
47
+ ],
48
+ variables: {
49
+ '--chart-font-family': "'Work Sans', sans-serif",
50
+ },
51
+ font: 'https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600&display=swap'
52
+ };
53
+
54
+ export const figmaTheme = {
55
+ name: 'Figma',
56
+ colors: [
57
+ '#0ACF83', // Figma Green
58
+ '#FF7262', // Figma Red/Orange
59
+ '#1ABCFE', // Figma Blue
60
+ '#A259FF', // Figma Purple
61
+ '#F24E1E', // Figma Orange
62
+ '#FFC700', // Figma Yellow
63
+ ],
64
+ variables: {
65
+ '--chart-font-family': "'Inter', sans-serif",
66
+ },
67
+ font: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'
68
+ };
69
+
70
+ export const notionTheme = {
71
+ name: 'Notion',
72
+ colors: [
73
+ '#2EAADC', // Notion Blue
74
+ '#9B59B6', // Purple
75
+ '#E67E22', // Orange
76
+ '#E74C3C', // Red
77
+ '#F39C12', // Yellow
78
+ '#16A085', // Teal
79
+ ],
80
+ variables: {
81
+ '--chart-font-family': "'Inter', sans-serif",
82
+ },
83
+ font: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'
84
+ };
85
+
86
+ export const chalkTheme = {
87
+ name: 'Chalk',
88
+ colors: [
89
+ '#96CEB4', // Soft Green
90
+ '#FFEAA7', // Soft Yellow
91
+ '#DFE6E9', // Light Gray
92
+ '#74B9FF', // Soft Blue
93
+ '#FD79A8', // Soft Pink
94
+ '#A29BFE', // Soft Purple
95
+ ],
96
+ variables: {
97
+ '--chart-font-family': "'Courier New', monospace",
98
+ }
99
+ };
100
+
101
+ export const mintTheme = {
102
+ name: 'Mint',
103
+ colors: [
104
+ '#26de81', // Mint Green
105
+ '#20bf6b', // Green
106
+ '#0fb9b1', // Teal
107
+ '#2bcbba', // Light Teal
108
+ '#45aaf2', // Blue
109
+ '#4b7bec', // Dark Blue
110
+ ],
111
+ variables: {
112
+ '--chart-font-family': "'Poppins', sans-serif",
113
+ },
114
+ font: 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap'
115
+ };
116
+
117
+ // Export all themes as a collection for easy iteration
118
+ export const chartThemes = {
119
+ google: googleTheme,
120
+ seriesa: seriesaTheme,
121
+ hr: hrTheme,
122
+ figma: figmaTheme,
123
+ notion: notionTheme,
124
+ chalk: chalkTheme,
125
+ mint: mintTheme
126
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juxscript",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "description": "A JavaScript UX authorship platform",
6
6
  "main": "lib/jux.js",