@formicoidea/labre-framework-ddd-core-domain 0.28.0 → 0.29.1

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,11 +1,14 @@
1
1
  import { DddMenuBase } from '@formicoidea/labre-ddd-shared';
2
- /** Core Domain Chart palette: the background, sub-domain dots, movement arrow, Notation legend. */
2
+ /**
3
+ * Core Domain Chart palette: the background, sub-domain dots, movement arrow.
4
+ * The notation legend lives in the map-background context menu (toolbar-config),
5
+ * not here, to avoid a duplicate entry.
6
+ */
3
7
  export declare class EdgelessDddCoreDomainMenu extends DddMenuBase {
4
8
  protected framework: "core-domain";
5
9
  private _createBackground;
6
10
  private _createDot;
7
11
  private _createMarker;
8
12
  private _createMovement;
9
- private _createLegend;
10
13
  render(): import("lit-html").TemplateResult<1>;
11
14
  }
@@ -1,14 +1,16 @@
1
- import { addConnector, addDot, addLegend, addMarker, CD_SUBDOMAINS, DddMenuBase, MOVEMENT_COLOR, TEAM_TOPOLOGIES, } from '@formicoidea/labre-ddd-shared';
1
+ import { addConnector, addDot, addMarker, CD_SUBDOMAINS, DddMenuBase, MOVEMENT_COLOR, TEAM_TOPOLOGIES, } from '@formicoidea/labre-ddd-shared';
2
2
  import { Bound } from '@formicoidea/labre-core/global/gfx';
3
3
  import { html, svg } from 'lit';
4
4
  import { REF_H, REF_W } from '../core-domain/consts';
5
- import { coreDomainLegendSections } from '../core-domain/legend';
6
5
  const chartSwatch = svg `<svg viewBox="0 0 24 24" fill="none"><rect x="4" y="3" width="17" height="17" fill="#4d9900" fill-opacity="0.5"/><rect x="4" y="3" width="6" height="17" fill="#9933ff" fill-opacity="0.5"/><path d="M4 20 V3 M4 20 H21" stroke="currentColor" stroke-width="1.8"/></svg>`;
7
6
  const dotSwatch = (color) => svg `<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="7" fill="${color}" stroke="#1f2328" stroke-width="1.2"/></svg>`;
8
7
  const movementSwatch = svg `<svg viewBox="0 0 24 24" fill="none"><path d="M3 18 L16 7" stroke="${MOVEMENT_COLOR}" stroke-width="2" stroke-dasharray="3 3"/><path d="M12 6 L18 5 L17 11" stroke="${MOVEMENT_COLOR}" stroke-width="2" fill="none"/></svg>`;
9
- const legendSwatch = svg `<svg viewBox="0 0 24 24" fill="none"><rect x="3" y="4" width="18" height="16" rx="2" stroke="currentColor" stroke-width="1.6"/><circle cx="7" cy="9" r="1.6" fill="currentColor"/><circle cx="7" cy="14" r="1.6" fill="currentColor"/><path d="M11 9 H18 M11 14 H18" stroke="currentColor" stroke-width="1.4"/></svg>`;
10
8
  const markerSwatch = (fill, letter) => svg `<svg viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3" fill="${fill}" stroke="#1f2328" stroke-width="1.2"/><text x="12" y="16" text-anchor="middle" font-size="11" font-family="sans-serif" fill="#1f2328">${letter}</text></svg>`;
11
- /** Core Domain Chart palette: the background, sub-domain dots, movement arrow, Notation legend. */
9
+ /**
10
+ * Core Domain Chart palette: the background, sub-domain dots, movement arrow.
11
+ * The notation legend lives in the map-background context menu (toolbar-config),
12
+ * not here, to avoid a duplicate entry.
13
+ */
12
14
  export class EdgelessDddCoreDomainMenu extends DddMenuBase {
13
15
  constructor() {
14
16
  super(...arguments);
@@ -61,18 +63,6 @@ export class EdgelessDddCoreDomainMenu extends DddMenuBase {
61
63
  this.track('FrameworkElementAdded', 'movement');
62
64
  this.finish(id);
63
65
  }
64
- _createLegend() {
65
- const surface = this.surface;
66
- if (!surface)
67
- return;
68
- const { cx, cy } = this.center;
69
- const id = addLegend(surface, this.edgeless.std, cx - 130, cy - 170, {
70
- title: 'Légende',
71
- sections: coreDomainLegendSections(),
72
- });
73
- this.track('FrameworkElementAdded', 'legend');
74
- this.finish(id);
75
- }
76
66
  render() {
77
67
  return html `
78
68
  <edgeless-slide-menu>
@@ -102,12 +92,6 @@ export class EdgelessDddCoreDomainMenu extends DddMenuBase {
102
92
  >
103
93
  ${movementSwatch}
104
94
  </edgeless-tool-icon-button>
105
- <edgeless-tool-icon-button
106
- .tooltip=${'Notation legend'}
107
- @click=${() => this._createLegend()}
108
- >
109
- ${legendSwatch}
110
- </edgeless-tool-icon-button>
111
95
  </div>
112
96
  </div>
113
97
  </edgeless-slide-menu>
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.28.0",
4
+ "version": "0.29.1",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "author": "lajola",
@@ -27,8 +27,8 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@formicoidea/labre-core": "0.28.0",
31
- "@formicoidea/labre-ddd-shared": "0.28.0",
30
+ "@formicoidea/labre-core": "0.29.1",
31
+ "@formicoidea/labre-ddd-shared": "0.29.1",
32
32
  "lit": "^3.2.0"
33
33
  }
34
34
  }