@omicronenergy/oscd-shell 0.0.11 → 0.0.12

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.
@@ -55,13 +55,13 @@ LandingPage.styles = css `
55
55
  }
56
56
 
57
57
  .heading {
58
- color: var(--oscd-base3);
58
+ color: var(--landing-heading-color);
59
59
  text-align: center;
60
- font-family: 'Roboto';
61
- font-size: 50px;
62
- font-style: normal;
63
- font-weight: 600;
64
- line-height: normal;
60
+ font-family: var(--landing-heading-font-family);
61
+ font-size: var(--landing-heading-size);
62
+ font-style: var(--landing-heading-style);
63
+ font-weight: var(--landing-heading-weight);
64
+ line-height: var(--landing-heading-line-height);
65
65
 
66
66
  margin-block-start: 64px;
67
67
  margin-block-end: 8px;
@@ -70,36 +70,36 @@ LandingPage.styles = css `
70
70
  }
71
71
 
72
72
  .sub-heading {
73
- color: var(--oscd-base3);
73
+ color: var(--landing-subheading-color);
74
74
  text-align: center;
75
- font-family: Roboto;
76
- font-size: 16.909px;
77
- font-style: normal;
78
- font-weight: 400;
79
- line-height: 65.194px; /* 385.56% */
75
+ font-family: var(--landing-subheading-font-family);
76
+ font-size: var(--landing-subheading-size);
77
+ font-style: var(--landing-subheading-style);
78
+ font-weight: var(--landing-subheading-weight);
79
+ line-height: var(--landing-subheading-line-height);
80
80
 
81
81
  margin-block-end: 168px;
82
82
  }
83
83
 
84
84
  .menu-plugins-grid {
85
- width: 60%;
85
+ width: var(--landing-grid-width);
86
86
  display: flex;
87
87
  flex-wrap: wrap;
88
- gap: 95px;
88
+ gap: var(--landing-grid-gap);
89
89
  justify-content: center;
90
90
  margin: 0 auto;
91
91
  padding: 16px 0;
92
92
  }
93
93
 
94
94
  .menu-plugin-item {
95
- --md-text-button-container-shape: 2px;
95
+ --md-text-button-container-shape: var(--landing-card-radius);
96
96
  display: flex;
97
97
  flex-direction: row;
98
98
  align-items: center;
99
99
  text-align: center;
100
100
  padding: 8px;
101
- color: var(--oscd-base3);
102
- background: var(--oscd-primary);
101
+ color: var(--landing-card-text-color);
102
+ background: var(--landing-card-background);
103
103
  transition: background-color 0.3s;
104
104
  cursor: pointer;
105
105
  }
@@ -109,19 +109,19 @@ LandingPage.styles = css `
109
109
  }
110
110
 
111
111
  .menu-plugin-item-content {
112
- color: var(--oscd-base3);
113
- width: 240px;
114
- height: 180px;
112
+ color: var(--landing-card-text-color);
113
+ width: var(--landing-card-width);
114
+ height: var(--landing-card-height);
115
115
  display: flex;
116
116
  flex-direction: column;
117
117
  align-items: center;
118
118
  justify-content: center;
119
119
  gap: 24px;
120
- font-family: 'Roboto';
120
+ font-family: var(--landing-heading-font-family);
121
121
  }
122
122
 
123
123
  .menu-plugin-item-content oscd-icon {
124
- --md-icon-size: 54px;
124
+ --md-icon-size: var(--landing-card-icon-size);
125
125
  }
126
126
 
127
127
  .menu-plugin-item-content span {
@@ -139,7 +139,7 @@ LandingPage.styles = css `
139
139
  height: 50px;
140
140
  background: linear-gradient(
141
141
  to top left,
142
- var(--omicron-yellow) 50%,
142
+ var(--landing-card-corner-accent) 50%,
143
143
  transparent 50%
144
144
  );
145
145
  }
@@ -1 +1 @@
1
- {"version":3,"file":"landing-page.js","sourceRoot":"","sources":["../../src/landing-page/landing-page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAIjF,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAQ3E,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,mBAAmB,CA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,WAAW,CAsJvB","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized } from '@lit/localize';\n\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdTextButton } from '@omicronenergy/oscd-ui/button/OscdTextButton.js';\n\nimport { PluginEntry } from '../oscd-shell.js';\nimport { LocaleTag } from '../localization.js';\nimport { OscdElevation } from '@omicronenergy/oscd-ui/elevation/OscdElevation.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'landing-page': LandingPage;\n }\n}\n@localized()\nexport class LandingPage extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-icon': OscdIcon,\n 'oscd-text-button': OscdTextButton,\n 'oscd-elevation': OscdElevation,\n };\n\n /* Properties */\n\n @property({ type: String })\n heading: string = '';\n\n @property({ type: String })\n subHeading: string = '';\n @property({ type: Array })\n menuPlugins: PluginEntry[] = [];\n\n @property({ type: String, reflect: true })\n locale!: LocaleTag;\n\n render() {\n return html`\n <h1 class=\"heading\">${this.heading}</h1>\n <h2 class=\"sub-heading\">${this.subHeading}</h2>\n <div class=\"menu-plugins-grid\">\n ${this.menuPlugins.map(\n plugin =>\n html`<oscd-text-button\n class=\"menu-plugin-item\"\n @click=${() => {\n this.dispatchEvent(\n new CustomEvent('menu-plugin-select', {\n detail: { plugin },\n bubbles: true,\n composed: true,\n }),\n );\n }}\n >\n <oscd-elevation></oscd-elevation>\n <div class=\"menu-plugin-item-content\">\n <oscd-icon>${plugin.icon}</oscd-icon>\n <span>${plugin.name}</span>\n <div class=\"menu-plugin-item-corner-wedge\"></div>\n </div>\n </oscd-text-button> `,\n )}\n </div>\n `;\n }\n\n static styles = css`\n .host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 8px;\n }\n\n .heading {\n color: var(--oscd-base3);\n text-align: center;\n font-family: 'Roboto';\n font-size: 50px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n\n margin-block-start: 64px;\n margin-block-end: 8px;\n\n --md-icon-size: 50px;\n }\n\n .sub-heading {\n color: var(--oscd-base3);\n text-align: center;\n font-family: Roboto;\n font-size: 16.909px;\n font-style: normal;\n font-weight: 400;\n line-height: 65.194px; /* 385.56% */\n\n margin-block-end: 168px;\n }\n\n .menu-plugins-grid {\n width: 60%;\n display: flex;\n flex-wrap: wrap;\n gap: 95px;\n justify-content: center;\n margin: 0 auto;\n padding: 16px 0;\n }\n\n .menu-plugin-item {\n --md-text-button-container-shape: 2px;\n display: flex;\n flex-direction: row;\n align-items: center;\n text-align: center;\n padding: 8px;\n color: var(--oscd-base3);\n background: var(--oscd-primary);\n transition: background-color 0.3s;\n cursor: pointer;\n }\n\n .menu-plugin-item:hover {\n --md-elevation-level: 2;\n }\n\n .menu-plugin-item-content {\n color: var(--oscd-base3);\n width: 240px;\n height: 180px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 24px;\n font-family: 'Roboto';\n }\n\n .menu-plugin-item-content oscd-icon {\n --md-icon-size: 54px;\n }\n\n .menu-plugin-item-content span {\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 22px; /* 135% */\n }\n\n .menu-plugin-item-corner-wedge {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 50px;\n height: 50px;\n background: linear-gradient(\n to top left,\n var(--omicron-yellow) 50%,\n transparent 50%\n );\n }\n `;\n}\n"]}
1
+ {"version":3,"file":"landing-page.js","sourceRoot":"","sources":["../../src/landing-page/landing-page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA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AAE,CAAC;+CACH;AAExB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDACM;AAGhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACvB;AAlBR,WAAW;IADvB,SAAS,EAAE;GACC,WAAW,CAsJvB","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized } from '@lit/localize';\n\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdTextButton } from '@omicronenergy/oscd-ui/button/OscdTextButton.js';\n\nimport { PluginEntry } from '../oscd-shell.js';\nimport { LocaleTag } from '../localization.js';\nimport { OscdElevation } from '@omicronenergy/oscd-ui/elevation/OscdElevation.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'landing-page': LandingPage;\n }\n}\n@localized()\nexport class LandingPage extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-icon': OscdIcon,\n 'oscd-text-button': OscdTextButton,\n 'oscd-elevation': OscdElevation,\n };\n\n /* Properties */\n\n @property({ type: String })\n heading: string = '';\n\n @property({ type: String })\n subHeading: string = '';\n @property({ type: Array })\n menuPlugins: PluginEntry[] = [];\n\n @property({ type: String, reflect: true })\n locale!: LocaleTag;\n\n render() {\n return html`\n <h1 class=\"heading\">${this.heading}</h1>\n <h2 class=\"sub-heading\">${this.subHeading}</h2>\n <div class=\"menu-plugins-grid\">\n ${this.menuPlugins.map(\n plugin =>\n html`<oscd-text-button\n class=\"menu-plugin-item\"\n @click=${() => {\n this.dispatchEvent(\n new CustomEvent('menu-plugin-select', {\n detail: { plugin },\n bubbles: true,\n composed: true,\n }),\n );\n }}\n >\n <oscd-elevation></oscd-elevation>\n <div class=\"menu-plugin-item-content\">\n <oscd-icon>${plugin.icon}</oscd-icon>\n <span>${plugin.name}</span>\n <div class=\"menu-plugin-item-corner-wedge\"></div>\n </div>\n </oscd-text-button> `,\n )}\n </div>\n `;\n }\n\n static styles = css`\n .host {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 8px;\n }\n\n .heading {\n color: var(--landing-heading-color);\n text-align: center;\n font-family: var(--landing-heading-font-family);\n font-size: var(--landing-heading-size);\n font-style: var(--landing-heading-style);\n font-weight: var(--landing-heading-weight);\n line-height: var(--landing-heading-line-height);\n\n margin-block-start: 64px;\n margin-block-end: 8px;\n\n --md-icon-size: 50px;\n }\n\n .sub-heading {\n color: var(--landing-subheading-color);\n text-align: center;\n font-family: var(--landing-subheading-font-family);\n font-size: var(--landing-subheading-size);\n font-style: var(--landing-subheading-style);\n font-weight: var(--landing-subheading-weight);\n line-height: var(--landing-subheading-line-height);\n\n margin-block-end: 168px;\n }\n\n .menu-plugins-grid {\n width: var(--landing-grid-width);\n display: flex;\n flex-wrap: wrap;\n gap: var(--landing-grid-gap);\n justify-content: center;\n margin: 0 auto;\n padding: 16px 0;\n }\n\n .menu-plugin-item {\n --md-text-button-container-shape: var(--landing-card-radius);\n display: flex;\n flex-direction: row;\n align-items: center;\n text-align: center;\n padding: 8px;\n color: var(--landing-card-text-color);\n background: var(--landing-card-background);\n transition: background-color 0.3s;\n cursor: pointer;\n }\n\n .menu-plugin-item:hover {\n --md-elevation-level: 2;\n }\n\n .menu-plugin-item-content {\n color: var(--landing-card-text-color);\n width: var(--landing-card-width);\n height: var(--landing-card-height);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 24px;\n font-family: var(--landing-heading-font-family);\n }\n\n .menu-plugin-item-content oscd-icon {\n --md-icon-size: var(--landing-card-icon-size);\n }\n\n .menu-plugin-item-content span {\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 22px; /* 135% */\n }\n\n .menu-plugin-item-corner-wedge {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 50px;\n height: 50px;\n background: linear-gradient(\n to top left,\n var(--landing-card-corner-accent) 50%,\n transparent 50%\n );\n }\n `;\n}\n"]}
@@ -62,11 +62,11 @@ FilesMenu.styles = css `
62
62
 
63
63
  :host oscd-text-button {
64
64
  --md-text-button-label-text-line-height: normal;
65
- --md-text-button-label-text-family: 'Roboto';
66
- --md-text-button-label-text-weight: 500;
67
- --md-text-button-label-text-size: 18px;
65
+ --md-text-button-label-text-family: var(--file-menu-text-font-family);
66
+ --md-text-button-label-text-weight: var(--file-menu-text-weight);
67
+ --md-text-button-label-text-size: var(--file-menu-text-size);
68
68
  --md-text-button-label-text-style: normal;
69
- --md-sys-color-primary: var(--oscd-base3);
69
+ --md-sys-color-primary: var(--file-menu-text-color);
70
70
  display: inline;
71
71
  }
72
72
 
@@ -75,12 +75,23 @@ FilesMenu.styles = css `
75
75
  }
76
76
 
77
77
  oscd-menu {
78
- min-width: 350px;
79
- padding: 12px;
78
+ min-width: var(--plugins-menu-min-width);
79
+ padding: var(--plugins-menu-padding);
80
+ --md-menu-container-color: var(--plugins-menu-container-color);
80
81
  }
81
82
 
82
83
  oscd-menu-item {
83
84
  width: 100%;
85
+ --md-menu-item-label-text-color: var(--plugins-menu-item-label-color);
86
+ --md-menu-item-leading-icon-color: var(
87
+ --plugins-menu-item-leading-icon-color
88
+ );
89
+ --md-menu-item-selected-container-color: var(
90
+ --plugins-menu-item-selected-container-color
91
+ );
92
+ --md-menu-item-selected-label-text-color: var(
93
+ --plugins-menu-item-selected-label-color
94
+ );
84
95
  }
