@bramas/simulant-ui 0.1.2 → 0.3.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 (42) hide show
  1. package/README.md +22 -0
  2. package/dist/SimulatorApp.jsx +782 -175
  3. package/dist/components/AlgorithmViewer.css +268 -74
  4. package/dist/components/AlgorithmViewer.jsx +171 -66
  5. package/dist/components/BranchPicker.css +74 -32
  6. package/dist/components/BranchPicker.jsx +9 -4
  7. package/dist/components/ConfigGraphGenerator.css +180 -38
  8. package/dist/components/ConfigGraphGenerator.jsx +155 -96
  9. package/dist/components/GenericEditor.jsx +18 -44
  10. package/dist/components/Icon.jsx +54 -0
  11. package/dist/components/ModelView.css +15 -15
  12. package/dist/components/SettingsLibrary.jsx +7 -5
  13. package/dist/components/Splitter.jsx +28 -0
  14. package/dist/components/StateInspector.css +59 -33
  15. package/dist/components/StateInspector.jsx +37 -4
  16. package/dist/components/theme.js +28 -0
  17. package/dist/pico.min.css +4 -4
  18. package/dist/renderers/ring.js +19 -10
  19. package/dist/sim/describe.js +10 -8
  20. package/dist/sim/project.js +27 -17
  21. package/dist/simulator.css +1553 -363
  22. package/package.json +6 -6
  23. package/src/SimulatorApp.tsx +888 -220
  24. package/src/components/AlgorithmViewer.css +268 -74
  25. package/src/components/AlgorithmViewer.tsx +188 -75
  26. package/src/components/BranchPicker.css +74 -32
  27. package/src/components/BranchPicker.tsx +9 -4
  28. package/src/components/ConfigGraphGenerator.css +180 -38
  29. package/src/components/ConfigGraphGenerator.tsx +172 -114
  30. package/src/components/GenericEditor.tsx +25 -59
  31. package/src/components/Icon.tsx +76 -0
  32. package/src/components/ModelView.css +15 -15
  33. package/src/components/SettingsLibrary.tsx +7 -5
  34. package/src/components/Splitter.tsx +55 -0
  35. package/src/components/StateInspector.css +59 -33
  36. package/src/components/StateInspector.tsx +35 -4
  37. package/src/components/theme.ts +33 -0
  38. package/src/pico.min.css +4 -4
  39. package/src/renderers/ring.ts +22 -12
  40. package/src/sim/describe.ts +10 -8
  41. package/src/sim/project.ts +27 -19
  42. package/src/simulator.css +1553 -363
package/README.md CHANGED
@@ -45,6 +45,28 @@ Projects can supply a custom drawing function, agent names and aliases for
45
45
  older parameter names. Settings outside declared domains produce advisory
46
46
  warnings; execution remains available.
47
47
 
48
+ Parameter declarations describe model domains, using `in [...]` for exact finite
49
+ sets and `where` for properties. Starting values come from a bounded search,
50
+ with editable typed fallbacks when no match is found. Override them separately
51
+ in the project registry:
52
+
53
+ ```ts
54
+ simProject(model, 'cautiousPair', {
55
+ defaults: { N: 8, site: 3 },
56
+ checkSettings: () => [{ N: 5, site: 1 }, { N: 8, site: 3 }],
57
+ });
58
+ ```
59
+
60
+ `checkSettings` supplies finite settings for `check-all` when model domains
61
+ cannot be enumerated. Each setting must include every parameter; settings
62
+ outside the model domains are skipped. Without it, `check-all` enumerates the
63
+ model's finite domains. Defaults never restrict the model or select check settings.
64
+
65
+ Renderers receive the page's colors in `options.theme` (light or dark): draw
66
+ labels and marks with `theme.foreground` and `theme.muted` so that drawings stay
67
+ readable in both themes. `simulator.css` is the whole stylesheet; the interface
68
+ no longer uses Pico CSS, and `pico.min.css` is kept empty for older pages.
69
+
48
70
  The package uses subpath exports: `SimulatorApp`, `sim/*`, `components/*`,
49
71
  `renderers/*`, and the CSS files. It has no root import.
50
72