@umber-style/react 0.0.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 (74) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -1
  3. package/dist/CacheProvider.cjs +23 -0
  4. package/dist/CacheProvider.d.cts +10 -0
  5. package/dist/CacheProvider.d.mts +11 -0
  6. package/dist/CacheProvider.mjs +22 -0
  7. package/dist/Global.cjs +52 -0
  8. package/dist/Global.mjs +52 -0
  9. package/dist/Global.server.cjs +27 -0
  10. package/dist/Global.server.mjs +27 -0
  11. package/dist/GlobalRelease.cjs +32 -0
  12. package/dist/GlobalRelease.mjs +30 -0
  13. package/dist/ProviderScope.cjs +201 -0
  14. package/dist/ProviderScope.d.cts +14 -0
  15. package/dist/ProviderScope.d.mts +15 -0
  16. package/dist/ProviderScope.mjs +190 -0
  17. package/dist/ThemeProvider.cjs +104 -0
  18. package/dist/ThemeProvider.mjs +104 -0
  19. package/dist/ThemeProvider.server.cjs +140 -0
  20. package/dist/ThemeProvider.server.mjs +140 -0
  21. package/dist/ThemeValue.cjs +64 -0
  22. package/dist/ThemeValue.d.cts +3 -0
  23. package/dist/ThemeValue.d.mts +4 -0
  24. package/dist/ThemeValue.mjs +62 -0
  25. package/dist/_virtual/_rolldown/runtime.cjs +22 -0
  26. package/dist/createStyle.cjs +66 -0
  27. package/dist/createStyle.d.cts +9 -0
  28. package/dist/createStyle.d.mts +9 -0
  29. package/dist/createStyle.mjs +65 -0
  30. package/dist/createStyle.server.cjs +60 -0
  31. package/dist/createStyle.server.d.cts +8 -0
  32. package/dist/createStyle.server.d.mts +8 -0
  33. package/dist/createStyle.server.mjs +59 -0
  34. package/dist/defaultStyle.cjs +68 -0
  35. package/dist/defaultStyle.d.cts +29 -0
  36. package/dist/defaultStyle.d.mts +29 -0
  37. package/dist/defaultStyle.mjs +68 -0
  38. package/dist/defaultStyle.server.cjs +52 -0
  39. package/dist/defaultStyle.server.d.cts +27 -0
  40. package/dist/defaultStyle.server.d.mts +27 -0
  41. package/dist/defaultStyle.server.mjs +52 -0
  42. package/dist/domProps.cjs +27 -0
  43. package/dist/domProps.mjs +27 -0
  44. package/dist/index.cjs +72 -0
  45. package/dist/index.d.cts +28 -0
  46. package/dist/index.d.mts +28 -0
  47. package/dist/index.mjs +7 -0
  48. package/dist/index.server.cjs +66 -0
  49. package/dist/index.server.d.cts +26 -0
  50. package/dist/index.server.d.mts +26 -0
  51. package/dist/index.server.mjs +5 -0
  52. package/dist/plainTheme.cjs +49 -0
  53. package/dist/plainTheme.mjs +49 -0
  54. package/dist/serverContext.cjs +14 -0
  55. package/dist/serverContext.d.cts +2 -0
  56. package/dist/serverContext.d.mts +2 -0
  57. package/dist/serverContext.mjs +14 -0
  58. package/dist/styleElements.cjs +99 -0
  59. package/dist/styleElements.d.cts +1 -0
  60. package/dist/styleElements.d.mts +2 -0
  61. package/dist/styleElements.mjs +95 -0
  62. package/dist/styled.cjs +51 -0
  63. package/dist/styled.mjs +51 -0
  64. package/dist/styled.server.cjs +24 -0
  65. package/dist/styled.server.mjs +24 -0
  66. package/dist/styledParts.cjs +67 -0
  67. package/dist/styledParts.mjs +67 -0
  68. package/dist/types.d.cts +274 -0
  69. package/dist/types.d.mts +274 -0
  70. package/dist/useMediaQuery.cjs +20 -0
  71. package/dist/useMediaQuery.d.cts +13 -0
  72. package/dist/useMediaQuery.d.mts +13 -0
  73. package/dist/useMediaQuery.mjs +20 -0
  74. package/package.json +88 -5
