j20 0.0.21 → 0.0.23

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.
package/dist/index.d.ts CHANGED
@@ -4628,7 +4628,9 @@ type WC<P extends Record<string, string | boolean | number> = {}, E extends Reco
4628
4628
  } & P & {
4629
4629
  [K in keyof E as `on${Capitalize<K & string>}`]: (e: E[K]) => void;
4630
4630
  }) => JSX.Element);
4631
- type ExtractClasses<T extends string> = T extends `${string}.${infer Name} {${infer Body}${infer _Brace}${infer Rest}` ? Name | ExtractClasses<Body> | ExtractClasses<Rest> : T extends `${string}\n${infer Rest}` ? ExtractClasses<Rest> : never;
4631
+ type InvalidClassNameChar = " " | ";" | ":" | "{" | "}" | "\n" | "\t" | "(" | ")" | "," | '"' | "'";
4632
+ type HasInvalidChar<S extends string> = S extends `${string}${InvalidClassNameChar}${string}` ? true : false;
4633
+ type ExtractClasses<T extends string> = T extends `${infer _Before}.${infer Name} {${infer Body}${infer _Brace}${infer Rest}` ? HasInvalidChar<Name> extends true ? ExtractClasses<`${Name} {${Body}${_Brace}${Rest}`> : Name | ExtractClasses<Body> | ExtractClasses<Rest> : T extends `${string}\n${infer Rest}` ? ExtractClasses<Rest> : never;
4632
4634
 
4633
4635
  interface SignalLike<T = any> {
4634
4636
  value: T;
@@ -4643,7 +4645,7 @@ declare abstract class WebComponentClass extends HTMLElement {
4643
4645
  }
4644
4646
 
4645
4647
  declare const wc: () => {
4646
- host: WebComponentClass;
4648
+ host: Document | WebComponentClass | ShadowRoot;
4647
4649
  emit: (name: string, detail: any) => void;
4648
4650
  onConnectedCallback: (callback: () => void) => void;
4649
4651
  onDisconnectedCallback: (callback: () => void) => void;
@@ -4680,7 +4682,7 @@ declare const onMount: (callback: () => (() => void) | void) => void;
4680
4682
  declare const onDestroy: (callback: () => void) => _j20org_signal.Effect;
4681
4683
 
4682
4684
  declare const createCss: <T extends string>(css: T) => () => { [K in ExtractClasses<T>]: string; };
4683
- declare const styleSheet: (id: string, css?: string) => CSSStyleSheet;
4685
+ declare const styleSheet: (css: string, id?: string) => void;
4684
4686
 
4685
4687
  interface ListProps<T> {
4686
4688
  of: T[];
@@ -4741,8 +4743,7 @@ interface Instance {
4741
4743
  parent?: Instance;
4742
4744
  id: string;
4743
4745
  range: Text[];
4744
- root?: Element;
4745
- host?: WebComponentClass;
4746
+ host: WebComponentClass | Document | ShadowRoot;
4746
4747
  disposes?: (() => void)[];
4747
4748
  children?: Instance[];
4748
4749
  mounts?: (() => void)[];