@gravity-ui/data-source 0.10.0-alpha.2 → 0.10.0-alpha.4

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 (35) hide show
  1. package/build/cjs/react/components/AsyncBoundary/types.d.ts +2 -2
  2. package/build/cjs/react/components/AsyncBoundary/types.js.map +1 -1
  3. package/build/cjs/react/components/AsyncBoundary/withAsyncBoundary.d.ts +3 -2
  4. package/build/cjs/react/components/AsyncBoundary/withAsyncBoundary.js +9 -5
  5. package/build/cjs/react/components/AsyncBoundary/withAsyncBoundary.js.map +1 -1
  6. package/build/cjs/react-query/components/QueryAsyncBoundary/types.d.ts +4 -3
  7. package/build/cjs/react-query/components/QueryAsyncBoundary/types.js.map +1 -1
  8. package/build/cjs/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.d.ts +3 -2
  9. package/build/cjs/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.js +9 -5
  10. package/build/cjs/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.js.map +1 -1
  11. package/build/esm/react/components/AsyncBoundary/types.d.ts +2 -2
  12. package/build/esm/react/components/AsyncBoundary/types.js.map +1 -1
  13. package/build/esm/react/components/AsyncBoundary/withAsyncBoundary.d.ts +3 -2
  14. package/build/esm/react/components/AsyncBoundary/withAsyncBoundary.js +9 -5
  15. package/build/esm/react/components/AsyncBoundary/withAsyncBoundary.js.map +1 -1
  16. package/build/esm/react-query/components/QueryAsyncBoundary/types.d.ts +4 -3
  17. package/build/esm/react-query/components/QueryAsyncBoundary/types.js.map +1 -1
  18. package/build/esm/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.d.ts +3 -2
  19. package/build/esm/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.js +9 -5
  20. package/build/esm/react-query/components/QueryAsyncBoundary/withQueryAsyncBoundary.js.map +1 -1
  21. package/build/plugin/esbuild.cjs +1 -1
  22. package/build/plugin/esbuild.mjs +1 -1
  23. package/build/plugin/{factory-Bjj8NXy2.mjs → factory--H-amlua.mjs} +3 -2
  24. package/build/plugin/{factory-D7zGeCrN.cjs → factory-CmOH3Kh6.cjs} +3 -2
  25. package/build/plugin/index.cjs +1 -1
  26. package/build/plugin/index.mjs +1 -1
  27. package/build/plugin/rollup.cjs +1 -1
  28. package/build/plugin/rollup.mjs +1 -1
  29. package/build/plugin/rspack.cjs +1 -1
  30. package/build/plugin/rspack.mjs +1 -1
  31. package/build/plugin/vite.cjs +1 -1
  32. package/build/plugin/vite.mjs +1 -1
  33. package/build/plugin/webpack.cjs +1 -1
  34. package/build/plugin/webpack.mjs +1 -1
  35. package/package.json +1 -1
@@ -8,6 +8,6 @@ export interface AsyncBoundaryProps {
8
8
  }
9
9
  export interface AsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {
10
10
  Content: React.ComponentType<TProps>;
11
- Loading: AsyncBoundaryProps['LoadingView'];
12
- Error: AsyncBoundaryProps['ErrorView'];
11
+ Loading: ComponentType<TProps>;
12
+ Error: ComponentType<TProps & ErrorViewProps>;
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {ComponentType, ReactNode} from 'react';\n\nimport type {ErrorViewProps} from '../types';\n\nexport interface AsyncBoundaryProps {\n LoadingView: ComponentType;\n ErrorView: ComponentType<ErrorViewProps>;\n onReset?: () => void;\n children: ReactNode;\n}\n\nexport interface AsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {\n Content: React.ComponentType<TProps>;\n Loading: AsyncBoundaryProps['LoadingView'];\n Error: AsyncBoundaryProps['ErrorView'];\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {ComponentType, ReactNode} from 'react';\n\nimport type {ErrorViewProps} from '../types';\n\nexport interface AsyncBoundaryProps {\n LoadingView: ComponentType;\n ErrorView: ComponentType<ErrorViewProps>;\n onReset?: () => void;\n children: ReactNode;\n}\n\nexport interface AsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {\n Content: React.ComponentType<TProps>;\n Loading: ComponentType<TProps>;\n Error: ComponentType<TProps & ErrorViewProps>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
- import type { AsyncBoundaryComponent, AsyncBoundaryProps } from './types';
3
- export declare const withAsyncBoundary: <TProps extends object>(Component: React.ComponentType<TProps>, LoadingView: AsyncBoundaryProps["LoadingView"], ErrorView: AsyncBoundaryProps["ErrorView"]) => AsyncBoundaryComponent<TProps>;
2
+ import type { ErrorViewProps } from '../types';
3
+ import type { AsyncBoundaryComponent } from './types';
4
+ export declare const withAsyncBoundary: <TProps extends object>(Component: React.ComponentType<TProps>, LoadingView: React.ComponentType<TProps>, ErrorView: React.ComponentType<TProps & ErrorViewProps>) => AsyncBoundaryComponent<TProps>;
@@ -9,18 +9,22 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _AsyncBoundary = require("./AsyncBoundary");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- var withAsyncBoundary = exports.withAsyncBoundary = function withAsyncBoundary(Component, LoadingView, ErrorView) {
12
+ var withAsyncBoundary = exports.withAsyncBoundary = function withAsyncBoundary(Component, _LoadingView, _ErrorView) {
13
13
  var WrappedComponent = function WrappedComponent(props) {
14
14
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AsyncBoundary.AsyncBoundary, {
15
- LoadingView: LoadingView,
16
- ErrorView: ErrorView,
15
+ LoadingView: function LoadingView() {
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingView, (0, _objectSpread2.default)({}, props));
17
+ },
18
+ ErrorView: function ErrorView(errorProps) {
19
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ErrorView, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), errorProps));
20
+ },
17
21
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, (0, _objectSpread2.default)({}, props))
18
22
  });
