@nowline/core 0.8.6 → 0.9.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.
Files changed (174) hide show
  1. package/README.md +9 -0
  2. package/dist/convert/printer.d.ts.map +1 -1
  3. package/dist/convert/printer.js +20 -9
  4. package/dist/convert/printer.js.map +1 -1
  5. package/dist/convert/schema.d.ts +7 -0
  6. package/dist/convert/schema.d.ts.map +1 -1
  7. package/dist/convert/schema.js +1 -1
  8. package/dist/convert/schema.js.map +1 -1
  9. package/dist/generated/ast.d.ts +134 -24
  10. package/dist/generated/ast.d.ts.map +1 -1
  11. package/dist/generated/ast.js +95 -3
  12. package/dist/generated/ast.js.map +1 -1
  13. package/dist/generated/grammar.d.ts.map +1 -1
  14. package/dist/generated/grammar.js +434 -148
  15. package/dist/generated/grammar.js.map +1 -1
  16. package/dist/i18n/codes.d.ts +1 -1
  17. package/dist/i18n/codes.d.ts.map +1 -1
  18. package/dist/i18n/codes.js +44 -1
  19. package/dist/i18n/codes.js.map +1 -1
  20. package/dist/i18n/index.d.ts +1 -0
  21. package/dist/i18n/index.d.ts.map +1 -1
  22. package/dist/i18n/index.js.map +1 -1
  23. package/dist/i18n/messages.en.d.ts +107 -0
  24. package/dist/i18n/messages.en.d.ts.map +1 -1
  25. package/dist/i18n/messages.en.js +220 -1
  26. package/dist/i18n/messages.en.js.map +1 -1
  27. package/dist/i18n/messages.fr.d.ts.map +1 -1
  28. package/dist/i18n/messages.fr.js +250 -1
  29. package/dist/i18n/messages.fr.js.map +1 -1
  30. package/dist/i18n/wave-message-types.d.ts +238 -0
  31. package/dist/i18n/wave-message-types.d.ts.map +1 -0
  32. package/dist/i18n/wave-message-types.js +11 -0
  33. package/dist/i18n/wave-message-types.js.map +1 -0
  34. package/dist/index.d.ts +6 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +5 -1
  37. package/dist/index.js.map +1 -1
  38. package/dist/internal.d.ts +6 -0
  39. package/dist/internal.d.ts.map +1 -0
  40. package/dist/internal.js +9 -0
  41. package/dist/internal.js.map +1 -0
  42. package/dist/language/ast-walk.d.ts +31 -0
  43. package/dist/language/ast-walk.d.ts.map +1 -0
  44. package/dist/language/ast-walk.js +109 -0
  45. package/dist/language/ast-walk.js.map +1 -0
  46. package/dist/language/calendar-declarations.d.ts +31 -0
  47. package/dist/language/calendar-declarations.d.ts.map +1 -0
  48. package/dist/language/calendar-declarations.js +99 -0
  49. package/dist/language/calendar-declarations.js.map +1 -0
  50. package/dist/language/include-references.d.ts +11 -0
  51. package/dist/language/include-references.d.ts.map +1 -0
  52. package/dist/language/include-references.js +45 -0
  53. package/dist/language/include-references.js.map +1 -0
  54. package/dist/language/include-resolver.d.ts +78 -1
  55. package/dist/language/include-resolver.d.ts.map +1 -1
  56. package/dist/language/include-resolver.js +190 -12
  57. package/dist/language/include-resolver.js.map +1 -1
  58. package/dist/language/include-waves.d.ts +73 -0
  59. package/dist/language/include-waves.d.ts.map +1 -0
  60. package/dist/language/include-waves.js +319 -0
  61. package/dist/language/include-waves.js.map +1 -0
  62. package/dist/language/nowline-validator.d.ts +6 -1
  63. package/dist/language/nowline-validator.d.ts.map +1 -1
  64. package/dist/language/nowline-validator.js +95 -1589
  65. package/dist/language/nowline-validator.js.map +1 -1
  66. package/dist/language/references.d.ts +14 -0
  67. package/dist/language/references.d.ts.map +1 -0
  68. package/dist/language/references.js +36 -0
  69. package/dist/language/references.js.map +1 -0
  70. package/dist/language/style-chain.d.ts +37 -0
  71. package/dist/language/style-chain.d.ts.map +1 -0
  72. package/dist/language/style-chain.js +55 -0
  73. package/dist/language/style-chain.js.map +1 -0
  74. package/dist/language/validator/calendar.d.ts +9 -0
  75. package/dist/language/validator/calendar.d.ts.map +1 -0
  76. package/dist/language/validator/calendar.js +250 -0
  77. package/dist/language/validator/calendar.js.map +1 -0
  78. package/dist/language/validator/entities.d.ts +23 -0
  79. package/dist/language/validator/entities.d.ts.map +1 -0
  80. package/dist/language/validator/entities.js +261 -0
  81. package/dist/language/validator/entities.js.map +1 -0
  82. package/dist/language/validator/properties.d.ts +18 -0
  83. package/dist/language/validator/properties.d.ts.map +1 -0
  84. package/dist/language/validator/properties.js +356 -0
  85. package/dist/language/validator/properties.js.map +1 -0
  86. package/dist/language/validator/references.d.ts +7 -0
  87. package/dist/language/validator/references.d.ts.map +1 -0
  88. package/dist/language/validator/references.js +261 -0
  89. package/dist/language/validator/references.js.map +1 -0
  90. package/dist/language/validator/structure.d.ts +16 -0
  91. package/dist/language/validator/structure.d.ts.map +1 -0
  92. package/dist/language/validator/structure.js +166 -0
  93. package/dist/language/validator/structure.js.map +1 -0
  94. package/dist/language/validator/style.d.ts +5 -0
  95. package/dist/language/validator/style.d.ts.map +1 -0
  96. package/dist/language/validator/style.js +126 -0
  97. package/dist/language/validator/style.js.map +1 -0
  98. package/dist/language/validator/support.d.ts +35 -0
  99. package/dist/language/validator/support.d.ts.map +1 -0
  100. package/dist/language/validator/support.js +49 -0
  101. package/dist/language/validator/support.js.map +1 -0
  102. package/dist/language/validator/symbols.d.ts +6 -0
  103. package/dist/language/validator/symbols.d.ts.map +1 -0
  104. package/dist/language/validator/symbols.js +131 -0
  105. package/dist/language/validator/symbols.js.map +1 -0
  106. package/dist/language/validator/tables.d.ts +34 -0
  107. package/dist/language/validator/tables.d.ts.map +1 -0
  108. package/dist/language/validator/tables.js +120 -0
  109. package/dist/language/validator/tables.js.map +1 -0
  110. package/dist/language/validator-utils.d.ts +32 -0
  111. package/dist/language/validator-utils.d.ts.map +1 -0
  112. package/dist/language/validator-utils.js +118 -0
  113. package/dist/language/validator-utils.js.map +1 -0
  114. package/dist/language/value-tables.d.ts +107 -0
  115. package/dist/language/value-tables.d.ts.map +1 -0
  116. package/dist/language/value-tables.js +240 -0
  117. package/dist/language/value-tables.js.map +1 -0
  118. package/dist/language/waves-order.d.ts +51 -0
  119. package/dist/language/waves-order.d.ts.map +1 -0
  120. package/dist/language/waves-order.js +787 -0
  121. package/dist/language/waves-order.js.map +1 -0
  122. package/dist/language/waves-plan.d.ts +45 -0
  123. package/dist/language/waves-plan.d.ts.map +1 -0
  124. package/dist/language/waves-plan.js +64 -0
  125. package/dist/language/waves-plan.js.map +1 -0
  126. package/dist/language/waves.d.ts +96 -0
  127. package/dist/language/waves.d.ts.map +1 -0
  128. package/dist/language/waves.js +575 -0
  129. package/dist/language/waves.js.map +1 -0
  130. package/dist/util/props.d.ts +27 -0
  131. package/dist/util/props.d.ts.map +1 -0
  132. package/dist/util/props.js +49 -0
  133. package/dist/util/props.js.map +1 -0
  134. package/dist/util/single-line.d.ts +14 -0
  135. package/dist/util/single-line.d.ts.map +1 -0
  136. package/dist/util/single-line.js +16 -0
  137. package/dist/util/single-line.js.map +1 -0
  138. package/package.json +7 -3
  139. package/src/convert/printer.ts +20 -10
  140. package/src/convert/schema.ts +8 -1
  141. package/src/generated/ast.ts +159 -27
  142. package/src/generated/grammar.ts +434 -148
  143. package/src/i18n/codes.ts +95 -2
  144. package/src/i18n/index.ts +1 -0
  145. package/src/i18n/messages.en.ts +300 -1
  146. package/src/i18n/messages.fr.ts +335 -1
  147. package/src/i18n/wave-message-types.ts +206 -0
  148. package/src/index.ts +33 -0
  149. package/src/internal.ts +9 -0
  150. package/src/language/ast-walk.ts +158 -0
  151. package/src/language/calendar-declarations.ts +141 -0
  152. package/src/language/include-references.ts +49 -0
  153. package/src/language/include-resolver.ts +284 -10
  154. package/src/language/include-waves.ts +419 -0
  155. package/src/language/nowline-validator.ts +98 -1835
  156. package/src/language/nowline.langium +56 -22
  157. package/src/language/references.ts +40 -0
  158. package/src/language/style-chain.ts +95 -0
  159. package/src/language/validator/calendar.ts +319 -0
  160. package/src/language/validator/entities.ts +366 -0
  161. package/src/language/validator/properties.ts +425 -0
  162. package/src/language/validator/references.ts +295 -0
  163. package/src/language/validator/structure.ts +206 -0
  164. package/src/language/validator/style.ts +149 -0
  165. package/src/language/validator/support.ts +84 -0
  166. package/src/language/validator/symbols.ts +141 -0
  167. package/src/language/validator/tables.ts +171 -0
  168. package/src/language/validator-utils.ts +123 -0
  169. package/src/language/value-tables.ts +260 -0
  170. package/src/language/waves-order.ts +879 -0
  171. package/src/language/waves-plan.ts +101 -0
  172. package/src/language/waves.ts +731 -0
  173. package/src/util/props.ts +59 -0
  174. package/src/util/single-line.ts +15 -0
