@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
package/dist/index.d.mts CHANGED
@@ -1,18 +1,28 @@
1
- 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.mjs";
1
+ 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.mjs";
2
2
  import { add, alpha, at, divide, multiply, negate, subtract } from "@umber-style/core";
3
+ import { CacheProvider } from "./CacheProvider.mjs";
4
+ import { MediaQueryOptions, useMediaQuery } from "./useMediaQuery.mjs";
3
5
  import { bindEngine, createStyle } from "./createStyle.mjs";
4
6
  import { createDefaultStyle } from "./defaultStyle.mjs";
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 };
package/dist/index.mjs CHANGED
@@ -1,5 +1,7 @@
1
1
  import { createDefaultStyle } from "./defaultStyle.mjs";
2
2
  import { add, alpha, at, divide, multiply, negate, subtract } from "@umber-style/core";
3
+ import { CacheProvider } from "./CacheProvider.mjs";
4
+ import { useMediaQuery } from "./useMediaQuery.mjs";
3
5
  import { bindEngine, createStyle } from "./createStyle.mjs";
4
- const { configure, getEngine, styled, StyleSheet, useStyle, useTheme, ThemeProvider, apply, themeClass, when, whenScheme } = createDefaultStyle();
5
- export { StyleSheet, ThemeProvider, add, alpha, apply, at, bindEngine, configure, createDefaultStyle, createStyle, divide, getEngine, multiply, negate, styled, subtract, themeClass, useStyle, useTheme, when, whenScheme };
6
+ const { configure, getEngine, styled, StyleSheet, useStyle, useTheme, ThemeProvider, ThemeScope, useThemeClass, ThemeContext, apply, css, themeClass, when, whenScheme, keyframes, globalStyles, Global } = createDefaultStyle();
7
+ export { CacheProvider, Global, StyleSheet, ThemeContext, ThemeProvider, ThemeScope, add, alpha, apply, at, bindEngine, configure, createDefaultStyle, createStyle, css, divide, getEngine, globalStyles, keyframes, multiply, negate, styled, subtract, themeClass, useMediaQuery, useStyle, useTheme, useThemeClass, when, whenScheme };
@@ -2,7 +2,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_defaultStyle_server = require("./defaultStyle.server.cjs");
3
3
  let _umber_style_core = require("@umber-style/core");
4
4
  const require_createStyle_server = require("./createStyle.server.cjs");
5
- const { configure, getEngine, styled, StyleSheet, useStyle, readTheme, ThemeProvider, apply, themeClass, when, whenScheme } = require_defaultStyle_server.createDefaultStyle();
5
+ const { configure, getEngine, styled, StyleSheet, useStyle, useTheme, readTheme, ThemeProvider, apply, css, themeClass, when, whenScheme, keyframes, globalStyles, Global } = require_defaultStyle_server.createDefaultStyle();
6
+ exports.Global = Global;
6
7
  exports.StyleSheet = StyleSheet;
7
8
  exports.ThemeProvider = ThemeProvider;
