@onexapis/cli 1.1.14 → 1.1.15

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.
@@ -297,27 +297,24 @@ function PreviewApp() {
297
297
 
298
298
  ws.onopen = () => {
299
299
  setWsStatus("connected");
300
- updateToolbar("connected", "Connected");
300
+
301
301
  };
302
302
 
303
303
  ws.onmessage = (event) => {
304
304
  const msg = JSON.parse(event.data);
305
305
  if (msg.type === "reload") {
306
306
  setWsStatus("rebuilding");
307
- updateToolbar("rebuilding", "Reloading...");
308
307
  loadTheme(msg.timestamp).then(() => {
309
308
  setWsStatus("connected");
310
- updateToolbar("connected", "Connected");
309
+
311
310
  });
312
311
  } else if (msg.type === "error") {
313
312
  setError(msg.message);
314
- updateToolbar("disconnected", "Build Error");
315
313
  }
316
314
  };
317
315
 
318
316
  ws.onclose = () => {
319
317
  setWsStatus("disconnected");
320
- updateToolbar("disconnected", "Disconnected");
321
318
  // Auto-reconnect after 2s
322
319
  setTimeout(connect, 2000);
323
320
  };
@@ -459,52 +456,6 @@ function PreviewApp() {
459
456
 
460
457
  return (
461
458
  <>
462
- {/* Page selector (if multiple pages) */}
463
- {pages.length > 1 && (
464
- <div
465
- style={{
466
- position: "fixed",
467
- top: 40,
468
- right: 16,
469
- zIndex: 9998,
470
- background: "white",
471
- borderRadius: 8,
472
- boxShadow: "0 2px 8px rgba(0,0,0,0.15)",
473
- padding: "4px 8px",
474
- display: "flex",
475
- gap: 4,
476
- }}
477
- >
478
- {pages.map((page, i) => {
479
- const pageSlug = page.key.replace("PageConfig", "").toLowerCase();
480
- const pagePath = pageSlug === "home" ? "/" : `/${pageSlug}`;
481
- return (
482
- <button
483
- key={page.key}
484
- onClick={() => {
485
- setSelectedPage(i);
486
- window.history.pushState(null, "", pagePath);
487
- const el = document.getElementById("page-indicator");
488
- if (el) el.textContent = page.label;
489
- }}
490
- style={{
491
- padding: "4px 12px",
492
- border: "none",
493
- borderRadius: 4,
494
- cursor: "pointer",
495
- background: i === resolvedPage ? "#E11D48" : "transparent",
496
- color: i === resolvedPage ? "white" : "#333",
497
- fontSize: 12,
498
- fontWeight: 500,
499
- }}
500
- >
501
- {page.label}
502
- </button>
503
- );
504
- })}
505
- </div>
506
- )}
507
-
508
459
  {/* Render sections */}
509
460
  {sections.map(({ section, registration }: any) => {
510
461
  if (!registration) {
@@ -540,16 +491,6 @@ function PreviewApp() {
540
491
  );
541
492
  }
542
493
 
543
- function updateToolbar(status: string, label: string) {
544
- const statusEl = document.getElementById("ws-status");
545
- const labelEl = document.getElementById("ws-label");
546
- if (statusEl) {
547
- statusEl.className = `status ${status}`;
548
- }
549
- if (labelEl) {
550
- labelEl.textContent = label;
551
- }
552
- }
553
494
 
554
495
  // ===== 7. MOUNT =====
555
496
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onexapis/cli",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "CLI tool for OneX theme development - scaffolds themes using @onexapis/core",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -15,6 +15,13 @@
15
15
  "require": "./dist/index.js"
16
16
  }
17
17
  },
18
+ "scripts": {
19
+ "build": "tsup",
20
+ "dev": "tsup --watch",
21
+ "type-check": "tsc --noEmit",
22
+ "lint": "eslint src --ext .ts",
23
+ "prepublishOnly": "pnpm run type-check && pnpm run build"
24
+ },
18
25
  "keywords": [
19
26
  "onex",
20
27
  "cli",
@@ -41,6 +48,7 @@
41
48
  "registry": "https://registry.npmjs.org/"
42
49
  },
43
50
  "dependencies": {
51
+ "@onexapis/core": "workspace:*",
44
52
  "@tanstack/react-query": "^5.90.16",
45
53
  "@aws-sdk/client-s3": "^3.470.0",
46
54
  "adm-zip": "^0.5.16",
@@ -59,8 +67,7 @@
59
67
  "node-fetch": "^3.3.2",
60
68
  "open": "^10.1.0",
61
69
  "ora": "^8.0.1",
62
- "ws": "^8.18.0",
63
- "@onexapis/core": "1.0.2"
70
+ "ws": "^8.18.0"
64
71
  },
65
72
  "devDependencies": {
66
73
  "@types/adm-zip": "^0.5.7",
@@ -80,11 +87,5 @@
80
87
  ],
81
88
  "engines": {
82
89
  "node": ">=18.0.0"
83
- },
84
- "scripts": {
85
- "build": "tsup",
86
- "dev": "tsup --watch",
87
- "type-check": "tsc --noEmit",
88
- "lint": "eslint src --ext .ts"
89
90
  }
90
- }
91
+ }