@umber-style/vue 0.1.0-alpha.0 → 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,46 +1,218 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let _umber_style_core = require("@umber-style/core");
3
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
+ }
4
96
  // src/styled.ts
5
97
  /** Whether `tag` is a component made by `styled`. */
6
98
  function isStyledComponent(tag) {
7
99
  return typeof tag === "function" && "_styles" in tag;
8
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
+ }
9
129
  /**
10
130
  * Makes `styled` over an engine: a functional component that renders the tag with one class. A
11
- * function style gets the view of the theme of the nearest provider, which `useThemeView` reads.
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.
12
135
  */
13
136
  function createStyled(engine, useThemeView) {
14
- return (tag, options = {}) => (...styles) => {
137
+ const styled = (tag, options = {}) => (...args) => {
138
+ const styles = (0, _umber_style_core.readStyleArguments)(args);
15
139
  const inner = isStyledComponent(tag) ? tag : void 0;
16
140
  const baseTag = inner?._tag ?? tag;
17
141
  const shouldForward = options.shouldForwardProp ?? inner?._shouldForwardProp;
142
+ const target = [inner?._target, options.target].filter(Boolean).join(" ") || void 0;
18
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
+ };
19
153
  const Styled = Object.assign((_props, { attrs, slots }) => {
20
- const className = styler.getClassName(attrs, [...(0, _umber_style_core.flattenStyle)(attrs.style, engine.cache.findEntry), (0, vue.normalizeClass)(attrs.class)], styler.isDynamic ? useThemeView() : void 0);
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;
21
163
  const element = attrs.as ?? baseTag;
22
- const filter = typeof element === "string" ? shouldForward : void 0;
23
- const forwarded = {};
24
- for (const [key, value] of Object.entries(attrs)) if (!(key === "as" || key === "theme" || key === "class" || key === "style") && (!filter || filter(key))) forwarded[key] = value;
164
+ const forwarded = forwardAttributes(attrs, typeof element === "string" ? shouldForward : void 0);
25
165
  forwarded.class = className || void 0;
166
+ if (held?.hold) forwarded.ref = createHoldRef(held.hold);
26
167
  return (0, vue.h)(element, forwarded, slots);
27
168
  }, {
28
169
  _styles: styler.styles,
29
170
  _tag: baseTag,
30
- _shouldForwardProp: shouldForward
171
+ _shouldForwardProp: shouldForward,
172
+ _target: target,
173
+ toString: (0, _umber_style_core.createComponentSelector)(options.target, styler)
31
174
  });
32
175
  Styled.inheritAttrs = false;
33
176
  return Styled;
34
177
  };
178
+ return (0, _umber_style_core.withTagShorthands)(styled);
35
179
  }
36
180
  // src/ThemeProvider.ts
37
- /** Makes the `ThemeProvider` of an engine: an element with the theme class, which provides the real values below it. */
38
- function createThemeProvider(engine, key) {
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) {
39
209
  return (0, vue.defineComponent)({
40
210
  name: "ThemeProvider",
211
+ inheritAttrs: false,
41
212
  props: {
213
+ /** The theme, or the part of it that this subtree changes; or a function of the theme above that returns it. */
42
214
  theme: {
43
- type: Object,
215
+ type: [Object, Function],
44
216
  required: true
45
217
  },
46
218
  colorScheme: {
@@ -51,41 +223,81 @@ function createThemeProvider(engine, key) {
51
223
  type: String,
52
224
  default: "div"
53
225
  },
54
- /** Renders no element and no class: the app puts `themeClass(theme)` on an ancestor, usually `<html>`. */
226
+ /** Renders no element, no class and no rule: the app puts `themeClass(theme)` on an ancestor, usually `<html>`. */
55
227
  isRoot: {
56
228
  type: Boolean,
57
229
  default: false
58
230
  }
59
231
  },
60
- setup(props, { slots }) {
61
- const outer = (0, vue.inject)(key, null);
62
- (0, vue.provide)(key, (0, vue.computed)(() => {
63
- const base = outer?.value ?? engine.baseTheme;
64
- const theme = props.theme;
65
- return base === void 0 ? theme : (0, _umber_style_core.mergeDeep)(base, theme);
66
- }));
67
- return () => {
68
- const theme = props.theme;
69
- if (props.isRoot) {
70
- if (!engine.hasTheme) engine.setTheme(theme);
71
- return (0, vue.h)(vue.Fragment, null, slots.default?.());
72
- }
73
- const scope = engine.themeClass(theme, props.colorScheme);
74
- return (0, vue.h)(props.as, { class: [scope, engine.scopeClass()] }, slots.default?.());
75
- };
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?.();
76
264
  }
77
265
  });
78
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
+ }
79
288
  // src/createStyle.ts
80
289
  /** Makes the Vue styling over an engine: `styled`, sheets, the theme provider and `useTheme`. */
81
290
  function bindEngine(engine) {
82
- const key = Symbol("theme");
83
- const useTheme = () => (0, vue.inject)(key, null) ?? (0, vue.computed)(() => {
84
- const { baseTheme } = engine;
85
- if (baseTheme === void 0) throw new Error(_umber_style_core.NO_THEME_MESSAGE);
86
- return baseTheme;
87
- });
88
- const useThemeView = () => engine.createThemeView(useTheme().value);
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
+ };
89
301
  function create(styles) {
90
302
  return engine.createSheet(styles);
91
303
  }
@@ -94,13 +306,23 @@ function bindEngine(engine) {
94
306
  cache: engine.cache,
95
307
  styled: createStyled(engine, useThemeView),
96
308
  StyleSheet: { create },
97
- useStyle: ((sheet) => (0, _umber_style_core.isThemedSheet)(sheet) ? sheet.resolve(useThemeView()) : sheet),
98
- apply: (...entries) => ({ class: engine.css(...entries) || void 0 }),
99
- ThemeProvider: createThemeProvider(engine, key),
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,
100
318
  useTheme,
319
+ useThemeClass,
101
320
  themeClass: engine.themeClass,
102
321
  when: engine.when,
103
- whenScheme: engine.whenScheme
322
+ whenScheme: engine.whenScheme,
323
+ keyframes: engine.keyframes,
324
+ globalStyles: _umber_style_core.globalStyles,
325
+ Global: createGlobal(engine, keys)
104
326
  };
105
327
  }
