@kittycad/react-shared 0.1.5 → 0.1.9
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 +13 -4
- package/dist/index.d.ts +7 -6
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,11 +67,20 @@ This project uses Storybook for component development and documentation. Run `np
|
|
|
67
67
|
The library is automatically published to npm when a new git tag is created:
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
|
-
|
|
71
|
-
npm version patch # or minor, major
|
|
70
|
+
git checkout -b bump
|
|
72
71
|
|
|
73
|
-
#
|
|
74
|
-
|
|
72
|
+
npm version patch --no-git-tag-version # or minor, major
|
|
73
|
+
|
|
74
|
+
npm run fmt
|
|
75
|
+
|
|
76
|
+
git add package.json package-lock.json
|
|
77
|
+
git commit -m "bump version"
|
|
78
|
+
|
|
79
|
+
# !! Create PR and merge it
|
|
80
|
+
|
|
81
|
+
git checkout main
|
|
82
|
+
git tag -a vX.Y.Z
|
|
83
|
+
git push origin vX.Y.Z
|
|
75
84
|
```
|
|
76
85
|
|
|
77
86
|
This will trigger the GitHub Action to publish to npm.
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { SVGProps } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { AccountProvider, Client } from '@kittycad/lib';
|
|
5
|
+
import { BillingError as BillingError$1 } from '@/lib/billing';
|
|
5
6
|
import { DeepPartial } from '@/lib/types';
|
|
6
7
|
import { ClassValue } from 'clsx';
|
|
7
8
|
|
|
@@ -69,7 +70,7 @@ type TextProps = {
|
|
|
69
70
|
};
|
|
70
71
|
};
|
|
71
72
|
type BillingDialogProps = {
|
|
72
|
-
error?:
|
|
73
|
+
error?: BillingError$1;
|
|
73
74
|
credits?: number;
|
|
74
75
|
allowance?: number;
|
|
75
76
|
upgradeHref: string;
|
|
@@ -85,7 +86,7 @@ declare enum BillingRemainingMode {
|
|
|
85
86
|
}
|
|
86
87
|
interface BillingRemainingProps {
|
|
87
88
|
mode: BillingRemainingMode;
|
|
88
|
-
error?:
|
|
89
|
+
error?: BillingError$1;
|
|
89
90
|
credits?: number;
|
|
90
91
|
allowance?: number;
|
|
91
92
|
}
|
|
@@ -98,10 +99,10 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
98
99
|
*/
|
|
99
100
|
|
|
100
101
|
declare enum EBillingError {
|
|
101
|
-
NotOk =
|
|
102
|
-
UnexpectedStatus =
|
|
103
|
-
CatastrophicRequest =
|
|
104
|
-
JSONParse =
|
|
102
|
+
NotOk = "NotOk",
|
|
103
|
+
UnexpectedStatus = "UnexpectedStatus",
|
|
104
|
+
CatastrophicRequest = "CatastrophicRequest",
|
|
105
|
+
JSONParse = "JSONParse"
|
|
105
106
|
}
|
|
106
107
|
interface IBillingErrorNotOk {
|
|
107
108
|
type: EBillingError.NotOk;
|
package/dist/index.esm.js
CHANGED
|
@@ -21855,9 +21855,9 @@ const ErrorMsg = (props) => {
|
|
|
21855
21855
|
fill: fadedFg,
|
|
21856
21856
|
backgroundColor: fadedBg,
|
|
21857
21857
|
};
|
|
21858
|
-
return (jsxs("div", { onMouseEnter: () => setShowMessage(true), onMouseLeave: () => setShowMessage(false), children: [showMessage && (jsx("div", { style: {
|
|
21858
|
+
return (jsxs("div", { onMouseEnter: () => setShowMessage(true), onMouseLeave: () => setShowMessage(false), children: [showMessage && (jsx("div", { "data-testid": "billing-remaining-error-message", style: {
|
|
21859
21859
|
position: 'absolute',
|
|
21860
|
-
}, children:
|
|
21860
|
+
}, children: jsxs("div", { className: "rounded p-1", style: { ...colors, position: 'relative', top: -32 }, children: ["Error fetching billing: ", props.error.error.type] }) })), jsx("div", { "data-testid": "billing-remaining-error-indicator", className: "rounded", style: colors, children: jsx(CustomIcon, { name: "exclamationMark", className: "w-5 h-5" }) })] }));
|
|
21861
21861
|
};
|
|
21862
21862
|
const ProgressBar = (props) => {
|
|
21863
21863
|
const ratio = props.value / props.max;
|
|
@@ -25206,10 +25206,10 @@ try{if("undefined"==typeof fetch&&"undefined"!=typeof process&&process.versions?
|
|
|
25206
25206
|
*/
|
|
25207
25207
|
var EBillingError;
|
|
25208
25208
|
(function (EBillingError) {
|
|
25209
|
-
EBillingError[
|
|
25210
|
-
EBillingError[
|
|
25211
|
-
EBillingError[
|
|
25212
|
-
EBillingError[
|
|
25209
|
+
EBillingError["NotOk"] = "NotOk";
|
|
25210
|
+
EBillingError["UnexpectedStatus"] = "UnexpectedStatus";
|
|
25211
|
+
EBillingError["CatastrophicRequest"] = "CatastrophicRequest";
|
|
25212
|
+
EBillingError["JSONParse"] = "JSONParse";
|
|
25213
25213
|
})(EBillingError || (EBillingError = {}));
|
|
25214
25214
|
class BillingError {
|
|
25215
25215
|
constructor(error) {
|