@formicoidea/labre-ddd-shared 0.39.3 → 0.40.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.
@@ -156,6 +156,11 @@ export declare const CM_RELATIONSHIPS: readonly [{
156
156
  readonly dashed: true;
157
157
  }];
158
158
  export declare const CLOUD_VERTICES: number[][];
159
+ /**
160
+ * The cloud (Big Ball of Mud). Its lilac fill is the notation's own; its
161
+ * outline is the shared scale's secondary grey. A cloud created before the scale
162
+ * was adopted keeps the `#6d6e71` outline it was written with.
163
+ */
159
164
  export declare const CLOUD: {
160
165
  w: number;
161
166
  h: number;
@@ -204,6 +209,7 @@ export declare const CD_SUBDOMAINS: readonly [{
204
209
  }];
205
210
  export declare const DOT_SIZE = 26;
206
211
  export declare const MOVEMENT_COLOR = "#ff3333";
207
- export declare const LABEL_COLOR = "#1f2328";
212
+ /** Label and legend text: the shared notation scale's artefact ink. */
213
+ export declare const LABEL_COLOR: string;
208
214
  export declare const LABEL_FONT = "blocksuite:surface:Inter";
209
215
  export declare const LABEL_FONT_SIZE = 14;
@@ -1,3 +1,4 @@
1
+ import { NOTATION_NEUTRALS } from '@formicoidea/labre-core/shared/consts';
1
2
  /**
2
3
  * Shared DDD palette and sizes. Every tool composes the same irreducible units
3
4
  * (sticky, dot, bubble, connector, label) from these presets — no duplicated
@@ -167,7 +168,17 @@ function buildCloud() {
167
168
  return pts;
168
169
  }
169
170
  export const CLOUD_VERTICES = buildCloud();
170
- export const CLOUD = { w: 180, h: 120, fill: '#f0eef6', stroke: '#6d6e71' };
171
+ /**
172
+ * The cloud (Big Ball of Mud). Its lilac fill is the notation's own; its
173
+ * outline is the shared scale's secondary grey. A cloud created before the scale
174
+ * was adopted keeps the `#6d6e71` outline it was written with.
175
+ */
176
+ export const CLOUD = {
177
+ w: 180,
178
+ h: 120,
179
+ fill: '#f0eef6',
180
+ stroke: NOTATION_NEUTRALS.label,
181
+ };
171
182
  /** Team Topologies interaction modes (placeable markers + Notation legend). */
172
183
  export const TEAM_TOPOLOGIES = [
173
184
  {
@@ -190,6 +201,7 @@ export const CD_SUBDOMAINS = [
190
201
  ];
191
202
  export const DOT_SIZE = 26;
192
203
  export const MOVEMENT_COLOR = '#ff3333';
193
- export const LABEL_COLOR = '#1f2328';
204
+ /** Label and legend text: the shared notation scale's artefact ink. */
205
+ export const LABEL_COLOR = NOTATION_NEUTRALS.ink;
194
206
  export const LABEL_FONT = 'blocksuite:surface:Inter';
195
207
  export const LABEL_FONT_SIZE = 14;
@@ -1,6 +1,7 @@
1
1
  import { DefaultTool } from '@formicoidea/labre-core/blocks/surface';
2
2
  import { createGroupCommand } from '@formicoidea/labre-core/gfx/group';
3
3
  import { ConnectorMode, FontWeight, PointStyle, ShapeStyle, StrokeStyle, TextFitMode, } from '@formicoidea/labre-core/model';
4
+ import { NOTATION_NEUTRALS } from '@formicoidea/labre-core/shared/consts';
4
5
  import { Bound } from '@formicoidea/labre-core/global/gfx';
5
6
  import { GfxControllerIdentifier } from '@formicoidea/labre-core/std/gfx';
6
7
  import * as Y from 'yjs';
@@ -135,8 +136,8 @@ export function addBubble(surface, cx, cy, label, role) {
135
136
  },
136
137
  });
137
138
  }
