spyret 0.2.0 → 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/pyret/spytial.arr CHANGED
@@ -2,414 +2,110 @@
2
2
  # Core 6.3.2; language 2026-09-18.
3
3
  provide *
4
4
  provide-types *
5
- import option as O
6
5
  import lists as L
7
6
 
8
7
  data TextSize:
9
- | text-size-small
10
- | text-size-normal
11
- | text-size-large
8
+ | small
9
+ | normal
10
+ | large
12
11
  end
13
12
 
14
13
  data LinePattern:
15
- | line-pattern-solid
16
- | line-pattern-dashed
17
- | line-pattern-dotted
14
+ | solid
15
+ | dashed
16
+ | dotted
18
17
  end
19
18
 
20
19
  data IconPlacement:
21
- | icon-placement-full
22
- | icon-placement-badge
20
+ | full
21
+ | badge
23
22
  end
24
23
 
25
24
  data Direction:
26
- | direction-above
27
- | direction-below
28
- | direction-left
29
- | direction-right
30
- | direction-directly-above
31
- | direction-directly-below
32
- | direction-directly-left
33
- | direction-directly-right
25
+ | above
26
+ | below
27
+ | left
28
+ | right
29
+ | directly-above
30
+ | directly-below
31
+ | directly-left
32
+ | directly-right
34
33
  end
35
34
 
36
35
  data Hold:
37
- | hold-always
38
- | hold-never
36
+ | always
37
+ | never
39
38
  end
40
39
 
41
40
  data Rotation:
42
- | rotation-clockwise
43
- | rotation-counterclockwise
41
+ | clockwise
42
+ | counterclockwise
44
43
  end
45
44
 
46
45
  data Alignment:
47
- | alignment-horizontal
48
- | alignment-vertical
46
+ | horizontal
47
+ | vertical
49
48
  end
50
49
 
51
50
  data GroupEdgeDirection:
52
- | group-edge-direction-none
53
- | group-edge-direction-togroup
54
- | group-edge-direction-fromgroup
51
+ | no-group-edge
52
+ | togroup
53
+ | fromgroup
55
54
  end
56
55
 
57
56
  data LayoutFlag:
58
- | layout-flag-hide-disconnected
59
- | layout-flag-hide-disconnected-built-ins
57
+ | hide-disconnected
58
+ | hide-disconnected-built-ins
60
59
  end
61
60
 
62
61
  data TextStyle:
63
- | text-style(size :: O.Option<TextSize>, color :: O.Option<String>) with:
64
- method with-size(self, new-value :: TextSize) -> TextStyle:
65
- text-style(O.some(new-value), self.color)
66
- end,
67
- method with-color(self, new-value :: String) -> TextStyle:
68
- text-style(self.size, O.some(new-value))
69
- end
62
+ | text-style(fields :: Any)
70
63
  end
71
- default-text-style = text-style(O.none, O.none)
72
64
 
73
65
  data LineStyle:
74
- | line-style(color :: O.Option<String>, pattern :: O.Option<LinePattern>, weight :: O.Option<Number>, highlight :: O.Option<String>) with:
75
- method with-color(self, new-value :: String) -> LineStyle:
76
- line-style(O.some(new-value), self.pattern, self.weight, self.highlight)
77
- end,
78
- method with-pattern(self, new-value :: LinePattern) -> LineStyle:
79
- line-style(self.color, O.some(new-value), self.weight, self.highlight)
80
- end,
81
- method with-weight(self, new-value :: Number) -> LineStyle:
82
- line-style(self.color, self.pattern, O.some(new-value), self.highlight)
83
- end,
84
- method with-highlight(self, new-value :: String) -> LineStyle:
85
- line-style(self.color, self.pattern, self.weight, O.some(new-value))
86
- end
87
- end
88
- default-line-style = line-style(O.none, O.none, O.none, O.none)
66
+ | line-style(fields :: Any)
67
+ end
89
68
 
90
69
  data FillStyle:
91
- | fill-style(color :: O.Option<String>) with:
92
- method with-color(self, new-value :: String) -> FillStyle:
93
- fill-style(O.some(new-value))
94
- end
70
+ | fill-style(fields :: Any)
95
71
  end
96
- default-fill-style = fill-style(O.none)
97
72
 
