@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.
- package/README.md +22 -0
- package/dist/SimulatorApp.jsx +782 -175
- package/dist/components/AlgorithmViewer.css +268 -74
- package/dist/components/AlgorithmViewer.jsx +171 -66
- package/dist/components/BranchPicker.css +74 -32
- package/dist/components/BranchPicker.jsx +9 -4
- package/dist/components/ConfigGraphGenerator.css +180 -38
- package/dist/components/ConfigGraphGenerator.jsx +155 -96
- package/dist/components/GenericEditor.jsx +18 -44
- package/dist/components/Icon.jsx +54 -0
- package/dist/components/ModelView.css +15 -15
- package/dist/components/SettingsLibrary.jsx +7 -5
- package/dist/components/Splitter.jsx +28 -0
- package/dist/components/StateInspector.css +59 -33
- package/dist/components/StateInspector.jsx +37 -4
- package/dist/components/theme.js +28 -0
- package/dist/pico.min.css +4 -4
- package/dist/renderers/ring.js +19 -10
- package/dist/sim/describe.js +10 -8
- package/dist/sim/project.js +27 -17
- package/dist/simulator.css +1553 -363
- package/package.json +6 -6
- package/src/SimulatorApp.tsx +888 -220
- package/src/components/AlgorithmViewer.css +268 -74
- package/src/components/AlgorithmViewer.tsx +188 -75
- package/src/components/BranchPicker.css +74 -32
- package/src/components/BranchPicker.tsx +9 -4
- package/src/components/ConfigGraphGenerator.css +180 -38
- package/src/components/ConfigGraphGenerator.tsx +172 -114
- package/src/components/GenericEditor.tsx +25 -59
- package/src/components/Icon.tsx +76 -0
- package/src/components/ModelView.css +15 -15
- package/src/components/SettingsLibrary.tsx +7 -5
- package/src/components/Splitter.tsx +55 -0
- package/src/components/StateInspector.css +59 -33
- package/src/components/StateInspector.tsx +35 -4
- package/src/components/theme.ts +33 -0
- package/src/pico.min.css +4 -4
- package/src/renderers/ring.ts +22 -12
- package/src/sim/describe.ts +10 -8
- package/src/sim/project.ts +27 -19
- 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
|
|