@formicoidea/labre-framework-edgy 0.30.1 → 0.32.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,14 @@
1
+ import { type TranslationKeyManifestEntry } from '@formicoidea/labre-core/std';
2
+ /**
3
+ * THIS framework's contribution to the translation-key manifest.
4
+ *
5
+ * Its command labels and descriptions are built from a TEMPLATE, so the
6
+ * concrete keys exist nowhere but in the declarations themselves and the
7
+ * core manifest could not restate them even if it wanted to. The
8
+ * contribution therefore ships WITH the framework: in the bundled
9
+ * distribution `@formicoidea/labre-framework-edgy` carries it, and a host
10
+ * composes it into its catalogue exactly as it already composes
11
+ * `edgyCommands` into the command registry. See
12
+ * `packages/affine/all/src/translations.ts`.
13
+ */
14
+ export declare const edgyTranslationEntries: TranslationKeyManifestEntry[];
@@ -0,0 +1,15 @@
1
+ import { commandTranslationEntries, } from '@formicoidea/labre-core/std';
2
+ import { edgyCommands } from './commands.js';
3
+ /**
4
+ * THIS framework's contribution to the translation-key manifest.
5
+ *
6
+ * Its command labels and descriptions are built from a TEMPLATE, so the
7
+ * concrete keys exist nowhere but in the declarations themselves and the
8
+ * core manifest could not restate them even if it wanted to. The
9
+ * contribution therefore ships WITH the framework: in the bundled
10
+ * distribution `@formicoidea/labre-framework-edgy` carries it, and a host
11
+ * composes it into its catalogue exactly as it already composes
12
+ * `edgyCommands` into the command registry. See
13
+ * `packages/affine/all/src/translations.ts`.
14
+ */
15
+ export const edgyTranslationEntries = commandTranslationEntries(edgyCommands);
package/dist/view.d.ts CHANGED
@@ -1,4 +1,19 @@
1
1
  import { type ViewExtensionContext, ViewExtensionProvider } from '@formicoidea/labre-core/ext-loader';