98
73
  data BorderStyle:
99
- | border-style(color :: O.Option<String>, width :: O.Option<Number>) with:
100
- method with-color(self, new-value :: String) -> BorderStyle:
101
- border-style(O.some(new-value), self.width)
102
- end,
103
- method with-width(self, new-value :: Number) -> BorderStyle:
104
- border-style(self.color, O.some(new-value))
105
- end
74
+ | border-style(fields :: Any)
106
75
  end
107
- default-border-style = border-style(O.none, O.none)
108
76
 
109
77
  data IconStyle:
110
- | icon-style(path :: O.Option<String>, placement :: O.Option<IconPlacement>, opacity :: O.Option<Number>) with:
111
- method with-path(self, new-value :: String) -> IconStyle:
112
- icon-style(O.some(new-value), self.placement, self.opacity)
113
- end,
114
- method with-placement(self, new-value :: IconPlacement) -> IconStyle:
115
- icon-style(self.path, O.some(new-value), self.opacity)
116
- end,
117
- method with-opacity(self, new-value :: Number) -> IconStyle:
118
- icon-style(self.path, self.placement, O.some(new-value))
119
- end
120
- end
121
- default-icon-style = icon-style(O.none, O.none, O.none)
78
+ | icon-style(fields :: Any)
79
+ end
122
80
 
123
81
  data RuleSource:
124
- | rule-source(text :: String, location :: O.Option<String>) with:
125
- method with-text(self, new-value :: String) -> RuleSource:
126
- rule-source(new-value, self.location)
127
- end,
128
- method with-location(self, new-value :: String) -> RuleSource:
129
- rule-source(self.text, O.some(new-value))
130
- end
82
+ | rule-source(fields :: Any)
131
83
  end
132
84
 
133
85
  data GroupAddEdge:
