@formicoidea/labre-framework-cynefin 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.js +5 -1
- package/dist/cynefin/consts.d.ts +19 -0
- package/dist/cynefin/consts.js +12 -0
- package/dist/cynefin/element-renderer.js +12 -8
- package/dist/cynefin/element-view.d.ts +11 -2
- package/dist/cynefin/element-view.js +17 -2
- package/dist/cynefin/labels.d.ts +25 -0
- package/dist/cynefin/labels.js +40 -0
- package/dist/estuarine/consts.d.ts +17 -1
- package/dist/estuarine/consts.js +17 -1
- package/dist/estuarine/element-renderer.js +11 -7
- package/dist/estuarine/element-view.d.ts +10 -2
- package/dist/estuarine/element-view.js +17 -2
- package/dist/estuarine/labels.d.ts +39 -0
- package/dist/estuarine/labels.js +49 -0
- package/dist/templates/index.js +1 -1
- package/dist/toolbar/palette.d.ts +31 -0
- package/dist/toolbar/palette.js +105 -0
- package/dist/toolbar/senior-button.d.ts +2 -0
- package/dist/toolbar/senior-button.js +6 -2
- package/dist/translations.js +9 -0
- package/dist/view.js +7 -0
- package/package.json +2 -2
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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createConstraintHexagon, createCynefin, createEstuarineMap, } from './actions.js';
|
|
2
|
-
import { cynefinMenuIcon, estuarineMenuIcon, hexagonMenuIcon, } from './toolbar/icons.js';
|
|
2
|
+
import { cynefinMenuIcon, cynefinToolbarIcon, estuarineMenuIcon, hexagonMenuIcon, } from './toolbar/icons.js';
|
|
3
3
|
const SPECS = [
|
|
4
4
|
{
|
|
5
5
|
id: 'addCynefin',
|
|
@@ -49,4 +49,8 @@ export const cynefinEstuarineCommandIcons = {
|
|
|
49
49
|
'cynefin.frame': cynefinMenuIcon,
|
|
50
50
|
'estuarine.map': estuarineMenuIcon,
|
|
51
51
|
'estuarine.hexagon': hexagonMenuIcon,
|
|
52
|
+
// The senior button's 56×56 glyph, so `FrameworkDescriptor.iconKey` resolves
|
|
53
|
+
// through `getCommandIcon`. Historical key: `cynefin`, not
|
|
54
|
+
// `cynefin-estuarine`.
|
|
55
|
+
'cynefin.toolbar': cynefinToolbarIcon,
|
|
52
56
|
};
|
package/dist/cynefin/consts.d.ts
CHANGED
|
@@ -17,6 +17,14 @@ import type { ChromeWording } from '@formicoidea/labre-core/shared/services';
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const REF_W = 1080;
|
|
19
19
|
export declare const REF_H = 777;
|
|
20
|
+
/**
|
|
21
|
+
* Type size of a domain heading, in reference units.
|
|
22
|
+
*
|
|
23
|
+
* Named because two things read it: the renderer, which draws the word, and the
|
|
24
|
+
* hit test that offers it to a double-click. A size that lived only in the
|
|
25
|
+
* renderer's font string would let the target drift away from the word.
|
|
26
|
+
*/
|
|
27
|
+
export declare const HEADING_SIZE = 30;
|
|
20
28
|
export declare const COLORS: {
|
|
21
29
|
readonly boundary: "#333333";
|
|
22
30
|
readonly teal: "#2a9d99";
|
|
@@ -50,6 +58,17 @@ export declare const DASH_RECTS: ReadonlyArray<readonly [number, number, number,
|
|
|
50
58
|
*/
|
|
51
59
|
export interface DomainBlock {
|
|
52
60
|
heading: ChromeWording;
|
|
61
|
+
/**
|
|
62
|
+
* The model prop the heading is renamed into (issue #355).
|
|
63
|
+
*
|
|
64
|
+
* The domain HEADINGS are the only words of this drawing a user may rewrite,
|
|
65
|
+
* and that line is drawn on notation rather than on effort: a team renames
|
|
66
|
+
* "Complex" to the word its own people use, but the Probe / Sense / Respond
|
|
67
|
+
* sentences, the "ordered system" subheadings and the Aporia / Confusion
|
|
68
|
+
* markers ARE Cynefin — rewriting them would leave a diagram that looks like
|
|
69
|
+
* the framework and no longer says what it says.
|
|
70
|
+
*/
|
|
71
|
+
prop: string;
|
|
53
72
|
/** Left edge shared by heading, subheading and body lines. */
|
|
54
73
|
x: number;
|
|
55
74
|
/** Heading (h1) baseline. */
|
package/dist/cynefin/consts.js
CHANGED
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export const REF_W = 1080;
|
|
18
18
|
export const REF_H = 777;
|
|
19
|
+
/**
|
|
20
|
+
* Type size of a domain heading, in reference units.
|
|
21
|
+
*
|
|
22
|
+
* Named because two things read it: the renderer, which draws the word, and the
|
|
23
|
+
* hit test that offers it to a double-click. A size that lived only in the
|
|
24
|
+
* renderer's font string would let the target drift away from the word.
|
|
25
|
+
*/
|
|
26
|
+
export const HEADING_SIZE = 30;
|
|
19
27
|
export const COLORS = {
|
|
20
28
|
boundary: '#333333',
|
|
21
29
|
teal: '#2a9d99',
|
|
@@ -180,6 +188,7 @@ const LINE_RESPOND_PRACTICES = [
|
|
|
180
188
|
export const DOMAINS = [
|
|
181
189
|
{
|
|
182
190
|
heading: HEADING_COMPLEX,
|
|
191
|
+
prop: 'complexTitle',
|
|
183
192
|
x: 37,
|
|
184
193
|
hy: 31,
|
|
185
194
|
subheading: SUBHEADING_ADAPTIVE,
|
|
@@ -207,6 +216,7 @@ export const DOMAINS = [
|
|
|
207
216
|
},
|
|
208
217
|
{
|
|
209
218
|
heading: HEADING_COMPLICATED,
|
|
219
|
+
prop: 'complicatedTitle',
|
|
210
220
|
x: 779,
|
|
211
221
|
hy: 31,
|
|
212
222
|
subheading: SUBHEADING_ORDERED,
|
|
@@ -229,6 +239,7 @@ export const DOMAINS = [
|
|
|
229
239
|
},
|
|
230
240
|
{
|
|
231
241
|
heading: HEADING_CHAOTIC,
|
|
242
|
+
prop: 'chaoticTitle',
|
|
232
243
|
x: 37,
|
|
233
244
|
hy: 587,
|
|
234
245
|
subheading: SUBHEADING_UNORDERED,
|
|
@@ -256,6 +267,7 @@ export const DOMAINS = [
|
|
|
256
267
|
},
|
|
257
268
|
{
|
|
258
269
|
heading: HEADING_CLEAR,
|
|
270
|
+
prop: 'clearTitle',
|
|
259
271
|
x: 779,
|
|
260
272
|
hy: 587,
|
|
261
273
|
subheading: SUBHEADING_ORDERED,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ElementRendererExtension, } from '@formicoidea/labre-core/blocks/surface';
|
|
1
|
+
import { ElementRendererExtension, taggedPath2D, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
2
|
import { TranslationProvider, translateKey, } from '@formicoidea/labre-core/shared/services';
|
|
3
3
|
import { FONT_FAMILY, refScale } from '../utils.js';
|
|
4
|
-
import { COLORS, DARK_BACK_PATHS, DARK_FRONT_PATHS, DASH_RECTS, DOMAINS, HATCHES, MARKERS, REF_H, REF_W, SMALL_LABELS, TEAL_LABELS, TEAL_PATH, TEAL_WIDTH, } from './consts.js';
|
|
4
|
+
import { COLORS, DARK_BACK_PATHS, DARK_FRONT_PATHS, DASH_RECTS, DOMAINS, HATCHES, HEADING_SIZE, MARKERS, REF_H, REF_W, SMALL_LABELS, TEAL_LABELS, TEAL_PATH, TEAL_WIDTH, } from './consts.js';
|
|
5
|
+
import { cynefinHeadingText } from './labels.js';
|
|
5
6
|
/**
|
|
6
7
|
* Canvas renderer for the Liminal Cynefin diagram — reproduces the official SVG:
|
|
7
8
|
* the dark hand-drawn boundary, the teal "iterate" curve, the dashed
|
|
@@ -48,7 +49,7 @@ export const cynefin = (model, ctx, matrix, renderer) => {
|
|
|
48
49
|
for (const [d, lw, miter] of DARK_BACK_PATHS) {
|
|
49
50
|
ctx.lineJoin = miter ? 'miter' : 'round';
|
|
50
51
|
ctx.lineWidth = lw;
|
|
51
|
-
ctx.stroke(
|
|
52
|
+
ctx.stroke(taggedPath2D(d));
|
|
52
53
|
}
|
|
53
54
|
ctx.lineJoin = 'round';
|
|
54
55
|
// ── Dashed boundary (oriented square pavings) ───────────────────────
|
|
@@ -64,14 +65,14 @@ export const cynefin = (model, ctx, matrix, renderer) => {
|
|
|
64
65
|
if (model.showLiminalLine) {
|
|
65
66
|
ctx.strokeStyle = COLORS.teal;
|
|
66
67
|
ctx.lineWidth = TEAL_WIDTH;
|
|
67
|
-
ctx.stroke(
|
|
68
|
+
ctx.stroke(taggedPath2D(TEAL_PATH));
|
|
68
69
|
}
|
|
69
70
|
// ── Dark boundary strokes (over the teal curve) ─────────────────────
|
|
70
71
|
ctx.strokeStyle = COLORS.boundary;
|
|
71
72
|
for (const [d, lw, miter] of DARK_FRONT_PATHS) {
|
|
72
73
|
ctx.lineJoin = miter ? 'miter' : 'round';
|
|
73
74
|
ctx.lineWidth = lw;
|
|
74
|
-
ctx.stroke(
|
|
75
|
+
ctx.stroke(taggedPath2D(d));
|
|
75
76
|
}
|
|
76
77
|
ctx.lineJoin = 'round';
|
|
77
78
|
// ── Cliff hatching ──────────────────────────────────────────────────
|
|
@@ -87,9 +88,12 @@ export const cynefin = (model, ctx, matrix, renderer) => {
|
|
|
87
88
|
if (model.showTitles) {
|
|
88
89
|
ctx.textAlign = 'left';
|
|
89
90
|
ctx.fillStyle = COLORS.heading;
|
|
90
|
-
ctx.font = `700
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
ctx.font = `700 ${HEADING_SIZE}px ${FONT_FAMILY}`;
|
|
92
|
+
// The user's own word when they have renamed this domain, the catalogue's
|
|
93
|
+
// otherwise — the same precedence a declared background applies.
|
|
94
|
+
for (const d of DOMAINS) {
|
|
95
|
+
ctx.fillText(cynefinHeadingText(model, d, tr), d.x, d.hy);
|
|
96
|
+
}
|
|
93
97
|
ctx.textAlign = 'center';
|
|
94
98
|
for (const m of MARKERS) {
|
|
95
99
|
ctx.fillStyle = COLORS.body;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
import type { EditableBackgroundLabel } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { FrameworkBackgroundView } from '@formicoidea/labre-core/blocks/surface';
|
|
1
3
|
import type { CynefinElementModel } from '@formicoidea/labre-core/model';
|
|
2
|
-
import { GfxElementModelView } from '@formicoidea/labre-core/std/gfx';
|
|
3
4
|
/**
|
|
4
5
|
* View for the Cynefin background. Registering it ensures `gfx.view.get(model)`
|
|
5
6
|
* returns a view (required so move / select interactions work).
|
|
7
|
+
*
|
|
8
|
+
* Extends {@link FrameworkBackgroundView} rather than
|
|
9
|
+
* `DeclaredBackgroundView`: this diagram is a figurative reproduction of the
|
|
10
|
+
* official SVG and has no `FrameworkBackgroundDef` behind it, so it says where
|
|
11
|
+
* its labels are in its own reference space. The gesture itself — where a
|
|
12
|
+
* double-click is allowed to land, the in-place `<input>`, the commit that
|
|
13
|
+
* refuses to write an untouched value — is the shared one (issue #355).
|
|
6
14
|
*/
|
|
7
|
-
export declare class CynefinView extends
|
|
15
|
+
export declare class CynefinView extends FrameworkBackgroundView<CynefinElementModel> {
|
|
8
16
|
static type: string;
|
|
17
|
+
protected labelAt(lx: number, ly: number, w: number, h: number): EditableBackgroundLabel | null;
|
|
9
18
|
}
|
|
10
19
|
/**
|
|
11
20
|
* Resize gating: the resize handles are hidden unless `model.resizeEnabled` is
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FrameworkBackgroundView, hitTestBackgroundLabel, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { translateKey, } from '@formicoidea/labre-core/shared/services';
|
|
3
|
+
import { GfxViewInteractionExtension } from '@formicoidea/labre-core/std/gfx';
|
|
4
|
+
import { cynefinLabelHits } from './labels.js';
|
|
2
5
|
/**
|
|
3
6
|
* View for the Cynefin background. Registering it ensures `gfx.view.get(model)`
|
|
4
7
|
* returns a view (required so move / select interactions work).
|
|
8
|
+
*
|
|
9
|
+
* Extends {@link FrameworkBackgroundView} rather than
|
|
10
|
+
* `DeclaredBackgroundView`: this diagram is a figurative reproduction of the
|
|
11
|
+
* official SVG and has no `FrameworkBackgroundDef` behind it, so it says where
|
|
12
|
+
* its labels are in its own reference space. The gesture itself — where a
|
|
13
|
+
* double-click is allowed to land, the in-place `<input>`, the commit that
|
|
14
|
+
* refuses to write an untouched value — is the shared one (issue #355).
|
|
5
15
|
*/
|
|
6
|
-
export class CynefinView extends
|
|
16
|
+
export class CynefinView extends FrameworkBackgroundView {
|
|
7
17
|
static { this.type = 'cynefin'; }
|
|
18
|
+
labelAt(lx, ly, w, h) {
|
|
19
|
+
const translate = (wording) => translateKey(this.gfx.std, ...wording);
|
|
20
|
+
const hit = hitTestBackgroundLabel(cynefinLabelHits(this.model, w, h, translate), lx, ly);
|
|
21
|
+
return hit ? { prop: hit.prop, text: hit.text } : null;
|
|
22
|
+
}
|
|
8
23
|
}
|
|
9
24
|
/**
|
|
10
25
|
* Resize gating: the resize handles are hidden unless `model.resizeEnabled` is
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { BackgroundLabelHit } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import type { CynefinElementModel } from '@formicoidea/labre-core/model';
|
|
3
|
+
import type { ChromeWording } from '@formicoidea/labre-core/shared/services';
|
|
4
|
+
import type { DomainBlock } from './consts.js';
|
|
5
|
+
/** Resolves a wording against the host's catalogue, or falls back to English. */
|
|
6
|
+
export type CynefinWordingResolver = (wording: ChromeWording) => string;
|
|
7
|
+
/**
|
|
8
|
+
* What a domain heading SAYS: the user's own word, else the vocabulary.
|
|
9
|
+
*
|
|
10
|
+
* The very precedence `backgroundLabelText` applies to a declared background —
|
|
11
|
+
* user text wins over the catalogue, the catalogue over the shipped English —
|
|
12
|
+
* spelled out here because this diagram has no declaration to apply it for it.
|
|
13
|
+
* An empty string is a real answer (the user erased the word), which is why the
|
|
14
|
+
* test is against `undefined` and not against falsiness.
|
|
15
|
+
*/
|
|
16
|
+
export declare function cynefinHeadingText(model: CynefinElementModel, block: DomainBlock, translate: CynefinWordingResolver): string;
|
|
17
|
+
/**
|
|
18
|
+
* Clickable boxes of the four domain headings, in ELEMENT-LOCAL coordinates.
|
|
19
|
+
*
|
|
20
|
+
* Built from the same reference positions and the same uniform letterbox fit
|
|
21
|
+
* the renderer draws them with, so the target tracks the word at any size, and
|
|
22
|
+
* empty while the headings are hidden — a label that is not painted may not be
|
|
23
|
+
* aimed at either.
|
|
24
|
+
*/
|
|
25
|
+
export declare function cynefinLabelHits(model: CynefinElementModel, w: number, h: number, translate: CynefinWordingResolver): BackgroundLabelHit[];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { backgroundTextHitBox } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { refScale } from '../utils.js';
|
|
3
|
+
import { DOMAINS, HEADING_SIZE, REF_H, REF_W } from './consts.js';
|
|
4
|
+
/**
|
|
5
|
+
* What a domain heading SAYS: the user's own word, else the vocabulary.
|
|
6
|
+
*
|
|
7
|
+
* The very precedence `backgroundLabelText` applies to a declared background —
|
|
8
|
+
* user text wins over the catalogue, the catalogue over the shipped English —
|
|
9
|
+
* spelled out here because this diagram has no declaration to apply it for it.
|
|
10
|
+
* An empty string is a real answer (the user erased the word), which is why the
|
|
11
|
+
* test is against `undefined` and not against falsiness.
|
|
12
|
+
*/
|
|
13
|
+
export function cynefinHeadingText(model, block, translate) {
|
|
14
|
+
const own = model[block.prop];
|
|
15
|
+
return own === undefined || own === null
|
|
16
|
+
? translate(block.heading)
|
|
17
|
+
: String(own);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Clickable boxes of the four domain headings, in ELEMENT-LOCAL coordinates.
|
|
21
|
+
*
|
|
22
|
+
* Built from the same reference positions and the same uniform letterbox fit
|
|
23
|
+
* the renderer draws them with, so the target tracks the word at any size, and
|
|
24
|
+
* empty while the headings are hidden — a label that is not painted may not be
|
|
25
|
+
* aimed at either.
|
|
26
|
+
*/
|
|
27
|
+
export function cynefinLabelHits(model, w, h, translate) {
|
|
28
|
+
if (!model.showTitles)
|
|
29
|
+
return [];
|
|
30
|
+
const { s, ox, oy } = refScale(w, h, REF_W, REF_H);
|
|
31
|
+
return DOMAINS.map(block => {
|
|
32
|
+
const text = cynefinHeadingText(model, block, translate);
|
|
33
|
+
return {
|
|
34
|
+
id: block.prop,
|
|
35
|
+
prop: block.prop,
|
|
36
|
+
text,
|
|
37
|
+
...backgroundTextHitBox(text, HEADING_SIZE * s, ox + block.x * s, oy + block.hy * s),
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -59,10 +59,22 @@ export declare const VOLATILE_PATH = "M 58 446 C 61 447, 70 451, 76 454 C 82 457
|
|
|
59
59
|
export declare const VOLATILE_WIDTH = 5;
|
|
60
60
|
/** Every {@link LABELS} wording, for `translations.ts`'s manifest. */
|
|
61
61
|
export declare const ESTUARINE_CANVAS_WORDINGS: readonly ChromeWording[];
|
|
62
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Uppercase legends: anchored centre, alphabetic baseline, with letter-spacing.
|
|
64
|
+
*
|
|
65
|
+
* `prop` names the model key a double-click renames the legend into (issue
|
|
66
|
+
* #355), and `visibleProp` the toggle that shows it — the legend is painted
|
|
67
|
+
* with its curve and hidden with it, so it is aimable exactly when it is drawn.
|
|
68
|
+
*
|
|
69
|
+
* The three legends and nothing else: the italic `e` / `t` axis letters are
|
|
70
|
+
* notation, not words (PO decision, and the reason they carry no i18n key
|
|
71
|
+
* either), so they are not renamable.
|
|
72
|
+
*/
|
|
63
73
|
export declare const LABELS: {
|
|
64
74
|
readonly counterfactual: {
|
|
65
75
|
readonly wording: ChromeWording;
|
|
76
|
+
readonly prop: "counterfactualLabel";
|
|
77
|
+
readonly visibleProp: "showCounterfactual";
|
|
66
78
|
readonly x: 422;
|
|
67
79
|
readonly y: 25;
|
|
68
80
|
readonly size: 20;
|
|
@@ -70,6 +82,8 @@ export declare const LABELS: {
|
|
|
70
82
|
};
|
|
71
83
|
readonly liminal: {
|
|
72
84
|
readonly wording: ChromeWording;
|
|
85
|
+
readonly prop: "liminalLabel";
|
|
86
|
+
readonly visibleProp: "showLiminal";
|
|
73
87
|
readonly x: 316;
|
|
74
88
|
readonly y: 192;
|
|
75
89
|
readonly size: 18;
|
|
@@ -77,6 +91,8 @@ export declare const LABELS: {
|
|
|
77
91
|
};
|
|
78
92
|
readonly volatile: {
|
|
79
93
|
readonly wording: ChromeWording;
|
|
94
|
+
readonly prop: "volatileLabel";
|
|
95
|
+
readonly visibleProp: "showVolatile";
|
|
80
96
|
readonly x: 219;
|
|
81
97
|
readonly y: 783;
|
|
82
98
|
readonly size: 20;
|
package/dist/estuarine/consts.js
CHANGED
|
@@ -78,10 +78,22 @@ export const ESTUARINE_CANVAS_WORDINGS = [
|
|
|
78
78
|
LABEL_LIMINAL,
|
|
79
79
|
LABEL_VOLATILE,
|
|
80
80
|
];
|
|
81
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Uppercase legends: anchored centre, alphabetic baseline, with letter-spacing.
|
|
83
|
+
*
|
|
84
|
+
* `prop` names the model key a double-click renames the legend into (issue
|
|
85
|
+
* #355), and `visibleProp` the toggle that shows it — the legend is painted
|
|
86
|
+
* with its curve and hidden with it, so it is aimable exactly when it is drawn.
|
|
87
|
+
*
|
|
88
|
+
* The three legends and nothing else: the italic `e` / `t` axis letters are
|
|
89
|
+
* notation, not words (PO decision, and the reason they carry no i18n key
|
|
90
|
+
* either), so they are not renamable.
|
|
91
|
+
*/
|
|
82
92
|
export const LABELS = {
|
|
83
93
|
counterfactual: {
|
|
84
94
|
wording: LABEL_COUNTERFACTUAL,
|
|
95
|
+
prop: 'counterfactualLabel',
|
|
96
|
+
visibleProp: 'showCounterfactual',
|
|
85
97
|
x: 422,
|
|
86
98
|
y: 25,
|
|
87
99
|
size: 20,
|
|
@@ -89,6 +101,8 @@ export const LABELS = {
|
|
|
89
101
|
},
|
|
90
102
|
liminal: {
|
|
91
103
|
wording: LABEL_LIMINAL,
|
|
104
|
+
prop: 'liminalLabel',
|
|
105
|
+
visibleProp: 'showLiminal',
|
|
92
106
|
x: 316,
|
|
93
107
|
y: 192,
|
|
94
108
|
size: 18,
|
|
@@ -96,6 +110,8 @@ export const LABELS = {
|
|
|
96
110
|
},
|
|
97
111
|
volatile: {
|
|
98
112
|
wording: LABEL_VOLATILE,
|
|
113
|
+
prop: 'volatileLabel',
|
|
114
|
+
visibleProp: 'showVolatile',
|
|
99
115
|
x: 219,
|
|
100
116
|
y: 783,
|
|
101
117
|
size: 20,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ElementRendererExtension, } from '@formicoidea/labre-core/blocks/surface';
|
|
1
|
+
import { ElementRendererExtension, taggedPath2D, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
2
|
import { translateKey, } from '@formicoidea/labre-core/shared/services';
|
|
3
3
|
import { FONT_FAMILY } from '../utils.js';
|
|
4
4
|
import { ARROWHEADS, AXIS_LABELS, AXIS_WIDTH, COLORS, COUNTERFACTUAL_PATH, COUNTERFACTUAL_WIDTH, E_AXIS, LABEL_LETTER_SPACING, LABELS, LIMINAL_PATH, LIMINAL_WIDTH, REF_H, REF_W, T_AXIS, VOLATILE_PATH, VOLATILE_WIDTH, } from './consts.js';
|
|
5
|
+
import { estuarineLegendText } from './labels.js';
|
|
5
6
|
/**
|
|
6
7
|
* The three reference curves are drawn as a permanent GHOST (PO arbitration,
|
|
7
8
|
* 26/08/2026): dashed, translucent, never solid again.
|
|
@@ -40,21 +41,21 @@ export function estuarineCurves() {
|
|
|
40
41
|
return (_curves ??= [
|
|
41
42
|
{
|
|
42
43
|
key: 'liminal',
|
|
43
|
-
path:
|
|
44
|
+
path: taggedPath2D(LIMINAL_PATH),
|
|
44
45
|
color: COLORS.liminal,
|
|
45
46
|
width: LIMINAL_WIDTH,
|
|
46
47
|
visibleProp: 'showLiminal',
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
50
|
key: 'volatile',
|
|
50
|
-
path:
|
|
51
|
+
path: taggedPath2D(VOLATILE_PATH),
|
|
51
52
|
color: COLORS.volatile,
|
|
52
53
|
width: VOLATILE_WIDTH,
|
|
53
54
|
visibleProp: 'showVolatile',
|
|
54
55
|
},
|
|
55
56
|
{
|
|
56
57
|
key: 'counterfactual',
|
|
57
|
-
path:
|
|
58
|
+
path: taggedPath2D(COUNTERFACTUAL_PATH),
|
|
58
59
|
color: COLORS.counterfactual,
|
|
59
60
|
width: COUNTERFACTUAL_WIDTH,
|
|
60
61
|
visibleProp: 'showCounterfactual',
|
|
@@ -146,7 +147,8 @@ export const estuarine = (model, ctx, matrix, renderer) => {
|
|
|
146
147
|
// Uppercase legend (centre-anchored, alphabetic baseline, letter-spaced).
|
|
147
148
|
// Anchored proportionally, typed isotropically — never inside the stretch.
|
|
148
149
|
const hasSpacing = 'letterSpacing' in ctx;
|
|
149
|
-
const legend = (
|
|
150
|
+
const legend = (key) => {
|
|
151
|
+
const l = LABELS[key];
|
|
150
152
|
ctx.fillStyle = l.color;
|
|
151
153
|
ctx.font = `600 ${l.size * fit.strokeScale}px ${FONT_FAMILY}`;
|
|
152
154
|
ctx.textAlign = 'center';
|
|
@@ -154,7 +156,9 @@ export const estuarine = (model, ctx, matrix, renderer) => {
|
|
|
154
156
|
if (hasSpacing) {
|
|
155
157
|
ctx.letterSpacing = `${LABEL_LETTER_SPACING * fit.strokeScale}px`;
|
|
156
158
|
}
|
|
157
|
-
|
|
159
|
+
// The user's own word when they have renamed this legend, the catalogue's
|
|
160
|
+
// otherwise — the same precedence a declared background applies.
|
|
161
|
+
ctx.fillText(estuarineLegendText(model, key, tr), ax(l.x), ay(l.y));
|
|
158
162
|
if (hasSpacing)
|
|
159
163
|
ctx.letterSpacing = '0px';
|
|
160
164
|
};
|
|
@@ -173,7 +177,7 @@ export const estuarine = (model, ctx, matrix, renderer) => {
|
|
|
173
177
|
ctx.setLineDash([...GHOST_DASH]);
|
|
174
178
|
ctx.stroke(curve.path);
|
|
175
179
|
ctx.restore();
|
|
176
|
-
legend(
|
|
180
|
+
legend(curve.key);
|
|
177
181
|
}
|
|
178
182
|
// ── Italic e / t axis letters ───────────────────────────────────────
|
|
179
183
|
if (model.showAxisLabels) {
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
import type { EditableBackgroundLabel } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { FrameworkBackgroundView } from '@formicoidea/labre-core/blocks/surface';
|
|
1
3
|
import type { EstuarineElementModel } from '@formicoidea/labre-core/model';
|
|
2
|
-
import { GfxElementModelView } from '@formicoidea/labre-core/std/gfx';
|
|
3
4
|
/**
|
|
4
5
|
* View for the Estuarine background. Registering it ensures `gfx.view.get(model)`
|
|
5
6
|
* returns a view (required so move / select interactions work).
|
|
7
|
+
*
|
|
8
|
+
* Extends {@link FrameworkBackgroundView} rather than
|
|
9
|
+
* `DeclaredBackgroundView`: the map is a reproduction of the official SVG with
|
|
10
|
+
* a stretch of its own and no `FrameworkBackgroundDef` behind it, so it says
|
|
11
|
+
* where its three legends are through the very fit the renderer anchors them
|
|
12
|
+
* with. The gesture itself is the shared one (issue #355).
|
|
6
13
|
*/
|
|
7
|
-
export declare class EstuarineView extends
|
|
14
|
+
export declare class EstuarineView extends FrameworkBackgroundView<EstuarineElementModel> {
|
|
8
15
|
static type: string;
|
|
16
|
+
protected labelAt(lx: number, ly: number, w: number, h: number): EditableBackgroundLabel | null;
|
|
9
17
|
}
|
|
10
18
|
/**
|
|
11
19
|
* Resize gating: the resize handles are hidden unless `model.resizeEnabled` is
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FrameworkBackgroundView, hitTestBackgroundLabel, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { translateKey, } from '@formicoidea/labre-core/shared/services';
|
|
3
|
+
import { GfxViewInteractionExtension } from '@formicoidea/labre-core/std/gfx';
|
|
4
|
+
import { estuarineFit } from './element-renderer.js';
|
|
5
|
+
import { estuarineLabelHits } from './labels.js';
|
|
2
6
|
/**
|
|
3
7
|
* View for the Estuarine background. Registering it ensures `gfx.view.get(model)`
|
|
4
8
|
* returns a view (required so move / select interactions work).
|
|
9
|
+
*
|
|
10
|
+
* Extends {@link FrameworkBackgroundView} rather than
|
|
11
|
+
* `DeclaredBackgroundView`: the map is a reproduction of the official SVG with
|
|
12
|
+
* a stretch of its own and no `FrameworkBackgroundDef` behind it, so it says
|
|
13
|
+
* where its three legends are through the very fit the renderer anchors them
|
|
14
|
+
* with. The gesture itself is the shared one (issue #355).
|
|
5
15
|
*/
|
|
6
|
-
export class EstuarineView extends
|
|
16
|
+
export class EstuarineView extends FrameworkBackgroundView {
|
|
7
17
|
static { this.type = 'estuarine'; }
|
|
18
|
+
labelAt(lx, ly, w, h) {
|
|
19
|
+
const translate = (wording) => translateKey(this.gfx.std, ...wording);
|
|
20
|
+
const hit = hitTestBackgroundLabel(estuarineLabelHits(this.model, estuarineFit(w, h), translate), lx, ly);
|
|
21
|
+
return hit ? { prop: hit.prop, text: hit.text } : null;
|
|
22
|
+
}
|
|
8
23
|
}
|
|
9
24
|
/**
|
|
10
25
|
* Resize gating: the resize handles are hidden unless `model.resizeEnabled` is
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { BackgroundLabelHit } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import type { EstuarineElementModel } from '@formicoidea/labre-core/model';
|
|
3
|
+
import type { ChromeWording } from '@formicoidea/labre-core/shared/services';
|
|
4
|
+
import { LABELS } from './consts.js';
|
|
5
|
+
/** Resolves a wording against the host's catalogue, or falls back to English. */
|
|
6
|
+
export type EstuarineWordingResolver = (wording: ChromeWording) => string;
|
|
7
|
+
/** The three curve legends, in the order the renderer paints them. */
|
|
8
|
+
export type EstuarineLegendKey = keyof typeof LABELS;
|
|
9
|
+
/**
|
|
10
|
+
* Only the factors the legends need out of `EstuarineFit`.
|
|
11
|
+
*
|
|
12
|
+
* Taken as a parameter rather than imported: the fit is computed in
|
|
13
|
+
* `./element-renderer.ts`, which reads this module to know what a legend says,
|
|
14
|
+
* and a module cycle to save two fields would be a poor trade.
|
|
15
|
+
*/
|
|
16
|
+
export interface EstuarineLegendFit {
|
|
17
|
+
sx: number;
|
|
18
|
+
sy: number;
|
|
19
|
+
/** The one undeformed factor — type is never stretched. */
|
|
20
|
+
strokeScale: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* What a legend SAYS: the user's own word, else the vocabulary.
|
|
24
|
+
*
|
|
25
|
+
* The very precedence `backgroundLabelText` applies to a declared background —
|
|
26
|
+
* user text wins over the catalogue, the catalogue over the shipped English —
|
|
27
|
+
* spelled out here because this map has no declaration to apply it for it. An
|
|
28
|
+
* empty string is a real answer (the user erased the word), which is why the
|
|
29
|
+
* test is against `undefined` and not against falsiness.
|
|
30
|
+
*/
|
|
31
|
+
export declare function estuarineLegendText(model: EstuarineElementModel, key: EstuarineLegendKey, translate: EstuarineWordingResolver): string;
|
|
32
|
+
/**
|
|
33
|
+
* Clickable boxes of the visible legends, in ELEMENT-LOCAL coordinates.
|
|
34
|
+
*
|
|
35
|
+
* Anchored through the same fit the renderer anchors them with: proportionally
|
|
36
|
+
* in both directions, typed isotropically. A legend whose curve is switched off
|
|
37
|
+
* is not painted and is therefore not aimable either.
|
|
38
|
+
*/
|
|
39
|
+
export declare function estuarineLabelHits(model: EstuarineElementModel, fit: EstuarineLegendFit, translate: EstuarineWordingResolver): BackgroundLabelHit[];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { backgroundTextHitBox } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { LABEL_LETTER_SPACING, LABELS } from './consts.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a legend SAYS: the user's own word, else the vocabulary.
|
|
5
|
+
*
|
|
6
|
+
* The very precedence `backgroundLabelText` applies to a declared background —
|
|
7
|
+
* user text wins over the catalogue, the catalogue over the shipped English —
|
|
8
|
+
* spelled out here because this map has no declaration to apply it for it. An
|
|
9
|
+
* empty string is a real answer (the user erased the word), which is why the
|
|
10
|
+
* test is against `undefined` and not against falsiness.
|
|
11
|
+
*/
|
|
12
|
+
export function estuarineLegendText(model, key, translate) {
|
|
13
|
+
const label = LABELS[key];
|
|
14
|
+
const own = model[label.prop];
|
|
15
|
+
return own === undefined || own === null
|
|
16
|
+
? translate(label.wording)
|
|
17
|
+
: String(own);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Clickable boxes of the visible legends, in ELEMENT-LOCAL coordinates.
|
|
21
|
+
*
|
|
22
|
+
* Anchored through the same fit the renderer anchors them with: proportionally
|
|
23
|
+
* in both directions, typed isotropically. A legend whose curve is switched off
|
|
24
|
+
* is not painted and is therefore not aimable either.
|
|
25
|
+
*/
|
|
26
|
+
export function estuarineLabelHits(model, fit, translate) {
|
|
27
|
+
const props = model;
|
|
28
|
+
const hits = [];
|
|
29
|
+
for (const key of Object.keys(LABELS)) {
|
|
30
|
+
const label = LABELS[key];
|
|
31
|
+
if (!props[label.visibleProp])
|
|
32
|
+
continue;
|
|
33
|
+
const text = estuarineLegendText(model, key, translate);
|
|
34
|
+
const box = backgroundTextHitBox(text, label.size * fit.strokeScale, label.x * fit.sx, label.y * fit.sy, 'center');
|
|
35
|
+
// A legend is letter-spaced, so it is wider than the shared estimate: half
|
|
36
|
+
// of the extra width on each side, since the word is centred on its anchor.
|
|
37
|
+
const spread = (Math.max(text.length - 1, 0) * LABEL_LETTER_SPACING * fit.strokeScale) /
|
|
38
|
+
2;
|
|
39
|
+
hits.push({
|
|
40
|
+
id: key,
|
|
41
|
+
prop: label.prop,
|
|
42
|
+
text,
|
|
43
|
+
...box,
|
|
44
|
+
minX: box.minX - spread,
|
|
45
|
+
maxX: box.maxX + spread,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return hits;
|
|
49
|
+
}
|
package/dist/templates/index.js
CHANGED
|
@@ -171,7 +171,7 @@ function tr(std, wording) {
|
|
|
171
171
|
* A hand-composed template — what is left once the artefacts are derived.
|
|
172
172
|
*
|
|
173
173
|
* The seeds a template writes into the document go through the translation
|
|
174
|
-
* seam at placement (ADR
|
|
174
|
+
* seam at placement (ADR 0023); `content` stays the English build, and
|
|
175
175
|
* `localize` rebuilds the same snapshot with translated seeds.
|
|
176
176
|
*/
|
|
177
177
|
function tpl(name, preview, build, nameKey) {
|
|
@@ -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 Cynefin / Estuarine swatches' own names, resolved by
|
|
5
|
+
* `resolvePaletteLabel` (`@labre/affine-components/color-picker`) through each
|
|
6
|
+
* swatch's own {@link NamedPalette.labelWording} — the mechanism
|
|
7
|
+
* `WARDLEY_PALETTE_WORDINGS` established, reused here without either package
|
|
8
|
+
* naming the other.
|
|
9
|
+
*
|
|
10
|
+
* Exported so `../translations.ts` can list them under source `chrome`: a
|
|
11
|
+
* swatch's name is toolbar chrome, re-rendered on every locale switch, never
|
|
12
|
+
* seeded into a document.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CYNEFIN_ESTUARINE_PALETTE_WORDING_ITERATE: ChromeWording;
|
|
15
|
+
export declare const CYNEFIN_ESTUARINE_PALETTE_WORDING_LIMINAL: ChromeWording;
|
|
16
|
+
export declare const CYNEFIN_ESTUARINE_PALETTE_WORDING_LIMINAL_DARK: ChromeWording;
|
|
17
|
+
export declare const CYNEFIN_ESTUARINE_PALETTE_WORDING_VOLATILE: ChromeWording;
|
|
18
|
+
export declare const CYNEFIN_ESTUARINE_PALETTE_WORDING_AXIS: ChromeWording;
|
|
19
|
+
export declare const CYNEFIN_ESTUARINE_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 CYNEFIN_ESTUARINE_PALETTE_LIST: NamedPalette[];
|
|
25
|
+
/**
|
|
26
|
+
* This pack's page of the colour pickers' carousel (`docs/adr/0027`).
|
|
27
|
+
* Registered from the FLAG-GATED view extension, because offering hues is
|
|
28
|
+
* TOOLING: a board drawn while the flag was on keeps every colour it was
|
|
29
|
+
* painted with when the flag goes off (`docs/adr/0009`).
|
|
30
|
+
*/
|
|
31
|
+
export declare const CYNEFIN_ESTUARINE_FRAMEWORK_PALETTE: FrameworkPalette;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { neutralPalettes } from '@formicoidea/labre-core/gfx/shape';
|
|
2
|
+
import { COLORS as CYNEFIN_COLORS } from '../cynefin/consts.js';
|
|
3
|
+
import { COLORS as ESTUARINE_COLORS } from '../estuarine/consts.js';
|
|
4
|
+
/**
|
|
5
|
+
* The Cynefin / Estuarine swatches' own names, resolved by
|
|
6
|
+
* `resolvePaletteLabel` (`@labre/affine-components/color-picker`) through each
|
|
7
|
+
* swatch's own {@link NamedPalette.labelWording} — the mechanism
|
|
8
|
+
* `WARDLEY_PALETTE_WORDINGS` established, reused here without either package
|
|
9
|
+
* naming the other.
|
|
10
|
+
*
|
|
11
|
+
* Exported so `../translations.ts` can list them under source `chrome`: a
|
|
12
|
+
* swatch's name is toolbar chrome, re-rendered on every locale switch, never
|
|
13
|
+
* seeded into a document.
|
|
14
|
+
*/
|
|
15
|
+
export const CYNEFIN_ESTUARINE_PALETTE_WORDING_ITERATE = [
|
|
16
|
+
'com.labre.cynefin.palette.iterate-teal',
|
|
17
|
+
'Iterate teal',
|
|
18
|
+
];
|
|
19
|
+
export const CYNEFIN_ESTUARINE_PALETTE_WORDING_LIMINAL = [
|
|
20
|
+
'com.labre.estuarine.palette.liminal-green',
|
|
21
|
+
'Liminal green',
|
|
22
|
+
];
|
|
23
|
+
export const CYNEFIN_ESTUARINE_PALETTE_WORDING_LIMINAL_DARK = [
|
|
24
|
+
'com.labre.estuarine.palette.liminal-green-dark',
|
|
25
|
+
'Liminal green dark',
|
|
26
|
+
];
|
|
27
|
+
export const CYNEFIN_ESTUARINE_PALETTE_WORDING_VOLATILE = [
|
|
28
|
+
'com.labre.estuarine.palette.volatile-red',
|
|
29
|
+
'Volatile red',
|
|
30
|
+
];
|
|
31
|
+
export const CYNEFIN_ESTUARINE_PALETTE_WORDING_AXIS = [
|
|
32
|
+
'com.labre.estuarine.palette.axis-plum',
|
|
33
|
+
'Axis plum',
|
|
34
|
+
];
|
|
35
|
+
export const CYNEFIN_ESTUARINE_PALETTE_WORDINGS = [
|
|
36
|
+
CYNEFIN_ESTUARINE_PALETTE_WORDING_ITERATE,
|
|
37
|
+
CYNEFIN_ESTUARINE_PALETTE_WORDING_LIMINAL,
|
|
38
|
+
CYNEFIN_ESTUARINE_PALETTE_WORDING_LIMINAL_DARK,
|
|
39
|
+
CYNEFIN_ESTUARINE_PALETTE_WORDING_VOLATILE,
|
|
40
|
+
CYNEFIN_ESTUARINE_PALETTE_WORDING_AXIS,
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* The hues the two boards of this pack are actually drawn in.
|
|
44
|
+
*
|
|
45
|
+
* ONE page for two diagrams, because they are one framework id
|
|
46
|
+
* (`cynefin-estuarine`) and an author works across both. Cynefin contributes
|
|
47
|
+
* the teal of its "iterate" curve — the only colour on a frame whose other
|
|
48
|
+
* inks are the shared notation neutrals — and Estuarine the three its curve
|
|
49
|
+
* legends are drawn in plus the plum of its two axes.
|
|
50
|
+
*
|
|
51
|
+
* Every value is read off the two `COLORS` tables rather than restated, so the
|
|
52
|
+
* shelf and the painted frames cannot drift apart. They are SHORTCUTS, never
|
|
53
|
+
* constraints: nothing on either board reads a colour.
|
|
54
|
+
*/
|
|
55
|
+
const CYNEFIN_ESTUARINE_PALETTES = [
|
|
56
|
+
{
|
|
57
|
+
key: 'Iterate teal',
|
|
58
|
+
value: CYNEFIN_COLORS.teal,
|
|
59
|
+
labelWording: CYNEFIN_ESTUARINE_PALETTE_WORDING_ITERATE,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: 'Liminal green',
|
|
63
|
+
value: ESTUARINE_COLORS.liminal,
|
|
64
|
+
labelWording: CYNEFIN_ESTUARINE_PALETTE_WORDING_LIMINAL,
|
|
65
|
+
},
|
|
66
|
+
// The LIMINAL legend's own darker green — the curve's colour is too light to
|
|
67
|
+
// read as words over the map.
|
|
68
|
+
{
|
|
69
|
+
key: 'Liminal green dark',
|
|
70
|
+
value: ESTUARINE_COLORS.liminalLabel,
|
|
71
|
+
labelWording: CYNEFIN_ESTUARINE_PALETTE_WORDING_LIMINAL_DARK,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
key: 'Volatile red',
|
|
75
|
+
value: ESTUARINE_COLORS.volatile,
|
|
76
|
+
labelWording: CYNEFIN_ESTUARINE_PALETTE_WORDING_VOLATILE,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
key: 'Axis plum',
|
|
80
|
+
value: ESTUARINE_COLORS.axis,
|
|
81
|
+
labelWording: CYNEFIN_ESTUARINE_PALETTE_WORDING_AXIS,
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
/**
|
|
85
|
+
* From the default editor palette we keep ONLY the neutrals — the historical
|
|
86
|
+
* colours say nothing in this notation.
|
|
87
|
+
*/
|
|
88
|
+
export const CYNEFIN_ESTUARINE_PALETTE_LIST = [
|
|
89
|
+
...CYNEFIN_ESTUARINE_PALETTES,
|
|
90
|
+
...neutralPalettes(),
|
|
91
|
+
];
|
|
92
|
+
/**
|
|
93
|
+
* This pack's page of the colour pickers' carousel (`docs/adr/0027`).
|
|
94
|
+
* Registered from the FLAG-GATED view extension, because offering hues is
|
|
95
|
+
* TOOLING: a board drawn while the flag was on keeps every colour it was
|
|
96
|
+
* painted with when the flag goes off (`docs/adr/0009`).
|
|
97
|
+
*/
|
|
98
|
+
export const CYNEFIN_ESTUARINE_FRAMEWORK_PALETTE = {
|
|
99
|
+
framework: 'cynefin-estuarine',
|
|
100
|
+
labelWording: [
|
|
101
|
+
'com.labre.framework.cynefin-estuarine',
|
|
102
|
+
'Cynefin / Estuarine',
|
|
103
|
+
],
|
|
104
|
+
palettes: CYNEFIN_ESTUARINE_PALETTE_LIST,
|
|
105
|
+
};
|
|
@@ -7,6 +7,8 @@ export declare class EdgelessCynefinEstuarineSeniorButton extends EdgelessCynefi
|
|
|
7
7
|
enableActiveBackground: boolean;
|
|
8
8
|
type: typeof EmptyTool;
|
|
9
9
|
private _toggleMenu;
|
|
10
|
+
/** Lit while one of THIS framework's artefacts is armed. See the Wardley one. */
|
|
11
|
+
private get _armed();
|
|
10
12
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
13
|
}
|
|
12
14
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DefaultTool } from '@formicoidea/labre-core/blocks/surface';
|
|
2
2
|
import { EmptyTool } from '@formicoidea/labre-core/gfx/pointer';
|
|
3
3
|
import { translateKey } from '@formicoidea/labre-core/shared/services';
|
|
4
|
-
import { EdgelessToolbarToolMixin } from '@formicoidea/labre-core/widgets/edgeless-toolbar';
|
|
4
|
+
import { armedArtefact, EdgelessToolbarToolMixin, } from '@formicoidea/labre-core/widgets/edgeless-toolbar';
|
|
5
5
|
import { SignalWatcher } from '@formicoidea/labre-core/global/lit';
|
|
6
6
|
import { css, html, LitElement } from 'lit';
|
|
7
7
|
import { cynefinToolbarIcon } from './icons.js';
|
|
@@ -62,6 +62,10 @@ export class EdgelessCynefinEstuarineSeniorButton extends EdgelessToolbarToolMix
|
|
|
62
62
|
const menu = this.createPopper('edgeless-cynefin-estuarine-menu', this);
|
|
63
63
|
menu.element.edgeless = this.edgeless;
|
|
64
64
|
}
|
|
65
|
+
/** Lit while one of THIS framework's artefacts is armed. See the Wardley one. */
|
|
66
|
+
get _armed() {
|
|
67
|
+
return armedArtefact(this.gfx)?.owner === 'cynefin-estuarine';
|
|
68
|
+
}
|
|
65
69
|
render() {
|
|
66
70
|
return html `<edgeless-toolbar-button
|
|
67
71
|
class="ce-button"
|
|
@@ -69,7 +73,7 @@ export class EdgelessCynefinEstuarineSeniorButton extends EdgelessToolbarToolMix
|
|
|
69
73
|
? ''
|
|
70
74
|
: translateKey(this.edgeless.std, 'com.labre.framework.cynefin-estuarine', 'Cynefin / Estuarine')}
|
|
71
75
|
.tooltipOffset=${4}
|
|
72
|
-
.active=${!!this.popper}
|
|
76
|
+
.active=${!!this.popper || this._armed}
|
|
73
77
|
@click=${this._toggleMenu}
|
|
74
78
|
>
|
|
75
79
|
<div class="ce-root">
|
package/dist/translations.js
CHANGED
|
@@ -8,6 +8,7 @@ import { ESTUARINE_READING } from './estuarine/reading.js';
|
|
|
8
8
|
import { ESTUARINE_ROLES } from './estuarine/roles.js';
|
|
9
9
|
import { ESTUARINE_TOOLBAR_WORDINGS } from './estuarine/toolbar/config.js';
|
|
10
10
|
import { CYNEFIN_ESTUARINE_TEMPLATE_CATEGORY_WORDINGS, CYNEFIN_ESTUARINE_TEMPLATE_NAME_WORDINGS, CYNEFIN_ESTUARINE_TEMPLATE_SEEDS, } from './templates/index.js';
|
|
11
|
+
import { CYNEFIN_ESTUARINE_PALETTE_WORDINGS } from './toolbar/palette.js';
|
|
11
12
|
/**
|
|
12
13
|
* THIS framework's contribution to the translation-key manifest.
|
|
13
14
|
*
|
|
@@ -76,4 +77,12 @@ ESTUARINE_CANVAS_WORDINGS.map(([key, fallback]) => ({
|
|
|
76
77
|
key,
|
|
77
78
|
fallback,
|
|
78
79
|
source: 'chrome',
|
|
80
|
+
})),
|
|
81
|
+
// The carousel swatches' own names (`toolbar/palette.ts`) — chrome,
|
|
82
|
+
// re-rendered by the colour picker on every locale switch, never seeded
|
|
83
|
+
// into a document. Same treatment as Wardley's and EDGY's.
|
|
84
|
+
CYNEFIN_ESTUARINE_PALETTE_WORDINGS.map(([key, fallback]) => ({
|
|
85
|
+
key,
|
|
86
|
+
fallback,
|
|
87
|
+
source: 'chrome',
|
|
79
88
|
})));
|
package/dist/view.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { QualityNudgeExtension, ReadingProfileExtension, ValidationFrameworkExtension, validationToolbarConfig, } 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 { TemplateCategoryExtension } from '@formicoidea/labre-core/gfx/template';
|
|
4
5
|
import { ToolbarModuleExtension } from '@formicoidea/labre-core/shared/services';
|
|
@@ -17,6 +18,7 @@ import { ESTUARINE_READING } from './estuarine/reading.js';
|
|
|
17
18
|
import { ESTUARINE_ROLE, ESTUARINE_ROLES } from './estuarine/roles.js';
|
|
18
19
|
import { estuarineToolbarExtension } from './estuarine/toolbar/config.js';
|
|
19
20
|
import { cynefinTemplateCategory, estuarineTemplateCategory, } from './templates/index.js';
|
|
21
|
+
import { CYNEFIN_ESTUARINE_FRAMEWORK_PALETTE } from './toolbar/palette.js';
|
|
20
22
|
import { cynefinEstuarineSeniorTool } from './toolbar/senior-tool.js';
|
|
21
23
|
/**
|
|
22
24
|
* Cynefin / Estuarine rendering — ALWAYS registered, independent of any flag.
|
|
@@ -110,6 +112,11 @@ export class CynefinEstuarineViewExtension extends ViewExtensionProvider {
|
|
|
110
112
|
// free element on a Cynefin board carries no role and stays unreadable.
|
|
111
113
|
context.register(ReadingProfileExtension(ESTUARINE_READING));
|
|
112
114
|
context.register(cynefinEstuarineSeniorTool);
|
|
115
|
+
// This pack's page of the colour pickers' carousel (`docs/adr/0027`).
|
|
116
|
+
// Here, beside the senior tool, because offering hues is TOOLING — the
|
|
117
|
+
// colours already painted on a stored board are content and do not move
|
|
118
|
+
// (`docs/adr/0009`).
|
|
119
|
+
context.register(FrameworkPaletteExtension(CYNEFIN_ESTUARINE_FRAMEWORK_PALETTE));
|
|
113
120
|
// Both Templates-panel categories — tooling, so they go with the flag
|
|
114
121
|
// (#244).
|
|
115
122
|
context.register(TemplateCategoryExtension(cynefinTemplateCategory, estuarineTemplateCategory));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-cynefin",
|
|
3
3
|
"description": "Labre cynefin-estuarine 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,7 +31,7 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@formicoidea/labre-core": "0.
|
|
34
|
+
"@formicoidea/labre-core": "0.42.0",
|
|
35
35
|
"@preact/signals-core": "^1.8.0",
|
|
36
36
|
"lit": "^3.2.0"
|
|
37
37
|
}
|