@ng-desktop/platform 0.4.1 → 0.6.0

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.
@@ -163,6 +163,7 @@ export function ensureNgNativeBridge() {
163
163
  },
164
164
  setSystemTheme(theme) {
165
165
  systemTheme = theme === 'light' ? 'light' : 'dark';
166
+ emit(`theme ${systemTheme}`);
166
167
  },
167
168
  getClipboard() {
168
169
  return clipboardText;
@@ -1,4 +1,5 @@
1
1
  import { NgNativeBridge } from './bridge';
2
+ export type SupportedMediaTheme = 'light' | 'dark';
2
3
  export interface ParsedStyleRule {
3
4
  className: string;
4
5
  background: string;
@@ -18,16 +19,23 @@ export interface ParsedStyleRule {
18
19
  minChildren: number | null;
19
20
  maxChildren: number | null;
20
21
  homogeneous: boolean | null;
22
+ pseudoClass: string | null;
23
+ mediaTheme: SupportedMediaTheme | null;
24
+ mediaMinWidth: number | null;
25
+ mediaMaxWidth: number | null;
26
+ opacity: number | null;
27
+ transitionMs: number | null;
28
+ transitionProp: string | null;
21
29
  }
22
30
  export declare function parsePixelInt(raw: string): number | null;
23
31
  export declare function mapAlignKeyword(raw: string): string | null;
24
32
  /**
25
33
  * Parses component CSS rules at runtime into `ParsedStyleRule` descriptors compatible with
26
- * the Rust engine's CSS Flexbox/Grid and typography/radius extension syntax.
34
+ * the Rust engine's CSS Flexbox/Grid, pseudo-classes, `@media`, variables, and encapsulation syntax.
27
35
  */
28
36
  export declare function parseRuntimeStyles(cssSource: string): ParsedStyleRule[];
29
37
  /**
30
- * Formats optional `ParsedStyleRule` layout/typography fields as space-separated `key=value` tokens.
38
+ * Formats optional `ParsedStyleRule` layout/typography/media/pseudo fields as space-separated `key=value` tokens.
31
39
  */
32
40
  export declare function formatParsedStyleExtensions(rule: ParsedStyleRule): string;
33
- export declare function registerParsedStyles(bridge: NgNativeBridge, styles: readonly string[]): void;
41
+ export declare function registerParsedStyles(bridge: NgNativeBridge, styles: readonly string[], scopedClassesByScope?: Map<string, Set<string>>): void;