134
- | group-add-edge(points :: O.Option<GroupEdgeDirection>, line-style :: O.Option<LineStyle>, text-style :: O.Option<TextStyle>) with:
135
- method with-points(self, new-value :: GroupEdgeDirection) -> GroupAddEdge:
136
- group-add-edge(O.some(new-value), self.line-style, self.text-style)
137
- end,
138
- method with-line-style(self, new-value :: LineStyle) -> GroupAddEdge:
139
- group-add-edge(self.points, O.some(new-value), self.text-style)
140
- end,
141
- method with-text-style(self, new-value :: TextStyle) -> GroupAddEdge:
142
- group-add-edge(self.points, self.line-style, O.some(new-value))
143
- end
144
- end
145
- default-group-add-edge = group-add-edge(O.none, O.none, O.none)
146
-
147
- data OrientationOptions:
148
- | orientation-options(hold :: O.Option<Hold>, source :: O.Option<RuleSource>) with:
149
- method with-hold(self, new-value :: Hold) -> OrientationOptions:
150
- orientation-options(O.some(new-value), self.source)
151
- end,
152
- method with-source(self, new-value :: RuleSource) -> OrientationOptions:
153
- orientation-options(self.hold, O.some(new-value))
154
- end
155
- end
156
- default-orientation-options = orientation-options(O.none, O.none)
157
-
158
- data CyclicOptions:
159
- | cyclic-options(direction :: O.Option<Rotation>, hold :: O.Option<Hold>, source :: O.Option<RuleSource>) with:
160
- method with-direction(self, new-value :: Rotation) -> CyclicOptions:
161
- cyclic-options(O.some(new-value), self.hold, self.source)
162
- end,
163
- method with-hold(self, new-value :: Hold) -> CyclicOptions:
164
- cyclic-options(self.direction, O.some(new-value), self.source)
165
- end,
166
- method with-source(self, new-value :: RuleSource) -> CyclicOptions:
167
- cyclic-options(self.direction, self.hold, O.some(new-value))
168
- end
169
- end
170
- default-cyclic-options = cyclic-options(O.none, O.none, O.none)
171
-
172
- data AlignOptions:
173
- | align-options(hold :: O.Option<Hold>, source :: O.Option<RuleSource>) with:
174
- method with-hold(self, new-value :: Hold) -> AlignOptions:
175
- align-options(O.some(new-value), self.source)
176
- end,
177
- method with-source(self, new-value :: RuleSource) -> AlignOptions:
178
- align-options(self.hold, O.some(new-value))
179
- end
180
- end
181
- default-align-options = align-options(O.none, O.none)
182
-
183
- data GroupOptions:
184
- | group-options(add-edge :: O.Option<GroupAddEdge>, show-label :: O.Option<Boolean>, text-style :: O.Option<TextStyle>, hold :: O.Option<Hold>, source :: O.Option<RuleSource>) with:
185
- method with-add-edge(self, new-value :: GroupAddEdge) -> GroupOptions:
186
- group-options(O.some(new-value), self.show-label, self.text-style, self.hold, self.source)
187
- end,
188
- method with-show-label(self, new-value :: Boolean) -> GroupOptions:
189
- group-options(self.add-edge, O.some(new-value), self.text-style, self.hold, self.source)
190
- end,
191
- method with-text-style(self, new-value :: TextStyle) -> GroupOptions:
192
- group-options(self.add-edge, self.show-label, O.some(new-value), self.hold, self.source)
193
- end,
194
- method with-hold(self, new-value :: Hold) -> GroupOptions:
195
- group-options(self.add-edge, self.show-label, self.text-style, O.some(new-value), self.source)
196
- end,
197
- method with-source(self, new-value :: RuleSource) -> GroupOptions:
198
- group-options(self.add-edge, self.show-label, self.text-style, self.hold, O.some(new-value))
199
- end
200
- end
201
- default-group-options = group-options(O.none, O.none, O.none, O.none, O.none)
202
-
203
- data SizeOptions:
204
- | size-options(selector :: O.Option<String>, source :: O.Option<RuleSource>) with:
205
- method with-selector(self, new-value :: String) -> SizeOptions:
206
- size-options(O.some(new-value), self.source)
207
- end,
208
- method with-source(self, new-value :: RuleSource) -> SizeOptions:
209
- size-options(self.selector, O.some(new-value))
210
- end
211
- end
212
- default-size-options = size-options(O.none, O.none)
213
-
214
- data HideAtomOptions:
215
- | hide-atom-options(source :: O.Option<RuleSource>) with:
216
- method with-source(self, new-value :: RuleSource) -> HideAtomOptions:
217
- hide-atom-options(O.some(new-value))
218
- end
219
- end
220
- default-hide-atom-options = hide-atom-options(O.none)
221
-
222
- data AtomStyleOptions:
223
- | atom-style-options(selector :: O.Option<String>, fill-style :: O.Option<FillStyle>, border-style :: O.Option<BorderStyle>, icon-style :: O.Option<IconStyle>, text-style :: O.Option<TextStyle>, show-label :: O.Option<Boolean>, source :: O.Option<RuleSource>) with:
224
- method with-selector(self, new-value :: String) -> AtomStyleOptions:
225
- atom-style-options(O.some(new-value), self.fill-style, self.border-style, self.icon-style, self.text-style, self.show-label, self.source)
226
- end,
227
- method with-fill-style(self, new-value :: FillStyle) -> AtomStyleOptions:
228
- atom-style-options(self.selector, O.some(new-value), self.border-style, self.icon-style, self.text-style, self.show-label, self.source)
229
- end,
230
- method with-border-style(self, new-value :: BorderStyle) -> AtomStyleOptions:
231
- atom-style-options(self.selector, self.fill-style, O.some(new-value), self.icon-style, self.text-style, self.show-label, self.source)
232
- end,
233
- method with-icon-style(self, new-value :: IconStyle) -> AtomStyleOptions:
234
- atom-style-options(self.selector, self.fill-style, self.border-style, O.some(new-value), self.text-style, self.show-label, self.source)
235
- end,
236
- method with-text-style(self, new-value :: TextStyle) -> AtomStyleOptions:
237
- atom-style-options(self.selector, self.fill-style, self.border-style, self.icon-style, O.some(new-value), self.show-label, self.source)
238
- end,
239
- method with-show-label(self, new-value :: Boolean) -> AtomStyleOptions:
240
- atom-style-options(self.selector, self.fill-style, self.border-style, self.icon-style, self.text-style, O.some(new-value), self.source)
241
- end,
242
- method with-source(self, new-value :: RuleSource) -> AtomStyleOptions:
243
- atom-style-options(self.selector, self.fill-style, self.border-style, self.icon-style, self.text-style, self.show-label, O.some(new-value))
244
- end
245
- end
246
- default-atom-style-options = atom-style-options(O.none, O.none, O.none, O.none, O.none, O.none, O.none)
247
-
248
- data EdgeStyleOptions:
249
- | edge-style-options(selector :: O.Option<String>, filter :: O.Option<String>, line-style :: O.Option<LineStyle>, text-style :: O.Option<TextStyle>, show-label :: O.Option<Boolean>, hidden :: O.Option<Boolean>, source :: O.Option<RuleSource>) with:
250
- method with-selector(self, new-value :: String) -> EdgeStyleOptions:
251
- edge-style-options(O.some(new-value), self.filter, self.line-style, self.text-style, self.show-label, self.hidden, self.source)
252
- end,
253
- method with-filter(self, new-value :: String) -> EdgeStyleOptions:
254
- edge-style-options(self.selector, O.some(new-value), self.line-style, self.text-style, self.show-label, self.hidden, self.source)
255
- end,
256
- method with-line-style(self, new-value :: LineStyle) -> EdgeStyleOptions:
257
- edge-style-options(self.selector, self.filter, O.some(new-value), self.text-style, self.show-label, self.hidden, self.source)
258
- end,
259
- method with-text-style(self, new-value :: TextStyle) -> EdgeStyleOptions:
260
- edge-style-options(self.selector, self.filter, self.line-style, O.some(new-value), self.show-label, self.hidden, self.source)
261
- end,
262
- method with-show-label(self, new-value :: Boolean) -> EdgeStyleOptions:
263
- edge-style-options(self.selector, self.filter, self.line-style, self.text-style, O.some(new-value), self.hidden, self.source)
264
- end,
265
- method with-hidden(self, new-value :: Boolean) -> EdgeStyleOptions:
266
- edge-style-options(self.selector, self.filter, self.line-style, self.text-style, self.show-label, O.some(new-value), self.source)
267
- end,
268
- method with-source(self, new-value :: RuleSource) -> EdgeStyleOptions:
269
- edge-style-options(self.selector, self.filter, self.line-style, self.text-style, self.show-label, self.hidden, O.some(new-value))
270
- end
271
- end
272
- default-edge-style-options = edge-style-options(O.none, O.none, O.none, O.none, O.none, O.none, O.none)
273
-
274
- data AttributeOptions:
275
- | attribute-options(selector :: O.Option<String>, filter :: O.Option<String>, text-style :: O.Option<TextStyle>, source :: O.Option<RuleSource>) with:
276
- method with-selector(self, new-value :: String) -> AttributeOptions:
277
- attribute-options(O.some(new-value), self.filter, self.text-style, self.source)
278
- end,
279
- method with-filter(self, new-value :: String) -> AttributeOptions:
280
- attribute-options(self.selector, O.some(new-value), self.text-style, self.source)
281
- end,
282
- method with-text-style(self, new-value :: TextStyle) -> AttributeOptions:
283
- attribute-options(self.selector, self.filter, O.some(new-value), self.source)
284
- end,
285
- method with-source(self, new-value :: RuleSource) -> AttributeOptions:
286
- attribute-options(self.selector, self.filter, self.text-style, O.some(new-value))
287
- end
288
- end
289
- default-attribute-options = attribute-options(O.none, O.none, O.none, O.none)
290
-
291
- data TagOptions:
292
- | tag-options(text-style :: O.Option<TextStyle>, source :: O.Option<RuleSource>) with:
293
- method with-text-style(self, new-value :: TextStyle) -> TagOptions:
294
- tag-options(O.some(new-value), self.source)
295
- end,
296
- method with-source(self, new-value :: RuleSource) -> TagOptions:
297
- tag-options(self.text-style, O.some(new-value))
298
- end
299
- end
300
- default-tag-options = tag-options(O.none, O.none)
301
-
302
- data HideFieldOptions:
303
- | hide-field-options(selector :: O.Option<String>, filter :: O.Option<String>, source :: O.Option<RuleSource>) with:
304
- method with-selector(self, new-value :: String) -> HideFieldOptions:
305
- hide-field-options(O.some(new-value), self.filter, self.source)
306
- end,
307
- method with-filter(self, new-value :: String) -> HideFieldOptions:
308
- hide-field-options(self.selector, O.some(new-value), self.source)
309
- end,
310
- method with-source(self, new-value :: RuleSource) -> HideFieldOptions:
311
- hide-field-options(self.selector, self.filter, O.some(new-value))
312
- end
313
- end
314
- default-hide-field-options = hide-field-options(O.none, O.none, O.none)
315
-
316
- data InferredEdgeOptions:
317
- | inferred-edge-options(draw :: O.Option<String>, line-style :: O.Option<LineStyle>, text-style :: O.Option<TextStyle>, color :: O.Option<String>, style :: O.Option<LinePattern>, weight :: O.Option<Number>, highlight :: O.Option<String>, source :: O.Option<RuleSource>) with:
318
- method with-draw(self, new-value :: String) -> InferredEdgeOptions:
319
- inferred-edge-options(O.some(new-value), self.line-style, self.text-style, self.color, self.style, self.weight, self.highlight, self.source)
320
- end,
321
- method with-line-style(self, new-value :: LineStyle) -> InferredEdgeOptions:
322
- inferred-edge-options(self.draw, O.some(new-value), self.text-style, self.color, self.style, self.weight, self.highlight, self.source)
323
- end,
324
- method with-text-style(self, new-value :: TextStyle) -> InferredEdgeOptions:
325
- inferred-edge-options(self.draw, self.line-style, O.some(new-value), self.color, self.style, self.weight, self.highlight, self.source)
326
- end,
327
- method with-color(self, new-value :: String) -> InferredEdgeOptions:
328
- inferred-edge-options(self.draw, self.line-style, self.text-style, O.some(new-value), self.style, self.weight, self.highlight, self.source)
329
- end,
330
- method with-style(self, new-value :: LinePattern) -> InferredEdgeOptions:
331
- inferred-edge-options(self.draw, self.line-style, self.text-style, self.color, O.some(new-value), self.weight, self.highlight, self.source)
332
- end,
333
- method with-weight(self, new-value :: Number) -> InferredEdgeOptions:
334
- inferred-edge-options(self.draw, self.line-style, self.text-style, self.color, self.style, O.some(new-value), self.highlight, self.source)
335
- end,
336
- method with-highlight(self, new-value :: String) -> InferredEdgeOptions:
337
- inferred-edge-options(self.draw, self.line-style, self.text-style, self.color, self.style, self.weight, O.some(new-value), self.source)
338
- end,
339
- method with-source(self, new-value :: RuleSource) -> InferredEdgeOptions:
340
- inferred-edge-options(self.draw, self.line-style, self.text-style, self.color, self.style, self.weight, self.highlight, O.some(new-value))
341
- end
342
- end
343
- default-inferred-edge-options = inferred-edge-options(O.none, O.none, O.none, O.none, O.none, O.none, O.none, O.none)
344
-
345
- data IconOptions:
346
- | icon-options(show-labels :: O.Option<Boolean>, source :: O.Option<RuleSource>) with:
347
- method with-show-labels(self, new-value :: Boolean) -> IconOptions:
348
- icon-options(O.some(new-value), self.source)
349
- end,
350
- method with-source(self, new-value :: RuleSource) -> IconOptions:
351
- icon-options(self.show-labels, O.some(new-value))
352
- end
353
- end
354
- default-icon-options = icon-options(O.none, O.none)
355
-
356
- data AtomColorOptions:
357
- | atom-color-options(source :: O.Option<RuleSource>) with:
358
- method with-source(self, new-value :: RuleSource) -> AtomColorOptions:
359
- atom-color-options(O.some(new-value))
360
- end
361
- end
362
- default-atom-color-options = atom-color-options(O.none)
363
-
364
- data EdgeColorOptions:
365
- | edge-color-options(selector :: O.Option<String>, filter :: O.Option<String>, style :: O.Option<LinePattern>, weight :: O.Option<Number>, highlight :: O.Option<String>, show-label :: O.Option<Boolean>, hidden :: O.Option<Boolean>, source :: O.Option<RuleSource>) with:
366
- method with-selector(self, new-value :: String) -> EdgeColorOptions:
367
- edge-color-options(O.some(new-value), self.filter, self.style, self.weight, self.highlight, self.show-label, self.hidden, self.source)
368
- end,
369
- method with-filter(self, new-value :: String) -> EdgeColorOptions:
370
- edge-color-options(self.selector, O.some(new-value), self.style, self.weight, self.highlight, self.show-label, self.hidden, self.source)
371
- end,
372
- method with-style(self, new-value :: LinePattern) -> EdgeColorOptions:
373
- edge-color-options(self.selector, self.filter, O.some(new-value), self.weight, self.highlight, self.show-label, self.hidden, self.source)
374
- end,
375
- method with-weight(self, new-value :: Number) -> EdgeColorOptions:
376
- edge-color-options(self.selector, self.filter, self.style, O.some(new-value), self.highlight, self.show-label, self.hidden, self.source)
377
- end,
378
- method with-highlight(self, new-value :: String) -> EdgeColorOptions:
379
- edge-color-options(self.selector, self.filter, self.style, self.weight, O.some(new-value), self.show-label, self.hidden, self.source)
380
- end,
381
- method with-show-label(self, new-value :: Boolean) -> EdgeColorOptions:
382
- edge-color-options(self.selector, self.filter, self.style, self.weight, self.highlight, O.some(new-value), self.hidden, self.source)
383
- end,
384
- method with-hidden(self, new-value :: Boolean) -> EdgeColorOptions:
385
- edge-color-options(self.selector, self.filter, self.style, self.weight, self.highlight, self.show-label, O.some(new-value), self.source)
386
- end,
387
- method with-source(self, new-value :: RuleSource) -> EdgeColorOptions:
388
- edge-color-options(self.selector, self.filter, self.style, self.weight, self.highlight, self.show-label, self.hidden, O.some(new-value))
389
- end
390
- end
391
- default-edge-color-options = edge-color-options(O.none, O.none, O.none, O.none, O.none, O.none, O.none, O.none)
86
+ | group-add-edge(fields :: Any)
87
+ end
392
88
 
