@spark-web/text 2.0.0-rc.1 → 2.0.0-rc.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @spark-web/text
2
2
 
3
+ ## 2.0.0-rc.3
4
+
5
+ ### Major Changes
6
+
7
+ - upgrade package
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @spark-web/theme@4.0.0-rc.3
13
+ - @spark-web/utils@2.0.0-rc.3
14
+ - @spark-web/box@2.0.0-rc.3
15
+
16
+ ## 2.0.0-rc.2
17
+
18
+ ### Major Changes
19
+
20
+ - add parser
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies []:
25
+ - @spark-web/theme@4.0.0-rc.2
26
+ - @spark-web/utils@2.0.0-rc.2
27
+ - @spark-web/box@2.0.0-rc.2
28
+
3
29
  ## 2.0.0-rc.1
4
30
 
5
31
  ### Major Changes
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  export declare const TextContext: import("react").Context<{
3
- size: "small" | "xsmall" | "standard" | "large";
4
- tone: "link" | "disabled" | "muted" | "fieldAccent" | "accent" | "neutral" | "primary" | "secondary" | "caution" | "critical" | "info" | "positive" | "placeholder" | "primaryHover" | "primaryActive" | "secondaryHover" | "secondaryActive";
3
+ size: "xsmall" | "small" | "standard" | "large";
4
+ tone: "muted" | "disabled" | "fieldAccent" | "accent" | "neutral" | "primary" | "secondary" | "caution" | "critical" | "info" | "positive" | "link" | "placeholder" | "primaryHover" | "primaryActive" | "secondaryHover" | "secondaryActive";
5
5
  weight: "regular" | "semibold";
6
6
  } | undefined>;
7
7
  export declare function useTextContext(): {
8
- size: "small" | "xsmall" | "standard" | "large";
9
- tone: "link" | "disabled" | "muted" | "fieldAccent" | "accent" | "neutral" | "primary" | "secondary" | "caution" | "critical" | "info" | "positive" | "placeholder" | "primaryHover" | "primaryActive" | "secondaryHover" | "secondaryActive";
8
+ size: "xsmall" | "small" | "standard" | "large";
9
+ tone: "muted" | "disabled" | "fieldAccent" | "accent" | "neutral" | "primary" | "secondary" | "caution" | "critical" | "info" | "positive" | "link" | "placeholder" | "primaryHover" | "primaryActive" | "secondaryHover" | "secondaryActive";
10
10
  weight: "regular" | "semibold";
11
11
  } | undefined;
@@ -9,8 +9,8 @@ export declare function DefaultTextPropsProvider({ children, size, tone, weight,
9
9
  children: ReactNode;
10
10
  }): import("@emotion/react/jsx-runtime").JSX.Element;
11
11
  export declare const useDefaultTextProps: ({ size: sizeProp, tone: toneProp, weight: weightProp, }: DefaultTextProps) => {
12
- size: "small" | "xsmall" | "standard" | "large";
13
- tone: "link" | "disabled" | "muted" | "fieldAccent" | "accent" | "neutral" | "primary" | "secondary" | "caution" | "critical" | "info" | "positive" | "placeholder" | "primaryHover" | "primaryActive" | "secondaryHover" | "secondaryActive";
12
+ size: "xsmall" | "small" | "standard" | "large";
13
+ tone: "muted" | "disabled" | "fieldAccent" | "accent" | "neutral" | "primary" | "secondary" | "caution" | "critical" | "info" | "positive" | "link" | "placeholder" | "primaryHover" | "primaryActive" | "secondaryHover" | "secondaryActive";
14
14
  weight: "regular" | "semibold";
15
15
  };
16
16
  export {};
@@ -30,6 +30,6 @@ export declare type TextProps = Partial<UseTextProps> & {
30
30
  } & (InlineProps | BlockProps);
