@formicoidea/labre-framework-cynefin 0.23.1 → 0.23.3

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.
Files changed (45) hide show
  1. package/dist/cynefin/consts.d.ts +0 -1
  2. package/dist/cynefin/consts.js +0 -1
  3. package/dist/cynefin/element-renderer.d.ts +1 -2
  4. package/dist/cynefin/element-renderer.js +0 -1
  5. package/dist/cynefin/element-view.d.ts +0 -1
  6. package/dist/cynefin/element-view.js +0 -1
  7. package/dist/cynefin/toolbar/config.d.ts +0 -1
  8. package/dist/cynefin/toolbar/config.js +0 -1
  9. package/dist/descriptor.d.ts +4 -4
  10. package/dist/descriptor.js +3 -4
  11. package/dist/effects.d.ts +0 -1
  12. package/dist/effects.js +0 -1
  13. package/dist/estuarine/consts.d.ts +0 -1
  14. package/dist/estuarine/consts.js +0 -1
  15. package/dist/estuarine/element-renderer.d.ts +1 -2
  16. package/dist/estuarine/element-renderer.js +0 -1
  17. package/dist/estuarine/element-view.d.ts +0 -1
  18. package/dist/estuarine/element-view.js +0 -1
  19. package/dist/estuarine/toolbar/config.d.ts +0 -1
  20. package/dist/estuarine/toolbar/config.js +0 -1
  21. package/dist/index.d.ts +0 -1
  22. package/dist/index.js +0 -1
  23. package/dist/templates/index.d.ts +0 -1
  24. package/dist/templates/index.js +0 -1
  25. package/dist/toolbar/icons.d.ts +0 -1
  26. package/dist/toolbar/icons.js +0 -1
  27. package/dist/toolbar/menu.d.ts +1 -2
  28. package/dist/toolbar/menu.js +46 -47
  29. package/dist/toolbar/senior-button.d.ts +1 -2
  30. package/dist/toolbar/senior-button.js +49 -50
  31. package/dist/toolbar/senior-tool.d.ts +0 -1
  32. package/dist/toolbar/senior-tool.js +2 -3
  33. package/dist/utils.d.ts +0 -1
  34. package/dist/utils.js +0 -1
  35. package/dist/view.d.ts +0 -1
  36. package/dist/view.js +0 -1
  37. package/package.json +2 -2
  38. package/dist/toolbar/cynefin-menu.d.ts +0 -12
  39. package/dist/toolbar/cynefin-menu.js +0 -66
  40. package/dist/toolbar/cynefin-senior-button.d.ts +0 -13
  41. package/dist/toolbar/cynefin-senior-button.js +0 -90
  42. package/dist/toolbar/estuarine-menu.d.ts +0 -14
  43. package/dist/toolbar/estuarine-menu.js +0 -113
  44. package/dist/toolbar/estuarine-senior-button.d.ts +0 -13
  45. package/dist/toolbar/estuarine-senior-button.js +0 -90
@@ -77,4 +77,3 @@ export interface Marker {
77
77
  };
78
78
  }
79
79
  export declare const MARKERS: ReadonlyArray<Marker>;
80
- //# sourceMappingURL=consts.d.ts.map
@@ -139,4 +139,3 @@ export const MARKERS = [
139
139
  },
140
140
  { letter: 'C', lx: 531, ly: 419, name: 'Confusion', nx: 529, ny: 436 },
141
141
  ];
142
- //# sourceMappingURL=consts.js.map
@@ -10,6 +10,5 @@ import type { CynefinElementModel } from '@formicoidea/labre-core/model';
10
10
  */
11
11
  export declare const cynefin: ElementRenderer<CynefinElementModel>;
12
12
  export declare const CynefinRendererExtension: import("@formicoidea/labre-core/store").ExtensionType & {
13
- identifier: import("@formicoidea/labre-core/global/di").ServiceIdentifier<ElementRenderer<CynefinElementModel>>;
13
+ identifier: import("@formicoidea/labre-core/_pkgs/global/di").ServiceIdentifier<ElementRenderer<CynefinElementModel>>;
14
14
  };
15
- //# sourceMappingURL=element-renderer.d.ts.map
@@ -112,4 +112,3 @@ export const cynefin = (model, ctx, matrix) => {
112
112
  }
113
113
  };
114
114
  export const CynefinRendererExtension = ElementRendererExtension('cynefin', cynefin);
115
- //# sourceMappingURL=element-renderer.js.map
@@ -12,4 +12,3 @@ export declare class CynefinView extends GfxElementModelView<CynefinElementModel
12
12
  * true (toggled from the toolbar). Moving / selecting stays available.
13
13
  */
14
14
  export declare const CynefinInteraction: import("@formicoidea/labre-core/store").ExtensionType;
15
- //# sourceMappingURL=element-view.d.ts.map
@@ -21,4 +21,3 @@ export const CynefinInteraction = GfxViewInteractionExtension(CynefinView.type,
21
21
  };
22
22
  },
23
23
  });
24
- //# sourceMappingURL=element-view.js.map
@@ -29,4 +29,3 @@ export declare const cynefinToolbarConfig: {
29
29
  readonly when: (ctx: ToolbarContext) => boolean;
30
30
  };
