eddev 0.2.2-beta.10 → 0.2.2-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/{fields → admin}/components/ImageWell.d.ts +0 -1
  2. package/{fields → admin}/components/ImageWell.js +0 -0
  3. package/{fields → admin}/defineFIeld.d.ts +0 -0
  4. package/{fields → admin}/defineFIeld.js +0 -0
  5. package/admin/defineWidget.d.ts +10 -0
  6. package/admin/defineWidget.js +10 -0
  7. package/admin/index.d.ts +3 -0
  8. package/{fields → admin}/index.js +2 -1
  9. package/{fields → admin}/installFieldTypes.d.ts +0 -0
  10. package/{fields → admin}/installFieldTypes.js +0 -0
  11. package/admin/runWidgets.d.ts +1 -0
  12. package/admin/runWidgets.js +40 -0
  13. package/{fields → admin}/selectMedia.d.ts +0 -0
  14. package/{fields → admin}/selectMedia.js +0 -0
  15. package/build/get-webpack-config.js +18 -0
  16. package/build/manifests/manifest-widgets.d.ts +12 -0
  17. package/build/manifests/manifest-widgets.js +42 -0
  18. package/cli/display/components/BundleDisplay.d.ts +0 -1
  19. package/cli/display/components/CodegenDisplay.d.ts +0 -1
  20. package/cli/display/components/DevCLIDisplay.d.ts +0 -1
  21. package/cli/display/components/ServerlessDisplay.d.ts +0 -1
  22. package/cli/display/components/StatusIcon.d.ts +0 -1
  23. package/components/AdminBar.d.ts +0 -1
  24. package/dev-ui/components/BreakpointColumnHeader.d.ts +0 -1
  25. package/dev-ui/components/BreakpointIndicator.d.ts +0 -1
  26. package/dev-ui/components/DevUI.d.ts +0 -1
  27. package/dev-ui/components/ResponsiveLerpControl.d.ts +0 -1
  28. package/dev-ui/components/ResponsiveScaleEditor.d.ts +0 -1
  29. package/dev-ui/components/atoms/NumberField.d.ts +0 -1
  30. package/dev-ui/components/panels/PageDataDebugger.d.ts +0 -1
  31. package/dev-ui/components/panels/SpacingEditor.d.ts +0 -1
  32. package/dev-ui/components/panels/TypographyEditor.d.ts +0 -1
  33. package/dev-ui/icons.d.ts +0 -1
  34. package/dev-ui/loader.d.ts +0 -1
  35. package/entry/Root.d.ts +0 -1
  36. package/entry/entry.admin.dev.js +13 -1
  37. package/entry/entry.admin.prod.js +3 -1
  38. package/package.json +2 -2
  39. package/dev-ui/theme.d.ts +0 -151
  40. package/dynamic/dynamic-component.d.ts +0 -10
  41. package/fields/index.d.ts +0 -2
  42. package/hooks/useRPC.d.ts +0 -32
  43. package/style/createStitches.d.ts +0 -1056
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type Props = {
3
2
  previewSize: string;
4
3
  aspects: string[];
File without changes
File without changes
File without changes
@@ -0,0 +1,10 @@
1
+ import { ComponentType } from "react";
2
+ declare type WidgetProps = {
3
+ element: HTMLElement;
4
+ dataset: DOMStringMap;
5
+ };
6
+ export declare function defineWidget(name: string, component: ComponentType<WidgetProps>): {
7
+ name: string;
8
+ component: ComponentType<WidgetProps>;
9
+ };
10
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defineWidget = void 0;
4
+ function defineWidget(name, component) {
5
+ return {
6
+ name: name,
7
+ component: component,
8
+ };
9
+ }
10
+ exports.defineWidget = defineWidget;
@@ -0,0 +1,3 @@
1
+ export * from "./defineField";
2
+ export * from "./defineWidget";
3
+ export * from "./components/ImageWell";
@@ -10,5 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./defineFIeld"), exports);
13
+ __exportStar(require("./defineField"), exports);
14
+ __exportStar(require("./defineWidget"), exports);
14
15
  __exportStar(require("./components/ImageWell"), exports);
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export declare function runWidgets(): void;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.runWidgets = void 0;
18
+ var jsx_runtime_1 = require("react/jsx-runtime");
19
+ // @ts-ignore
20
+ var widgets_1 = __importDefault(require("@manifest/widgets"));
21
+ var react_dom_1 = __importDefault(require("react-dom"));
22
+ function runWidgets() {
23
+ var elements = document.querySelectorAll("[data-widget]");
24
+ console.log("Running widgets", elements, widgets_1.default);
25
+ elements.forEach(function (el) {
26
+ if (el instanceof HTMLElement) {
27
+ var data = el.dataset;
28
+ var name_1 = data["widget"];
29
+ var type = widgets_1.default.find(function (item) { return item.name === name_1; });
30
+ if (type) {
31
+ var props = {
32
+ element: el,
33
+ dataset: data,
34
+ };
35
+ react_dom_1.default.render((0, jsx_runtime_1.jsx)(type.component, __assign({}, props), void 0), el);
36
+ }
37
+ }
38
+ });
39
+ }
40
+ exports.runWidgets = runWidgets;
File without changes
File without changes
@@ -79,6 +79,7 @@ var manifest_blocks_1 = require("./manifests/manifest-blocks");
79
79
  var manifest_fields_1 = require("./manifests/manifest-fields");
80
80
  var manifest_views_1 = require("./manifests/manifest-views");
81
81
  var get_config_1 = require("../config/get-config");
82
+ var manifest_widgets_1 = require("./manifests/manifest-widgets");
82
83
  function getWebpackConfig(opts) {
83
84
  return __awaiter(this, void 0, void 0, function () {
84
85
  var compiling, config, ALIAS, ENTRY, PLUGINS, RULES, DEFINES, VIRTUAL_MODULES, EXTERNALS, virtualModules, isServerless, isBrowser, isSSR, isDev, entryDir, distSuffix, outputFolder, loadableManifestFile, writeVirtualModule, manifestLoaders, rpcExists, buildID;
@@ -283,6 +284,23 @@ function getWebpackConfig(opts) {
283
284
  else {
284
285
  writeVirtualModule(ALIAS["@manifest/fields"], "\n export default {}\n ");
285
286
  }
287
+ // Field manifest
288
+ ALIAS["@manifest/widgets"] = path_1.default.resolve(opts.baseDirectory, "_widgets_manifest.js");
289
+ if (opts.isAdmin) {
290
+ manifestLoaders.push((0, manifest_widgets_1.createWidgetManifestGenerator)({
291
+ baseDirectory: opts.baseDirectory,
292
+ isAdmin: true,
293
+ isDev: isDev,
294
+ isServerless: isServerless,
295
+ watch: isDev,
296
+ onGenerate: function (manifest) {
297
+ writeVirtualModule(ALIAS["@manifest/widgets"], manifest);
298
+ },
299
+ }));
300
+ }
301
+ else {
302
+ writeVirtualModule(ALIAS["@manifest/widgets"], "\n export default {}\n ");
303
+ }
286
304
  // Block manifest
287
305
  ALIAS["@manifest/blocks"] = path_1.default.resolve(opts.baseDirectory, "_blocks_manifest.js");
288
306
  manifestLoaders.push((0, manifest_blocks_1.createBlockManifestGenerator)({
@@ -0,0 +1,12 @@
1
+ declare type Options = {
2
+ baseDirectory: string;
3
+ isAdmin: boolean;
4
+ isDev: boolean;
5
+ isServerless: boolean;
6
+ onGenerate: (value: string) => void;
7
+ watch: boolean;
8
+ };
9
+ export declare function createWidgetManifestGenerator(opts: Options): Promise<{
10
+ close(): void;
11
+ }>;
12
+ export {};
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createWidgetManifestGenerator = void 0;
7
+ var manifest_1 = require("./manifest");
8
+ var path_1 = __importDefault(require("path"));
9
+ var change_case_1 = require("change-case");
10
+ function createWidgetManifestGenerator(opts) {
11
+ return (0, manifest_1.createManifestGenerator)({
12
+ glob: path_1.default.join(opts.baseDirectory, "/backend/widgets/*.tsx"),
13
+ onGenerate: opts.onGenerate,
14
+ watch: opts.watch,
15
+ generate: function (fileNames) {
16
+ if (opts.isAdmin) {
17
+ var files = fileNames
18
+ .filter(function (file) { return !file.includes("/_app"); })
19
+ .map(function (file) {
20
+ var relative = path_1.default.relative(opts.baseDirectory, file);
21
+ var name = path_1.default.basename(file).replace(/\.(jsx|tsx|ts|js)$/i, "");
22
+ var module = JSON.stringify("./" + relative);
23
+ var componentName = "Widget" + (0, change_case_1.pascalCase)(name);
24
+ return { relative: relative, name: name, module: module, componentName: componentName };
25
+ });
26
+ return "\n ".concat(files.map(function (_a) {
27
+ var componentName = _a.componentName, module = _a.module;
28
+ return "import ".concat(componentName, " from ").concat(module);
29
+ }).join("\n"), "\n\n export default [\n ").concat(files
30
+ .map(function (_a) {
31
+ var relative = _a.relative, componentName = _a.componentName, module = _a.module, name = _a.name;
32
+ return componentName;
33
+ })
34
+ .join(",\n"), "\n ]\n ");
35
+ }
36
+ else {
37
+ return "export default {}";
38
+ }
39
+ },
40
+ });
41
+ }
42
+ exports.createWidgetManifestGenerator = createWidgetManifestGenerator;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CompilerState } from "../../../build/state/compiler-state";
3
2
  import { Observable } from "../../../utils/Observable";
4
3
  export declare function BundleDisplay(props: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CodegenState } from "../../../build/state/codegen-state";
3
2
  import { Observable } from "../../../utils/Observable";
4
3
  export declare function CodegenDisplay(props: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CodegenState } from "../../../build/state/codegen-state";
3
2
  import { CompilerState } from "../../../build/state/compiler-state";
4
3
  import { ServerlessState } from "../../../build/state/serverless-state";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ServerlessState } from "../../../build/state/serverless-state";
3
2
  import { Observable } from "../../../utils/Observable";
4
3
  export declare function ServerlessDisplay(props: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type Props = {
3
2
  icon: "loading" | "tick" | "error" | "none";
4
3
  };
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function AdminBar(): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type Props = {
3
2
  lerpStart?: boolean;
4
3
  lerps?: boolean;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function BreakpointIndicator(): JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export default function DevUI(): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ResponsiveAtomCalc } from "../../style";
3
2
  declare type Props = {
4
3
  data: ResponsiveAtomCalc[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BreakpointArray } from "../../style";
3
2
  export declare const RESPONSIVE_COLUMN_WIDTH = "110px";
4
3
  export declare const RESPONSIVE_ROW_HEIGHT = "20px";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type Props = {
3
2
  prefix?: string;
4
3
  suffix?: string;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function PageDataDebugger(): JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function SpacingEditor(): JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function TypographyEditor(): JSX.Element;
package/dev-ui/icons.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const bolt: JSX.Element;
3
2
  export declare const typography: JSX.Element;
4
3
  export declare const ruler: JSX.Element;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function DevUILoader(): JSX.Element | null;
package/entry/Root.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare function Root(): JSX.Element;
3
2
  declare const _default: typeof Root | import("next").NextComponentType<import("next").NextPageContext, {}, {}>;
4
3
  export default _default;
@@ -3,9 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var installGutenbergHooks_1 = require("../blocks/installGutenbergHooks");
4
4
  // @ts-ignore
5
5
  var _theme_1 = require("@theme");
6
- var installFieldTypes_1 = require("../fields/installFieldTypes");
6
+ var installFieldTypes_1 = require("../admin/installFieldTypes");
7
+ var runWidgets_1 = require("../admin/runWidgets");
7
8
  (0, installGutenbergHooks_1.installEDGutenbergHooks)();
8
9
  (0, installFieldTypes_1.installFieldTypes)();
10
+ window.onload = runWidgets_1.runWidgets;
11
+ // @ts-ignore
12
+ // if (import.meta.webpackHot) {
13
+ // console.log("HEY", require.resolve("@manifest/widgets"))
14
+ // // @ts-ignore
15
+ // import.meta.webpackHot.accept([require.resolve("@manifest/widgets")], () => {
16
+ // const runWidgets = require("../admin/runWidgets").runWidgets
17
+ // console.log("HELLO")
18
+ // runWidgets()
19
+ // })
20
+ // }
9
21
  if (_theme_1.editorGlobalStyles) {
10
22
  (0, _theme_1.editorGlobalStyles)();
11
23
  }
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var installGutenbergHooks_1 = require("../blocks/installGutenbergHooks");
4
4
  // @ts-ignore
5
5
  var _theme_1 = require("@theme");
6
- var installFieldTypes_1 = require("../fields/installFieldTypes");
6
+ var installFieldTypes_1 = require("../admin/installFieldTypes");
7
+ var runWidgets_1 = require("../admin/runWidgets");
7
8
  (0, installGutenbergHooks_1.installEDGutenbergHooks)();
8
9
  (0, installFieldTypes_1.installFieldTypes)();
10
+ window.onload = runWidgets_1.runWidgets;
9
11
  if (_theme_1.editorGlobalStyles) {
10
12
  (0, _theme_1.editorGlobalStyles)();
11
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "0.2.2-beta.10",
3
+ "version": "0.2.2-beta.11",
4
4
  "main": "./index.js",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -87,7 +87,7 @@
87
87
  "rimraf": "^3.0.2",
88
88
  "swr": "^1.0.1",
89
89
  "to-icon": "^1.1.4",
90
- "typescript": "^4.5.5",
90
+ "typescript": "4.5.5",
91
91
  "url-parse": "^1.5.3",
92
92
  "webpack": "^5.52.0",
93
93
  "webpack-bundle-analyzer": "^4.5.0",
package/dev-ui/theme.d.ts DELETED
@@ -1,151 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const styled: <Type extends import("react").ComponentType<any> | keyof JSX.IntrinsicElements | import("@stitches/react/types/util").Function, Composers extends (string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function | {
3
- [name: string]: unknown;
4
- })[], CSS = import("@stitches/react/types/css-util").CSS<{}, {
5
- space: {
6
- smallButtonHeight: string;
7
- buttonHeight: string;
8
- 0: string;
9
- 1: string;
10
- 2: string;
11
- 3: string;
12
- 4: string;
13
- 5: string;
14
- 6: string;
15
- };
16
- colors: {
17
- bg: string;
18
- bgHover: string;
19
- bgHoverLight: string;
20
- bgLine: string;
21
- bgLineStrong: string;
22
- button: string;
23
- buttonHover: string;
24
- fg: string;
25
- fgFaded: string;
26
- };
27
- fontSizes: {
28
- sm: string;
29
- md: string;
30
- lg: string;
31
- xl: string;
32
- };
33
- fonts: {
34
- body: string;
35
- mono: string;
36
- };
37
- radii: {
38
- sm: string;
39
- md: string;
40
- lg: string;
41
- };
42
- transitions: {
43
- default: string;
44
- };
45
- }, import("@stitches/react/types/config").DefaultThemeMap, {}>>(type: Type, ...composers: { [K in keyof Composers]: Composers[K] extends string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
46
- variants?: {
47
- [x: string]: {
48
- [x: string]: CSS;
49
- [x: number]: CSS;
50
- };
51
- } | undefined;
52
- compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("@stitches/react/types/util").WideObject) & {
53
- css: CSS;
54
- })[] | undefined;
55
- defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("@stitches/react/types/util").WideObject) | undefined;
56
- } & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("@stitches/react/types/styled-component").StyledComponent<Type, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, import("@stitches/react/types/css-util").CSS<{}, {
57
- space: {
58
- smallButtonHeight: string;
59
- buttonHeight: string;
60
- 0: string;
61
- 1: string;
62
- 2: string;
63
- 3: string;
64
- 4: string;
65
- 5: string;
66
- 6: string;
67
- };
68
- colors: {
69
- bg: string;
70
- bgHover: string;
71
- bgHoverLight: string;
72
- bgLine: string;
73
- bgLineStrong: string;
74
- button: string;
75
- buttonHover: string;
76
- fg: string;
77
- fgFaded: string;
78
- };
79
- fontSizes: {
80
- sm: string;
81
- md: string;
82
- lg: string;
83
- xl: string;
84
- };
85
- fonts: {
86
- body: string;
87
- mono: string;
88
- };
89
- radii: {
90
- sm: string;
91
- md: string;
92
- lg: string;
93
- };
94
- transitions: {
95
- default: string;
96
- };
97
- }, import("@stitches/react/types/config").DefaultThemeMap, {}>>, css: <Composers extends (string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function | {
98
- [name: string]: unknown;
99
- })[], CSS = import("@stitches/react/types/css-util").CSS<{}, {
100
- space: {
101
- smallButtonHeight: string;
102
- buttonHeight: string;
103
- 0: string;
104
- 1: string;
105
- 2: string;
106
- 3: string;
107
- 4: string;
108
- 5: string;
109
- 6: string;
110
- };
111
- colors: {
112
- bg: string;
113
- bgHover: string;
114
- bgHoverLight: string;
115
- bgLine: string;
116
- bgLineStrong: string;
117
- button: string;
118
- buttonHover: string;
119
- fg: string;
120
- fgFaded: string;
121
- };
122
- fontSizes: {
123
- sm: string;
124
- md: string;
125
- lg: string;
126
- xl: string;
127
- };
128
- fonts: {
129
- body: string;
130
- mono: string;
131
- };
132
- radii: {
133
- sm: string;
134
- md: string;
135
- lg: string;
136
- };
137
- transitions: {
138
- default: string;
139
- };
140
- }, import("@stitches/react/types/config").DefaultThemeMap, {}>>(...composers: { [K in keyof Composers]: Composers[K] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
141
- variants?: {
142
- [x: string]: {
143
- [x: string]: CSS;
144
- [x: number]: CSS;
145
- };
146
- } | undefined;
147
- compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("@stitches/react/types/util").WideObject) & {
148
- css: CSS;
149
- })[] | undefined;
150
- defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("@stitches/react/types/util").WideObject) | undefined;
151
- } & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("@stitches/react/types/styled-component").CssComponent<import("@stitches/react/types/styled-component").StyledComponentType<Composers>, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, CSS>;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const dynamic: {
3
- <Props, Module = import("@loadable/component").DefaultComponent<Props>>(loadFn: (props: Props) => Promise<Module>, options: import("@loadable/component").OptionsWithResolver<Props, Module>): import("@loadable/component").LoadableComponent<Props>;
4
- <Props_1>(loadFn: (props: Props_1) => Promise<import("@loadable/component").DefaultComponent<Props_1>>, options?: import("@loadable/component").OptionsWithoutResolver<Props_1> | undefined): import("@loadable/component").LoadableComponent<Props_1>;
5
- <Component extends import("react").ComponentClass<any, any>>(loadFn: (props: import("react").ComponentProps<Component>) => Promise<Component | {
6
- default: Component;
7
- }>, options?: import("@loadable/component").Options<import("react").ComponentProps<Component>, Component> | undefined): import("@loadable/component").LoadableClassComponent<Component>;
8
- } & {
9
- lib: <Props_2, Module_1>(loadFn: (props: Props_2) => Promise<Module_1>, options?: import("@loadable/component").OptionsWithoutResolver<Props_2> | undefined) => import("@loadable/component").LoadableLibrary<Module_1>;
10
- };
package/fields/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./defineFIeld";
2
- export * from "./components/ImageWell";
package/hooks/useRPC.d.ts DELETED
@@ -1,32 +0,0 @@
1
- /// <reference types="react" />
2
- import { TRPCClientError } from "@trpc/client";
3
- declare const trpc: {
4
- Provider: ({ client, queryClient, children, isPrepass, ssrContext, }: {
5
- queryClient: import("react-query").QueryClient;
6
- client: import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>;
7
- children: import("react").ReactNode;
8
- isPrepass?: boolean | undefined;
9
- ssrContext?: unknown;
10
- }) => JSX.Element;
11
- createClient: (opts: import("@trpc/react").CreateTRPCClientOptions<import("@trpc/server").AnyRouter<any>>) => import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>;
12
- useContext: () => import("@trpc/react/dist/declarations/src/internals/context").TRPCContextState<import("@trpc/server").AnyRouter<any>, unknown>;
13
- useQuery: <TPath extends string>(pathAndInput: [TPath, (null | undefined)?], opts?: import("@trpc/react").UseTRPCQueryOptions<TPath, unknown, any, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>> | undefined) => import("react-query").UseQueryResult<any, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>>;
14
- useMutation: <TPath_1 extends string>(path: TPath_1 | [TPath_1], opts?: import("@trpc/react").UseTRPCMutationOptions<unknown, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>, any> | undefined) => import("react-query").UseMutationResult<any, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>, unknown, unknown>;
15
- useSubscription: <TPath_2 extends string, TOutput extends any>(pathAndInput: [TPath_2, (null | undefined)?], opts: {
16
- enabled?: boolean | undefined;
17
- onError?: ((err: import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>) => void) | undefined;
18
- onNext: (data: TOutput) => void;
19
- }) => void;
20
- useDehydratedState: (client: import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>, trpcState: import("react-query").DehydratedState | undefined) => import("react-query").DehydratedState | undefined;
21
- useInfiniteQuery: <TPath_3 extends never>(pathAndInput: [path: TPath_3, input: Omit<unknown, "cursor">], opts?: import("@trpc/react").UseTRPCInfiniteQueryOptions<TPath_3, Omit<unknown, "cursor">, any, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>> | undefined) => import("react-query").UseInfiniteQueryResult<any, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>>;
22
- };
23
- export declare const useRPCQuery: RPCUseQuery;
24
- export declare const useRPCMutation: RPCUseMutation;
25
- export declare const useRPCInfiniteQuery: RPCUseInfiniteQuery;
26
- export declare const rpcClient: RPCClient;
27
- export declare type UseRPCMutationResult = ReturnType<typeof trpc.useMutation>;
28
- export declare type UseRPCQueryResult = ReturnType<typeof trpc.useQuery>;
29
- export declare type UseRPCInfiniteQueryResult = ReturnType<typeof trpc.useInfiniteQuery>;
30
- export declare const RPCClientError: typeof TRPCClientError;
31
- export declare type RPCClientError = InstanceType<typeof TRPCClientError>;
32
- export {};