@omicronenergy/oscd-shell 0.0.14 → 0.0.15
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.
|
@@ -33,6 +33,7 @@ export const oscdShellDesignTokens = css `
|
|
|
33
33
|
--oscd-base3: var(--oscd-theme-base3, #fdf6e3);
|
|
34
34
|
--oscd-error: var(--oscd-theme-error, #dc322f);
|
|
35
35
|
--oscd-warning: var(--oscd-theme-warning, #b58900);
|
|
36
|
+
--oscd-shape: var(--oscd-theme-shape, 8px);
|
|
36
37
|
--oscd-text-font: var(--oscd-theme-text-font, 'Roboto');
|
|
37
38
|
--oscd-text-font-mono: var(--oscd-theme-text-font-mono, 'Roboto Mono');
|
|
38
39
|
--oscd-icon-font: var(--oscd-theme-icon-font, 'Material Symbols Outlined');
|
|
@@ -57,6 +58,16 @@ export const oscdShellDesignTokens = css `
|
|
|
57
58
|
--md-sys-color-on-error: var(--oscd-base3);
|
|
58
59
|
--md-icon-button-disabled-icon-color: var(--oscd-base3);
|
|
59
60
|
|
|
61
|
+
/* Material shape scale, derived from --oscd-shape (the Material
|
|
62
|
+
* "small" corner size) per the ratios documented in oscd-api's
|
|
63
|
+
* theming.md: none=0, extra-small=0.5x, small=1x, medium=1.5x, large=2x.
|
|
64
|
+
*/
|
|
65
|
+
--md-sys-shape-corner-none: 0;
|
|
66
|
+
--md-sys-shape-corner-extra-small: calc(0.5 * var(--oscd-shape));
|
|
67
|
+
--md-sys-shape-corner-small: var(--oscd-shape);
|
|
68
|
+
--md-sys-shape-corner-medium: calc(1.5 * var(--oscd-shape));
|
|
69
|
+
--md-sys-shape-corner-large: calc(2 * var(--oscd-shape));
|
|
70
|
+
|
|
60
71
|
/* MD3 has no single generic "system font" token (unlike color); its
|
|
61
72
|
* closest reference-tier equivalent is --md-ref-typeface-plain. Icon
|
|
62
73
|
* fonts (--oscd-icon-font) and monospace fonts (--oscd-text-font-mono)
|
|
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmXvC,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 * Defaults are the Solarized (https://ethanschoonover.com/solarized/)\n * light palette used by the legacy OpenSCD shell, so oscd-shell is\n * brand-neutral out of the box: consumers who set none of the\n * --oscd-theme-* variables get the classic OpenSCD look. Distro-specific\n * branding (e.g. Omicron colors) is applied entirely by overriding the\n * --oscd-theme-* variables from outside; nothing brand-specific belongs\n * in this file.\n */\n :host {\n --oscd-primary: var(--oscd-theme-primary, #2aa198);\n --oscd-secondary: var(--oscd-theme-secondary, #6c71c4);\n --oscd-base03: var(--oscd-theme-base03, #002b36);\n --oscd-base02: var(--oscd-theme-base02, #073642);\n --oscd-base01: var(--oscd-theme-base01, #586e75);\n --oscd-base00: var(--oscd-theme-base00, #657b83);\n --oscd-base0: var(--oscd-theme-base0, #839496);\n --oscd-base1: var(--oscd-theme-base1, #93a1a1);\n --oscd-base2: var(--oscd-theme-base2, #eee8d5);\n --oscd-base3: var(--oscd-theme-base3, #fdf6e3);\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\n /* MD3 has no single generic \"system font\" token (unlike color); its\n * closest reference-tier equivalent is --md-ref-typeface-plain. Icon\n * fonts (--oscd-icon-font) and monospace fonts (--oscd-text-font-mono)\n * have no MD3 system-token equivalent at all, so they are referenced\n * directly where needed instead of through an --md-* mapping.\n */\n --md-ref-typeface-plain: var(--oscd-text-font);\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 * Public token -> internal token mappings\n *\n * Example pattern:\n * --internal-variable-name: var(--oscd-shell-public-token, <default>);\n */\n :host {\n /* Shell root */\n --shell-background-color: var(\n --oscd-shell-background-color,\n var(--md-sys-color-surface)\n );\n\n /* App bar */\n --app-bar-color: var(\n --oscd-shell-app-bar-color,\n var(--md-sys-color-on-primary)\n );\n --app-bar-background-color: var(\n --oscd-shell-app-bar-background-color,\n var(--md-sys-color-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-logo-gap: var(--oscd-shell-app-bar-logo-gap, 16px);\n --app-bar-title-menu-gap: var(--oscd-shell-app-bar-title-menu-gap, 4px);\n --app-bar-title-text-font-family: var(\n --oscd-shell-app-bar-title-font-family,\n var(--md-ref-typeface-plain)\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-current-editor-font-family: var(\n --oscd-shell-app-bar-current-editor-font-family,\n var(--md-ref-typeface-plain)\n );\n --app-bar-current-editor-font-size: var(\n --oscd-shell-app-bar-current-editor-font-size,\n 16px\n );\n --app-bar-current-editor-font-weight: var(\n --oscd-shell-app-bar-current-editor-font-weight,\n 500\n );\n --app-bar-current-editor-font-style: var(\n --oscd-shell-app-bar-current-editor-font-style,\n normal\n );\n --app-bar-current-editor-line-height: var(\n --oscd-shell-app-bar-current-editor-line-height,\n normal\n );\n --app-bar-current-editor-color: var(\n --oscd-shell-app-bar-current-editor-color,\n var(--app-bar-color)\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 --app-bar-action-icon-disabled-color: var(\n --oscd-shell-app-bar-action-icon-disabled-color,\n var(--md-sys-color-on-primary)\n );\n --app-bar-action-icon-disabled-container-opacity: var(\n --oscd-shell-app-bar-action-icon-disabled-container-opacity,\n 0\n );\n --app-bar-separator-color: var(\n --oscd-shell-app-bar-separator-color,\n currentColor\n );\n --app-bar-separator-opacity: var(\n --oscd-shell-app-bar-separator-opacity,\n 0.38\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(--md-ref-typeface-plain)\n );\n --file-menu-text-size: var(--oscd-shell-file-menu-text-size, 16px);\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(--md-sys-color-on-primary)\n );\n\n /* Plugins menu */\n --plugins-menu-button-size: var(\n --oscd-shell-plugins-menu-button-size,\n 24px\n );\n --plugins-menu-button-color: var(\n --oscd-shell-plugins-menu-button-color,\n var(--md-sys-color-on-primary)\n );\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(--md-sys-color-surface)\n );\n --plugins-menu-item-label-color: var(\n --oscd-shell-plugins-menu-item-label-color,\n var(--md-sys-color-on-surface)\n );\n --plugins-menu-item-leading-icon-color: var(\n --oscd-shell-plugins-menu-item-leading-icon-color,\n var(--md-sys-color-on-surface)\n );\n --plugins-menu-item-selected-container-color: var(\n --oscd-shell-plugins-menu-item-selected-container-color,\n var(--md-sys-color-secondary-container)\n );\n --plugins-menu-item-selected-label-color: var(\n --oscd-shell-plugins-menu-item-selected-label-color,\n var(--md-sys-color-on-surface)\n );\n\n /* Editor plugins panel */\n --editor-plugins-panel-width: var(\n --oscd-shell-editor-plugins-panel-width,\n 308px\n );\n --editor-plugins-panel-collapsed-width: var(\n --oscd-shell-editor-plugins-panel-collapsed-width,\n 76px\n );\n --editor-plugins-panel-padding-top: var(\n --oscd-shell-editor-plugins-panel-padding-top,\n 20px\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-background-color: var(\n --oscd-shell-editor-plugins-panel-background-color,\n var(--md-sys-color-surface)\n );\n --editor-plugins-panel-item-text-color: var(\n --oscd-shell-editor-plugins-panel-item-text-color,\n var(--md-sys-color-on-surface)\n );\n --editor-plugins-panel-item-icon-color: var(\n --oscd-shell-editor-plugins-panel-item-icon-color,\n var(--md-sys-color-on-surface)\n );\n --editor-plugins-panel-item-active-bg: var(\n --oscd-shell-editor-plugins-panel-item-active-bg,\n var(--md-sys-color-primary)\n );\n --editor-plugins-panel-item-active-color: var(\n --oscd-shell-editor-plugins-panel-item-active-color,\n var(--md-sys-color-on-primary)\n );\n --editor-plugins-panel-divider-color: var(\n --oscd-shell-editor-plugins-panel-divider-color,\n #d0d5dc40\n );\n --editor-plugins-panel-flyout-header-text-color: var(\n --oscd-shell-editor-plugins-panel-flyout-header-text-color,\n var(--md-sys-color-secondary)\n );\n\n /* Main editor container */\n --editor-background-color: var(\n --oscd-shell-editor-background-color,\n var(--md-sys-color-surface)\n );\n --editor-padding: var(--oscd-shell-editor-padding, 8px);\n\n /* Landing page */\n --landing-background-color: var(\n --oscd-shell-landing-background-color,\n var(--md-sys-color-surface)\n );\n --landing-heading-color: var(\n --oscd-shell-landing-heading-color,\n var(--md-sys-color-on-surface)\n );\n --landing-heading-font-family: var(\n --oscd-shell-landing-heading-font-family,\n var(--md-ref-typeface-plain)\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(--md-sys-color-on-surface)\n );\n --landing-subheading-font-family: var(\n --oscd-shell-landing-subheading-font-family,\n var(--md-ref-typeface-plain)\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(--md-sys-color-secondary)\n );\n --landing-card-text-color: var(\n --oscd-shell-landing-card-text-color,\n var(--md-sys-color-on-secondary)\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 transparent\n );\n }\n`;\n"]}
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8XvC,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 * Defaults are the Solarized (https://ethanschoonover.com/solarized/)\n * light palette used by the legacy OpenSCD shell, so oscd-shell is\n * brand-neutral out of the box: consumers who set none of the\n * --oscd-theme-* variables get the classic OpenSCD look. Distro-specific\n * branding (e.g. Omicron colors) is applied entirely by overriding the\n * --oscd-theme-* variables from outside; nothing brand-specific belongs\n * in this file.\n */\n :host {\n --oscd-primary: var(--oscd-theme-primary, #2aa198);\n --oscd-secondary: var(--oscd-theme-secondary, #6c71c4);\n --oscd-base03: var(--oscd-theme-base03, #002b36);\n --oscd-base02: var(--oscd-theme-base02, #073642);\n --oscd-base01: var(--oscd-theme-base01, #586e75);\n --oscd-base00: var(--oscd-theme-base00, #657b83);\n --oscd-base0: var(--oscd-theme-base0, #839496);\n --oscd-base1: var(--oscd-theme-base1, #93a1a1);\n --oscd-base2: var(--oscd-theme-base2, #eee8d5);\n --oscd-base3: var(--oscd-theme-base3, #fdf6e3);\n --oscd-error: var(--oscd-theme-error, #dc322f);\n --oscd-warning: var(--oscd-theme-warning, #b58900);\n --oscd-shape: var(--oscd-theme-shape, 8px);\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\n /* Material shape scale, derived from --oscd-shape (the Material\n * \"small\" corner size) per the ratios documented in oscd-api's\n * theming.md: none=0, extra-small=0.5x, small=1x, medium=1.5x, large=2x.\n */\n --md-sys-shape-corner-none: 0;\n --md-sys-shape-corner-extra-small: calc(0.5 * var(--oscd-shape));\n --md-sys-shape-corner-small: var(--oscd-shape);\n --md-sys-shape-corner-medium: calc(1.5 * var(--oscd-shape));\n --md-sys-shape-corner-large: calc(2 * var(--oscd-shape));\n\n /* MD3 has no single generic \"system font\" token (unlike color); its\n * closest reference-tier equivalent is --md-ref-typeface-plain. Icon\n * fonts (--oscd-icon-font) and monospace fonts (--oscd-text-font-mono)\n * have no MD3 system-token equivalent at all, so they are referenced\n * directly where needed instead of through an --md-* mapping.\n */\n --md-ref-typeface-plain: var(--oscd-text-font);\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 * Public token -> internal token mappings\n *\n * Example pattern:\n * --internal-variable-name: var(--oscd-shell-public-token, <default>);\n */\n :host {\n /* Shell root */\n --shell-background-color: var(\n --oscd-shell-background-color,\n var(--md-sys-color-surface)\n );\n\n /* App bar */\n --app-bar-color: var(\n --oscd-shell-app-bar-color,\n var(--md-sys-color-on-primary)\n );\n --app-bar-background-color: var(\n --oscd-shell-app-bar-background-color,\n var(--md-sys-color-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-logo-gap: var(--oscd-shell-app-bar-logo-gap, 16px);\n --app-bar-title-menu-gap: var(--oscd-shell-app-bar-title-menu-gap, 4px);\n --app-bar-title-text-font-family: var(\n --oscd-shell-app-bar-title-font-family,\n var(--md-ref-typeface-plain)\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-current-editor-font-family: var(\n --oscd-shell-app-bar-current-editor-font-family,\n var(--md-ref-typeface-plain)\n );\n --app-bar-current-editor-font-size: var(\n --oscd-shell-app-bar-current-editor-font-size,\n 16px\n );\n --app-bar-current-editor-font-weight: var(\n --oscd-shell-app-bar-current-editor-font-weight,\n 500\n );\n --app-bar-current-editor-font-style: var(\n --oscd-shell-app-bar-current-editor-font-style,\n normal\n );\n --app-bar-current-editor-line-height: var(\n --oscd-shell-app-bar-current-editor-line-height,\n normal\n );\n --app-bar-current-editor-color: var(\n --oscd-shell-app-bar-current-editor-color,\n var(--app-bar-color)\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 --app-bar-action-icon-disabled-color: var(\n --oscd-shell-app-bar-action-icon-disabled-color,\n var(--md-sys-color-on-primary)\n );\n --app-bar-action-icon-disabled-container-opacity: var(\n --oscd-shell-app-bar-action-icon-disabled-container-opacity,\n 0\n );\n --app-bar-separator-color: var(\n --oscd-shell-app-bar-separator-color,\n currentColor\n );\n --app-bar-separator-opacity: var(\n --oscd-shell-app-bar-separator-opacity,\n 0.38\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(--md-ref-typeface-plain)\n );\n --file-menu-text-size: var(--oscd-shell-file-menu-text-size, 16px);\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(--md-sys-color-on-primary)\n );\n\n /* Plugins menu */\n --plugins-menu-button-size: var(\n --oscd-shell-plugins-menu-button-size,\n 24px\n );\n --plugins-menu-button-color: var(\n --oscd-shell-plugins-menu-button-color,\n var(--md-sys-color-on-primary)\n );\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(--md-sys-color-surface)\n );\n --plugins-menu-item-label-color: var(\n --oscd-shell-plugins-menu-item-label-color,\n var(--md-sys-color-on-surface)\n );\n --plugins-menu-item-leading-icon-color: var(\n --oscd-shell-plugins-menu-item-leading-icon-color,\n var(--md-sys-color-on-surface)\n );\n --plugins-menu-item-selected-container-color: var(\n --oscd-shell-plugins-menu-item-selected-container-color,\n var(--md-sys-color-secondary-container)\n );\n --plugins-menu-item-selected-label-color: var(\n --oscd-shell-plugins-menu-item-selected-label-color,\n var(--md-sys-color-on-surface)\n );\n\n /* Editor plugins panel */\n --editor-plugins-panel-width: var(\n --oscd-shell-editor-plugins-panel-width,\n 308px\n );\n --editor-plugins-panel-collapsed-width: var(\n --oscd-shell-editor-plugins-panel-collapsed-width,\n 76px\n );\n --editor-plugins-panel-padding-top: var(\n --oscd-shell-editor-plugins-panel-padding-top,\n 20px\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-background-color: var(\n --oscd-shell-editor-plugins-panel-background-color,\n var(--md-sys-color-surface)\n );\n --editor-plugins-panel-item-text-color: var(\n --oscd-shell-editor-plugins-panel-item-text-color,\n var(--md-sys-color-on-surface)\n );\n --editor-plugins-panel-item-icon-color: var(\n --oscd-shell-editor-plugins-panel-item-icon-color,\n var(--md-sys-color-on-surface)\n );\n --editor-plugins-panel-item-active-bg: var(\n --oscd-shell-editor-plugins-panel-item-active-bg,\n var(--md-sys-color-primary)\n );\n --editor-plugins-panel-item-active-color: var(\n --oscd-shell-editor-plugins-panel-item-active-color,\n var(--md-sys-color-on-primary)\n );\n --editor-plugins-panel-divider-color: var(\n --oscd-shell-editor-plugins-panel-divider-color,\n #d0d5dc40\n );\n --editor-plugins-panel-flyout-header-text-color: var(\n --oscd-shell-editor-plugins-panel-flyout-header-text-color,\n var(--md-sys-color-secondary)\n );\n\n /* Main editor container */\n --editor-background-color: var(\n --oscd-shell-editor-background-color,\n var(--md-sys-color-surface)\n );\n --editor-padding: var(--oscd-shell-editor-padding, 8px);\n\n /* Landing page */\n --landing-background-color: var(\n --oscd-shell-landing-background-color,\n var(--md-sys-color-surface)\n );\n --landing-heading-color: var(\n --oscd-shell-landing-heading-color,\n var(--md-sys-color-on-surface)\n );\n --landing-heading-font-family: var(\n --oscd-shell-landing-heading-font-family,\n var(--md-ref-typeface-plain)\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(--md-sys-color-on-surface)\n );\n --landing-subheading-font-family: var(\n --oscd-shell-landing-subheading-font-family,\n var(--md-ref-typeface-plain)\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(--md-sys-color-secondary)\n );\n --landing-card-text-color: var(\n --oscd-shell-landing-card-text-color,\n var(--md-sys-color-on-secondary)\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 transparent\n );\n }\n`;\n"]}
|
|
@@ -680,6 +680,12 @@ EditorPluginsPanel.styles = css `
|
|
|
680
680
|
oscd-tree {
|
|
681
681
|
margin-inline: 0;
|
|
682
682
|
min-height: 0;
|
|
683
|
+
/* .tree-scroll is the sole flex item allowed to shrink/scroll; without
|
|
684
|
+
this, a too-short container shrinks each tree's box below its
|
|
685
|
+
rendered content instead of letting the scroll container overflow,
|
|
686
|
+
and the (unclipped) shadow-DOM rows bleed past the shrunk box into
|
|
687
|
+
whichever tree follows. */
|
|
688
|
+
flex-shrink: 0;
|
|
683
689
|
--oscd-tree-row-height: 36px;
|
|
684
690
|
--oscd-tree-item-min-height: 36px;
|
|
685
691
|
--oscd-tree-row-gap: 4px;
|
|
@@ -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,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO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E,CAAC;kDACR;AAInB;IAFC,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDACxB;AASnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;sDAClD;AAoBnB;IADC,KAAK,EAAE;uDACS;AAGjB;IADC,KAAK,EAAE;uDACwC;AAIhD;IAFC,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC7B,KAAK,EAAE;uDACe;AAIvB;IAFC,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC7B,KAAK,EAAE;2DACmB;AAI3B;IAFC,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC7B,KAAK,EAAE;0DACkB;AAtEf,kBAAkB;IAD9B,SAAS,EAAE;GACC,kBAAkB,CA27B9B","sourcesContent":["import { css, html, LitElement, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized, msg, str } from '@lit/localize';\n\nimport { OscdIconButton } from '@omicronenergy/oscd-ui/iconbutton/OscdIconButton.js';\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdListItem } from '@omicronenergy/oscd-ui/list/OscdListItem.js';\nimport { OscdMenu } from '@omicronenergy/oscd-ui/menu/OscdMenu.js';\nimport { OscdMenuItem } from '@omicronenergy/oscd-ui/menu/OscdMenuItem.js';\n\nimport { LocaleTag } from '../localization.js';\nimport { PluginEntry, PluginGroup } from '../oscd-shell.js';\nimport {\n OscdTree,\n TreeNode,\n TreeRenderContext,\n} from '@omicronenergy/oscd-ui/tree/OscdTree.js';\nimport {\n filterBySearchTerm,\n filterByPinned,\n isPluginGroup,\n flattenPluginEntries,\n} from '../utils/plugin-utils.js';\nimport { OscdTreeItem } from '@omicronenergy/oscd-ui/tree/OscdTreeItem.js';\nimport { OscdDivider } from '@omicronenergy/oscd-ui/divider/OscdDivider.js';\nimport { localstorage } from '@omicronenergy/oscd-ui/decorators/localstorage.js';\nimport { OscdOutlinedSearchField } from '@omicronenergy/oscd-ui/search-field/OscdOutlinedSearchField.js';\n\ntype PlaceholderTreeNode = {\n kind: 'placeholder';\n name: string;\n translations?: Record<string, string>;\n};\n\ntype EditorPluginTreeNode = (PluginGroup | PluginEntry | PlaceholderTreeNode) &\n TreeNode & {\n children?: EditorPluginTreeNode[];\n plugins?: EditorPluginTreeNode[];\n };\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'editor-plugins-panel': EditorPluginsPanel;\n }\n}\n\nconst unpinnedIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 28 28\"\n fill=\"none\"\n>\n <path\n d=\"M16.391 14.4188L16.8773 16.2406L16.2096 17.3947L13.3244 15.7253L11.3211 19.1876L10.4102 19.4307L10.1671 18.5198L12.1703 15.0576L9.28512 13.3882L9.95287 12.2341L11.7747 11.7478L14.1118 7.70854L13.5348 7.37467L14.2025 6.22059L19.9729 9.55934L19.3052 10.7134L18.7281 10.3795L16.391 14.4188ZM11.5974 13.1857L15.2328 15.2891L14.9531 14.2415L17.574 9.71179L15.2659 8.37629L12.645 12.906L11.5974 13.1857Z\"\n fill=\"currentColor\"\n />\n</svg>`;\n\nconst pinnedIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 28 28\"\n fill=\"none\"\n>\n <path\n d=\"M16.4379 14.5274L16.9273 16.3484L16.2615 17.5036L13.3735 15.8391L11.3761 19.3047L10.4656 19.5494L10.2209 18.6389L12.2183 15.1733L9.33034 13.5088L9.99614 12.3536L11.8171 11.8642L14.1475 7.821L13.5699 7.4881L14.2357 6.3329L20.0117 9.66194L19.3459 10.8171L18.7683 10.4842L16.4379 14.5274Z\"\n fill=\"currentColor\"\n />\n</svg>`;\n\nexport function buildTreeNodes(\n plugins: (PluginEntry | PluginGroup)[],\n): EditorPluginTreeNode[] {\n function pluginEntryToTreeNode(\n pluginEntry: PluginEntry,\n ): EditorPluginTreeNode {\n return {\n ...pluginEntry,\n id: pluginEntry.tagName,\n children: [], //explicitly set children to an empty array for leaf nodes\n };\n }\n\n return plugins.map((editor, index) => {\n const isGroup = isPluginGroup(editor);\n if (isGroup) {\n const children = (editor as PluginGroup).plugins.map(\n pluginEntryToTreeNode,\n );\n return {\n ...editor,\n id: `group:${index}:${editor.name}`,\n children,\n };\n }\n return pluginEntryToTreeNode(editor as PluginEntry);\n });\n}\n\nfunction renderFlyoutPlaceholder() {\n return html`<oscd-menu-item disabled>\n <div slot=\"headline\">${msg('Items you pin will appear here')}</div>\n </oscd-menu-item>`;\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-item': OscdListItem,\n 'oscd-tree': OscdTree,\n 'oscd-tree-item': OscdTreeItem,\n 'oscd-outlined-search-field': OscdOutlinedSearchField,\n 'oscd-divider': OscdDivider,\n 'oscd-menu': OscdMenu,\n 'oscd-menu-item': OscdMenuItem,\n };\n\n id = 'editor-plugins-panel';\n\n @property({ type: Array })\n editors: (PluginEntry | PluginGroup)[] = [];\n\n @property({ type: Number })\n selectedEditor?: PluginEntry;\n\n @property({ type: String })\n locale!: LocaleTag;\n\n @localstorage({ default: true })\n @property({ type: Boolean, reflect: true })\n expanded!: boolean;\n\n /**\n * Transient \"search mode\": the collapsed rail's search icon opens the full\n * panel to let the user search, WITHOUT persisting the panel as expanded.\n * It is reflected purely so `:host([search-mode])` can drive the open width.\n * Exited on editor selection or Escape (see `exitSearchMode`).\n */\n @property({ type: Boolean, reflect: true, attribute: 'search-mode' })\n searchMode = false;\n\n /** True when the panel is visually open (persisted expanded OR transient search). */\n get isOpen(): boolean {\n return this.expanded || this.searchMode;\n }\n\n editorTreeNodes: EditorPluginTreeNode[] = [];\n\n pinnedTreeNodes: EditorPluginTreeNode[] = [\n {\n id: 'pinned',\n name: 'Pinned',\n icon: 'keep',\n plugins: [],\n children: [],\n },\n ];\n\n @state()\n searchValue = '';\n\n @state()\n focusedTree: 'pinned' | 'editors' | null = null;\n\n @localstorage({ default: [] })\n @state()\n expandedIds!: string[];\n\n @localstorage({ default: [] })\n @state()\n pinnedPluginIds!: string[];\n\n @localstorage({ default: [] })\n @state()\n pinnedExpanded!: string[];\n\n willUpdate(changedProperties: Map<string, unknown>) {\n if (\n changedProperties.has('editors') ||\n changedProperties.has('searchValue') ||\n changedProperties.has('locale')\n ) {\n const searchResults = filterBySearchTerm(\n this.editors,\n this.searchValue,\n this.locale,\n );\n this.editorTreeNodes = buildTreeNodes(searchResults);\n }\n\n if (\n changedProperties.has('editors') ||\n changedProperties.has('pinnedPluginIds') ||\n changedProperties.has('locale')\n ) {\n const pinnedPlugins = filterByPinned(this.editors, this.pinnedPluginIds);\n const pinnedChildren: EditorPluginTreeNode[] = pinnedPlugins.length\n ? buildTreeNodes(pinnedPlugins)\n : [\n {\n kind: 'placeholder',\n name: msg('Items you pin will appear here'),\n id: 'pinned-placeholder',\n children: [],\n },\n ];\n this.pinnedTreeNodes = [\n {\n id: 'pinned',\n name: msg('Pinned'),\n icon: 'keep',\n plugins: [],\n children: pinnedChildren,\n },\n ];\n }\n }\n\n togglePin(id: string) {\n if (this.pinnedPluginIds.includes(id)) {\n this.pinnedPluginIds = this.pinnedPluginIds.filter(\n pinnedId => pinnedId !== id,\n );\n } else {\n this.pinnedPluginIds = [...this.pinnedPluginIds, id];\n this.pinnedExpanded = ['pinned']; // Expand the pinned section when a new plugin is pinned\n }\n }\n\n selectEditor(selectedIds: string[]) {\n const [selectedId] = selectedIds;\n if (!selectedId) {\n return;\n }\n const editor = flattenPluginEntries(this.editors).find(\n editor => editor.tagName === selectedId,\n );\n if (!editor) {\n return;\n }\n this.dispatchEditorSelect(editor);\n }\n\n /**\n * Dispatches the `editor-select` event and leaves transient search mode, if\n * active. Used by both the expanded trees and the collapsed rail flyouts.\n */\n private dispatchEditorSelect(editor?: PluginEntry) {\n this.dispatchEvent(\n new CustomEvent('editor-select', {\n detail: { editor },\n bubbles: true,\n composed: true,\n }),\n );\n if (this.searchMode) {\n this.exitSearchMode();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('keydown', this.handleKeydown);\n }\n\n disconnectedCallback() {\n this.removeEventListener('keydown', this.handleKeydown);\n super.disconnectedCallback();\n }\n\n private handleKeydown = (event: KeyboardEvent) => {\n const fromSearchField =\n (event.currentTarget as Element | null)?.localName ===\n 'oscd-outlined-search-field' ||\n event\n .composedPath()\n .some(\n target =>\n (target as Element).localName === 'oscd-outlined-search-field',\n );\n if (event.key === 'Escape' && this.searchMode) {\n event.stopPropagation();\n this.exitSearchMode();\n return;\n }\n\n if (\n fromSearchField &&\n (event.key === 'ArrowDown' || event.key === 'ArrowUp')\n ) {\n event.preventDefault();\n event.stopPropagation();\n this.startTreeNavigation(event.key === 'ArrowDown' ? 'down' : 'up');\n return;\n }\n\n if (fromSearchField && event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n this.activateKeyboardTarget();\n }\n };\n\n /** Opens the panel transiently for searching (does not persist `expanded`). */\n private enterSearchMode() {\n this.searchMode = true;\n this.focusSearch(true);\n }\n\n /** Focuses the search field, optionally selecting its current query. */\n focusSearch(selectQuery = false) {\n const focusField = () => {\n const searchField =\n this.shadowRoot?.querySelector<OscdOutlinedSearchField>(\n 'oscd-outlined-search-field',\n );\n searchField?.focus();\n if (selectQuery) {\n searchField?.select();\n }\n };\n\n this.updateComplete.then(() => {\n focusField();\n requestAnimationFrame(() => requestAnimationFrame(focusField));\n });\n }\n\n /** Returns the panel to the collapsed rail and clears the search query. */\n private exitSearchMode() {\n this.searchMode = false;\n this.searchValue = '';\n this.focusedTree = null;\n }\n\n private getTree(kind: 'pinned' | 'editors'): OscdTree | null {\n return (\n this.shadowRoot?.querySelector<OscdTree>(`oscd-tree.${kind}-tree`) ?? null\n );\n }\n\n private focusTree(\n kind: 'pinned' | 'editors',\n activeId: string | null,\n ): boolean {\n const tree = this.getTree(kind);\n if (!tree || !activeId) {\n return false;\n }\n tree.activeId = activeId;\n this.focusedTree = kind;\n tree.focus();\n return true;\n }\n\n private startTreeNavigation(direction: 'up' | 'down') {\n const first = direction === 'down';\n const pinnedTree = this.getTree('pinned');\n if (this.searchValue.trim().length === 0 && pinnedTree) {\n const activeId = this.focusTree(\n 'pinned',\n first ? pinnedTree.getFirstNodeId() : pinnedTree.getLastNodeId(),\n );\n if (activeId) {\n return;\n }\n }\n const editorsTree = this.getTree('editors');\n this.focusTree(\n 'editors',\n editorsTree\n ? first\n ? editorsTree.getFirstNodeId()\n : editorsTree.getLastNodeId()\n : null,\n );\n }\n\n private handleTreeActiveChanged(kind: 'pinned' | 'editors') {\n this.focusedTree = kind;\n }\n\n private handleTreeFocus(kind: 'pinned' | 'editors') {\n this.focusedTree = kind;\n }\n\n private handleTreeSelection(\n kind: 'pinned' | 'editors',\n selectedIds: string[],\n ) {\n const tree = this.getTree(kind);\n const selectedId = selectedIds[0];\n const selectedNode = tree?.data.find(node => node.id === selectedId);\n if (tree && selectedNode?.children?.length && selectedId) {\n tree.toggle(selectedId);\n return;\n }\n this.selectEditor(selectedIds);\n }\n\n private handleTreeBoundary(\n kind: 'pinned' | 'editors',\n direction: 'first' | 'last',\n ) {\n if (kind === 'pinned' && direction === 'last') {\n this.focusTree(\n 'editors',\n this.getTree('editors')?.getFirstNodeId() ?? null,\n );\n } else if (\n kind === 'editors' &&\n direction === 'first' &&\n this.searchValue.trim().length === 0\n ) {\n this.focusTree('pinned', this.getTree('pinned')?.getLastNodeId() ?? null);\n }\n }\n\n private activateKeyboardTarget() {\n if (!this.focusedTree) {\n if (\n this.shadowRoot?.activeElement?.localName ===\n 'oscd-outlined-search-field' &&\n flattenPluginEntries(\n filterBySearchTerm(this.editors, this.searchValue, this.locale),\n ).length === 1\n ) {\n this.dispatchEditorSelect(\n flattenPluginEntries(\n filterBySearchTerm(this.editors, this.searchValue, this.locale),\n )[0],\n );\n }\n return;\n }\n }\n\n /** Toggles the persisted expanded/collapsed state via the footer control. */\n private toggleExpanded() {\n if (this.isOpen) {\n this.expanded = false;\n this.exitSearchMode();\n } else {\n this.expanded = true;\n }\n }\n\n private toggleFlyout(anchorId: string) {\n const menu = this.shadowRoot?.querySelector<OscdMenu>(\n `oscd-menu[data-flyout=\"${anchorId}\"]`,\n );\n if (!menu) {\n return;\n }\n if (menu.open) {\n menu.close();\n } else {\n menu.show();\n }\n }\n\n renderPluginItem({\n node,\n level,\n disabled,\n active,\n }: TreeRenderContext<EditorPluginTreeNode>) {\n const label = node.translations?.[this.locale] ?? node.name;\n return html`<oscd-tree-item ?disabled=${disabled} ?active=${active}>\n ${level === 1 && !('kind' in node)\n ? html`<oscd-icon slot=\"start\">${node.icon}</oscd-icon>`\n : nothing}\n <span slot=\"headline\" title=${label}>${label}</span>\n </oscd-tree-item>`;\n }\n\n renderLeafAccessory({ node, id }: TreeRenderContext<EditorPluginTreeNode>) {\n const pinned = this.pinnedPluginIds.includes(id);\n return html`<button\n aria-label=${pinned\n ? msg(str`Unpin ${node.name}`)\n : msg(str`Pin ${node.name}`)}\n aria-pressed=${pinned}\n @click=${() => this.togglePin(id)}\n >\n <oscd-icon>${pinned ? pinnedIcon : unpinnedIcon}</oscd-icon>\n </button>`;\n }\n\n private renderExpanded() {\n return html`\n <div class=\"tree-container\">\n <oscd-outlined-search-field\n placeholder=${msg('Search')}\n clearLabel=${msg('Clear search')}\n .value=${this.searchValue}\n @input=${(event: InputEvent) => {\n this.searchValue = (event.target as OscdOutlinedSearchField).value;\n }}\n ></oscd-outlined-search-field>\n <div class=\"tree-scroll\">\n ${this.searchValue.trim().length === 0\n ? html`<oscd-tree\n .data=${this.pinnedTreeNodes}\n .expandedIds=${this.pinnedExpanded}\n .selectionMode=${'single'}\n .selectedIds=${this.selectedEditor\n ? [this.selectedEditor.tagName]\n : []}\n .isDisabled=${(node: EditorPluginTreeNode) =>\n 'kind' in node && node.kind === 'placeholder'}\n .isSelectable=${(node: EditorPluginTreeNode) =>\n !('kind' in node && node.kind === 'placeholder')}\n class=\"pinned-tree\"\n ?keyboard-active=${this.focusedTree === 'pinned'}\n @focusin=${() => this.handleTreeFocus('pinned')}\n .renderItem=${(\n context: TreeRenderContext<EditorPluginTreeNode>,\n ) => this.renderPluginItem(context)}\n .renderLeafAccessory=${(\n context: TreeRenderContext<EditorPluginTreeNode>,\n ) => this.renderLeafAccessory(context)}\n toggle-position=\"trailing\"\n collapse-icon=\"arrow_drop_up\"\n expand-icon=\"arrow_drop_down\"\n @selected-ids-changed=${(\n event: CustomEvent<{ selectedIds: string[] }>,\n ) =>\n this.handleTreeSelection(\n 'pinned',\n event.detail.selectedIds,\n )}\n @expanded-ids-changed=${(\n event: CustomEvent<{ expandedIds: string[] }>,\n ) => {\n this.pinnedExpanded = event.detail.expandedIds;\n }}\n @active-changed=${() =>\n this.handleTreeActiveChanged('pinned')}\n @navigation-boundary=${(\n event: CustomEvent<{ direction: 'first' | 'last' }>,\n ) =>\n this.handleTreeBoundary('pinned', event.detail.direction)}\n ></oscd-tree>\n <oscd-divider></oscd-divider>`\n : nothing}\n <oscd-tree\n class=\"editors-tree\"\n ?keyboard-active=${this.focusedTree === 'editors'}\n @focusin=${() => this.handleTreeFocus('editors')}\n .data=${this.editorTreeNodes}\n .expandedIds=${this.searchValue.length === 0\n ? this.expandedIds\n : this.editorTreeNodes.map(node => node.id)}\n .selectionMode=${'single'}\n .selectedIds=${this.selectedEditor\n ? [this.selectedEditor.tagName]\n : []}\n .isDisabled=${(node: EditorPluginTreeNode) =>\n 'kind' in node && node.kind === 'placeholder'}\n .isSelectable=${(node: EditorPluginTreeNode) =>\n !('kind' in node && node.kind === 'placeholder')}\n .renderItem=${(context: TreeRenderContext<EditorPluginTreeNode>) =>\n this.renderPluginItem(context)}\n .renderLeafAccessory=${(\n context: TreeRenderContext<EditorPluginTreeNode>,\n ) => this.renderLeafAccessory(context)}\n toggle-position=\"trailing\"\n collapse-icon=\"arrow_drop_down\"\n expand-icon=\"arrow_drop_up\"\n @selected-ids-changed=${(\n event: CustomEvent<{ selectedIds: string[] }>,\n ) => this.handleTreeSelection('editors', event.detail.selectedIds)}\n @expanded-ids-changed=${(\n event: CustomEvent<{ expandedIds: string[] }>,\n ) => {\n this.expandedIds = event.detail.expandedIds;\n }}\n @active-changed=${() => this.handleTreeActiveChanged('editors')}\n @navigation-boundary=${(\n event: CustomEvent<{ direction: 'first' | 'last' }>,\n ) => this.handleTreeBoundary('editors', event.detail.direction)}\n ></oscd-tree>\n </div>\n </div>\n `;\n }\n\n private renderRail() {\n const pinnedPlugins = flattenPluginEntries(\n filterByPinned(this.editors, this.pinnedPluginIds),\n );\n return html`\n <div class=\"rail\">\n <oscd-icon-button\n class=\"rail-item\"\n aria-label=${msg('Search')}\n @click=${() => this.enterSearchMode()}\n >\n <oscd-icon>search</oscd-icon>\n </oscd-icon-button>\n ${this.renderRailGroup(\n { name: msg('Pinned'), icon: 'keep', plugins: pinnedPlugins },\n 'pinned',\n true,\n )}\n <oscd-divider></oscd-divider>\n ${this.editors.map((entry, index) =>\n isPluginGroup(entry)\n ? this.renderRailGroup(entry, `group-${index}`)\n : this.renderRailLeaf(entry as PluginEntry),\n )}\n </div>\n `;\n }\n\n private renderRailGroup(\n group: PluginGroup,\n anchorId: string,\n showEmptyPlaceholder = false,\n ) {\n const label = group.translations?.[this.locale] ?? group.name;\n const active = group.plugins.some(\n plugin => plugin.tagName === this.selectedEditor?.tagName,\n );\n const anchor = `rail-${anchorId}`;\n return html`\n <oscd-icon-button\n id=${anchor}\n class=${classMap({ 'rail-item': true, active })}\n aria-haspopup=\"menu\"\n aria-label=${label}\n @click=${() => this.toggleFlyout(anchorId)}\n >\n <oscd-icon>${group.icon}</oscd-icon>\n </oscd-icon-button>\n <oscd-menu\n class=\"rail-flyout\"\n data-flyout=${anchorId}\n anchor=${anchor}\n anchor-corner=\"start-end\"\n menu-corner=\"start-start\"\n positioning=\"popover\"\n quick\n >\n <div class=\"flyout-header\" role=\"presentation\">${label}</div>\n <oscd-divider class=\"flyout-divider\"></oscd-divider>\n ${group.plugins.length > 0\n ? group.plugins.map(plugin => this.renderFlyoutItem(plugin))\n : showEmptyPlaceholder\n ? renderFlyoutPlaceholder()\n : nothing}\n </oscd-menu>\n `;\n }\n\n private renderRailLeaf(plugin: PluginEntry) {\n const label = plugin.translations?.[this.locale] ?? plugin.name;\n const active = plugin.tagName === this.selectedEditor?.tagName;\n return html`\n <oscd-icon-button\n class=${classMap({ 'rail-item': true, active })}\n aria-label=${label}\n @click=${() => this.dispatchEditorSelect(plugin)}\n >\n <oscd-icon>${plugin.icon}</oscd-icon>\n </oscd-icon-button>\n `;\n }\n\n private renderFlyoutItem(plugin: PluginEntry) {\n const label = plugin.translations?.[this.locale] ?? plugin.name;\n const selected = plugin.tagName === this.selectedEditor?.tagName;\n return html`\n <oscd-menu-item\n .selected=${selected}\n @click=${() => this.dispatchEditorSelect(plugin)}\n >\n <div slot=\"headline\">${label}</div>\n </oscd-menu-item>\n `;\n }\n\n private renderFooter() {\n const open = this.isOpen;\n const label = open ? msg('Collapse sidebar') : msg('Expand sidebar');\n const icon = open ? 'left_panel_close' : 'left_panel_open';\n return html`\n <div class=\"footer\">\n ${open\n ? html`<oscd-list-item\n class=\"toggle-button\"\n type=\"button\"\n aria-label=${label}\n @click=${() => this.toggleExpanded()}\n >\n <oscd-icon slot=\"start\">${icon}</oscd-icon>\n <span slot=\"headline\">${label}</span>\n </oscd-list-item>`\n : html`<oscd-icon-button\n class=\"toggle-button\"\n aria-label=${label}\n @click=${() => this.toggleExpanded()}\n >\n <oscd-icon>${icon}</oscd-icon>\n </oscd-icon-button>`}\n </div>\n `;\n }\n\n render() {\n return html`\n ${this.isOpen ? this.renderExpanded() : this.renderRail()}\n <oscd-divider class=\"footer-divider\"></oscd-divider>\n ${this.renderFooter()}\n `;\n }\n\n static styles = css`\n :host {\n /* Collapsed rail is the default width; the panel widens to its full width\n when persistently expanded OR while in transient search mode. The shell\n grid column follows this intrinsic width (grid-template-columns: auto). */\n width: var(--editor-plugins-panel-collapsed-width);\n height: calc(100% - var(--editor-plugins-panel-padding-top));\n display: grid;\n /* Row 1 (tree-container/rail) is the only scrollable region; the divider\n and footer rows are sized to content so they stay pinned and always\n visible below it, however tall the tree content grows. */\n grid-template-rows: 1fr auto auto;\n min-height: 0;\n padding-top: var(--editor-plugins-panel-padding-top);\n transition: width 0.1s ease-in-out;\n /* Clip transient horizontal overflow while the width animates on\n expand/collapse: the content swaps to its full width before the host\n finishes resizing, and this stops that from forcing horizontal reflow /\n scrollbar churn every animation frame. Steady-state label overrun is\n handled by the tree row ellipsis, not by this. */\n overflow-x: hidden;\n /* The panel paints its own surface color; it must never depend on\n page/body background showing through, or hosts that don't set a\n background image get a blank panel. */\n background-color: var(--editor-plugins-panel-background-color);\n }\n\n /* Material colour scheme for the panel's content. By default the panel's\n background-color (above) is the dark --oscd-primary surface, so its\n content is light (\"white\"/--oscd-base3) on a dark surface. We set the\n *system* colours once here — not each component's final colour — so\n resting text/icons AND every derived hover/pressed state layer resolve\n to the light content colour from one place. (The flyout menus are a\n light surface and reset these back to the shell defaults; see\n .rail-flyout.)\n\n NB: these are set on the content containers rather than :host on\n purpose. A :host declaration would sit on the same element that\n inherits --editor-plugins-panel-item-text-color, which is itself\n derived from --md-sys-color-on-surface; declaring on the containers\n keeps the source token a plain inherited value and so cannot form a\n reference cycle. See \"Layers are read upward\" in THEMING.md. */\n .rail,\n .tree-container,\n .footer {\n --md-sys-color-on-surface: var(--editor-plugins-panel-item-text-color);\n --md-sys-color-on-surface-variant: var(\n --editor-plugins-panel-item-icon-color\n );\n\n --md-sys-color-surface: var(--editor-plugins-panel-background-color);\n }\n\n :host([expanded]),\n :host([search-mode]) {\n width: var(--editor-plugins-panel-width);\n }\n\n /* Base divider styling, overridden by the more specific rail/flyout/footer\n dividers below where the Figma spec calls for different sizing. */\n oscd-divider {\n --md-divider-color: var(--editor-plugins-panel-divider-color);\n /* No margin: .tree-container's 12px gap owns the spacing on both sides. */\n margin-block: 0;\n }\n\n /* --- Expanded panel: search field + scrollable tree --- */\n\n .tree-container {\n margin-inline: 16px;\n min-width: 0;\n min-height: 0;\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n oscd-outlined-search-field * {\n --md-icon-button-state-layer-width: 32px;\n --md-icon-button-state-layer-height: 32px;\n --md-icon-button-state-layer-shape: 50%;\n }\n\n oscd-outlined-search-field {\n background-color: color-mix(\n in srgb,\n var(\n --md-outlined-text-field-input-text-color,\n var(--md-sys-color-on-surface, #1d1b20)\n )\n 20%,\n transparent\n );\n border-radius: 5px;\n --md-outlined-text-field-top-space: 6px;\n --md-outlined-text-field-bottom-space: 6px;\n --md-outlined-text-field-leading-space: 8px;\n --md-outlined-text-field-trailing-space: 8px;\n --md-outlined-text-field-with-leading-icon-leading-space: 10px;\n --md-outlined-field-with-trailing-content-trailing-space: 8px;\n --md-outlined-text-field-icon-input-space: 10px;\n --md-icon-button-state-layer-width: 32px;\n --md-icon-button-state-layer-height: 32px;\n --md-icon-button-state-layer-shape: 50%;\n\n --md-outlined-text-field-trailing-icon-size: 32px;\n\n --md-icon-button-icon-size: 24px;\n\n /* keep the outline light in every state */\n --md-outlined-text-field-focus-outline-color: var(\n --editor-plugins-panel-item-text-color\n );\n --md-outlined-text-field-hover-outline-color: var(\n --editor-plugins-panel-item-text-color\n );\n --md-outlined-text-field-outline-color: var(\n --editor-plugins-panel-item-text-color\n );\n /* hide the outline border entirely, in every state */\n --md-outlined-text-field-outline-width: 0px;\n --md-outlined-text-field-hover-outline-width: 0px;\n --md-outlined-text-field-focus-outline-width: 0px;\n\n /* caret follows the light text instead of the primary accent */\n --md-outlined-text-field-caret-color: var(\n --editor-plugins-panel-item-text-color\n );\n --md-outlined-text-field-focus-caret-color: var(\n --editor-plugins-panel-item-text-color\n );\n }\n\n .tree-scroll {\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-height: 0;\n overflow-y: auto;\n\n /* Recolour the scrollbar to sit on the panel's dark-blue surface instead\n of the browser's default light-themed bar. Firefox reads\n scrollbar-color; Chromium/Safari (and Firefox with the layout flag\n off) read the ::-webkit-scrollbar-* pseudo-elements below. */\n scrollbar-color: var(--editor-plugins-panel-divider-color) transparent;\n scrollbar-width: thin;\n }\n\n .tree-scroll::-webkit-scrollbar {\n width: 8px;\n }\n\n .tree-scroll::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .tree-scroll::-webkit-scrollbar-thumb {\n background-color: var(--editor-plugins-panel-divider-color);\n border-radius: 4px;\n }\n\n oscd-tree {\n margin-inline: 0;\n min-height: 0;\n --oscd-tree-row-height: 36px;\n --oscd-tree-item-min-height: 36px;\n --oscd-tree-row-gap: 4px;\n --oscd-tree-row-padding-start: 8px;\n --oscd-tree-row-padding-end: 8px;\n --oscd-tree-indent-step: 36px;\n --oscd-tree-row-shape: 5px;\n --oscd-tree-toggle-icon-size: 28px;\n --oscd-tree-trailing-toggle-gap: 8px;\n /* Pin accessory hidden at rest, revealed on row hover / keyboard focus\n (see Figma side-panel spec); its icon size inherits the 28px toggle. */\n --oscd-tree-accessory-rest-opacity: 0;\n --md-icon-size: var(--editor-plugins-panel-item-icon-size);\n /* oscd-tree-item colours its leading/trailing icon slots explicitly\n (not via inherited 'color'), so — unlike the label — they don't\n automatically pick up the selected-row text colour above. Tying them\n to currentColor makes the icon track whatever colour the row itself\n resolves to (resting on-surface ink, or the active/selected colour),\n matching the label in both states. */\n --oscd-tree-item-leading-icon-color: currentColor;\n --oscd-tree-item-trailing-icon-color: currentColor;\n --oscd-tree-row-selected-color: var(\n --editor-plugins-panel-item-active-bg\n );\n --oscd-tree-row-selected-text-color: var(\n --editor-plugins-panel-item-active-color\n );\n --oscd-tree-row-active-border-width: 0px;\n /* The keyboard-active row highlight (outline + optional text override)\n must stay visible whether that row is merely keyboard-highlighted at\n rest (panel surface bg, on-surface ink text) or also selected\n (--editor-plugins-panel-item-active-bg, active-color text). Using\n currentColor/inherit ties the outline and text to whichever of those\n two colours the row already resolves to, instead of hardcoding the\n selected-row colour (which vanishes against the resting surface). */\n --oscd-tree-row-active-border-color: currentColor;\n --oscd-tree-row-active-text-color: inherit;\n --oscd-tree-row-focus-ring-color: currentColor;\n }\n\n oscd-tree.keyboard-active {\n --oscd-tree-row-active-border-width: 1px;\n }\n\n oscd-tree.pinned-tree {\n --oscd-tree-leaf-toggle-size: 0px;\n --oscd-tree-leaf-toggle-gap: 0px;\n }\n\n /* --- Collapsed icon rail --- */\n\n /* Collapsed icon rail: a flat column of 44px icon buttons (28px glyph + 8px\n padding), inset 16px so the glyphs land at the same x (24px) as both the\n search icon and the tree-item icons in the expanded panel. */\n .rail {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding-inline: 16px;\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n }\n\n .rail-item {\n --md-icon-button-icon-size: 28px;\n --md-icon-button-state-layer-height: 44px;\n --md-icon-button-state-layer-width: 44px;\n border-radius: 5px;\n }\n\n /* Active group/editor: dark rounded square behind the glyph. */\n .rail-item.active {\n background: var(--editor-plugins-panel-item-active-bg);\n }\n\n .rail oscd-divider {\n /* 44px wide (aligned with the icon column), 12px clearance above and\n below, per the Figma collapsed spec. */\n width: 44px;\n margin-block: 12px;\n --md-divider-color: var(--editor-plugins-panel-divider-color);\n }\n\n /* Flyout menu opened from a collapsed group icon. Figma \"Links container\":\n padding 8px, gap 4px, 1px border, 5px radius, light surface + shadow.\n Unlike the rest of the panel this is a LIGHT surface, so it resets the\n system colours back to the shell defaults (dark content on a light\n surface); everything inside then derives correctly. */\n .rail-flyout {\n --md-sys-color-surface: var(--plugins-menu-container-color);\n --md-sys-color-surface-container: var(--plugins-menu-container-color);\n --md-sys-color-on-surface: var(--plugins-menu-item-label-color);\n --md-sys-color-on-surface-variant: var(\n --plugins-menu-item-leading-icon-color\n );\n --md-menu-container-color: var(--plugins-menu-container-color);\n min-width: 200px;\n }\n\n .flyout-header {\n /* Group name heading: Material label-large, in the secondary blue, per the\n Figma \"Links container\" header. */\n padding: 8px 12px;\n font-family: var(--oscd-text-font, Roboto), sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: 0.1px;\n color: var(--editor-plugins-panel-flyout-header-text-color);\n }\n\n .rail-flyout .flyout-divider {\n /* Separates the group heading from its editor items. */\n --md-divider-color: var(--editor-plugins-panel-divider-color);\n margin-block: 4px;\n width: 80%;\n margin: auto;\n }\n\n .rail-flyout oscd-menu-item {\n width: 100%;\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 /* --- Footer: collapse/expand toggle --- */\n\n .footer-divider {\n padding-inline: 16px;\n margin-block: 12px 0;\n }\n\n .footer {\n /* Persistent collapse/expand control, bottom-left in both modes. The 16px\n inline inset matches the tree-container (so the expanded list-item spans\n the same width as the rows) and the rail items; 16px below is the Figma\n bottom margin. */\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding-inline: 16px;\n padding-block: 0 16px;\n }\n\n /* Expanded: an interactive list item so it reads as \"one more row\" — full\n width with a full-width hover/ripple state layer, left-aligned, no\n container fill at rest. 8px leading space lands the 28px glyph at x24,\n exactly like the search field and tree rows above it. */\n oscd-list-item.toggle-button {\n width: 100%;\n border-radius: 5px;\n --md-list-item-leading-space: 8px;\n --md-list-item-trailing-space: 8px;\n --md-list-item-one-line-container-height: 40px;\n --md-list-item-top-space: 8px;\n --md-list-item-bottom-space: 8px;\n --md-list-item-label-text-size: 16px;\n }\n\n oscd-list-item.toggle-button oscd-icon[slot='start'] {\n /* Every icon in the side panel is 28px (matches the tree icons). */\n --md-icon-size: 28px;\n }\n\n /* Collapsed rail: icon-only toggle, matching the rail items (44px target,\n 28px glyph, glyph lands at x24 like the other rail icons). */\n oscd-icon-button.toggle-button {\n --md-icon-button-icon-size: 28px;\n --md-icon-button-state-layer-height: 44px;\n --md-icon-button-state-layer-width: 44px;\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,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAI3E,OAAO,EACL,QAAQ,GAGT,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,C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,KAAK,EAAE;uDACwC;AAIhD;IAFC,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC7B,KAAK,EAAE;uDACe;AAIvB;IAFC,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC7B,KAAK,EAAE;2DACmB;AAI3B;IAFC,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC7B,KAAK,EAAE;0DACkB;AAtEf,kBAAkB;IAD9B,SAAS,EAAE;GACC,kBAAkB,CAi8B9B","sourcesContent":["import { css, html, LitElement, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';\nimport { localized, msg, str } from '@lit/localize';\n\nimport { OscdIconButton } from '@omicronenergy/oscd-ui/iconbutton/OscdIconButton.js';\nimport { OscdIcon } from '@omicronenergy/oscd-ui/icon/OscdIcon.js';\nimport { OscdListItem } from '@omicronenergy/oscd-ui/list/OscdListItem.js';\nimport { OscdMenu } from '@omicronenergy/oscd-ui/menu/OscdMenu.js';\nimport { OscdMenuItem } from '@omicronenergy/oscd-ui/menu/OscdMenuItem.js';\n\nimport { LocaleTag } from '../localization.js';\nimport { PluginEntry, PluginGroup } from '../oscd-shell.js';\nimport {\n OscdTree,\n TreeNode,\n TreeRenderContext,\n} from '@omicronenergy/oscd-ui/tree/OscdTree.js';\nimport {\n filterBySearchTerm,\n filterByPinned,\n isPluginGroup,\n flattenPluginEntries,\n} from '../utils/plugin-utils.js';\nimport { OscdTreeItem } from '@omicronenergy/oscd-ui/tree/OscdTreeItem.js';\nimport { OscdDivider } from '@omicronenergy/oscd-ui/divider/OscdDivider.js';\nimport { localstorage } from '@omicronenergy/oscd-ui/decorators/localstorage.js';\nimport { OscdOutlinedSearchField } from '@omicronenergy/oscd-ui/search-field/OscdOutlinedSearchField.js';\n\ntype PlaceholderTreeNode = {\n kind: 'placeholder';\n name: string;\n translations?: Record<string, string>;\n};\n\ntype EditorPluginTreeNode = (PluginGroup | PluginEntry | PlaceholderTreeNode) &\n TreeNode & {\n children?: EditorPluginTreeNode[];\n plugins?: EditorPluginTreeNode[];\n };\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'editor-plugins-panel': EditorPluginsPanel;\n }\n}\n\nconst unpinnedIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 28 28\"\n fill=\"none\"\n>\n <path\n d=\"M16.391 14.4188L16.8773 16.2406L16.2096 17.3947L13.3244 15.7253L11.3211 19.1876L10.4102 19.4307L10.1671 18.5198L12.1703 15.0576L9.28512 13.3882L9.95287 12.2341L11.7747 11.7478L14.1118 7.70854L13.5348 7.37467L14.2025 6.22059L19.9729 9.55934L19.3052 10.7134L18.7281 10.3795L16.391 14.4188ZM11.5974 13.1857L15.2328 15.2891L14.9531 14.2415L17.574 9.71179L15.2659 8.37629L12.645 12.906L11.5974 13.1857Z\"\n fill=\"currentColor\"\n />\n</svg>`;\n\nconst pinnedIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 28 28\"\n fill=\"none\"\n>\n <path\n d=\"M16.4379 14.5274L16.9273 16.3484L16.2615 17.5036L13.3735 15.8391L11.3761 19.3047L10.4656 19.5494L10.2209 18.6389L12.2183 15.1733L9.33034 13.5088L9.99614 12.3536L11.8171 11.8642L14.1475 7.821L13.5699 7.4881L14.2357 6.3329L20.0117 9.66194L19.3459 10.8171L18.7683 10.4842L16.4379 14.5274Z\"\n fill=\"currentColor\"\n />\n</svg>`;\n\nexport function buildTreeNodes(\n plugins: (PluginEntry | PluginGroup)[],\n): EditorPluginTreeNode[] {\n function pluginEntryToTreeNode(\n pluginEntry: PluginEntry,\n ): EditorPluginTreeNode {\n return {\n ...pluginEntry,\n id: pluginEntry.tagName,\n children: [], //explicitly set children to an empty array for leaf nodes\n };\n }\n\n return plugins.map((editor, index) => {\n const isGroup = isPluginGroup(editor);\n if (isGroup) {\n const children = (editor as PluginGroup).plugins.map(\n pluginEntryToTreeNode,\n );\n return {\n ...editor,\n id: `group:${index}:${editor.name}`,\n children,\n };\n }\n return pluginEntryToTreeNode(editor as PluginEntry);\n });\n}\n\nfunction renderFlyoutPlaceholder() {\n return html`<oscd-menu-item disabled>\n <div slot=\"headline\">${msg('Items you pin will appear here')}</div>\n </oscd-menu-item>`;\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-item': OscdListItem,\n 'oscd-tree': OscdTree,\n 'oscd-tree-item': OscdTreeItem,\n 'oscd-outlined-search-field': OscdOutlinedSearchField,\n 'oscd-divider': OscdDivider,\n 'oscd-menu': OscdMenu,\n 'oscd-menu-item': OscdMenuItem,\n };\n\n id = 'editor-plugins-panel';\n\n @property({ type: Array })\n editors: (PluginEntry | PluginGroup)[] = [];\n\n @property({ type: Number })\n selectedEditor?: PluginEntry;\n\n @property({ type: String })\n locale!: LocaleTag;\n\n @localstorage({ default: true })\n @property({ type: Boolean, reflect: true })\n expanded!: boolean;\n\n /**\n * Transient \"search mode\": the collapsed rail's search icon opens the full\n * panel to let the user search, WITHOUT persisting the panel as expanded.\n * It is reflected purely so `:host([search-mode])` can drive the open width.\n * Exited on editor selection or Escape (see `exitSearchMode`).\n */\n @property({ type: Boolean, reflect: true, attribute: 'search-mode' })\n searchMode = false;\n\n /** True when the panel is visually open (persisted expanded OR transient search). */\n get isOpen(): boolean {\n return this.expanded || this.searchMode;\n }\n\n editorTreeNodes: EditorPluginTreeNode[] = [];\n\n pinnedTreeNodes: EditorPluginTreeNode[] = [\n {\n id: 'pinned',\n name: 'Pinned',\n icon: 'keep',\n plugins: [],\n children: [],\n },\n ];\n\n @state()\n searchValue = '';\n\n @state()\n focusedTree: 'pinned' | 'editors' | null = null;\n\n @localstorage({ default: [] })\n @state()\n expandedIds!: string[];\n\n @localstorage({ default: [] })\n @state()\n pinnedPluginIds!: string[];\n\n @localstorage({ default: [] })\n @state()\n pinnedExpanded!: string[];\n\n willUpdate(changedProperties: Map<string, unknown>) {\n if (\n changedProperties.has('editors') ||\n changedProperties.has('searchValue') ||\n changedProperties.has('locale')\n ) {\n const searchResults = filterBySearchTerm(\n this.editors,\n this.searchValue,\n this.locale,\n );\n this.editorTreeNodes = buildTreeNodes(searchResults);\n }\n\n if (\n changedProperties.has('editors') ||\n changedProperties.has('pinnedPluginIds') ||\n changedProperties.has('locale')\n ) {\n const pinnedPlugins = filterByPinned(this.editors, this.pinnedPluginIds);\n const pinnedChildren: EditorPluginTreeNode[] = pinnedPlugins.length\n ? buildTreeNodes(pinnedPlugins)\n : [\n {\n kind: 'placeholder',\n name: msg('Items you pin will appear here'),\n id: 'pinned-placeholder',\n children: [],\n },\n ];\n this.pinnedTreeNodes = [\n {\n id: 'pinned',\n name: msg('Pinned'),\n icon: 'keep',\n plugins: [],\n children: pinnedChildren,\n },\n ];\n }\n }\n\n togglePin(id: string) {\n if (this.pinnedPluginIds.includes(id)) {\n this.pinnedPluginIds = this.pinnedPluginIds.filter(\n pinnedId => pinnedId !== id,\n );\n } else {\n this.pinnedPluginIds = [...this.pinnedPluginIds, id];\n this.pinnedExpanded = ['pinned']; // Expand the pinned section when a new plugin is pinned\n }\n }\n\n selectEditor(selectedIds: string[]) {\n const [selectedId] = selectedIds;\n if (!selectedId) {\n return;\n }\n const editor = flattenPluginEntries(this.editors).find(\n editor => editor.tagName === selectedId,\n );\n if (!editor) {\n return;\n }\n this.dispatchEditorSelect(editor);\n }\n\n /**\n * Dispatches the `editor-select` event and leaves transient search mode, if\n * active. Used by both the expanded trees and the collapsed rail flyouts.\n */\n private dispatchEditorSelect(editor?: PluginEntry) {\n this.dispatchEvent(\n new CustomEvent('editor-select', {\n detail: { editor },\n bubbles: true,\n composed: true,\n }),\n );\n if (this.searchMode) {\n this.exitSearchMode();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('keydown', this.handleKeydown);\n }\n\n disconnectedCallback() {\n this.removeEventListener('keydown', this.handleKeydown);\n super.disconnectedCallback();\n }\n\n private handleKeydown = (event: KeyboardEvent) => {\n const fromSearchField =\n (event.currentTarget as Element | null)?.localName ===\n 'oscd-outlined-search-field' ||\n event\n .composedPath()\n .some(\n target =>\n (target as Element).localName === 'oscd-outlined-search-field',\n );\n if (event.key === 'Escape' && this.searchMode) {\n event.stopPropagation();\n this.exitSearchMode();\n return;\n }\n\n if (\n fromSearchField &&\n (event.key === 'ArrowDown' || event.key === 'ArrowUp')\n ) {\n event.preventDefault();\n event.stopPropagation();\n this.startTreeNavigation(event.key === 'ArrowDown' ? 'down' : 'up');\n return;\n }\n\n if (fromSearchField && event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n this.activateKeyboardTarget();\n }\n };\n\n /** Opens the panel transiently for searching (does not persist `expanded`). */\n private enterSearchMode() {\n this.searchMode = true;\n this.focusSearch(true);\n }\n\n /** Focuses the search field, optionally selecting its current query. */\n focusSearch(selectQuery = false) {\n const focusField = () => {\n const searchField =\n this.shadowRoot?.querySelector<OscdOutlinedSearchField>(\n 'oscd-outlined-search-field',\n );\n searchField?.focus();\n if (selectQuery) {\n searchField?.select();\n }\n };\n\n this.updateComplete.then(() => {\n focusField();\n requestAnimationFrame(() => requestAnimationFrame(focusField));\n });\n }\n\n /** Returns the panel to the collapsed rail and clears the search query. */\n private exitSearchMode() {\n this.searchMode = false;\n this.searchValue = '';\n this.focusedTree = null;\n }\n\n private getTree(kind: 'pinned' | 'editors'): OscdTree | null {\n return (\n this.shadowRoot?.querySelector<OscdTree>(`oscd-tree.${kind}-tree`) ?? null\n );\n }\n\n private focusTree(\n kind: 'pinned' | 'editors',\n activeId: string | null,\n ): boolean {\n const tree = this.getTree(kind);\n if (!tree || !activeId) {\n return false;\n }\n tree.activeId = activeId;\n this.focusedTree = kind;\n tree.focus();\n return true;\n }\n\n private startTreeNavigation(direction: 'up' | 'down') {\n const first = direction === 'down';\n const pinnedTree = this.getTree('pinned');\n if (this.searchValue.trim().length === 0 && pinnedTree) {\n const activeId = this.focusTree(\n 'pinned',\n first ? pinnedTree.getFirstNodeId() : pinnedTree.getLastNodeId(),\n );\n if (activeId) {\n return;\n }\n }\n const editorsTree = this.getTree('editors');\n this.focusTree(\n 'editors',\n editorsTree\n ? first\n ? editorsTree.getFirstNodeId()\n : editorsTree.getLastNodeId()\n : null,\n );\n }\n\n private handleTreeActiveChanged(kind: 'pinned' | 'editors') {\n this.focusedTree = kind;\n }\n\n private handleTreeFocus(kind: 'pinned' | 'editors') {\n this.focusedTree = kind;\n }\n\n private handleTreeSelection(\n kind: 'pinned' | 'editors',\n selectedIds: string[],\n ) {\n const tree = this.getTree(kind);\n const selectedId = selectedIds[0];\n const selectedNode = tree?.data.find(node => node.id === selectedId);\n if (tree && selectedNode?.children?.length && selectedId) {\n tree.toggle(selectedId);\n return;\n }\n this.selectEditor(selectedIds);\n }\n\n private handleTreeBoundary(\n kind: 'pinned' | 'editors',\n direction: 'first' | 'last',\n ) {\n if (kind === 'pinned' && direction === 'last') {\n this.focusTree(\n 'editors',\n this.getTree('editors')?.getFirstNodeId() ?? null,\n );\n } else if (\n kind === 'editors' &&\n direction === 'first' &&\n this.searchValue.trim().length === 0\n ) {\n this.focusTree('pinned', this.getTree('pinned')?.getLastNodeId() ?? null);\n }\n }\n\n private activateKeyboardTarget() {\n if (!this.focusedTree) {\n if (\n this.shadowRoot?.activeElement?.localName ===\n 'oscd-outlined-search-field' &&\n flattenPluginEntries(\n filterBySearchTerm(this.editors, this.searchValue, this.locale),\n ).length === 1\n ) {\n this.dispatchEditorSelect(\n flattenPluginEntries(\n filterBySearchTerm(this.editors, this.searchValue, this.locale),\n )[0],\n );\n }\n return;\n }\n }\n\n /** Toggles the persisted expanded/collapsed state via the footer control. */\n private toggleExpanded() {\n if (this.isOpen) {\n this.expanded = false;\n this.exitSearchMode();\n } else {\n this.expanded = true;\n }\n }\n\n private toggleFlyout(anchorId: string) {\n const menu = this.shadowRoot?.querySelector<OscdMenu>(\n `oscd-menu[data-flyout=\"${anchorId}\"]`,\n );\n if (!menu) {\n return;\n }\n if (menu.open) {\n menu.close();\n } else {\n menu.show();\n }\n }\n\n renderPluginItem({\n node,\n level,\n disabled,\n active,\n }: TreeRenderContext<EditorPluginTreeNode>) {\n const label = node.translations?.[this.locale] ?? node.name;\n return html`<oscd-tree-item ?disabled=${disabled} ?active=${active}>\n ${level === 1 && !('kind' in node)\n ? html`<oscd-icon slot=\"start\">${node.icon}</oscd-icon>`\n : nothing}\n <span slot=\"headline\" title=${label}>${label}</span>\n </oscd-tree-item>`;\n }\n\n renderLeafAccessory({ node, id }: TreeRenderContext<EditorPluginTreeNode>) {\n const pinned = this.pinnedPluginIds.includes(id);\n return html`<button\n aria-label=${pinned\n ? msg(str`Unpin ${node.name}`)\n : msg(str`Pin ${node.name}`)}\n aria-pressed=${pinned}\n @click=${() => this.togglePin(id)}\n >\n <oscd-icon>${pinned ? pinnedIcon : unpinnedIcon}</oscd-icon>\n </button>`;\n }\n\n private renderExpanded() {\n return html`\n <div class=\"tree-container\">\n <oscd-outlined-search-field\n placeholder=${msg('Search')}\n clearLabel=${msg('Clear search')}\n .value=${this.searchValue}\n @input=${(event: InputEvent) => {\n this.searchValue = (event.target as OscdOutlinedSearchField).value;\n }}\n ></oscd-outlined-search-field>\n <div class=\"tree-scroll\">\n ${this.searchValue.trim().length === 0\n ? html`<oscd-tree\n .data=${this.pinnedTreeNodes}\n .expandedIds=${this.pinnedExpanded}\n .selectionMode=${'single'}\n .selectedIds=${this.selectedEditor\n ? [this.selectedEditor.tagName]\n : []}\n .isDisabled=${(node: EditorPluginTreeNode) =>\n 'kind' in node && node.kind === 'placeholder'}\n .isSelectable=${(node: EditorPluginTreeNode) =>\n !('kind' in node && node.kind === 'placeholder')}\n class=\"pinned-tree\"\n ?keyboard-active=${this.focusedTree === 'pinned'}\n @focusin=${() => this.handleTreeFocus('pinned')}\n .renderItem=${(\n context: TreeRenderContext<EditorPluginTreeNode>,\n ) => this.renderPluginItem(context)}\n .renderLeafAccessory=${(\n context: TreeRenderContext<EditorPluginTreeNode>,\n ) => this.renderLeafAccessory(context)}\n toggle-position=\"trailing\"\n collapse-icon=\"arrow_drop_up\"\n expand-icon=\"arrow_drop_down\"\n @selected-ids-changed=${(\n event: CustomEvent<{ selectedIds: string[] }>,\n ) =>\n this.handleTreeSelection(\n 'pinned',\n event.detail.selectedIds,\n )}\n @expanded-ids-changed=${(\n event: CustomEvent<{ expandedIds: string[] }>,\n ) => {\n this.pinnedExpanded = event.detail.expandedIds;\n }}\n @active-changed=${() =>\n this.handleTreeActiveChanged('pinned')}\n @navigation-boundary=${(\n event: CustomEvent<{ direction: 'first' | 'last' }>,\n ) =>\n this.handleTreeBoundary('pinned', event.detail.direction)}\n ></oscd-tree>\n <oscd-divider></oscd-divider>`\n : nothing}\n <oscd-tree\n class=\"editors-tree\"\n ?keyboard-active=${this.focusedTree === 'editors'}\n @focusin=${() => this.handleTreeFocus('editors')}\n .data=${this.editorTreeNodes}\n .expandedIds=${this.searchValue.length === 0\n ? this.expandedIds\n : this.editorTreeNodes.map(node => node.id)}\n .selectionMode=${'single'}\n .selectedIds=${this.selectedEditor\n ? [this.selectedEditor.tagName]\n : []}\n .isDisabled=${(node: EditorPluginTreeNode) =>\n 'kind' in node && node.kind === 'placeholder'}\n .isSelectable=${(node: EditorPluginTreeNode) =>\n !('kind' in node && node.kind === 'placeholder')}\n .renderItem=${(context: TreeRenderContext<EditorPluginTreeNode>) =>\n this.renderPluginItem(context)}\n .renderLeafAccessory=${(\n context: TreeRenderContext<EditorPluginTreeNode>,\n ) => this.renderLeafAccessory(context)}\n toggle-position=\"trailing\"\n collapse-icon=\"arrow_drop_down\"\n expand-icon=\"arrow_drop_up\"\n @selected-ids-changed=${(\n event: CustomEvent<{ selectedIds: string[] }>,\n ) => this.handleTreeSelection('editors', event.detail.selectedIds)}\n @expanded-ids-changed=${(\n event: CustomEvent<{ expandedIds: string[] }>,\n ) => {\n this.expandedIds = event.detail.expandedIds;\n }}\n @active-changed=${() => this.handleTreeActiveChanged('editors')}\n @navigation-boundary=${(\n event: CustomEvent<{ direction: 'first' | 'last' }>,\n ) => this.handleTreeBoundary('editors', event.detail.direction)}\n ></oscd-tree>\n </div>\n </div>\n `;\n }\n\n private renderRail() {\n const pinnedPlugins = flattenPluginEntries(\n filterByPinned(this.editors, this.pinnedPluginIds),\n );\n return html`\n <div class=\"rail\">\n <oscd-icon-button\n class=\"rail-item\"\n aria-label=${msg('Search')}\n @click=${() => this.enterSearchMode()}\n >\n <oscd-icon>search</oscd-icon>\n </oscd-icon-button>\n ${this.renderRailGroup(\n { name: msg('Pinned'), icon: 'keep', plugins: pinnedPlugins },\n 'pinned',\n true,\n )}\n <oscd-divider></oscd-divider>\n ${this.editors.map((entry, index) =>\n isPluginGroup(entry)\n ? this.renderRailGroup(entry, `group-${index}`)\n : this.renderRailLeaf(entry as PluginEntry),\n )}\n </div>\n `;\n }\n\n private renderRailGroup(\n group: PluginGroup,\n anchorId: string,\n showEmptyPlaceholder = false,\n ) {\n const label = group.translations?.[this.locale] ?? group.name;\n const active = group.plugins.some(\n plugin => plugin.tagName === this.selectedEditor?.tagName,\n );\n const anchor = `rail-${anchorId}`;\n return html`\n <oscd-icon-button\n id=${anchor}\n class=${classMap({ 'rail-item': true, active })}\n aria-haspopup=\"menu\"\n aria-label=${label}\n @click=${() => this.toggleFlyout(anchorId)}\n >\n <oscd-icon>${group.icon}</oscd-icon>\n </oscd-icon-button>\n <oscd-menu\n class=\"rail-flyout\"\n data-flyout=${anchorId}\n anchor=${anchor}\n anchor-corner=\"start-end\"\n menu-corner=\"start-start\"\n positioning=\"popover\"\n quick\n >\n <div class=\"flyout-header\" role=\"presentation\">${label}</div>\n <oscd-divider class=\"flyout-divider\"></oscd-divider>\n ${group.plugins.length > 0\n ? group.plugins.map(plugin => this.renderFlyoutItem(plugin))\n : showEmptyPlaceholder\n ? renderFlyoutPlaceholder()\n : nothing}\n </oscd-menu>\n `;\n }\n\n private renderRailLeaf(plugin: PluginEntry) {\n const label = plugin.translations?.[this.locale] ?? plugin.name;\n const active = plugin.tagName === this.selectedEditor?.tagName;\n return html`\n <oscd-icon-button\n class=${classMap({ 'rail-item': true, active })}\n aria-label=${label}\n @click=${() => this.dispatchEditorSelect(plugin)}\n >\n <oscd-icon>${plugin.icon}</oscd-icon>\n </oscd-icon-button>\n `;\n }\n\n private renderFlyoutItem(plugin: PluginEntry) {\n const label = plugin.translations?.[this.locale] ?? plugin.name;\n const selected = plugin.tagName === this.selectedEditor?.tagName;\n return html`\n <oscd-menu-item\n .selected=${selected}\n @click=${() => this.dispatchEditorSelect(plugin)}\n >\n <div slot=\"headline\">${label}</div>\n </oscd-menu-item>\n `;\n }\n\n private renderFooter() {\n const open = this.isOpen;\n const label = open ? msg('Collapse sidebar') : msg('Expand sidebar');\n const icon = open ? 'left_panel_close' : 'left_panel_open';\n return html`\n <div class=\"footer\">\n ${open\n ? html`<oscd-list-item\n class=\"toggle-button\"\n type=\"button\"\n aria-label=${label}\n @click=${() => this.toggleExpanded()}\n >\n <oscd-icon slot=\"start\">${icon}</oscd-icon>\n <span slot=\"headline\">${label}</span>\n </oscd-list-item>`\n : html`<oscd-icon-button\n class=\"toggle-button\"\n aria-label=${label}\n @click=${() => this.toggleExpanded()}\n >\n <oscd-icon>${icon}</oscd-icon>\n </oscd-icon-button>`}\n </div>\n `;\n }\n\n render() {\n return html`\n ${this.isOpen ? this.renderExpanded() : this.renderRail()}\n <oscd-divider class=\"footer-divider\"></oscd-divider>\n ${this.renderFooter()}\n `;\n }\n\n static styles = css`\n :host {\n /* Collapsed rail is the default width; the panel widens to its full width\n when persistently expanded OR while in transient search mode. The shell\n grid column follows this intrinsic width (grid-template-columns: auto). */\n width: var(--editor-plugins-panel-collapsed-width);\n height: calc(100% - var(--editor-plugins-panel-padding-top));\n display: grid;\n /* Row 1 (tree-container/rail) is the only scrollable region; the divider\n and footer rows are sized to content so they stay pinned and always\n visible below it, however tall the tree content grows. */\n grid-template-rows: 1fr auto auto;\n min-height: 0;\n padding-top: var(--editor-plugins-panel-padding-top);\n transition: width 0.1s ease-in-out;\n /* Clip transient horizontal overflow while the width animates on\n expand/collapse: the content swaps to its full width before the host\n finishes resizing, and this stops that from forcing horizontal reflow /\n scrollbar churn every animation frame. Steady-state label overrun is\n handled by the tree row ellipsis, not by this. */\n overflow-x: hidden;\n /* The panel paints its own surface color; it must never depend on\n page/body background showing through, or hosts that don't set a\n background image get a blank panel. */\n background-color: var(--editor-plugins-panel-background-color);\n }\n\n /* Material colour scheme for the panel's content. By default the panel's\n background-color (above) is the dark --oscd-primary surface, so its\n content is light (\"white\"/--oscd-base3) on a dark surface. We set the\n *system* colours once here — not each component's final colour — so\n resting text/icons AND every derived hover/pressed state layer resolve\n to the light content colour from one place. (The flyout menus are a\n light surface and reset these back to the shell defaults; see\n .rail-flyout.)\n\n NB: these are set on the content containers rather than :host on\n purpose. A :host declaration would sit on the same element that\n inherits --editor-plugins-panel-item-text-color, which is itself\n derived from --md-sys-color-on-surface; declaring on the containers\n keeps the source token a plain inherited value and so cannot form a\n reference cycle. See \"Layers are read upward\" in THEMING.md. */\n .rail,\n .tree-container,\n .footer {\n --md-sys-color-on-surface: var(--editor-plugins-panel-item-text-color);\n --md-sys-color-on-surface-variant: var(\n --editor-plugins-panel-item-icon-color\n );\n\n --md-sys-color-surface: var(--editor-plugins-panel-background-color);\n }\n\n :host([expanded]),\n :host([search-mode]) {\n width: var(--editor-plugins-panel-width);\n }\n\n /* Base divider styling, overridden by the more specific rail/flyout/footer\n dividers below where the Figma spec calls for different sizing. */\n oscd-divider {\n --md-divider-color: var(--editor-plugins-panel-divider-color);\n /* No margin: .tree-container's 12px gap owns the spacing on both sides. */\n margin-block: 0;\n }\n\n /* --- Expanded panel: search field + scrollable tree --- */\n\n .tree-container {\n margin-inline: 16px;\n min-width: 0;\n min-height: 0;\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n oscd-outlined-search-field * {\n --md-icon-button-state-layer-width: 32px;\n --md-icon-button-state-layer-height: 32px;\n --md-icon-button-state-layer-shape: 50%;\n }\n\n oscd-outlined-search-field {\n background-color: color-mix(\n in srgb,\n var(\n --md-outlined-text-field-input-text-color,\n var(--md-sys-color-on-surface, #1d1b20)\n )\n 20%,\n transparent\n );\n border-radius: 5px;\n --md-outlined-text-field-top-space: 6px;\n --md-outlined-text-field-bottom-space: 6px;\n --md-outlined-text-field-leading-space: 8px;\n --md-outlined-text-field-trailing-space: 8px;\n --md-outlined-text-field-with-leading-icon-leading-space: 10px;\n --md-outlined-field-with-trailing-content-trailing-space: 8px;\n --md-outlined-text-field-icon-input-space: 10px;\n --md-icon-button-state-layer-width: 32px;\n --md-icon-button-state-layer-height: 32px;\n --md-icon-button-state-layer-shape: 50%;\n\n --md-outlined-text-field-trailing-icon-size: 32px;\n\n --md-icon-button-icon-size: 24px;\n\n /* keep the outline light in every state */\n --md-outlined-text-field-focus-outline-color: var(\n --editor-plugins-panel-item-text-color\n );\n --md-outlined-text-field-hover-outline-color: var(\n --editor-plugins-panel-item-text-color\n );\n --md-outlined-text-field-outline-color: var(\n --editor-plugins-panel-item-text-color\n );\n /* hide the outline border entirely, in every state */\n --md-outlined-text-field-outline-width: 0px;\n --md-outlined-text-field-hover-outline-width: 0px;\n --md-outlined-text-field-focus-outline-width: 0px;\n\n /* caret follows the light text instead of the primary accent */\n --md-outlined-text-field-caret-color: var(\n --editor-plugins-panel-item-text-color\n );\n --md-outlined-text-field-focus-caret-color: var(\n --editor-plugins-panel-item-text-color\n );\n }\n\n .tree-scroll {\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-height: 0;\n overflow-y: auto;\n\n /* Recolour the scrollbar to sit on the panel's dark-blue surface instead\n of the browser's default light-themed bar. Firefox reads\n scrollbar-color; Chromium/Safari (and Firefox with the layout flag\n off) read the ::-webkit-scrollbar-* pseudo-elements below. */\n scrollbar-color: var(--editor-plugins-panel-divider-color) transparent;\n scrollbar-width: thin;\n }\n\n .tree-scroll::-webkit-scrollbar {\n width: 8px;\n }\n\n .tree-scroll::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .tree-scroll::-webkit-scrollbar-thumb {\n background-color: var(--editor-plugins-panel-divider-color);\n border-radius: 4px;\n }\n\n oscd-tree {\n margin-inline: 0;\n min-height: 0;\n /* .tree-scroll is the sole flex item allowed to shrink/scroll; without\n this, a too-short container shrinks each tree's box below its\n rendered content instead of letting the scroll container overflow,\n and the (unclipped) shadow-DOM rows bleed past the shrunk box into\n whichever tree follows. */\n flex-shrink: 0;\n --oscd-tree-row-height: 36px;\n --oscd-tree-item-min-height: 36px;\n --oscd-tree-row-gap: 4px;\n --oscd-tree-row-padding-start: 8px;\n --oscd-tree-row-padding-end: 8px;\n --oscd-tree-indent-step: 36px;\n --oscd-tree-row-shape: 5px;\n --oscd-tree-toggle-icon-size: 28px;\n --oscd-tree-trailing-toggle-gap: 8px;\n /* Pin accessory hidden at rest, revealed on row hover / keyboard focus\n (see Figma side-panel spec); its icon size inherits the 28px toggle. */\n --oscd-tree-accessory-rest-opacity: 0;\n --md-icon-size: var(--editor-plugins-panel-item-icon-size);\n /* oscd-tree-item colours its leading/trailing icon slots explicitly\n (not via inherited 'color'), so — unlike the label — they don't\n automatically pick up the selected-row text colour above. Tying them\n to currentColor makes the icon track whatever colour the row itself\n resolves to (resting on-surface ink, or the active/selected colour),\n matching the label in both states. */\n --oscd-tree-item-leading-icon-color: currentColor;\n --oscd-tree-item-trailing-icon-color: currentColor;\n --oscd-tree-row-selected-color: var(\n --editor-plugins-panel-item-active-bg\n );\n --oscd-tree-row-selected-text-color: var(\n --editor-plugins-panel-item-active-color\n );\n --oscd-tree-row-active-border-width: 0px;\n /* The keyboard-active row highlight (outline + optional text override)\n must stay visible whether that row is merely keyboard-highlighted at\n rest (panel surface bg, on-surface ink text) or also selected\n (--editor-plugins-panel-item-active-bg, active-color text). Using\n currentColor/inherit ties the outline and text to whichever of those\n two colours the row already resolves to, instead of hardcoding the\n selected-row colour (which vanishes against the resting surface). */\n --oscd-tree-row-active-border-color: currentColor;\n --oscd-tree-row-active-text-color: inherit;\n --oscd-tree-row-focus-ring-color: currentColor;\n }\n\n oscd-tree.keyboard-active {\n --oscd-tree-row-active-border-width: 1px;\n }\n\n oscd-tree.pinned-tree {\n --oscd-tree-leaf-toggle-size: 0px;\n --oscd-tree-leaf-toggle-gap: 0px;\n }\n\n /* --- Collapsed icon rail --- */\n\n /* Collapsed icon rail: a flat column of 44px icon buttons (28px glyph + 8px\n padding), inset 16px so the glyphs land at the same x (24px) as both the\n search icon and the tree-item icons in the expanded panel. */\n .rail {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding-inline: 16px;\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n }\n\n .rail-item {\n --md-icon-button-icon-size: 28px;\n --md-icon-button-state-layer-height: 44px;\n --md-icon-button-state-layer-width: 44px;\n border-radius: 5px;\n }\n\n /* Active group/editor: dark rounded square behind the glyph. */\n .rail-item.active {\n background: var(--editor-plugins-panel-item-active-bg);\n }\n\n .rail oscd-divider {\n /* 44px wide (aligned with the icon column), 12px clearance above and\n below, per the Figma collapsed spec. */\n width: 44px;\n margin-block: 12px;\n --md-divider-color: var(--editor-plugins-panel-divider-color);\n }\n\n /* Flyout menu opened from a collapsed group icon. Figma \"Links container\":\n padding 8px, gap 4px, 1px border, 5px radius, light surface + shadow.\n Unlike the rest of the panel this is a LIGHT surface, so it resets the\n system colours back to the shell defaults (dark content on a light\n surface); everything inside then derives correctly. */\n .rail-flyout {\n --md-sys-color-surface: var(--plugins-menu-container-color);\n --md-sys-color-surface-container: var(--plugins-menu-container-color);\n --md-sys-color-on-surface: var(--plugins-menu-item-label-color);\n --md-sys-color-on-surface-variant: var(\n --plugins-menu-item-leading-icon-color\n );\n --md-menu-container-color: var(--plugins-menu-container-color);\n min-width: 200px;\n }\n\n .flyout-header {\n /* Group name heading: Material label-large, in the secondary blue, per the\n Figma \"Links container\" header. */\n padding: 8px 12px;\n font-family: var(--oscd-text-font, Roboto), sans-serif;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: 0.1px;\n color: var(--editor-plugins-panel-flyout-header-text-color);\n }\n\n .rail-flyout .flyout-divider {\n /* Separates the group heading from its editor items. */\n --md-divider-color: var(--editor-plugins-panel-divider-color);\n margin-block: 4px;\n width: 80%;\n margin: auto;\n }\n\n .rail-flyout oscd-menu-item {\n width: 100%;\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 /* --- Footer: collapse/expand toggle --- */\n\n .footer-divider {\n padding-inline: 16px;\n margin-block: 12px 0;\n }\n\n .footer {\n /* Persistent collapse/expand control, bottom-left in both modes. The 16px\n inline inset matches the tree-container (so the expanded list-item spans\n the same width as the rows) and the rail items; 16px below is the Figma\n bottom margin. */\n display: flex;\n align-items: center;\n justify-content: flex-start;\n padding-inline: 16px;\n padding-block: 0 16px;\n }\n\n /* Expanded: an interactive list item so it reads as \"one more row\" — full\n width with a full-width hover/ripple state layer, left-aligned, no\n container fill at rest. 8px leading space lands the 28px glyph at x24,\n exactly like the search field and tree rows above it. */\n oscd-list-item.toggle-button {\n width: 100%;\n border-radius: 5px;\n --md-list-item-leading-space: 8px;\n --md-list-item-trailing-space: 8px;\n --md-list-item-one-line-container-height: 40px;\n --md-list-item-top-space: 8px;\n --md-list-item-bottom-space: 8px;\n --md-list-item-label-text-size: 16px;\n }\n\n oscd-list-item.toggle-button oscd-icon[slot='start'] {\n /* Every icon in the side panel is 28px (matches the tree icons). */\n --md-icon-size: 28px;\n }\n\n /* Collapsed rail: icon-only toggle, matching the rail items (44px target,\n 28px glyph, glyph lands at x24 like the other rail icons). */\n oscd-icon-button.toggle-button {\n --md-icon-button-icon-size: 28px;\n --md-icon-button-state-layer-height: 44px;\n --md-icon-button-state-layer-width: 44px;\n }\n `;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omicronenergy/oscd-shell",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "The shell component of OpenSCD, where plugins are loaded and the application is initialized.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@lit/localize-tools": "^0.8.1",
|
|
75
75
|
"@open-wc/dev-server-hmr": "^0.2.0",
|
|
76
76
|
"@open-wc/eslint-config": "^13.0.0",
|
|
77
|
-
"@open-wc/testing": "^
|
|
77
|
+
"@open-wc/testing": "^5.0.0",
|
|
78
78
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
79
79
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
80
80
|
"@types/mocha": "^10.0.10",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@web/dev-server-polyfill": "^1.0.6",
|
|
86
86
|
"@web/rollup-plugin-html": "^3.1.0",
|
|
87
87
|
"@web/rollup-plugin-import-meta-assets": "^2.3.3",
|
|
88
|
-
"@web/test-runner": "^0.
|
|
88
|
+
"@web/test-runner": "^1.0.0",
|
|
89
89
|
"@web/test-runner-commands": "^0.9.0",
|
|
90
90
|
"@web/test-runner-playwright": "^0.11.1",
|
|
91
91
|
"@web/test-runner-visual-regression": "^0.10.0",
|