393
89
  data Constraint:
394
- | spytial-orientation(selector :: String, directions :: L.List<Direction>, options :: OrientationOptions)
395
- | spytial-cyclic(selector :: String, options :: CyclicOptions)
396
- | spytial-align(selector :: String, direction :: Alignment, options :: AlignOptions)
397
- | spytial-group(selector :: String, name :: String, options :: GroupOptions)
398
- | spytial-size(width :: Number, height :: Number, options :: SizeOptions)
399
- | spytial-hide-atom(selector :: String, options :: HideAtomOptions)
90
+ | spytial-orientation(selector :: String, directions :: L.List<Direction>, options :: Any)
91
+ | spytial-cyclic(selector :: String, options :: Any)
92
+ | spytial-align(selector :: String, direction :: Alignment, options :: Any)
93
+ | spytial-group(selector :: String, name :: String, options :: Any)
94
+ | spytial-size(width :: Number, height :: Number, options :: Any)
95
+ | spytial-hide-atom(selector :: String, options :: Any)
400
96
  end
401
97
 
402
98
  data Directive:
403
99
  | spytial-flag(name :: LayoutFlag)
404
- | spytial-atom-style(options :: AtomStyleOptions)
405
- | spytial-edge-style(field :: String, options :: EdgeStyleOptions)
406
- | spytial-attribute(field :: String, options :: AttributeOptions)
407
- | spytial-tag(to-tag :: String, name :: String, value :: String, options :: TagOptions)
408
- | spytial-hide-field(field :: String, options :: HideFieldOptions)
409
- | spytial-inferred-edge(name :: String, selector :: String, options :: InferredEdgeOptions)
410
- | spytial-icon(selector :: String, path :: String, options :: IconOptions)
411
- | spytial-atom-color(value :: String, selector :: String, options :: AtomColorOptions)
412
- | spytial-edge-color(field :: String, value :: String, options :: EdgeColorOptions)
100
+ | spytial-atom-style(selector :: String, options :: Any)
101
+ | spytial-edge-style(field :: String, options :: Any)
102
+ | spytial-attribute(field :: String, options :: Any)
103
+ | spytial-tag(to-tag :: String, name :: String, value :: String, options :: Any)
104
+ | spytial-hide-field(field :: String, options :: Any)
105
+ | spytial-inferred-edge(name :: String, selector :: String, options :: Any)
106
+ | spytial-icon(selector :: String, path :: String, options :: Any)
107
+ | spytial-atom-color(value :: String, selector :: String, options :: Any)
108
+ | spytial-edge-color(field :: String, value :: String, options :: Any)
413
109
  end
