@nine-lab/nine-mu 0.1.388 β 0.1.390
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 +55 -39
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +1 -1
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/hook/NineHook.js +50 -43
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,
|
|
14
|
+
import React, { createContext, useState, useEffect, 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.
|
|
17542
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.389"}/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.
|
|
43792
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.389"}/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.
|
|
43932
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.389"}/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.
|
|
44041
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.389"}/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.
|
|
44371
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.389"}/dist/css/nine-mu.css";
|
|
44372
44372
|
${customImport}
|
|
44373
44373
|
</style>
|
|
44374
44374
|
|
|
@@ -44468,6 +44468,19 @@ if (!customElements.get("nine-chat-progress")) {
|
|
|
44468
44468
|
}
|
|
44469
44469
|
const ScreenContext = createContext();
|
|
44470
44470
|
const useScreen = () => useContext(ScreenContext);
|
|
44471
|
+
const ScreenProvider = ({ children }) => {
|
|
44472
|
+
const [activeView, setActiveView] = useState("list-wrapper");
|
|
44473
|
+
const [selectedData, setSelectedData] = useState(null);
|
|
44474
|
+
const goto = (selector, data) => {
|
|
44475
|
+
setActiveView(selector);
|
|
44476
|
+
if (data) setSelectedData(data);
|
|
44477
|
+
};
|
|
44478
|
+
return React.createElement(
|
|
44479
|
+
ScreenContext.Provider,
|
|
44480
|
+
{ value: { activeView, selectedData, goto } },
|
|
44481
|
+
children
|
|
44482
|
+
);
|
|
44483
|
+
};
|
|
44471
44484
|
const Default404 = () => {
|
|
44472
44485
|
return React.createElement(
|
|
44473
44486
|
"div",
|
|
@@ -44478,7 +44491,9 @@ const Default404 = () => {
|
|
|
44478
44491
|
const createDynamicRoutes = (menuData, projectViews, Custom404) => {
|
|
44479
44492
|
const lazyLoad = (viewPath) => {
|
|
44480
44493
|
const importer = projectViews[viewPath];
|
|
44481
|
-
if (!importer)
|
|
44494
|
+
if (!importer) {
|
|
44495
|
+
return Custom404 ? Custom404 : Default404;
|
|
44496
|
+
}
|
|
44482
44497
|
return lazy(() => importer());
|
|
44483
44498
|
};
|
|
44484
44499
|
const dynamicRoutes = [
|
|
@@ -44637,29 +44652,19 @@ class NineExceptionHook extends React.Component {
|
|
|
44637
44652
|
return this.props.children;
|
|
44638
44653
|
}
|
|
44639
44654
|
}
|
|
44640
|
-
function NineHook({ menuUrl, views, error404, onCatch, fallback, styles, containerStyle }) {
|
|
44641
|
-
const
|
|
44642
|
-
const menuData = context ? context.menuData : [];
|
|
44643
|
-
const setMenuData = context ? context.setMenuData : null;
|
|
44644
|
-
const [localMenuData, setLocalMenuData] = useState([]);
|
|
44655
|
+
function NineHook({ children, menuUrl, views, error404, onCatch, fallback, styles, containerStyle }) {
|
|
44656
|
+
const [menuData, setMenuData] = useState([]);
|
|
44645
44657
|
const fetchRoutes = async () => {
|
|
44646
44658
|
if (!menuUrl) return;
|
|
44647
44659
|
try {
|
|
44648
44660
|
const response = await fetch(`${menuUrl}?t=${Date.now()}`);
|
|
44649
44661
|
if (response.ok) {
|
|
44650
44662
|
const data = await response.json();
|
|
44651
|
-
|
|
44652
|
-
|
|
44653
|
-
|
|
44654
|
-
|
|
44655
|
-
|
|
44656
|
-
});
|
|
44657
|
-
} else {
|
|
44658
|
-
setLocalMenuData((prev) => {
|
|
44659
|
-
if (JSON.stringify(prev) === JSON.stringify(data)) return prev;
|
|
44660
|
-
return data;
|
|
44661
|
-
});
|
|
44662
|
-
}
|
|
44663
|
+
setMenuData((prev) => {
|
|
44664
|
+
if (JSON.stringify(prev) === JSON.stringify(data)) return prev;
|
|
44665
|
+
console.log("π₯ [Nine-Library] routes.json λ³κ²½ κ°μ§ -> μ 체 μμ€ν
λκΈ°ν");
|
|
44666
|
+
return data;
|
|
44667
|
+
});
|
|
44663
44668
|
}
|
|
44664
44669
|
} catch (e) {
|
|
44665
44670
|
console.error("[Nine-Library] λ°νμ λ©λ΄ λκΈ°ν μ€ν¨:", e);
|
|
@@ -44676,30 +44681,41 @@ function NineHook({ menuUrl, views, error404, onCatch, fallback, styles, contain
|
|
|
44676
44681
|
clearInterval(intervalId);
|
|
44677
44682
|
};
|
|
44678
44683
|
}, [menuUrl]);
|
|
44679
|
-
|
|
44680
|
-
|
|
44684
|
+
if (!menuData || menuData.length === 0) {
|
|
44685
|
+
return React.createElement(
|
|
44686
|
+
"div",
|
|
44687
|
+
{ style: { padding: "25px", color: "#666", fontFamily: "monospace", background: "#121314", minHeight: "100vh" } },
|
|
44688
|
+
">> Initializing menu matrix telemetry..."
|
|
44689
|
+
);
|
|
44690
|
+
}
|
|
44691
|
+
const dynamicRoutes = createDynamicRoutes(menuData, views, error404);
|
|
44681
44692
|
return React.createElement(
|
|
44682
|
-
|
|
44683
|
-
{
|
|
44693
|
+
ScreenProvider,
|
|
44694
|
+
{ menuData },
|
|
44684
44695
|
React.createElement(
|
|
44685
|
-
|
|
44686
|
-
{
|
|
44696
|
+
NineExceptionHook,
|
|
44697
|
+
{ onCatch, fallback, styles, containerStyle },
|
|
44698
|
+
children,
|
|
44687
44699
|
React.createElement(
|
|
44688
|
-
|
|
44689
|
-
|
|
44690
|
-
|
|
44691
|
-
|
|
44692
|
-
|
|
44693
|
-
|
|
44694
|
-
|
|
44695
|
-
|
|
44700
|
+
Suspense,
|
|
44701
|
+
{ fallback: React.createElement("div", { style: { padding: "25px", color: "#666", fontFamily: "monospace" } }, ">> Loading component matrix...") },
|
|
44702
|
+
React.createElement(
|
|
44703
|
+
Routes,
|
|
44704
|
+
null,
|
|
44705
|
+
dynamicRoutes.map(
|
|
44706
|
+
(route) => React.createElement(Route, {
|
|
44707
|
+
key: route.path,
|
|
44708
|
+
path: route.path,
|
|
44709
|
+
element: React.createElement(route.Component, { key: route.path })
|
|
44710
|
+
})
|
|
44711
|
+
)
|
|
44696
44712
|
)
|
|
44697
44713
|
)
|
|
44698
44714
|
)
|
|
44699
44715
|
);
|
|
44700
44716
|
}
|
|
44701
44717
|
const NineMu = {
|
|
44702
|
-
version: "0.1.
|
|
44718
|
+
version: "0.1.389",
|
|
44703
44719
|
init: (config2) => {
|
|
44704
44720
|
trace$1.log("π οΈ Nine-Mu Engine initialized", config2);
|
|
44705
44721
|
}
|