@formicoidea/labre-framework-ddd-core-domain 0.41.0 → 0.42.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/LICENSE +384 -0
- package/dist/commands.d.ts +15 -0
- package/dist/commands.js +76 -7
- package/dist/core-domain/background.js +26 -5
- package/dist/core-domain/element-view.d.ts +11 -2
- package/dist/core-domain/element-view.js +12 -3
- package/dist/core-domain/toolbar-config.d.ts +22 -1
- package/dist/core-domain/toolbar-config.js +38 -34
- package/dist/toolbar/palette.d.ts +31 -0
- package/dist/toolbar/palette.js +104 -0
- package/dist/toolbar/senior-button.d.ts +1 -0
- package/dist/toolbar/senior-button.js +1 -0
- package/dist/translations.d.ts +0 -11
- package/dist/translations.js +11 -21
- package/dist/view.d.ts +6 -3
- package/dist/view.js +20 -14
- package/package.json +3 -3
- package/dist/core-domain/legend.d.ts +0 -29
- package/dist/core-domain/legend.js +0 -84
package/LICENSE
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Mozilla Public License Version 2.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) TOEVERYTHING PTE. LTD. and its affiliates.
|
|
4
|
+
|
|
5
|
+
1. Definitions
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
1.1. "Contributor"
|
|
10
|
+
means each individual or legal entity that creates, contributes to
|
|
11
|
+
the creation of, or owns Covered Software.
|
|
12
|
+
|
|
13
|
+
1.2. "Contributor Version"
|
|
14
|
+
means the combination of the Contributions of others (if any) used
|
|
15
|
+
by a Contributor and that particular Contributor's Contribution.
|
|
16
|
+
|
|
17
|
+
1.3. "Contribution"
|
|
18
|
+
means Covered Software of a particular Contributor.
|
|
19
|
+
|
|
20
|
+
1.4. "Covered Software"
|
|
21
|
+
means Source Code Form to which the initial Contributor has attached
|
|
22
|
+
the notice in Exhibit A, the Executable Form of such Source Code
|
|
23
|
+
Form, and Modifications of such Source Code Form, in each case
|
|
24
|
+
including portions thereof.
|
|
25
|
+
|
|
26
|
+
1.5. "Incompatible With Secondary Licenses"
|
|
27
|
+
means
|
|
28
|
+
|
|
29
|
+
(a) that the initial Contributor has attached the notice described
|
|
30
|
+
in Exhibit B to the Covered Software; or
|
|
31
|
+
|
|
32
|
+
(b) that the Covered Software was made available under the terms of
|
|
33
|
+
version 1.1 or earlier of the License, but not also under the
|
|
34
|
+
terms of a Secondary License.
|
|
35
|
+
|
|
36
|
+
1.6. "Executable Form"
|
|
37
|
+
means any form of the work other than Source Code Form.
|
|
38
|
+
|
|
39
|
+
1.7. "Larger Work"
|
|
40
|
+
means a work that combines Covered Software with other material, in
|
|
41
|
+
a separate file or files, that is not Covered Software.
|
|
42
|
+
|
|
43
|
+
1.8. "License"
|
|
44
|
+
means this document.
|
|
45
|
+
|
|
46
|
+
1.9. "Licensable"
|
|
47
|
+
means having the right to grant, to the maximum extent possible,
|
|
48
|
+
whether at the time of the initial grant or subsequently, any and
|
|
49
|
+
all of the rights conveyed by this License.
|
|
50
|
+
|
|
51
|
+
1.10. "Modifications"
|
|
52
|
+
means any of the following:
|
|
53
|
+
|
|
54
|
+
(a) any file in Source Code Form that results from an addition to,
|
|
55
|
+
deletion from, or modification of the contents of Covered
|
|
56
|
+
Software; or
|
|
57
|
+
|
|
58
|
+
(b) any new file in Source Code Form that contains any Covered
|
|
59
|
+
Software.
|
|
60
|
+
|
|
61
|
+
1.11. "Patent Claims" of a Contributor
|
|
62
|
+
means any patent claim(s), including without limitation, method,
|
|
63
|
+
process, and apparatus claims, in any patent Licensable by such
|
|
64
|
+
Contributor that would be infringed, but for the grant of the
|
|
65
|
+
License, by the making, using, selling, offering for sale, having
|
|
66
|
+
made, import, or transfer of either its Contributions or its
|
|
67
|
+
Contributor Version.
|
|
68
|
+
|
|
69
|
+
1.12. "Secondary License"
|
|
70
|
+
means either the GNU General Public License, Version 2.0, the GNU
|
|
71
|
+
Lesser General Public License, Version 2.1, the GNU Affero General
|
|
72
|
+
Public License, Version 3.0, or any later versions of those
|
|
73
|
+
licenses.
|
|
74
|
+
|
|
75
|
+
1.13. "Source Code Form"
|
|
76
|
+
means the form of the work preferred for making modifications.
|
|
77
|
+
|
|
78
|
+
1.14. "You" (or "Your")
|
|
79
|
+
means an individual or a legal entity exercising rights under this
|
|
80
|
+
License. For legal entities, "You" includes any entity that
|
|
81
|
+
controls, is controlled by, or is under common control with You. For
|
|
82
|
+
purposes of this definition, "control" means (a) the power, direct
|
|
83
|
+
or indirect, to cause the direction or management of such entity,
|
|
84
|
+
whether by contract or otherwise, or (b) ownership of more than
|
|
85
|
+
fifty percent (50%) of the outstanding shares or beneficial
|
|
86
|
+
ownership of such entity.
|
|
87
|
+
|
|
88
|
+
2. License Grants and Conditions
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
2.1. Grants
|
|
93
|
+
|
|
94
|
+
Each Contributor hereby grants You a world-wide, royalty-free,
|
|
95
|
+
non-exclusive license:
|
|
96
|
+
|
|
97
|
+
(a) under intellectual property rights (other than patent or trademark)
|
|
98
|
+
Licensable by such Contributor to use, reproduce, make available,
|
|
99
|
+
modify, display, perform, distribute, and otherwise exploit its
|
|
100
|
+
Contributions, either on an unmodified basis, with Modifications, or
|
|
101
|
+
as part of a Larger Work; and
|
|
102
|
+
|
|
103
|
+
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
|
104
|
+
for sale, have made, import, and otherwise transfer either its
|
|
105
|
+
Contributions or its Contributor Version.
|
|
106
|
+
|
|
107
|
+
2.2. Effective Date
|
|
108
|
+
|
|
109
|
+
The licenses granted in Section 2.1 with respect to any Contribution
|
|
110
|
+
become effective for each Contribution on the date the Contributor first
|
|
111
|
+
distributes such Contribution.
|
|
112
|
+
|
|
113
|
+
2.3. Limitations on Grant Scope
|
|
114
|
+
|
|
115
|
+
The licenses granted in this Section 2 are the only rights granted under
|
|
116
|
+
this License. No additional rights or licenses will be implied from the
|
|
117
|
+
distribution or licensing of Covered Software under this License.
|
|
118
|
+
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
|
119
|
+
Contributor:
|
|
120
|
+
|
|
121
|
+
(a) for any code that a Contributor has removed from Covered Software;
|
|
122
|
+
or
|
|
123
|
+
|
|
124
|
+
(b) for infringements caused by: (i) Your and any other third party's
|
|
125
|
+
modifications of Covered Software, or (ii) the combination of its
|
|
126
|
+
Contributions with other software (except as part of its Contributor
|
|
127
|
+
Version); or
|
|
128
|
+
|
|
129
|
+
(c) under Patent Claims infringed by Covered Software in the absence of
|
|
130
|
+
its Contributions.
|
|
131
|
+
|
|
132
|
+
This License does not grant any rights in the trademarks, service marks,
|
|
133
|
+
or logos of any Contributor (except as may be necessary to comply with
|
|
134
|
+
the notice requirements in Section 3.4).
|
|
135
|
+
|
|
136
|
+
2.4. Subsequent Licenses
|
|
137
|
+
|
|
138
|
+
No Contributor makes additional grants as a result of Your choice to
|
|
139
|
+
distribute the Covered Software under a subsequent version of this
|
|
140
|
+
License (see Section 10.2) or under the terms of a Secondary License (if
|
|
141
|
+
permitted under the terms of Section 3.3).
|
|
142
|
+
|
|
143
|
+
2.5. Representation
|
|
144
|
+
|
|
145
|
+
Each Contributor represents that the Contributor believes its
|
|
146
|
+
Contributions are its original creation(s) or it has sufficient rights
|
|
147
|
+
to grant the rights to its Contributions conveyed by this License.
|
|
148
|
+
|
|
149
|
+
2.6. Fair Use
|
|
150
|
+
|
|
151
|
+
This License is not intended to limit any rights You have under
|
|
152
|
+
applicable copyright doctrines of fair use, fair dealing, or other
|
|
153
|
+
equivalents.
|
|
154
|
+
|
|
155
|
+
2.7. Conditions
|
|
156
|
+
|
|
157
|
+
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
|
158
|
+
in Section 2.1.
|
|
159
|
+
|
|
160
|
+
3. Responsibilities
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
3.1. Distribution of Source Form
|
|
165
|
+
|
|
166
|
+
All distribution of Covered Software in Source Code Form, including any
|
|
167
|
+
Modifications that You create or to which You contribute, must be under
|
|
168
|
+
the terms of this License. You must inform recipients that the Source
|
|
169
|
+
Code Form of the Covered Software is governed by the terms of this
|
|
170
|
+
License, and how they can obtain a copy of this License. You may not
|
|
171
|
+
attempt to alter or restrict the recipients' rights in the Source Code
|
|
172
|
+
Form.
|
|
173
|
+
|
|
174
|
+
3.2. Distribution of Executable Form
|
|
175
|
+
|
|
176
|
+
If You distribute Covered Software in Executable Form then:
|
|
177
|
+
|
|
178
|
+
(a) such Covered Software must also be made available in Source Code
|
|
179
|
+
Form, as described in Section 3.1, and You must inform recipients of
|
|
180
|
+
the Executable Form how they can obtain a copy of such Source Code
|
|
181
|
+
Form by reasonable means in a timely manner, at a charge no more
|
|
182
|
+
than the cost of distribution to the recipient; and
|
|
183
|
+
|
|
184
|
+
(b) You may distribute such Executable Form under the terms of this
|
|
185
|
+
License, or sublicense it under different terms, provided that the
|
|
186
|
+
license for the Executable Form does not attempt to limit or alter
|
|
187
|
+
the recipients' rights in the Source Code Form under this License.
|
|
188
|
+
|
|
189
|
+
3.3. Distribution of a Larger Work
|
|
190
|
+
|
|
191
|
+
You may create and distribute a Larger Work under terms of Your choice,
|
|
192
|
+
provided that You also comply with the requirements of this License for
|
|
193
|
+
the Covered Software. If the Larger Work is a combination of Covered
|
|
194
|
+
Software with a work governed by one or more Secondary Licenses, and the
|
|
195
|
+
Covered Software is not Incompatible With Secondary Licenses, this
|
|
196
|
+
License permits You to additionally distribute such Covered Software
|
|
197
|
+
under the terms of such Secondary License(s), so that the recipient of
|
|
198
|
+
the Larger Work may, at their option, further distribute the Covered
|
|
199
|
+
Software under the terms of either this License or such Secondary
|
|
200
|
+
License(s).
|
|
201
|
+
|
|
202
|
+
3.4. Notices
|
|
203
|
+
|
|
204
|
+
You may not remove or alter the substance of any license notices
|
|
205
|
+
(including copyright notices, patent notices, disclaimers of warranty,
|
|
206
|
+
or limitations of liability) contained within the Source Code Form of
|
|
207
|
+
the Covered Software, except that You may alter any license notices to
|
|
208
|
+
the extent required to remedy known factual inaccuracies.
|
|
209
|
+
|
|
210
|
+
3.5. Application of Additional Terms
|
|
211
|
+
|
|
212
|
+
You may choose to offer, and to charge a fee for, warranty, support,
|
|
213
|
+
indemnity or liability obligations to one or more recipients of Covered
|
|
214
|
+
Software. However, You may do so only on Your own behalf, and not on
|
|
215
|
+
behalf of any Contributor. You must make it absolutely clear that any
|
|
216
|
+
such warranty, support, indemnity, or liability obligation is offered by
|
|
217
|
+
You alone, and You hereby agree to indemnify every Contributor for any
|
|
218
|
+
liability incurred by such Contributor as a result of warranty, support,
|
|
219
|
+
indemnity or liability terms You offer. You may include additional
|
|
220
|
+
disclaimers of warranty and limitations of liability specific to any
|
|
221
|
+
jurisdiction.
|
|
222
|
+
|
|
223
|
+
4. Inability to Comply Due to Statute or Regulation
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
If it is impossible for You to comply with any of the terms of this
|
|
228
|
+
License with respect to some or all of the Covered Software due to
|
|
229
|
+
statute, judicial order, or regulation then You must: (a) comply with
|
|
230
|
+
the terms of this License to the maximum extent possible; and (b)
|
|
231
|
+
describe the limitations and the code they affect. Such description must
|
|
232
|
+
be placed in a text file included with all distributions of the Covered
|
|
233
|
+
Software under this License. Except to the extent prohibited by statute
|
|
234
|
+
or regulation, such description must be sufficiently detailed for a
|
|
235
|
+
recipient of ordinary skill to be able to understand it.
|
|
236
|
+
|
|
237
|
+
5. Termination
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
5.1. The rights granted under this License will terminate automatically
|
|
242
|
+
if You fail to comply with any of its terms. However, if You become
|
|
243
|
+
compliant, then the rights granted under this License from a particular
|
|
244
|
+
Contributor are reinstated (a) provisionally, unless and until such
|
|
245
|
+
Contributor explicitly and finally terminates Your grants, and (b) on an
|
|
246
|
+
ongoing basis, if such Contributor fails to notify You of the
|
|
247
|
+
non-compliance by some reasonable means prior to 60 days after You have
|
|
248
|
+
come back into compliance. Moreover, Your grants from a particular
|
|
249
|
+
Contributor are reinstated on an ongoing basis if such Contributor
|
|
250
|
+
notifies You of the non-compliance by some reasonable means, this is the
|
|
251
|
+
first time You have received notice of non-compliance with this License
|
|
252
|
+
from such Contributor, and You become compliant prior to 30 days after
|
|
253
|
+
Your receipt of the notice.
|
|
254
|
+
|
|
255
|
+
5.2. If You initiate litigation against any entity by asserting a patent
|
|
256
|
+
infringement claim (excluding declaratory judgment actions,
|
|
257
|
+
counter-claims, and cross-claims) alleging that a Contributor Version
|
|
258
|
+
directly or indirectly infringes any patent, then the rights granted to
|
|
259
|
+
You by any and all Contributors for the Covered Software under Section
|
|
260
|
+
2.1 of this License shall terminate.
|
|
261
|
+
|
|
262
|
+
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
|
263
|
+
end user license agreements (excluding distributors and resellers) which
|
|
264
|
+
have been validly granted by You or Your distributors under this License
|
|
265
|
+
prior to termination shall survive termination.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
- *
|
|
270
|
+
- 6. Disclaimer of Warranty \*
|
|
271
|
+
- ------------------------- \*
|
|
272
|
+
- *
|
|
273
|
+
- Covered Software is provided under this License on an "as is" \*
|
|
274
|
+
- basis, without warranty of any kind, either expressed, implied, or \*
|
|
275
|
+
- statutory, including, without limitation, warranties that the \*
|
|
276
|
+
- Covered Software is free of defects, merchantable, fit for a \*
|
|
277
|
+
- particular purpose or non-infringing. The entire risk as to the \*
|
|
278
|
+
- quality and performance of the Covered Software is with You. \*
|
|
279
|
+
- Should any Covered Software prove defective in any respect, You \*
|
|
280
|
+
- (not any Contributor) assume the cost of any necessary servicing, \*
|
|
281
|
+
- repair, or correction. This disclaimer of warranty constitutes an \*
|
|
282
|
+
- essential part of this License. No use of any Covered Software is \*
|
|
283
|
+
- authorized under this License except under this disclaimer. \*
|
|
284
|
+
- *
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
- *
|
|
291
|
+
- 7. Limitation of Liability \*
|
|
292
|
+
- -------------------------- \*
|
|
293
|
+
- *
|
|
294
|
+
- Under no circumstances and under no legal theory, whether tort \*
|
|
295
|
+
- (including negligence), contract, or otherwise, shall any \*
|
|
296
|
+
- Contributor, or anyone who distributes Covered Software as \*
|
|
297
|
+
- permitted above, be liable to You for any direct, indirect, \*
|
|
298
|
+
- special, incidental, or consequential damages of any character \*
|
|
299
|
+
- including, without limitation, damages for lost profits, loss of \*
|
|
300
|
+
- goodwill, work stoppage, computer failure or malfunction, or any \*
|
|
301
|
+
- and all other commercial damages or losses, even if such party \*
|
|
302
|
+
- shall have been informed of the possibility of such damages. This \*
|
|
303
|
+
- limitation of liability shall not apply to liability for death or \*
|
|
304
|
+
- personal injury resulting from such party's negligence to the \*
|
|
305
|
+
- extent applicable law prohibits such limitation. Some \*
|
|
306
|
+
- jurisdictions do not allow the exclusion or limitation of \*
|
|
307
|
+
- incidental or consequential damages, so this exclusion and \*
|
|
308
|
+
- limitation may not apply to You. \*
|
|
309
|
+
- *
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
8. Litigation
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
Any litigation relating to this License may be brought only in the
|
|
318
|
+
courts of a jurisdiction where the defendant maintains its principal
|
|
319
|
+
place of business and such litigation shall be governed by laws of that
|
|
320
|
+
jurisdiction, without reference to its conflict-of-law provisions.
|
|
321
|
+
Nothing in this Section shall prevent a party's ability to bring
|
|
322
|
+
cross-claims or counter-claims.
|
|
323
|
+
|
|
324
|
+
9. Miscellaneous
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
This License represents the complete agreement concerning the subject
|
|
329
|
+
matter hereof. If any provision of this License is held to be
|
|
330
|
+
unenforceable, such provision shall be reformed only to the extent
|
|
331
|
+
necessary to make it enforceable. Any law or regulation which provides
|
|
332
|
+
that the language of a contract shall be construed against the drafter
|
|
333
|
+
shall not be used to construe this License against a Contributor.
|
|
334
|
+
|
|
335
|
+
10. Versions of the License
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
10.1. New Versions
|
|
340
|
+
|
|
341
|
+
Mozilla Foundation is the license steward. Except as provided in Section
|
|
342
|
+
10.3, no one other than the license steward has the right to modify or
|
|
343
|
+
publish new versions of this License. Each version will be given a
|
|
344
|
+
distinguishing version number.
|
|
345
|
+
|
|
346
|
+
10.2. Effect of New Versions
|
|
347
|
+
|
|
348
|
+
You may distribute the Covered Software under the terms of the version
|
|
349
|
+
of the License under which You originally received the Covered Software,
|
|
350
|
+
or under the terms of any subsequent version published by the license
|
|
351
|
+
steward.
|
|
352
|
+
|
|
353
|
+
10.3. Modified Versions
|
|
354
|
+
|
|
355
|
+
If you create software not governed by this License, and you want to
|
|
356
|
+
create a new license for such software, you may create and use a
|
|
357
|
+
modified version of this License if you rename the license and remove
|
|
358
|
+
any references to the name of the license steward (except to note that
|
|
359
|
+
such modified license differs from this License).
|
|
360
|
+
|
|
361
|
+
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
|
362
|
+
Licenses
|
|
363
|
+
|
|
364
|
+
If You choose to distribute Source Code Form that is Incompatible With
|
|
365
|
+
Secondary Licenses under the terms of this version of the License, the
|
|
366
|
+
notice described in Exhibit B of this License must be attached.
|
|
367
|
+
|
|
368
|
+
## Exhibit A - Source Code Form License Notice
|
|
369
|
+
|
|
370
|
+
This Source Code Form is subject to the terms of the Mozilla Public
|
|
371
|
+
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
372
|
+
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
373
|
+
|
|
374
|
+
If it is not possible or desirable to put the notice in a particular
|
|
375
|
+
file, then You may include the notice in a location (such as a LICENSE
|
|
376
|
+
file in a relevant directory) where a recipient would be likely to look
|
|
377
|
+
for such a notice.
|
|
378
|
+
|
|
379
|
+
You may add additional accurate notices of copyright ownership.
|
|
380
|
+
|
|
381
|
+
## Exhibit B - "Incompatible With Secondary Licenses" Notice
|
|
382
|
+
|
|
383
|
+
This Source Code Form is "Incompatible With Secondary Licenses", as
|
|
384
|
+
defined by the Mozilla Public License, v. 2.0.
|
package/dist/commands.d.ts
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
+
import { type ChromeWording } from '@formicoidea/labre-core/shared/services';
|
|
1
2
|
import type { CommandDescriptor } from '@formicoidea/labre-core/std';
|
|
2
3
|
import { type TemplateResult } from 'lit';
|
|
4
|
+
/**
|
|
5
|
+
* The automatic legend's own section titles — text stamped onto the chart the
|
|
6
|
+
* moment the legend is built, like any other seed, and declared HERE because
|
|
7
|
+
* the rows that file themselves under them are subscribed by the commands
|
|
8
|
+
* below. The box title itself is not one of them: it says the shared word
|
|
9
|
+
* "Legend" and reuses `BOARD_LEGEND_TITLE`.
|
|
10
|
+
*
|
|
11
|
+
* Three sub-titles for a framework whose ten commands all sit in ONE category:
|
|
12
|
+
* `section` is what keeps them, and in particular the one that explains the
|
|
13
|
+
* C/X/F letters (`docs/adr/0026`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS: ChromeWording;
|
|
16
|
+
export declare const CORE_DOMAIN_SEED_LEGEND_TEAM_MODES: ChromeWording;
|
|
17
|
+
export declare const CORE_DOMAIN_SEED_LEGEND_MOVEMENT: ChromeWording;
|
|
3
18
|
export declare const coreDomainCommands: CommandDescriptor[];
|
|
4
19
|
export declare const coreDomainCommandIcons: Record<string, TemplateResult>;
|
package/dist/commands.js
CHANGED
|
@@ -1,9 +1,47 @@
|
|
|
1
|
-
import { addDot, addMarker, cdSubdomainSeedKey, CD_SUBDOMAINS, MOVEMENT_COLOR, placeDddElement, teamTopologySeedKey, TEAM_TOPOLOGIES, } from '@formicoidea/labre-ddd-shared';
|
|
1
|
+
import { addDot, addMarker, cdSubdomainSeedKey, CD_SUBDOMAINS, coreDomainToolbarIcon, MOVEMENT_COLOR, placeDddElement, teamTopologySeedKey, TEAM_TOPOLOGIES, } from '@formicoidea/labre-ddd-shared';
|
|
2
2
|
import { NOTATION_NEUTRALS } from '@formicoidea/labre-core/shared/consts';
|
|
3
|
-
import { translateKey } from '@formicoidea/labre-core/shared/services';
|
|
3
|
+
import { translateKey, } from '@formicoidea/labre-core/shared/services';
|
|
4
4
|
import { svg } from 'lit';
|
|
5
5
|
import { activateMovement, createCoreDomainChart } from './actions.js';
|
|
6
|
-
import { markerRole, subdomainRole } from './roles.js';
|
|
6
|
+
import { CORE_DOMAIN_ROLE, CORE_DOMAIN_ROLES, markerRole, subdomainRole, } from './roles.js';
|
|
7
|
+
/**
|
|
8
|
+
* The legend wording of a sub-domain dot: the ROLE's own i18n key — so a host
|
|
9
|
+
* catalogue still wins and no key is invented — with the PALETTE's shorter
|
|
10
|
+
* label as the fallback.
|
|
11
|
+
*
|
|
12
|
+
* The two differ for three of the five: `roles.ts` spells out "Bounded context
|
|
13
|
+
* (current position)" where the chart's legend has always read "Bounded
|
|
14
|
+
* context". A host resolving the key reads the same word either way; this keeps
|
|
15
|
+
* the host-less fallback reading what it has read since the button shipped.
|
|
16
|
+
* Both halves come from declarations that already exist — neither is restated.
|
|
17
|
+
*/
|
|
18
|
+
function subdomainWording(role, label) {
|
|
19
|
+
const { labelKey } = CORE_DOMAIN_ROLES[role];
|
|
20
|
+
return labelKey ? [labelKey, label] : undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The automatic legend's own section titles — text stamped onto the chart the
|
|
24
|
+
* moment the legend is built, like any other seed, and declared HERE because
|
|
25
|
+
* the rows that file themselves under them are subscribed by the commands
|
|
26
|
+
* below. The box title itself is not one of them: it says the shared word
|
|
27
|
+
* "Legend" and reuses `BOARD_LEGEND_TITLE`.
|
|
28
|
+
*
|
|
29
|
+
* Three sub-titles for a framework whose ten commands all sit in ONE category:
|
|
30
|
+
* `section` is what keeps them, and in particular the one that explains the
|
|
31
|
+
* C/X/F letters (`docs/adr/0026`).
|
|
32
|
+
*/
|
|
33
|
+
export const CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS = [
|
|
34
|
+
'com.labre.ddd-core-domain.seed.legend-subdomains',
|
|
35
|
+
'Sub-domains',
|
|
36
|
+
];
|
|
37
|
+
export const CORE_DOMAIN_SEED_LEGEND_TEAM_MODES = [
|
|
38
|
+
'com.labre.ddd-core-domain.seed.legend-team-modes',
|
|
39
|
+
'Team interaction modes',
|
|
40
|
+
];
|
|
41
|
+
export const CORE_DOMAIN_SEED_LEGEND_MOVEMENT = [
|
|
42
|
+
'com.labre.ddd-core-domain.seed.legend-movement',
|
|
43
|
+
'Movement',
|
|
44
|
+
];
|
|
7
45
|
/**
|
|
8
46
|
* The Core Domain Chart palette as commands: the background, the five
|
|
9
47
|
* sub-domain dots, the three Team Topologies markers and the movement arrow.
|
|
@@ -32,13 +70,22 @@ const SPECS = [
|
|
|
32
70
|
icon: dotSwatch(preset.fill),
|
|
33
71
|
run: std => placeDddElement(std, (surface, cx, cy) => addDot(surface, std, cx, cy, preset.fill,
|
|
34
72
|
// Translated HERE and once: the caption is document content the
|
|
35
|
-
// moment it lands (ADR
|
|
73
|
+
// moment it lands (ADR 0023), so the host's catalogue is asked at
|
|
36
74
|
// placement and never again.
|
|
37
75
|
translateKey(std, cdSubdomainSeedKey(preset.kind), preset.label),
|
|
38
76
|
// The dot IS the sub-domain: the role rides on the ellipse, so a
|
|
39
77
|
// rule about where a sub-domain sits measures the artefact and not
|
|
40
78
|
// the group that also holds its name.
|
|
41
79
|
subdomainRole(preset.kind))),
|
|
80
|
+
// Row and command out of the SAME preset, which also keeps this list and
|
|
81
|
+
// `core-domain.off-legend-colour` naming the same five colours by
|
|
82
|
+
// construction.
|
|
83
|
+
legend: {
|
|
84
|
+
role: subdomainRole(preset.kind),
|
|
85
|
+
section: CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS,
|
|
86
|
+
labelWording: subdomainWording(subdomainRole(preset.kind), preset.label),
|
|
87
|
+
row: { swatch: 'dot', color: preset.fill },
|
|
88
|
+
},
|
|
42
89
|
})),
|
|
43
90
|
...TEAM_TOPOLOGIES.map((preset) => ({
|
|
44
91
|
id: `add${preset.kind[0].toUpperCase()}${preset.kind.slice(1)}`,
|
|
@@ -50,7 +97,7 @@ const SPECS = [
|
|
|
50
97
|
fill: preset.fill,
|
|
51
98
|
letter: preset.letter,
|
|
52
99
|
// Translated HERE and once: the caption is document content the
|
|
53
|
-
// moment it lands (ADR
|
|
100
|
+
// moment it lands (ADR 0023), so the host's catalogue is asked at
|
|
54
101
|
// placement and never again.
|
|
55
102
|
label: translateKey(std, teamTopologySeedKey(preset.kind), preset.label),
|
|
56
103
|
// The square IS the marker, so the role rides on it and not on the
|
|
@@ -59,6 +106,14 @@ const SPECS = [
|
|
|
59
106
|
// by role, could not see the markers at all.
|
|
60
107
|
role: markerRole(preset.kind),
|
|
61
108
|
})),
|
|
109
|
+
// The LETTER is what identifies a marker on the chart — the squares are
|
|
110
|
+
// three colours a reader has no key to — so the row shows the same square
|
|
111
|
+
// with the same letter in it, from the same preset the palette draws with.
|
|
112
|
+
legend: {
|
|
113
|
+
role: markerRole(preset.kind),
|
|
114
|
+
section: CORE_DOMAIN_SEED_LEGEND_TEAM_MODES,
|
|
115
|
+
row: { swatch: 'square', color: preset.fill, letter: preset.letter },
|
|
116
|
+
},
|
|
62
117
|
})),
|
|
63
118
|
{
|
|
64
119
|
id: 'addMovement',
|
|
@@ -66,17 +121,25 @@ const SPECS = [
|
|
|
66
121
|
iconKey: 'ddd-core-domain.movement',
|
|
67
122
|
// Historical telemetry value, unchanged by the gesture becoming a drag.
|
|
68
123
|
element: 'movement',
|
|
124
|
+
kind: 'tool',
|
|
69
125
|
icon: movementSwatch,
|
|
70
126
|
// No longer a free arrow dropped at the viewport centre: the movement is a
|
|
71
127
|
// typed edge, so the user draws it from the current position to the future
|
|
72
128
|
// one and the pair they drew IS the statement (`docs/adr/0010`).
|
|
73
129
|
run: activateMovement,
|
|
130
|
+
legend: {
|
|
131
|
+
role: CORE_DOMAIN_ROLE.movement,
|
|
132
|
+
section: CORE_DOMAIN_SEED_LEGEND_MOVEMENT,
|
|
133
|
+
// The style `activateMovement` arms the connector tool with: a red dashed
|
|
134
|
+
// line.
|
|
135
|
+
row: { swatch: 'line', color: MOVEMENT_COLOR, dashed: true },
|
|
136
|
+
},
|
|
74
137
|
},
|
|
75
138
|
];
|
|
76
139
|
export const coreDomainCommands = SPECS.map((spec, order) => ({
|
|
77
140
|
id: `ddd-core-domain.${spec.id}`,
|
|
78
141
|
owner: 'ddd-core-domain',
|
|
79
|
-
kind: 'artefact',
|
|
142
|
+
kind: spec.kind ?? 'artefact',
|
|
80
143
|
labelKey: `com.labre.commands.ddd-core-domain.${spec.id}`,
|
|
81
144
|
labelFallback: spec.label,
|
|
82
145
|
category: 'chart',
|
|
@@ -92,5 +155,11 @@ export const coreDomainCommands = SPECS.map((spec, order) => ({
|
|
|
92
155
|
element: spec.element,
|
|
93
156
|
board: spec.board,
|
|
94
157
|
},
|
|
158
|
+
legend: spec.legend,
|
|
95
159
|
}));
|
|
96
|
-
export const coreDomainCommandIcons =
|
|
160
|
+
export const coreDomainCommandIcons = {
|
|
161
|
+
...Object.fromEntries(SPECS.map(spec => [spec.iconKey, spec.icon])),
|
|
162
|
+
// The senior button's 56×56 glyph, so `FrameworkDescriptor.iconKey` resolves
|
|
163
|
+
// through `getCommandIcon`.
|
|
164
|
+
'ddd-core-domain.toolbar': coreDomainToolbarIcon,
|
|
165
|
+
};
|
|
@@ -94,10 +94,20 @@ const MIGRATION_TEXT = {
|
|
|
94
94
|
weight: 700,
|
|
95
95
|
color: '@zoneLabelDark',
|
|
96
96
|
};
|
|
97
|
-
/**
|
|
98
|
-
|
|
97
|
+
/**
|
|
98
|
+
* A centred zone name, gated by `showLabels` like every other word on the chart.
|
|
99
|
+
*
|
|
100
|
+
* `prop` is what makes it RENAMABLE (issue #355): the model prop the in-place
|
|
101
|
+
* editor writes to, which `backgroundLabelText` reads BEFORE the catalogue — so
|
|
102
|
+
* a chart the user has renamed keeps their words, and every other chart keeps
|
|
103
|
+
* the vocabulary in whatever language the host serves it. The id and the prop
|
|
104
|
+
* are deliberately two strings: the id names a piece of this declaration, the
|
|
105
|
+
* prop names a key in somebody's document, and only the first may ever change.
|
|
106
|
+
*/
|
|
107
|
+
function zoneLabel(id, prop, key, fallback, x, y, style) {
|
|
99
108
|
return {
|
|
100
109
|
id,
|
|
110
|
+
prop,
|
|
101
111
|
labelKey: `com.labre.core-domain.background.zone.${key}`,
|
|
102
112
|
fallback,
|
|
103
113
|
anchor: { x: rx(x), y: ry(y) },
|
|
@@ -127,7 +137,7 @@ const CLASSIC_ZONES = [
|
|
|
127
137
|
rect: { x: rx(70), y: ry(30), w: rw(150), h: rh(720) },
|
|
128
138
|
fill: '@zoneGeneric',
|
|
129
139
|
fillVisibleProp: 'showZones',
|
|
130
|
-
label: zoneLabel('generic', 'generic', 'Generic', 150, 474, ZONE_TEXT),
|
|
140
|
+
label: zoneLabel('generic', 'zoneGeneric', 'generic', 'Generic', 150, 474, ZONE_TEXT),
|
|
131
141
|
},
|
|
132
142
|
{
|
|
133
143
|
id: 'supporting-low-diff',
|
|
@@ -135,7 +145,7 @@ const CLASSIC_ZONES = [
|
|
|
135
145
|
rect: { x: rx(220), y: ry(30), w: rw(220), h: rh(720) },
|
|
136
146
|
fill: '@zoneSupporting',
|
|
137
147
|
fillVisibleProp: 'showZones',
|
|
138
|
-
label: zoneLabel('supporting', 'supporting', 'Supporting', 340, 474, ZONE_TEXT),
|
|
148
|
+
label: zoneLabel('supporting', 'zoneSupporting', 'supporting', 'Supporting', 340, 474, ZONE_TEXT),
|
|
139
149
|
},
|
|
140
150
|
{
|
|
141
151
|
id: 'core',
|
|
@@ -143,7 +153,7 @@ const CLASSIC_ZONES = [
|
|
|
143
153
|
rect: { x: rx(440), y: ry(30), w: rw(400), h: rh(360) },
|
|
144
154
|
fill: '@zoneCore',
|
|
145
155
|
fillVisibleProp: 'showZones',
|
|
146
|
-
label: zoneLabel('core', 'core', 'Core', 640, 214, CORE_TEXT),
|
|
156
|
+
label: zoneLabel('core', 'zoneCore', 'core', 'Core', 640, 214, CORE_TEXT),
|
|
147
157
|
},
|
|
148
158
|
{
|
|
149
159
|
// The template tints this one and writes nothing on it, so neither does the
|
|
@@ -173,6 +183,7 @@ const MIGRATION_ZONES = [
|
|
|
173
183
|
fillVisibleProp: 'showZones',
|
|
174
184
|
label: {
|
|
175
185
|
id: 'lastToothpaste',
|
|
186
|
+
prop: 'zoneLastToothpaste',
|
|
176
187
|
labelKey: 'com.labre.core-domain.background.zone.last-toothpaste',
|
|
177
188
|
fallback: 'Last toothpaste',
|
|
178
189
|
anchor: { x: 0.25, y: 0.25 },
|
|
@@ -189,6 +200,7 @@ const MIGRATION_ZONES = [
|
|
|
189
200
|
fillVisibleProp: 'showZones',
|
|
190
201
|
label: {
|
|
191
202
|
id: 'riskSeeking',
|
|
203
|
+
prop: 'zoneRiskSeeking',
|
|
192
204
|
labelKey: 'com.labre.core-domain.background.zone.risk-seeking',
|
|
193
205
|
fallback: 'Risk-seeking',
|
|
194
206
|
anchor: { x: 0.75, y: 0.25 },
|
|
@@ -205,6 +217,7 @@ const MIGRATION_ZONES = [
|
|
|
205
217
|
fillVisibleProp: 'showZones',
|
|
206
218
|
label: {
|
|
207
219
|
id: 'riskAverse',
|
|
220
|
+
prop: 'zoneRiskAverse',
|
|
208
221
|
labelKey: 'com.labre.core-domain.background.zone.risk-averse',
|
|
209
222
|
fallback: 'Risk-averse',
|
|
210
223
|
anchor: { x: 0.25, y: 0.75 },
|
|
@@ -221,6 +234,7 @@ const MIGRATION_ZONES = [
|
|
|
221
234
|
fillVisibleProp: 'showZones',
|
|
222
235
|
label: {
|
|
223
236
|
id: 'lowHangingFruit',
|
|
237
|
+
prop: 'zoneLowHangingFruit',
|
|
224
238
|
labelKey: 'com.labre.core-domain.background.zone.lhf',
|
|
225
239
|
fallback: 'Low-hanging fruit',
|
|
226
240
|
anchor: { x: 0.75, y: 0.75 },
|
|
@@ -254,6 +268,7 @@ const CORE_DOMAIN_AXES = [
|
|
|
254
268
|
stroke: { color: '@axis', width: 2 },
|
|
255
269
|
title: {
|
|
256
270
|
id: 'complexityTitle',
|
|
271
|
+
prop: 'complexityTitle',
|
|
257
272
|
// The classic reading's vertical axis. The migration one relabels it —
|
|
258
273
|
// see `MIGRATION_AXIS_TITLE` below, and why it rides in `endLabels`.
|
|
259
274
|
variants: ['classic'],
|
|
@@ -267,6 +282,7 @@ const CORE_DOMAIN_AXES = [
|
|
|
267
282
|
endLabels: [
|
|
268
283
|
{
|
|
269
284
|
id: 'complexityLow',
|
|
285
|
+
prop: 'complexityLow',
|
|
270
286
|
labelKey: 'com.labre.core-domain.background.complexity.low',
|
|
271
287
|
fallback: 'Low',
|
|
272
288
|
anchor: { x: 0, y: ry(758), dx: -12 },
|
|
@@ -276,6 +292,7 @@ const CORE_DOMAIN_AXES = [
|
|
|
276
292
|
},
|
|
277
293
|
{
|
|
278
294
|
id: 'complexityHigh',
|
|
295
|
+
prop: 'complexityHigh',
|
|
279
296
|
labelKey: 'com.labre.core-domain.background.complexity.high',
|
|
280
297
|
fallback: 'High',
|
|
281
298
|
anchor: { x: 0, y: ry(44), dx: -22 },
|
|
@@ -295,6 +312,7 @@ const CORE_DOMAIN_AXES = [
|
|
|
295
312
|
*/
|
|
296
313
|
{
|
|
297
314
|
id: 'complexityTitleMigration',
|
|
315
|
+
prop: 'migrationCostTitle',
|
|
298
316
|
variants: ['migration'],
|
|
299
317
|
labelKey: 'com.labre.core-domain.background.axis.migration-cost',
|
|
300
318
|
fallback: 'Cost of migration',
|
|
@@ -314,6 +332,7 @@ const CORE_DOMAIN_AXES = [
|
|
|
314
332
|
stroke: { color: '@axis', width: 2 },
|
|
315
333
|
title: {
|
|
316
334
|
id: 'differentiationTitle',
|
|
335
|
+
prop: 'differentiationTitle',
|
|
317
336
|
labelKey: 'com.labre.core-domain.background.axis.differentiation',
|
|
318
337
|
fallback: 'Business differentiation',
|
|
319
338
|
anchor: { x: rx(450), y: 1, dy: 30 },
|
|
@@ -324,6 +343,7 @@ const CORE_DOMAIN_AXES = [
|
|
|
324
343
|
endLabels: [
|
|
325
344
|
{
|
|
326
345
|
id: 'differentiationLow',
|
|
346
|
+
prop: 'differentiationLow',
|
|
327
347
|
labelKey: 'com.labre.core-domain.background.differentiation.low',
|
|
328
348
|
fallback: 'Low',
|
|
329
349
|
anchor: { x: rx(84), y: 1, dy: 22 },
|
|
@@ -333,6 +353,7 @@ const CORE_DOMAIN_AXES = [
|
|
|
333
353
|
},
|
|
334
354
|
{
|
|
335
355
|
id: 'differentiationHigh',
|
|
356
|
+
prop: 'differentiationHigh',
|
|
336
357
|
labelKey: 'com.labre.core-domain.background.differentiation.high',
|
|
337
358
|
fallback: 'High',
|
|
338
359
|
anchor: { x: rx(838), y: 1, dy: 22 },
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
import type { FrameworkBackgroundDef } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { DeclaredBackgroundView } from '@formicoidea/labre-core/blocks/surface';
|
|
1
3
|
import type { CoreDomainChartElementModel } from '@formicoidea/labre-core/model';
|
|
2
|
-
import { GfxElementModelView } from '@formicoidea/labre-core/std/gfx';
|
|
3
4
|
/**
|
|
4
5
|
* View for the Core Domain Chart background. Registering it ensures
|
|
5
6
|
* `gfx.view.get(model)` returns a view (required so move / select work).
|
|
7
|
+
*
|
|
8
|
+
* Extends {@link DeclaredBackgroundView}, so every word the chart writes on
|
|
9
|
+
* itself — the two axis titles, the four Low/High ticks and the zone names of
|
|
10
|
+
* both readings — is renamed in place by a double-click, aimed by the very
|
|
11
|
+
* declaration the renderer paints (issue #355). The chart had no such gesture
|
|
12
|
+
* before, which is the whole of the bug: the labels were i18n keys and nothing
|
|
13
|
+
* else, so a team that calls its axis something else had nowhere to say so.
|
|
6
14
|
*/
|
|
7
|
-
export declare class CoreDomainView extends
|
|
15
|
+
export declare class CoreDomainView extends DeclaredBackgroundView<CoreDomainChartElementModel> {
|
|
8
16
|
static type: string;
|
|
17
|
+
protected get def(): FrameworkBackgroundDef;
|
|
9
18
|
}
|
|
10
19
|
/**
|
|
11
20
|
* Resize gating, driven by the declaration: the handles are offered while
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { FrameworkBackgroundInteractionExtension } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
-
import { GfxElementModelView } from '@formicoidea/labre-core/std/gfx';
|
|
1
|
+
import { DeclaredBackgroundView, FrameworkBackgroundInteractionExtension, } from '@formicoidea/labre-core/blocks/surface';
|
|
3
2
|
import { CORE_DOMAIN_BACKGROUND } from './background.js';
|
|
4
3
|
/**
|
|
5
4
|
* View for the Core Domain Chart background. Registering it ensures
|
|
6
5
|
* `gfx.view.get(model)` returns a view (required so move / select work).
|
|
6
|
+
*
|
|
7
|
+
* Extends {@link DeclaredBackgroundView}, so every word the chart writes on
|
|
8
|
+
* itself — the two axis titles, the four Low/High ticks and the zone names of
|
|
9
|
+
* both readings — is renamed in place by a double-click, aimed by the very
|
|
10
|
+
* declaration the renderer paints (issue #355). The chart had no such gesture
|
|
11
|
+
* before, which is the whole of the bug: the labels were i18n keys and nothing
|
|
12
|
+
* else, so a team that calls its axis something else had nowhere to say so.
|
|
7
13
|
*/
|
|
8
|
-
export class CoreDomainView extends
|
|
14
|
+
export class CoreDomainView extends DeclaredBackgroundView {
|
|
9
15
|
static { this.type = 'coreDomain'; }
|
|
16
|
+
get def() {
|
|
17
|
+
return CORE_DOMAIN_BACKGROUND;
|
|
18
|
+
}
|
|
10
19
|
}
|
|
11
20
|
/**
|
|
12
21
|
* Resize gating, driven by the declaration: the handles are offered while
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ToolbarModuleConfig } from '@formicoidea/labre-core/shared/services';
|
|
2
|
+
/**
|
|
3
|
+
* The selected chart's FLAG-GATED row, whole: the legend button and the
|
|
4
|
+
* Validation dropdown, in one module.
|
|
5
|
+
*
|
|
6
|
+
* They cannot be two, and that is a hard constraint rather than a preference:
|
|
7
|
+
* `ToolbarModuleExtension` binds by DI variant, so a second module claiming
|
|
8
|
+
* `custom:affine:surface:coreDomain` throws `DuplicateServiceDefinitionError`
|
|
9
|
+
* before the editor finishes setting up. The C4 board's own row was merged this
|
|
10
|
+
* way first (`c4BoardToolingToolbarConfig`).
|
|
11
|
+
*
|
|
12
|
+
* The chart has no always-on row left at all: the legend was its only entry, and
|
|
13
|
+
* generating one is a gesture the `ddd-core-domain` flag may take away
|
|
14
|
+
* (`docs/adr/0026`) — while what the gesture already WROTE is document content,
|
|
15
|
+
* painted by the always-on renderers whatever the flag says. A stored chart with
|
|
16
|
+
* the flag off keeps its elements, its handles and its legend boxes; it simply
|
|
17
|
+
* offers no button.
|
|
18
|
+
*
|
|
19
|
+
* The rows themselves are derived from `coreDomainCommands` — this module writes
|
|
20
|
+
* no table.
|
|
21
|
+
*/
|
|
22
|
+
export declare const coreDomainChartToolingToolbarConfig: ToolbarModuleConfig;
|
|
@@ -1,39 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { legendToolbarAction, validationToolbarConfig, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
2
|
import { CoreDomainChartElementModel } from '@formicoidea/labre-core/model';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The selected chart's FLAG-GATED row, whole: the legend button and the
|
|
5
|
+
* Validation dropdown, in one module.
|
|
6
|
+
*
|
|
7
|
+
* They cannot be two, and that is a hard constraint rather than a preference:
|
|
8
|
+
* `ToolbarModuleExtension` binds by DI variant, so a second module claiming
|
|
9
|
+
* `custom:affine:surface:coreDomain` throws `DuplicateServiceDefinitionError`
|
|
10
|
+
* before the editor finishes setting up. The C4 board's own row was merged this
|
|
11
|
+
* way first (`c4BoardToolingToolbarConfig`).
|
|
12
|
+
*
|
|
13
|
+
* The chart has no always-on row left at all: the legend was its only entry, and
|
|
14
|
+
* generating one is a gesture the `ddd-core-domain` flag may take away
|
|
15
|
+
* (`docs/adr/0026`) — while what the gesture already WROTE is document content,
|
|
16
|
+
* painted by the always-on renderers whatever the flag says. A stored chart with
|
|
17
|
+
* the flag off keeps its elements, its handles and its legend boxes; it simply
|
|
18
|
+
* offers no button.
|
|
19
|
+
*
|
|
20
|
+
* The rows themselves are derived from `coreDomainCommands` — this module writes
|
|
21
|
+
* no table.
|
|
22
|
+
*/
|
|
23
|
+
export const coreDomainChartToolingToolbarConfig = {
|
|
8
24
|
actions: [
|
|
9
|
-
{
|
|
25
|
+
legendToolbarAction({
|
|
26
|
+
// FIRST in the row, as it has been since the chart's legend button
|
|
27
|
+
// shipped: the toolbar sorts lexicographically by id.
|
|
10
28
|
id: 'a.legend',
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// (`frameworks.ts` `telemetryKey`). Unchanged by this rework — the
|
|
24
|
-
// button is the same gesture, it just detects by role now.
|
|
25
|
-
framework: 'core-domain',
|
|
26
|
-
element: 'legend',
|
|
27
|
-
page: 'whiteboard editor',
|
|
28
|
-
segment: 'element toolbar',
|
|
29
|
-
module: 'core-domain toolbar',
|
|
30
|
-
});
|
|
31
|
-
},
|
|
32
|
-
},
|
|
29
|
+
Model: CoreDomainChartElementModel,
|
|
30
|
+
owner: 'ddd-core-domain',
|
|
31
|
+
// The WIRE value, which is not the module id: the framework is
|
|
32
|
+
// `ddd-core-domain` in code and `core-domain` in PostHog
|
|
33
|
+
// (`frameworks.ts` `telemetryKey`). Unchanged by the button becoming
|
|
34
|
+
// shared.
|
|
35
|
+
framework: 'core-domain',
|
|
36
|
+
}),
|
|
37
|
+
// The generic dropdown, not a Core Domain variant of it: the config names no
|
|
38
|
+
// framework — it reads the registered rules and profiles — so this is the
|
|
39
|
+
// very same object c4, wardley and bpmn register.
|
|
40
|
+
...validationToolbarConfig.actions,
|
|
33
41
|
],
|
|
34
|
-
when: ctx => ctx.getSurfaceModelsByType(CoreDomainChartElementModel).length > 0,
|
|
42
|
+
when: (ctx) => ctx.getSurfaceModelsByType(CoreDomainChartElementModel).length > 0,
|
|
35
43
|
};
|
|
36
|
-
export const coreDomainToolbarExtension = ToolbarModuleExtension({
|
|
37
|
-
id: BlockFlavourIdentifier('affine:surface:coreDomain'),
|
|
38
|
-
config: coreDomainToolbarConfig,
|
|
39
|
-
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { FrameworkPalette, NamedPalette } from '@formicoidea/labre-core/components/color-picker';
|
|
2
|
+
import type { ChromeWording } from '@formicoidea/labre-core/shared/services';
|
|
3
|
+
/**
|
|
4
|
+
* The Core Domain Chart swatches' own names, resolved by `resolvePaletteLabel`
|
|
5
|
+
* (`@labre/affine-components/color-picker`) through each swatch's own
|
|
6
|
+
* {@link NamedPalette.labelWording} — the mechanism `WARDLEY_PALETTE_WORDINGS`
|
|
7
|
+
* established, reused here without either package naming the other.
|
|
8
|
+
*
|
|
9
|
+
* Exported so `../translations.ts` can list them under source `chrome`: a
|
|
10
|
+
* swatch's name is toolbar chrome, never seeded into a document. The keys are
|
|
11
|
+
* this framework's own even though the colours come from `ddd-shared`, which
|
|
12
|
+
* declares no `com.labre.*` key of its own by design (see its header).
|
|
13
|
+
*/
|
|
14
|
+
export declare const CORE_DOMAIN_PALETTE_WORDING_BIG_BET: ChromeWording;
|
|
15
|
+
export declare const CORE_DOMAIN_PALETTE_WORDING_PLATFORM: ChromeWording;
|
|
16
|
+
export declare const CORE_DOMAIN_PALETTE_WORDING_OUTSOURCED: ChromeWording;
|
|
17
|
+
export declare const CORE_DOMAIN_PALETTE_WORDING_BC_CURRENT: ChromeWording;
|
|
18
|
+
export declare const CORE_DOMAIN_PALETTE_WORDING_BC_FUTURE: ChromeWording;
|
|
19
|
+
export declare const CORE_DOMAIN_PALETTE_WORDINGS: readonly ChromeWording[];
|
|
20
|
+
/**
|
|
21
|
+
* From the default editor palette we keep ONLY the neutrals — the historical
|
|
22
|
+
* colours say nothing in this notation.
|
|
23
|
+
*/
|
|
24
|
+
export declare const CORE_DOMAIN_PALETTE_LIST: NamedPalette[];
|
|
25
|
+
/**
|
|
26
|
+
* The Core Domain Chart's page of the colour pickers' carousel
|
|
27
|
+
* (`docs/adr/0027`). Registered from the FLAG-GATED view extension, because
|
|
28
|
+
* offering hues is TOOLING: a chart drawn while the flag was on keeps every
|
|
29
|
+
* colour it was painted with when the flag goes off (`docs/adr/0009`).
|
|
30
|
+
*/
|
|
31
|
+
export declare const CORE_DOMAIN_FRAMEWORK_PALETTE: FrameworkPalette;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { CD_SUBDOMAINS } from '@formicoidea/labre-ddd-shared';
|
|
2
|
+
import { neutralPalettes } from '@formicoidea/labre-core/gfx/shape';
|
|
3
|
+
/**
|
|
4
|
+
* The Core Domain Chart swatches' own names, resolved by `resolvePaletteLabel`
|
|
5
|
+
* (`@labre/affine-components/color-picker`) through each swatch's own
|
|
6
|
+
* {@link NamedPalette.labelWording} — the mechanism `WARDLEY_PALETTE_WORDINGS`
|
|
7
|
+
* established, reused here without either package naming the other.
|
|
8
|
+
*
|
|
9
|
+
* Exported so `../translations.ts` can list them under source `chrome`: a
|
|
10
|
+
* swatch's name is toolbar chrome, never seeded into a document. The keys are
|
|
11
|
+
* this framework's own even though the colours come from `ddd-shared`, which
|
|
12
|
+
* declares no `com.labre.*` key of its own by design (see its header).
|
|
13
|
+
*/
|
|
14
|
+
export const CORE_DOMAIN_PALETTE_WORDING_BIG_BET = [
|
|
15
|
+
'com.labre.ddd-core-domain.palette.big-bet-purple',
|
|
16
|
+
'Big-bet purple',
|
|
17
|
+
];
|
|
18
|
+
export const CORE_DOMAIN_PALETTE_WORDING_PLATFORM = [
|
|
19
|
+
'com.labre.ddd-core-domain.palette.platform-blue',
|
|
20
|
+
'Platform blue',
|
|
21
|
+
];
|
|
22
|
+
export const CORE_DOMAIN_PALETTE_WORDING_OUTSOURCED = [
|
|
23
|
+
'com.labre.ddd-core-domain.palette.outsourced-green',
|
|
24
|
+
'Outsourced green',
|
|
25
|
+
];
|
|
26
|
+
export const CORE_DOMAIN_PALETTE_WORDING_BC_CURRENT = [
|
|
27
|
+
'com.labre.ddd-core-domain.palette.bounded-context-red',
|
|
28
|
+
'Bounded context red',
|
|
29
|
+
];
|
|
30
|
+
export const CORE_DOMAIN_PALETTE_WORDING_BC_FUTURE = [
|
|
31
|
+
'com.labre.ddd-core-domain.palette.future-position-grey',
|
|
32
|
+
'Future position grey',
|
|
33
|
+
];
|
|
34
|
+
export const CORE_DOMAIN_PALETTE_WORDINGS = [
|
|
35
|
+
CORE_DOMAIN_PALETTE_WORDING_BIG_BET,
|
|
36
|
+
CORE_DOMAIN_PALETTE_WORDING_PLATFORM,
|
|
37
|
+
CORE_DOMAIN_PALETTE_WORDING_OUTSOURCED,
|
|
38
|
+
CORE_DOMAIN_PALETTE_WORDING_BC_CURRENT,
|
|
39
|
+
CORE_DOMAIN_PALETTE_WORDING_BC_FUTURE,
|
|
40
|
+
];
|
|
41
|
+
/**
|
|
42
|
+
* The sub-domain / bounded-context dot fills, by kind — derived from
|
|
43
|
+
* {@link CD_SUBDOMAINS} rather than restated.
|
|
44
|
+
*/
|
|
45
|
+
const CD_FILL = Object.fromEntries(CD_SUBDOMAINS.map(subdomain => [subdomain.kind, subdomain.fill]));
|
|
46
|
+
/**
|
|
47
|
+
* The Core Domain Chart's own five hues: the three sub-domain classes
|
|
48
|
+
* (big-bet, platform, outsourced), the bounded context as it stands today, and
|
|
49
|
+
* the grey it is plotted in where it is meant to go next.
|
|
50
|
+
*
|
|
51
|
+
* The movement arrow between those last two is drawn in `MOVEMENT_COLOR`,
|
|
52
|
+
* which IS the current bounded context's red — one statement in one colour —
|
|
53
|
+
* so it contributes no sixth swatch. `__tests__/palette.unit.spec.ts` pins the
|
|
54
|
+
* two together, so the day they part the shelf gains its swatch.
|
|
55
|
+
*
|
|
56
|
+
* They are SHORTCUTS, never constraints: a dot's class is written in its role,
|
|
57
|
+
* not read off its fill.
|
|
58
|
+
*/
|
|
59
|
+
const CORE_DOMAIN_PALETTES = [
|
|
60
|
+
{
|
|
61
|
+
key: 'Big-bet purple',
|
|
62
|
+
value: CD_FILL.bigBet,
|
|
63
|
+
labelWording: CORE_DOMAIN_PALETTE_WORDING_BIG_BET,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: 'Platform blue',
|
|
67
|
+
value: CD_FILL.platform,
|
|
68
|
+
labelWording: CORE_DOMAIN_PALETTE_WORDING_PLATFORM,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'Outsourced green',
|
|
72
|
+
value: CD_FILL.outsourced,
|
|
73
|
+
labelWording: CORE_DOMAIN_PALETTE_WORDING_OUTSOURCED,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
key: 'Bounded context red',
|
|
77
|
+
value: CD_FILL.bcCurrent,
|
|
78
|
+
labelWording: CORE_DOMAIN_PALETTE_WORDING_BC_CURRENT,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: 'Future position grey',
|
|
82
|
+
value: CD_FILL.bcFuture,
|
|
83
|
+
labelWording: CORE_DOMAIN_PALETTE_WORDING_BC_FUTURE,
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
/**
|
|
87
|
+
* From the default editor palette we keep ONLY the neutrals — the historical
|
|
88
|
+
* colours say nothing in this notation.
|
|
89
|
+
*/
|
|
90
|
+
export const CORE_DOMAIN_PALETTE_LIST = [
|
|
91
|
+
...CORE_DOMAIN_PALETTES,
|
|
92
|
+
...neutralPalettes(),
|
|
93
|
+
];
|
|
94
|
+
/**
|
|
95
|
+
* The Core Domain Chart's page of the colour pickers' carousel
|
|
96
|
+
* (`docs/adr/0027`). Registered from the FLAG-GATED view extension, because
|
|
97
|
+
* offering hues is TOOLING: a chart drawn while the flag was on keeps every
|
|
98
|
+
* colour it was painted with when the flag goes off (`docs/adr/0009`).
|
|
99
|
+
*/
|
|
100
|
+
export const CORE_DOMAIN_FRAMEWORK_PALETTE = {
|
|
101
|
+
framework: 'ddd-core-domain',
|
|
102
|
+
labelWording: ['com.labre.framework.ddd-core-domain', 'Core Domain Chart'],
|
|
103
|
+
palettes: CORE_DOMAIN_PALETTE_LIST,
|
|
104
|
+
};
|
package/dist/translations.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import type { ChromeWording } from '@formicoidea/labre-core/shared/services';
|
|
2
1
|
import { type TranslationKeyManifestEntry } from '@formicoidea/labre-core/std';
|
|
3
|
-
/**
|
|
4
|
-
* The automatic legend's own section titles (`core-domain/legend.ts`) — text
|
|
5
|
-
* stamped onto the chart the moment the legend is built
|
|
6
|
-
* (`createAutoLegend`), like any other seed. The box title itself is NOT
|
|
7
|
-
* here: it says the shared word "Legend", so it reuses `BOARD_LEGEND_TITLE`
|
|
8
|
-
* (`@labre/affine-shared/services`) instead of a key of its own.
|
|
9
|
-
*/
|
|
10
|
-
export declare const CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS: ChromeWording;
|
|
11
|
-
export declare const CORE_DOMAIN_SEED_LEGEND_TEAM_MODES: ChromeWording;
|
|
12
|
-
export declare const CORE_DOMAIN_SEED_LEGEND_MOVEMENT: ChromeWording;
|
|
13
2
|
/**
|
|
14
3
|
* THIS framework's contribution to the translation-key manifest — every
|
|
15
4
|
* `com.labre.*` key the Core Domain Chart can hand to `TranslationProvider.t`,
|
package/dist/translations.js
CHANGED
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
import { dddSharedTranslationEntries } from '@formicoidea/labre-ddd-shared';
|
|
2
2
|
import { collectTranslationKeys, commandCategoryTranslationEntries, commandTranslationEntries, mergeTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
3
|
-
import { coreDomainCommands } from './commands.js';
|
|
3
|
+
import { CORE_DOMAIN_SEED_LEGEND_MOVEMENT, CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS, CORE_DOMAIN_SEED_LEGEND_TEAM_MODES, coreDomainCommands, } from './commands.js';
|
|
4
4
|
import { CORE_DOMAIN_BACKGROUND } from './core-domain/background.js';
|
|
5
5
|
import { CORE_DOMAIN_NUDGES } from './nudges.js';
|
|
6
6
|
import { CORE_DOMAIN_PROFILES } from './profiles.js';
|
|
7
7
|
import { CORE_DOMAIN_READINGS } from './reading.js';
|
|
8
8
|
import { CORE_DOMAIN_ROLES } from './roles.js';
|
|
9
9
|
import { CORE_DOMAIN_RULES } from './rules.js';
|
|
10
|
-
|
|
11
|
-
* The automatic legend's own section titles (`core-domain/legend.ts`) — text
|
|
12
|
-
* stamped onto the chart the moment the legend is built
|
|
13
|
-
* (`createAutoLegend`), like any other seed. The box title itself is NOT
|
|
14
|
-
* here: it says the shared word "Legend", so it reuses `BOARD_LEGEND_TITLE`
|
|
15
|
-
* (`@labre/affine-shared/services`) instead of a key of its own.
|
|
16
|
-
*/
|
|
17
|
-
export const CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS = [
|
|
18
|
-
'com.labre.ddd-core-domain.seed.legend-subdomains',
|
|
19
|
-
'Sub-domains',
|
|
20
|
-
];
|
|
21
|
-
export const CORE_DOMAIN_SEED_LEGEND_TEAM_MODES = [
|
|
22
|
-
'com.labre.ddd-core-domain.seed.legend-team-modes',
|
|
23
|
-
'Team interaction modes',
|
|
24
|
-
];
|
|
25
|
-
export const CORE_DOMAIN_SEED_LEGEND_MOVEMENT = [
|
|
26
|
-
'com.labre.ddd-core-domain.seed.legend-movement',
|
|
27
|
-
'Movement',
|
|
28
|
-
];
|
|
10
|
+
import { CORE_DOMAIN_PALETTE_WORDINGS } from './toolbar/palette.js';
|
|
29
11
|
/**
|
|
30
12
|
* THIS framework's contribution to the translation-key manifest — every
|
|
31
13
|
* `com.labre.*` key the Core Domain Chart can hand to `TranslationProvider.t`,
|
|
@@ -58,4 +40,12 @@ dddSharedTranslationEntries, [
|
|
|
58
40
|
CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS,
|
|
59
41
|
CORE_DOMAIN_SEED_LEGEND_TEAM_MODES,
|
|
60
42
|
CORE_DOMAIN_SEED_LEGEND_MOVEMENT,
|
|
61
|
-
].map(([key, fallback]) => ({ key, fallback, source: 'seed' }))
|
|
43
|
+
].map(([key, fallback]) => ({ key, fallback, source: 'seed' })),
|
|
44
|
+
// The carousel swatches' own names (`toolbar/palette.ts`) — chrome,
|
|
45
|
+
// re-rendered by the colour picker on every locale switch, never seeded
|
|
46
|
+
// into a document. Same treatment as Wardley's and EDGY's.
|
|
47
|
+
CORE_DOMAIN_PALETTE_WORDINGS.map(([key, fallback]) => ({
|
|
48
|
+
key,
|
|
49
|
+
fallback,
|
|
50
|
+
source: 'chrome',
|
|
51
|
+
})));
|
package/dist/view.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { type ViewExtensionContext, ViewExtensionProvider } from '@formicoidea/labre-core/ext-loader';
|
|
2
2
|
/**
|
|
3
3
|
* Core Domain Chart rendering — ALWAYS registered, independent of any flag.
|
|
4
|
-
* Disabling `ddd-core-domain` hides only the
|
|
4
|
+
* Disabling `ddd-core-domain` hides only the tooling (see
|
|
5
5
|
* {@link DddCoreDomainViewExtension}); placed `coreDomain` elements must still
|
|
6
|
-
* paint, stay selectable
|
|
7
|
-
*
|
|
6
|
+
* paint, stay selectable and stay movable, and Templates-panel insertion must
|
|
7
|
+
* still render them.
|
|
8
|
+
*
|
|
9
|
+
* The chart claims no always-on toolbar module: the legend button was its only
|
|
10
|
+
* contextual entry and it moved to the gated half (`docs/adr/0026`).
|
|
8
11
|
*/
|
|
9
12
|
export declare class DddCoreDomainRenderViewExtension extends ViewExtensionProvider {
|
|
10
13
|
name: string;
|
package/dist/view.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { morphToolbarConfig, QualityNudgeExtension, ReadingProfileExtension,
|
|
1
|
+
import { morphToolbarConfig, QualityNudgeExtension, ReadingProfileExtension, ValidationProfileExtension, ValidationRuleExtension, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { FrameworkPaletteExtension } from '@formicoidea/labre-core/components/color-picker';
|
|
2
3
|
import { ViewExtensionProvider, } from '@formicoidea/labre-core/ext-loader';
|
|
3
4
|
import { ToolbarModuleExtension, toolbarModuleKey, } from '@formicoidea/labre-core/shared/services';
|
|
4
5
|
import { TemplateCategoryExtension } from '@formicoidea/labre-core/gfx/template';
|
|
@@ -8,7 +9,7 @@ import { coreDomainCommandIcons, coreDomainCommands } from './commands.js';
|
|
|
8
9
|
import { coreDomainTemplateCategory } from './templates.js';
|
|
9
10
|
import { CoreDomainRendererExtension } from './core-domain/element-renderer.js';
|
|
10
11
|
import { CoreDomainInteraction, CoreDomainView, } from './core-domain/element-view.js';
|
|
11
|
-
import {
|
|
12
|
+
import { coreDomainChartToolingToolbarConfig } from './core-domain/toolbar-config.js';
|
|
12
13
|
import { coreDomainEffects } from './effects.js';
|
|
13
14
|
import { CORE_DOMAIN_MORPH_SPEC } from './morph.js';
|
|
14
15
|
import { CORE_DOMAIN_NUDGES } from './nudges.js';
|
|
@@ -16,13 +17,17 @@ import { CORE_DOMAIN_PROFILES } from './profiles.js';
|
|
|
16
17
|
import { CORE_DOMAIN_READINGS } from './reading.js';
|
|
17
18
|
import { CORE_DOMAIN_ROLES } from './roles.js';
|
|
18
19
|
import { CORE_DOMAIN_RULES } from './rules.js';
|
|
20
|
+
import { CORE_DOMAIN_FRAMEWORK_PALETTE } from './toolbar/palette.js';
|
|
19
21
|
import { coreDomainSeniorTool } from './toolbar/senior-tool.js';
|
|
20
22
|
/**
|
|
21
23
|
* Core Domain Chart rendering — ALWAYS registered, independent of any flag.
|
|
22
|
-
* Disabling `ddd-core-domain` hides only the
|
|
24
|
+
* Disabling `ddd-core-domain` hides only the tooling (see
|
|
23
25
|
* {@link DddCoreDomainViewExtension}); placed `coreDomain` elements must still
|
|
24
|
-
* paint, stay selectable
|
|
25
|
-
*
|
|
26
|
+
* paint, stay selectable and stay movable, and Templates-panel insertion must
|
|
27
|
+
* still render them.
|
|
28
|
+
*
|
|
29
|
+
* The chart claims no always-on toolbar module: the legend button was its only
|
|
30
|
+
* contextual entry and it moved to the gated half (`docs/adr/0026`).
|
|
26
31
|
*/
|
|
27
32
|
export class DddCoreDomainRenderViewExtension extends ViewExtensionProvider {
|
|
28
33
|
constructor() {
|
|
@@ -42,7 +47,6 @@ export class DddCoreDomainRenderViewExtension extends ViewExtensionProvider {
|
|
|
42
47
|
context.register(RoleVocabularyExtension(CORE_DOMAIN_ROLES));
|
|
43
48
|
if (this.isEdgeless(context.scope)) {
|
|
44
49
|
context.register(CoreDomainInteraction);
|
|
45
|
-
context.register(coreDomainToolbarExtension);
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
52
|
}
|
|
@@ -68,16 +72,13 @@ export class DddCoreDomainViewExtension extends ViewExtensionProvider {
|
|
|
68
72
|
context.register(ValidationRuleExtension(CORE_DOMAIN_RULES));
|
|
69
73
|
context.register(ValidationProfileExtension(CORE_DOMAIN_PROFILES));
|
|
70
74
|
context.register(QualityNudgeExtension(CORE_DOMAIN_NUDGES));
|
|
71
|
-
// The
|
|
72
|
-
//
|
|
73
|
-
// `
|
|
74
|
-
// chart
|
|
75
|
-
// is tooling and belongs here. The config itself names no framework — it
|
|
76
|
-
// reads roles and profiles — so it is the very same object Wardley
|
|
77
|
-
// registers on its own flavour.
|
|
75
|
+
// The chart's WHOLE contextual row — the Legend button and the Validation
|
|
76
|
+
// dropdown, merged into ONE module because a flavour may carry exactly one
|
|
77
|
+
// (`core-domain/toolbar-config.ts`). Both are tooling: with the flag off a
|
|
78
|
+
// stored chart keeps everything drawn on it and simply offers no button.
|
|
78
79
|
context.register(ToolbarModuleExtension({
|
|
79
80
|
id: BlockFlavourIdentifier('custom:affine:surface:coreDomain'),
|
|
80
|
-
config:
|
|
81
|
+
config: coreDomainChartToolingToolbarConfig,
|
|
81
82
|
}));
|
|
82
83
|
// The reversed reading (MF3): what the chart says about an artefact, on
|
|
83
84
|
// demand. Two profiles, because the vocabulary has two disjoint node
|
|
@@ -88,6 +89,11 @@ export class DddCoreDomainViewExtension extends ViewExtensionProvider {
|
|
|
88
89
|
context.register(ReadingProfileExtension(reading));
|
|
89
90
|
}
|
|
90
91
|
context.register(coreDomainSeniorTool);
|
|
92
|
+
// The Core Domain Chart's page of the colour pickers' carousel
|
|
93
|
+
// (`docs/adr/0027`). Here, beside the senior tool, because offering hues
|
|
94
|
+
// is TOOLING — the colours already painted on a stored chart are content
|
|
95
|
+
// and do not move (`docs/adr/0009`).
|
|
96
|
+
context.register(FrameworkPaletteExtension(CORE_DOMAIN_FRAMEWORK_PALETTE));
|
|
91
97
|
// The Templates-panel category, gated by this framework's own flag like
|
|
92
98
|
// every other framework's: a template is tooling (`docs/adr/0009`), and it
|
|
93
99
|
// is DERIVED from this package's commands, so it registers where they do.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-ddd-core-domain",
|
|
3
3
|
"description": "Labre ddd-core-domain framework for @formicoidea/labre-core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.42.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@formicoidea/labre-core": "0.
|
|
35
|
-
"@formicoidea/labre-ddd-shared": "0.
|
|
34
|
+
"@formicoidea/labre-core": "0.42.0",
|
|
35
|
+
"@formicoidea/labre-ddd-shared": "0.42.0",
|
|
36
36
|
"lit": "^3.2.0"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type AutoLegendSpec } from '@formicoidea/labre-ddd-shared';
|
|
2
|
-
/**
|
|
3
|
-
* What the Core Domain Chart's automatic legend can say — a TABLE, and nothing
|
|
4
|
-
* else: the scan, the placement and the box are `createAutoLegend`'s job.
|
|
5
|
-
*
|
|
6
|
-
* Every row is DERIVED from the presets the palette draws its dots with
|
|
7
|
-
* ({@link CD_SUBDOMAINS}) and from the role vocabulary's own labels, never
|
|
8
|
-
* restated — which also keeps this table and `core-domain.off-legend-colour`
|
|
9
|
-
* naming the same five colours by construction.
|
|
10
|
-
*
|
|
11
|
-
* ## What changed
|
|
12
|
-
*
|
|
13
|
-
* The chart's legend button predates roles: until now it scanned the perimeter
|
|
14
|
-
* for FILL COLOURS, which is why it fell back to the full notation when it
|
|
15
|
-
* recognised nothing. Detection is now by role, like every other reader of the
|
|
16
|
-
* board, with one consequence worth stating: a chart on which nothing is
|
|
17
|
-
* recognised yields a legend box with a title and no rows, rather than the whole
|
|
18
|
-
* notation. That is Wardley's behaviour and the honest one — a legend lists what
|
|
19
|
-
* is drawn, not what could have been.
|
|
20
|
-
*
|
|
21
|
-
* The **Team Topologies markers** were the casualty of that change for one
|
|
22
|
-
* release: `addMarker` stamped no role, so a chart covered in them produced a
|
|
23
|
-
* legend that mentioned none (PO recette, 26/08/2026). They now carry
|
|
24
|
-
* `core-domain:marker-*` and their section is here, derived from
|
|
25
|
-
* `TEAM_TOPOLOGIES` like everything else — swatch, letter and colour from the
|
|
26
|
-
* preset the palette draws with, wording from the vocabulary that names the
|
|
27
|
-
* role.
|
|
28
|
-
*/
|
|
29
|
-
export declare const CORE_DOMAIN_AUTO_LEGEND: AutoLegendSpec;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { CD_SUBDOMAINS, MOVEMENT_COLOR, roleLabel, TEAM_TOPOLOGIES, } from '@formicoidea/labre-ddd-shared';
|
|
2
|
-
import { BOARD_LEGEND_TITLE } from '@formicoidea/labre-core/shared/services';
|
|
3
|
-
import { CORE_DOMAIN_ROLE, CORE_DOMAIN_ROLES } from '../roles.js';
|
|
4
|
-
import { CORE_DOMAIN_SEED_LEGEND_MOVEMENT, CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS, CORE_DOMAIN_SEED_LEGEND_TEAM_MODES, } from '../translations.js';
|
|
5
|
-
/**
|
|
6
|
-
* What the Core Domain Chart's automatic legend can say — a TABLE, and nothing
|
|
7
|
-
* else: the scan, the placement and the box are `createAutoLegend`'s job.
|
|
8
|
-
*
|
|
9
|
-
* Every row is DERIVED from the presets the palette draws its dots with
|
|
10
|
-
* ({@link CD_SUBDOMAINS}) and from the role vocabulary's own labels, never
|
|
11
|
-
* restated — which also keeps this table and `core-domain.off-legend-colour`
|
|
12
|
-
* naming the same five colours by construction.
|
|
13
|
-
*
|
|
14
|
-
* ## What changed
|
|
15
|
-
*
|
|
16
|
-
* The chart's legend button predates roles: until now it scanned the perimeter
|
|
17
|
-
* for FILL COLOURS, which is why it fell back to the full notation when it
|
|
18
|
-
* recognised nothing. Detection is now by role, like every other reader of the
|
|
19
|
-
* board, with one consequence worth stating: a chart on which nothing is
|
|
20
|
-
* recognised yields a legend box with a title and no rows, rather than the whole
|
|
21
|
-
* notation. That is Wardley's behaviour and the honest one — a legend lists what
|
|
22
|
-
* is drawn, not what could have been.
|
|
23
|
-
*
|
|
24
|
-
* The **Team Topologies markers** were the casualty of that change for one
|
|
25
|
-
* release: `addMarker` stamped no role, so a chart covered in them produced a
|
|
26
|
-
* legend that mentioned none (PO recette, 26/08/2026). They now carry
|
|
27
|
-
* `core-domain:marker-*` and their section is here, derived from
|
|
28
|
-
* `TEAM_TOPOLOGIES` like everything else — swatch, letter and colour from the
|
|
29
|
-
* preset the palette draws with, wording from the vocabulary that names the
|
|
30
|
-
* role.
|
|
31
|
-
*/
|
|
32
|
-
export const CORE_DOMAIN_AUTO_LEGEND = {
|
|
33
|
-
title: BOARD_LEGEND_TITLE[1],
|
|
34
|
-
titleKey: BOARD_LEGEND_TITLE[0],
|
|
35
|
-
roles: CORE_DOMAIN_ROLES,
|
|
36
|
-
sections: [
|
|
37
|
-
{
|
|
38
|
-
title: CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS[1],
|
|
39
|
-
titleKey: CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS[0],
|
|
40
|
-
entries: CD_SUBDOMAINS.map(preset => ({
|
|
41
|
-
role: CORE_DOMAIN_ROLE[preset.kind],
|
|
42
|
-
row: {
|
|
43
|
-
swatch: 'dot',
|
|
44
|
-
color: preset.fill,
|
|
45
|
-
label: preset.label,
|
|
46
|
-
},
|
|
47
|
-
})),
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
// The letter is what identifies a marker on the chart — the squares are
|
|
51
|
-
// three colours a reader has no key to — so the legend shows the same
|
|
52
|
-
// square with the same letter in it, which is what `LegendRow.letter`
|
|
53
|
-
// exists for.
|
|
54
|
-
title: CORE_DOMAIN_SEED_LEGEND_TEAM_MODES[1],
|
|
55
|
-
titleKey: CORE_DOMAIN_SEED_LEGEND_TEAM_MODES[0],
|
|
56
|
-
entries: TEAM_TOPOLOGIES.map(preset => ({
|
|
57
|
-
role: CORE_DOMAIN_ROLE[preset.kind],
|
|
58
|
-
row: {
|
|
59
|
-
swatch: 'square',
|
|
60
|
-
color: preset.fill,
|
|
61
|
-
letter: preset.letter,
|
|
62
|
-
label: roleLabel(CORE_DOMAIN_ROLES, CORE_DOMAIN_ROLE[preset.kind]),
|
|
63
|
-
},
|
|
64
|
-
})),
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
title: CORE_DOMAIN_SEED_LEGEND_MOVEMENT[1],
|
|
68
|
-
titleKey: CORE_DOMAIN_SEED_LEGEND_MOVEMENT[0],
|
|
69
|
-
entries: [
|
|
70
|
-
{
|
|
71
|
-
role: CORE_DOMAIN_ROLE.movement,
|
|
72
|
-
row: {
|
|
73
|
-
swatch: 'line',
|
|
74
|
-
// The style `activateMovement` arms the connector tool with: a red
|
|
75
|
-
// dashed line.
|
|
76
|
-
color: MOVEMENT_COLOR,
|
|
77
|
-
dashed: true,
|
|
78
|
-
label: roleLabel(CORE_DOMAIN_ROLES, CORE_DOMAIN_ROLE.movement),
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
};
|