@xyo-network/react-webapp 2.25.27

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,9 @@
1
+ import { FlexBoxProps } from '@xylabs/sdk-react';
2
+ import { ReactNode } from 'react';
3
+ export interface WebAppChromeProps extends FlexBoxProps {
4
+ appName?: string;
5
+ footer?: ReactNode;
6
+ appbar?: ReactNode;
7
+ errorPage?: ReactNode;
8
+ }
9
+ export declare const WebAppChrome: React.FC<WebAppChromeProps>;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CssBaseline } from '@mui/material';
3
+ import { FlexCol, FlexGrowCol, InvertableThemeProvider } from '@xylabs/sdk-react';
4
+ import { ApplicationAppBar } from '@xyo-network/react-appbar';
5
+ import { ErrorBoundary, ErrorPage, Footer, useAppSettings } from '@xyo-network/react-shared';
6
+ import { appThemeOptions, partialDarkThemeOptions } from '@xyo-network/react-theme';
7
+ import { Helmet } from 'react-helmet';
8
+ export const WebAppChrome = ({ errorPage, appbar, footer, children, appName, ...props }) => {
9
+ const { darkMode } = useAppSettings();
10
+ return (_jsxs(InvertableThemeProvider, { dark: darkMode, options: appThemeOptions, darkOptions: partialDarkThemeOptions, children: [_jsx(CssBaseline, {}), _jsx(Helmet, { defaultTitle: appName, titleTemplate: `%s | ${appName}`, children: _jsx("meta", { content: "website", property: "og:type" }) }), _jsxs(FlexCol, { alignItems: "stretch", height: "100vh", ...props, children: [appbar ?? _jsx(ApplicationAppBar, {}), _jsx(FlexGrowCol, { overflow: "hidden", justifyContent: "flex-start", alignItems: "stretch", children: _jsx(ErrorBoundary, { fallback: errorPage ?? _jsx(ErrorPage, {}), children: children }) }), footer ?? _jsx(Footer, { dynamicHeight: true })] })] }));
11
+ };
12
+ //# sourceMappingURL=WebAppChrome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebAppChrome.js","sourceRoot":"","sources":["../../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aAAa,SAAG,IAC3B,IACc,CAC3B,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './WebAppChrome';
@@ -0,0 +1,2 @@
1
+ export * from './WebAppChrome';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
package/package.json ADDED
@@ -0,0 +1,120 @@
1
+ {
2
+ "name": "@xyo-network/react-webapp",
3
+ "author": {
4
+ "email": "support@xyo.network",
5
+ "name": "XYO Development Team",
6
+ "url": "https://xyo.network"
7
+ },
8
+ "bugs": {
9
+ "email": "support@xyo.network",
10
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
+ },
12
+ "dependencies": {
13
+ "@emotion/react": "^11.9.0",
14
+ "@emotion/styled": "^11.8.1",
15
+ "@mui/icons-material": "^5.8.0",
16
+ "@mui/lab": "^5.0.0-alpha.83",
17
+ "@mui/material": "^5.8.1",
18
+ "@mui/styles": "^5.8.0",
19
+ "@xylabs/pixel": "^1.3.7",
20
+ "@xylabs/sdk-js": "^2.5.5",
21
+ "@xylabs/sdk-react": "^2.12.10",
22
+ "@xyo-network/api": "^2.20.38",
23
+ "@xyo-network/core": "^2.20.38",
24
+ "@xyo-network/network": "^2.20.38",
25
+ "@xyo-network/react-appbar": "^2.25.27",
26
+ "@xyo-network/react-shared": "^2.25.27",
27
+ "@xyo-network/react-theme": "^2.25.27",
28
+ "lodash": "^4.17.21",
29
+ "luxon": "^2.4.0",
30
+ "react": "^18.1.0",
31
+ "react-dom": "^18.1.0",
32
+ "react-helmet": "^6.1.0",
33
+ "react-icons": "^4.3.1",
34
+ "react-json-view": "^1.21.3",
35
+ "react-router-dom": "^6.3.0",
36
+ "tslib": "^2.4.0",
37
+ "typedoc": "^0.22.15"
38
+ },
39
+ "description": "Common React library for all XYO projects that use React",
40
+ "devDependencies": {
41
+ "@babel/core": "^7.18.2",
42
+ "@babel/preset-env": "^7.18.2",
43
+ "@storybook/addons": "^6.5.6",
44
+ "@storybook/api": "^6.5.6",
45
+ "@storybook/components": "^6.5.6",
46
+ "@storybook/core-events": "^6.5.6",
47
+ "@storybook/react": "^6.5.6",
48
+ "@storybook/theming": "^6.5.6",
49
+ "@types/lodash": "^4.14.182",
50
+ "@types/react-helmet": "^6.1.5",
51
+ "@xylabs/pixel": "^1.3.7",
52
+ "@xylabs/sdk-js": "^2.5.5",
53
+ "@xylabs/sdk-react": "^2.12.10",
54
+ "@xylabs/ts-scripts": "^1.0.66",
55
+ "@xylabs/tsconfig": "^1.0.13",
56
+ "axios": "^0.27.2",
57
+ "storybook-dark-mode": "^1.1.0",
58
+ "typescript": "^4.7.2"
59
+ },
60
+ "browser": "dist/esm/index.js",
61
+ "docs": "dist/docs.json",
62
+ "exports": {
63
+ ".": {
64
+ "node": {
65
+ "import": "./dist/esm/index.js",
66
+ "require": "./dist/cjs/index.js"
67
+ },
68
+ "browser": {
69
+ "import": "./dist/esm/index.js",
70
+ "require": "./dist/cjs/index.js"
71
+ },
72
+ "default": "./dist/esm/index.js"
73
+ },
74
+ "./dist/docs.json": {
75
+ "default": "./dist/docs.json"
76
+ },
77
+ "./package.json": "./package.json"
78
+ },
79
+ "main": "dist/cjs/index.js",
80
+ "module": "dist/esm/index.js",
81
+ "homepage": "https://xyo.network",
82
+ "keywords": [
83
+ "xyo",
84
+ "utility",
85
+ "typescript",
86
+ "react"
87
+ ],
88
+ "license": "LGPL-3.0",
89
+ "peerDependencies": {
90
+ "axios": ">0.26",
91
+ "typedoc": "^0.22.13"
92
+ },
93
+ "peerDependenciesMeta": {
94
+ "typedoc": {
95
+ "optional": true
96
+ }
97
+ },
98
+ "resolutions": {
99
+ "@storybook/react/webpack": "^5",
100
+ "bn.js": "^5.2.0",
101
+ "react": "^18.1.0",
102
+ "react-dom": "^18.1.0",
103
+ "webpack": "^5"
104
+ },
105
+ "publishConfig": {
106
+ "access": "public"
107
+ },
108
+ "repository": {
109
+ "type": "git",
110
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
111
+ },
112
+ "scripts": {
113
+ "lint-pkg": "npmPkgJsonLint .",
114
+ "license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
115
+ },
116
+ "sideEffects": false,
117
+ "types": "dist/esm/index.d.ts",
118
+ "version": "2.25.27",
119
+ "packageManager": "yarn@3.1.1"
120
+ }
@@ -0,0 +1,34 @@
1
+ import { CssBaseline } from '@mui/material'
2
+ import { FlexBoxProps, FlexCol, FlexGrowCol, InvertableThemeProvider } from '@xylabs/sdk-react'
3
+ import { ApplicationAppBar } from '@xyo-network/react-appbar'
4
+ import { ErrorBoundary, ErrorPage, Footer, useAppSettings } from '@xyo-network/react-shared'
5
+ import { appThemeOptions, partialDarkThemeOptions } from '@xyo-network/react-theme'
6
+ import { ReactNode } from 'react'
7
+ import { Helmet } from 'react-helmet'
8
+
9
+ export interface WebAppChromeProps extends FlexBoxProps {
10
+ appName?: string
11
+ footer?: ReactNode
12
+ appbar?: ReactNode
13
+ errorPage?: ReactNode
14
+ }
15
+
16
+ export const WebAppChrome: React.FC<WebAppChromeProps> = ({ errorPage, appbar, footer, children, appName, ...props }) => {
17
+ const { darkMode } = useAppSettings()
18
+
19
+ return (
20
+ <InvertableThemeProvider dark={darkMode} options={appThemeOptions} darkOptions={partialDarkThemeOptions}>
21
+ <CssBaseline />
22
+ <Helmet defaultTitle={appName} titleTemplate={`%s | ${appName}`}>
23
+ <meta content="website" property="og:type" />
24
+ </Helmet>
25
+ <FlexCol alignItems="stretch" height="100vh" {...props}>
26
+ {appbar ?? <ApplicationAppBar />}
27
+ <FlexGrowCol overflow="hidden" justifyContent="flex-start" alignItems="stretch">
28
+ <ErrorBoundary fallback={errorPage ?? <ErrorPage />}>{children}</ErrorBoundary>
29
+ </FlexGrowCol>
30
+ {footer ?? <Footer dynamicHeight />}
31
+ </FlexCol>
32
+ </InvertableThemeProvider>
33
+ )
34
+ }
@@ -0,0 +1 @@
1
+ export * from './WebAppChrome'
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './components'
package/typedoc.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://typedoc.org/schema.json",
3
+ "entryPoints": [
4
+ "./src/index.ts"
5
+ ],
6
+ "excludeExternals": true,
7
+ "excludeInternal": true,
8
+ "excludePrivate": true,
9
+ "excludeProtected": true,
10
+ "intentionallyNotExported": [
11
+ "AuthDispatch",
12
+ "AuthServiceId",
13
+ "AuthState",
14
+ "LoginForm"
15
+ ],
16
+ "json": "./dist/docs.json",
17
+ "tsconfig": "./tsconfig.json"
18
+ }