@formicoidea/labre-framework-ddd-context-map 0.39.1 → 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.
@@ -1,4 +1,5 @@
1
1
  import { CLOUD, CM_BUBBLE, FONT_FAMILY } from '@formicoidea/labre-ddd-shared';
2
+ import { NOTATION_NEUTRALS } from '@formicoidea/labre-core/shared/consts';
2
3
  import { CONTEXT_MAP_ROLE } from './roles.js';
3
4
  /**
4
5
  * The Context Map board, DECLARED (the `FrameworkBackgroundDef` primitive).
@@ -34,8 +35,9 @@ export const CONTEXT_MAP_BACKGROUND = {
34
35
  chrome: {
35
36
  fontFamily: FONT_FAMILY,
36
37
  palette: {
37
- card: '#ffffff',
38
- cardBorder: '#d5d9e0',
38
+ /** The card: the shared notation scale's, painted at render time. */
39
+ card: NOTATION_NEUTRALS.cardFill,
40
+ cardBorder: NOTATION_NEUTRALS.cardBorder,
39
41
  /** The bounded-context pill: the map's own blue. */
40
42
  context: CM_BUBBLE.fill,
41
43
  contextBorder: CM_BUBBLE.stroke,
package/dist/commands.js CHANGED
@@ -1,4 +1,5 @@
1
- import { addBubble, addCloud, CM_RELATIONSHIPS, placeDddElement, } from '@formicoidea/labre-ddd-shared';
1
+ import { addBubble, addCloud, CLOUD, CM_RELATIONSHIPS, placeDddElement, } from '@formicoidea/labre-ddd-shared';
2
+ import { NOTATION_NEUTRALS } from '@formicoidea/labre-core/shared/consts';
2
3
  import { GfxControllerIdentifier } from '@formicoidea/labre-core/std/gfx';
3
4
  import { svg } from 'lit';
4
5
  import { activateContextMapRelationship, createContextMapBoard, } from './actions.js';
@@ -17,9 +18,9 @@ import { CONTEXT_MAP_ROLE } from './roles.js';
17
18
  * Chart makes. A palette that could also drop a second, static legend was two
18
19
  * answers to one question.
19
20
  */
20
- const boardSwatch = svg `<svg viewBox="0 0 24 24" fill="none"><rect x="2.5" y="4.5" width="19" height="15" rx="2" fill="#ffffff" stroke="currentColor" stroke-width="1.6"/><rect x="5.5" y="8" width="6" height="3.5" rx="1.75" fill="#e6f0fa" stroke="#2f6fb0" stroke-width="1.1"/><rect x="13" y="13" width="6" height="3.5" rx="1.75" fill="#e6f0fa" stroke="#2f6fb0" stroke-width="1.1"/><path d="M11.5 10.5 L13.5 13.8" stroke="currentColor" stroke-width="1.2"/></svg>`;
21
+ const boardSwatch = svg `<svg viewBox="0 0 24 24" fill="none"><rect x="2.5" y="4.5" width="19" height="15" rx="2" fill="${NOTATION_NEUTRALS.cardFill}" stroke="currentColor" stroke-width="1.6"/><rect x="5.5" y="8" width="6" height="3.5" rx="1.75" fill="#e6f0fa" stroke="#2f6fb0" stroke-width="1.1"/><rect x="13" y="13" width="6" height="3.5" rx="1.75" fill="#e6f0fa" stroke="#2f6fb0" stroke-width="1.1"/><path d="M11.5 10.5 L13.5 13.8" stroke="currentColor" stroke-width="1.2"/></svg>`;
21
22
  const bubbleSwatch = svg `<svg viewBox="0 0 24 24" fill="none"><rect x="2" y="7" width="20" height="10" rx="5" fill="#e6f0fa" stroke="#2f6fb0" stroke-width="1.6"/></svg>`;
