wiki-plugin-rcngraph 0.1.8 → 0.1.11
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/client/rcn-graph.js +37 -2
- package/client/rcngraph.js +38 -2
- package/package.json +19 -4
- package/pages/about-rcngraph-plugin +38 -8
package/client/rcn-graph.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
(function () {
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// Kept in step with client/rcngraph.js — farm sites are alice.localhost etc., so
|
|
4
|
+
// match the suffix rather than the bare hostname.
|
|
5
|
+
const LOCAL = /(^|\.)localhost$/.test(window.location.hostname)
|
|
6
|
+
const GRAPH_URL = LOCAL
|
|
7
|
+
? 'http://localhost:8765/tools/graph-tool-v22.html'
|
|
8
|
+
: 'https://marc.relocalizecreativity.net/assets/Drag/graph-tool-v22.html'
|
|
4
9
|
const WINDOW_NAME = 'rcngraph'
|
|
5
10
|
|
|
6
11
|
let pendingItem = null
|
|
@@ -23,7 +28,7 @@
|
|
|
23
28
|
$item.append(`
|
|
24
29
|
<div style="background-color:#eee;padding:15px;text-align:center;">
|
|
25
30
|
<p style="font-weight:bold;margin:0 0 6px;">RCN Graph Tool</p>
|
|
26
|
-
<p style="color:#666;font-size:0.85em;margin:0 0 12px;">CLD · EIP · OPM ·
|
|
31
|
+
<p style="color:#666;font-size:0.85em;margin:0 0 12px;">CLD · EIP · NRM · Trace · Wardley · OPM · SFD · LOP · VSM</p>
|
|
27
32
|
<button class="open-graph" style="cursor:pointer;">Open Graph Tool ↗</button>
|
|
28
33
|
</div>
|
|
29
34
|
`)
|
|
@@ -34,7 +39,37 @@
|
|
|
34
39
|
renderContent($item, item)
|
|
35
40
|
}
|
|
36
41
|
|
|
42
|
+
|
|
43
|
+
// ⓘ — this plugin's About page in one click. FedWiki opens it with Cmd/Ctrl-I,
|
|
44
|
+
// but only from the item's text editor, which people seldom open when the real
|
|
45
|
+
// work happens elsewhere. Redraws empty the item, so the mark puts itself back.
|
|
46
|
+
function aboutMark ($item, type) {
|
|
47
|
+
const el = $item.get(0)
|
|
48
|
+
if (!el || el.__aboutMark) return
|
|
49
|
+
el.__aboutMark = true
|
|
50
|
+
if (getComputedStyle(el).position === 'static') el.style.position = 'relative'
|
|
51
|
+
const add = () => {
|
|
52
|
+
if (el.querySelector(':scope > .rcn-about')) return
|
|
53
|
+
const a = document.createElement('a')
|
|
54
|
+
a.className = 'rcn-about'
|
|
55
|
+
a.href = '/view/about-' + type + '-plugin'
|
|
56
|
+
a.title = 'About this plugin'
|
|
57
|
+
a.textContent = 'ⓘ'
|
|
58
|
+
a.style.cssText = 'position:absolute;top:0;right:-18px;z-index:1000;font:15px/1 system-ui,sans-serif;color:#64748b;text-decoration:none;cursor:pointer;background:rgba(255,255,255,.75);border-radius:50%;padding:1px 2px'
|
|
59
|
+
a.addEventListener('click', e => {
|
|
60
|
+
e.preventDefault()
|
|
61
|
+
e.stopPropagation()
|
|
62
|
+
wiki.doInternalLink('about ' + type + ' plugin', $item.parents('.page:first'))
|
|
63
|
+
})
|
|
64
|
+
a.addEventListener('dblclick', e => e.stopPropagation())
|
|
65
|
+
el.appendChild(a)
|
|
66
|
+
}
|
|
67
|
+
add()
|
|
68
|
+
new MutationObserver(add).observe(el, { childList: true })
|
|
69
|
+
}
|
|
70
|
+
|
|
37
71
|
function bind($item, item) {
|
|
72
|
+
aboutMark($item, 'rcngraph')
|
|
38
73
|
$item.on('click', '.open-graph, .edit-graph', () => {
|
|
39
74
|
pendingItem = item
|
|
40
75
|
pending$item = $item
|
package/client/rcngraph.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
(function () {
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// Farm sites are alice.localhost, scp-experiment.localhost, … so match the suffix,
|
|
4
|
+
// not the bare hostname. Local wikis get the working copy off the sofi-proxy static
|
|
5
|
+
// server; everything else gets the deployed asset.
|
|
6
|
+
const LOCAL = /(^|\.)localhost$/.test(window.location.hostname)
|
|
7
|
+
const GRAPH_URL = LOCAL
|
|
8
|
+
? 'http://localhost:8765/tools/graph-tool-v22.html'
|
|
9
|
+
: 'https://marc.relocalizecreativity.net/assets/Drag/graph-tool-v22.html'
|
|
4
10
|
const WINDOW_NAME = 'rcngraph'
|
|
5
11
|
|
|
6
12
|
// Track which item/element opened the current popup
|
|
@@ -24,7 +30,7 @@
|
|
|
24
30
|
$item.append(`
|
|
25
31
|
<div style="background-color:#eee;padding:15px;text-align:center;">
|
|
26
32
|
<p style="font-weight:bold;margin:0 0 6px;">RCN Graph Tool</p>
|
|
27
|
-
<p style="color:#666;font-size:0.85em;margin:0 0 12px;">CLD · EIP · OPM ·
|
|
33
|
+
<p style="color:#666;font-size:0.85em;margin:0 0 12px;">CLD · EIP · NRM · Trace · Wardley · OPM · SFD · LOP · VSM</p>
|
|
28
34
|
<button class="open-graph" style="cursor:pointer;">Open Graph Tool ↗</button>
|
|
29
35
|
</div>
|
|
30
36
|
`)
|
|
@@ -35,7 +41,37 @@
|
|
|
35
41
|
renderContent($item, item)
|
|
36
42
|
}
|
|
37
43
|
|
|
44
|
+
|
|
45
|
+
// ⓘ — this plugin's About page in one click. FedWiki opens it with Cmd/Ctrl-I,
|
|
46
|
+
// but only from the item's text editor, which people seldom open when the real
|
|
47
|
+
// work happens elsewhere. Redraws empty the item, so the mark puts itself back.
|
|
48
|
+
function aboutMark ($item, type) {
|
|
49
|
+
const el = $item.get(0)
|
|
50
|
+
if (!el || el.__aboutMark) return
|
|
51
|
+
el.__aboutMark = true
|
|
52
|
+
if (getComputedStyle(el).position === 'static') el.style.position = 'relative'
|
|
53
|
+
const add = () => {
|
|
54
|
+
if (el.querySelector(':scope > .rcn-about')) return
|
|
55
|
+
const a = document.createElement('a')
|
|
56
|
+
a.className = 'rcn-about'
|
|
57
|
+
a.href = '/view/about-' + type + '-plugin'
|
|
58
|
+
a.title = 'About this plugin'
|
|
59
|
+
a.textContent = 'ⓘ'
|
|
60
|
+
a.style.cssText = 'position:absolute;top:0;right:-18px;z-index:1000;font:15px/1 system-ui,sans-serif;color:#64748b;text-decoration:none;cursor:pointer;background:rgba(255,255,255,.75);border-radius:50%;padding:1px 2px'
|
|
61
|
+
a.addEventListener('click', e => {
|
|
62
|
+
e.preventDefault()
|
|
63
|
+
e.stopPropagation()
|
|
64
|
+
wiki.doInternalLink('about ' + type + ' plugin', $item.parents('.page:first'))
|
|
65
|
+
})
|
|
66
|
+
a.addEventListener('dblclick', e => e.stopPropagation())
|
|
67
|
+
el.appendChild(a)
|
|
68
|
+
}
|
|
69
|
+
add()
|
|
70
|
+
new MutationObserver(add).observe(el, { childList: true })
|
|
71
|
+
}
|
|
72
|
+
|
|
38
73
|
function bind($item, item) {
|
|
74
|
+
aboutMark($item, 'rcngraph')
|
|
39
75
|
$item.on('click', '.open-graph, .edit-graph', () => {
|
|
40
76
|
pendingItem = item
|
|
41
77
|
pending$item = $item
|
package/package.json
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wiki-plugin-rcngraph",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Federated Wiki - RCN Graph Plug-in",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"wiki",
|
|
7
|
+
"federated wiki",
|
|
8
|
+
"plugin",
|
|
9
|
+
"rcn",
|
|
10
|
+
"graph"
|
|
11
|
+
],
|
|
6
12
|
"author": "RCN Network <rcn@relocalizecreativity.net>",
|
|
7
13
|
"license": "MIT",
|
|
8
|
-
"repository": {
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/marpie1/wiki-plugin-rcngraph.git"
|
|
17
|
+
},
|
|
9
18
|
"main": "index.js",
|
|
10
|
-
"files": [
|
|
19
|
+
"files": [
|
|
20
|
+
"client/rcngraph.js",
|
|
21
|
+
"client/rcn-graph.js",
|
|
22
|
+
"factory.json",
|
|
23
|
+
"index.js",
|
|
24
|
+
"pages"
|
|
25
|
+
]
|
|
11
26
|
}
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
{
|
|
10
10
|
"type": "paragraph",
|
|
11
11
|
"id": "2e7c9f04a3b8d651",
|
|
12
|
-
"text": "Create an item using the factory. Click Open Graph Tool to open the tool. Use -> Item to save the diagram as an SVG preview back into the wiki item. Use -> Wiki to send the diagram to the lineup as a ghost page
|
|
12
|
+
"text": "Create an item using the factory. Click Open Graph Tool to open the tool. Use -> Item to save the diagram as an SVG preview back into the wiki item \u2014 node labels in that preview are clickable internal wiki links, and the graph JSON rides along so Edit in Graph Tool reopens the real model. Use -> Wiki to send the diagram to the lineup as a ghost page. Both follow Ward Cunningham's Enrich Any SVG pattern."
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "paragraph",
|
|
16
16
|
"id": "c1d2e3f4a5b60001",
|
|
17
|
-
"text": "Diagram types
|
|
17
|
+
"text": "Diagram types \u2014 CLD (Causal Loop): map feedback loops and system dynamics. EIP (Enriched Influence Pattern): influence networks with stakeholders, flows, and interventions. NRM (Neighbourhood Risk Management): incident and risk analysis on the Tripod Beta pattern. Trace: follow a path through an existing graph. Wardley: Wardley mapping on an evolution/visibility canvas. OPM (Object-Process Methodology): system structure and process using Dov Dori's ISO 19450 standard, with OPL sentences and Cypher export. SFD (Stock and Flow): stocks, valves, auxiliaries and clouds in the Stella idiom, with XMILE export. LOP (Linkage of Processes): the Deming / API organization-as-a-system map. VSM (Value Stream Mapping): Cindy Jimmerson's healthcare value stream \u2014 four flows in lanes, storm bursts, and a computed sawtooth giving lead time, value-added time and the ratio between them, with a one-click handoff that seeds an A3. Triples: nodes and edges can link to other edges, enabling RDF-style triple referencing for knowledge graph authoring."
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"type": "paragraph",
|
|
21
21
|
"id": "d2e3f4a5b6c70002",
|
|
22
|
-
"text": "Import and export: MDL/Vensim CLD, Graphviz .dot, XMILE, Cypher, Wardley JSON, and CSV. Multi-trace edges, node and edge layers, canvas legend, and Print are available in all modes."
|
|
22
|
+
"text": "Import and export: MDL/Vensim CLD, Graphviz .dot, XMILE, Cypher, Wardley JSON, and CSV. A model can also be opened straight from a URL with ?url=, including an RCN Substrate subgraph projection. Multi-trace edges, node and edge layers, canvas legend, and Print are available in all modes. A mode\u2019s backdrop \u2014 EIP columns, Wardley grid, LOP bands, VSM lanes and sawtooth \u2014 is drawn inside the SVG, so it travels into the wiki item and out again; save while still in that mode, because the backdrop only draws there."
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"type": "rcngraph",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
{
|
|
30
30
|
"type": "paragraph",
|
|
31
31
|
"id": "4b6f8e3d9c2a1705",
|
|
32
|
-
"text": "Developed by Marc Pierson with Claude Sonnet 4.6 (Anthropic) for the ReLocalize Creativity Network. Source: [
|
|
32
|
+
"text": "Developed by Marc Pierson with Claude Sonnet 4.6 (Anthropic) for the ReLocalize Creativity Network. Source: [https://github.com/marpie1/wiki-plugin-rcngraph GitHub]. Published on npm as wiki-plugin-rcngraph."
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
35
|
"journal": [
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"item": {
|
|
58
58
|
"type": "paragraph",
|
|
59
59
|
"id": "2e7c9f04a3b8d651",
|
|
60
|
-
"text": "Create an item using the factory. Click Open Graph Tool to open the tool. Use -> Item to save the diagram as an SVG preview back into the wiki item. Use -> Wiki to send the diagram to the lineup as a ghost page
|
|
60
|
+
"text": "Create an item using the factory. Click Open Graph Tool to open the tool. Use -> Item to save the diagram as an SVG preview back into the wiki item \u2014 node labels in that preview are clickable internal wiki links, and the graph JSON rides along so Edit in Graph Tool reopens the real model. Use -> Wiki to send the diagram to the lineup as a ghost page. Both follow Ward Cunningham's Enrich Any SVG pattern."
|
|
61
61
|
},
|
|
62
62
|
"date": 1782864002000
|
|
63
63
|
},
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"item": {
|
|
69
69
|
"type": "paragraph",
|
|
70
70
|
"id": "c1d2e3f4a5b60001",
|
|
71
|
-
"text": "Diagram types
|
|
71
|
+
"text": "Diagram types \u2014 CLD (Causal Loop): map feedback loops and system dynamics. EIP (Enriched Influence Pattern): influence networks with stakeholders, flows, and interventions. NRM (Neighbourhood Risk Management): incident and risk analysis on the Tripod Beta pattern. Trace: follow a path through an existing graph. Wardley: Wardley mapping on an evolution/visibility canvas. OPM (Object-Process Methodology): system structure and process using Dov Dori's ISO 19450 standard, with OPL sentences and Cypher export. SFD (Stock and Flow): stocks, valves, auxiliaries and clouds in the Stella idiom, with XMILE export. LOP (Linkage of Processes): the Deming / API organization-as-a-system map. Triples: nodes and edges can link to other edges, enabling RDF-style triple referencing for knowledge graph authoring."
|
|
72
72
|
},
|
|
73
73
|
"date": 1782864003000
|
|
74
74
|
},
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"item": {
|
|
80
80
|
"type": "paragraph",
|
|
81
81
|
"id": "d2e3f4a5b6c70002",
|
|
82
|
-
"text": "Import and export: MDL/Vensim CLD, Graphviz .dot, XMILE, Cypher, Wardley JSON, and CSV. Multi-trace edges, node and edge layers, canvas legend, and Print are available in all modes."
|
|
82
|
+
"text": "Import and export: MDL/Vensim CLD, Graphviz .dot, XMILE, Cypher, Wardley JSON, and CSV. A model can also be opened straight from a URL with ?url=, including an RCN Substrate subgraph projection. Multi-trace edges, node and edge layers, canvas legend, and Print are available in all modes."
|
|
83
83
|
},
|
|
84
84
|
"date": 1782864004000
|
|
85
85
|
},
|
|
@@ -104,6 +104,36 @@
|
|
|
104
104
|
"text": "Developed by Marc Pierson with Claude Sonnet 4.6 (Anthropic) for the ReLocalize Creativity Network. Source: [[https://github.com/marpie1/wiki-plugin-rcngraph]]. Published on npm as wiki-plugin-rcngraph."
|
|
105
105
|
},
|
|
106
106
|
"date": 1782864006000
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "edit",
|
|
110
|
+
"id": "c1d2e3f4a5b60001",
|
|
111
|
+
"item": {
|
|
112
|
+
"type": "paragraph",
|
|
113
|
+
"id": "c1d2e3f4a5b60001",
|
|
114
|
+
"text": "Diagram types \u2014 CLD (Causal Loop): map feedback loops and system dynamics. EIP (Enriched Influence Pattern): influence networks with stakeholders, flows, and interventions. NRM (Neighbourhood Risk Management): incident and risk analysis on the Tripod Beta pattern. Trace: follow a path through an existing graph. Wardley: Wardley mapping on an evolution/visibility canvas. OPM (Object-Process Methodology): system structure and process using Dov Dori's ISO 19450 standard, with OPL sentences and Cypher export. SFD (Stock and Flow): stocks, valves, auxiliaries and clouds in the Stella idiom, with XMILE export. LOP (Linkage of Processes): the Deming / API organization-as-a-system map. VSM (Value Stream Mapping): Cindy Jimmerson's healthcare value stream \u2014 four flows in lanes, storm bursts, and a computed sawtooth giving lead time, value-added time and the ratio between them, with a one-click handoff that seeds an A3. Triples: nodes and edges can link to other edges, enabling RDF-style triple referencing for knowledge graph authoring."
|
|
115
|
+
},
|
|
116
|
+
"date": 1787712127315
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "edit",
|
|
120
|
+
"id": "d2e3f4a5b6c70002",
|
|
121
|
+
"item": {
|
|
122
|
+
"type": "paragraph",
|
|
123
|
+
"id": "d2e3f4a5b6c70002",
|
|
124
|
+
"text": "Import and export: MDL/Vensim CLD, Graphviz .dot, XMILE, Cypher, Wardley JSON, and CSV. A model can also be opened straight from a URL with ?url=, including an RCN Substrate subgraph projection. Multi-trace edges, node and edge layers, canvas legend, and Print are available in all modes. A mode\u2019s backdrop \u2014 EIP columns, Wardley grid, LOP bands, VSM lanes and sawtooth \u2014 is drawn inside the SVG, so it travels into the wiki item and out again; save while still in that mode, because the backdrop only draws there."
|
|
125
|
+
},
|
|
126
|
+
"date": 1787712128315
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "edit",
|
|
130
|
+
"id": "4b6f8e3d9c2a1705",
|
|
131
|
+
"item": {
|
|
132
|
+
"type": "paragraph",
|
|
133
|
+
"id": "4b6f8e3d9c2a1705",
|
|
134
|
+
"text": "Developed by Marc Pierson with Claude Sonnet 4.6 (Anthropic) for the ReLocalize Creativity Network. Source: [https://github.com/marpie1/wiki-plugin-rcngraph GitHub]. Published on npm as wiki-plugin-rcngraph."
|
|
135
|
+
},
|
|
136
|
+
"date": 1791164815533
|
|
107
137
|
}
|
|
108
138
|
]
|
|
109
|
-
}
|
|
139
|
+
}
|