@umber-style/react 0.1.0-alpha.0 → 0.1.0-alpha.1

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.
Files changed (69) hide show
  1. package/dist/CacheProvider.cjs +23 -0
  2. package/dist/CacheProvider.d.cts +10 -0
  3. package/dist/CacheProvider.d.mts +11 -0
  4. package/dist/CacheProvider.mjs +22 -0
  5. package/dist/Global.cjs +52 -0
  6. package/dist/Global.mjs +52 -0
  7. package/dist/Global.server.cjs +27 -0
  8. package/dist/Global.server.mjs +27 -0
  9. package/dist/GlobalRelease.cjs +32 -0
  10. package/dist/GlobalRelease.mjs +30 -0
  11. package/dist/ProviderScope.cjs +201 -0
  12. package/dist/ProviderScope.d.cts +14 -0
  13. package/dist/ProviderScope.d.mts +15 -0
  14. package/dist/ProviderScope.mjs +190 -0
  15. package/dist/ThemeProvider.cjs +94 -27
  16. package/dist/ThemeProvider.mjs +95 -28
  17. package/dist/ThemeProvider.server.cjs +130 -25
  18. package/dist/ThemeProvider.server.mjs +131 -26
  19. package/dist/ThemeValue.cjs +52 -20
  20. package/dist/ThemeValue.d.cts +3 -0
  21. package/dist/ThemeValue.d.mts +4 -0
  22. package/dist/ThemeValue.mjs +53 -23
  23. package/dist/_virtual/_rolldown/runtime.cjs +22 -0
  24. package/dist/createStyle.cjs +30 -20
  25. package/dist/createStyle.d.cts +4 -2
  26. package/dist/createStyle.d.mts +4 -2
  27. package/dist/createStyle.mjs +32 -22
  28. package/dist/createStyle.server.cjs +29 -22
  29. package/dist/createStyle.server.mjs +31 -24
  30. package/dist/defaultStyle.cjs +27 -3
  31. package/dist/defaultStyle.d.cts +18 -11
  32. package/dist/defaultStyle.d.mts +18 -11
  33. package/dist/defaultStyle.mjs +28 -4
  34. package/dist/defaultStyle.server.cjs +13 -5
  35. package/dist/defaultStyle.server.d.cts +16 -11
  36. package/dist/defaultStyle.server.d.mts +16 -11
  37. package/dist/defaultStyle.server.mjs +14 -6
  38. package/dist/domProps.cjs +27 -0
  39. package/dist/domProps.mjs +27 -0
  40. package/dist/index.cjs +12 -1
  41. package/dist/index.d.cts +17 -7
  42. package/dist/index.d.mts +17 -7
  43. package/dist/index.mjs +4 -2
  44. package/dist/index.server.cjs +6 -1
  45. package/dist/index.server.d.cts +15 -7
  46. package/dist/index.server.d.mts +15 -7
  47. package/dist/index.server.mjs +2 -2
  48. package/dist/plainTheme.cjs +49 -0
  49. package/dist/plainTheme.mjs +49 -0
  50. package/dist/serverContext.cjs +6 -24
  51. package/dist/serverContext.d.mts +0 -1
  52. package/dist/serverContext.mjs +6 -23
  53. package/dist/styleElements.cjs +75 -9
  54. package/dist/styleElements.d.cts +1 -0
  55. package/dist/styleElements.d.mts +2 -0
  56. package/dist/styleElements.mjs +73 -10
  57. package/dist/styled.cjs +32 -11
  58. package/dist/styled.mjs +33 -12
  59. package/dist/styled.server.cjs +6 -4
  60. package/dist/styled.server.mjs +6 -4
  61. package/dist/styledParts.cjs +36 -6
  62. package/dist/styledParts.mjs +37 -7
  63. package/dist/types.d.cts +191 -18
  64. package/dist/types.d.mts +191 -18
  65. package/dist/useMediaQuery.cjs +20 -0
  66. package/dist/useMediaQuery.d.cts +13 -0
  67. package/dist/useMediaQuery.d.mts +13 -0
  68. package/dist/useMediaQuery.mjs +20 -0
  69. package/package.json +3 -3
@@ -1,46 +1,53 @@
1
- import { NO_THEME_MESSAGE, createEngine, isThemedSheet, mergeDeep } from "@umber-style/core";
2
- import { createServerOnlyContext, readServerContext } from "./serverContext.mjs";
1
+ import { EMPTY_THEME, createCssEntry, createEngine, globalStyles, isDevelopment, isThemedSheet } from "@umber-style/core";
2
+ import { createGlobal } from "./Global.server.mjs";
3
+ import { createRequestSlot } from "./serverContext.mjs";
3
4
  import { createStyled } from "./styled.server.mjs";
4
5
  import { createThemeProvider } from "./ThemeProvider.server.mjs";
5
6
  // src/createStyle.server.ts
6
7
  /** Makes the styling for server components over an engine; `cache` makes the slot of a request, `React.cache` unless a test gives one. */
