@stealthscale/component-graphs 0.1.0 → 0.2.2

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/dist/theme.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as recipe } from "./recipe-BkmwNoaQ.js";
1
+ import { t as recipe } from "./recipes-lWPA4IJC.js";
2
2
  import { definePreset } from "@stealthscale/theme/authoring";
3
3
  //#region src/theme.ts
4
4
  /**
@@ -0,0 +1,88 @@
1
+ {
2
+ "about": "A directed graph laid out by rank: focus a node to trace what feeds it and what it feeds, and open or close a branch with the count of what it hides.",
3
+ "controlled": {
4
+ "about": "The caller keeps the focus in its own state through focus and onFocusChange, so a search result, a table row or the address can focus a node. A press on a node or the Clear focus control reports the new focus back.",
5
+ "label": "Order lineage",
6
+ "none": "Nothing focused",
7
+ "pick": "Focus a dataset",
8
+ "title": "Controlled focus"
9
+ },
10
+ "controls": "Lineage controls",
11
+ "empty": {
12
+ "about": "A graph without a node renders its message in the canvas's place, at the canvas's ratio, without the controls, the readout or the overview.",
13
+ "label": "Revenue lineage",
14
+ "message": "No datasets match the filter.",
15
+ "title": "Empty"
16
+ },
17
+ "fit": "Fit the graph in view",
18
+ "isolate": {
19
+ "about": "trace=\"isolate\" renders the focused node and the nodes it traced alone, laid out again, and depth={1} follows one hop each way. A warehouse graph runs to thousands of tables, and one hop is enough for most questions.",
20
+ "label": "Revenue lineage, one hop",
21
+ "title": "Isolated trace"
22
+ },
23
+ "kinds": {
24
+ "dashboard": "Dashboard",
25
+ "features": "Feature set",
26
+ "job": "Scheduled job",
27
+ "model": "dbt model",
28
+ "source": "Source"
29
+ },
30
+ "lineage": {
31
+ "about": "The graph opens focused on dim_customer. Each card that feeds it or depends on it states its relation, and the rest recede. Select another node to trace it, and press Escape or Clear focus to drop the trace. The layout moves only when the nodes shown change.",
32
+ "caption": "Customer dimensions feed the executive overview and the churn features, and the failed events model feeds both.",
33
+ "exec_overview": "Executive overview",
34
+ "finance_export": "Finance export",
35
+ "label": "Revenue lineage",
36
+ "overview": "Overview of the revenue lineage",
37
+ "title": "Lineage"
38
+ },
39
+ "org": {
40
+ "about": "treeEdges turns a flat list whose people state their manager into the chart's edges. collapsible gives each manager a control with the number of people it hides or shows, and trace=\"off\" keeps a focus as a selection.",
41
+ "clear": "Clear selection",
42
+ "collapse_one": "Hide {{count}} report",
43
+ "collapse_other": "Hide {{count}} reports",
44
+ "description": "Press Enter or Space to select the person, and Escape to clear the selection.",
45
+ "empty": "Nobody to show.",
46
+ "expand_one": "Show {{count}} report",
47
+ "expand_other": "Show {{count}} reports",
48
+ "label": "Organisation chart",
49
+ "leave": "On leave",
50
+ "open": "Open role",
51
+ "prompt": "Select a person to see how many people report to them.",
52
+ "reports": "Reports",
53
+ "reportsTo": "Reports to",
54
+ "summary_one": "{{name}} leads {{count}} person.",
55
+ "summary_other": "{{name}} leads {{count}} people.",
56
+ "title": "Org chart"
57
+ },
58
+ "people": {
59
+ "ceo": { "name": "Ada Okonkwo", "title": "Chief executive" },
60
+ "cfo": { "name": "Priya Raman", "title": "Chief financial officer" },
61
+ "cpo": { "name": "Mateo Silva", "title": "Chief product officer" },
62
+ "cto": { "name": "Sven Halvorsen", "title": "Chief technology officer" },
63
+ "des1": { "name": "Hanna Virtanen", "title": "Head of design" },
64
+ "eng1": { "name": "Ines Duarte", "title": "Head of platform" },
65
+ "eng2": { "name": "Tomas Nowak", "title": "Head of product engineering" },
66
+ "eng3": { "name": "Yuki Tanaka", "title": "Staff engineer" },
67
+ "eng4": { "name": "Nadia Aslam", "title": "Senior engineer" },
68
+ "fin1": { "name": "Grace Mbeki", "title": "Financial controller" },
69
+ "pm1": { "name": "Vacant", "title": "Product manager" }
70
+ },
71
+ "status": {
72
+ "failed": "Failed",
73
+ "stale": "Stale"
74
+ },
75
+ "title": "Directed graph",
76
+ "words": {
77
+ "clear": "Clear focus",
78
+ "description": "Press Enter or Space to trace the dataset, and Escape to clear the trace.",
79
+ "downstream": "Downstream",
80
+ "edge": "{{source}} to {{target}}",
81
+ "focus": "Focus",
82
+ "prompt": "Select a dataset to trace what feeds it and what depends on it.",
83
+ "summary": "{{name}}: {{upstream}} upstream, {{downstream}} downstream",
84
+ "upstream": "Upstream"
85
+ },
86
+ "zoomIn": "Zoom in",
87
+ "zoomOut": "Zoom out"
88
+ }
@@ -0,0 +1,155 @@
1
+ {
2
+ "about": "A canvas of nodes and the edges between them over React Flow: named nodes with named ports, edges a person can remove, zoom controls and an overview map, and layouts by rank.",
3
+ "controls": "Canvas",
4
+ "editor": {
5
+ "about": "An editable canvas keeps its nodes and edges in React Flow's own state hooks. Drag from an output port to an input port to connect two steps, drag a step to move it, and press an edge's remove control or select it and press Delete to remove it.",
6
+ "count_one": "{{count}} connection",
7
+ "count_other": "{{count}} connections",
8
+ "email": "Send email",
9
+ "enrich": "Enrich customer",
10
+ "label": "Alert routing",
11
+ "remove": "Remove the connection from {{source}} to {{target}}",
12
+ "route": "Route by severity",
13
+ "slack": "Post to Slack",
14
+ "title": "Editable canvas",
15
+ "webhook": "Webhook"
16
+ },
17
+ "fit": "Fit the graph in view",
18
+ "judge": {
19
+ "about": "A node with two outputs names each port beside its handle, and an edge leaves the port its sourceHandle names. The judge is invalid, so its card is edged in the error ink and states the fault.",
20
+ "caption": "Answers that pass the rubric are published, and the rest go back for revision.",
21
+ "draft": "Draft answer",
22
+ "fail": "Fail",
23
+ "judge": "Judge",
24
+ "label": "Answer review",
25
+ "model": "Language model",
26
+ "pass": "Pass",
27
+ "problem": "No passing score is set.",
28
+ "publish": "Publish",
29
+ "revise": "Revise",
30
+ "rubric": "Rubric of five checks",
31
+ "title": "Ports and problems"
32
+ },
33
+ "pipeline": {
34
+ "about": "layoutGraph places the steps of a nightly pipeline in ranks 64px apart, from the sources at the top to the outputs at the bottom. The canvas is read-only: it pans, zooms and gives each step a tab stop, and nothing on it can be moved or removed.",
35
+ "caption": "The churn model failed after the join of orders and customers.",
36
+ "churn": { "kind": "Model", "label": "Churn model" },
37
+ "clean": { "kind": "Transform", "label": "Clean orders" },
38
+ "customers": { "kind": "Source table", "label": "Customers" },
39
+ "join": { "kind": "Transform", "label": "Join customers" },
40
+ "label": "Nightly pipeline",
41
+ "orders": { "kind": "Source table", "label": "Orders" },
42
+ "revenue": { "kind": "Dashboard", "label": "Revenue report" },
43
+ "title": "Read-only pipeline"
44
+ },
45
+ "ratio": {
46
+ "about": "ratio sets the canvas's aspect ratio. React Flow renders nothing in a box without a height, so the ratio gives the canvas its height before React Flow measures it.",
47
+ "title": "Ratio"
48
+ },
49
+ "review": {
50
+ "draft": "Draft",
51
+ "label": "Review flow",
52
+ "publish": "Publish",
53
+ "review": "Review"
54
+ },
55
+ "services": {
56
+ "about": "The overview map below the canvas shows the whole graph and the part in view. Drag it to pan the canvas, and scroll over it to zoom.",
57
+ "auth": "auth",
58
+ "caption": "Checkout calls five services, and every order touches inventory.",
59
+ "cart": "cart",
60
+ "catalog": "catalog",
61
+ "checkout": "checkout",
62
+ "fraud": "fraud",
63
+ "gateway": "gateway",
64
+ "inventory": "inventory",
65
+ "label": "Service calls",
66
+ "ledger": "ledger",
67
+ "media": "media",
68
+ "overview": "Overview of the service calls",
69
+ "payments": "payments",
70
+ "pricing": "pricing",
71
+ "search": "search",
72
+ "shipping": "shipping",
73
+ "title": "Overview map"
74
+ },
75
+ "status": {
76
+ "failed": "Failed",
77
+ "running": "Running",
78
+ "succeeded": "Succeeded"
79
+ },
80
+ "title": "Graph",
81
+ "versions": {
82
+ "about": "diffGraphs compares two versions of a flow, and each canvas takes the comparison as changes. An added or changed step takes a tag with a mark and a word, the removed step is tagged in the version it is in, an unchanged step recedes, and an added edge is the success ink while a removed one is dashed.",
83
+ "added": "Added",
84
+ "after": {
85
+ "caption": "Version 4 scores three drafts before it publishes, and no longer notifies the owner.",
86
+ "label": "Version 4 of the answer flow"
87
+ },
88
+ "before": {
89
+ "caption": "Version 3 publishes the first draft and emails the owner.",
90
+ "label": "Version 3 of the answer flow"
91
+ },
92
+ "changed": "Changed",
93
+ "details": {
94
+ "email": "By email",
95
+ "helpCentre": "To the help centre",
96
+ "large": "Large model",
97
+ "screening": "Blocks unsafe requests",
98
+ "small": "Small model",
99
+ "three": "Best of three drafts"
100
+ },
101
+ "list": {
102
+ "about": "The comparison is data, so a list of the changes composes from the collections DataList and the data package's Badge: the mark and the word in the label column, the name in the value column, and the changed fields after a changed step's name.",
103
+ "fields": "{{label}} ({{fields}})",
104
+ "links": "Connections",
105
+ "steps": "Steps",
106
+ "subtitle": "model",
107
+ "summary_one": "{{count}} change",
108
+ "summary_other": "{{count}} changes",
109
+ "title": "Change list"
110
+ },
111
+ "removed": "Removed",
112
+ "steps": {
113
+ "draft": "Draft the answer",
114
+ "notify": "Notify the owner",
115
+ "publish": "Publish the answer",
116
+ "score": "Score the drafts",
117
+ "screen": "Screen the request"
118
+ },
119
+ "title": "Two versions",
120
+ "unchanged": "Unchanged"
121
+ },
122
+ "workflow": {
123
+ "about": "Drag a step from the palette onto the canvas, or press it to add the step in the middle of the view. onGraphChange reports each finished edit once, as the graph after it and a step that names what changed, so the example keeps every version and Undo goes back one.",
124
+ "add": {
125
+ "fraud": "Add a fraud check",
126
+ "notice": "Add a warehouse notice",
127
+ "stock": "Add a stock reservation"
128
+ },
129
+ "edits": {
130
+ "add": "Added {{name}}.",
131
+ "connect": "Connected two steps.",
132
+ "move_one": "Moved a step.",
133
+ "move_other": "Moved {{count}} steps.",
134
+ "remove_one": "Removed a step.",
135
+ "remove_other": "Removed {{count}} steps.",
136
+ "unlink_one": "Removed a connection.",
137
+ "unlink_other": "Removed {{count}} connections."
138
+ },
139
+ "kinds": {
140
+ "fraud": "Fraud check",
141
+ "notice": "Warehouse notice",
142
+ "stock": "Stock reservation"
143
+ },
144
+ "label": "Order workflow",
145
+ "none": "No edits yet.",
146
+ "placed": "Order placed",
147
+ "receipt": "Send the receipt",
148
+ "remove": "Remove the connection from {{source}} to {{target}}",
149
+ "title": "Palette and history",
150
+ "undo": "Undo",
151
+ "undone": "Undid: {{edit}}"
152
+ },
153
+ "zoomIn": "Zoom in",
154
+ "zoomOut": "Zoom out"
155
+ }
@@ -0,0 +1,99 @@
1
+ {
2
+ "about": "A network laid out by force from a seed: nodes are discs as large as their weight, and a focus lights what a node connects to within a number of hops.",
3
+ "controlled": {
4
+ "about": "The caller keeps the focus in its own state through focus and onFocusChange, so a list, a search result or the address can focus a department. A press on a disc or the Clear focus control reports the new focus back.",
5
+ "label": "Referrals between departments",
6
+ "none": "No department",
7
+ "pick": "Focus a department",
8
+ "summary_one": "{{name}} exchanges referrals with {{count}} department.",
9
+ "summary_other": "{{name}} exchanges referrals with {{count}} departments.",
10
+ "title": "Controlled focus"
11
+ },
12
+ "controls": "Network controls",
13
+ "departments": {
14
+ "cardiology": "Cardiology",
15
+ "emergency": "Emergency",
16
+ "neurology": "Neurology",
17
+ "oncology": "Oncology",
18
+ "paediatrics": "Paediatrics",
19
+ "pharmacy": "Pharmacy",
20
+ "radiology": "Radiology"
21
+ },
22
+ "empty": {
23
+ "about": "A network without a node renders its message in the canvas's place, at the canvas's ratio, without the controls, the readout or the overview.",
24
+ "label": "Claims handled jointly",
25
+ "message": "No claim was handled by more than one adjuster this month.",
26
+ "title": "Empty"
27
+ },
28
+ "fit": "Fit the network in view",
29
+ "mentoring": {
30
+ "about": "depth={2} lights the people two hops away as well. Elena mentors three people, and at two hops six of the other seven are lit: past one hop a dense network lights nearly everything.",
31
+ "label": "Mentoring network",
32
+ "prompt": "Select a person to see who they are connected to.",
33
+ "summary_one": "{{count}} person is within two hops of {{name}}.",
34
+ "summary_other": "{{count}} people are within two hops of {{name}}.",
35
+ "title": "Two hops"
36
+ },
37
+ "modules": {
38
+ "about": "No module states a weight, so each disc is as large as the number of modules taken beside it: Statistics I is taken with all five others and is the largest.",
39
+ "label": "Modules taken together",
40
+ "names": {
41
+ "calculus": "Calculus II",
42
+ "econometrics": "Econometrics",
43
+ "ethics": "Research Ethics",
44
+ "linear": "Linear Algebra",
45
+ "stats": "Statistics I",
46
+ "structures": "Data Structures"
47
+ },
48
+ "prompt": "Select a module to see what is taken beside it.",
49
+ "summary_one": "{{name}} is taken with {{count}} other module.",
50
+ "summary_other": "{{name}} is taken with {{count}} other modules.",
51
+ "title": "Sized by links"
52
+ },
53
+ "pinned": {
54
+ "about": "draggable={false} pins every site where the layout put it, for a diagram that goes into a report. Panning, zooming and the focus still work, and the description offers no arrow key.",
55
+ "label": "Inbound supply network",
56
+ "prompt": "Select a site to see what it depends on.",
57
+ "sites": {
58
+ "bochum": "Paint, Bochum",
59
+ "eindhoven": "Assembly, Eindhoven",
60
+ "genk": "Press shop, Genk",
61
+ "kortrijk": "Seats, Kortrijk",
62
+ "timisoara": "Wiring, Timișoara",
63
+ "venlo": "Parts hub, Venlo"
64
+ },
65
+ "summary_one": "{{name}}: {{count}} direct link",
66
+ "summary_other": "{{name}}: {{count}} direct links",
67
+ "title": "Pinned"
68
+ },
69
+ "rail": {
70
+ "about": "Forty stations and eighty services, laid out from seed 6. The shape reads at a glance and the names read once you zoom in, where the overview map shows which part of the network is in view.",
71
+ "label": "Intercity rail network",
72
+ "overview": "Overview of the rail network",
73
+ "prompt": "Select a station to see where it has direct services.",
74
+ "summary_one": "{{name}}: {{count}} direct service",
75
+ "summary_other": "{{name}}: {{count}} direct services",
76
+ "title": "Forty stations"
77
+ },
78
+ "title": "Network graph",
79
+ "topology": {
80
+ "about": "The graph opens focused on checkout-api: the services it calls are lit, the rest recede, and the readout counts them. A disc is as large as its weight and a line as wide as its tie. Drag a disc, or move the focused one with the arrow keys, to rearrange the picture.",
81
+ "caption": "Checkout writes to Kafka and Postgres, which the ledger reads, and nothing calls the fax gateway.",
82
+ "label": "Service topology",
83
+ "overview": "Overview of the service topology",
84
+ "prompt": "Select a service to light up what it talks to.",
85
+ "summary_one": "{{name}} talks to {{count}} service.",
86
+ "summary_other": "{{name}} talks to {{count}} services.",
87
+ "title": "Service topology"
88
+ },
89
+ "words": {
90
+ "clear": "Clear focus",
91
+ "connected": "Connected",
92
+ "description": "Press Enter or Space to focus the node, the arrow keys to move it, and Escape to clear the focus.",
93
+ "edge": "{{source}} and {{target}}",
94
+ "fixed": "Press Enter or Space to focus the node, and Escape to clear the focus.",
95
+ "focus": "Focus"
96
+ },
97
+ "zoomIn": "Zoom in",
98
+ "zoomOut": "Zoom out"
99
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stealthscale/component-graphs",
3
- "version": "0.1.0",
3
+ "version": "0.2.2",
4
4
  "description": "Renders node graphs over React Flow: a canvas of named nodes and ports, removable edges, zoom controls, a minimap, and layouts by rank or by force.",
5
5
  "keywords": [
6
6
  "components",
@@ -21,6 +21,7 @@
21
21
  "files": [
22
22
  "dist",
23
23
  "LICENSE",
24
+ "locales",
24
25
  "README.md"
25
26
  ],
26
27
  "type": "module",
@@ -38,40 +39,40 @@
38
39
  },
39
40
  "dependencies": {
40
41
  "@dagrejs/dagre": "^3.1",
41
- "@stealthscale/component-a11y": "^0.1.0",
42
- "@stealthscale/component-actions": "^0.1.0",
43
- "@stealthscale/component-data": "^0.1.0",
42
+ "@stealthscale/component-a11y": "^0.1.3",
43
+ "@stealthscale/component-actions": "^0.2.3",
44
+ "@stealthscale/component-data": "^0.2.2",
44
45
  "@xyflow/react": "^12.12",
45
46
  "d3-force": "^3.0"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@arethetypeswrong/core": "^0.18",
49
- "@stealthscale/hooks": "^0.1.0",
50
- "@stealthscale/provider-locale": "^0.1.0",
51
- "@stealthscale/theme": "^0.3.0",
52
- "@stealthscale/vite-config": "^0.6.0",
53
- "@stealthscale/vite-config-i18n": "^0.1.0",
54
- "@stealthscale/vite-config-react": "^0.8.0",
55
- "@stealthscale/vite-config-specimen": "^0.1.0",
56
- "@stealthscale/vite-config-theme": "^0.1.0",
50
+ "@stealthscale/hooks": "^0.3.0",
51
+ "@stealthscale/provider-locale": "^0.1.1",
52
+ "@stealthscale/theme": "^0.5.0",
53
+ "@stealthscale/vite-config": "^0.8.0",
54
+ "@stealthscale/vite-config-i18n": "^0.2.2",
55
+ "@stealthscale/vite-config-react": "^0.9.1",
56
+ "@stealthscale/vite-config-specimen": "^0.3.0",
57
+ "@stealthscale/vite-config-theme": "^0.3.0",
57
58
  "@stealthscale/vite-config-typescript": "^0.3.0",
58
59
  "@testing-library/react": "^16.3",
59
60
  "@types/d3-force": "^3.0",
60
61
  "@types/react": "^19.3",
61
62
  "@types/react-dom": "^19.3",
62
63
  "happy-dom": "^20.14",
63
- "lucide-react": "^1.48",
64
- "oxc-transform-react": "^0.151",
64
+ "lucide-react": "^1.52",
65
+ "oxc-transform-react": "^0.153",
65
66
  "publint": "^0.3",
66
67
  "react": "^19.3",
67
68
  "react-dom": "^19.3",
68
69
  "typescript": "^7.0",
69
- "vitest": "5.0.1"
70
+ "vitest": "5.0.3"
70
71
  },
71
72
  "peerDependencies": {
72
- "@stealthscale/hooks": "^0.1.0",
73
- "@stealthscale/provider-locale": "^0.1.0",
74
- "@stealthscale/theme": "^0.3.0",
73
+ "@stealthscale/hooks": "^0.3.0",
74
+ "@stealthscale/provider-locale": "^0.1.1",
75
+ "@stealthscale/theme": "^0.5.0",
75
76
  "react": "^19.3",
76
77
  "react-dom": "^19.3"
77
78
  },