@willbooster/shared-lib-react 1.0.0 → 1.1.0

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.
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react/jsx-runtime");exports.VersionOverlay=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{type:"text/css",children:"\n@media print {\n .wb-shared-version {\n display: none;\n }\n}"}),e.jsxs("div",{className:"wb-shared-version",style:{bottom:4,left:4,opacity:.5,pointerEvents:"none",position:"fixed",userSelect:"none",fontSize:"0.75rem"},children:[process.env.NEXT_PUBLIC_VERSION||process.env.VERSION||"dev"," on"," ",process.env.NEXT_PUBLIC_ENVIRONMENT||process.env.ENVIRONMENT||"local"]})]});
2
+ //# sourceMappingURL=VersionOverlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionOverlay.js","sources":["../../src/VersionOverlay.tsx"],"sourcesContent":["import type React from 'react';\n\nconst css = `\n@media print {\n .wb-shared-version {\n display: none;\n }\n}`;\n\nexport const VersionOverlay: React.FC = () => (\n <>\n <style type=\"text/css\">{css}</style>\n <div\n className=\"wb-shared-version\"\n style={{\n bottom: 4,\n left: 4,\n opacity: 0.5,\n pointerEvents: 'none',\n position: 'fixed',\n userSelect: 'none',\n fontSize: '0.75rem',\n }}\n >\n {process.env.NEXT_PUBLIC_VERSION || process.env.VERSION || 'dev'} on{' '}\n {process.env.NEXT_PUBLIC_ENVIRONMENT || process.env.ENVIRONMENT || 'local'}\n </div>\n </>\n);\n"],"names":["_jsxs","jsxs","_Fragment","children","_jsx","jsx","type","className","style","bottom","left","opacity","pointerEvents","position","userSelect","fontSize","process","env","NEXT_PUBLIC_VERSION","VERSION","NEXT_PUBLIC_ENVIRONMENT","ENVIRONMENT"],"mappings":"uEASwC,IACtCA,EAAAC,KAAAC,WAAA,CAAAC,SACE,CAAAC,EAAAC,IAAA,QAAA,CAAOC,KAAK,WAAUH,SATb,yEAUTH,EAAAC,KAAA,MAAA,CACEM,UAAU,oBACVC,MAAO,CACLC,OAAQ,EACRC,KAAM,EACNC,QAAS,GACTC,cAAe,OACfC,SAAU,QACVC,WAAY,OACZC,SAAU,WACVZ,SAAA,CAEDa,QAAQC,IAAIC,qBAAuBF,QAAQC,IAAIE,SAAW,MAAM,MAAI,IACpEH,QAAQC,IAAIG,yBAA2BJ,QAAQC,IAAII,aAAe"}
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";var r=require("./VersionOverlay.js");exports.VersionOverlay=r.VersionOverlay;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import React from "react";
2
+ import React from 'react';
3
3
  declare const VersionOverlay: React.FC;
4
4
  export { VersionOverlay };
@@ -0,0 +1,2 @@
1
+ import{jsxs as e,Fragment as n,jsx as s}from"react/jsx-runtime";const o=()=>e(n,{children:[s("style",{type:"text/css",children:"\n@media print {\n .wb-shared-version {\n display: none;\n }\n}"}),e("div",{className:"wb-shared-version",style:{bottom:4,left:4,opacity:.5,pointerEvents:"none",position:"fixed",userSelect:"none",fontSize:"0.75rem"},children:[process.env.NEXT_PUBLIC_VERSION||process.env.VERSION||"dev"," on"," ",process.env.NEXT_PUBLIC_ENVIRONMENT||process.env.ENVIRONMENT||"local"]})]});export{o as VersionOverlay};
2
+ //# sourceMappingURL=VersionOverlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionOverlay.js","sources":["../../src/VersionOverlay.tsx"],"sourcesContent":["import type React from 'react';\n\nconst css = `\n@media print {\n .wb-shared-version {\n display: none;\n }\n}`;\n\nexport const VersionOverlay: React.FC = () => (\n <>\n <style type=\"text/css\">{css}</style>\n <div\n className=\"wb-shared-version\"\n style={{\n bottom: 4,\n left: 4,\n opacity: 0.5,\n pointerEvents: 'none',\n position: 'fixed',\n userSelect: 'none',\n fontSize: '0.75rem',\n }}\n >\n {process.env.NEXT_PUBLIC_VERSION || process.env.VERSION || 'dev'} on{' '}\n {process.env.NEXT_PUBLIC_ENVIRONMENT || process.env.ENVIRONMENT || 'local'}\n </div>\n </>\n);\n"],"names":["VersionOverlay","_jsxs","_Fragment","children","_jsx","type","className","style","bottom","left","opacity","pointerEvents","position","userSelect","fontSize","process","env","NEXT_PUBLIC_VERSION","VERSION","NEXT_PUBLIC_ENVIRONMENT","ENVIRONMENT"],"mappings":"gEAEA,MAOaA,EAA2B,IACtCC,EAAAC,EAAA,CAAAC,SACE,CAAAC,EAAA,QAAA,CAAOC,KAAK,WAAUF,SATb,yEAUTF,EAAA,MAAA,CACEK,UAAU,oBACVC,MAAO,CACLC,OAAQ,EACRC,KAAM,EACNC,QAAS,GACTC,cAAe,OACfC,SAAU,QACVC,WAAY,OACZC,SAAU,WACVX,SAAA,CAEDY,QAAQC,IAAIC,qBAAuBF,QAAQC,IAAIE,SAAW,MAAM,MAAI,IACpEH,QAAQC,IAAIG,yBAA2BJ,QAAQC,IAAII,aAAe"}
@@ -0,0 +1 @@
1
+ export { VersionOverlay } from "./VersionOverlay.js";
@@ -0,0 +1,2 @@
1
+ export{VersionOverlay}from"./VersionOverlay.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@willbooster/shared-lib-react",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "WillBooster Inc.",
6
6
  "sideEffects": false,