85
96
  `;
86
97
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"files-menu.js","sourceRoot":"","sources":["../../src/menus/files-menu.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9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AAI,EAAE,MAAM,EAAE,CAAC;kDACS;AAGpC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCACvB;AAKnB;IADC,KAAK,CAAC,WAAW,CAAC;uCACH;AAtBL,SAAS;IADrB,SAAS,EAAE;GACC,SAAS,CA6FrB","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized } from '@lit/localize';\n\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdMenu } from '@omicronenergy/oscd-ui/menu/OscdMenu.js';\nimport { OscdMenuItem } from '@omicronenergy/oscd-ui/menu/OscdMenuItem.js';\nimport { OscdTextButton } from '@omicronenergy/oscd-ui/button/OscdTextButton.js';\n\nimport { LocaleTag } from '../localization.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'files-menu': FilesMenu;\n }\n}\n@localized()\nexport class FilesMenu extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-text-button': OscdTextButton,\n 'oscd-icon': OscdIcon,\n 'oscd-menu': OscdMenu,\n 'oscd-menu-item': OscdMenuItem,\n };\n\n /* Properties */\n\n @property({ type: Array })\n editableDocs: string[] = [];\n\n @property({ type: String })\n selectedDocName: string | undefined;\n\n @property({ type: String, reflect: true })\n locale!: LocaleTag;\n\n /* Queries */\n\n @query('#fileMenu')\n menu!: OscdMenu;\n\n render() {\n return html`\n <oscd-text-button\n id=\"fileMenuButton\"\n @click=${() => this.menu.show()}\n trailing-icon\n >\n ${this.selectedDocName}\n <oscd-icon slot=\"icon\">code</oscd-icon></oscd-filled-icon-button\n >\n </oscd-text-button>\n\n <oscd-menu\n fixed\n id=\"fileMenu\"\n anchor=\"fileMenuButton\"\n corner=\"BOTTOM_END\"\n >\n ${this.editableDocs.map(\n name =>\n html`<oscd-menu-item\n @click=${() => {\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n composed: true,\n detail: { name },\n }),\n );\n }}\n ?selected=${this.selectedDocName === name}\n >${name}</oscd-menu-item\n >`,\n )}\n </oscd-menu>\n `;\n }\n\n static styles = css`\n :host {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n :host oscd-text-button {\n --md-text-button-label-text-line-height: normal;\n --md-text-button-label-text-family: 'Roboto';\n --md-text-button-label-text-weight: 500;\n --md-text-button-label-text-size: 18px;\n --md-text-button-label-text-style: normal;\n --md-sys-color-primary: var(--oscd-base3);\n display: inline;\n }\n\n :host oscd-text-button oscd-icon {\n transform: rotate(90deg);\n }\n\n oscd-menu {\n min-width: 350px;\n padding: 12px;\n }\n\n oscd-menu-item {\n width: 100%;\n }\n `;\n}\n"]}
1
+ {"version":3,"file":"files-menu.js","sourceRoot":"","sources":["../../src/menus/files-menu.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAU1E,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,mBAAmB,CAAC,UAAU,CAAC;IAAvD;;QAQL,gBAAgB;QAGhB,iBAAY,GAAa,EAAE,CAAC;IA6F9B,CAAC;IAhFC,MAAM;QACJ,OAAO,IAAI,CAAA;;;mBAGI,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;;;YAG7B,IAAI,CAAC,eAAe;;;;;;;;;;;UAWtB,IAAI,CAAC,YAAY,CAAC,GAAG,CACrB,IAAI,CAAC,EAAE,CACL,IAAI,CAAA;uBACO,GAAG,EAAE;YACZ,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,QAAQ,EAAE;gBACxB,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,EAAE,IAAI,EAAE;aACjB,CAAC,CACH,CAAC;QACJ,CAAC;0BACW,IAAI,CAAC,eAAe,KAAK,IAAI;iBACtC,IAAI;cACP,CACL;;KAEJ,CAAC;IACJ,CAAC;;AA3DM,wBAAc,GAAG;IACtB,kBAAkB,EAAE,cAAc;IAClC,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,QAAQ;IACrB,gBAAgB,EAAE,YAAY;CAC/B,AALoB,CAKnB;AAwDK,gBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyClB,AAzCY,CAyCX;AA5FF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;+CACE;AAG5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACS;AAGpC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCACvB;AAKnB;IADC,KAAK,CAAC,WAAW,CAAC;uCACH;AAtBL,SAAS;IADrB,SAAS,EAAE;GACC,SAAS,CAwGrB","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized } from '@lit/localize';\n\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdMenu } from '@omicronenergy/oscd-ui/menu/OscdMenu.js';\nimport { OscdMenuItem } from '@omicronenergy/oscd-ui/menu/OscdMenuItem.js';\nimport { OscdTextButton } from '@omicronenergy/oscd-ui/button/OscdTextButton.js';\n\nimport { LocaleTag } from '../localization.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'files-menu': FilesMenu;\n }\n}\n@localized()\nexport class FilesMenu extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-text-button': OscdTextButton,\n 'oscd-icon': OscdIcon,\n 'oscd-menu': OscdMenu,\n 'oscd-menu-item': OscdMenuItem,\n };\n\n /* Properties */\n\n @property({ type: Array })\n editableDocs: string[] = [];\n\n @property({ type: String })\n selectedDocName: string | undefined;\n\n @property({ type: String, reflect: true })\n locale!: LocaleTag;\n\n /* Queries */\n\n @query('#fileMenu')\n menu!: OscdMenu;\n\n render() {\n return html`\n <oscd-text-button\n id=\"fileMenuButton\"\n @click=${() => this.menu.show()}\n trailing-icon\n >\n ${this.selectedDocName}\n <oscd-icon slot=\"icon\">code</oscd-icon></oscd-filled-icon-button\n >\n </oscd-text-button>\n\n <oscd-menu\n fixed\n id=\"fileMenu\"\n anchor=\"fileMenuButton\"\n corner=\"BOTTOM_END\"\n >\n ${this.editableDocs.map(\n name =>\n html`<oscd-menu-item\n @click=${() => {\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n composed: true,\n detail: { name },\n }),\n );\n }}\n ?selected=${this.selectedDocName === name}\n >${name}</oscd-menu-item\n >`,\n )}\n </oscd-menu>\n `;\n }\n\n static styles = css`\n :host {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n :host oscd-text-button {\n --md-text-button-label-text-line-height: normal;\n --md-text-button-label-text-family: var(--file-menu-text-font-family);\n --md-text-button-label-text-weight: var(--file-menu-text-weight);\n --md-text-button-label-text-size: var(--file-menu-text-size);\n --md-text-button-label-text-style: normal;\n --md-sys-color-primary: var(--file-menu-text-color);\n display: inline;\n }\n\n :host oscd-text-button oscd-icon {\n transform: rotate(90deg);\n }\n\n oscd-menu {\n min-width: var(--plugins-menu-min-width);\n padding: var(--plugins-menu-padding);\n --md-menu-container-color: var(--plugins-menu-container-color);\n }\n\n oscd-menu-item {\n width: 100%;\n --md-menu-item-label-text-color: var(--plugins-menu-item-label-color);\n --md-menu-item-leading-icon-color: var(\n --plugins-menu-item-leading-icon-color\n );\n --md-menu-item-selected-container-color: var(\n --plugins-menu-item-selected-container-color\n );\n --md-menu-item-selected-label-text-color: var(\n --plugins-menu-item-selected-label-color\n );\n }\n `;\n}\n"]}
@@ -79,25 +79,38 @@ PluginsMenu.styles = css `
79
79
  }
80
80
 
81
81
  img {
82
- height: 34.4px;
83
- width: auto;
82
+ height: var(--app-bar-app-icon-height);
83
+ width: var(--app-bar-app-icon-width);
84
84
  }
85
85
 
86
86
  :host h1.app-title {
87
- font-family: Roboto;
88
- font-size: 22.114px;
89
- font-style: normal;
90
- font-weight: 400;
91
- line-height: normal;
87
+ font-family: var(--app-bar-title-text-font-family);
88
+ font-size: var(--app-bar-title-text-font-size);
89
+ font-style: var(--app-bar-title-text-font-style);
90
+ font-weight: var(--app-bar-title-text-font-weight);
91
+ line-height: var(--app-bar-title-text-line-height);
92
+ letter-spacing: var(--app-bar-title-text-letter-spacing);
93
+ color: var(--app-bar-title-text-color);
92
94
  display: inline;
93
95
  }
94
96
  oscd-menu {
95
- min-width: 350px;
96
- padding: 12px;
97
+ min-width: var(--plugins-menu-min-width);
98
+ padding: var(--plugins-menu-padding);
99
+ --md-menu-container-color: var(--plugins-menu-container-color);
97
100
  }
98
101
 
99
102
  oscd-menu-item {
100
103
  width: 100%;
104
+ --md-menu-item-label-text-color: var(--plugins-menu-item-label-color);
105
+ --md-menu-item-leading-icon-color: var(
106
+ --plugins-menu-item-leading-icon-color
107
+ );
108
+ --md-menu-item-selected-container-color: var(
109
+ --plugins-menu-item-selected-container-color
110
+ );
111
+ --md-menu-item-selected-label-text-color: var(
112
+ --plugins-menu-item-selected-label-color
113
+ );
101
114
  }
102
115
  `;
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AQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACT;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CACvB;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAGxC;AAIF;IADC,KAAK,CAAC,WAAW,CAAC;yCACH;AA/BL,WAAW;IADvB,SAAS,EAAE;GACC,WAAW,CAqHvB","sourcesContent":["import { css, html, LitElement, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized, msg } from '@lit/localize';\n\nimport { OscdFilledIconButton } from '@omicronenergy/oscd-ui/iconbutton/OscdFilledIconButton.js';\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdMenu } from '@omicronenergy/oscd-ui/menu/OscdMenu.js';\nimport { OscdMenuItem } from '@omicronenergy/oscd-ui/menu/OscdMenuItem.js';\n\nimport { LocaleTag, Translation } from '../localization.js';\nimport { PluginEntry } from '../oscd-shell.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'plugin-menu': PluginsMenu;\n }\n}\n\n@localized()\nexport class PluginsMenu extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-filled-icon-button': OscdFilledIconButton,\n 'oscd-icon': OscdIcon,\n 'oscd-menu': OscdMenu,\n 'oscd-menu-item': OscdMenuItem,\n };\n\n /* Properties */\n @property({ type: Array })\n editableDocs: string[] = [];\n\n @property({ type: Array })\n menuPlugins: PluginEntry[] = [];\n\n @property({ type: String })\n appIcon!: string;\n\n @property({ type: String })\n appTitle!: string;\n\n @property({ type: String, reflect: true })\n locale!: LocaleTag;\n\n @property({ type: String, reflect: true })\n open = () => {\n this.menu.show();\n };\n\n /* Queries */\n @query('oscd-menu')\n menu!: OscdMenu;\n\n renderMenuItem(plugin: PluginEntry, disabled: boolean) {\n return html`\n <oscd-menu-item\n .disabled=${disabled}\n @click=${() => {\n this.dispatchEvent(\n new CustomEvent('menu-plugin-select', {\n detail: { plugin },\n bubbles: true,\n composed: true,\n }),\n );\n this.menu.close();\n }}\n >\n <oscd-icon slot=\"start\">${plugin.icon}</oscd-icon>\n <div slot=\"headline\">\n ${plugin.translations?.[this.locale as Translation] || plugin.name}\n </div>\n </oscd-menu-item>\n `;\n }\n\n render() {\n return html`\n ${this.appIcon ? html`<img src=${this.appIcon} alt=\"logo\" />` : nothing}\n <h1 class=\"app-title\">${this.appTitle}</h1>\n <oscd-filled-icon-button\n id=\"menu-button\"\n aria-label=\"${msg('Menu')}\"\n @click=${async () => {\n if (this.menu.open) {\n this.menu.close();\n } else {\n this.menu.show();\n }\n }}\n ><oscd-icon>arrow_drop_down_circle</oscd-icon></oscd-filled-icon-button\n >\n <oscd-menu\n quick\n anchor=\"menu-button\"\n menuCorner=\"START_END\"\n anchorCorner=\"START_END\"\n >\n ${this.menuPlugins.map(plugin =>\n this.renderMenuItem(\n plugin,\n !!(plugin.requireDoc && (this.editableDocs ?? []).length === 0),\n ),\n )}\n </oscd-menu>\n `;\n }\n\n static styles = css`\n :host {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n img {\n height: 34.4px;\n width: auto;\n }\n\n :host h1.app-title {\n font-family: Roboto;\n font-size: 22.114px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n display: inline;\n }\n oscd-menu {\n min-width: 350px;\n padding: 12px;\n }\n\n oscd-menu-item {\n width: 100%;\n }\n `;\n}\n"]}
1
+ {"version":3,"file":"plugins-menu.js","sourceRoot":"","sources":["../../src/menus/plugins-menu.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACp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AIF;IADC,KAAK,CAAC,WAAW,CAAC;yCACH;AA/BL,WAAW;IADvB,SAAS,EAAE;GACC,WAAW,CAkIvB","sourcesContent":["import { css, html, LitElement, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized, msg } from '@lit/localize';\n\nimport { OscdFilledIconButton } from '@omicronenergy/oscd-ui/iconbutton/OscdFilledIconButton.js';\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdMenu } from '@omicronenergy/oscd-ui/menu/OscdMenu.js';\nimport { OscdMenuItem } from '@omicronenergy/oscd-ui/menu/OscdMenuItem.js';\n\nimport { LocaleTag, Translation } from '../localization.js';\nimport { PluginEntry } from '../oscd-shell.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'plugin-menu': PluginsMenu;\n }\n}\n\n@localized()\nexport class PluginsMenu extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-filled-icon-button': OscdFilledIconButton,\n 'oscd-icon': OscdIcon,\n 'oscd-menu': OscdMenu,\n 'oscd-menu-item': OscdMenuItem,\n };\n\n /* Properties */\n @property({ type: Array })\n editableDocs: string[] = [];\n\n @property({ type: Array })\n menuPlugins: PluginEntry[] = [];\n\n @property({ type: String })\n appIcon!: string;\n\n @property({ type: String })\n appTitle!: string;\n\n @property({ type: String, reflect: true })\n locale!: LocaleTag;\n\n @property({ type: String, reflect: true })\n open = () => {\n this.menu.show();\n };\n\n /* Queries */\n @query('oscd-menu')\n menu!: OscdMenu;\n\n renderMenuItem(plugin: PluginEntry, disabled: boolean) {\n return html`\n <oscd-menu-item\n .disabled=${disabled}\n @click=${() => {\n this.dispatchEvent(\n new CustomEvent('menu-plugin-select', {\n detail: { plugin },\n bubbles: true,\n composed: true,\n }),\n );\n this.menu.close();\n }}\n >\n <oscd-icon slot=\"start\">${plugin.icon}</oscd-icon>\n <div slot=\"headline\">\n ${plugin.translations?.[this.locale as Translation] || plugin.name}\n </div>\n </oscd-menu-item>\n `;\n }\n\n render() {\n return html`\n ${this.appIcon ? html`<img src=${this.appIcon} alt=\"logo\" />` : nothing}\n <h1 class=\"app-title\">${this.appTitle}</h1>\n <oscd-filled-icon-button\n id=\"menu-button\"\n aria-label=\"${msg('Menu')}\"\n @click=${async () => {\n if (this.menu.open) {\n this.menu.close();\n } else {\n this.menu.show();\n }\n }}\n ><oscd-icon>arrow_drop_down_circle</oscd-icon></oscd-filled-icon-button\n >\n <oscd-menu\n quick\n anchor=\"menu-button\"\n menuCorner=\"START_END\"\n anchorCorner=\"START_END\"\n >\n ${this.menuPlugins.map(plugin =>\n this.renderMenuItem(\n plugin,\n !!(plugin.requireDoc && (this.editableDocs ?? []).length === 0),\n ),\n )}\n </oscd-menu>\n `;\n }\n\n static styles = css`\n :host {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n img {\n height: var(--app-bar-app-icon-height);\n width: var(--app-bar-app-icon-width);\n }\n\n :host h1.app-title {\n font-family: var(--app-bar-title-text-font-family);\n font-size: var(--app-bar-title-text-font-size);\n font-style: var(--app-bar-title-text-font-style);\n font-weight: var(--app-bar-title-text-font-weight);\n line-height: var(--app-bar-title-text-line-height);\n letter-spacing: var(--app-bar-title-text-letter-spacing);\n color: var(--app-bar-title-text-color);\n display: inline;\n }\n oscd-menu {\n min-width: var(--plugins-menu-min-width);\n padding: var(--plugins-menu-padding);\n --md-menu-container-color: var(--plugins-menu-container-color);\n }\n\n oscd-menu-item {\n width: 100%;\n --md-menu-item-label-text-color: var(--plugins-menu-item-label-color);\n --md-menu-item-leading-icon-color: var(\n --plugins-menu-item-leading-icon-color\n );\n --md-menu-item-selected-container-color: var(\n --plugins-menu-item-selected-container-color\n );\n --md-menu-item-selected-label-text-color: var(\n --plugins-menu-item-selected-label-color\n );\n }\n `;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Single source of truth for oscd-shell design tokens.
3
+ *
4
+ * This block contains:
5
+ * 1) Internal base tokens and fallbacks
6
+ * 2) Public token -> internal token mappings
7
+ *
8
+ * Keep this as an all-or-nothing layer so mappings can safely reference
9
+ * internal base tokens (e.g. --oscd-base*).
10
+ */
11
+ export declare const oscdShellDesignTokens: import("lit").CSSResult;
@@ -0,0 +1,312 @@
1
+ import { css } from 'lit';
2
+ /**
3
+ * Single source of truth for oscd-shell design tokens.
4
+ *
5
+ * This block contains:
6
+ * 1) Internal base tokens and fallbacks
7
+ * 2) Public token -> internal token mappings
8
+ *
9
+ * Keep this as an all-or-nothing layer so mappings can safely reference
10
+ * internal base tokens (e.g. --oscd-base*).
11
+ */
12
+ export const oscdShellDesignTokens = css `
13
+ /* Internal base theme tokens and defaults */
14
+ * {
15
+ --oscd-primary: var(--oscd-theme-primary, #0b335b);
16
+ --oscd-secondary: var(--oscd-theme-secondary, #2485e5);
17
+ --oscd-base03: var(--oscd-theme-base03, #121417);
18
+ --oscd-base02: var(--oscd-theme-base02, #1a1e23);
19
+ --oscd-base01: var(--oscd-theme-base01, #3d4651);
20
+ --oscd-base00: var(--oscd-theme-base00, #46505d);
21
+ --oscd-base0: var(--oscd-theme-base0, #8b97a7);
22
+ --oscd-base1: var(--oscd-theme-base1, #96a1b0);
23
+ --oscd-base2: var(--oscd-theme-base2, #f3f5f6);
24
+ --oscd-base3: var(--oscd-theme-base3, white);
25
+ --oscd-error: var(--oscd-theme-error, #dc322f);
26
+ --oscd-warning: var(--oscd-theme-warning, #b58900);
27
+ --oscd-text-font: var(--oscd-theme-text-font, 'Roboto');
28
+ --oscd-text-font-mono: var(--oscd-theme-text-font-mono, 'Roboto Mono');
29
+ --oscd-icon-font: var(--oscd-theme-icon-font, 'Material Symbols Outlined');
30
+
31
+ /* Fallbacks for Material Design variables */
32
+ --md-sys-color-primary: var(--oscd-primary);
33
+ --md-sys-color-on-primary: var(--oscd-base3);
34
+ --md-sys-color-secondary: var(--oscd-secondary);
35
+ --md-sys-color-on-secondary: var(--oscd-base3);
36
+ --md-sys-color-secondary-container: var(--oscd-base2);
37
+ --md-sys-color-surface: var(--oscd-base3);
38
+ --md-sys-color-on-surface: var(--oscd-base00);
39
+ --md-sys-color-surface-variant: var(--oscd-base3);
40
+ --md-sys-color-on-surface-variant: var(--oscd-base00);
41
+ --md-sys-color-surface-bright: var(--oscd-base2);
42
+ --md-sys-color-surface-container: var(--oscd-base3);
43
+ --md-sys-color-surface-container-high: var(--oscd-base3);
44
+ --md-sys-color-surface-container-highest: var(--oscd-base3);
45
+ --md-sys-color-outline-variant: var(--oscd-primary);
46
+ --md-sys-color-scrim: #000000;
47
+ --md-sys-color-error: var(--oscd-error);
48
+ --md-sys-color-on-error: var(--oscd-base3);
49
+ --md-icon-button-disabled-icon-color: var(--oscd-base3);
50
+ /* --md-menu-item-selected-label-text-color: var(--oscd-base01); */
51
+ --md-icon-button-disabled-icon-color: var(--oscd-base3);
52
+
53
+ /* MDC Theme Colors
54
+ * Needed for supporting any pluggins still using the depricated MWC Components
55
+ */
56
+ --mdc-theme-primary: var(--oscd-primary);
57
+ --mdc-theme-secondary: var(--oscd-secondary);
58
+ --mdc-theme-background: var(--oscd-base3);
59
+ --mdc-theme-surface: var(--oscd-base3);
60
+ --mdc-theme-on-primary: var(--oscd-base2);
61
+ --mdc-theme-on-secondary: var(--oscd-base2);
62
+ --mdc-theme-on-background: var(--oscd-base00);
63
+ --mdc-theme-on-surface: var(--oscd-base00);
64
+ --mdc-theme-text-primary-on-background: var(--oscd-base01);
65
+ --mdc-theme-text-secondary-on-background: var(--oscd-base00);
66
+ --mdc-theme-text-icon-on-background: var(--oscd-base00);
67
+ --mdc-theme-error: var(--oscd-error);
68
+ --mdc-button-disabled-ink-color: var(--oscd-base1);
69
+ --mdc-drawer-heading-ink-color: var(--oscd-base00);
70
+ --mdc-dialog-heading-ink-color: var(--oscd-base00);
71
+ --mdc-text-field-fill-color: var(--oscd-base2);
72
+ --mdc-text-field-disabled-fill-color: var(--oscd-base3);
73
+ --mdc-text-field-ink-color: var(--oscd-base00);
74
+ --mdc-text-field-label-ink-color: var(--oscd-base00);
75
+ --mdc-text-field-idle-line-color: var(--oscd-base00);
76
+ --mdc-text-field-hover-line-color: var(--oscd-base02);
77
+ --mdc-select-fill-color: var(--oscd-base2);
78
+ --mdc-select-disabled-fill-color: var(--oscd-base3);
79
+ --mdc-select-ink-color: var(--oscd-base00);
80
+ --mdc-select-label-ink-color: var(--oscd-base00);
81
+ --mdc-select-idle-line-color: var(--oscd-base00);
82
+ --mdc-select-hover-line-color: var(--oscd-base02);
83
+ --mdc-select-dropdown-icon-color: var(--oscd-base01);
84
+ --mdc-typography-font-family: var(--oscd-text-font);
85
+ --mdc-icon-font: var(--oscd-icon-font);
86
+ --mdc-theme-text-disabled-on-light: rgba(255, 255, 255, 0.38);
87
+ }
88
+
89
+ * {
90
+ --app-bar-height: 54px;
91
+ --side-panel-width: 280px;
92
+
93
+ --md-sys-color-primary: var(--oscd-primary);
94
+ --md-sys-color-on-primary: var(--oscd-base3);
95
+
96
+ --md-sys-color-secondary-container: var(--oscd-base2);
97
+
98
+ --md-sys-color-surface: var(--oscd-base3);
99
+ --md-sys-color-on-surface: var(--oscd-base00);
100
+ }
101
+
102
+ /*
103
+ * Public token -> internal token mappings
104
+ *
105
+ * Example pattern:
106
+ * --internal-variable-name: var(--oscd-shell-public-token, <default>);
107
+ */
108
+ * {
109
+ /* App bar */
110
+ --app-bar-color: var(--oscd-shell-app-bar-color, var(--oscd-base3));
111
+ --app-bar-background-color: var(
112
+ --oscd-shell-app-bar-background-color,
113
+ var(--oscd-primary)
114
+ );
115
+ --app-bar-height: var(--oscd-shell-app-bar-height, 54px);
116
+ --app-bar-small-height: var(--oscd-shell-app-bar-small-height, 48px);
117
+ --app-bar-elevation: var(
118
+ --oscd-shell-app-bar-elevation,
119
+ var(--md-sys-elevation-level-2)
120
+ );
121
+ --app-bar-app-icon-height: var(--oscd-shell-app-bar-icon-height, 34.4px);
122
+ --app-bar-app-icon-width: var(--oscd-shell-app-bar-icon-width, auto);
123
+ --app-bar-title-text-font-family: var(
124
+ --oscd-shell-app-bar-title-font-family,
125
+ var(--oscd-text-font)
126
+ );
127
+ --app-bar-title-text-color: var(
128
+ --oscd-shell-app-bar-title-color,
129
+ var(--app-bar-color)
130
+ );
131
+ --app-bar-title-text-font-size: var(
132
+ --oscd-shell-app-bar-title-font-size,
133
+ 22.114px
134
+ );
135
+ --app-bar-title-text-font-weight: var(
136
+ --oscd-shell-app-bar-title-font-weight,
137
+ 400
138
+ );
139
+ --app-bar-title-text-font-style: var(
140
+ --oscd-shell-app-bar-title-font-style,
141
+ normal
142
+ );
143
+ --app-bar-title-text-line-height: var(
144
+ --oscd-shell-app-bar-title-line-height,
145
+ normal
146
+ );
147
+ --app-bar-title-text-letter-spacing: var(
148
+ --oscd-shell-app-bar-title-letter-spacing,
149
+ inherit
150
+ );
151
+ --app-bar-action-icon-size: var(
152
+ --oscd-shell-app-bar-action-icon-size,
153
+ 24px
154
+ );
155
+ --app-bar-action-icon-color: var(
156
+ --oscd-shell-app-bar-action-icon-color,
157
+ var(--md-sys-color-on-primary)
158
+ );
159
+
160
+ /* Bridge to oscd-ui app bar tokens */
161
+ --oscd-app-bar-color: var(--app-bar-color);
162
+ --oscd-app-bar-background-color: var(--app-bar-background-color);
163
+ --oscd-app-bar-elevation: var(--app-bar-elevation);
164
+ --oscd-app-bar-title-font-family: var(--app-bar-title-text-font-family);
165
+ --oscd-app-bar-title-font-size: var(--app-bar-title-text-font-size);
166
+ --oscd-app-bar-title-font-weight: var(--app-bar-title-text-font-weight);
167
+ --oscd-app-bar-title-line-height: var(--app-bar-title-text-line-height);
168
+
169
+ /* Files menu */
170
+ --file-menu-text-font-family: var(
171
+ --oscd-shell-file-menu-text-font-family,
172
+ var(--oscd-text-font)
173
+ );
174
+ --file-menu-text-size: var(--oscd-shell-file-menu-text-size, 18px);
175
+ --file-menu-text-weight: var(--oscd-shell-file-menu-text-weight, 500);
176
+ --file-menu-text-color: var(
177
+ --oscd-shell-file-menu-text-color,
178
+ var(--oscd-base3)
179
+ );
180
+
181
+ /* Plugins menu */
182
+ --plugins-menu-min-width: var(--oscd-shell-plugins-menu-min-width, 350px);
183
+ --plugins-menu-padding: var(--oscd-shell-plugins-menu-padding, 12px);
184
+ --plugins-menu-container-color: var(
185
+ --oscd-shell-plugins-menu-container-color,
186
+ var(--oscd-base3)
187
+ );
188
+ --plugins-menu-item-label-color: var(
189
+ --oscd-shell-plugins-menu-item-label-color,
190
+ var(--oscd-base00)
191
+ );
192
+ --plugins-menu-item-leading-icon-color: var(
193
+ --oscd-shell-plugins-menu-item-leading-icon-color,
194
+ var(--oscd-base00)
195
+ );
196
+ --plugins-menu-item-selected-container-color: var(
197
+ --oscd-shell-plugins-menu-item-selected-container-color,
198
+ var(--oscd-base2)
199
+ );
200
+ --plugins-menu-item-selected-label-color: var(
201
+ --oscd-shell-plugins-menu-item-selected-label-color,
202
+ var(--oscd-base00)
203
+ );
204
+
205
+ /* Editor plugins panel */
206
+ --editor-plugins-panel-width: var(
207
+ --oscd-shell-editor-plugins-panel-width,
208
+ 280px
209
+ );
210
+ --editor-plugins-panel-collapsed-width: var(
211
+ --oscd-shell-editor-plugins-panel-width,
212
+ 280px
213
+ );
214
+ --editor-plugins-panel-padding-top: var(
215
+ --oscd-shell-editor-plugins-panel-padding-top,
216
+ 20px
217
+ );
218
+ --editor-plugins-panel-item-leading-space: var(
219
+ --oscd-shell-editor-plugins-panel-item-leading-space,
220
+ 22px
221
+ );
222
+ --editor-plugins-panel-item-trailing-space: var(
223
+ --oscd-shell-editor-plugins-panel-item-trailing-space,
224
+ 10px
225
+ );
226
+ --editor-plugins-panel-item-icon-size: var(
227
+ --oscd-shell-editor-plugins-panel-item-icon-size,
228
+ 28px
229
+ );
230
+ --editor-plugins-panel-item-text-color: var(
231
+ --oscd-shell-editor-plugins-panel-item-text-color,
232
+ var(--oscd-base3)
233
+ );
234
+ --editor-plugins-panel-item-icon-color: var(
235
+ --oscd-shell-editor-plugins-panel-item-icon-color,
236
+ var(--oscd-base3)
237
+ );
238
+ --editor-plugins-panel-item-active-bg: var(
239
+ --oscd-shell-editor-plugins-panel-item-active-bg,
240
+ var(--oscd-primary)
241
+ );
242
+ --side-panel-width: var(--editor-plugins-panel-width);
243
+
244
+ /* Main editor container */
245
+ --editor-background-color: var(
246
+ --oscd-shell-editor-background-color,
247
+ var(--oscd-base3)
248
+ );
249
+ --editor-padding: var(--oscd-shell-editor-padding, 8px);
250
+
251
+ /* Landing page */
252
+ --landing-heading-color: var(
253
+ --oscd-shell-landing-heading-color,
254
+ var(--oscd-base3)
255
+ );
256
+ --landing-heading-font-family: var(
257
+ --oscd-shell-landing-heading-font-family,
258
+ var(--oscd-text-font)
259
+ );
260
+ --landing-heading-size: var(--oscd-shell-landing-heading-size, 50px);
261
+ --landing-heading-style: var(--oscd-shell-landing-heading-style, normal);
262
+ --landing-heading-weight: var(--oscd-shell-landing-heading-weight, 600);
263
+ --landing-heading-line-height: var(
264
+ --oscd-shell-landing-heading-line-height,
265
+ normal
266
+ );
267
+
268
+ --landing-subheading-color: var(
269
+ --oscd-shell-landing-subheading-color,
270
+ var(--oscd-base3)
271
+ );
272
+ --landing-subheading-font-family: var(
273
+ --oscd-shell-landing-subheading-font-family,
274
+ var(--oscd-text-font)
275
+ );
276
+ --landing-subheading-size: var(
277
+ --oscd-shell-landing-subheading-size,
278
+ 16.909px
279
+ );
280
+ --landing-subheading-style: var(
281
+ --oscd-shell-landing-subheading-style,
282
+ normal
283
+ );
284
+ --landing-subheading-weight: var(
285
+ --oscd-shell-landing-subheading-weight,
286
+ 400
287
+ );
288
+ --landing-subheading-line-height: var(
289
+ --oscd-shell-landing-subheading-line-height,
290
+ 65.194px
291
+ );
292
+ --landing-grid-width: var(--oscd-shell-landing-grid-width, 60%);
293
+ --landing-grid-gap: var(--oscd-shell-landing-grid-gap, 95px);
294
+ --landing-card-width: var(--oscd-shell-landing-card-width, 240px);
295
+ --landing-card-height: var(--oscd-shell-landing-card-height, 180px);
296
+ --landing-card-background: var(
297
+ --oscd-shell-landing-card-background,
298
+ var(--oscd-primary)
299
+ );
300
+ --landing-card-text-color: var(
301
+ --oscd-shell-landing-card-text-color,
302
+ var(--oscd-base3)
303
+ );
304
+ --landing-card-radius: var(--oscd-shell-landing-card-radius, 2px);
305
+ --landing-card-icon-size: var(--oscd-shell-landing-card-icon-size, 54px);
306
+ --landing-card-corner-accent: var(
307
+ --oscd-shell-landing-card-corner-accent,
308
+ var(--omicron-yellow)
309
+ );
310
+ }
311
+ `;
312
+ //# sourceMappingURL=oscd-shell-design-tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oscd-shell-design-tokens.js","sourceRoot":"","sources":["../src/oscd-shell-design-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2SvC,CAAC","sourcesContent":["import { css } from 'lit';\n\n/**\n * Single source of truth for oscd-shell design tokens.\n *\n * This block contains:\n * 1) Internal base tokens and fallbacks\n * 2) Public token -> internal token mappings\n *\n * Keep this as an all-or-nothing layer so mappings can safely reference\n * internal base tokens (e.g. --oscd-base*).\n */\nexport const oscdShellDesignTokens = css`\n /* Internal base theme tokens and defaults */\n * {\n --oscd-primary: var(--oscd-theme-primary, #0b335b);\n --oscd-secondary: var(--oscd-theme-secondary, #2485e5);\n --oscd-base03: var(--oscd-theme-base03, #121417);\n --oscd-base02: var(--oscd-theme-base02, #1a1e23);\n --oscd-base01: var(--oscd-theme-base01, #3d4651);\n --oscd-base00: var(--oscd-theme-base00, #46505d);\n --oscd-base0: var(--oscd-theme-base0, #8b97a7);\n --oscd-base1: var(--oscd-theme-base1, #96a1b0);\n --oscd-base2: var(--oscd-theme-base2, #f3f5f6);\n --oscd-base3: var(--oscd-theme-base3, white);\n --oscd-error: var(--oscd-theme-error, #dc322f);\n --oscd-warning: var(--oscd-theme-warning, #b58900);\n --oscd-text-font: var(--oscd-theme-text-font, 'Roboto');\n --oscd-text-font-mono: var(--oscd-theme-text-font-mono, 'Roboto Mono');\n --oscd-icon-font: var(--oscd-theme-icon-font, 'Material Symbols Outlined');\n\n /* Fallbacks for Material Design variables */\n --md-sys-color-primary: var(--oscd-primary);\n --md-sys-color-on-primary: var(--oscd-base3);\n --md-sys-color-secondary: var(--oscd-secondary);\n --md-sys-color-on-secondary: var(--oscd-base3);\n --md-sys-color-secondary-container: var(--oscd-base2);\n --md-sys-color-surface: var(--oscd-base3);\n --md-sys-color-on-surface: var(--oscd-base00);\n --md-sys-color-surface-variant: var(--oscd-base3);\n --md-sys-color-on-surface-variant: var(--oscd-base00);\n --md-sys-color-surface-bright: var(--oscd-base2);\n --md-sys-color-surface-container: var(--oscd-base3);\n --md-sys-color-surface-container-high: var(--oscd-base3);\n --md-sys-color-surface-container-highest: var(--oscd-base3);\n --md-sys-color-outline-variant: var(--oscd-primary);\n --md-sys-color-scrim: #000000;\n --md-sys-color-error: var(--oscd-error);\n --md-sys-color-on-error: var(--oscd-base3);\n --md-icon-button-disabled-icon-color: var(--oscd-base3);\n /* --md-menu-item-selected-label-text-color: var(--oscd-base01); */\n --md-icon-button-disabled-icon-color: var(--oscd-base3);\n\n /* MDC Theme Colors\n * Needed for supporting any pluggins still using the depricated MWC Components\n */\n --mdc-theme-primary: var(--oscd-primary);\n --mdc-theme-secondary: var(--oscd-secondary);\n --mdc-theme-background: var(--oscd-base3);\n --mdc-theme-surface: var(--oscd-base3);\n --mdc-theme-on-primary: var(--oscd-base2);\n --mdc-theme-on-secondary: var(--oscd-base2);\n --mdc-theme-on-background: var(--oscd-base00);\n --mdc-theme-on-surface: var(--oscd-base00);\n --mdc-theme-text-primary-on-background: var(--oscd-base01);\n --mdc-theme-text-secondary-on-background: var(--oscd-base00);\n --mdc-theme-text-icon-on-background: var(--oscd-base00);\n --mdc-theme-error: var(--oscd-error);\n --mdc-button-disabled-ink-color: var(--oscd-base1);\n --mdc-drawer-heading-ink-color: var(--oscd-base00);\n --mdc-dialog-heading-ink-color: var(--oscd-base00);\n --mdc-text-field-fill-color: var(--oscd-base2);\n --mdc-text-field-disabled-fill-color: var(--oscd-base3);\n --mdc-text-field-ink-color: var(--oscd-base00);\n --mdc-text-field-label-ink-color: var(--oscd-base00);\n --mdc-text-field-idle-line-color: var(--oscd-base00);\n --mdc-text-field-hover-line-color: var(--oscd-base02);\n --mdc-select-fill-color: var(--oscd-base2);\n --mdc-select-disabled-fill-color: var(--oscd-base3);\n --mdc-select-ink-color: var(--oscd-base00);\n --mdc-select-label-ink-color: var(--oscd-base00);\n --mdc-select-idle-line-color: var(--oscd-base00);\n --mdc-select-hover-line-color: var(--oscd-base02);\n --mdc-select-dropdown-icon-color: var(--oscd-base01);\n --mdc-typography-font-family: var(--oscd-text-font);\n --mdc-icon-font: var(--oscd-icon-font);\n --mdc-theme-text-disabled-on-light: rgba(255, 255, 255, 0.38);\n }\n\n * {\n --app-bar-height: 54px;\n --side-panel-width: 280px;\n\n --md-sys-color-primary: var(--oscd-primary);\n --md-sys-color-on-primary: var(--oscd-base3);\n\n --md-sys-color-secondary-container: var(--oscd-base2);\n\n --md-sys-color-surface: var(--oscd-base3);\n --md-sys-color-on-surface: var(--oscd-base00);\n }\n\n /*\n * Public token -> internal token mappings\n *\n * Example pattern:\n * --internal-variable-name: var(--oscd-shell-public-token, <default>);\n */\n * {\n /* App bar */\n --app-bar-color: var(--oscd-shell-app-bar-color, var(--oscd-base3));\n --app-bar-background-color: var(\n --oscd-shell-app-bar-background-color,\n var(--oscd-primary)\n );\n --app-bar-height: var(--oscd-shell-app-bar-height, 54px);\n --app-bar-small-height: var(--oscd-shell-app-bar-small-height, 48px);\n --app-bar-elevation: var(\n --oscd-shell-app-bar-elevation,\n var(--md-sys-elevation-level-2)\n );\n --app-bar-app-icon-height: var(--oscd-shell-app-bar-icon-height, 34.4px);\n --app-bar-app-icon-width: var(--oscd-shell-app-bar-icon-width, auto);\n --app-bar-title-text-font-family: var(\n --oscd-shell-app-bar-title-font-family,\n var(--oscd-text-font)\n );\n --app-bar-title-text-color: var(\n --oscd-shell-app-bar-title-color,\n var(--app-bar-color)\n );\n --app-bar-title-text-font-size: var(\n --oscd-shell-app-bar-title-font-size,\n 22.114px\n );\n --app-bar-title-text-font-weight: var(\n --oscd-shell-app-bar-title-font-weight,\n 400\n );\n --app-bar-title-text-font-style: var(\n --oscd-shell-app-bar-title-font-style,\n normal\n );\n --app-bar-title-text-line-height: var(\n --oscd-shell-app-bar-title-line-height,\n normal\n );\n --app-bar-title-text-letter-spacing: var(\n --oscd-shell-app-bar-title-letter-spacing,\n inherit\n );\n --app-bar-action-icon-size: var(\n --oscd-shell-app-bar-action-icon-size,\n 24px\n );\n --app-bar-action-icon-color: var(\n --oscd-shell-app-bar-action-icon-color,\n var(--md-sys-color-on-primary)\n );\n\n /* Bridge to oscd-ui app bar tokens */\n --oscd-app-bar-color: var(--app-bar-color);\n --oscd-app-bar-background-color: var(--app-bar-background-color);\n --oscd-app-bar-elevation: var(--app-bar-elevation);\n --oscd-app-bar-title-font-family: var(--app-bar-title-text-font-family);\n --oscd-app-bar-title-font-size: var(--app-bar-title-text-font-size);\n --oscd-app-bar-title-font-weight: var(--app-bar-title-text-font-weight);\n --oscd-app-bar-title-line-height: var(--app-bar-title-text-line-height);\n\n /* Files menu */\n --file-menu-text-font-family: var(\n --oscd-shell-file-menu-text-font-family,\n var(--oscd-text-font)\n );\n --file-menu-text-size: var(--oscd-shell-file-menu-text-size, 18px);\n --file-menu-text-weight: var(--oscd-shell-file-menu-text-weight, 500);\n --file-menu-text-color: var(\n --oscd-shell-file-menu-text-color,\n var(--oscd-base3)\n );\n\n /* Plugins menu */\n --plugins-menu-min-width: var(--oscd-shell-plugins-menu-min-width, 350px);\n --plugins-menu-padding: var(--oscd-shell-plugins-menu-padding, 12px);\n --plugins-menu-container-color: var(\n --oscd-shell-plugins-menu-container-color,\n var(--oscd-base3)\n );\n --plugins-menu-item-label-color: var(\n --oscd-shell-plugins-menu-item-label-color,\n var(--oscd-base00)\n );\n --plugins-menu-item-leading-icon-color: var(\n --oscd-shell-plugins-menu-item-leading-icon-color,\n var(--oscd-base00)\n );\n --plugins-menu-item-selected-container-color: var(\n --oscd-shell-plugins-menu-item-selected-container-color,\n var(--oscd-base2)\n );\n --plugins-menu-item-selected-label-color: var(\n --oscd-shell-plugins-menu-item-selected-label-color,\n var(--oscd-base00)\n );\n\n /* Editor plugins panel */\n --editor-plugins-panel-width: var(\n --oscd-shell-editor-plugins-panel-width,\n 280px\n );\n --editor-plugins-panel-collapsed-width: var(\n --oscd-shell-editor-plugins-panel-width,\n 280px\n );\n --editor-plugins-panel-padding-top: var(\n --oscd-shell-editor-plugins-panel-padding-top,\n 20px\n );\n --editor-plugins-panel-item-leading-space: var(\n --oscd-shell-editor-plugins-panel-item-leading-space,\n 22px\n );\n --editor-plugins-panel-item-trailing-space: var(\n --oscd-shell-editor-plugins-panel-item-trailing-space,\n 10px\n );\n --editor-plugins-panel-item-icon-size: var(\n --oscd-shell-editor-plugins-panel-item-icon-size,\n 28px\n );\n --editor-plugins-panel-item-text-color: var(\n --oscd-shell-editor-plugins-panel-item-text-color,\n var(--oscd-base3)\n );\n --editor-plugins-panel-item-icon-color: var(\n --oscd-shell-editor-plugins-panel-item-icon-color,\n var(--oscd-base3)\n );\n --editor-plugins-panel-item-active-bg: var(\n --oscd-shell-editor-plugins-panel-item-active-bg,\n var(--oscd-primary)\n );\n --side-panel-width: var(--editor-plugins-panel-width);\n\n /* Main editor container */\n --editor-background-color: var(\n --oscd-shell-editor-background-color,\n var(--oscd-base3)\n );\n --editor-padding: var(--oscd-shell-editor-padding, 8px);\n\n /* Landing page */\n --landing-heading-color: var(\n --oscd-shell-landing-heading-color,\n var(--oscd-base3)\n );\n --landing-heading-font-family: var(\n --oscd-shell-landing-heading-font-family,\n var(--oscd-text-font)\n );\n --landing-heading-size: var(--oscd-shell-landing-heading-size, 50px);\n --landing-heading-style: var(--oscd-shell-landing-heading-style, normal);\n --landing-heading-weight: var(--oscd-shell-landing-heading-weight, 600);\n --landing-heading-line-height: var(\n --oscd-shell-landing-heading-line-height,\n normal\n );\n\n --landing-subheading-color: var(\n --oscd-shell-landing-subheading-color,\n var(--oscd-base3)\n );\n --landing-subheading-font-family: var(\n --oscd-shell-landing-subheading-font-family,\n var(--oscd-text-font)\n );\n --landing-subheading-size: var(\n --oscd-shell-landing-subheading-size,\n 16.909px\n );\n --landing-subheading-style: var(\n --oscd-shell-landing-subheading-style,\n normal\n );\n --landing-subheading-weight: var(\n --oscd-shell-landing-subheading-weight,\n 400\n );\n --landing-subheading-line-height: var(\n --oscd-shell-landing-subheading-line-height,\n 65.194px\n );\n --landing-grid-width: var(--oscd-shell-landing-grid-width, 60%);\n --landing-grid-gap: var(--oscd-shell-landing-grid-gap, 95px);\n --landing-card-width: var(--oscd-shell-landing-card-width, 240px);\n --landing-card-height: var(--oscd-shell-landing-card-height, 180px);\n --landing-card-background: var(\n --oscd-shell-landing-card-background,\n var(--oscd-primary)\n );\n --landing-card-text-color: var(\n --oscd-shell-landing-card-text-color,\n var(--oscd-base3)\n );\n --landing-card-radius: var(--oscd-shell-landing-card-radius, 2px);\n --landing-card-icon-size: var(--oscd-shell-landing-card-icon-size, 54px);\n --landing-card-corner-accent: var(\n --oscd-shell-landing-card-corner-accent,\n var(--omicron-yellow)\n );\n }\n`;\n"]}
@@ -95,7 +95,7 @@ export declare class OscdShell extends OscdShell_base {
95
95
  renderOffScreenPlugins(): import("lit-html").TemplateResult<1>;
96
96
  renderDefaultLandingPage(): import("lit-html").TemplateResult<1>;
97
97
  render(): import("lit-html").TemplateResult<1>;
98
- static styles: import("lit").CSSResult;
98
+ static styles: import("lit").CSSResult[];
99
99
  }
100
100
  declare global {
101
101
  interface HTMLElementTagNameMap {
@@ -12,6 +12,7 @@ import { EditorPluginsPanel } from './side-panel/editor-plugins-panel.js';
12
12
  import { PluginsMenu } from './menus/plugins-menu.js';
13
13
  import { LandingPage } from './landing-page/landing-page.js';
14
14
  import { FilesMenu } from './menus/files-menu.js';
15
+ import { oscdShellDesignTokens } from './oscd-shell-design-tokens.js';
15
16
  import { OscdAppBar } from '@omicronenergy/oscd-ui/app-bar/OscdAppBar.js';
16
17
  import { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';
17
18
  let OscdShell = class OscdShell extends ScopedElementsMixin(LitElement) {
@@ -347,184 +348,83 @@ OscdShell.scopedElements = {
347
348
  'editor-plugins-panel': EditorPluginsPanel,
348
349
  'landing-page': LandingPage,
349
350
  };
350
- OscdShell.styles = css `
351
- /* Theme variables with default values */
352
- * {
353
- --oscd-primary: var(--oscd-theme-primary, #0b335b);
354
- --oscd-secondary: var(--oscd-theme-secondary, #2485e5);
355
- --oscd-base03: var(--oscd-theme-base03, #121417);
356
- --oscd-base02: var(--oscd-theme-base02, #1a1e23);
357
- --oscd-base01: var(--oscd-theme-base01, #3d4651);
358
- --oscd-base00: var(--oscd-theme-base00, #46505d);
359
- --oscd-base0: var(--oscd-theme-base0, #8b97a7);
360
- --oscd-base1: var(--oscd-theme-base1, #96a1b0);
361
- --oscd-base2: var(--oscd-theme-base2, #f3f5f6);
362
- --oscd-base3: var(--oscd-theme-base3, white);
363
- --oscd-error: var(--oscd-theme-error, #dc322f);
364
- --oscd-warning: var(--oscd-theme-warning, #b58900);
365
- --oscd-text-font: var(--oscd-theme-text-font, 'Roboto');
366
- --oscd-text-font-mono: var(--oscd-theme-text-font-mono, 'Roboto Mono');
367
- --oscd-icon-font: var(
368
- --oscd-theme-icon-font,
369
- 'Material Symbols Outlined'
370
- );
351
+ OscdShell.styles = [
352
+ oscdShellDesignTokens,
353
+ css `
354
+ :host {
355
+ height: 100%;
356
+ display: grid;
357
+ grid-template-rows: min-content 1fr;
358
+ grid-template-columns: 1fr;
359
+ grid-template-areas:
360
+ 'header'
361
+ 'main';
362
+ }
371
363
 
372
- /* Fallbacks for Material Design variables */
373
- --md-sys-color-primary: var(--oscd-primary);
374
- --md-sys-color-on-primary: var(--oscd-base3);
375
- --md-sys-color-secondary: var(--oscd-secondary);
376
- --md-sys-color-on-secondary: var(--oscd-base3);
377
- --md-sys-color-secondary-container: var(--oscd-base2);
378
- --md-sys-color-surface: var(--oscd-base3);
379
- --md-sys-color-on-surface: var(--oscd-base00);
380
- --md-sys-color-surface-variant: var(--oscd-base3);
381
- --md-sys-color-on-surface-variant: var(--oscd-base00);
382
- --md-sys-color-surface-bright: var(--oscd-base2);
383
- --md-sys-color-surface-container: var(--oscd-base3);
384
- --md-sys-color-surface-container-high: var(--oscd-base3);
385
- --md-sys-color-surface-container-highest: var(--oscd-base3);
386
- --md-sys-color-outline-variant: var(--oscd-primary);
387
- --md-sys-color-scrim: #000000;
388
- --md-sys-color-error: var(--oscd-error);
389
- --md-sys-color-on-error: var(--oscd-base3);
390
- --md-icon-button-disabled-icon-color: var(--oscd-base3);
391
- /* --md-menu-item-selected-label-text-color: var(--oscd-base01); */
392
- --md-icon-button-disabled-icon-color: var(--oscd-base3);
364
+ oscd-app-bar {
365
+ grid-area: header;
366
+ box-shadow: var(--md-sys-elevation-level-2);
367
+ z-index: 10;
368
+ }
393
369
 
394
- /* MDC Theme Colors
395
- * Needed for supporting any pluggins still using the depricated MWC Components
396
- */
397
- --mdc-theme-primary: var(--oscd-primary);
398
- --mdc-theme-secondary: var(--oscd-secondary);
399
- --mdc-theme-background: var(--oscd-base3);
400
- --mdc-theme-surface: var(--oscd-base3);
401
- --mdc-theme-on-primary: var(--oscd-base2);
402
- --mdc-theme-on-secondary: var(--oscd-base3);
403
- --mdc-theme-on-background: var(--oscd-base00);
404
- --mdc-theme-on-surface: var(--oscd-base00);
405
- --mdc-theme-text-primary-on-background: var(--oscd-base01);
406
- --mdc-theme-text-secondary-on-background: var(--oscd-base3);
407
- --mdc-theme-text-icon-on-background: var(--oscd-base3);
408
- --mdc-theme-error: var(--oscd-error);
409
- --mdc-button-disabled-ink-color: var(--oscd-base1);
410
- --mdc-drawer-heading-ink-color: var(--oscd-base00);
411
- --mdc-dialog-heading-ink-color: var(--oscd-base00);
412
- --mdc-text-field-fill-color: var(--oscd-base2);
413
- --mdc-text-field-ink-color: var(--oscd-base02);
414
- --mdc-text-field-label-ink-color: var(--oscd-base01);
415
- --mdc-text-field-idle-line-color: var(--oscd-base00);
416
- --mdc-text-field-hover-line-color: var(--oscd-base02);
417
- --mdc-select-fill-color: var(--oscd-base2);
418
- --mdc-select-ink-color: var(--oscd-base02);
419
- --mdc-select-label-ink-color: var(--oscd-base01);
420
- --mdc-select-idle-line-color: var(--oscd-base00);
421
- --mdc-select-hover-line-color: var(--oscd-base02);
422
- --mdc-select-dropdown-icon-color: var(--oscd-base01);
423
- --mdc-typography-font-family: var(--oscd-text-font);
424
- --mdc-icon-font: var(--oscd-icon-font);
425
- --mdc-theme-text-disabled-on-light: rgba(255, 255, 255, 0.38);
426
- }
427
-
428
- * {
429
- --app-bar-height: 54px;
430
- --side-panel-width: 280px;
431
-
432
- --md-sys-color-primary: var(--oscd-primary);
433
- --md-sys-color-on-primary: var(--oscd-base3);
434
-
435
- --md-sys-color-secondary-container: var(--oscd-base2);
436
-
437
- --md-sys-color-surface: var(--oscd-base3);
438
- --md-sys-color-on-surface: var(--oscd-base00);
439
- }
370
+ oscd-app-bar * {
371
+ --md-filled-icon-button-disabled-container-opacity: var(
372
+ --app-bar-action-icon-disabled-container-opacity,
373
+ 0
374
+ );
375
+ --md-filled-icon-button-disabled-icon-color: var(
376
+ --app-bar-action-icon-disabled-color,
377
+ var(--md-sys-color-on-primary)
378
+ );
379
+ --md-filled-icon-button-icon-size: var(--app-bar-action-icon-size);
380
+ --md-filled-icon-button-icon-color: var(--app-bar-action-icon-color);
381
+ }
440
382
 
441
- :host {
442
- height: 100%;
443
- display: grid;
444
- grid-template-rows: min-content 1fr;
445
- grid-template-columns: 1fr;
446
- grid-template-areas:
447
- 'header'
448
- 'main';
449
- }
383
+ main {
384
+ grid-area: main;
385
+ display: grid;
386
+ grid-template-columns: var(--side-panel-width) 1fr;
387
+ grid-template-areas: 'sidebar editor';
388
+ overflow: hidden;
389
+ }
450
390
 
451
- oscd-app-bar {
452
- grid-area: header;
453
- box-shadow: var(--md-sys-elevation-level-2);
454
- z-index: 10;
455
- }
391
+ /* Side panel collapsed state */
392
+ main.sidebar-collapsed {
393
+ grid-template-columns: 0 1fr;
394
+ }
456
395
 
457
- main {
458
- grid-area: main;
459
- display: grid;
460
- grid-template-columns: var(--side-panel-width) 1fr;
461
- grid-template-areas: 'sidebar editor';
462
- overflow: hidden;
463
- }
396
+ section.editors-side-panel-section {
397
+ grid-area: sidebar;
398
+ overflow-y: auto;
399
+ overflow-x: hidden;
400
+ transition: transform 0.3s ease-in-out;
401
+ }
464
402
 
465
- /* Side panel collapsed state */
466
- main.sidebar-collapsed {
467
- grid-template-columns: 0 1fr;
468
- }
403
+ /* Hide side panel when collapsed */
404
+ main.sidebar-collapsed section.editors-side-panel-section {
405
+ transform: translateX(-100%);
406
+ }
469
407
 
470
- section.editors-side-panel-section {
471
- grid-area: sidebar;
472
- overflow-y: auto;
473
- overflow-x: hidden;
474
- transition: transform 0.3s ease-in-out;
475
- }
408
+ section.editor-container {
409
+ grid-area: editor;
410
+ background-color: var(--editor-background-color);
411
+ padding: var(--editor-padding);
412
+ overflow: auto;
413
+ position: relative;
414
+ }
476
415
 
477
- /* Hide side panel when collapsed */
478
- main.sidebar-collapsed section.editors-side-panel-section {
479
- transform: translateX(-100%);
480
- }
481
-
482
- section.editor-container {
483
- grid-area: editor;
484
- background-color: var(--oscd-base3);
485
- padding: 8px;
486
- overflow: auto;
487
- position: relative;
488
- }
489
-
490
- .off-screen-plugin-container {
491
- position: absolute;
492
- top: 0;
493
- left: 0;
494
- width: 0;
495
- height: 0;
496
- overflow: hidden;
497
- margin: 0;
498
- padding: 0;
499
- }
500
-
501
- oscd-navigation-drawer-header {
502
- --md-list-item-supporting-text-color: var(--md-sys-color-on-surface);
503
- }
504
-
505
- oscd-app-bar * {
506
- --md-filled-icon-button-disabled-container-opacity: 0;
507
- --md-filled-icon-button-disabled-icon-color: var(
508
- --md-sys-color-on-primary
509
- );
510
- }
511
-
512
- .edit-dialog-remove-button {
513
- --md-text-button-icon-color: var(--oscd-error);
514
- --md-text-button-label-text-color: var(--oscd-error);
515
- --md-text-button-focus-label-text-color: var(--oscd-error);
516
- --md-text-button-focus-icon-color: var(--oscd-error);
517
- --md-text-button-hover-label-text-color: var(--oscd-error);
518
- --md-text-button-hover-state-layer-color: var(--oscd-error);
519
- --md-text-button-hover-icon-color: var(--oscd-error);
520
- --md-text-button-pressed-label-text-color: var(--oscd-error);
521
- --md-text-button-pressed-state-layer-color: var(--oscd-error);
522
- --md-text-button-pressed-icon-color: var(--oscd-error);
523
- }
524
- #title {
525
- position: relative;
526
- }
527
- `;
416
+ .off-screen-plugin-container {
417
+ position: absolute;
418
+ top: 0;
419
+ left: 0;
420
+ width: 0;
421
+ height: 0;
422
+ overflow: hidden;
423
+ margin: 0;
424
+ padding: 0;
425
+ }
426
+ `,
427
+ ];
528
428
  __decorate([
529
429
  property({ type: String })
530
430
  ], OscdShell.prototype, "appIcon", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"oscd-shell.js","sourceRoot":"","sources":["../src/oscd-shell.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,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;8CACgB;AAIxB;IAFC,KAAK,EAAE;IACR,+CAA+C;oCAG9C;AAID;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAC7B;AAMb;IADC,KAAK,EAAE;qCAGP;AAQD;IADC,KAAK,EAAE;6CACgB;AAGxB;IADC,KAAK,EAAE;6CAGP;AAGD;IADC,KAAK,EAAE;qCAGP;AAGD;IADC,KAAK,EAAE;4CAC+B;AAOvC;IADC,KAAK,CAAC,cAAc,CAAC;8CACI;AAG1B;IADC,KAAK,CAAC,sBAAsB,CAAC;qDACU;AAGhC;IADP,kBAAkB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;oDACO;AAnJzC,SAAS;IAFrB,SAAS,EAAE;IACX,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAgmBrB","sourcesContent":["import { css, html, LitElement, nothing } from 'lit';\nimport {\n customElement,\n property,\n query,\n queryAssignedNodes,\n state,\n} from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized, msg } from '@lit/localize';\nimport { html as staticHtml, unsafeStatic } from 'lit/static-html.js';\n\nimport { OscdFilledIconButton } from '@omicronenergy/oscd-ui/iconbutton/OscdFilledIconButton.js';\nimport { XMLEditor } from '@omicronenergy/oscd-editor';\nimport { EditEventV2, OpenEvent } from '@openscd/oscd-api';\n\nimport { loadSourcedPlugins } from './utils/plugin-utils.js';\nimport {\n getLocale,\n LocaleTag,\n setLocale,\n Translations,\n} from './localization.js';\nimport { EditorPluginsPanel } from './side-panel/editor-plugins-panel.js';\nimport { PluginsMenu } from './menus/plugins-menu.js';\nimport { LandingPage } from './landing-page/landing-page.js';\nimport { RenameEvent, CloseEvent } from './foundation/events.js';\nimport { FilesMenu } from './menus/files-menu.js';\nimport { OscdAppBar } from '@omicronenergy/oscd-ui/app-bar/OscdAppBar.js';\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\n\nexport type PluginEntry = {\n name: string;\n translations?: Translations;\n tagName: string;\n icon: string;\n requireDoc?: boolean;\n};\n\nexport type SourcedPluginEntry = {\n name: string;\n translations?: Translations;\n src: string;\n icon: string;\n requireDoc?: boolean;\n};\nexport type PluginSet<P = PluginEntry> = {\n menu: P[];\n editor: P[];\n background: P[];\n};\n\n@localized()\n@customElement('oscd-shell')\nexport class OscdShell extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-app-bar': OscdAppBar,\n 'oscd-filled-icon-button': OscdFilledIconButton,\n 'oscd-icon': OscdIcon,\n 'files-menu': FilesMenu,\n 'plugins-menu': PluginsMenu,\n 'editor-plugins-panel': EditorPluginsPanel,\n 'landing-page': LandingPage,\n };\n\n /*\n * Properties\n */\n\n /**\n * Url to the app icon displayed in the app bar\n */\n @property({ type: String })\n appIcon: string = '';\n\n @property({ type: String })\n appTitle: string = 'OpenSCD';\n\n @property({ type: String })\n landingPageHeading: string = 'Welcome to OpenSCD';\n\n @property({ type: String })\n landingPageSubHeading: string =\n 'Open Source IEC-61850-6 SCL Editing Platform';\n\n /** The file endings of editable files */\n @property({ type: Array, reflect: true }) editable = [\n 'cid',\n 'icd',\n 'iid',\n 'scd',\n 'sed',\n 'ssd',\n ];\n\n @property({ type: String, reflect: true })\n get locale() {\n return getLocale() as LocaleTag;\n }\n\n set locale(tag: LocaleTag) {\n try {\n if (tag) {\n setLocale(tag);\n }\n } catch {\n // don't change locale if tag is invalid\n }\n }\n\n _plugins: PluginSet = { menu: [], editor: [], background: [] };\n\n @property({ type: Object })\n get plugins(): PluginSet {\n return this._plugins;\n }\n\n set plugins(\n plugins: Partial<PluginSet<Partial<PluginEntry | SourcedPluginEntry>>>,\n ) {\n this._plugins = Object.entries(plugins).reduce(\n (acc, [pluginType, kind]) => {\n const convertedPlugins = loadSourcedPlugins(kind, this.registry!);\n acc[pluginType as keyof PluginSet] = convertedPlugins;\n return acc;\n },\n { menu: [], editor: [], background: [] } as PluginSet,\n );\n }\n\n /*\n * States\n */\n @state()\n get canRedo(): boolean {\n return this.xmlEditor.future.length >= 1;\n }\n\n @state()\n get canUndo(): boolean {\n return this.xmlEditor.past.length >= 1;\n }\n\n @state()\n get editor() {\n return this.plugins.editor[this.editorIndex]?.tagName ?? '';\n }\n\n @state()\n private editorIndex = 0;\n\n @state()\n /** The `XMLDocument` currently being edited */\n get doc(): XMLDocument {\n return this.docs[this.docName];\n }\n\n /** The name of the [[`doc`]] currently being edited */\n @property({ type: String, reflect: true })\n docName = '';\n\n /** The set of `XMLDocument`s currently loaded */\n private _docs: Record<string, XMLDocument> = {};\n\n @state()\n get docs(): Record<string, XMLDocument> {\n return this._docs;\n }\n\n set docs(newDocs: Record<string, XMLDocument>) {\n this._docs = newDocs;\n this.onDocsChanged();\n }\n\n @state()\n docVersion: number = -1;\n\n @state()\n get editableDocs(): string[] {\n return Object.keys(this.docs).filter(name => this.isEditable(name));\n }\n\n @state()\n get last(): number {\n return this.xmlEditor.past.length - 1;\n }\n\n @state()\n xmlEditor: XMLEditor = new XMLEditor();\n\n /*\n * All Queries\n */\n\n @query('plugins-menu')\n pluginsMenu!: PluginsMenu;\n\n @query('editor-plugins-panel')\n editorPluginsPanel!: EditorPluginsPanel;\n\n @queryAssignedNodes({ slot: 'landing-page' })\n private _landingPageNodes?: NodeListOf<HTMLElement>;\n\n /*\n * Constructor & life cycle methods\n */\n constructor() {\n super();\n // Catch all edits (from commits AND events) and trigger an update\n this.xmlEditor.subscribe(() => {\n this.docVersion += 1;\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n document.addEventListener('keydown', this.handleKeyPress);\n this.addEventListener('oscd-open', this.handleOpenDoc);\n this.addEventListener('oscd-rename', this.handleRenameDoc);\n this.addEventListener('oscd-close', this.handleCloseDoc);\n this.addEventListener('oscd-edit-v2', this.handleEditV2);\n this.addEventListener('oscd-undo', this.handleUndo);\n this.addEventListener('oscd-redo', this.handleRedo);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // Remove event listeners\n document.removeEventListener('keydown', this.handleKeyPress);\n this.removeEventListener('oscd-open', this.handleOpenDoc);\n this.removeEventListener('oscd-rename', this.handleRenameDoc);\n this.removeEventListener('oscd-edit-v2', this.handleEditV2);\n this.removeEventListener('oscd-undo', this.handleUndo);\n this.removeEventListener('oscd-redo', this.handleRedo);\n this.removeEventListener('oscd-close', this.handleCloseDoc);\n }\n\n /*\n * Event Handlers\n */\n\n handleOpenDoc = ({ detail: { docName, doc } }: OpenEvent) => {\n this.docs = {\n ...this.docs,\n [docName]: doc,\n };\n if (this.isEditable(docName)) {\n this.docName = docName;\n }\n this.requestUpdate();\n };\n\n handleRenameDoc = (customEvent: RenameEvent) => {\n const { oldName, newName } = customEvent.detail;\n if (!this.docs[oldName] || newName === oldName || this.docs[newName]) {\n return;\n }\n const doc = this.docs[oldName];\n delete this.docs[oldName];\n this.docs = {\n ...this.docs,\n [newName]: doc,\n };\n this.docName = newName;\n };\n\n handleEditV2 = (event: EditEventV2) => {\n const { edit, title, squash } = event.detail;\n this.xmlEditor.commit(edit, { title, squash });\n };\n\n handleCloseDoc = (event: CloseEvent) => {\n const docName = event.detail.docName as string;\n delete this.docs[docName];\n if (this.docName === docName) {\n this.docName = this.editableDocs[0] || '';\n }\n };\n\n handleUndo = () => {\n this.undo();\n };\n\n handleRedo = () => {\n this.redo();\n };\n\n private handleKeyPress = (e: KeyboardEvent) => {\n if (!e.ctrlKey) {\n return;\n }\n if (!Object.prototype.hasOwnProperty.call(this.hotkeys, e.key)) {\n return;\n }\n this.hotkeys[e.key]!.call(this);\n e.preventDefault();\n };\n\n handleOpenPluginMenu = () => {\n this.pluginsMenu.open();\n };\n\n /** Undo the last `n` [[Edit]]s committed */\n undo = (n = 1) => {\n if (!this.canUndo || n < 1) {\n return;\n }\n this.xmlEditor.undo();\n if (n > 1) {\n this.undo(n - 1);\n }\n this.requestUpdate();\n };\n\n /** Redo the last `n` [[Edit]]s that have been undone */\n redo = (n = 1) => {\n if (!this.canRedo || n < 1) {\n return;\n }\n this.xmlEditor.redo();\n if (n > 1) {\n this.redo(n - 1);\n }\n this.requestUpdate();\n };\n\n private hotkeys: Partial<Record<string, () => void>> = {\n m: this.handleOpenPluginMenu,\n z: this.undo,\n y: this.redo,\n Z: this.redo,\n };\n\n isEditable(docName: string): boolean {\n return !!this.editable.find(ext =>\n docName.toLowerCase().endsWith(`.${ext}`),\n );\n }\n\n onDocsChanged() {\n this.docVersion += 1;\n }\n\n renderPlugin(tagName: string) {\n const tag = unsafeStatic(tagName);\n return staticHtml`<${tag} \n .locale=\"${this.locale}\"\n .docName=\"${this.docName}\"\n .doc=${this.doc}\n .docs=${this.docs} \n .editCount=${this.docVersion}\n .docVersion=${this.docVersion}\n .editor=${this.xmlEditor}>\n </${tag}>`;\n }\n\n onMenuPluginSelect(customEvent: CustomEvent) {\n const plugin = customEvent.detail.plugin as PluginEntry;\n if (plugin.tagName) {\n this.shadowRoot!.querySelector<\n HTMLElement & { run: () => Promise<void> }\n >(plugin.tagName)!.run?.();\n }\n }\n\n renderOffScreenPlugins() {\n return html`\n <section class=\"off-screen-plugin-container\" aria-hidden=\"true\">\n <div class=\"menu-plugins\">\n ${this.plugins.menu\n .filter(plugin => !plugin.requireDoc || !!this.docName)\n .map(plugin => this.renderPlugin(plugin.tagName))}\n </div>\n <div class=\"background-plugins\">\n ${this.plugins.background\n .filter(plugin => !plugin.requireDoc || !!this.docName)\n .map(plugin => this.renderPlugin(plugin.tagName))}\n </div>\n </section>\n `;\n }\n\n renderDefaultLandingPage() {\n return html`\n <landing-page\n heading=${this.landingPageHeading}\n subHeading=${this.landingPageSubHeading}\n .menuPlugins=${this.plugins.menu.filter(\n plugin => !plugin.requireDoc || !!this.docName,\n )}\n .locale=${this.locale}\n @menu-plugin-select=${(event: CustomEvent) =>\n this.onMenuPluginSelect(event)}\n >\n </landing-page>\n `;\n }\n\n render() {\n const hasCustomLandingPage = !!this._landingPageNodes?.length;\n if (this.editableDocs.length === 0) {\n return html` <slot\n name=\"landing-page\"\n @slotchange=${() => this.requestUpdate()}\n ></slot>\n ${!hasCustomLandingPage ? this.renderDefaultLandingPage() : nothing}\n ${this.renderOffScreenPlugins()}`;\n }\n\n return html` <oscd-app-bar>\n <plugins-menu\n slot=\"alignStart\"\n appTitle=${this.appTitle}\n appIcon=${this.appIcon}\n .editableDocs=${this.editableDocs}\n .menuPlugins=${this.plugins.menu}\n .locale=${this.locale}\n @menu-plugin-select=${(event: CustomEvent) =>\n this.onMenuPluginSelect(event)}\n ></plugins-menu>\n\n <files-menu\n slot=\"alignMiddle\"\n .selectedDocName=${this.docName}\n .editableDocs=${this.editableDocs}\n .locale=${this.locale}\n @change=${(event: CustomEvent) => {\n const name = event.detail.name as string;\n this.docName = name;\n }}\n ></files-menu>\n\n <div slot=\"alignEnd\">\n <oscd-filled-icon-button\n aria-label=\"${msg('Undo')}\"\n ?disabled=${!this.canUndo}\n @click=${async () => {\n this.dispatchEvent(\n new CustomEvent('oscd-undo', {\n bubbles: true,\n composed: true,\n }),\n );\n }}\n ><oscd-icon>undo</oscd-icon></oscd-filled-icon-button\n >\n <oscd-filled-icon-button\n aria-label=\"${msg('Redo')}\"\n ?disabled=${!this.canRedo}\n @click=${async () => {\n this.dispatchEvent(\n new CustomEvent('oscd-redo', {\n bubbles: true,\n composed: true,\n }),\n );\n }}\n ><oscd-icon>redo</oscd-icon></oscd-filled-icon-button\n >\n </div>\n </oscd-app-bar>\n\n <main>\n <section class=\"editors-side-panel-section\">\n <editor-plugins-panel\n .editors=${this.plugins.editor}\n .editorIndex=${this.editorIndex}\n .locale=${this.locale}\n @editor-select=${(e: CustomEvent) => {\n this.editorIndex = e.detail.index;\n }}\n ></editor-plugins-panel>\n </section>\n\n <section class=\"editor-container\">\n ${this.editor ? this.renderPlugin(this.editor) : nothing}\n </section>\n\n ${this.renderOffScreenPlugins()}\n </main>`;\n }\n\n static styles = css`\n /* Theme variables with default values */\n * {\n --oscd-primary: var(--oscd-theme-primary, #0b335b);\n --oscd-secondary: var(--oscd-theme-secondary, #2485e5);\n --oscd-base03: var(--oscd-theme-base03, #121417);\n --oscd-base02: var(--oscd-theme-base02, #1a1e23);\n --oscd-base01: var(--oscd-theme-base01, #3d4651);\n --oscd-base00: var(--oscd-theme-base00, #46505d);\n --oscd-base0: var(--oscd-theme-base0, #8b97a7);\n --oscd-base1: var(--oscd-theme-base1, #96a1b0);\n --oscd-base2: var(--oscd-theme-base2, #f3f5f6);\n --oscd-base3: var(--oscd-theme-base3, white);\n --oscd-error: var(--oscd-theme-error, #dc322f);\n --oscd-warning: var(--oscd-theme-warning, #b58900);\n --oscd-text-font: var(--oscd-theme-text-font, 'Roboto');\n --oscd-text-font-mono: var(--oscd-theme-text-font-mono, 'Roboto Mono');\n --oscd-icon-font: var(\n --oscd-theme-icon-font,\n 'Material Symbols Outlined'\n );\n\n /* Fallbacks for Material Design variables */\n --md-sys-color-primary: var(--oscd-primary);\n --md-sys-color-on-primary: var(--oscd-base3);\n --md-sys-color-secondary: var(--oscd-secondary);\n --md-sys-color-on-secondary: var(--oscd-base3);\n --md-sys-color-secondary-container: var(--oscd-base2);\n --md-sys-color-surface: var(--oscd-base3);\n --md-sys-color-on-surface: var(--oscd-base00);\n --md-sys-color-surface-variant: var(--oscd-base3);\n --md-sys-color-on-surface-variant: var(--oscd-base00);\n --md-sys-color-surface-bright: var(--oscd-base2);\n --md-sys-color-surface-container: var(--oscd-base3);\n --md-sys-color-surface-container-high: var(--oscd-base3);\n --md-sys-color-surface-container-highest: var(--oscd-base3);\n --md-sys-color-outline-variant: var(--oscd-primary);\n --md-sys-color-scrim: #000000;\n --md-sys-color-error: var(--oscd-error);\n --md-sys-color-on-error: var(--oscd-base3);\n --md-icon-button-disabled-icon-color: var(--oscd-base3);\n /* --md-menu-item-selected-label-text-color: var(--oscd-base01); */\n --md-icon-button-disabled-icon-color: var(--oscd-base3);\n\n /* MDC Theme Colors \n * Needed for supporting any pluggins still using the depricated MWC Components\n */\n --mdc-theme-primary: var(--oscd-primary);\n --mdc-theme-secondary: var(--oscd-secondary);\n --mdc-theme-background: var(--oscd-base3);\n --mdc-theme-surface: var(--oscd-base3);\n --mdc-theme-on-primary: var(--oscd-base2);\n --mdc-theme-on-secondary: var(--oscd-base3);\n --mdc-theme-on-background: var(--oscd-base00);\n --mdc-theme-on-surface: var(--oscd-base00);\n --mdc-theme-text-primary-on-background: var(--oscd-base01);\n --mdc-theme-text-secondary-on-background: var(--oscd-base3);\n --mdc-theme-text-icon-on-background: var(--oscd-base3);\n --mdc-theme-error: var(--oscd-error);\n --mdc-button-disabled-ink-color: var(--oscd-base1);\n --mdc-drawer-heading-ink-color: var(--oscd-base00);\n --mdc-dialog-heading-ink-color: var(--oscd-base00);\n --mdc-text-field-fill-color: var(--oscd-base2);\n --mdc-text-field-ink-color: var(--oscd-base02);\n --mdc-text-field-label-ink-color: var(--oscd-base01);\n --mdc-text-field-idle-line-color: var(--oscd-base00);\n --mdc-text-field-hover-line-color: var(--oscd-base02);\n --mdc-select-fill-color: var(--oscd-base2);\n --mdc-select-ink-color: var(--oscd-base02);\n --mdc-select-label-ink-color: var(--oscd-base01);\n --mdc-select-idle-line-color: var(--oscd-base00);\n --mdc-select-hover-line-color: var(--oscd-base02);\n --mdc-select-dropdown-icon-color: var(--oscd-base01);\n --mdc-typography-font-family: var(--oscd-text-font);\n --mdc-icon-font: var(--oscd-icon-font);\n --mdc-theme-text-disabled-on-light: rgba(255, 255, 255, 0.38);\n }\n\n * {\n --app-bar-height: 54px;\n --side-panel-width: 280px;\n\n --md-sys-color-primary: var(--oscd-primary);\n --md-sys-color-on-primary: var(--oscd-base3);\n\n --md-sys-color-secondary-container: var(--oscd-base2);\n\n --md-sys-color-surface: var(--oscd-base3);\n --md-sys-color-on-surface: var(--oscd-base00);\n }\n\n :host {\n height: 100%;\n display: grid;\n grid-template-rows: min-content 1fr;\n grid-template-columns: 1fr;\n grid-template-areas:\n 'header'\n 'main';\n }\n\n oscd-app-bar {\n grid-area: header;\n box-shadow: var(--md-sys-elevation-level-2);\n z-index: 10;\n }\n\n main {\n grid-area: main;\n display: grid;\n grid-template-columns: var(--side-panel-width) 1fr;\n grid-template-areas: 'sidebar editor';\n overflow: hidden;\n }\n\n /* Side panel collapsed state */\n main.sidebar-collapsed {\n grid-template-columns: 0 1fr;\n }\n\n section.editors-side-panel-section {\n grid-area: sidebar;\n overflow-y: auto;\n overflow-x: hidden;\n transition: transform 0.3s ease-in-out;\n }\n\n /* Hide side panel when collapsed */\n main.sidebar-collapsed section.editors-side-panel-section {\n transform: translateX(-100%);\n }\n\n section.editor-container {\n grid-area: editor;\n background-color: var(--oscd-base3);\n padding: 8px;\n overflow: auto;\n position: relative;\n }\n\n .off-screen-plugin-container {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n overflow: hidden;\n margin: 0;\n padding: 0;\n }\n\n oscd-navigation-drawer-header {\n --md-list-item-supporting-text-color: var(--md-sys-color-on-surface);\n }\n\n oscd-app-bar * {\n --md-filled-icon-button-disabled-container-opacity: 0;\n --md-filled-icon-button-disabled-icon-color: var(\n --md-sys-color-on-primary\n );\n }\n\n .edit-dialog-remove-button {\n --md-text-button-icon-color: var(--oscd-error);\n --md-text-button-label-text-color: var(--oscd-error);\n --md-text-button-focus-label-text-color: var(--oscd-error);\n --md-text-button-focus-icon-color: var(--oscd-error);\n --md-text-button-hover-label-text-color: var(--oscd-error);\n --md-text-button-hover-state-layer-color: var(--oscd-error);\n --md-text-button-hover-icon-color: var(--oscd-error);\n --md-text-button-pressed-label-text-color: var(--oscd-error);\n --md-text-button-pressed-state-layer-color: var(--oscd-error);\n --md-text-button-pressed-icon-color: var(--oscd-error);\n }\n #title {\n position: relative;\n }\n `;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-shell': OscdShell;\n }\n}\n"]}
1
+ {"version":3,"file":"oscd-shell.js","sourceRoot":"","sources":["../src/oscd-shell.ts"],"names":[],"mappings":";AAAA,OAAO,E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AFC,KAAK,EAAE;IACR,+CAA+C;oCAG9C;AAID;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAC7B;AAMb;IADC,KAAK,EAAE;qCAGP;AAQD;IADC,KAAK,EAAE;6CACgB;AAGxB;IADC,KAAK,EAAE;6CAGP;AAGD;IADC,KAAK,EAAE;qCAGP;AAGD;IADC,KAAK,EAAE;4CAC+B;AAOvC;IADC,KAAK,CAAC,cAAc,CAAC;8CACI;AAG1B;IADC,KAAK,CAAC,sBAAsB,CAAC;qDACU;AAGhC;IADP,kBAAkB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;oDACO;AAnJzC,SAAS;IAFrB,SAAS,EAAE;IACX,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA2frB","sourcesContent":["import { css, html, LitElement, nothing } from 'lit';\nimport {\n customElement,\n property,\n query,\n queryAssignedNodes,\n state,\n} from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized, msg } from '@lit/localize';\nimport { html as staticHtml, unsafeStatic } from 'lit/static-html.js';\n\nimport { OscdFilledIconButton } from '@omicronenergy/oscd-ui/iconbutton/OscdFilledIconButton.js';\nimport { XMLEditor } from '@omicronenergy/oscd-editor';\nimport { EditEventV2, OpenEvent } from '@openscd/oscd-api';\n\nimport { loadSourcedPlugins } from './utils/plugin-utils.js';\nimport {\n getLocale,\n LocaleTag,\n setLocale,\n Translations,\n} from './localization.js';\nimport { EditorPluginsPanel } from './side-panel/editor-plugins-panel.js';\nimport { PluginsMenu } from './menus/plugins-menu.js';\nimport { LandingPage } from './landing-page/landing-page.js';\nimport { RenameEvent, CloseEvent } from './foundation/events.js';\nimport { FilesMenu } from './menus/files-menu.js';\nimport { oscdShellDesignTokens } from './oscd-shell-design-tokens.js';\nimport { OscdAppBar } from '@omicronenergy/oscd-ui/app-bar/OscdAppBar.js';\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\n\nexport type PluginEntry = {\n name: string;\n translations?: Translations;\n tagName: string;\n icon: string;\n requireDoc?: boolean;\n};\n\nexport type SourcedPluginEntry = {\n name: string;\n translations?: Translations;\n src: string;\n icon: string;\n requireDoc?: boolean;\n};\nexport type PluginSet<P = PluginEntry> = {\n menu: P[];\n editor: P[];\n background: P[];\n};\n\n@localized()\n@customElement('oscd-shell')\nexport class OscdShell extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-app-bar': OscdAppBar,\n 'oscd-filled-icon-button': OscdFilledIconButton,\n 'oscd-icon': OscdIcon,\n 'files-menu': FilesMenu,\n 'plugins-menu': PluginsMenu,\n 'editor-plugins-panel': EditorPluginsPanel,\n 'landing-page': LandingPage,\n };\n\n /*\n * Properties\n */\n\n /**\n * Url to the app icon displayed in the app bar\n */\n @property({ type: String })\n appIcon: string = '';\n\n @property({ type: String })\n appTitle: string = 'OpenSCD';\n\n @property({ type: String })\n landingPageHeading: string = 'Welcome to OpenSCD';\n\n @property({ type: String })\n landingPageSubHeading: string =\n 'Open Source IEC-61850-6 SCL Editing Platform';\n\n /** The file endings of editable files */\n @property({ type: Array, reflect: true }) editable = [\n 'cid',\n 'icd',\n 'iid',\n 'scd',\n 'sed',\n 'ssd',\n ];\n\n @property({ type: String, reflect: true })\n get locale() {\n return getLocale() as LocaleTag;\n }\n\n set locale(tag: LocaleTag) {\n try {\n if (tag) {\n setLocale(tag);\n }\n } catch {\n // don't change locale if tag is invalid\n }\n }\n\n _plugins: PluginSet = { menu: [], editor: [], background: [] };\n\n @property({ type: Object })\n get plugins(): PluginSet {\n return this._plugins;\n }\n\n set plugins(\n plugins: Partial<PluginSet<Partial<PluginEntry | SourcedPluginEntry>>>,\n ) {\n this._plugins = Object.entries(plugins).reduce(\n (acc, [pluginType, kind]) => {\n const convertedPlugins = loadSourcedPlugins(kind, this.registry!);\n acc[pluginType as keyof PluginSet] = convertedPlugins;\n return acc;\n },\n { menu: [], editor: [], background: [] } as PluginSet,\n );\n }\n\n /*\n * States\n */\n @state()\n get canRedo(): boolean {\n return this.xmlEditor.future.length >= 1;\n }\n\n @state()\n get canUndo(): boolean {\n return this.xmlEditor.past.length >= 1;\n }\n\n @state()\n get editor() {\n return this.plugins.editor[this.editorIndex]?.tagName ?? '';\n }\n\n @state()\n private editorIndex = 0;\n\n @state()\n /** The `XMLDocument` currently being edited */\n get doc(): XMLDocument {\n return this.docs[this.docName];\n }\n\n /** The name of the [[`doc`]] currently being edited */\n @property({ type: String, reflect: true })\n docName = '';\n\n /** The set of `XMLDocument`s currently loaded */\n private _docs: Record<string, XMLDocument> = {};\n\n @state()\n get docs(): Record<string, XMLDocument> {\n return this._docs;\n }\n\n set docs(newDocs: Record<string, XMLDocument>) {\n this._docs = newDocs;\n this.onDocsChanged();\n }\n\n @state()\n docVersion: number = -1;\n\n @state()\n get editableDocs(): string[] {\n return Object.keys(this.docs).filter(name => this.isEditable(name));\n }\n\n @state()\n get last(): number {\n return this.xmlEditor.past.length - 1;\n }\n\n @state()\n xmlEditor: XMLEditor = new XMLEditor();\n\n /*\n * All Queries\n */\n\n @query('plugins-menu')\n pluginsMenu!: PluginsMenu;\n\n @query('editor-plugins-panel')\n editorPluginsPanel!: EditorPluginsPanel;\n\n @queryAssignedNodes({ slot: 'landing-page' })\n private _landingPageNodes?: NodeListOf<HTMLElement>;\n\n /*\n * Constructor & life cycle methods\n */\n constructor() {\n super();\n // Catch all edits (from commits AND events) and trigger an update\n this.xmlEditor.subscribe(() => {\n this.docVersion += 1;\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n document.addEventListener('keydown', this.handleKeyPress);\n this.addEventListener('oscd-open', this.handleOpenDoc);\n this.addEventListener('oscd-rename', this.handleRenameDoc);\n this.addEventListener('oscd-close', this.handleCloseDoc);\n this.addEventListener('oscd-edit-v2', this.handleEditV2);\n this.addEventListener('oscd-undo', this.handleUndo);\n this.addEventListener('oscd-redo', this.handleRedo);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // Remove event listeners\n document.removeEventListener('keydown', this.handleKeyPress);\n this.removeEventListener('oscd-open', this.handleOpenDoc);\n this.removeEventListener('oscd-rename', this.handleRenameDoc);\n this.removeEventListener('oscd-edit-v2', this.handleEditV2);\n this.removeEventListener('oscd-undo', this.handleUndo);\n this.removeEventListener('oscd-redo', this.handleRedo);\n this.removeEventListener('oscd-close', this.handleCloseDoc);\n }\n\n /*\n * Event Handlers\n */\n\n handleOpenDoc = ({ detail: { docName, doc } }: OpenEvent) => {\n this.docs = {\n ...this.docs,\n [docName]: doc,\n };\n if (this.isEditable(docName)) {\n this.docName = docName;\n }\n this.requestUpdate();\n };\n\n handleRenameDoc = (customEvent: RenameEvent) => {\n const { oldName, newName } = customEvent.detail;\n if (!this.docs[oldName] || newName === oldName || this.docs[newName]) {\n return;\n }\n const doc = this.docs[oldName];\n delete this.docs[oldName];\n this.docs = {\n ...this.docs,\n [newName]: doc,\n };\n this.docName = newName;\n };\n\n handleEditV2 = (event: EditEventV2) => {\n const { edit, title, squash } = event.detail;\n this.xmlEditor.commit(edit, { title, squash });\n };\n\n handleCloseDoc = (event: CloseEvent) => {\n const docName = event.detail.docName as string;\n delete this.docs[docName];\n if (this.docName === docName) {\n this.docName = this.editableDocs[0] || '';\n }\n };\n\n handleUndo = () => {\n this.undo();\n };\n\n handleRedo = () => {\n this.redo();\n };\n\n private handleKeyPress = (e: KeyboardEvent) => {\n if (!e.ctrlKey) {\n return;\n }\n if (!Object.prototype.hasOwnProperty.call(this.hotkeys, e.key)) {\n return;\n }\n this.hotkeys[e.key]!.call(this);\n e.preventDefault();\n };\n\n handleOpenPluginMenu = () => {\n this.pluginsMenu.open();\n };\n\n /** Undo the last `n` [[Edit]]s committed */\n undo = (n = 1) => {\n if (!this.canUndo || n < 1) {\n return;\n }\n this.xmlEditor.undo();\n if (n > 1) {\n this.undo(n - 1);\n }\n this.requestUpdate();\n };\n\n /** Redo the last `n` [[Edit]]s that have been undone */\n redo = (n = 1) => {\n if (!this.canRedo || n < 1) {\n return;\n }\n this.xmlEditor.redo();\n if (n > 1) {\n this.redo(n - 1);\n }\n this.requestUpdate();\n };\n\n private hotkeys: Partial<Record<string, () => void>> = {\n m: this.handleOpenPluginMenu,\n z: this.undo,\n y: this.redo,\n Z: this.redo,\n };\n\n isEditable(docName: string): boolean {\n return !!this.editable.find(ext =>\n docName.toLowerCase().endsWith(`.${ext}`),\n );\n }\n\n onDocsChanged() {\n this.docVersion += 1;\n }\n\n renderPlugin(tagName: string) {\n const tag = unsafeStatic(tagName);\n return staticHtml`<${tag} \n .locale=\"${this.locale}\"\n .docName=\"${this.docName}\"\n .doc=${this.doc}\n .docs=${this.docs} \n .editCount=${this.docVersion}\n .docVersion=${this.docVersion}\n .editor=${this.xmlEditor}>\n </${tag}>`;\n }\n\n onMenuPluginSelect(customEvent: CustomEvent) {\n const plugin = customEvent.detail.plugin as PluginEntry;\n if (plugin.tagName) {\n this.shadowRoot!.querySelector<\n HTMLElement & { run: () => Promise<void> }\n >(plugin.tagName)!.run?.();\n }\n }\n\n renderOffScreenPlugins() {\n return html`\n <section class=\"off-screen-plugin-container\" aria-hidden=\"true\">\n <div class=\"menu-plugins\">\n ${this.plugins.menu\n .filter(plugin => !plugin.requireDoc || !!this.docName)\n .map(plugin => this.renderPlugin(plugin.tagName))}\n </div>\n <div class=\"background-plugins\">\n ${this.plugins.background\n .filter(plugin => !plugin.requireDoc || !!this.docName)\n .map(plugin => this.renderPlugin(plugin.tagName))}\n </div>\n </section>\n `;\n }\n\n renderDefaultLandingPage() {\n return html`\n <landing-page\n heading=${this.landingPageHeading}\n subHeading=${this.landingPageSubHeading}\n .menuPlugins=${this.plugins.menu.filter(\n plugin => !plugin.requireDoc || !!this.docName,\n )}\n .locale=${this.locale}\n @menu-plugin-select=${(event: CustomEvent) =>\n this.onMenuPluginSelect(event)}\n >\n </landing-page>\n `;\n }\n\n render() {\n const hasCustomLandingPage = !!this._landingPageNodes?.length;\n if (this.editableDocs.length === 0) {\n return html` <slot\n name=\"landing-page\"\n @slotchange=${() => this.requestUpdate()}\n ></slot>\n ${!hasCustomLandingPage ? this.renderDefaultLandingPage() : nothing}\n ${this.renderOffScreenPlugins()}`;\n }\n\n return html` <oscd-app-bar>\n <plugins-menu\n slot=\"alignStart\"\n appTitle=${this.appTitle}\n appIcon=${this.appIcon}\n .editableDocs=${this.editableDocs}\n .menuPlugins=${this.plugins.menu}\n .locale=${this.locale}\n @menu-plugin-select=${(event: CustomEvent) =>\n this.onMenuPluginSelect(event)}\n ></plugins-menu>\n\n <files-menu\n slot=\"alignMiddle\"\n .selectedDocName=${this.docName}\n .editableDocs=${this.editableDocs}\n .locale=${this.locale}\n @change=${(event: CustomEvent) => {\n const name = event.detail.name as string;\n this.docName = name;\n }}\n ></files-menu>\n\n <div slot=\"alignEnd\">\n <oscd-filled-icon-button\n aria-label=\"${msg('Undo')}\"\n ?disabled=${!this.canUndo}\n @click=${async () => {\n this.dispatchEvent(\n new CustomEvent('oscd-undo', {\n bubbles: true,\n composed: true,\n }),\n );\n }}\n ><oscd-icon>undo</oscd-icon></oscd-filled-icon-button\n >\n <oscd-filled-icon-button\n aria-label=\"${msg('Redo')}\"\n ?disabled=${!this.canRedo}\n @click=${async () => {\n this.dispatchEvent(\n new CustomEvent('oscd-redo', {\n bubbles: true,\n composed: true,\n }),\n );\n }}\n ><oscd-icon>redo</oscd-icon></oscd-filled-icon-button\n >\n </div>\n </oscd-app-bar>\n\n <main>\n <section class=\"editors-side-panel-section\">\n <editor-plugins-panel\n .editors=${this.plugins.editor}\n .editorIndex=${this.editorIndex}\n .locale=${this.locale}\n @editor-select=${(e: CustomEvent) => {\n this.editorIndex = e.detail.index;\n }}\n ></editor-plugins-panel>\n </section>\n\n <section class=\"editor-container\">\n ${this.editor ? this.renderPlugin(this.editor) : nothing}\n </section>\n\n ${this.renderOffScreenPlugins()}\n </main>`;\n }\n\n static styles = [\n oscdShellDesignTokens,\n css`\n :host {\n height: 100%;\n display: grid;\n grid-template-rows: min-content 1fr;\n grid-template-columns: 1fr;\n grid-template-areas:\n 'header'\n 'main';\n }\n\n oscd-app-bar {\n grid-area: header;\n box-shadow: var(--md-sys-elevation-level-2);\n z-index: 10;\n }\n\n oscd-app-bar * {\n --md-filled-icon-button-disabled-container-opacity: var(\n --app-bar-action-icon-disabled-container-opacity,\n 0\n );\n --md-filled-icon-button-disabled-icon-color: var(\n --app-bar-action-icon-disabled-color,\n var(--md-sys-color-on-primary)\n );\n --md-filled-icon-button-icon-size: var(--app-bar-action-icon-size);\n --md-filled-icon-button-icon-color: var(--app-bar-action-icon-color);\n }\n\n main {\n grid-area: main;\n display: grid;\n grid-template-columns: var(--side-panel-width) 1fr;\n grid-template-areas: 'sidebar editor';\n overflow: hidden;\n }\n\n /* Side panel collapsed state */\n main.sidebar-collapsed {\n grid-template-columns: 0 1fr;\n }\n\n section.editors-side-panel-section {\n grid-area: sidebar;\n overflow-y: auto;\n overflow-x: hidden;\n transition: transform 0.3s ease-in-out;\n }\n\n /* Hide side panel when collapsed */\n main.sidebar-collapsed section.editors-side-panel-section {\n transform: translateX(-100%);\n }\n\n section.editor-container {\n grid-area: editor;\n background-color: var(--editor-background-color);\n padding: var(--editor-padding);\n overflow: auto;\n position: relative;\n }\n\n .off-screen-plugin-container {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n overflow: hidden;\n margin: 0;\n padding: 0;\n }\n `,\n ];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-shell': OscdShell;\n }\n}\n"]}
@@ -71,12 +71,12 @@ EditorPluginsPanel.scopedElements = {
71
71
  };
72
72
  EditorPluginsPanel.styles = css `
73
73
  :host {
74
- width: 76px;
75
- height: calc(100% - 20px);
74
+ width: var(--editor-plugins-panel-width);
75
+ height: calc(100% - var(--editor-plugins-panel-padding-top));
76
76
  display: grid;
77
77
  grid-template-rows: 1fr auto;
78
78
  min-height: 0;
79
- padding-top: 20px;
79
+ padding-top: var(--editor-plugins-panel-padding-top);
80
80
  transition: width 0.1s ease-in-out;
81
81
  overflow-y: auto;
82
82
  overflow-x: hidden;
@@ -84,16 +84,24 @@ EditorPluginsPanel.styles = css `
84
84
 
85
85
  .editors-list {
86
86
  min-height: 0;
87
- --md-list-item-leading-space: 22px;
88
- --md-list-item-trailing-space: 10px;
89
- --md-icon-size: 28px;
87
+ --md-list-item-leading-space: var(
88
+ --editor-plugins-panel-item-leading-space
89
+ );
90
+ --md-list-item-trailing-space: var(
91
+ --editor-plugins-panel-item-trailing-space
92
+ );
93
+ --md-icon-size: var(--editor-plugins-panel-item-icon-size);
90
94
  --md-list-container-color: rgba(0, 0, 0, 0);
91
- --md-list-item-label-text-color: var(--oscd-base3);
92
- --md-list-item-leading-icon-color: var(--oscd-base3);
95
+ --md-list-item-label-text-color: var(
96
+ --editor-plugins-panel-item-text-color
97
+ );
98
+ --md-list-item-leading-icon-color: var(
99
+ --editor-plugins-panel-item-icon-color
100
+ );
93
101
  }
94
102
 
95
103
  .editors-list .active {
96
- background-color: var(--oscd-primary);
104
+ background-color: var(--editor-plugins-panel-item-active-bg);
97
105
  }
98
106
 
99
107
  .editors-list oscd-list-item span {
@@ -110,20 +118,28 @@ EditorPluginsPanel.styles = css `
110
118
  }
111
119
 
112
120
  .toggle-button {
113
- --md-icon-color: var(--oscd-base3);
114
- --md-icon-button-icon-size: 32px;
115
- --md-icon-button-hover-state-layer-color: var(--oscd-base3);
121
+ --md-icon-color: var(--editor-plugins-panel-item-icon-color);
122
+ --md-icon-button-icon-size: var(--editor-plugins-panel-item-icon-size);
123
+ --md-icon-button-hover-state-layer-color: var(
124
+ --editor-plugins-panel-item-icon-color
125
+ );
116
126
  --md-icon-button-hover-state-layer-opacity: 0.08;
117
- --md-icon-button-icon-color: var(--oscd-base3);
118
- --md-icon-button-hover-icon-color: var(--oscd-base3);
119
- --md-icon-button-focus-icon-color: var(--oscd-base3);
120
- --md-icon-button-pressed-icon-color: var(--oscd-base3);
127
+ --md-icon-button-icon-color: var(--editor-plugins-panel-item-icon-color);
128
+ --md-icon-button-hover-icon-color: var(
129
+ --editor-plugins-panel-item-icon-color
130
+ );
131
+ --md-icon-button-focus-icon-color: var(
132
+ --editor-plugins-panel-item-icon-color
133
+ );
134
+ --md-icon-button-pressed-icon-color: var(
135
+ --editor-plugins-panel-item-icon-color
136
+ );
121
137
  --md-icon-button-state-layer-height: 48px;
122
138
  --md-icon-button-state-layer-width: 48px;
123
139
  }
124
140
 
125
141
  :host([expanded]) {
126
- width: var(--side-panel-width, 240px);
142
+ width: var(--editor-plugins-panel-width);
127
143
  }
128
144
 
129
145
  /* :host([expanded]) .footer {
@@ -1 +1 @@
1
- {"version":3,"file":"editor-plugins-panel.js","sourceRoot":"","sources":["../../src/side-panel/editor-plugins-panel.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAG3E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAUhD,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,mBAAmB,CAAC,UAAU,CAAC;IAAhE;;QASL,YAAO,GAAkB,EAAE,CAAC;QAG5B,gBAAW,GAAG,CAAC,CAAC;IA4HlB,CAAC;IAvHC,kDAAkD;IAElD,IAAI,QAAQ;QACV,MAAM,WAA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Q;IACrB,gBAAgB,EAAE,YAAY;CAC/B,AALoB,CAKnB;AAmEK,yBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DlB,AA9DY,CA8DX;AA9HF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;mDACE;AAG5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDACX;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACR;AAInB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAI1C;AAtBU,kBAAkB;IAD9B,SAAS,EAAE;GACC,kBAAkB,CAwI9B","sourcesContent":["import { css, html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized } from '@lit/localize';\n\nimport { OscdIconButton } from '@omicronenergy/oscd-ui/iconbutton/OscdIconButton.js';\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdList } from '@omicronenergy/oscd-ui/list/OscdList.js';\nimport { OscdListItem } from '@omicronenergy/oscd-ui/list/OscdListItem.js';\n\nimport { LocaleTag, Translation } from '../localization.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { PluginEntry } from '../oscd-shell.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'editor-plugins-panel': EditorPluginsPanel;\n }\n}\n\n@localized()\nexport class EditorPluginsPanel extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-icon-button': OscdIconButton,\n 'oscd-icon': OscdIcon,\n 'oscd-list': OscdList,\n 'oscd-list-item': OscdListItem,\n };\n\n @property({ type: Array })\n editors: PluginEntry[] = [];\n\n @property({ type: Number })\n editorIndex = 0;\n\n @property({ type: String })\n locale!: LocaleTag;\n\n // eslint-disable-next-line class-methods-use-this\n @property({ type: Boolean, reflect: true })\n get expanded() {\n const expandedStr = localStorage.getItem('editorsPanel.expanded');\n return expandedStr === 'false' ? false : true;\n }\n // eslint-disable-next-line class-methods-use-this\n set expanded(expanded: boolean) {\n localStorage.setItem('editorsPanel.expanded', String(expanded));\n }\n\n render() {\n return html`\n <oscd-list class=\"editors-list\" role=\"tablist\">\n ${this.editors.map(\n (editor, index) =>\n html`<oscd-list-item\n class=${classMap({ active: this.editorIndex === index })}\n type=\"button\"\n @click=${() => {\n this.dispatchEvent(\n new CustomEvent('editor-select', {\n detail: { editor, index },\n bubbles: true,\n composed: true,\n }),\n );\n }}\n >\n <oscd-icon slot=\"start\">${editor.icon}</oscd-icon>\n ${this.expanded\n ? html`<span\n >${editor.translations?.[this.locale as Translation] ||\n editor.name}</span\n >`\n : nothing}\n </oscd-list-item>`,\n )}\n </oscd-list>\n <div class=\"footer\">\n <oscd-icon-button\n class=\"toggle-button\"\n @click=${() => {\n this.expanded = !this.expanded;\n }}\n >\n <oscd-icon\n >${this.expanded\n ? 'left_panel_close'\n : 'left_panel_open'}</oscd-icon\n ></oscd-icon-button\n >\n </div>\n `;\n }\n\n static styles = css`\n :host {\n width: 76px;\n height: calc(100% - 20px);\n display: grid;\n grid-template-rows: 1fr auto;\n min-height: 0;\n padding-top: 20px;\n transition: width 0.1s ease-in-out;\n overflow-y: auto;\n overflow-x: hidden;\n }\n\n .editors-list {\n min-height: 0;\n --md-list-item-leading-space: 22px;\n --md-list-item-trailing-space: 10px;\n --md-icon-size: 28px;\n --md-list-container-color: rgba(0, 0, 0, 0);\n --md-list-item-label-text-color: var(--oscd-base3);\n --md-list-item-leading-icon-color: var(--oscd-base3);\n }\n\n .editors-list .active {\n background-color: var(--oscd-primary);\n }\n\n .editors-list oscd-list-item span {\n /* prevents jitter when collapsing */\n white-space: nowrap;\n }\n\n .footer {\n /* setting this to display:none until re-design is fixed and its safe to remove */\n display: none;\n /* justify-self: center;\n justify-content: center;\n padding-block: 22px; */\n }\n\n .toggle-button {\n --md-icon-color: var(--oscd-base3);\n --md-icon-button-icon-size: 32px;\n --md-icon-button-hover-state-layer-color: var(--oscd-base3);\n --md-icon-button-hover-state-layer-opacity: 0.08;\n --md-icon-button-icon-color: var(--oscd-base3);\n --md-icon-button-hover-icon-color: var(--oscd-base3);\n --md-icon-button-focus-icon-color: var(--oscd-base3);\n --md-icon-button-pressed-icon-color: var(--oscd-base3);\n --md-icon-button-state-layer-height: 48px;\n --md-icon-button-state-layer-width: 48px;\n }\n\n :host([expanded]) {\n width: var(--side-panel-width, 240px);\n }\n\n /* :host([expanded]) .footer {\n justify-self: flex-end;\n justify-content: flex-end;\n padding-inline: 22px;\n } */\n `;\n}\n"]}
1
+ {"version":3,"file":"editor-plugins-panel.js","sourceRoot":"","sources":["../../src/side-panel/editor-plugins-panel.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAG3E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAUhD,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,mBAAmB,CAAC,UAAU,CAAC;IAAhE;;QASL,YAAO,GAAkB,EAAE,CAAC;QAG5B,gBAAW,GAAG,CAAC,CAAC;IA4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,EAAE,cAAc;IAClC,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,QAAQ;IACrB,gBAAgB,EAAE,YAAY;CAC/B,AALoB,CAKnB;AAmEK,yBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8ElB,AA9EY,CA8EX;AA9IF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;mDACE;AAG5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDACX;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACR;AAInB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAI1C;AAtBU,kBAAkB;IAD9B,SAAS,EAAE;GACC,kBAAkB,CAwJ9B","sourcesContent":["import { css, html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized } from '@lit/localize';\n\nimport { OscdIconButton } from '@omicronenergy/oscd-ui/iconbutton/OscdIconButton.js';\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdList } from '@omicronenergy/oscd-ui/list/OscdList.js';\nimport { OscdListItem } from '@omicronenergy/oscd-ui/list/OscdListItem.js';\n\nimport { LocaleTag, Translation } from '../localization.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { PluginEntry } from '../oscd-shell.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'editor-plugins-panel': EditorPluginsPanel;\n }\n}\n\n@localized()\nexport class EditorPluginsPanel extends ScopedElementsMixin(LitElement) {\n static scopedElements = {\n 'oscd-icon-button': OscdIconButton,\n 'oscd-icon': OscdIcon,\n 'oscd-list': OscdList,\n 'oscd-list-item': OscdListItem,\n };\n\n @property({ type: Array })\n editors: PluginEntry[] = [];\n\n @property({ type: Number })\n editorIndex = 0;\n\n @property({ type: String })\n locale!: LocaleTag;\n\n // eslint-disable-next-line class-methods-use-this\n @property({ type: Boolean, reflect: true })\n get expanded() {\n const expandedStr = localStorage.getItem('editorsPanel.expanded');\n return expandedStr === 'false' ? false : true;\n }\n // eslint-disable-next-line class-methods-use-this\n set expanded(expanded: boolean) {\n localStorage.setItem('editorsPanel.expanded', String(expanded));\n }\n\n render() {\n return html`\n <oscd-list class=\"editors-list\" role=\"tablist\">\n ${this.editors.map(\n (editor, index) =>\n html`<oscd-list-item\n class=${classMap({ active: this.editorIndex === index })}\n type=\"button\"\n @click=${() => {\n this.dispatchEvent(\n new CustomEvent('editor-select', {\n detail: { editor, index },\n bubbles: true,\n composed: true,\n }),\n );\n }}\n >\n <oscd-icon slot=\"start\">${editor.icon}</oscd-icon>\n ${this.expanded\n ? html`<span\n >${editor.translations?.[this.locale as Translation] ||\n editor.name}</span\n >`\n : nothing}\n </oscd-list-item>`,\n )}\n </oscd-list>\n <div class=\"footer\">\n <oscd-icon-button\n class=\"toggle-button\"\n @click=${() => {\n this.expanded = !this.expanded;\n }}\n >\n <oscd-icon\n >${this.expanded\n ? 'left_panel_close'\n : 'left_panel_open'}</oscd-icon\n ></oscd-icon-button\n >\n </div>\n `;\n }\n\n static styles = css`\n :host {\n width: var(--editor-plugins-panel-width);\n height: calc(100% - var(--editor-plugins-panel-padding-top));\n display: grid;\n grid-template-rows: 1fr auto;\n min-height: 0;\n padding-top: var(--editor-plugins-panel-padding-top);\n transition: width 0.1s ease-in-out;\n overflow-y: auto;\n overflow-x: hidden;\n }\n\n .editors-list {\n min-height: 0;\n --md-list-item-leading-space: var(\n --editor-plugins-panel-item-leading-space\n );\n --md-list-item-trailing-space: var(\n --editor-plugins-panel-item-trailing-space\n );\n --md-icon-size: var(--editor-plugins-panel-item-icon-size);\n --md-list-container-color: rgba(0, 0, 0, 0);\n --md-list-item-label-text-color: var(\n --editor-plugins-panel-item-text-color\n );\n --md-list-item-leading-icon-color: var(\n --editor-plugins-panel-item-icon-color\n );\n }\n\n .editors-list .active {\n background-color: var(--editor-plugins-panel-item-active-bg);\n }\n\n .editors-list oscd-list-item span {\n /* prevents jitter when collapsing */\n white-space: nowrap;\n }\n\n .footer {\n /* setting this to display:none until re-design is fixed and its safe to remove */\n display: none;\n /* justify-self: center;\n justify-content: center;\n padding-block: 22px; */\n }\n\n .toggle-button {\n --md-icon-color: var(--editor-plugins-panel-item-icon-color);\n --md-icon-button-icon-size: var(--editor-plugins-panel-item-icon-size);\n --md-icon-button-hover-state-layer-color: var(\n --editor-plugins-panel-item-icon-color\n );\n --md-icon-button-hover-state-layer-opacity: 0.08;\n --md-icon-button-icon-color: var(--editor-plugins-panel-item-icon-color);\n --md-icon-button-hover-icon-color: var(\n --editor-plugins-panel-item-icon-color\n );\n --md-icon-button-focus-icon-color: var(\n --editor-plugins-panel-item-icon-color\n );\n --md-icon-button-pressed-icon-color: var(\n --editor-plugins-panel-item-icon-color\n );\n --md-icon-button-state-layer-height: 48px;\n --md-icon-button-state-layer-width: 48px;\n }\n\n :host([expanded]) {\n width: var(--editor-plugins-panel-width);\n }\n\n /* :host([expanded]) .footer {\n justify-self: flex-end;\n justify-content: flex-end;\n padding-inline: 22px;\n } */\n `;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omicronenergy/oscd-shell",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "The shell component of OpenSCD, where plugins are loaded and the application is initialized.",
5
5
  "repository": {
6
6
  "type": "git",