@@ -0,0 +1,240 @@
1
+ // The fixed vocabularies the validator checks keys and values against and
2
+ // the editor offers as completions (specs/core-ast-utilities.md §3.5). One
3
+ // definition for core, layout and the LSP, so the accepted spellings cannot
4
+ // drift between them. Exported only through `@nowline/core/internal`. A leaf module: it
5
+ // imports only `calendar-declarations.ts`, for the weekday names.
6
+ /**
7
+ * Built-in status vocabulary. `active` and `completed` are international-
8
+ * friendly aliases for `in-progress` and `done` respectively: they
9
+ * canonicalize at the layout boundary (see statusFromProp in layout.ts) so
10
+ * downstream consumers see a single normalized form. Both spellings remain
11
+ * valid input.
12
+ */
13
+ export const BUILTIN_STATUSES = [
14
+ 'planned',
15
+ 'in-progress',
16
+ 'active',
17
+ 'done',
18
+ 'completed',
19
+ 'at-risk',
20
+ 'blocked',
21
+ ];
22
+ /**
23
+ * Built-in `capacity-icon:` vocabulary. Renderer-curated SVG glyphs, plus
24
+ * `multiplier` (drawn as the U+00D7 text character) and `none` (suppresses
25
+ * the glyph).
26
+ */
27
+ export const BUILTIN_CAPACITY_ICONS = [
28
+ 'none',
29
+ 'multiplier',
30
+ 'person',
31
+ 'people',
32
+ 'points',
33
+ 'time',
34
+ ];
35
+ /**
36
+ * Built-in `icon:` vocabulary: the capacity-icon names plus the entity-
37
+ * decoration glyphs the renderer ships. `calendar` is the glyph the inline-
38
+ * date pin path (`after:DATE` / `before:DATE`) draws onto items, parallels
39
+ * and groups; reserving it keeps a `symbol calendar` declaration from
40
+ * shadowing it.
41
+ */
42
+ export const BUILTIN_ICON_NAMES = [
43
+ ...BUILTIN_CAPACITY_ICONS,
44
+ 'shield',
45
+ 'warning',
46
+ 'lock',
47
+ 'calendar',
48
+ ];
49
+ /**
50
+ * Values of the `non-working:` display key on `default roadmap`
51
+ * (specs/working-calendar.md §4.2), in documentation order.
52
+ */
53
+ export const NON_WORKING_DISPLAYS = ['hide', 'show'];
54
+ /**
55
+ * Values of each enumerated style key (specs/dsl.md rule 19), in
56
+ * documentation order. `non-working:` is not here: it has its own table and
57
+ * its own error code. Colour keys (`bg`, `fg`, `text`) take `COLOR_NAMES` or
58
+ * a hex value instead.
59
+ */
60
+ export const STYLE_PROP_ENUMS = {
61
+ border: ['solid', 'dashed', 'dotted'],
62
+ shadow: ['none', 'subtle', 'soft', 'hard'],
63
+ font: ['sans', 'serif', 'mono'],
64
+ weight: ['thin', 'light', 'normal', 'bold'],
65
+ italic: ['true', 'false'],
66
+ 'text-size': ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
67
+ padding: ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
68
+ spacing: ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
69
+ 'header-height': ['none', 'xs', 'sm', 'md', 'lg', 'xl'],
70
+ 'corner-radius': ['none', 'xs', 'sm', 'md', 'lg', 'xl', 'full'],
71
+ bracket: ['none', 'solid', 'dashed'],
72
+ 'header-position': ['beside', 'above'],
73
+ 'timeline-position': ['top', 'bottom', 'both'],
74
+ 'minor-grid': ['true', 'false'],
75
+ };
76
+ /**
77
+ * Built-in colour vocabulary for `bg`, `fg` and `text`. `grey` and `violet`
78
+ * are international-friendly aliases for `gray` and `purple`: they
79
+ * canonicalize at the theme boundary (resolveColor in
80
+ * packages/layout/src/themes/index.ts) so themes don't grow new fields. Both
81
+ * spellings remain valid input.
82
+ */
83
+ export const COLOR_NAMES = [
84
+ 'red',
85
+ 'blue',
86
+ 'yellow',
87
+ 'green',
88
+ 'orange',
89
+ 'purple',
90
+ 'violet',
91
+ 'gray',
92
+ 'grey',
93
+ 'navy',
94
+ 'white',
95
+ 'none',
96
+ ];
97
+ /** Values of `calendar:` on the `roadmap` line. */
98
+ export const CALENDAR_MODES = ['business', 'full', 'custom'];
99
+ /** Values of `config:` and `roadmap:` on an `include` line. */
100
+ export const INCLUDE_MODES = ['merge', 'ignore', 'isolate'];
101
+ /**
102
+ * Keys a style block or `default` line may set (specs/dsl.md style table).
103
+ * The enumerated ones take `STYLE_PROP_ENUMS`; `bg`, `fg` and `text` take a
104
+ * colour.
105
+ */
106
+ export const STYLE_PROP_KEYS = [
107
+ 'bg',
108
+ 'fg',
109
+ 'text',
110
+ 'border',
111
+ 'icon',
112
+ 'shadow',
113
+ 'font',
114
+ 'weight',
115
+ 'italic',
116
+ 'text-size',
117
+ 'padding',
118
+ 'spacing',
119
+ 'header-height',
120
+ 'corner-radius',
121
+ 'bracket',
122
+ 'header-position',
123
+ 'capacity-icon',
124
+ 'timeline-position',
125
+ 'minor-grid',
126
+ 'non-working',
127
+ ];
128
+ /**
129
+ * Style keys only the roadmap reads (specs/dsl.md style table). On another
130
+ * entity's `default` line they are a silent no-op, so they warn (NL.W0703).
131
+ * Style blocks are not checked: one block can be referenced by the roadmap
132
+ * and by other entities alike, so the key there is not necessarily wrong.
133
+ */
134
+ export const ROADMAP_ONLY_STYLE_KEYS = [
135
+ 'header-height',
136
+ 'header-position',
137
+ 'timeline-position',
138
+ 'minor-grid',
139
+ 'non-working',
140
+ ];
141
+ /**
142
+ * `utilization-warn-at:` / `utilization-over-at:` accept the literal `none`
143
+ * to opt out of that color band (per specs/dsl.md rule 17d). Numeric forms
144
+ * (positive percent, decimal, integer) are validated separately.
145
+ */
146
+ export const UTILIZATION_NONE = 'none';
147
+ /** Keys of a `calendar` block. */
148
+ export const CALENDAR_FIELDS = [
149
+ 'days-per-week',
150
+ 'days-per-month',
151
+ 'days-per-quarter',
152
+ 'days-per-year',
153
+ ];
154
+ /** Keys of a `scale` block. */
155
+ export const SCALE_FIELDS = ['name', 'label-every', 'label'];
156
+ /** Entity types a `default <entity>` line may name. */
157
+ export const DEFAULT_ENTITY_TYPES = [
158
+ 'item',
159
+ 'label',
160
+ 'swimlane',
161
+ 'roadmap',
162
+ 'milestone',
163
+ 'footnote',
164
+ 'anchor',
165
+ 'parallel',
166
+ 'group',
167
+ ];
168
+ /**
169
+ * Properties every entity declaration may carry (`specs/dsl.md` § Universal
170
+ * Properties). `description` is technically a sub-directive (`description
171
+ * "text"` indented under the entity), not an EntityProperty, but we accept it
172
+ * here too: authors who type `description:"text"` as a property aren't doing
173
+ * anything meaningful, but the typo is common enough that warning on it adds
174
+ * noise rather than signal — the value is at least carried into the AST and
175
+ * could be surfaced later if we choose to.
176
+ */
177
+ export const UNIVERSAL_ENTITY_PROPS = ['labels', 'link', 'style', 'description'];
178
+ /**
179
+ * Properties each entity declaration's `properties: EntityProperty[]` bag
180
+ * actually consumes downstream, keyed by the declaration's AST `$type`.
181
+ * Sourced from (a) the property tables in `specs/dsl.md` and (b) every
182
+ * `propValue(...)`/`propValues(...)` call site in `packages/layout/`. Keys
183
+ * outside this table + `UNIVERSAL_ENTITY_PROPS` are silently dropped by the
184
+ * layout — `checkUnknownEntityProperties` warns on them so authors notice
185
+ * typos like `now:2026-01-25` on a `roadmap` line.
186
+ *
187
+ * Raw style props (`bg`, `fg`, ...) intentionally stay OUT of this map — they
188
+ * are rejected as errors by `checkNoRawStyleProperties` and the unknown-
189
+ * property check short-circuits on them so authors don't see a duplicate
190
+ * diagnostic.
191
+ */
192
+ export const ENTITY_KNOWN_PROPS = {
193
+ RoadmapDeclaration: ['author', 'start', 'length', 'scale', 'calendar', 'logo', 'logo-size'],
194
+ AnchorDeclaration: ['date'],
195
+ SwimlaneDeclaration: [
196
+ 'owner',
197
+ 'capacity',
198
+ 'utilization-warn-at',
199
+ 'utilization-over-at',
200
+ 'status',
201
+ 'after',
202
+ 'before',
203
+ ],
204
+ // An item has no `date:` or `start:`: it cannot be pinned to a fixed start
205
+ // date (`specs/dsl.md` § Item Properties, "Pinning is not supported"), so
206
+ // both keys draw the unknown-property warning with an `after:<date>` hint.
207
+ ItemDeclaration: [
208
+ 'size',
209
+ 'duration',
210
+ 'status',
211
+ 'owner',
212
+ 'after',
213
+ 'before',
214
+ 'remaining',
215
+ 'capacity',
216
+ ],
217
+ // size/duration/remaining/capacity on parallel/group are already errors via
218
+ // `checkNoComputedProperties`, so we don't list them here.
219
+ ParallelBlock: ['owner', 'after', 'before', 'status'],
220
+ GroupBlock: ['owner', 'after', 'before', 'status'],
221
+ MilestoneDeclaration: ['date', 'after'],
222
+ FootnoteDeclaration: ['on'],
223
+ PersonDeclaration: [],
224
+ TeamDeclaration: [],
225
+ LabelDeclaration: [],
226
+ SizeDeclaration: ['effort'],
227
+ StatusDeclaration: [],
228
+ // The other keys a wave takes are universal; the keys it may not take
229
+ // are NL.E1105 (`isWaveBannedProperty`), owned by the wave rules.
230
+ WaveDeclaration: ['after'],
231
+ };
232
+ /**
233
+ * Allow-listed property keys on the `nowline` directive line. The directive
234
+ * existed historically as `nowline v1` only; properties are a forward-
235
+ * extension point but stay restrictive so authors get an early error instead
236
+ * of typos rendering silently.
237
+ */
238
+ export const DIRECTIVE_FIELDS = ['locale'];
239
+ export { WEEKDAYS } from './calendar-declarations.js';
240
+ //# sourceMappingURL=value-tables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-tables.js","sourceRoot":"","sources":["../../src/language/value-tables.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,2EAA2E;AAC3E,4EAA4E;AAC5E,wFAAwF;AACxF,kEAAkE;AAElE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IAC/C,SAAS;IACT,aAAa;IACb,QAAQ;IACR,MAAM;IACN,WAAW;IACX,SAAS;IACT,SAAS;CACZ,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACrD,MAAM;IACN,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;CACT,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACjD,GAAG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BAAgB,GAAsB,CAAC,QAAQ,CAAC,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,51 @@
1
+ import type { SwimlaneDeclaration, WaveDeclaration } from '../generated/ast.js';
2
+ import { type WaveFinding, type WaveRefLookup } from './waves.js';
3
+ /** A layout scope for `evaluateWaveOrder`. */
4
+ export interface WaveOrderScope {
5
+ /**
6
+ * Lanes in the order layout places them. They may come from several
7
+ * files; an id reused across them resolves last-writer-wins, as in
8
+ * layout's shared edge maps.
9
+ */
10
+ lanes: readonly SwimlaneDeclaration[];
11
+ /**
12
+ * Resolves an id that is not placed work (anchors, milestones) to its
13
+ * declaration. Used to tell floating milestones, which layout ignores,
14
+ * from anchors and dated milestones, which it resolves.
15
+ */
16
+ lookup: WaveRefLookup;
17
+ }
18
+ /** Options for `evaluateWaveOrder`. */
19
+ export interface WaveOrderOptions {
20
+ /**
21
+ * Leave a reference that closes an explicit `after:`/`before:` cycle to
22
+ * the circular-dependency check (default true). That check runs per
23
+ * file, so the include resolver passes false for its merged scopes: a
24
+ * cycle that crosses files would otherwise go unreported.
25
+ */
26
+ suppressCycleRefs?: boolean;
27
+ }
28
+ /**
29
+ * The G rules (WV10-WV12) over one layout scope. `waves` is the roadmap's
30
+ * wave list in declaration order (`ownWaves`); with no waves there are no
31
+ * findings.
32
+ *
33
+ * - WV10 (NL.E1103). Lower bounds `lbS`/`lbE` per §6.3, relaxed to a fixpoint
34
+ * with a worklist. An item in wave k whose `lbS` reaches k is a violation.
35
+ * Each root cause is reported once, as `after-wave`, `after-item`,
36
+ * `sequence`, `join` or `chain`; a violation whose every achieving edge
37
+ * comes from an already explained violation is folded into that run. A
38
+ * `sequence` run lists the items of one wave, so it is kept per
39
+ * predecessor and wave.
40
+ * - WV11 (NL.W1100). A `before:` whose target is placed earlier, or a wave,
41
+ * that the barrier makes unmeetable.
42
+ * - WV12 (NL.W1101). An `after:` or `before:` naming work layout has not
43
+ * placed yet, or a floating milestone. A reference that closes an explicit
44
+ * `after:`/`before:` cycle is left to the circular-dependency check, unless
45
+ * `options.suppressCycleRefs` is false.
46
+ *
47
+ * Swimlane `after:`/`before:` are not implemented by any engine and are
48
+ * ignored here.
49
+ */
50
+ export declare function evaluateWaveOrder(scope: WaveOrderScope, waves: readonly WaveDeclaration[], options?: WaveOrderOptions): WaveFinding[];
51
+ //# sourceMappingURL=waves-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waves-order.d.ts","sourceRoot":"","sources":["../../src/language/waves-order.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAKR,mBAAmB,EACnB,eAAe,EAClB,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,EAAe,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE/E,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC3B;;;;OAIG;IACH,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACtC;;;;OAIG;IACH,MAAM,EAAE,aAAa,CAAC;CACzB;AAED,uCAAuC;AACvC,MAAM,WAAW,gBAAgB;IAC7B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAmGD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAC7B,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,OAAO,GAAE,gBAAqB,GAC/B,WAAW,EAAE,CA0lBf"}