138
- /** The ink every Core Domain artefact is outlined with. */
139
- const ARTEFACT_STROKE = '#1f2328';
139
+ /** The ink every Core Domain artefact is outlined with: the shared scale's. */
140
+ const ARTEFACT_STROKE = NOTATION_NEUTRALS.ink;
140
141
  /**
141
142
  * What a Core Domain DOT is, as shape options — read by the creation site below
142
143
  * and by the morph, so the two can never disagree about what a platform
@@ -200,7 +201,7 @@ export function addMarker(surface, std, cx, cy, opts) {
200
201
  const { fill, letter, label, role } = opts;
201
202
  const s = MARKER_SIZE;
202
203
  const box = addShape(surface, cx - s / 2, cy - s / 2, s, s, markerShapeOpts(fill, role));
203
- const glyph = addText(surface, cx - s / 2, cy - 9, s, letter, '#1f2328', LABEL_FONT, 15);
204
+ const glyph = addText(surface, cx - s / 2, cy - 9, s, letter, NOTATION_NEUTRALS.ink, LABEL_FONT, 15);
204
205
  const ids = [box, glyph];
205
206
  if (label) {
206
207
  ids.push(addText(surface, cx + s / 2 + 6, cy - LABEL_FONT_SIZE / 2, 150, label, LABEL_COLOR, LABEL_FONT, LABEL_FONT_SIZE, 'left'));
@@ -225,7 +226,7 @@ export function addCloud(surface, std, cx, cy, label) {
225
226
  });
226
227
  if (!label)
227
228
  return cloud;
228
- const lbl = addText(surface, cx - w / 2 + 12, cy - LABEL_FONT_SIZE / 2, w - 24, label, '#3d3d3d', LABEL_FONT, LABEL_FONT_SIZE);
229
+ const lbl = addText(surface, cx - w / 2 + 12, cy - LABEL_FONT_SIZE / 2, w - 24, label, NOTATION_NEUTRALS.ink, LABEL_FONT, LABEL_FONT_SIZE);
229
230
  return groupIds(std, [cloud, lbl]);
230
231
  }
231
232
  /**
@@ -273,8 +274,8 @@ export function addLegend(surface, std, x, y, opts) {
273
274
  const { width: W, height: H } = measureLegend(opts.sections, opts.width);
274
275
  const ids = [
275
276
  addShape(surface, x, y, W, H, {
276
- fill: '#ffffff',
277
- stroke: '#6d6e71',
277
+ fill: NOTATION_NEUTRALS.cardFill,
278
+ stroke: NOTATION_NEUTRALS.legendBorder,
278
279
  strokeWidth: 1.5,
279
280
  radius: 8,
280
281
  }),
@@ -294,19 +295,19 @@ export function addLegend(surface, std, x, y, opts) {
294
295
  ids.push(addShape(surface, sx, midY - SW / 2, SW, SW, {
295
296
  shapeType: 'ellipse',
296
297
  fill: row.color,
297
- stroke: '#1f2328',
298
+ stroke: NOTATION_NEUTRALS.ink,
298
299
  strokeWidth: 1,
299
300
  }));
300
301
  }
301
302
  else if (row.swatch === 'square') {
302
303
  ids.push(addShape(surface, sx, midY - SW / 2, SW, SW, {
303
304
  fill: row.color,
304
- stroke: '#1f2328',
305
+ stroke: NOTATION_NEUTRALS.ink,
305
306
  strokeWidth: 1,
306
307
  radius: 3,
307
308
  }));
308
309
  if (row.letter)
309
- ids.push(addText(surface, sx, midY - 8, SW, row.letter, '#1f2328', LABEL_FONT, 11));
310
+ ids.push(addText(surface, sx, midY - 8, SW, row.letter, NOTATION_NEUTRALS.ink, LABEL_FONT, 11));
310
311
  }
311
312
  else if (row.dashed) {
312
313
  // Two 6-unit segments with a 4-unit gap: the same 16 units as a solid
@@ -1,3 +1,4 @@
1
+ import { NOTATION_NEUTRALS } from '@formicoidea/labre-core/shared/consts';
1
2
  import { html, svg } from 'lit';
2
3
  /**
3
4
  * Contextual-toolbar glyph — "generate the legend of what is on this
@@ -40,12 +41,12 @@ export const eventStormingToolbarIcon = svg `<svg width="100%" height="100%" vie
40
41
  export const coreDomainToolbarIcon = svg `<svg width="100%" height="100%" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
41
42
  <rect x="10" y="8" width="38" height="38" fill="#4d9900" fill-opacity="0.55"/>
42
43
  <rect x="10" y="8" width="14" height="38" fill="#9933ff" fill-opacity="0.55"/>
43
- <path d="M10 46 V8 M10 46 H48" stroke="#1f2328" stroke-width="2.4" stroke-linecap="round"/>
44
+ <path d="M10 46 V8 M10 46 H48" stroke="${NOTATION_NEUTRALS.frameInk}" stroke-width="2.4" stroke-linecap="round"/>
44
45
  <circle cx="38" cy="18" r="4" fill="#9933ff"/>
45
46
  </svg>`;
46
47
  /** Senior-button glyph — Context Map (two bubbles + relation). */
47
48
  export const contextMapToolbarIcon = svg `<svg width="100%" height="100%" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
48
49
  <rect x="6" y="10" width="22" height="14" rx="7" fill="#e6f0fa" stroke="#2f6fb0" stroke-width="1.6"/>
49
50
  <rect x="28" y="32" width="22" height="14" rx="7" fill="#e6f0fa" stroke="#2f6fb0" stroke-width="1.6"/>
50
- <path d="M20 24 L34 32" stroke="#1f2328" stroke-width="1.8"/>
51
+ <path d="M20 24 L34 32" stroke="${NOTATION_NEUTRALS.ink}" stroke-width="1.8"/>
51
52
  </svg>`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-ddd-shared",
3
3
  "description": "Labre ddd-shared — shared building blocks for @formicoidea/labre-core frameworks.",
4
- "version": "0.39.3",
4
+ "version": "0.40.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "author": "lajola",
@@ -19,7 +19,7 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "@formicoidea/labre-core": "0.39.3",
22
+ "@formicoidea/labre-core": "0.40.0",
23
23
  "lit": "^3.2.0"
24
24
  }
25
25
  }