414
110
 
415
111
  data SpytialRule:
@@ -418,44 +114,44 @@ data SpytialRule:
418
114
  end
419
115
 
420
116
  fun orientation(selector :: String, directions :: L.List<Direction>) -> SpytialRule:
421
- constraint(spytial-orientation(selector, directions, default-orientation-options))
117
+ constraint(spytial-orientation(selector, directions, {}))
422
118
  end
423
- fun orientation-with(selector :: String, directions :: L.List<Direction>, options :: OrientationOptions) -> SpytialRule:
119
+ fun orientation-with(selector :: String, directions :: L.List<Direction>, options :: Any) -> SpytialRule:
424
120
  constraint(spytial-orientation(selector, directions, options))
425
121
  end
426
122
 
427
123
  fun cyclic(selector :: String) -> SpytialRule:
428
- constraint(spytial-cyclic(selector, default-cyclic-options))
124
+ constraint(spytial-cyclic(selector, {}))
429
125
  end
430
- fun cyclic-with(selector :: String, options :: CyclicOptions) -> SpytialRule:
126
+ fun cyclic-with(selector :: String, options :: Any) -> SpytialRule:
431
127
  constraint(spytial-cyclic(selector, options))
432
128
  end
433
129
 
434
130
  fun align(selector :: String, direction :: Alignment) -> SpytialRule:
