@xyo-network/react-webapp 7.5.7 → 7.5.11

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.
@@ -1,10 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/components/Body.tsx
5
2
  import { styled } from "@mui/material";
6
3
  import { FlexGrowCol, FlexRow } from "@xylabs/react-flexbox";
7
- import React from "react";
8
4
 
9
5
  // src/components/lib/cssValues.ts
10
6
  var scrollableWrap = {
@@ -15,29 +11,24 @@ var fixedWrap = {
15
11
  inset: "unset",
16
12
  position: "relative"
17
13
  };
18
- var scrollableContent = {
19
- ...fixedWrap
20
- };
21
- var fixedContent = {
22
- ...scrollableWrap
23
- };
14
+ var scrollableContent = { ...fixedWrap };
15
+ var fixedContent = { ...scrollableWrap };
24
16
 
25
17
  // src/components/Body.tsx
18
+ import { jsx, jsxs } from "react/jsx-runtime";
26
19
  var WebAppBodyName = "WebAppBody";
27
- var propsNotForwarded = /* @__PURE__ */ new Set([
28
- "mobileScrollingBreakpoint",
29
- "variant",
30
- "spacing",
31
- "disableBreadcrumbGutter"
32
- ]);
33
- var defaultStyledOptions = {
34
- shouldForwardProp: /* @__PURE__ */ __name((prop) => !propsNotForwarded.has(prop), "shouldForwardProp")
35
- };
20
+ var propsNotForwarded = /* @__PURE__ */ new Set(["mobileScrollingBreakpoint", "variant", "spacing", "disableBreadcrumbGutter"]);
21
+ var defaultStyledOptions = { shouldForwardProp: (prop) => !propsNotForwarded.has(prop) };
36
22
  var WebAppBodyRoot = styled(FlexGrowCol, {
37
23
  ...defaultStyledOptions,
38
24
  name: WebAppBodyName,
39
25
  slot: "Root"
40
- })(({ spacing, theme, mobileScrollingBreakpoint = "sm", variant }) => {
26
+ })(({
27
+ spacing,
28
+ theme,
29
+ mobileScrollingBreakpoint = "sm",
30
+ variant
31
+ }) => {
41
32
  const scrollable = variant === "scrollable";
42
33
  return theme.unstable_sx({
43
34
  alignItems: "stretch",
@@ -46,30 +37,34 @@ var WebAppBodyRoot = styled(FlexGrowCol, {
46
37
  overflowX: "visible",
47
38
  overflowY: scrollable ? "scroll" : "hidden",
48
39
  paddingY: spacing,
49
- [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
50
- overflowY: "scroll"
51
- }
40
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: { overflowY: "scroll" }
52
41
  });
53
42
  });
54
43
  var WebAppBodyBreadcrumb = styled(FlexRow, {
55
44
  ...defaultStyledOptions,
56
45
  name: WebAppBodyName,
57
46
  slot: "Breadcrumb"
58
- })(({ theme, disableBreadcrumbGutter, spacing }) => theme.unstable_sx({
47
+ })(({
48
+ theme,
49
+ disableBreadcrumbGutter,
50
+ spacing
51
+ }) => theme.unstable_sx({
59
52
  justifyContent: "start",
60
53
  marginX: disableBreadcrumbGutter ? 0 : spacing
61
54
  }));
62
55
  var WebAppBodyScrollableWrapper = styled(FlexGrowCol, {
63
56
  name: WebAppBodyName,
64
57
  slot: "ScrollableWrapper"
65
- })(() => ({
66
- alignItems: "stretch"
67
- }));
58
+ })(() => ({ alignItems: "stretch" }));
68
59
  var WebAppBodyScrollable = styled(FlexGrowCol, {
69
60
  ...defaultStyledOptions,
70
61
  name: WebAppBodyName,
71
62
  slot: "Scrollable"
72
- })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
63
+ })(({
64
+ theme,
65
+ mobileScrollingBreakpoint = "sm",
66
+ variant
67
+ }) => {
73
68
  const props = variant === "scrollable" ? scrollableContent : fixedContent;
74
69
  return {
75
70
  ...props,
@@ -81,57 +76,68 @@ var WebAppBodyScrollable = styled(FlexGrowCol, {
81
76
  }
82
77
  };
83
78
  });
84
- var WebAppBody = /* @__PURE__ */ __name(({ children, breadcrumbs, disableBreadcrumbGutter, mobileScrollingBreakpoint, spacing = 1, variant, ...props }) => {
85
- return /* @__PURE__ */ React.createElement(WebAppBodyRoot, {
86
- mobileScrollingBreakpoint,
87
- spacing,
88
- variant,
89
- ...props
90
- }, breadcrumbs ? /* @__PURE__ */ React.createElement(WebAppBodyBreadcrumb, {
91
- disableBreadcrumbGutter,
92
- spacing
93
- }, breadcrumbs) : null, /* @__PURE__ */ React.createElement(WebAppBodyScrollableWrapper, null, /* @__PURE__ */ React.createElement(WebAppBodyScrollable, {
94
- mobileScrollingBreakpoint,
95
- variant
96
- }, children)));
97
- }, "WebAppBody");
79
+ var WebAppBody = ({
80
+ children,
81
+ breadcrumbs,
82
+ disableBreadcrumbGutter,
83
+ mobileScrollingBreakpoint,
84
+ spacing = 1,
85
+ variant,
86
+ ...props
87
+ }) => {
88
+ return /* @__PURE__ */ jsxs(WebAppBodyRoot, { mobileScrollingBreakpoint, spacing, variant, ...props, children: [
89
+ breadcrumbs ? /* @__PURE__ */ jsx(WebAppBodyBreadcrumb, { disableBreadcrumbGutter, spacing, children: breadcrumbs }) : null,
90
+ /* @__PURE__ */ jsx(WebAppBodyScrollableWrapper, { children: /* @__PURE__ */ jsx(WebAppBodyScrollable, { mobileScrollingBreakpoint, variant, children }) })
91
+ ] });
92
+ };
98
93
 
99
94
  // src/components/Chrome.tsx
100
95
  import { WebAppChrome } from "@xylabs/react-webapp";
101
96
  import { XyoApplicationAppBar } from "@xyo-network/react-appbar";
102
97
  import { Footer } from "@xyo-network/react-footer";
103
- import React2 from "react";
104
- var XyoWebAppChrome = /* @__PURE__ */ __name(({ ref, appbar, footer, footerElevation = 4, navigationType = "menu", ...props }) => {
105
- return /* @__PURE__ */ React2.createElement(WebAppChrome, {
106
- ref,
107
- appbar: appbar ?? /* @__PURE__ */ React2.createElement(XyoApplicationAppBar, null),
108
- footerElevation,
109
- navigationType,
110
- footer: footer ?? /* @__PURE__ */ React2.createElement(Footer, {
111
- dynamicHeight: true
112
- }),
113
- ...props
114
- });
115
- }, "XyoWebAppChrome");
98
+ import { jsx as jsx2 } from "react/jsx-runtime";
99
+ var XyoWebAppChrome = ({
100
+ ref,
101
+ appbar,
102
+ footer,
103
+ footerElevation = 4,
104
+ navigationType = "menu",
105
+ ...props
106
+ }) => {
107
+ return /* @__PURE__ */ jsx2(
108
+ WebAppChrome,
109
+ {
110
+ ref,
111
+ appbar: appbar ?? /* @__PURE__ */ jsx2(XyoApplicationAppBar, {}),
112
+ footerElevation,
113
+ navigationType,
114
+ footer: footer ?? /* @__PURE__ */ jsx2(Footer, { dynamicHeight: true }),
115
+ ...props
116
+ }
117
+ );
118
+ };
116
119
  XyoWebAppChrome.displayName = "XyoWebAppChrome";
117
120
 
118
121
  // src/components/ErrorPage.tsx
119
122
  import { ButtonEx } from "@xylabs/react-button";
120
- import React4 from "react";
121
123
 
122
124
  // src/components/Page.tsx
123
125
  import { Container, styled as styled2 } from "@mui/material";
124
126
  import { useAsyncEffect } from "@xylabs/react-async-effect";
125
127
  import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
126
128
  import { useUserEvents } from "@xylabs/react-pixel";
127
- import React3 from "react";
128
129
  import { Helmet } from "react-helmet";
129
130
  import { useLocation } from "react-router-dom";
131
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
130
132
  var WebAppPageRoot = styled2(FlexGrowCol2, {
131
133
  name: "WebAppPage",
132
- shouldForwardProp: /* @__PURE__ */ __name((propName) => propName !== "mobileScrollingBreakpoint" && propName !== "variant", "shouldForwardProp"),
134
+ shouldForwardProp: (propName) => propName !== "mobileScrollingBreakpoint" && propName !== "variant",
133
135
  slot: "Root"
134
- })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
136
+ })(({
137
+ theme,
138
+ mobileScrollingBreakpoint = "sm",
139
+ variant
140
+ }) => {
135
141
  const props = variant === "scrollable" ? scrollableWrap : fixedWrap;
136
142
  return {
137
143
  ...props,
@@ -144,69 +150,80 @@ var WebAppPageRoot = styled2(FlexGrowCol2, {
144
150
  }
145
151
  };
146
152
  });
147
- var WebAppPage = /* @__PURE__ */ __name(({ disableGutters, disableBreadcrumbGutter, title, container, children, breadcrumbs, mobileScrollingBreakpoint, variant = "scrollable", ...props }) => {
153
+ var WebAppPage = ({
154
+ disableGutters,
155
+ disableBreadcrumbGutter,
156
+ title,
157
+ container,
158
+ children,
159
+ breadcrumbs,
160
+ mobileScrollingBreakpoint,
161
+ variant = "scrollable",
162
+ ...props
163
+ }) => {
148
164
  const userEvents = useUserEvents();
149
165
  const { pathname } = useLocation();
150
- useAsyncEffect(async () => {
151
- await userEvents?.viewContent({
152
- name: title ?? "NodeBasePage",
153
- path: location.pathname
154
- });
155
- }, [
156
- pathname,
157
- title,
158
- userEvents
159
- ]);
160
- return /* @__PURE__ */ React3.createElement(WebAppPageRoot, {
161
- mobileScrollingBreakpoint,
162
- variant,
163
- ...props
164
- }, /* @__PURE__ */ React3.createElement(Helmet, {
165
- title
166
- }), container && container !== "none" ? /* @__PURE__ */ React3.createElement(Container, {
167
- disableGutters,
168
- style: {
169
- alignItems: "stretch",
170
- display: "flex",
171
- flexDirection: "column",
172
- flexGrow: 1,
173
- justifyContent: "flex-start"
166
+ useAsyncEffect(
167
+ async () => {
168
+ await userEvents?.viewContent({ name: title ?? "NodeBasePage", path: location.pathname });
174
169
  },
175
- maxWidth: container
176
- }, /* @__PURE__ */ React3.createElement(WebAppBody, {
177
- disableBreadcrumbGutter,
178
- breadcrumbs,
179
- mobileScrollingBreakpoint,
180
- variant,
181
- ...props
182
- }, children)) : /* @__PURE__ */ React3.createElement(WebAppBody, {
183
- disableBreadcrumbGutter,
184
- breadcrumbs,
185
- mobileScrollingBreakpoint,
186
- paddingX: disableGutters ? 0 : 1,
187
- variant,
188
- ...props
189
- }, children));
190
- }, "WebAppPage");
170
+ [pathname, title, userEvents]
171
+ );
172
+ return /* @__PURE__ */ jsxs2(WebAppPageRoot, { mobileScrollingBreakpoint, variant, ...props, children: [
173
+ /* @__PURE__ */ jsx3(Helmet, { title }),
174
+ container && container !== "none" ? /* @__PURE__ */ jsx3(
175
+ Container,
176
+ {
177
+ disableGutters,
178
+ style: {
179
+ alignItems: "stretch",
180
+ display: "flex",
181
+ flexDirection: "column",
182
+ flexGrow: 1,
183
+ justifyContent: "flex-start"
184
+ },
185
+ maxWidth: container,
186
+ children: /* @__PURE__ */ jsx3(
187
+ WebAppBody,
188
+ {
189
+ disableBreadcrumbGutter,
190
+ breadcrumbs,
191
+ mobileScrollingBreakpoint,
192
+ variant,
193
+ ...props,
194
+ children
195
+ }
196
+ )
197
+ }
198
+ ) : /* @__PURE__ */ jsx3(
199
+ WebAppBody,
200
+ {
201
+ disableBreadcrumbGutter,
202
+ breadcrumbs,
203
+ mobileScrollingBreakpoint,
204
+ paddingX: disableGutters ? 0 : 1,
205
+ variant,
206
+ ...props,
207
+ children
208
+ }
209
+ )
210
+ ] });
211
+ };
191
212
  var FlexPage = WebAppPage;
192
213
 
193
214
  // src/components/ErrorPage.tsx
194
- var WebAppErrorPage = /* @__PURE__ */ __name(({ error, ...props }) => /* @__PURE__ */ React4.createElement(WebAppPage, {
195
- title: "Oops! Something went wrong",
196
- ...props
197
- }, /* @__PURE__ */ React4.createElement("h1", null, "Oops! Something went wrong!"), /* @__PURE__ */ React4.createElement("p", null, `${error}`), /* @__PURE__ */ React4.createElement(ButtonEx, {
198
- href: "/",
199
- variant: "contained"
200
- }, "Homepage")), "WebAppErrorPage");
215
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
216
+ var WebAppErrorPage = ({ error, ...props }) => /* @__PURE__ */ jsxs3(WebAppPage, { title: "Oops! Something went wrong", ...props, children: [
217
+ /* @__PURE__ */ jsx4("h1", { children: "Oops! Something went wrong!" }),
218
+ /* @__PURE__ */ jsx4("p", { children: `${error}` }),
219
+ /* @__PURE__ */ jsx4(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })
220
+ ] });
201
221
  var ErrorPage = WebAppErrorPage;
202
222
 
203
223
  // src/components/NotFoundPage/Page.tsx
204
224
  import { NotFound } from "@xyo-network/react-shared";
205
- import React5 from "react";
206
- var WebAppNotFoundPage = /* @__PURE__ */ __name(({ title, ...props }) => /* @__PURE__ */ React5.createElement(WebAppPage, {
207
- title: title ?? "Sorry! Page Not Found",
208
- ...props
209
- }, /* @__PURE__ */ React5.createElement(NotFound, null)), "WebAppNotFoundPage");
225
+ import { jsx as jsx5 } from "react/jsx-runtime";
226
+ var WebAppNotFoundPage = ({ title, ...props }) => /* @__PURE__ */ jsx5(WebAppPage, { title: title ?? "Sorry! Page Not Found", ...props, children: /* @__PURE__ */ jsx5(NotFound, {}) });
210
227
  var NotFoundPage = WebAppNotFoundPage;
211
228
  export {
212
229
  ErrorPage,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/Body.tsx","../../src/components/lib/cssValues.ts","../../src/components/Chrome.tsx","../../src/components/ErrorPage.tsx","../../src/components/Page.tsx","../../src/components/NotFoundPage/Page.tsx"],"sourcesContent":["import type { Breakpoint } from '@mui/material'\nimport { styled } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { fixedContent, scrollableContent } from './lib/index.ts'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = new Set(['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter'])\nconst defaultStyledOptions = { shouldForwardProp: (prop: string) => !propsNotForwarded.has(prop) }\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({\n spacing, theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const scrollable = variant === 'scrollable'\n return theme.unstable_sx({\n alignItems: 'stretch',\n gap: 1,\n justifyContent: 'flex-start',\n overflowX: 'visible',\n overflowY: scrollable ? 'scroll' : 'hidden',\n paddingY: spacing,\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: { overflowY: 'scroll' },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({\n theme, disableBreadcrumbGutter, spacing,\n}) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }))\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({ alignItems: 'stretch' }))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableContent : fixedContent\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 'unset',\n position: 'relative',\n },\n }\n})\n\nexport interface WebAppBodyProps extends FlexBoxProps {\n breadcrumbs?: ReactNode\n disableBreadcrumbGutter?: boolean\n mobileScrollingBreakpoint?: Breakpoint\n spacing?: string | number\n variant?: 'scrollable' | 'fixed'\n}\n\nexport const WebAppBody: React.FC<WebAppBodyProps> = ({\n children,\n breadcrumbs,\n disableBreadcrumbGutter,\n mobileScrollingBreakpoint,\n spacing = 1,\n variant,\n ...props\n}) => {\n return (\n <WebAppBodyRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} spacing={spacing} variant={variant} {...props}>\n {breadcrumbs\n ? (\n <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n )\n : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n","import type { CSSProperties } from 'react'\n\nexport const scrollableWrap: CSSProperties = {\n inset: 0,\n position: 'absolute',\n} as const\n\nexport const fixedWrap: CSSProperties = {\n inset: 'unset',\n position: 'relative',\n} as const\n\n// Making a scrollable vs fixed wrapper and content is an inversion of the wrap and content styles\nexport const scrollableContent: CSSProperties = { ...fixedWrap } as const\n\nexport const fixedContent: CSSProperties = { ...scrollableWrap } as const\n","import { WebAppChrome, type WebAppChromeProps } from '@xylabs/react-webapp'\nimport { XyoApplicationAppBar } from '@xyo-network/react-appbar'\nimport { Footer } from '@xyo-network/react-footer'\nimport React from 'react'\n\nexport interface XyoWebAppChromeProps extends WebAppChromeProps {}\n\nexport const XyoWebAppChrome = ({\n ref, appbar, footer, footerElevation = 4, navigationType = 'menu', ...props\n}: XyoWebAppChromeProps) => {\n return (\n <WebAppChrome\n ref={ref}\n appbar={appbar ?? <XyoApplicationAppBar />}\n footerElevation={footerElevation}\n navigationType={navigationType}\n footer={footer ?? <Footer dynamicHeight />}\n {...props}\n />\n )\n}\n\nXyoWebAppChrome.displayName = 'XyoWebAppChrome'\n","import { ButtonEx } from '@xylabs/react-button'\nimport React from 'react'\n\nimport type { WebAppPageProps } from './Page.tsx'\nimport { WebAppPage } from './Page.tsx'\n\nexport interface WebAppErrorPageProps extends WebAppPageProps {\n error?: Error\n}\n\nexport const WebAppErrorPage: React.FC<WebAppErrorPageProps> = ({ error, ...props }) => (\n <WebAppPage title=\"Oops! Something went wrong\" {...props}>\n <h1>Oops! Something went wrong!</h1>\n <p>{`${error}`}</p>\n <ButtonEx href=\"/\" variant=\"contained\">\n Homepage\n </ButtonEx>\n </WebAppPage>\n)\n\n/** @deprecated use WebAppErrorPage instead */\nexport const ErrorPage = WebAppErrorPage\n","import type { ContainerProps } from '@mui/material'\nimport { Container, styled } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useUserEvents } from '@xylabs/react-pixel'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useLocation } from 'react-router-dom'\n\nimport type { WebAppBodyProps } from './Body.tsx'\nimport { WebAppBody } from './Body.tsx'\nimport { fixedWrap, scrollableWrap } from './lib/index.ts'\n\nconst WebAppPageRoot = styled(FlexGrowCol, {\n name: 'WebAppPage',\n shouldForwardProp: propName => propName !== 'mobileScrollingBreakpoint' && propName !== 'variant',\n slot: 'Root',\n})<WebAppPageProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableWrap : fixedWrap\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n maxWidth: '100vw',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 0,\n position: 'absolute',\n },\n }\n})\n\nexport interface WebAppPageProps extends WebAppBodyProps, FlexBoxProps {\n container?: ContainerProps['maxWidth'] | 'none'\n disableGutters?: boolean\n}\n\nexport const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>> = ({\n disableGutters,\n disableBreadcrumbGutter,\n title,\n container,\n children,\n breadcrumbs,\n mobileScrollingBreakpoint,\n variant = 'scrollable',\n ...props\n}) => {\n const userEvents = useUserEvents()\n const { pathname } = useLocation()\n\n useAsyncEffect(\n async () => {\n await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname })\n },\n [pathname, title, userEvents],\n )\n\n return (\n <WebAppPageRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant} {...props}>\n <Helmet title={title} />\n {container && container !== 'none'\n ? (\n <Container\n disableGutters={disableGutters}\n style={{\n alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start',\n }}\n maxWidth={container}\n >\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n </Container>\n )\n : (\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n paddingX={disableGutters ? 0 : 1}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n )}\n </WebAppPageRoot>\n )\n}\n\n/** @deprecated use WebAppPagePage instead */\nexport const FlexPage = WebAppPage\n","import { NotFound } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport type { WebAppPageProps } from '../Page.tsx'\nimport { WebAppPage } from '../Page.tsx'\n\nexport const WebAppNotFoundPage: React.FC<WebAppPageProps> = ({ title, ...props }) => (\n <WebAppPage title={title ?? 'Sorry! Page Not Found'} {...props}>\n <NotFound />\n </WebAppPage>\n)\n\n/** @deprecated use WebAppNotFoundPage instead */\nexport const NotFoundPage = WebAppNotFoundPage\n"],"mappings":";;;;AACA,SAASA,cAAc;AAEvB,SAASC,aAAaC,eAAe;AAErC,OAAOC,WAAW;;;ACHX,IAAMC,iBAAgC;EAC3CC,OAAO;EACPC,UAAU;AACZ;AAEO,IAAMC,YAA2B;EACtCF,OAAO;EACPC,UAAU;AACZ;AAGO,IAAME,oBAAmC;EAAE,GAAGD;AAAU;AAExD,IAAME,eAA8B;EAAE,GAAGL;AAAe;;;ADN/D,IAAMM,iBAAiB;AACvB,IAAMC,oBAAoB,oBAAIC,IAAI;EAAC;EAA6B;EAAW;EAAW;CAA0B;AAChH,IAAMC,uBAAuB;EAAEC,mBAAmB,wBAACC,SAAiB,CAACJ,kBAAkBK,IAAID,IAAAA,GAAzC;AAA+C;AAEjG,IAAME,iBAAiBC,OAAOC,aAAa;EACzC,GAAGN;EACHO,MAAMV;EACNW,MAAM;AACR,CAAA,EAAoB,CAAC,EACnBC,SAASC,OAAOC,4BAA4B,MAAMC,QAAO,MAC1D;AACC,QAAMC,aAAaD,YAAY;AAC/B,SAAOF,MAAMI,YAAY;IACvBC,Y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MC,eAAeN;","names":["styled","FlexGrowCol","FlexRow","React","scrollableWrap","inset","position","fixedWrap","scrollableContent","fixedContent","WebAppBodyName","propsNotForwarded","Set","defaultStyledOptions","shouldForwardProp","prop","has","WebAppBodyRoot","styled","FlexGrowCol","name","slot","spacing","theme","mobileScrollingBreakpoint","variant","scrollable","unstable_sx","alignItems","gap","justifyContent","overflowX","overflowY","paddingY","breakpoints","down","WebAppBodyBreadcrumb","FlexRow","disableBreadcrumbGutter","marginX","WebAppBodyScrollableWrapper","WebAppBodyScrollable","props","scrollableContent","fixedContent","inset","position","WebAppBody","children","breadcrumbs","WebAppChrome","XyoApplicationAppBar","Footer","React","XyoWebAppChrome","ref","appbar","footer","footerElevation","navigationType","props","React","WebAppChrome","XyoApplicationAppBar","Footer","dynamicHeight","displayName","ButtonEx","React","Container","styled","useAsyncEffect","FlexGrowCol","useUserEvents","React","Helmet","useLocation","WebAppPageRoot","styled","FlexGrowCol","name","shouldForwardProp","propName","slot","theme","mobileScrollingBreakpoint","variant","props","scrollableWrap","fixedWrap","alignItems","justifyContent","maxWidth","breakpoints","down","inset","position","WebAppPage","disableGutters","disableBreadcrumbGutter","title","container","children","breadcrumbs","userEvents","useUserEvents","pathname","useLocation","useAsyncEffect","viewContent","path","location","React","Helmet","Container","style","display","flexDirection","flexGrow","WebAppBody","paddingX","FlexPage","WebAppErrorPage","error","props","React","WebAppPage","title","h1","p","ButtonEx","href","variant","ErrorPage","NotFound","React","WebAppNotFoundPage","title","props","React","WebAppPage","NotFound","NotFoundPage"]}
1
+ {"version":3,"sources":["../../src/components/Body.tsx","../../src/components/lib/cssValues.ts","../../src/components/Chrome.tsx","../../src/components/ErrorPage.tsx","../../src/components/Page.tsx","../../src/components/NotFoundPage/Page.tsx"],"sourcesContent":["import type { Breakpoint } from '@mui/material'\nimport { styled } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { fixedContent, scrollableContent } from './lib/index.ts'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = new Set(['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter'])\nconst defaultStyledOptions = { shouldForwardProp: (prop: string) => !propsNotForwarded.has(prop) }\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({\n spacing, theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const scrollable = variant === 'scrollable'\n return theme.unstable_sx({\n alignItems: 'stretch',\n gap: 1,\n justifyContent: 'flex-start',\n overflowX: 'visible',\n overflowY: scrollable ? 'scroll' : 'hidden',\n paddingY: spacing,\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: { overflowY: 'scroll' },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({\n theme, disableBreadcrumbGutter, spacing,\n}) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }))\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({ alignItems: 'stretch' }))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableContent : fixedContent\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 'unset',\n position: 'relative',\n },\n }\n})\n\nexport interface WebAppBodyProps extends FlexBoxProps {\n breadcrumbs?: ReactNode\n disableBreadcrumbGutter?: boolean\n mobileScrollingBreakpoint?: Breakpoint\n spacing?: string | number\n variant?: 'scrollable' | 'fixed'\n}\n\nexport const WebAppBody: React.FC<WebAppBodyProps> = ({\n children,\n breadcrumbs,\n disableBreadcrumbGutter,\n mobileScrollingBreakpoint,\n spacing = 1,\n variant,\n ...props\n}) => {\n return (\n <WebAppBodyRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} spacing={spacing} variant={variant} {...props}>\n {breadcrumbs\n ? (\n <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n )\n : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n","import type { CSSProperties } from 'react'\n\nexport const scrollableWrap: CSSProperties = {\n inset: 0,\n position: 'absolute',\n} as const\n\nexport const fixedWrap: CSSProperties = {\n inset: 'unset',\n position: 'relative',\n} as const\n\n// Making a scrollable vs fixed wrapper and content is an inversion of the wrap and content styles\nexport const scrollableContent: CSSProperties = { ...fixedWrap } as const\n\nexport const fixedContent: CSSProperties = { ...scrollableWrap } as const\n","import { WebAppChrome, type WebAppChromeProps } from '@xylabs/react-webapp'\nimport { XyoApplicationAppBar } from '@xyo-network/react-appbar'\nimport { Footer } from '@xyo-network/react-footer'\nimport React from 'react'\n\nexport interface XyoWebAppChromeProps extends WebAppChromeProps {}\n\nexport const XyoWebAppChrome = ({\n ref, appbar, footer, footerElevation = 4, navigationType = 'menu', ...props\n}: XyoWebAppChromeProps) => {\n return (\n <WebAppChrome\n ref={ref}\n appbar={appbar ?? <XyoApplicationAppBar />}\n footerElevation={footerElevation}\n navigationType={navigationType}\n footer={footer ?? <Footer dynamicHeight />}\n {...props}\n />\n )\n}\n\nXyoWebAppChrome.displayName = 'XyoWebAppChrome'\n","import { ButtonEx } from '@xylabs/react-button'\nimport React from 'react'\n\nimport type { WebAppPageProps } from './Page.tsx'\nimport { WebAppPage } from './Page.tsx'\n\nexport interface WebAppErrorPageProps extends WebAppPageProps {\n error?: Error\n}\n\nexport const WebAppErrorPage: React.FC<WebAppErrorPageProps> = ({ error, ...props }) => (\n <WebAppPage title=\"Oops! Something went wrong\" {...props}>\n <h1>Oops! Something went wrong!</h1>\n <p>{`${error}`}</p>\n <ButtonEx href=\"/\" variant=\"contained\">\n Homepage\n </ButtonEx>\n </WebAppPage>\n)\n\n/** @deprecated use WebAppErrorPage instead */\nexport const ErrorPage = WebAppErrorPage\n","import type { ContainerProps } from '@mui/material'\nimport { Container, styled } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useUserEvents } from '@xylabs/react-pixel'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useLocation } from 'react-router-dom'\n\nimport type { WebAppBodyProps } from './Body.tsx'\nimport { WebAppBody } from './Body.tsx'\nimport { fixedWrap, scrollableWrap } from './lib/index.ts'\n\nconst WebAppPageRoot = styled(FlexGrowCol, {\n name: 'WebAppPage',\n shouldForwardProp: propName => propName !== 'mobileScrollingBreakpoint' && propName !== 'variant',\n slot: 'Root',\n})<WebAppPageProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableWrap : fixedWrap\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n maxWidth: '100vw',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 0,\n position: 'absolute',\n },\n }\n})\n\nexport interface WebAppPageProps extends WebAppBodyProps, FlexBoxProps {\n container?: ContainerProps['maxWidth'] | 'none'\n disableGutters?: boolean\n}\n\nexport const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>> = ({\n disableGutters,\n disableBreadcrumbGutter,\n title,\n container,\n children,\n breadcrumbs,\n mobileScrollingBreakpoint,\n variant = 'scrollable',\n ...props\n}) => {\n const userEvents = useUserEvents()\n const { pathname } = useLocation()\n\n useAsyncEffect(\n async () => {\n await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname })\n },\n [pathname, title, userEvents],\n )\n\n return (\n <WebAppPageRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant} {...props}>\n <Helmet title={title} />\n {container && container !== 'none'\n ? (\n <Container\n disableGutters={disableGutters}\n style={{\n alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start',\n }}\n maxWidth={container}\n >\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n </Container>\n )\n : (\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n paddingX={disableGutters ? 0 : 1}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n )}\n </WebAppPageRoot>\n )\n}\n\n/** @deprecated use WebAppPagePage instead */\nexport const FlexPage = WebAppPage\n","import { NotFound } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport type { WebAppPageProps } from '../Page.tsx'\nimport { WebAppPage } from '../Page.tsx'\n\nexport const WebAppNotFoundPage: React.FC<WebAppPageProps> = ({ title, ...props }) => (\n <WebAppPage title={title ?? 'Sorry! Page Not Found'} {...props}>\n <NotFound />\n </WebAppPage>\n)\n\n/** @deprecated use WebAppNotFoundPage instead */\nexport const NotFoundPage = WebAppNotFoundPage\n"],"mappings":";AACA,SAAS,cAAc;AAEvB,SAAS,aAAa,eAAe;;;ACD9B,IAAM,iBAAgC;AAAA,EAC3C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,0BAAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACC,GAAG;AAAA,YAEH;AAAA;AAAA,QACH;AAAA;AAAA,IACF,IAGA,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,iBAAiB,IAAI;AAAA,QAC/B;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,KAER;AAEJ;AAGO,IAAM,WAAW;;;AD1FtB,SACE,OAAAI,MADF,QAAAC,aAAA;AADK,IAAM,kBAAkD,CAAC,EAAE,OAAO,GAAG,MAAM,MAChF,gBAAAA,MAAC,cAAW,OAAM,8BAA8B,GAAG,OACjD;AAAA,kBAAAD,KAAC,QAAG,yCAA2B;AAAA,EAC/B,gBAAAA,KAAC,OAAG,aAAG,KAAK,IAAG;AAAA,EACf,gBAAAA,KAAC,YAAS,MAAK,KAAI,SAAQ,aAAY,sBAEvC;AAAA,GACF;AAIK,IAAM,YAAY;;;AErBzB,SAAS,gBAAgB;AAQrB,gBAAAE,YAAA;AAFG,IAAM,qBAAgD,CAAC,EAAE,OAAO,GAAG,MAAM,MAC9E,gBAAAA,KAAC,cAAW,OAAO,SAAS,yBAA0B,GAAG,OACvD,0BAAAA,KAAC,YAAS,GACZ;AAIK,IAAM,eAAe;","names":["jsx","styled","FlexGrowCol","jsx","jsxs","styled","FlexGrowCol","jsx","jsxs","jsx"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/react-webapp",
3
- "version": "7.5.7",
3
+ "version": "7.5.11",
4
4
  "description": "Common React library for all XYO projects that use React",
5
5
  "keywords": [
6
6
  "xyo",
@@ -36,54 +36,127 @@
36
36
  },
37
37
  "./package.json": "./package.json"
38
38
  },
39
- "module": "dist/browser/index.mjs",
40
- "types": "dist/browser/index.d.ts",
41
39
  "files": [
42
40
  "dist",
43
- "src"
41
+ "README.md"
44
42
  ],
45
43
  "dependencies": {
46
- "@mui/material": "~7.3.9",
47
- "@xylabs/react-async-effect": "~7.1.17",
48
- "@xylabs/react-button": "~7.1.17",
49
- "@xylabs/react-flexbox": "~7.1.17",
50
- "@xylabs/react-pixel": "~7.1.17",
51
- "@xylabs/react-webapp": "~7.1.17",
52
- "@xyo-network/react-appbar": "7.5.7",
53
- "@xyo-network/react-footer": "7.5.7",
54
- "@xyo-network/react-shared": "7.5.7",
55
- "react": "^19.2.4",
56
- "react-helmet": "~6.1.0",
57
- "react-router-dom": "^7.13.2"
44
+ "@xyo-network/react-appbar": "~7.5.11",
45
+ "@xyo-network/react-shared": "~7.5.11",
46
+ "@xyo-network/react-footer": "~7.5.11"
58
47
  },
59
48
  "devDependencies": {
60
- "@mui/icons-material": "~7.3.9",
61
- "@storybook/react-vite": "~10.3.3",
49
+ "@bitauth/libauth": "~3.0.0",
50
+ "@mui/icons-material": "^7.3.10",
51
+ "@mui/material": "^7.3.10",
52
+ "@opentelemetry/api": "^1.9.1",
53
+ "@opentelemetry/sdk-trace-base": "^2.7.0",
54
+ "@scure/base": "~2.2.0",
55
+ "@storybook/react-vite": "~10.3.5",
56
+ "@types/node": "~25.6.0",
62
57
  "@types/react": "^19.2.14",
63
58
  "@types/react-helmet": "~6.1.11",
64
- "@xylabs/react-appbar": "~7.1.17",
65
- "@xylabs/react-button": "~7.1.17",
66
- "@xylabs/react-flexbox": "~7.1.17",
67
- "@xylabs/react-link": "~7.1.17",
68
- "@xylabs/react-pixel": "~7.1.17",
69
- "@xylabs/ts-scripts-common": "~7.5.6",
70
- "@xylabs/ts-scripts-yarn3": "~7.5.6",
71
- "@xylabs/tsconfig": "~7.5.6",
72
- "@xylabs/tsconfig-dom": "~7.5.6",
73
- "@xylabs/tsconfig-react": "~7.5.6",
74
- "react-dom": "^19.2.4",
75
- "storybook": "~10.3.3",
59
+ "@xylabs/react-appbar": "~7.1.20",
60
+ "@xylabs/react-async-effect": "~7.1.20",
61
+ "@xylabs/react-button": "~7.1.20",
62
+ "@xylabs/react-dialogs": "~7.1.20",
63
+ "@xylabs/react-flexbox": "~7.1.20",
64
+ "@xylabs/react-hooks": "~7.1.20",
65
+ "@xylabs/react-link": "~7.1.20",
66
+ "@xylabs/react-pixel": "~7.1.20",
67
+ "@xylabs/react-promise": "~7.1.20",
68
+ "@xylabs/react-quick-tip-button": "~7.1.20",
69
+ "@xylabs/react-select": "~7.1.20",
70
+ "@xylabs/react-shared": "~7.1.20",
71
+ "@xylabs/react-theme": "~7.1.20",
72
+ "@xylabs/react-webapp": "~7.1.20",
73
+ "@xylabs/sdk-js": "^5.0.100",
74
+ "@xylabs/threads": "~5.0.100",
75
+ "@xylabs/toolchain": "~7.11.9",
76
+ "@xylabs/tsconfig": "^7.11.9",
77
+ "@xylabs/tsconfig-dom": "^7.11.9",
78
+ "@xylabs/tsconfig-react": "~7.11.9",
79
+ "@xylabs/zod": "~5.0.100",
80
+ "@xyo-network/boundwitness-model": "^5.5.1",
81
+ "@xyo-network/boundwitness-validator": "^5.5.1",
82
+ "@xyo-network/network": "~5.5.1",
83
+ "@xyo-network/payload-builder": "^5.5.1",
84
+ "@xyo-network/payload-model": "^5.5.1",
85
+ "async-mutex": "^0.5.0",
86
+ "axios": "^1.15.2",
87
+ "bn.js": "^5.2.3",
88
+ "bowser": "^2.14.1",
89
+ "buffer": "^6.0.3",
90
+ "chalk": "^5.6.2",
91
+ "debug": "~4.4.3",
92
+ "esbuild": "~0.28.0",
93
+ "eslint": "^10.2.1",
94
+ "ethers": "^6.16.0",
95
+ "fast-deep-equal": "~3.1.3",
96
+ "hash-wasm": "~4.12.0",
97
+ "js-cookie": "~3.0.5",
98
+ "observable-fns": "~0.6.1",
99
+ "pako": "^2.1.0",
100
+ "react": "^19.2.5",
101
+ "react-dom": "^19.2.5",
102
+ "react-helmet": "~6.1.0",
103
+ "react-icons": "~5.6.0",
104
+ "react-is": "^19.2.5",
105
+ "react-router-dom": "^7.14.2",
106
+ "spark-md5": "~3.0.2",
107
+ "storybook": "^10.3.5",
76
108
  "typescript": "^5.9.3",
77
- "vite": "~8.0.3",
109
+ "vite": "^8.0.10",
110
+ "wasm-feature-detect": "~1.8.0",
78
111
  "zod": "^4.3.6"
79
112
  },
80
113
  "peerDependencies": {
81
- "@mui/icons-material": ">=6 <8",
82
- "react-dom": "^19",
83
- "zod": "^4"
114
+ "@mui/icons-material": "^7.3.10",
115
+ "@mui/material": "^7.3.10",
116
+ "@opentelemetry/api": "^1.9.1",
117
+ "@opentelemetry/sdk-trace-base": "^2.7.0",
118
+ "@scure/base": "~2.2.0",
119
+ "@xylabs/react-appbar": "~7.1.20",
120
+ "@xylabs/react-async-effect": "~7.1.20",
121
+ "@xylabs/react-button": "~7.1.20",
122
+ "@xylabs/react-flexbox": "~7.1.20",
123
+ "@xylabs/react-hooks": "~7.1.20",
124
+ "@xylabs/react-link": "~7.1.20",
125
+ "@xylabs/react-pixel": "~7.1.20",
126
+ "@xylabs/react-promise": "~7.1.20",
127
+ "@xylabs/react-quick-tip-button": "~7.1.20",
128
+ "@xylabs/react-select": "~7.1.20",
129
+ "@xylabs/react-shared": "~7.1.20",
130
+ "@xylabs/react-theme": "~7.1.20",
131
+ "@xylabs/react-webapp": "~7.1.20",
132
+ "@xylabs/sdk-js": "^5.0.100",
133
+ "@xylabs/zod": "~5.0.100",
134
+ "@xyo-network/boundwitness-model": "^5.5.1",
135
+ "@xyo-network/boundwitness-validator": "^5.5.1",
136
+ "@xyo-network/network": "~5.5.1",
137
+ "@xyo-network/payload-builder": "^5.5.1",
138
+ "@xyo-network/payload-model": "^5.5.1",
139
+ "async-mutex": "^0.5.0",
140
+ "axios": "^1.15.2",
141
+ "bn.js": "^5.2.3",
142
+ "bowser": "^2.14.1",
143
+ "buffer": "^6.0.3",
144
+ "chalk": "^5.6.2",
145
+ "ethers": "^6.16.0",
146
+ "fast-deep-equal": "~3.1.3",
147
+ "js-cookie": "~3.0.5",
148
+ "pako": "^2.1.0",
149
+ "react": "^19.2.5",
150
+ "react-dom": "^19.2.5",
151
+ "react-helmet": "~6.1.0",
152
+ "react-icons": "~5.6.0",
153
+ "react-is": "^19.2.5",
154
+ "react-router-dom": "^7.14.2",
155
+ "spark-md5": "~3.0.2",
156
+ "zod": "^4.3.6"
84
157
  },
85
158
  "publishConfig": {
86
159
  "access": "public"
87
160
  },
88
161
  "docs": "dist/docs.json"
89
- }
162
+ }
@@ -1,102 +0,0 @@
1
- import type { Breakpoint } from '@mui/material'
2
- import { styled } from '@mui/material'
3
- import type { FlexBoxProps } from '@xylabs/react-flexbox'
4
- import { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'
5
- import type { ReactNode } from 'react'
6
- import React from 'react'
7
-
8
- import { fixedContent, scrollableContent } from './lib/index.ts'
9
-
10
- const WebAppBodyName = 'WebAppBody'
11
- const propsNotForwarded = new Set(['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter'])
12
- const defaultStyledOptions = { shouldForwardProp: (prop: string) => !propsNotForwarded.has(prop) }
13
-
14
- const WebAppBodyRoot = styled(FlexGrowCol, {
15
- ...defaultStyledOptions,
16
- name: WebAppBodyName,
17
- slot: 'Root',
18
- })<WebAppBodyProps>(({
19
- spacing, theme, mobileScrollingBreakpoint = 'sm', variant,
20
- }) => {
21
- const scrollable = variant === 'scrollable'
22
- return theme.unstable_sx({
23
- alignItems: 'stretch',
24
- gap: 1,
25
- justifyContent: 'flex-start',
26
- overflowX: 'visible',
27
- overflowY: scrollable ? 'scroll' : 'hidden',
28
- paddingY: spacing,
29
- [theme.breakpoints.down(mobileScrollingBreakpoint)]: { overflowY: 'scroll' },
30
- })
31
- })
32
-
33
- const WebAppBodyBreadcrumb = styled(FlexRow, {
34
- ...defaultStyledOptions,
35
- name: WebAppBodyName,
36
- slot: 'Breadcrumb',
37
- })<WebAppBodyProps>(({
38
- theme, disableBreadcrumbGutter, spacing,
39
- }) =>
40
- theme.unstable_sx({
41
- justifyContent: 'start',
42
- marginX: disableBreadcrumbGutter ? 0 : spacing,
43
- }))
44
-
45
- const WebAppBodyScrollableWrapper = styled(FlexGrowCol, {
46
- name: WebAppBodyName,
47
- slot: 'ScrollableWrapper',
48
- })<WebAppBodyProps>(() => ({ alignItems: 'stretch' }))
49
-
50
- const WebAppBodyScrollable = styled(FlexGrowCol, {
51
- ...defaultStyledOptions,
52
- name: WebAppBodyName,
53
- slot: 'Scrollable',
54
- })<WebAppBodyProps>(({
55
- theme, mobileScrollingBreakpoint = 'sm', variant,
56
- }) => {
57
- const props = variant === 'scrollable' ? scrollableContent : fixedContent
58
- return {
59
- ...props,
60
- alignItems: 'stretch',
61
- justifyContent: 'start',
62
- [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
63
- inset: 'unset',
64
- position: 'relative',
65
- },
66
- }
67
- })
68
-
69
- export interface WebAppBodyProps extends FlexBoxProps {
70
- breadcrumbs?: ReactNode
71
- disableBreadcrumbGutter?: boolean
72
- mobileScrollingBreakpoint?: Breakpoint
73
- spacing?: string | number
74
- variant?: 'scrollable' | 'fixed'
75
- }
76
-
77
- export const WebAppBody: React.FC<WebAppBodyProps> = ({
78
- children,
79
- breadcrumbs,
80
- disableBreadcrumbGutter,
81
- mobileScrollingBreakpoint,
82
- spacing = 1,
83
- variant,
84
- ...props
85
- }) => {
86
- return (
87
- <WebAppBodyRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} spacing={spacing} variant={variant} {...props}>
88
- {breadcrumbs
89
- ? (
90
- <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>
91
- {breadcrumbs}
92
- </WebAppBodyBreadcrumb>
93
- )
94
- : null}
95
- <WebAppBodyScrollableWrapper>
96
- <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>
97
- {children}
98
- </WebAppBodyScrollable>
99
- </WebAppBodyScrollableWrapper>
100
- </WebAppBodyRoot>
101
- )
102
- }
@@ -1,71 +0,0 @@
1
- import { Breadcrumbs, List } from '@mui/material'
2
- import type { Meta, StoryFn } from '@storybook/react-vite'
3
- import { MenuListItemContainer } from '@xylabs/react-appbar'
4
- import { FlexRow } from '@xylabs/react-flexbox'
5
- import { LinkEx } from '@xylabs/react-link'
6
- import React from 'react'
7
- import { BrowserRouter } from 'react-router-dom'
8
-
9
- import { XyoWebAppChrome } from './Chrome.tsx'
10
- import type { WebAppPageProps } from './Page.tsx'
11
- import { WebAppPage } from './Page.tsx'
12
-
13
- const StorybookEntry = {
14
- argTypes: {},
15
- component: XyoWebAppChrome,
16
- parameters: { docs: { page: null } },
17
- title: 'webapp/XyoWebAppChrome',
18
- } as Meta<typeof XyoWebAppChrome>
19
-
20
- const rowArray = [32, 64, 128, 256, 512, 1024]
21
-
22
- const Children: React.FC<WebAppPageProps> = props => (
23
- <WebAppPage
24
- breadcrumbs={(
25
- <Breadcrumbs>
26
- <LinkEx>BreadCrumbs</LinkEx>
27
- </Breadcrumbs>
28
- )}
29
- {...props}
30
- >
31
- {rowArray.map((height) => {
32
- return (
33
- <FlexRow key={height} height={height}>
34
- {height}
35
- </FlexRow>
36
- )
37
- })}
38
- </WebAppPage>
39
- )
40
-
41
- const Template: StoryFn<typeof XyoWebAppChrome> = (args) => {
42
- return (
43
- <BrowserRouter>
44
- <XyoWebAppChrome
45
- menuItems={(
46
- <List>
47
- <MenuListItemContainer primary="Hello" />
48
- </List>
49
- )}
50
- height="calc(100vh - 2rem)"
51
- {...args}
52
- >
53
- </XyoWebAppChrome>
54
- </BrowserRouter>
55
- )
56
- }
57
-
58
- const Default = Template.bind({})
59
- Default.args = {}
60
-
61
- const DefaultSideBar = Template.bind({})
62
- DefaultSideBar.args = { children: <Children />, navigationType: 'sidebar' }
63
-
64
- const WithFixedSizePage = Template.bind({})
65
- WithFixedSizePage.args = { children: <Children variant="fixed" />, navigationType: 'sidebar' }
66
-
67
- export {
68
- Default, DefaultSideBar, WithFixedSizePage,
69
- }
70
-
71
- export default StorybookEntry
@@ -1,23 +0,0 @@
1
- import { WebAppChrome, type WebAppChromeProps } from '@xylabs/react-webapp'
2
- import { XyoApplicationAppBar } from '@xyo-network/react-appbar'
3
- import { Footer } from '@xyo-network/react-footer'
4
- import React from 'react'
5
-
6
- export interface XyoWebAppChromeProps extends WebAppChromeProps {}
7
-
8
- export const XyoWebAppChrome = ({
9
- ref, appbar, footer, footerElevation = 4, navigationType = 'menu', ...props
10
- }: XyoWebAppChromeProps) => {
11
- return (
12
- <WebAppChrome
13
- ref={ref}
14
- appbar={appbar ?? <XyoApplicationAppBar />}
15
- footerElevation={footerElevation}
16
- navigationType={navigationType}
17
- footer={footer ?? <Footer dynamicHeight />}
18
- {...props}
19
- />
20
- )
21
- }
22
-
23
- XyoWebAppChrome.displayName = 'XyoWebAppChrome'
@@ -1,22 +0,0 @@
1
- import { ButtonEx } from '@xylabs/react-button'
2
- import React from 'react'
3
-
4
- import type { WebAppPageProps } from './Page.tsx'
5
- import { WebAppPage } from './Page.tsx'
6
-
7
- export interface WebAppErrorPageProps extends WebAppPageProps {
8
- error?: Error
9
- }
10
-
11
- export const WebAppErrorPage: React.FC<WebAppErrorPageProps> = ({ error, ...props }) => (
12
- <WebAppPage title="Oops! Something went wrong" {...props}>
13
- <h1>Oops! Something went wrong!</h1>
14
- <p>{`${error}`}</p>
15
- <ButtonEx href="/" variant="contained">
16
- Homepage
17
- </ButtonEx>
18
- </WebAppPage>
19
- )
20
-
21
- /** @deprecated use WebAppErrorPage instead */
22
- export const ErrorPage = WebAppErrorPage
@@ -1,21 +0,0 @@
1
- import type { Meta, StoryFn } from '@storybook/react-vite'
2
- import { NotFound } from '@xyo-network/react-shared'
3
- import React from 'react'
4
-
5
- const StorybookEntry = {
6
- argTypes: {},
7
- component: NotFound,
8
- parameters: { docs: { page: null } },
9
- title: 'webapp/NotFound',
10
- } as Meta<typeof NotFound>
11
-
12
- const Template: StoryFn<typeof NotFound> = () => {
13
- return <NotFound />
14
- }
15
-
16
- const Default = Template.bind({})
17
- Default.args = {}
18
-
19
- export { Default }
20
-
21
- export default StorybookEntry
@@ -1,14 +0,0 @@
1
- import { NotFound } from '@xyo-network/react-shared'
2
- import React from 'react'
3
-
4
- import type { WebAppPageProps } from '../Page.tsx'
5
- import { WebAppPage } from '../Page.tsx'
6
-
7
- export const WebAppNotFoundPage: React.FC<WebAppPageProps> = ({ title, ...props }) => (
8
- <WebAppPage title={title ?? 'Sorry! Page Not Found'} {...props}>
9
- <NotFound />
10
- </WebAppPage>
11
- )
12
-
13
- /** @deprecated use WebAppNotFoundPage instead */
14
- export const NotFoundPage = WebAppNotFoundPage
@@ -1 +0,0 @@
1
- export * from './Page.tsx'
@@ -1,102 +0,0 @@
1
- import type { ContainerProps } from '@mui/material'
2
- import { Container, styled } from '@mui/material'
3
- import { useAsyncEffect } from '@xylabs/react-async-effect'
4
- import type { FlexBoxProps } from '@xylabs/react-flexbox'
5
- import { FlexGrowCol } from '@xylabs/react-flexbox'
6
- import { useUserEvents } from '@xylabs/react-pixel'
7
- import type { PropsWithChildren } from 'react'
8
- import React from 'react'
9
- import { Helmet } from 'react-helmet'
10
- import { useLocation } from 'react-router-dom'
11
-
12
- import type { WebAppBodyProps } from './Body.tsx'
13
- import { WebAppBody } from './Body.tsx'
14
- import { fixedWrap, scrollableWrap } from './lib/index.ts'
15
-
16
- const WebAppPageRoot = styled(FlexGrowCol, {
17
- name: 'WebAppPage',
18
- shouldForwardProp: propName => propName !== 'mobileScrollingBreakpoint' && propName !== 'variant',
19
- slot: 'Root',
20
- })<WebAppPageProps>(({
21
- theme, mobileScrollingBreakpoint = 'sm', variant,
22
- }) => {
23
- const props = variant === 'scrollable' ? scrollableWrap : fixedWrap
24
- return {
25
- ...props,
26
- alignItems: 'stretch',
27
- justifyContent: 'start',
28
- maxWidth: '100vw',
29
- [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
30
- inset: 0,
31
- position: 'absolute',
32
- },
33
- }
34
- })
35
-
36
- export interface WebAppPageProps extends WebAppBodyProps, FlexBoxProps {
37
- container?: ContainerProps['maxWidth'] | 'none'
38
- disableGutters?: boolean
39
- }
40
-
41
- export const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>> = ({
42
- disableGutters,
43
- disableBreadcrumbGutter,
44
- title,
45
- container,
46
- children,
47
- breadcrumbs,
48
- mobileScrollingBreakpoint,
49
- variant = 'scrollable',
50
- ...props
51
- }) => {
52
- const userEvents = useUserEvents()
53
- const { pathname } = useLocation()
54
-
55
- useAsyncEffect(
56
- async () => {
57
- await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname })
58
- },
59
- [pathname, title, userEvents],
60
- )
61
-
62
- return (
63
- <WebAppPageRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant} {...props}>
64
- <Helmet title={title} />
65
- {container && container !== 'none'
66
- ? (
67
- <Container
68
- disableGutters={disableGutters}
69
- style={{
70
- alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start',
71
- }}
72
- maxWidth={container}
73
- >
74
- <WebAppBody
75
- disableBreadcrumbGutter={disableBreadcrumbGutter}
76
- breadcrumbs={breadcrumbs}
77
- mobileScrollingBreakpoint={mobileScrollingBreakpoint}
78
- variant={variant}
79
- {...props}
80
- >
81
- {children}
82
- </WebAppBody>
83
- </Container>
84
- )
85
- : (
86
- <WebAppBody
87
- disableBreadcrumbGutter={disableBreadcrumbGutter}
88
- breadcrumbs={breadcrumbs}
89
- mobileScrollingBreakpoint={mobileScrollingBreakpoint}
90
- paddingX={disableGutters ? 0 : 1}
91
- variant={variant}
92
- {...props}
93
- >
94
- {children}
95
- </WebAppBody>
96
- )}
97
- </WebAppPageRoot>
98
- )
99
- }
100
-
101
- /** @deprecated use WebAppPagePage instead */
102
- export const FlexPage = WebAppPage
@@ -1,5 +0,0 @@
1
- export * from './Body.tsx'
2
- export * from './Chrome.tsx'
3
- export * from './ErrorPage.tsx'
4
- export * from './NotFoundPage/index.ts'
5
- export * from './Page.tsx'
@@ -1,16 +0,0 @@
1
- import type { CSSProperties } from 'react'
2
-
3
- export const scrollableWrap: CSSProperties = {
4
- inset: 0,
5
- position: 'absolute',
6
- } as const
7
-
8
- export const fixedWrap: CSSProperties = {
9
- inset: 'unset',
10
- position: 'relative',
11
- } as const
12
-
13
- // Making a scrollable vs fixed wrapper and content is an inversion of the wrap and content styles
14
- export const scrollableContent: CSSProperties = { ...fixedWrap } as const
15
-
16
- export const fixedContent: CSSProperties = { ...scrollableWrap } as const
@@ -1 +0,0 @@
1
- export * from './cssValues.ts'
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components/index.ts'