@foblex/flow 18.3.0 → 18.4.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.
Files changed (120) hide show
  1. package/AI.md +69 -0
  2. package/README.md +40 -3
  3. package/STYLING.md +35 -0
  4. package/domain/f-connection/index.d.ts +1 -0
  5. package/domain/f-connection/providers.d.ts +2 -1
  6. package/domain/f-connection/redraw-connections/redraw-connections.d.ts +1 -0
  7. package/domain/f-connection/resolve-connection-endpoint-rotation-context/index.d.ts +2 -0
  8. package/domain/f-connection/resolve-connection-endpoint-rotation-context/resolve-connection-endpoint-rotation-context-request.d.ts +8 -0
  9. package/domain/f-connection/resolve-connection-endpoint-rotation-context/resolve-connection-endpoint-rotation-context.d.ts +10 -0
  10. package/domain/f-draggable/on-pointer-move/on-pointer-move-request.d.ts +1 -1
  11. package/domain/f-draggable/on-pointer-move/on-pointer-move.d.ts +1 -0
  12. package/domain/get-normalized-connector-rect/get-normalized-connector-rect.d.ts +8 -0
  13. package/domain/providers.d.ts +1 -1
  14. package/esm2022/domain/f-connection/index.mjs +2 -1
  15. package/esm2022/domain/f-connection/providers.mjs +3 -1
  16. package/esm2022/domain/f-connection/redraw-connections/redraw-connections.mjs +6 -2
  17. package/esm2022/domain/f-connection/resolve-connection-endpoint-rotation-context/index.mjs +3 -0
  18. package/esm2022/domain/f-connection/resolve-connection-endpoint-rotation-context/resolve-connection-endpoint-rotation-context-request.mjs +8 -0
  19. package/esm2022/domain/f-connection/resolve-connection-endpoint-rotation-context/resolve-connection-endpoint-rotation-context.mjs +35 -0
  20. package/esm2022/domain/f-draggable/on-pointer-move/on-pointer-move-request.mjs +1 -1
  21. package/esm2022/domain/f-draggable/on-pointer-move/on-pointer-move.mjs +6 -2
  22. package/esm2022/domain/get-normalized-connector-rect/get-normalized-connector-rect.mjs +33 -3
  23. package/esm2022/f-auto-pan/f-auto-pan-base.mjs +11 -0
  24. package/esm2022/f-auto-pan/f-auto-pan.mjs +38 -0
  25. package/esm2022/f-auto-pan/index.mjs +4 -0
  26. package/esm2022/f-auto-pan/providers.mjs +3 -0
  27. package/esm2022/f-canvas/f-canvas.component.mjs +2 -2
  28. package/esm2022/f-connection-v2/components/connection-content/f-connection-content.mjs +18 -4
  29. package/esm2022/f-connection-v2/utils/connection-behaviour/connection-behaviour-builder-request.mjs +6 -2
  30. package/esm2022/f-connection-v2/utils/connection-behaviour/connection-behaviour-builder.mjs +3 -1
  31. package/esm2022/f-connection-v2/utils/connection-behaviour/models/i-calculate-behavior-request.mjs +1 -1
  32. package/esm2022/f-connection-v2/utils/connection-behaviour/utils/floating-behavior.mjs +8 -8
  33. package/esm2022/f-connection-v2/utils/connection-behaviour/utils/get-rotated-rounded-rect-intersection.mjs +35 -0
  34. package/esm2022/f-connection-worker/features/calculate-connection-worker-payload-item/calculate-connection-worker-payload-item.mjs +13 -1
  35. package/esm2022/f-connection-worker/model/i-f-connection-worker-rect.mjs +1 -1
  36. package/esm2022/f-connection-worker/model/i-f-connection-worker-request-item.mjs +1 -1
  37. package/esm2022/f-connection-worker/worker/connection-worker-runtime.mjs +13 -1
  38. package/esm2022/f-draggable/auto-pan/auto-pan.utils.mjs +58 -0
  39. package/esm2022/f-draggable/auto-pan/index.mjs +7 -0
  40. package/esm2022/f-draggable/auto-pan/providers.mjs +5 -0
  41. package/esm2022/f-draggable/auto-pan/run-auto-pan-frame/index.mjs +3 -0
  42. package/esm2022/f-draggable/auto-pan/run-auto-pan-frame/run-auto-pan-frame-request.mjs +4 -0
  43. package/esm2022/f-draggable/auto-pan/run-auto-pan-frame/run-auto-pan-frame.mjs +97 -0
  44. package/esm2022/f-draggable/auto-pan/stop-auto-pan/index.mjs +3 -0
  45. package/esm2022/f-draggable/auto-pan/stop-auto-pan/stop-auto-pan-request.mjs +4 -0
  46. package/esm2022/f-draggable/auto-pan/stop-auto-pan/stop-auto-pan.mjs +32 -0
  47. package/esm2022/f-draggable/auto-pan/stored-pointer-event.mjs +25 -0
  48. package/esm2022/f-draggable/auto-pan/sync-auto-pan/index.mjs +3 -0
  49. package/esm2022/f-draggable/auto-pan/sync-auto-pan/sync-auto-pan-request.mjs +4 -0
  50. package/esm2022/f-draggable/auto-pan/sync-auto-pan/sync-auto-pan.mjs +75 -0
  51. package/esm2022/f-draggable/connection/create-connection/create-connection-handler/create-connection-handler.mjs +7 -4
  52. package/esm2022/f-draggable/connection/reassign-connection/reassign-connection-handler/reassign-connection-source-handler.mjs +7 -4
  53. package/esm2022/f-draggable/connection/reassign-connection/reassign-connection-handler/reassign-connection-target-handler.mjs +7 -4
  54. package/esm2022/f-draggable/drag-canvas/drag-canvas-handler/drag-canvas-handler.mjs +6 -3
  55. package/esm2022/f-draggable/drag-node/drag-node-dependent-connection-handlers/drag-node-connection-handler-base.mjs +6 -3
  56. package/esm2022/f-draggable/f-draggable-data-context.mjs +14 -1
  57. package/esm2022/f-draggable/f-draggable.directive.mjs +4 -1
  58. package/esm2022/f-draggable/index.mjs +2 -1
  59. package/esm2022/f-draggable/providers.mjs +3 -1
  60. package/esm2022/f-draggable/resize-node/resize-node-handler/resize-node-dependent-connection-handlers/resize-node-connection-handler-base.mjs +6 -3
  61. package/esm2022/f-flow/f-flow.component.mjs +2 -2
  62. package/esm2022/f-flow.module.mjs +20 -16
  63. package/esm2022/f-storage/f-components-store.mjs +3 -1
  64. package/esm2022/f-zoom/f-zoom.directive.mjs +9 -11
  65. package/esm2022/f-zoom/wheel-zoom.utils.mjs +34 -0
  66. package/esm2022/public-api.mjs +2 -1
  67. package/f-auto-pan/f-auto-pan-base.d.ts +11 -0
  68. package/f-auto-pan/f-auto-pan.d.ts +13 -0
  69. package/f-auto-pan/index.d.ts +3 -0
  70. package/f-auto-pan/providers.d.ts +2 -0
  71. package/f-connection-v2/utils/connection-behaviour/connection-behaviour-builder-request.d.ts +4 -1
  72. package/f-connection-v2/utils/connection-behaviour/models/i-calculate-behavior-request.d.ts +7 -1
  73. package/f-connection-v2/utils/connection-behaviour/utils/floating-behavior.d.ts +1 -1
  74. package/f-connection-v2/utils/connection-behaviour/utils/get-rotated-rounded-rect-intersection.d.ts +3 -0
  75. package/f-connection-worker/features/calculate-connection-worker-payload-item/calculate-connection-worker-payload-item.d.ts +1 -0
  76. package/f-connection-worker/model/i-f-connection-worker-rect.d.ts +4 -0
  77. package/f-connection-worker/model/i-f-connection-worker-request-item.d.ts +2 -0
  78. package/f-draggable/auto-pan/auto-pan.utils.d.ts +6 -0
  79. package/f-draggable/auto-pan/index.d.ts +6 -0
  80. package/f-draggable/auto-pan/providers.d.ts +4 -0
  81. package/f-draggable/auto-pan/run-auto-pan-frame/index.d.ts +2 -0
  82. package/f-draggable/auto-pan/run-auto-pan-frame/run-auto-pan-frame-request.d.ts +3 -0
  83. package/f-draggable/auto-pan/run-auto-pan-frame/run-auto-pan-frame.d.ts +21 -0
  84. package/f-draggable/auto-pan/stop-auto-pan/index.d.ts +2 -0
  85. package/f-draggable/auto-pan/stop-auto-pan/stop-auto-pan-request.d.ts +3 -0
  86. package/f-draggable/auto-pan/stop-auto-pan/stop-auto-pan.d.ts +10 -0
  87. package/f-draggable/auto-pan/stored-pointer-event.d.ts +12 -0
  88. package/f-draggable/auto-pan/sync-auto-pan/index.d.ts +2 -0
  89. package/f-draggable/auto-pan/sync-auto-pan/sync-auto-pan-request.d.ts +3 -0
  90. package/f-draggable/auto-pan/sync-auto-pan/sync-auto-pan.d.ts +19 -0
  91. package/f-draggable/connection/create-connection/create-connection-handler/create-connection-handler.d.ts +1 -0
  92. package/f-draggable/connection/reassign-connection/reassign-connection-handler/reassign-connection-source-handler.d.ts +1 -0
  93. package/f-draggable/connection/reassign-connection/reassign-connection-handler/reassign-connection-target-handler.d.ts +1 -0
  94. package/f-draggable/drag-node/drag-node-dependent-connection-handlers/drag-node-connection-handler-base.d.ts +1 -0
  95. package/f-draggable/f-draggable-data-context.d.ts +7 -1
  96. package/f-draggable/index.d.ts +1 -0
  97. package/f-draggable/providers.d.ts +1 -1
  98. package/f-draggable/resize-node/resize-node-handler/resize-node-dependent-connection-handlers/resize-node-connection-handler-base.d.ts +1 -0
  99. package/f-flow.module.d.ts +17 -16
  100. package/f-storage/f-components-store.d.ts +2 -0
  101. package/f-zoom/f-zoom.directive.d.ts +0 -1
  102. package/f-zoom/wheel-zoom.utils.d.ts +3 -0
  103. package/fesm2022/foblex-flow.mjs +7648 -7120
  104. package/fesm2022/foblex-flow.mjs.map +1 -1
  105. package/package.json +7 -7
  106. package/public-api.d.ts +1 -0
  107. package/schematics/ng-add/index.js +63 -2
  108. package/schematics/ng-add/index.js.map +1 -1
  109. package/schematics/shared/foblex-dependencies.js +1 -1
  110. package/styles/_index.scss +31 -0
  111. package/styles/default.scss +4 -0
  112. package/styles/domains/_connection.scss +175 -0
  113. package/styles/domains/_connector.scss +150 -0
  114. package/styles/domains/_external-item.scss +44 -0
  115. package/styles/domains/_flow-canvas.scss +41 -0
  116. package/styles/domains/_node-group.scss +230 -0
  117. package/styles/domains/_plugins.scss +100 -0
  118. package/styles/tokens/_ff-aliases.scss +117 -0
  119. package/styles/tokens/_primitive.scss +86 -0
  120. package/styles/tokens/_semantic.scss +131 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foblex/flow",
