merpeeps-pack-state 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Merpeeps contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # merpeeps-pack-state
2
+
3
+ The Merpeeps State machine stencil pack, distributed as **YAML data only**.
4
+ Includes four stencils: Start, State, Choice, and End, with shape and colour
5
+ defaults for initial markers, ordinary states, guarded branches, and final
6
+ markers.
7
+
8
+ ## Install and read
9
+
10
+ ```bash
11
+ npm install merpeeps-pack-state
12
+ ```
13
+
14
+ From a Node.js ES module:
15
+
16
+ ```js
17
+ import { readFileSync } from 'node:fs';
18
+ import { createRequire } from 'node:module';
19
+
20
+ const require = createRequire(import.meta.url);
21
+ const yaml = readFileSync(require.resolve('merpeeps-pack-state'), 'utf8');
22
+ ```
23
+
24
+ The explicit data path `merpeeps-pack-state/state.merpeeps-pack.yml` resolves
25
+ to the same file. Pass the text to your host application's YAML parser and
26
+ compatible Merpeeps pack loader. This package does not include a parser or
27
+ runtime dependencies. Do not import or require the YAML directly as
28
+ JavaScript; `require.resolve` locates the data without executing it.
29
+
30
+ ## Contents and scope
31
+
32
+ The tarball contains only:
33
+
34
+ - `state.merpeeps-pack.yml`
35
+ - `LICENSE`
36
+ - `README.md`
37
+ - `package.json`
38
+
39
+ The YAML defines stencil labels, text, shapes, fill and stroke defaults, and
40
+ hints. This pack declares no icons or custom icon geometry and includes no
41
+ new artwork. Your host supplies shape rendering and any mapping to Mermaid
42
+ state syntax; this package supplies neither a renderer nor glyph
43
+ implementations.
44
+
45
+ Installing with npm only makes the data available to your project. It does
46
+ not automatically install anything into the Merpeeps desktop app or register
47
+ a Mermaid plugin. The desktop already embeds this same default pack.
48
+ The separate `merpeeps-mermaid-layout` package provides layout functionality,
49
+ not an automatic installation mechanism for this pack.
50
+
51
+ ## Source and publishing
52
+
53
+ The canonical source is
54
+ [`src/Merpeeps.Core/Packs/state.merpeeps-pack.yml`](https://github.com/sargemonkey/merpeeps/blob/main/src/Merpeeps.Core/Packs/state.merpeeps-pack.yml).
55
+ From the repository, `npm pack` and `npm publish` run `prepack` to copy that
56
+ file and the root MIT license into this package. Edit the canonical YAML, not
57
+ the generated package copy. Installing the resulting tarball needs no
58
+ repository checkout, build, or install lifecycle script.
59
+
60
+ See the [pack usage guide](https://github.com/sargemonkey/merpeeps/blob/main/docs/GUIDE.md#stencil-packs)
61
+ and the [manual publishing checklist](https://github.com/sargemonkey/merpeeps/blob/main/docs/PUBLISHING.md).
62
+
63
+ MIT licensed — see [LICENSE](./LICENSE).
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "merpeeps-pack-state",
3
+ "version": "0.1.0",
4
+ "description": "Data-only Merpeeps state machine stencil pack for start markers, states, choices, and end markers.",
5
+ "keywords": [
6
+ "merpeeps",
7
+ "mermaid",
8
+ "state-machine",
9
+ "state-diagram",
10
+ "diagram",
11
+ "stencils",
12
+ "yaml",
13
+ "data-only"
14
+ ],
15
+ "license": "MIT",
16
+ "author": "Merpeeps contributors",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/sargemonkey/merpeeps.git",
20
+ "directory": "packages/merpeeps-pack-state"
21
+ },
22
+ "homepage": "https://github.com/sargemonkey/merpeeps/blob/main/docs/GUIDE.md#stencil-packs",
23
+ "bugs": {
24
+ "url": "https://github.com/sargemonkey/merpeeps/issues"
25
+ },
26
+ "main": "./state.merpeeps-pack.yml",
27
+ "exports": {
28
+ ".": "./state.merpeeps-pack.yml",
29
+ "./state.merpeeps-pack.yml": "./state.merpeeps-pack.yml"
30
+ },
31
+ "files": [
32
+ "state.merpeeps-pack.yml",
33
+ "LICENSE",
34
+ "README.md",
35
+ "package.json"
36
+ ],
37
+ "scripts": {
38
+ "prepack": "node ../../scripts/prepare-domain-pack.mjs state",
39
+ "release:check": "node ../../oracle/package-consumer-test.mjs merpeeps-pack-state",
40
+ "prepublishOnly": "npm run release:check"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public",
44
+ "registry": "https://registry.npmjs.org/"
45
+ }
46
+ }
@@ -0,0 +1,35 @@
1
+ id: state
2
+ name: State machine
3
+ spec: 1
4
+ licence: MIT
5
+
6
+ # The start and end markers are drawn as circles here; the state adapter maps
7
+ # them to mermaid's [*].
8
+ stencils:
9
+ - label: Start
10
+ text: Start
11
+ shape: Circle
12
+ fill: "#F5F5F5"
13
+ stroke: "#666666"
14
+ hint: Initial pseudo-state
15
+
16
+ - label: State
17
+ text: Idle
18
+ shape: RoundedRect
19
+ fill: "#DAE8FC"
20
+ stroke: "#6C8EBF"
21
+ hint: A state the machine rests in
22
+
23
+ - label: Choice
24
+ text: Choice
25
+ shape: Rhombus
26
+ fill: "#FFE6CC"
27
+ stroke: "#D79B00"
28
+ hint: A guarded branch between states
29
+
30
+ - label: End
31
+ text: End
32
+ shape: DoubleCircle
33
+ fill: "#F5F5F5"
34
+ stroke: "#666666"
35
+ hint: Final pseudo-state