7
7
  "type": "module",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./dist/esm/index.d.mts",
11
- "require": "./dist/cjs/index.cjs",
12
- "import": "./dist/esm/index.mjs"
10
+ "types": "./dist/esm/index.d.ts",
11
+ "require": "./dist/cjs/index.js",
12
+ "import": "./dist/esm/index.js"
13
13
  }
14
14
  },
15
- "main": "dist/cjs/index.cjs",
16
- "module": "dist/esm/index.mjs",
17
- "types": "dist/cjs/index.d.cts",
15
+ "main": "dist/cjs/index.js",
16
+ "module": "dist/esm/index.js",
17
+ "types": "dist/cjs/index.d.ts",
18
18
  "files": [
19
19
  "bin/",
20
20
  "dist/"
@@ -25,9 +25,9 @@
25
25
  "cleanup": "yarn format && yarn lint-fix",
26
26
  "format": "sort-package-json && yarn prettify",
27
27
  "lint": "eslint --color \"./{scripts,src,tests}/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}\"",
28
- "lint-fix": "yarn lint --fix",
28
+ "lint-fix": "yarn lint --fix --rule \"{ react-hooks/exhaustive-deps: 0 }\"",
29
29
  "prettify": "prettier --cache --color --write \"**/{.*/,}*.{cjs,css,cts,htm,html,js,json,json5,jsx,md,mjs,mts,scss,ts,tsx,vue,yaml,yml}\" \"!**/test-fixtures/**\"",
30
- "storybook": "start-storybook -p 6006",
30
+ "storybook": "NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6006",
31
31
  "test/ci": "yarn build-storybook",
32
32
  "typecheck": "tsc --noEmit --Pretty"
33
33
  },
@@ -49,16 +49,18 @@
49
49
  "@types/prettier": "2.7.2",
50
50
  "@types/react": "18.0.27",
51
51
  "@types/react-dom": "18.0.10",
52
- "@typescript-eslint/eslint-plugin": "5.49.0",
53
- "@typescript-eslint/parser": "5.49.0",
54
- "@willbooster/eslint-config-ts": "10.0.8",
52
+ "@typescript-eslint/eslint-plugin": "5.50.0",
53
+ "@typescript-eslint/parser": "5.50.0",
54
+ "@willbooster/eslint-config-ts-react": "10.1.0",
55
55
  "@willbooster/prettier-config": "9.1.1",
56
56
  "babel-loader": "^8.3.0",
57
- "build-ts": "5.1.0",
57
+ "build-ts": "5.3.2",
58
58
  "eslint": "8.33.0",
59
59
  "eslint-config-prettier": "8.6.0",
60
60
  "eslint-import-resolver-typescript": "3.5.3",
61
61
  "eslint-plugin-import": "2.27.5",
62
+ "eslint-plugin-react": "7.32.2",
63
+ "eslint-plugin-react-hooks": "4.6.0",
62
64
  "eslint-plugin-sort-class-members": "1.16.0",
63
65
  "eslint-plugin-sort-destructure-keys": "1.4.0",
64
66
  "eslint-plugin-storybook": "0.6.10",