31
31
  export declare const cynefinToolbarExtension: import("@formicoidea/labre-core/store").ExtensionType;
32
- //# sourceMappingURL=config.d.ts.map
@@ -41,4 +41,3 @@ export const cynefinToolbarExtension = ToolbarModuleExtension({
41
41
  id: BlockFlavourIdentifier('affine:surface:cynefin'),
42
42
  config: cynefinToolbarConfig,
43
43
  });
44
- //# sourceMappingURL=config.js.map
@@ -1,7 +1,7 @@
1
1
  import { CynefinEstuarineViewExtension } from './view.js';
2
-
2
+ /** Host wiring for the cynefin-estuarine framework. */
3
3
  export declare const cynefinFramework: {
4
- readonly flag: 'cynefin-estuarine';
5
- readonly telemetry: 'cynefin';
6
- readonly viewExtension: typeof CynefinEstuarineViewExtension;
4
+ readonly flag: "cynefin-estuarine";
5
+ readonly telemetry: "cynefin";
6
+ readonly viewExtension: typeof CynefinEstuarineViewExtension;
7
7
  };
@@ -1,8 +1,7 @@
1
1
  import { CynefinEstuarineViewExtension } from './view.js';
2
-
3
2
  /** Host wiring for the cynefin-estuarine framework. */
4
3
  export const cynefinFramework = {
5
- flag: 'cynefin-estuarine',
6
- telemetry: 'cynefin',
7
- viewExtension: CynefinEstuarineViewExtension,
4
+ flag: 'cynefin-estuarine',
5
+ telemetry: 'cynefin',
6
+ viewExtension: CynefinEstuarineViewExtension,
8
7
  };
package/dist/effects.d.ts CHANGED
@@ -7,4 +7,3 @@ declare global {
7
7
  'edgeless-cynefin-estuarine-senior-button': EdgelessCynefinEstuarineSeniorButton;
8
8
  }
9
9
  }
10
- //# sourceMappingURL=effects.d.ts.map
package/dist/effects.js CHANGED
@@ -4,4 +4,3 @@ export function effects() {
4
4
  customElements.define('edgeless-cynefin-estuarine-menu', EdgelessCynefinEstuarineMenu);
5
5
  customElements.define('edgeless-cynefin-estuarine-senior-button', EdgelessCynefinEstuarineSeniorButton);
6
6
  }
7
- //# sourceMappingURL=effects.js.map
@@ -82,4 +82,3 @@ export declare const AXIS_LABELS: {
82
82
  readonly size: 34;
83
83
  };
84
84
  export declare const LABEL_LETTER_SPACING = 4;
85
- //# sourceMappingURL=consts.d.ts.map
@@ -52,4 +52,3 @@ export const AXIS_LABELS = {
52
52
  size: 34,
53
53
  };
54
54
  export const LABEL_LETTER_SPACING = 4;
55
- //# sourceMappingURL=consts.js.map
@@ -9,6 +9,5 @@ import type { EstuarineElementModel } from '@formicoidea/labre-core/model';
9
9
  */
10
10
  export declare const estuarine: ElementRenderer<EstuarineElementModel>;
11
11
  export declare const EstuarineRendererExtension: import("@formicoidea/labre-core/store").ExtensionType & {
12
- identifier: import("@formicoidea/labre-core/global/di").ServiceIdentifier<ElementRenderer<EstuarineElementModel>>;
12
+ identifier: import("@formicoidea/labre-core/_pkgs/global/di").ServiceIdentifier<ElementRenderer<EstuarineElementModel>>;
13
13
  };
14
- //# sourceMappingURL=element-renderer.d.ts.map
@@ -81,4 +81,3 @@ export const estuarine = (model, ctx, matrix) => {
81
81
  }
82
82
  };
83
83
  export const EstuarineRendererExtension = ElementRendererExtension('estuarine', estuarine);
84
- //# sourceMappingURL=element-renderer.js.map
@@ -12,4 +12,3 @@ export declare class EstuarineView extends GfxElementModelView<EstuarineElementM
12
12
  * true (toggled from the toolbar). Moving / selecting stays available.
13
13
  */
14
14
  export declare const EstuarineInteraction: import("@formicoidea/labre-core/store").ExtensionType;
15
- //# sourceMappingURL=element-view.d.ts.map
@@ -21,4 +21,3 @@ export const EstuarineInteraction = GfxViewInteractionExtension(EstuarineView.ty
21
21
  };
22
22
  },
23
23
  });
24
- //# sourceMappingURL=element-view.js.map
@@ -35,4 +35,3 @@ export declare const estuarineToolbarConfig: {
35
35
  readonly when: (ctx: ToolbarContext) => boolean;
36
36
  };
37
37
  export declare const estuarineToolbarExtension: import("@formicoidea/labre-core/store").ExtensionType;
38
- //# sourceMappingURL=config.d.ts.map
@@ -45,4 +45,3 @@ export const estuarineToolbarExtension = ToolbarModuleExtension({
45
45
  id: BlockFlavourIdentifier('affine:surface:estuarine'),
46
46
  config: estuarineToolbarConfig,
47
47
  });