19
23
  };
20
24
  WrappedComponent.displayName = "WithAsyncBoundary(".concat(Component.displayName || Component.name, ")");
21
25
  WrappedComponent.Content = Component;
22
- WrappedComponent.Loading = LoadingView;
23
- WrappedComponent.Error = ErrorView;
26
+ WrappedComponent.Loading = _LoadingView;
27
+ WrappedComponent.Error = _ErrorView;
24
28
  return WrappedComponent;
25
29
  };
26
30
  // #sourceMappingURL=withAsyncBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_AsyncBoundary","_jsxRuntime","e","__esModule","default","withAsyncBoundary","exports","Component","LoadingView","ErrorView","WrappedComponent","props","_jsx","AsyncBoundary","children","_objectSpread","displayName","concat","name","Content","Loading","Error"],"sources":["withAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport {AsyncBoundary} from './AsyncBoundary';\nimport type {AsyncBoundaryComponent, AsyncBoundaryProps} from './types';\n\nexport const withAsyncBoundary = <TProps extends object>(\n Component: React.ComponentType<TProps>,\n LoadingView: AsyncBoundaryProps['LoadingView'],\n ErrorView: AsyncBoundaryProps['ErrorView'],\n) => {\n const WrappedComponent = ((props: TProps) => (\n <AsyncBoundary LoadingView={LoadingView} ErrorView={ErrorView}>\n <Component {...props} />\n </AsyncBoundary>\n )) as AsyncBoundaryComponent<TProps>;\n\n WrappedComponent.displayName = `WithAsyncBoundary(${Component.displayName || Component.name})`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAA8C,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGvC,IAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,SAApBA,iBAAiBA,CAC1BE,SAAsC,EACtCC,WAA8C,EAC9CC,SAA0C,EACzC;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAAa;IAAA,oBACpC,IAAAC,eAAA,EAACC,4BAAa;MAACL,WAAW,EAAEA,WAAY;MAACC,SAAS,EAAEA,SAAU;MAAAK,QAAA,eAC1D,IAAAF,eAAA,EAACL,SAAS,MAAAQ,sBAAA,MAAKJ,KAAK,CAAG;IAAC,CACb,CAAC;EAAA,CACgB;EAEpCD,gBAAgB,CAACM,WAAW,wBAAAC,MAAA,CAAwBV,SAAS,CAACS,WAAW,IAAIT,SAAS,CAACW,IAAI,MAAG;EAE9FR,gBAAgB,CAACS,OAAO,GAAGZ,SAAS;EACpCG,gBAAgB,CAACU,OAAO,GAAGZ,WAAW;EACtCE,gBAAgB,CAACW,KAAK,GAAGZ,SAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_AsyncBoundary","_jsxRuntime","e","__esModule","default","withAsyncBoundary","exports","Component","_LoadingView","_ErrorView","WrappedComponent","props","_jsx","AsyncBoundary","LoadingView","_objectSpread","ErrorView","errorProps","children","displayName","concat","name","Content","Loading","Error"],"sources":["withAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport type {ErrorViewProps} from '../types';\n\nimport {AsyncBoundary} from './AsyncBoundary';\nimport type {AsyncBoundaryComponent} from './types';\n\nexport const withAsyncBoundary = <TProps extends object>(\n Component: React.ComponentType<TProps>,\n LoadingView: React.ComponentType<TProps>,\n ErrorView: React.ComponentType<TProps & ErrorViewProps>,\n) => {\n const WrappedComponent = ((props: TProps) => (\n <AsyncBoundary\n LoadingView={() => <LoadingView {...props} />}\n ErrorView={(errorProps) => <ErrorView {...props} {...errorProps} />}\n >\n <Component {...props} />\n </AsyncBoundary>\n )) as AsyncBoundaryComponent<TProps>;\n\n WrappedComponent.displayName = `WithAsyncBoundary(${Component.displayName || Component.name})`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,cAAA,GAAAD,OAAA;AAA8C,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGvC,IAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,SAApBA,iBAAiBA,CAC1BE,SAAsC,EACtCC,YAAwC,EACxCC,UAAuD,EACtD;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAAa;IAAA,oBACpC,IAAAC,eAAA,EAACC,4BAAa;MACVC,WAAW,EAAE,SAAbA,WAAWA,CAAA;QAAA,oBAAQ,IAAAF,eAAA,EAACJ,YAAW,MAAAO,sBAAA,MAAKJ,KAAK,CAAG,CAAC;MAAA,CAAC;MAC9CK,SAAS,EAAE,SAAXA,SAASA,CAAGC,UAAU;QAAA,oBAAK,IAAAL,eAAA,EAACH,UAAS,MAAAM,sBAAA,MAAAA,sBAAA,MAAKJ,KAAK,GAAMM,UAAU,CAAG,CAAC;MAAA,CAAC;MAAAC,QAAA,eAEpE,IAAAN,eAAA,EAACL,SAAS,MAAAQ,sBAAA,MAAKJ,KAAK,CAAG;IAAC,CACb,CAAC;EAAA,CACgB;EAEpCD,gBAAgB,CAACS,WAAW,wBAAAC,MAAA,CAAwBb,SAAS,CAACY,WAAW,IAAIZ,SAAS,CAACc,IAAI,MAAG;EAE9FX,gBAAgB,CAACY,OAAO,GAAGf,SAAS;EACpCG,gBAAgB,CAACa,OAAO,GAAGf,YAAW;EACtCE,gBAAgB,CAACc,KAAK,GAAGf,UAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
