@beehexa/vueflow-tokens 0.0.0-stage → 2611.3.4
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 +64 -2
- package/dist/css.d.ts +2 -0
- package/dist/index.d.ts +117 -0
- package/dist/index.js +159 -0
- package/dist/styles.css +116 -0
- package/package.json +49 -4
package/README.md
CHANGED
|
@@ -1,3 +1,65 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @beehexa/vueflow-tokens
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Typed ESM Beehexa adapter for VueFlow 1. The authoritative design values are in
|
|
4
|
+
`@beehexa/design-tokens`, not in an application-owned palette. Vue 3 and VueFlow core,
|
|
5
|
+
controls and minimap are peers; no framework source is copied or bundled.
|
|
6
|
+
|
|
7
|
+
## Integrate
|
|
8
|
+
|
|
9
|
+
Import native Beehexa token CSS once (16px root, 14px body). In the lazy graph entry,
|
|
10
|
+
load upstream core, theme, controls and minimap CSS before `@beehexa/vueflow-tokens/css`.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { createVueFlowTheme } from '@beehexa/vueflow-tokens'
|
|
14
|
+
import '@beehexa/vueflow-tokens/css'
|
|
15
|
+
|
|
16
|
+
const theme = createVueFlowTheme({ dark: false, locale: 'en' })
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Bind `theme.class`, `theme.style` and `theme.flowOptions` to the actual `<VueFlow>`; the viewport object is typed with `FlowProps`, not deprecated `FlowOptions`.
|
|
20
|
+
Bind `theme.background` to `<Background>` and `theme.minimap` to `<MiniMap>`; show
|
|
21
|
+
`<Controls>`. Recompute the theme when the theme or locale changes. Keep existing
|
|
22
|
+
ready/error handlers and call the actual viewport `fitView({ padding: 0.2 })` after
|
|
23
|
+
host/dimension changes. The factory uses VueFlow 1's real `fitViewOnInit` option.
|
|
24
|
+
|
|
25
|
+
## Public contracts
|
|
26
|
+
|
|
27
|
+
- `createVueFlowTheme({ dark?, locale? })`: scoped source variables, real VueFlow
|
|
28
|
+
viewport settings, background and minimap bindings.
|
|
29
|
+
- `NodeType`, `NODE_DIMENSIONS`, `GRID_SPACING`, `TASK_DATA_LAYOUT`: source-backed
|
|
30
|
+
fixed geometry shared by renderers and graph layout. Do not recreate these tables.
|
|
31
|
+
- `getFlowNodeStyles(type, { hovered?, selected?, selfDependency? })`: typed custom
|
|
32
|
+
node body/content/icon/label/connector styles, without decorative motion or gradients.
|
|
33
|
+
- `getNodeColorPalette(category)`: CSS-backed paired category roles, live across
|
|
34
|
+
theme switches. Categories are task, dependency, transformation, validation,
|
|
35
|
+
pushStep, decision, loop and grouped; they identify kinds, never execution status.
|
|
36
|
+
- `getNodeColor(type)`, `getEdgeColorPalette(category)`, `styleTargetEdge(edge, nodes)`:
|
|
37
|
+
source-backed directed edge identity; target stroke and marker remain paired.
|
|
38
|
+
- `FLOW_EDGE`, `FLOW_ICON`: numeric source values at VueFlow/icon API boundaries.
|
|
39
|
+
- Public option, category, dimension, node-state, style and theme interfaces are emitted
|
|
40
|
+
in `dist/index.d.ts`; CSS has a typed `./css` export.
|
|
41
|
+
|
|
42
|
+
Use semantic typography/spacing directly in custom content. Keep category labels and
|
|
43
|
+
icons, selected outline, separate keyboard focus and readable error messages. Do not
|
|
44
|
+
append hexadecimal alpha suffixes to CSS variables. Do not animate idle graph nodes,
|
|
45
|
+
rotate category icons, add glass/gradients, or override core controls in each consumer.
|
|
46
|
+
Preserve graph IDs, stored coordinates and relationship direction on theme changes.
|
|
47
|
+
Exports must capture the current graph surface/font rather than force white/system fonts.
|
|
48
|
+
|
|
49
|
+
Resting handles use the neutral icon role, not keyboard-focus color. TaskFlow-style
|
|
50
|
+
graph fullscreen uses an isolated local stacking context at `z-index.modal` (400), allowing
|
|
51
|
+
global inspectors above it. Child chrome may use private z10/z15 within that context,
|
|
52
|
+
not global1001/1002. This is not an editor takeover at `z-index.fullscreen` (450).
|
|
53
|
+
|
|
54
|
+
## Build and validation
|
|
55
|
+
|
|
56
|
+
The shared `build-adapters.mjs` compiles strict NodeNext source and checks generated
|
|
57
|
+
output. Actual packed-consumer checks exercise exports/CSS with strict TypeScript and
|
|
58
|
+
`skipLibCheck` at the upstream vendor-declaration boundary. Source version `0.0.0`
|
|
59
|
+
stays private; only the authorized runner stamps real package/internal dependency versions.
|
|
60
|
+
|
|
61
|
+
Full authored guidance lives in `src/content/tools/vueflow.mdx` and ships through
|
|
62
|
+
`@beehexa/design-rules`. Verify real light/dark and English/Vietnamese surfaces,
|
|
63
|
+
contrast, all fixed dimensions, long labels, selection/focus/error, target-coloured
|
|
64
|
+
markers, controls/minimap, zoom/snap/fit, expanded/cyclic graphs, fullscreen/ESC and PNG
|
|
65
|
+
export. Typed configuration is not visual or accessibility proof.
|
package/dist/css.d.ts
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { CSSProperties } from 'vue';
|
|
2
|
+
import { type FlowProps, type Node, type Edge } from '@vue-flow/core';
|
|
3
|
+
export interface VueFlowThemeOptions {
|
|
4
|
+
dark?: boolean;
|
|
5
|
+
locale?: 'en' | 'vi';
|
|
6
|
+
}
|
|
7
|
+
export type FlowCategory = 'task' | 'dependency' | 'transformation' | 'validation' | 'pushStep' | 'decision' | 'loop' | 'grouped';
|
|
8
|
+
export type FlowEdgeCategory = 'dependency' | 'transformation' | 'dataFlow' | 'conditional';
|
|
9
|
+
export interface FlowNodePalette {
|
|
10
|
+
primary: string;
|
|
11
|
+
text: string;
|
|
12
|
+
background: string;
|
|
13
|
+
border: string;
|
|
14
|
+
hover: string;
|
|
15
|
+
connector: {
|
|
16
|
+
bg: string;
|
|
17
|
+
border: string;
|
|
18
|
+
logoBorder: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare enum NodeType {
|
|
22
|
+
MAIN_TASK = "task",
|
|
23
|
+
TASK_DEPENDENCY = "task_dependency",
|
|
24
|
+
TASK_TRANSFORMATION = "task_transformation",
|
|
25
|
+
TASK_DATA = "task_data",
|
|
26
|
+
TRANSFORMATION_GROUP = "transformationGroup",
|
|
27
|
+
VALIDATION_GROUP = "validationGroup",
|
|
28
|
+
PUSH_STEPS_GROUP = "pushStepsGroup",
|
|
29
|
+
TRANSFORMATION = "transformation",
|
|
30
|
+
VALIDATION = "validation",
|
|
31
|
+
PUSH_STEP = "push_step",
|
|
32
|
+
DECISION = "decision",
|
|
33
|
+
LOOP = "loop",
|
|
34
|
+
PROFILE = "profile"
|
|
35
|
+
}
|
|
36
|
+
export interface FlowDimensions {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
}
|
|
40
|
+
export declare const NODE_DIMENSIONS: Record<NodeType, FlowDimensions>;
|
|
41
|
+
export declare const GRID_SPACING: {
|
|
42
|
+
readonly HORIZONTAL: number;
|
|
43
|
+
readonly VERTICAL: number;
|
|
44
|
+
readonly TASK_DATA_X_GAP: number;
|
|
45
|
+
readonly GROUP_Y_OFFSET: number;
|
|
46
|
+
};
|
|
47
|
+
export declare const TASK_DATA_LAYOUT: {
|
|
48
|
+
readonly VALIDATION_NODE_Y_GAP: number;
|
|
49
|
+
readonly TRANSFORMATION_NODE_Y_GAP: number;
|
|
50
|
+
readonly PUSH_STEP_NODE_Y_GAP: number;
|
|
51
|
+
readonly PUSH_STEP_NODE_X_GAP: number;
|
|
52
|
+
readonly PUSH_STEP_BRANCH_X_GAP: number;
|
|
53
|
+
readonly EXPANDED_GROUP_X: number;
|
|
54
|
+
readonly EXPANDED_GROUP_Y_START: number;
|
|
55
|
+
readonly TREE_LEVEL_Y_GAP: number;
|
|
56
|
+
readonly TREE_SIBLING_X_GAP: number;
|
|
57
|
+
readonly TREE_MIN_WIDTH: number;
|
|
58
|
+
};
|
|
59
|
+
export declare const FLOW_EDGE: {
|
|
60
|
+
readonly width: number;
|
|
61
|
+
readonly marker: number;
|
|
62
|
+
readonly radius: number;
|
|
63
|
+
readonly handle: number;
|
|
64
|
+
};
|
|
65
|
+
export declare const FLOW_ICON: {
|
|
66
|
+
readonly small: number;
|
|
67
|
+
readonly medium: number;
|
|
68
|
+
readonly large: number;
|
|
69
|
+
};
|
|
70
|
+
/** CSS bindings stay reactive to the source theme/locale without rebuilding a graph. */
|
|
71
|
+
export declare function getNodeColorPalette(category: FlowCategory): FlowNodePalette;
|
|
72
|
+
export declare function getEdgeColorPalette(category: FlowEdgeCategory): FlowNodePalette;
|
|
73
|
+
/** Unknown/custom node types retain the task category, matching VueFlow's default node. */
|
|
74
|
+
export declare function getNodeColor(type: string): string;
|
|
75
|
+
export declare const FLOW_VIEWPORT: {
|
|
76
|
+
minZoom: number;
|
|
77
|
+
maxZoom: number;
|
|
78
|
+
snapToGrid: true;
|
|
79
|
+
snapGrid: [number, number];
|
|
80
|
+
fitViewOnInit: true;
|
|
81
|
+
};
|
|
82
|
+
export interface VueFlowTheme {
|
|
83
|
+
class: 'bh-vue-flow';
|
|
84
|
+
style: CSSProperties;
|
|
85
|
+
flowOptions: Partial<FlowProps>;
|
|
86
|
+
minimap: {
|
|
87
|
+
nodeColor: (node: Node) => string;
|
|
88
|
+
maskColor: string;
|
|
89
|
+
nodeStrokeColor: string;
|
|
90
|
+
};
|
|
91
|
+
background: {
|
|
92
|
+
patternColor: string;
|
|
93
|
+
bgColor: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/** Apply to the actual VueFlow host; import the CSS companion after upstream styles. */
|
|
97
|
+
export declare function createVueFlowTheme(options?: VueFlowThemeOptions): VueFlowTheme;
|
|
98
|
+
/** Preserve target identity for both the visible stroke and arrow marker. */
|
|
99
|
+
export declare function styleTargetEdge(edge: Edge, nodes: readonly Node[]): Edge;
|
|
100
|
+
export interface FlowNodeState {
|
|
101
|
+
hovered?: boolean;
|
|
102
|
+
selected?: boolean;
|
|
103
|
+
selfDependency?: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface FlowNodeStyles {
|
|
106
|
+
container: CSSProperties;
|
|
107
|
+
content: CSSProperties;
|
|
108
|
+
icon: CSSProperties;
|
|
109
|
+
label: CSSProperties;
|
|
110
|
+
text: CSSProperties;
|
|
111
|
+
loadingIcon: CSSProperties;
|
|
112
|
+
connectorLogo: CSSProperties;
|
|
113
|
+
connectorFlow: CSSProperties;
|
|
114
|
+
connectorArrow: CSSProperties;
|
|
115
|
+
}
|
|
116
|
+
/** Custom content and layout share fixed source geometry, not viewport-dependent sizing. */
|
|
117
|
+
export declare function getFlowNodeStyles(type: NodeType, state?: FlowNodeState): FlowNodeStyles;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { tokens } from '@beehexa/design-tokens';
|
|
2
|
+
import { MarkerType } from '@vue-flow/core';
|
|
3
|
+
export var NodeType;
|
|
4
|
+
(function (NodeType) {
|
|
5
|
+
NodeType["MAIN_TASK"] = "task";
|
|
6
|
+
NodeType["TASK_DEPENDENCY"] = "task_dependency";
|
|
7
|
+
NodeType["TASK_TRANSFORMATION"] = "task_transformation";
|
|
8
|
+
NodeType["TASK_DATA"] = "task_data";
|
|
9
|
+
NodeType["TRANSFORMATION_GROUP"] = "transformationGroup";
|
|
10
|
+
NodeType["VALIDATION_GROUP"] = "validationGroup";
|
|
11
|
+
NodeType["PUSH_STEPS_GROUP"] = "pushStepsGroup";
|
|
12
|
+
NodeType["TRANSFORMATION"] = "transformation";
|
|
13
|
+
NodeType["VALIDATION"] = "validation";
|
|
14
|
+
NodeType["PUSH_STEP"] = "push_step";
|
|
15
|
+
NodeType["DECISION"] = "decision";
|
|
16
|
+
NodeType["LOOP"] = "loop";
|
|
17
|
+
NodeType["PROFILE"] = "profile";
|
|
18
|
+
})(NodeType || (NodeType = {}));
|
|
19
|
+
const numberToken = (name) => {
|
|
20
|
+
const value = tokens.light[name];
|
|
21
|
+
return Number.parseFloat(value) * (value.endsWith('rem') ? 16 : 1);
|
|
22
|
+
};
|
|
23
|
+
export const NODE_DIMENSIONS = Object.fromEntries(Object.values(NodeType).map(type => [type, {
|
|
24
|
+
width: numberToken(`flow.geometry.${type}.width`),
|
|
25
|
+
height: numberToken(`flow.geometry.${type}.height`)
|
|
26
|
+
}]));
|
|
27
|
+
export const GRID_SPACING = {
|
|
28
|
+
HORIZONTAL: numberToken('flow.grid.HORIZONTAL'), VERTICAL: numberToken('flow.grid.VERTICAL'),
|
|
29
|
+
TASK_DATA_X_GAP: numberToken('flow.grid.TASK_DATA_X_GAP'),
|
|
30
|
+
GROUP_Y_OFFSET: numberToken('flow.grid.GROUP_Y_OFFSET')
|
|
31
|
+
};
|
|
32
|
+
export const TASK_DATA_LAYOUT = {
|
|
33
|
+
VALIDATION_NODE_Y_GAP: numberToken('flow.layout.VALIDATION_NODE_Y_GAP'),
|
|
34
|
+
TRANSFORMATION_NODE_Y_GAP: numberToken('flow.layout.TRANSFORMATION_NODE_Y_GAP'),
|
|
35
|
+
PUSH_STEP_NODE_Y_GAP: numberToken('flow.layout.PUSH_STEP_NODE_Y_GAP'),
|
|
36
|
+
PUSH_STEP_NODE_X_GAP: numberToken('flow.layout.PUSH_STEP_NODE_X_GAP'),
|
|
37
|
+
PUSH_STEP_BRANCH_X_GAP: numberToken('flow.layout.PUSH_STEP_BRANCH_X_GAP'),
|
|
38
|
+
EXPANDED_GROUP_X: numberToken('flow.layout.EXPANDED_GROUP_X'),
|
|
39
|
+
EXPANDED_GROUP_Y_START: numberToken('flow.layout.EXPANDED_GROUP_Y_START'),
|
|
40
|
+
TREE_LEVEL_Y_GAP: numberToken('flow.layout.TREE_LEVEL_Y_GAP'),
|
|
41
|
+
TREE_SIBLING_X_GAP: numberToken('flow.layout.TREE_SIBLING_X_GAP'),
|
|
42
|
+
TREE_MIN_WIDTH: numberToken('flow.layout.TREE_MIN_WIDTH')
|
|
43
|
+
};
|
|
44
|
+
export const FLOW_EDGE = {
|
|
45
|
+
width: numberToken('flow.edge.width'), marker: numberToken('flow.edge.marker'),
|
|
46
|
+
radius: numberToken('flow.edge.radius'), handle: numberToken('flow.edge.handle')
|
|
47
|
+
};
|
|
48
|
+
export const FLOW_ICON = {
|
|
49
|
+
small: numberToken('size.icon.default'), medium: numberToken('size.icon.medium'),
|
|
50
|
+
large: numberToken('size.icon.large')
|
|
51
|
+
};
|
|
52
|
+
const nodeCategories = {
|
|
53
|
+
task: 'task', task_data: 'task', profile: 'task', task_dependency: 'dependency',
|
|
54
|
+
task_transformation: 'transformation', transformation: 'transformation',
|
|
55
|
+
transformationGroup: 'transformation', validation: 'validation',
|
|
56
|
+
validationGroup: 'validation', push_step: 'pushStep', pushStep: 'pushStep',
|
|
57
|
+
pushStepsGroup: 'pushStep', decision: 'decision', loop: 'loop', grouped: 'grouped'
|
|
58
|
+
};
|
|
59
|
+
const variable = (name) => `var(--bh-${name.replaceAll('.', '-')})`;
|
|
60
|
+
const palettes = Object.fromEntries([
|
|
61
|
+
'task', 'dependency', 'transformation', 'validation', 'pushStep', 'decision', 'loop', 'grouped'
|
|
62
|
+
].map(category => {
|
|
63
|
+
const role = (part) => variable(`flow.category.${category}.${part}`);
|
|
64
|
+
return [category, {
|
|
65
|
+
primary: role('border'), text: role('foreground'), background: role('background'),
|
|
66
|
+
border: role('border'), hover: role('hover'),
|
|
67
|
+
connector: { bg: role('background'), border: role('border'), logoBorder: role('border') }
|
|
68
|
+
}];
|
|
69
|
+
}));
|
|
70
|
+
/** CSS bindings stay reactive to the source theme/locale without rebuilding a graph. */
|
|
71
|
+
export function getNodeColorPalette(category) {
|
|
72
|
+
return palettes[category];
|
|
73
|
+
}
|
|
74
|
+
export function getEdgeColorPalette(category) {
|
|
75
|
+
return palettes[category === 'dataFlow' ? 'pushStep' :
|
|
76
|
+
category === 'conditional' ? 'decision' : category];
|
|
77
|
+
}
|
|
78
|
+
/** Unknown/custom node types retain the task category, matching VueFlow's default node. */
|
|
79
|
+
export function getNodeColor(type) {
|
|
80
|
+
return palettes[nodeCategories[type] ?? 'task'].border;
|
|
81
|
+
}
|
|
82
|
+
export const FLOW_VIEWPORT = {
|
|
83
|
+
minZoom: 0.2, maxZoom: 4, snapToGrid: true,
|
|
84
|
+
snapGrid: [20, 20], fitViewOnInit: true
|
|
85
|
+
};
|
|
86
|
+
/** Apply to the actual VueFlow host; import the CSS companion after upstream styles. */
|
|
87
|
+
export function createVueFlowTheme(options = {}) {
|
|
88
|
+
const mode = { ...tokens.light, ...(options.dark ? tokens.dark : {}) };
|
|
89
|
+
const typography = options.locale === 'vi' ? { ...mode, ...tokens.vi } : mode;
|
|
90
|
+
return {
|
|
91
|
+
class: 'bh-vue-flow',
|
|
92
|
+
style: {
|
|
93
|
+
...Object.fromEntries(Object.entries(mode).filter(([name]) => name.startsWith('color.') || name.startsWith('flow.category.')).map(([name, value]) => [`--bh-${name.replaceAll('.', '-')}`, value])),
|
|
94
|
+
...(options.locale === 'vi' ? Object.fromEntries(Object.entries(tokens.vi)
|
|
95
|
+
.map(([name, value]) => [`--bh-${name.replaceAll('.', '-')}`, value])) : {}),
|
|
96
|
+
'--bh-flow-surface': mode['color.surface.page'],
|
|
97
|
+
'--bh-flow-font': typography['font.body.default'],
|
|
98
|
+
'--bh-flow-focus': mode['color.border.focus'],
|
|
99
|
+
'--bh-flow-selected': mode['color.border.selected'],
|
|
100
|
+
'--bh-flow-error': mode['color.border.danger']
|
|
101
|
+
},
|
|
102
|
+
flowOptions: { ...FLOW_VIEWPORT, snapGrid: [...FLOW_VIEWPORT.snapGrid] },
|
|
103
|
+
minimap: {
|
|
104
|
+
nodeColor: node => getNodeColor(node.type ?? 'task'),
|
|
105
|
+
maskColor: variable('color.surface.scrim'), nodeStrokeColor: variable('color.border.bold')
|
|
106
|
+
},
|
|
107
|
+
background: { patternColor: variable('color.border'), bgColor: mode['color.surface.page'] }
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/** Preserve target identity for both the visible stroke and arrow marker. */
|
|
111
|
+
export function styleTargetEdge(edge, nodes) {
|
|
112
|
+
const target = nodes.find(node => node.id === edge.target);
|
|
113
|
+
const stroke = getNodeColor(target?.type ?? 'task');
|
|
114
|
+
return {
|
|
115
|
+
...edge, animated: false,
|
|
116
|
+
style: { ...(typeof edge.style === 'object' ? edge.style : {}), stroke },
|
|
117
|
+
markerEnd: {
|
|
118
|
+
...(typeof edge.markerEnd === 'object' ? edge.markerEnd : { type: MarkerType.ArrowClosed }),
|
|
119
|
+
color: stroke, width: FLOW_EDGE.marker, height: FLOW_EDGE.marker
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/** Custom content and layout share fixed source geometry, not viewport-dependent sizing. */
|
|
124
|
+
export function getFlowNodeStyles(type, state = {}) {
|
|
125
|
+
const dimensions = NODE_DIMENSIONS[type];
|
|
126
|
+
const palette = palettes[nodeCategories[type] ?? 'task'];
|
|
127
|
+
const round = type === NodeType.LOOP || type === NodeType.DECISION;
|
|
128
|
+
const label = {
|
|
129
|
+
font: variable('font.label.default'), color: palette.text, textAlign: 'center',
|
|
130
|
+
overflowWrap: 'anywhere', width: '100%'
|
|
131
|
+
};
|
|
132
|
+
const icon = {
|
|
133
|
+
color: palette.primary, fontSize: variable('size.icon.large'),
|
|
134
|
+
display: 'flex', alignItems: 'center', justifyContent: 'center'
|
|
135
|
+
};
|
|
136
|
+
return {
|
|
137
|
+
container: {
|
|
138
|
+
width: `${dimensions.width}px`, height: `${dimensions.height}px`,
|
|
139
|
+
boxSizing: 'border-box', display: 'flex', flexDirection: 'column',
|
|
140
|
+
alignItems: 'center', justifyContent: 'center', cursor: 'pointer',
|
|
141
|
+
border: `${variable('border.width.selected')} solid ${palette.border}`,
|
|
142
|
+
borderStyle: state.selfDependency ? 'dashed' : 'solid',
|
|
143
|
+
borderRadius: round ? '50%' : variable('radius.100'),
|
|
144
|
+
background: state.hovered ? palette.hover : palette.background,
|
|
145
|
+
color: palette.text, font: variable('font.body.default'),
|
|
146
|
+
outline: state.selected ? `${variable('border.width.selected')} solid ${variable('color.border.selected')}` : undefined,
|
|
147
|
+
outlineOffset: variable('state.focus.offset')
|
|
148
|
+
},
|
|
149
|
+
content: {
|
|
150
|
+
display: 'flex', flexDirection: 'column', justifyContent: 'center',
|
|
151
|
+
alignItems: 'center', boxSizing: 'border-box', height: '100%', width: '100%',
|
|
152
|
+
padding: variable('space.150'), gap: variable('space.050')
|
|
153
|
+
},
|
|
154
|
+
icon, label, text: label, loadingIcon: icon,
|
|
155
|
+
connectorLogo: { borderRadius: variable('radius.075'), objectFit: 'contain' },
|
|
156
|
+
connectorFlow: { display: 'flex', alignItems: 'center', gap: variable('space.100') },
|
|
157
|
+
connectorArrow: { color: palette.primary, font: variable('font.label.default') }
|
|
158
|
+
};
|
|
159
|
+
}
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
.bh-vue-flow.vue-flow {
|
|
2
|
+
background: var(--bh-flow-surface, var(--bh-color-surface-page));
|
|
3
|
+
color: var(--bh-color-text);
|
|
4
|
+
font: var(--bh-flow-font, var(--bh-font-body-default));
|
|
5
|
+
}
|
|
6
|
+
.bh-vue-flow .vue-flow__node {
|
|
7
|
+
--vf-node-bg: var(--bh-color-surface);
|
|
8
|
+
--vf-node-text: var(--bh-color-text);
|
|
9
|
+
--vf-node-color: var(--bh-flow-category-task-border);
|
|
10
|
+
--vf-handle: var(--bh-color-icon);
|
|
11
|
+
--vf-box-shadow: var(--bh-color-border-selected);
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
font: inherit;
|
|
14
|
+
color: var(--bh-color-text);
|
|
15
|
+
}
|
|
16
|
+
.bh-vue-flow .vue-flow__node-default,
|
|
17
|
+
.bh-vue-flow .vue-flow__node-input,
|
|
18
|
+
.bh-vue-flow .vue-flow__node-output {
|
|
19
|
+
background: var(--bh-color-surface);
|
|
20
|
+
border: var(--bh-border-width-default) solid var(--bh-color-border-bold);
|
|
21
|
+
border-radius: var(--bh-radius-075);
|
|
22
|
+
padding: var(--bh-space-150);
|
|
23
|
+
}
|
|
24
|
+
.bh-vue-flow .vue-flow__node-default.selectable:hover,
|
|
25
|
+
.bh-vue-flow .vue-flow__node-input.selectable:hover,
|
|
26
|
+
.bh-vue-flow .vue-flow__node-output.selectable:hover {
|
|
27
|
+
box-shadow: var(--bh-elevation-shadow-raised);
|
|
28
|
+
}
|
|
29
|
+
.bh-vue-flow .vue-flow__node.selected {
|
|
30
|
+
outline: var(--bh-border-width-selected) solid var(--bh-flow-selected, var(--bh-color-border-selected));
|
|
31
|
+
outline-offset: var(--bh-state-focus-offset);
|
|
32
|
+
box-shadow: 0 0 0 var(--bh-border-width-accent) var(--bh-color-border-selected);
|
|
33
|
+
}
|
|
34
|
+
.bh-vue-flow .vue-flow__node:focus-visible,
|
|
35
|
+
.bh-vue-flow .vue-flow__node :focus-visible,
|
|
36
|
+
.bh-vue-flow .vue-flow__controls-button:focus-visible {
|
|
37
|
+
outline: var(--bh-border-width-focused) solid var(--bh-flow-focus, var(--bh-color-border-focus));
|
|
38
|
+
outline-offset: var(--bh-state-focus-offset);
|
|
39
|
+
}
|
|
40
|
+
.bh-vue-flow .vue-flow__node[data-error='true'] {
|
|
41
|
+
border-color: var(--bh-flow-error, var(--bh-color-border-danger));
|
|
42
|
+
border-style: dashed;
|
|
43
|
+
}
|
|
44
|
+
.bh-vue-flow .vue-flow__handle {
|
|
45
|
+
width: var(--bh-flow-edge-handle);
|
|
46
|
+
height: var(--bh-flow-edge-handle);
|
|
47
|
+
border: var(--bh-border-width-selected) solid var(--bh-color-surface);
|
|
48
|
+
background: var(--bh-color-icon);
|
|
49
|
+
}
|
|
50
|
+
.bh-vue-flow .vue-flow__edge-path,
|
|
51
|
+
.bh-vue-flow .vue-flow__connection-path {
|
|
52
|
+
stroke: var(--bh-flow-category-task-border);
|
|
53
|
+
stroke-width: var(--bh-flow-edge-width);
|
|
54
|
+
}
|
|
55
|
+
.bh-vue-flow .vue-flow__edge.updating .vue-flow__edge-path {
|
|
56
|
+
stroke: var(--bh-color-border-focus);
|
|
57
|
+
}
|
|
58
|
+
.bh-vue-flow .vue-flow__edge.selected .vue-flow__edge-path {
|
|
59
|
+
stroke-width: var(--bh-border-width-accent);
|
|
60
|
+
}
|
|
61
|
+
.bh-vue-flow .vue-flow__edge-text {
|
|
62
|
+
fill: var(--bh-color-text);
|
|
63
|
+
font: var(--bh-font-label-small);
|
|
64
|
+
}
|
|
65
|
+
.bh-vue-flow .vue-flow__edge-textbg { fill: var(--bh-color-surface); }
|
|
66
|
+
.bh-vue-flow .vue-flow__selection,
|
|
67
|
+
.bh-vue-flow .vue-flow__nodesselection-rect {
|
|
68
|
+
background: var(--bh-color-background-selected);
|
|
69
|
+
border: var(--bh-border-width-selected) dashed var(--bh-color-border-focus);
|
|
70
|
+
}
|
|
71
|
+
.bh-vue-flow .vue-flow__controls {
|
|
72
|
+
background: var(--bh-color-surface);
|
|
73
|
+
border: var(--bh-border-width-default) solid var(--bh-color-border);
|
|
74
|
+
border-radius: var(--bh-radius-075);
|
|
75
|
+
box-shadow: var(--bh-elevation-shadow-raised);
|
|
76
|
+
}
|
|
77
|
+
.bh-vue-flow .vue-flow__controls-button {
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
width: var(--bh-size-control-default);
|
|
80
|
+
height: var(--bh-size-control-default);
|
|
81
|
+
padding: var(--bh-space-100);
|
|
82
|
+
background: var(--bh-color-surface);
|
|
83
|
+
color: var(--bh-color-icon);
|
|
84
|
+
fill: currentColor;
|
|
85
|
+
border-bottom: var(--bh-border-width-default) solid var(--bh-color-border);
|
|
86
|
+
}
|
|
87
|
+
.bh-vue-flow .vue-flow__controls-button:hover {
|
|
88
|
+
background: var(--bh-color-background-neutral-subtle-hover);
|
|
89
|
+
}
|
|
90
|
+
.bh-vue-flow .vue-flow__controls-button:active {
|
|
91
|
+
background: var(--bh-color-background-neutral-subtle-pressed);
|
|
92
|
+
}
|
|
93
|
+
.bh-vue-flow .vue-flow__controls-button:disabled {
|
|
94
|
+
background: var(--bh-color-background-disabled);
|
|
95
|
+
color: var(--bh-color-icon-disabled);
|
|
96
|
+
}
|
|
97
|
+
.bh-vue-flow .vue-flow__controls-button:disabled svg { fill-opacity: 1; }
|
|
98
|
+
.bh-vue-flow .vue-flow__minimap {
|
|
99
|
+
background: var(--bh-color-surface);
|
|
100
|
+
border: var(--bh-border-width-default) solid var(--bh-color-border-bold);
|
|
101
|
+
border-radius: var(--bh-radius-075);
|
|
102
|
+
box-shadow: var(--bh-elevation-shadow-raised);
|
|
103
|
+
}
|
|
104
|
+
.bh-vue-flow .vue-flow__minimap-mask { fill: var(--bh-color-surface-scrim); }
|
|
105
|
+
.bh-vue-flow .vue-flow__minimap-node { stroke: var(--bh-color-border-bold); }
|
|
106
|
+
.bh-vue-flow .vue-flow__attribution {
|
|
107
|
+
background: var(--bh-color-surface);
|
|
108
|
+
color: var(--bh-color-text-subtle);
|
|
109
|
+
font: var(--bh-font-body-small);
|
|
110
|
+
}
|
|
111
|
+
@media (pointer: coarse) {
|
|
112
|
+
.bh-vue-flow .vue-flow__controls-button {
|
|
113
|
+
width: var(--bh-size-target-touch);
|
|
114
|
+
height: var(--bh-size-target-touch);
|
|
115
|
+
}
|
|
116
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beehexa/vueflow-tokens",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2611.3.4",
|
|
4
|
+
"description": "Source-backed Beehexa theme, semantic categories and geometry for VueFlow 1",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/beehexacorp/beehexa.design.git",
|
|
8
|
+
"directory": "packages/vueflow-tokens"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"sideEffects": [
|
|
18
|
+
"**/*.css"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./css": {
|
|
26
|
+
"types": "./dist/css.d.ts",
|
|
27
|
+
"default": "./dist/styles.css"
|
|
28
|
+
},
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@beehexa/design-tokens": "2611.3.4"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@vue-flow/core": "^1.0.0",
|
|
36
|
+
"@vue-flow/controls": "^1.0.0",
|
|
37
|
+
"@vue-flow/minimap": "^1.0.0",
|
|
38
|
+
"vue": "^3.0.0"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "node ../../scripts/build-adapters.mjs vueflow-tokens",
|
|
45
|
+
"check": "node ../../scripts/build-adapters.mjs vueflow-tokens --check",
|
|
46
|
+
"prepack": "npm run build"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=22.22.0"
|
|
50
|
+
}
|
|
51
|
+
}
|