48
- //# sourceMappingURL=config.js.map
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=index.js.map
@@ -1,4 +1,3 @@
1
1
  import { type TemplateCategory } from '@formicoidea/labre-core/gfx/template';
2
2
  export declare const cynefinTemplateCategory: TemplateCategory;
3
3
  export declare const estuarineTemplateCategory: TemplateCategory;
4
- //# sourceMappingURL=index.d.ts.map
@@ -92,4 +92,3 @@ export const estuarineTemplateCategory = {
92
92
  tpl('Hexagon constraint', `<svg ${ATTRS} fill="none"><path d="M67 24 l18 11 l0 22 l-18 11 l-18 -11 l0 -22 z" fill="#34c724" stroke="#1f1f1f" stroke-width="2"/></svg>`, { hex: hexagon(0, 0) }),
93
93
  ],
94
94
  };
95
- //# sourceMappingURL=index.js.map
@@ -6,4 +6,3 @@ export declare const cynefinMenuIcon: import("lit-html").TemplateResult<2>;
6
6
  export declare const estuarineMenuIcon: import("lit-html").TemplateResult<2>;
7
7
  /** Menu icon — hexagon constraint node. */
8
8
  export declare const hexagonMenuIcon: import("lit-html").TemplateResult<2>;
9
- //# sourceMappingURL=icons.d.ts.map
@@ -24,4 +24,3 @@ export const estuarineMenuIcon = svg `<svg width="24" height="24" viewBox="0 0 2
24
24
  export const hexagonMenuIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
25
25
  <polygon points="21,12 16.5,19.8 7.5,19.8 3,12 7.5,4.2 16.5,4.2" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/>
26
26
  </svg>`;
27
- //# sourceMappingURL=icons.js.map
@@ -1,6 +1,6 @@
1
1
  import { EmptyTool } from '@formicoidea/labre-core/gfx/pointer';
2
2
  import { LitElement } from 'lit';
3
- declare const EdgelessCynefinEstuarineMenu_base: typeof LitElement & import("@formicoidea/labre-core/global/utils").Constructor<import("@formicoidea/labre-core/widgets/edgeless-toolbar").EdgelessToolbarToolClass>;
3
+ declare const EdgelessCynefinEstuarineMenu_base: typeof LitElement & import("@formicoidea/labre-core/_pkgs/global/utils").Constructor<import("@formicoidea/labre-core/_pkgs/affine-widget-edgeless-toolbar").EdgelessToolbarToolClass>;
4
4
  /**
5
5
  * The popover above the toolbar hosting both frameworks: create the Cynefin
6
6
  * diagram, the Estuarine map, or a hexagon constraint node.
@@ -15,4 +15,3 @@ export declare class EdgelessCynefinEstuarineMenu extends EdgelessCynefinEstuari
15
15
  render(): import("lit-html").TemplateResult<1>;
16
16
  }
17
17
  export {};
18
- //# sourceMappingURL=menu.d.ts.map
@@ -30,27 +30,27 @@ export class EdgelessCynefinEstuarineMenu extends EdgelessToolbarToolMixin(LitEl
30
30
  super(...arguments);
31
31
  this.type = EmptyTool;
32
32
  }
33
- static { this.styles = css `
34
- :host {
35
- position: absolute;
36
- display: flex;
37
- z-index: -1;
38
- }
39
- .menu-content {
40
- display: flex;
41
- align-items: center;
42
- justify-content: center;
43
- }
44
- .button-group-container {
45
- display: flex;
46
- align-items: center;
47
- gap: 14px;
48
- fill: var(--affine-icon-color);
49
- }
50
- .button-group-container svg {
51
- width: 24px;
52
- height: 24px;
53
- }
33
+ static { this.styles = css `
34
+ :host {
35
+ position: absolute;
36
+ display: flex;
37
+ z-index: -1;
38
+ }
39
+ .menu-content {
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ }
44
+ .button-group-container {
45
+ display: flex;
46
+ align-items: center;
47
+ gap: 14px;
48
+ fill: var(--affine-icon-color);
49
+ }
50
+ .button-group-container svg {
51
+ width: 24px;
52
+ height: 24px;
53
+ }
54
54
  `; }
55
55
  _finish(id) {
56
56
  const { gfx } = this;
@@ -102,32 +102,31 @@ export class EdgelessCynefinEstuarineMenu extends EdgelessToolbarToolMixin(LitEl
102
102
  this._finish(id);
103
103
  }
104
104
  render() {
105
- return html `
106
- <edgeless-slide-menu>
107
- <div class="menu-content">
108
- <div class="button-group-container">
109
- <edgeless-tool-icon-button
110
- .tooltip=${'Cynefin framework'}
111
- @click=${this._createCynefin}
112
- >
113
- ${cynefinMenuIcon}
114
- </edgeless-tool-icon-button>
115
- <edgeless-tool-icon-button
116
- .tooltip=${'Estuarine map'}
117
- @click=${this._createMap}
118
- >
119
- ${estuarineMenuIcon}
120
- </edgeless-tool-icon-button>
121
- <edgeless-tool-icon-button
122
- .tooltip=${'Hexagon node'}
123
- @click=${this._createHexagon}
124
- >
125
- ${hexagonMenuIcon}
126
- </edgeless-tool-icon-button>
127
- </div>
128
- </div>
129
- </edgeless-slide-menu>
105
+ return html `
106
+ <edgeless-slide-menu>
107
+ <div class="menu-content">
108
+ <div class="button-group-container">
109
+ <edgeless-tool-icon-button
110
+ .tooltip=${'Cynefin framework'}
111
+ @click=${this._createCynefin}
112
+ >
113
+ ${cynefinMenuIcon}
114
+ </edgeless-tool-icon-button>
115
+ <edgeless-tool-icon-button
116
+ .tooltip=${'Estuarine map'}
117
+ @click=${this._createMap}
118
+ >
119
+ ${estuarineMenuIcon}
120
+ </edgeless-tool-icon-button>
121
+ <edgeless-tool-icon-button
122
+ .tooltip=${'Hexagon node'}
123
+ @click=${this._createHexagon}
124
+ >
125
+ ${hexagonMenuIcon}
126
+ </edgeless-tool-icon-button>
127
+ </div>
128
+ </div>
129
+ </edgeless-slide-menu>
130
130
  `;
131
131
  }
132
132
  }
133
- //# sourceMappingURL=menu.js.map
@@ -1,6 +1,6 @@
1
1
  import { EmptyTool } from '@formicoidea/labre-core/gfx/pointer';
2
2
  import { LitElement } from 'lit';
3
- declare const EdgelessCynefinEstuarineSeniorButton_base: typeof LitElement & import("@formicoidea/labre-core/global/utils").Constructor<import("@formicoidea/labre-core/widgets/edgeless-toolbar").EdgelessToolbarToolClass>;
3
+ declare const EdgelessCynefinEstuarineSeniorButton_base: typeof LitElement & import("@formicoidea/labre-core/_pkgs/global/utils").Constructor<import("@formicoidea/labre-core/_pkgs/affine-widget-edgeless-toolbar").EdgelessToolbarToolClass>;
4
4
  /** Main toolbar button that opens the combined Cynefin / Estuarine sub-menu. */