@@ -68,8 +70,8 @@
68
70
  "prettier": "2.8.3",
69
71
  "react": "18.2.0",
70
72
  "react-dom": "18.2.0",
71
- "sort-package-json": "2.3.0",
72
- "typescript": "4.9.4",
73
+ "sort-package-json": "2.4.0",
74
+ "typescript": "4.9.5",
73
75
  "vitest": "0.28.3"
74
76
  },
75
77
  "peerDependencies": {
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("react/jsx-runtime");exports.VersionOverlay=()=>e.jsxs("div",{style:{bottom:4,left:4,opacity:.5,pointerEvents:"none",position:"fixed",userSelect:"none",fontSize:"0.75rem"},children:[process.env.NEXT_PUBLIC_VERSION||process.env.VERSION||"dev"," on"," ",process.env.NEXT_PUBLIC_ENVIRONMENT||process.env.ENVIRONMENT||"local"]});
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/VersionOverlay.tsx"],"sourcesContent":["import type React from 'react';\n\nexport const VersionOverlay: React.FC = () => (\n <div\n style={{\n bottom: 4,\n left: 4,\n opacity: 0.5,\n pointerEvents: 'none',\n position: 'fixed',\n userSelect: 'none',\n fontSize: '0.75rem',\n }}\n >\n {process.env.NEXT_PUBLIC_VERSION || process.env.VERSION || 'dev'} on{' '}\n {process.env.NEXT_PUBLIC_ENVIRONMENT || process.env.ENVIRONMENT || 'local'}\n </div>\n);\n"],"names":["_jsxs","jsxs","style","bottom","left","opacity","pointerEvents","position","userSelect","fontSize","children","process","env","NEXT_PUBLIC_VERSION","VERSION","NEXT_PUBLIC_ENVIRONMENT","ENVIRONMENT"],"mappings":"uEAEwC,IACtCA,EAAAC,KAAA,MAAA,CACEC,MAAO,CACLC,OAAQ,EACRC,KAAM,EACNC,QAAS,GACTC,cAAe,OACfC,SAAU,QACVC,WAAY,OACZC,SAAU,WACVC,SAAA,CAEDC,QAAQC,IAAIC,qBAAuBF,QAAQC,IAAIE,SAAW,MAAM,MAAI,IACpEH,QAAQC,IAAIG,yBAA2BJ,QAAQC,IAAII,aAAe"}
@@ -1,2 +0,0 @@
1
- import{jsxs as e}from"react/jsx-runtime";const o=()=>e("div",{style:{bottom:4,left:4,opacity:.5,pointerEvents:"none",position:"fixed",userSelect:"none",fontSize:"0.75rem"},children:[process.env.NEXT_PUBLIC_VERSION||process.env.VERSION||"dev"," on"," ",process.env.NEXT_PUBLIC_ENVIRONMENT||process.env.ENVIRONMENT||"local"]});export{o as VersionOverlay};
2
- //# sourceMappingURL=VersionOverlay.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VersionOverlay.mjs","sources":["../../src/VersionOverlay.tsx"],"sourcesContent":["import type React from 'react';\n\nexport const VersionOverlay: React.FC = () => (\n <div\n style={{\n bottom: 4,\n left: 4,\n opacity: 0.5,\n pointerEvents: 'none',\n position: 'fixed',\n userSelect: 'none',\n fontSize: '0.75rem',\n }}\n >\n {process.env.NEXT_PUBLIC_VERSION || process.env.VERSION || 'dev'} on{' '}\n {process.env.NEXT_PUBLIC_ENVIRONMENT || process.env.ENVIRONMENT || 'local'}\n </div>\n);\n"],"names":["VersionOverlay","_jsxs","style","bottom","left","opacity","pointerEvents","position","userSelect","fontSize","children","process","env","NEXT_PUBLIC_VERSION","VERSION","NEXT_PUBLIC_ENVIRONMENT","ENVIRONMENT"],"mappings":"yCAEO,MAAMA,EAA2B,IACtCC,EAAA,MAAA,CACEC,MAAO,CACLC,OAAQ,EACRC,KAAM,EACNC,QAAS,GACTC,cAAe,OACfC,SAAU,QACVC,WAAY,OACZC,SAAU,WACVC,SAAA,CAEDC,QAAQC,IAAIC,qBAAuBF,QAAQC,IAAIE,SAAW,MAAM,MAAI,IACpEH,QAAQC,IAAIG,yBAA2BJ,QAAQC,IAAII,aAAe"}
@@ -1,2 +0,0 @@
1
- export{VersionOverlay}from"./VersionOverlay.mjs";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}