@johnoscott/isometric-engine 0.0.0-stage → 0.9.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 (310) hide show
  1. package/EDITOR-GUIDE.md +317 -0
  2. package/LICENSE +21 -0
  3. package/LICENSES/ajv.txt +22 -0
  4. package/LICENSES/lucide-static.txt +43 -0
  5. package/LICENSES/yaml.txt +13 -0
  6. package/README.md +62 -2
  7. package/assets/app.css +265 -0
  8. package/assets/default-theme.yaml +99 -0
  9. package/assets/icons.svg +1 -0
  10. package/assets/marks.css +35 -0
  11. package/assets/skin.css +181 -0
  12. package/iso-editor.d.ts +4 -0
  13. package/iso-editor.js +550 -0
  14. package/iso-render.d.ts +3 -0
  15. package/iso-render.js +388 -0
  16. package/iso-systems.d.ts +4 -0
  17. package/iso-systems.js +389 -0
  18. package/js/iso-core/compile-schema.js +22 -0
  19. package/js/iso-core/depth.js +55 -0
  20. package/js/iso-core/errors.js +65 -0
  21. package/js/iso-core/glyphs.js +100 -0
  22. package/js/iso-core/index.js +55 -0
  23. package/js/iso-core/kernel.js +158 -0
  24. package/js/iso-core/metrics.json +1 -0
  25. package/js/iso-core/package.json +6 -0
  26. package/js/iso-core/parse.js +79 -0
  27. package/js/iso-core/schema-errors.js +170 -0
  28. package/js/iso-core/shims/crypto.js +125 -0
  29. package/js/iso-core/shims/path.js +49 -0
  30. package/js/iso-core/svg-dom.js +144 -0
  31. package/js/iso-core/theme.js +48 -0
  32. package/js/iso-core/vdom.js +48 -0
  33. package/js/iso-editor/adapter.js +0 -0
  34. package/js/iso-editor/clipboard.js +152 -0
  35. package/js/iso-editor/commands.js +173 -0
  36. package/js/iso-editor/complete.js +55 -0
  37. package/js/iso-editor/doc.js +182 -0
  38. package/js/iso-editor/index.js +105 -0
  39. package/js/iso-editor/model.js +210 -0
  40. package/js/iso-editor/outline.js +111 -0
  41. package/js/iso-editor/package.json +6 -0
  42. package/js/iso-editor/path.js +19 -0
  43. package/js/iso-editor/providers.js +96 -0
  44. package/js/iso-editor/schema-nav.js +117 -0
  45. package/js/iso-editor/splice.js +441 -0
  46. package/js/iso-editor/storage-keys.js +6 -0
  47. package/js/iso-editor/ui/actions.js +116 -0
  48. package/js/iso-editor/ui/canvas-layer.js +0 -0
  49. package/js/iso-editor/ui/canvas.js +1205 -0
  50. package/js/iso-editor/ui/clip.js +133 -0
  51. package/js/iso-editor/ui/dialog.js +26 -0
  52. package/js/iso-editor/ui/flat-canvas.js +54 -0
  53. package/js/iso-editor/ui/icons.js +15 -0
  54. package/js/iso-editor/ui/keys.js +26 -0
  55. package/js/iso-editor/ui/later.js +28 -0
  56. package/js/iso-editor/ui/layer.js +11 -0
  57. package/js/iso-editor/ui/menu.js +105 -0
  58. package/js/iso-editor/ui/monaco-entry.js +2 -0
  59. package/js/iso-editor/ui/mount-kit.js +0 -0
  60. package/js/iso-editor/ui/mount.js +767 -0
  61. package/js/iso-editor/ui/pane.js +0 -0
  62. package/js/iso-editor/ui/part.js +0 -0
  63. package/js/iso-editor/ui/plain-icons.js +34 -0
  64. package/js/iso-editor/ui/props.js +314 -0
  65. package/js/iso-editor/ui/scope-css.js +81 -0
  66. package/js/iso-editor/ui/setup.js +145 -0
  67. package/js/iso-editor/ui/text.js +323 -0
  68. package/js/iso-editor/ui/tree.js +728 -0
  69. package/js/iso-editor/validate.js +33 -0
  70. package/js/iso-editor/window/protocol.js +8 -0
  71. package/js/iso-objects/assemble.js +43 -0
  72. package/js/iso-objects/assets.js +88 -0
  73. package/js/iso-objects/board.js +162 -0
  74. package/js/iso-objects/compile.js +60 -0
  75. package/js/iso-objects/css.js +154 -0
  76. package/js/iso-objects/flat.js +696 -0
  77. package/js/iso-objects/focus.js +16 -0
  78. package/js/iso-objects/geometry.js +76 -0
  79. package/js/iso-objects/index.js +93 -0
  80. package/js/iso-objects/kinds.js +12 -0
  81. package/js/iso-objects/labels.js +325 -0
  82. package/js/iso-objects/package.json +6 -0
  83. package/js/iso-objects/place.js +347 -0
  84. package/js/iso-objects/route.js +461 -0
  85. package/js/iso-objects/scene.js +350 -0
  86. package/js/iso-objects/steps.js +246 -0
  87. package/js/iso-objects/types.js +0 -0
  88. package/js/iso-systems/catalog.js +42 -0
  89. package/js/iso-systems/compile.js +34 -0
  90. package/js/iso-systems/css.js +8 -0
  91. package/js/iso-systems/index.js +16 -0
  92. package/js/iso-systems/nodes.js +124 -0
  93. package/js/iso-systems/package.json +6 -0
  94. package/js/iso-systems/schema.json +311 -0
  95. package/js/iso-systems/validate.js +35 -0
  96. package/js/iso-viewer/bundle.js +20 -0
  97. package/js/iso-viewer/card-motion.js +228 -0
  98. package/js/iso-viewer/dom.js +14 -0
  99. package/js/iso-viewer/dual-view.js +212 -0
  100. package/js/iso-viewer/flat-view.js +124 -0
  101. package/js/iso-viewer/history.js +990 -0
  102. package/js/iso-viewer/index.js +98 -0
  103. package/js/iso-viewer/morph.js +192 -0
  104. package/js/iso-viewer/overlay.js +199 -0
  105. package/js/iso-viewer/package.json +6 -0
  106. package/js/iso-viewer/page.js +138 -0
  107. package/js/iso-viewer/player.js +409 -0
  108. package/js/iso-viewer/still.js +81 -0
  109. package/js/iso-viewer/timeline-contract.js +14 -0
  110. package/js/iso-viewer/timeline-engine.js +475 -0
  111. package/js/iso-viewer/timeline-export.js +36 -0
  112. package/js/iso-viewer/timeline-scale.js +116 -0
  113. package/js/iso-viewer/timeline-scope.js +58 -0
  114. package/js/iso-viewer/timeline-search.js +216 -0
  115. package/js/iso-viewer/timeline-time.js +55 -0
  116. package/js/iso-viewer/view-css.js +68 -0
  117. package/js/iso-viewer/viewport.js +177 -0
  118. package/package.json +502 -4
  119. package/src/iso-core/compile-schema.ts +23 -0
  120. package/src/iso-core/depth.ts +56 -0
  121. package/src/iso-core/errors.ts +73 -0
  122. package/src/iso-core/glyphs.ts +108 -0
  123. package/src/iso-core/index.ts +27 -0
  124. package/src/iso-core/kernel.ts +163 -0
  125. package/src/iso-core/metrics.json +1 -0
  126. package/src/iso-core/package.json +6 -0
  127. package/src/iso-core/parse.ts +91 -0
  128. package/src/iso-core/schema-errors.ts +163 -0
  129. package/src/iso-core/shims/crypto.ts +37 -0
  130. package/src/iso-core/shims/path.ts +24 -0
  131. package/src/iso-core/svg-dom.ts +103 -0
  132. package/src/iso-core/theme.ts +64 -0
  133. package/src/iso-core/vdom.ts +41 -0
  134. package/src/iso-editor/adapter.ts +128 -0
  135. package/src/iso-editor/clipboard.ts +163 -0
  136. package/src/iso-editor/commands.ts +191 -0
  137. package/src/iso-editor/complete.ts +73 -0
  138. package/src/iso-editor/doc.ts +207 -0
  139. package/src/iso-editor/index.ts +67 -0
  140. package/src/iso-editor/model.ts +234 -0
  141. package/src/iso-editor/outline.ts +126 -0
  142. package/src/iso-editor/package.json +6 -0
  143. package/src/iso-editor/path.ts +18 -0
  144. package/src/iso-editor/providers.ts +113 -0
  145. package/src/iso-editor/schema-nav.ts +129 -0
  146. package/src/iso-editor/splice.ts +472 -0
  147. package/src/iso-editor/storage-keys.ts +6 -0
  148. package/src/iso-editor/ui/actions.ts +119 -0
  149. package/src/iso-editor/ui/app.css +230 -0
  150. package/src/iso-editor/ui/canvas-layer.ts +56 -0
  151. package/src/iso-editor/ui/canvas.ts +1071 -0
  152. package/src/iso-editor/ui/clip.ts +97 -0
  153. package/src/iso-editor/ui/dialog.ts +25 -0
  154. package/src/iso-editor/ui/flat-canvas.ts +51 -0
  155. package/src/iso-editor/ui/icons.ts +21 -0
  156. package/src/iso-editor/ui/keys.ts +30 -0
  157. package/src/iso-editor/ui/later.ts +22 -0
  158. package/src/iso-editor/ui/layer.ts +7 -0
  159. package/src/iso-editor/ui/marks.css +35 -0
  160. package/src/iso-editor/ui/menu.ts +67 -0
  161. package/src/iso-editor/ui/monaco-entry.ts +6 -0
  162. package/src/iso-editor/ui/mount-kit.ts +35 -0
  163. package/src/iso-editor/ui/mount.ts +684 -0
  164. package/src/iso-editor/ui/pane.ts +45 -0
  165. package/src/iso-editor/ui/part.ts +45 -0
  166. package/src/iso-editor/ui/plain-icons.ts +83 -0
  167. package/src/iso-editor/ui/props.ts +347 -0
  168. package/src/iso-editor/ui/scope-css.ts +65 -0
  169. package/src/iso-editor/ui/setup.ts +144 -0
  170. package/src/iso-editor/ui/skin.css +181 -0
  171. package/src/iso-editor/ui/text.ts +262 -0
  172. package/src/iso-editor/ui/tree.ts +657 -0
  173. package/src/iso-editor/validate.ts +62 -0
  174. package/src/iso-editor/window/protocol.ts +33 -0
  175. package/src/iso-objects/assemble.ts +57 -0
  176. package/src/iso-objects/assets.ts +122 -0
  177. package/src/iso-objects/board.ts +169 -0
  178. package/src/iso-objects/compile.ts +76 -0
  179. package/src/iso-objects/css.ts +163 -0
  180. package/src/iso-objects/flat.ts +653 -0
  181. package/src/iso-objects/focus.ts +14 -0
  182. package/src/iso-objects/geometry.ts +86 -0
  183. package/src/iso-objects/index.ts +33 -0
  184. package/src/iso-objects/kinds.ts +56 -0
  185. package/src/iso-objects/labels.ts +310 -0
  186. package/src/iso-objects/package.json +6 -0
  187. package/src/iso-objects/place.ts +318 -0
  188. package/src/iso-objects/route.ts +444 -0
  189. package/src/iso-objects/scene.ts +376 -0
  190. package/src/iso-objects/steps.ts +234 -0
  191. package/src/iso-objects/types.ts +68 -0
  192. package/src/iso-systems/catalog.ts +31 -0
  193. package/src/iso-systems/compile.ts +39 -0
  194. package/src/iso-systems/css.ts +9 -0
  195. package/src/iso-systems/index.ts +12 -0
  196. package/src/iso-systems/nodes.ts +126 -0
  197. package/src/iso-systems/package.json +6 -0
  198. package/src/iso-systems/schema.json +311 -0
  199. package/src/iso-systems/validate.ts +34 -0
  200. package/src/iso-viewer/bundle.ts +15 -0
  201. package/src/iso-viewer/card-motion.ts +237 -0
  202. package/src/iso-viewer/dom.ts +13 -0
  203. package/src/iso-viewer/dual-view.ts +212 -0
  204. package/src/iso-viewer/flat-view.ts +127 -0
  205. package/src/iso-viewer/history.ts +781 -0
  206. package/src/iso-viewer/index.ts +40 -0
  207. package/src/iso-viewer/morph.ts +191 -0
  208. package/src/iso-viewer/overlay.ts +212 -0
  209. package/src/iso-viewer/package.json +6 -0
  210. package/src/iso-viewer/page.ts +150 -0
  211. package/src/iso-viewer/player.ts +321 -0
  212. package/src/iso-viewer/still.ts +74 -0
  213. package/src/iso-viewer/timeline-contract.ts +342 -0
  214. package/src/iso-viewer/timeline-engine.ts +420 -0
  215. package/src/iso-viewer/timeline-export.ts +31 -0
  216. package/src/iso-viewer/timeline-scale.ts +129 -0
  217. package/src/iso-viewer/timeline-scope.ts +56 -0
  218. package/src/iso-viewer/timeline-search.ts +198 -0
  219. package/src/iso-viewer/timeline-time.ts +54 -0
  220. package/src/iso-viewer/view-css.ts +59 -0
  221. package/src/iso-viewer/viewport.ts +142 -0
  222. package/types/iso-core/compile-schema.d.ts +11 -0
  223. package/types/iso-core/depth.d.ts +6 -0
  224. package/types/iso-core/errors.d.ts +24 -0
  225. package/types/iso-core/glyphs.d.ts +19 -0
  226. package/types/iso-core/index.d.ts +17 -0
  227. package/types/iso-core/kernel.d.ts +130 -0
  228. package/types/iso-core/metrics.json +1 -0
  229. package/types/iso-core/parse.d.ts +18 -0
  230. package/types/iso-core/schema-errors.d.ts +14 -0
  231. package/types/iso-core/shims/crypto.d.ts +9 -0
  232. package/types/iso-core/svg-dom.d.ts +15 -0
  233. package/types/iso-core/theme.d.ts +38 -0
  234. package/types/iso-core/vdom.d.ts +26 -0
  235. package/types/iso-editor/adapter.d.ts +145 -0
  236. package/types/iso-editor/clipboard.d.ts +23 -0
  237. package/types/iso-editor/commands.d.ts +32 -0
  238. package/types/iso-editor/complete.d.ts +25 -0
  239. package/types/iso-editor/doc.d.ts +50 -0
  240. package/types/iso-editor/index.d.ts +57 -0
  241. package/types/iso-editor/model.d.ts +96 -0
  242. package/types/iso-editor/outline.d.ts +28 -0
  243. package/types/iso-editor/path.d.ts +7 -0
  244. package/types/iso-editor/providers.d.ts +43 -0
  245. package/types/iso-editor/schema-nav.d.ts +34 -0
  246. package/types/iso-editor/splice.d.ts +53 -0
  247. package/types/iso-editor/storage-keys.d.ts +5 -0
  248. package/types/iso-editor/ui/actions.d.ts +23 -0
  249. package/types/iso-editor/ui/canvas-layer.d.ts +65 -0
  250. package/types/iso-editor/ui/canvas.d.ts +279 -0
  251. package/types/iso-editor/ui/clip.d.ts +14 -0
  252. package/types/iso-editor/ui/dialog.d.ts +7 -0
  253. package/types/iso-editor/ui/flat-canvas.d.ts +2 -0
  254. package/types/iso-editor/ui/icons.d.ts +5 -0
  255. package/types/iso-editor/ui/keys.d.ts +7 -0
  256. package/types/iso-editor/ui/later.d.ts +12 -0
  257. package/types/iso-editor/ui/layer.d.ts +2 -0
  258. package/types/iso-editor/ui/menu.d.ts +21 -0
  259. package/types/iso-editor/ui/mount-kit.d.ts +31 -0
  260. package/types/iso-editor/ui/mount.d.ts +146 -0
  261. package/types/iso-editor/ui/pane.d.ts +60 -0
  262. package/types/iso-editor/ui/part.d.ts +40 -0
  263. package/types/iso-editor/ui/plain-icons.d.ts +10 -0
  264. package/types/iso-editor/ui/props.d.ts +57 -0
  265. package/types/iso-editor/ui/scope-css.d.ts +5 -0
  266. package/types/iso-editor/ui/setup.d.ts +40 -0
  267. package/types/iso-editor/ui/text.d.ts +19 -0
  268. package/types/iso-editor/ui/tree.d.ts +100 -0
  269. package/types/iso-editor/validate.d.ts +36 -0
  270. package/types/iso-editor/window/protocol.d.ts +60 -0
  271. package/types/iso-objects/assemble.d.ts +35 -0
  272. package/types/iso-objects/assets.d.ts +49 -0
  273. package/types/iso-objects/board.d.ts +36 -0
  274. package/types/iso-objects/compile.d.ts +35 -0
  275. package/types/iso-objects/css.d.ts +16 -0
  276. package/types/iso-objects/flat.d.ts +130 -0
  277. package/types/iso-objects/focus.d.ts +1 -0
  278. package/types/iso-objects/geometry.d.ts +59 -0
  279. package/types/iso-objects/index.d.ts +26 -0
  280. package/types/iso-objects/kinds.d.ts +53 -0
  281. package/types/iso-objects/labels.d.ts +92 -0
  282. package/types/iso-objects/place.d.ts +25 -0
  283. package/types/iso-objects/route.d.ts +67 -0
  284. package/types/iso-objects/scene.d.ts +63 -0
  285. package/types/iso-objects/steps.d.ts +90 -0
  286. package/types/iso-objects/types.d.ts +140 -0
  287. package/types/iso-systems/catalog.d.ts +4 -0
  288. package/types/iso-systems/compile.d.ts +6 -0
  289. package/types/iso-systems/css.d.ts +3 -0
  290. package/types/iso-systems/index.d.ts +5 -0
  291. package/types/iso-systems/nodes.d.ts +3 -0
  292. package/types/iso-viewer/card-motion.d.ts +56 -0
  293. package/types/iso-viewer/dom.d.ts +1 -0
  294. package/types/iso-viewer/dual-view.d.ts +44 -0
  295. package/types/iso-viewer/flat-view.d.ts +25 -0
  296. package/types/iso-viewer/history.d.ts +91 -0
  297. package/types/iso-viewer/index.d.ts +31 -0
  298. package/types/iso-viewer/morph.d.ts +28 -0
  299. package/types/iso-viewer/overlay.d.ts +135 -0
  300. package/types/iso-viewer/page.d.ts +13 -0
  301. package/types/iso-viewer/still.d.ts +26 -0
  302. package/types/iso-viewer/timeline-contract.d.ts +345 -0
  303. package/types/iso-viewer/timeline-engine.d.ts +20 -0
  304. package/types/iso-viewer/timeline-export.d.ts +5 -0
  305. package/types/iso-viewer/timeline-scale.d.ts +44 -0
  306. package/types/iso-viewer/timeline-scope.d.ts +33 -0
  307. package/types/iso-viewer/timeline-search.d.ts +52 -0
  308. package/types/iso-viewer/timeline-time.d.ts +8 -0
  309. package/types/iso-viewer/view-css.d.ts +7 -0
  310. package/types/iso-viewer/viewport.d.ts +50 -0
