@nine-lab/nine-mu 0.1.378 → 0.1.380

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/dist/nine-mu.js CHANGED
@@ -11,7 +11,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
12
  var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _openRouteDiffPopup, _generateSource, _generateMenu, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _sourceGenHandler, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
13
13
  import { trace as trace$1, api, nine as nine$1 } from "@nine-lab/nine-util";
14
- import React, { createContext, Suspense, useContext, useState, lazy } from "react";
14
+ import React, { createContext, useState, Suspense, useContext, lazy } from "react";
15
15
  import { Routes, Route } from "react-router-dom";
16
16
  class Trace extends trace$1.constructor {
17
17
  constructor() {
@@ -17539,7 +17539,7 @@ render_fn = function() {
17539
17539
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
17540
17540
  this.shadowRoot.innerHTML = `
17541
17541
  <style>
17542
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.377"}/dist/css/nine-mu.css";
17542
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.379"}/dist/css/nine-mu.css";
17543
17543
  ${customImport}
17544
17544
  </style>
17545
17545
  <div class="wrapper">
@@ -43789,7 +43789,7 @@ class NineDiff extends HTMLElement {
43789
43789
  const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
43790
43790
  this.shadowRoot.innerHTML = `
43791
43791
  <style>
43792
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.377"}/dist/css/nine-mu.css";
43792
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.379"}/dist/css/nine-mu.css";
43793
43793
  ${customImport}
43794
43794
  </style>
43795
43795
 
@@ -43929,7 +43929,7 @@ renderScaffolding_fn = function() {
43929
43929
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
43930
43930
  this.shadowRoot.innerHTML = `
43931
43931
  <style>
43932
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.377"}/dist/css/nine-mu.css";
43932
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.379"}/dist/css/nine-mu.css";
43933
43933
  ${customImport}
43934
43934
  </style>
43935
43935
 
@@ -44038,7 +44038,7 @@ render_fn2 = function() {
44038
44038
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
44039
44039
  this.shadowRoot.innerHTML = `
44040
44040
  <style>
44041
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.377"}/dist/css/nine-mu.css";
44041
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.379"}/dist/css/nine-mu.css";
44042
44042
  ${customImport}
44043
44043
  </style>
44044
44044
 
@@ -44368,7 +44368,7 @@ class ChatMessageBody extends HTMLElement {
44368
44368
  const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
44369
44369
  this.shadowRoot.innerHTML = `
44370
44370
  <style>
44371
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.377"}/dist/css/nine-mu.css";
44371
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.379"}/dist/css/nine-mu.css";
44372
44372
  ${customImport}
44373
44373
  </style>
44374
44374
 
@@ -44481,9 +44481,19 @@ const ScreenProvider = ({ children }) => {
44481
44481
  children
44482
44482
  );
44483
44483
  };
44484
- const createDynamicRoutes = (menuData, projectViews) => {
44484
+ const Default404 = () => {
44485
+ return React.createElement(
44486
+ "div",
44487
+ { style: { padding: "25px", background: "#121314", color: "#666", fontFamily: "Consolas, Monaco, monospace", fontSize: "14px", minHeight: "100%", flexGrow: 1 } },
44488
+ "[SYSTEM] 404 - COMMAND OR COMPONENT NOT FOUND"
44489
+ );
44490
+ };
44491
+ const createDynamicRoutes = (menuData, projectViews, Custom404) => {
44485
44492
  const lazyLoad = (viewPath) => {
44486
44493
  const importer = projectViews[viewPath];
44494
+ if (!importer) {
44495
+ return Custom404 ? Custom404 : Default404;
44496
+ }
44487
44497
  return lazy(() => importer());
44488
44498
  };
44489
44499
  const dynamicRoutes = [
@@ -44513,6 +44523,7 @@ const createDynamicRoutes = (menuData, projectViews) => {
44513
44523
  }
44514
44524
  });
44515
44525
  }
44526
+ dynamicRoutes.push({ path: "*", Component: Custom404 ? Custom404 : Default404 });
44516
44527
  return dynamicRoutes;
44517
44528
  };
44518
44529
  const NineExceptionStyles = {
@@ -44641,15 +44652,30 @@ class NineExceptionHook extends React.Component {
44641
44652
  return this.props.children;
44642
44653
  }
44643
44654
  }
44644
- function NineHook({ menuData, views, onCatch, fallback, styles, containerStyle }) {
44645
- const dynamicRoutes = createDynamicRoutes(menuData, views);
44655
+ function NineHook({ menuUrl, views, error404, onCatch, fallback, styles, containerStyle }) {
44656
+ const [menuData, setMenuData] = useState([]);
44657
+ useEffect(() => {
44658
+ if (!menuUrl) return;
44659
+ const fetchRoutes = async () => {
44660
+ try {
44661
+ const response = await fetch(`${menuUrl}?t=${Date.now()}`);
44662
+ if (response.ok) {
44663
+ const data = await response.json();
44664
+ setMenuData(data);
44665
+ }
44666
+ } catch (e) {
44667
+ console.error("[Nine-Library] 런타임 메뉴 동기화 실패:", e);
44668
+ }
44669
+ };
44670
+ fetchRoutes();
44671
+ }, [menuUrl]);
44672
+ const dynamicRoutes = createDynamicRoutes(menuData, views, error404);
44646
44673
  return React.createElement(
44647
44674
  ScreenProvider,
44648
- null,
44675
+ { menuData },
44649
44676
  React.createElement(
44650
44677
  NineExceptionHook,
44651
44678
  { onCatch, fallback, styles, containerStyle },
44652
- // 💡 Suspense 로딩도 라이브러리가 책임지고 터미널 감성으로 처리
44653
44679
  React.createElement(
44654
44680
  Suspense,
44655
44681
  { fallback: React.createElement("div", { style: { padding: "25px", color: "#666", fontFamily: "monospace" } }, ">> Loading component matrix...") },
@@ -44669,7 +44695,7 @@ function NineHook({ menuData, views, onCatch, fallback, styles, containerStyle }
44669
44695
  );
44670
44696
  }
44671
44697
  const NineMu = {
44672
- version: "0.1.377",
44698
+ version: "0.1.379",
44673
44699
  init: (config2) => {
44674
44700
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44675
44701
  }