├── .npmrc ├── src ├── NodeFlow │ ├── .gitignore │ ├── component │ │ ├── nodeItem │ │ │ ├── base │ │ │ │ ├── README.md │ │ │ │ ├── EnumItem.vue │ │ │ │ └── StringItem.vue │ │ │ ├── flow │ │ │ │ ├── README.md │ │ │ │ ├── FlowItem.vue │ │ │ │ ├── FlowDelayItem.vue │ │ │ │ ├── FlowEvalItem.vue │ │ │ │ └── FlowReqItem.vue │ │ │ ├── README.md │ │ │ ├── feat │ │ │ │ ├── README.md │ │ │ │ ├── StartItem.vue │ │ │ │ └── FeatItem.vue │ │ │ ├── color │ │ │ │ └── ColorItem.vue │ │ │ ├── ItemNodeSlot.vue │ │ │ └── view │ │ │ │ └── MarkdownItem.vue │ │ ├── README.md │ │ ├── node │ │ │ ├── README.md │ │ │ ├── ComfyUINodeGroup.vue │ │ │ ├── ObcanvasNode.vue │ │ │ ├── ComfyUINode.vue │ │ │ ├── CommonNode.vue │ │ │ ├── ItemNode2.vue │ │ │ └── ItemNode.vue │ │ ├── utils │ │ │ ├── dropdownButton.vue │ │ │ └── InteractionControls.vue │ │ └── container │ │ │ ├── fullScreen.ts │ │ │ └── NodeFlowContainerS.vue │ ├── README.md │ ├── index.ts │ ├── utils │ │ ├── main │ │ │ ├── setting.ts │ │ │ └── factoryVueDom.ts │ │ ├── serializeTool │ │ │ └── serializeFlowData.ts │ │ ├── jsonTool │ │ │ ├── factoryFlowData_obcanvas.ts │ │ │ ├── factoryFlowData.ts │ │ │ ├── factoryFlowData_vueflow.ts │ │ │ └── factoryFlowData_item.ts │ │ └── testData │ │ │ └── ueData.js │ ├── tsconfig.json │ ├── stores │ │ └── stores.ts │ └── package.json ├── General │ ├── EditableBlock │ │ ├── LICENSE │ │ ├── README.deprecated.md │ │ ├── LLog.ts │ │ ├── README.zh.md │ │ └── README.md │ └── README.md ├── EditableBlockApp │ ├── README.deprecated.md │ ├── public │ │ └── favicon.ico │ ├── src │ │ ├── components │ │ │ ├── goldenLayout │ │ │ │ ├── README.md │ │ │ │ ├── GlComponent.vue │ │ │ │ └── predefined-layouts.ts │ │ │ ├── MarkdownEditor.vue │ │ │ ├── MarkdownCodeMirror2.vue │ │ │ ├── MarkdownViewer.vue │ │ │ └── MarkdownCodeMirror.vue │ │ ├── main.ts │ │ ├── codemirrorAdapt │ │ │ ├── EditableBlock_Code_Widget.ts │ │ │ └── EditableBlock_Cm.ts │ │ ├── App.vue │ │ ├── index_mdit.ts │ │ └── utils │ │ │ └── preset_map.js │ ├── README.md │ ├── index.html │ ├── tsconfig.json │ ├── vite.config.js │ └── package.json ├── NodeFlowApp │ ├── public │ │ └── favicon.ico │ ├── src │ │ ├── components │ │ │ ├── goldenLayout │ │ │ │ ├── README.md │ │ │ │ ├── predefined-layouts.ts │ │ │ │ └── GlComponent.vue │ │ │ ├── AutoEditor.vue │ │ │ ├── NodeEditor.vue │ │ │ ├── JsonEditor.vue │ │ │ └── NodeList.vue │ │ ├── main.ts │ │ └── App.vue │ ├── README.md │ ├── index.html │ ├── package.json │ ├── tsconfig.json │ └── vite.config.js ├── NodeFlowObsidian │ ├── shims-vue.d.ts │ ├── tsconfig.json │ ├── main.css │ ├── package.json │ ├── NodeFlowFileView.ts │ ├── vite.config.js │ ├── NodeFlowView.ts │ ├── esbuild.config.mjs │ ├── README.md │ └── main.ts ├── NodeFlowVuepress │ ├── index.ts │ ├── MyVueFlow.vue │ ├── index_mdit.ts │ ├── clientConfig.ts │ └── README.md └── README.md ├── .eslintignore ├── pnpm-workspace.yaml ├── versions.json ├── .vscode ├── settings.json └── extensions.json ├── docs ├── image.png └── README.md ├── .editorconfig ├── shims.d.ts ├── .gitignore ├── tsconfig.json ├── version-bump.mjs ├── .eslintrc ├── manifest.json ├── package.json ├── .github └── workflows │ └── nodejs-build.yml └── README.md /.npmrc: -------------------------------------------------------------------------------- 1 | tag-version-prefix="" -------------------------------------------------------------------------------- /src/NodeFlow/.gitignore: -------------------------------------------------------------------------------- 1 | *.min.css 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | npm node_modules 2 | build -------------------------------------------------------------------------------- /src/General/EditableBlock/LICENSE: -------------------------------------------------------------------------------- 1 | NO LICENSE 2 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - src/* 3 | catalog: 4 | -------------------------------------------------------------------------------- /src/EditableBlockApp/README.deprecated.md: -------------------------------------------------------------------------------- 1 | 该文件夹将弃用,转而将其内容置于一个独立项目 2 | -------------------------------------------------------------------------------- /src/General/EditableBlock/README.deprecated.md: -------------------------------------------------------------------------------- 1 | 该文件夹将弃用,转而将其内容置于一个独立项目 2 | -------------------------------------------------------------------------------- /versions.json: -------------------------------------------------------------------------------- 1 | { 2 | "1.0.0": "0.9.7", 3 | "1.0.1": "0.12.0" 4 | } 5 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "commentTranslate.hover.enabled": false 3 | } -------------------------------------------------------------------------------- /src/NodeFlow/component/nodeItem/base/README.md: -------------------------------------------------------------------------------- 1 | # 字符串节点项 2 | 3 | 输入输出字符串 4 | -------------------------------------------------------------------------------- /docs/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LincZero/obsidian-node-flow/HEAD/docs/image.png -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # NodeFlow Docs 2 | 3 | 详见 https://linczero.github.io/MdNote_Public/ProductDoc/Plugin/NodeFlow/ 4 | -------------------------------------------------------------------------------- /src/NodeFlowApp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LincZero/obsidian-node-flow/HEAD/src/NodeFlowApp/public/favicon.ico -------------------------------------------------------------------------------- /src/EditableBlockApp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LincZero/obsidian-node-flow/HEAD/src/EditableBlockApp/public/favicon.ico -------------------------------------------------------------------------------- /src/NodeFlow/component/nodeItem/flow/README.md: -------------------------------------------------------------------------------- 1 | # 流程节点项 2 | 3 | 特点: 都包含流程socket,节点名均以 `flow` 开头 4 | 5 | 功能上,往往只关注邻居节点 (上一个和下一个),而不关注全部节点 6 | -------------------------------------------------------------------------------- /src/NodeFlowApp/src/components/goldenLayout/README.md: -------------------------------------------------------------------------------- 1 | 需要组件:`npm i -S golden-layout` 2 | 3 | 参考示例库:https://github.com/emedware/v3-gl-ext 4 | -------------------------------------------------------------------------------- /src/EditableBlockApp/src/components/goldenLayout/README.md: -------------------------------------------------------------------------------- 1 | 需要组件:`pnpm i -S golden-layout` 2 | 3 | 参考示例库:https://github.com/emedware/v3-gl-ext 4 | -------------------------------------------------------------------------------- /src/NodeFlow/component/nodeItem/README.md: -------------------------------------------------------------------------------- 1 | # 节点项 2 | 3 | 节点由不同的节点项组成,使用不同的节点项可以轻易自定义节点 (甚至是无代码的情况下自定义节点) 4 | 5 | ## 命名 6 | 7 | 节点项组件的结尾均以 `Item` 结尾 8 | -------------------------------------------------------------------------------- /src/NodeFlow/component/nodeItem/feat/README.md: -------------------------------------------------------------------------------- 1 | # 调试/功能节点项 2 | 3 | 特点: 都包含功能按钮。基本没有IO口,相当于就是把节点当成控制面板用 (万物皆节点项,这些功能也不例外) 4 | 5 | comfyui 的许多不表现为节点的插件,其实也是节点,也是万物皆节点的一种思想 6 | -------------------------------------------------------------------------------- /src/General/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | general, shared, utils 都是通用部分,但这里规范: 4 | 5 | - general: 要求必须与该项目无关,即该文件夹中的内容,可以迁移到其他项目中复用 6 | - shared: 多个组件需要共用 7 | - utils: 小工具,由于都是小工具所以有时能复用,但本身不强调复用 8 | -------------------------------------------------------------------------------- /src/NodeFlowObsidian/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import { DefineComponent } from 'vue' 3 | const component: DefineComponent<{}, {}, any> 4 | export default component 5 | } 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 2 9 | tab_width = 4 10 | -------------------------------------------------------------------------------- /src/NodeFlow/README.md: -------------------------------------------------------------------------------- 1 | # NodeFlow核心模块 2 | 3 | 使用示例见与该文件夹同目录下的另外几个用例 (obsidian、app、vuepress) 4 | 5 | 注意:使用时首先需要为 `nfSetting` 的适配函数提供实现 6 | 7 | ## 使用 8 | 9 | 避免直接使用 vueflow api 10 | 11 | 12 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "spook.easysass", 5 | "intellsmi.comment-translate", 6 | "wiensss.region-highlighter" 7 | ] 8 | } -------------------------------------------------------------------------------- /src/NodeFlow/index.ts: -------------------------------------------------------------------------------- 1 | export { nfSetting } from "./utils/main/setting" 2 | export { factoryVueDom } from "./utils/main/factoryVueDom" // [环境]非obsidian环境要注释掉 3 | import { serializeFlowData } from './utils/serializeTool/serializeFlowData' // [环境]非obsidian环境(或非可写环境)要注释掉 4 | -------------------------------------------------------------------------------- /src/NodeFlowVuepress/index.ts: -------------------------------------------------------------------------------- 1 | import { getDirname, path } from "@vuepress/utils" 2 | 3 | export default (options, ctx) => { 4 | return { 5 | name: 'vuepress-plugin-vue-flow', 6 | clientConfigFile: path.resolve(__dirname, 'clientConfig.ts'), 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /shims.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import { ComponentOptions, DefineComponent } from 'vue'; 3 | // const componentOptions: ComponentOptions; 4 | // export default componentOptions; 5 | const defineComponent: DefineComponent; 6 | export default defineComponent; 7 | } -------------------------------------------------------------------------------- /src/NodeFlowApp/README.md: -------------------------------------------------------------------------------- 1 | # NodeFlowApp 2 | 3 | App版本的编译:(两种方法都可以) 4 | 5 | 方法一: 6 | 7 | ```bash 8 | cd src/NodeFlowApp 9 | npm install 10 | npm run dev # or npm run build 11 | ``` 12 | 13 | 方法二: 14 | 15 | ```bash 16 | npm run app:dev # or npm run app:build 17 | ``` 18 | -------------------------------------------------------------------------------- /src/EditableBlockApp/README.md: -------------------------------------------------------------------------------- 1 | # EditableCodeblock App 2 | 3 | App版本的编译: 4 | 5 | 方法一: 6 | 7 | ```bash 8 | cd src/EditableCodeblockApp 9 | pnpm install 10 | pnpm dev # or pnpm build 11 | ``` 12 | 13 | 方法二: 14 | 15 | ```bash 16 | pnpm app2:dev # or onpm app2:build 17 | ``` 18 | -------------------------------------------------------------------------------- /src/NodeFlow/component/README.md: -------------------------------------------------------------------------------- 1 | # 组件.README 2 | 3 | 这里模拟一下继承/实现树 4 | 5 | 组件包含树 6 | 7 | - NodeFlowContainerS | 区域容器, 通用按钮 8 | - NodeFlow | 画布, 节点有关的按钮 9 | - ItemNode | 节点 10 | - NodeItems | 节点项 11 | 12 | 继承树 13 | 14 | - ItemNodeSlot.vue | 节点项的抽象基类 15 | - …… | 节点项 16 | -------------------------------------------------------------------------------- /src/NodeFlowApp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |JavaScript can change HTML content.
53 | 54 | 58 | 59 | 60 | 61 | \`\`\` 62 | 63 | ## 基本md语法 64 | 65 | 标题略 66 | 67 | 内联: **bord** *i* ~~delete~~ ==highlight== \`inline code\` $\\frac 12$ 68 | 69 | 列表 70 | 71 | - 1 72 | - 2 73 | - 3 74 | - 4 75 | - 5 76 | 77 | 引用块 78 | 79 | > [!note] 80 | > This is a note block. 81 | 82 | 代码块 83 | 84 | \`\`\`js 85 | 86 | 87 | 88 | 89 |JavaScript can change HTML content.
92 | 93 | 97 | 98 | 99 | 100 | \`\`\` 101 | 102 | 公式块 103 | 104 | $$ 105 | \\frac 12 106 | $$ 107 | 108 | mermaid块 109 | 110 | (略) 111 | 112 | 表格 113 | 114 | | 1 | 2 | 115 | |---|---| 116 | | 3 | 4 | 117 | 118 | ## 嵌套测试 119 | 120 | 引用块包含简单Markdown 121 | 122 | > 引用块开头 123 | > 124 | > 内联: **bord** *i* ~~delete~~ ==highlight== \`inline code\` $\\frac 12$ 125 | > 126 | > - 列表项 127 | > 128 | > 引用块结尾 129 | 130 | 引用块包含代码块 131 | 132 | > 引用块开头 133 | > 134 | > \`\`\`js 135 | > 136 | > 137 | > 138 | > 139 | >JavaScript can change HTML content.
142 | > 143 | > 147 | > 148 | > 149 | > 150 | > \`\`\` 151 | > 152 | > 引用块结尾 153 | 154 | 引用块包含引用块 155 | 156 | > 引用块开头 157 | > 158 | > > 引用块嵌套开头 159 | > > 引用块嵌套内容 160 | > > 引用块嵌套结尾 161 | > 162 | > 引用块结尾 163 | `, 164 | 'English': `\ 165 | EditableBlock Development Phase Quick Testing Platform + Demo 166 | 167 | ## Plugin Introduction 168 | 169 | Purpose: Primarily solves the nested experience of Markdown containers 170 | 171 | > Usage Instructions 172 | > 173 | > Note there will be four tabs. You can switch between them or rearrange for comparison: 174 | > - MdEditor: Plain text 175 | > - MdViewer: Rendered, using markdown-it engine + EditableBlock plugin, non-editable 176 | > - CodeMirror2: Rendered, using CodeMirror engine, editable 177 | > - CodeMirror: Rendered, using CodeMirror engine + EditableBlock plugin, editable 178 | 179 | > Comparison 180 | > - CodeMirror2 181 | > - Logic resembles **Obsidian's** Live Preview editing experience. 182 | > - Characteristics: No concept of "blocks" or "containers", parsing result is an array of character groups 183 | > - Drawbacks: Difficult editing and poor rendering when nesting other content in blockquotes/lists 184 | > (e.g., when nesting code blocks within blockquotes in Obsidian, code blocks fail to render completely) 185 | > - CodeMirror 186 | > - Logic resembles **Typora's** editing experience 187 | > - Characteristics: Features "block" and "container" concepts, creating a separate editing space within each block. 188 | > This maintains editing experience within blocks without degradation! Even when blocks nest other blocks. 189 | 190 | > Currently in development/testing phase with many bugs. 191 | > Especially blockquotes. 192 | > TODO: 193 | > - Support saveMode switching for onInput and onChange 194 | > - More shortcuts to enhance block-level editing experience 195 | > - Nested second-level controls cannot save edits 196 | 197 | ## Plugin Demo 198 | 199 | from: https://www.w3schools.com/js/js_examples.asp 200 | 201 | \`\`\`js 202 | 203 | 204 | 205 | 206 |JavaScript can change HTML content.
209 | 210 | 214 | 215 | 216 | 217 | \`\`\` 218 | 219 | ## Basic Markdown Syntax 220 | 221 | Headers (omitted) 222 | 223 | Inline: **bold** *italic* ~~strikethrough~~ ==highlight== \`inline code\` $\\frac 12$ 224 | 225 | Lists 226 | 227 | - 1 228 | - 2 229 | - 3 230 | - 4 231 | - 5 232 | 233 | Blockquote 234 | 235 | > [!note] 236 | > This is a note block. 237 | 238 | Code block 239 | 240 | \`\`\`js 241 | 242 | 243 | 244 | 245 |JavaScript can change HTML content.
248 | 249 | 253 | 254 | 255 | 256 | \`\`\` 257 | 258 | Formula block 259 | 260 | $$ 261 | \\frac 12 262 | $$ 263 | 264 | Mermaid block 265 | 266 | (omitted) 267 | 268 | Table 269 | 270 | | 1 | 2 | 271 | |---|---| 272 | | 3 | 4 | 273 | 274 | ## Nesting Tests 275 | 276 | Blockquote containing simple Markdown 277 | 278 | > Start of blockquote 279 | > 280 | > Inline: **bold** *italic* ~~strikethrough~~ ==highlight== \`inline code\` $\\frac 12$ 281 | > 282 | > - List item 283 | > 284 | > End of blockquote 285 | 286 | Blockquote containing code block 287 | 288 | > Start of blockquote 289 | > 290 | > \`\`\`js 291 | > 292 | > 293 | > 294 | > 295 | >JavaScript can change HTML content.
298 | > 299 | > 303 | > 304 | > 305 | > 306 | > \`\`\` 307 | > 308 | > End of blockquote 309 | 310 | Blockquote containing nested blockquote 311 | 312 | > Start of blockquote 313 | > 314 | > > Start of nested blockquote 315 | > > Nested content 316 | > > End of nested blockquote 317 | > 318 | > End of blockquote 319 | ` 320 | } 321 | -------------------------------------------------------------------------------- /src/NodeFlow/component/container/NodeFlowContainerS.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 |