spyret 0.1.1 → 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.
@@ -0,0 +1,217 @@
1
+ # Generated by scripts/generate-spytial.mjs; do not edit.
2
+ # Core 6.3.2; language 2026-09-18.
3
+ provide *
4
+ provide-types *
5
+ import lists as L
6
+
7
+ data TextSize:
8
+ | small
9
+ | normal
10
+ | large
11
+ end
12
+
13
+ data LinePattern:
14
+ | solid
15
+ | dashed
16
+ | dotted
17
+ end
18
+
19
+ data IconPlacement:
20
+ | full
21
+ | badge
22
+ end
23
+
24
+ data Direction:
25
+ | above
26
+ | below
27
+ | left
28
+ | right
29
+ | directly-above
30
+ | directly-below
31
+ | directly-left
32
+ | directly-right
33
+ end
34
+
35
+ data Hold:
36
+ | always
37
+ | never
38
+ end
39
+
40
+ data Rotation:
41
+ | clockwise
42
+ | counterclockwise
43
+ end
44
+
45
+ data Alignment:
46
+ | horizontal
47
+ | vertical
48
+ end
49
+
50
+ data GroupEdgeDirection:
51
+ | no-group-edge
52
+ | togroup
53
+ | fromgroup
54
+ end
55
+
56
+ data LayoutFlag:
57
+ | hide-disconnected
58
+ | hide-disconnected-built-ins
59
+ end
60
+
61
+ data TextStyle:
62
+ | text-style(fields :: Any)
63
+ end
64
+
65
+ data LineStyle:
66
+ | line-style(fields :: Any)
67
+ end
68
+
69
+ data FillStyle:
70
+ | fill-style(fields :: Any)
71
+ end
72
+
73
+ data BorderStyle:
74
+ | border-style(fields :: Any)
75
+ end
76
+
77
+ data IconStyle:
78
+ | icon-style(fields :: Any)
79
+ end
80
+
81
+ data RuleSource:
82
+ | rule-source(fields :: Any)
83
+ end
84
+
85
+ data GroupAddEdge:
86
+ | group-add-edge(fields :: Any)
87
+ end
88
+
89
+ data Constraint:
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)
96
+ end
97
+
98
+ data Directive:
99
+ | spytial-flag(name :: LayoutFlag)
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)
109
+ end
110
+
111
+ data SpytialRule:
112
+ | constraint(value :: Constraint)
113
+ | directive(value :: Directive)
114
+ end
115
+
116
+ fun orientation(selector :: String, directions :: L.List<Direction>) -> SpytialRule:
117
+ constraint(spytial-orientation(selector, directions, {}))
118
+ end
119
+ fun orientation-with(selector :: String, directions :: L.List<Direction>, options :: Any) -> SpytialRule:
120
+ constraint(spytial-orientation(selector, directions, options))
121
+ end
122
+
123
+ fun cyclic(selector :: String) -> SpytialRule:
124
+ constraint(spytial-cyclic(selector, {}))
125
+ end
126
+ fun cyclic-with(selector :: String, options :: Any) -> SpytialRule:
127
+ constraint(spytial-cyclic(selector, options))
128
+ end
129
+
130
+ fun align(selector :: String, direction :: Alignment) -> SpytialRule:
131
+ constraint(spytial-align(selector, direction, {}))
132
+ end
133
+ fun align-with(selector :: String, direction :: Alignment, options :: Any) -> SpytialRule:
134
+ constraint(spytial-align(selector, direction, options))
135
+ end
136
+
137
+ fun group(selector :: String, name :: String) -> SpytialRule:
138
+ constraint(spytial-group(selector, name, {}))
139
+ end
140
+ fun group-with(selector :: String, name :: String, options :: Any) -> SpytialRule:
141
+ constraint(spytial-group(selector, name, options))
142
+ end
143
+
144
+ fun size(width :: Number, height :: Number) -> SpytialRule:
145
+ constraint(spytial-size(width, height, {}))
146
+ end
147
+ fun size-with(width :: Number, height :: Number, options :: Any) -> SpytialRule:
148
+ constraint(spytial-size(width, height, options))
149
+ end
150
+
151
+ fun hide-atom(selector :: String) -> SpytialRule:
152
+ constraint(spytial-hide-atom(selector, {}))
153
+ end
154
+ fun hide-atom-with(selector :: String, options :: Any) -> SpytialRule:
155
+ constraint(spytial-hide-atom(selector, options))
156
+ end
157
+
158
+ fun flag(name :: LayoutFlag) -> SpytialRule:
159
+ directive(spytial-flag(name))
160
+ end
161
+
162
+ fun atom-style(selector :: String, style :: Any) -> SpytialRule:
163
+ directive(spytial-atom-style(selector, style))
164
+ end
165
+
166
+ fun edge-style(field :: String, style :: Any) -> SpytialRule:
167
+ directive(spytial-edge-style(field, style))
168
+ end
169
+
170
+ fun attribute(field :: String) -> SpytialRule:
171
+ directive(spytial-attribute(field, {}))
172
+ end
173
+ fun attribute-with(field :: String, options :: Any) -> SpytialRule:
174
+ directive(spytial-attribute(field, options))
175
+ end
176
+
177
+ fun tag(to-tag :: String, name :: String, value :: String) -> SpytialRule:
178
+ directive(spytial-tag(to-tag, name, value, {}))
179
+ end
180
+ fun tag-with(to-tag :: String, name :: String, value :: String, options :: Any) -> SpytialRule:
181
+ directive(spytial-tag(to-tag, name, value, options))
182
+ end
183
+
184
+ fun hide-field(field :: String) -> SpytialRule:
185
+ directive(spytial-hide-field(field, {}))
186
+ end
187
+ fun hide-field-with(field :: String, options :: Any) -> SpytialRule:
188
+ directive(spytial-hide-field(field, options))
189
+ end
190
+
191
+ fun inferred-edge(name :: String, selector :: String) -> SpytialRule:
192
+ directive(spytial-inferred-edge(name, selector, {}))
193
+ end
194
+ fun inferred-edge-with(name :: String, selector :: String, options :: Any) -> SpytialRule:
195
+ directive(spytial-inferred-edge(name, selector, options))
196
+ end
197
+
198
+ fun icon(selector :: String, path :: String) -> SpytialRule:
199
+ directive(spytial-icon(selector, path, {}))
200
+ end
201
+ fun icon-with(selector :: String, path :: String, options :: Any) -> SpytialRule:
202
+ directive(spytial-icon(selector, path, options))
203
+ end
204
+
205
+ fun atom-color(value :: String, selector :: String) -> SpytialRule:
206
+ directive(spytial-atom-color(value, selector, {}))
207
+ end
208
+ fun atom-color-with(value :: String, selector :: String, options :: Any) -> SpytialRule:
209
+ directive(spytial-atom-color(value, selector, options))
210
+ end
211
+
212
+ fun edge-color(field :: String, value :: String) -> SpytialRule:
213
+ directive(spytial-edge-color(field, value, {}))
214
+ end
215
+ fun edge-color-with(field :: String, value :: String, options :: Any) -> SpytialRule:
216
+ directive(spytial-edge-color(field, value, options))
217
+ end