@@ -1,8 +1,9 @@
1
- import type { AsyncBoundaryProps } from '../../../react';
1
+ import type { ComponentType } from 'react';
2
+ import type { AsyncBoundaryProps, ErrorViewProps } from '../../../react';
2
3
  export interface QueryAsyncBoundaryProps extends AsyncBoundaryProps {
3
4
  }
4
5
  export interface QueryAsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {
5
6
  Content: React.ComponentType<TProps>;
6
- Loading: QueryAsyncBoundaryProps['LoadingView'];
7
- Error: QueryAsyncBoundaryProps['ErrorView'];
7
+ Loading: ComponentType<TProps>;
8
+ Error: ComponentType<TProps & ErrorViewProps>;
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {AsyncBoundaryProps} from '../../../react';\n\nexport interface QueryAsyncBoundaryProps extends AsyncBoundaryProps {}\n\nexport interface QueryAsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {\n Content: React.ComponentType<TProps>;\n Loading: QueryAsyncBoundaryProps['LoadingView'];\n Error: QueryAsyncBoundaryProps['ErrorView'];\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {ComponentType} from 'react';\n\nimport type {AsyncBoundaryProps, ErrorViewProps} from '../../../react';\n\nexport interface QueryAsyncBoundaryProps extends AsyncBoundaryProps {}\n\nexport interface QueryAsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {\n Content: React.ComponentType<TProps>;\n Loading: ComponentType<TProps>;\n Error: ComponentType<TProps & ErrorViewProps>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
- import type { QueryAsyncBoundaryComponent, QueryAsyncBoundaryProps } from './types';
3
- export declare const withQueryAsyncBoundary: <TProps extends object>(Component: React.ComponentType<TProps>, LoadingView: QueryAsyncBoundaryProps["LoadingView"], ErrorView: QueryAsyncBoundaryProps["ErrorView"]) => QueryAsyncBoundaryComponent<TProps>;
2
+ import type { ErrorViewProps } from '../../../react';
3
+ import type { QueryAsyncBoundaryComponent } from './types';
4
+ export declare const withQueryAsyncBoundary: <TProps extends object>(Component: React.ComponentType<TProps>, LoadingView: React.ComponentType<TProps>, ErrorView: React.ComponentType<TProps & ErrorViewProps>) => QueryAsyncBoundaryComponent<TProps>;
@@ -9,18 +9,22 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _QueryAsyncBoundary = require("./QueryAsyncBoundary");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- var withQueryAsyncBoundary = exports.withQueryAsyncBoundary = function withQueryAsyncBoundary(Component, LoadingView, ErrorView) {
12
+ var withQueryAsyncBoundary = exports.withQueryAsyncBoundary = function withQueryAsyncBoundary(Component, _LoadingView, _ErrorView) {
13
13
  var WrappedComponent = function WrappedComponent(props) {
14
14
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryAsyncBoundary.QueryAsyncBoundary, {
15
- LoadingView: LoadingView,
16
- ErrorView: ErrorView,
15
+ LoadingView: function LoadingView() {
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingView, (0, _objectSpread2.default)({}, props));
17
+ },
18
+ ErrorView: function ErrorView(errorProps) {
19
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ErrorView, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), errorProps));
20
+ },
17
21
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, (0, _objectSpread2.default)({}, props))
18
22
  });
19
23
  };
20
24
  WrappedComponent.displayName = "WithQueryAsyncBoundary(".concat(Component.displayName || Component.name, ")");
21
25
  WrappedComponent.Content = Component;
22
- WrappedComponent.Loading = LoadingView;
23
- WrappedComponent.Error = ErrorView;
26
+ WrappedComponent.Loading = _LoadingView;
27
+ WrappedComponent.Error = _ErrorView;
24
28
  return WrappedComponent;
25
29
  };