435
- constraint(spytial-align(selector, direction, default-align-options))
131
+ constraint(spytial-align(selector, direction, {}))
436
132
  end
437
- fun align-with(selector :: String, direction :: Alignment, options :: AlignOptions) -> SpytialRule:
133
+ fun align-with(selector :: String, direction :: Alignment, options :: Any) -> SpytialRule:
438
134
  constraint(spytial-align(selector, direction, options))
439
135
  end
440
136
 
441
137
  fun group(selector :: String, name :: String) -> SpytialRule:
442
- constraint(spytial-group(selector, name, default-group-options))
138
+ constraint(spytial-group(selector, name, {}))
443
139
  end
444
- fun group-with(selector :: String, name :: String, options :: GroupOptions) -> SpytialRule:
140
+ fun group-with(selector :: String, name :: String, options :: Any) -> SpytialRule:
445
141
  constraint(spytial-group(selector, name, options))
446
142
  end
447
143
 
448
144
  fun size(width :: Number, height :: Number) -> SpytialRule:
449
- constraint(spytial-size(width, height, default-size-options))
145
+ constraint(spytial-size(width, height, {}))
450
146
  end
451
- fun size-with(width :: Number, height :: Number, options :: SizeOptions) -> SpytialRule:
147
+ fun size-with(width :: Number, height :: Number, options :: Any) -> SpytialRule:
452
148
  constraint(spytial-size(width, height, options))