3
- "version": "18.3.0",
3
+ "version": "18.4.0",
4
4
  "description": "Angular-native node-based UI library for building node editors, workflow builders, and interactive graph interfaces.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -36,12 +36,12 @@
36
36
  "save": "dependencies"
37
37
  },
38
38
  "peerDependencies": {
39
- "@angular/common": ">=15.0.0",
40
- "@angular/core": ">=15.0.0",
41
- "@foblex/platform": "1.0.4",
42
- "@foblex/mediator": "1.1.3",
43
- "@foblex/2d": "1.2.2",
44
- "@foblex/utils": "1.1.1"
39
+ "@angular/common": ">=17.3.0",
40
+ "@angular/core": ">=17.3.0",
41
+ "@foblex/platform": "^1.0.4",
42
+ "@foblex/mediator": "^1.1.3",
43
+ "@foblex/2d": "^1.2.2",
44
+ "@foblex/utils": "^1.1.1"
45
45
  },
46
46
  "dependencies": {
47
47
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './f-backgroud';
2
+ export * from './f-auto-pan';
2
3
  export * from './f-canvas';
3
4
  export * from './domain';
4
5
  export * from './drag-toolkit';
@@ -1,13 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ngAdd = ngAdd;
4
+ const schematics_1 = require("@angular-devkit/schematics");
4
5
  const tasks_1 = require("@angular-devkit/schematics/tasks");
6
+ const utility_1 = require("@schematics/angular/utility");
5
7
  const dependencies_1 = require("@schematics/angular/utility/dependencies");
6
8
  const foblex_dependencies_1 = require("../shared/foblex-dependencies");
9
+ const DEFAULT_THEME_STYLE_PATH = 'node_modules/@foblex/flow/styles/default.scss';
10
+ const KNOWN_THEME_STYLE_PATHS = new Set([
11
+ DEFAULT_THEME_STYLE_PATH,
12
+ '@foblex/flow/styles/default.scss',
13
+ ]);
7
14
  function ngAdd() {
15
+ return (0, schematics_1.chain)([addDependencies(), addDefaultTheme(), installDependencies()]);
16
+ }
17
+ function addDependencies() {
8
18
  return (tree, context) => {
9
19
  context.logger.info('⚡ Installing @foblex/flow dependencies...');
10
- foblex_dependencies_1.FoblexDependencies.forEach(dependency => {
20
+ foblex_dependencies_1.FoblexDependencies.forEach((dependency) => {
11
21
  (0, dependencies_1.addPackageJsonDependency)(tree, {
12
22
  type: dependencies_1.NodeDependencyType.Default,
13
23
  name: dependency.name,
@@ -15,9 +25,60 @@ function ngAdd() {
15
25
  });
16
26
  context.logger.info(`✅ Added "${dependency.name}" to package.json`);
17
27
  });
28
+ return tree;
29
+ };
30
+ }
31
+ function addDefaultTheme() {
32
+ return (0, utility_1.updateWorkspace)((workspace) => {
33
+ for (const [, project] of workspace.projects) {
34
+ if (project.extensions['projectType'] !== 'application') {
35
+ continue;
36
+ }
37
+ addStyleToTarget(project.targets.get('build'));
38
+ addStyleToTarget(project.targets.get('test'));
39
+ }
40
+ });
41
+ }
42
+ function addStyleToTarget(target) {
43
+ var _a;
44
+ if (!target) {
45
+ return;
46
+ }
47
+ ensureThemeInStyles(((_a = target.options) !== null && _a !== void 0 ? _a : (target.options = {})));
48
+ if (!target.configurations) {
49
+ return;
50
+ }
51
+ Object.values(target.configurations).forEach((configuration) => {
52
+ if (!configuration) {
53
+ return;
54
+ }
55
+ ensureThemeInStyles(configuration);
56
+ });
57
+ }
58
+ function ensureThemeInStyles(options) {
59
+ const styles = Array.isArray(options['styles']) ? [...options['styles']] : [];
60
+ if (styles.some(isThemeStyleEntry)) {
61
+ return;
62
+ }
63
+ styles.push(DEFAULT_THEME_STYLE_PATH);
64
+ options['styles'] = styles;
65
+ }
66
+ function isThemeStyleEntry(entry) {
67
+ if (typeof entry === 'string') {
68
+ return KNOWN_THEME_STYLE_PATHS.has(entry);
69
+ }
70
+ if (!entry || typeof entry !== 'object' || Array.isArray(entry)) {
71
+ return false;
72
+ }
73
+ const input = entry['input'];
74
+ return typeof input === 'string' && KNOWN_THEME_STYLE_PATHS.has(input);
75
+ }
76
+ function installDependencies() {
77
+ return (_tree, context) => {
18
78
  context.addTask(new tasks_1.NodePackageInstallTask());
79
+ context.logger.info(`✅ Added "${DEFAULT_THEME_STYLE_PATH}" to application styles.`);
19
80
  context.logger.info('✅ All dependencies installed successfully.');
20
- return tree;
81
+ return _tree;
21
82
  };
22
83
  }
23
84
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/f-flow/schematics/ng-add/index.ts"],"names":[],"mappings":";;AAQA,sBAmBC;AA1BD,4DAA0E;AAC1E,2EAGkD;AAClD,uEAAmE;AAEnE,SAAgB,KAAK;IACnB,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAEjE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'^1.0.4' },
6
6
  { name: '@foblex/mediator', version: '^1.1.3' },
7
- { name: '@foblex/2d', version: '^1.2.1' },
7
+ { name: '@foblex/2d', version: '^1.2.2' },
8
8
  { name: '@foblex/utils', version: '^1.1.1' },
9
9
  ];
10
10
  //# sourceMappingURL=foblex-dependencies.js.map
@@ -0,0 +1,31 @@
1
+ @forward 'domains/flow-canvas';
2
+ @forward 'domains/node-group';
3
+ @forward 'domains/connector';
4
+ @forward 'domains/connection';
5
+ @forward 'domains/external-item';
6
+ @forward 'domains/plugins';
7
+
8
+ @use 'tokens/primitive';
9
+ @use 'tokens/semantic';
10
+ @use 'tokens/ff-aliases';
11
+ @use 'domains/flow-canvas';
12
+ @use 'domains/node-group';
13
+ @use 'domains/connector';
14
+ @use 'domains/connection';
15
+ @use 'domains/external-item';
16
+ @use 'domains/plugins';
17
+
18
+ @mixin theme-tokens() {
19
+ @include primitive.primitive-tokens();
20
+ @include semantic.semantic-tokens();
21
+ @include ff-aliases.ff-aliases();
22
+ }
23
+
24
+ @mixin theme-all($scoped: true) {
25
+ @include flow-canvas.flow-canvas($scoped);
26
+ @include node-group.node-group($scoped);
27
+ @include connector.connector($scoped);
28
+ @include connection.connection-all($scoped);
29
+ @include external-item.external-item-all($scoped);
30
+ @include plugins.plugins($scoped);
31
+ }
@@ -0,0 +1,4 @@
1
+ @use './index' as flow-theme;
2
+
3
+ @include flow-theme.theme-tokens();
4
+ @include flow-theme.theme-all();
@@ -0,0 +1,175 @@
1
+ @mixin _connection-scope($scoped: true) {
2
+ @if $scoped {
3
+ f-flow,
4
+ .f-flow {
5
+ @content;
6
+ }
7
+ } @else {
8
+ @content;
9
+ }
10
+ }
11
+
12
+ @mixin connection($scoped: true) {
13
+ @include _connection-scope($scoped) {
14
+ .f-connection-content {
15
+ box-sizing: border-box;
16
+ color: var(--ff-connection-content-color);
17
+ font-size: var(--ff-connection-content-font-size);
18
+ padding: var(--ff-connection-content-padding-y) var(--ff-connection-content-padding-x);
19
+ background: var(--ff-connection-content-background-color);
20
+ border: 1px solid var(--ff-connection-content-border-color);
21
+ border-radius: var(--ff-connection-content-border-radius);
22
+ }
23
+
24
+ .f-connection {
25
+ .f-connection-selection {
26
+ fill: none;
27
+ stroke: transparent;
28
+ stroke-width: var(--ff-connection-hit-width);
29
+ }
30
+
31
+ .f-connection-path {
32
+ fill: none;
33
+ stroke: var(--ff-connection-color);
34
+ stroke-width: var(--ff-connection-width);
35
+ }
36
+
37
+ .f-connection-drag-handle {
38
+ fill: transparent;
39
+ stroke: transparent;
40
+ cursor: move;
41
+ }
42
+
43
+ &.f-snap-connection {
44
+ .f-connection-path {
45
+ stroke: var(--ff-snap-connection-color);
46
+ stroke-dasharray: 8 4;
47
+ }
48
+ }
49
+
50
+ &.f-selected {
51
+ .f-connection-content {
52
+ border-color: var(--ff-connection-content-border-color-selected);
53
+ }
54
+
55
+ .f-connection-path {
56
+ stroke: var(--ff-connection-selected-color);
57
+ }
58
+ }
59
+
60
+ }
61
+
62
+ &:not(.f-dragging) {
63
+ .f-connection:not(.f-dragging):not(.f-selected):not(.f-connection-selection-disabled) {
64
+ &:hover {
65
+ .f-connection-selection {
66
+ stroke: var(--ff-connection-hover-color);
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ @mixin connection-markers($scoped: true) {
75
+ @include _connection-scope($scoped) {
76
+ .f-marker,
77
+ .connection-marker {
78
+ color: var(--ff-marker-color);
79
+
80
+ circle,
81
+ rect,
82
+ path,
83
+ polygon,
84
+ line {
85
+ fill: currentColor;
86
+ stroke: currentColor;
87
+ }
88
+ }
89
+
90
+ .f-connection {
91
+ &.f-snap-connection {
92
+ .f-marker,
93
+ .connection-marker {
94
+ color: var(--ff-snap-connection-color);
95
+ }
96
+ }
97
+
98
+ &.f-selected {
99
+ .f-marker,
100
+ .connection-marker {
101
+ color: var(--ff-connection-selected-color);
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+
108
+ @mixin connection-waypoints($scoped: true) {
109
+ @include _connection-scope($scoped) {
110
+ .f-connection {
111
+ .f-connection-waypoints {
112
+ .f-candidate,
113
+ .f-waypoint {
114
+ vector-effect: non-scaling-stroke;
115
+ transform-box: fill-box;
116
+ transform-origin: center;
117
+ stroke-width: 1.5;
118
+
119
+ &:hover {
120
+ transform: scale(1.1);
121
+ }
122
+ }
123
+
124
+ .f-candidate {
125
+ fill: var(--ff-waypoint-candidate-fill);
126
+ stroke: var(--ff-waypoint-candidate-stroke);
127
+ }
128
+
129
+ .f-waypoint {
130
+ fill: var(--ff-waypoint-fill);
131
+ stroke: var(--ff-waypoint-stroke);
132
+ cursor: move;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+
139
+ @mixin connection-drag-handles($scoped: true) {
140
+ @include _connection-scope($scoped) {
141
+ .f-connection {
142
+ .f-connection-drag-handle {
143
+ fill: transparent;
144
+ stroke: var(--ff-connection-drag-handle-stroke);
145
+ stroke-width: 1.5;
146
+ }
147
+ }
148
+ }
149
+ }
150
+
151
+ @mixin connection-drag-handles-visible($scoped: true) {
152
+ @include connection-drag-handles($scoped);
153
+
154
+ @include _connection-scope($scoped) {
155
+ .f-connection {
156
+ .f-connection-drag-handle {
157
+ fill: var(--ff-connection-drag-handle-fill);
158
+ }
159
+
160
+ &.f-selected {
161
+ .f-connection-drag-handle {
162
+ fill: var(--ff-connection-drag-handle-fill);
163
+ stroke: var(--ff-connection-selected-color);
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
169
+
170
+ @mixin connection-all($scoped: true) {
171
+ @include connection($scoped);
172
+ @include connection-markers($scoped);
173
+ @include connection-waypoints($scoped);
174
+ @include connection-drag-handles($scoped);
175
+ }
@@ -0,0 +1,150 @@
1
+ @mixin _connector-scope($scoped: true) {
2
+ @if $scoped {
3
+ f-flow,
4
+ .f-flow {
5
+ @content;
6
+ }
7
+ } @else {
8
+ @content;
9
+ }
10
+ }
11
+
12
+ @mixin _socket-positioning() {
13
+ &.left {
14
+ left: calc(var(--ff-connector-size) / -2);
15
+ top: 50%;
16
+ transform: translateY(-50%);
17
+ }
18
+
19
+ &.right {
20
+ right: calc(var(--ff-connector-size) / -2);
21
+ top: 50%;
22
+ transform: translateY(-50%);
23
+ }
24
+
25
+ &.top {
26
+ top: calc(var(--ff-connector-size) / -2);
27
+ left: 50%;
28
+ transform: translateX(-50%);
29
+ }
30
+
31
+ &.top-left {
32
+ top: calc(var(--ff-connector-size) / -2);
33
+ left: calc(var(--ff-connector-size) / -2);
34
+ }
35
+
36
+ &.top-right {
37
+ top: calc(var(--ff-connector-size) / -2);
38
+ right: calc(var(--ff-connector-size) / -2);
39
+ }
40
+
41
+ &.bottom {
42
+ bottom: calc(var(--ff-connector-size) / -2);
43
+ left: 50%;
44
+ transform: translateX(-50%);
45
+ }
46
+
47
+ &.bottom-left {
48
+ bottom: calc(var(--ff-connector-size) / -2);
49
+ left: calc(var(--ff-connector-size) / -2);
50
+ }
51
+
52
+ &.bottom-right {
53
+ bottom: calc(var(--ff-connector-size) / -2);
54
+ right: calc(var(--ff-connector-size) / -2);
55
+ }
56
+ }
57
+
58
+ @mixin _socket-frame($radius: 50%) {
59
+ position: absolute;
60
+ width: var(--ff-connector-size);
61
+ height: var(--ff-connector-size);
62
+ box-sizing: border-box;
63
+ border: 1px solid var(--ff-connector-border-color);
64
+ border-radius: $radius;
65
+ background: var(--ff-connector-background-color);
66
+ box-shadow: 0 0 0 2px var(--ff-connector-node-ring-color);
67
+ pointer-events: all;
68
+
69
+ @include _socket-positioning();
70
+
71
+ &.f-connector-connectable {
72
+ border-color: var(--ff-connector-accent-color);
73
+ }
74
+
75
+ &.f-node-output-connected,
76
+ &.f-node-input-connected {
77
+ background: var(--ff-connector-connected-color);
78
+ border-color: var(--ff-connector-connected-color);
79
+ }
80
+
81
+ &.f-node-output-not-connectable,
82
+ &.f-node-input-not-connectable,
83
+ &.f-node-input-disabled,
84
+ &.f-node-output-disabled {
85
+ background: var(--ff-connector-disabled-color);
86
+ border-color: var(--ff-connector-disabled-border-color);
87
+ }
88
+ }
89
+
90
+ @mixin connector-sockets($scoped: true, $selectorless: false) {
91
+ @if $selectorless {
92
+ @include _socket-frame();
93
+ } @else {
94
+ @include _connector-scope($scoped) {
95
+ .f-node-input,
96
+ .f-node-output {
97
+ &:not(.f-node) {
98
+ @include _socket-frame();
99
+ }
100
+ }
101
+
102
+ .f-node-input {
103
+ &:not(.f-node) {
104
+ border-radius: var(--ff-radius-socket-square);
105
+ }
106
+ }
107
+
108
+ .f-connections-dragging {
109
+ .f-node-input,
110
+ .f-node-output {
111
+ &:not(.f-connector-connectable) {
112
+ &:not(.f-node-input-connected):not(.f-node-output-connected) {
113
+ border-color: var(--ff-connector-disabled-border-color);
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+
122
+ @mixin connector-outlet($scoped: true) {
123
+ @include _connector-scope($scoped) {
124
+ .f-node-outlet {
125
+ display: inline-flex;
126
+ align-items: center;
127
+ justify-content: center;
128
+ gap: 8px;
129
+ min-height: 32px;
130
+ padding: var(--ff-outlet-padding-y) var(--ff-outlet-padding-x);
131
+ box-sizing: border-box;
132
+ border: 1px solid var(--ff-outlet-border-color);
133
+ border-radius: var(--ff-outlet-border-radius);
134
+ background: var(--ff-outlet-background-color);
135
+ color: var(--ff-outlet-color);
136
+ pointer-events: all;
137
+
138
+ &.f-node-outlet-disabled {
139
+ background: var(--ff-outlet-disabled-background-color);
140
+ border-color: var(--ff-outlet-disabled-border-color);
141
+ color: var(--ff-outlet-disabled-color);
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ @mixin connector($scoped: true) {
148
+ @include connector-sockets($scoped);
149
+ @include connector-outlet($scoped);
150
+ }
@@ -0,0 +1,44 @@
1
+ @mixin external-item($scoped: true) {
2
+ .f-external-item {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ gap: 8px;
6
+ padding: 12px 14px;
7
+ box-sizing: border-box;
8
+ color: var(--ff-external-item-color);
9
+ background: var(--ff-external-item-background-color);
10
+ border: 1px solid var(--ff-external-item-border-color);
11
+ border-radius: var(--ff-external-item-border-radius);
12
+ box-shadow: var(--ff-external-item-shadow);
13
+ cursor: grab;
14
+ user-select: none;
15
+
16
+ &.f-external-item-disabled {
17
+ color: var(--ff-external-item-disabled-color);
18
+ background: var(--ff-external-item-disabled-background-color);
19
+ cursor: not-allowed;
20
+ }
21
+ }
22
+ }
23
+
24
+ @mixin external-item-preview($scoped: true) {
25
+ .f-external-item-preview {
26
+ box-sizing: border-box;
27
+ box-shadow: var(--ff-external-item-preview-shadow);
28
+ }
29
+ }
30
+
31
+ @mixin external-item-placeholder($scoped: true) {
32
+ .f-external-item-placeholder {
33
+ box-sizing: border-box;
34
+ background: var(--ff-external-item-placeholder-background-color);
35
+ border: 1px dashed var(--ff-external-item-placeholder-border-color);
36
+ border-radius: var(--ff-external-item-border-radius);
37
+ }
38
+ }
39
+
40
+ @mixin external-item-all($scoped: true) {
41
+ @include external-item($scoped);
42
+ @include external-item-preview($scoped);
43
+ @include external-item-placeholder($scoped);
44
+ }
@@ -0,0 +1,41 @@
1
+ @mixin _flow-scope($scoped: true) {
2
+ @if $scoped {
3
+ f-flow,
4
+ .f-flow {
5
+ @content;
6
+ }
7
+ } @else {
8
+ @content;
9
+ }
10
+ }
11
+
12
+ @mixin flow($scoped: true) {
13
+ @include _flow-scope($scoped) {
14
+ display: block;
15
+ position: relative;
16
+ width: 100%;
17
+ height: 100%;
18
+ overflow: hidden;
19
+ pointer-events: all;
20
+ user-select: none;
21
+ touch-action: none;
22
+ color: var(--ff-flow-text-color);
23
+ background: var(--ff-flow-background-color);
24
+ font-family: var(--ff-flow-font-family);
25
+ font-size: var(--ff-flow-font-size);
26
+ line-height: 1.4;
27
+ }
28
+ }
29
+
30
+ @mixin canvas($scoped: true) {
31
+ @include _flow-scope($scoped) {
32
+ .f-canvas {
33
+ background: var(--ff-canvas-background-color);
34
+ }
35
+ }
36
+ }
37
+
38
+ @mixin flow-canvas($scoped: true) {
39
+ @include flow($scoped);
40
+ @include canvas($scoped);
41
+ }