106
328
  /** Makes the Vue styling of one theme shape, apart from the default one: its own engine, or the one given. */
@@ -127,12 +349,38 @@ function createDefaultStyle() {
127
349
  if (bound) throw new Error("configure must be called before the default style is used.");
128
350
  pending = options;
129
351
  }
130
- const styled = (tag, options) => getStyle().styled(tag, options);
352
+ const styled = (0, _umber_style_core.withTagShorthands)(((tag, options) => getStyle().styled(tag, options)));
131
353
  const StyleSheet = { create: ((styles) => typeof styles === "function" ? getStyle().StyleSheet.create(styles) : (0, _umber_style_core.createDeferredRecord)(styles, () => getStyle().StyleSheet.create(styles))) };
132
354
  const useStyle = ((sheet) => getStyle().useStyle(sheet));
133
355
  function useTheme() {
134
356
  return getStyle().useTheme();
135
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
+ });
136
384
  return {
137
385
  configure,
138
386
  getEngine: () => getStyle().engine,
@@ -140,23 +388,25 @@ function createDefaultStyle() {
140
388
  StyleSheet,
141
389
  useStyle,
142
390
  useTheme,
143
- ThemeProvider: (0, vue.defineComponent)({
144
- name: "ThemeProvider",
145
- inheritAttrs: false,
146
- setup(_props, { attrs, slots }) {
147
- const Provider = getStyle().ThemeProvider;
148
- return () => (0, vue.h)(Provider, attrs, slots);
149
- }
150
- }),
391
+ ThemeProvider,
392
+ ThemeScope,
393
+ useThemeClass,
151
394
  apply: ((...entries) => getStyle().apply(...entries)),
395
+ css: ((...args) => (0, _umber_style_core.createDeferredObject)(() => getStyle().css(...args))),
152
396
  when: ((theme, colorScheme) => getStyle().when(theme, colorScheme)),
153
397
  whenScheme: ((scheme) => getStyle().whenScheme(scheme)),
154
- themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme))
398
+ themeClass: ((theme, colorScheme) => getStyle().themeClass(theme, colorScheme)),
399
+ keyframes: _umber_style_core.keyframes,
400
+ globalStyles: _umber_style_core.globalStyles,
401
+ Global
155
402
  };
156
403
  }
157
- const { configure, getEngine, styled, StyleSheet, useStyle, useTheme, ThemeProvider, apply, themeClass, when, whenScheme } = createDefaultStyle();
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;
158
407
  exports.StyleSheet = StyleSheet;
159
408
  exports.ThemeProvider = ThemeProvider;
409
+ exports.ThemeScope = ThemeScope;
160
410
  Object.defineProperty(exports, "add", {
161
411
  enumerable: true,
162
412
  get: function() {
@@ -180,6 +430,7 @@ exports.bindEngine = bindEngine;
180
430
  exports.configure = configure;
181
431
  exports.createDefaultStyle = createDefaultStyle;
182
432
  exports.createStyle = createStyle;
433
+ exports.css = css;
183
434
  Object.defineProperty(exports, "divide", {
184
435
  enumerable: true,
185
436
  get: function() {
@@ -187,6 +438,8 @@ Object.defineProperty(exports, "divide", {
187
438
  }
188
439
  });
189
440
  exports.getEngine = getEngine;
441
+ exports.globalStyles = globalStyles;
442
+ exports.keyframes = keyframes;
190
443
  Object.defineProperty(exports, "multiply", {
191
444
  enumerable: true,
192
445
  get: function() {
@@ -209,5 +462,6 @@ Object.defineProperty(exports, "subtract", {
209
462
  exports.themeClass = themeClass;
210
463
  exports.useStyle = useStyle;
211
464
  exports.useTheme = useTheme;
465
+ exports.useThemeClass = useThemeClass;
212
466
  exports.when = when;
213
467
  exports.whenScheme = whenScheme;