@nine-lab/nine-mu 0.1.346 β†’ 0.1.347

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,6 +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 from "react";
14
15
  class Trace extends trace$1.constructor {
15
16
  constructor() {
16
17
  super();
@@ -17537,7 +17538,7 @@ render_fn = function() {
17537
17538
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
17538
17539
  this.shadowRoot.innerHTML = `
17539
17540
  <style>
17540
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.345"}/dist/css/nine-mu.css";
17541
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.346"}/dist/css/nine-mu.css";
17541
17542
  ${customImport}
17542
17543
  </style>
17543
17544
  <div class="wrapper">
@@ -43787,7 +43788,7 @@ class NineDiff extends HTMLElement {
43787
43788
  const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
43788
43789
  this.shadowRoot.innerHTML = `
43789
43790
  <style>
43790
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.345"}/dist/css/nine-mu.css";
43791
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.346"}/dist/css/nine-mu.css";
43791
43792
  ${customImport}
43792
43793
  </style>
43793
43794
 
@@ -43927,7 +43928,7 @@ renderScaffolding_fn = function() {
43927
43928
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
43928
43929
  this.shadowRoot.innerHTML = `
43929
43930
  <style>
43930
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.345"}/dist/css/nine-mu.css";
43931
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.346"}/dist/css/nine-mu.css";
43931
43932
  ${customImport}
43932
43933
  </style>
43933
43934
 
@@ -44036,7 +44037,7 @@ render_fn2 = function() {
44036
44037
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
44037
44038
  this.shadowRoot.innerHTML = `
44038
44039
  <style>
44039
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.345"}/dist/css/nine-mu.css";
44040
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.346"}/dist/css/nine-mu.css";
44040
44041
  ${customImport}
44041
44042
  </style>
44042
44043
 
@@ -44366,7 +44367,7 @@ class ChatMessageBody extends HTMLElement {
44366
44367
  const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
44367
44368
  this.shadowRoot.innerHTML = `
44368
44369
  <style>
44369
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.345"}/dist/css/nine-mu.css";
44370
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.346"}/dist/css/nine-mu.css";
44370
44371
  ${customImport}
44371
44372
  </style>
44372
44373
 
@@ -44464,8 +44465,84 @@ if (!customElements.get("nine-chat-ing")) {
44464
44465
  if (!customElements.get("nine-chat-progress")) {
44465
44466
  customElements.define("nine-chat-progress", ProgressMessage);
44466
44467
  }
44468
+ class NineExceptionHook extends React.Component {
44469
+ constructor(props) {
44470
+ super(props);
44471
+ this.state = { hasError: false, error: null };
44472
+ this.lastPath = window.location.pathname;
44473
+ this.handleLocationChange = this.handleLocationChange.bind(this);
44474
+ }
44475
+ static getDerivedStateFromError(error) {
44476
+ return { hasError: true, error };
44477
+ }
44478
+ componentDidCatch(error, errorInfo) {
44479
+ console.error("🚨 [Nine-Library] λ³Έλ¬Έ λ Œλ”λ§ μ—λŸ¬ 포착:", error);
44480
+ if (window.triggerAutoRecovery) {
44481
+ window.triggerAutoRecovery(error.message || String(error));
44482
+ }
44483
+ if (this.props.onCatch) {
44484
+ this.props.onCatch(error, errorInfo);
44485
+ }
44486
+ }
44487
+ componentDidMount() {
44488
+ window.addEventListener("popstate", this.handleLocationChange);
44489
+ document.addEventListener("click", this.handleLocationChange, true);
44490
+ }
44491
+ componentWillUnmount() {
44492
+ window.removeEventListener("popstate", this.handleLocationChange);
44493
+ document.removeEventListener("click", this.handleLocationChange, true);
44494
+ }
44495
+ handleLocationChange() {
44496
+ setTimeout(() => {
44497
+ if (this.state.hasError && this.lastPath !== window.location.pathname) {
44498
+ console.log("✨ [Nine-Library] νŽ˜μ΄μ§€ μ£Όμ†Œ λ³€κ²½ 감지 -> λ¦¬μ•‘νŠΈ μ—λŸ¬ μƒνƒœ μ΄ˆκΈ°ν™”");
44499
+ this.lastPath = window.location.pathname;
44500
+ this.setState({ hasError: false, error: null });
44501
+ }
44502
+ }, 10);
44503
+ }
44504
+ render() {
44505
+ var _a2;
44506
+ if (this.state.hasError) {
44507
+ if (this.props.fallback) {
44508
+ return this.props.fallback(this.state.error);
44509
+ }
44510
+ const errorMessage = ((_a2 = this.state.error) == null ? void 0 : _a2.message) || String(this.state.error);
44511
+ return React.createElement(
44512
+ "div",
44513
+ {
44514
+ style: {
44515
+ padding: "30px",
44516
+ margin: "20px",
44517
+ background: "#FFF5F5",
44518
+ border: "1px solid #FEB2B2",
44519
+ borderRadius: "8px",
44520
+ fontFamily: "sans-serif",
44521
+ textAlign: "left",
44522
+ ...this.props.containerStyle
44523
+ }
44524
+ },
44525
+ React.createElement("h3", { style: { color: "#C53030", marginTop: 0, fontSize: "18px" } }, "⚠️ μ»΄ν¬λ„ŒνŠΈ λΉŒλ“œ/λ Œλ”λ§ μ—λŸ¬ 감지"),
44526
+ React.createElement("p", { style: { margin: "10px 0 5px 0", fontWeight: "bold", color: "#4A5568" } }, "[μ—λŸ¬ 원인 둜그]:"),
44527
+ React.createElement("pre", {
44528
+ style: {
44529
+ background: "#1A202C",
44530
+ color: "#EDF2F7",
44531
+ padding: "15px",
44532
+ borderRadius: "6px",
44533
+ overflowX: "auto",
44534
+ whiteSpace: "pre-wrap",
44535
+ fontFamily: "monospace"
44536
+ }
44537
+ }, errorMessage),
44538
+ React.createElement("div", { style: { marginTop: "15px", fontSize: "14px", color: "#718096" } }, "πŸ”„ μ—λŸ¬ λ‘œκ·Έκ°€ κ΄€μ œνƒ‘μœΌλ‘œ μžλ™ ν”Όλ“œλ°±λ˜μ—ˆμŠ΅λ‹ˆλ‹€. AIκ°€ μ†ŒμŠ€ μ½”λ“œλ₯Ό μž¬μˆ˜μ •ν•˜λŠ” λ™μ•ˆ μž μ‹œλ§Œ κΈ°λ‹€λ €μ£Όμ„Έμš”...")
44539
+ );
44540
+ }
44541
+ return this.props.children;
44542
+ }
44543
+ }
44467
44544
  const NineMu = {
44468
- version: "0.1.345",
44545
+ version: "0.1.346",
44469
44546
  init: (config2) => {
44470
44547
  trace$1.log("πŸ› οΈ Nine-Mu Engine initialized", config2);
44471
44548
  }
@@ -44474,6 +44551,7 @@ export {
44474
44551
  NineChat,
44475
44552
  NineDiff,
44476
44553
  NineDiffPopup,
44554
+ NineExceptionHook,
44477
44555
  NineMu,
44478
44556
  NineMu as default
44479
44557
  };