453
149
  end
454
150
 
455
151
  fun hide-atom(selector :: String) -> SpytialRule:
456
- constraint(spytial-hide-atom(selector, default-hide-atom-options))
152
+ constraint(spytial-hide-atom(selector, {}))
457
153
  end
458
- fun hide-atom-with(selector :: String, options :: HideAtomOptions) -> SpytialRule:
154
+ fun hide-atom-with(selector :: String, options :: Any) -> SpytialRule:
459
155
  constraint(spytial-hide-atom(selector, options))
460
156
  end
461
157
 
@@ -463,65 +159,59 @@ fun flag(name :: LayoutFlag) -> SpytialRule:
463
159
  directive(spytial-flag(name))
464
160
  end
465
161
 
466
- fun atom-style() -> SpytialRule:
467
- directive(spytial-atom-style(default-atom-style-options))
468
- end
469
- fun atom-style-with(options :: AtomStyleOptions) -> SpytialRule:
470
- directive(spytial-atom-style(options))
162
+ fun atom-style(selector :: String, style :: Any) -> SpytialRule:
163
+ directive(spytial-atom-style(selector, style))
471
164
  end
472
165
 
473
- fun edge-style(field :: String) -> SpytialRule:
474
- directive(spytial-edge-style(field, default-edge-style-options))
475
- end
476
- fun edge-style-with(field :: String, options :: EdgeStyleOptions) -> SpytialRule:
477
- directive(spytial-edge-style(field, options))
166
+ fun edge-style(field :: String, style :: Any) -> SpytialRule:
167
+ directive(spytial-edge-style(field, style))
478
168
  end
