cyclecad 3.11.0 → 3.13.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/app/index.html CHANGED
@@ -1412,7 +1412,7 @@
1412
1412
  </div>
1413
1413
  <div class="status-item">
1414
1414
  <span class="status-label">Version:</span>
1415
- <span class="status-value">v0.9.0</span>
1415
+ <span class="status-value" id="status-version">v3.13.0</span>
1416
1416
  </div>
1417
1417
  </div>
1418
1418
 
@@ -1455,12 +1455,15 @@ window._dismissSplash = function(action) {
1455
1455
  <script>
1456
1456
  (function() {
1457
1457
  function dismiss() { document.getElementById("welcome-panel").style.display = "none"; }
1458
- document.getElementById("splash-sketch").addEventListener("click", dismiss);
1459
- document.getElementById("splash-import").addEventListener("click", dismiss);
1460
- document.getElementById("splash-textcad").addEventListener("click", function() { dismiss(); setTimeout(() => { if (window.app) window.app.handleMenuAction('tools-text-to-cad'); }, 100); });
1461
- document.getElementById("splash-imagecad").addEventListener("click", function() { dismiss(); setTimeout(() => { if (window.app) window.app.handleMenuAction('tools-image-to-cad'); }, 100); });
1462
- document.getElementById("splash-openscad").addEventListener("click", function() { dismiss(); setTimeout(() => { if (window.app) window.app.handleMenuAction('tools-openscad'); }, 100); });
1463
- document.getElementById("splash-inventor").addEventListener("click", dismiss);
1458
+ // Queue the action on the pending hook so the main module picks it up after load.
1459
+ // If the module is already loaded, the defineProperty setter dispatches immediately with a 100ms delay.
1460
+ function dispatchAction(action) { dismiss(); window._pendingSplashAction = action; }
1461
+ document.getElementById("splash-sketch") .addEventListener("click", function() { dispatchAction('sketch-new'); });
1462
+ document.getElementById("splash-import") .addEventListener("click", function() { dispatchAction('file-import'); });
1463
+ document.getElementById("splash-textcad") .addEventListener("click", function() { dispatchAction('tools-text-to-cad'); });
1464
+ document.getElementById("splash-imagecad").addEventListener("click", function() { dispatchAction('tools-image-to-cad'); });
1465
+ document.getElementById("splash-openscad").addEventListener("click", function() { dispatchAction('tools-openscad'); });
1466
+ document.getElementById("splash-inventor").addEventListener("click", function() { dispatchAction('file-import'); });
1464
1467
  })();
1465
1468
  </script>
1466
1469
 
@@ -1540,7 +1543,8 @@ window._dismissSplash = function(action) {
1540
1543
  <!-- Killer Feature Modules -->
1541
1544
  <script src="/app/js/agent-api.js?v=a41b98a5"></script>
1542
1545
  <script src="/app/js/modules/ai-copilot.js?v=14e5d5d7"></script>
1543
- <script src="/app/js/modules/ai-engineer.js?v=20260424v1"></script>
1546
+ <script src="/app/js/modules/ai-engineer.js?v=20260424v2"></script>
1547
+ <script src="/app/js/modules/ai-engineer-rag.js?v=20260424v1"></script>
1544
1548
  <script src="/app/js/modules/text-to-cad.js"></script>
1545
1549
  <script src="/app/js/modules/photo-to-cad.js"></script>
1546
1550
  <script src="/app/js/modules/manufacturability.js"></script>
@@ -1959,9 +1963,10 @@ window._dismissSplash = function(action) {
1959
1963
  })();
1960
1964
  }
1961
1965
  break;
1962
- case 'help-about':
1963
- showDialog('About cycleCAD', 'cycleCAD v0.9.0 - Fusion 360 Clone<br>Open-source parametric 3D CAD modeler<br><br>Built with Three.js, supporting STEP/IGES import, full parametric modeling, and AI-powered design assistance.');
1964
- break;
1966
+ case 'help-about': {
1967
+ const v = (window.CycleCAD && window.CycleCAD.version) ? window.CycleCAD.version : '3.13.0';
1968
+ showDialog('About cycleCAD', 'cycleCAD v' + v + '<br>Part of the cycleCAD Suite — parametric CAD, ExplodeView, Pentacad.<br><br>Open-source (MIT) parametric 3D CAD modeller. Built with Three.js, OpenCascade.js for real B-rep, supporting STEP / IGES / GLB import, full parametric modelling, and AI-powered design assistance via the AI Copilot + AI Engineering Analyst.');
1969
+ break; }
1965
1970
  case 'tools-ai-copilot':
1966
1971
  if (window.CycleCAD && window.CycleCAD.AICopilot) {
1967
1972
  showDialog('✨ AI Copilot — multi-step CAD from natural language', '');
@@ -2953,6 +2958,32 @@ window._dismissSplash = function(action) {
2953
2958
  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', initDialogDrag);
2954
2959
  else initDialogDrag();
2955
2960
  })();
2961
+
2962
+ // ─── Dynamic version badge — fetch from /package.json on load, fall back to embedded ───
2963
+ (function(){
2964
+ const FALLBACK_VERSION = '3.13.0';
2965
+ async function updateVersion() {
2966
+ const badge = document.getElementById('status-version');
2967
+ if (!badge) return;
2968
+ try {
2969
+ const r = await fetch('/package.json', { cache: 'no-cache' });
2970
+ if (!r.ok) throw new Error('package.json HTTP ' + r.status);
2971
+ const pkg = await r.json();
2972
+ if (pkg && pkg.version) {
2973
+ badge.textContent = 'v' + pkg.version;
2974
+ window.CycleCAD = window.CycleCAD || {};
2975
+ window.CycleCAD.version = pkg.version;
2976
+ }
2977
+ } catch (err) {
2978
+ // Keep hardcoded fallback; log quietly for debugging.
2979
+ badge.textContent = 'v' + FALLBACK_VERSION;
2980
+ window.CycleCAD = window.CycleCAD || {};
2981
+ window.CycleCAD.version = FALLBACK_VERSION;
2982
+ }
2983
+ }
2984
+ if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', updateVersion);
2985
+ else updateVersion();
2986
+ })();
2956
2987
  </script>
2957
2988
  </body>
2958
2989
  </html>
@@ -914,7 +914,10 @@
914
914
  },
915
915
  go: () => { if (!uiEl) uiEl = buildUI(); return run(); },
916
916
  abort: () => abort(),
917
- getState: () => ({ running:S.running, stepIndex:S.stepIndex, results:S.results.length, errors:S.errors.length, model:S.els.model?.value })
917
+ getState: () => ({ running:S.running, stepIndex:S.stepIndex, results:S.results.length, errors:S.errors.length, model:S.els.model?.value }),
918
+ // Exposed for Text-to-CAD live preview: given a natural language prompt, returns a plan array
919
+ // of step objects ({method, params, note}) for known templates, or null for novel prompts.
920
+ matchTemplate: (prompt) => { try { return matchTemplate(prompt); } catch(e) { return null; } }
918
921
  };
919
922
  console.log('AI Copilot v1.2 module loaded');
920
923
  })();