@formicoidea/labre-framework-c4 0.53.0 → 0.55.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.
@@ -0,0 +1,8 @@
1
+ import type { NotationDarkPalette } from '@formicoidea/labre-core/blocks/surface';
2
+ /**
3
+ * C4 on a dark canvas (ADR 0039). The blue ladder (person, system, container,
4
+ * component) is the standard and stays as stored, with its own text colour on
5
+ * its own fill. Only the greys and the black drawn straight on the card (a
6
+ * boundary, its name, a relationship) go light.
7
+ */
8
+ export declare const C4_DARK_PALETTE: NotationDarkPalette;
@@ -0,0 +1,16 @@
1
+ import { BOUNDARY_NAME_COLOR, BOUNDARY_STROKE } from './consts.js';
2
+ /**
3
+ * C4 on a dark canvas (ADR 0039). The blue ladder (person, system, container,
4
+ * component) is the standard and stays as stored, with its own text colour on
5
+ * its own fill. Only the greys and the black drawn straight on the card (a
6
+ * boundary, its name, a relationship) go light.
7
+ */
8
+ export const C4_DARK_PALETTE = {
9
+ framework: 'c4',
10
+ colors: {
11
+ // Also `RELATIONSHIP_STROKE`: the stencil draws both in one grey.
12
+ [BOUNDARY_STROKE]: '#bdbdbd',
13
+ [BOUNDARY_NAME_COLOR]: '#eaeaea',
14
+ },
15
+ kept: ['#08427b', '#073b6f'],
16
+ };
@@ -288,7 +288,7 @@ export const c4Node = (model, ctx, matrix, renderer, rc, bound) => {
288
288
  // Native shape: fill, stroke, theme and the TITLE, all handled natively.
289
289
  shapeRenderer(model, ctx, matrix, renderer, rc, bound);
290
290
  const stroke = renderer.getColorValue(model.strokeColor, DefaultTheme.shapeStrokeColor, true);
291
- const fill = renderer.getColorValue(model.fillColor, DefaultTheme.shapeFillColor, true);
291
+ const fill = renderer.getColorValue(model.fillColor, DefaultTheme.shapeFillColor, true, 'fill');
292
292
  const strokeWidth = model.strokeWidth || 1;
293
293
  ctx.setTransform(glyphMatrix);
294
294
  ctx.strokeStyle = stroke;
package/dist/view.js CHANGED
@@ -1,4 +1,4 @@
1
- import { FrameworkBackgroundInteractionExtension, InterchangeExtension, morphToolbarConfig, ReadingProfileExtension, ValidationProfileExtension, ValidationRuleExtension, } from '@formicoidea/labre-core/blocks/surface';
1
+ import { FrameworkBackgroundInteractionExtension, InterchangeExtension, morphToolbarConfig, ReadingProfileExtension, ValidationProfileExtension, ValidationRuleExtension, NotationDarkPaletteExtension, } from '@formicoidea/labre-core/blocks/surface';
2
2
  import { FrameworkPaletteExtension } from '@formicoidea/labre-core/components/color-picker';
3
3
  import { ViewExtensionProvider, } from '@formicoidea/labre-core/ext-loader';
4
4
  import { TemplateCategoryExtension } from '@formicoidea/labre-core/gfx/template';
@@ -23,6 +23,7 @@ import { c4TemplateCategory } from './templates.js';
23
23
  import { c4BoardToolbarExtension, c4BoardToolingToolbarExtension, } from './toolbar/config.js';
24
24
  import { C4_FRAMEWORK_PALETTE } from './toolbar/palette.js';
25
25
  import { c4SeniorTool } from './toolbar/senior-tool.js';
26
+ import { C4_DARK_PALETTE } from './dark-palette.js';
26
27
  /**
27
28
  * C4 rendering — ALWAYS registered, independent of any flag. Boards, boundaries
28
29
  * and nodes already drawn must paint, stay selectable, stay editable and keep
@@ -41,6 +42,7 @@ export class C4RenderViewExtension extends ViewExtensionProvider {
41
42
  }
42
43
  setup(context) {
43
44
  super.setup(context);
45
+ context.register(NotationDarkPaletteExtension(C4_DARK_PALETTE));
44
46
  context.register(C4BoardView);
45
47
  context.register(C4BoardRendererExtension);
46
48
  context.register(C4BoundaryView);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-framework-c4",
3
3
  "description": "Labre c4 framework for @formicoidea/labre-core.",
4
- "version": "0.53.0",
4
+ "version": "0.55.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "author": "lajola",
@@ -35,8 +35,8 @@
35
35
  "dist"
36
36
  ],
37
37
  "dependencies": {
38
- "@formicoidea/labre-core": "0.53.0",
39
- "@formicoidea/labre-ddd-shared": "0.53.0",
38
+ "@formicoidea/labre-core": "0.55.0",
39
+ "@formicoidea/labre-ddd-shared": "0.55.0",
40
40
  "lit": "^3.2.0"
41
41
  }
42
42
  }