2
+ /**
3
+ * EDGY rendering — ALWAYS registered, independent of any flag. Disabling `edgy`
4
+ * hides only the creation tooling (see {@link EdgyViewExtension}); boards and
5
+ * facets already drawn must still paint, stay selectable, stay editable, keep
6
+ * their contextual toolbar and keep the dependency spotlight. See
7
+ * `docs/adr/0009`.
8
+ */
9
+ export declare class EdgyRenderViewExtension extends ViewExtensionProvider {
10
+ name: string;
11
+ setup(context: ViewExtensionContext): void;
12
+ }
13
+ /**
14
+ * EDGY creation tooling — flag-gated (`edgy`): the senior toolbar button and
15
+ * its templates category.
16
+ */
2
17
  export declare class EdgyViewExtension extends ViewExtensionProvider {
3
18
  name: string;
4
19
  effect(): void;
package/dist/view.js CHANGED
@@ -1,14 +1,55 @@
1
+ import { SpotlightHostExtension } from '@formicoidea/labre-core/blocks/surface';
1
2
  import { ViewExtensionProvider, } from '@formicoidea/labre-core/ext-loader';
2
3
  import { extendTemplateCategory } from '@formicoidea/labre-core/gfx/template';
3
- import { effects } from './effects';
4
- import { edgyTemplateCategory } from './templates';
5
- import { EdgyFacetsRendererExtension } from './element-renderer';
6
- import { EdgyInteraction, EdgyView } from './element-view';
7
- import { EdgyNodeRendererExtension } from './node/node-renderer';
8
- import { EdgyNodeView } from './node/node-view';
9
- import { edgyToolbarExtension } from './toolbar/config';
10
- import { edgyNodeToolbarExtension } from './toolbar/node-config';
11
- import { edgySeniorTool } from './toolbar/senior-tool';
4
+ import { CommandExtension } from '@formicoidea/labre-core/std';
5
+ import { edgyCommandIcons, edgyCommands } from './commands.js';
6
+ import { effects } from './effects.js';
7
+ import { edgyTemplateCategory } from './templates/index.js';
8
+ import { EdgyBoardRendererExtension } from './board-renderer.js';
9
+ import { EdgyBoardInteraction, EdgyBoardView } from './board-view.js';
10
+ import { EdgyFacetsRendererExtension } from './element-renderer.js';
11
+ import { EdgyInteraction, EdgyView } from './element-view.js';
12
+ import { EdgyNodeRendererExtension } from './node/node-renderer.js';
13
+ import { EdgyNodeView } from './node/node-view.js';
14
+ import { edgyBoardToolbarExtension, edgyToolbarExtension, } from './toolbar/config.js';
15
+ import { edgyNodeToolbarExtension } from './toolbar/node-config.js';
16
+ import { edgySeniorTool } from './toolbar/senior-tool.js';
17
+ /**
18
+ * EDGY rendering — ALWAYS registered, independent of any flag. Disabling `edgy`
19
+ * hides only the creation tooling (see {@link EdgyViewExtension}); boards and
20
+ * facets already drawn must still paint, stay selectable, stay editable, keep
21
+ * their contextual toolbar and keep the dependency spotlight. See
22
+ * `docs/adr/0009`.
23
+ */
24
+ export class EdgyRenderViewExtension extends ViewExtensionProvider {
25
+ constructor() {
26
+ super(...arguments);
27
+ this.name = 'affine-edgy-render-gfx';
28
+ }
29
+ setup(context) {
30
+ super.setup(context);
31
+ context.register(EdgyView);
32
+ context.register(EdgyFacetsRendererExtension);
33
+ context.register(EdgyBoardView);
34
+ context.register(EdgyBoardRendererExtension);
35
+ context.register(EdgyNodeView);
36
+ context.register(EdgyNodeRendererExtension);
37
+ if (this.isEdgeless(context.scope)) {
38
+ context.register(EdgyInteraction);
39
+ context.register(EdgyBoardInteraction);
40
+ context.register(edgyToolbarExtension);
41
+ context.register(edgyBoardToolbarExtension);
42
+ context.register(edgyNodeToolbarExtension);
43
+ // Both EDGY backgrounds grant the dependency spotlight on hover.
44
+ context.register(SpotlightHostExtension('edgy'));
45
+ context.register(SpotlightHostExtension('edgyBoard'));
46
+ }
47
+ }
48
+ }
49
+ /**
50
+ * EDGY creation tooling — flag-gated (`edgy`): the senior toolbar button and
51
+ * its templates category.
52
+ */
12
53
  export class EdgyViewExtension extends ViewExtensionProvider {
13
54
  constructor() {
14
55
  super(...arguments);
@@ -16,20 +57,17 @@ export class EdgyViewExtension extends ViewExtensionProvider {
16
57
  }
17
58
  effect() {
18
59
  super.effect();
60
+ // Defines the senior button and its menu — tooling-only custom elements.
19
61
  effects();
20
62
  extendTemplateCategory(edgyTemplateCategory);
21
63
  }
22
64
  setup(context) {
23
65
  super.setup(context);
24
- context.register(EdgyView);
25
- context.register(EdgyFacetsRendererExtension);
26
- context.register(EdgyNodeView);
27
- context.register(EdgyNodeRendererExtension);
28
66
  if (this.isEdgeless(context.scope)) {
29
- context.register(EdgyInteraction);
30
67
  context.register(edgySeniorTool);
31
- context.register(edgyToolbarExtension);
32
- context.register(edgyNodeToolbarExtension);
68
+ // The seven EDGY commands: the sub-menu renders them, Settings ›
69
+ // Shortcuts finally lists them, and a host override on an id binds.
70
+ context.register(CommandExtension(edgyCommands, edgyCommandIcons));
33
71
  }
34
72
  }
35
73
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-framework-edgy",
3
3
  "description": "Labre edgy framework for @formicoidea/labre-core.",
4
- "version": "0.30.1",
4
+ "version": "0.32.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "author": "lajola",
@@ -27,7 +27,7 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@formicoidea/labre-core": "0.30.1",
30
+ "@formicoidea/labre-core": "0.32.0",
31
31
  "lit": "^3.2.0"
32
32
  }
33
33
  }