8
9
  Object.defineProperty(exports, "add", {
@@ -28,6 +29,7 @@ exports.bindEngine = require_createStyle_server.bindEngine;
28
29
  exports.configure = configure;
29
30
  exports.createDefaultStyle = require_defaultStyle_server.createDefaultStyle;
30
31
  exports.createStyle = require_createStyle_server.createStyle;
32
+ exports.css = css;
31
33
  Object.defineProperty(exports, "divide", {
32
34
  enumerable: true,
33
35
  get: function() {
@@ -35,6 +37,8 @@ Object.defineProperty(exports, "divide", {
35
37
  }
36
38
  });
37
39
  exports.getEngine = getEngine;
40
+ exports.globalStyles = globalStyles;
41
+ exports.keyframes = keyframes;
38
42
  Object.defineProperty(exports, "multiply", {
39
43
  enumerable: true,
40
44
  get: function() {
@@ -57,5 +61,6 @@ Object.defineProperty(exports, "subtract", {
57
61
  });
58
62
  exports.themeClass = themeClass;
59
63
  exports.useStyle = useStyle;
64
+ exports.useTheme = useTheme;
60
65
  exports.when = when;
61
66
  exports.whenScheme = whenScheme;
@@ -1,18 +1,26 @@
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
3
  import { bindEngine, createStyle } from "./createStyle.server.cjs";
4
4
  import { createDefaultStyle } from "./defaultStyle.server.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: {
5
+ export declare const configure: (options: DefaultStyleOptions) => void, getEngine: () => import("@umber-style/core").Engine<Theme>, styled: Styled<Theme>, StyleSheet: {
6
6
  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>;
7
+ 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
8
  }, useStyle: {
9
9
  <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
10
10
  <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
- }, readTheme: () => 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)[]) => {
11
+ }, useTheme: () => Theme, readTheme: () => Theme, ThemeProvider: (props: WebThemeProviderProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, apply: (...entries: (import("@umber-style/core").SheetEntry | string | null | undefined | false)[]) => {
12
12
  className?: string;
13
- }, themeClass: (theme: {
13
+ }, css: CssFunction, themeClass: (theme: {
14
14
  readonly _theme?: never;
15
15
  }, colorScheme?: import("@umber-style/core").ColorScheme) => string, when: (theme: {
16
16
  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 };
17
+ }, colorScheme?: import("@umber-style/core").ColorScheme) => import("@umber-style/core").ThemeKey, whenScheme: (scheme: import("@umber-style/core").SchemeName) => import("@umber-style/core").SchemeKey, keyframes: {
18
+ (steps: (theme: Theme) => import("@umber-style/core").KeyframesSteps, options?: import("@umber-style/core").KeyframesOptions): import("@umber-style/core").Keyframes;
19
+ (template: TemplateStringsArray, ...values: import("@umber-style/core").TemplateValue<unknown, Theme>[]): import("@umber-style/core").Keyframes;
20
+ (steps: import("@umber-style/core").KeyframesInput<Theme>, options?: import("@umber-style/core").KeyframesOptions): import("@umber-style/core").Keyframes;
21
+ }, globalStyles: {
22
+ (styles: (theme: Theme) => import("@umber-style/core").GlobalStyleObject): import("@umber-style/core").GlobalStyles<Theme>;
23
+ (template: TemplateStringsArray, ...values: import("@umber-style/core").TemplateValue<unknown, Theme>[]): import("@umber-style/core").GlobalStyles<Theme>;
24
+ (styles: import("@umber-style/core").GlobalStylesInput<Theme>): import("@umber-style/core").GlobalStyles<Theme>;
25
+ }, Global: (props: GlobalProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
26
+ export { type AlphaColor, type CSSObject, CacheProviderProps, type ComponentSelector, CreateStyled, type CssArgument, CssFunction, DefaultStyleOptions, FilteringStyledOptions, type GlobalInput, GlobalProps, type GlobalStyleObject, type GlobalStyles, Interpolation, type InterpolationResult, type Keyframes, type KeyframesSteps, 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 };
@@ -1,18 +1,26 @@
1
- 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.mjs";
1
+ 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.mjs";
2
2
  import { add, alpha, at, divide, multiply, negate, subtract } from "@umber-style/core";
3
3
  import { bindEngine, createStyle } from "./createStyle.server.mjs";
4
4
  import { createDefaultStyle } from "./defaultStyle.server.mjs";
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: {
5
+ export declare const configure: (options: DefaultStyleOptions) => void, getEngine: () => import("@umber-style/core").Engine<Theme>, styled: Styled<Theme>, StyleSheet: {
6
6
  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>;
7
+ 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
8
  }, useStyle: {
9
9
  <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
10
10
  <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
- }, readTheme: () => 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)[]) => {
11
+ }, useTheme: () => Theme, readTheme: () => Theme, ThemeProvider: (props: WebThemeProviderProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, apply: (...entries: (import("@umber-style/core").SheetEntry | string | null | undefined | false)[]) => {
12
12
  className?: string;
13
- }, themeClass: (theme: {
13
+ }, css: CssFunction, themeClass: (theme: {
14
14
  readonly _theme?: never;
15
15
  }, colorScheme?: import("@umber-style/core").ColorScheme) => string, when: (theme: {
16
16
  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 };
17
+ }, colorScheme?: import("@umber-style/core").ColorScheme) => import("@umber-style/core").ThemeKey, whenScheme: (scheme: import("@umber-style/core").SchemeName) => import("@umber-style/core").SchemeKey, keyframes: {
18
+ (steps: (theme: Theme) => import("@umber-style/core").KeyframesSteps, options?: import("@umber-style/core").KeyframesOptions): import("@umber-style/core").Keyframes;
19
+ (template: TemplateStringsArray, ...values: import("@umber-style/core").TemplateValue<unknown, Theme>[]): import("@umber-style/core").Keyframes;
20
+ (steps: import("@umber-style/core").KeyframesInput<Theme>, options?: import("@umber-style/core").KeyframesOptions): import("@umber-style/core").Keyframes;
21
+ }, globalStyles: {
22
+ (styles: (theme: Theme) => import("@umber-style/core").GlobalStyleObject): import("@umber-style/core").GlobalStyles<Theme>;
23
+ (template: TemplateStringsArray, ...values: import("@umber-style/core").TemplateValue<unknown, Theme>[]): import("@umber-style/core").GlobalStyles<Theme>;
24
+ (styles: import("@umber-style/core").GlobalStylesInput<Theme>): import("@umber-style/core").GlobalStyles<Theme>;
25
+ }, Global: (props: GlobalProps<Theme>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
26
+ export { type AlphaColor, type CSSObject, CacheProviderProps, type ComponentSelector, CreateStyled, type CssArgument, CssFunction, DefaultStyleOptions, FilteringStyledOptions, type GlobalInput, GlobalProps, type GlobalStyleObject, type GlobalStyles, Interpolation, type InterpolationResult, type Keyframes, type KeyframesSteps, 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 };
@@ -1,5 +1,5 @@
1
1
  import { createDefaultStyle } from "./defaultStyle.server.mjs";
2
2
  import { add, alpha, at, divide, multiply, negate, subtract } from "@umber-style/core";
3
3
  import { bindEngine, createStyle } from "./createStyle.server.mjs";
4
- const { configure, getEngine, styled, StyleSheet, useStyle, readTheme, ThemeProvider, apply, themeClass, when, whenScheme } = createDefaultStyle();
5
- export { StyleSheet, ThemeProvider, add, alpha, apply, at, bindEngine, configure, createDefaultStyle, createStyle, divide, getEngine, multiply, negate, readTheme, styled, subtract, themeClass, useStyle, when, whenScheme };
4
+ const { configure, getEngine, styled, StyleSheet, useStyle, useTheme, readTheme, ThemeProvider, apply, css, themeClass, when, whenScheme, keyframes, globalStyles, Global } = createDefaultStyle();
5
+ export { Global, StyleSheet, ThemeProvider, add, alpha, apply, at, bindEngine, configure, createDefaultStyle, createStyle, css, divide, getEngine, globalStyles, keyframes, multiply, negate, readTheme, styled, subtract, themeClass, useStyle, useTheme, when, whenScheme };
@@ -0,0 +1,49 @@
1
+ // src/plainTheme.ts
2
+ /** What `toPlain` returns for a value that cannot cross. */
3
+ const DROPPED = Symbol("dropped");
4
+ /** Whether `value` is an object made by a literal, or with no prototype. */
5
+ function isPlainObject(value) {
6
+ const prototype = Object.getPrototypeOf(value);
7
+ return prototype === Object.prototype || prototype === null;
8
+ }
9
+ /** `value` as plain data, the same value when it already is; `DROPPED` for a value that cannot cross. */
10
+ function toPlain(value, path, dropped) {
11
+ if (typeof value === "function" || typeof value === "symbol") {
12
+ dropped.push(path);
13
+ return DROPPED;
14
+ }
15
+ if (typeof value !== "object" || value === null) return value;
16
+ const joinPath = (key) => path === "" ? String(key) : `${path}.${key}`;
17
+ if (Array.isArray(value)) {
18
+ const plain = value.map((item, index) => toPlain(item, joinPath(index), dropped)).map((item) => item === DROPPED ? void 0 : item);
19
+ return plain.every((item, index) => item === value[index]) ? value : plain;
20
+ }
21
+ if (!isPlainObject(value)) {
22
+ dropped.push(path);
23
+ return DROPPED;
24
+ }
25
+ const entries = Object.entries(value).map(([key, member]) => [key, toPlain(member, joinPath(key), dropped)]);
26
+ const kept = entries.filter(([, member]) => member !== DROPPED);
27
+ return Object.getPrototypeOf(value) === Object.prototype && kept.length === entries.length && kept.every(([key, member]) => member === value[key]) ? value : Object.fromEntries(kept);
28
+ }
29
+ const plainThemes = /* @__PURE__ */ new WeakMap();
30
+ /**
31
+ * The plain data of `theme`: strings, numbers, booleans, `null`, `undefined`, lists and plain objects,
32
+ * deeply. A function, a symbol and an object that is not plain (a class instance, a `Date`, a `Map`) are
33
+ * left out, and their paths listed. Only own enumerable members are read. Made once for each theme
34
+ * object, so a payload that names one theme in several places holds it once.
35
+ */
36
+ function toPlainTheme(theme) {
37
+ let found = plainThemes.get(theme);
38
+ if (found === void 0) {
39
+ const dropped = [];
40
+ const plain = toPlain(theme, "", dropped);
41
+ found = {
42
+ theme: plain === DROPPED ? {} : plain,
43
+ dropped
44
+ };
45
+ plainThemes.set(theme, found);
46
+ }
47
+ return found;
48
+ }
49
+ exports.toPlainTheme = toPlainTheme;
@@ -0,0 +1,49 @@
1
+ // src/plainTheme.ts
2
+ /** What `toPlain` returns for a value that cannot cross. */
3
+ const DROPPED = Symbol("dropped");
4
+ /** Whether `value` is an object made by a literal, or with no prototype. */
5
+ function isPlainObject(value) {
6
+ const prototype = Object.getPrototypeOf(value);
7
+ return prototype === Object.prototype || prototype === null;
8
+ }
9
+ /** `value` as plain data, the same value when it already is; `DROPPED` for a value that cannot cross. */
10
+ function toPlain(value, path, dropped) {
11
+ if (typeof value === "function" || typeof value === "symbol") {
12
+ dropped.push(path);
13
+ return DROPPED;
14
+ }
15
+ if (typeof value !== "object" || value === null) return value;
16
+ const joinPath = (key) => path === "" ? String(key) : `${path}.${key}`;
17
+ if (Array.isArray(value)) {
18
+ const plain = value.map((item, index) => toPlain(item, joinPath(index), dropped)).map((item) => item === DROPPED ? void 0 : item);
19
+ return plain.every((item, index) => item === value[index]) ? value : plain;
20
+ }
21
+ if (!isPlainObject(value)) {
22
+ dropped.push(path);
23
+ return DROPPED;
24
+ }
25
+ const entries = Object.entries(value).map(([key, member]) => [key, toPlain(member, joinPath(key), dropped)]);
26
+ const kept = entries.filter(([, member]) => member !== DROPPED);
27
+ return Object.getPrototypeOf(value) === Object.prototype && kept.length === entries.length && kept.every(([key, member]) => member === value[key]) ? value : Object.fromEntries(kept);
28
+ }
29
+ const plainThemes = /* @__PURE__ */ new WeakMap();
30
+ /**
31
+ * The plain data of `theme`: strings, numbers, booleans, `null`, `undefined`, lists and plain objects,
32
+ * deeply. A function, a symbol and an object that is not plain (a class instance, a `Date`, a `Map`) are
33
+ * left out, and their paths listed. Only own enumerable members are read. Made once for each theme
34
+ * object, so a payload that names one theme in several places holds it once.
35
+ */
36
+ function toPlainTheme(theme) {
37
+ let found = plainThemes.get(theme);
38
+ if (found === void 0) {
39
+ const dropped = [];
40
+ const plain = toPlain(theme, "", dropped);
41
+ found = {
42
+ theme: plain === DROPPED ? {} : plain,
43
+ dropped
44
+ };
45
+ plainThemes.set(theme, found);
46
+ }
47
+ return found;
48
+ }
49
+ export { toPlainTheme };
@@ -1,32 +1,14 @@
1
1
  let react = require("react");
2
2
  // src/serverContext.ts
3
3
  /**
4
- * A context for server components, which have no React context: its value is a slot that
5
- * `React.cache` keeps for the length of one request. A server component can render out of order,
6
- * and a nested provider must not change what the root gave, so only the first provider that renders
7
- * in a request writes the slot; the later ones leave it as it is.
4
+ * The slot of the current request, for server components, which have no React context: `React.cache`
5
+ * keeps it for the length of one request, starting at `defaultValue`. It is never shared between two
6
+ * requests, so nothing written there depends on the order in which requests come.
8
7
  */
9
- function createServerOnlyContext(defaultValue, cache = react.cache) {
10
- const slot = cache(() => ({
8
+ function createRequestSlot(defaultValue, cache = react.cache) {
9
+ return cache(() => ({
11
10
  current: defaultValue,
12
11
  isSet: false
13
12
  }));
14
- function Provider({ value, children }) {
15
- const state = slot();
16
- if (!state.isSet) {
17
- state.current = value;
18
- state.isSet = true;
19
- }
20
- return children;
21
- }
22
- return {
23
- Provider,
24
- slot
25
- };
26
13
  }
27
- /** The value of the slot of the current request: the default until a provider has written it. */
28
- function readServerContext(context) {
29
- return context.slot().current;
30
- }
31
- exports.createServerOnlyContext = createServerOnlyContext;
32
- exports.readServerContext = readServerContext;
14
+ exports.createRequestSlot = createRequestSlot;
@@ -1,3 +1,2 @@
1
- import "react";
2
1
  /** What makes the slot of a request: `React.cache`, or a function with the same contract. */
3
2
  export type CacheFunction = <R>(make: () => R) => () => R;
@@ -1,31 +1,14 @@
1
1
  import { cache } from "react";
2
2
  // src/serverContext.ts
3
3
  /**
4
- * A context for server components, which have no React context: its value is a slot that
5
- * `React.cache` keeps for the length of one request. A server component can render out of order,
6
- * and a nested provider must not change what the root gave, so only the first provider that renders
7
- * in a request writes the slot; the later ones leave it as it is.
4
+ * The slot of the current request, for server components, which have no React context: `React.cache`
5
+ * keeps it for the length of one request, starting at `defaultValue`. It is never shared between two
6
+ * requests, so nothing written there depends on the order in which requests come.
8
7
  */
9
- function createServerOnlyContext(defaultValue, cache$1 = cache) {
10
- const slot = cache$1(() => ({
8
+ function createRequestSlot(defaultValue, cache$1 = cache) {
9
+ return cache$1(() => ({
11
10
  current: defaultValue,
12
11
  isSet: false
13
12
  }));
14
- function Provider({ value, children }) {
15
- const state = slot();
16
- if (!state.isSet) {
17
- state.current = value;
18
- state.isSet = true;
19
- }
20
- return children;
21
- }
22
- return {
23
- Provider,
24
- slot
25
- };
26
13
  }
27
- /** The value of the slot of the current request: the default until a provider has written it. */
28
- function readServerContext(context) {
29
- return context.slot().current;
30
- }
31
- export { createServerOnlyContext, readServerContext };
14
+ export { createRequestSlot };
@@ -1,22 +1,85 @@
1
1
  let react = require("react");
2
+ let _umber_style_core = require("@umber-style/core");
2
3
  // src/styleElements.ts
4
+ /** The `<style href precedence>` element of `style`, in the precedence of the prefix of `cache`. */
5
+ const toElement = (cache) => ({ href, text }) => (0, react.createElement)("style", {
6
+ key: href,
7
+ href,
8
+ precedence: cache.prefix
9
+ }, text);
3
10
  /**
4
- * The `<style href precedence>` elements for the classes in `className`: React 19 moves them to the
5
- * head and renders each `href` once. The precedence is the prefix of the cache. Each one starts with the order statement of the layers (none without layers), so that it is right on its own: declaring a layer again does not change the order. A name that the
6
- * cache made no rules for (a class of someone else) gets none. A theme class comes with every variable it has, used or not: its element is sent before the elements that use them, so it cannot know which are used.
11
+ * The style elements of the animations in `names` that `sent` does not hold yet, which it adds them to:
12
+ * the `@keyframes` rule that the cache wrote, with the animation name as `href`, so that React sends an
13
+ * animation that many classes use once. The rule is outside every layer, so the element needs no order
14
+ * statement.
7
15
  */
8
- function createStyleElements(cache, className) {
16
+ function collectKeyframesTexts(cache, names, sent) {
17
+ const texts = [];
18
+ for (const name of names) {
19
+ if (sent.has(name)) continue;
20
+ sent.add(name);
21
+ texts.push({
22
+ href: name,
23
+ text: cache.getRules(name).join("")
24
+ });
25
+ }
26
+ return texts;
27
+ }
28
+ /**
29
+ * The style elements, as data, of the classes in `className`: React 19 moves them to the head and renders
30
+ * each `href` once. Each one starts with the order statement of the layers (none without layers), so
31
+ * that it is right on its own: declaring a layer again does not change the order. A name that the cache
32
+ * made no rules for (a class of someone else) gets none. A theme class comes with every variable it has,
33
+ * used or not: its element is sent before the elements that use them, so it cannot know which are used. A
34
+ * class that uses animations comes after the element of each of them, once.
35
+ */
36
+ function collectStyleTexts(cache, className) {
37
+ const sent = /* @__PURE__ */ new Set();
9
38
  return (className ?? "").split(/\s+/).filter(Boolean).flatMap((name) => {
10
39
  const rules = cache.getFullRules(name);
11
40
  if (rules.length === 0) return [];
12
- const props = {
13
- key: name,
41
+ return [...collectKeyframesTexts(cache, cache.getAnimations(name), sent), {
14
42
  href: name,
15
- precedence: cache.prefix
16
- };
17
- return [(0, react.createElement)("style", props, [cache.layerOrder, ...rules].join(""))];
43
+ text: [cache.layerOrder, ...rules].join("")
44
+ }];
18
45
  });
19
46
  }
47
+ /** The `<style href precedence>` elements for the classes in `className` (see `collectStyleTexts`); the precedence is the prefix of the cache. */
48
+ function createStyleElements(cache, className) {
49
+ return collectStyleTexts(cache, className).map(toElement(cache));
50
+ }
51
+ /**
52
+ * The `<style href precedence>` elements of global rules that the cache wrote (`insertGlobal`): for each set
53
+ * with rules, the elements of the animations it uses, then its own, with its id as `href` and the order
54
+ * statement of the layers first. Each `href` once.
55
+ */
56
+ function createGlobalElements(cache, sets) {
57
+ const sent = /* @__PURE__ */ new Set();
58
+ return sets.flatMap(({ id, rules, animations }) => {
59
+ if (rules.length === 0 || sent.has(id)) return [];
60
+ sent.add(id);
61
+ return [...collectKeyframesTexts(cache, animations, sent), {
62
+ href: id,
63
+ text: [cache.layerOrder, ...rules].join("")
64
+ }];
65
+ }).map(toElement(cache));
66
+ }
67
+ /**
68
+ * The marker of global rules that a server render sends in place of their style elements (none is sent
69
+ * under a cache provider, or without `hasServerStyleElements`): a `<meta name="<prefix>-global">` whose
70
+ * `content` is the ids of the sets that have rules. React moves it to the head, and `extractPageStyles`
71
+ * reads it, so that the CSS of this page holds the sets and the CSS of another page does not. Like the
72
+ * stamp, it is rendered where there is no document only; a hydration skips it. None when no set has rules.
73
+ */
74
+ function createGlobalMarkerElements(cache, sets) {
75
+ const marker = (0, _umber_style_core.createGlobalMarker)(cache.prefix, sets);
76
+ if (marker === void 0) return [];
77
+ return [(0, react.createElement)("meta", {
78
+ key: marker.name,
79
+ name: marker.name,
80
+ content: marker.ids
81
+ })];
82
+ }
20
83
  /**
21
84
  * The element that carries the options of the cache, for the browser to compare with its own: a `<meta>`
22
85
  * named `<prefix>-options`, which React moves to the head. It is not a style element, because a server
@@ -29,5 +92,8 @@ function createStampElement(cache) {
29
92
  content: cache.fingerprint
30
93
  });
31
94
  }
95
+ exports.collectStyleTexts = collectStyleTexts;
96
+ exports.createGlobalElements = createGlobalElements;
97
+ exports.createGlobalMarkerElements = createGlobalMarkerElements;
32
98
  exports.createStampElement = createStampElement;
33
99
  exports.createStyleElements = createStyleElements;
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,2 @@
1
+ import "react";
2
+ import "@umber-style/core";
@@ -1,22 +1,85 @@
1
1
  import { createElement } from "react";
2
+ import { createGlobalMarker } from "@umber-style/core";
2
3
  // src/styleElements.ts
4
+ /** The `<style href precedence>` element of `style`, in the precedence of the prefix of `cache`. */
5
+ const toElement = (cache) => ({ href, text }) => createElement("style", {
6
+ key: href,
7
+ href,
8
+ precedence: cache.prefix
9
+ }, text);
3
10
  /**
4
- * The `<style href precedence>` elements for the classes in `className`: React 19 moves them to the
5
- * head and renders each `href` once. The precedence is the prefix of the cache. Each one starts with the order statement of the layers (none without layers), so that it is right on its own: declaring a layer again does not change the order. A name that the
6
- * cache made no rules for (a class of someone else) gets none. A theme class comes with every variable it has, used or not: its element is sent before the elements that use them, so it cannot know which are used.
11
+ * The style elements of the animations in `names` that `sent` does not hold yet, which it adds them to:
12
+ * the `@keyframes` rule that the cache wrote, with the animation name as `href`, so that React sends an
13
+ * animation that many classes use once. The rule is outside every layer, so the element needs no order
14
+ * statement.
7
15
  */
8
- function createStyleElements(cache, className) {
16
+ function collectKeyframesTexts(cache, names, sent) {
17
+ const texts = [];
18
+ for (const name of names) {
19
+ if (sent.has(name)) continue;
20
+ sent.add(name);
21
+ texts.push({
22
+ href: name,
23
+ text: cache.getRules(name).join("")
24
+ });
25
+ }
26
+ return texts;
27
+ }
28
+ /**
29
+ * The style elements, as data, of the classes in `className`: React 19 moves them to the head and renders
30
+ * each `href` once. Each one starts with the order statement of the layers (none without layers), so
31
+ * that it is right on its own: declaring a layer again does not change the order. A name that the cache
32
+ * made no rules for (a class of someone else) gets none. A theme class comes with every variable it has,
33
+ * used or not: its element is sent before the elements that use them, so it cannot know which are used. A
34
+ * class that uses animations comes after the element of each of them, once.
35
+ */
36
+ function collectStyleTexts(cache, className) {
37
+ const sent = /* @__PURE__ */ new Set();
9
38
  return (className ?? "").split(/\s+/).filter(Boolean).flatMap((name) => {
10
39
  const rules = cache.getFullRules(name);
11
40
  if (rules.length === 0) return [];
12
- const props = {
13
- key: name,
41
+ return [...collectKeyframesTexts(cache, cache.getAnimations(name), sent), {
14
42
  href: name,
15
- precedence: cache.prefix
16
- };
17
- return [createElement("style", props, [cache.layerOrder, ...rules].join(""))];
43
+ text: [cache.layerOrder, ...rules].join("")
44
+ }];
18
45
  });
19
46
  }
47
+ /** The `<style href precedence>` elements for the classes in `className` (see `collectStyleTexts`); the precedence is the prefix of the cache. */
48
+ function createStyleElements(cache, className) {
49
+ return collectStyleTexts(cache, className).map(toElement(cache));
50
+ }
51
+ /**
52
+ * The `<style href precedence>` elements of global rules that the cache wrote (`insertGlobal`): for each set
53
+ * with rules, the elements of the animations it uses, then its own, with its id as `href` and the order
54
+ * statement of the layers first. Each `href` once.
55
+ */
56
+ function createGlobalElements(cache, sets) {
57
+ const sent = /* @__PURE__ */ new Set();
58
+ return sets.flatMap(({ id, rules, animations }) => {
59
+ if (rules.length === 0 || sent.has(id)) return [];
60
+ sent.add(id);
61
+ return [...collectKeyframesTexts(cache, animations, sent), {
62
+ href: id,
63
+ text: [cache.layerOrder, ...rules].join("")
64
+ }];
65
+ }).map(toElement(cache));
66
+ }
67
+ /**
68
+ * The marker of global rules that a server render sends in place of their style elements (none is sent
69
+ * under a cache provider, or without `hasServerStyleElements`): a `<meta name="<prefix>-global">` whose
70
+ * `content` is the ids of the sets that have rules. React moves it to the head, and `extractPageStyles`
71
+ * reads it, so that the CSS of this page holds the sets and the CSS of another page does not. Like the
72
+ * stamp, it is rendered where there is no document only; a hydration skips it. None when no set has rules.
73
+ */
74
+ function createGlobalMarkerElements(cache, sets) {
75
+ const marker = createGlobalMarker(cache.prefix, sets);
76
+ if (marker === void 0) return [];
77
+ return [createElement("meta", {
78
+ key: marker.name,
79
+ name: marker.name,
80
+ content: marker.ids
81
+ })];
82
+ }
20
83
  /**
21
84
  * The element that carries the options of the cache, for the browser to compare with its own: a `<meta>`
22
85
  * named `<prefix>-options`, which React moves to the head. It is not a style element, because a server
@@ -29,4 +92,4 @@ function createStampElement(cache) {
29
92
  content: cache.fingerprint
30
93
  });
31
94
  }
32
- export { createStampElement, createStyleElements };
95
+ export { collectStyleTexts, createGlobalElements, createGlobalMarkerElements, createStampElement, createStyleElements };