22
- const cloudSwatch = svg `<svg viewBox="0 0 24 24" fill="none"><path d="M6 17 C3 17 2 14 4.5 12.5 C4 9 8 8 9.5 10 C11 6.5 16 7.5 16 11 C19 10.5 20.5 14 18 16 C18 17 16.5 17 15 17 Z" fill="#f0eef6" stroke="#6d6e71" stroke-width="1.4"/></svg>`;
23
+ const cloudSwatch = svg `<svg viewBox="0 0 24 24" fill="none"><path d="M6 17 C3 17 2 14 4.5 12.5 C4 9 8 8 9.5 10 C11 6.5 16 7.5 16 11 C19 10.5 20.5 14 18 16 C18 17 16.5 17 15 17 Z" fill="${CLOUD.fill}" stroke="${CLOUD.stroke}" stroke-width="1.4"/></svg>`;
23
24
  const relationSwatch = (dashed, arrow) => svg `<svg viewBox="0 0 24 24" fill="none"><path d="M3 12 H${arrow ? 17 : 21}" stroke="currentColor" stroke-width="2" stroke-dasharray="${dashed ? '3 3' : '0'}"/>${arrow ? svg `<path d="M15 8 L21 12 L15 16" stroke="currentColor" stroke-width="2" fill="none"/>` : ''}</svg>`;
24
25
  const SPECS = [
25
26
  {
package/dist/templates.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { CLOUD, CM_BUBBLE } from '@formicoidea/labre-ddd-shared';
2
2
  import { templateFromCommand, } from '@formicoidea/labre-core/gfx/template';
3
+ import { NOTATION_NEUTRALS } from '@formicoidea/labre-core/shared/consts';
3
4
  import { contextMapCommands } from './commands.js';
4
5
  /**
5
6
  * The Context Map palette — DERIVED from the toolbox, one template per
@@ -24,7 +25,7 @@ function byLabel(label) {
24
25
  }
25
26
  const ATTRS = 'width="100%" height="100%" viewBox="0 0 135 80" xmlns="http://www.w3.org/2000/svg"';
26
27
  /** The map, in miniature: a white card, two contexts and the line between them. */
27
- const BOARD_PREVIEW = `<svg ${ATTRS} fill="none"><rect x="4" y="6" width="127" height="68" rx="6" fill="#ffffff" stroke="#d5d9e0" stroke-width="1.5"/><rect x="18" y="20" width="44" height="18" rx="9" fill="${CM_BUBBLE.fill}" stroke="${CM_BUBBLE.stroke}" stroke-width="1.5"/><rect x="74" y="44" width="44" height="18" rx="9" fill="${CM_BUBBLE.fill}" stroke="${CM_BUBBLE.stroke}" stroke-width="1.5"/><path d="M62 33 L76 48" stroke="#1f2328" stroke-width="1.5"/></svg>`;
28
+ const BOARD_PREVIEW = `<svg ${ATTRS} fill="none"><rect x="4" y="6" width="127" height="68" rx="6" fill="${NOTATION_NEUTRALS.cardFill}" stroke="${NOTATION_NEUTRALS.cardBorder}" stroke-width="1.5"/><rect x="18" y="20" width="44" height="18" rx="9" fill="${CM_BUBBLE.fill}" stroke="${CM_BUBBLE.stroke}" stroke-width="1.5"/><rect x="74" y="44" width="44" height="18" rx="9" fill="${CM_BUBBLE.fill}" stroke="${CM_BUBBLE.stroke}" stroke-width="1.5"/><path d="M62 33 L76 48" stroke="${NOTATION_NEUTRALS.ink}" stroke-width="1.5"/></svg>`;
28
29
  const BUBBLE_PREVIEW = `<svg ${ATTRS} fill="none"><rect x="20" y="25" width="95" height="30" rx="15" fill="${CM_BUBBLE.fill}" stroke="${CM_BUBBLE.stroke}" stroke-width="1.6"/></svg>`;
29
30
  const CLOUD_PREVIEW = `<svg ${ATTRS} fill="none"><path d="M30 52 C18 52 16 40 26 37 C24 25 42 24 46 32 C50 22 70 24 70 35 C84 32 90 46 78 50 Z" fill="${CLOUD.fill}" stroke="${CLOUD.stroke}" stroke-width="1.4"/></svg>`;
30
31
  export const contextMapTemplateCategory = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-framework-ddd-context-map",
3
3
  "description": "Labre ddd-context-map framework for @formicoidea/labre-core.",
4
- "version": "0.39.1",
4
+ "version": "0.40.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.39.1",
35
- "@formicoidea/labre-ddd-shared": "0.39.1",
34
+ "@formicoidea/labre-core": "0.40.0",
35
+ "@formicoidea/labre-ddd-shared": "0.40.0",
36
36
  "lit": "^3.2.0"
37
37
  }
38
38
  }