479
169
 
480
170
  fun attribute(field :: String) -> SpytialRule:
481
- directive(spytial-attribute(field, default-attribute-options))
171
+ directive(spytial-attribute(field, {}))
482
172
  end
483
- fun attribute-with(field :: String, options :: AttributeOptions) -> SpytialRule:
173
+ fun attribute-with(field :: String, options :: Any) -> SpytialRule:
484
174
  directive(spytial-attribute(field, options))
485
175
  end
486
176
 
487
177
  fun tag(to-tag :: String, name :: String, value :: String) -> SpytialRule:
488
- directive(spytial-tag(to-tag, name, value, default-tag-options))
178
+ directive(spytial-tag(to-tag, name, value, {}))
489
179
  end
490
- fun tag-with(to-tag :: String, name :: String, value :: String, options :: TagOptions) -> SpytialRule:
180
+ fun tag-with(to-tag :: String, name :: String, value :: String, options :: Any) -> SpytialRule:
491
181
  directive(spytial-tag(to-tag, name, value, options))
492
182
  end
493
183
 
494
184
  fun hide-field(field :: String) -> SpytialRule:
495
- directive(spytial-hide-field(field, default-hide-field-options))
185
+ directive(spytial-hide-field(field, {}))
496
186
  end
497
- fun hide-field-with(field :: String, options :: HideFieldOptions) -> SpytialRule:
187
+ fun hide-field-with(field :: String, options :: Any) -> SpytialRule:
498
188
  directive(spytial-hide-field(field, options))
499
189
  end
500
190
 
501
191
  fun inferred-edge(name :: String, selector :: String) -> SpytialRule:
502
- directive(spytial-inferred-edge(name, selector, default-inferred-edge-options))
192
+ directive(spytial-inferred-edge(name, selector, {}))
503
193
  end
504
- fun inferred-edge-with(name :: String, selector :: String, options :: InferredEdgeOptions) -> SpytialRule:
194
+ fun inferred-edge-with(name :: String, selector :: String, options :: Any) -> SpytialRule:
505
195
  directive(spytial-inferred-edge(name, selector, options))
506
196
  end
507
197
 
508
198
  fun icon(selector :: String, path :: String) -> SpytialRule:
509
- directive(spytial-icon(selector, path, default-icon-options))
199
+ directive(spytial-icon(selector, path, {}))
510
200
  end
511
- fun icon-with(selector :: String, path :: String, options :: IconOptions) -> SpytialRule:
201
+ fun icon-with(selector :: String, path :: String, options :: Any) -> SpytialRule:
512
202
  directive(spytial-icon(selector, path, options))
513
203
  end
514
204
 
515
205
  fun atom-color(value :: String, selector :: String) -> SpytialRule:
516
- directive(spytial-atom-color(value, selector, default-atom-color-options))
206
+ directive(spytial-atom-color(value, selector, {}))
517
207
  end
518
- fun atom-color-with(value :: String, selector :: String, options :: AtomColorOptions) -> SpytialRule:
208
+ fun atom-color-with(value :: String, selector :: String, options :: Any) -> SpytialRule:
519
209
  directive(spytial-atom-color(value, selector, options))
520
210
  end
521
211
 
522
212
  fun edge-color(field :: String, value :: String) -> SpytialRule:
523
- directive(spytial-edge-color(field, value, default-edge-color-options))
213
+ directive(spytial-edge-color(field, value, {}))
524
214
  end
525
- fun edge-color-with(field :: String, value :: String, options :: EdgeColorOptions) -> SpytialRule:
215
+ fun edge-color-with(field :: String, value :: String, options :: Any) -> SpytialRule:
526
216
  directive(spytial-edge-color(field, value, options))
527
217
  end