@isothrum/editor 0.0.0-stage → 0.1.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 (293) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/PUBLISHING.md +93 -0
  4. package/README.md +106 -2
  5. package/desktop-editor/editor.css +11 -0
  6. package/desktop-editor/index.html +14 -0
  7. package/desktop-editor/main.tsx +26 -0
  8. package/dist/desktop/editor.css +1 -0
  9. package/dist/desktop/editor.js +181 -0
  10. package/dist/desktop/fonts/geist-cyrillic-ext-wght-normal-RO72NYA2.woff2 +0 -0
  11. package/dist/desktop/fonts/geist-cyrillic-wght-normal-CK2XY27K.woff2 +0 -0
  12. package/dist/desktop/fonts/geist-latin-ext-wght-normal-XEQ56JUF.woff2 +0 -0
  13. package/dist/desktop/fonts/geist-latin-wght-normal-T72VVCUW.woff2 +0 -0
  14. package/dist/desktop/fonts/geist-mono-cyrillic-ext-wght-normal-QXKVIKFD.woff2 +0 -0
  15. package/dist/desktop/fonts/geist-mono-cyrillic-wght-normal-GOIAQAGU.woff2 +0 -0
  16. package/dist/desktop/fonts/geist-mono-latin-ext-wght-normal-HU3ZAWN6.woff2 +0 -0
  17. package/dist/desktop/fonts/geist-mono-latin-wght-normal-CJNQKXUG.woff2 +0 -0
  18. package/dist/desktop/fonts/geist-mono-symbols2-wght-normal-WZJJVLQO.woff2 +0 -0
  19. package/dist/desktop/fonts/geist-mono-vietnamese-wght-normal-KW5NM6YV.woff2 +0 -0
  20. package/dist/desktop/fonts/geist-vietnamese-wght-normal-Y2R7JZKV.woff2 +0 -0
  21. package/dist/desktop/fonts/shantell-sans-cyrillic-ext-wght-normal-ILPQWRJJ.woff2 +0 -0
  22. package/dist/desktop/fonts/shantell-sans-cyrillic-wght-normal-RKC6NDPM.woff2 +0 -0
  23. package/dist/desktop/fonts/shantell-sans-latin-ext-wght-normal-SNKHG3LM.woff2 +0 -0
  24. package/dist/desktop/fonts/shantell-sans-latin-wght-normal-7CHHGC3N.woff2 +0 -0
  25. package/dist/desktop/fonts/shantell-sans-vietnamese-wght-normal-IPFAQSBA.woff2 +0 -0
  26. package/dist/desktop/index.html +14 -0
  27. package/dist/desktop/styles.css +2 -0
  28. package/dist/desktop/wasm/isothrum_wasm.d.ts +60 -0
  29. package/dist/desktop/wasm/isothrum_wasm.js +312 -0
  30. package/dist/desktop/wasm/isothrum_wasm_bg.wasm +0 -0
  31. package/dist/index.js +7059 -0
  32. package/dist/index.js.map +7 -0
  33. package/dist/model.js +745 -0
  34. package/dist/model.js.map +7 -0
  35. package/dist/types/components/tool/canvas/cable-edge.d.ts +4 -0
  36. package/dist/types/components/tool/canvas/contexts.d.ts +12 -0
  37. package/dist/types/components/tool/canvas/device-icon.d.ts +17 -0
  38. package/dist/types/components/tool/canvas/inline-text.d.ts +15 -0
  39. package/dist/types/components/tool/canvas/lan-node.d.ts +8 -0
  40. package/dist/types/components/tool/canvas/machine-addresses.d.ts +14 -0
  41. package/dist/types/components/tool/canvas/machine-node.d.ts +4 -0
  42. package/dist/types/components/tool/canvas/note-node.d.ts +7 -0
  43. package/dist/types/components/tool/canvas/port-led.d.ts +10 -0
  44. package/dist/types/components/tool/canvas/router-node.d.ts +8 -0
  45. package/dist/types/components/tool/canvas/sketch.d.ts +50 -0
  46. package/dist/types/components/tool/canvas/status-dot.d.ts +5 -0
  47. package/dist/types/components/tool/canvas/switch-node.d.ts +8 -0
  48. package/dist/types/components/tool/canvas/use-measured-ports.d.ts +7 -0
  49. package/dist/types/components/tool/context-menus.d.ts +5 -0
  50. package/dist/types/components/tool/device-block.d.ts +12 -0
  51. package/dist/types/components/tool/editor-menu.d.ts +28 -0
  52. package/dist/types/components/tool/export/copy-button.d.ts +9 -0
  53. package/dist/types/components/tool/export/export-panel.d.ts +17 -0
  54. package/dist/types/components/tool/export/target-list.d.ts +15 -0
  55. package/dist/types/components/tool/floating-window.d.ts +13 -0
  56. package/dist/types/components/tool/flow-canvas.d.ts +6 -0
  57. package/dist/types/components/tool/hooks/use-cabling.d.ts +23 -0
  58. package/dist/types/components/tool/hooks/use-captures.d.ts +9 -0
  59. package/dist/types/components/tool/hooks/use-clipboard.d.ts +12 -0
  60. package/dist/types/components/tool/hooks/use-context-menus.d.ts +25 -0
  61. package/dist/types/components/tool/hooks/use-design.d.ts +10 -0
  62. package/dist/types/components/tool/hooks/use-desktop.d.ts +50 -0
  63. package/dist/types/components/tool/hooks/use-devices.d.ts +17 -0
  64. package/dist/types/components/tool/hooks/use-downloads.d.ts +9 -0
  65. package/dist/types/components/tool/hooks/use-editor.d.ts +609 -0
  66. package/dist/types/components/tool/hooks/use-engine.d.ts +9 -0
  67. package/dist/types/components/tool/hooks/use-history.d.ts +9 -0
  68. package/dist/types/components/tool/hooks/use-lab-actions.d.ts +25 -0
  69. package/dist/types/components/tool/hooks/use-lab-run.d.ts +25 -0
  70. package/dist/types/components/tool/hooks/use-lab.d.ts +18 -0
  71. package/dist/types/components/tool/hooks/use-lan-carry.d.ts +8 -0
  72. package/dist/types/components/tool/hooks/use-machine-actions.d.ts +26 -0
  73. package/dist/types/components/tool/hooks/use-placement.d.ts +27 -0
  74. package/dist/types/components/tool/hooks/use-project.d.ts +25 -0
  75. package/dist/types/components/tool/hooks/use-projects.d.ts +34 -0
  76. package/dist/types/components/tool/hooks/use-shared-link.d.ts +23 -0
  77. package/dist/types/components/tool/hooks/use-toast.d.ts +2 -0
  78. package/dist/types/components/tool/hooks/use-tools.d.ts +17 -0
  79. package/dist/types/components/tool/lab-canvas.d.ts +18 -0
  80. package/dist/types/components/tool/overlays.d.ts +5 -0
  81. package/dist/types/components/tool/projects-list.d.ts +9 -0
  82. package/dist/types/components/tool/text.d.ts +418 -0
  83. package/dist/types/components/tool/toolbar.d.ts +5 -0
  84. package/dist/types/components/tool/top-bars.d.ts +10 -0
  85. package/dist/types/components/tool/windows/conditions-fields.d.ts +6 -0
  86. package/dist/types/components/tool/windows/editor-windows.d.ts +5 -0
  87. package/dist/types/components/tool/windows/fields.d.ts +4 -0
  88. package/dist/types/components/tool/windows/lab-status.d.ts +6 -0
  89. package/dist/types/components/tool/windows/lab-windows.d.ts +13 -0
  90. package/dist/types/components/tool/windows/link-controls.d.ts +21 -0
  91. package/dist/types/components/tool/windows/machine-controls.d.ts +16 -0
  92. package/dist/types/components/tool/windows/machine-inspector.d.ts +11 -0
  93. package/dist/types/components/tool/windows/runs-fields.d.ts +18 -0
  94. package/dist/types/components/tool/windows/selected-windows.d.ts +21 -0
  95. package/dist/types/components/ui/button.d.ts +8 -0
  96. package/dist/types/components/ui/dropdown-menu.d.ts +21 -0
  97. package/dist/types/index.d.ts +7 -0
  98. package/dist/types/lib/auth.d.ts +38 -0
  99. package/dist/types/lib/brand.d.ts +19 -0
  100. package/dist/types/lib/i18n.d.ts +19 -0
  101. package/dist/types/lib/tool/blocks.d.ts +35 -0
  102. package/dist/types/lib/tool/cables.d.ts +48 -0
  103. package/dist/types/lib/tool/clone.d.ts +12 -0
  104. package/dist/types/lib/tool/conditions.d.ts +31 -0
  105. package/dist/types/lib/tool/create.d.ts +22 -0
  106. package/dist/types/lib/tool/desktop.d.ts +63 -0
  107. package/dist/types/lib/tool/draft.d.ts +20 -0
  108. package/dist/types/lib/tool/engine.d.ts +33 -0
  109. package/dist/types/lib/tool/examples.d.ts +11 -0
  110. package/dist/types/lib/tool/export-targets.d.ts +21 -0
  111. package/dist/types/lib/tool/facing.d.ts +9 -0
  112. package/dist/types/lib/tool/geometry.d.ts +36 -0
  113. package/dist/types/lib/tool/gns3-cables.d.ts +17 -0
  114. package/dist/types/lib/tool/gns3-import.d.ts +15 -0
  115. package/dist/types/lib/tool/gns3-parts.d.ts +25 -0
  116. package/dist/types/lib/tool/issues.d.ts +12 -0
  117. package/dist/types/lib/tool/layout.d.ts +52 -0
  118. package/dist/types/lib/tool/live.d.ts +21 -0
  119. package/dist/types/lib/tool/logos.d.ts +7 -0
  120. package/dist/types/lib/tool/model.d.ts +173 -0
  121. package/dist/types/lib/tool/os.d.ts +20 -0
  122. package/dist/types/lib/tool/pins.d.ts +5 -0
  123. package/dist/types/lib/tool/placement.d.ts +21 -0
  124. package/dist/types/lib/tool/ports.d.ts +21 -0
  125. package/dist/types/lib/tool/presets.d.ts +21 -0
  126. package/dist/types/lib/tool/projects-api.d.ts +37 -0
  127. package/dist/types/lib/tool/router-ports.d.ts +22 -0
  128. package/dist/types/lib/tool/selection.d.ts +19 -0
  129. package/dist/types/lib/tool/storage.d.ts +25 -0
  130. package/dist/types/lib/tool/switch-edit.d.ts +17 -0
  131. package/dist/types/lib/tool/text/de.d.ts +2 -0
  132. package/dist/types/lib/tool/text/en.d.ts +429 -0
  133. package/dist/types/lib/tool/text/es.d.ts +2 -0
  134. package/dist/types/lib/tool/text/fr.d.ts +2 -0
  135. package/dist/types/lib/tool/text/index.d.ts +419 -0
  136. package/dist/types/lib/tool/topology.d.ts +2 -0
  137. package/dist/types/lib/tool/vlans.d.ts +24 -0
  138. package/dist/types/lib/utils.d.ts +2 -0
  139. package/dist/types/model.d.ts +13 -0
  140. package/package.json +88 -4
  141. package/scripts/build-desktop-editor.mjs +43 -0
  142. package/scripts/build-lib.mjs +38 -0
  143. package/src/components/tool/canvas/cable-edge.tsx +112 -0
  144. package/src/components/tool/canvas/contexts.ts +18 -0
  145. package/src/components/tool/canvas/device-icon.tsx +105 -0
  146. package/src/components/tool/canvas/inline-text.tsx +69 -0
  147. package/src/components/tool/canvas/lan-node.tsx +148 -0
  148. package/src/components/tool/canvas/machine-addresses.tsx +117 -0
  149. package/src/components/tool/canvas/machine-node.tsx +114 -0
  150. package/src/components/tool/canvas/note-node.tsx +109 -0
  151. package/src/components/tool/canvas/port-led.tsx +21 -0
  152. package/src/components/tool/canvas/router-node.tsx +114 -0
  153. package/src/components/tool/canvas/sketch.tsx +130 -0
  154. package/src/components/tool/canvas/status-dot.tsx +29 -0
  155. package/src/components/tool/canvas/switch-node.tsx +143 -0
  156. package/src/components/tool/canvas/use-measured-ports.ts +25 -0
  157. package/src/components/tool/context-menus.tsx +142 -0
  158. package/src/components/tool/device-block.tsx +107 -0
  159. package/src/components/tool/editor-menu.tsx +191 -0
  160. package/src/components/tool/export/copy-button.tsx +45 -0
  161. package/src/components/tool/export/export-panel.tsx +127 -0
  162. package/src/components/tool/export/target-list.tsx +87 -0
  163. package/src/components/tool/floating-window.tsx +69 -0
  164. package/src/components/tool/flow-canvas.tsx +138 -0
  165. package/src/components/tool/hooks/use-cabling.ts +66 -0
  166. package/src/components/tool/hooks/use-captures.ts +24 -0
  167. package/src/components/tool/hooks/use-clipboard.ts +54 -0
  168. package/src/components/tool/hooks/use-context-menus.ts +37 -0
  169. package/src/components/tool/hooks/use-design.ts +24 -0
  170. package/src/components/tool/hooks/use-desktop.ts +100 -0
  171. package/src/components/tool/hooks/use-devices.ts +58 -0
  172. package/src/components/tool/hooks/use-downloads.ts +42 -0
  173. package/src/components/tool/hooks/use-editor.ts +114 -0
  174. package/src/components/tool/hooks/use-engine.ts +29 -0
  175. package/src/components/tool/hooks/use-history.ts +107 -0
  176. package/src/components/tool/hooks/use-lab-actions.ts +57 -0
  177. package/src/components/tool/hooks/use-lab-run.ts +61 -0
  178. package/src/components/tool/hooks/use-lab.ts +32 -0
  179. package/src/components/tool/hooks/use-lan-carry.ts +43 -0
  180. package/src/components/tool/hooks/use-machine-actions.ts +57 -0
  181. package/src/components/tool/hooks/use-placement.ts +80 -0
  182. package/src/components/tool/hooks/use-project.ts +112 -0
  183. package/src/components/tool/hooks/use-projects.ts +85 -0
  184. package/src/components/tool/hooks/use-shared-link.ts +64 -0
  185. package/src/components/tool/hooks/use-toast.ts +16 -0
  186. package/src/components/tool/hooks/use-tools.ts +60 -0
  187. package/src/components/tool/lab-canvas.tsx +96 -0
  188. package/src/components/tool/overlays.tsx +104 -0
  189. package/src/components/tool/projects-list.tsx +96 -0
  190. package/src/components/tool/text.ts +9 -0
  191. package/src/components/tool/toolbar.tsx +106 -0
  192. package/src/components/tool/top-bars.tsx +90 -0
  193. package/src/components/tool/windows/conditions-fields.tsx +43 -0
  194. package/src/components/tool/windows/editor-windows.tsx +73 -0
  195. package/src/components/tool/windows/fields.ts +6 -0
  196. package/src/components/tool/windows/lab-status.tsx +68 -0
  197. package/src/components/tool/windows/lab-windows.tsx +130 -0
  198. package/src/components/tool/windows/link-controls.tsx +69 -0
  199. package/src/components/tool/windows/machine-controls.tsx +116 -0
  200. package/src/components/tool/windows/machine-inspector.tsx +83 -0
  201. package/src/components/tool/windows/runs-fields.tsx +127 -0
  202. package/src/components/tool/windows/selected-windows.tsx +147 -0
  203. package/src/components/ui/button.tsx +59 -0
  204. package/src/components/ui/dropdown-menu.tsx +185 -0
  205. package/src/index.ts +21 -0
  206. package/src/lib/auth.tsx +43 -0
  207. package/src/lib/brand.tsx +46 -0
  208. package/src/lib/i18n.ts +53 -0
  209. package/src/lib/tool/blocks.test.ts +64 -0
  210. package/src/lib/tool/blocks.ts +78 -0
  211. package/src/lib/tool/cable-wiring.test.ts +74 -0
  212. package/src/lib/tool/cables.test.ts +75 -0
  213. package/src/lib/tool/cables.ts +215 -0
  214. package/src/lib/tool/clone.test.ts +54 -0
  215. package/src/lib/tool/clone.ts +48 -0
  216. package/src/lib/tool/conditions.test.ts +170 -0
  217. package/src/lib/tool/conditions.ts +132 -0
  218. package/src/lib/tool/create.test.ts +67 -0
  219. package/src/lib/tool/create.ts +83 -0
  220. package/src/lib/tool/desktop.test.ts +59 -0
  221. package/src/lib/tool/desktop.ts +99 -0
  222. package/src/lib/tool/draft.test.ts +150 -0
  223. package/src/lib/tool/draft.ts +109 -0
  224. package/src/lib/tool/engine.test.ts +39 -0
  225. package/src/lib/tool/engine.ts +58 -0
  226. package/src/lib/tool/examples.test.ts +35 -0
  227. package/src/lib/tool/examples.ts +71 -0
  228. package/src/lib/tool/export-targets.test.ts +47 -0
  229. package/src/lib/tool/export-targets.ts +84 -0
  230. package/src/lib/tool/facing.test.ts +72 -0
  231. package/src/lib/tool/facing.ts +100 -0
  232. package/src/lib/tool/geometry.test.ts +80 -0
  233. package/src/lib/tool/geometry.ts +109 -0
  234. package/src/lib/tool/gns3-cables.test.ts +47 -0
  235. package/src/lib/tool/gns3-cables.ts +81 -0
  236. package/src/lib/tool/gns3-import.test.ts +102 -0
  237. package/src/lib/tool/gns3-import.ts +198 -0
  238. package/src/lib/tool/gns3-layout.test.ts +62 -0
  239. package/src/lib/tool/gns3-parts.test.ts +47 -0
  240. package/src/lib/tool/gns3-parts.ts +68 -0
  241. package/src/lib/tool/issues.test.ts +35 -0
  242. package/src/lib/tool/issues.ts +60 -0
  243. package/src/lib/tool/layout.test.ts +128 -0
  244. package/src/lib/tool/layout.ts +229 -0
  245. package/src/lib/tool/live.test.ts +46 -0
  246. package/src/lib/tool/live.ts +49 -0
  247. package/src/lib/tool/logos.test.ts +30 -0
  248. package/src/lib/tool/logos.ts +99 -0
  249. package/src/lib/tool/model.test.ts +128 -0
  250. package/src/lib/tool/model.ts +238 -0
  251. package/src/lib/tool/os.test.ts +45 -0
  252. package/src/lib/tool/os.ts +57 -0
  253. package/src/lib/tool/parity.test.ts +145 -0
  254. package/src/lib/tool/pins.test.ts +24 -0
  255. package/src/lib/tool/pins.ts +11 -0
  256. package/src/lib/tool/placement.test.ts +79 -0
  257. package/src/lib/tool/placement.ts +60 -0
  258. package/src/lib/tool/ports.test.ts +39 -0
  259. package/src/lib/tool/ports.ts +48 -0
  260. package/src/lib/tool/presets.test.ts +50 -0
  261. package/src/lib/tool/presets.ts +77 -0
  262. package/src/lib/tool/projects-api.test.ts +59 -0
  263. package/src/lib/tool/projects-api.ts +47 -0
  264. package/src/lib/tool/router-ports.test.ts +63 -0
  265. package/src/lib/tool/router-ports.ts +88 -0
  266. package/src/lib/tool/selection.test.ts +44 -0
  267. package/src/lib/tool/selection.ts +34 -0
  268. package/src/lib/tool/storage.test.ts +123 -0
  269. package/src/lib/tool/storage.ts +127 -0
  270. package/src/lib/tool/switch-edit.test.ts +49 -0
  271. package/src/lib/tool/switch-edit.ts +38 -0
  272. package/src/lib/tool/text/de.ts +358 -0
  273. package/src/lib/tool/text/en.ts +371 -0
  274. package/src/lib/tool/text/es.ts +358 -0
  275. package/src/lib/tool/text/fr.ts +358 -0
  276. package/src/lib/tool/text/index.ts +21 -0
  277. package/src/lib/tool/text/text.test.ts +33 -0
  278. package/src/lib/tool/topology.test.ts +108 -0
  279. package/src/lib/tool/topology.ts +116 -0
  280. package/src/lib/tool/vlans.test.ts +64 -0
  281. package/src/lib/tool/vlans.ts +79 -0
  282. package/src/lib/utils.ts +6 -0
  283. package/src/model.ts +13 -0
  284. package/src/test/arbitrary.ts +41 -0
  285. package/src/test/engine.ts +48 -0
  286. package/src/test/lab.ts +101 -0
  287. package/styles/globals.css +258 -0
  288. package/styles/theme.css +192 -0
  289. package/tsconfig.build.json +12 -0
  290. package/tsconfig.json +22 -0
  291. package/wasm/isothrum_wasm.d.ts +60 -0
  292. package/wasm/isothrum_wasm.js +312 -0
  293. package/wasm/isothrum_wasm_bg.wasm +0 -0
