@umber-style/vue 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 soroush.tech
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1 +1,11 @@
1
- Placeholder. See https://github.com/soroush-tech/umber-style
1
+ # @umber-style/vue
2
+
3
+ The Vue binding of UmberStyle: the same names as the React binding, with a reactive `useTheme`.
4
+
5
+ Install: `pnpm add @umber-style/vue`.
6
+
7
+ ```ts
8
+ import { styled, ThemeProvider } from '@umber-style/vue'
9
+ ```
10
+
11
+ Documentation: [docs](../../docs/README.md), and [Vue](../../docs/vue.md) for this package.
package/dist/index.cjs ADDED
@@ -0,0 +1,467 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _umber_style_core = require("@umber-style/core");
3
+ let vue = require("vue");
4
+ // src/CacheProvider.ts
5
+ /** What the nearest `CacheProvider` provides: its cache. */
6
+ const CACHE_KEY = Symbol("cache");
7
+ let isProvided = false;
8
+ /** The cache of the nearest `CacheProvider`, or undefined with none above. Call it in `setup` or in a functional component. */
9
+ function injectCache() {
10
+ return isProvided ? (0, vue.inject)(CACHE_KEY, void 0) : void 0;
11
+ }
12
+ /**
13
+ * Gives the subtree in its slot its cache: every rule that a component of the binding writes there goes
14
+ * to `value` (classes, sheet entries, global rules, keyframes, the root theme and the theme classes of the
15
+ * providers below), through the engine of the same theme over that cache. Outside any provider the
16
+ * engine's own cache is used. `value` is read once, in `setup`: to give the subtree another cache, render
17
+ * another provider (a new `key`).
18
+ */
19
+ const CacheProvider = (0, vue.defineComponent)({
20
+ name: "CacheProvider",
21
+ props: {
22
+ /** The cache of the subtree: one that `createCache` of `@umber-style/cache` (or of the core) made. */
23
+ value: {
24
+ type: Object,
25
+ required: true
26
+ } },
27
+ setup(props, { slots }) {
28
+ isProvided = true;
29
+ (0, vue.provide)(CACHE_KEY, props.value);
30
+ return () => slots.default?.();
31
+ }
32
+ });
33
+ // src/Global.ts
34
+ /** Writes `sets` into the cache of `engine`, in order, as rules that a component rendered, and returns the function that releases them all. */
35
+ function insertSets(engine, sets) {
36
+ const releases = sets.map((set) => engine.cache.insertGlobal(set, { isRendered: true }));
37
+ return () => {
38
+ for (const release of releases) release();
39
+ };
40
+ }
41
+ /**
42
+ * Makes the `Global` of an engine: it renders nothing, and writes the rules of its styles with the view
43
+ * of the theme of the nearest provider (references for tokens, real values for raw keys), or of the base
44
+ * theme (or an empty one) with none. In the browser they are
45
+ * written in `setup`, before it mounts, and released when it unmounts; when the rules change (its styles,
46
+ * or what they read of the theme) the new ones are written first and then the old ones released, so that
47
+ * there is no moment with neither. The cache counts the rules of each set, so two components with equal
48
+ * styles share them, and rules that a server render left in the page are taken over. Where there is no
49
+ * document (a server render) nothing unmounts: the rules are written for good, for `extractPageStyles`,
50
+ * and the comment it renders (a component that renders nothing renders a comment) is the marker that
51
+ * names its sets, `<!--<prefix>-global <ids>-->`, so that the CSS of this page holds them and the CSS of
52
+ * another page does not. A hydration does not compare the text of a comment.
53
+ * Under a `CacheProvider` the rules go to the cache it gives, through the engine over that cache, with
54
+ * the view of that engine.
55
+ */
56
+ function createGlobal(engine, keys) {
57
+ return (0, vue.defineComponent)({
58
+ name: "Global",
59
+ props: {
60
+ /** A handle that `globalStyles` made, a style object, a function of the theme, or a list of them, written in the order of the list. */
61
+ styles: {
62
+ type: [
63
+ Object,
64
+ Function,
65
+ Array
66
+ ],
67
+ required: true
68
+ } },
69
+ setup(props) {
70
+ const cache = injectCache();
71
+ const local = cache === void 0 ? engine : engine.withCache(cache);
72
+ const outerView = (0, vue.inject)(keys.view, null);
73
+ const outerTheme = (0, vue.inject)(keys.theme, null);
74
+ const readOwnTheme = () => engine.baseTheme ?? _umber_style_core.EMPTY_THEME;
75
+ const sets = (0, vue.computed)(() => {
76
+ const view = local === engine ? outerView?.value ?? engine.createThemeView(readOwnTheme()) : local.createThemeView(outerTheme?.value ?? readOwnTheme());
77
+ return local.resolveGlobal(props.styles, view);
78
+ });
79
+ if (typeof document === "undefined") {
80
+ insertSets(local, sets.value);
81
+ const marker = (0, _umber_style_core.createGlobalMarker)(local.cache.prefix, sets.value);
82
+ return () => marker ? (0, vue.h)(vue.Comment, `${marker.name} ${marker.ids}`) : null;
83
+ }
84
+ const ids = (0, vue.computed)(() => sets.value.map(({ id }) => id).join(" "));
85
+ let release = insertSets(local, sets.value);
86
+ (0, vue.watch)(ids, () => {
87
+ const previous = release;
88
+ release = insertSets(local, sets.value);
89
+ previous();
90
+ });
91
+ (0, vue.onUnmounted)(() => release());
92
+ return () => null;
93
+ }
94
+ });
95
+ }
96
+ // src/styled.ts
97
+ /** Whether `tag` is a component made by `styled`. */
98
+ function isStyledComponent(tag) {
99
+ return typeof tag === "function" && "_styles" in tag;
100
+ }
101
+ /** The function that lets go of the class that each element (or component instance) holds. */
102
+ const releases = /* @__PURE__ */ new WeakMap();
103
+ /**
104
+ * The function ref that makes the element hold the class of `hold`. Vue calls the ref of each render
105
+ * with the element when it patches it, and the last one with null when the element is unmounted or no
106
+ * longer has a ref: the element then holds the new class first and lets the old one go, or lets its
107
+ * class go. A functional component has no lifecycle of its own; the ref is the element's.
108
+ */
109
+ function createHoldRef(hold) {
110
+ let element;
111
+ return (value) => {
112
+ if (value) {
113
+ element = value;
114
+ const previous = releases.get(element);
115
+ releases.set(element, hold());
116
+ previous?.();
117
+ } else {
118
+ releases.get(element)?.();
119
+ releases.delete(element);
120
+ }
121
+ };
122
+ }
123
+ /** The attributes that the element is given: all but those of `styled` (`as`, `theme`, `class`, `style`), and of those only what `filter` lets through when there is one. */
124
+ function forwardAttributes(attrs, filter) {
125
+ const forwarded = {};
126
+ for (const [key, value] of Object.entries(attrs)) if (!(key === "as" || key === "theme" || key === "class" || key === "style") && (!filter || filter(key))) forwarded[key] = value;
127
+ return forwarded;
128
+ }
129
+ /**
130
+ * Makes `styled` over an engine: a functional component that renders the tag with one class. A
131
+ * function style gets the view of the theme of the nearest provider, which `useThemeView` reads. In the
132
+ * browser, an element given a plain object in `style` holds the class that the object made, so that the
133
+ * class is removed when no element uses it. Under a `CacheProvider` the class is made by the engine over
134
+ * the cache it gives, and written there.
135
+ */
136
+ function createStyled(engine, useThemeView) {
137
+ const styled = (tag, options = {}) => (...args) => {
138
+ const styles = (0, _umber_style_core.readStyleArguments)(args);
139
+ const inner = isStyledComponent(tag) ? tag : void 0;
140
+ const baseTag = inner?._tag ?? tag;
141
+ const shouldForward = options.shouldForwardProp ?? inner?._shouldForwardProp;
142
+ const target = [inner?._target, options.target].filter(Boolean).join(" ") || void 0;
143
+ const styler = engine.createStyler(options, styles, inner?._styles);
144
+ const stylers = /* @__PURE__ */ new WeakMap();
145
+ const readStyler = (local) => {
146
+ let made = stylers.get(local);
147
+ if (made === void 0) {
148
+ made = local.createStyler(options, styles, inner?._styles);
149
+ stylers.set(local, made);
150
+ }
151
+ return made;
152
+ };
153
+ const Styled = Object.assign((_props, { attrs, slots }) => {
154
+ const cache = injectCache();
155
+ const local = cache === void 0 ? engine : engine.withCache(cache);
156
+ const own = local === engine ? styler : readStyler(local);
157
+ const findEntry = local === engine ? engine.cache.findEntry : (name) => local.cache.findEntry(name) ?? engine.cache.findEntry(name);
158
+ const extra = [...(0, _umber_style_core.flattenStyle)(attrs.style, findEntry), (0, vue.normalizeClass)(attrs.class)];
159
+ const theme = own.isDynamic ? useThemeView(cache) : void 0;
160
+ const held = typeof document !== "undefined" && attrs.style ? own.getHeldClass(attrs, extra, theme) : void 0;
161
+ let className = held ? held.className : own.getClassName(attrs, extra, theme);
162
+ if (target) className = className ? `${className} ${target}` : target;
163
+ const element = attrs.as ?? baseTag;
164
+ const forwarded = forwardAttributes(attrs, typeof element === "string" ? shouldForward : void 0);
165
+ forwarded.class = className || void 0;
166
+ if (held?.hold) forwarded.ref = createHoldRef(held.hold);
167
+ return (0, vue.h)(element, forwarded, slots);
168
+ }, {
169
+ _styles: styler.styles,
170
+ _tag: baseTag,
171
+ _shouldForwardProp: shouldForward,
172
+ _target: target,
173
+ toString: (0, _umber_style_core.createComponentSelector)(options.target, styler)
174
+ });
175
+ Styled.inheritAttrs = false;
176
+ return Styled;
177
+ };
178
+ return (0, _umber_style_core.withTagShorthands)(styled);
179
+ }
180
+ // src/ThemeProvider.ts
181
+ /** Makes the keys of one style. */
182
+ function createThemeKeys() {
183
+ return {
184
+ theme: Symbol("theme"),
185
+ view: Symbol("view"),
186
+ scope: Symbol("scope"),
187
+ engine: Symbol("engine")
188
+ };
189
+ }
190
+ /**
191
+ * Makes the `ThemeProvider` of an engine. Its theme (or what a function of the theme above returns) is
192
+ * merged over the theme above and provided below it, with its view.
193
+ *
194
+ * - The outermost provider (none above it) renders no element: its theme is declared on `:root`, in
195
+ * `setup` and again when it changes, which renders no styled component. It gives the engine its base
196
+ * theme when it has none.
197
+ * - A nested provider renders its wrapper: the theme class of the theme it was given (with the boundary
198
+ * and scheme markers), the theme class of its merged theme (every variable, for where it is not inside
199
+ * the wrapper above it), and the scope class, which has `display: contents`.
200
+ * - With `isRoot` it renders no element and makes no rule: the app puts `themeClass(theme)` on an
201
+ * ancestor, usually `<html>`.
202
+ *
203
+ * Whether a provider is the outermost one, and `isRoot`, are read once, in `setup`. Under a
204
+ * `CacheProvider` it works with the engine over the cache that the provider gives (the same base theme,
205
+ * the prefix of that cache), and is the outermost one when the nearest provider above it has another
206
+ * engine: its theme is declared on `:root` in that cache.
207
+ */
208
+ function createThemeProvider(baseEngine, keys) {
209
+ return (0, vue.defineComponent)({
210
+ name: "ThemeProvider",
211
+ inheritAttrs: false,
212
+ props: {
213
+ /** The theme, or the part of it that this subtree changes; or a function of the theme above that returns it. */
214
+ theme: {
215
+ type: [Object, Function],
216
+ required: true
217
+ },
218
+ colorScheme: {
219
+ type: String,
220
+ default: void 0
221
+ },
222
+ as: {
223
+ type: String,
224
+ default: "div"
225
+ },
226
+ /** Renders no element, no class and no rule: the app puts `themeClass(theme)` on an ancestor, usually `<html>`. */
227
+ isRoot: {
228
+ type: Boolean,
229
+ default: false
230
+ }
231
+ },
232
+ setup(props, { attrs, slots }) {
233
+ const cache = injectCache();
234
+ const engine = cache === void 0 ? baseEngine : baseEngine.withCache(cache);
235
+ const outer = (0, vue.inject)(keys.theme, null);
236
+ const scope = (0, vue.inject)(keys.engine, null) === engine ? (0, vue.inject)(keys.scope, null) : null;
237
+ const isNested = scope !== null && !props.isRoot;
238
+ const readOuter = () => outer?.value ?? engine.baseTheme;
239
+ const given = (0, vue.computed)(() => (0, _umber_style_core.resolveThemeInput)(props.theme, readOuter() ?? _umber_style_core.EMPTY_THEME));
240
+ if (!engine.hasTheme) engine.setTheme(given.value);
241
+ const merged = (0, vue.computed)(() => (0, _umber_style_core.mergeTheme)(readOuter(), given.value));
242
+ const classes = (0, vue.computed)(() => {
243
+ const own = engine.themeClass(given.value, props.colorScheme);
244
+ const full = engine.themeId(merged.value, props.colorScheme);
245
+ return [
246
+ own,
247
+ own.startsWith(`${full} `) ? "" : full,
248
+ engine.scopeClass()
249
+ ].filter(Boolean).join(" ");
250
+ });
251
+ (0, vue.provide)(keys.engine, engine);
252
+ (0, vue.provide)(keys.theme, merged);
253
+ (0, vue.provide)(keys.view, (0, vue.computed)(() => engine.createThemeView(merged.value)));
254
+ (0, vue.provide)(keys.scope, isNested ? (0, vue.computed)(() => ({
255
+ as: props.as,
256
+ className: classes.value
257
+ })) : scope ?? (0, vue.computed)(() => null));
258
+ if (scope === null && !props.isRoot) {
259
+ const declare = () => engine.declareRoot(merged.value, props.colorScheme);
260
+ declare();
261
+ (0, vue.watch)([merged, () => props.colorScheme], declare);
262
+ }
263
+ return () => isNested ? (0, vue.h)(props.as, (0, vue.mergeProps)({ class: classes.value }, attrs), slots.default?.()) : slots.default?.();
264
+ }
265
+ });
266
+ }
267
+ /** Makes `ThemeScope` and `useThemeClass` over the keys of one style. */
268
+ function createThemeScope(keys) {
269
+ /** The class string of the wrapper of the nearest nested provider, reactive; undefined under the outermost provider, or none. Call it in `setup`. */
270
+ const useThemeClass = () => {
271
+ const scope = (0, vue.inject)(keys.scope, null);
272
+ return (0, vue.computed)(() => scope?.value?.className);
273
+ };
274
+ return {
275
+ useThemeClass,
276
+ ThemeScope: (0, vue.defineComponent)({
277
+ name: "ThemeScope",
278
+ setup(_props, { slots }) {
279
+ const scope = (0, vue.inject)(keys.scope, null);
280
+ return () => {
281
+ const value = scope?.value;
282
+ return value ? (0, vue.h)(value.as, { class: value.className }, slots.default?.()) : slots.default?.();
283
+ };
284
+ }
285
+ })
286
+ };
287
+ }
288
+ // src/createStyle.ts
289
+ /** Makes the Vue styling over an engine: `styled`, sheets, the theme provider and `useTheme`. */
290
+ function bindEngine(engine) {
291
+ const keys = createThemeKeys();
292
+ const { ThemeScope, useThemeClass } = createThemeScope(keys);
293
+ /** The theme where no provider is above: the base theme, or the empty theme. */
294
+ const readOwnTheme = () => engine.baseTheme ?? _umber_style_core.EMPTY_THEME;
295
+ const useTheme = () => (0, vue.inject)(keys.theme, null) ?? (0, vue.computed)(readOwnTheme);
296
+ const useThemeView = (cache) => {
297
+ const local = cache === void 0 ? engine : engine.withCache(cache);
298
+ if (local === engine) return (0, vue.inject)(keys.view, null)?.value ?? engine.createThemeView(readOwnTheme());
299
+ return local.createThemeView((0, vue.inject)(keys.theme, null)?.value ?? readOwnTheme());
300
+ };
301
+ function create(styles) {
302
+ return engine.createSheet(styles);
303
+ }
304
+ return {
305
+ engine,
306
+ cache: engine.cache,
307
+ styled: createStyled(engine, useThemeView),
308
+ StyleSheet: { create },
309
+ useStyle: ((sheet) => {
310
+ const cache = injectCache();
311
+ const entries = (0, _umber_style_core.isThemedSheet)(sheet) ? sheet.resolve(useThemeView(cache)) : sheet;
312
+ return cache === void 0 ? entries : engine.withCache(cache).adoptSheet(entries);
313
+ }),
314
+ apply: (...entries) => ({ class: ((0, _umber_style_core.findEntryCache)(entries) ?? engine.cache).css(...entries) || void 0 }),
315
+ css: ((...args) => (0, _umber_style_core.createCssEntry)(engine.cache, args)),
316
+ ThemeProvider: createThemeProvider(engine, keys),
317
+ ThemeScope,
318
+ useTheme,
319
+ useThemeClass,
320
+ themeClass: engine.themeClass,
321
+ when: engine.when,
322
+ whenScheme: engine.whenScheme,
323
+ keyframes: engine.keyframes,
324
+ globalStyles: _umber_style_core.globalStyles,
325
+ Global: createGlobal(engine, keys)
326
+ };
327
+ }
328
+ /** Makes the Vue styling of one theme shape, apart from the default one: its own engine, or the one given. */
329
+ function createStyle(theme, options = {}) {
330
+ const engine = options.engine ?? (0, _umber_style_core.createEngine)(theme, options);
331
+ if (!engine.hasTheme) engine.setTheme(theme);
332
+ return bindEngine(engine);
333
+ }
334
+ // src/defaultStyle.ts
335
+ /** Makes the default styling: one engine, made on first use, behind `styled`, `ThemeProvider` and the rest. */
336
+ function createDefaultStyle() {
337
+ let pending = {};
338
+ let bound;
339
+ const getStyle = () => {
340
+ if (!bound) {
341
+ const engine = pending.engine ?? (0, _umber_style_core.createLazyEngine)(pending);
342
+ if (pending.theme) engine.setTheme(pending.theme);
343
+ bound = bindEngine(engine);
344
+ }
345
+ return bound;
346
+ };
347
+ /** 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. */
348
+ function configure(options) {
349
+ if (bound) throw new Error("configure must be called before the default style is used.");
350
+ pending = options;
351
+ }
352
+ const styled = (0, _umber_style_core.withTagShorthands)(((tag, options) => getStyle().styled(tag, options)));
353
+ const StyleSheet = { create: ((styles) => typeof styles === "function" ? getStyle().StyleSheet.create(styles) : (0, _umber_style_core.createDeferredRecord)(styles, () => getStyle().StyleSheet.create(styles))) };
354
+ const useStyle = ((sheet) => getStyle().useStyle(sheet));
355
+ function useTheme() {
356
+ return getStyle().useTheme();
357
+ }
358
+ const ThemeProvider = (0, vue.defineComponent)({
359
+ name: "ThemeProvider",
360
+ inheritAttrs: false,
361
+ setup(_props, { attrs, slots }) {
362
+ const Provider = getStyle().ThemeProvider;
363
+ return () => (0, vue.h)(Provider, attrs, slots);
364
+ }
365
+ });
366
+ const ThemeScope = (0, vue.defineComponent)({
367
+ name: "ThemeScope",
368
+ setup(_props, { slots }) {
369
+ const Real = getStyle().ThemeScope;
370
+ return () => (0, vue.h)(Real, null, slots);
371
+ }
372
+ });
373
+ function useThemeClass() {
374
+ return getStyle().useThemeClass();
375
+ }
376
+ const Global = (0, vue.defineComponent)({
377
+ name: "Global",
378
+ inheritAttrs: false,
379
+ setup(_props, { attrs }) {
380
+ const Real = getStyle().Global;
381
+ return () => (0, vue.h)(Real, attrs);
382
+ }
383
+ });
384
+ return {
385
+ configure,
386
+ getEngine: () => getStyle().engine,
387
+ styled,
388
+ StyleSheet,
389
+ useStyle,
390
+ useTheme,
391
+ ThemeProvider,
392
+ ThemeScope,
393
+ useThemeClass,
394
+ apply: ((...entries) => getStyle().apply(...entries)),
395
+ css: ((...args) => (0, _umber_style_core.createDeferredObject)(() => getStyle().css(...args))),
396
+ when: ((theme, colorScheme) => getStyle().when(theme, colorScheme)),
397
+ whenScheme: ((scheme) => getStyle().whenScheme(scheme)),
398
+ themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme)),
399
+ keyframes: _umber_style_core.keyframes,
400
+ globalStyles: _umber_style_core.globalStyles,
401
+ Global
402
+ };
403
+ }
404
+ const { configure, getEngine, styled, StyleSheet, useStyle, useTheme, ThemeProvider, ThemeScope, useThemeClass, apply, css, themeClass, when, whenScheme, keyframes, globalStyles, Global } = createDefaultStyle();
405
+ exports.CacheProvider = CacheProvider;
406
+ exports.Global = Global;
407
+ exports.StyleSheet = StyleSheet;
408
+ exports.ThemeProvider = ThemeProvider;
409
+ exports.ThemeScope = ThemeScope;
410
+ Object.defineProperty(exports, "add", {
411
+ enumerable: true,
412
+ get: function() {
413
+ return _umber_style_core.add;
414
+ }
415
+ });
416
+ Object.defineProperty(exports, "alpha", {
417
+ enumerable: true,
418
+ get: function() {
419
+ return _umber_style_core.alpha;
420
+ }
421
+ });
422
+ exports.apply = apply;
423
+ Object.defineProperty(exports, "at", {
424
+ enumerable: true,
425
+ get: function() {
426
+ return _umber_style_core.at;
427
+ }
428
+ });
429
+ exports.bindEngine = bindEngine;
430
+ exports.configure = configure;
431
+ exports.createDefaultStyle = createDefaultStyle;
432
+ exports.createStyle = createStyle;
433
+ exports.css = css;
434
+ Object.defineProperty(exports, "divide", {
435
+ enumerable: true,
436
+ get: function() {
437
+ return _umber_style_core.divide;
438
+ }
439
+ });
440
+ exports.getEngine = getEngine;
441
+ exports.globalStyles = globalStyles;
442
+ exports.keyframes = keyframes;
443
+ Object.defineProperty(exports, "multiply", {
444
+ enumerable: true,
445
+ get: function() {
446
+ return _umber_style_core.multiply;
447
+ }
448
+ });
449
+ Object.defineProperty(exports, "negate", {
450
+ enumerable: true,
451
+ get: function() {
452
+ return _umber_style_core.negate;
453
+ }
454
+ });
455
+ exports.styled = styled;
456
+ Object.defineProperty(exports, "subtract", {
457
+ enumerable: true,
458
+ get: function() {
459
+ return _umber_style_core.subtract;
460
+ }
461
+ });
462
+ exports.themeClass = themeClass;
463
+ exports.useStyle = useStyle;
464
+ exports.useTheme = useTheme;
465
+ exports.useThemeClass = useThemeClass;
466
+ exports.when = when;
467
+ exports.whenScheme = whenScheme;