@nine-lab/nine-mu 0.1.373 → 0.1.375
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 +59 -9
- 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 +67 -5
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, useContext, useState } from "react";
|
|
14
|
+
import React, { createContext, useContext, useState, lazy } from "react";
|
|
15
15
|
class Trace extends trace$1.constructor {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
@@ -17538,7 +17538,7 @@ render_fn = function() {
|
|
|
17538
17538
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
17539
17539
|
this.shadowRoot.innerHTML = `
|
|
17540
17540
|
<style>
|
|
17541
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
17541
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.374"}/dist/css/nine-mu.css";
|
|
17542
17542
|
${customImport}
|
|
17543
17543
|
</style>
|
|
17544
17544
|
<div class="wrapper">
|
|
@@ -43788,7 +43788,7 @@ class NineDiff extends HTMLElement {
|
|
|
43788
43788
|
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
43789
43789
|
this.shadowRoot.innerHTML = `
|
|
43790
43790
|
<style>
|
|
43791
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43791
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.374"}/dist/css/nine-mu.css";
|
|
43792
43792
|
${customImport}
|
|
43793
43793
|
</style>
|
|
43794
43794
|
|
|
@@ -43928,7 +43928,7 @@ renderScaffolding_fn = function() {
|
|
|
43928
43928
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
43929
43929
|
this.shadowRoot.innerHTML = `
|
|
43930
43930
|
<style>
|
|
43931
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43931
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.374"}/dist/css/nine-mu.css";
|
|
43932
43932
|
${customImport}
|
|
43933
43933
|
</style>
|
|
43934
43934
|
|
|
@@ -44037,7 +44037,7 @@ render_fn2 = function() {
|
|
|
44037
44037
|
const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
|
|
44038
44038
|
this.shadowRoot.innerHTML = `
|
|
44039
44039
|
<style>
|
|
44040
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44040
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.374"}/dist/css/nine-mu.css";
|
|
44041
44041
|
${customImport}
|
|
44042
44042
|
</style>
|
|
44043
44043
|
|
|
@@ -44367,7 +44367,7 @@ class ChatMessageBody extends HTMLElement {
|
|
|
44367
44367
|
const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
|
|
44368
44368
|
this.shadowRoot.innerHTML = `
|
|
44369
44369
|
<style>
|
|
44370
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44370
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.374"}/dist/css/nine-mu.css";
|
|
44371
44371
|
${customImport}
|
|
44372
44372
|
</style>
|
|
44373
44373
|
|
|
@@ -44480,6 +44480,40 @@ const ScreenProvider = ({ children }) => {
|
|
|
44480
44480
|
children
|
|
44481
44481
|
);
|
|
44482
44482
|
};
|
|
44483
|
+
const createDynamicRoutes = (menuData, projectViews) => {
|
|
44484
|
+
const lazyLoad = (viewPath) => {
|
|
44485
|
+
const importer = projectViews[viewPath];
|
|
44486
|
+
return lazy(() => importer());
|
|
44487
|
+
};
|
|
44488
|
+
const dynamicRoutes = [
|
|
44489
|
+
{ path: "/", Component: lazyLoad("./views/admin/Home.jsx") },
|
|
44490
|
+
{ path: "/admin", Component: lazyLoad("./views/admin/Home.jsx") }
|
|
44491
|
+
];
|
|
44492
|
+
if (menuData && Array.isArray(menuData)) {
|
|
44493
|
+
menuData.forEach((menu) => {
|
|
44494
|
+
if (menu.level === 2 && menu.path) {
|
|
44495
|
+
const cleanPath = menu.path.replace(/^\/+|\/+$/g, "");
|
|
44496
|
+
const pathParts = cleanPath.split("/");
|
|
44497
|
+
const len = pathParts.length;
|
|
44498
|
+
let combinedName = "";
|
|
44499
|
+
const startIdx = Math.max(0, len - 2);
|
|
44500
|
+
for (let i = startIdx; i < len; i++) {
|
|
44501
|
+
const words = pathParts[i].toLowerCase().split(/[-_]/).filter(Boolean);
|
|
44502
|
+
combinedName += words.map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join("");
|
|
44503
|
+
}
|
|
44504
|
+
const pascalName = combinedName || "GeneratedComponent";
|
|
44505
|
+
const sanitizedParts = pathParts.map((part) => part.replace(/-/g, "_"));
|
|
44506
|
+
const fullFolderPath = sanitizedParts.join("/");
|
|
44507
|
+
const componentPath = `./views/${fullFolderPath}/${pascalName}.jsx`;
|
|
44508
|
+
dynamicRoutes.push({
|
|
44509
|
+
path: menu.path,
|
|
44510
|
+
Component: lazyLoad(componentPath)
|
|
44511
|
+
});
|
|
44512
|
+
}
|
|
44513
|
+
});
|
|
44514
|
+
}
|
|
44515
|
+
return dynamicRoutes;
|
|
44516
|
+
};
|
|
44483
44517
|
const NineExceptionStyles = {
|
|
44484
44518
|
container: {
|
|
44485
44519
|
minHeight: "100%",
|
|
@@ -44606,19 +44640,35 @@ class NineExceptionHook extends React.Component {
|
|
|
44606
44640
|
return this.props.children;
|
|
44607
44641
|
}
|
|
44608
44642
|
}
|
|
44609
|
-
function NineHook({
|
|
44643
|
+
function NineHook({ menuData, views, onCatch, fallback, styles, containerStyle }) {
|
|
44644
|
+
const dynamicRoutes = createDynamicRoutes(menuData, views);
|
|
44610
44645
|
return React.createElement(
|
|
44611
44646
|
ScreenProvider,
|
|
44612
44647
|
null,
|
|
44613
44648
|
React.createElement(
|
|
44614
44649
|
NineExceptionHook,
|
|
44615
44650
|
{ onCatch, fallback, styles, containerStyle },
|
|
44616
|
-
|
|
44651
|
+
// 💡 Suspense 로딩도 라이브러리가 책임지고 터미널 감성으로 처리
|
|
44652
|
+
React.createElement(
|
|
44653
|
+
Suspense,
|
|
44654
|
+
{ fallback: React.createElement("div", { style: { padding: "25px", color: "#666", fontFamily: "monospace" } }, ">> Loading component matrix...") },
|
|
44655
|
+
React.createElement(
|
|
44656
|
+
Routes,
|
|
44657
|
+
null,
|
|
44658
|
+
dynamicRoutes.map(
|
|
44659
|
+
(route) => React.createElement(Route, {
|
|
44660
|
+
key: route.path,
|
|
44661
|
+
path: route.path,
|
|
44662
|
+
element: React.createElement(route.Component, { key: route.path })
|
|
44663
|
+
})
|
|
44664
|
+
)
|
|
44665
|
+
)
|
|
44666
|
+
)
|
|
44617
44667
|
)
|
|
44618
44668
|
);
|
|
44619
44669
|
}
|
|
44620
44670
|
const NineMu = {
|
|
44621
|
-
version: "0.1.
|
|
44671
|
+
version: "0.1.374",
|
|
44622
44672
|
init: (config2) => {
|
|
44623
44673
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
44624
44674
|
}
|