@@ -0,0 +1,371 @@
1
+ /**
2
+ * The editor's words, in English: the source the other languages follow. `EditorText` is this
3
+ * object's type, so a translation that misses a key (or a function's arguments) doesn't compile.
4
+ * Not translated: machine, LAN and port names, images, OS ids, commands, file names, key letters,
5
+ * and the engine's own messages (they come from Isoloom).
6
+ */
7
+ export const en = {
8
+ toolbar: {
9
+ blocks: { switch: "Switch", router: "Router", firewall: "Firewall", container: "Container", vm: "Virtual machine", mine: "My devices" },
10
+ kindsOf: (block: string) => `Kinds of ${block.toLowerCase()}`,
11
+ devices: "Devices",
12
+ hand: "Hand: move the canvas",
13
+ select: "Selection: select, move, delete",
14
+ lan: "LAN",
15
+ lanTitle: "LAN / VLAN: an area; machines inside it get an address on it",
16
+ switch: "Switch",
17
+ switchTitle: "Switch: ports in VLANs, and a trunk",
18
+ note: "Note",
19
+ noteTitle: "Note: text, a box or an ellipse, to explain the lab",
20
+ forget: (device: string) => `Forget ${device}`,
21
+ forgetLabel: (device: string) => `Forget the device ${device}`,
22
+ undo: "Undo",
23
+ undoTitle: "Undo · Ctrl/⌘ Z",
24
+ redo: "Redo",
25
+ redoTitle: "Redo · Ctrl/⌘ Shift Z",
26
+ },
27
+ /** The line under the toolbar. */
28
+ hints: {
29
+ lan: "Click on the canvas to place a LAN; machines inside it get an address on it. Double-click its name or range to edit it.",
30
+ note: "Click on the canvas to place a note, then double-click it to write. Notes stay in the editor, not in isoloom.yml.",
31
+ place: (device: string) => `Click on the canvas to place a ${device.toLowerCase()}. Esc to cancel.`,
32
+ hand: "Drag to move the canvas. Press V to select again.",
33
+ cable: "Drag from a dot on one machine to another to cable them.",
34
+ select: "Drag on the canvas to select several machines: Delete, or Ctrl/⌘ C, V, D. Hold Space to move the canvas.",
35
+ },
36
+ /** The built-in devices of the toolbar, by preset id. Without a hint, the hint is what the device runs (its OS or image). */
37
+ devices: {
38
+ router: { label: "Router", hint: "automatic: its networks reach each other" },
39
+ "router-frr": { label: "Router (FRR)", hint: "FRRouting container you configure" },
40
+ firewall: { label: "Firewall", hint: "nftables on Alpine" },
41
+ container: { label: "Linux container" },
42
+ web: { label: "Web server", hint: "nginx, port 80" },
43
+ database: { label: "Database", hint: "PostgreSQL, port 5432" },
44
+ desktop: { label: "Linux desktop", hint: "Xfce with VNC: right-click it, Screen; password vncpassword" },
45
+ "linux-vm": { label: "Linux VM" },
46
+ "ubuntu-vm": { label: "Ubuntu VM" },
47
+ "kali-vm": { label: "Kali VM" },
48
+ "windows-vm": { label: "Windows VM" },
49
+ workstation: { label: "Workstation", hint: "where the user lands" },
50
+ "cisco-iol": { label: "Cisco IOL router", hint: "IOS on Linux, your vrnetlab build" },
51
+ "cisco-iol-l2": { label: "Cisco IOL switch", hint: "IOL-L2, your vrnetlab build" },
52
+ },
53
+ /** A device saved from the canvas: what it runs (an image, an OS, or this). */
54
+ myDevice: (what: string) => `your device: ${what}`,
55
+ myDeviceRouter: "automatic router",
56
+ status: {
57
+ loading: "Loading…",
58
+ toFix: (count: number) => `${String(count)} to fix`,
59
+ valid: "Valid",
60
+ },
61
+ run: {
62
+ autoStart: "Start this lab when the app opens",
63
+ autoStartNote: "On this computer, when the app opens on this lab and it isn't running already.",
64
+ statusTitle: (up: number, total: number) => `${String(up)} of ${String(total)} machines up`,
65
+ probed: "ports read from the machines",
66
+ inferred: "ports from the machines' states (VMs aren't probed)",
67
+ run: "Run",
68
+ starting: "Starting…",
69
+ stop: "Stop",
70
+ stopping: "Stopping…",
71
+ vmsTitle: "A lab with VMs runs with Vagrant (and VirtualBox or libvirt): install it from vagrantup.com, or export the lab",
72
+ runVmsTitle: "Run the lab on this machine (VMs with Vagrant)",
73
+ startingVmsLog: "Starting the VMs with vagrant up (the first time downloads their boxes: minutes)…",
74
+ runTitle: "Run the lab on this machine (Docker)",
75
+ startingLog: "Starting the lab with docker compose…",
76
+ window: "Run on this machine",
77
+ running: "The lab is running. Select a LAN or a cable to capture its traffic.",
78
+ stopped: "The lab is stopped.",
79
+ noDocker:
80
+ "Docker doesn't answer. Install and start it; on Linux, also add yourself to the docker group (sudo usermod -aG docker $USER, then log in again).",
81
+ noLiveCapture: (wireshark: boolean, dir: string) =>
82
+ `${
83
+ wireshark
84
+ ? "Wireshark can't capture live from this account: run sudo usermod -aG wireshark $USER, then log in again. Until then, captures"
85
+ : "Wireshark isn't installed: captures"
86
+ } are saved as .pcap files under ${dir}.`,
87
+ },
88
+ capture: {
89
+ capturing: (network: string) => `Capturing ${network}`,
90
+ writingTo: "Writing to",
91
+ live: "Live in Wireshark.",
92
+ stop: "Stop the capture",
93
+ start: "Capture traffic",
94
+ runFirst: "Run the lab to capture its traffic.",
95
+ },
96
+ link: {
97
+ suspend: "Suspend the link",
98
+ resume: "Resume the link",
99
+ suspendAll: "Suspend every link",
100
+ resumeAll: "Resume every link",
101
+ cableSuspended: "Link suspended: nothing gets through.",
102
+ lanSuspended: (ports: number) => (ports === 1 ? "1 link suspended." : `${String(ports)} links suspended.`),
103
+ runFirst: "Run the lab to suspend its links.",
104
+ },
105
+ export: "Export",
106
+ engineDidntLoad: (error: string) => `The engine didn't load: ${error}`,
107
+ engineFailed: (error: string) => `The engine failed on this lab: ${error}`,
108
+ toasts: {
109
+ brokenLink: "This share link is damaged: the lab couldn't be read.",
110
+ openedShared: (lab: string) => `Opened the shared lab “${lab}”. Undo brings back yours.`,
111
+ linkCopied: "Share link copied: anyone who opens it gets a copy of this lab.",
112
+ copyPrompt: "Copy this link to share the lab:",
113
+ savedDevice: (device: string) => `Saved “${device}”: it's at the end of the toolbar.`,
114
+ gns3Opened: (lab: string, machines: number, lans: number) =>
115
+ `Opened “${lab}” from GNS3: ${String(machines)} machine${machines === 1 ? "" : "s"}, ${String(lans)} LAN${lans === 1 ? "" : "s"}.`,
116
+ undoBringsBack: "Undo brings back your lab.",
117
+ gns3Unreadable: "This GNS3 project couldn't be read.",
118
+ },
119
+ windows: {
120
+ machine: "Machine",
121
+ lan: (lan: string) => `LAN ${lan}`,
122
+ cable: (a: string, b: string) => `Cable ${a} ↔ ${b}`,
123
+ portOn: (machine: string) => `Port on ${machine}`,
124
+ cableNote: "Each cable is its own small network (a /29); the two ends get its first two addresses.",
125
+ removeCable: "Remove cable",
126
+ conditions: {
127
+ title: "Link conditions",
128
+ delay: "Delay (ms, each way)",
129
+ jitter: "Jitter (ms)",
130
+ loss: "Loss (%)",
131
+ rate: "Bandwidth (Mbit/s)",
132
+ hint: "A slow or lossy link, applied with tc netem on each end. Empty means none.",
133
+ onLan: "This cable puts the machine on the LAN: set conditions on the LAN.",
134
+ onVlan: "Conditions go on a cable or a plain LAN; not on a switch's VLAN yet.",
135
+ },
136
+ selected: (count: number) => `${String(count)} selected`,
137
+ selection: (items: number, cables: number) =>
138
+ `${String(items)} ${items === 1 ? "item" : "items"}, ${String(cables)} ${cables === 1 ? "cable" : "cables"}. Drag one of them to move them together.`,
139
+ deleteSelection: (count: number) => `Delete ${String(count)} (Delete key)`,
140
+ close: "Close",
141
+ },
142
+ lab: {
143
+ title: "Lab",
144
+ containers: "Containers",
145
+ vms: "VMs",
146
+ lans: "LANs",
147
+ cables: "Cables",
148
+ toFix: "To fix",
149
+ valid: "The lab is valid: ready to export.",
150
+ routing:
151
+ "A router needs its own forwarding configuration: each cable is its own network, and nothing routes between them for you.",
152
+ },
153
+ menu: {
154
+ menu: "Menu",
155
+ example: "Load the example lab",
156
+ vlanExample: "Load the VLAN example",
157
+ gns3: "Open a GNS3 project…",
158
+ gns3File: "GNS3 project",
159
+ share: "Copy a share link",
160
+ fit: "Fit to screen",
161
+ clear: "Clear the canvas",
162
+ light: "Light theme",
163
+ dark: "Dark theme",
164
+ style: "Style",
165
+ styles: { sketch: "Sketch: hand-drawn", business: "Business: crisp and sober" },
166
+ language: "Language",
167
+ about: "About Isothrum",
168
+ blog: "Blog",
169
+ },
170
+ welcome: {
171
+ menuHint: "Example, theme, language…",
172
+ toolbarHint: "Pick a device, then click on the canvas",
173
+ pitch: "Draw a network lab of containers and VMs. Download it, ready to run with Docker, Vagrant or Terraform.",
174
+ example: "Load the example lab",
175
+ how: "How it works",
176
+ },
177
+ inspector: {
178
+ name: "Name",
179
+ runsAs: "Runs as",
180
+ automaticRouter: "Automatic router",
181
+ container: "Container (Docker)",
182
+ vm: "Virtual machine",
183
+ routerNote:
184
+ "Nothing to configure: the networks it is on (its LANs, VLANs and cables) reach each other through Isoloom's own router. To configure routing yourself, run it as a container (FRR) or a VM.",
185
+ image: "Image",
186
+ keepRunning: "Keep it running",
187
+ applianceNote: "Cisco IOL runs from your own image: build it with",
188
+ ciscoOs: "Cisco OS",
189
+ needsKvm: "Runs in QEMU: the Docker host needs /dev/kvm.",
190
+ dynamipsFirmware: (name: string) => `Put your 7200 IOS image in the download as images/${name}.bin.`,
191
+ iosConfig: "IOS configuration",
192
+ iosConfigHint: "Added to the one Isothrum writes (hostname, admin/admin over SSH, each interface’s address). Applied on first boot.",
193
+ keepRunningHint: "For an image with no service of its own (Alpine, Ubuntu, Kali…): a machine to work from.",
194
+ os: "Operating system",
195
+ provision: "Provisioning steps (one per line)",
196
+ ports: "Service ports",
197
+ access: "The user lands on this machine",
198
+ cables: "Cables",
199
+ noCables: "None yet: drag from one of its dots to another machine.",
200
+ saveTitle: "Keep this machine's setup as a device in the toolbar, to place it again",
201
+ save: "Save as a device",
202
+ remove: "Remove machine",
203
+ },
204
+ /** On the canvas: machines, LANs, switches, routers, notes. */
205
+ canvas: {
206
+ imageShort: "Image",
207
+ hosts: (n: number) => (n === 1 ? "1 host" : `${String(n)} hosts`),
208
+ roles: { router: "Router", firewall: "Firewall", workstation: "Workstation", server: "Server", desktop: "Desktop", host: "Host" },
209
+ switchModel: (ports: number) => `Switch · ${String(ports)} ports`,
210
+ live: {
211
+ up: "Running",
212
+ starting: "Starting",
213
+ unhealthy: "Unhealthy",
214
+ down: "Stopped",
215
+ portUp: "Link up",
216
+ portDown: "Link down",
217
+ portUnknown: "Unknown (stopped, or the port belongs to the device's OS)",
218
+ lanPorts: (up: number, total: number) => `${String(up)} of ${String(total)} ports on this LAN are up`,
219
+ cable: { up: "Carries traffic", cut: "Suspended: nothing gets through", down: "Down: an end is stopped or its port is down" },
220
+ cableShort: { cut: "suspended", down: "down" },
221
+ },
222
+ editTitle: (what: string) => `${what}: double-click to edit`,
223
+ unnamed: "unnamed",
224
+ machineName: "Machine name",
225
+ vm: "VM",
226
+ automatic: "Automatic",
227
+ container: "Container",
228
+ access: "access",
229
+ addressTitle: (network: string, fixed: boolean) => `${network}: double-click to fix this address${fixed ? " (fixed)" : ""}`,
230
+ fixed: "fixed",
231
+ addressOn: (network: string) => `Address on ${network}`,
232
+ lanName: "LAN name",
233
+ addressBlock: "Address block",
234
+ internetOnTitle: "Reaches the internet (click to cut it off)",
235
+ internetOffTitle: "No internet (click to allow it)",
236
+ internetOn: "Internet access: on",
237
+ internetOff: "Internet access: off",
238
+ showAreaTitle: "Show the LAN's area",
239
+ hideAreaTitle: "Hide the LAN's area (the LAN stays: only its rectangle goes)",
240
+ showArea: "Show the area",
241
+ hideArea: "Hide the area",
242
+ switchName: "Switch name",
243
+ port: (n: number) => `Port ${String(n)}`,
244
+ trunkPort: "Trunk port",
245
+ trunkCarries: (vlans: string) => `trunk, carries ${vlans}`,
246
+ noVlan: "no VLAN",
247
+ clickToChange: "(click to change)",
248
+ vlanNumber: "VLAN number",
249
+ vlanBlock: "VLAN address block",
250
+ remove: (what: string) => `Remove ${what}`,
251
+ routerName: "Router name",
252
+ portFree: (port: string) => `${port}: free`,
253
+ textOnly: "Text only",
254
+ box: "Box",
255
+ ellipse: "Ellipse",
256
+ colors: { yellow: "yellow", red: "red", blue: "blue", green: "green", violet: "violet" },
257
+ color: (color: string) => `Color ${color}`,
258
+ write: "Double-click to write",
259
+ note: "Note",
260
+ /** A note in lists (it has no name of its own). */
261
+ noteName: "note",
262
+ },
263
+ exportPanel: {
264
+ copy: "Copy",
265
+ copied: "Copied",
266
+ labName: "Lab name (the zip's name)",
267
+ fixFirst: "Fix the lab before exporting",
268
+ download: (lab: string) => `Download ${lab}.zip`,
269
+ onlySpec: "Only isoloom.yml",
270
+ where: "Where it runs",
271
+ whereIntro: "The zip holds one folder per target. Unzip it, then start the one that suits you.",
272
+ mixed:
273
+ "This lab mixes containers and VMs, so it runs with Vagrant. Make it all containers (Docker, Kubernetes, a cloud VM) or all VMs (Proxmox, cloud VMs) to unlock more targets.",
274
+ install: "Isoloom starts any of them with one command. Install it once:",
275
+ files: (count: number) => `${String(count)} ${count === 1 ? "file" : "files"}`,
276
+ downloadOnly: (target: string) => `Download ${target} only (with isoloom.yml)`,
277
+ downloadTarget: (target: string) => `Download ${target}`,
278
+ withIsoloom: "With Isoloom (stop it with isoloom down)",
279
+ withTool: "Or with the tool directly",
280
+ run: "Run",
281
+ specIntro: "The lab as one readable file, to keep in Git or edit by hand.",
282
+ showSpec: "Show the file",
283
+ hideSpec: "Hide the file",
284
+ /** Target names: "Vagrant (containers and VMs)", "AWS (one VM per machine)"… */
285
+ containersAndVms: "containers and VMs",
286
+ dockerOnOneVm: "Docker on one VM",
287
+ oneVmPerMachine: "one VM per machine",
288
+ },
289
+ /** What the canvas checks before the engine runs. */
290
+ issues: {
291
+ vlanBlocks: (vlan: string, block: string, other: string, sw: string) => `${vlan} is ${block} on one switch and ${other} on ${sw}.`,
292
+ areaBlock: (lan: string, block: string, switches: string) => `The ${lan} area is ${block}, its switches say ${switches}.`,
293
+ noName: { machine: "A machine has no name.", lan: "A LAN has no name.", switch: "A switch has no name." },
294
+ sameName: {
295
+ machine: (name: string) => `Two machines are named “${name}”.`,
296
+ lan: (name: string) => `Two LANs are named “${name}”.`,
297
+ switch: (name: string) => `Two switches are named “${name}”.`,
298
+ },
299
+ badPort: (machine: string, entry: string) => `“${entry}” in ${machine}'s ports isn't a port: a number from 1 to 65535, then /udp, /http, /https or /tls if it isn't plain TCP.`,
300
+ },
301
+ gns3: {
302
+ notGns3: "This isn't a GNS3 project: open the .gns3 file (inside a .gns3project, it's the one at the top).",
303
+ noTopology: "This file has no GNS3 topology in it.",
304
+ cisco: (node: string, kind: string) =>
305
+ `${node}: a Cisco ${kind} router became an automatic router; its IOS configuration isn't carried over.`,
306
+ firewall: (node: string) => `${node}: a firewall became an automatic router (its rules aren't carried over).`,
307
+ noEquivalent: (node: string, type: string) => `${node}: GNS3's “${type}” node has no equivalent; skipped.`,
308
+ noNodes: "The project has no nodes.",
309
+ },
310
+ account: {
311
+ signIn: "Sign in with Cyber Auth",
312
+ signOut: "Sign out",
313
+ signedInAs: (name: string) => `Signed in as ${name}`,
314
+ },
315
+ projects: {
316
+ save: "Save to my projects",
317
+ saveAs: "Save as a new project…",
318
+ openList: "Open a project…",
319
+ saveAsPrompt: "Name of the new project:",
320
+ windowTitle: "My projects",
321
+ loading: "Loading your projects…",
322
+ none: "No project yet: save this lab to start one.",
323
+ open: "open",
324
+ openButton: "Open",
325
+ delete: (name: string) => `Delete ${name}`,
326
+ confirmDelete: (name: string) => `Delete the project “${name}” and its history?`,
327
+ failed: (error: string) => `Couldn't load your projects: ${error}`,
328
+ history: (name: string) => `Earlier versions of ${name}`,
329
+ noVersions: "No earlier version yet.",
330
+ restore: "Open",
331
+ historyHint: "Opening a version puts it on the canvas: Undo brings back the current one, and the next save keeps it.",
332
+ opened: (name: string) => `Opened “${name}”. Undo brings back the lab that was there.`,
333
+ status: {
334
+ idle: (name: string) => `Project “${name}”`,
335
+ saving: (name: string) => `Saving “${name}”…`,
336
+ saved: (name: string) => `Saved to “${name}”`,
337
+ error: (name: string) => `Couldn't save “${name}”`,
338
+ },
339
+ },
340
+ machineRun: {
341
+ display: "Screen (VNC)",
342
+ displayTitle: "The machine's screen: its VNC server, or the VM's display",
343
+ displayOpened: (what: string) => `Opened ${what}`,
344
+ consoleHint: "Double-click a machine for its console; right-click it for its screen and more.",
345
+ runFirst: "Run the lab to open its consoles.",
346
+ running: "Running in the lab.",
347
+ stopped: "Stopped (the rest of the lab runs).",
348
+ unknown: "Not in the running lab: start the lab again to add it.",
349
+ console: "Console",
350
+ restart: "Restart",
351
+ stop: "Stop",
352
+ start: "Start",
353
+ snapshots: "Snapshots",
354
+ takeSnapshot: "Take one",
355
+ snapshotHint: "Save the machine as it is now (its files, a router's saved configuration); not its volumes",
356
+ snapshotPrompt: "Name of the snapshot (optional):",
357
+ noSnapshots: "None yet.",
358
+ restore: "Restore",
359
+ inUse: "in use",
360
+ ownImage: "Back to its own image",
361
+ deleteSnapshot: (label: string) => `Delete the snapshot ${label}`,
362
+ },
363
+ update: {
364
+ available: (version: string) => `Isothrum ${version} is available.`,
365
+ restart: "Restart to update",
366
+ installing: "Updating…",
367
+ later: "Later",
368
+ },
369
+ };
370
+
371
+ export type EditorText = typeof en;