5
5
  export declare class EdgelessCynefinEstuarineSeniorButton extends EdgelessCynefinEstuarineSeniorButton_base {
6
6
  static styles: import("lit").CSSResult;
@@ -10,4 +10,3 @@ export declare class EdgelessCynefinEstuarineSeniorButton extends EdgelessCynefi
10
10
  render(): import("lit-html").TemplateResult<1>;
11
11
  }
12
12
  export {};
13
- //# sourceMappingURL=senior-button.d.ts.map
@@ -11,45 +11,45 @@ export class EdgelessCynefinEstuarineSeniorButton extends EdgelessToolbarToolMix
11
11
  this.enableActiveBackground = true;
12
12
  this.type = EmptyTool;
13
13
  }
14
- static { this.styles = css `
15
- :host,
16
- .ce-button {
17
- display: block;
18
- width: 100%;
19
- height: 100%;
20
- }
21
- :host {
22
- position: relative;
23
- }
24
- .ce-root {
25
- width: 100%;
26
- height: 64px;
27
- position: relative;
28
- overflow: hidden;
29
- cursor: pointer;
30
- display: flex;
31
- align-items: flex-end;
32
- justify-content: center;
33
- }
34
- .ce-card {
35
- --y: -4px;
36
- --s: 1;
37
- position: absolute;
38
- bottom: 0;
39
- width: 54px;
40
- height: 54px;
41
- transform: translateY(var(--y)) scale(var(--s));
42
- transition: transform 0.3s ease;
43
- }
44
- .ce-card svg {
45
- display: block;
46
- width: 100%;
47
- height: 100%;
48
- }
49
- .ce-root:hover .ce-card {
50
- --y: -10px;
51
- --s: 1.07;
52
- }
14
+ static { this.styles = css `
15
+ :host,
16
+ .ce-button {
17
+ display: block;
18
+ width: 100%;
19
+ height: 100%;
20
+ }
21
+ :host {
22
+ position: relative;
23
+ }
24
+ .ce-root {
25
+ width: 100%;
26
+ height: 64px;
27
+ position: relative;
28
+ overflow: hidden;
29
+ cursor: pointer;
30
+ display: flex;
31
+ align-items: flex-end;
32
+ justify-content: center;
33
+ }
34
+ .ce-card {
35
+ --y: -4px;
36
+ --s: 1;
37
+ position: absolute;
38
+ bottom: 0;
39
+ width: 54px;
40
+ height: 54px;
41
+ transform: translateY(var(--y)) scale(var(--s));
42
+ transition: transform 0.3s ease;
43
+ }
44
+ .ce-card svg {
45
+ display: block;
46
+ width: 100%;
47
+ height: 100%;
48
+ }
49
+ .ce-root:hover .ce-card {
50
+ --y: -10px;
51
+ --s: 1.07;
52
+ }
53
53
  `; }
54
54
  _toggleMenu() {
55
55
  if (this.popper) {
@@ -74,17 +74,16 @@ export class EdgelessCynefinEstuarineSeniorButton extends EdgelessToolbarToolMix
74
74
  });
75
75
  }
76
76
  render() {
77
- return html `<edgeless-toolbar-button
78
- class="ce-button"
79
- .tooltip=${this.popper ? '' : 'Cynefin / Estuarine'}
80
- .tooltipOffset=${4}
81
- .active=${!!this.popper}
82
- @click=${this._toggleMenu}
83
- >
84
- <div class="ce-root">
85
- <div class="ce-card">${cynefinToolbarIcon}</div>
86
- </div>
77
+ return html `<edgeless-toolbar-button
78
+ class="ce-button"
79
+ .tooltip=${this.popper ? '' : 'Cynefin / Estuarine'}
80
+ .tooltipOffset=${4}
81
+ .active=${!!this.popper}
82
+ @click=${this._toggleMenu}
83
+ >
84
+ <div class="ce-root">
85
+ <div class="ce-card">${cynefinToolbarIcon}</div>
86
+ </div>
87
87
  </edgeless-toolbar-button>`;
88
88
  }
