@berenjena/react-dev-panel 0.0.1-beta.1 → 0.0.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,37 +1,36 @@
1
- import { Suspense as c, lazy as o } from "react";
2
- import { jsxs as i, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import { lazy as n, Suspense as c } from "react";
3
3
  import { className as d } from "../../../utils/className/className.js";
4
4
  import "../../../utils/store/store.js";
5
- import '../../../assets/index.css';const p = "_controlContainer_xw58o_1", m = "_label_xw58o_10", u = "_description_xw58o_24", r = {
6
- controlContainer: p,
7
- label: m,
8
- description: u
5
+ import '../../../assets/index.css';const p = Object.freeze({
6
+ boolean: n(() => import("./BooleanControl/index.js").then((e) => ({ default: e.BooleanControl }))),
7
+ button: n(() => import("./ButtonControl/index.js").then((e) => ({ default: e.ButtonControl }))),
8
+ color: n(() => import("./ColorControl/index.js").then((e) => ({ default: e.ColorControl }))),
9
+ number: n(() => import("./NumberControl/index.js").then((e) => ({ default: e.NumberControl }))),
10
+ select: n(() => import("./SelectControl/index.js").then((e) => ({ default: e.SelectControl }))),
11
+ text: n(() => import("./TextControl/index.js").then((e) => ({ default: e.TextControl })))
12
+ }), m = "_controlContainer_xw58o_1", u = "_label_xw58o_10", f = "_description_xw58o_24", r = {
13
+ controlContainer: m,
14
+ label: u,
15
+ description: f
9
16
  };
10
17
  function x({ name: e, control: t }) {
11
18
  const s = t?.label || e;
12
19
  function a() {
13
20
  if (!t || !t.type)
14
- return /* @__PURE__ */ n("div", { className: r.error, children: "Control type is not defined" });
15
- const l = f[t.type];
16
- return l ? /* @__PURE__ */ n(c, { fallback: /* @__PURE__ */ n("div", { children: "Loading control..." }), children: /* @__PURE__ */ n(l, { control: t }) }) : /* @__PURE__ */ n("div", { children: "Unknown control type" });
21
+ return /* @__PURE__ */ o("div", { className: r.error, children: "Control type is not defined" });
22
+ const l = p[t.type];
23
+ return l ? /* @__PURE__ */ o(c, { fallback: /* @__PURE__ */ o("div", { children: "Loading control..." }), children: /* @__PURE__ */ o(l, { control: t }) }) : /* @__PURE__ */ o("div", { children: "Unknown control type" });
17
24
  }
18
25
  return /* @__PURE__ */ i("div", { ...d(r.controlContainer), children: [
19
26
  t?.type !== "button" && /* @__PURE__ */ i("label", { className: r.label, children: [
20
27
  s,
21
- t?.description && /* @__PURE__ */ n("span", { className: r.description, children: t.description })
28
+ t?.description && /* @__PURE__ */ o("span", { className: r.description, children: t.description })
22
29
  ] }),
23
30
  a()
24
31
  ] });
25
32
  }
26
- const f = Object.freeze({
27
- boolean: o(() => import("./BooleanControl/index.js").then((e) => ({ default: e.BooleanControl }))),
28
- button: o(() => import("./ButtonControl/index.js").then((e) => ({ default: e.ButtonControl }))),
29
- color: o(() => import("./ColorControl/index.js").then((e) => ({ default: e.ColorControl }))),
30
- number: o(() => import("./NumberControl/index.js").then((e) => ({ default: e.NumberControl }))),
31
- select: o(() => import("./SelectControl/index.js").then((e) => ({ default: e.SelectControl }))),
32
- text: o(() => import("./TextControl/index.js").then((e) => ({ default: e.TextControl })))
33
- });
34
33
  export {
35
34
  x as ControlRenderer,
36
- f as controls
35
+ p as controls
37
36
  };
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
- export * from './components';
1
+ export { DevPanel } from './components/DevPanel';
2
+ export { useDevPanel } from './hooks/useDevPanel';
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
- import { ControlRenderer as e, controls as n } from "./components/ControlRenderer/controls/index.js";
2
- import { DevPanel as l } from "./components/DevPanel/DevPanel.js";
1
+ import { DevPanel as r } from "./components/DevPanel/DevPanel.js";
2
+ import { useDevPanel as f } from "./hooks/useDevPanel/useDevPanel.js";
3
3
  export {
4
- e as ControlRenderer,
5
- l as DevPanel,
6
- n as controls
4
+ r as DevPanel,
5
+ f as useDevPanel
7
6
  };
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "url": "git+https://github.com/Berenjenas/react-dev-panel.git"
16
16
  },
17
17
  "private": false,
18
- "version": "0.0.1-beta.1",
18
+ "version": "0.0.1-beta.2",
19
19
  "type": "module",
20
20
  "files": [
21
21
  "dist"