@xyo-network/react-embed 5.3.0 → 5.3.1

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.
Files changed (40) hide show
  1. package/dist/browser/index.mjs +8 -8
  2. package/dist/browser/index.mjs.map +1 -1
  3. package/dist/types/contexts/EmbedPluginContext/Context.d.ts +6 -2
  4. package/dist/types/contexts/EmbedPluginContext/Context.d.ts.map +1 -1
  5. package/dist/types/contexts/EmbedPluginContext/State.d.ts +4 -3
  6. package/dist/types/contexts/EmbedPluginContext/State.d.ts.map +1 -1
  7. package/dist/types/contexts/EmbedPluginContext/use.d.ts +6 -1
  8. package/dist/types/contexts/EmbedPluginContext/use.d.ts.map +1 -1
  9. package/dist/types/contexts/RefreshPayloadContext/Context.d.ts +7 -2
  10. package/dist/types/contexts/RefreshPayloadContext/Context.d.ts.map +1 -1
  11. package/dist/types/contexts/RefreshPayloadContext/State.d.ts +3 -3
  12. package/dist/types/contexts/RefreshPayloadContext/State.d.ts.map +1 -1
  13. package/dist/types/contexts/RefreshPayloadContext/use.d.ts +7 -1
  14. package/dist/types/contexts/RefreshPayloadContext/use.d.ts.map +1 -1
  15. package/dist/types/contexts/ResolvePayloadContext/Context.d.ts +11 -2
  16. package/dist/types/contexts/ResolvePayloadContext/Context.d.ts.map +1 -1
  17. package/dist/types/contexts/ResolvePayloadContext/State.d.ts +3 -3
  18. package/dist/types/contexts/ResolvePayloadContext/State.d.ts.map +1 -1
  19. package/dist/types/contexts/ResolvePayloadContext/use.d.ts +11 -1
  20. package/dist/types/contexts/ResolvePayloadContext/use.d.ts.map +1 -1
  21. package/dist/types/contexts/ValidatePayloadContext/Context.d.ts +7 -2
  22. package/dist/types/contexts/ValidatePayloadContext/Context.d.ts.map +1 -1
  23. package/dist/types/contexts/ValidatePayloadContext/State.d.ts +3 -3
  24. package/dist/types/contexts/ValidatePayloadContext/State.d.ts.map +1 -1
  25. package/dist/types/contexts/ValidatePayloadContext/use.d.ts +7 -1
  26. package/dist/types/contexts/ValidatePayloadContext/use.d.ts.map +1 -1
  27. package/package.json +5 -5
  28. package/src/contexts/EmbedPluginContext/Context.ts +1 -1
  29. package/src/contexts/EmbedPluginContext/State.ts +4 -3
  30. package/src/contexts/EmbedPluginContext/use.ts +1 -1
  31. package/src/contexts/RefreshPayloadContext/Context.ts +1 -1
  32. package/src/contexts/RefreshPayloadContext/State.ts +3 -3
  33. package/src/contexts/RefreshPayloadContext/use.ts +1 -1
  34. package/src/contexts/ResolvePayloadContext/Context.ts +1 -1
  35. package/src/contexts/ResolvePayloadContext/State.ts +3 -3
  36. package/src/contexts/ResolvePayloadContext/use.ts +1 -1
  37. package/src/contexts/ValidatePayloadContext/Context.ts +1 -1
  38. package/src/contexts/ValidatePayloadContext/Provider.stories.tsx +14 -11
  39. package/src/contexts/ValidatePayloadContext/State.ts +3 -3
  40. package/src/contexts/ValidatePayloadContext/use.ts +1 -1
@@ -18,7 +18,7 @@ import { FlexRow } from "@xylabs/react-flexbox";
18
18
  import React8 from "react";
19
19
 
20
20
  // src/contexts/EmbedPluginContext/Context.ts
21
- import { createContextEx } from "@xyo-network/react-shared";
21
+ import { createContextEx } from "@xylabs/react-shared";
22
22
  var EmbedPluginContext = createContextEx();
23
23
 
24
24
  // src/contexts/EmbedPluginContext/Provider.tsx
