@@ -33,8 +33,7 @@ import { StringValue } from "../types/primitives.js";
3333import { Theme , AnyComponentNode , SurfaceID } from "../types/types.js" ;
3434import { themeContext } from "./context/theme.js" ;
3535import { structuralStyles } from "./styles.js" ;
36- import { ComponentRegistry , REGISTRY } from './component-registry.js' ;
37- import { ThemeManager } from "./theme/manager.js" ;
36+ import { componentRegistry } from "./component-registry.js" ;
3837
3938type NodeOfType < T extends AnyComponentNode [ "type" ] > = Extract <
4039 AnyComponentNode ,
@@ -82,6 +81,7 @@ export class Root extends SignalWatcher(LitElement) {
8281 css `
8382 :host {
8483 display: flex;
84+ flex-direction: column;
8585 gap: 8px;
8686 max-height: 80%;
8787 }
@@ -94,23 +94,6 @@ export class Root extends SignalWatcher(LitElement) {
9494 */
9595 #lightDomEffectDisposer: null | ( ( ) => void ) = null ;
9696
97- #themeUnsubscribe: null | ( ( ) => void ) = null ;
98-
99- connectedCallback ( ) {
100- super . connectedCallback ( ) ;
101- this . #themeUnsubscribe = ThemeManager . subscribe ( ( sheets ) => {
102- if ( this . shadowRoot ) {
103- const elementStyles = ( this . constructor as typeof LitElement ) . elementStyles ;
104- const baseStyles = elementStyles . map ( s => {
105- if ( s instanceof CSSStyleSheet ) return s ;
106- return s . styleSheet ;
107- } ) . filter ( ( s ) : s is CSSStyleSheet => ! ! s ) ;
108-
109- this . shadowRoot . adoptedStyleSheets = [ ...baseStyles , ...sheets ] ;
110- }
111- } ) ;
112- }
113-
11497 protected willUpdate ( changedProperties : PropertyValues < this> ) : void {
11598 if ( changedProperties . has ( "childComponents" ) ) {
11699 if ( this . #lightDomEffectDisposer) {
@@ -140,10 +123,6 @@ export class Root extends SignalWatcher(LitElement) {
140123 if ( this . #lightDomEffectDisposer) {
141124 this . #lightDomEffectDisposer( ) ;
142125 }
143-
144- if ( this . #themeUnsubscribe) {
145- this . #themeUnsubscribe( ) ;
146- }
147126 }
148127
149128 /**
@@ -163,7 +142,7 @@ export class Root extends SignalWatcher(LitElement) {
163142 return html ` ${ map ( components , ( component ) => {
164143 // 1. Check if there is a registered custom component or override.
165144 if ( this . enableCustomElements ) {
166- const registeredCtor = REGISTRY . get ( component . type ) ;
145+ const registeredCtor = componentRegistry . get ( component . type ) ;
167146 // We also check customElements.get for non-registered but defined elements
168147 const elCtor = registeredCtor || customElements . get ( component . type ) ;
169148
@@ -522,7 +501,7 @@ export class Root extends SignalWatcher(LitElement) {
522501 }
523502
524503 const node = component as AnyComponentNode ;
525- const registeredCtor = REGISTRY . get ( component . type ) ;
504+ const registeredCtor = componentRegistry . get ( component . type ) ;
526505 const elCtor = registeredCtor || customElements . get ( component . type ) ;
527506
528507 if ( ! elCtor ) {
0 commit comments