@gild-ui/react-native 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 (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +79 -2
  3. package/dist/Button.cjs +193 -0
  4. package/dist/Button.d.cts +3 -0
  5. package/dist/Button.d.mts +3 -0
  6. package/dist/Button.mjs +192 -0
  7. package/dist/Button.types-Bb9gBlbS.d.mts +1402 -0
  8. package/dist/Flex.cjs +18 -0
  9. package/dist/Flex.d.cts +2 -0
  10. package/dist/Flex.d.mts +2 -0
  11. package/dist/Flex.mjs +17 -0
  12. package/dist/Modal.cjs +56 -0
  13. package/dist/Modal.d.cts +7 -0
  14. package/dist/Modal.d.mts +7 -0
  15. package/dist/Modal.mjs +55 -0
  16. package/dist/TextInput.cjs +169 -0
  17. package/dist/TextInput.d.cts +3 -0
  18. package/dist/TextInput.d.mts +3 -0
  19. package/dist/TextInput.mjs +169 -0
  20. package/dist/ThemeProvider-BgTIjOfL.mjs +49 -0
  21. package/dist/ThemeProvider-CsfZi16_.cjs +53 -0
  22. package/dist/ThemeProvider.cjs +3 -0
  23. package/dist/ThemeProvider.d.cts +2 -0
  24. package/dist/ThemeProvider.d.mts +2 -0
  25. package/dist/ThemeProvider.mjs +1 -0
  26. package/dist/Typography.cjs +68 -0
  27. package/dist/Typography.d.cts +3 -0
  28. package/dist/Typography.d.mts +3 -0
  29. package/dist/Typography.mjs +68 -0
  30. package/dist/View-B1PzjpDr.cjs +76 -0
  31. package/dist/View-tHL6rDa8.mjs +65 -0
  32. package/dist/View.cjs +3 -0
  33. package/dist/View.d.cts +2 -0
  34. package/dist/View.d.mts +2 -0
  35. package/dist/View.mjs +1 -0
  36. package/dist/bridge-B_MGN7QY.d.mts +10 -0
  37. package/dist/bridge-CH-RnxIe.d.cts +10 -0
  38. package/dist/engine-CpEhmg4W.mjs +38 -0
  39. package/dist/engine-D9Z9l9JU.cjs +42 -0
  40. package/dist/engine.cjs +49 -0
  41. package/dist/engine.d.cts +66 -0
  42. package/dist/engine.d.mts +66 -0
  43. package/dist/engine.mjs +19 -0
  44. package/dist/exact-DOxXx2ZR.d.cts +9 -0
  45. package/dist/exact-DOxXx2ZR.d.mts +9 -0
  46. package/dist/index-BqhozwWy.d.mts +41 -0
  47. package/dist/index-DcHJkXar.d.cts +41 -0
  48. package/dist/index.cjs +67 -0
  49. package/dist/index.d.cts +14 -0
  50. package/dist/index.d.mts +14 -0
  51. package/dist/index.mjs +5 -0
  52. package/dist/phoneTheme-RIafDzgw.mjs +12 -0
  53. package/dist/phoneTheme-kvZTk6l5.cjs +29 -0
  54. package/dist/styled-CmWGOVKb.cjs +174 -0
  55. package/dist/styled-k66N0ABX.mjs +163 -0
  56. package/dist/themes-DK6h0IiW.d.cts +1402 -0
  57. package/dist/themes-rGHVhV5e.mjs +8 -0
  58. package/dist/useDefaultProps-1josiKIp.mjs +13 -0
  59. package/dist/useDefaultProps-DzaUOADT.cjs +18 -0
  60. package/dist/useTheme.cjs +8 -0
  61. package/dist/useTheme.d.cts +3 -0
  62. package/dist/useTheme.d.mts +3 -0
  63. package/dist/useTheme.mjs +1 -0
  64. package/package.json +168 -4
@@ -0,0 +1,68 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_engine = require("./engine-D9Z9l9JU.cjs");
3
+ const require_styled = require("./styled-CmWGOVKb.cjs");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ require("react");
6
+ let _soroush_tech_styled_system = require("@soroush.tech/styled-system");
7
+ let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
8
+ // ../react/src/Typography/Typography.tsx
9
+ const shouldForwardProp = (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([
10
+ ..._soroush_tech_styled_system_should_forward_prop.props,
11
+ "noWrap",
12
+ "gutterBottom",
13
+ "align",
14
+ "textTransform"
15
+ ]);
16
+ const colorSystem = (0, _soroush_tech_styled_system.system)({
17
+ color: {
18
+ property: "color",
19
+ scale: "text"
20
+ },
21
+ bg: {
22
+ property: "backgroundColor",
23
+ scale: "background"
24
+ },
25
+ opacity: { property: "opacity" },
26
+ textTransform: { property: "textTransform" }
27
+ });
28
+ const typographyVariants = ({ variant = "body1", theme }) => {
29
+ const { fontSize, fontWeight, letterSpacing, textTransform } = theme.typography[variant];
30
+ return {
31
+ ...fontSize !== void 0 && { fontSize: theme.fontSizes[fontSize] },
32
+ ...fontWeight && { fontWeight: theme.fontWeights[fontWeight] },
33
+ ...letterSpacing && { letterSpacing: theme.letterSpacings[letterSpacing] },
34
+ ...textTransform && { textTransform }
35
+ };
36
+ };
37
+ const TypographyBase = require_styled.styled("p", {
38
+ name: "Typography",
39
+ label: "Typography",
40
+ shouldForwardProp,
41
+ systemProps: [
42
+ _soroush_tech_styled_system.space,
43
+ _soroush_tech_styled_system.layout,
44
+ colorSystem,
45
+ _soroush_tech_styled_system.typography,
46
+ _soroush_tech_styled_system.flexbox,
47
+ _soroush_tech_styled_system.border,
48
+ _soroush_tech_styled_system.position
49
+ ]
50
+ })(typographyVariants, ({ align }) => align ? { textAlign: align } : {}, ({ gutterBottom }) => gutterBottom ? { marginBottom: "0.5em" } : {}, ({ noWrap }) => noWrap ? {
51
+ overflow: "hidden",
52
+ textOverflow: "ellipsis",
53
+ whiteSpace: "nowrap"
54
+ } : {});
55
+ function Typography({ variant = "body1", as, style, className, slotProps, ...rest }) {
56
+ const theme = (0, require_engine.engine_exports.useTheme)();
57
+ const element = as ?? theme.typography[variant].element;
58
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TypographyBase, {
59
+ as: element,
60
+ variant,
61
+ ...require_styled.mergeOverrides(slotProps?.root, {
62
+ style,
63
+ className
64
+ }),
65
+ ...rest
66
+ });
67
+ }
68
+ exports.Typography = Typography;
@@ -0,0 +1,3 @@
1
+ import { c as TypographyAlign, d as TypographySlot, f as TypographyThemeConfig, l as TypographyOwnerState, o as BackgroundToken, p as TypographyVariant, s as TextColorToken, u as TypographyProps } from "./themes-DK6h0IiW.cjs";
2
+ export declare function Typography({ variant, as, style, className, slotProps, ...rest }: Readonly<TypographyProps>): import("react").JSX.Element;
3
+ export { BackgroundToken, TextColorToken, TypographyAlign, TypographyOwnerState, TypographyProps, TypographySlot, TypographyThemeConfig, type TypographyVariant };
@@ -0,0 +1,3 @@
1
+ import { C as TypographyVariant, S as TypographyThemeConfig, _ as TextColorToken, b as TypographyProps, g as BackgroundToken, v as TypographyAlign, x as TypographySlot, y as TypographyOwnerState } from "./Button.types-Bb9gBlbS.mjs";
2
+ export declare function Typography({ variant, as, style, className, slotProps, ...rest }: Readonly<TypographyProps>): import("react").JSX.Element;
3
+ export { BackgroundToken, TextColorToken, TypographyAlign, TypographyOwnerState, TypographyProps, TypographySlot, TypographyThemeConfig, type TypographyVariant };
@@ -0,0 +1,68 @@
1
+ import { t as engine_exports } from "./engine-CpEhmg4W.mjs";
2
+ import { n as mergeOverrides, t as styled } from "./styled-k66N0ABX.mjs";
3
+ import "./themes-rGHVhV5e.mjs";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import "react";
6
+ import { border, flexbox, layout, position, space, system, typography } from "@soroush.tech/styled-system";
7
+ import { createShouldForwardProp, props } from "@soroush.tech/styled-system/should-forward-prop";
8
+ // ../react/src/Typography/Typography.tsx
9
+ const shouldForwardProp = createShouldForwardProp([
10
+ ...props,
11
+ "noWrap",
12
+ "gutterBottom",
13
+ "align",
14
+ "textTransform"
15
+ ]);
16
+ const colorSystem = system({
17
+ color: {
18
+ property: "color",
19
+ scale: "text"
20
+ },
21
+ bg: {
22
+ property: "backgroundColor",
23
+ scale: "background"
24
+ },
25
+ opacity: { property: "opacity" },
26
+ textTransform: { property: "textTransform" }
27
+ });
28
+ const typographyVariants = ({ variant = "body1", theme }) => {
29
+ const { fontSize, fontWeight, letterSpacing, textTransform } = theme.typography[variant];
30
+ return {
31
+ ...fontSize !== void 0 && { fontSize: theme.fontSizes[fontSize] },
32
+ ...fontWeight && { fontWeight: theme.fontWeights[fontWeight] },
33
+ ...letterSpacing && { letterSpacing: theme.letterSpacings[letterSpacing] },
34
+ ...textTransform && { textTransform }
35
+ };
36
+ };
37
+ const TypographyBase = styled("p", {
38
+ name: "Typography",
39
+ label: "Typography",
40
+ shouldForwardProp,
41
+ systemProps: [
42
+ space,
43
+ layout,
44
+ colorSystem,
45
+ typography,
46
+ flexbox,
47
+ border,
48
+ position
49
+ ]
50
+ })(typographyVariants, ({ align }) => align ? { textAlign: align } : {}, ({ gutterBottom }) => gutterBottom ? { marginBottom: "0.5em" } : {}, ({ noWrap }) => noWrap ? {
51
+ overflow: "hidden",
52
+ textOverflow: "ellipsis",
53
+ whiteSpace: "nowrap"
54
+ } : {});
55
+ function Typography({ variant = "body1", as, style, className, slotProps, ...rest }) {
56
+ const theme = (0, engine_exports.useTheme)();
57
+ const element = as ?? theme.typography[variant].element;
58
+ return /* @__PURE__ */ jsx(TypographyBase, {
59
+ as: element,
60
+ variant,
61
+ ...mergeOverrides(slotProps?.root, {
62
+ style,
63
+ className
64
+ }),
65
+ ...rest
66
+ });
67
+ }
68
+ export { Typography };
@@ -0,0 +1,76 @@
1
+ const require_styled = require("./styled-CmWGOVKb.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ let _soroush_tech_styled_system = require("@soroush.tech/styled-system");
4
+ let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
5
+ // ../react/src/style/withRootOverrides.tsx
6
+ /**
7
+ * A component made by `styled` that takes `slotProps.root` as well as `style` and `className`, for the
8
+ * layout primitives whose root is the component itself. It keeps what makes it a styled component
9
+ * (its styles, tag and target), so `styled(Component)` still flattens into one element and the
10
+ * component is still a selector.
11
+ */
12
+ function withRootOverrides(Root) {
13
+ const Component = ({ slotProps, style, className, ...rest }) => {
14
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Root, {
15
+ ...rest,
16
+ ...require_styled.mergeOverrides(slotProps?.root, {
17
+ style,
18
+ className
19
+ })
20
+ });
21
+ };
22
+ return Object.assign(Component, {
23
+ _styles: Root._styles,
24
+ _tag: Root._tag,
25
+ _shouldForwardProp: Root._shouldForwardProp,
26
+ _target: Root._target,
27
+ toString: () => Root.toString()
28
+ });
29
+ }
30
+ // ../react/src/View/View.tsx
31
+ const shouldForwardProp = (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([
32
+ ..._soroush_tech_styled_system_should_forward_prop.props,
33
+ "cursor",
34
+ "order",
35
+ "layout"
36
+ ]);
37
+ const colorSystem = (0, _soroush_tech_styled_system.system)({
38
+ bg: {
39
+ property: "backgroundColor",
40
+ scale: "background"
41
+ },
42
+ borderColor: {
43
+ property: "borderColor",
44
+ scale: "border"
45
+ },
46
+ opacity: { property: "opacity" },
47
+ cursor: { property: "cursor" },
48
+ order: { property: "order" }
49
+ });
50
+ const View = withRootOverrides(require_styled.styled("div", {
51
+ name: "View",
52
+ label: "View",
53
+ shouldForwardProp,
54
+ systemProps: [
55
+ _soroush_tech_styled_system.space,
56
+ _soroush_tech_styled_system.layout,
57
+ _soroush_tech_styled_system.typography,
58
+ _soroush_tech_styled_system.border,
59
+ colorSystem,
60
+ _soroush_tech_styled_system.position,
61
+ _soroush_tech_styled_system.span,
62
+ _soroush_tech_styled_system.layoutFrame
63
+ ]
64
+ })());
65
+ Object.defineProperty(exports, "View", {
66
+ enumerable: true,
67
+ get: function() {
68
+ return View;
69
+ }
70
+ });
71
+ Object.defineProperty(exports, "withRootOverrides", {
72
+ enumerable: true,
73
+ get: function() {
74
+ return withRootOverrides;
75
+ }
76
+ });
@@ -0,0 +1,65 @@
1
+ import { n as mergeOverrides, t as styled } from "./styled-k66N0ABX.mjs";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { border, layout, layoutFrame, position, space, span, system, typography } from "@soroush.tech/styled-system";
4
+ import { createShouldForwardProp, props } from "@soroush.tech/styled-system/should-forward-prop";
5
+ // ../react/src/style/withRootOverrides.tsx
6
+ /**
7
+ * A component made by `styled` that takes `slotProps.root` as well as `style` and `className`, for the
8
+ * layout primitives whose root is the component itself. It keeps what makes it a styled component
9
+ * (its styles, tag and target), so `styled(Component)` still flattens into one element and the
10
+ * component is still a selector.
11
+ */
12
+ function withRootOverrides(Root) {
13
+ const Component = ({ slotProps, style, className, ...rest }) => {
14
+ return /* @__PURE__ */ jsx(Root, {
15
+ ...rest,
16
+ ...mergeOverrides(slotProps?.root, {
17
+ style,
18
+ className
19
+ })
20
+ });
21
+ };
22
+ return Object.assign(Component, {
23
+ _styles: Root._styles,
24
+ _tag: Root._tag,
25
+ _shouldForwardProp: Root._shouldForwardProp,
26
+ _target: Root._target,
27
+ toString: () => Root.toString()
28
+ });
29
+ }
30
+ // ../react/src/View/View.tsx
31
+ const shouldForwardProp = createShouldForwardProp([
32
+ ...props,
33
+ "cursor",
34
+ "order",
35
+ "layout"
36
+ ]);
37
+ const colorSystem = system({
38
+ bg: {
39
+ property: "backgroundColor",
40
+ scale: "background"
41
+ },
42
+ borderColor: {
43
+ property: "borderColor",
44
+ scale: "border"
45
+ },
46
+ opacity: { property: "opacity" },
47
+ cursor: { property: "cursor" },
48
+ order: { property: "order" }
49
+ });
50
+ const View = withRootOverrides(styled("div", {
51
+ name: "View",
52
+ label: "View",
53
+ shouldForwardProp,
54
+ systemProps: [
55
+ space,
56
+ layout,
57
+ typography,
58
+ border,
59
+ colorSystem,
60
+ position,
61
+ span,
62
+ layoutFrame
63
+ ]
64
+ })());
65
+ export { withRootOverrides as n, View as t };
package/dist/View.cjs ADDED
@@ -0,0 +1,3 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_View = require("./View-B1PzjpDr.cjs");
3
+ exports.View = require_View.View;
@@ -0,0 +1,2 @@
1
+ import { B as ViewColorToken, F as View, H as ViewProps, I as ViewBackgroundToken, L as ViewBorderColorToken, R as ViewBorderRadiusToken, U as ViewSlot, V as ViewOwnerState, W as ViewThemeConfig, z as ViewBorderWidthToken } from "./themes-DK6h0IiW.cjs";
2
+ export { View, ViewBackgroundToken, ViewBorderColorToken, ViewBorderRadiusToken, ViewBorderWidthToken, ViewColorToken, ViewOwnerState, ViewProps, ViewSlot, ViewThemeConfig };
@@ -0,0 +1,2 @@
1
+ import { $ as ViewSlot, G as View, J as ViewBorderRadiusToken, K as ViewBackgroundToken, Q as ViewProps, X as ViewColorToken, Y as ViewBorderWidthToken, Z as ViewOwnerState, et as ViewThemeConfig, q as ViewBorderColorToken } from "./Button.types-Bb9gBlbS.mjs";
2
+ export { View, ViewBackgroundToken, ViewBorderColorToken, ViewBorderRadiusToken, ViewBorderWidthToken, ViewColorToken, ViewOwnerState, ViewProps, ViewSlot, ViewThemeConfig };
package/dist/View.mjs ADDED
@@ -0,0 +1 @@
1
+ export { t as View } from "./View-tHL6rDa8.mjs";
@@ -0,0 +1,10 @@
1
+ import { p as GildTheme } from "./Button.types-Bb9gBlbS.mjs";
2
+ import * as GildCore from "@gild-ui/core/theme";
3
+ type GildFallback = GildCore.Register extends {
4
+ themes: unknown;
5
+ } ? Record<never, never> : GildTheme;
6
+ declare module '@umber-style/core' {
7
+ interface Register extends GildCore.Register {}
8
+ interface Theme extends GildFallback {}
9
+ }
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { r as GildTheme } from "./themes-DK6h0IiW.cjs";
2
+ import * as GildCore from "@gild-ui/core/theme";
3
+ type GildFallback = GildCore.Register extends {
4
+ themes: unknown;
5
+ } ? Record<never, never> : GildTheme;
6
+ declare module '@umber-style/core' {
7
+ interface Register extends GildCore.Register {}
8
+ interface Theme extends GildFallback {}
9
+ }
10
+ export {};
@@ -0,0 +1,38 @@
1
+ // \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __exportAll = (all, flags) => {
7
+ let target = Object.setPrototypeOf({}, null);
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ if (!(flags & 1)) __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ return flags & 2 ? target : Object.preventExtensions(target);
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
17
+ key = keys[i];
18
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: ((k) => from[k]).bind(null, key),
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
26
+ // src/platform/engine.ts
27
+ var engine_exports = /* @__PURE__ */ __exportAll({
28
+ getEngine: () => getEngine,
29
+ useStyleValue: () => useStyleValue
30
+ }, 2);
31
+ import * as import__umber_style_react_native from "@umber-style/react-native";
32
+ __reExport(engine_exports, import__umber_style_react_native);
33
+ const webOnly = (name) => () => {
34
+ throw new Error(`${name} is not available on React Native: the engine only has a web form.`);
35
+ };
36
+ const getEngine = webOnly("getEngine");
37
+ const useStyleValue = webOnly("useStyleValue");
38
+ export { engine_exports as t };
@@ -0,0 +1,42 @@
1
+ // \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __exportAll = (all, flags) => {
7
+ let target = Object.setPrototypeOf({}, null);
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ if (!(flags & 1)) __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ return flags & 2 ? target : Object.preventExtensions(target);
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
17
+ key = keys[i];
18
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: ((k) => from[k]).bind(null, key),
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
26
+ // src/platform/engine.ts
27
+ var engine_exports = /* @__PURE__ */ __exportAll({
28
+ getEngine: () => getEngine,
29
+ useStyleValue: () => useStyleValue
30
+ }, 2);
31
+ __reExport(engine_exports, require("@umber-style/react-native"));
32
+ const webOnly = (name) => () => {
33
+ throw new Error(`${name} is not available on React Native: the engine only has a web form.`);
34
+ };
35
+ const getEngine = webOnly("getEngine");
36
+ const useStyleValue = webOnly("useStyleValue");
37
+ Object.defineProperty(exports, "engine_exports", {
38
+ enumerable: true,
39
+ get: function() {
40
+ return engine_exports;
41
+ }
42
+ });
@@ -0,0 +1,49 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_phoneTheme = require("./phoneTheme-kvZTk6l5.cjs");
3
+ let _umber_style_react_native = require("@umber-style/react-native");
4
+ // src/engine/configure.ts
5
+ const lengthKeys = [
6
+ "space",
7
+ "sizes",
8
+ "radii",
9
+ "fontSizes",
10
+ "borderWidths",
11
+ "letterSpacings"
12
+ ];
13
+ function configure({ serverTheme } = {}) {
14
+ (0, _umber_style_react_native.configure)({
15
+ serverTheme: require_phoneTheme.phoneTheme(serverTheme ?? require_phoneTheme.baseTheme),
16
+ lengthKeys
17
+ });
18
+ }
19
+ Object.defineProperty(exports, "asIs", {
20
+ enumerable: true,
21
+ get: function() {
22
+ return _umber_style_react_native.asIs;
23
+ }
24
+ });
25
+ exports.configure = configure;
26
+ Object.defineProperty(exports, "defineTheme", {
27
+ enumerable: true,
28
+ get: function() {
29
+ return _umber_style_react_native.defineTheme;
30
+ }
31
+ });
32
+ Object.defineProperty(exports, "fallback", {
33
+ enumerable: true,
34
+ get: function() {
35
+ return _umber_style_react_native.fallback;
36
+ }
37
+ });
38
+ Object.defineProperty(exports, "val", {
39
+ enumerable: true,
40
+ get: function() {
41
+ return _umber_style_react_native.val;
42
+ }
43
+ });
44
+ Object.defineProperty(exports, "variable", {
45
+ enumerable: true,
46
+ get: function() {
47
+ return _umber_style_react_native.variable;
48
+ }
49
+ });
@@ -0,0 +1,66 @@
1
+ import "./bridge-CH-RnxIe.cjs";
2
+ import { i as Theme$1, it as configure$1, r as GildTheme, t as AppTheme } from "./themes-DK6h0IiW.cjs";
3
+ import { t as Exact } from "./exact-DOxXx2ZR.cjs";
4
+ import * as GildCore from "@gild-ui/core/theme";
5
+ import { Register } from "@gild-ui/core/theme";
6
+ import { asIs, defineTheme, fallback, val, variable } from "@umber-style/react-native";
7
+ type GildFallback = GildCore.Register extends {
8
+ themes: unknown;
9
+ } ? Record<never, never> : GildTheme;
10
+ declare module '@umber-style/react' {
11
+ interface Register extends GildCore.Register {}
12
+ interface Theme extends GildFallback {}
13
+ }
14
+ type GildStyleThemes = GildCore.Register extends {
15
+ themes: infer Themes;
16
+ } ? {
17
+ themes: Themes;
18
+ } : Record<never, never>;
19
+ interface GildStyleRegister extends GildStyleThemes {
20
+ defaultValues: {
21
+ space: 'strict';
22
+ sizes: 'wide';
23
+ colors: 'strict';
24
+ fontSizes: 'strict';
25
+ fontWeights: 'strict';
26
+ lineHeights: 'strict';
27
+ letterSpacings: 'strict';
28
+ fonts: 'strict';
29
+ borders: 'strict';
30
+ borderStyles: 'strict';
31
+ borderWidths: 'strict';
32
+ radii: 'strict';
33
+ shadows: 'strict';
34
+ zIndices: 'strict';
35
+ };
36
+ }
37
+ declare module '@soroush.tech/styled-system' {
38
+ interface Register extends GildStyleRegister {}
39
+ }
40
+ type EngineOptions = Parameters<typeof configure$1>[0];
41
+ interface ConfigureOwnProps<T> {
42
+ /** The theme of anything with no provider above it: server components, and the first render. Defaults to the built-in `baseTheme`. */
43
+ serverTheme?: T & Exact<T, AppTheme>;
44
+ /** The cache every rule is written to. Defaults to `styleCache`, the library's own. */
45
+ cache?: EngineOptions['cache'];
46
+ /** The class prefix. It is the prefix of the cache, which is `soroush` for `styleCache`, so leave it out unless the cache is your own. */
47
+ prefix?: EngineOptions['prefix'];
48
+ }
49
+ /** The options once the app registers its themes: it has no built-in theme to fall back to, so `serverTheme` is required. */
50
+ interface RegisteredConfigureProps<T> extends Omit<ConfigureOwnProps<T>, 'serverTheme'> {
51
+ /** The theme of anything with no provider above it: server components, and the first render. */
52
+ serverTheme: T & Exact<T, AppTheme>;
53
+ }
54
+ type ConfigureOptions<T = Theme$1> = Register extends {
55
+ themes: unknown;
56
+ } ? RegisteredConfigureProps<T> : ConfigureOwnProps<T>;
57
+ /**
58
+ * Configures the styling, once for the whole program, in the `setup` module of the app:
59
+ * `configure({ serverTheme: themes.light })`, the call `@gild-ui/react/engine` takes, so one setup
60
+ * module runs on the web and on a phone. `serverTheme` is the theme of anything with no provider above
61
+ * it. `cache` and `prefix` are accepted and ignored: there is no style sheet to write on a phone.
62
+ */
63
+ export declare function configure<T extends Theme$1 = Theme$1>(...args: Register extends {
64
+ themes: unknown;
65
+ } ? [options: Readonly<ConfigureOptions<T>>] : [options?: Readonly<ConfigureOptions<T>>]): void;
66
+ export { type ConfigureOptions, asIs, defineTheme, fallback, val, variable };
@@ -0,0 +1,66 @@
1
+ import "./bridge-B_MGN7QY.mjs";
2
+ import { d as AppTheme, m as Theme$1, p as GildTheme, tt as configure$2 } from "./Button.types-Bb9gBlbS.mjs";
3
+ import { t as Exact } from "./exact-DOxXx2ZR.mjs";
4
+ import { asIs, defineTheme, fallback, val, variable } from "@umber-style/react-native";
5
+ import * as GildCore from "@gild-ui/core/theme";
6
+ import { Register } from "@gild-ui/core/theme";
7
+ type GildFallback = GildCore.Register extends {
8
+ themes: unknown;
9
+ } ? Record<never, never> : GildTheme;
10
+ declare module '@umber-style/react' {
11
+ interface Register extends GildCore.Register {}
12
+ interface Theme extends GildFallback {}
13
+ }
14
+ type GildStyleThemes = GildCore.Register extends {
15
+ themes: infer Themes;
16
+ } ? {
17
+ themes: Themes;
18
+ } : Record<never, never>;
19
+ interface GildStyleRegister extends GildStyleThemes {
20
+ defaultValues: {
21
+ space: 'strict';
22
+ sizes: 'wide';
23
+ colors: 'strict';
24
+ fontSizes: 'strict';
25
+ fontWeights: 'strict';
26
+ lineHeights: 'strict';
27
+ letterSpacings: 'strict';
28
+ fonts: 'strict';
29
+ borders: 'strict';
30
+ borderStyles: 'strict';
31
+ borderWidths: 'strict';
32
+ radii: 'strict';
33
+ shadows: 'strict';
34
+ zIndices: 'strict';
35
+ };
36
+ }
37
+ declare module '@soroush.tech/styled-system' {
38
+ interface Register extends GildStyleRegister {}
39
+ }
40
+ type EngineOptions = Parameters<typeof configure$2>[0];
41
+ interface ConfigureOwnProps<T> {
42
+ /** The theme of anything with no provider above it: server components, and the first render. Defaults to the built-in `baseTheme`. */
43
+ serverTheme?: T & Exact<T, AppTheme>;
44
+ /** The cache every rule is written to. Defaults to `styleCache`, the library's own. */
45
+ cache?: EngineOptions['cache'];
46
+ /** The class prefix. It is the prefix of the cache, which is `soroush` for `styleCache`, so leave it out unless the cache is your own. */
47
+ prefix?: EngineOptions['prefix'];
48
+ }
49
+ /** The options once the app registers its themes: it has no built-in theme to fall back to, so `serverTheme` is required. */
50
+ interface RegisteredConfigureProps<T> extends Omit<ConfigureOwnProps<T>, 'serverTheme'> {
51
+ /** The theme of anything with no provider above it: server components, and the first render. */
52
+ serverTheme: T & Exact<T, AppTheme>;
53
+ }
54
+ type ConfigureOptions<T = Theme$1> = Register extends {
55
+ themes: unknown;
56
+ } ? RegisteredConfigureProps<T> : ConfigureOwnProps<T>;
57
+ /**
58
+ * Configures the styling, once for the whole program, in the `setup` module of the app:
59
+ * `configure({ serverTheme: themes.light })`, the call `@gild-ui/react/engine` takes, so one setup
60
+ * module runs on the web and on a phone. `serverTheme` is the theme of anything with no provider above
61
+ * it. `cache` and `prefix` are accepted and ignored: there is no style sheet to write on a phone.
62
+ */
63
+ export declare function configure<T extends Theme$1 = Theme$1>(...args: Register extends {
64
+ themes: unknown;
65
+ } ? [options: Readonly<ConfigureOptions<T>>] : [options?: Readonly<ConfigureOptions<T>>]): void;
66
+ export { type ConfigureOptions, asIs, defineTheme, fallback, val, variable };
@@ -0,0 +1,19 @@
1
+ import { t as phoneTheme } from "./phoneTheme-RIafDzgw.mjs";
2
+ import { t as baseTheme } from "./themes-rGHVhV5e.mjs";
3
+ import { asIs, configure as configure$1, defineTheme, fallback, val, variable } from "@umber-style/react-native";
4
+ // src/engine/configure.ts
5
+ const lengthKeys = [
6
+ "space",
7
+ "sizes",
8
+ "radii",
9
+ "fontSizes",
10
+ "borderWidths",
11
+ "letterSpacings"
12
+ ];
13
+ function configure({ serverTheme } = {}) {
14
+ configure$1({
15
+ serverTheme: phoneTheme(serverTheme ?? baseTheme),
16
+ lengthKeys
17
+ });
18
+ }
19
+ export { asIs, configure, defineTheme, fallback, val, variable };
@@ -0,0 +1,9 @@
1
+ import { Register } from "@gild-ui/core/theme";
2
+ /**
3
+ * Once themes are registered, `T` may have no key the registered themes lack, at any depth: each
4
+ * extra key is typed `never`, so the error names it. `components` is the one shared value, which
5
+ * `defineThemes` already checked.
6
+ */
7
+ type Exact<T, Shape> = keyof Register extends never ? unknown : Same<T, Shape>;
8
+ type Same<T, Shape> = T extends readonly unknown[] | ((...args: never[]) => unknown) | string | number | boolean | null | undefined ? T : { [K in keyof T]: K extends 'components' ? T[K] : K extends keyof Shape ? Same<T[K], NonNullable<Shape[K]>> : never; };
9
+ export { Exact as t };
@@ -0,0 +1,9 @@
1
+ import { Register } from "@gild-ui/core/theme";
2
+ /**
3
+ * Once themes are registered, `T` may have no key the registered themes lack, at any depth: each
4
+ * extra key is typed `never`, so the error names it. `components` is the one shared value, which
5
+ * `defineThemes` already checked.
6
+ */
7
+ type Exact<T, Shape> = keyof Register extends never ? unknown : Same<T, Shape>;
8
+ type Same<T, Shape> = T extends readonly unknown[] | ((...args: never[]) => unknown) | string | number | boolean | null | undefined ? T : { [K in keyof T]: K extends 'components' ? T[K] : K extends keyof Shape ? Same<T[K], NonNullable<Shape[K]>> : never; };
9
+ export { Exact as t };