@gild-ui/vue 0.1.0-alpha.0 → 0.1.0-alpha.2

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.
package/README.md CHANGED
@@ -76,6 +76,10 @@ later. Each component's README says how its props map to Vue; [`vue.md`](./vue.m
76
76
  - **`style`** takes entries of `StyleSheet.create`, as on the web; there is no inline style.
77
77
  - **`useTheme()`** is a computed ref: `const theme = useTheme()`, then `theme.value`.
78
78
 
79
+ ## Right to left
80
+
81
+ Opt in once, in `setup()`: `configure({ serverTheme: themes.light, plugins: [rtl()] })`, with `rtl` from `@gild-ui/vue/engine`. Every class then holds both directions and the browser picks by the `dir` attribute of `<html>`; `Direction` (`@gild-ui/vue/Direction`) keeps an area in its own direction, and `dir({ ltr, rtl })` gives a property a value for each. The rules are those of the web's, in [the engine docs](../react/docs/engine.md#right-to-left).
82
+
79
83
  ## Server rendering
80
84
 
81
85
  ```ts
package/dist/Button.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as SharedProps, r as Slot, t as Listeners } from "./props-Bzm7Wbdv.cjs";
2
- import { G as ButtonOwnerState, J as ButtonSize, K as ButtonProps$1, Q as GapToken, U as ButtonColor, W as ButtonLoadingPosition, X as ButtonThemeConfig, Y as ButtonSlot, Z as ButtonVariant, q as ButtonShape } from "./themes-CgFrk0_b.cjs";
1
+ import { n as SharedProps, r as Slot, t as Listeners } from "./props-CDONVzwC.cjs";
2
+ import { $ as GapToken, G as ButtonLoadingPosition, J as ButtonShape, K as ButtonOwnerState, Q as ButtonVariant, W as ButtonColor, X as ButtonSlot, Y as ButtonSize, Z as ButtonThemeConfig, q as ButtonProps$1 } from "./themes-Dj-HzOAq.cjs";
3
3
  import { ButtonHTMLAttributes, SlotsType } from "vue";
4
4
  /**
5
5
  * The props of `Button`: the shared props of `@gild-ui/react` without the icons and the loading
package/dist/Button.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as SharedProps, r as Slot, t as Listeners } from "./props-BRLGZVjJ.mjs";
2
- import { a as ButtonShape, c as ButtonThemeConfig, i as ButtonProps$1, l as ButtonVariant, n as ButtonLoadingPosition, o as ButtonSize, r as ButtonOwnerState, s as ButtonSlot, t as ButtonColor, u as GapToken } from "./Button.types-BnJ28ym9.mjs";
1
+ import { n as SharedProps, r as Slot, t as Listeners } from "./props-ByhSXZf7.mjs";
2
+ import { a as ButtonShape, c as ButtonThemeConfig, i as ButtonProps$1, l as ButtonVariant, n as ButtonLoadingPosition, o as ButtonSize, r as ButtonOwnerState, s as ButtonSlot, t as ButtonColor, u as GapToken } from "./Button.types-CxPFGBO1.mjs";
3
3
  import { ButtonHTMLAttributes, SlotsType } from "vue";
4
4
  /**
5
5
  * The props of `Button`: the shared props of `@gild-ui/react` without the icons and the loading
@@ -2,8 +2,9 @@ import { SheetStyleProp } from "@umber-style/vue";
2
2
  import { ButtonVariants, InputVariantKey, OpenScale, Register as Register$1, RegisteredTheme, Theme as Theme$1, ThemeBackground, ThemeColor, ThemeFonts, ThemeRadii, ThemeSize, ThemeSpaceKey, ThemeText, ThemeTransitionEasing, ThemeTypography, ThemeZOrder, TypographyVariant, VariantOf } from "@gild-ui/core/theme";
3
3
  import { BorderProps, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, SpaceProps, SpanProps, TypographyProps as TypographyProps$1 } from "@soroush.tech/styled-system";
4
4
  import "@umber-style/cache";
5
- import { CSSObject as CSSObject$1 } from "@umber-style/core";
5
+ import { CSSObject as CSSObject$1, ThemeRefs } from "@umber-style/core";
6
6
  import { ButtonHTMLAttributes, CSSProperties, ChangeEventHandler, ElementType, HTMLAttributes, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from "react";
7
+ import "@umber-style/core/internal";
7
8
  /** What the `style` prop of a component takes: an entry of `StyleSheet.create`, or a list of them. */
8
9
  type StyleOverride = SheetStyleProp;
9
10
  /**
@@ -1048,6 +1049,24 @@ interface Theme extends Theme$1 {
1048
1049
  type GildTheme = Theme;
1049
1050
  /** The theme the app registered (see `Register` in the core), or this package's `Theme` when it registered none. */
1050
1051
  type AppTheme = RegisteredTheme<Theme>;
1052
+ /** The parts of the theme that a style function reads as they are: the same ones `baseTheme` marks with `asIs`. */
1053
+ interface StyleThemeModes {
1054
+ readonly $modes: {
1055
+ readonly defaults: 'asIs';
1056
+ readonly typography: 'asIs';
1057
+ readonly sizes: 'asIs';
1058
+ readonly layout: 'asIs';
1059
+ readonly transitions: 'asIs';
1060
+ };
1061
+ }
1062
+ /**
1063
+ * The theme a style function is given (`styled`, `StyleSheet.create`, `keyframes`, `Global`): each token
1064
+ * is the CSS variable that holds it, and the parts that are not CSS values (`sizes`, `typography`,
1065
+ * `layout`, `transitions`, `breakpoints`, `components`, `defaults`) are what they are. A function given to
1066
+ * `Global`, `StyleSheet.create` or `keyframes` (the engine's own, with no modes of the theme) is given
1067
+ * `EngineStyleTheme`.
1068
+ */
1069
+ type StyleTheme = ThemeRefs<AppTheme & StyleThemeModes>;
1051
1070
  /** The corner shapes of a control or a surface. */
1052
1071
  type ShapeKey = 'square' | 'rounded' | 'pill';
1053
1072
  /** The resolved props Button's styled roots receive - what `ownerState` exposes. */
@@ -1110,4 +1129,4 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'col
1110
1129
  /** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
1111
1130
  slotProps?: SlotProps<ButtonSlot>;
1112
1131
  }
1113
- export { SlotOverride as $, TextInputTextColor as A, FlexProps as B, TypographyVariant as C, TextInputProps as D, TextInputOwnerState as E, ModalProps as F, ViewBorderColorToken as G, FlexThemeConfig as H, ModalScroll as I, ViewColorToken as J, ViewBorderRadiusToken as K, ModalSlot as L, TextInputVariant as M, ModalCloseReason as N, TextInputSize as O, ModalOwnerState as P, ViewThemeConfig as Q, ModalThemeConfig as R, TypographyThemeConfig as S, TextInputColor as T, GapToken$1 as U, FlexSlot as V, ViewBackgroundToken as W, ViewProps as X, ViewOwnerState as Y, ViewSlot as Z, TextColorToken as _, ButtonShape as a, TypographyProps as b, ButtonThemeConfig as c, AppTheme as d, SlotProps as et, ComponentConfig as f, BackgroundToken as g, ThemeComponents as h, ButtonProps as i, TextInputThemeConfig as j, TextInputSlot as k, ButtonVariant as l, Theme as m, ButtonLoadingPosition as n, ButtonSize as o, GildTheme as p, ViewBorderWidthToken as q, ButtonOwnerState as r, ButtonSlot as s, ButtonColor as t, StyleOverride as tt, GapToken as u, TypographyAlign as v, TextInputClasses as w, TypographySlot as x, TypographyOwnerState as y, FlexOwnerState as z };
1132
+ export { ViewThemeConfig as $, TextInputSlot as A, FlexOwnerState as B, TypographyThemeConfig as C, TextInputOwnerState as D, TextInputColor as E, ModalOwnerState as F, ViewBackgroundToken as G, FlexSlot as H, ModalProps as I, ViewBorderWidthToken as J, ViewBorderColorToken as K, ModalScroll as L, TextInputThemeConfig as M, TextInputVariant as N, TextInputProps as O, ModalCloseReason as P, ViewSlot as Q, ModalSlot as R, TypographySlot as S, TextInputClasses as T, FlexThemeConfig as U, FlexProps as V, GapToken$1 as W, ViewOwnerState as X, ViewColorToken as Y, ViewProps as Z, BackgroundToken as _, ButtonShape as a, TypographyOwnerState as b, ButtonThemeConfig as c, AppTheme as d, SlotOverride as et, ComponentConfig as f, ThemeComponents as g, Theme as h, ButtonProps as i, TextInputTextColor as j, TextInputSize as k, ButtonVariant as l, StyleTheme as m, ButtonLoadingPosition as n, StyleOverride as nt, ButtonSize as o, GildTheme as p, ViewBorderRadiusToken as q, ButtonOwnerState as r, ButtonSlot as s, ButtonColor as t, SlotProps as tt, GapToken as u, TextColorToken as v, TypographyVariant as w, TypographyProps as x, TypographyAlign as y, ModalThemeConfig as z };
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _umber_style_vue = require("@umber-style/vue");
3
+ Object.defineProperty(exports, "Direction", {
4
+ enumerable: true,
5
+ get: function() {
6
+ return _umber_style_vue.Direction;
7
+ }
8
+ });
@@ -0,0 +1,2 @@
1
+ import { Direction } from "@umber-style/vue";
2
+ export { Direction };
@@ -0,0 +1,2 @@
1
+ import { Direction } from "@umber-style/vue";
2
+ export { Direction };
@@ -0,0 +1 @@
1
+ export { Direction } from "@umber-style/vue";
package/dist/Flex.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as SharedProps, r as Slot, t as Listeners } from "./props-Bzm7Wbdv.cjs";
2
- import { A as FlexProps$1, M as FlexThemeConfig, N as GapToken, j as FlexSlot, k as FlexOwnerState } from "./themes-CgFrk0_b.cjs";
1
+ import { n as SharedProps, r as Slot, t as Listeners } from "./props-CDONVzwC.cjs";
2
+ import { A as FlexOwnerState, M as FlexSlot, N as FlexThemeConfig, P as GapToken, j as FlexProps$1 } from "./themes-Dj-HzOAq.cjs";
3
3
  import { HTMLAttributes, SlotsType } from "vue";
4
4
  /** The props of `Flex`: the shared props of `@gild-ui/react`, and a listener for each DOM event of the element. */
5
5
  export type FlexProps = SharedProps<FlexProps$1> & Listeners<HTMLAttributes>;
package/dist/Flex.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as SharedProps, r as Slot, t as Listeners } from "./props-BRLGZVjJ.mjs";
2
- import { B as FlexProps$1, H as FlexThemeConfig, U as GapToken, V as FlexSlot, z as FlexOwnerState } from "./Button.types-BnJ28ym9.mjs";
1
+ import { n as SharedProps, r as Slot, t as Listeners } from "./props-ByhSXZf7.mjs";
2
+ import { B as FlexOwnerState, H as FlexSlot, U as FlexThemeConfig, V as FlexProps$1, W as GapToken } from "./Button.types-CxPFGBO1.mjs";
3
3
  import { HTMLAttributes, SlotsType } from "vue";
4
4
  /** The props of `Flex`: the shared props of `@gild-ui/react`, and a listener for each DOM event of the element. */
5
5
  export type FlexProps = SharedProps<FlexProps$1> & Listeners<HTMLAttributes>;
package/dist/Modal.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as SharedProps, r as Slot } from "./props-Bzm7Wbdv.cjs";
2
- import { C as ModalCloseReason, D as ModalSlot, E as ModalScroll, O as ModalThemeConfig, T as ModalProps$1, w as ModalOwnerState } from "./themes-CgFrk0_b.cjs";
1
+ import { n as SharedProps, r as Slot } from "./props-CDONVzwC.cjs";
2
+ import { D as ModalScroll, E as ModalProps$1, O as ModalSlot, T as ModalOwnerState, k as ModalThemeConfig, w as ModalCloseReason } from "./themes-Dj-HzOAq.cjs";
3
3
  import { SlotsType } from "vue";
4
4
  /** The props of `Modal`: the shared props of `@gild-ui/react` without the content, which is the default slot. */
5
5
  export type ModalProps = SharedProps<ModalProps$1>;
package/dist/Modal.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as SharedProps, r as Slot } from "./props-BRLGZVjJ.mjs";
2
- import { F as ModalProps$1, I as ModalScroll, L as ModalSlot, N as ModalCloseReason, P as ModalOwnerState, R as ModalThemeConfig } from "./Button.types-BnJ28ym9.mjs";
1
+ import { n as SharedProps, r as Slot } from "./props-ByhSXZf7.mjs";
2
+ import { F as ModalOwnerState, I as ModalProps$1, L as ModalScroll, P as ModalCloseReason, R as ModalSlot, z as ModalThemeConfig } from "./Button.types-CxPFGBO1.mjs";
3
3
  import { SlotsType } from "vue";
4
4
  /** The props of `Modal`: the shared props of `@gild-ui/react` without the content, which is the default slot. */
5
5
  export type ModalProps = SharedProps<ModalProps$1>;
@@ -216,7 +216,7 @@ const valueOf = (event) => {
216
216
  const TextInput = (0, vue.defineComponent)((props, { attrs, emit }) => {
217
217
  const theme = (0, _umber_style_vue.useTheme)();
218
218
  return () => {
219
- const { class: className, ...otherAttributes } = attrs;
219
+ const { class: className, style: _style, ...otherAttributes } = attrs;
220
220
  const { classes, components, inputProps, slotProps, multiline, rows, resize, minRows } = props;
221
221
  const { value } = theme;
222
222
  const size = props.size ?? (0, _gild_ui_core_theme.themeDefault)(value, "size", "md");
@@ -1,5 +1,5 @@
1
- import { i as Tag, n as SharedProps } from "./props-Bzm7Wbdv.cjs";
2
- import { S as TextInputVariant, _ as TextInputProps$1, b as TextInputTextColor, g as TextInputOwnerState, h as TextInputColor, m as TextInputClasses, v as TextInputSize, x as TextInputThemeConfig, y as TextInputSlot } from "./themes-CgFrk0_b.cjs";
1
+ import { i as Tag, n as SharedProps } from "./props-CDONVzwC.cjs";
2
+ import { C as TextInputVariant, S as TextInputThemeConfig, _ as TextInputOwnerState, b as TextInputSlot, g as TextInputColor, h as TextInputClasses, v as TextInputProps$1, x as TextInputTextColor, y as TextInputSize } from "./themes-Dj-HzOAq.cjs";
3
3
  import { InputHTMLAttributes, SlotsType, TextareaHTMLAttributes } from "vue";
4
4
  /** The attributes of the native element: of an input and of a textarea, without `style`. */
5
5
  type InputAttributes = Omit<InputHTMLAttributes & TextareaHTMLAttributes, 'style'>;
@@ -1,5 +1,5 @@
1
- import { i as Tag, n as SharedProps } from "./props-BRLGZVjJ.mjs";
2
- import { A as TextInputTextColor, D as TextInputProps$1, E as TextInputOwnerState, M as TextInputVariant, O as TextInputSize, T as TextInputColor, j as TextInputThemeConfig, k as TextInputSlot, w as TextInputClasses } from "./Button.types-BnJ28ym9.mjs";
1
+ import { i as Tag, n as SharedProps } from "./props-ByhSXZf7.mjs";
2
+ import { A as TextInputSlot, D as TextInputOwnerState, E as TextInputColor, M as TextInputThemeConfig, N as TextInputVariant, O as TextInputProps$1, T as TextInputClasses, j as TextInputTextColor, k as TextInputSize } from "./Button.types-CxPFGBO1.mjs";
3
3
  import { InputHTMLAttributes, SlotsType, TextareaHTMLAttributes } from "vue";
4
4
  /** The attributes of the native element: of an input and of a textarea, without `style`. */
5
5
  type InputAttributes = Omit<InputHTMLAttributes & TextareaHTMLAttributes, 'style'>;
@@ -215,7 +215,7 @@ const valueOf = (event) => {
215
215
  const TextInput = defineComponent((props, { attrs, emit }) => {
216
216
  const theme = useTheme();
217
217
  return () => {
218
- const { class: className, ...otherAttributes } = attrs;
218
+ const { class: className, style: _style, ...otherAttributes } = attrs;
219
219
  const { classes, components, inputProps, slotProps, multiline, rows, resize, minRows } = props;
220
220
  const { value } = theme;
221
221
  const size = props.size ?? themeDefault(value, "size", "md");
@@ -1,5 +1,5 @@
1
- import "./bridge-t6zHXVt-.cjs";
2
- import { i as Theme$1, t as AppTheme } from "./themes-CgFrk0_b.cjs";
1
+ import "./bridge-BL3xjLXh.cjs";
2
+ import { a as Theme$1, t as AppTheme } from "./themes-Dj-HzOAq.cjs";
3
3
  import { Register, ThemeDefaults } from "@gild-ui/core/theme";
4
4
  /** What the provider takes: `theme` is optional until the app registers its themes, which have no built-in theme to fall back to. */
5
5
  export type ThemeProviderProps = Register extends {
@@ -1,5 +1,5 @@
1
- import "./bridge-D-x2kK4r.mjs";
2
- import { d as AppTheme, m as Theme$1 } from "./Button.types-BnJ28ym9.mjs";
1
+ import "./bridge-BVgyzx-P.mjs";
2
+ import { d as AppTheme, h as Theme$1 } from "./Button.types-CxPFGBO1.mjs";
3
3
  import { Register, ThemeDefaults } from "@gild-ui/core/theme";
4
4
  /** What the provider takes: `theme` is optional until the app registers its themes, which have no built-in theme to fall back to. */
5
5
  export type ThemeProviderProps = Register extends {
@@ -1,5 +1,5 @@
1
- import { i as Tag, n as SharedProps, r as Slot, t as Listeners } from "./props-Bzm7Wbdv.cjs";
2
- 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$1 } from "./themes-CgFrk0_b.cjs";
1
+ import { i as Tag, n as SharedProps, r as Slot, t as Listeners } from "./props-CDONVzwC.cjs";
2
+ import { c as TextColorToken, d as TypographyProps$1, f as TypographySlot, l as TypographyAlign, m as TypographyVariant, p as TypographyThemeConfig, s as BackgroundToken, u as TypographyOwnerState } from "./themes-Dj-HzOAq.cjs";
3
3
  import { HTMLAttributes, SlotsType } from "vue";
4
4
  /** The props of `Typography`: the shared props of `@gild-ui/react`, with `as` a tag or a component, and a listener for each DOM event of the element. */
5
5
  export type TypographyProps = SharedProps<TypographyProps$1, 'as'> & Listeners<HTMLAttributes> & {
@@ -1,5 +1,5 @@
1
- import { i as Tag, n as SharedProps, r as Slot, t as Listeners } from "./props-BRLGZVjJ.mjs";
2
- import { C as TypographyVariant, S as TypographyThemeConfig, _ as TextColorToken, b as TypographyProps$1, g as BackgroundToken, v as TypographyAlign, x as TypographySlot, y as TypographyOwnerState } from "./Button.types-BnJ28ym9.mjs";
1
+ import { i as Tag, n as SharedProps, r as Slot, t as Listeners } from "./props-ByhSXZf7.mjs";
2
+ import { C as TypographyThemeConfig, S as TypographySlot, _ as BackgroundToken, b as TypographyOwnerState, v as TextColorToken, w as TypographyVariant, x as TypographyProps$1, y as TypographyAlign } from "./Button.types-CxPFGBO1.mjs";
3
3
  import { HTMLAttributes, SlotsType } from "vue";
4
4
  /** The props of `Typography`: the shared props of `@gild-ui/react`, with `as` a tag or a component, and a listener for each DOM event of the element. */
5
5
  export type TypographyProps = SharedProps<TypographyProps$1, 'as'> & Listeners<HTMLAttributes> & {
package/dist/View.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as SharedProps, r as Slot, t as Listeners } from "./props-Bzm7Wbdv.cjs";
2
- import { B as ViewProps$1, F as ViewBorderColorToken, H as ViewThemeConfig, I as ViewBorderRadiusToken, L as ViewBorderWidthToken, P as ViewBackgroundToken, R as ViewColorToken, V as ViewSlot, z as ViewOwnerState } from "./themes-CgFrk0_b.cjs";
1
+ import { n as SharedProps, r as Slot, t as Listeners } from "./props-CDONVzwC.cjs";
2
+ import { B as ViewOwnerState, F as ViewBackgroundToken, H as ViewSlot, I as ViewBorderColorToken, L as ViewBorderRadiusToken, R as ViewBorderWidthToken, U as ViewThemeConfig, V as ViewProps$1, z as ViewColorToken } from "./themes-Dj-HzOAq.cjs";
3
3
  import { HTMLAttributes, SlotsType } from "vue";
4
4
  /** The props of `View`: the shared props of `@gild-ui/react`, and a listener for each DOM event of the element. */
5
5
  export type ViewProps = SharedProps<ViewProps$1> & Listeners<HTMLAttributes>;
package/dist/View.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as SharedProps, r as Slot, t as Listeners } from "./props-BRLGZVjJ.mjs";
2
- import { G as ViewBorderColorToken, J as ViewColorToken, K as ViewBorderRadiusToken, Q as ViewThemeConfig, W as ViewBackgroundToken, X as ViewProps$1, Y as ViewOwnerState, Z as ViewSlot, q as ViewBorderWidthToken } from "./Button.types-BnJ28ym9.mjs";
1
+ import { n as SharedProps, r as Slot, t as Listeners } from "./props-ByhSXZf7.mjs";
2
+ import { $ as ViewThemeConfig, G as ViewBackgroundToken, J as ViewBorderWidthToken, K as ViewBorderColorToken, Q as ViewSlot, X as ViewOwnerState, Y as ViewColorToken, Z as ViewProps$1, q as ViewBorderRadiusToken } from "./Button.types-CxPFGBO1.mjs";
3
3
  import { HTMLAttributes, SlotsType } from "vue";
4
4
  /** The props of `View`: the shared props of `@gild-ui/react`, and a listener for each DOM event of the element. */
5
5
  export type ViewProps = SharedProps<ViewProps$1> & Listeners<HTMLAttributes>;
@@ -1,4 +1,4 @@
1
- import { r as GildTheme } from "./themes-CgFrk0_b.cjs";
1
+ import { r as GildTheme } from "./themes-Dj-HzOAq.cjs";
2
2
  import * as GildCore from "@gild-ui/core/theme";
3
3
  type GildFallback = GildCore.Register extends {
4
4
  themes: unknown;
@@ -1,4 +1,4 @@
1
- import { p as GildTheme } from "./Button.types-BnJ28ym9.mjs";
1
+ import { p as GildTheme } from "./Button.types-CxPFGBO1.mjs";
2
2
  import * as GildCore from "@gild-ui/core/theme";
3
3
  type GildFallback = GildCore.Register extends {
4
4
  themes: unknown;
package/dist/engine.cjs CHANGED
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_themes = require("./themes-BqxOUMCB.cjs");
3
3
  let _umber_style_vue = require("@umber-style/vue");
4
4
  let _umber_style_cache = require("@umber-style/cache");
5
+ let _umber_style_rtl = require("@umber-style/rtl");
5
6
  let _umber_style_core = require("@umber-style/core");
6
7
  // src/engine/styleCache.ts
7
8
  /**
@@ -17,10 +18,11 @@ const styleCache = (0, _umber_style_cache.createCache)({
17
18
  nonce: typeof document === "undefined" ? void 0 : document.querySelector("script[nonce]")?.nonce || void 0
18
19
  });
19
20
  // src/engine/configure.ts
20
- function configure({ serverTheme, cache, prefix } = {}) {
21
+ function configure({ serverTheme, cache, prefix, plugins } = {}) {
21
22
  (0, _umber_style_vue.configure)({
22
23
  cache: cache ?? styleCache,
23
24
  prefix,
25
+ plugins,
24
26
  serverTheme: serverTheme ?? require_themes.baseTheme
25
27
  });
26
28
  }
@@ -43,6 +45,12 @@ Object.defineProperty(exports, "defineTheme", {
43
45
  return _umber_style_vue.defineTheme;
44
46
  }
45
47
  });
48
+ Object.defineProperty(exports, "dir", {
49
+ enumerable: true,
50
+ get: function() {
51
+ return _umber_style_rtl.dir;
52
+ }
53
+ });
46
54
  Object.defineProperty(exports, "extractPageStyles", {
47
55
  enumerable: true,
48
56
  get: function() {
@@ -61,6 +69,12 @@ Object.defineProperty(exports, "globalStyles", {
61
69
  return _umber_style_vue.globalStyles;
62
70
  }
63
71
  });
72
+ Object.defineProperty(exports, "rtl", {
73
+ enumerable: true,
74
+ get: function() {
75
+ return _umber_style_rtl.rtl;
76
+ }
77
+ });
64
78
  Object.defineProperty(exports, "setNonceSource", {
65
79
  enumerable: true,
66
80
  get: function() {
package/dist/engine.d.cts CHANGED
@@ -1,9 +1,10 @@
1
- import "./bridge-t6zHXVt-.cjs";
2
- import { i as Theme$1, t as AppTheme } from "./themes-CgFrk0_b.cjs";
1
+ import "./bridge-BL3xjLXh.cjs";
2
+ import { a as Theme$1, t as AppTheme } from "./themes-Dj-HzOAq.cjs";
3
3
  import { Register } from "@gild-ui/core/theme";
4
4
  import { extractPageStyles } from "@umber-style/core";
5
5
  import { createCache } from "@umber-style/cache";
6
- import { Cache, UmberCache, asIs, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
6
+ import { Cache, CachePlugin, CachePlugin as CachePlugin$1, ThemeRefs, UmberCache, asIs, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
7
+ import { DirValues, RtlOptions, dir, rtl } from "@umber-style/rtl";
7
8
  /**
8
9
  * Once themes are registered, `T` may have no key the registered themes lack, at any depth: each
9
10
  * extra key is typed `never`, so the error names it. `components` is the one shared value, which
@@ -18,6 +19,8 @@ interface ConfigureOwnProps<T> {
18
19
  cache?: Cache;
19
20
  /** 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. */
20
21
  prefix?: string;
22
+ /** What each declaration goes through before it is written, in order: `[rtl()]` writes both directions of a style in one class. None by default. */
23
+ plugins?: readonly CachePlugin$1[];
21
24
  }
22
25
  /** The options once the app registers its themes: it has no built-in theme to fall back to, so `serverTheme` is required. */
23
26
  interface RegisteredConfigureProps<T> extends Omit<ConfigureOwnProps<T>, 'serverTheme'> {
@@ -43,4 +46,4 @@ export declare function configure<T extends Theme$1 = Theme$1>(...args: Register
43
46
  * that allows style elements by nonce; an empty string means no nonce.
44
47
  */
45
48
  declare const styleCache: UmberCache;
46
- export { type ConfigureOptions, asIs, createCache, defineTheme, extractPageStyles, fallback, globalStyles, setNonceSource, styleCache, val, variable };
49
+ export { type CachePlugin, type ConfigureOptions, type DirValues, type RtlOptions, type ThemeRefs, asIs, createCache, defineTheme, dir, extractPageStyles, fallback, globalStyles, rtl, setNonceSource, styleCache, val, variable };
package/dist/engine.d.mts CHANGED
@@ -1,8 +1,9 @@
1
- import "./bridge-D-x2kK4r.mjs";
2
- import { d as AppTheme, m as Theme$1 } from "./Button.types-BnJ28ym9.mjs";
3
- import { Cache, UmberCache, asIs, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
1
+ import "./bridge-BVgyzx-P.mjs";
2
+ import { d as AppTheme, h as Theme$1 } from "./Button.types-CxPFGBO1.mjs";
3
+ import { Cache, CachePlugin, CachePlugin as CachePlugin$1, ThemeRefs, UmberCache, asIs, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
4
4
  import { Register } from "@gild-ui/core/theme";
5
5
  import { createCache } from "@umber-style/cache";
6
+ import { DirValues, RtlOptions, dir, rtl } from "@umber-style/rtl";
6
7
  import { extractPageStyles } from "@umber-style/core";
7
8
  /**
8
9
  * Once themes are registered, `T` may have no key the registered themes lack, at any depth: each
@@ -18,6 +19,8 @@ interface ConfigureOwnProps<T> {
18
19
  cache?: Cache;
19
20
  /** 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. */
20
21
  prefix?: string;
22
+ /** What each declaration goes through before it is written, in order: `[rtl()]` writes both directions of a style in one class. None by default. */
23
+ plugins?: readonly CachePlugin$1[];
21
24
  }
22
25
  /** The options once the app registers its themes: it has no built-in theme to fall back to, so `serverTheme` is required. */
23
26
  interface RegisteredConfigureProps<T> extends Omit<ConfigureOwnProps<T>, 'serverTheme'> {
@@ -43,4 +46,4 @@ export declare function configure<T extends Theme$1 = Theme$1>(...args: Register
43
46
  * that allows style elements by nonce; an empty string means no nonce.
44
47
  */
45
48
  declare const styleCache: UmberCache;
46
- export { type ConfigureOptions, asIs, createCache, defineTheme, extractPageStyles, fallback, globalStyles, setNonceSource, styleCache, val, variable };
49
+ export { type CachePlugin, type ConfigureOptions, type DirValues, type RtlOptions, type ThemeRefs, asIs, createCache, defineTheme, dir, extractPageStyles, fallback, globalStyles, rtl, setNonceSource, styleCache, val, variable };
package/dist/engine.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { t as baseTheme } from "./themes-rGHVhV5e.mjs";
2
2
  import { asIs, configure as configure$1, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
3
3
  import { createCache, createCache as createCache$1 } from "@umber-style/cache";
4
+ import { dir, rtl } from "@umber-style/rtl";
4
5
  import { extractPageStyles } from "@umber-style/core";
5
6
  // src/engine/styleCache.ts
6
7
  /**
@@ -16,11 +17,12 @@ const styleCache = createCache$1({
16
17
  nonce: typeof document === "undefined" ? void 0 : document.querySelector("script[nonce]")?.nonce || void 0
17
18
  });
18
19
  // src/engine/configure.ts
19
- function configure({ serverTheme, cache, prefix } = {}) {
20
+ function configure({ serverTheme, cache, prefix, plugins } = {}) {
20
21
  configure$1({
21
22
  cache: cache ?? styleCache,
22
23
  prefix,
24
+ plugins,
23
25
  serverTheme: serverTheme ?? baseTheme
24
26
  });
25
27
  }
26
- export { asIs, configure, createCache, defineTheme, extractPageStyles, fallback, globalStyles, setNonceSource, styleCache, val, variable };
28
+ export { asIs, configure, createCache, defineTheme, dir, extractPageStyles, fallback, globalStyles, rtl, setNonceSource, styleCache, val, variable };
package/dist/index.cjs CHANGED
@@ -2,8 +2,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_ThemeProvider = require("./ThemeProvider-DIeSdYou.cjs");
3
3
  require("./useTheme.cjs");
4
4
  const require_useDefaultProps = require("./useDefaultProps-qCDgeYFm.cjs");
5
+ require("./Direction.cjs");
5
6
  const require_styled = require("./styled-JHkZtq_1.cjs");
6
7
  let _umber_style_vue = require("@umber-style/vue");
8
+ Object.defineProperty(exports, "Direction", {
9
+ enumerable: true,
10
+ get: function() {
11
+ return _umber_style_vue.Direction;
12
+ }
13
+ });
7
14
  Object.defineProperty(exports, "Global", {
8
15
  enumerable: true,
9
16
  get: function() {
package/dist/index.d.cts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ThemeProvider, ThemeProviderProps } from "./ThemeProvider.cjs";
2
2
  import { useTheme } from "./useTheme.cjs";
3
- import { $ as SlotOverride, a as ThemeComponents, et as SlotProps, n as ComponentConfig, tt as StyleOverride } from "./themes-CgFrk0_b.cjs";
3
+ import { et as SlotOverride, i as StyleTheme, n as ComponentConfig, nt as StyleOverride, o as ThemeComponents, tt as SlotProps } from "./themes-Dj-HzOAq.cjs";
4
+ import { Direction } from "./Direction.cjs";
4
5
  import { Global, Interpolation, StyleSheet, StyledComponent, StyledOptions, alpha, css, keyframes, negate, useStyle } from "@umber-style/vue";
5
6
  import { Component, ComputedRef } from "vue";
6
7
  type DefaultPropsOf<N extends keyof ThemeComponents> = Partial<NonNullable<NonNullable<ThemeComponents[N]>['$owner']>>;
@@ -33,5 +34,5 @@ interface ThemeCustomizationOptions {
33
34
  * The design system's `styled`: the engine's styled plus theme-level component customization
34
35
  * (`theme.components[name].styleOverrides` / `.variants`).
35
36
  */
36
- export declare function styled(tag: string | Component, options?: StyledOptions & ThemeCustomizationOptions): <Props extends object = Record<string, unknown>>(...styles: readonly Interpolation<Props>[]) => StyledComponent;
37
- export { type ComponentConfig, Global, type SlotOverride, type SlotProps, type StyleOverride, StyleSheet, type ThemeComponents, ThemeProvider, ThemeProviderProps, alpha, css, keyframes, negate, useStyle, useTheme };
37
+ export declare function styled(tag: string | Component, options?: StyledOptions & ThemeCustomizationOptions): <Props extends object = Record<string, unknown>>(...styles: readonly Interpolation<Props, StyleTheme>[]) => StyledComponent;
38
+ export { type ComponentConfig, Direction, Global, type SlotOverride, type SlotProps, type StyleOverride, StyleSheet, type StyleTheme, type ThemeComponents, ThemeProvider, ThemeProviderProps, alpha, css, keyframes, negate, useStyle, useTheme };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ThemeProvider, ThemeProviderProps } from "./ThemeProvider.mjs";
2
2
  import { useTheme } from "./useTheme.mjs";
3
- import { $ as SlotOverride, et as SlotProps, f as ComponentConfig, h as ThemeComponents, tt as StyleOverride } from "./Button.types-BnJ28ym9.mjs";
3
+ import { et as SlotOverride, f as ComponentConfig, g as ThemeComponents, m as StyleTheme, nt as StyleOverride, tt as SlotProps } from "./Button.types-CxPFGBO1.mjs";
4
+ import { Direction } from "./Direction.mjs";
4
5
  import { Component, ComputedRef } from "vue";
5
6
  import { Global, Interpolation, StyleSheet, StyledComponent, StyledOptions, alpha, css, keyframes, negate, useStyle } from "@umber-style/vue";
6
7
  type DefaultPropsOf<N extends keyof ThemeComponents> = Partial<NonNullable<NonNullable<ThemeComponents[N]>['$owner']>>;
@@ -33,5 +34,5 @@ interface ThemeCustomizationOptions {
33
34
  * The design system's `styled`: the engine's styled plus theme-level component customization
34
35
  * (`theme.components[name].styleOverrides` / `.variants`).
35
36
  */
36
- export declare function styled(tag: string | Component, options?: StyledOptions & ThemeCustomizationOptions): <Props extends object = Record<string, unknown>>(...styles: readonly Interpolation<Props>[]) => StyledComponent;
37
- export { type ComponentConfig, Global, type SlotOverride, type SlotProps, type StyleOverride, StyleSheet, type ThemeComponents, ThemeProvider, ThemeProviderProps, alpha, css, keyframes, negate, useStyle, useTheme };
37
+ export declare function styled(tag: string | Component, options?: StyledOptions & ThemeCustomizationOptions): <Props extends object = Record<string, unknown>>(...styles: readonly Interpolation<Props, StyleTheme>[]) => StyledComponent;
38
+ export { type ComponentConfig, Direction, Global, type SlotOverride, type SlotProps, type StyleOverride, StyleSheet, type StyleTheme, type ThemeComponents, ThemeProvider, ThemeProviderProps, alpha, css, keyframes, negate, useStyle, useTheme };
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { t as ThemeProvider } from "./ThemeProvider-CareN7BO.mjs";
2
2
  import { useTheme } from "./useTheme.mjs";
3
3
  import { t as useDefaultProps } from "./useDefaultProps--fOGOSGa.mjs";
4
+ import { Direction } from "./Direction.mjs";
4
5
  import { r as styled } from "./styled-Cmxvlft5.mjs";
5
6
  import { Global, StyleSheet, alpha, css, keyframes, negate, useStyle } from "@umber-style/vue";
6
- export { Global, StyleSheet, ThemeProvider, alpha, css, keyframes, negate, styled, useDefaultProps, useStyle, useTheme };
7
+ export { Direction, Global, StyleSheet, ThemeProvider, alpha, css, keyframes, negate, styled, useDefaultProps, useStyle, useTheme };
@@ -1,4 +1,4 @@
1
- import "./Button.types-BnJ28ym9.mjs";
1
+ import "./Button.types-CxPFGBO1.mjs";
2
2
  import { Component, HTMLAttributes, VNodeChild } from "vue";
3
3
  /**
4
4
  * The members of the React props that have no member of the same name in Vue: the content (`children`
@@ -1,4 +1,4 @@
1
- import "./themes-CgFrk0_b.cjs";
1
+ import "./themes-Dj-HzOAq.cjs";
2
2
  import { Component, HTMLAttributes, VNodeChild } from "vue";
3
3
  /**
4
4
  * The members of the React props that have no member of the same name in Vue: the content (`children`
@@ -1,6 +1,6 @@
1
1
  import { ButtonVariants, InputVariantKey, OpenScale, Register as Register$1, RegisteredTheme, Theme as Theme$1, ThemeBackground, ThemeColor, ThemeFonts, ThemeRadii, ThemeSize, ThemeSpaceKey, ThemeText, ThemeTransitionEasing, ThemeTypography, ThemeZOrder, TypographyVariant, VariantOf } from "@gild-ui/core/theme";
2
+ import { CSSObject as CSSObject$1, ThemeRefs } from "@umber-style/core";
2
3
  import { ButtonHTMLAttributes, CSSProperties, ChangeEventHandler, ElementType, HTMLAttributes, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from "react";
3
- import { CSSObject as CSSObject$1 } from "@umber-style/core";
4
4
  import { BorderProps, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, SpaceProps, SpanProps, TypographyProps as TypographyProps$1 } from "@soroush.tech/styled-system";
5
5
  import { SheetStyleProp } from "@umber-style/vue";
6
6
  /** The defaults a theme may set for every `Accordion`. */
@@ -1109,4 +1109,22 @@ interface Theme extends Theme$1 {
1109
1109
  type GildTheme = Theme;
1110
1110
  /** The theme the app registered (see `Register` in the core), or this package's `Theme` when it registered none. */
1111
1111
  type AppTheme = RegisteredTheme<Theme>;
1112
- export { SlotOverride as $, FlexProps as A, ViewProps as B, ModalCloseReason as C, ModalSlot as D, ModalScroll as E, ViewBorderColorToken as F, ButtonOwnerState as G, ViewThemeConfig as H, ViewBorderRadiusToken as I, ButtonSize as J, ButtonProps as K, ViewBorderWidthToken as L, FlexThemeConfig as M, GapToken as N, ModalThemeConfig as O, ViewBackgroundToken as P, GapToken$1 as Q, ViewColorToken as R, TextInputVariant as S, ModalProps as T, ButtonColor as U, ViewSlot as V, ButtonLoadingPosition as W, ButtonThemeConfig as X, ButtonSlot as Y, ButtonVariant as Z, TextInputProps as _, ThemeComponents as a, TextInputTextColor as b, TypographyAlign as c, TypographySlot as d, SlotProps as et, TypographyThemeConfig as f, TextInputOwnerState as g, TextInputColor as h, Theme as i, FlexSlot as j, FlexOwnerState as k, TypographyOwnerState as l, TextInputClasses as m, ComponentConfig as n, BackgroundToken as o, TypographyVariant as p, ButtonShape as q, GildTheme as r, TextColorToken as s, AppTheme as t, StyleOverride as tt, TypographyProps as u, TextInputSize as v, ModalOwnerState as w, TextInputThemeConfig as x, TextInputSlot as y, ViewOwnerState as z };
1112
+ /** The parts of the theme that a style function reads as they are: the same ones `baseTheme` marks with `asIs`. */
1113
+ interface StyleThemeModes {
1114
+ readonly $modes: {
1115
+ readonly defaults: 'asIs';
1116
+ readonly typography: 'asIs';
1117
+ readonly sizes: 'asIs';
1118
+ readonly layout: 'asIs';
1119
+ readonly transitions: 'asIs';
1120
+ };
1121
+ }
1122
+ /**
1123
+ * The theme a style function is given (`styled`, `StyleSheet.create`, `keyframes`, `Global`): each token
1124
+ * is the CSS variable that holds it, and the parts that are not CSS values (`sizes`, `typography`,
1125
+ * `layout`, `transitions`, `breakpoints`, `components`, `defaults`) are what they are. A function given to
1126
+ * `Global`, `StyleSheet.create` or `keyframes` (the engine's own, with no modes of the theme) is given
1127
+ * `EngineStyleTheme`.
1128
+ */
1129
+ type StyleTheme = ThemeRefs<AppTheme & StyleThemeModes>;
1130
+ export { GapToken$1 as $, FlexOwnerState as A, ViewOwnerState as B, TextInputVariant as C, ModalScroll as D, ModalProps as E, ViewBackgroundToken as F, ButtonLoadingPosition as G, ViewSlot as H, ViewBorderColorToken as I, ButtonShape as J, ButtonOwnerState as K, ViewBorderRadiusToken as L, FlexSlot as M, FlexThemeConfig as N, ModalSlot as O, GapToken as P, ButtonVariant as Q, ViewBorderWidthToken as R, TextInputThemeConfig as S, ModalOwnerState as T, ViewThemeConfig as U, ViewProps as V, ButtonColor as W, ButtonSlot as X, ButtonSize as Y, ButtonThemeConfig as Z, TextInputOwnerState as _, Theme as a, TextInputSlot as b, TextColorToken as c, TypographyProps as d, SlotOverride as et, TypographySlot as f, TextInputColor as g, TextInputClasses as h, StyleTheme as i, FlexProps as j, ModalThemeConfig as k, TypographyAlign as l, TypographyVariant as m, ComponentConfig as n, StyleOverride as nt, ThemeComponents as o, TypographyThemeConfig as p, ButtonProps as q, GildTheme as r, BackgroundToken as s, AppTheme as t, SlotProps as tt, TypographyOwnerState as u, TextInputProps as v, ModalCloseReason as w, TextInputTextColor as x, TextInputSize as y, ViewColorToken as z };
@@ -1,3 +1,3 @@
1
- import "./bridge-t6zHXVt-.cjs";
1
+ import "./bridge-BL3xjLXh.cjs";
2
2
  import { useTheme } from "@umber-style/vue";
3
3
  export { useTheme };
@@ -1,3 +1,3 @@
1
- import "./bridge-D-x2kK4r.mjs";
1
+ import "./bridge-BVgyzx-P.mjs";
2
2
  import { useTheme } from "@umber-style/vue";
3
3
  export { useTheme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gild-ui/vue",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.2",
4
4
  "description": "Gild UI for Vue: the same components, props and themes as @gild-ui/react, as Vue components - ThemeProvider, useTheme, View, Flex, Typography, Button, TextInput and Modal.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -49,6 +49,16 @@
49
49
  "default": "./dist/Button.cjs"
50
50
  }
51
51
  },
52
+ "./Direction": {
53
+ "import": {
54
+ "types": "./dist/Direction.d.mts",
55
+ "default": "./dist/Direction.mjs"
56
+ },
57
+ "require": {
58
+ "types": "./dist/Direction.d.cts",
59
+ "default": "./dist/Direction.cjs"
60
+ }
61
+ },
52
62
  "./Flex": {
53
63
  "import": {
54
64
  "types": "./dist/Flex.d.mts",
@@ -137,10 +147,11 @@
137
147
  "dependencies": {
138
148
  "@soroush.tech/styled-system": "6.1.0",
139
149
  "@types/react": "^19.3.3",
140
- "@umber-style/cache": "0.9.3",
141
- "@umber-style/core": "0.9.3",
142
- "@umber-style/vue": "0.9.3",
143
- "@gild-ui/core": "^0.1.0-alpha.1"
150
+ "@umber-style/cache": "0.10.0",
151
+ "@umber-style/core": "0.10.0",
152
+ "@umber-style/rtl": "0.10.0",
153
+ "@umber-style/vue": "0.10.0",
154
+ "@gild-ui/core": "^0.1.0-alpha.3"
144
155
  },
145
156
  "peerDependencies": {
146
157
  "vue": "^3.5.0"
@@ -158,7 +169,7 @@
158
169
  "typescript": "~7.0.2",
159
170
  "vitest": "^5.1.2",
160
171
  "vue": "^3.5.46",
161
- "@gild-ui/react": "0.1.0-alpha.1",
172
+ "@gild-ui/react": "0.1.0-alpha.3",
162
173
  "@soroush.tech/eslint-config": "0.0.0"
163
174
  },
164
175
  "scripts": {