@@ -0,0 +1,52 @@
1
+ let _umber_style_core = require("@umber-style/core");
2
+ const require_createStyle_server = require("./createStyle.server.cjs");
3
+ // src/defaultStyle.server.ts
4
+ /** Makes the default styling for server components: one engine, made on first use. */
5
+ function createDefaultStyle() {
6
+ let pending = {};
7
+ let bound;
8
+ const getStyle = () => {
9
+ if (!bound) {
10
+ const engine = pending.engine ?? (0, _umber_style_core.createLazyEngine)(pending);
11
+ if (pending.theme) engine.setTheme(pending.theme);
12
+ bound = require_createStyle_server.bindEngine(engine);
13
+ }
14
+ return bound;
15
+ };
16
+ /** 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
+ function configure(options) {
18
+ if (bound) throw new Error("configure must be called before the default style is used.");
19
+ pending = options;
20
+ }
21
+ const styled = (0, _umber_style_core.withTagShorthands)(((tag, options) => getStyle().styled(tag, options)));
22
+ const StyleSheet = { create: ((styles) => typeof styles === "function" ? getStyle().StyleSheet.create(styles) : (0, _umber_style_core.createDeferredRecord)(styles, () => getStyle().StyleSheet.create(styles))) };
23
+ const useStyle = ((sheet) => getStyle().useStyle(sheet));
24
+ function useTheme() {
25
+ return getStyle().useTheme();
26
+ }
27
+ function ThemeProvider(props) {
28
+ return getStyle().ThemeProvider(props);
29
+ }
30
+ function Global(props) {
31
+ return getStyle().Global(props);
32
+ }
33
+ return {
34
+ configure,
35
+ getEngine: () => getStyle().engine,
36
+ styled,
37
+ StyleSheet,
38
+ useStyle,
39
+ useTheme,
40
+ readTheme: useTheme,
41
+ ThemeProvider,
42
+ apply: ((...entries) => getStyle().apply(...entries)),
43
+ css: ((...args) => (0, _umber_style_core.createDeferredObject)(() => getStyle().css(...args))),
44
+ when: ((theme, colorScheme) => getStyle().when(theme, colorScheme)),
45
+ whenScheme: ((scheme) => getStyle().whenScheme(scheme)),
46
+ themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme)),
47
+ keyframes: _umber_style_core.keyframes,
48
+ globalStyles: _umber_style_core.globalStyles,
49
+ Global
50
+ };
51
+ }
52
+ exports.createDefaultStyle = createDefaultStyle;
@@ -0,0 +1,27 @@
1
+ import { DefaultStyleOptions, GlobalProps, ServerStyle, SheetDefinition, Styled, Theme as Theme$1, WebThemeProviderProps } from "./types.cjs";
2
+ import { WebStyleObject } from "@umber-style/core";
3
+ /** Makes the default styling for server components: one engine, made on first use. */
4
+ export declare function createDefaultStyle(): {
5
+ configure: (options: DefaultStyleOptions) => void;
6
+ getEngine: () => import("@umber-style/core").Engine<Theme$1>;
7
+ styled: Styled<Theme$1>;
8
+ StyleSheet: {
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$1) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
11
+ };
12
+ useStyle: {
13
+ <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
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
+ };
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;
27
+ };
@@ -0,0 +1,27 @@
1
+ import { DefaultStyleOptions, GlobalProps, ServerStyle, SheetDefinition, Styled, Theme as Theme$1, WebThemeProviderProps } from "./types.mjs";
2
+ import { WebStyleObject } from "@umber-style/core";
3
+ /** Makes the default styling for server components: one engine, made on first use. */
4
+ export declare function createDefaultStyle(): {
5
+ configure: (options: DefaultStyleOptions) => void;
6
+ getEngine: () => import("@umber-style/core").Engine<Theme$1>;
7
+ styled: Styled<Theme$1>;
8
+ StyleSheet: {
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$1) => Record<K, WebStyleObject>): SheetDefinition<Record<K, WebStyleObject>, import("@umber-style/core").SheetEntry>;
11
+ };
12
+ useStyle: {
13
+ <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
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
+ };
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;
27
+ };
@@ -0,0 +1,52 @@
1
+ import { createDeferredObject, createDeferredRecord, createLazyEngine, globalStyles, keyframes, withTagShorthands } from "@umber-style/core";
2
+ import { bindEngine } from "./createStyle.server.mjs";
3
+ // src/defaultStyle.server.ts
4
+ /** Makes the default styling for server components: one engine, made on first use. */
5
+ function createDefaultStyle() {
6
+ let pending = {};
7
+ let bound;
8
+ const getStyle = () => {
9
+ if (!bound) {
10
+ const engine = pending.engine ?? createLazyEngine(pending);
11
+ if (pending.theme) engine.setTheme(pending.theme);
12
+ bound = bindEngine(engine);
13
+ }
14
+ return bound;
15
+ };
16
+ /** 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
+ function configure(options) {
18
+ if (bound) throw new Error("configure must be called before the default style is used.");
19
+ pending = options;
20
+ }
21
+ const styled = withTagShorthands(((tag, options) => getStyle().styled(tag, options)));
22
+ const StyleSheet = { create: ((styles) => typeof styles === "function" ? getStyle().StyleSheet.create(styles) : createDeferredRecord(styles, () => getStyle().StyleSheet.create(styles))) };
23
+ const useStyle = ((sheet) => getStyle().useStyle(sheet));
24
+ function useTheme() {
25
+ return getStyle().useTheme();
26
+ }
27
+ function ThemeProvider(props) {
28
+ return getStyle().ThemeProvider(props);
29
+ }
30
+ function Global(props) {
31
+ return getStyle().Global(props);
32
+ }
33
+ return {
34
+ configure,
35
+ getEngine: () => getStyle().engine,
36
+ styled,
37
+ StyleSheet,
38
+ useStyle,
39
+ useTheme,
40
+ readTheme: useTheme,
41
+ ThemeProvider,
42
+ apply: ((...entries) => getStyle().apply(...entries)),
43
+ css: ((...args) => createDeferredObject(() => getStyle().css(...args))),
44
+ when: ((theme, colorScheme) => getStyle().when(theme, colorScheme)),
45
+ whenScheme: ((scheme) => getStyle().whenScheme(scheme)),
46
+ themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme)),
47
+ keyframes,
48
+ globalStyles,
49
+ Global
50
+ };
51
+ }
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 ADDED
@@ -0,0 +1,72 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_defaultStyle = require("./defaultStyle.cjs");
3
+ let _umber_style_core = require("@umber-style/core");
4
+ const require_CacheProvider = require("./CacheProvider.cjs");
5
+ const require_useMediaQuery = require("./useMediaQuery.cjs");
6
+ const require_createStyle = require("./createStyle.cjs");
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;
10
+ exports.StyleSheet = StyleSheet;
11
+ exports.ThemeContext = ThemeContext;
12
+ exports.ThemeProvider = ThemeProvider;
13
+ exports.ThemeScope = ThemeScope;
14
+ Object.defineProperty(exports, "add", {
15
+ enumerable: true,
16
+ get: function() {
17
+ return _umber_style_core.add;
18
+ }
19
+ });
20
+ Object.defineProperty(exports, "alpha", {
21
+ enumerable: true,
22
+ get: function() {
23
+ return _umber_style_core.alpha;
24
+ }
25
+ });
26
+ exports.apply = apply;
27
+ Object.defineProperty(exports, "at", {
28
+ enumerable: true,
29
+ get: function() {
30
+ return _umber_style_core.at;
31
+ }
32
+ });
33
+ exports.bindEngine = require_createStyle.bindEngine;
34
+ exports.configure = configure;
35
+ exports.createDefaultStyle = require_defaultStyle.createDefaultStyle;
36
+ exports.createStyle = require_createStyle.createStyle;
37
+ exports.css = css;
38
+ Object.defineProperty(exports, "divide", {
39
+ enumerable: true,
40
+ get: function() {
41
+ return _umber_style_core.divide;
42
+ }
43
+ });
44
+ exports.getEngine = getEngine;
45
+ exports.globalStyles = globalStyles;
46
+ exports.keyframes = keyframes;
47
+ Object.defineProperty(exports, "multiply", {
48
+ enumerable: true,
49
+ get: function() {
50
+ return _umber_style_core.multiply;
51
+ }
52
+ });
53
+ Object.defineProperty(exports, "negate", {
54
+ enumerable: true,
55
+ get: function() {
56
+ return _umber_style_core.negate;
57
+ }
58
+ });
59
+ exports.styled = styled;
60
+ Object.defineProperty(exports, "subtract", {
61
+ enumerable: true,
62
+ get: function() {
63
+ return _umber_style_core.subtract;
64
+ }
65
+ });
66
+ exports.themeClass = themeClass;
67
+ exports.useMediaQuery = require_useMediaQuery.useMediaQuery;
68
+ exports.useStyle = useStyle;
69
+ exports.useTheme = useTheme;
70
+ exports.useThemeClass = useThemeClass;
71
+ exports.when = when;
72
+ exports.whenScheme = whenScheme;
@@ -0,0 +1,28 @@
1
+ import { add, alpha, at, divide, multiply, negate, subtract } from "@umber-style/core";
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";
5
+ import { bindEngine, createStyle } from "./createStyle.cjs";
6
+ import { createDefaultStyle } from "./defaultStyle.cjs";
7
+ export declare const configure: (options: DefaultStyleOptions) => void, getEngine: () => import("@umber-style/core").Engine<Theme>, styled: Styled<Theme>, StyleSheet: {
8
+ create<K extends string>(styles: import("@umber-style/core").ObjectSheet<K>): { readonly [P in K]: 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>;
10
+ }, useStyle: {
11
+ <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
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; };
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)[]) => {
14
+ className?: string;
15
+ }, css: CssFunction, themeClass: (theme: {
16
+ readonly _theme?: never;
17
+ }, colorScheme?: import("@umber-style/core").ColorScheme) => string, when: (theme: {
18
+ readonly _theme?: never;
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 };
@@ -0,0 +1,28 @@
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
+ 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";
5
+ import { bindEngine, createStyle } from "./createStyle.mjs";
6
+ import { createDefaultStyle } from "./defaultStyle.mjs";
7
+ export declare const configure: (options: DefaultStyleOptions) => void, getEngine: () => import("@umber-style/core").Engine<Theme>, styled: Styled<Theme>, StyleSheet: {
8
+ create<K extends string>(styles: import("@umber-style/core").ObjectSheet<K>): { readonly [P in K]: 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>;
10
+ }, useStyle: {
11
+ <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
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; };
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)[]) => {
14
+ className?: string;
15
+ }, css: CssFunction, themeClass: (theme: {
16
+ readonly _theme?: never;
17
+ }, colorScheme?: import("@umber-style/core").ColorScheme) => string, when: (theme: {
18
+ readonly _theme?: never;
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 ADDED
@@ -0,0 +1,7 @@
1
+ import { createDefaultStyle } from "./defaultStyle.mjs";
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";
5
+ import { bindEngine, createStyle } from "./createStyle.mjs";
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 };
@@ -0,0 +1,66 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_defaultStyle_server = require("./defaultStyle.server.cjs");
3
+ let _umber_style_core = require("@umber-style/core");
4
+ const require_createStyle_server = require("./createStyle.server.cjs");
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;
7
+ exports.StyleSheet = StyleSheet;
8
+ exports.ThemeProvider = ThemeProvider;
9
+ Object.defineProperty(exports, "add", {
10
+ enumerable: true,
11
+ get: function() {
12
+ return _umber_style_core.add;
13
+ }
14
+ });
15
+ Object.defineProperty(exports, "alpha", {
16
+ enumerable: true,
17
+ get: function() {
18
+ return _umber_style_core.alpha;
19
+ }
20
+ });
21
+ exports.apply = apply;
22
+ Object.defineProperty(exports, "at", {
23
+ enumerable: true,
24
+ get: function() {
25
+ return _umber_style_core.at;
26
+ }
27
+ });
28
+ exports.bindEngine = require_createStyle_server.bindEngine;
29
+ exports.configure = configure;
30
+ exports.createDefaultStyle = require_defaultStyle_server.createDefaultStyle;
31
+ exports.createStyle = require_createStyle_server.createStyle;
32
+ exports.css = css;
33
+ Object.defineProperty(exports, "divide", {
34
+ enumerable: true,
35
+ get: function() {
36
+ return _umber_style_core.divide;
37
+ }
38
+ });
39
+ exports.getEngine = getEngine;
40
+ exports.globalStyles = globalStyles;
41
+ exports.keyframes = keyframes;
42
+ Object.defineProperty(exports, "multiply", {
43
+ enumerable: true,
44
+ get: function() {
45
+ return _umber_style_core.multiply;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "negate", {
49
+ enumerable: true,
50
+ get: function() {
51
+ return _umber_style_core.negate;
52
+ }
53
+ });
54
+ exports.readTheme = readTheme;
55
+ exports.styled = styled;
56
+ Object.defineProperty(exports, "subtract", {
57
+ enumerable: true,
58
+ get: function() {
59
+ return _umber_style_core.subtract;
60
+ }
61
+ });
62
+ exports.themeClass = themeClass;
63
+ exports.useStyle = useStyle;
64
+ exports.useTheme = useTheme;
65
+ exports.when = when;
66
+ exports.whenScheme = whenScheme;
@@ -0,0 +1,26 @@
1
+ import { add, alpha, at, divide, multiply, negate, subtract } from "@umber-style/core";
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 { bindEngine, createStyle } from "./createStyle.server.cjs";
4
+ import { createDefaultStyle } from "./defaultStyle.server.cjs";
5
+ export declare const configure: (options: DefaultStyleOptions) => void, getEngine: () => import("@umber-style/core").Engine<Theme>, styled: Styled<Theme>, StyleSheet: {
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: Theme) => Record<K, import("@umber-style/core").WebStyleObject>): SheetDefinition<Record<K, import("@umber-style/core").WebStyleObject>, import("@umber-style/core").SheetEntry>;
8
+ }, useStyle: {
9
+ <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
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
+ }, 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
+ className?: string;
13
+ }, css: CssFunction, themeClass: (theme: {
14
+ readonly _theme?: never;
15
+ }, colorScheme?: import("@umber-style/core").ColorScheme) => string, when: (theme: {
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, 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 };
@@ -0,0 +1,26 @@
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
+ import { add, alpha, at, divide, multiply, negate, subtract } from "@umber-style/core";
3
+ import { bindEngine, createStyle } from "./createStyle.server.mjs";
4
+ import { createDefaultStyle } from "./defaultStyle.server.mjs";
5
+ export declare const configure: (options: DefaultStyleOptions) => void, getEngine: () => import("@umber-style/core").Engine<Theme>, styled: Styled<Theme>, StyleSheet: {
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: Theme) => Record<K, import("@umber-style/core").WebStyleObject>): SheetDefinition<Record<K, import("@umber-style/core").WebStyleObject>, import("@umber-style/core").SheetEntry>;
8
+ }, useStyle: {
9
+ <K extends string>(sheet: { readonly [P in K]: import("@umber-style/core").SheetEntry; }): { readonly [P in K]: import("@umber-style/core").SheetEntry; };
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
+ }, 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
+ className?: string;
13
+ }, css: CssFunction, themeClass: (theme: {
14
+ readonly _theme?: never;
15
+ }, colorScheme?: import("@umber-style/core").ColorScheme) => string, when: (theme: {
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, 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 };
@@ -0,0 +1,5 @@
1
+ import { createDefaultStyle } from "./defaultStyle.server.mjs";
2
+ import { add, alpha, at, divide, multiply, negate, subtract } from "@umber-style/core";
3
+ import { bindEngine, createStyle } from "./createStyle.server.mjs";
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 };
@@ -0,0 +1,14 @@
1
+ let react = require("react");
2
+ // src/serverContext.ts
3
+ /**
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.
7
+ */
8
+ function createRequestSlot(defaultValue, cache = react.cache) {
9
+ return cache(() => ({
10
+ current: defaultValue,
11
+ isSet: false
12
+ }));
13
+ }
14
+ exports.createRequestSlot = createRequestSlot;
@@ -0,0 +1,2 @@
1
+ /** What makes the slot of a request: `React.cache`, or a function with the same contract. */
2
+ export type CacheFunction = <R>(make: () => R) => () => R;