@@ -0,0 +1,8 @@
1
+ import { drawingCss, baseCss } from "../iso-objects/css.js";
2
+ import { systems } from "./catalog.js";
3
+ const DRAWING_CSS = drawingCss(systems);
4
+ const BASE_CSS = baseCss(systems);
5
+ export {
6
+ BASE_CSS,
7
+ DRAWING_CSS
8
+ };
@@ -0,0 +1,16 @@
1
+ import { NODE_ASSETS, getAsset } from "./nodes.js";
2
+ import { REGION_KINDS, systems } from "./catalog.js";
3
+ import { DRAWING_CSS, BASE_CSS } from "./css.js";
4
+ import { validateSchema, schemaValidator } from "./validate.js";
5
+ import { compile } from "./compile.js";
6
+ export {
7
+ BASE_CSS,
8
+ DRAWING_CSS,
9
+ NODE_ASSETS,
10
+ REGION_KINDS,
11
+ compile,
12
+ getAsset,
13
+ schemaValidator,
14
+ systems,
15
+ validateSchema
16
+ };
@@ -0,0 +1,124 @@
1
+ import { iso, tag, S, center } from "../iso-core/kernel.js";
2
+ import * as D from "../iso-core/glyphs.js";
3
+ import { boxAsset, plate, drawCloud, facePainter } from "../iso-objects/assets.js";
4
+ const volume = {
5
+ name: "volume",
6
+ description: "Stored data that is kept: a drum with two bands (a volume, a room's history, an archive).",
7
+ size: [1.8, 1.8, 1.3],
8
+ role: "folder",
9
+ draw(k, b) {
10
+ const [cx, cy] = center(b), r = Math.min(b.x1 - b.x0, b.y1 - b.y0) / 2;
11
+ const at = (deg, z) => [cx + r * Math.cos(deg * Math.PI / 180), cy + r * Math.sin(deg * Math.PI / 180), z];
12
+ const arc = (a0, a1, z) => Array.from({ length: 13 }, (_, i) => at(a0 + (a1 - a0) * i / 12, z));
13
+ const side = (a0, a1, cls) => k.poly([...arc(a0, a1, b.z0), ...arc(a0, a1, b.z1).reverse()], cls);
14
+ const h = b.z1 - b.z0;
15
+ const band = (z) => arc(-45, 135, z).slice(1).map((p, i, all) => k.line3(i ? all[i - 1] : at(-45, z), p, "det")).join("");
16
+ return side(45, 135, "lft") + side(-45, 45, "rgt") + band(b.z0 + h * 0.36) + band(b.z0 + h * 0.68) + k.poly(Array.from({ length: 32 }, (_, i) => at(i * 360 / 32, b.z1)), "top");
17
+ }
18
+ };
19
+ const orb = {
20
+ name: "orb",
21
+ description: "An agent: a white sphere with two eyes, on a small plate.",
22
+ size: [1.5, 1.5, 1.6],
23
+ role: "lead",
24
+ cls: "orb",
25
+ draw(k, b) {
26
+ k.def("orbG", tag(
27
+ "radialGradient",
28
+ { id: "orbG", cx: "0.36", cy: "0.30", r: "0.80" },
29
+ tag("stop", { offset: "0", style: "stop-color:#ffffff" }) + tag("stop", { offset: "0.62", style: "stop-color:#f6f6f4" }) + tag("stop", { offset: "1", style: "stop-color:#cfd0d6" })
30
+ ));
31
+ const p = plate(b);
32
+ const [px, py] = iso((b.x0 + b.x1) / 2, (b.y0 + b.y1) / 2, p.z1), R = 23, cy = py - R + 3;
33
+ k.bounds.add([px - R, cy - R]);
34
+ k.bounds.add([px + R, cy + R]);
35
+ const eye = (dx, dy, w, h) => tag("rect", { class: "eye", x: px + dx - w / 2, y: cy + dy - h / 2, width: w, height: h, rx: w / 2, transform: `rotate(-24 ${(px + dx).toFixed(1)} ${(cy + dy).toFixed(1)})` });
36
+ return k.blockFaces(p) + tag("ellipse", { class: "shade", cx: px, cy: py + 1, rx: R * 0.8, ry: R * 0.3 }) + tag("circle", { class: "ball", cx: px, cy, r: R }) + eye(3, -7, 6.4, 13.5) + eye(14, -12, 5.4, 10.5);
37
+ },
38
+ label(b, _n, hasSub) {
39
+ const [X, Y] = iso((b.x0 + b.x1) / 2, (b.y0 + b.y1) / 2, b.z0 + 1.95);
40
+ return { x: X, y: Y - 26 + (hasSub ? 0 : 14), anchor: "middle" };
41
+ },
42
+ pulse: (b) => [(b.x0 + b.x1) / 2, (b.y0 + b.y1) / 2, b.z0 + 0.8, 26]
43
+ };
44
+ const person = {
45
+ name: "person",
46
+ description: "A human: body and head on a small plate. The label sits to the right.",
47
+ size: [1.5, 1.5, 1.6],
48
+ role: "person",
49
+ cls: "person",
50
+ draw(k, b) {
51
+ const p = plate(b);
52
+ const [px, py] = iso((b.x0 + b.x1) / 2, (b.y0 + b.y1) / 2, p.z1);
53
+ k.bounds.add([px - 13, py - 50]);
54
+ const r = (v) => v.toFixed(1);
55
+ return k.blockFaces(p) + tag("path", { class: "body", d: `M${r(px - 13)},${r(py - 4)} C${r(px - 13)},${r(py - 34)} ${r(px + 13)},${r(py - 34)} ${r(px + 13)},${r(py - 4)} Q${r(px)},${r(py + 4)} ${r(px - 13)},${r(py - 4)}z` }) + tag("circle", { class: "head", cx: px, cy: py - 40, r: 10 });
56
+ },
57
+ label(b) {
58
+ const [X, Y] = iso((b.x0 + b.x1) / 2, (b.y0 + b.y1) / 2, b.z0);
59
+ return { x: X + 30, y: Y + 2, anchor: "start" };
60
+ },
61
+ pulse: (b) => [(b.x0 + b.x1) / 2, (b.y0 + b.y1) / 2, b.z0 + 0.9, 26]
62
+ };
63
+ const screen = {
64
+ name: "screen",
65
+ description: "An upright screen or terminal panel. `face`: terminal, chat, desktop, tiles, or one the host registers. `facing`: turn in degrees.",
66
+ size: [1.64, 0.3, 1.75],
67
+ role: "term",
68
+ draw(k, b, n) {
69
+ const [cx, cy] = center(b), HW = (b.x1 - b.x0) / 2, PH = b.z1 - b.z0, T = 0.14;
70
+ const t = (n.facing ?? 0) * Math.PI / 180, tx = Math.cos(t), ty = Math.sin(t), nx = Math.sin(t) * T, ny = -Math.cos(t) * T;
71
+ const a = [cx - tx * HW, cy - ty * HW], bb = [cx + tx * HW, cy + ty * HW];
72
+ const z0 = b.z0, z1 = b.z1;
73
+ let s = k.poly([[bb[0], bb[1], z0], [bb[0] + nx, bb[1] + ny, z0], [bb[0] + nx, bb[1] + ny, z1], [bb[0], bb[1], z1]], "rgt") + k.poly([[a[0], a[1], z1], [bb[0], bb[1], z1], [bb[0] + nx, bb[1] + ny, z1], [a[0] + nx, a[1] + ny, z1]], "top") + k.poly([[a[0], a[1], z0], [bb[0], bb[1], z0], [bb[0], bb[1], z1], [a[0], a[1], z1]], "lft");
74
+ const A = iso(a[0], a[1], z1), B = iso(bb[0], bb[1], z1), w = 2 * HW * S, h = PH * S;
75
+ const m = [(B[0] - A[0]) / w, (B[1] - A[1]) / w, 0, 1, A[0], A[1]];
76
+ const face = facePainter(n.face ?? "terminal") ?? D.placeholderFace;
77
+ s += k.onMatrix(m, w, h, (W, H) => D.screenGlass(W, H) + face(W, H), "scr");
78
+ return s;
79
+ }
80
+ };
81
+ const monitor = {
82
+ name: "monitor",
83
+ description: "A block with a screen painted on its front-left face. `face` as for screen.",
84
+ size: [2.4, 0.8, 1.8],
85
+ role: "term",
86
+ draw(k, b, n) {
87
+ const face = facePainter(n.face ?? "terminal") ?? D.placeholderFace;
88
+ return k.blockFaces(b) + k.onFace(b, "left", (w, h) => D.screenGlass(w, h) + face(w, h), "scr");
89
+ }
90
+ };
91
+ const cloud = {
92
+ name: "cloud",
93
+ description: "A cloud lying on the floor: the internet, or a hosted service.",
94
+ size: [3, 2.4, 0.3],
95
+ role: "cloud",
96
+ draw: (k, b) => drawCloud(k, b)
97
+ };
98
+ const NODE_ASSETS = {
99
+ block: boxAsset("block", "A box. Size and colour role are free; add decorations with `deco`.", [2.4, 2.4, 1.6], "grey"),
100
+ session: boxAsset("session", "An agent session: a box with terminal lines (`deco: [terminal: 4]`; add an icon the host registers with `icon: NAME`).", [2.6, 2.6, 1.8], "work", [{ terminal: 4 }]),
101
+ terminal: boxAsset("terminal", "A box with terminal lines on its front.", [1.6, 1.2, 0.8], "term", [{ terminal: 2 }]),
102
+ server: boxAsset("server", "A service or daemon: a low box with two terminal lines.", [3, 2.2, 0.9], "doz", [{ terminal: 2 }]),
103
+ chat: boxAsset("chat", "A chat server or room: a box with a chat bubble on top.", [3.6, 4.4, 1.3], "chat", ["bubble"]),
104
+ mailbox: boxAsset("mailbox", "A room or inbox: terminal lines and an envelope on top.", [2.4, 2.4, 1.6], "mail", [{ terminal: 3 }, "envelope"]),
105
+ file: boxAsset("file", "A file or document: a low box with lines on top.", [1.6, 1.6, 0.6], "file", ["file-lines"]),
106
+ folder: boxAsset("folder", "A folder or directory: a flat box.", [1.6, 1.6, 0.5], "folder"),
107
+ key: boxAsset("key", "A secret: a low box with a key on top.", [1.6, 1.6, 0.6], "key", [], (k, b) => D.keyGlyph(k, b)),
108
+ socket: boxAsset("socket", "A socket: a small box with a round opening on top.", [1.2, 1.2, 0.5], "socket", [], (k, b) => D.socketGlyph(k, b)),
109
+ gate: boxAsset("gate", "A gate or proxy: a narrow upright slab, usually set in a fence wall.", [0.3, 2, 1.1], "gate"),
110
+ placeholder: boxAsset("placeholder", "A placeholder value: a small low box with lines.", [1.2, 1, 0.45], "placeholder", ["file-lines"]),
111
+ orb,
112
+ person,
113
+ screen,
114
+ monitor,
115
+ cloud,
116
+ volume
117
+ };
118
+ function getAsset(name) {
119
+ return NODE_ASSETS[name ?? "block"];
120
+ }
121
+ export {
122
+ NODE_ASSETS,
123
+ getAsset
124
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "//": "iso-systems: validate.ts registers the format's words with the schema messages when it loads; nothing else has side effects.",
3
+ "type": "module",
4
+ "private": true,
5
+ "sideEffects": ["./validate.ts"]
6
+ }
@@ -0,0 +1,311 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://isodiag.local/schema/isodiag-1.json",
4
+ "title": "isodiag diagram",
5
+ "description": "A page of isometric, animated diagrams. See docs/FORMAT.md.",
6
+ "type": "object",
7
+ "required": ["isodiag", "scenes"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "isodiag": { "const": 1, "description": "Format version. Always 1." },
11
+ "title": { "type": "string" },
12
+ "lede": { "type": "string" },
13
+ "pills": { "type": "array", "items": { "type": "string" } },
14
+ "theme": { "type": "string", "description": "'default' or a path to a theme file" },
15
+ "roles": {
16
+ "type": "object",
17
+ "description": "Extra or changed colour roles for nodes and regions",
18
+ "additionalProperties": { "$ref": "#/$defs/role" }
19
+ },
20
+ "kinds": {
21
+ "type": "object",
22
+ "description": "Extra flow kinds, or new legend text for the standard ones",
23
+ "additionalProperties": { "$ref": "#/$defs/kindDef" }
24
+ },
25
+ "after": { "type": "string", "description": "Markdown shown after all scenes" },
26
+ "grid": { "$ref": "#/$defs/grid" },
27
+ "assemble": { "type": "boolean", "description": "draw each scene by flying its parts in from the nearest edge, then play" },
28
+ "footer": { "type": "string" },
29
+ "scenes": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/scene" } }
30
+ },
31
+ "$defs": {
32
+ "id": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]*$" },
33
+ "grid": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "snap": { "type": "number", "exclusiveMinimum": 0, "description": "round every placed edge and route waypoint to this step, in grid units" },
38
+ "show": { "type": "boolean", "description": "draw the floor grid when the page opens (the Grid button toggles it)" },
39
+ "step": { "type": "number", "exclusiveMinimum": 0, "description": "spacing of the drawn grid lines; default the snap step, or 1" }
40
+ }
41
+ },
42
+ "num": { "type": "number" },
43
+ "point2": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 2 },
44
+ "size2or3": { "type": "array", "items": { "type": "number", "exclusiveMinimum": 0 }, "minItems": 2, "maxItems": 3 },
45
+ "stepRef": { "anyOf": [{ "type": "string" }, { "type": "integer", "minimum": 1 }] },
46
+ "side": { "enum": ["n", "e", "s", "w"] },
47
+ "align": { "enum": ["start", "center", "end"] },
48
+ "role": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": ["h", "s"],
52
+ "properties": {
53
+ "h": { "type": "number", "minimum": 0, "maximum": 360, "description": "hue" },
54
+ "s": { "type": "number", "minimum": 0, "maximum": 100, "description": "saturation, percent" },
55
+ "top": { "type": "string", "description": "CSS colour for the top face, overriding the computed one" },
56
+ "tint": { "type": "number", "minimum": 0, "maximum": 100, "description": "percent of the role colour mixed into the pad colour for the top face" }
57
+ }
58
+ },
59
+ "kindDef": {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "properties": {
63
+ "legend": { "type": "string" },
64
+ "like": { "type": "string", "description": "a standard kind whose colour and line style this one uses" },
65
+ "color": { "type": "string" },
66
+ "dash": { "enum": ["solid", "dashed", "dotted"] }
67
+ }
68
+ },
69
+ "placement": {
70
+ "properties": {
71
+ "in": { "$ref": "#/$defs/id" },
72
+ "at": { "$ref": "#/$defs/point2" },
73
+ "right-of": { "$ref": "#/$defs/id" },
74
+ "left-of": { "$ref": "#/$defs/id" },
75
+ "below": { "$ref": "#/$defs/id" },
76
+ "behind": { "$ref": "#/$defs/id" },
77
+ "gap": { "type": "number" },
78
+ "align": { "$ref": "#/$defs/align" },
79
+ "shift": { "$ref": "#/$defs/point2", "description": "nudge after placement, grid units [dx, dy]" },
80
+ "appears": { "$ref": "#/$defs/stepRef" },
81
+ "disappears": { "$ref": "#/$defs/stepRef" }
82
+ }
83
+ },
84
+ "scene": {
85
+ "type": "object",
86
+ "required": ["id", "title"],
87
+ "additionalProperties": false,
88
+ "properties": {
89
+ "id": { "$ref": "#/$defs/id" },
90
+ "title": { "type": "string" },
91
+ "caption": { "type": "string" },
92
+ "aria": { "type": "string" },
93
+ "gap": { "type": "number", "exclusiveMinimum": 0 },
94
+ "flow": { "enum": ["row", "column"] },
95
+ "regions": { "type": "array", "items": { "$ref": "#/$defs/region" } },
96
+ "nodes": { "type": "array", "items": { "$ref": "#/$defs/node" } },
97
+ "routes": { "type": "array", "items": { "$ref": "#/$defs/route" } },
98
+ "notes": { "type": "array", "items": { "$ref": "#/$defs/note" } },
99
+ "steps": { "type": "array", "items": { "$ref": "#/$defs/step" } },
100
+ "legend": {
101
+ "anyOf": [
102
+ { "enum": ["auto"] },
103
+ { "const": false },
104
+ { "type": "array", "items": { "type": "string" } }
105
+ ]
106
+ },
107
+ "badges": { "type": "boolean" },
108
+ "grid": { "$ref": "#/$defs/grid" },
109
+ "assemble": { "type": "boolean", "description": "draw the scene by flying its parts in from the nearest edge, then play" },
110
+ "loop": { "type": "boolean", "description": "the player wraps from the last step to the first (default true)" },
111
+ "dim": { "enum": ["flows", "all"], "description": "what a step dims: only flows, their labels and marks (default), or nodes too" },
112
+ "after": { "type": "string" }
113
+ }
114
+ },
115
+ "region": {
116
+ "type": "object",
117
+ "required": ["id", "kind"],
118
+ "unevaluatedProperties": false,
119
+ "allOf": [{ "$ref": "#/$defs/placement" }],
120
+ "properties": {
121
+ "id": { "$ref": "#/$defs/id" },
122
+ "kind": { "enum": ["slab", "pad", "fence", "vm", "cloud", "zone", "platform", "tunnel"] },
123
+ "label": { "type": "string" },
124
+ "label-style": { "enum": ["face", "face-right", "floor", "none"] },
125
+ "ghost": { "type": "boolean", "description": "drawn as a dashed outline: not there yet, out of reach, or stopped" },
126
+ "role": { "type": "string" },
127
+ "size": { "$ref": "#/$defs/size2or3" },
128
+ "padding": { "type": "number", "minimum": 0 },
129
+ "height": { "type": "number", "exclusiveMinimum": 0 },
130
+ "z": { "type": "number", "description": "lift above the floor it stands on (tunnels)" },
131
+ "flow": { "enum": ["row", "column"] },
132
+ "gate": {
133
+ "type": "object",
134
+ "additionalProperties": false,
135
+ "required": ["side"],
136
+ "properties": {
137
+ "side": { "$ref": "#/$defs/side" },
138
+ "at": { "type": "number", "minimum": 0, "maximum": 1, "description": "centre of the gate along the wall, 0..1" },
139
+ "width": { "type": "number", "exclusiveMinimum": 0 },
140
+ "height": { "type": "number", "exclusiveMinimum": 0 },
141
+ "node": { "$ref": "#/$defs/id" }
142
+ }
143
+ },
144
+ "around": { "type": "array", "items": { "$ref": "#/$defs/id" }, "description": "tunnel: routes it wraps" },
145
+ "regions": { "type": "array", "items": { "$ref": "#/$defs/region" } },
146
+ "nodes": { "type": "array", "items": { "$ref": "#/$defs/node" } }
147
+ }
148
+ },
149
+ "deco": {
150
+ "anyOf": [
151
+ { "enum": ["envelope", "bubble", "file-lines", "ghost", "terminal"] },
152
+ {
153
+ "type": "object",
154
+ "additionalProperties": false,
155
+ "minProperties": 1,
156
+ "maxProperties": 1,
157
+ "properties": {
158
+ "terminal": { "type": "integer", "minimum": 1, "maximum": 8 },
159
+ "icon": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "description": "an icon the host registers (none by default); one nothing registers is drawn as a placeholder, with a warning" },
160
+ "screen": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "description": "terminal, chat, desktop, tiles, or a face the host registers" }
161
+ }
162
+ }
163
+ ]
164
+ },
165
+ "node": {
166
+ "type": "object",
167
+ "required": ["id"],
168
+ "unevaluatedProperties": false,
169
+ "allOf": [{ "$ref": "#/$defs/placement" }],
170
+ "properties": {
171
+ "id": { "$ref": "#/$defs/id" },
172
+ "asset": { "type": "string", "description": "asset name from the library; default 'block'" },
173
+ "role": { "type": "string", "description": "colour role" },
174
+ "label": { "type": "string" },
175
+ "sub": { "type": "string" },
176
+ "size": { "$ref": "#/$defs/size2or3" },
177
+ "z": { "type": "number", "description": "lift above the floor it stands on" },
178
+ "deco": { "type": "array", "items": { "$ref": "#/$defs/deco" } },
179
+ "ghost": { "type": "boolean" },
180
+ "face": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "description": "screen asset: what the screen shows: terminal, chat, desktop, tiles, or a face the host registers" },
181
+ "facing": { "type": "number", "description": "screen asset: rotation in degrees" },
182
+ "label-at": {
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "properties": {
186
+ "side": { "enum": ["above", "right", "left", "below"] },
187
+ "dx": { "type": "number" },
188
+ "dy": { "type": "number" }
189
+ }
190
+ },
191
+ "nodes": { "type": "array", "items": { "$ref": "#/$defs/node" }, "description": "nodes standing on top of this one" }
192
+ }
193
+ },
194
+ "endpoint": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]*(\\.(n|e|s|w|top))?$" },
195
+ "route": {
196
+ "type": "object",
197
+ "required": ["id", "from", "to"],
198
+ "additionalProperties": false,
199
+ "properties": {
200
+ "id": { "$ref": "#/$defs/id" },
201
+ "from": { "$ref": "#/$defs/endpoint" },
202
+ "to": { "$ref": "#/$defs/endpoint" },
203
+ "kind": { "type": "string" },
204
+ "via": { "type": "array", "items": { "anyOf": [{ "$ref": "#/$defs/point2" }, { "$ref": "#/$defs/endpoint" }] } },
205
+ "points": { "type": "array", "items": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 3 }, "description": "exact polyline in grid units; skips the router" },
206
+ "lane": { "type": "number" },
207
+ "arrow": { "type": "boolean" },
208
+ "cross": { "type": "boolean", "description": "the route may pass through fence walls (it crosses a boundary)" },
209
+ "label": {
210
+ "anyOf": [
211
+ { "type": "string" },
212
+ {
213
+ "type": "object",
214
+ "additionalProperties": false,
215
+ "required": ["text"],
216
+ "properties": {
217
+ "text": { "type": "string" },
218
+ "along": { "type": "integer", "minimum": 1 },
219
+ "side": { "enum": ["left", "right"] },
220
+ "at": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 3, "description": "exact place [x, y] or [x, y, z]; skips placement" },
221
+ "dir": { "enum": ["x", "y"] },
222
+ "anchor": { "enum": ["start", "middle", "end"] }
223
+ }
224
+ }
225
+ ]
226
+ },
227
+ "appears": { "$ref": "#/$defs/stepRef" },
228
+ "disappears": { "$ref": "#/$defs/stepRef" }
229
+ }
230
+ },
231
+ "note": {
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "properties": {
235
+ "floor": { "type": "string" },
236
+ "face": { "type": "string" },
237
+ "label": { "type": "string" },
238
+ "sub": { "type": "string" },
239
+ "at": { "anyOf": [{ "$ref": "#/$defs/point2" }, { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 }] },
240
+ "on": { "$ref": "#/$defs/id", "description": "a node, region or route; a note on a route dims and lights with it" },
241
+ "kind": { "type": "string" },
242
+ "dir": { "enum": ["x", "y"] },
243
+ "anchor": { "enum": ["start", "middle", "end"] },
244
+ "dx": { "type": "number" },
245
+ "dy": { "type": "number" },
246
+ "appears": { "$ref": "#/$defs/stepRef" },
247
+ "disappears": { "$ref": "#/$defs/stepRef" }
248
+ }
249
+ },
250
+ "routeRef": {
251
+ "anyOf": [
252
+ { "type": "string" },
253
+ { "type": "object", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "type": "string" } }
254
+ ]
255
+ },
256
+ "phase": {
257
+ "anyOf": [
258
+ { "$ref": "#/$defs/routeRef" },
259
+ { "type": "array", "items": { "$ref": "#/$defs/routeRef" } }
260
+ ]
261
+ },
262
+ "step": {
263
+ "type": "object",
264
+ "required": ["heading"],
265
+ "additionalProperties": false,
266
+ "properties": {
267
+ "id": { "$ref": "#/$defs/id" },
268
+ "number": { "type": "integer", "minimum": 1, "description": "the number shown; defaults to the position" },
269
+ "kind": { "type": "string" },
270
+ "heading": { "type": "string" },
271
+ "caption": { "type": "string" },
272
+ "command": { "type": "string" },
273
+ "animate": { "type": "array", "items": { "$ref": "#/$defs/phase" } },
274
+ "pulse": { "type": "array", "items": { "$ref": "#/$defs/id" } },
275
+ "highlight": { "type": "array", "items": { "$ref": "#/$defs/id" } },
276
+ "focus": { "type": "array", "items": { "$ref": "#/$defs/id" }, "description": "nodes or regions to zoom to for this step; the view eases back on steps without focus" },
277
+ "show": { "type": "array", "items": { "$ref": "#/$defs/id" } },
278
+ "hide": { "type": "array", "items": { "$ref": "#/$defs/id" } },
279
+ "say": {
280
+ "type": "array",
281
+ "items": {
282
+ "type": "object",
283
+ "additionalProperties": false,
284
+ "required": ["at", "text"],
285
+ "properties": {
286
+ "at": { "anyOf": [{ "$ref": "#/$defs/id" }, { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 3 }], "description": "a node (the callout sits above it) or a grid point [x, y, z]" },
287
+ "text": { "type": "string" },
288
+ "kind": { "type": "string" },
289
+ "dx": { "type": "number" },
290
+ "dy": { "type": "number" },
291
+ "anchor": { "enum": ["start", "middle", "end"] }
292
+ }
293
+ }
294
+ },
295
+ "mark": {
296
+ "type": "array",
297
+ "items": {
298
+ "type": "object",
299
+ "additionalProperties": false,
300
+ "properties": {
301
+ "on": { "$ref": "#/$defs/id" },
302
+ "at": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 3 }
303
+ }
304
+ }
305
+ },
306
+ "badge": { "anyOf": [{ "type": "boolean" }, { "$ref": "#/$defs/id" }, { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 3 }], "description": "false, a route or node id, or a grid point [x, y, z]" },
307
+ "duration": { "anyOf": [{ "const": "auto" }, { "type": "integer", "minimum": 500 }] }
308
+ }
309
+ }
310
+ }
311
+ }
@@ -0,0 +1,35 @@
1
+ import { compileSchema } from "../iso-core/compile-schema.js";
2
+ import schema from "./schema.json" with { type: "json" };
3
+ import { prune, registerConst, registerNoun, registerPattern, registerRefKeys } from "../iso-core/schema-errors.js";
4
+ import { schemaValidator } from "../iso-core/schema-errors.js";
5
+ const check = compileSchema(schema);
6
+ const placementKeys = Object.keys(schema.$defs.placement.properties);
7
+ registerRefKeys("#/$defs/placement", placementKeys);
8
+ registerConst("/isodiag", (got) => `"isodiag" must be 1 (the format version), got ${got}`);
9
+ const what = {
10
+ scene: "a scene",
11
+ region: "a region",
12
+ node: "a node",
13
+ route: "a route",
14
+ note: "a note",
15
+ step: "a step"
16
+ };
17
+ registerNoun((path) => {
18
+ const m = /\/(scenes|regions|nodes|routes|notes|steps)\/\d+$/.exec(path);
19
+ return m ? what[m[1].replace(/s$/, "")] ?? "this item" : void 0;
20
+ });
21
+ registerPattern("^[A-Za-z][A-Za-z0-9_-]*(", (data) => ({
22
+ message: `"${data}" is not a node reference`,
23
+ hint: "write an id, optionally with a side: worker, worker.e (sides: n, e, s, w, top)"
24
+ }));
25
+ function validateSchema(parsed) {
26
+ if (parsed.data == null || typeof parsed.data !== "object" || Array.isArray(parsed.data)) {
27
+ return [{ severity: "error", message: 'the file must be a YAML map with "isodiag: 1" and "scenes:"', line: 1, col: 1, path: "" }];
28
+ }
29
+ if (check(parsed.data)) return [];
30
+ return prune(check.errors ?? [], parsed);
31
+ }
32
+ export {
33
+ schemaValidator,
34
+ validateSchema
35
+ };
@@ -0,0 +1,20 @@
1
+ import { buildSync } from "esbuild";
2
+ import { fileURLToPath } from "node:url";
3
+ let cached;
4
+ function playerScript() {
5
+ if (cached) return cached;
6
+ const r = buildSync({
7
+ entryPoints: [fileURLToPath(new URL("../../src/iso-viewer/player.ts", import.meta.url))],
8
+ bundle: true,
9
+ minify: true,
10
+ format: "iife",
11
+ target: "es2020",
12
+ write: false,
13
+ legalComments: "none"
14
+ });
15
+ cached = r.outputFiles[0].text;
16
+ return cached;
17
+ }
18
+ export {
19
+ playerScript
20
+ };