juxscript 1.0.0
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/README.md +292 -0
- package/bin/cli.js +149 -0
- package/lib/adapters/base-adapter.js +35 -0
- package/lib/adapters/index.js +33 -0
- package/lib/adapters/mysql-adapter.js +65 -0
- package/lib/adapters/postgres-adapter.js +70 -0
- package/lib/adapters/sqlite-adapter.js +56 -0
- package/lib/components/app.ts +124 -0
- package/lib/components/button.ts +136 -0
- package/lib/components/card.ts +205 -0
- package/lib/components/chart.ts +125 -0
- package/lib/components/code.ts +242 -0
- package/lib/components/container.ts +282 -0
- package/lib/components/data.ts +105 -0
- package/lib/components/docs-data.json +1211 -0
- package/lib/components/error-handler.ts +285 -0
- package/lib/components/footer.ts +146 -0
- package/lib/components/header.ts +167 -0
- package/lib/components/hero.ts +170 -0
- package/lib/components/import.ts +430 -0
- package/lib/components/input.ts +175 -0
- package/lib/components/layout.ts +113 -0
- package/lib/components/list.ts +392 -0
- package/lib/components/main.ts +111 -0
- package/lib/components/menu.ts +170 -0
- package/lib/components/modal.ts +216 -0
- package/lib/components/nav.ts +136 -0
- package/lib/components/node.ts +200 -0
- package/lib/components/reactivity.js +104 -0
- package/lib/components/script.ts +152 -0
- package/lib/components/sidebar.ts +168 -0
- package/lib/components/style.ts +129 -0
- package/lib/components/table.ts +279 -0
- package/lib/components/tabs.ts +191 -0
- package/lib/components/theme.ts +97 -0
- package/lib/components/view.ts +174 -0
- package/lib/jux.ts +203 -0
- package/lib/layouts/default.css +260 -0
- package/lib/layouts/default.jux +8 -0
- package/lib/layouts/figma.css +334 -0
- package/lib/layouts/figma.jux +0 -0
- package/lib/layouts/notion.css +258 -0
- package/lib/styles/base-theme.css +186 -0
- package/lib/styles/dark-theme.css +144 -0
- package/lib/styles/global.css +1131 -0
- package/lib/styles/light-theme.css +144 -0
- package/lib/styles/tokens/dark.css +86 -0
- package/lib/styles/tokens/light.css +86 -0
- package/lib/themes/dark.css +86 -0
- package/lib/themes/light.css +86 -0
- package/lib/utils/path-resolver.js +23 -0
- package/machinery/compiler.js +262 -0
- package/machinery/doc-generator.js +160 -0
- package/machinery/generators/css.js +128 -0
- package/machinery/generators/html.js +108 -0
- package/machinery/imports.js +155 -0
- package/machinery/server.js +185 -0
- package/machinery/validators/file-validator.js +123 -0
- package/machinery/watcher.js +148 -0
- package/package.json +58 -0
- package/types/globals.d.ts +16 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/* Base Theme Styles ./base-theme.css */
|
|
2
|
+
* {
|
|
3
|
+
margin: 0;
|
|
4
|
+
padding: 0;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
body {
|
|
9
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
10
|
+
line-height: 1.6;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Hero Component */
|
|
14
|
+
.jux-hero {
|
|
15
|
+
text-align: center;
|
|
16
|
+
padding: 4rem 2rem;
|
|
17
|
+
color: white;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.jux-hero-title {
|
|
21
|
+
font-size: 3rem;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
margin-bottom: 1rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.jux-hero-subtitle {
|
|
27
|
+
font-size: 1.5rem;
|
|
28
|
+
margin-bottom: 1rem;
|
|
29
|
+
opacity: 0.9;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.jux-hero-description {
|
|
33
|
+
font-size: 1.1rem;
|
|
34
|
+
opacity: 0.8;
|
|
35
|
+
max-width: 600px;
|
|
36
|
+
margin: 0 auto;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Grid Component */
|
|
40
|
+
.jux-grid {
|
|
41
|
+
display: grid;
|
|
42
|
+
padding: 3rem 2rem;
|
|
43
|
+
max-width: 1200px;
|
|
44
|
+
margin: 0 auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.jux-grid-item {
|
|
48
|
+
padding: 2rem;
|
|
49
|
+
border-radius: 8px;
|
|
50
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
51
|
+
text-align: center;
|
|
52
|
+
transition: transform 0.2s;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.jux-grid-item:hover {
|
|
56
|
+
transform: translateY(-4px);
|
|
57
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.jux-grid-icon {
|
|
61
|
+
font-size: 3rem;
|
|
62
|
+
margin-bottom: 1rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.jux-grid-title {
|
|
66
|
+
font-size: 1.5rem;
|
|
67
|
+
margin-bottom: 0.5rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Button Component */
|
|
71
|
+
.jux-button {
|
|
72
|
+
padding: 1rem 2rem;
|
|
73
|
+
font-size: 1.1rem;
|
|
74
|
+
border: none;
|
|
75
|
+
border-radius: 6px;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
transition: all 0.2s;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.jux-button-primary {
|
|
82
|
+
color: white;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.jux-button-primary:hover {
|
|
86
|
+
transform: translateY(-2px);
|
|
87
|
+
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
#cta-container {
|
|
91
|
+
text-align: center;
|
|
92
|
+
padding: 2rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Global table styles */
|
|
96
|
+
input[type='checkbox'] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--theme-success); }
|
|
97
|
+
table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--theme-border); border-radius: 8px; margin-bottom: 20px; background: var(--theme-surface-elevated); }
|
|
98
|
+
thead { background: var(--theme-surface); }
|
|
99
|
+
th { padding: 10px 16px; text-align: left; font-weight: 500; font-size: 12px; color: var(--theme-text-muted); text-transform: uppercase; cursor: pointer; user-select: none; }
|
|
100
|
+
th:hover { background: var(--theme-hover-deeper); }
|
|
101
|
+
th:first-child, td:first-child { padding-left: 20px; }
|
|
102
|
+
th:first-child { width: 40px; }
|
|
103
|
+
td { padding: 14px 16px; color: var(--theme-text); border-bottom: 1px solid var(--theme-border); }
|
|
104
|
+
tbody tr:last-child td { border-bottom: none; }
|
|
105
|
+
tbody tr:hover { background: var(--theme-wash-slate); }
|
|
106
|
+
|
|
107
|
+
.jux-table-empty,
|
|
108
|
+
.jux-table-loading {
|
|
109
|
+
text-align: center;
|
|
110
|
+
padding: 20px;
|
|
111
|
+
color: var(--theme-text-muted);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Table Container & Search */
|
|
115
|
+
.table-container {
|
|
116
|
+
width: 100%;
|
|
117
|
+
max-width: 1200px;
|
|
118
|
+
margin: 2rem auto;
|
|
119
|
+
padding: 1rem;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.table-search { width: 100%; padding: 10px 16px; margin-bottom: 16px; border: 1px solid var(--theme-border); border-radius: 8px; font-size: 15px; background: var(--theme-surface-elevated); color: var(--theme-text); }
|
|
123
|
+
.table-search:focus { outline: none; border-color: var(--theme-brand); box-shadow: 0 0 0 3px rgba(8, 81, 86, 0.1); }
|
|
124
|
+
|
|
125
|
+
/* Toolbar */
|
|
126
|
+
.table-toolbar { display: flex; gap: 12px; padding: 10px 16px; background: var(--theme-surface); margin-bottom: 16px; border-radius: 8px; border: 1px solid var(--theme-border); }
|
|
127
|
+
.table-toolbar > div:first-child { display: flex; gap: 12px; }
|
|
128
|
+
.table-toolbar-spacer { flex: 1; }
|
|
129
|
+
.table-toolbar button, .table-pagination button, .table-pages button { padding: 7px 14px; border: 1px solid var(--theme-border); background: var(--theme-surface-elevated); color: var(--theme-text); border-radius: 6px; cursor: pointer; font-weight: 500; }
|
|
130
|
+
.table-toolbar button:hover, .table-pagination button:hover:not(:disabled), .table-pages button:hover { background: var(--theme-hover-deeper); }
|
|
131
|
+
|
|
132
|
+
/* View Toggle */
|
|
133
|
+
.table-view-toggle { display: flex; gap: 4px; background: var(--theme-surface-elevated); border: 1px solid var(--theme-border); border-radius: 6px; padding: 2px; }
|
|
134
|
+
.table-view-toggle button { padding: 6px 12px; border: none; background: transparent; border-radius: 4px; cursor: pointer; font-weight: 500; color: var(--theme-text-muted); }
|
|
135
|
+
.table-view-toggle button:hover { background: var(--theme-hover-deeper); }
|
|
136
|
+
.table-view-toggle button.active { background: var(--theme-brand); color: var(--theme-text-inverse); }
|
|
137
|
+
|
|
138
|
+
/* Filter Dropdown */
|
|
139
|
+
.table-filter-dropdown { position: relative; }
|
|
140
|
+
.table-filter-dropdown-menu { position: absolute; top: 100%; right: 0; margin-top: 8px; background: var(--theme-surface-elevated); border: 1px solid var(--theme-border); border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 250px; z-index: 100; }
|
|
141
|
+
.table-filter-dropdown-menu select, .table-filter-dropdown-menu input { padding: 7px 10px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-surface-elevated); color: var(--theme-text); }
|
|
142
|
+
|
|
143
|
+
/* Active Filters */
|
|
144
|
+
.table-active-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: var(--theme-surface); margin-bottom: 16px; border: 1px solid var(--theme-border); border-radius: 8px; }
|
|
145
|
+
.table-active-filters span { display: inline-flex; gap: 8px; padding: 6px 12px; background: rgba(8, 81, 86, 0.1); border: 1px solid rgba(8, 81, 86, 0.2); border-radius: 6px; color: var(--theme-brand); font-weight: 500; }
|
|
146
|
+
.table-active-filters button { background: none; border: none; padding: 0; cursor: pointer; color: var(--theme-brand); }
|
|
147
|
+
.table-active-filters button:hover { color: var(--theme-danger); }
|
|
148
|
+
|
|
149
|
+
/* Table Actions */
|
|
150
|
+
.table-actions { width: 60px; padding: 8px; text-align: center; position: relative; }
|
|
151
|
+
.table-actions button { background: none; border: none; color: var(--theme-text-muted); cursor: pointer; padding: 6px 12px; border-radius: 4px; }
|
|
152
|
+
.table-actions button:hover { background: var(--theme-hover-deeper); color: var(--theme-text); }
|
|
153
|
+
|
|
154
|
+
.table-row-menu { position: absolute; right: 8px; top: 100%; margin-top: 4px; background: var(--theme-surface-elevated); border: 1px solid var(--theme-border); border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); z-index: 100; min-width: 180px; padding: 4px 0; }
|
|
155
|
+
.table-row-menu button { display: block; width: 100%; padding: 8px 16px; border: none; background: none; text-align: left; cursor: pointer; color: var(--theme-text); }
|
|
156
|
+
.table-row-menu button:hover { background: var(--theme-hover-deeper); }
|
|
157
|
+
|
|
158
|
+
/* Cards View */
|
|
159
|
+
.table-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 20px; }
|
|
160
|
+
.table-cards .card input[type='checkbox'] { position: absolute; top: 16px; right: 16px; }
|
|
161
|
+
.table-cards .card > div { display: flex; flex-direction: column; gap: 4px; }
|
|
162
|
+
.table-cards .card > div > span:first-child { font-size: 11px; font-weight: 600; color: var(--theme-brand); text-transform: uppercase; }
|
|
163
|
+
.table-cards .card > div > span:last-child { font-weight: 500; color: var(--theme-text); word-break: break-word; }
|
|
164
|
+
|
|
165
|
+
/* Pagination */
|
|
166
|
+
.table-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; padding: 16px; }
|
|
167
|
+
.table-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
168
|
+
.table-pages { display: flex; gap: 4px; }
|
|
169
|
+
.table-pages button { min-width: 36px; height: 36px; padding: 0 8px; }
|
|
170
|
+
.table-pages button.active { background: var(--theme-brand); border-color: var(--theme-brand); color: var(--theme-text-inverse); }
|
|
171
|
+
.table-pages-ellipsis { padding: 0 8px; color: var(--theme-text-muted); user-select: none; }
|
|
172
|
+
|
|
173
|
+
/* Card component */
|
|
174
|
+
.card { border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-surface-elevated); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); padding: 20px; transition: all 0.2s ease; }
|
|
175
|
+
.card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); transform: translateY(-2px); }
|
|
176
|
+
.card.interactive { cursor: pointer; }
|
|
177
|
+
.card-header { margin-bottom: 16px; }
|
|
178
|
+
.card-header-title { font-size: 16px; font-weight: 600; color: var(--theme-text); }
|
|
179
|
+
.card-header-subtitle { font-size: 13px; color: var(--theme-text-muted); margin-top: 4px; }
|
|
180
|
+
.card-body { color: var(--theme-text); line-height: 1.6; }
|
|
181
|
+
.card-body > * { margin-bottom: 12px; }
|
|
182
|
+
.card-body > *:last-child { margin-bottom: 0; }
|
|
183
|
+
.card-footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--theme-border); }
|
|
184
|
+
.table-card-actions { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--theme-border); }
|
|
185
|
+
|
|
186
|
+
/* END Base Theme Styles ./base-theme.css */
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/* Dark Theme Styles ./dark-theme.css */
|
|
2
|
+
:root {
|
|
3
|
+
--theme-brand: #0a9ca5;
|
|
4
|
+
--theme-brand-hover: #088892;
|
|
5
|
+
--theme-success: #0a9ca5;
|
|
6
|
+
--theme-danger: #ef4444;
|
|
7
|
+
--theme-text: #e0e0e0;
|
|
8
|
+
--theme-text-muted: #aaa;
|
|
9
|
+
--theme-text-inverse: #ffffff;
|
|
10
|
+
--theme-surface: #2a2a2a;
|
|
11
|
+
--theme-surface-elevated: #333;
|
|
12
|
+
--theme-border: #444;
|
|
13
|
+
--theme-hover-deeper: #3a3a3a;
|
|
14
|
+
--theme-wash-slate: #2a2a2a;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
body {
|
|
18
|
+
color: var(--theme-text);
|
|
19
|
+
background: #1a1a1a;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.jux-hero {
|
|
23
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.jux-grid-item {
|
|
27
|
+
background: #2a2a2a;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.jux-grid-title {
|
|
31
|
+
color: #667eea;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.jux-grid-description {
|
|
35
|
+
color: #aaa;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.jux-button-primary {
|
|
39
|
+
background: #667eea;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.jux-button-primary:hover {
|
|
43
|
+
background: #5568d3;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.jux-table {
|
|
47
|
+
background: #2a2a2a;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.jux-table th {
|
|
51
|
+
background-color: #333;
|
|
52
|
+
border-bottom-color: #444;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.jux-table td {
|
|
56
|
+
border-bottom-color: #333;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.jux-table tr:hover {
|
|
60
|
+
background-color: #2a2a2a;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.table-search {
|
|
64
|
+
background: #2a2a2a;
|
|
65
|
+
color: #e0e0e0;
|
|
66
|
+
border-color: #444;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.table-toolbar {
|
|
70
|
+
background: #2a2a2a;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.table-toolbar button {
|
|
74
|
+
background: #2a2a2a;
|
|
75
|
+
color: #e0e0e0;
|
|
76
|
+
border-color: #444;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.table-toolbar button:hover {
|
|
80
|
+
background: #333;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.table-toolbar button.active {
|
|
84
|
+
background: #667eea;
|
|
85
|
+
border-color: #667eea;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.table-filter-dropdown-menu {
|
|
89
|
+
background: #2a2a2a;
|
|
90
|
+
border-color: #444;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.table-filter-dropdown-menu select,
|
|
94
|
+
.table-filter-dropdown-menu input {
|
|
95
|
+
background: #2a2a2a;
|
|
96
|
+
color: #e0e0e0;
|
|
97
|
+
border-color: #444;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.table-active-filters span {
|
|
101
|
+
background: #667eea;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.table-row-menu {
|
|
105
|
+
background: #2a2a2a;
|
|
106
|
+
border-color: #444;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.table-row-menu button {
|
|
110
|
+
color: #e0e0e0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.table-row-menu button:hover {
|
|
114
|
+
background: #333;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.table-cards .card {
|
|
118
|
+
background: #2a2a2a;
|
|
119
|
+
border-color: #444;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.table-card-actions {
|
|
123
|
+
border-top-color: #444;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.table-pagination button {
|
|
127
|
+
background: #2a2a2a;
|
|
128
|
+
color: #e0e0e0;
|
|
129
|
+
border-color: #444;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.table-pagination button:hover:not(:disabled) {
|
|
133
|
+
background: #333;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.table-pages button.active {
|
|
137
|
+
background: #667eea;
|
|
138
|
+
border-color: #667eea;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.table-pages-ellipsis {
|
|
142
|
+
color: #e0e0e0;
|
|
143
|
+
}
|
|
144
|
+
/* END Dark Theme Styles ./dark-theme.css */
|