7
8
  function bindEngine(engine, cache) {
8
- const root = createServerOnlyContext(void 0, cache);
9
- const stamp = createServerOnlyContext(false, cache);
10
- const merged = /* @__PURE__ */ new WeakMap();
11
- /** The root theme of the request, or the base theme of the engine; throws when there is neither. */
12
- const readTheme = () => {
13
- const rootTheme = readServerContext(root);
14
- const base = engine.baseTheme;
15
- if (rootTheme === void 0) {
16
- if (base === void 0) throw new Error(NO_THEME_MESSAGE);
17
- return base;
9
+ const readFirstSlot = createRequestSlot(void 0, cache);
10
+ let hasWarned = false;
11
+ const readBaseTheme = () => engine.baseTheme ?? EMPTY_THEME;
12
+ /**
13
+ * The base theme: the one given to `createStyle(theme)` or `configure({ theme })`, the same in every
14
+ * render of every request, whatever providers render. With none, an empty object, and one warning in
15
+ * development. A server component cannot see the providers above it: what needs the nearest theme's
16
+ * values is a client component, whose `useTheme()` reads them.
17
+ */
18
+ const useTheme = () => {
19
+ if (engine.baseTheme === void 0 && !hasWarned && isDevelopment()) {
20
+ hasWarned = true;
21
+ console.warn(`[${engine.cache.prefix}] useTheme() in a server component returns the base theme, and there is none: give the theme to createStyle(theme) or configure({ theme }) to read it in server components. It returns an empty object.`);
18
22
  }
19
- if (rootTheme === base) return rootTheme;
20
- let theme = merged.get(rootTheme);
21
- if (theme === void 0) {
22
- theme = mergeDeep(base, rootTheme);
23
- merged.set(rootTheme, theme);
24
- }
25
- return theme;
23
+ return readBaseTheme();
26
24
  };
25
+ const readViewTheme = () => engine.baseTheme ?? readFirstSlot().current ?? EMPTY_THEME;
27
26
  const themeClass = (partial, colorScheme) => engine.themeClass(partial, colorScheme);
28
- const useStyle = ((sheet) => isThemedSheet(sheet) ? sheet.resolve(engine.createThemeView(readTheme())) : sheet);
27
+ const useStyle = ((sheet) => isThemedSheet(sheet) ? sheet.resolve(engine.createThemeView(readViewTheme())) : sheet);
29
28
  function create(styles) {
30
29
  return engine.createSheet(styles);
31
30
  }
32
31
  return {
33
32
  engine,
34
33
  cache: engine.cache,
35
- styled: createStyled(engine, readTheme),
34
+ styled: createStyled(engine, readViewTheme),
36
35
  StyleSheet: { create },
37
36
  useStyle,
38
37
  apply: (...entries) => ({ className: engine.css(...entries) || void 0 }),
39
- ThemeProvider: createThemeProvider(engine, root, stamp),
40
- readTheme,
38
+ css: ((...args) => createCssEntry(engine.cache, args)),
39
+ ThemeProvider: createThemeProvider(engine, {
40
+ readFirstSlot,
41
+ readBaseTheme
42
+ }),
43
+ useTheme,
44
+ readTheme: useTheme,
41
45
  themeClass,
42
46
  when: engine.when,
43
- whenScheme: engine.whenScheme
47
+ whenScheme: engine.whenScheme,
48
+ keyframes: engine.keyframes,
49
+ globalStyles,
50
+ Global: createGlobal(engine, readViewTheme)
44
51
  };
45
52
  }
46
53
  /** Makes the styling for server components of one theme shape: its own engine, or the one given. */
@@ -1,24 +1,32 @@
1
1
  let _umber_style_core = require("@umber-style/core");
2
2
  const require_createStyle = require("./createStyle.cjs");
3
+ const require_ProviderScope = require("./ProviderScope.cjs");
3
4
  // src/defaultStyle.ts
4
5
  /** Makes the default styling: one engine, made on first use, behind `styled`, `ThemeProvider` and the rest. */
5
6
  function createDefaultStyle() {
6
7
  let pending = {};
7
8
  let bound;
9
+ const contexts = require_ProviderScope.createThemeContexts();
8
10
  const getStyle = () => {
9
11
  if (!bound) {
10
12
  const engine = pending.engine ?? (0, _umber_style_core.createLazyEngine)(pending);
11
13
  if (pending.theme) engine.setTheme(pending.theme);
12
- bound = require_createStyle.bindEngine(engine, pending);
14
+ bound = require_createStyle.bindEngine(engine, pending, contexts);
13
15
  }
14
16
  return bound;
15
17
  };
18
+ require_ProviderScope.claimPrefixStyle(() => bound?.cache.prefix ?? pending.engine?.cache.prefix ?? pending.cache?.prefix ?? pending.prefix ?? "css", {
19
+ contexts,
20
+ holder: { get baseTheme() {
21
+ return bound?.engine.baseTheme ?? pending.theme ?? pending.engine?.baseTheme;
22
+ } }
23
+ });
16
24
  /** Sets the options of the default engine, and gives it a base theme or an engine to share. Throws once the default style was used. */
17
25
  function configure(options) {
18
26
  if (bound) throw new Error("configure must be called before the default style is used.");
19
27
  pending = options;
20
28
  }
21
- const styled = ((tag, options) => getStyle().styled(tag, options));
29
+ const styled = (0, _umber_style_core.withTagShorthands)(((tag, options) => getStyle().styled(tag, options)));
22
30
  const StyleSheet = { create: ((styles) => typeof styles === "function" ? getStyle().StyleSheet.create(styles) : (0, _umber_style_core.createDeferredRecord)(styles, () => getStyle().StyleSheet.create(styles))) };
23
31
  const useStyle = ((sheet) => getStyle().useStyle(sheet));
24
32
  function useTheme() {
@@ -27,6 +35,15 @@ function createDefaultStyle() {
27
35
  function ThemeProvider(props) {
28
36
  return getStyle().ThemeProvider(props);
29
37
  }
38
+ function Global(props) {
39
+ return getStyle().Global(props);
40
+ }
41
+ function ThemeScope(props) {
42
+ return getStyle().ThemeScope(props);
43
+ }
44
+ function useThemeClass() {
45
+ return getStyle().useThemeClass();
46
+ }
30
47
  return {
31
48
  configure,
32
49
  getEngine: () => getStyle().engine,
@@ -35,10 +52,17 @@ function createDefaultStyle() {
35
52
  useStyle,
36
53
  useTheme,
37
54
  ThemeProvider,
55
+ ThemeScope,
56
+ useThemeClass,
57
+ ThemeContext: contexts.ThemeContext,
38
58
  apply: ((...entries) => getStyle().apply(...entries)),
59
+ css: ((...args) => (0, _umber_style_core.createDeferredObject)(() => getStyle().css(...args))),
39
60
  when: ((theme, colorScheme) => getStyle().when(theme, colorScheme)),
40
61
  whenScheme: ((scheme) => getStyle().whenScheme(scheme)),
41
- themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme))
62
+ themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme)),
63
+ keyframes: _umber_style_core.keyframes,
64
+ globalStyles: _umber_style_core.globalStyles,
65
+ Global
42
66
  };
43
67
  }
44
68
  exports.createDefaultStyle = createDefaultStyle;
@@ -1,22 +1,29 @@
1
- import { DefaultStyleOptions, SheetDefinition, Styled, WebStyle, WebThemeProviderProps } from "./types.cjs";
2
- import { Theme, WebStyleObject } from "@umber-style/core";
1
+ import { DefaultStyleOptions, GlobalProps, SheetDefinition, Styled, Theme as Theme$1, ThemeScopeProps, WebStyle, WebThemeProviderProps } from "./types.cjs";
2
+ import { WebStyleObject } from "@umber-style/core";
3
3
  /** Makes the default styling: one engine, made on first use, behind `styled`, `ThemeProvider` and the rest. */
4
4
  export declare function createDefaultStyle(): {
5
5
  configure: (options: DefaultStyleOptions) => void;
6
- getEngine: () => import("@umber-style/core").Engine<Theme>;
7
- styled: Styled<Theme>;
6
+ getEngine: () => import("@umber-style/core").Engine<Theme$1>;
7
+ styled: Styled<Theme$1>;
8
8
  StyleSheet: {
9
9
  create<K extends string>(styles: import("@umber-style/core").ObjectSheet<K>): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
10
- create<K extends string>(styles: (theme: Theme) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
10
+ create<K extends string>(styles: (theme: Theme$1) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
11
11
  };
12
12
  useStyle: {
13
13
  <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
14
14
  <S extends import("@umber-style/core").SheetStyles>(sheet: SheetDefinition<S, import("@umber-style/core").SheetEntry>): { [K in keyof S]: import("@umber-style/core").SheetEntry; };
15
15
  };
16
- useTheme: () => Theme;
17
- ThemeProvider: (props: WebThemeProviderProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
18
- apply: WebStyle<Theme>['apply'];
19
- when: WebStyle<Theme>['when'];
20
- whenScheme: WebStyle<Theme>['whenScheme'];
21
- themeClass: WebStyle<Theme>['themeClass'];
16
+ useTheme: () => Theme$1;
17
+ ThemeProvider: (props: WebThemeProviderProps<Theme$1>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
18
+ ThemeScope: (props: ThemeScopeProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
19
+ useThemeClass: () => string | undefined;
20
+ ThemeContext: import("react").Context<Theme$1 | undefined>;
21
+ apply: WebStyle<Theme$1>['apply'];
22
+ css: WebStyle<Theme$1>['css'];
23
+ when: WebStyle<Theme$1>['when'];
24
+ whenScheme: WebStyle<Theme$1>['whenScheme'];
25
+ themeClass: WebStyle<Theme$1>['themeClass'];
26
+ keyframes: WebStyle<Theme$1>['keyframes'];
27
+ globalStyles: WebStyle<Theme$1>['globalStyles'];
28
+ Global: (props: GlobalProps<Theme$1>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
22
29
  };
@@ -1,22 +1,29 @@
1
- import { DefaultStyleOptions, SheetDefinition, Styled, WebStyle, WebThemeProviderProps } from "./types.mjs";
2
- import { Theme, WebStyleObject } from "@umber-style/core";
1
+ import { DefaultStyleOptions, GlobalProps, SheetDefinition, Styled, Theme as Theme$1, ThemeScopeProps, WebStyle, WebThemeProviderProps } from "./types.mjs";
2
+ import { WebStyleObject } from "@umber-style/core";
3
3
  /** Makes the default styling: one engine, made on first use, behind `styled`, `ThemeProvider` and the rest. */
4
4
  export declare function createDefaultStyle(): {
5
5
  configure: (options: DefaultStyleOptions) => void;
6
- getEngine: () => import("@umber-style/core").Engine<Theme>;
7
- styled: Styled<Theme>;
6
+ getEngine: () => import("@umber-style/core").Engine<Theme$1>;
7
+ styled: Styled<Theme$1>;
8
8
  StyleSheet: {
9
9
  create<K extends string>(styles: import("@umber-style/core").ObjectSheet<K>): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
10
- create<K extends string>(styles: (theme: Theme) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
10
+ create<K extends string>(styles: (theme: Theme$1) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
11
11
  };
12
12
  useStyle: {
13
13
  <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
14
14
  <S extends import("@umber-style/core").SheetStyles>(sheet: SheetDefinition<S, import("@umber-style/core").SheetEntry>): { [K in keyof S]: import("@umber-style/core").SheetEntry; };
15
15
  };
16
- useTheme: () => Theme;
17
- ThemeProvider: (props: WebThemeProviderProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
18
- apply: WebStyle<Theme>['apply'];
19
- when: WebStyle<Theme>['when'];
20
- whenScheme: WebStyle<Theme>['whenScheme'];
21
- themeClass: WebStyle<Theme>['themeClass'];
16
+ useTheme: () => Theme$1;
17
+ ThemeProvider: (props: WebThemeProviderProps<Theme$1>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
18
+ ThemeScope: (props: ThemeScopeProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
19
+ useThemeClass: () => string | undefined;
20
+ ThemeContext: import("react").Context<Theme$1 | undefined>;
21
+ apply: WebStyle<Theme$1>['apply'];
22
+ css: WebStyle<Theme$1>['css'];
23
+ when: WebStyle<Theme$1>['when'];
24
+ whenScheme: WebStyle<Theme$1>['whenScheme'];
25
+ themeClass: WebStyle<Theme$1>['themeClass'];
26
+ keyframes: WebStyle<Theme$1>['keyframes'];
27
+ globalStyles: WebStyle<Theme$1>['globalStyles'];
28
+ Global: (props: GlobalProps<Theme$1>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
22
29
  };
@@ -1,24 +1,32 @@
1
- import { createDeferredRecord, createLazyEngine } from "@umber-style/core";
1
+ import { createDeferredObject, createDeferredRecord, createLazyEngine, globalStyles, keyframes, withTagShorthands } from "@umber-style/core";
2
2
  import { bindEngine } from "./createStyle.mjs";
3
+ import { claimPrefixStyle, createThemeContexts } from "./ProviderScope.mjs";
3
4
  // src/defaultStyle.ts
4
5
  /** Makes the default styling: one engine, made on first use, behind `styled`, `ThemeProvider` and the rest. */
5
6
  function createDefaultStyle() {
6
7
  let pending = {};
7
8
  let bound;
9
+ const contexts = createThemeContexts();
8
10
  const getStyle = () => {
9
11
  if (!bound) {
10
12
  const engine = pending.engine ?? createLazyEngine(pending);
11
13
  if (pending.theme) engine.setTheme(pending.theme);
12
- bound = bindEngine(engine, pending);
14
+ bound = bindEngine(engine, pending, contexts);
13
15
  }
14
16
  return bound;
15
17
  };
18
+ claimPrefixStyle(() => bound?.cache.prefix ?? pending.engine?.cache.prefix ?? pending.cache?.prefix ?? pending.prefix ?? "css", {
19
+ contexts,
20
+ holder: { get baseTheme() {
21
+ return bound?.engine.baseTheme ?? pending.theme ?? pending.engine?.baseTheme;
22
+ } }
23
+ });
16
24
  /** Sets the options of the default engine, and gives it a base theme or an engine to share. Throws once the default style was used. */
17
25
  function configure(options) {
18
26
  if (bound) throw new Error("configure must be called before the default style is used.");
19
27
  pending = options;
20
28
  }
21
- const styled = ((tag, options) => getStyle().styled(tag, options));
29
+ const styled = withTagShorthands(((tag, options) => getStyle().styled(tag, options)));
22
30
  const StyleSheet = { create: ((styles) => typeof styles === "function" ? getStyle().StyleSheet.create(styles) : createDeferredRecord(styles, () => getStyle().StyleSheet.create(styles))) };
23
31
  const useStyle = ((sheet) => getStyle().useStyle(sheet));
24
32
  function useTheme() {
@@ -27,6 +35,15 @@ function createDefaultStyle() {
27
35
  function ThemeProvider(props) {
28
36
  return getStyle().ThemeProvider(props);
29
37
  }
38
+ function Global(props) {
39
+ return getStyle().Global(props);
40
+ }
41
+ function ThemeScope(props) {
42
+ return getStyle().ThemeScope(props);
43
+ }
44
+ function useThemeClass() {
45
+ return getStyle().useThemeClass();
46
+ }
30
47
  return {
31
48
  configure,
32
49
  getEngine: () => getStyle().engine,
@@ -35,10 +52,17 @@ function createDefaultStyle() {
35
52
  useStyle,
36
53
  useTheme,
37
54
  ThemeProvider,
55
+ ThemeScope,
56
+ useThemeClass,
57
+ ThemeContext: contexts.ThemeContext,
38
58
  apply: ((...entries) => getStyle().apply(...entries)),
59
+ css: ((...args) => createDeferredObject(() => getStyle().css(...args))),
39
60
  when: ((theme, colorScheme) => getStyle().when(theme, colorScheme)),
40
61
  whenScheme: ((scheme) => getStyle().whenScheme(scheme)),
41
- themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme))
62
+ themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme)),
63
+ keyframes,
64
+ globalStyles,
65
+ Global
42
66
  };
43
67
  }
44
68
  export { createDefaultStyle };
@@ -18,27 +18,35 @@ function createDefaultStyle() {
18
18
  if (bound) throw new Error("configure must be called before the default style is used.");
19
19
  pending = options;
20
20
  }
21
- const styled = ((tag, options) => getStyle().styled(tag, options));
21
+ const styled = (0, _umber_style_core.withTagShorthands)(((tag, options) => getStyle().styled(tag, options)));
22
22
  const StyleSheet = { create: ((styles) => typeof styles === "function" ? getStyle().StyleSheet.create(styles) : (0, _umber_style_core.createDeferredRecord)(styles, () => getStyle().StyleSheet.create(styles))) };
23
23
  const useStyle = ((sheet) => getStyle().useStyle(sheet));
24
- function readTheme() {
25
- return getStyle().readTheme();
24
+ function useTheme() {
25
+ return getStyle().useTheme();
26
26
  }
27
27
  function ThemeProvider(props) {
28
28
  return getStyle().ThemeProvider(props);
29
29
  }
30
+ function Global(props) {
31
+ return getStyle().Global(props);
32
+ }
30
33
  return {
31
34
  configure,
32
35
  getEngine: () => getStyle().engine,
33
36
  styled,
34
37
  StyleSheet,
35
38
  useStyle,
36
- readTheme,
39
+ useTheme,
40
+ readTheme: useTheme,
37
41
  ThemeProvider,
38
42
  apply: ((...entries) => getStyle().apply(...entries)),
43
+ css: ((...args) => (0, _umber_style_core.createDeferredObject)(() => getStyle().css(...args))),
39
44
  when: ((theme, colorScheme) => getStyle().when(theme, colorScheme)),
40
45
  whenScheme: ((scheme) => getStyle().whenScheme(scheme)),
41
- themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme))
46
+ themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme)),
47
+ keyframes: _umber_style_core.keyframes,
48
+ globalStyles: _umber_style_core.globalStyles,
49
+ Global
42
50
  };
43
51
  }
44
52
  exports.createDefaultStyle = createDefaultStyle;
@@ -1,22 +1,27 @@
1
- import { DefaultStyleOptions, ServerStyle, SheetDefinition, Styled, WebThemeProviderProps } from "./types.cjs";
2
- import { Theme, WebStyleObject } from "@umber-style/core";
1
+ import { DefaultStyleOptions, GlobalProps, ServerStyle, SheetDefinition, Styled, Theme as Theme$1, WebThemeProviderProps } from "./types.cjs";
2
+ import { WebStyleObject } from "@umber-style/core";
3
3
  /** Makes the default styling for server components: one engine, made on first use. */
4
4
  export declare function createDefaultStyle(): {
5
5
  configure: (options: DefaultStyleOptions) => void;
6
- getEngine: () => import("@umber-style/core").Engine<Theme>;
7
- styled: Styled<Theme>;
6
+ getEngine: () => import("@umber-style/core").Engine<Theme$1>;
7
+ styled: Styled<Theme$1>;
8
8
  StyleSheet: {
9
9
  create<K extends string>(styles: import("@umber-style/core").ObjectSheet<K>): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
10
- create<K extends string>(styles: (theme: Theme) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
10
+ create<K extends string>(styles: (theme: Theme$1) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
11
11
  };
12
12
  useStyle: {
13
13
  <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
14
14
  <S extends import("@umber-style/core").SheetStyles>(sheet: SheetDefinition<S, import("@umber-style/core").SheetEntry>): { [K in keyof S]: import("@umber-style/core").SheetEntry; };
15
15
  };
16
- readTheme: () => Theme;
17
- ThemeProvider: (props: WebThemeProviderProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
18
- apply: ServerStyle<Theme>['apply'];
19
- when: ServerStyle<Theme>['when'];
20
- whenScheme: ServerStyle<Theme>['whenScheme'];
21
- themeClass: ServerStyle<Theme>['themeClass'];
16
+ useTheme: () => Theme$1;
17
+ readTheme: () => Theme$1;
18
+ ThemeProvider: (props: WebThemeProviderProps<Theme$1>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
19
+ apply: ServerStyle<Theme$1>['apply'];
20
+ css: ServerStyle<Theme$1>['css'];
21
+ when: ServerStyle<Theme$1>['when'];
22
+ whenScheme: ServerStyle<Theme$1>['whenScheme'];
23
+ themeClass: ServerStyle<Theme$1>['themeClass'];
24
+ keyframes: ServerStyle<Theme$1>['keyframes'];
25
+ globalStyles: ServerStyle<Theme$1>['globalStyles'];
26
+ Global: (props: GlobalProps<Theme$1>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
22
27
  };
@@ -1,22 +1,27 @@
1
- import { DefaultStyleOptions, ServerStyle, SheetDefinition, Styled, WebThemeProviderProps } from "./types.mjs";
2
- import { Theme, WebStyleObject } from "@umber-style/core";
1
+ import { DefaultStyleOptions, GlobalProps, ServerStyle, SheetDefinition, Styled, Theme as Theme$1, WebThemeProviderProps } from "./types.mjs";
2
+ import { WebStyleObject } from "@umber-style/core";
3
3
  /** Makes the default styling for server components: one engine, made on first use. */
4
4
  export declare function createDefaultStyle(): {
5
5
  configure: (options: DefaultStyleOptions) => void;
6
- getEngine: () => import("@umber-style/core").Engine<Theme>;
7
- styled: Styled<Theme>;
6
+ getEngine: () => import("@umber-style/core").Engine<Theme$1>;
7
+ styled: Styled<Theme$1>;
8
8
  StyleSheet: {
9
9
  create<K extends string>(styles: import("@umber-style/core").ObjectSheet<K>): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
10
- create<K extends string>(styles: (theme: Theme) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
10
+ create<K extends string>(styles: (theme: Theme$1) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
11
11
  };
12
12
  useStyle: {
13
13
  <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
14
14
  <S extends import("@umber-style/core").SheetStyles>(sheet: SheetDefinition<S, import("@umber-style/core").SheetEntry>): { [K in keyof S]: import("@umber-style/core").SheetEntry; };
15
15
  };
16
- readTheme: () => Theme;
17
- ThemeProvider: (props: WebThemeProviderProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
18
- apply: ServerStyle<Theme>['apply'];
19
- when: ServerStyle<Theme>['when'];
20
- whenScheme: ServerStyle<Theme>['whenScheme'];
21
- themeClass: ServerStyle<Theme>['themeClass'];
16
+ useTheme: () => Theme$1;
17
+ readTheme: () => Theme$1;
18
+ ThemeProvider: (props: WebThemeProviderProps<Theme$1>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
19
+ apply: ServerStyle<Theme$1>['apply'];
20
+ css: ServerStyle<Theme$1>['css'];
21
+ when: ServerStyle<Theme$1>['when'];
22
+ whenScheme: ServerStyle<Theme$1>['whenScheme'];
23
+ themeClass: ServerStyle<Theme$1>['themeClass'];
24
+ keyframes: ServerStyle<Theme$1>['keyframes'];
25
+ globalStyles: ServerStyle<Theme$1>['globalStyles'];
26
+ Global: (props: GlobalProps<Theme$1>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
22
27
  };
@@ -1,4 +1,4 @@
1
- import { createDeferredRecord, createLazyEngine } from "@umber-style/core";
1
+ import { createDeferredObject, createDeferredRecord, createLazyEngine, globalStyles, keyframes, withTagShorthands } from "@umber-style/core";
2
2
  import { bindEngine } from "./createStyle.server.mjs";
3
3
  // src/defaultStyle.server.ts
4
4
  /** Makes the default styling for server components: one engine, made on first use. */
@@ -18,27 +18,35 @@ function createDefaultStyle() {
18
18
  if (bound) throw new Error("configure must be called before the default style is used.");
19
19
  pending = options;
20
20
  }
21
- const styled = ((tag, options) => getStyle().styled(tag, options));
21
+ const styled = withTagShorthands(((tag, options) => getStyle().styled(tag, options)));
22
22
  const StyleSheet = { create: ((styles) => typeof styles === "function" ? getStyle().StyleSheet.create(styles) : createDeferredRecord(styles, () => getStyle().StyleSheet.create(styles))) };
23
23
  const useStyle = ((sheet) => getStyle().useStyle(sheet));
24
- function readTheme() {
25
- return getStyle().readTheme();
24
+ function useTheme() {
25
+ return getStyle().useTheme();
26
26
  }
27
27
  function ThemeProvider(props) {
28
28
  return getStyle().ThemeProvider(props);
29
29
  }
30
+ function Global(props) {
31
+ return getStyle().Global(props);
32
+ }
30
33
  return {
31
34
  configure,
32
35
  getEngine: () => getStyle().engine,
33
36
  styled,
34
37
  StyleSheet,
35
38
  useStyle,
36
- readTheme,
39
+ useTheme,
40
+ readTheme: useTheme,
37
41
  ThemeProvider,
38
42
  apply: ((...entries) => getStyle().apply(...entries)),
43
+ css: ((...args) => createDeferredObject(() => getStyle().css(...args))),
39
44
  when: ((theme, colorScheme) => getStyle().when(theme, colorScheme)),
40
45
  whenScheme: ((scheme) => getStyle().whenScheme(scheme)),
41
- themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme))
46
+ themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme)),
47
+ keyframes,
48
+ globalStyles,
49
+ Global
42
50
  };
43
51
  }
44
52
  export { createDefaultStyle };
@@ -0,0 +1,27 @@
1
+ // src/domProps.ts
2
+ /**
3
+ * The props that a string tag receives by default, under the names React gives them: the attributes of
4
+ * the HTML and SVG specifications (global, of each element, RDFa and microdata, SVG presentation, filter
5
+ * and animation attributes) and React's own (`children`, `ref`, `key`, `dangerouslySetInnerHTML`,
6
+ * `defaultValue`, `suppressHydrationWarning` and the rest). `data-*`, `aria-*` and `on[A-Z]*` are matched
7
+ * by their start. Written in groups: `head:a,b` stands for `heada` and `headb`, an empty tail for `head`.
8
+ */
9
+ const NAMES = "abbr about accept:,Charset accessKey action allow:,FullScreen alt async auto:Capitalize,Complete,Correct,Focus,Play blocking capture charSet checked children cite closedBy col:s,Span command:,For content:,Editable controls:,List coords crossOrigin dangerouslySetInnerHTML data datatype dateTime decoding default:,Checked,Value defer dir:,Name disable:d,PictureInPicture,RemotePlayback download draggable encType enterKeyHint exportParts fetchPriority form:,Action,EncType,Method,NoValidate,Target headers height hidden high href:,Lang htmlFor httpEquiv id image:Rendering,Sizes,SrcSet inert inlist inputMode integrity is isMap item:ID,Prop,Ref,Scope,Type key kind label lang list loading loop low max:,Length media method min:,Length multiple muted name noModule nonce noValidate open optimum part ping placeholder playsInline popover:,Target,TargetAction poster precedence prefix preload property readOnly ref referrerPolicy rel required resource rev reversed role rowSpan rows sandbox scope selected shadowRoot:Clonable,DelegatesFocus,Mode,Serializable shape size:,s slot span spellCheck src:,Doc,Lang,Set start step suppress:ContentEditableWarning,HydrationWarning tabIndex title translate type typeof useMap value vocab width wrap writingSuggestions accumulate additive alignmentBaseline amplitude attribute:Name,Type azimuth baseFrequency baselineShift begin bias by calcMode clip:,Path,PathUnits,Rule color:,Interpolation,InterpolationFilters cursor cx cy d diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation end exponent fill:,Opacity,Rule filter:,Units flood:Color,Opacity focusable font:Family,Size,SizeAdjust,Stretch,Style,Variant,Weight fr from fx fy gradient:Transform,Units in:,2,tercept k:,1,2,3,4,ernelMatrix,ernelUnitLength key:Points,Splines,Times lengthAdjust letterSpacing lightingColor limitingConeAngle marker:End,Height,Mid,Start,Units,Width mask:,ContentUnits,Type,Units mode numOctaves offset opacity operator order orient overflow paintOrder pathLength pattern:,ContentUnits,Transform,Units pointerEvents points:,AtX,AtY,AtZ preserve:Alpha,AspectRatio primitiveUnits r radius refX refY repeat:Count,Dur requiredExtensions restart result rotate rx ry scale seed shapeRendering side slope spacing specular:Constant,Exponent spreadMethod startOffset stdDeviation stitchTiles stop:Color,Opacity stroke:,Dasharray,Dashoffset,Linecap,Linejoin,Miterlimit,Opacity,Width surfaceScale systemLanguage tableValues target:,X,Y text:Anchor,Decoration,Length,Rendering to transform:,Origin unicodeBidi values vectorEffect viewBox visibility wordSpacing writingMode x:,1,2,ChannelSelector xlink:Actuate,Arcrole,Href,Role,Show,Title,Type xml:Base,Lang,Space,ns,nsXlink y:,1,2,ChannelSelector z";
10
+ const PREFIXED = /^(?:data-|aria-|on[A-Z])/;
11
+ let names;
12
+ /** The names that `groups` stands for. */
13
+ function expand(groups) {
14
+ const expanded = /* @__PURE__ */ new Set();
15
+ for (const group of groups.split(" ")) {
16
+ const [head, tails] = group.split(":");
17
+ if (tails === void 0) expanded.add(head);
18
+ else for (const tail of tails.split(",")) expanded.add(head + tail);
19
+ }
20
+ return expanded;
21
+ }
22
+ /** Whether a string tag receives `prop` when its component has no `shouldForwardProp`: an attribute of HTML or SVG, a `data-` or `aria-` attribute, an event handler, or a prop of React's own. */
23
+ function isDomProp(prop) {
24
+ names ??= expand(NAMES);
25
+ return names.has(prop) || PREFIXED.test(prop);
26
+ }
27
+ exports.isDomProp = isDomProp;
@@ -0,0 +1,27 @@
1
+ // src/domProps.ts
2
+ /**
3
+ * The props that a string tag receives by default, under the names React gives them: the attributes of
4
+ * the HTML and SVG specifications (global, of each element, RDFa and microdata, SVG presentation, filter
5
+ * and animation attributes) and React's own (`children`, `ref`, `key`, `dangerouslySetInnerHTML`,
6
+ * `defaultValue`, `suppressHydrationWarning` and the rest). `data-*`, `aria-*` and `on[A-Z]*` are matched
7
+ * by their start. Written in groups: `head:a,b` stands for `heada` and `headb`, an empty tail for `head`.
8
+ */
9
+ const NAMES = "abbr about accept:,Charset accessKey action allow:,FullScreen alt async auto:Capitalize,Complete,Correct,Focus,Play blocking capture charSet checked children cite closedBy col:s,Span command:,For content:,Editable controls:,List coords crossOrigin dangerouslySetInnerHTML data datatype dateTime decoding default:,Checked,Value defer dir:,Name disable:d,PictureInPicture,RemotePlayback download draggable encType enterKeyHint exportParts fetchPriority form:,Action,EncType,Method,NoValidate,Target headers height hidden high href:,Lang htmlFor httpEquiv id image:Rendering,Sizes,SrcSet inert inlist inputMode integrity is isMap item:ID,Prop,Ref,Scope,Type key kind label lang list loading loop low max:,Length media method min:,Length multiple muted name noModule nonce noValidate open optimum part ping placeholder playsInline popover:,Target,TargetAction poster precedence prefix preload property readOnly ref referrerPolicy rel required resource rev reversed role rowSpan rows sandbox scope selected shadowRoot:Clonable,DelegatesFocus,Mode,Serializable shape size:,s slot span spellCheck src:,Doc,Lang,Set start step suppress:ContentEditableWarning,HydrationWarning tabIndex title translate type typeof useMap value vocab width wrap writingSuggestions accumulate additive alignmentBaseline amplitude attribute:Name,Type azimuth baseFrequency baselineShift begin bias by calcMode clip:,Path,PathUnits,Rule color:,Interpolation,InterpolationFilters cursor cx cy d diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation end exponent fill:,Opacity,Rule filter:,Units flood:Color,Opacity focusable font:Family,Size,SizeAdjust,Stretch,Style,Variant,Weight fr from fx fy gradient:Transform,Units in:,2,tercept k:,1,2,3,4,ernelMatrix,ernelUnitLength key:Points,Splines,Times lengthAdjust letterSpacing lightingColor limitingConeAngle marker:End,Height,Mid,Start,Units,Width mask:,ContentUnits,Type,Units mode numOctaves offset opacity operator order orient overflow paintOrder pathLength pattern:,ContentUnits,Transform,Units pointerEvents points:,AtX,AtY,AtZ preserve:Alpha,AspectRatio primitiveUnits r radius refX refY repeat:Count,Dur requiredExtensions restart result rotate rx ry scale seed shapeRendering side slope spacing specular:Constant,Exponent spreadMethod startOffset stdDeviation stitchTiles stop:Color,Opacity stroke:,Dasharray,Dashoffset,Linecap,Linejoin,Miterlimit,Opacity,Width surfaceScale systemLanguage tableValues target:,X,Y text:Anchor,Decoration,Length,Rendering to transform:,Origin unicodeBidi values vectorEffect viewBox visibility wordSpacing writingMode x:,1,2,ChannelSelector xlink:Actuate,Arcrole,Href,Role,Show,Title,Type xml:Base,Lang,Space,ns,nsXlink y:,1,2,ChannelSelector z";
10
+ const PREFIXED = /^(?:data-|aria-|on[A-Z])/;
11
+ let names;
12
+ /** The names that `groups` stands for. */
13
+ function expand(groups) {
14
+ const expanded = /* @__PURE__ */ new Set();
15
+ for (const group of groups.split(" ")) {
16
+ const [head, tails] = group.split(":");
17
+ if (tails === void 0) expanded.add(head);
18
+ else for (const tail of tails.split(",")) expanded.add(head + tail);
19
+ }
20
+ return expanded;
21
+ }
22
+ /** Whether a string tag receives `prop` when its component has no `shouldForwardProp`: an attribute of HTML or SVG, a `data-` or `aria-` attribute, an event handler, or a prop of React's own. */
23
+ function isDomProp(prop) {
24
+ names ??= expand(NAMES);
25
+ return names.has(prop) || PREFIXED.test(prop);
26
+ }
27
+ export { isDomProp };
package/dist/index.cjs CHANGED
@@ -1,10 +1,16 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_defaultStyle = require("./defaultStyle.cjs");
3
3
  let _umber_style_core = require("@umber-style/core");
4
+ const require_CacheProvider = require("./CacheProvider.cjs");
5
+ const require_useMediaQuery = require("./useMediaQuery.cjs");
4
6
  const require_createStyle = require("./createStyle.cjs");
5
- const { configure, getEngine, styled, StyleSheet, useStyle, useTheme, ThemeProvider, apply, themeClass, when, whenScheme } = require_defaultStyle.createDefaultStyle();
7
+ const { configure, getEngine, styled, StyleSheet, useStyle, useTheme, ThemeProvider, ThemeScope, useThemeClass, ThemeContext, apply, css, themeClass, when, whenScheme, keyframes, globalStyles, Global } = require_defaultStyle.createDefaultStyle();
8
+ exports.CacheProvider = require_CacheProvider.CacheProvider;
9
+ exports.Global = Global;
6
10
  exports.StyleSheet = StyleSheet;
11
+ exports.ThemeContext = ThemeContext;
7
12
  exports.ThemeProvider = ThemeProvider;
13
+ exports.ThemeScope = ThemeScope;
8
14
  Object.defineProperty(exports, "add", {
9
15
  enumerable: true,
10
16
  get: function() {
@@ -28,6 +34,7 @@ exports.bindEngine = require_createStyle.bindEngine;
28
34
  exports.configure = configure;
29
35
  exports.createDefaultStyle = require_defaultStyle.createDefaultStyle;
30
36
  exports.createStyle = require_createStyle.createStyle;
37
+ exports.css = css;
31
38
  Object.defineProperty(exports, "divide", {
32
39
  enumerable: true,
33
40
  get: function() {
@@ -35,6 +42,8 @@ Object.defineProperty(exports, "divide", {
35
42
  }
36
43
  });
37
44
  exports.getEngine = getEngine;
45
+ exports.globalStyles = globalStyles;
46
+ exports.keyframes = keyframes;
38
47
  Object.defineProperty(exports, "multiply", {
39
48
  enumerable: true,
40
49
  get: function() {
@@ -55,7 +64,9 @@ Object.defineProperty(exports, "subtract", {
55
64
  }
56
65
  });
57
66
  exports.themeClass = themeClass;
67
+ exports.useMediaQuery = require_useMediaQuery.useMediaQuery;
58
68
  exports.useStyle = useStyle;
59
69
  exports.useTheme = useTheme;
70
+ exports.useThemeClass = useThemeClass;
60
71
  exports.when = when;
61
72
  exports.whenScheme = whenScheme;
package/dist/index.d.cts CHANGED
@@ -1,18 +1,28 @@
1
1
  import { add, alpha, at, divide, multiply, negate, subtract } from "@umber-style/core";
2
- import { AlphaColor, DefaultStyleOptions, NestedKey, SchemeKey, SchemeName, ServerStyle, ServerStyleOptions, SheetDefinition, SheetEntry, Style, StyleObject, StyleOptions, StyleProp, Styled, StyledComponent, StyledOptions, StyledStatics, ThemeKey, ThemeProviderProps, WebNested, WebProperties, WebStyle, WebStyleObject, WebThemeProviderProps } from "./types.cjs";
2
+ import { AlphaColor, CSSObject, CacheProviderProps, ComponentSelector, CreateStyled, CssArgument, CssFunction, DefaultStyleOptions, FilteringStyledOptions, GlobalInput, GlobalProps, GlobalStyleObject, GlobalStyles, Interpolation, InterpolationResult, Keyframes, KeyframesSteps, NestedKey, PropsOf, SchemeKey, SchemeName, SerializedStyles, ServerStyle, ServerStyleOptions, SheetDefinition, SheetEntry, StaticTemplateValue, Style, StyleObject, StyleOptions, StyleProp, Styled, StyledCall, StyledComponent, StyledFactory, StyledOptions, StyledStatics, StyledTags, TemplateValue, Theme, ThemeInput, ThemeKey, ThemeProviderProps, ThemeScopeProps, UmberCache, WebNested, WebProperties, WebStyle, WebStyleObject, WebThemeProviderProps } from "./types.cjs";
3
+ import { CacheProvider } from "./CacheProvider.cjs";
4
+ import { MediaQueryOptions, useMediaQuery } from "./useMediaQuery.cjs";
3
5
  import { bindEngine, createStyle } from "./createStyle.cjs";
4
6
  import { createDefaultStyle } from "./defaultStyle.cjs";
5
- export declare const configure: (options: DefaultStyleOptions) => void, getEngine: () => import("@umber-style/core").Engine<import("@umber-style/core").Theme>, styled: Styled<import("@umber-style/core").Theme>, StyleSheet: {
7
+ export declare const configure: (options: DefaultStyleOptions) => void, getEngine: () => import("@umber-style/core").Engine<Theme>, styled: Styled<Theme>, StyleSheet: {
6
8
  create<K extends string>(styles: import("@umber-style/core").ObjectSheet<K>): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
7
- create<K extends string>(styles: (theme: import("@umber-style/core").Theme) => Record<K, import("@umber-style/core").WebStyleObject>): SheetDefinition<Record<K, import("@umber-style/core").WebStyleObject>, import("@umber-style/core").SheetEntry>;
9
+ create<K extends string>(styles: (theme: Theme) => Record<K, import("@umber-style/core").WebStyleObject>): SheetDefinition<Record<K, import("@umber-style/core").WebStyleObject>, import("@umber-style/core").SheetEntry>;
8
10
  }, useStyle: {
9
11
  <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
10
12
  <S extends import("@umber-style/core").SheetStyles>(sheet: SheetDefinition<S, import("@umber-style/core").SheetEntry>): { [K in keyof S]: import("@umber-style/core").SheetEntry; };
11
- }, useTheme: () => import("@umber-style/core").Theme, ThemeProvider: (props: WebThemeProviderProps<import("@umber-style/core").Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, apply: (...entries: (import("@umber-style/core").SheetEntry | string | null | undefined | false)[]) => {
13
+ }, useTheme: () => Theme, ThemeProvider: (props: WebThemeProviderProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, ThemeScope: (props: ThemeScopeProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, useThemeClass: () => string | undefined, ThemeContext: import("react").Context<Theme | undefined>, apply: (...entries: (import("@umber-style/core").SheetEntry | string | null | undefined | false)[]) => {
12
14
  className?: string;
13
- }, themeClass: (theme: {
15
+ }, css: CssFunction, themeClass: (theme: {
14
16
  readonly _theme?: never;
15
17
  }, colorScheme?: import("@umber-style/core").ColorScheme) => string, when: (theme: {
16
18
  readonly _theme?: never;
17
- }, colorScheme?: import("@umber-style/core").ColorScheme) => import("@umber-style/core").ThemeKey, whenScheme: (scheme: import("@umber-style/core").SchemeName) => import("@umber-style/core").SchemeKey;
18
- export { type AlphaColor, DefaultStyleOptions, type NestedKey, type SchemeKey, type SchemeName, ServerStyle, ServerStyleOptions, SheetDefinition, type SheetEntry, Style, type StyleObject, StyleOptions, StyleProp, Styled, StyledComponent, StyledOptions, StyledStatics, type ThemeKey, ThemeProviderProps, type WebNested, type WebProperties, WebStyle, type WebStyleObject, WebThemeProviderProps, add, alpha, at, bindEngine, createDefaultStyle, createStyle, divide, multiply, negate, subtract };
19
+ }, colorScheme?: import("@umber-style/core").ColorScheme) => import("@umber-style/core").ThemeKey, whenScheme: (scheme: import("@umber-style/core").SchemeName) => import("@umber-style/core").SchemeKey, keyframes: {
20
+ (steps: (theme: Theme) => import("@umber-style/core").KeyframesSteps, options?: import("@umber-style/core").KeyframesOptions): import("@umber-style/core").Keyframes;
21
+ (template: TemplateStringsArray, ...values: import("@umber-style/core").TemplateValue<unknown, Theme>[]): import("@umber-style/core").Keyframes;
22
+ (steps: import("@umber-style/core").KeyframesInput<Theme>, options?: import("@umber-style/core").KeyframesOptions): import("@umber-style/core").Keyframes;
23
+ }, globalStyles: {
24
+ (styles: (theme: Theme) => import("@umber-style/core").GlobalStyleObject): import("@umber-style/core").GlobalStyles<Theme>;
25
+ (template: TemplateStringsArray, ...values: import("@umber-style/core").TemplateValue<unknown, Theme>[]): import("@umber-style/core").GlobalStyles<Theme>;
26
+ (styles: import("@umber-style/core").GlobalStylesInput<Theme>): import("@umber-style/core").GlobalStyles<Theme>;
27
+ }, Global: (props: GlobalProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
28
+ export { type AlphaColor, type CSSObject, CacheProvider, CacheProviderProps, type ComponentSelector, CreateStyled, type CssArgument, CssFunction, DefaultStyleOptions, FilteringStyledOptions, type GlobalInput, GlobalProps, type GlobalStyleObject, type GlobalStyles, Interpolation, type InterpolationResult, type Keyframes, type KeyframesSteps, type MediaQueryOptions, type NestedKey, PropsOf, type SchemeKey, type SchemeName, type SerializedStyles, ServerStyle, ServerStyleOptions, SheetDefinition, type SheetEntry, type StaticTemplateValue, Style, type StyleObject, StyleOptions, StyleProp, Styled, StyledCall, StyledComponent, StyledFactory, StyledOptions, StyledStatics, StyledTags, type TemplateValue, Theme, type ThemeInput, type ThemeKey, ThemeProviderProps, ThemeScopeProps, type UmberCache, type WebNested, type WebProperties, WebStyle, type WebStyleObject, WebThemeProviderProps, add, alpha, at, bindEngine, createDefaultStyle, createStyle, divide, multiply, negate, subtract, useMediaQuery };