26
30
  // #sourceMappingURL=withQueryAsyncBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_QueryAsyncBoundary","_jsxRuntime","e","__esModule","default","withQueryAsyncBoundary","exports","Component","LoadingView","ErrorView","WrappedComponent","props","_jsx","QueryAsyncBoundary","children","_objectSpread","displayName","concat","name","Content","Loading","Error"],"sources":["withQueryAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport {QueryAsyncBoundary} from './QueryAsyncBoundary';\nimport type {QueryAsyncBoundaryComponent, QueryAsyncBoundaryProps} from './types';\n\nexport const withQueryAsyncBoundary = <TProps extends object>(\n Component: React.ComponentType<TProps>,\n LoadingView: QueryAsyncBoundaryProps['LoadingView'],\n ErrorView: QueryAsyncBoundaryProps['ErrorView'],\n) => {\n const WrappedComponent = ((props: TProps) => (\n <QueryAsyncBoundary LoadingView={LoadingView} ErrorView={ErrorView}>\n <Component {...props} />\n </QueryAsyncBoundary>\n )) as QueryAsyncBoundaryComponent<TProps>;\n\n WrappedComponent.displayName = `WithQueryAsyncBoundary(${\n Component.displayName || Component.name\n })`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AAAwD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGjD,IAAMG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,SAAzBA,sBAAsBA,CAC/BE,SAAsC,EACtCC,WAAmD,EACnDC,SAA+C,EAC9C;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAAa;IAAA,oBACpC,IAAAC,eAAA,EAACC,sCAAkB;MAACL,WAAW,EAAEA,WAAY;MAACC,SAAS,EAAEA,SAAU;MAAAK,QAAA,eAC/D,IAAAF,eAAA,EAACL,SAAS,MAAAQ,sBAAA,MAAKJ,KAAK,CAAG;IAAC,CACR,CAAC;EAAA,CACgB;EAEzCD,gBAAgB,CAACM,WAAW,6BAAAC,MAAA,CACxBV,SAAS,CAACS,WAAW,IAAIT,SAAS,CAACW,IAAI,MACxC;EAEHR,gBAAgB,CAACS,OAAO,GAAGZ,SAAS;EACpCG,gBAAgB,CAACU,OAAO,GAAGZ,WAAW;EACtCE,gBAAgB,CAACW,KAAK,GAAGZ,SAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_QueryAsyncBoundary","_jsxRuntime","e","__esModule","default","withQueryAsyncBoundary","exports","Component","_LoadingView","_ErrorView","WrappedComponent","props","_jsx","QueryAsyncBoundary","LoadingView","_objectSpread","ErrorView","errorProps","children","displayName","concat","name","Content","Loading","Error"],"sources":["withQueryAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport type {ErrorViewProps} from '../../../react';\n\nimport {QueryAsyncBoundary} from './QueryAsyncBoundary';\nimport type {QueryAsyncBoundaryComponent} from './types';\n\nexport const withQueryAsyncBoundary = <TProps extends object>(\n Component: React.ComponentType<TProps>,\n LoadingView: React.ComponentType<TProps>,\n ErrorView: React.ComponentType<TProps & ErrorViewProps>,\n) => {\n const WrappedComponent = ((props: TProps) => (\n <QueryAsyncBoundary\n LoadingView={() => <LoadingView {...props} />}\n ErrorView={(errorProps) => <ErrorView {...props} {...errorProps} />}\n >\n <Component {...props} />\n </QueryAsyncBoundary>\n )) as QueryAsyncBoundaryComponent<TProps>;\n\n WrappedComponent.displayName = `WithQueryAsyncBoundary(${\n Component.displayName || Component.name\n })`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,mBAAA,GAAAD,OAAA;AAAwD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGjD,IAAMG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,SAAzBA,sBAAsBA,CAC/BE,SAAsC,EACtCC,YAAwC,EACxCC,UAAuD,EACtD;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAAa;IAAA,oBACpC,IAAAC,eAAA,EAACC,sCAAkB;MACfC,WAAW,EAAE,SAAbA,WAAWA,CAAA;QAAA,oBAAQ,IAAAF,eAAA,EAACJ,YAAW,MAAAO,sBAAA,MAAKJ,KAAK,CAAG,CAAC;MAAA,CAAC;MAC9CK,SAAS,EAAE,SAAXA,SAASA,CAAGC,UAAU;QAAA,oBAAK,IAAAL,eAAA,EAACH,UAAS,MAAAM,sBAAA,MAAAA,sBAAA,MAAKJ,KAAK,GAAMM,UAAU,CAAG,CAAC;MAAA,CAAC;MAAAC,QAAA,eAEpE,IAAAN,eAAA,EAACL,SAAS,MAAAQ,sBAAA,MAAKJ,KAAK,CAAG;IAAC,CACR,CAAC;EAAA,CACgB;EAEzCD,gBAAgB,CAACS,WAAW,6BAAAC,MAAA,CACxBb,SAAS,CAACY,WAAW,IAAIZ,SAAS,CAACc,IAAI,MACxC;EAEHX,gBAAgB,CAACY,OAAO,GAAGf,SAAS;EACpCG,gBAAgB,CAACa,OAAO,GAAGf,YAAW;EACtCE,gBAAgB,CAACc,KAAK,GAAGf,UAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
@@ -8,6 +8,6 @@ export interface AsyncBoundaryProps {
8
8
  }