@@ -41,14 +41,14 @@ var EmbedPluginProvider = /* @__PURE__ */ __name(({ children, refreshTitle, time
41
41
  }, "EmbedPluginProvider");
42
42
 
43
43
  // src/contexts/EmbedPluginContext/use.ts
44
- import { useContextEx } from "@xyo-network/react-shared";
44
+ import { useContextEx } from "@xylabs/react-shared";
45
45
  var useEmbedPluginState = /* @__PURE__ */ __name(() => useContextEx(EmbedPluginContext, "EmbedPlugin", true), "useEmbedPluginState");
46
46
 
47
47
  // src/contexts/RefreshPayloadContext/Provider.tsx
48
48
  import React3, { useState } from "react";
49
49
 
50
50
  // src/contexts/RefreshPayloadContext/Context.ts
51
- import { createContextEx as createContextEx2 } from "@xyo-network/react-shared";
51
+ import { createContextEx as createContextEx2 } from "@xylabs/react-shared";
52
52
  var RefreshPayloadContext = createContextEx2();
53
53
 
54
54
  // src/contexts/RefreshPayloadContext/Provider.tsx
@@ -68,11 +68,11 @@ var RefreshPayloadProvider = /* @__PURE__ */ __name(({ children, onRefresh, refr
68
68
  }, "RefreshPayloadProvider");
69
69
 
70
70
  // src/contexts/RefreshPayloadContext/use.ts
71
- import { useContextEx as useContextEx2 } from "@xyo-network/react-shared";
71
+ import { useContextEx as useContextEx2 } from "@xylabs/react-shared";
72
72
  var useRefreshPayload = /* @__PURE__ */ __name(() => useContextEx2(RefreshPayloadContext, "RefreshPayload", true), "useRefreshPayload");
73
73
 
74
74
  // src/contexts/ResolvePayloadContext/Context.ts
75
- import { createContextEx as createContextEx3 } from "@xyo-network/react-shared";
75
+ import { createContextEx as createContextEx3 } from "@xylabs/react-shared";
76
76
  var ResolvePayloadContext = createContextEx3();
77
77
 
78
78
  // src/contexts/ResolvePayloadContext/Provider.tsx
@@ -146,7 +146,7 @@ var ResolvePayloadProvider = /* @__PURE__ */ __name(({ children, huriPayload })
146
146
  }, "ResolvePayloadProvider");
147
147
 
148
148
  // src/contexts/ResolvePayloadContext/use.ts
149
- import { useContextEx as useContextEx3 } from "@xyo-network/react-shared";
149
+ import { useContextEx as useContextEx3 } from "@xylabs/react-shared";
150
150
  var useResolvePayload = /* @__PURE__ */ __name(() => useContextEx3(ResolvePayloadContext, "ResolvePayload", true), "useResolvePayload");
151
151
 
152
152
  // src/contexts/ValidatePayloadContext/Provider.tsx
@@ -156,7 +156,7 @@ import { SchemaCache } from "@xyo-network/schema-cache";
156
156
  import React5, { useState as useState3 } from "react";
157
157
 
158
158
  // src/contexts/ValidatePayloadContext/Context.ts
159
- import { createContextEx as createContextEx4 } from "@xyo-network/react-shared";
159
+ import { createContextEx as createContextEx4 } from "@xylabs/react-shared";
160
160
  var ValidatePayloadContext = createContextEx4();
161
161
 
162
162
  // src/contexts/ValidatePayloadContext/Provider.tsx
@@ -194,7 +194,7 @@ var ValidatePayloadProvider = /* @__PURE__ */ __name(({ children, enabled = fals
194
194
  }, "ValidatePayloadProvider");
195
195
 
196
196
  // src/contexts/ValidatePayloadContext/use.ts
197
- import { useContextEx as useContextEx4 } from "@xyo-network/react-shared";
197
+ import { useContextEx as useContextEx4 } from "@xylabs/react-shared";
198
198
  var useValidatePayload = /* @__PURE__ */ __name(() => useContextEx4(ValidatePayloadContext, "ValidateSchema", true), "useValidatePayload");
199
199
 
200
200
  // src/components/embed-card/menu/EmbedMenu.tsx
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/embed-card/card/BusyCard.tsx","../../src/components/embed-card/card/EmbedCardHeader.tsx","../../src/contexts/EmbedPluginContext/Context.ts","../../src/contexts/EmbedPluginContext/Provider.tsx","../../src/contexts/EmbedPluginContext/use.ts","../../src/contexts/RefreshPayloadContext/Provider.tsx","../../src/contexts/RefreshPayloadContext/Context.ts","../../src/contexts/RefreshPayloadContext/use.ts","../../src/contexts/ResolvePayloadContext/Context.ts","../../src/contexts/ResolvePayloadContext/Provider.tsx","../../src/contexts/ResolvePayloadContext/use.ts","../../src/contexts/ValidatePayloadContext/Provider.tsx","../../src/contexts/ValidatePayloadContext/Context.ts","../../src/contexts/ValidatePayloadContext/use.ts","../../src/components/embed-card/menu/EmbedMenu.tsx","../../src/components/embed-card/menu/JsonMenuItem.tsx","../../src/components/embed-card/card/EmbedPluginCard.tsx","../../src/components/controls/EmbedFormControl.tsx","../../src/components/controls/ListModeSelect.tsx","../../src/components/controls/RenderSelect.tsx","../../src/components/embed-card/EmbedPluginCard.tsx","../../src/components/EmbedPlugin.tsx","../../src/components/EmbedResolver.tsx","../../src/components/validation-alerts/ValidatePayload.tsx","../../src/components/validation-alerts/ValidatePlugins.tsx","../../src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx","../../src/components/embed-card/error-handling/EmbedErrorCard.tsx"],"sourcesContent":["import type { CardProps } from '@mui/material'\nimport { Card } from '@mui/material'\nimport { useBusyTiming } from '@xylabs/react-flexbox'\nimport type {\n BusyCircularProgressProps,\n BusyLinearProgressProps,\n BusyVariant,\n} from '@xylabs/react-shared'\nimport {\n BusyCircularProgress,\n BusyLinearProgress,\n} from '@xylabs/react-shared'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nexport interface BusyCardProps extends CardProps {\n busy?: boolean\n busyMinimum?: number\n busyVariant?: BusyVariant\n busyVariantProps?: BusyCircularProgressProps | BusyLinearProgressProps\n}\n\nexport const BusyCard: React.FC<PropsWithChildren<BusyCardProps>> = ({\n busy,\n busyMinimum = 500,\n busyVariant = 'circular',\n busyVariantProps,\n children,\n ...props\n}) => {\n const internalBusy = useBusyTiming(busy, busyMinimum)\n return (\n <Card {...props}>\n {children}\n {busyVariant === 'circular' && internalBusy\n ? <BusyCircularProgress {...(busyVariantProps as BusyCircularProgressProps)} />\n : null}\n {busyVariant === 'linear' && internalBusy\n ? <BusyLinearProgress {...(busyVariantProps as BusyLinearProgressProps)} />\n : null}\n </Card>\n )\n}\n","import { Refresh as RefreshIcon } from '@mui/icons-material'\nimport type { CardHeaderProps, Theme } from '@mui/material'\nimport {\n Avatar, CardHeader, Chip,\n} from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts/index.ts'\nimport { EmbedMenu } from '../menu/index.ts'\n\nexport const EmbedCardHeader: React.FC<CardHeaderProps> = () => {\n const { refreshHuri, huri } = useResolvePayload()\n const {\n activePlugin, timestampLabel, hideElementsConfig,\n } = useEmbedPluginState()\n const {\n hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions,\n } = hideElementsConfig ?? {}\n // this is temporary so that we can add the ability to get a timestamp via diviner later\n const timestamp = Date.now()\n return (\n <CardHeader\n sx={{ flexWrap: 'wrap', rowGap: 1 }}\n avatar={\n hideAvatar\n ? <></>\n : (\n <Avatar sx={{ bgcolor: (theme: Theme) => theme.vars.palette.primary.main }} aria-label={activePlugin?.name}>\n {activePlugin?.name?.charAt(0)}\n </Avatar>\n )\n }\n action={(\n <FlexRow flexWrap=\"wrap\" columnGap={0.5}>\n {timestamp\n ? hideTimestamp && hideRefreshButton\n ? ''\n : (\n <Chip\n avatar={hideRefreshButton ? <></> : <RefreshIcon />}\n clickable={hideRefreshButton ? false : true}\n onClick={refreshHuri}\n label={hideTimestamp ? '' : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`}\n />\n )\n\n : null}\n {/* Huri case is valid as long as the only menu item is JSON */}\n {hideCardActions || huri === undefined ? null : <EmbedMenu />}\n </FlexRow>\n )}\n title={hideTitle ? '' : activePlugin?.name}\n />\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport type { EmbedPluginState } from './State.ts'\n\nexport const EmbedPluginContext = createContextEx<EmbedPluginState>()\n","import { useResetState } from '@xylabs/react-hooks'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { EmbedPluginContext } from './Context.ts'\nimport type { EmbedPluginBase } from './State.ts'\n\nexport type EmbedPluginProviderProps = EmbedPluginBase\n\n/** Expose passed embed plugin props via context */\nexport const EmbedPluginProvider: React.FC<PropsWithChildren<EmbedPluginProviderProps>> = ({\n children,\n refreshTitle,\n timestampLabel,\n hideElementsConfig,\n plugins,\n embedPluginConfig,\n}) => {\n const [activePlugin, setActivePlugin] = useResetState(plugins ? plugins[0] : undefined)\n\n return (\n <EmbedPluginContext\n // eslint-disable-next-line @eslint-react/no-unstable-context-value\n value={{\n activePlugin,\n embedPluginConfig,\n hideElementsConfig,\n provided: true,\n refreshTitle,\n setActivePlugin,\n timestampLabel,\n }}\n >\n {children}\n </EmbedPluginContext>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { EmbedPluginContext } from './Context.ts'\n\nexport const useEmbedPluginState = () => useContextEx(EmbedPluginContext, 'EmbedPlugin', true)\n","import type { PropsWithChildren } from 'react'\nimport React, { useState } from 'react'\n\nimport { RefreshPayloadContext } from './Context.ts'\n\nexport interface RefreshPayloadProps {\n onRefresh?: () => void\n refreshPayload?: boolean\n}\n\nexport const RefreshPayloadProvider: React.FC<PropsWithChildren<RefreshPayloadProps>> = ({\n children, onRefresh, refreshPayload,\n}) => {\n const [localRefreshPayload, setRefreshPayload] = useState(refreshPayload)\n\n return (\n // eslint-disable-next-line @eslint-react/no-unstable-context-value\n <RefreshPayloadContext value={{\n onRefresh, provided: true, refreshPayload: localRefreshPayload, setRefreshPayload,\n }}\n >\n {children}\n </RefreshPayloadContext>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport type { RefreshPayloadState } from './State.ts'\n\nexport const RefreshPayloadContext = createContextEx<RefreshPayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { RefreshPayloadContext } from './Context.ts'\n\nexport const useRefreshPayload = () => useContextEx(RefreshPayloadContext, 'RefreshPayload', true)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport type { ResolvePayloadState } from './State.ts'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","/* eslint-disable @eslint-react/hooks-extra/no-direct-set-state-in-use-effect */\nimport { delay } from '@xylabs/delay'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { Huri } from '@xyo-network/huri'\nimport type {\n ModuleError, Payload, WithSources,\n} from '@xyo-network/payload-model'\nimport { ModuleErrorSchema } from '@xyo-network/payload-model'\nimport type { PropsWithChildren } from 'react'\nimport React, { useEffect, useState } from 'react'\n\nimport { useRefreshPayload } from '../RefreshPayloadContext/index.ts'\nimport { ResolvePayloadContext } from './Context.ts'\nimport type { ResolvePayloadState } from './State.ts'\n\nexport type ResolvePayloadProviderProps = Omit<ResolvePayloadState, 'provided'>\n\nexport const ResolvePayloadProvider: React.FC<PropsWithChildren<ResolvePayloadProviderProps>> = ({ children, huriPayload }) => {\n const [payload, setPayload] = useState<Payload>()\n const [huri, setHuri] = useState<string>()\n const {\n refreshPayload, setRefreshPayload, onRefresh,\n } = useRefreshPayload()\n\n useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n typeof huriPayload === 'string' ? setHuri(huriPayload) : undefined\n if (typeof huriPayload === 'object') {\n setPayload(huriPayload)\n setRefreshPayload?.(true)\n }\n }, [huriPayload, setRefreshPayload])\n\n const [notFound, setNotFound] = useState<boolean>()\n const [huriError, setHuriError] = useState<WithSources<ModuleError>>()\n\n useAsyncEffect(\n async (mounted) => {\n if (huri && !refreshPayload) {\n try {\n const huriInstance = new Huri(huri)\n const result = await huriInstance.fetch()\n // ensure the busy state can stay for a moment to avoid flashing too quickly\n await delay(500)\n\n if (mounted()) {\n setNotFound(result === null)\n setPayload(result)\n setRefreshPayload?.(true)\n }\n } catch (e) {\n const error = e as Error\n setHuriError({\n message: error.message, schema: ModuleErrorSchema, $sources: [],\n })\n }\n }\n },\n [huri, payload, refreshPayload, setRefreshPayload],\n )\n\n const refreshHuri = () => {\n onRefresh?.()\n if (huri) {\n setRefreshPayload?.(false)\n }\n }\n\n return (\n // eslint-disable-next-line @eslint-react/no-unstable-context-value\n <ResolvePayloadContext value={{\n huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload,\n }}\n >\n {children}\n </ResolvePayloadContext>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ResolvePayloadContext } from './Context.ts'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { Chip } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type { SchemaNameToValidatorMap } from '@xyo-network/schema-cache'\nimport { SchemaCache } from '@xyo-network/schema-cache'\nimport type { PropsWithChildren } from 'react'\nimport React, { useState } from 'react'\n\nimport { useResolvePayload } from '../ResolvePayloadContext/index.ts'\nimport { ValidatePayloadContext } from './Context.ts'\n\nexport interface ValidatePayloadProviderProps {\n // Opt-in flag to validate payloads for the plugin(s)\n enabled?: boolean\n}\n\nexport const ValidatePayloadProvider: React.FC<PropsWithChildren<ValidatePayloadProviderProps>> = ({ children, enabled = false }) => {\n const { payload } = useResolvePayload()\n const [initialized, setInitialized] = useState(false)\n const [valid, setValid] = useState<boolean>()\n\n useAsyncEffect(\n async () => {\n if (payload && enabled) {\n await SchemaCache.instance.get(payload.schema)\n\n const possibleKnownSchema = payload.schema as keyof SchemaNameToValidatorMap\n\n if (SchemaCache.instance.validators[possibleKnownSchema]) {\n const validator = SchemaCache.instance.validators[possibleKnownSchema]\n setValid(validator?.(payload))\n }\n setInitialized(true)\n }\n },\n [payload, enabled],\n )\n\n return (\n // eslint-disable-next-line @eslint-react/no-unstable-context-value\n <ValidatePayloadContext value={{\n enabled, provided: true, schema: payload?.schema, validPayload: valid,\n }}\n >\n {enabled\n ? <>{initialized ? children : <Chip label=\"Validating Payload...\" />}</>\n : children}\n </ValidatePayloadContext>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport type { ValidatePayloadState } from './State.ts'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { ValidatePayloadContext } from './Context.ts'\n\nexport const useValidatePayload = () => useContextEx(ValidatePayloadContext, 'ValidateSchema', true)\n","import { MoreVert as MoreVertIcon } from '@mui/icons-material'\nimport type { IconButtonProps } from '@mui/material'\nimport { IconButton, Menu } from '@mui/material'\nimport React, { useState } from 'react'\n\nimport { JsonMenuItem } from './JsonMenuItem.tsx'\n\nexport const EmbedMenu: React.FC<IconButtonProps> = (props) => {\n // TODO - link to explore website\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = Boolean(anchorEl)\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return (\n <>\n <IconButton onClick={handleClick} {...props}>\n <MoreVertIcon />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose} PaperProps={{ variant: 'elevation' }} MenuListProps={{ dense: true }}>\n <JsonMenuItem />\n </Menu>\n </>\n )\n}\n","import { OpenInNew as OpenInNewIcon } from '@mui/icons-material'\nimport type { MenuItemProps } from '@mui/material'\nimport {\n ListItemIcon, ListItemText, MenuItem,\n} from '@mui/material'\nimport React from 'react'\n\nimport { useResolvePayload } from '../../../contexts/index.ts'\n\nexport const JsonMenuItem: React.FC<MenuItemProps> = (props) => {\n const { huri } = useResolvePayload()\n\n return (\n <>\n {huri\n ? (\n <MenuItem title=\"Source Payload JSON\" onClick={() => window.open(huri, '_blank')} {...props}>\n <ListItemText sx={{ mr: 1 }}>JSON</ListItemText>\n <ListItemIcon sx={{ justifyContent: 'end' }}>\n <OpenInNewIcon fontSize=\"small\" />\n </ListItemIcon>\n </MenuItem>\n )\n : null}\n </>\n )\n}\n","import { CardContent } from '@mui/material'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { useListMode } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts/index.ts'\nimport { EmbedRenderSelect, ListModeSelectFormControl } from '../../controls/index.ts'\nimport type { BusyCardProps } from './BusyCard.tsx'\nimport { BusyCard } from './BusyCard.tsx'\nimport { EmbedCardHeader } from './EmbedCardHeader.tsx'\n\nexport const EmbedPluginCard: React.FC<BusyCardProps> = ({ ...props }) => {\n const { payload } = useResolvePayload()\n const {\n activePlugin: ActivePlugin, plugins, hideElementsConfig,\n } = useEmbedPluginState()\n const { listMode } = useListMode()\n const supportsListMode = ActivePlugin?.components?.box?.listModes?.length ?? 0 > 1\n\n return (\n <BusyCard {...props}>\n {hideElementsConfig?.hideCardHeader ? null : <EmbedCardHeader />}\n {/* Only show the row if the children are present */}\n {(plugins && plugins.length > 0) || supportsListMode\n ? (\n <FlexGrowRow columnGap={2} rowGap={2} flexWrap=\"wrap\" pb={1}>\n {plugins && plugins.length > 1\n ? <EmbedRenderSelect />\n : null}\n {supportsListMode\n ? <ListModeSelectFormControl />\n : null}\n </FlexGrowRow>\n )\n : null}\n <CardContent sx={{ height: '100%' }}>\n {ActivePlugin\n ? <ActivePlugin.components.box.detailsBox payload={payload} {...(supportsListMode && { listMode })} />\n : null}\n </CardContent>\n </BusyCard>\n )\n}\n","import type { FormControlProps } from '@mui/material'\nimport { FormControl, InputLabel } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\ninterface EmbedFormControlProps extends FormControlProps {\n formId?: string\n formLabel?: string\n}\n\nexport const EmbedFormControl: React.FC<PropsWithChildren<EmbedFormControlProps>> = ({\n formId, formLabel, children, ...props\n}) => {\n return (\n <FormControl {...props}>\n <InputLabel id={formId}>{formLabel}</InputLabel>\n {children}\n </FormControl>\n )\n}\n","import { MenuItem } from '@mui/material'\nimport type { SelectExProps } from '@xylabs/react-select'\nimport { SelectEx } from '@xylabs/react-select'\nimport type { ListMode } from '@xyo-network/react-shared'\nimport { useListMode } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport { EmbedFormControl } from './EmbedFormControl.tsx'\n\nconst listModeSelectId = 'listmode-select-id'\nconst listModeSelectLabel = 'List Mode'\n\nexport const ListModeSelect: React.FC<SelectExProps<ListMode>> = (props) => {\n const { listMode, setListMode } = useListMode()\n\n return (\n <SelectEx<ListMode>\n value={(listMode ?? 'default') as ListMode}\n onChange={(event) => {\n setListMode?.(event.target.value as ListMode)\n }}\n {...props}\n >\n <MenuItem key=\"default\" value=\"default\">\n Default\n </MenuItem>\n <MenuItem key=\"table\" value=\"table\">\n Table\n </MenuItem>\n <MenuItem key=\"grid\" value=\"grid\">\n Grid\n </MenuItem>\n </SelectEx>\n )\n}\n\nexport const ListModeSelectFormControl: React.FC<SelectExProps<ListMode>> = (props) => {\n return (\n <EmbedFormControl formId={listModeSelectId} formLabel={listModeSelectLabel}>\n <ListModeSelect size=\"small\" label={listModeSelectLabel} labelId={listModeSelectId} {...props} />\n </EmbedFormControl>\n )\n}\n","import { MenuItem } from '@mui/material'\nimport type { SelectExProps } from '@xylabs/react-select'\nimport { SelectEx } from '@xylabs/react-select'\nimport React from 'react'\n\nimport { useEmbedPluginState } from '../../contexts/index.ts'\nimport { EmbedFormControl } from './EmbedFormControl.tsx'\n\nconst renderSelectId = 'render-select-id'\nconst renderSelectLabel = 'Renderer'\n\nexport const EmbedRenderSelect: React.FC<SelectExProps<string>> = (props) => {\n const {\n activePlugin, setActivePlugin, plugins,\n } = useEmbedPluginState()\n return (\n <EmbedFormControl formId={renderSelectId} formLabel={renderSelectLabel}>\n <SelectEx size=\"small\" value={activePlugin?.name} {...props}>\n {plugins?.map(plugin => (\n <MenuItem value={plugin.name} key={plugin.name} onClick={() => setActivePlugin?.(plugin)}>\n {plugin.name}\n </MenuItem>\n ))}\n </SelectEx>\n </EmbedFormControl>\n )\n}\n","import { useTheme } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { useRefreshPayload, useResolvePayload } from '../../contexts/index.ts'\nimport type { EmbedPluginProps } from '../../types/index.ts'\nimport { EmbedPluginInner } from '../EmbedPlugin.tsx'\nimport type { BusyCardProps } from './card/index.ts'\nimport { EmbedPluginCard } from './card/index.ts'\nimport { EmbedCardApiErrorRenderer } from './error-handling/index.ts'\n\nexport interface EmbedPluginCardProps extends PropsWithChildren, EmbedPluginProps, BusyCardProps {}\n\nexport const ApiEmbedPluginCard: React.FC<EmbedPluginCardProps> = ({ children, ...props }) => {\n const {\n validateSchema,\n plugins = [],\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n ...busyCardProps\n } = props\n\n return (\n <EmbedPluginInner\n {...{\n embedPluginConfig,\n hideElementsConfig,\n huriPayload,\n onRefresh,\n plugins,\n refreshTitle,\n timestampLabel,\n validateSchema,\n }}\n >\n <EmbedPluginCardInner {...busyCardProps} />\n {children}\n </EmbedPluginInner>\n )\n}\n\nexport const EmbedPluginCardInner: React.FC<BusyCardProps> = (props) => {\n const { payload, huriError } = useResolvePayload()\n const { refreshPayload } = useRefreshPayload()\n const theme = useTheme()\n\n return (\n <EmbedCardApiErrorRenderer xyoError={huriError}>\n <EmbedPluginCard\n elevation={3}\n variant=\"elevation\"\n busy={Boolean(!refreshPayload && payload)}\n busyVariantProps={{\n style: {\n alignItems: 'start', paddingTop: theme.spacing(2), zIndex: 2,\n },\n }}\n sx={{ position: 'relative' }}\n {...props}\n />\n </EmbedCardApiErrorRenderer>\n )\n}\n\n/** @deprecated - use EmbedPluginCard and use CardProps instead of FlexBoxProps */\n\nexport { EmbedPluginCard as EmbedPlugin } from './card/index.ts'\n","import { ErrorBoundary } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { ListModeProvider } from '@xyo-network/react-shared'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport {\n EmbedPluginProvider, RefreshPayloadProvider, ResolvePayloadProvider, ValidatePayloadProvider,\n} from '../contexts/index.ts'\nimport type { EmbedPluginProps } from '../types/index.ts'\nimport { EmbedResolver } from './EmbedResolver.tsx'\nimport { ValidatePayloadAlert, ValidatePluginsAlert } from './validation-alerts/index.ts'\n\nexport const EmbedPluginInner: React.FC<PropsWithChildren<EmbedPluginProps>> = ({\n validateSchema,\n plugins,\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n children,\n}) => {\n return (\n <ErrorBoundary>\n <EmbedPluginProvider\n refreshTitle={refreshTitle}\n timestampLabel={timestampLabel}\n hideElementsConfig={hideElementsConfig}\n plugins={plugins}\n embedPluginConfig={embedPluginConfig}\n >\n <WithResolvers onRefresh={onRefresh} huriPayload={huriPayload}>\n <WithValidators validateSchema={validateSchema}>\n <ListModeProvider defaultListMode={embedPluginConfig?.listMode}>{children}</ListModeProvider>\n </WithValidators>\n </WithResolvers>\n </EmbedPluginProvider>\n </ErrorBoundary>\n )\n}\n\ninterface WithResolversProps extends Pick<EmbedPluginProps, 'onRefresh' | 'huriPayload'>, FlexBoxProps {}\n\nconst WithResolvers: React.FC<PropsWithChildren<WithResolversProps>> = ({\n children, onRefresh, huriPayload,\n}) => {\n return (\n <RefreshPayloadProvider onRefresh={onRefresh}>\n <ResolvePayloadProvider huriPayload={huriPayload}>\n <EmbedResolver>{children}</EmbedResolver>\n </ResolvePayloadProvider>\n </RefreshPayloadProvider>\n )\n}\n\nconst WithValidators: React.FC<PropsWithChildren<{ validateSchema?: boolean }>> = ({ children, validateSchema }) => {\n return (\n <ValidatePayloadProvider enabled={validateSchema}>\n <ValidatePluginsAlert>\n <ValidatePayloadAlert>{children}</ValidatePayloadAlert>\n </ValidatePluginsAlert>\n </ValidatePayloadProvider>\n )\n}\n","import { LoadResult } from '@xyo-network/react-shared'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { useResolvePayload } from '../contexts/index.ts'\n\nexport const EmbedResolver: React.FC<PropsWithChildren> = ({ children }) => {\n const {\n payload, notFound, huriError,\n } = useResolvePayload()\n\n return (\n <LoadResult searchResult={payload} notFound={!!notFound} error={!!huriError}>\n {children}\n </LoadResult>\n )\n}\n","import type { AlertProps } from '@mui/material'\nimport { Alert } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { useValidatePayload } from '../../contexts/index.ts'\n\nexport const ValidatePayloadAlert: React.FC<PropsWithChildren<AlertProps>> = ({ children, ...props }) => {\n const {\n validPayload, enabled, schema,\n } = useValidatePayload()\n\n if (enabled && validPayload === false) {\n return (\n <Alert severity=\"error\" title=\"Invalid Payload!\" {...props}>\n Payload schema claimed to be\n {' '}\n {schema}\n {' '}\n but failed to validate.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import type { AlertProps } from '@mui/material'\nimport { Alert, AlertTitle } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../contexts/index.ts'\n\nexport const ValidatePluginsAlert: React.FC<PropsWithChildren<AlertProps>> = ({ children, ...props }) => {\n const { payload } = useResolvePayload()\n const { plugins } = useEmbedPluginState()\n\n if (payload && plugins?.length === 0) {\n return (\n <Alert severity=\"warning\" {...props}>\n <AlertTitle>Missing plugins!</AlertTitle>\n Payload found but no plugins were present.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import type { CardProps } from '@mui/material'\nimport { ErrorAlert, ErrorRender } from '@xylabs/react-error'\nimport type { ModuleError } from '@xyo-network/payload-model'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { EmbedErrorCard } from './EmbedErrorCard.tsx'\n\ninterface EmbedCardApiErrorRendererProps extends CardProps {\n xyoError?: ModuleError\n}\n\nexport const EmbedCardApiErrorRenderer: React.FC<PropsWithChildren<EmbedCardApiErrorRendererProps>> = ({\n xyoError, children, ...props\n}) => {\n return (\n <ErrorRender error={xyoError} noReAuth noErrorDisplay customError={<CustomApiErrorCard xyoError={xyoError} {...props} />}>\n {children}\n </ErrorRender>\n )\n}\n\nconst CustomApiErrorCard: React.FC<EmbedCardApiErrorRendererProps> = ({ xyoError, ...props }) => {\n return (\n <EmbedErrorCard {...props}>\n <ErrorAlert error={xyoError} />\n </EmbedErrorCard>\n )\n}\n","import type { AlertProps, CardProps } from '@mui/material'\nimport {\n Alert, AlertTitle, Card, CardContent, Typography,\n} from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\ninterface EmbedErrorCardBaseProps {\n alertProps?: AlertProps\n error?: Error\n hideErrorDetails?: boolean\n scope?: string\n}\n\ninterface EmbedErrorCardProps extends EmbedErrorCardBaseProps, CardProps {}\n\nexport const EmbedErrorCard: React.FC<PropsWithChildren<EmbedErrorCardProps>> = (props) => {\n const {\n alertProps, error, scope, hideErrorDetails = true, children, ...cardProps\n } = props\n const errorProps = {\n alertProps, error, hideErrorDetails, scope,\n }\n return (\n <Card {...cardProps}>\n <CardContent>{children ?? <DefaultErrorAlert {...errorProps} />}</CardContent>\n </Card>\n )\n}\n\nconst DefaultErrorAlert: React.FC<EmbedErrorCardBaseProps> = ({\n alertProps, scope, hideErrorDetails, error,\n}) => {\n return (\n <Alert severity=\"error\" {...alertProps}>\n <AlertTitle>Whoops! Something went wrong</AlertTitle>\n {scope\n ? (\n <Typography variant=\"caption\">\n Scope:\n {scope}\n </Typography>\n )\n : null}\n {!hideErrorDetails && error\n ? (\n <>\n <Typography variant=\"caption\">Error: </Typography>\n <Typography variant=\"caption\">{error?.message}</Typography>\n </>\n )\n : (\n <Typography variant=\"caption\" fontSize=\"small\">\n Error Loading Plugin\n </Typography>\n )}\n </Alert>\n )\n}\n"],"mappings":";;;;AACA,SAASA,YAAY;AACrB,SAASC,qBAAqB;AAM9B,SACEC,sBACAC,0BACK;AAEP,OAAOC,WAAW;AASX,IAAMC,WAAuD,wBAAC,EACnEC,MACAC,cAAc,KACdC,cAAc,YACdC,kBACAC,UACA,GAAGC,MAAAA,MACJ;AACC,QAAMC,eAAeC,cAAcP,MAAMC,WAAAA;AACzC,SACE,sBAAA,cAACO,MAASH,OACPD,UACAF,gBAAgB,cAAcI,eAC3B,sBAAA,cAACG,sBAA0BN,gBAAAA,IAC3B,MACHD,gBAAgB,YAAYI,eACzB,sBAAA,cAACI,oBAAwBP,gBAAAA,IACzB,IAAA;AAGV,GApBoE;;;ACtBpE,SAASQ,WAAWC,mBAAmB;AAEvC,SACEC,QAAQC,YAAYC,QAAAA,aACf;AACP,SAASC,eAAe;AACxB,OAAOC,YAAW;;;ACNlB,SAASC,uBAAuB;AAIzB,IAAMC,qBAAqBD,gBAAAA;;;ACJlC,SAASE,qBAAqB;AAE9B,OAAOC,YAAW;AAQX,IAAMC,sBAA6E,wBAAC,EACzFC,UACAC,cACAC,gBACAC,oBACAC,SACAC,kBAAiB,MAClB;AACC,QAAM,CAACC,cAAcC,eAAAA,IAAmBC,cAAcJ,UAAUA,QAAQ,CAAA,IAAKK,MAAAA;AAE7E,SACE,gBAAAC,OAAA,cAACC,oBAAAA;;I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gBAAAT,QAAA,cAACU,2BAAAA;IAA0BC,UAAUP;KACnC,gBAAAJ,QAAA,cAACY,iBAAAA;IACCC,WAAW;IACXC,SAAQ;IACRC,MAAMC,QAAQ,CAACV,kBAAkBH,OAAAA;IACjCc,kBAAkB;MAChBC,OAAO;QACLC,YAAY;QAASC,YAAYZ,MAAMa,QAAQ,CAAA;QAAIC,QAAQ;MAC7D;IACF;IACAC,IAAI;MAAEC,UAAU;IAAW;IAC1B,GAAGlC;;AAIZ,GArB6D;","names":["Card","useBusyTiming","BusyCircularProgress","BusyLinearProgress","React","BusyCard","busy","busyMinimum","busyVariant","busyVariantProps","children","props","internalBusy","useBusyTiming","Card","BusyCircularProgress","BusyLinearProgress","Refresh","RefreshIcon","Avatar","CardHeader","Chip","FlexRow","React","createContextEx","EmbedPluginContext","useResetState","React","EmbedPluginProvider","children","refreshTitle","timestampLabel","hideElementsConfig","plugins","embedPluginConfig","activePlugin","setActivePlugin","useResetState","undefined","React","EmbedPluginContext","value","provided","useContextEx","useEmbedPluginState","useContextEx","EmbedPluginContext","React","useState","createContextEx","RefreshPayloadContext","RefreshPayloadProvider","children","onRefresh","refreshPayload","localRefreshPayload","setRefreshPayload","useState","React","RefreshPayloadContext","value","provided","useContextEx","useRefreshPayload","useContextEx","RefreshPayloadContext","createContextEx","ResolvePayloadContext","delay","useAsyncEffect","Huri","ModuleErrorSchema","React","useEffect","useState","ResolvePayloadProvider","children","huriPayload","payload","setPayload","useState","huri","setHuri","refreshPayload","setRefreshPayload","onRefresh","useRefreshPayload","useEffect","undefined","notFound","setNotFound","huriError","setHuriError","useAsyncEffect","mounted","huriInstance","Huri","result","fetch","delay","e","error","message","schema","ModuleErrorSchema","$sources","refreshHuri","React","ResolvePayloadContext","value","provided","useContextEx","useResolvePayload","useContextEx","ResolvePayloadContext","Chip","useAsyncEffect","SchemaCache","React","useState","createContextEx","ValidatePayloadContext","ValidatePayloadProvider","children","enabled","payload","useResolvePayload","initialized","setInitialized","useState","valid","setValid","useAsyncEffect","SchemaCache","instance","get","schema","possibleKnownSchema","validators","validator","React","ValidatePayloadContext","value","provided","validPayload","Chip","label","useContextEx","useValidatePayload","useContextEx","ValidatePayloadContext","MoreVert","MoreVertIcon","IconButton","Menu","React","useState","OpenInNew","OpenInNewIcon","ListItemIcon","ListItemText","MenuItem","React","JsonMenuItem","props","huri","useResolvePayload","React","MenuItem","title","onClick","window","open","ListItemText","sx","mr","ListItemIcon","justifyContent","OpenInNewIcon","fontSize","EmbedMenu","props","anchorEl","setAnchorEl","useState","open","Boolean","handleClick","event","currentTarget","handleClose","React","IconButton","onClick","MoreVertIcon","Menu","onClose","PaperProps","variant","MenuListProps","dense","JsonMenuItem","EmbedCardHeader","refreshHuri","huri","useResolvePayload","activePlugin","timestampLabel","hideElementsConfig","useEmbedPluginState","hideAvatar","hideTitle","hideRefreshButton","hideTimestamp","hideCardActions","timestamp","Date","now","React","CardHeader","sx","flexWrap","rowGap","avatar","Avatar","bgcolor","theme","vars","palette","primary","main","aria-label","name","charAt","action","FlexRow","columnGap","Chip","RefreshIcon","clickable","onClick","label","toLocaleString","undefined","EmbedMenu","title","CardContent","FlexGrowRow","useListMode","React","FormControl","InputLabel","React","EmbedFormControl","formId","formLabel","children","props","React","FormControl","InputLabel","id","MenuItem","SelectEx","useListMode","React","listModeSelectId","listModeSelectLabel","ListModeSelect","props","listMode","setListMode","useListMode","React","SelectEx","value","onChange","event","target","MenuItem","key","ListModeSelectFormControl","EmbedFormControl","formId","formLabel","size","label","labelId","MenuItem","SelectEx","React","renderSelectId","renderSelectLabel","EmbedRenderSelect","props","activePlugin","setActivePlugin","plugins","useEmbedPluginState","React","EmbedFormControl","formId","formLabel","SelectEx","size","value","name","map","plugin","MenuItem","key","onClick","EmbedPluginCard","props","payload","useResolvePayload","activePlugin","ActivePlugin","plugins","hideElementsConfig","useEmbedPluginState","listMode","useListMode","supportsListMode","components","box","listModes","length","React","BusyCard","hideCardHeader","EmbedCardHeader","FlexGrowRow","columnGap","rowGap","flexWrap","pb","EmbedRenderSelect","ListModeSelectFormControl","CardContent","sx","height","detailsBox","useTheme","React","ErrorBoundary","ListModeProvider","React","LoadResult","React","EmbedResolver","children","payload","notFound","huriError","useResolvePayload","React","LoadResult","searchResult","error","Alert","React","ValidatePayloadAlert","children","props","validPayload","enabled","schema","useValidatePayload","React","Alert","severity","title","Alert","AlertTitle","React","ValidatePluginsAlert","children","props","payload","useResolvePayload","plugins","useEmbedPluginState","length","React","Alert","severity","AlertTitle","EmbedPluginInner","validateSchema","plugins","huriPayload","refreshTitle","timestampLabel","hideElementsConfig","embedPluginConfig","onRefresh","children","React","ErrorBoundary","EmbedPluginProvider","WithResolvers","WithValidators","ListModeProvider","defaultListMode","listMode","RefreshPayloadProvider","ResolvePayloadProvider","EmbedResolver","ValidatePayloadProvider","enabled","ValidatePluginsAlert","ValidatePayloadAlert","ErrorAlert","ErrorRender","React","Alert","AlertTitle","Card","CardContent","Typography","React","EmbedErrorCard","props","alertProps","error","scope","hideErrorDetails","children","cardProps","errorProps","React","Card","CardContent","DefaultErrorAlert","Alert","severity","AlertTitle","Typography","variant","message","fontSize","EmbedCardApiErrorRenderer","xyoError","children","props","React","ErrorRender","error","noReAuth","noErrorDisplay","customError","CustomApiErrorCard","EmbedErrorCard","ErrorAlert","ApiEmbedPluginCard","children","props","validateSchema","plugins","huriPayload","refreshTitle","timestampLabel","hideElementsConfig","embedPluginConfig","onRefresh","busyCardProps","React","EmbedPluginInner","EmbedPluginCardInner","payload","huriError","useResolvePayload","refreshPayload","useRefreshPayload","theme","useTheme","EmbedCardApiErrorRenderer","xyoError","EmbedPluginCard","elevation","variant","busy","Boolean","busyVariantProps","style","alignItems","paddingTop","spacing","zIndex","sx","position"]}
1
+ {"version":3,"sources":["../../src/components/embed-card/card/BusyCard.tsx","../../src/components/embed-card/card/EmbedCardHeader.tsx","../../src/contexts/EmbedPluginContext/Context.ts","../../src/contexts/EmbedPluginContext/Provider.tsx","../../src/contexts/EmbedPluginContext/use.ts","../../src/contexts/RefreshPayloadContext/Provider.tsx","../../src/contexts/RefreshPayloadContext/Context.ts","../../src/contexts/RefreshPayloadContext/use.ts","../../src/contexts/ResolvePayloadContext/Context.ts","../../src/contexts/ResolvePayloadContext/Provider.tsx","../../src/contexts/ResolvePayloadContext/use.ts","../../src/contexts/ValidatePayloadContext/Provider.tsx","../../src/contexts/ValidatePayloadContext/Context.ts","../../src/contexts/ValidatePayloadContext/use.ts","../../src/components/embed-card/menu/EmbedMenu.tsx","../../src/components/embed-card/menu/JsonMenuItem.tsx","../../src/components/embed-card/card/EmbedPluginCard.tsx","../../src/components/controls/EmbedFormControl.tsx","../../src/components/controls/ListModeSelect.tsx","../../src/components/controls/RenderSelect.tsx","../../src/components/embed-card/EmbedPluginCard.tsx","../../src/components/EmbedPlugin.tsx","../../src/components/EmbedResolver.tsx","../../src/components/validation-alerts/ValidatePayload.tsx","../../src/components/validation-alerts/ValidatePlugins.tsx","../../src/components/embed-card/error-handling/EmbedCardApiErrorRenderer.tsx","../../src/components/embed-card/error-handling/EmbedErrorCard.tsx"],"sourcesContent":["import type { CardProps } from '@mui/material'\nimport { Card } from '@mui/material'\nimport { useBusyTiming } from '@xylabs/react-flexbox'\nimport type {\n BusyCircularProgressProps,\n BusyLinearProgressProps,\n BusyVariant,\n} from '@xylabs/react-shared'\nimport {\n BusyCircularProgress,\n BusyLinearProgress,\n} from '@xylabs/react-shared'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nexport interface BusyCardProps extends CardProps {\n busy?: boolean\n busyMinimum?: number\n busyVariant?: BusyVariant\n busyVariantProps?: BusyCircularProgressProps | BusyLinearProgressProps\n}\n\nexport const BusyCard: React.FC<PropsWithChildren<BusyCardProps>> = ({\n busy,\n busyMinimum = 500,\n busyVariant = 'circular',\n busyVariantProps,\n children,\n ...props\n}) => {\n const internalBusy = useBusyTiming(busy, busyMinimum)\n return (\n <Card {...props}>\n {children}\n {busyVariant === 'circular' && internalBusy\n ? <BusyCircularProgress {...(busyVariantProps as BusyCircularProgressProps)} />\n : null}\n {busyVariant === 'linear' && internalBusy\n ? <BusyLinearProgress {...(busyVariantProps as BusyLinearProgressProps)} />\n : null}\n </Card>\n )\n}\n","import { Refresh as RefreshIcon } from '@mui/icons-material'\nimport type { CardHeaderProps, Theme } from '@mui/material'\nimport {\n Avatar, CardHeader, Chip,\n} from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts/index.ts'\nimport { EmbedMenu } from '../menu/index.ts'\n\nexport const EmbedCardHeader: React.FC<CardHeaderProps> = () => {\n const { refreshHuri, huri } = useResolvePayload()\n const {\n activePlugin, timestampLabel, hideElementsConfig,\n } = useEmbedPluginState()\n const {\n hideAvatar, hideTitle, hideRefreshButton, hideTimestamp, hideCardActions,\n } = hideElementsConfig ?? {}\n // this is temporary so that we can add the ability to get a timestamp via diviner later\n const timestamp = Date.now()\n return (\n <CardHeader\n sx={{ flexWrap: 'wrap', rowGap: 1 }}\n avatar={\n hideAvatar\n ? <></>\n : (\n <Avatar sx={{ bgcolor: (theme: Theme) => theme.vars.palette.primary.main }} aria-label={activePlugin?.name}>\n {activePlugin?.name?.charAt(0)}\n </Avatar>\n )\n }\n action={(\n <FlexRow flexWrap=\"wrap\" columnGap={0.5}>\n {timestamp\n ? hideTimestamp && hideRefreshButton\n ? ''\n : (\n <Chip\n avatar={hideRefreshButton ? <></> : <RefreshIcon />}\n clickable={hideRefreshButton ? false : true}\n onClick={refreshHuri}\n label={hideTimestamp ? '' : `${timestampLabel} ${new Date(timestamp).toLocaleString()}`}\n />\n )\n\n : null}\n {/* Huri case is valid as long as the only menu item is JSON */}\n {hideCardActions || huri === undefined ? null : <EmbedMenu />}\n </FlexRow>\n )}\n title={hideTitle ? '' : activePlugin?.name}\n />\n )\n}\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { EmbedPluginState } from './State.ts'\n\nexport const EmbedPluginContext = createContextEx<EmbedPluginState>()\n","import { useResetState } from '@xylabs/react-hooks'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { EmbedPluginContext } from './Context.ts'\nimport type { EmbedPluginBase } from './State.ts'\n\nexport type EmbedPluginProviderProps = EmbedPluginBase\n\n/** Expose passed embed plugin props via context */\nexport const EmbedPluginProvider: React.FC<PropsWithChildren<EmbedPluginProviderProps>> = ({\n children,\n refreshTitle,\n timestampLabel,\n hideElementsConfig,\n plugins,\n embedPluginConfig,\n}) => {\n const [activePlugin, setActivePlugin] = useResetState(plugins ? plugins[0] : undefined)\n\n return (\n <EmbedPluginContext\n // eslint-disable-next-line @eslint-react/no-unstable-context-value\n value={{\n activePlugin,\n embedPluginConfig,\n hideElementsConfig,\n provided: true,\n refreshTitle,\n setActivePlugin,\n timestampLabel,\n }}\n >\n {children}\n </EmbedPluginContext>\n )\n}\n","import { useContextEx } from '@xylabs/react-shared'\n\nimport { EmbedPluginContext } from './Context.ts'\n\nexport const useEmbedPluginState = () => useContextEx(EmbedPluginContext, 'EmbedPlugin', true)\n","import type { PropsWithChildren } from 'react'\nimport React, { useState } from 'react'\n\nimport { RefreshPayloadContext } from './Context.ts'\n\nexport interface RefreshPayloadProps {\n onRefresh?: () => void\n refreshPayload?: boolean\n}\n\nexport const RefreshPayloadProvider: React.FC<PropsWithChildren<RefreshPayloadProps>> = ({\n children, onRefresh, refreshPayload,\n}) => {\n const [localRefreshPayload, setRefreshPayload] = useState(refreshPayload)\n\n return (\n // eslint-disable-next-line @eslint-react/no-unstable-context-value\n <RefreshPayloadContext value={{\n onRefresh, provided: true, refreshPayload: localRefreshPayload, setRefreshPayload,\n }}\n >\n {children}\n </RefreshPayloadContext>\n )\n}\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { RefreshPayloadState } from './State.ts'\n\nexport const RefreshPayloadContext = createContextEx<RefreshPayloadState>()\n","import { useContextEx } from '@xylabs/react-shared'\n\nimport { RefreshPayloadContext } from './Context.ts'\n\nexport const useRefreshPayload = () => useContextEx(RefreshPayloadContext, 'RefreshPayload', true)\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { ResolvePayloadState } from './State.ts'\n\nexport const ResolvePayloadContext = createContextEx<ResolvePayloadState>()\n","/* eslint-disable @eslint-react/hooks-extra/no-direct-set-state-in-use-effect */\nimport { delay } from '@xylabs/delay'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { Huri } from '@xyo-network/huri'\nimport type {\n ModuleError, Payload, WithSources,\n} from '@xyo-network/payload-model'\nimport { ModuleErrorSchema } from '@xyo-network/payload-model'\nimport type { PropsWithChildren } from 'react'\nimport React, { useEffect, useState } from 'react'\n\nimport { useRefreshPayload } from '../RefreshPayloadContext/index.ts'\nimport { ResolvePayloadContext } from './Context.ts'\nimport type { ResolvePayloadState } from './State.ts'\n\nexport type ResolvePayloadProviderProps = Omit<ResolvePayloadState, 'provided'>\n\nexport const ResolvePayloadProvider: React.FC<PropsWithChildren<ResolvePayloadProviderProps>> = ({ children, huriPayload }) => {\n const [payload, setPayload] = useState<Payload>()\n const [huri, setHuri] = useState<string>()\n const {\n refreshPayload, setRefreshPayload, onRefresh,\n } = useRefreshPayload()\n\n useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n typeof huriPayload === 'string' ? setHuri(huriPayload) : undefined\n if (typeof huriPayload === 'object') {\n setPayload(huriPayload)\n setRefreshPayload?.(true)\n }\n }, [huriPayload, setRefreshPayload])\n\n const [notFound, setNotFound] = useState<boolean>()\n const [huriError, setHuriError] = useState<WithSources<ModuleError>>()\n\n useAsyncEffect(\n async (mounted) => {\n if (huri && !refreshPayload) {\n try {\n const huriInstance = new Huri(huri)\n const result = await huriInstance.fetch()\n // ensure the busy state can stay for a moment to avoid flashing too quickly\n await delay(500)\n\n if (mounted()) {\n setNotFound(result === null)\n setPayload(result)\n setRefreshPayload?.(true)\n }\n } catch (e) {\n const error = e as Error\n setHuriError({\n message: error.message, schema: ModuleErrorSchema, $sources: [],\n })\n }\n }\n },\n [huri, payload, refreshPayload, setRefreshPayload],\n )\n\n const refreshHuri = () => {\n onRefresh?.()\n if (huri) {\n setRefreshPayload?.(false)\n }\n }\n\n return (\n // eslint-disable-next-line @eslint-react/no-unstable-context-value\n <ResolvePayloadContext value={{\n huri, huriError, notFound, payload, provided: true, refreshHuri, setPayload,\n }}\n >\n {children}\n </ResolvePayloadContext>\n )\n}\n","import { useContextEx } from '@xylabs/react-shared'\n\nimport { ResolvePayloadContext } from './Context.ts'\n\nexport const useResolvePayload = () => useContextEx(ResolvePayloadContext, 'ResolvePayload', true)\n","import { Chip } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type { SchemaNameToValidatorMap } from '@xyo-network/schema-cache'\nimport { SchemaCache } from '@xyo-network/schema-cache'\nimport type { PropsWithChildren } from 'react'\nimport React, { useState } from 'react'\n\nimport { useResolvePayload } from '../ResolvePayloadContext/index.ts'\nimport { ValidatePayloadContext } from './Context.ts'\n\nexport interface ValidatePayloadProviderProps {\n // Opt-in flag to validate payloads for the plugin(s)\n enabled?: boolean\n}\n\nexport const ValidatePayloadProvider: React.FC<PropsWithChildren<ValidatePayloadProviderProps>> = ({ children, enabled = false }) => {\n const { payload } = useResolvePayload()\n const [initialized, setInitialized] = useState(false)\n const [valid, setValid] = useState<boolean>()\n\n useAsyncEffect(\n async () => {\n if (payload && enabled) {\n await SchemaCache.instance.get(payload.schema)\n\n const possibleKnownSchema = payload.schema as keyof SchemaNameToValidatorMap\n\n if (SchemaCache.instance.validators[possibleKnownSchema]) {\n const validator = SchemaCache.instance.validators[possibleKnownSchema]\n setValid(validator?.(payload))\n }\n setInitialized(true)\n }\n },\n [payload, enabled],\n )\n\n return (\n // eslint-disable-next-line @eslint-react/no-unstable-context-value\n <ValidatePayloadContext value={{\n enabled, provided: true, schema: payload?.schema, validPayload: valid,\n }}\n >\n {enabled\n ? <>{initialized ? children : <Chip label=\"Validating Payload...\" />}</>\n : children}\n </ValidatePayloadContext>\n )\n}\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { ValidatePayloadState } from './State.ts'\n\nexport const ValidatePayloadContext = createContextEx<ValidatePayloadState>()\n","import { useContextEx } from '@xylabs/react-shared'\n\nimport { ValidatePayloadContext } from './Context.ts'\n\nexport const useValidatePayload = () => useContextEx(ValidatePayloadContext, 'ValidateSchema', true)\n","import { MoreVert as MoreVertIcon } from '@mui/icons-material'\nimport type { IconButtonProps } from '@mui/material'\nimport { IconButton, Menu } from '@mui/material'\nimport React, { useState } from 'react'\n\nimport { JsonMenuItem } from './JsonMenuItem.tsx'\n\nexport const EmbedMenu: React.FC<IconButtonProps> = (props) => {\n // TODO - link to explore website\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = Boolean(anchorEl)\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return (\n <>\n <IconButton onClick={handleClick} {...props}>\n <MoreVertIcon />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose} PaperProps={{ variant: 'elevation' }} MenuListProps={{ dense: true }}>\n <JsonMenuItem />\n </Menu>\n </>\n )\n}\n","import { OpenInNew as OpenInNewIcon } from '@mui/icons-material'\nimport type { MenuItemProps } from '@mui/material'\nimport {\n ListItemIcon, ListItemText, MenuItem,\n} from '@mui/material'\nimport React from 'react'\n\nimport { useResolvePayload } from '../../../contexts/index.ts'\n\nexport const JsonMenuItem: React.FC<MenuItemProps> = (props) => {\n const { huri } = useResolvePayload()\n\n return (\n <>\n {huri\n ? (\n <MenuItem title=\"Source Payload JSON\" onClick={() => window.open(huri, '_blank')} {...props}>\n <ListItemText sx={{ mr: 1 }}>JSON</ListItemText>\n <ListItemIcon sx={{ justifyContent: 'end' }}>\n <OpenInNewIcon fontSize=\"small\" />\n </ListItemIcon>\n </MenuItem>\n )\n : null}\n </>\n )\n}\n","import { CardContent } from '@mui/material'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { useListMode } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../../contexts/index.ts'\nimport { EmbedRenderSelect, ListModeSelectFormControl } from '../../controls/index.ts'\nimport type { BusyCardProps } from './BusyCard.tsx'\nimport { BusyCard } from './BusyCard.tsx'\nimport { EmbedCardHeader } from './EmbedCardHeader.tsx'\n\nexport const EmbedPluginCard: React.FC<BusyCardProps> = ({ ...props }) => {\n const { payload } = useResolvePayload()\n const {\n activePlugin: ActivePlugin, plugins, hideElementsConfig,\n } = useEmbedPluginState()\n const { listMode } = useListMode()\n const supportsListMode = ActivePlugin?.components?.box?.listModes?.length ?? 0 > 1\n\n return (\n <BusyCard {...props}>\n {hideElementsConfig?.hideCardHeader ? null : <EmbedCardHeader />}\n {/* Only show the row if the children are present */}\n {(plugins && plugins.length > 0) || supportsListMode\n ? (\n <FlexGrowRow columnGap={2} rowGap={2} flexWrap=\"wrap\" pb={1}>\n {plugins && plugins.length > 1\n ? <EmbedRenderSelect />\n : null}\n {supportsListMode\n ? <ListModeSelectFormControl />\n : null}\n </FlexGrowRow>\n )\n : null}\n <CardContent sx={{ height: '100%' }}>\n {ActivePlugin\n ? <ActivePlugin.components.box.detailsBox payload={payload} {...(supportsListMode && { listMode })} />\n : null}\n </CardContent>\n </BusyCard>\n )\n}\n","import type { FormControlProps } from '@mui/material'\nimport { FormControl, InputLabel } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\ninterface EmbedFormControlProps extends FormControlProps {\n formId?: string\n formLabel?: string\n}\n\nexport const EmbedFormControl: React.FC<PropsWithChildren<EmbedFormControlProps>> = ({\n formId, formLabel, children, ...props\n}) => {\n return (\n <FormControl {...props}>\n <InputLabel id={formId}>{formLabel}</InputLabel>\n {children}\n </FormControl>\n )\n}\n","import { MenuItem } from '@mui/material'\nimport type { SelectExProps } from '@xylabs/react-select'\nimport { SelectEx } from '@xylabs/react-select'\nimport type { ListMode } from '@xyo-network/react-shared'\nimport { useListMode } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport { EmbedFormControl } from './EmbedFormControl.tsx'\n\nconst listModeSelectId = 'listmode-select-id'\nconst listModeSelectLabel = 'List Mode'\n\nexport const ListModeSelect: React.FC<SelectExProps<ListMode>> = (props) => {\n const { listMode, setListMode } = useListMode()\n\n return (\n <SelectEx<ListMode>\n value={(listMode ?? 'default') as ListMode}\n onChange={(event) => {\n setListMode?.(event.target.value as ListMode)\n }}\n {...props}\n >\n <MenuItem key=\"default\" value=\"default\">\n Default\n </MenuItem>\n <MenuItem key=\"table\" value=\"table\">\n Table\n </MenuItem>\n <MenuItem key=\"grid\" value=\"grid\">\n Grid\n </MenuItem>\n </SelectEx>\n )\n}\n\nexport const ListModeSelectFormControl: React.FC<SelectExProps<ListMode>> = (props) => {\n return (\n <EmbedFormControl formId={listModeSelectId} formLabel={listModeSelectLabel}>\n <ListModeSelect size=\"small\" label={listModeSelectLabel} labelId={listModeSelectId} {...props} />\n </EmbedFormControl>\n )\n}\n","import { MenuItem } from '@mui/material'\nimport type { SelectExProps } from '@xylabs/react-select'\nimport { SelectEx } from '@xylabs/react-select'\nimport React from 'react'\n\nimport { useEmbedPluginState } from '../../contexts/index.ts'\nimport { EmbedFormControl } from './EmbedFormControl.tsx'\n\nconst renderSelectId = 'render-select-id'\nconst renderSelectLabel = 'Renderer'\n\nexport const EmbedRenderSelect: React.FC<SelectExProps<string>> = (props) => {\n const {\n activePlugin, setActivePlugin, plugins,\n } = useEmbedPluginState()\n return (\n <EmbedFormControl formId={renderSelectId} formLabel={renderSelectLabel}>\n <SelectEx size=\"small\" value={activePlugin?.name} {...props}>\n {plugins?.map(plugin => (\n <MenuItem value={plugin.name} key={plugin.name} onClick={() => setActivePlugin?.(plugin)}>\n {plugin.name}\n </MenuItem>\n ))}\n </SelectEx>\n </EmbedFormControl>\n )\n}\n","import { useTheme } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { useRefreshPayload, useResolvePayload } from '../../contexts/index.ts'\nimport type { EmbedPluginProps } from '../../types/index.ts'\nimport { EmbedPluginInner } from '../EmbedPlugin.tsx'\nimport type { BusyCardProps } from './card/index.ts'\nimport { EmbedPluginCard } from './card/index.ts'\nimport { EmbedCardApiErrorRenderer } from './error-handling/index.ts'\n\nexport interface EmbedPluginCardProps extends PropsWithChildren, EmbedPluginProps, BusyCardProps {}\n\nexport const ApiEmbedPluginCard: React.FC<EmbedPluginCardProps> = ({ children, ...props }) => {\n const {\n validateSchema,\n plugins = [],\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n ...busyCardProps\n } = props\n\n return (\n <EmbedPluginInner\n {...{\n embedPluginConfig,\n hideElementsConfig,\n huriPayload,\n onRefresh,\n plugins,\n refreshTitle,\n timestampLabel,\n validateSchema,\n }}\n >\n <EmbedPluginCardInner {...busyCardProps} />\n {children}\n </EmbedPluginInner>\n )\n}\n\nexport const EmbedPluginCardInner: React.FC<BusyCardProps> = (props) => {\n const { payload, huriError } = useResolvePayload()\n const { refreshPayload } = useRefreshPayload()\n const theme = useTheme()\n\n return (\n <EmbedCardApiErrorRenderer xyoError={huriError}>\n <EmbedPluginCard\n elevation={3}\n variant=\"elevation\"\n busy={Boolean(!refreshPayload && payload)}\n busyVariantProps={{\n style: {\n alignItems: 'start', paddingTop: theme.spacing(2), zIndex: 2,\n },\n }}\n sx={{ position: 'relative' }}\n {...props}\n />\n </EmbedCardApiErrorRenderer>\n )\n}\n\n/** @deprecated - use EmbedPluginCard and use CardProps instead of FlexBoxProps */\n\nexport { EmbedPluginCard as EmbedPlugin } from './card/index.ts'\n","import { ErrorBoundary } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { ListModeProvider } from '@xyo-network/react-shared'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport {\n EmbedPluginProvider, RefreshPayloadProvider, ResolvePayloadProvider, ValidatePayloadProvider,\n} from '../contexts/index.ts'\nimport type { EmbedPluginProps } from '../types/index.ts'\nimport { EmbedResolver } from './EmbedResolver.tsx'\nimport { ValidatePayloadAlert, ValidatePluginsAlert } from './validation-alerts/index.ts'\n\nexport const EmbedPluginInner: React.FC<PropsWithChildren<EmbedPluginProps>> = ({\n validateSchema,\n plugins,\n huriPayload,\n refreshTitle = '',\n timestampLabel = 'Data From',\n hideElementsConfig,\n embedPluginConfig,\n onRefresh,\n children,\n}) => {\n return (\n <ErrorBoundary>\n <EmbedPluginProvider\n refreshTitle={refreshTitle}\n timestampLabel={timestampLabel}\n hideElementsConfig={hideElementsConfig}\n plugins={plugins}\n embedPluginConfig={embedPluginConfig}\n >\n <WithResolvers onRefresh={onRefresh} huriPayload={huriPayload}>\n <WithValidators validateSchema={validateSchema}>\n <ListModeProvider defaultListMode={embedPluginConfig?.listMode}>{children}</ListModeProvider>\n </WithValidators>\n </WithResolvers>\n </EmbedPluginProvider>\n </ErrorBoundary>\n )\n}\n\ninterface WithResolversProps extends Pick<EmbedPluginProps, 'onRefresh' | 'huriPayload'>, FlexBoxProps {}\n\nconst WithResolvers: React.FC<PropsWithChildren<WithResolversProps>> = ({\n children, onRefresh, huriPayload,\n}) => {\n return (\n <RefreshPayloadProvider onRefresh={onRefresh}>\n <ResolvePayloadProvider huriPayload={huriPayload}>\n <EmbedResolver>{children}</EmbedResolver>\n </ResolvePayloadProvider>\n </RefreshPayloadProvider>\n )\n}\n\nconst WithValidators: React.FC<PropsWithChildren<{ validateSchema?: boolean }>> = ({ children, validateSchema }) => {\n return (\n <ValidatePayloadProvider enabled={validateSchema}>\n <ValidatePluginsAlert>\n <ValidatePayloadAlert>{children}</ValidatePayloadAlert>\n </ValidatePluginsAlert>\n </ValidatePayloadProvider>\n )\n}\n","import { LoadResult } from '@xyo-network/react-shared'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { useResolvePayload } from '../contexts/index.ts'\n\nexport const EmbedResolver: React.FC<PropsWithChildren> = ({ children }) => {\n const {\n payload, notFound, huriError,\n } = useResolvePayload()\n\n return (\n <LoadResult searchResult={payload} notFound={!!notFound} error={!!huriError}>\n {children}\n </LoadResult>\n )\n}\n","import type { AlertProps } from '@mui/material'\nimport { Alert } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { useValidatePayload } from '../../contexts/index.ts'\n\nexport const ValidatePayloadAlert: React.FC<PropsWithChildren<AlertProps>> = ({ children, ...props }) => {\n const {\n validPayload, enabled, schema,\n } = useValidatePayload()\n\n if (enabled && validPayload === false) {\n return (\n <Alert severity=\"error\" title=\"Invalid Payload!\" {...props}>\n Payload schema claimed to be\n {' '}\n {schema}\n {' '}\n but failed to validate.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import type { AlertProps } from '@mui/material'\nimport { Alert, AlertTitle } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { useEmbedPluginState, useResolvePayload } from '../../contexts/index.ts'\n\nexport const ValidatePluginsAlert: React.FC<PropsWithChildren<AlertProps>> = ({ children, ...props }) => {\n const { payload } = useResolvePayload()\n const { plugins } = useEmbedPluginState()\n\n if (payload && plugins?.length === 0) {\n return (\n <Alert severity=\"warning\" {...props}>\n <AlertTitle>Missing plugins!</AlertTitle>\n Payload found but no plugins were present.\n </Alert>\n )\n }\n\n return <>{children}</>\n}\n","import type { CardProps } from '@mui/material'\nimport { ErrorAlert, ErrorRender } from '@xylabs/react-error'\nimport type { ModuleError } from '@xyo-network/payload-model'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { EmbedErrorCard } from './EmbedErrorCard.tsx'\n\ninterface EmbedCardApiErrorRendererProps extends CardProps {\n xyoError?: ModuleError\n}\n\nexport const EmbedCardApiErrorRenderer: React.FC<PropsWithChildren<EmbedCardApiErrorRendererProps>> = ({\n xyoError, children, ...props\n}) => {\n return (\n <ErrorRender error={xyoError} noReAuth noErrorDisplay customError={<CustomApiErrorCard xyoError={xyoError} {...props} />}>\n {children}\n </ErrorRender>\n )\n}\n\nconst CustomApiErrorCard: React.FC<EmbedCardApiErrorRendererProps> = ({ xyoError, ...props }) => {\n return (\n <EmbedErrorCard {...props}>\n <ErrorAlert error={xyoError} />\n </EmbedErrorCard>\n )\n}\n","import type { AlertProps, CardProps } from '@mui/material'\nimport {\n Alert, AlertTitle, Card, CardContent, Typography,\n} from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\ninterface EmbedErrorCardBaseProps {\n alertProps?: AlertProps\n error?: Error\n hideErrorDetails?: boolean\n scope?: string\n}\n\ninterface EmbedErrorCardProps extends EmbedErrorCardBaseProps, CardProps {}\n\nexport const EmbedErrorCard: React.FC<PropsWithChildren<EmbedErrorCardProps>> = (props) => {\n const {\n alertProps, error, scope, hideErrorDetails = true, children, ...cardProps\n } = props\n const errorProps = {\n alertProps, error, hideErrorDetails, scope,\n }\n return (\n <Card {...cardProps}>\n <CardContent>{children ?? <DefaultErrorAlert {...errorProps} />}</CardContent>\n </Card>\n )\n}\n\nconst DefaultErrorAlert: React.FC<EmbedErrorCardBaseProps> = ({\n alertProps, scope, hideErrorDetails, error,\n}) => {\n return (\n <Alert severity=\"error\" {...alertProps}>\n <AlertTitle>Whoops! Something went wrong</AlertTitle>\n {scope\n ? (\n <Typography variant=\"caption\">\n Scope:\n {scope}\n </Typography>\n )\n : null}\n {!hideErrorDetails && error\n ? (\n <>\n <Typography variant=\"caption\">Error: </Typography>\n <Typography variant=\"caption\">{error?.message}</Typography>\n </>\n )\n : (\n <Typography variant=\"caption\" fontSize=\"small\">\n Error Loading Plugin\n </Typography>\n )}\n </Alert>\n )\n}\n"],"mappings":";;;;AACA,SAASA,YAAY;AACrB,SAASC,qBAAqB;AAM9B,SACEC,sBACAC,0BACK;AAEP,OAAOC,WAAW;AASX,IAAMC,WAAuD,wBAAC,EACnEC,MACAC,cAAc,KAC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P,GARsG;AAUtG,IAAMQ,qBAA+D,wBAAC,EAAET,UAAU,GAAGE,MAAAA,MAAO;AAC1F,SACE,gBAAAC,QAAA,cAACO,gBAAmBR,OAClB,gBAAAC,QAAA,cAACQ,YAAAA;IAAWN,OAAOL;;AAGzB,GANqE;;;ALT9D,IAAMY,qBAAqD,wBAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAO;AACvF,QAAM,EACJC,gBACAC,UAAU,CAAA,GACVC,aACAC,eAAe,IACfC,iBAAiB,aACjBC,oBACAC,mBACAC,WACA,GAAGC,cAAAA,IACDT;AAEJ,SACE,gBAAAU,QAAA,cAACC,kBACK;IACFJ;IACAD;IACAH;IACAK;IACAN;IACAE;IACAC;IACAJ;EACF,GAEA,gBAAAS,QAAA,cAACE,sBAAyBH,aAAAA,GACzBV,QAAAA;AAGP,GA9BkE;AAgC3D,IAAMa,uBAAgD,wBAACZ,UAAAA;AAC5D,QAAM,EAAEa,SAASC,UAAS,IAAKC,kBAAAA;AAC/B,QAAM,EAAEC,eAAc,IAAKC,kBAAAA;AAC3B,QAAMC,QAAQC,SAAAA;AAEd,SACE,gBAAAT,QAAA,cAACU,2BAAAA;IAA0BC,UAAUP;KACnC,gBAAAJ,QAAA,cAACY,iBAAAA;IACCC,WAAW;IACXC,SAAQ;IACRC,MAAMC,QAAQ,CAACV,kBAAkBH,OAAAA;IACjCc,kBAAkB;MAChBC,OAAO;QACLC,YAAY;QAASC,YAAYZ,MAAMa,QAAQ,CAAA;QAAIC,QAAQ;MAC7D;IACF;IACAC,IAAI;MAAEC,UAAU;IAAW;IAC1B,GAAGlC;;AAIZ,GArB6D;","names":["Card","useBusyTiming","BusyCircularProgress","BusyLinearProgress","React","BusyCard","busy","busyMinimum","busyVariant","busyVariantProps","children","props","internalBusy","useBusyTiming","Card","BusyCircularProgress","BusyLinearProgress","Refresh","RefreshIcon","Avatar","CardHeader","Chip","FlexRow","React","createContextEx","EmbedPluginContext","useResetState","React","EmbedPluginProvider","children","refreshTitle","timestampLabel","hideElementsConfig","plugins","embedPluginConfig","activePlugin","setActivePlugin","useResetState","undefined","React","EmbedPluginContext","value","provided","useContextEx","useEmbedPluginState","useContextEx","EmbedPluginContext","React","useState","createContextEx","RefreshPayloadContext","RefreshPayloadProvider","children","onRefresh","refreshPayload","localRefreshPayload","setRefreshPayload","useState","React","RefreshPayloadContext","value","provided","useContextEx","useRefreshPayload","useContextEx","RefreshPayloadContext","createContextEx","ResolvePayloadContext","delay","useAsyncEffect","Huri","ModuleErrorSchema","React","useEffect","useState","ResolvePayloadProvider","children","huriPayload","payload","setPayload","useState","huri","setHuri","refreshPayload","setRefreshPayload","onRefresh","useRefreshPayload","useEffect","undefined","notFound","setNotFound","huriError","setHuriError","useAsyncEffect","mounted","huriInstance","Huri","result","fetch","delay","e","error","message","schema","ModuleErrorSchema","$sources","refreshHuri","React","ResolvePayloadContext","value","provided","useContextEx","useResolvePayload","useContextEx","ResolvePayloadContext","Chip","useAsyncEffect","SchemaCache","React","useState","createContextEx","ValidatePayloadContext","ValidatePayloadProvider","children","enabled","payload","useResolvePayload","initialized","setInitialized","useState","valid","setValid","useAsyncEffect","SchemaCache","instance","get","schema","possibleKnownSchema","validators","validator","React","ValidatePayloadContext","value","provided","validPayload","Chip","label","useContextEx","useValidatePayload","useContextEx","ValidatePayloadContext","MoreVert","MoreVertIcon","IconButton","Menu","React","useState","OpenInNew","OpenInNewIcon","ListItemIcon","ListItemText","MenuItem","React","JsonMenuItem","props","huri","useResolvePayload","React","MenuItem","title","onClick","window","open","ListItemText","sx","mr","ListItemIcon","justifyContent","OpenInNewIcon","fontSize","EmbedMenu","props","anchorEl","setAnchorEl","useState","open","Boolean","handleClick","event","currentTarget","handleClose","React","IconButton","onClick","MoreVertIcon","Menu","onClose","PaperProps","variant","MenuListProps","dense","JsonMenuItem","EmbedCardHeader","refreshHuri","huri","useResolvePayload","activePlugin","timestampLabel","hideElementsConfig","useEmbedPluginState","hideAvatar","hideTitle","hideRefreshButton","hideTimestamp","hideCardActions","timestamp","Date","now","React","CardHeader","sx","flexWrap","rowGap","avatar","Avatar","bgcolor","theme","vars","palette","primary","main","aria-label","name","charAt","action","FlexRow","columnGap","Chip","RefreshIcon","clickable","onClick","label","toLocaleString","undefined","EmbedMenu","title","CardContent","FlexGrowRow","useListMode","React","FormControl","InputLabel","React","EmbedFormControl","formId","formLabel","children","props","React","FormControl","InputLabel","id","MenuItem","SelectEx","useListMode","React","listModeSelectId","listModeSelectLabel","ListModeSelect","props","listMode","setListMode","useListMode","React","SelectEx","value","onChange","event","target","MenuItem","key","ListModeSelectFormControl","EmbedFormControl","formId","formLabel","size","label","labelId","MenuItem","SelectEx","React","renderSelectId","renderSelectLabel","EmbedRenderSelect","props","activePlugin","setActivePlugin","plugins","useEmbedPluginState","React","EmbedFormControl","formId","formLabel","SelectEx","size","value","name","map","plugin","MenuItem","key","onClick","EmbedPluginCard","props","payload","useResolvePayload","activePlugin","ActivePlugin","plugins","hideElementsConfig","useEmbedPluginState","listMode","useListMode","supportsListMode","components","box","listModes","length","React","BusyCard","hideCardHeader","EmbedCardHeader","FlexGrowRow","columnGap","rowGap","flexWrap","pb","EmbedRenderSelect","ListModeSelectFormControl","CardContent","sx","height","detailsBox","useTheme","React","ErrorBoundary","ListModeProvider","React","LoadResult","React","EmbedResolver","children","payload","notFound","huriError","useResolvePayload","React","LoadResult","searchResult","error","Alert","React","ValidatePayloadAlert","children","props","validPayload","enabled","schema","useValidatePayload","React","Alert","severity","title","Alert","AlertTitle","React","ValidatePluginsAlert","children","props","payload","useResolvePayload","plugins","useEmbedPluginState","length","React","Alert","severity","AlertTitle","EmbedPluginInner","validateSchema","plugins","huriPayload","refreshTitle","timestampLabel","hideElementsConfig","embedPluginConfig","onRefresh","children","React","ErrorBoundary","EmbedPluginProvider","WithResolvers","WithValidators","ListModeProvider","defaultListMode","listMode","RefreshPayloadProvider","ResolvePayloadProvider","EmbedResolver","ValidatePayloadProvider","enabled","ValidatePluginsAlert","ValidatePayloadAlert","ErrorAlert","ErrorRender","React","Alert","AlertTitle","Card","CardContent","Typography","React","EmbedErrorCard","props","alertProps","error","scope","hideErrorDetails","children","cardProps","errorProps","React","Card","CardContent","DefaultErrorAlert","Alert","severity","AlertTitle","Typography","variant","message","fontSize","EmbedCardApiErrorRenderer","xyoError","children","props","React","ErrorRender","error","noReAuth","noErrorDisplay","customError","CustomApiErrorCard","EmbedErrorCard","ErrorAlert","ApiEmbedPluginCard","children","props","validateSchema","plugins","huriPayload","refreshTitle","timestampLabel","hideElementsConfig","embedPluginConfig","onRefresh","busyCardProps","React","EmbedPluginInner","EmbedPluginCardInner","payload","huriError","useResolvePayload","refreshPayload","useRefreshPayload","theme","useTheme","EmbedCardApiErrorRenderer","xyoError","EmbedPluginCard","elevation","variant","busy","Boolean","busyVariantProps","style","alignItems","paddingTop","spacing","zIndex","sx","position"]}
@@ -1,3 +1,7 @@
1
- import type { EmbedPluginState } from './State.ts';
2
- export declare const EmbedPluginContext: import("react").Context<EmbedPluginState & import("@xyo-network/react-shared").ContextExState>;
1
+ export declare const EmbedPluginContext: import("react").Context<import("./State.ts").EmbedPluginBase & {
2
+ activePlugin?: import("@xyo-network/react-payload-plugin").PayloadRenderPlugin;
3
+ setActivePlugin?: import("react").Dispatch<import("react").SetStateAction<import("@xyo-network/react-payload-plugin").PayloadRenderPlugin | undefined>>;
4
+ } & {
5
+ provided: true;
6
+ }>;
3
7
  //# sourceMappingURL=Context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,eAAO,MAAM,kBAAkB,gGAAsC,CAAA"}
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/Context.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;;;;;EAAsC,CAAA"}
@@ -1,5 +1,6 @@
1
+ import type { ContextExState } from '@xylabs/react-shared';
1
2
  import type { PayloadRenderPlugin } from '@xyo-network/react-payload-plugin';
2
- import type { ContextExState, ListMode } from '@xyo-network/react-shared';
3
+ import type { ListMode } from '@xyo-network/react-shared';
3
4
  import type { Dispatch, SetStateAction } from 'react';
4
5
  export interface EmbedPluginVisibilityConfig {
5
6
  hideAvatar?: boolean;
@@ -26,8 +27,8 @@ export interface EmbedPluginBase {
26
27
  refreshTitle?: string;
27
28
  timestampLabel?: string;
28
29
  }
29
- export interface EmbedPluginState extends EmbedPluginBase, ContextExState {
30
+ export type EmbedPluginState = ContextExState<EmbedPluginBase & {
30
31
  activePlugin?: PayloadRenderPlugin;
31
32
  setActivePlugin?: Dispatch<SetStateAction<PayloadRenderPlugin | undefined>>;
32
- }
33
+ }>;
33
34
  //# sourceMappingURL=State.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB;AAED,MAAM,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AAE,YAAY,CAAA;IAChC,kBAAkB,CAAC,EAAE,2BAA2B,CAAA;IAChD,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,eAAe,GAAG;IAC9D,YAAY,CAAC,EAAE,mBAAmB,CAAA;IAClC,eAAe,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAAC,CAAA;CAC5E,CAAC,CAAA"}
@@ -1,2 +1,7 @@
1
- export declare const useEmbedPluginState: () => Omit<import("./State.ts").EmbedPluginState & import("@xyo-network/react-shared").ContextExState, "provided">;
1
+ export declare const useEmbedPluginState: () => Omit<import("./State.ts").EmbedPluginBase & {
2
+ activePlugin?: import("@xyo-network/react-payload-plugin").PayloadRenderPlugin;
3
+ setActivePlugin?: import("react").Dispatch<import("react").SetStateAction<import("@xyo-network/react-payload-plugin").PayloadRenderPlugin | undefined>>;
4
+ } & {
5
+ provided: true;
6
+ }, "provided"> | Omit<never, "provided">;
2
7
  //# sourceMappingURL=use.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,oHAA8D,CAAA"}
1
+ {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/EmbedPluginContext/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;;;;;wCAA8D,CAAA"}
@@ -1,3 +1,8 @@
1
- import type { RefreshPayloadState } from './State.ts';
2
- export declare const RefreshPayloadContext: import("react").Context<RefreshPayloadState & import("@xyo-network/react-shared").ContextExState>;
1
+ export declare const RefreshPayloadContext: import("react").Context<{
2
+ onRefresh?: () => void;
3
+ refreshPayload?: boolean;
4
+ setRefreshPayload?: import("react").Dispatch<import("react").SetStateAction<boolean | undefined>>;
5
+ } & {
6
+ provided: true;
7
+ }>;
3
8
  //# sourceMappingURL=Context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,eAAO,MAAM,qBAAqB,mGAAyC,CAAA"}
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/Context.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;;;;;EAAyC,CAAA"}
@@ -1,8 +1,8 @@
1
- import type { ContextExState } from '@xyo-network/react-shared';
1
+ import type { ContextExState } from '@xylabs/react-shared';
2
2
  import type { Dispatch, SetStateAction } from 'react';
3
- export interface RefreshPayloadState extends ContextExState {
3
+ export type RefreshPayloadState = ContextExState<{
4
4
  onRefresh?: () => void;
5
5
  refreshPayload?: boolean;
6
6
  setRefreshPayload?: Dispatch<SetStateAction<boolean | undefined>>;
7
- }
7
+ }>;
8
8
  //# sourceMappingURL=State.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,iBAAiB,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAA;CAClE"}
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,iBAAiB,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAA;CAClE,CAAC,CAAA"}
@@ -1,2 +1,8 @@
1
- export declare const useRefreshPayload: () => Omit<import("./State.ts").RefreshPayloadState & import("@xyo-network/react-shared").ContextExState, "provided">;
1
+ export declare const useRefreshPayload: () => Omit<{
2
+ onRefresh?: () => void;
3
+ refreshPayload?: boolean;
4
+ setRefreshPayload?: import("react").Dispatch<import("react").SetStateAction<boolean | undefined>>;
5
+ } & {
6
+ provided: true;
7
+ }, "provided"> | Omit<never, "provided">;
2
8
  //# sourceMappingURL=use.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,uHAAoE,CAAA"}
1
+ {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/RefreshPayloadContext/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;;wCAAoE,CAAA"}
@@ -1,3 +1,12 @@
1
- import type { ResolvePayloadState } from './State.ts';
2
- export declare const ResolvePayloadContext: import("react").Context<ResolvePayloadState & import("@xyo-network/react-shared").ContextExState>;
1
+ export declare const ResolvePayloadContext: import("react").Context<{
2
+ huri?: string;
3
+ huriError?: import("@xyo-network/payload-model").ModuleError;
4
+ huriPayload?: string | import("@xyo-network/payload-model").Payload;
5
+ notFound?: boolean;
6
+ payload?: import("@xyo-network/payload-model").Payload;
7
+ refreshHuri?: () => void;
8
+ setPayload?: import("react").Dispatch<import("react").SetStateAction<import("@xyo-network/payload-model").Payload | undefined>>;
9
+ } & {
10
+ provided: true;
11
+ }>;
3
12
  //# sourceMappingURL=Context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ResolvePayloadContext/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,eAAO,MAAM,qBAAqB,mGAAyC,CAAA"}
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ResolvePayloadContext/Context.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;;;;;;;;;EAAyC,CAAA"}
@@ -1,7 +1,7 @@
1
+ import type { ContextExState } from '@xylabs/react-shared';
1
2
  import type { ModuleError, Payload } from '@xyo-network/payload-model';
2
- import type { ContextExState } from '@xyo-network/react-shared';
3
3
  import type { Dispatch, SetStateAction } from 'react';
4
- export interface ResolvePayloadState extends ContextExState {
4
+ export type ResolvePayloadState = ContextExState<{
5
5
  huri?: string;
6
6
  huriError?: ModuleError;
7
7
  huriPayload?: string | Payload;
@@ -9,5 +9,5 @@ export interface ResolvePayloadState extends ContextExState {
9
9
  payload?: Payload;
10
10
  refreshHuri?: () => void;
11
11
  setPayload?: Dispatch<SetStateAction<Payload | undefined>>;
12
- }
12
+ }>;
13
13
  //# sourceMappingURL=State.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ResolvePayloadContext/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,UAAU,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAA;CAC3D"}
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ResolvePayloadContext/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,UAAU,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAA;CAC3D,CAAC,CAAA"}
@@ -1,2 +1,12 @@
1
- export declare const useResolvePayload: () => Omit<import("./State.ts").ResolvePayloadState & import("@xyo-network/react-shared").ContextExState, "provided">;
1
+ export declare const useResolvePayload: () => Omit<{
2
+ huri?: string;
3
+ huriError?: import("@xyo-network/payload-model").ModuleError;
4
+ huriPayload?: string | import("@xyo-network/payload-model").Payload;
5
+ notFound?: boolean;
6
+ payload?: import("@xyo-network/payload-model").Payload;
7
+ refreshHuri?: () => void;
8
+ setPayload?: import("react").Dispatch<import("react").SetStateAction<import("@xyo-network/payload-model").Payload | undefined>>;
9
+ } & {
10
+ provided: true;
11
+ }, "provided"> | Omit<never, "provided">;
2
12
  //# sourceMappingURL=use.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ResolvePayloadContext/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,uHAAoE,CAAA"}
1
+ {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ResolvePayloadContext/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;;;;;;wCAAoE,CAAA"}
@@ -1,3 +1,8 @@
1
- import type { ValidatePayloadState } from './State.ts';
2
- export declare const ValidatePayloadContext: import("react").Context<ValidatePayloadState & import("@xyo-network/react-shared").ContextExState>;
1
+ export declare const ValidatePayloadContext: import("react").Context<{
2
+ enabled?: boolean;
3
+ schema?: string;
4
+ validPayload?: boolean;
5
+ } & {
6
+ provided: true;
7
+ }>;
3
8
  //# sourceMappingURL=Context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ValidatePayloadContext/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEtD,eAAO,MAAM,sBAAsB,oGAA0C,CAAA"}
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ValidatePayloadContext/Context.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB;;;;;;EAA0C,CAAA"}
@@ -1,7 +1,7 @@
1
- import type { ContextExState } from '@xyo-network/react-shared';
2
- export interface ValidatePayloadState extends ContextExState {
1
+ import type { ContextExState } from '@xylabs/react-shared';
2
+ export type ValidatePayloadState = ContextExState<{
3
3
  enabled?: boolean;
4
4
  schema?: string;
5
5
  validPayload?: boolean;
6
- }
6
+ }>;
7
7
  //# sourceMappingURL=State.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ValidatePayloadContext/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB"}
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ValidatePayloadContext/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC;IAChD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC,CAAA"}
@@ -1,2 +1,8 @@
1
- export declare const useValidatePayload: () => Omit<import("./State.ts").ValidatePayloadState & import("@xyo-network/react-shared").ContextExState, "provided">;
1
+ export declare const useValidatePayload: () => Omit<{
2
+ enabled?: boolean;
3
+ schema?: string;
4
+ validPayload?: boolean;
5
+ } & {
6
+ provided: true;
7
+ }, "provided"> | Omit<never, "provided">;
2
8
  //# sourceMappingURL=use.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ValidatePayloadContext/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,wHAAqE,CAAA"}
1
+ {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ValidatePayloadContext/use.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;;;;;;wCAAqE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/react-embed",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "Common React library for all XYO projects that use React",
5
5
  "keywords": [
6
6
  "xyo",
@@ -48,8 +48,8 @@
48
48
  "@xylabs/react-shared": "^6.3.0",
49
49
  "@xyo-network/huri": "^3.15.5",
50
50
  "@xyo-network/payload-model": "^3.15.5",
51
- "@xyo-network/react-payload-plugin": "^5.3.0",
52
- "@xyo-network/react-shared": "^5.3.0",
51
+ "@xyo-network/react-payload-plugin": "^5.3.1",
52
+ "@xyo-network/react-shared": "^5.3.1",
53
53
  "@xyo-network/schema-cache": "^3.15.5"
54
54
  },
55
55
  "devDependencies": {
@@ -61,8 +61,8 @@
61
61
  "@types/react": "^19.1.4",
62
62
  "@xylabs/ts-scripts-yarn3": "^6.5.5",
63
63
  "@xylabs/tsconfig-react": "^6.5.5",
64
- "@xyo-network/react-aggregate-price-plugin": "^5.3.0",
65
- "@xyo-network/react-crypto-market-uniswap-plugin": "^5.3.0",
64
+ "@xyo-network/react-aggregate-price-plugin": "^5.3.1",
65
+ "@xyo-network/react-crypto-market-uniswap-plugin": "^5.3.1",
66
66
  "react": "^19.1.0",
67
67
  "react-dom": "^19.1.0",
68
68
  "react-router-dom": "^7.6.0",
@@ -1,4 +1,4 @@
1
- import { createContextEx } from '@xyo-network/react-shared'
1
+ import { createContextEx } from '@xylabs/react-shared'
2
2
 
3
3
  import type { EmbedPluginState } from './State.ts'
4
4
 
@@ -1,5 +1,6 @@
1
+ import type { ContextExState } from '@xylabs/react-shared'
1
2
  import type { PayloadRenderPlugin } from '@xyo-network/react-payload-plugin'
2
- import type { ContextExState, ListMode } from '@xyo-network/react-shared'
3
+ import type { ListMode } from '@xyo-network/react-shared'
3
4
  import type { Dispatch, SetStateAction } from 'react'
4
5
 
5
6
  export interface EmbedPluginVisibilityConfig {
@@ -30,7 +31,7 @@ export interface EmbedPluginBase {
30
31
  timestampLabel?: string
31
32
  }
32
33
 
33
- export interface EmbedPluginState extends EmbedPluginBase, ContextExState {
34
+ export type EmbedPluginState = ContextExState<EmbedPluginBase & {
34
35
  activePlugin?: PayloadRenderPlugin
35
36
  setActivePlugin?: Dispatch<SetStateAction<PayloadRenderPlugin | undefined>>
36
- }
37
+ }>
@@ -1,4 +1,4 @@
1
- import { useContextEx } from '@xyo-network/react-shared'
1
+ import { useContextEx } from '@xylabs/react-shared'
2
2
 
3
3
  import { EmbedPluginContext } from './Context.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- import { createContextEx } from '@xyo-network/react-shared'
1
+ import { createContextEx } from '@xylabs/react-shared'
2
2
 
3
3
  import type { RefreshPayloadState } from './State.ts'
4
4
 
@@ -1,8 +1,8 @@
1
- import type { ContextExState } from '@xyo-network/react-shared'
1
+ import type { ContextExState } from '@xylabs/react-shared'
2
2
  import type { Dispatch, SetStateAction } from 'react'
3
3
 
4
- export interface RefreshPayloadState extends ContextExState {
4
+ export type RefreshPayloadState = ContextExState<{
5
5
  onRefresh?: () => void
6
6
  refreshPayload?: boolean
7
7
  setRefreshPayload?: Dispatch<SetStateAction<boolean | undefined>>
8
- }
8
+ }>
@@ -1,4 +1,4 @@
1
- import { useContextEx } from '@xyo-network/react-shared'
1
+ import { useContextEx } from '@xylabs/react-shared'
2
2
 
3
3
  import { RefreshPayloadContext } from './Context.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- import { createContextEx } from '@xyo-network/react-shared'
1
+ import { createContextEx } from '@xylabs/react-shared'
2
2
 
3
3
  import type { ResolvePayloadState } from './State.ts'
4
4
 
@@ -1,8 +1,8 @@
1
+ import type { ContextExState } from '@xylabs/react-shared'
1
2
  import type { ModuleError, Payload } from '@xyo-network/payload-model'
2
- import type { ContextExState } from '@xyo-network/react-shared'
3
3
  import type { Dispatch, SetStateAction } from 'react'
4
4
 
5
- export interface ResolvePayloadState extends ContextExState {
5
+ export type ResolvePayloadState = ContextExState<{
6
6
  huri?: string
7
7
  huriError?: ModuleError
8
8
  huriPayload?: string | Payload
@@ -10,4 +10,4 @@ export interface ResolvePayloadState extends ContextExState {
10
10
  payload?: Payload
11
11
  refreshHuri?: () => void
12
12
  setPayload?: Dispatch<SetStateAction<Payload | undefined>>
13
- }
13
+ }>
@@ -1,4 +1,4 @@
1
- import { useContextEx } from '@xyo-network/react-shared'
1
+ import { useContextEx } from '@xylabs/react-shared'
2
2
 
3
3
  import { ResolvePayloadContext } from './Context.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- import { createContextEx } from '@xyo-network/react-shared'
1
+ import { createContextEx } from '@xylabs/react-shared'
2
2
 
3
3
  import type { ValidatePayloadState } from './State.ts'
4
4
 
@@ -18,15 +18,18 @@ const EmbedDecorator: Decorator<ValidatePayloadProviderPropsEx> = (Story, { args
18
18
  xyoEmbedPluginContext, resolvePayloadContext, ...props
19
19
  } = args
20
20
  console.log(resolvePayloadContext)
21
- return (
22
- <RefreshPayloadProvider>
23
- <ResolvePayloadContext value={resolvePayloadContext}>
24
- <EmbedPluginContext value={xyoEmbedPluginContext}>
25
- <Story {...props} />
26
- </EmbedPluginContext>
27
- </ResolvePayloadContext>
28
- </RefreshPayloadProvider>
29
- )
21
+ if (resolvePayloadContext.provided && xyoEmbedPluginContext.provided) {
22
+ return (
23
+ <RefreshPayloadProvider>
24
+ <ResolvePayloadContext value={resolvePayloadContext}>
25
+ <EmbedPluginContext value={xyoEmbedPluginContext}>
26
+ <Story {...props} />
27
+ </EmbedPluginContext>
28
+ </ResolvePayloadContext>
29
+ </RefreshPayloadProvider>
30
+ )
31
+ }
32
+ return <></>
30
33
  }
31
34
 
32
35
  const StorybookEntry: Meta<ValidatePayloadProviderPropsEx> = {
@@ -65,14 +68,14 @@ Default.args = { resolvePayloadContext: stubProviderDefaultValue, xyoEmbedPlugin
65
68
  const ValidationSucceeded = Template.bind({})
66
69
  ValidationSucceeded.args = {
67
70
  enabled: true,
68
- resolvePayloadContext: { payload: ValidPayload, ...stubProviderDefaultValue },
71
+ resolvePayloadContext: { payload: ValidPayload, ...stubProviderDefaultValue } as ResolvePayloadState,
69
72
  xyoEmbedPluginContext: stubProviderDefaultValue,
70
73
  }
71
74
 
72
75
  const ValidationFailed = Template.bind({})
73
76
  ValidationFailed.args = {
74
77
  enabled: true,
75
- resolvePayloadContext: { payload: InvalidPayload, ...stubProviderDefaultValue },
78
+ resolvePayloadContext: { payload: InvalidPayload, ...stubProviderDefaultValue } as ResolvePayloadState,
76
79
  xyoEmbedPluginContext: stubProviderDefaultValue,
77
80
  }
78
81
 
@@ -1,7 +1,7 @@
1
- import type { ContextExState } from '@xyo-network/react-shared'
1
+ import type { ContextExState } from '@xylabs/react-shared'
2
2
 
3
- export interface ValidatePayloadState extends ContextExState {
3
+ export type ValidatePayloadState = ContextExState<{
4
4
  enabled?: boolean
5
5
  schema?: string
6
6
  validPayload?: boolean
7
- }
7
+ }>
@@ -1,4 +1,4 @@
1
- import { useContextEx } from '@xyo-network/react-shared'
1
+ import { useContextEx } from '@xylabs/react-shared'
2
2
 
3
3
  import { ValidatePayloadContext } from './Context.ts'
4
4