@keshavsoft/monaco-json-studio 0.0.0-stage → 1.2.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/README.md CHANGED
@@ -1,3 +1,61 @@
1
- # Temporary Holding Version
1
+ # @keshavsoft/monaco-json-studio
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Zero-dependency physical and static Monaco JSON Studio scaffold generator and specification assembler.
4
+
5
+ Generates disciplined, modular, production-grade Monaco Studio projects for 1, 2, or 3 JSON panes with 100% static HTML.
6
+
7
+ ---
8
+
9
+ ## Quick Start (CLI)
10
+
11
+ ### If your terminal is inside `monaco-json-studio`:
12
+ ```bash
13
+ # 1-Pane Single JSON Visualizer
14
+ node ./bin/index.js 1 ./my-single-studio
15
+
16
+ # 2-Pane Dual JSON Studio (50/50 Split)
17
+ node ./bin/index.js 2 ./my-dual-studio
18
+
19
+ # 3-Pane Triple JSON Studio (33/33/33 Split)
20
+ node ./bin/index.js 3 ./my-triple-studio
21
+ ```
22
+
23
+ ### If your terminal is in the parent `table` folder:
24
+ ```bash
25
+ node ./monaco-json-studio/bin/index.js 2 ./my-dual-studio
26
+ ```
27
+
28
+ ### When published / linked globally via NPX:
29
+ ```bash
30
+ npx @keshavsoft/monaco-json-studio 2 ./my-dual-studio
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Programmatic Usage (NPM Library)
36
+
37
+ ```javascript
38
+ import { generateStudio, specToHtml, assembleSpec } from "@keshavsoft/monaco-json-studio";
39
+
40
+ // Scaffold a physical project folder
41
+ generateStudio({
42
+ inPanes: 2,
43
+ inTargetDir: "./client-studio",
44
+ inTitle: "Custom Client Studio"
45
+ });
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Architecture & Features
51
+
52
+ - **100% Static HTML Generation**: No blank mount points. Full HTML elements are compiled directly into `index.html`.
53
+ - **Modular Control-Scoped CSS**: Pre-packaged with disciplined `base.css`, `header.css`, `workspace.css`, and `footer.css`.
54
+ - **Independent File Pickers**: Each editor pane has its own file open button and active file badge.
55
+ - **Zero Runtime Assembler Dependencies**: Client output runs standalone, offline, and lightweight.
56
+
57
+ ---
58
+
59
+ ## License
60
+
61
+ MIT © KeshavSoft
@@ -0,0 +1,45 @@
1
+ :root {
2
+ --bg-page: #0f1117;
3
+ --bg-header: #181a20;
4
+ --bg-editor: #1e1e1e;
5
+ --bg-footer: #12141a;
6
+ --border-color: #2b2f3a;
7
+ --border-subtle: #232733;
8
+ --text-primary: #f3f4f6;
9
+ --text-secondary: #9ca3af;
10
+ --text-muted: #6b7280;
11
+ --accent-blue: #38bdf8;
12
+ --accent-blue-bg: rgba(56, 189, 248, 0.12);
13
+ --accent-blue-border: rgba(56, 189, 248, 0.35);
14
+ --accent-green: #34d399;
15
+ --accent-green-bg: rgba(52, 211, 153, 0.12);
16
+ --accent-green-border: rgba(52, 211, 153, 0.35);
17
+ --accent-amber: #fbbf24;
18
+ --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
19
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
20
+ }
21
+
22
+ * {
23
+ box-sizing: border-box;
24
+ margin: 0;
25
+ padding: 0;
26
+ }
27
+
28
+ html, body {
29
+ width: 100%;
30
+ height: 100%;
31
+ background-color: var(--bg-page);
32
+ color: var(--text-primary);
33
+ font-family: var(--font-sans);
34
+ overflow: hidden;
35
+ user-select: none;
36
+ -webkit-font-smoothing: antialiased;
37
+ }
38
+
39
+ .studio-app {
40
+ display: flex;
41
+ flex-direction: column;
42
+ width: 100vw;
43
+ height: 100vh;
44
+ overflow: hidden;
45
+ }
@@ -0,0 +1,27 @@
1
+ .studio-footer {
2
+ height: 24px;
3
+ background-color: var(--bg-footer);
4
+ border-top: 1px solid var(--border-color);
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ padding: 0 12px;
9
+ font-size: 11px;
10
+ color: var(--text-secondary);
11
+ font-family: var(--font-mono);
12
+ flex-shrink: 0;
13
+ }
14
+
15
+ .footer-left, .footer-right {
16
+ display: flex;
17
+ align-items: center;
18
+ gap: 12px;
19
+ }
20
+
21
+ .footer-brand {
22
+ display: flex;
23
+ align-items: center;
24
+ gap: 6px;
25
+ color: var(--accent-blue);
26
+ font-weight: 600;
27
+ }
@@ -0,0 +1,172 @@
1
+ .studio-header {
2
+ height: 44px;
3
+ background-color: var(--bg-header);
4
+ border-bottom: 1px solid var(--border-color);
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ padding: 0 14px;
9
+ flex-shrink: 0;
10
+ z-index: 10;
11
+ }
12
+
13
+ .header-left, .header-right {
14
+ display: flex;
15
+ align-items: center;
16
+ gap: 12px;
17
+ }
18
+
19
+ .brand-link {
20
+ display: flex;
21
+ align-items: center;
22
+ gap: 8px;
23
+ text-decoration: none;
24
+ color: var(--text-primary);
25
+ font-size: 13px;
26
+ font-weight: 700;
27
+ letter-spacing: 0.03em;
28
+ transition: opacity 0.15s ease;
29
+ }
30
+
31
+ .brand-link:hover {
32
+ opacity: 0.85;
33
+ }
34
+
35
+ .brand-icon {
36
+ color: var(--accent-blue);
37
+ font-size: 17px;
38
+ }
39
+
40
+ .version-pill {
41
+ font-size: 10px;
42
+ font-weight: 700;
43
+ color: var(--accent-blue);
44
+ background: var(--accent-blue-bg);
45
+ border: 1px solid var(--accent-blue-border);
46
+ padding: 1px 6px;
47
+ border-radius: 4px;
48
+ text-transform: uppercase;
49
+ }
50
+
51
+ .header-divider {
52
+ width: 1px;
53
+ height: 18px;
54
+ background-color: var(--border-color);
55
+ margin: 0 2px;
56
+ }
57
+
58
+ /* Dynamic Layout Segmented Switcher */
59
+ .layout-switcher {
60
+ display: inline-flex;
61
+ align-items: center;
62
+ background: #101217;
63
+ border: 1px solid var(--border-color);
64
+ border-radius: 6px;
65
+ padding: 2px;
66
+ gap: 3px;
67
+ }
68
+
69
+ .layout-switcher-label {
70
+ font-size: 11px;
71
+ font-weight: 600;
72
+ color: var(--text-muted);
73
+ padding: 0 6px 0 8px;
74
+ text-transform: uppercase;
75
+ letter-spacing: 0.05em;
76
+ user-select: none;
77
+ }
78
+
79
+ .btn-layout-mode {
80
+ background: transparent;
81
+ border: 1px solid transparent;
82
+ color: var(--text-secondary);
83
+ font-size: 12px;
84
+ font-weight: 700;
85
+ padding: 2px 10px;
86
+ border-radius: 4px;
87
+ cursor: pointer;
88
+ transition: all 0.15s ease;
89
+ display: inline-flex;
90
+ align-items: center;
91
+ gap: 4px;
92
+ user-select: none;
93
+ }
94
+
95
+ .btn-layout-mode:hover {
96
+ color: var(--text-primary);
97
+ background: rgba(255, 255, 255, 0.06);
98
+ }
99
+
100
+ .btn-layout-mode.active {
101
+ background: var(--accent-blue-bg);
102
+ color: var(--accent-blue);
103
+ border-color: var(--accent-blue-border);
104
+ }
105
+
106
+ /* Export Physical Project Button */
107
+ .btn-export {
108
+ display: inline-flex;
109
+ align-items: center;
110
+ gap: 6px;
111
+ background: rgba(37, 99, 235, 0.15);
112
+ border: 1px solid rgba(59, 130, 246, 0.4);
113
+ color: #93c5fd;
114
+ font-size: 11px;
115
+ font-weight: 700;
116
+ padding: 4px 10px;
117
+ border-radius: 5px;
118
+ cursor: pointer;
119
+ transition: all 0.15s ease;
120
+ user-select: none;
121
+ }
122
+
123
+ .btn-export:hover {
124
+ background: #2563eb;
125
+ border-color: #3b82f6;
126
+ color: #ffffff;
127
+ box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
128
+ transform: translateY(-1px);
129
+ }
130
+
131
+ .btn-export:active {
132
+ transform: translateY(0);
133
+ }
134
+
135
+ /* Status Notification Pill */
136
+ .status-pill {
137
+ display: inline-flex;
138
+ align-items: center;
139
+ gap: 6px;
140
+ font-size: 11px;
141
+ font-weight: 600;
142
+ padding: 2px 8px;
143
+ border-radius: 4px;
144
+ transition: opacity 0.25s ease;
145
+ }
146
+
147
+ .status-pill.success {
148
+ color: var(--accent-green);
149
+ background: var(--accent-green-bg);
150
+ border: 1px solid var(--accent-green-border);
151
+ }
152
+
153
+ .status-pill.hidden {
154
+ display: none;
155
+ }
156
+
157
+ .docs-link {
158
+ display: inline-flex;
159
+ align-items: center;
160
+ gap: 5px;
161
+ color: var(--text-secondary);
162
+ text-decoration: none;
163
+ font-size: 12px;
164
+ padding: 4px 8px;
165
+ border-radius: 4px;
166
+ transition: all 0.15s ease;
167
+ }
168
+
169
+ .docs-link:hover {
170
+ color: var(--text-primary);
171
+ background: rgba(255, 255, 255, 0.06);
172
+ }
@@ -0,0 +1,4 @@
1
+ @import "./base.css";
2
+ @import "./header.css";
3
+ @import "./workspace.css";
4
+ @import "./footer.css";
@@ -0,0 +1,143 @@
1
+ .studio-workspace {
2
+ flex: 1;
3
+ width: 100%;
4
+ height: calc(100vh - 44px - 24px);
5
+ background-color: var(--border-color);
6
+ display: grid;
7
+ gap: 1px;
8
+ overflow: hidden;
9
+ }
10
+
11
+ /* 1 Pane: Full-width 100% */
12
+ .studio-workspace[data-panes="1"] {
13
+ grid-template-columns: 1fr;
14
+ }
15
+ .studio-workspace[data-panes="1"] #pane2,
16
+ .studio-workspace[data-panes="1"] #pane3 {
17
+ display: none !important;
18
+ }
19
+
20
+ /* 2 Panes: 50% / 50% */
21
+ .studio-workspace[data-panes="2"] {
22
+ grid-template-columns: 1fr 1fr;
23
+ }
24
+ .studio-workspace[data-panes="2"] #pane3 {
25
+ display: none !important;
26
+ }
27
+
28
+ /* 3 Panes: 33.3% / 33.3% / 33.3% */
29
+ .studio-workspace[data-panes="3"] {
30
+ grid-template-columns: 1fr 1fr 1fr;
31
+ }
32
+
33
+ /* Fallback when data-panes is unset */
34
+ .studio-workspace:not([data-panes]) {
35
+ grid-template-columns: 1fr 1fr;
36
+ }
37
+
38
+ /* Individual Studio Pane */
39
+ .studio-pane {
40
+ display: flex;
41
+ flex-direction: column;
42
+ height: 100%;
43
+ background-color: var(--bg-editor);
44
+ overflow: hidden;
45
+ position: relative;
46
+ min-width: 0;
47
+ }
48
+
49
+ /* Mini Header for Each Pane */
50
+ .pane-header {
51
+ height: 36px;
52
+ background-color: #14161d;
53
+ border-bottom: 1px solid var(--border-color);
54
+ display: flex;
55
+ align-items: center;
56
+ justify-content: space-between;
57
+ padding: 0 10px;
58
+ flex-shrink: 0;
59
+ user-select: none;
60
+ }
61
+
62
+ .pane-header-left, .pane-header-right {
63
+ display: flex;
64
+ align-items: center;
65
+ gap: 8px;
66
+ min-width: 0;
67
+ }
68
+
69
+ .pane-badge {
70
+ font-size: 11px;
71
+ font-weight: 700;
72
+ color: var(--accent-blue);
73
+ background: var(--accent-blue-bg);
74
+ border: 1px solid var(--accent-blue-border);
75
+ padding: 2px 7px;
76
+ border-radius: 4px;
77
+ letter-spacing: 0.04em;
78
+ text-transform: uppercase;
79
+ white-space: nowrap;
80
+ }
81
+
82
+ .btn-pane-file {
83
+ display: inline-flex;
84
+ align-items: center;
85
+ gap: 5px;
86
+ background: #20242f;
87
+ border: 1px solid var(--border-color);
88
+ color: var(--text-primary);
89
+ padding: 3px 8px;
90
+ border-radius: 4px;
91
+ font-size: 11px;
92
+ font-weight: 600;
93
+ cursor: pointer;
94
+ transition: all 0.15s ease;
95
+ white-space: nowrap;
96
+ }
97
+
98
+ .btn-pane-file:hover {
99
+ background: #2a303f;
100
+ border-color: var(--accent-blue-border);
101
+ color: #ffffff;
102
+ }
103
+
104
+ .btn-pane-file i {
105
+ color: var(--accent-blue);
106
+ font-size: 12px;
107
+ }
108
+
109
+ .pane-file-pill {
110
+ display: inline-flex;
111
+ align-items: center;
112
+ gap: 5px;
113
+ font-size: 11px;
114
+ color: var(--text-secondary);
115
+ background: rgba(255, 255, 255, 0.04);
116
+ padding: 2px 8px;
117
+ border-radius: 4px;
118
+ border: 1px solid var(--border-subtle);
119
+ overflow: hidden;
120
+ text-overflow: ellipsis;
121
+ white-space: nowrap;
122
+ }
123
+
124
+ .pane-file-pill i {
125
+ color: var(--accent-amber);
126
+ }
127
+
128
+ .pane-file-name {
129
+ font-family: var(--font-mono);
130
+ color: var(--text-primary);
131
+ font-size: 11px;
132
+ overflow: hidden;
133
+ text-overflow: ellipsis;
134
+ white-space: nowrap;
135
+ }
136
+
137
+ /* Editor Body Container */
138
+ .editor-pane-body {
139
+ flex: 1;
140
+ width: 100%;
141
+ position: relative;
142
+ overflow: hidden;
143
+ }
@@ -0,0 +1,30 @@
1
+ [
2
+ {
3
+ "columnName": "itemName",
4
+ "label": "Item Name",
5
+ "type": "text",
6
+ "width": "260px",
7
+ "placeholder": "Enter item description...",
8
+ "required": true
9
+ },
10
+ {
11
+ "columnName": "category",
12
+ "label": "Category",
13
+ "type": "select",
14
+ "width": "180px",
15
+ "options": [
16
+ "Fasteners",
17
+ "Raw Materials",
18
+ "Extrusions",
19
+ "Electrical"
20
+ ],
21
+ "required": true
22
+ },
23
+ {
24
+ "columnName": "baseUnit",
25
+ "label": "Base Unit",
26
+ "type": "text",
27
+ "width": "120px",
28
+ "placeholder": "e.g. kgs, pcs, boxes"
29
+ }
30
+ ]
@@ -0,0 +1,26 @@
1
+ [
2
+ {
3
+ "itemName": "0.09/30mm High Tensile Bolt",
4
+ "category": "Fasteners",
5
+ "baseUnit": "kgs",
6
+ "openingRate": "1200.00/kgs",
7
+ "inStock": true,
8
+ "notes": "Grade 8.8 tensile steel bolt for industrial heavy machinery."
9
+ },
10
+ {
11
+ "itemName": "0.11-25 Galvanized Wire Coil",
12
+ "category": "Raw Materials",
13
+ "baseUnit": "kgs",
14
+ "openingRate": "1450.00/kgs",
15
+ "inStock": true,
16
+ "notes": "Zinc coated anti-corrosive high-durability wire coil."
17
+ },
18
+ {
19
+ "itemName": "0.11-30 Stainless Steel Rod",
20
+ "category": "Raw Materials",
21
+ "baseUnit": "pcs",
22
+ "openingRate": "890.00/pcs",
23
+ "inStock": false,
24
+ "notes": "SS 304 grade precision polished shaft rod."
25
+ }
26
+ ]