65 Commits

Author SHA1 Message Date
chenjiawei.inizio
cbefaa54fb
chore: add license header (#432)
* chore: add license-header

* chore: add precommit

* chore: add license header

* fix: only js & shell style
2025-07-01 11:53:02 +00:00
Louis Young
94bdba02d1
fix(sub-canvas): background dot fill color (#437) 2025-07-01 10:34:17 +00:00
Yiwei Mao
93aa3e77b1
feat(variable): batch outputs (#426)
* feat: get by key path in flow-node-variable-data

* feat: scope chain transform service

* feat: form outputs plugin

* feat: base variable field

* feat: move set var get var to scope

* feat: batch outputs

* feat: form plugin create effect by func

* feat: batch output key configuration

* feat: merge effet api in form plugin

* feat: form plugin

* fix: variable layout test

* feat: simplify defineFormPluginCreator
2025-07-01 03:47:52 +00:00
xiamidaxia
8fa571af9e
feat(free-layout): add canDropToNode config to editor-props (#423) 2025-06-30 08:49:04 +00:00
小智
dc5e7eb023
feat(free-container-plugin): 添加子画布背景支持,使用inversify依赖注入 (#420)
* feat(free-container-plugin): add sub-canvas background support with inversify

- Add inversify dependency injection support for sub-canvas background
- Use useService to get BackgroundConfig from IoC container
- Support all background options: backgroundColor, dotColor, dotSize, etc.
- Add graceful fallback when BackgroundConfig is not registered
- Generate unique SVG pattern IDs to avoid conflicts
- Remove hardcoded background color from styles
- Add @flowgram.ai/background-plugin dependency

The sub-canvas now automatically inherits background configuration
from the main canvas.

* feat(background-plugin): export BackgroundConfig and bind to IoC container

- Export BackgroundConfig symbol for use by other plugins
- Add onBind method to register BackgroundConfig in IoC container
- Enable dependency injection pattern for background configuration access

This allows sub-canvas components to access background configuration
through inversify container.

* chore: update pnpm-lock.yaml after adding background-plugin dependency

- Update lock file to include @flowgram.ai/background-plugin dependency
- Ensures consistent dependency versions across environments

---------

Co-authored-by: husky-dot <xiaozhi@172-0-8-36.lightspeed.rcsntx.sbcglobal.net>
2025-06-27 06:34:44 +00:00
小智
488013bb0b
feat(background-plugin): 增强背景插件, 支持自定义背景、Logo显示和新拟态效果 (#404)
* feat(background-plugin): enhance background plugin with logo support and neumorphism effects

- Add comprehensive logo support (text and image)
- Implement neumorphism visual effects for modern UI
- Add customizable background colors and dot patterns
- Fix logo position jumping during canvas scrolling
- Add complete Chinese and English documentation
- Add visual examples and type definitions
- Update navigation metadata for documentation

Features:
- Logo positioning with 5 preset locations
- Neumorphism effects with configurable shadows
- Custom background colors and dot styling
- Smooth logo rendering during viewport changes
- Comprehensive documentation with examples

* fix(playground-react): fix background plugin type compatibility

- Fix TypeScript error when background option is boolean
- Ensure proper type handling for BackgroundLayerOptions

* fix(docs): remove incorrect number from sub-canvas plugin heading

---------

Co-authored-by: husky-dot <xiaozhi@172-0-8-36.lightspeed.rcsntx.sbcglobal.net>
2025-06-24 05:01:55 +00:00
Yiwei Mao
7c43b0cfd0
feat(variable): remove sync-variable-plugin and use provide-json-schema-outputs effect (#400)
* feat(variable): provide json schema outputs effect

* fix(scope-chain): group variable chain

* fix: ts check

* test: variable layout
2025-06-23 09:56:25 +00:00
xiamidaxia
2ed104ee95
feat(free-group-plugin): add initGroupJSON config (#394)
* docs: update readme

* feat(free-group-plugin): add initGroupJSON config
2025-06-20 11:00:38 +00:00
xiamidaxia
cb36e753ab
refactor(form): form store set values with cloneDeep (#386)
* refactor(form): form store values clone

* fix(history): history support form.updateFormValues
2025-06-18 09:34:20 +00:00
Louis Young
fd423d9cb5
feat(minimap): support touch operation (#381)
* fix(core): touch end clear hover

* feat(minimap): support touch operation

* fix(demo): touch create comment should not trigger drag

* feat(demo): comment node support touch resize
2025-06-16 11:42:38 +00:00
小智
83ae052705
feat(free-lines-plugin): add custom arrow renderer support (#376)
* feat(free-lines-plugin): add custom arrow renderer support

* fix(free-lines-plugin): remove unused FlowRendererRegistry import

---------

Co-authored-by: husky-dot <xiaozhi@xiaozhideMacBook-Pro.local>
2025-06-13 13:29:27 +00:00
Louis Young
9d029bf335
feat(auto-layout): support custom layout config (#378) 2025-06-13 12:29:26 +00:00
Louis Young
b6433f7b99
feat(auto-layout): sort same from port nodes using y-axis coordinate (#375) 2025-06-13 11:06:26 +00:00
xiamidaxia
39734e5a02
refactor: i18n (#374)
* refactor: i18n

* refactor: i18n

* feat: free-container-plugin support i18n
2025-06-13 10:50:54 +00:00
Louis Young
39dbde28ae
feat(free-core): free canvas supports touch operation (#367)
* feat(core): playground drag support drag event

* feat(core): touch move the canvas position

* feat(core): touch move the node position

* feat(core): touch move create or reset line

* test(core): global add TouchList mock

* fix(core): touch drag event disable passive

* fix(core): touch event delay

* feat(port): port click support touch operation

* fix(demo): loop output port line add btn set incorrect container

* test(core): global add TouchList mock

* refactor(core): clean & format codes

* feat(core): getPosFromMouseEvent built-in getEventCoord
2025-06-13 10:37:00 +00:00
小智
a6d61d347e
feat: add customizable port colors to WorkflowPortRender (#360)
* feat(workflow-port): add customizable port colors

* fix(workflow-colors): unify CSS variable naming to --g-workflow-* format - Update LineColors enum and demo configuration - Add CSS variable definitions - Ensure consistent naming across all workflow-related variables

---------

Co-authored-by: husky-dot <xiaozhi@xiaozhideMacBook-Pro.local>
Co-authored-by: husky-dot <xiaozhi@172-0-8-36.lightspeed.rcsntx.sbcglobal.net>
2025-06-10 10:26:30 +00:00
小智
f994881b22
feat(free-container-plugin): support customizable tip text and React elements (#355)
Co-authored-by: husky-dot <xiaozhi@xiaozhideMacBook-Pro.local>
2025-06-10 08:02:26 +00:00
Louis Young
004b8ac8bd
fix(demo): sub-canvas height offset-y default 0 (#352) 2025-06-10 03:16:26 +00:00
Louis Young
aab4183d65
feat(runtime): flowgram workflow node.js runtime (#304)
* feat(runtime): init nodejs runtime

* feat(runtime): init folder struct

* feat(runtime): interface & test

* feat(runtime): basic api & schema interfaces

* feat(runtime): init runtime model framework

* feat(runtime): create document & node entities

* feat(runtime): runtime engine basic execute logic

* feat(runtime): node add variable data

* refactor(runtime): split to sub domains

* test(runtime): document module test

* feat(runtime): variable store

* feat(runtime): workflow runtime executor

* chore(demo): reset initial data

* feat(runtime): workflow runtime branch logic

* feat(runtime): workflow runtime access to ai model

* feat(runtime): workflow runtime data all add to context

* feat(runtime): workflow runtime invoke record snaphots

* feat(runtime): workflow runtime status

* feat(runtime): main api request processing chain

* chore(demo): reset initial data

* refactor(runtime): types move to interface package

* feat(runtime): router access api defines & interfaces

* feat(runtime): standardize api register & gen api docs

* feat(runtime): create snapshot before node execute

* fix(sub-canvas): tips cannot close

* chore(demo): reset initial data

* feat(demo): make node schema runnable

* feat(demo): access test run

* feat(runtime): runtime core can run in both browser & server env

* fix(runtime): condition value empty issue

* feat(runtime): beautify structure data view

* feat(demo): test run sidesheet

* chore(demo): test run sidesheet button fixed

* feat(demo): running node show flowing line

* chore(demo): hide node result overflow

* chore(demo): reset initial data

* feat(runtime): workflow runtime support loop node

* fix(container): sub canvas height issue

* feat(demo): test run multiple result render

* test(runtime): enbale test coverage

* refactor(runtime): interface folders structure

* refactor(runtime): core folders structure

* refactor(runtime): core export apis & access to router

* feat(demo): runtime plugin

* feat(runtime): server add try-catch protection

* fix(runtime): node process reset end time

* chore: format json

* chore: rush update

* refactor(demo): running service move to runtime-plugin as built-in runtime service

* fix(runtime): build error

* test(runtime): disable nodejs test

* fix(demo): test run result key indent width
2025-06-09 09:13:24 +00:00
xiamidaxia
136a713f29
feat: add materials.components api (#288) 2025-05-28 03:07:15 +00:00
xiamidaxia
7d846dc48f
fix(free-layout): node deletion data loss after redo (#284)
* fix(demo): node required validate

* fix(free-layout): node deletion data loss after redo/undo
2025-05-27 11:35:58 +00:00
Louis Young
46dda28464
feat(line): custom port color by classname or css variable (#274) 2025-05-26 08:38:11 +00:00
Louis Young
2da1f3c5bf
fix(core): free document prevent to trigger flowDocument.addBlocksAsChildren (#273) 2025-05-26 08:37:57 +00:00
Louis Young
9ae858b363
fix(auto-layout): branches with multi sub nodes (#272) 2025-05-26 08:12:59 +00:00
Louis Young
805b262260
fix(group): auto layout adapts group (#223)
* fix(group): line inside multi-layer nested group cannot be selected

* feat(group): auto layout adapts group

* docs: update free-layout-demo example image

* chore(demo): update initial data

* feat(container): removeNodeLines api set to public
2025-05-13 10:12:23 +00:00
xiamidaxia
a98244c6a3
Feat/support react 16 (#221)
* chore: support react 16

* chore: support react 16
2025-05-13 06:16:00 +00:00
Louis Young
19ff04abc7
feat(free-demo): support create nodes group (#185)
* feat(demo): create group tool

* feat(demo): create group shortcut

* refactor(core): split group service, controller, utils files

* feat(history): free history add group operations

* feat(demo): group node render

* feat(demo): group node registry

* refactor(stack): remove layer computing config

* feat(stack): line stackIndex cannot be recalculated by default

* feat(demo): group title & color palette acess form

* feat(demo): ungroup button & shortcut

* feat(demo): create group & ungroup operation register to free history service

* refactor(group): group shortcuts move to group-plugin

* refactor(group): group node render move to group-plugin

* fix(group): undo/redo of create node or ungroup not work

* perf(history): free history remove async operation

* feat(group): trigger select box inside group

* fix(group): container inside group

* fix(group): auto layout should not be affected by group node

* feat(container): support multi-layer nested containers

* fix(group): group css variables overwrite each other

* fix(container): node move in or out group shouldn't clear lines

* feat(demo): node should follow mouse after move out container button clicked

* feat(container): disable group move to non-group container node

* fix(container): cross-level node moving causing coord offset

* feat(demo): comment node support more button

* fix(demo): comment in container fromJSON

* feat(container): node into container show move out tips

* feat(group): node into group show move out tips

* feat(group): delete group when blocks is empty

* refactor(group): createFreeGroupPlugin move to container-plugin

* refactor(demo): replace disablePorts with defaultPorts

* fix(demo): react warning

* refactor(group): group plugin built-in GroupNodeRegistry

* refactor(group): create free-group-plugin

* fix(ci): lock & ts-check & test errors
2025-05-07 13:21:34 +00:00
Yiwei Mao
202c06040e
feat(variable): global variable scope (#182) 2025-04-28 02:55:24 +00:00
Louis Young
4a6e7a736f
fix(line): lines not re-rendering after hover (#181) 2025-04-27 08:55:59 +00:00
Yiwei Mao
311180b2c8
chore: hide useless api in variable engine (#180)
* chore: hide useless api in variable engine

* fix: variable-core mock chain ts check
2025-04-27 03:54:53 +00:00
Louis Young
cb942616ab
fix(line): hover detection of the fold line (#167) 2025-04-23 04:30:58 +00:00
Louis Young
e9c654935f
feat(free-demo): enhance copy and paste shortcut capabilities (#161)
* chore(demo): define enum workflow node type

* feat(demo): workflow copy shortcut

* feat(demo): workflow paste shortcut

* feat(demo): workflow rest built-in shortcuts

* fix(history): remove delay after node delete

* fix(demo): paste to container need adjust node position

* fix(core): reset selection after node deleted

* feat(demo): add en comments to shortcut code

* fix(ci): tsc error
2025-04-21 11:41:51 +00:00
xiamidaxia
673e6106b4
feat: add without form guide, fix error (#152) 2025-04-18 06:05:09 +00:00
Louis Young
5039f7c76b
chore(drag): remove alt key copy node (#149)
* chore(drag): remove alt key copy node

* fix: tsc error
2025-04-18 02:59:09 +00:00
Louis Young
f43d70ee88
fix(core): deduplication before singleton plugin init (#142) 2025-04-15 07:41:32 +00:00
Louis Young
288c48e56f
refactor: decoupling node panel and create node (#129)
* refactor(free-container-plugin): decoupling workflow node panel service private methods to utils

* fix(free-demo): multi-select style in sub-canvas

* fix(config): enable eslint formatter

* feat(free-container-plugin): call node panel on single select mode

* refactor(free-demo): make methods in onDragLineEnd more atomic and easier understand

* refactor(free-demo): make methods in useAddNode more atomic and easier understand

* refactor(free-demo): make methods in lineAddButton.onClick more atomic and easier understand

* chore(free-demo): default add node to canvas viewport center

* fix(node-panel): resolve promise after panel closed

* chore(free-demo): add comments to node panel related code

* chore(node-panel): clear useless code
2025-04-08 09:22:34 +00:00
Louis Young
a6d3b97057
feat: nextjs demo (#125)
* feat(demo-workflow): init demo-mastra-workflow project

* feat(demo-workflow): node render style

* feat(demo-workflow): init runtime api

* refactor(demo-workflow): component move to @editor

* refactor(demo-workflow): simplify editor client render

* refactor(demo-runtime): rename demo-mastra-workflow to demo-nextjs

* chore: rush update

* fix(plugin): package.json export dist type path

* feat(demo-workflow): remove semi-ui deps

* fix(demo-workflow): next build cannot find eslint config

* fix(demo-workflow): en lang by default
2025-04-03 07:58:20 +00:00
xiamidaxia
62e53350f1
feat: shortcuts support override pre handlers like delete (#93) 2025-03-26 07:26:30 +00:00
xiamidaxia
b1bb774238 feat: demo support sidebar 2025-03-25 20:32:17 +08:00
Louis Young
58f6676311
fix(canvas): prevent the dom of resize observer being null & simplified node selected highlight settings (#78)
* fix(canvas): prevent the dom of resize observer being null

* refactor(container): simplified node selected highlight settings

* fix(snap): react warning

* fix: tsc error
2025-03-24 03:10:46 +00:00
Louis Young
5dbb2f4b55
refactor: loop node render with sub canvas inside form (#75)
* refactor(container): loop node render with form

* refactor(container): simplified sub-canvas configuration

* refactor(container): move sub-canvas render into plugin
2025-03-20 11:59:56 +00:00
Louis Young
95c6b58264
chore(minimap): avoid drawing invalid rectangle (#71) 2025-03-20 08:23:58 +00:00
Louis Young
7f21a6a461
fix(container): moveout node from container is not allowed if it's invalid (#69) 2025-03-20 08:00:19 +00:00
liuyangxing
7d40e92e5f fix(canvas-core): cache the node stack index in node render data 2025-03-18 18:14:50 +08:00
liuyangxing
6e41032044 test(container): remove useless test files 2025-03-18 16:13:16 +08:00
liuyangxing
088368d48c refactor(container): allow user to customize render content component 2025-03-18 16:13:16 +08:00
liuyangxing
970fd09ec4 fix(container): container render bounds delay 2025-03-18 16:13:15 +08:00
liuyangxing
561c7c620c fix(canvas-core): select container node should not render selector layer in free layout 2025-03-18 16:13:15 +08:00
liuyangxing
e7656d4cec feat(free-demo): create loop node 2025-03-18 16:13:15 +08:00
liuyangxing
c83d06b593 feat(container): accessing form render 2025-03-18 16:13:15 +08:00