@zakkzhang/tw5-graph 1.6.4
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 +65 -0
- package/package.json +39 -0
- package/plugins/graph/DefaultColourMappings.multids +8 -0
- package/plugins/graph/ViewTemplateBodyFilter/graph.tid +5 -0
- package/plugins/graph/ViewTemplateBodyFilter/properties.tid +5 -0
- package/plugins/graph/edges/fields/list.tid +7 -0
- package/plugins/graph/edges/fields/tags.tid +7 -0
- package/plugins/graph/edges/functions/links.tid +8 -0
- package/plugins/graph/edges/functions/transcludes.tid +8 -0
- package/plugins/graph/fieldtypes/filter.js +212 -0
- package/plugins/graph/fieldtypes/list.js +31 -0
- package/plugins/graph/fieldtypes/title.js +27 -0
- package/plugins/graph/filterrunprefixes/cache.js +118 -0
- package/plugins/graph/filters/gettyped.js +26 -0
- package/plugins/graph/graphengine.js +38 -0
- package/plugins/graph/icon.tid +16 -0
- package/plugins/graph/images/drag.tid +13 -0
- package/plugins/graph/macros/action.addedge.tid +16 -0
- package/plugins/graph/macros/edges.typed.tid +54 -0
- package/plugins/graph/macros/graph.view.tid +24 -0
- package/plugins/graph/macros/node.default.tid +9 -0
- package/plugins/graph/macros/nodes.neighbors.tid +62 -0
- package/plugins/graph/macros/nodes.writable.tid +37 -0
- package/plugins/graph/macros/properties.persistent.tid +27 -0
- package/plugins/graph/macros/properties.popup.tid +76 -0
- package/plugins/graph/macros/properties.river.tid +27 -0
- package/plugins/graph/macros/properties.settings.tid +56 -0
- package/plugins/graph/macros/properties.stack.tid +17 -0
- package/plugins/graph/macros/tiddlywiki.files +17 -0
- package/plugins/graph/plugin.info +14 -0
- package/plugins/graph/presettypes/edges/fields.tid +18 -0
- package/plugins/graph/presettypes/edges/functions.tid +5 -0
- package/plugins/graph/presettypes/nodes/stack.tid +6 -0
- package/plugins/graph/propertytypes/actions.js +15 -0
- package/plugins/graph/propertytypes/boolean.js +23 -0
- package/plugins/graph/propertytypes/enum.js +25 -0
- package/plugins/graph/propertytypes/image.js +140 -0
- package/plugins/graph/propertytypes/number.js +24 -0
- package/plugins/graph/propertytypes/string.js +13 -0
- package/plugins/graph/propertytypes/tiddlywiki.files +17 -0
- package/plugins/graph/readme.tid +5 -0
- package/plugins/graph/relink/attributes.js +52 -0
- package/plugins/graph/relink/attributes.multids +19 -0
- package/plugins/graph/relink/configprefix.js +76 -0
- package/plugins/graph/relink/fieldedgeprefix.js +39 -0
- package/plugins/graph/relink/fields.multids +11 -0
- package/plugins/graph/relink/graphprefix.js +28 -0
- package/plugins/graph/relink/operators.multids +3 -0
- package/plugins/graph/relink/propertyfields.js +81 -0
- package/plugins/graph/relink/utils.js +99 -0
- package/plugins/graph/settings.tid +13 -0
- package/plugins/graph/startup/messages.js +46 -0
- package/plugins/graph/stylesheets/base.css.tid +263 -0
- package/plugins/graph/stylesheets/fullscreen/core.css +11 -0
- package/plugins/graph/stylesheets/fullscreen/core.css.meta +3 -0
- package/plugins/graph/stylesheets/fullscreen.css.tid +46 -0
- package/plugins/graph/stylesheets/popup.css.tid +107 -0
- package/plugins/graph/subfilters.tid +23 -0
- package/plugins/graph/tags/GraphToolbar.tid +2 -0
- package/plugins/graph/tags/SettingsTab.tid +2 -0
- package/plugins/graph/tags/Template.tid +2 -0
- package/plugins/graph/tags/ViewEditTemplate.tid +2 -0
- package/plugins/graph/templates/live-graph.tid +34 -0
- package/plugins/graph/templates/standard-graph.tid +40 -0
- package/plugins/graph/ui/Buttons/center.tid +38 -0
- package/plugins/graph/ui/Buttons/export.tid +65 -0
- package/plugins/graph/ui/Buttons/fullscreen.tid +35 -0
- package/plugins/graph/ui/Buttons/settings.tid +28 -0
- package/plugins/graph/ui/Buttons/tiddlywiki.files +16 -0
- package/plugins/graph/ui/EditTemplate/Edges.tid +22 -0
- package/plugins/graph/ui/EditTemplate/Neighbors.tid +35 -0
- package/plugins/graph/ui/EditTemplate/Nodes.tid +12 -0
- package/plugins/graph/ui/EditTemplate/Popups.tid +27 -0
- package/plugins/graph/ui/EditTemplate/Properties.tid +21 -0
- package/plugins/graph/ui/EditTemplate/tiddlywiki.files +16 -0
- package/plugins/graph/ui/Modals/NewPropertySet.tid +20 -0
- package/plugins/graph/ui/Modals/NewView.tid +20 -0
- package/plugins/graph/ui/Modals/Select.tid +72 -0
- package/plugins/graph/ui/Modals/SelectField.tid +21 -0
- package/plugins/graph/ui/Modals/SelectTiddler.tid +15 -0
- package/plugins/graph/ui/Modals/Tiddler.tid +22 -0
- package/plugins/graph/ui/Modals/TiddlerHeader.tid +15 -0
- package/plugins/graph/ui/PropertyTypes/boolean.tid +11 -0
- package/plugins/graph/ui/PropertyTypes/color.tid +5 -0
- package/plugins/graph/ui/PropertyTypes/enum.tid +15 -0
- package/plugins/graph/ui/PropertyTypes/number.tid +17 -0
- package/plugins/graph/ui/Settings/Engine.tid +23 -0
- package/plugins/graph/ui/Settings/Graphs/EditTemplate.tid +52 -0
- package/plugins/graph/ui/Settings/Graphs.tid +49 -0
- package/plugins/graph/ui/Settings/Properties/ObjectsTypeTemplate.tid +44 -0
- package/plugins/graph/ui/Settings/Properties.tid +14 -0
- package/plugins/graph/ui/Settings/Toolbar.tid +5 -0
- package/plugins/graph/ui/SideBar/Graph.tid +77 -0
- package/plugins/graph/ui/Toolbars/GraphToolbar.tid +15 -0
- package/plugins/graph/ui/ViewTemplate/graph-object.tid +13 -0
- package/plugins/graph/ui/ViewTemplate/graph.tid +11 -0
- package/plugins/graph/ui/ViewTemplate/properties.tid +80 -0
- package/plugins/graph/ui/grouped-tabs.tid +109 -0
- package/plugins/graph/ui/selector.tid +74 -0
- package/plugins/graph/utils.js +148 -0
- package/plugins/graph/widgets/action-delay.js +72 -0
- package/plugins/graph/widgets/action-modal.js +121 -0
- package/plugins/graph/widgets/action-typed.js +56 -0
- package/plugins/graph/widgets/action-with.js +70 -0
- package/plugins/graph/widgets/boundingbox.js +126 -0
- package/plugins/graph/widgets/fieldTranscriber.js +98 -0
- package/plugins/graph/widgets/fieldtranscriber/filter.js +93 -0
- package/plugins/graph/widgets/fieldtranscriber/json.js +34 -0
- package/plugins/graph/widgets/fieldtranscriber/plain.js +11 -0
- package/plugins/graph/widgets/graphobject.js +120 -0
- package/plugins/graph/widgets/messagerelay.js +115 -0
- package/plugins/graph/widgets/properties.js +131 -0
- package/plugins/graph/widgets/subclass/edge.js +47 -0
- package/plugins/graph/widgets/subclass/graph.js +424 -0
- package/plugins/graph/widgets/subclass/node.js +44 -0
- package/plugins/graph/widgets/tiddlywiki.files +43 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/stylesheets/base.css
|
|
2
|
+
tags: $:/tags/Stylesheet
|
|
3
|
+
|
|
4
|
+
\define sidebarbreakpoint()
|
|
5
|
+
<$text text={{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}/>
|
|
6
|
+
\end
|
|
7
|
+
|
|
8
|
+
\rules only macrocallinline
|
|
9
|
+
.graph-canvas {
|
|
10
|
+
position: relative;
|
|
11
|
+
border-style: solid;
|
|
12
|
+
border-width: 1px;
|
|
13
|
+
border-color: <<colour graph-border>>;
|
|
14
|
+
background-color: <<colour graph-background>>;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.boundingbox {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.boundingbox > .graph-canvas {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 0%;
|
|
26
|
+
flex-grow: 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/*** Basic graph overlay options ***/
|
|
30
|
+
|
|
31
|
+
.graph-overlay {
|
|
32
|
+
position: absolute;
|
|
33
|
+
bottom: 0px;
|
|
34
|
+
left: 0px;
|
|
35
|
+
margin: 0px;
|
|
36
|
+
background: transparent;
|
|
37
|
+
border-width: 0px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/*** Error-state graphs ***/
|
|
41
|
+
|
|
42
|
+
.graph-canvas.graph-error {
|
|
43
|
+
align-content: center;
|
|
44
|
+
text-align: center;
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
color: <<colour alert-highlight>>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.graph-canvas.graph-error span {
|
|
50
|
+
display: inline-block;
|
|
51
|
+
max-width: 80%;
|
|
52
|
+
background: <<colour alert-background>>;
|
|
53
|
+
padding: 1em;
|
|
54
|
+
border: medium solid <<colour alert-border>>;
|
|
55
|
+
border-radius: 1em;
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/*** SideBar ***/
|
|
60
|
+
|
|
61
|
+
.tc-sidebar-scrollable .graph-sidebar-disabled {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.tc-sidebar-scrollable .graph-sidebar-enabled {
|
|
66
|
+
position: absolute;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.graph-sidebar-banner {
|
|
70
|
+
background: <<colour graph-banner-background>>;
|
|
71
|
+
color: <<colour graph-banner-foreground>>;
|
|
72
|
+
padding: 4px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.graph-sidebar-banner select, .graph-sidebar-banner button {
|
|
76
|
+
height: 28px;
|
|
77
|
+
min-width: 28px;
|
|
78
|
+
margin-left: 3px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media (max-width: <<sidebarbreakpoint>>) {
|
|
82
|
+
.tc-sidebar-scrollable .graph-sidebar-enabled {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.tc-sidebar-scrollable .graph-sidebar-disabled {
|
|
87
|
+
display: flex;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.tc-sidebar-scrollable .graph-sidebar-disabled button {
|
|
91
|
+
margin: auto;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.tc-sidebar-scrollable .graph-sidebar-disabled button svg {
|
|
95
|
+
width: 2em;
|
|
96
|
+
height: 2em;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/*** Sidebar Center button ***/
|
|
101
|
+
|
|
102
|
+
.graph-center-button-dropdown {
|
|
103
|
+
padding-left: 6px;
|
|
104
|
+
padding-right: 6px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.graph-center-button-dropdown input {
|
|
108
|
+
width: 100%;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/*** Engine toggle buttons ***/
|
|
112
|
+
|
|
113
|
+
.graph-engine-button-list {
|
|
114
|
+
display: flex;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.graph-engine-button {
|
|
119
|
+
margin: 1em;
|
|
120
|
+
width: 7em;
|
|
121
|
+
height: 124px;
|
|
122
|
+
border-radius: 1em;
|
|
123
|
+
vertical-align: top;
|
|
124
|
+
font-weight: bold;
|
|
125
|
+
text-align: center;
|
|
126
|
+
background-color: <<colour background>>;
|
|
127
|
+
border-color: <<colour table-footer-background>>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.graph-engine-button .graph-icon {
|
|
131
|
+
height: 6em;
|
|
132
|
+
margin-bottom: 4px;
|
|
133
|
+
align-content: center;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.graph-engine-button.active {
|
|
137
|
+
background-color: <<colour table-header-background>>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.graph-engine-button:hover {
|
|
141
|
+
background-color: <<colour table-header-background>>;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/*** grouped-tabs ***/
|
|
145
|
+
|
|
146
|
+
.group-tab-header {
|
|
147
|
+
font-weight: bold;
|
|
148
|
+
margin-right: 0.0em;
|
|
149
|
+
margin-top: 1em;
|
|
150
|
+
border: 1px solid <<color tab-border>>;
|
|
151
|
+
padding: 3px 5px 0px 5px;
|
|
152
|
+
border-top-left-radius: 1em;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.tc-tab-buttons.tc-vertical button.group-tab-button {
|
|
156
|
+
display: flex;
|
|
157
|
+
padding-left: 0px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
button.group-tab-button > svg {
|
|
161
|
+
margin-top: auto;
|
|
162
|
+
margin-bottom: auto;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
button.group-tab-button > span {
|
|
166
|
+
margin-left: 5px;
|
|
167
|
+
flex-grow: 1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.tc-tab-buttons.tc-vertical button.group-tab-new {
|
|
171
|
+
border-bottom-left-radius: 1em;
|
|
172
|
+
border-bottom-right-radius: 1em;
|
|
173
|
+
border-right: 1px solid <<color tab-border>>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
button.group-tab-new svg {
|
|
177
|
+
display: block;
|
|
178
|
+
margin-left: auto;
|
|
179
|
+
margin-right: auto;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/*** Settings: Graphs ***/
|
|
183
|
+
|
|
184
|
+
.graph-tiddlers-edgelist {
|
|
185
|
+
color: <<colour muted-foreground>>;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.graph-tiddlers-edgelist .active {
|
|
189
|
+
color: <<colour foreground>>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/*** GraphTiddler Edit-template ***/
|
|
193
|
+
|
|
194
|
+
.graph-tiddler-edit-template {
|
|
195
|
+
border-top: 1px solid <<colour blockquote-bar>>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.graph-tiddler-edit-template table,
|
|
199
|
+
.graph-tiddler-edit-template table textarea,
|
|
200
|
+
.graph-tiddler-edit-template table input {
|
|
201
|
+
width: 100%;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/*** Graph Property Table ***/
|
|
205
|
+
|
|
206
|
+
table.graph-property {
|
|
207
|
+
width: 100%;
|
|
208
|
+
padding: 3px;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
table .graph-property-input {
|
|
212
|
+
min-width: 8em;
|
|
213
|
+
border-right-width: 0px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
table .graph-property-remove {
|
|
217
|
+
width: 2em;
|
|
218
|
+
border-left-width: 0px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/*** Graph Property Table Types ***/
|
|
222
|
+
|
|
223
|
+
table.graph-property input {
|
|
224
|
+
width: 100%;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
table.graph-property td {
|
|
228
|
+
padding: 4px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.graph-property-input-color input[type='color'] {
|
|
232
|
+
height: 24px;
|
|
233
|
+
width: 100%;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
table.graph-property .graph-property-input-number {
|
|
237
|
+
display: flex;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
table.graph-property .graph-property-input-number input {
|
|
241
|
+
flex-grow: 1;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
table.graph-property .graph-property-input-number span {
|
|
245
|
+
margin-left: 5px;
|
|
246
|
+
min-width: 2em;
|
|
247
|
+
vertical-align: top;
|
|
248
|
+
font-weight: lighter;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/*** Graph icon ***/
|
|
252
|
+
|
|
253
|
+
.graph-icon-node {
|
|
254
|
+
fill: <<colour graph-node-color>> !important;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
a.tc-tiddlylink.tc-plugin-info:hover .graph-icon-splash {
|
|
258
|
+
fill: <<colour background>> !important;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
a.tc-tiddlylink.tc-plugin-info:hover .graph-icon-node {
|
|
262
|
+
fill: <<colour muted-foreground>> !important;
|
|
263
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* CSS tweaks for core elements when fullscreen is active.
|
|
2
|
+
Make your own tiddler with $:/tags/flibbles/graph/FullscreenStylesheet
|
|
3
|
+
to add your own tweaks. */
|
|
4
|
+
|
|
5
|
+
.tc-topbar, .tc-story-river, .tc-sidebar-scrollable .graph-sidebar-disabled {
|
|
6
|
+
display: none !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tc-dropzone > p {
|
|
10
|
+
margin: 0px;
|
|
11
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/stylesheets/fullscreen.css
|
|
2
|
+
tags: $:/tags/Stylesheet
|
|
3
|
+
|
|
4
|
+
<!--
|
|
5
|
+
If you need to tweak css for whenever fullscreen mode is active,
|
|
6
|
+
create a tiddler with the $:/tags/flibbles/graph/FullscreenStylesheet
|
|
7
|
+
tag rather than trying to test against the fullscreen state tiddler.
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
.graph-sidebar-enabled.graph-fullscreen {
|
|
11
|
+
display: flex !important;
|
|
12
|
+
position: fixed !important;
|
|
13
|
+
height: 100% !important;
|
|
14
|
+
width: 100% !important;
|
|
15
|
+
top: 0 !important;
|
|
16
|
+
left: 0 !important;
|
|
17
|
+
// This puts us one below the modal at 900, which should still overlap fullscreen.
|
|
18
|
+
z-index: 899 !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.graph-modal-tiddler .tc-tiddler-frame {
|
|
22
|
+
margin-bottom: .5em;
|
|
23
|
+
padding: 14px;
|
|
24
|
+
padding-top: 0px;
|
|
25
|
+
width: inherit;
|
|
26
|
+
box-shadow: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.graph-modal-tiddler-breadcrumbs {
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
min-height: 2em;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.graph-modal-tiddler-breadcrumbs svg {
|
|
36
|
+
fill: <<colour foreground>>;
|
|
37
|
+
vertical-align: middle;
|
|
38
|
+
margin-left: 4px;
|
|
39
|
+
padding: 2px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
<%if [[$:/state/flibbles/graph/fullscreen]is[tiddler]] %>
|
|
43
|
+
|
|
44
|
+
<$list filter="[all[shadows+tiddlers]tag[$:/tags/flibbles/graph/FullscreenStylesheet]!is[draft]]">
|
|
45
|
+
<$transclude mode="block"/>
|
|
46
|
+
</$list><%endif%>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/stylesheets/popup.css
|
|
2
|
+
tags: $:/tags/Stylesheet
|
|
3
|
+
|
|
4
|
+
.graph-popup {
|
|
5
|
+
position: absolute;
|
|
6
|
+
z-index: 1000;
|
|
7
|
+
border: 1px solid <<colour dropdown-border>>;
|
|
8
|
+
color: <<colour foreground>>;
|
|
9
|
+
fill: <<colour foreground>>;
|
|
10
|
+
background-color: <<colour dropdown-background>>;
|
|
11
|
+
padding: 7px;
|
|
12
|
+
margin: 4px 0 0 0;
|
|
13
|
+
text-shadow: none;
|
|
14
|
+
line-height: 1.4;
|
|
15
|
+
overflow: scroll;
|
|
16
|
+
overscroll-behavior: contain;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.graph-popup .tc-drop-down {
|
|
20
|
+
margin-left: 14px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.graph-popup button svg, .graph-popup a svg {
|
|
24
|
+
fill: <<colour foreground>>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.graph-popup button:disabled svg {
|
|
28
|
+
fill: <<colour muted-foreground>>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.graph-popup button.tc-btn-invisible:hover svg {
|
|
32
|
+
fill: <<colour background>>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.graph-popup .tc-drop-down-info {
|
|
36
|
+
padding-left: 14px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.graph-popup p {
|
|
40
|
+
padding: 0 7px 0 7px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.graph-popup a.tc-tiddlylink {
|
|
44
|
+
color: <<colour tiddler-link-foreground>>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.graph-popup svg {
|
|
48
|
+
width: 1em;
|
|
49
|
+
height: 1em;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.graph-popup img {
|
|
53
|
+
width: 1em;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.graph-popup .tc-tab-set .tc-tab-buttons button {
|
|
57
|
+
display: inline-block;
|
|
58
|
+
width: auto;
|
|
59
|
+
margin-bottom: 0px;
|
|
60
|
+
border-bottom-left-radius: 0;
|
|
61
|
+
border-bottom-right-radius: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.graph-popup .tc-prompt {
|
|
65
|
+
padding: 0 14px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.graph-popup .tc-chooser {
|
|
69
|
+
border: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.graph-popup .tc-chooser .tc-swatches-horiz {
|
|
73
|
+
font-size: 0.4em;
|
|
74
|
+
padding-left: 1.2em;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.graph-popup .tc-file-input-wrapper {
|
|
78
|
+
width: 100%;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.graph-popup .tc-file-input-wrapper button {
|
|
82
|
+
color: <<colour foreground>>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.graph-popup a:hover, .graph-popup button:hover, .graph-popup .tc-file-input-wrapper:hover button {
|
|
86
|
+
color: <<colour tiddler-link-background>>;
|
|
87
|
+
background-color: <<colour tiddler-link-foreground>>;
|
|
88
|
+
text-decoration: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.graph-popup .tc-tab-buttons button {
|
|
92
|
+
background-color: <<colour dropdown-tab-background>>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.graph-popup .tc-tab-buttons button.tc-tab-selected {
|
|
96
|
+
background-color: <<colour dropdown-tab-background-selected>>;
|
|
97
|
+
border-bottom: 1px solid <<colour dropdown-tab-background-selected>>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.graph-popup .tc-drop-down-bullet {
|
|
101
|
+
display: inline-block;
|
|
102
|
+
width: 0.5em;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.graph-popup .tc-tab-contents a {
|
|
106
|
+
padding: 0 0.5em 0 0.5em;
|
|
107
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/subfilters
|
|
2
|
+
type: application/x-tiddler-dictionary
|
|
3
|
+
|
|
4
|
+
# This tiddler contains a series of commonly used filters used by TW5-Graph. Putting them together in one dataTiddler like this helps optimize the :cache mechanism so this information only needs to be sought once. And it reduces repetition.
|
|
5
|
+
|
|
6
|
+
# Do not override this tiddler
|
|
7
|
+
|
|
8
|
+
edgetypes: :cache[all[shadows+tiddlers]removeprefix[$:/config/flibbles/graph/edges/]]
|
|
9
|
+
edgetypes.fields: :cache[subfilter{$:/plugins/flibbles/graph/subfilters##edgetypes}removeprefix[fields/]]
|
|
10
|
+
edgetypes.functions: :cache[subfilter{$:/plugins/flibbles/graph/subfilters##edgetypes}removeprefix[functions/]]
|
|
11
|
+
|
|
12
|
+
# This gets you the action context associated with a given graphObjectType, like "nodes" or "edges"
|
|
13
|
+
actioncontext: [all[]] :cache[subfilter{$:/plugins/flibbles/graph/subfilters##actioncontext.internal}]
|
|
14
|
+
actioncontext.internal: [[widget-subclass]modules[]] :filter[moduleproperty[graphObjectType]match<..currentTiddler>] +[moduleproperty[actionContext]jsonget[]]
|
|
15
|
+
|
|
16
|
+
# Returns the active engine in the current scope
|
|
17
|
+
engine: [[graphengine]modules[]] :filter[moduleproperty[name]match<graphengine>]
|
|
18
|
+
# Returns a list of available engine modules sorted by name
|
|
19
|
+
engine.list: [[graphengine]modules[]] :sort[all[current]moduleproperty[name]]
|
|
20
|
+
# This gets you the messages json of the currently active engine
|
|
21
|
+
messages: :cache[subfilter{$:/plugins/flibbles/graph/subfilters##engine}moduleproperty[messages]]
|
|
22
|
+
# This gets you the properties json of the currently active engine
|
|
23
|
+
properties: :cache[subfilter{$:/plugins/flibbles/graph/subfilters##engine}moduleproperty[properties]]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
caption: Live graph
|
|
2
|
+
title: $:/plugins/flibbles/graph/templates/live-graph
|
|
3
|
+
tags: $:/tags/flibbles/graph/Template
|
|
4
|
+
|
|
5
|
+
\whitespace trim
|
|
6
|
+
|
|
7
|
+
<!-- By having this unused "focusTiddler" value update when the nodes change,
|
|
8
|
+
we can enforce a refresh of the live-graph, rather than having it try
|
|
9
|
+
to update, which might result in a worse presentation for some engines. -->
|
|
10
|
+
|
|
11
|
+
<$set name="focusTiddler" filter="[subfilter{!!filter}]">
|
|
12
|
+
|
|
13
|
+
<$graph>
|
|
14
|
+
|
|
15
|
+
<$properties $for=nodes actions="<$action-navigate $to=<<nodeTiddler>> />" >
|
|
16
|
+
|
|
17
|
+
<$properties.settings>
|
|
18
|
+
|
|
19
|
+
<$properties physics=no>
|
|
20
|
+
|
|
21
|
+
<$slot $name=ts-raw $depth=5 />
|
|
22
|
+
|
|
23
|
+
<$list filter={{!!filter}} >
|
|
24
|
+
|
|
25
|
+
<$node.default />
|
|
26
|
+
|
|
27
|
+
<$edges.typed />
|
|
28
|
+
|
|
29
|
+
</$list>
|
|
30
|
+
</$properties>
|
|
31
|
+
</$properties.settings>
|
|
32
|
+
</$properties>
|
|
33
|
+
</$graph>
|
|
34
|
+
</$set>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
caption: Standard editable graph
|
|
2
|
+
title: $:/plugins/flibbles/graph/templates/standard-graph
|
|
3
|
+
tags: $:/tags/flibbles/graph/Template
|
|
4
|
+
|
|
5
|
+
\whitespace trim
|
|
6
|
+
|
|
7
|
+
<$graph>
|
|
8
|
+
|
|
9
|
+
<%if [{!!filter}is[blank]] %>
|
|
10
|
+
|
|
11
|
+
<$node $tiddler="$:/plugins/flibbles/graph/settings"
|
|
12
|
+
label="Click on me to configure this graph"
|
|
13
|
+
image="$:/core/images/options-button"
|
|
14
|
+
actions="\import $:/plugins/flibbles/graph/ui/Buttons/settings
|
|
15
|
+
<<settingsActions>>" />
|
|
16
|
+
|
|
17
|
+
<%endif%>
|
|
18
|
+
|
|
19
|
+
<$properties physics=yes actions="<$action-navigate $to=<<nodeTiddler>> />">
|
|
20
|
+
|
|
21
|
+
<$properties $filter="[all[]] :filter[<..currentTiddler>getindex{!!title}]" physics=no>
|
|
22
|
+
|
|
23
|
+
<$properties.persistent $dataTiddler=<<currentTiddler>> >
|
|
24
|
+
|
|
25
|
+
<$properties.settings>
|
|
26
|
+
|
|
27
|
+
<$slot $name=ts-raw $depth=6 />
|
|
28
|
+
|
|
29
|
+
<$nodes.writable $field=filter>
|
|
30
|
+
|
|
31
|
+
<$node.default/>
|
|
32
|
+
|
|
33
|
+
<$edges.typed $editable=yes />
|
|
34
|
+
|
|
35
|
+
</$nodes.writable>
|
|
36
|
+
</$properties.settings>
|
|
37
|
+
</$properties.persistent>
|
|
38
|
+
</$properties>
|
|
39
|
+
</$properties>
|
|
40
|
+
</$graph>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
description: Center on a graph node
|
|
2
|
+
caption: {{$:/core/images/advanced-search-button}} center node
|
|
3
|
+
first-search-filter: [subfilter{!!filter}search:title{$:/temp/graph/select}sort[title]limit[10]]
|
|
4
|
+
|
|
5
|
+
\whitespace trim
|
|
6
|
+
|
|
7
|
+
<%if [[graphengine]modules[]] :filter[moduleproperty[name]match<graphengine>] +[moduleproperty[messages]jsonextract[graph-center-node]] %>
|
|
8
|
+
<$vars state=<<qualify "$:/state/flibbles/graph/popup/center">> >
|
|
9
|
+
<$button
|
|
10
|
+
popup=<<state>>
|
|
11
|
+
tooltip="Center on a graph node"
|
|
12
|
+
class=graph-center-button>
|
|
13
|
+
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
|
14
|
+
{{$:/core/images/advanced-search-button}}
|
|
15
|
+
<%endif%>
|
|
16
|
+
<%if [<tv-config-toolbar-text>match[yes]] %>
|
|
17
|
+
<span class="tc-btn-text">
|
|
18
|
+
<$text text="center node" />
|
|
19
|
+
</span>
|
|
20
|
+
<%endif%>
|
|
21
|
+
</$button>
|
|
22
|
+
<$reveal state=<<state>> type="popup" position="below" animate="yes">
|
|
23
|
+
<div class="tc-drop-down graph-center-button-dropdown">
|
|
24
|
+
<$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="tc-btn-invisible">
|
|
25
|
+
<$transclude $tiddler="$:/plugins/flibbles/graph/ui/selector" configTiddler="$:/plugins/flibbles/graph/ui/Buttons/center">
|
|
26
|
+
<$fill $name=action>
|
|
27
|
+
<$action-sendmessage $message=graph-center-node tiddler=<<selectedTiddler>> scale="1.5" />
|
|
28
|
+
<$action-deletetiddler $tiddler=<<state>> />
|
|
29
|
+
</$fill>
|
|
30
|
+
<$fill $name=cancel>
|
|
31
|
+
<$action-deletetiddler $tiddler=<<state>> />
|
|
32
|
+
</$fill>
|
|
33
|
+
</$transclude>
|
|
34
|
+
</$let>
|
|
35
|
+
</div>
|
|
36
|
+
</$reveal>
|
|
37
|
+
</$vars>
|
|
38
|
+
<%endif%>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
description: Export graph
|
|
2
|
+
caption: {{$:/core/images/export-button}} export graph
|
|
3
|
+
|
|
4
|
+
\whitespace trim
|
|
5
|
+
|
|
6
|
+
<%if [subfilter{$:/plugins/flibbles/graph/subfilters##messages}jsonindexes[]prefix[graph-export-]] %>
|
|
7
|
+
<$vars state=<<qualify "$:/state/flibbles/graph/popup/export">>
|
|
8
|
+
imageStore="$:/temp/flibbles/graph/export">
|
|
9
|
+
<$button
|
|
10
|
+
popup=<<state>>
|
|
11
|
+
tooltip="Export graph as image"
|
|
12
|
+
class=graph-export-button>
|
|
13
|
+
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
|
14
|
+
{{$:/core/images/export-button}}
|
|
15
|
+
<%endif%>
|
|
16
|
+
<%if [<tv-config-toolbar-text>match[yes]] %>
|
|
17
|
+
<span class="tc-btn-text">
|
|
18
|
+
<$text text="export graph" />
|
|
19
|
+
</span>
|
|
20
|
+
<%endif%>
|
|
21
|
+
</$button>
|
|
22
|
+
<$reveal state=<<state>> type="popup" position="below" animate="yes">
|
|
23
|
+
<div class="tc-drop-down graph-export-button-dropdown">
|
|
24
|
+
<$list variable=type filter="[subfilter{$:/plugins/flibbles/graph/subfilters##messages}jsonindexes[]removeprefix[graph-export-]]">
|
|
25
|
+
<$button class=`tc-btn-invisible graph-export-type-$(type)$`>
|
|
26
|
+
<$action-sendmessage $message=`graph-export-$(type)$`
|
|
27
|
+
targetTiddler=<<imageStore>> />
|
|
28
|
+
<!-- We wrap our downloading inside action-createtiddler, because
|
|
29
|
+
create-tiddler delays refreshing its contents until its
|
|
30
|
+
invoked, which we need, since that `<%if` block depends on
|
|
31
|
+
content made by prior actions. -->
|
|
32
|
+
<$action-createtiddler $basetitle=<<state>> $overwrite=yes>
|
|
33
|
+
<%if [<imageStore>is[image]!type[image/svg+xml]] %>
|
|
34
|
+
<!-- Don't use tm-download-raw yourself.
|
|
35
|
+
It's a hack. A workaround. A solution for chumps.
|
|
36
|
+
I'm scrapping it as soon as TW supports image downloads -->
|
|
37
|
+
<$action-sendmessage $message="tm-download-raw"
|
|
38
|
+
$param=<<imageStore>>
|
|
39
|
+
filename={{{[{!!title}removeprefix[$:/graph/]] ~[{!!title}]}}}
|
|
40
|
+
type={{{ [<imageStore>get[type]addsuffix[;base64]] }}} />
|
|
41
|
+
<%else%>
|
|
42
|
+
<$action-sendmessage $message="tm-download-file"
|
|
43
|
+
$param="$:/core/templates/plain-text-tiddler"
|
|
44
|
+
currentTiddler=<<imageStore>>
|
|
45
|
+
filename={{{[{!!title}removeprefix[$:/graph/]] ~[{!!title}]}}}
|
|
46
|
+
type={{{ [<imageStore>get[type]] }}} />
|
|
47
|
+
<%endif%>
|
|
48
|
+
</$action-createtiddler>
|
|
49
|
+
<$action-deletetiddler $tiddler=<<imageStore>> />
|
|
50
|
+
<$action-deletetiddler $tiddler=<<state>> />
|
|
51
|
+
<$transclude $field="description" $tiddler=`$:/language/Docs/Types/image/$(type)$`>
|
|
52
|
+
<$fill $name="ts-missing">
|
|
53
|
+
<$transclude $field="description" $tiddler={{{ [[$:/tags/Exporter]tagging[]] :filter[{!!title}get[extension]removeprefix[.]match<type>] }}} >
|
|
54
|
+
<$fill $name="ts-missing">
|
|
55
|
+
<$text text=<<type>> />
|
|
56
|
+
</$fill>
|
|
57
|
+
</$transclude>
|
|
58
|
+
</$fill>
|
|
59
|
+
</$transclude>
|
|
60
|
+
</$button>
|
|
61
|
+
</$list>
|
|
62
|
+
</div>
|
|
63
|
+
</$reveal>
|
|
64
|
+
</$vars>
|
|
65
|
+
<%endif%>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
description: Toggle graph fullscreen mode
|
|
2
|
+
caption: {{$:/core/images/full-screen-button}} fullscreen
|
|
3
|
+
|
|
4
|
+
\procedure fs-actions()
|
|
5
|
+
\whitespace trim
|
|
6
|
+
<% if [<fs-state>is[tiddler]] %>
|
|
7
|
+
<$action-deletetiddler $tiddler=<<fs-state>> />
|
|
8
|
+
<% else %>
|
|
9
|
+
<$action-setfield $tiddler=<<fs-state>> text=graph-fullscreen />
|
|
10
|
+
<% endif %>
|
|
11
|
+
\end
|
|
12
|
+
\procedure fs-refocus()
|
|
13
|
+
\whitespace trim
|
|
14
|
+
<!--Refocus on the fullscreen button so that hitting escape will still disable fullscreen mode -->
|
|
15
|
+
<$action-delay>
|
|
16
|
+
<!--The delay is necessary, because you can't focus on an element that's currently hidden, and the graph may be hidden when this is called. -->
|
|
17
|
+
<$action-sendmessage $message="tm-focus-selector" $param=".graph-fullscreen-button"/>
|
|
18
|
+
\end
|
|
19
|
+
|
|
20
|
+
\parameters (class:graph-fullscreen-button)
|
|
21
|
+
\whitespace trim
|
|
22
|
+
|
|
23
|
+
<$button
|
|
24
|
+
tooltip="Toggle graph fullscreen mode"
|
|
25
|
+
class={{{ [<class>] +[join[ ]] }}}
|
|
26
|
+
actions="<<fs-actions>><<fs-refocus>>" >
|
|
27
|
+
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
|
28
|
+
{{$:/core/images/full-screen-button}}
|
|
29
|
+
<%endif%>
|
|
30
|
+
<%if [<tv-config-toolbar-text>match[yes]] %>
|
|
31
|
+
<span class="tc-btn-text">
|
|
32
|
+
<$text text="fullscreen" />
|
|
33
|
+
</span>
|
|
34
|
+
<%endif%>
|
|
35
|
+
</$button>
|