9
9
  export interface AsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {
10
10
  Content: React.ComponentType<TProps>;
11
- Loading: AsyncBoundaryProps['LoadingView'];
12
- Error: AsyncBoundaryProps['ErrorView'];
11
+ Loading: ComponentType<TProps>;
12
+ Error: ComponentType<TProps & ErrorViewProps>;
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {ComponentType, ReactNode} from 'react';\n\nimport type {ErrorViewProps} from '../types';\n\nexport interface AsyncBoundaryProps {\n LoadingView: ComponentType;\n ErrorView: ComponentType<ErrorViewProps>;\n onReset?: () => void;\n children: ReactNode;\n}\n\nexport interface AsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {\n Content: React.ComponentType<TProps>;\n Loading: AsyncBoundaryProps['LoadingView'];\n Error: AsyncBoundaryProps['ErrorView'];\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {ComponentType, ReactNode} from 'react';\n\nimport type {ErrorViewProps} from '../types';\n\nexport interface AsyncBoundaryProps {\n LoadingView: ComponentType;\n ErrorView: ComponentType<ErrorViewProps>;\n onReset?: () => void;\n children: ReactNode;\n}\n\nexport interface AsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {\n Content: React.ComponentType<TProps>;\n Loading: ComponentType<TProps>;\n Error: ComponentType<TProps & ErrorViewProps>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
- import type { AsyncBoundaryComponent, AsyncBoundaryProps } from './types';
3
- export declare const withAsyncBoundary: <TProps extends object>(Component: React.ComponentType<TProps>, LoadingView: AsyncBoundaryProps["LoadingView"], ErrorView: AsyncBoundaryProps["ErrorView"]) => AsyncBoundaryComponent<TProps>;
2
+ import type { ErrorViewProps } from '../types';
3
+ import type { AsyncBoundaryComponent } from './types';
4
+ export declare const withAsyncBoundary: <TProps extends object>(Component: React.ComponentType<TProps>, LoadingView: React.ComponentType<TProps>, ErrorView: React.ComponentType<TProps & ErrorViewProps>) => AsyncBoundaryComponent<TProps>;
@@ -2,18 +2,22 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import React from 'react';
3
3
  import { AsyncBoundary } from './AsyncBoundary';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
- export var withAsyncBoundary = function withAsyncBoundary(Component, LoadingView, ErrorView) {
5
+ export var withAsyncBoundary = function withAsyncBoundary(Component, _LoadingView, _ErrorView) {
6
6
  var WrappedComponent = function WrappedComponent(props) {
7
7
  return /*#__PURE__*/_jsx(AsyncBoundary, {
8
- LoadingView: LoadingView,
9
- ErrorView: ErrorView,
8
+ LoadingView: function LoadingView() {
9
+ return /*#__PURE__*/_jsx(_LoadingView, _objectSpread({}, props));
10
+ },
11
+ ErrorView: function ErrorView(errorProps) {
12
+ return /*#__PURE__*/_jsx(_ErrorView, _objectSpread(_objectSpread({}, props), errorProps));
13
+ },
10
14
  children: /*#__PURE__*/_jsx(Component, _objectSpread({}, props))
11
15
  });
12
16
  };
13
17
  WrappedComponent.displayName = "WithAsyncBoundary(".concat(Component.displayName || Component.name, ")");
14
18
  WrappedComponent.Content = Component;
15
- WrappedComponent.Loading = LoadingView;
16
- WrappedComponent.Error = ErrorView;
19
+ WrappedComponent.Loading = _LoadingView;
20
+ WrappedComponent.Error = _ErrorView;
17
21
  return WrappedComponent;
18
22
  };
19
23
  // #sourceMappingURL=withAsyncBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","AsyncBoundary","jsx","_jsx","withAsyncBoundary","Component","LoadingView","ErrorView","WrappedComponent","props","children","_objectSpread","displayName","concat","name","Content","Loading","Error"],"sources":["withAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport {AsyncBoundary} from './AsyncBoundary';\nimport type {AsyncBoundaryComponent, AsyncBoundaryProps} from './types';\n\nexport const withAsyncBoundary = <TProps extends object>(\n Component: React.ComponentType<TProps>,\n LoadingView: AsyncBoundaryProps['LoadingView'],\n ErrorView: AsyncBoundaryProps['ErrorView'],\n) => {\n const WrappedComponent = ((props: TProps) => (\n <AsyncBoundary LoadingView={LoadingView} ErrorView={ErrorView}>\n <Component {...props} />\n </AsyncBoundary>\n )) as AsyncBoundaryComponent<TProps>;\n\n WrappedComponent.displayName = `WithAsyncBoundary(${Component.displayName || Component.name})`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,aAAa,QAAO,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG9C,OAAO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAC1BC,SAAsC,EACtCC,WAA8C,EAC9CC,SAA0C,EACzC;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAAa;IAAA,oBACpCN,IAAA,CAACF,aAAa;MAACK,WAAW,EAAEA,WAAY;MAACC,SAAS,EAAEA,SAAU;MAAAG,QAAA,eAC1DP,IAAA,CAACE,SAAS,EAAAM,aAAA,KAAKF,KAAK,CAAG;IAAC,CACb,CAAC;EAAA,CACgB;EAEpCD,gBAAgB,CAACI,WAAW,wBAAAC,MAAA,CAAwBR,SAAS,CAACO,WAAW,IAAIP,SAAS,CAACS,IAAI,MAAG;EAE9FN,gBAAgB,CAACO,OAAO,GAAGV,SAAS;EACpCG,gBAAgB,CAACQ,OAAO,GAAGV,WAAW;EACtCE,gBAAgB,CAACS,KAAK,GAAGV,SAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","AsyncBoundary","jsx","_jsx","withAsyncBoundary","Component","LoadingView","ErrorView","WrappedComponent","props","_LoadingView","_objectSpread","errorProps","_ErrorView","children","displayName","concat","name","Content","Loading","Error"],"sources":["withAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport type {ErrorViewProps} from '../types';\n\nimport {AsyncBoundary} from './AsyncBoundary';\nimport type {AsyncBoundaryComponent} from './types';\n\nexport const withAsyncBoundary = <TProps extends object>(\n Component: React.ComponentType<TProps>,\n LoadingView: React.ComponentType<TProps>,\n ErrorView: React.ComponentType<TProps & ErrorViewProps>,\n) => {\n const WrappedComponent = ((props: TProps) => (\n <AsyncBoundary\n LoadingView={() => <LoadingView {...props} />}\n ErrorView={(errorProps) => <ErrorView {...props} {...errorProps} />}\n >\n <Component {...props} />\n </AsyncBoundary>\n )) as AsyncBoundaryComponent<TProps>;\n\n WrappedComponent.displayName = `WithAsyncBoundary(${Component.displayName || Component.name})`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAIzB,SAAQC,aAAa,QAAO,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG9C,OAAO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAC1BC,SAAsC,EACtCC,YAAwC,EACxCC,UAAuD,EACtD;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAAa;IAAA,oBACpCN,IAAA,CAACF,aAAa;MACVK,WAAW,EAAE,SAAbA,WAAWA,CAAA;QAAA,oBAAQH,IAAA,CAACO,YAAW,EAAAC,aAAA,KAAKF,KAAK,CAAG,CAAC;MAAA,CAAC;MAC9CF,SAAS,EAAE,SAAXA,SAASA,CAAGK,UAAU;QAAA,oBAAKT,IAAA,CAACU,UAAS,EAAAF,aAAA,CAAAA,aAAA,KAAKF,KAAK,GAAMG,UAAU,CAAG,CAAC;MAAA,CAAC;MAAAE,QAAA,eAEpEX,IAAA,CAACE,SAAS,EAAAM,aAAA,KAAKF,KAAK,CAAG;IAAC,CACb,CAAC;EAAA,CACgB;EAEpCD,gBAAgB,CAACO,WAAW,wBAAAC,MAAA,CAAwBX,SAAS,CAACU,WAAW,IAAIV,SAAS,CAACY,IAAI,MAAG;EAE9FT,gBAAgB,CAACU,OAAO,GAAGb,SAAS;EACpCG,gBAAgB,CAACW,OAAO,GAAGb,YAAW;EACtCE,gBAAgB,CAACY,KAAK,GAAGb,UAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
@@ -1,8 +1,9 @@
1
- import type { AsyncBoundaryProps } from '../../../react';
1
+ import type { ComponentType } from 'react';
2
+ import type { AsyncBoundaryProps, ErrorViewProps } from '../../../react';
2
3
  export interface QueryAsyncBoundaryProps extends AsyncBoundaryProps {
3
4
  }
4
5
  export interface QueryAsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {
5
6
  Content: React.ComponentType<TProps>;
6
- Loading: QueryAsyncBoundaryProps['LoadingView'];
7
- Error: QueryAsyncBoundaryProps['ErrorView'];
7
+ Loading: ComponentType<TProps>;
8
+ Error: ComponentType<TProps & ErrorViewProps>;
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {AsyncBoundaryProps} from '../../../react';\n\nexport interface QueryAsyncBoundaryProps extends AsyncBoundaryProps {}\n\nexport interface QueryAsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {\n Content: React.ComponentType<TProps>;\n Loading: QueryAsyncBoundaryProps['LoadingView'];\n Error: QueryAsyncBoundaryProps['ErrorView'];\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {ComponentType} from 'react';\n\nimport type {AsyncBoundaryProps, ErrorViewProps} from '../../../react';\n\nexport interface QueryAsyncBoundaryProps extends AsyncBoundaryProps {}\n\nexport interface QueryAsyncBoundaryComponent<TProps extends object> extends React.FC<TProps> {\n Content: React.ComponentType<TProps>;\n Loading: ComponentType<TProps>;\n Error: ComponentType<TProps & ErrorViewProps>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
- import type { QueryAsyncBoundaryComponent, QueryAsyncBoundaryProps } from './types';
3
- export declare const withQueryAsyncBoundary: <TProps extends object>(Component: React.ComponentType<TProps>, LoadingView: QueryAsyncBoundaryProps["LoadingView"], ErrorView: QueryAsyncBoundaryProps["ErrorView"]) => QueryAsyncBoundaryComponent<TProps>;
2
+ import type { ErrorViewProps } from '../../../react';
3
+ import type { QueryAsyncBoundaryComponent } from './types';
4
+ export declare const withQueryAsyncBoundary: <TProps extends object>(Component: React.ComponentType<TProps>, LoadingView: React.ComponentType<TProps>, ErrorView: React.ComponentType<TProps & ErrorViewProps>) => QueryAsyncBoundaryComponent<TProps>;
@@ -2,18 +2,22 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import React from 'react';
3
3
  import { QueryAsyncBoundary } from './QueryAsyncBoundary';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
- export var withQueryAsyncBoundary = function withQueryAsyncBoundary(Component, LoadingView, ErrorView) {
5
+ export var withQueryAsyncBoundary = function withQueryAsyncBoundary(Component, _LoadingView, _ErrorView) {
6
6
  var WrappedComponent = function WrappedComponent(props) {
7
7
  return /*#__PURE__*/_jsx(QueryAsyncBoundary, {
8
- LoadingView: LoadingView,
9
- ErrorView: ErrorView,
8
+ LoadingView: function LoadingView() {
9
+ return /*#__PURE__*/_jsx(_LoadingView, _objectSpread({}, props));
10
+ },
11
+ ErrorView: function ErrorView(errorProps) {
12
+ return /*#__PURE__*/_jsx(_ErrorView, _objectSpread(_objectSpread({}, props), errorProps));
13
+ },
10
14
  children: /*#__PURE__*/_jsx(Component, _objectSpread({}, props))
11
15
  });
12
16
  };
13
17
  WrappedComponent.displayName = "WithQueryAsyncBoundary(".concat(Component.displayName || Component.name, ")");
14
18
  WrappedComponent.Content = Component;
15
- WrappedComponent.Loading = LoadingView;
16
- WrappedComponent.Error = ErrorView;
19
+ WrappedComponent.Loading = _LoadingView;
20
+ WrappedComponent.Error = _ErrorView;
17
21
  return WrappedComponent;
18
22
  };
19
23
  // #sourceMappingURL=withQueryAsyncBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","QueryAsyncBoundary","jsx","_jsx","withQueryAsyncBoundary","Component","LoadingView","ErrorView","WrappedComponent","props","children","_objectSpread","displayName","concat","name","Content","Loading","Error"],"sources":["withQueryAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport {QueryAsyncBoundary} from './QueryAsyncBoundary';\nimport type {QueryAsyncBoundaryComponent, QueryAsyncBoundaryProps} from './types';\n\nexport const withQueryAsyncBoundary = <TProps extends object>(\n Component: React.ComponentType<TProps>,\n LoadingView: QueryAsyncBoundaryProps['LoadingView'],\n ErrorView: QueryAsyncBoundaryProps['ErrorView'],\n) => {\n const WrappedComponent = ((props: TProps) => (\n <QueryAsyncBoundary LoadingView={LoadingView} ErrorView={ErrorView}>\n <Component {...props} />\n </QueryAsyncBoundary>\n )) as QueryAsyncBoundaryComponent<TProps>;\n\n WrappedComponent.displayName = `WithQueryAsyncBoundary(${\n Component.displayName || Component.name\n })`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,kBAAkB,QAAO,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGxD,OAAO,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAC/BC,SAAsC,EACtCC,WAAmD,EACnDC,SAA+C,EAC9C;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAAa;IAAA,oBACpCN,IAAA,CAACF,kBAAkB;MAACK,WAAW,EAAEA,WAAY;MAACC,SAAS,EAAEA,SAAU;MAAAG,QAAA,eAC/DP,IAAA,CAACE,SAAS,EAAAM,aAAA,KAAKF,KAAK,CAAG;IAAC,CACR,CAAC;EAAA,CACgB;EAEzCD,gBAAgB,CAACI,WAAW,6BAAAC,MAAA,CACxBR,SAAS,CAACO,WAAW,IAAIP,SAAS,CAACS,IAAI,MACxC;EAEHN,gBAAgB,CAACO,OAAO,GAAGV,SAAS;EACpCG,gBAAgB,CAACQ,OAAO,GAAGV,WAAW;EACtCE,gBAAgB,CAACS,KAAK,GAAGV,SAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","QueryAsyncBoundary","jsx","_jsx","withQueryAsyncBoundary","Component","LoadingView","ErrorView","WrappedComponent","props","_LoadingView","_objectSpread","errorProps","_ErrorView","children","displayName","concat","name","Content","Loading","Error"],"sources":["withQueryAsyncBoundary.tsx"],"sourcesContent":["import React from 'react';\n\nimport type {ErrorViewProps} from '../../../react';\n\nimport {QueryAsyncBoundary} from './QueryAsyncBoundary';\nimport type {QueryAsyncBoundaryComponent} from './types';\n\nexport const withQueryAsyncBoundary = <TProps extends object>(\n Component: React.ComponentType<TProps>,\n LoadingView: React.ComponentType<TProps>,\n ErrorView: React.ComponentType<TProps & ErrorViewProps>,\n) => {\n const WrappedComponent = ((props: TProps) => (\n <QueryAsyncBoundary\n LoadingView={() => <LoadingView {...props} />}\n ErrorView={(errorProps) => <ErrorView {...props} {...errorProps} />}\n >\n <Component {...props} />\n </QueryAsyncBoundary>\n )) as QueryAsyncBoundaryComponent<TProps>;\n\n WrappedComponent.displayName = `WithQueryAsyncBoundary(${\n Component.displayName || Component.name\n })`;\n\n WrappedComponent.Content = Component;\n WrappedComponent.Loading = LoadingView;\n WrappedComponent.Error = ErrorView;\n\n return WrappedComponent;\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAIzB,SAAQC,kBAAkB,QAAO,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGxD,OAAO,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAC/BC,SAAsC,EACtCC,YAAwC,EACxCC,UAAuD,EACtD;EACD,IAAMC,gBAAgB,GAAI,SAApBA,gBAAgBA,CAAKC,KAAa;IAAA,oBACpCN,IAAA,CAACF,kBAAkB;MACfK,WAAW,EAAE,SAAbA,WAAWA,CAAA;QAAA,oBAAQH,IAAA,CAACO,YAAW,EAAAC,aAAA,KAAKF,KAAK,CAAG,CAAC;MAAA,CAAC;MAC9CF,SAAS,EAAE,SAAXA,SAASA,CAAGK,UAAU;QAAA,oBAAKT,IAAA,CAACU,UAAS,EAAAF,aAAA,CAAAA,aAAA,KAAKF,KAAK,GAAMG,UAAU,CAAG,CAAC;MAAA,CAAC;MAAAE,QAAA,eAEpEX,IAAA,CAACE,SAAS,EAAAM,aAAA,KAAKF,KAAK,CAAG;IAAC,CACR,CAAC;EAAA,CACgB;EAEzCD,gBAAgB,CAACO,WAAW,6BAAAC,MAAA,CACxBX,SAAS,CAACU,WAAW,IAAIV,SAAS,CAACY,IAAI,MACxC;EAEHT,gBAAgB,CAACU,OAAO,GAAGb,SAAS;EACpCG,gBAAgB,CAACW,OAAO,GAAGb,YAAW;EACtCE,gBAAgB,CAACY,KAAK,GAAGb,UAAS;EAElC,OAAOC,gBAAgB;AAC3B,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- const require_factory = require("./factory-D7zGeCrN.cjs");
1
+ const require_factory = require("./factory-CmOH3Kh6.cjs");
2
2
  //#region src/plugin/esbuild.ts
3
3
  var esbuild_default = (0, require("unplugin").createEsbuildPlugin)(require_factory.dataSourceLazyUnpluginFactory);
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as dataSourceLazyUnpluginFactory } from "./factory-Bjj8NXy2.mjs";
1
+ import { n as dataSourceLazyUnpluginFactory } from "./factory--H-amlua.mjs";
2
2
  import { createEsbuildPlugin } from "unplugin";
3
3
  //#region src/plugin/esbuild.ts
4
4
  var esbuild_default = createEsbuildPlugin(dataSourceLazyUnpluginFactory);
@@ -27,8 +27,9 @@ function makeVirtualId(type, sourceFile) {
27
27
  return `${VIRTUAL_PREFIX}:${type}:${sourceFile}`;
28
28
  }
29
29
  function parseVirtualId(id) {
30
- if (id.indexOf("\0dsl-plugin") !== 0) return null;
31
- const rest = id.slice(12);
30
+ const prefixIndex = id.indexOf(VIRTUAL_PREFIX);
31
+ if (prefixIndex === -1) return null;
32
+ const rest = id.slice(prefixIndex + 11 + 1);
32
33
  const colonIndex = rest.indexOf(":");
33
34
  if (colonIndex === -1) return null;
34
35
  const type = rest.slice(0, colonIndex);
@@ -52,8 +52,9 @@ function makeVirtualId(type, sourceFile) {
52
52
  return `${VIRTUAL_PREFIX}:${type}:${sourceFile}`;
53
53
  }
54
54
  function parseVirtualId(id) {
55
- if (id.indexOf("\0dsl-plugin") !== 0) return null;
56
- const rest = id.slice(12);
55
+ const prefixIndex = id.indexOf(VIRTUAL_PREFIX);
56
+ if (prefixIndex === -1) return null;
57
+ const rest = id.slice(prefixIndex + 11 + 1);
57
58
  const colonIndex = rest.indexOf(":");
58
59
  if (colonIndex === -1) return null;
59
60
  const type = rest.slice(0, colonIndex);
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_factory = require("./factory-D7zGeCrN.cjs");
5
+ const require_factory = require("./factory-CmOH3Kh6.cjs");
6
6
  //#region src/plugin/index.ts
7
7
  const DataSourceLazyPlugin = /* @__PURE__ */ (0, require("unplugin").createUnplugin)(require_factory.dataSourceLazyUnpluginFactory);
8
8
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as dataSourceLazyUnpluginFactory, t as DEFAULT_HOCS } from "./factory-Bjj8NXy2.mjs";
1
+ import { n as dataSourceLazyUnpluginFactory, t as DEFAULT_HOCS } from "./factory--H-amlua.mjs";
2
2
  import { createUnplugin } from "unplugin";
3
3
  //#region src/plugin/index.ts
4
4
  const DataSourceLazyPlugin = /* @__PURE__ */ createUnplugin(dataSourceLazyUnpluginFactory);
@@ -1,4 +1,4 @@
1
- const require_factory = require("./factory-D7zGeCrN.cjs");
1
+ const require_factory = require("./factory-CmOH3Kh6.cjs");
2
2
  //#region src/plugin/rollup.ts
3
3
  var rollup_default = (0, require("unplugin").createRollupPlugin)(require_factory.dataSourceLazyUnpluginFactory);
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as dataSourceLazyUnpluginFactory } from "./factory-Bjj8NXy2.mjs";
1
+ import { n as dataSourceLazyUnpluginFactory } from "./factory--H-amlua.mjs";
2
2
  import { createRollupPlugin } from "unplugin";
3
3
  //#region src/plugin/rollup.ts
4
4
  var rollup_default = createRollupPlugin(dataSourceLazyUnpluginFactory);
@@ -1,4 +1,4 @@
1
- const require_factory = require("./factory-D7zGeCrN.cjs");
1
+ const require_factory = require("./factory-CmOH3Kh6.cjs");
2
2
  //#region src/plugin/rspack.ts
3
3
  var rspack_default = (0, require("unplugin").createRspackPlugin)(require_factory.dataSourceLazyUnpluginFactory);
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as dataSourceLazyUnpluginFactory } from "./factory-Bjj8NXy2.mjs";
1
+ import { n as dataSourceLazyUnpluginFactory } from "./factory--H-amlua.mjs";
2
2
  import { createRspackPlugin } from "unplugin";
3
3
  //#region src/plugin/rspack.ts
4
4
  var rspack_default = createRspackPlugin(dataSourceLazyUnpluginFactory);
@@ -1,4 +1,4 @@
1
- const require_factory = require("./factory-D7zGeCrN.cjs");
1
+ const require_factory = require("./factory-CmOH3Kh6.cjs");
2
2
  //#region src/plugin/vite.ts
3
3
  var vite_default = (0, require("unplugin").createVitePlugin)(require_factory.dataSourceLazyUnpluginFactory);
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as dataSourceLazyUnpluginFactory } from "./factory-Bjj8NXy2.mjs";
1
+ import { n as dataSourceLazyUnpluginFactory } from "./factory--H-amlua.mjs";
2
2
  import { createVitePlugin } from "unplugin";
3
3
  //#region src/plugin/vite.ts
4
4
  var vite_default = createVitePlugin(dataSourceLazyUnpluginFactory);
@@ -1,4 +1,4 @@
1
- const require_factory = require("./factory-D7zGeCrN.cjs");
1
+ const require_factory = require("./factory-CmOH3Kh6.cjs");
2
2
  //#region src/plugin/webpack.ts
3
3
  var webpack_default = (0, require("unplugin").createWebpackPlugin)(require_factory.dataSourceLazyUnpluginFactory);
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as dataSourceLazyUnpluginFactory } from "./factory-Bjj8NXy2.mjs";
1
+ import { n as dataSourceLazyUnpluginFactory } from "./factory--H-amlua.mjs";
2
2
  import { createWebpackPlugin } from "unplugin";
3
3
  //#region src/plugin/webpack.ts
4
4
  var webpack_default = createWebpackPlugin(dataSourceLazyUnpluginFactory);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/data-source",
3
- "version": "0.10.0-alpha.2",
3
+ "version": "0.10.0-alpha.4",
4
4
  "description": "A wrapper around data fetching",
5
5
  "keywords": [
6
6
  "data-fetching",