@mindexec/cli 0.2.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/README.md +275 -0
- package/codex-runtime.js +960 -0
- package/launch-bridge.cjs +162 -0
- package/package.json +61 -0
- package/port-guard.cjs +232 -0
- package/scripts/setup-tree-sitter-grammars.mjs +59 -0
- package/server.js +8422 -0
- package/start-bridge.bat +32 -0
- package/start-bridge.sh +81 -0
- package/tree-sitter-grammars/README.md +18 -0
- package/tree-sitter-grammars/tree-sitter-c_sharp.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-go.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-java.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-javascript.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-python.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-rust.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-tsx.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-typescript.wasm +0 -0
- package/wwwroot/MindExecution.Web.styles.css +3 -0
- package/wwwroot/_content/MindExecution.Plugins.Admin/css/admin-dashboard.css +546 -0
- package/wwwroot/_content/MindExecution.Plugins.Directory/MindExecution.Plugins.Directory.u7utcng611.bundle.scp.css +7 -0
- package/wwwroot/_content/MindExecution.Plugins.Directory/background.png +0 -0
- package/wwwroot/_content/MindExecution.Plugins.Directory/directory-manager.js +202 -0
- package/wwwroot/_content/MindExecution.Plugins.Directory/exampleJsInterop.js +6 -0
- package/wwwroot/_content/MindExecution.Plugins.YouTube/css/youtube-search.css +251 -0
- package/wwwroot/_content/MindExecution.Shared/MindExecution.Shared.wsano1j4wp.bundle.scp.css +4 -0
- package/wwwroot/_content/MindExecution.Shared/css/admin-dashboard.css +559 -0
- package/wwwroot/_content/MindExecution.Shared/css/app.css +1 -0
- package/wwwroot/_content/MindExecution.Shared/css/mind-map-overrides.css +2936 -0
- package/wwwroot/_content/MindExecution.Shared/fonts/NotoSansKR-Bold.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/fonts/NotoSansKR-Regular.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/js/agent-visualization.js +359 -0
- package/wwwroot/_content/MindExecution.Shared/js/background-themes.js +1721 -0
- package/wwwroot/_content/MindExecution.Shared/js/code-master.js +8316 -0
- package/wwwroot/_content/MindExecution.Shared/js/file-system-helper.js +639 -0
- package/wwwroot/_content/MindExecution.Shared/js/helpers/InfiniteGridHelper.js +109 -0
- package/wwwroot/_content/MindExecution.Shared/js/marked.min.js +69 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js +7982 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js.backup +1059 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +15803 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-dev-guards.js +325 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-dnd.js +1430 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-dnd.js.bak +434 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-glow-shader.js +260 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-interactions.js +7640 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-plan-worker.js +160 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-renderer.js +9923 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-logic-workers.js +977 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-menu-manager.js +1431 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-multi-select.js +1716 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-node-search-worker.js +553 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-nodes.js +4541 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-object-manager.js +489 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-object-manager.js.backup +372 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-pipeline.js +2075 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-text-lod-system.js +646 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-text-overlay-v2.js +4323 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-texture-factory.js +2260 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-texture-factory.js.backup +1258 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-visibility-worker.js +890 -0
- package/wwwroot/_content/MindExecution.Shared/js/mindmap-toolbar.js +594 -0
- package/wwwroot/_content/MindExecution.Shared/js/native-drop-handler.js +170 -0
- package/wwwroot/_content/MindExecution.Shared/js/plan-master.js +788 -0
- package/wwwroot/_content/MindExecution.Shared/js/renderers/CSS3DRenderer.js +50 -0
- package/wwwroot/_content/MindExecution.Shared/js/texture-worker-manager.js +188 -0
- package/wwwroot/_content/MindExecution.Shared/js/texture-worker.js +208 -0
- package/wwwroot/_content/MindExecution.Shared/js/three.min.js +6 -0
- package/wwwroot/_content/MindExecution.Shared/js/titlebar-handler.js +191 -0
- package/wwwroot/_content/MindExecution.Shared/js/token-manager.js +37 -0
- package/wwwroot/_content/MindExecution.Shared/js/token-worker.js +28 -0
- package/wwwroot/_content/MindExecution.Shared/js/troika-bundle.js +5626 -0
- package/wwwroot/_content/MindExecution.Shared/js/troika-bundle.js.map +7 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/css/all.min.css +9 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-brands-400.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-regular-400.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-solid-900.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
- package/wwwroot/_content/MindExecution.Shared/models/all-MiniLM-L6-v2-quantized.onnx +0 -0
- package/wwwroot/_content/MindExecution.Shared/models/vocab.txt +30522 -0
- package/wwwroot/_framework/Google.Protobuf.9h59ukbel7.dll +0 -0
- package/wwwroot/_framework/Markdig.d1j7v41cl1.dll +0 -0
- package/wwwroot/_framework/MessagePack.Annotations.l6qv48kgpt.dll +0 -0
- package/wwwroot/_framework/MessagePack.eqoptzx9d5.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Authorization.k7dsih5y5g.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Components.6nyje9sa0g.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Components.Authorization.iycd6unprw.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Components.Web.487u3twia4.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Components.WebAssembly.d0gcnmlxxz.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Metadata.h4yevl9adi.dll +0 -0
- package/wwwroot/_framework/Microsoft.CSharp.qrvp77qmhs.dll +0 -0
- package/wwwroot/_framework/Microsoft.Data.Sqlite.jdlxgv2jtg.dll +0 -0
- package/wwwroot/_framework/Microsoft.EntityFrameworkCore.4gjazp7kjf.dll +0 -0
- package/wwwroot/_framework/Microsoft.EntityFrameworkCore.Abstractions.gocudnvz7b.dll +0 -0
- package/wwwroot/_framework/Microsoft.EntityFrameworkCore.Relational.lt4rsvinuo.dll +0 -0
- package/wwwroot/_framework/Microsoft.EntityFrameworkCore.Sqlite.69luj0fa9r.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Caching.Abstractions.364t4jh3zz.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Caching.Memory.izlxhpzosu.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Configuration.8zq7hh41o7.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Configuration.Abstractions.8if74zs6ea.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Configuration.Json.duvlngw8i0.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.DependencyInjection.Abstractions.t2hh9kvx0o.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.DependencyInjection.n4tg99oy8l.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.DependencyModel.h0d06ixk3e.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Logging.Abstractions.rl32bkx2sd.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Logging.dlht1xei0t.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Options.qeunebioml.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Primitives.18cr6vnuuz.dll +0 -0
- package/wwwroot/_framework/Microsoft.IO.RecyclableMemoryStream.r915vovvw4.dll +0 -0
- package/wwwroot/_framework/Microsoft.IdentityModel.Abstractions.1ejljk3erv.dll +0 -0
- package/wwwroot/_framework/Microsoft.IdentityModel.JsonWebTokens.1596zr8gne.dll +0 -0
- package/wwwroot/_framework/Microsoft.IdentityModel.Logging.229uyvpgio.dll +0 -0
- package/wwwroot/_framework/Microsoft.IdentityModel.Tokens.9sibtajc9f.dll +0 -0
- package/wwwroot/_framework/Microsoft.JSInterop.17lq4j1j7g.dll +0 -0
- package/wwwroot/_framework/Microsoft.JSInterop.WebAssembly.ryia5gxiad.dll +0 -0
- package/wwwroot/_framework/Microsoft.ML.OnnxRuntime.w9deo1m5ss.dll +0 -0
- package/wwwroot/_framework/Microsoft.ML.Tokenizers.cm2vuv2z61.dll +0 -0
- package/wwwroot/_framework/Microsoft.NET.StringTools.3qbrf4v2ki.dll +0 -0
- package/wwwroot/_framework/MimeMapping.og9ys58ylm.dll +0 -0
- package/wwwroot/_framework/MindExecution.Core.1q1trifbuu.dll +0 -0
- package/wwwroot/_framework/MindExecution.Kernel.gwwc40sc45.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.Admin.0jgrn1sckv.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.Business.13mme2qcag.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.Concept.dfp2mdt45q.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.Directory.3w4t6n3se0.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.PlanMaster.s0qpntz420.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.YouTube.iu11fq8d16.dll +0 -0
- package/wwwroot/_framework/MindExecution.Shared.7j27dcqnrc.dll +0 -0
- package/wwwroot/_framework/MindExecution.Web.pq1ty8ov2v.dll +0 -0
- package/wwwroot/_framework/Newtonsoft.Json.a56zs13vug.dll +0 -0
- package/wwwroot/_framework/SQLitePCLRaw.batteries_v2.rrd1nzawpp.dll +0 -0
- package/wwwroot/_framework/SQLitePCLRaw.core.1dxloztpfz.dll +0 -0
- package/wwwroot/_framework/SQLitePCLRaw.provider.e_sqlite3.oekyzl53i1.dll +0 -0
- package/wwwroot/_framework/Supabase.Core.s1pkj4aj0l.dll +0 -0
- package/wwwroot/_framework/Supabase.Functions.qz4nu782sg.dll +0 -0
- package/wwwroot/_framework/Supabase.Gotrue.twah27pkik.dll +0 -0
- package/wwwroot/_framework/Supabase.Postgrest.gmuuv369ih.dll +0 -0
- package/wwwroot/_framework/Supabase.Realtime.ox3kchdy3w.dll +0 -0
- package/wwwroot/_framework/Supabase.Storage.fnjnepaowr.dll +0 -0
- package/wwwroot/_framework/Supabase.azmaw5pgcz.dll +0 -0
- package/wwwroot/_framework/System.Collections.Concurrent.y1zmvuyipi.dll +0 -0
- package/wwwroot/_framework/System.Collections.Immutable.ug3j698qms.dll +0 -0
- package/wwwroot/_framework/System.Collections.NonGeneric.h66hj3863h.dll +0 -0
- package/wwwroot/_framework/System.Collections.Specialized.umr3y27ntj.dll +0 -0
- package/wwwroot/_framework/System.Collections.x53e19vfsj.dll +0 -0
- package/wwwroot/_framework/System.ComponentModel.Annotations.tz6gnt4ebt.dll +0 -0
- package/wwwroot/_framework/System.ComponentModel.Primitives.j7tiphu4rg.dll +0 -0
- package/wwwroot/_framework/System.ComponentModel.TypeConverter.ujlztox1gx.dll +0 -0
- package/wwwroot/_framework/System.ComponentModel.x9xz0ojfb6.dll +0 -0
- package/wwwroot/_framework/System.Console.ijzpqmj7ne.dll +0 -0
- package/wwwroot/_framework/System.Data.Common.1r0sqffq1p.dll +0 -0
- package/wwwroot/_framework/System.Diagnostics.DiagnosticSource.9upoqwq09o.dll +0 -0
- package/wwwroot/_framework/System.Diagnostics.Process.m99azzntjm.dll +0 -0
- package/wwwroot/_framework/System.Diagnostics.TraceSource.pl7wv26myr.dll +0 -0
- package/wwwroot/_framework/System.Diagnostics.Tracing.crlhfx6tut.dll +0 -0
- package/wwwroot/_framework/System.Drawing.Primitives.22e4y9ikq9.dll +0 -0
- package/wwwroot/_framework/System.Drawing.mi7d8hwowb.dll +0 -0
- package/wwwroot/_framework/System.Formats.Asn1.jx23sjiqnn.dll +0 -0
- package/wwwroot/_framework/System.IO.Compression.6fyoii3uej.dll +0 -0
- package/wwwroot/_framework/System.IO.Pipelines.vg77t4cd4d.dll +0 -0
- package/wwwroot/_framework/System.IdentityModel.Tokens.Jwt.t67es60z5b.dll +0 -0
- package/wwwroot/_framework/System.Linq.1bkoxlqgmq.dll +0 -0
- package/wwwroot/_framework/System.Linq.Expressions.24xqiypwdt.dll +0 -0
- package/wwwroot/_framework/System.Linq.Queryable.hvd01d6rsa.dll +0 -0
- package/wwwroot/_framework/System.Memory.8dx3lwgym4.dll +0 -0
- package/wwwroot/_framework/System.Net.Http.Json.3mhdm9l1rf.dll +0 -0
- package/wwwroot/_framework/System.Net.Http.eitrz660my.dll +0 -0
- package/wwwroot/_framework/System.Net.NetworkInformation.3pkuofcv9r.dll +0 -0
- package/wwwroot/_framework/System.Net.Ping.8clj5pklrp.dll +0 -0
- package/wwwroot/_framework/System.Net.Primitives.qrp4wcjz1p.dll +0 -0
- package/wwwroot/_framework/System.Net.WebSockets.Client.2u6pv01g69.dll +0 -0
- package/wwwroot/_framework/System.Net.WebSockets.qp6u31zvm5.dll +0 -0
- package/wwwroot/_framework/System.Numerics.Tensors.0c7z4mt3on.dll +0 -0
- package/wwwroot/_framework/System.Numerics.Vectors.kc7ufp2j4l.dll +0 -0
- package/wwwroot/_framework/System.ObjectModel.qv82fot1ib.dll +0 -0
- package/wwwroot/_framework/System.Private.CoreLib.rkafq04oma.dll +0 -0
- package/wwwroot/_framework/System.Private.Uri.t9542hmr6j.dll +0 -0
- package/wwwroot/_framework/System.Private.Xml.Linq.n8n3ptrbwu.dll +0 -0
- package/wwwroot/_framework/System.Private.Xml.rxd3tytisn.dll +0 -0
- package/wwwroot/_framework/System.Reactive.t3fuon548l.dll +0 -0
- package/wwwroot/_framework/System.Reflection.Emit.9tjhp6y0j3.dll +0 -0
- package/wwwroot/_framework/System.Reflection.Emit.ILGeneration.stxyk8zoo1.dll +0 -0
- package/wwwroot/_framework/System.Reflection.Emit.Lightweight.6xrd5v8vg0.dll +0 -0
- package/wwwroot/_framework/System.Reflection.Primitives.wgn8fpwwvv.dll +0 -0
- package/wwwroot/_framework/System.Runtime.InteropServices.JavaScript.sliym526xh.dll +0 -0
- package/wwwroot/_framework/System.Runtime.InteropServices.RuntimeInformation.oji7zut14z.dll +0 -0
- package/wwwroot/_framework/System.Runtime.InteropServices.te07xr2we9.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Intrinsics.507y4h8nzq.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Loader.v7gk4bse0k.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Numerics.eqy5xjv3nd.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Serialization.Formatters.zpkrub8lab.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Serialization.Primitives.vhkpnbxjip.dll +0 -0
- package/wwwroot/_framework/System.Runtime.jn319d5nyg.dll +0 -0
- package/wwwroot/_framework/System.Security.Claims.0ztig1q9vo.dll +0 -0
- package/wwwroot/_framework/System.Security.Cryptography.vttizqc9ho.dll +0 -0
- package/wwwroot/_framework/System.Text.Encoding.Extensions.utdd47ny8f.dll +0 -0
- package/wwwroot/_framework/System.Text.Encodings.Web.wah8r1zoe0.dll +0 -0
- package/wwwroot/_framework/System.Text.Json.kxlfxj0wrs.dll +0 -0
- package/wwwroot/_framework/System.Text.RegularExpressions.dbqn58klox.dll +0 -0
- package/wwwroot/_framework/System.Threading.42ao9vi047.dll +0 -0
- package/wwwroot/_framework/System.Threading.Channels.hfa7j0uv2w.dll +0 -0
- package/wwwroot/_framework/System.Threading.Thread.caul0pdqul.dll +0 -0
- package/wwwroot/_framework/System.Transactions.Local.fimi2hamzo.dll +0 -0
- package/wwwroot/_framework/System.Web.HttpUtility.gq8yz50p2e.dll +0 -0
- package/wwwroot/_framework/System.Xml.Linq.kitin4zjoj.dll +0 -0
- package/wwwroot/_framework/System.Xml.ReaderWriter.kzvw3qgxb0.dll +0 -0
- package/wwwroot/_framework/System.Xml.XDocument.c539ki6cuq.dll +0 -0
- package/wwwroot/_framework/System.m05i39uvk9.dll +0 -0
- package/wwwroot/_framework/Websocket.Client.vapounvmnl.dll +0 -0
- package/wwwroot/_framework/blazor.boot.json +305 -0
- package/wwwroot/_framework/blazor.webassembly.js +1 -0
- package/wwwroot/_framework/dotnet.js +4 -0
- package/wwwroot/_framework/dotnet.native.vz0adxojrz.wasm +0 -0
- package/wwwroot/_framework/dotnet.native.xsn1d6x2kd.js +16 -0
- package/wwwroot/_framework/dotnet.runtime.dstopyvqzi.js +4 -0
- package/wwwroot/_framework/icudt_CJK.tjcz0u77k5.dat +0 -0
- package/wwwroot/_framework/icudt_EFIGS.tptq2av103.dat +0 -0
- package/wwwroot/_framework/icudt_no_CJK.lfu7j35m59.dat +0 -0
- package/wwwroot/_framework/netstandard.0xet7jg7ky.dll +0 -0
- package/wwwroot/_headers +40 -0
- package/wwwroot/_redirects +1 -0
- package/wwwroot/appsettings.json +71 -0
- package/wwwroot/icon-192.png +0 -0
- package/wwwroot/icon-512.png +0 -0
- package/wwwroot/index.html +710 -0
- package/wwwroot/js/marketing-tool.js +180 -0
- package/wwwroot/manifest.webmanifest +22 -0
- package/wwwroot/robots.txt +4 -0
- package/wwwroot/service-worker-assets.js +857 -0
- package/wwwroot/service-worker.js +33 -0
- package/wwwroot/sitemap.xml +27 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
// Initialize namespace
|
|
2
|
+
window.MindMapPlugins = window.MindMapPlugins || {};
|
|
3
|
+
|
|
4
|
+
(function () {
|
|
5
|
+
// Directory handle store (Key: NodeId, Value: FileSystemDirectoryHandle)
|
|
6
|
+
const directoryHandles = new Map();
|
|
7
|
+
|
|
8
|
+
const DirectoryPlugin = {
|
|
9
|
+
// 1) Register renderer (attach plugin to MindMapTextureFactory)
|
|
10
|
+
registerRenderer: function () {
|
|
11
|
+
if (window.MindMapTextureFactory) {
|
|
12
|
+
window.MindMapTextureFactory.registerRenderer('directory', {
|
|
13
|
+
draw: drawDirectoryNode
|
|
14
|
+
});
|
|
15
|
+
console.log('[DirectoryPlugin] Renderer registered.');
|
|
16
|
+
} else {
|
|
17
|
+
console.warn('[DirectoryPlugin] MindMapTextureFactory not found');
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
// ▼▼▼ [New] Register a text-file handler in the DnD registry ▼▼▼
|
|
22
|
+
registerDnDHandler: function () {
|
|
23
|
+
if (!window.MindMapFileRegistry) {
|
|
24
|
+
console.warn('[DirectoryPlugin] MindMapFileRegistry not found');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Check whether it's already registered
|
|
29
|
+
if (window.MindMapFileRegistry.some(h => h.name === 'DirectoryPluginText')) {
|
|
30
|
+
console.log('[DirectoryPlugin] Text handler already registered');
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const codeExtensions = ['.cs', '.js', '.razor', '.css', '.html', '.json', '.txt', '.md', '.xml', '.sql', '.py', '.java', '.cpp', '.c', '.h'];
|
|
35
|
+
|
|
36
|
+
window.MindMapFileRegistry.push({
|
|
37
|
+
name: 'DirectoryPluginText',
|
|
38
|
+
priority: 10, // Process after core handlers (0, 5)
|
|
39
|
+
check: (file) => {
|
|
40
|
+
const ext = ('.' + (file.name.split('.').pop() || '')).toLowerCase();
|
|
41
|
+
const isCodeFile = codeExtensions.includes(ext);
|
|
42
|
+
const isTextType = file.type.startsWith('text/');
|
|
43
|
+
return isCodeFile || isTextType;
|
|
44
|
+
},
|
|
45
|
+
getType: (file) => 'text'
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
console.log('[DirectoryPlugin] DnD Text/Code file handler registered');
|
|
49
|
+
},
|
|
50
|
+
// ▲▲▲ [New] ▲▲▲
|
|
51
|
+
|
|
52
|
+
// 2) Double-click handler
|
|
53
|
+
handleDoubleClick: async function (nodeId, metadata) {
|
|
54
|
+
// If we already have a handle: refresh (re-scan). Otherwise: open directory picker.
|
|
55
|
+
let handle = directoryHandles.get(nodeId);
|
|
56
|
+
|
|
57
|
+
if (!handle) {
|
|
58
|
+
try {
|
|
59
|
+
handle = await window.showDirectoryPicker();
|
|
60
|
+
directoryHandles.set(nodeId, handle);
|
|
61
|
+
console.log(`[DirectoryPlugin] Handle acquired for node ${nodeId}`);
|
|
62
|
+
|
|
63
|
+
// Optionally request a name update in C# (omitted here; implement if needed)
|
|
64
|
+
} catch (err) {
|
|
65
|
+
if (err.name !== 'AbortError') console.error('[DirectoryPlugin] Error:', err);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ▼▼▼ [Change] Actual directory scan logic ▼▼▼
|
|
71
|
+
try {
|
|
72
|
+
// 1) Re-check permission (handle can expire after refresh)
|
|
73
|
+
if ((await handle.queryPermission({ mode: 'read' })) !== 'granted') {
|
|
74
|
+
if ((await handle.requestPermission({ mode: 'read' })) !== 'granted') {
|
|
75
|
+
console.warn(`[DirectoryPlugin] Permission denied for node ${nodeId}`);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// 2) Scan file list (recursive)
|
|
81
|
+
const files = [];
|
|
82
|
+
const parseMetadata = (metadata) => {
|
|
83
|
+
const includes = metadata?.['Include'] ? metadata['Include'].split(',').map(s => s.trim().toLowerCase()) : [];
|
|
84
|
+
const excludes = metadata?.['Exclude'] ? metadata['Exclude'].split(',').map(s => s.trim().toLowerCase()) : [];
|
|
85
|
+
return { includes, excludes };
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const { includes, excludes } = parseMetadata(metadata);
|
|
89
|
+
|
|
90
|
+
async function scan(dirHandle, path = "") {
|
|
91
|
+
for await (const entry of dirHandle.values()) {
|
|
92
|
+
const entryPath = path ? `${path}/${entry.name}` : entry.name;
|
|
93
|
+
|
|
94
|
+
// Exclude filter
|
|
95
|
+
const shouldExclude = excludes.some(exc => entry.name.toLowerCase().includes(exc));
|
|
96
|
+
if (shouldExclude) {
|
|
97
|
+
console.log(`[DirectoryPlugin] Skipping excluded: ${entryPath}`);
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (entry.kind === 'file') {
|
|
102
|
+
const ext = entry.name.split('.').pop()?.toLowerCase() || '';
|
|
103
|
+
|
|
104
|
+
// Include filter (if includes is empty, include all files)
|
|
105
|
+
const shouldInclude = includes.length === 0 || includes.some(inc => inc.includes(`.${ext}`));
|
|
106
|
+
|
|
107
|
+
if (shouldInclude) {
|
|
108
|
+
files.push({ name: entry.name, path: entryPath, kind: 'file', size: 0 });
|
|
109
|
+
}
|
|
110
|
+
} else if (entry.kind === 'directory') {
|
|
111
|
+
files.push({ name: entry.name, path: entryPath, kind: 'directory', size: 0 });
|
|
112
|
+
// Recurse into subdirectories
|
|
113
|
+
await scan(entry, entryPath);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
await scan(handle);
|
|
119
|
+
|
|
120
|
+
// 3) Log results (console)
|
|
121
|
+
const fileCount = files.filter(f => f.kind === 'file').length;
|
|
122
|
+
const dirCount = files.filter(f => f.kind === 'directory').length;
|
|
123
|
+
|
|
124
|
+
console.log(`[DirectoryPlugin] Scan complete: ${fileCount} files, ${dirCount} directories found in ${handle.name}`);
|
|
125
|
+
console.table(files.slice(0, 20)); // Show only the first 20 entries
|
|
126
|
+
|
|
127
|
+
// 4) TODO: Add child-node creation logic here
|
|
128
|
+
// Example: dotNetHelper.invokeMethodAsync('CreateChildNodes', nodeId, files);
|
|
129
|
+
|
|
130
|
+
alert(`✅ Scan Complete: ${handle.name}\n\n📁 Directories: ${dirCount}\n📄 Files: ${fileCount}\n\n(Child node creation coming soon)`);
|
|
131
|
+
} catch (err) {
|
|
132
|
+
console.error(`[DirectoryPlugin] Scan error:`, err);
|
|
133
|
+
alert(`❌ Scan Failed: ${err.message}`);
|
|
134
|
+
}
|
|
135
|
+
// ▲▲▲ [Change] ▲▲▲
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// --- Canvas Renderer (draw a yellow folder icon) ---
|
|
140
|
+
function drawDirectoryNode(ctx, nodeModel, width, height, zoomLevel, isSelected) {
|
|
141
|
+
// 1) Background (folder-tab shape)
|
|
142
|
+
const radius = 8 * zoomLevel;
|
|
143
|
+
const tabHeight = 14 * zoomLevel;
|
|
144
|
+
const tabWidth = 60 * zoomLevel;
|
|
145
|
+
const border = isSelected ? 4 * zoomLevel : 2 * zoomLevel;
|
|
146
|
+
|
|
147
|
+
const bgColor = isSelected ? '#FEF3C7' : '#FFFBEB'; // bg-amber-100
|
|
148
|
+
const strokeColor = isSelected ? '#D97706' : '#F59E0B'; // border-amber-600
|
|
149
|
+
|
|
150
|
+
ctx.beginPath();
|
|
151
|
+
// Tab section
|
|
152
|
+
ctx.moveTo(0, tabHeight);
|
|
153
|
+
ctx.lineTo(0, radius);
|
|
154
|
+
ctx.quadraticCurveTo(0, 0, radius, 0);
|
|
155
|
+
ctx.lineTo(tabWidth - radius, 0);
|
|
156
|
+
ctx.quadraticCurveTo(tabWidth, 0, tabWidth, tabHeight);
|
|
157
|
+
ctx.lineTo(width, tabHeight); // Extend to the top-right
|
|
158
|
+
ctx.lineTo(width, height - radius);
|
|
159
|
+
ctx.quadraticCurveTo(width, height, width - radius, height);
|
|
160
|
+
ctx.lineTo(radius, height);
|
|
161
|
+
ctx.quadraticCurveTo(0, height, 0, height - radius);
|
|
162
|
+
ctx.closePath();
|
|
163
|
+
|
|
164
|
+
ctx.fillStyle = bgColor;
|
|
165
|
+
ctx.fill();
|
|
166
|
+
ctx.lineWidth = border;
|
|
167
|
+
ctx.strokeStyle = strokeColor;
|
|
168
|
+
ctx.stroke();
|
|
169
|
+
|
|
170
|
+
// 2) Icon and text
|
|
171
|
+
const padding = 16 * zoomLevel;
|
|
172
|
+
const fontSize = 16 * zoomLevel;
|
|
173
|
+
|
|
174
|
+
ctx.font = `bold ${fontSize}px Inter, sans-serif`;
|
|
175
|
+
ctx.fillStyle = '#92400E'; // text-amber-800
|
|
176
|
+
ctx.textBaseline = 'top';
|
|
177
|
+
|
|
178
|
+
// Title (folder name)
|
|
179
|
+
const title = nodeModel.prompt || "New Folder";
|
|
180
|
+
ctx.fillText("📂 " + title, padding, tabHeight + padding);
|
|
181
|
+
|
|
182
|
+
// Filter info (from metadata)
|
|
183
|
+
ctx.font = `${12 * zoomLevel}px monospace`;
|
|
184
|
+
ctx.fillStyle = '#B45309';
|
|
185
|
+
|
|
186
|
+
let metaY = tabHeight + padding + fontSize + (8 * zoomLevel);
|
|
187
|
+
const include = nodeModel.metadata?.['Include'] || 'All';
|
|
188
|
+
ctx.fillText(`Include: ${truncate(include, 20)}`, padding, metaY);
|
|
189
|
+
|
|
190
|
+
metaY += (14 * zoomLevel);
|
|
191
|
+
const exclude = nodeModel.metadata?.['Exclude'] || 'None';
|
|
192
|
+
ctx.fillText(`Exclude: ${truncate(exclude, 20)}`, padding, metaY);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function truncate(str, max) {
|
|
196
|
+
return str.length > max ? str.substring(0, max) + "..." : str;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Expose globally
|
|
200
|
+
window.MindMapPlugins.Directory = DirectoryPlugin;
|
|
201
|
+
|
|
202
|
+
})();
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
.yt-page {
|
|
2
|
+
width: min(1240px, calc(100vw - 110px));
|
|
3
|
+
margin: 0 auto;
|
|
4
|
+
color: #0f172a;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.yt-header {
|
|
8
|
+
margin-bottom: 16px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.yt-header h1 {
|
|
12
|
+
font-size: 28px;
|
|
13
|
+
font-weight: 800;
|
|
14
|
+
margin: 0 0 4px 0;
|
|
15
|
+
letter-spacing: -0.02em;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.yt-header p {
|
|
19
|
+
margin: 0;
|
|
20
|
+
color: #475569;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.yt-search-panel {
|
|
24
|
+
background: #ffffff;
|
|
25
|
+
border: 1px solid #e2e8f0;
|
|
26
|
+
border-radius: 12px;
|
|
27
|
+
padding: 14px;
|
|
28
|
+
margin-bottom: 14px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.yt-query-row {
|
|
32
|
+
display: grid;
|
|
33
|
+
grid-template-columns: 1fr auto;
|
|
34
|
+
gap: 10px;
|
|
35
|
+
margin-bottom: 12px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.yt-query-input,
|
|
39
|
+
.yt-filter-grid input,
|
|
40
|
+
.yt-filter-grid select {
|
|
41
|
+
border: 1px solid #cbd5e1;
|
|
42
|
+
border-radius: 8px;
|
|
43
|
+
background: #fff;
|
|
44
|
+
color: #0f172a;
|
|
45
|
+
padding: 8px 10px;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.yt-filter-grid {
|
|
50
|
+
display: grid;
|
|
51
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
52
|
+
gap: 8px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.yt-filter-grid label {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: 4px;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
color: #475569;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.yt-primary-btn,
|
|
65
|
+
.yt-secondary-btn,
|
|
66
|
+
.yt-link-btn {
|
|
67
|
+
border-radius: 8px;
|
|
68
|
+
padding: 8px 12px;
|
|
69
|
+
font-size: 13px;
|
|
70
|
+
font-weight: 700;
|
|
71
|
+
border: 1px solid transparent;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.yt-primary-btn {
|
|
75
|
+
background: #dc2626;
|
|
76
|
+
color: #fff;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.yt-primary-btn:disabled,
|
|
80
|
+
.yt-secondary-btn:disabled {
|
|
81
|
+
opacity: 0.45;
|
|
82
|
+
cursor: not-allowed;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.yt-secondary-btn {
|
|
86
|
+
background: #f8fafc;
|
|
87
|
+
border-color: #cbd5e1;
|
|
88
|
+
color: #0f172a;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.yt-link-btn {
|
|
92
|
+
background: #fff;
|
|
93
|
+
border-color: #e2e8f0;
|
|
94
|
+
color: #2563eb;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.yt-banner {
|
|
98
|
+
border-radius: 10px;
|
|
99
|
+
padding: 10px 12px;
|
|
100
|
+
margin-bottom: 10px;
|
|
101
|
+
font-size: 13px;
|
|
102
|
+
font-weight: 600;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.yt-banner-error {
|
|
106
|
+
background: #fef2f2;
|
|
107
|
+
color: #b91c1c;
|
|
108
|
+
border: 1px solid #fecaca;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.yt-banner-info {
|
|
112
|
+
background: #eff6ff;
|
|
113
|
+
color: #1d4ed8;
|
|
114
|
+
border: 1px solid #bfdbfe;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.yt-actions-row {
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: space-between;
|
|
121
|
+
gap: 10px;
|
|
122
|
+
margin-bottom: 10px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.yt-selection-summary {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: 8px;
|
|
129
|
+
font-size: 13px;
|
|
130
|
+
font-weight: 700;
|
|
131
|
+
color: #334155;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.yt-badge {
|
|
135
|
+
background: #dcfce7;
|
|
136
|
+
color: #166534;
|
|
137
|
+
border: 1px solid #86efac;
|
|
138
|
+
border-radius: 999px;
|
|
139
|
+
font-size: 11px;
|
|
140
|
+
line-height: 1;
|
|
141
|
+
padding: 4px 7px;
|
|
142
|
+
text-transform: uppercase;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.yt-actions {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
gap: 8px;
|
|
149
|
+
flex-wrap: wrap;
|
|
150
|
+
justify-content: flex-end;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.yt-results-grid {
|
|
154
|
+
display: grid;
|
|
155
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
156
|
+
gap: 10px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.yt-card {
|
|
160
|
+
background: #fff;
|
|
161
|
+
border: 1px solid #e2e8f0;
|
|
162
|
+
border-radius: 10px;
|
|
163
|
+
padding: 10px;
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-direction: column;
|
|
166
|
+
gap: 8px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.yt-card-top {
|
|
170
|
+
display: flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
justify-content: space-between;
|
|
173
|
+
gap: 8px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.yt-check {
|
|
177
|
+
display: inline-flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
gap: 6px;
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
color: #334155;
|
|
182
|
+
font-weight: 700;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.yt-thumb {
|
|
186
|
+
width: 100%;
|
|
187
|
+
aspect-ratio: 16 / 9;
|
|
188
|
+
object-fit: cover;
|
|
189
|
+
border-radius: 8px;
|
|
190
|
+
border: 1px solid #e2e8f0;
|
|
191
|
+
background: #f8fafc;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.yt-title {
|
|
195
|
+
margin: 0;
|
|
196
|
+
font-size: 14px;
|
|
197
|
+
font-weight: 700;
|
|
198
|
+
color: #0f172a;
|
|
199
|
+
line-height: 1.35;
|
|
200
|
+
display: -webkit-box;
|
|
201
|
+
-webkit-line-clamp: 2;
|
|
202
|
+
-webkit-box-orient: vertical;
|
|
203
|
+
overflow: hidden;
|
|
204
|
+
min-height: 38px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.yt-meta {
|
|
208
|
+
margin: 0;
|
|
209
|
+
display: flex;
|
|
210
|
+
justify-content: space-between;
|
|
211
|
+
gap: 6px;
|
|
212
|
+
font-size: 12px;
|
|
213
|
+
color: #475569;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.yt-pagination {
|
|
217
|
+
margin-top: 12px;
|
|
218
|
+
display: flex;
|
|
219
|
+
justify-content: center;
|
|
220
|
+
gap: 8px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@media (max-width: 1100px) {
|
|
224
|
+
.yt-filter-grid {
|
|
225
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.yt-results-grid {
|
|
229
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@media (max-width: 720px) {
|
|
234
|
+
.yt-page {
|
|
235
|
+
width: calc(100vw - 60px);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.yt-query-row {
|
|
239
|
+
grid-template-columns: 1fr;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.yt-filter-grid,
|
|
243
|
+
.yt-results-grid {
|
|
244
|
+
grid-template-columns: 1fr;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.yt-actions-row {
|
|
248
|
+
flex-direction: column;
|
|
249
|
+
align-items: stretch;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/* _content/MindExecution.Shared/Pages/Shared/MapNode.razor.rz.scp.css */
|
|
2
|
+
/* This file is intentionally empty to prevent CSS isolation conflicts.
|
|
3
|
+
All MapNode styles have been moved to Client\Styles\app.css for global application.
|
|
4
|
+
This prevents style inheritance issues when JavaScript clones DOM elements into the 3D scene. */
|