31
31
  export declare const Text: <Comp extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "div">(props: {
32
32
  as?: Comp | undefined;
33
- ref?: import("react").Ref<Comp extends "symbol" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
33
+ ref?: import("react").Ref<Comp extends "symbol" | "text" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "text" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "textPath" | "tspan" | "use" | "view">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
34
34
  } & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<Comp>>, "as"> & TextProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
35
35
  export {};
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var react = require('react');
6
- var jsxRuntime = require('react/jsx-runtime');
6
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
7
7
  var react$1 = require('@emotion/react');
8
8
  var theme = require('@spark-web/theme');
9
9
  var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
@@ -33,7 +33,7 @@ function DefaultTextPropsProvider(_ref) {
33
33
  weight: weight
34
34
  };
35
35
  }, [size, tone, weight]);
36
- return /*#__PURE__*/jsxRuntime.jsx(DefaultTextPropsContext.Provider, {
36
+ return jsxRuntime.jsx(DefaultTextPropsContext.Provider, {
37
37
  value: defaultTextProps,
38
38
  children: children
39
39
  });
@@ -60,7 +60,7 @@ var Strong = function Strong(_ref) {
60
60
  var styles = {
61
61
  fontWeight: theme$1.typography.fontWeight.semibold
62
62
  };
63
- return /*#__PURE__*/jsxRuntime.jsx("strong", {
63
+ return jsxRuntime.jsx("strong", {
64
64
  css: react$1.css(styles),
65
65
  children: children
66
66
  });
@@ -207,7 +207,7 @@ var Text = ts.forwardRefWithAs(function (_ref, forwardedRef) {
207
207
 
208
208
  // early exit for inline variant
209
209
  if (inline) {
210
- return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
210
+ return jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
211
211
  as: as !== null && as !== void 0 ? as : 'span',
212
212
  data: data,
213
213
  ref: forwardedRef,
@@ -218,7 +218,7 @@ var Text = ts.forwardRefWithAs(function (_ref, forwardedRef) {
218
218
  }
219
219
 
220
220
  // prepare block variant
221
- var content = overflowStrategy ? /*#__PURE__*/jsxRuntime.jsx("span", {
221
+ var content = overflowStrategy ? jsxRuntime.jsx("span", {
222
222
  css: react$1.css(overflowStyles),
223
223
  children: children
224
224
  }) : children;
@@ -229,9 +229,9 @@ var Text = ts.forwardRefWithAs(function (_ref, forwardedRef) {
229
229
  weight: weight
230
230
  };
231
231
  }, [size, tone, weight]);
232
- return /*#__PURE__*/jsxRuntime.jsx(TextContext.Provider, {
232
+ return jsxRuntime.jsx(TextContext.Provider, {
233
233
  value: textContextValue,
234
- children: /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
234
+ children: jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
235
235
  as: as,
236
236
  data: data,
237
237
  ref: forwardedRef,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var react = require('react');
6
- var jsxRuntime = require('react/jsx-runtime');
6
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
7
7
  var react$1 = require('@emotion/react');
8
8
  var theme = require('@spark-web/theme');
9
9
  var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
@@ -33,7 +33,7 @@ function DefaultTextPropsProvider(_ref) {
33
33
  weight: weight
34
34
  };
35
35
  }, [size, tone, weight]);
36
- return /*#__PURE__*/jsxRuntime.jsx(DefaultTextPropsContext.Provider, {
36
+ return jsxRuntime.jsx(DefaultTextPropsContext.Provider, {
37
37
  value: defaultTextProps,
38
38
  children: children
39
39
  });
@@ -60,7 +60,7 @@ var Strong = function Strong(_ref) {
60
60
  var styles = {
61
61
  fontWeight: theme$1.typography.fontWeight.semibold
62
62
  };
63
- return /*#__PURE__*/jsxRuntime.jsx("strong", {
63
+ return jsxRuntime.jsx("strong", {
64
64
  css: react$1.css(styles),
65
65
  children: children
66
66
  });
@@ -207,7 +207,7 @@ var Text = ts.forwardRefWithAs(function (_ref, forwardedRef) {
207
207
 
208
208
  // early exit for inline variant
209
209
  if (inline) {
210
- return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
210
+ return jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
211
211
  as: as !== null && as !== void 0 ? as : 'span',
212
212
  data: data,
213
213
  ref: forwardedRef,
@@ -218,7 +218,7 @@ var Text = ts.forwardRefWithAs(function (_ref, forwardedRef) {
218
218
  }
219
219
 
220
220
  // prepare block variant
221
- var content = overflowStrategy ? /*#__PURE__*/jsxRuntime.jsx("span", {
221
+ var content = overflowStrategy ? jsxRuntime.jsx("span", {
222
222
  css: react$1.css(overflowStyles),
223
223
  children: children
224
224
  }) : children;
@@ -229,9 +229,9 @@ var Text = ts.forwardRefWithAs(function (_ref, forwardedRef) {
229
229
  weight: weight
230
230
  };
231
231
  }, [size, tone, weight]);
232
- return /*#__PURE__*/jsxRuntime.jsx(TextContext.Provider, {
232
+ return jsxRuntime.jsx(TextContext.Provider, {
233
233
  value: textContextValue,
234
- children: /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
234
+ children: jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
235
235
  as: as,
236
236
  data: data,
237
237
  ref: forwardedRef,
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext, useMemo } from 'react';
2
- import { jsx } from 'react/jsx-runtime';
2
+ import { jsx } from '@emotion/react/jsx-runtime';
3
3
  import { css } from '@emotion/react';
4
4
  import { useTheme } from '@spark-web/theme';
5
5
  import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
@@ -29,7 +29,7 @@ function DefaultTextPropsProvider(_ref) {
29
29
  weight: weight
30
30
  };
31
31
  }, [size, tone, weight]);
32
- return /*#__PURE__*/jsx(DefaultTextPropsContext.Provider, {
32
+ return jsx(DefaultTextPropsContext.Provider, {
33
33
  value: defaultTextProps,
34
34
  children: children
35
35
  });
@@ -56,7 +56,7 @@ var Strong = function Strong(_ref) {
56
56
  var styles = {
57
57
  fontWeight: theme.typography.fontWeight.semibold
58
58
  };
59
- return /*#__PURE__*/jsx("strong", {
59
+ return jsx("strong", {
60
60
  css: css(styles),
61
61
  children: children
62
62
  });
@@ -203,7 +203,7 @@ var Text = forwardRefWithAs(function (_ref, forwardedRef) {
203
203
 
204
204
  // early exit for inline variant
205
205
  if (inline) {
206
- return /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
206
+ return jsx(Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
207
207
  as: as !== null && as !== void 0 ? as : 'span',
208
208
  data: data,
209
209
  ref: forwardedRef,
@@ -214,7 +214,7 @@ var Text = forwardRefWithAs(function (_ref, forwardedRef) {
214
214
  }
215
215
 
216
216
  // prepare block variant
217
- var content = overflowStrategy ? /*#__PURE__*/jsx("span", {
217
+ var content = overflowStrategy ? jsx("span", {
218
218
  css: css(overflowStyles),
219
219
  children: children
220
220
  }) : children;
@@ -225,9 +225,9 @@ var Text = forwardRefWithAs(function (_ref, forwardedRef) {
225
225
  weight: weight
226
226
  };
227
227
  }, [size, tone, weight]);
228
- return /*#__PURE__*/jsx(TextContext.Provider, {
228
+ return jsx(TextContext.Provider, {
229
229
  value: textContextValue,
230
- children: /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
230
+ children: jsx(Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
231
231
  as: as,
232
232
  data: data,
233
233
  ref: forwardedRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/text",
3
- "version": "2.0.0-rc.1",
3
+ "version": "2.0.0-rc.3",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,10 +16,10 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.25.0",
19
- "@emotion/react": "^11.13.5",
20
- "@spark-web/box": "^2.0.0-rc.1",
21
- "@spark-web/theme": "^4.0.0-rc.1",
22
- "@spark-web/utils": "^2.0.0-rc.1"
19
+ "@emotion/react": "^11.14.0",
20
+ "@spark-web/box": "^2.0.0-rc.3",
21
+ "@spark-web/theme": "^4.0.0-rc.3",
22
+ "@spark-web/utils": "^2.0.0-rc.3"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/react": "^18.2.0",