89
89
  }
90
- //# sourceMappingURL=senior-button.js.map
@@ -1,3 +1,2 @@
1
1
  /** A single senior tool hosting both the Cynefin and Estuarine frameworks. */
2
2
  export declare const cynefinEstuarineSeniorTool: import("@formicoidea/labre-core/store").ExtensionType;
3
- //# sourceMappingURL=senior-tool.d.ts.map
@@ -4,9 +4,8 @@ import { html } from 'lit';
4
4
  export const cynefinEstuarineSeniorTool = SeniorToolExtension('cynefin-estuarine', ({ block }) => {
5
5
  return {
6
6
  name: 'Cynefin / Estuarine',
7
- content: html `<edgeless-cynefin-estuarine-senior-button
8
- .edgeless=${block}
7
+ content: html `<edgeless-cynefin-estuarine-senior-button
8
+ .edgeless=${block}
9
9
  ></edgeless-cynefin-estuarine-senior-button>`,
10
10
  };
11
11
  });
12
- //# sourceMappingURL=senior-tool.js.map
package/dist/utils.d.ts CHANGED
@@ -9,4 +9,3 @@ export declare function refScale(w: number, h: number, refW: number, refH: numbe
9
9
  oy: number;
10
10
  };
11
11
  export declare const FONT_FAMILY = "Inter, sans-serif";
12
- //# sourceMappingURL=utils.d.ts.map
package/dist/utils.js CHANGED
@@ -8,4 +8,3 @@ export function refScale(w, h, refW, refH) {
8
8
  return { s, ox: (w - refW * s) / 2, oy: (h - refH * s) / 2 };
9
9
  }
10
10
  export const FONT_FAMILY = 'Inter, sans-serif';
11
- //# sourceMappingURL=utils.js.map
package/dist/view.d.ts CHANGED
@@ -4,4 +4,3 @@ export declare class CynefinEstuarineViewExtension extends ViewExtensionProvider
4
4
  effect(): void;
5
5
  setup(context: ViewExtensionContext): void;
6
6
  }
7
- //# sourceMappingURL=view.d.ts.map
package/dist/view.js CHANGED
@@ -35,4 +35,3 @@ export class CynefinEstuarineViewExtension extends ViewExtensionProvider {
35
35
  }
36
36
  }
37
37
  }
38
- //# sourceMappingURL=view.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-framework-cynefin",
3
3
  "description": "Labre cynefin-estuarine framework for @formicoidea/labre-core.",
4
- "version": "0.23.1",
4
+ "version": "0.23.3",
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.23.1",
30
+ "@formicoidea/labre-core": "0.23.3",
31
31
  "lit": "^3.2.0"
32
32
  }
33
33
  }
@@ -1,12 +0,0 @@
1
- import { EmptyTool } from '@blocksuite/affine-gfx-pointer';
2
- import { LitElement } from 'lit';
3
- declare const EdgelessCynefinMenu_base: typeof LitElement & import("@blocksuite/global/utils").Constructor<import("@blocksuite/affine-widget-edgeless-toolbar").EdgelessToolbarToolClass>;
4
- /** The popover above the toolbar that creates the Cynefin diagram. */
5
- export declare class EdgelessCynefinMenu extends EdgelessCynefinMenu_base {
6
- static styles: import("lit").CSSResult;
7
- type: typeof EmptyTool;
8
- private _createCynefin;
9
- render(): import("lit-html").TemplateResult<1>;
10
- }
11
- export {};
12
- //# sourceMappingURL=cynefin-menu.d.ts.map
@@ -1,66 +0,0 @@
1
- import { DefaultTool } from '@blocksuite/affine-block-surface';
2
- import { EmptyTool } from '@blocksuite/affine-gfx-pointer';
3
- import { EdgelessToolbarToolMixin } from '@blocksuite/affine-widget-edgeless-toolbar';
4
- import { Bound } from '@blocksuite/global/gfx';
5
- import { css, html, LitElement } from 'lit';
6
- import { REF_H, REF_W } from '../cynefin/consts';
7
- import { cynefinMenuIcon } from './icons';
8
- /** The popover above the toolbar that creates the Cynefin diagram. */
9
- export class EdgelessCynefinMenu extends EdgelessToolbarToolMixin(LitElement) {
10
- constructor() {
11
- super(...arguments);
12
- this.type = EmptyTool;
13
- }
14
- static { this.styles = css `
15
- :host {
16
- position: absolute;
17
- display: flex;
18
- z-index: -1;
19
- }
20
- .menu-content {
21
- display: flex;
22
- align-items: center;
23
- justify-content: center;
24
- }
25
- .button-group-container {
26
- display: flex;
27
- align-items: center;
28
- gap: 14px;
29
- fill: var(--affine-icon-color);
30
- }
31
- .button-group-container svg {
32
- width: 24px;
33
- height: 24px;
34
- }
35
- `; }
36
- _createCynefin() {
37
- const { gfx } = this;
38
- if (!gfx.surface)
39
- return;
40
- const { centerX, centerY } = gfx.viewport;
41
- const id = gfx.surface.addElement({
42
- type: 'cynefin',
43
- xywh: new Bound(centerX - REF_W / 2, centerY - REF_H / 2, REF_W, REF_H).serialize(),
44
- });
45
- gfx.doc.captureSync();
46
- gfx.tool.setTool(DefaultTool);
47
- gfx.selection.set({ elements: [id], editing: false });
48
- }
49
- render() {
50
- return html `
51
- <edgeless-slide-menu>
52
- <div class="menu-content">
53
- <div class="button-group-container">
54
- <edgeless-tool-icon-button
55
- .tooltip=${'Cynefin framework'}
56
- @click=${this._createCynefin}
57
- >
58
- ${cynefinMenuIcon}
59
- </edgeless-tool-icon-button>
60
- </div>
61
- </div>
62
- </edgeless-slide-menu>
63
- `;
64
- }
65
- }
66
- //# sourceMappingURL=cynefin-menu.js.map
@@ -1,13 +0,0 @@
1
- import { EmptyTool } from '@blocksuite/affine-gfx-pointer';
2
- import { LitElement } from 'lit';
3
- declare const EdgelessCynefinSeniorButton_base: typeof LitElement & import("@blocksuite/global/utils").Constructor<import("@blocksuite/affine-widget-edgeless-toolbar").EdgelessToolbarToolClass>;
4
- /** Main toolbar button that opens the Cynefin toolbox sub-menu. */
5
- export declare class EdgelessCynefinSeniorButton extends EdgelessCynefinSeniorButton_base {
6
- static styles: import("lit").CSSResult;
7
- enableActiveBackground: boolean;
8
- type: typeof EmptyTool;
9
- private _toggleMenu;
10
- render(): import("lit-html").TemplateResult<1>;
11
- }
12
- export {};
13
- //# sourceMappingURL=cynefin-senior-button.d.ts.map
@@ -1,90 +0,0 @@
1
- import { DefaultTool } from '@blocksuite/affine-block-surface';
2
- import { EmptyTool } from '@blocksuite/affine-gfx-pointer';
3
- import { EdgelessToolbarToolMixin } from '@blocksuite/affine-widget-edgeless-toolbar';
4
- import { SignalWatcher } from '@blocksuite/global/lit';
5
- import { css, html, LitElement } from 'lit';
6
- import { cynefinToolbarIcon } from './icons';
7
- /** Main toolbar button that opens the Cynefin toolbox sub-menu. */
8
- export class EdgelessCynefinSeniorButton extends EdgelessToolbarToolMixin(SignalWatcher(LitElement)) {
9
- constructor() {
10
- super(...arguments);
11
- this.enableActiveBackground = true;
12
- this.type = EmptyTool;
13
- }
14
- static { this.styles = css `
15
- :host,
16
- .cynefin-button {
17
- display: block;
18
- width: 100%;
19
- height: 100%;
20
- }
21
- :host {
22
- position: relative;
23
- }
24
- .cynefin-root {
25
- width: 100%;
26
- height: 64px;
27
- position: relative;
28
- overflow: hidden;
29
- cursor: pointer;
30
- display: flex;
31
- align-items: flex-end;
32
- justify-content: center;
33
- }
34
- .cynefin-card {
35
- --y: 6px;
36
- --s: 1;
37
- position: absolute;
38
- bottom: 0;
39
- width: 54px;
40
- height: 54px;
41
- transform: translateY(var(--y)) scale(var(--s));
42
- transition: transform 0.3s ease;
43
- }
44
- .cynefin-card svg {
45
- display: block;
46
- width: 100%;
47
- height: 100%;
48
- }
49
- .cynefin-root:hover .cynefin-card {
50
- --y: -2px;
51
- --s: 1.07;
52
- }
53
- `; }
54
- _toggleMenu() {
55
- if (this.popper) {
56
- this.popper.dispose();
57
- this.popper = null;
58
- return;
59
- }
60
- this.setEdgelessTool(DefaultTool);
61
- const menu = this.createPopper('edgeless-cynefin-menu', this);
62
- menu.element.edgeless = this.edgeless;
63
- const el = menu.element;
64
- const wrap = el.parentElement;
65
- if (wrap) {
66
- wrap.style.overflow = 'visible';
67
- wrap.style.justifyContent = 'flex-end';
68
- }
69
- Object.assign(el.style, {
70
- position: 'static',
71
- width: 'max-content',
72
- maxWidth: 'calc(100vw - 16px)',
73
- marginLeft: '0',
74
- });
75
- }
76
- render() {
77
- return html `<edgeless-toolbar-button
78
- class="cynefin-button"
79
- .tooltip=${this.popper ? '' : 'Cynefin'}
80
- .tooltipOffset=${4}
81
- .active=${!!this.popper}
82
- @click=${this._toggleMenu}
83
- >
84
- <div class="cynefin-root">
85
- <div class="cynefin-card">${cynefinToolbarIcon}</div>
86
- </div>
87
- </edgeless-toolbar-button>`;
88
- }
89
- }
90
- //# sourceMappingURL=cynefin-senior-button.js.map
@@ -1,14 +0,0 @@
1
- import { EmptyTool } from '@blocksuite/affine-gfx-pointer';
2
- import { LitElement } from 'lit';
3
- declare const EdgelessEstuarineMenu_base: typeof LitElement & import("@blocksuite/global/utils").Constructor<import("@blocksuite/affine-widget-edgeless-toolbar").EdgelessToolbarToolClass>;
4
- /** The popover above the toolbar: create the Estuarine map or a hexagon node. */
5
- export declare class EdgelessEstuarineMenu extends EdgelessEstuarineMenu_base {
6
- static styles: import("lit").CSSResult;
7
- type: typeof EmptyTool;
8
- private _finish;
9
- private _createMap;
10
- private _createHexagon;
11
- render(): import("lit-html").TemplateResult<1>;
12
- }
13
- export {};
14
- //# sourceMappingURL=estuarine-menu.d.ts.map
@@ -1,113 +0,0 @@
1
- import { DefaultTool } from '@blocksuite/affine-block-surface';
2
- import { EmptyTool } from '@blocksuite/affine-gfx-pointer';
3
- import { ShapeStyle } from '@blocksuite/affine-model';
4
- import { EdgelessToolbarToolMixin } from '@blocksuite/affine-widget-edgeless-toolbar';
5
- import { Bound } from '@blocksuite/global/gfx';
6
- import { css, html, LitElement } from 'lit';
7
- import { REF_H, REF_W } from '../estuarine/consts';
8
- import { estuarineMenuIcon, hexagonMenuIcon } from './icons';
9
- /** Estuarine map default size (REF aspect, scaled up so it reads on canvas). */
10
- const MAP_SCALE = 1.2;
11
- /** Default hexagon node size + fill (a constraint token). */
12
- const HEX_SIZE = 60;
13
- const HEX_FILL = '#34c724';
14
- const HEX_STROKE = '#1f1f1f';
15
- /** Flat-top regular hexagon, normalized vertices. */
16
- const HEX_VERTICES = [
17
- [1, 0.5],
18
- [0.75, 0.933],
19
- [0.25, 0.933],
20
- [0, 0.5],
21
- [0.25, 0.067],
22
- [0.75, 0.067],
23
- ];
24
- /** The popover above the toolbar: create the Estuarine map or a hexagon node. */
25
- export class EdgelessEstuarineMenu extends EdgelessToolbarToolMixin(LitElement) {
26
- constructor() {
27
- super(...arguments);
28
- this.type = EmptyTool;
29
- }
30
- static { this.styles = css `
31
- :host {
32
- position: absolute;
33
- display: flex;
34
- z-index: -1;
35
- }
36
- .menu-content {
37
- display: flex;
38
- align-items: center;
39
- justify-content: center;
40
- }
41
- .button-group-container {
42
- display: flex;
43
- align-items: center;
44
- gap: 14px;
45
- fill: var(--affine-icon-color);
46
- }
47
- .button-group-container svg {
48
- width: 24px;
49
- height: 24px;
50
- }
51
- `; }
52
- _finish(id) {
53
- const { gfx } = this;
54
- gfx.doc.captureSync();
55
- gfx.tool.setTool(DefaultTool);
56
- gfx.selection.set({ elements: [id], editing: false });
57
- }
58
- _createMap() {
59
- const { gfx } = this;
60
- if (!gfx.surface)
61
- return;
62
- const width = REF_W * MAP_SCALE;
63
- const height = REF_H * MAP_SCALE;
64
- const { centerX, centerY } = gfx.viewport;
65
- const id = gfx.surface.addElement({
66
- type: 'estuarine',
67
- xywh: new Bound(centerX - width / 2, centerY - height / 2, width, height).serialize(),
68
- });
69
- this._finish(id);
70
- }
71
- _createHexagon() {
72
- const { gfx } = this;
73
- if (!gfx.surface)
74
- return;
75
- const { centerX: cx, centerY: cy } = gfx.viewport;
76
- const id = gfx.surface.addElement({
77
- type: 'shape',
78
- shapeType: 'polygon',
79
- vertices: HEX_VERTICES,
80
- filled: true,
81
- fillColor: HEX_FILL,
82
- strokeColor: HEX_STROKE,
83
- strokeWidth: 2,
84
- shapeStyle: ShapeStyle.General,
85
- roughness: 0,
86
- xywh: new Bound(cx - HEX_SIZE / 2, cy - HEX_SIZE / 2, HEX_SIZE, HEX_SIZE).serialize(),
87
- });
88
- this._finish(id);
89
- }
90
- render() {
91
- return html `
92
- <edgeless-slide-menu>
93
- <div class="menu-content">
94
- <div class="button-group-container">
95
- <edgeless-tool-icon-button
96
- .tooltip=${'Estuarine map'}
97
- @click=${this._createMap}
98
- >
99
- ${estuarineMenuIcon}
100
- </edgeless-tool-icon-button>
101
- <edgeless-tool-icon-button
102
- .tooltip=${'Hexagon node'}
103
- @click=${this._createHexagon}
104
- >
105
- ${hexagonMenuIcon}
106
- </edgeless-tool-icon-button>
107
- </div>
108
- </div>
109
- </edgeless-slide-menu>
110
- `;
111
- }
112
- }
113
- //# sourceMappingURL=estuarine-menu.js.map
@@ -1,13 +0,0 @@
1
- import { EmptyTool } from '@blocksuite/affine-gfx-pointer';
2
- import { LitElement } from 'lit';
3
- declare const EdgelessEstuarineSeniorButton_base: typeof LitElement & import("@blocksuite/global/utils").Constructor<import("@blocksuite/affine-widget-edgeless-toolbar").EdgelessToolbarToolClass>;
4
- /** Main toolbar button that opens the Estuarine toolbox sub-menu. */
5
- export declare class EdgelessEstuarineSeniorButton extends EdgelessEstuarineSeniorButton_base {
6
- static styles: import("lit").CSSResult;
7
- enableActiveBackground: boolean;
8
- type: typeof EmptyTool;
9
- private _toggleMenu;
10
- render(): import("lit-html").TemplateResult<1>;
11
- }
12
- export {};
13
- //# sourceMappingURL=estuarine-senior-button.d.ts.map
@@ -1,90 +0,0 @@
1
- import { DefaultTool } from '@blocksuite/affine-block-surface';
2
- import { EmptyTool } from '@blocksuite/affine-gfx-pointer';
3
- import { EdgelessToolbarToolMixin } from '@blocksuite/affine-widget-edgeless-toolbar';
4
- import { SignalWatcher } from '@blocksuite/global/lit';
5
- import { css, html, LitElement } from 'lit';
6
- import { estuarineToolbarIcon } from './icons';
7
- /** Main toolbar button that opens the Estuarine toolbox sub-menu. */
8
- export class EdgelessEstuarineSeniorButton extends EdgelessToolbarToolMixin(SignalWatcher(LitElement)) {
9
- constructor() {
10
- super(...arguments);
11
- this.enableActiveBackground = true;
12
- this.type = EmptyTool;
13
- }
14
- static { this.styles = css `
15
- :host,
16
- .estuarine-button {
17
- display: block;
18
- width: 100%;
19
- height: 100%;
20
- }
21
- :host {
22
- position: relative;
23
- }
24
- .estuarine-root {
25
- width: 100%;
26
- height: 64px;
27
- position: relative;
28
- overflow: hidden;
29
- cursor: pointer;
30
- display: flex;
31
- align-items: flex-end;
32
- justify-content: center;
33
- }
34
- .estuarine-card {
35
- --y: 6px;
36
- --s: 1;
37
- position: absolute;
38
- bottom: 0;
39
- width: 54px;
40
- height: 54px;
41
- transform: translateY(var(--y)) scale(var(--s));
42
- transition: transform 0.3s ease;
43
- }
44
- .estuarine-card svg {
45
- display: block;
46
- width: 100%;
47
- height: 100%;
48
- }
49
- .estuarine-root:hover .estuarine-card {
50
- --y: -2px;
51
- --s: 1.07;
52
- }
53
- `; }
54
- _toggleMenu() {
55
- if (this.popper) {
56
- this.popper.dispose();
57
- this.popper = null;
58
- return;
59
- }
60
- this.setEdgelessTool(DefaultTool);
61
- const menu = this.createPopper('edgeless-estuarine-menu', this);
62
- menu.element.edgeless = this.edgeless;
63
- const el = menu.element;
64
- const wrap = el.parentElement;
65
- if (wrap) {
66
- wrap.style.overflow = 'visible';
67
- wrap.style.justifyContent = 'flex-end';
68
- }
69
- Object.assign(el.style, {
70
- position: 'static',
71
- width: 'max-content',
72
- maxWidth: 'calc(100vw - 16px)',
73
- marginLeft: '0',
74
- });
75
- }
76
- render() {
77
- return html `<edgeless-toolbar-button
78
- class="estuarine-button"
79
- .tooltip=${this.popper ? '' : 'Estuarine'}
80
- .tooltipOffset=${4}
81
- .active=${!!this.popper}
82
- @click=${this._toggleMenu}
83
- >
84
- <div class="estuarine-root">
85
- <div class="estuarine-card">${estuarineToolbarIcon}</div>
86
- </div>
87
- </edgeless-toolbar-button>`;
88
- }
89
- }
90
- //# sourceMappingURL=estuarine-senior-button.js.map