@berenjena/react-dev-panel 1.0.4 → 2.0.0

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 (78) hide show
  1. package/dist/assets/BooleanControl.css +1 -1
  2. package/dist/assets/ButtonControl.css +1 -1
  3. package/dist/assets/ButtonGroupControl.css +1 -1
  4. package/dist/assets/ColorControl.css +1 -1
  5. package/dist/assets/ControlRenderer.css +1 -1
  6. package/dist/assets/DevPanel.css +1 -1
  7. package/dist/assets/EmptyContent.css +1 -1
  8. package/dist/assets/Input.css +1 -1
  9. package/dist/assets/MultiSelectControl.css +1 -0
  10. package/dist/assets/RangeControl.css +1 -1
  11. package/dist/assets/Section.css +1 -1
  12. package/dist/assets/Select.css +1 -1
  13. package/dist/assets/SeparatorControl.css +1 -1
  14. package/dist/assets/index.css +1 -1
  15. package/dist/components/ControlRenderer/ControlRenderer.js +38 -18
  16. package/dist/components/ControlRenderer/controls/BooleanControl/BooleanControl.d.ts +20 -4
  17. package/dist/components/ControlRenderer/controls/BooleanControl/BooleanControl.js +16 -14
  18. package/dist/components/ControlRenderer/controls/ButtonControl/ButtonControl.d.ts +22 -5
  19. package/dist/components/ControlRenderer/controls/ButtonControl/ButtonControl.js +2 -2
  20. package/dist/components/ControlRenderer/controls/ButtonGroupControl/ButtonGroupControl.d.ts +35 -0
  21. package/dist/components/ControlRenderer/controls/ButtonGroupControl/ButtonGroupControl.js +2 -2
  22. package/dist/components/ControlRenderer/controls/ColorControl/ColorControl.d.ts +13 -6
  23. package/dist/components/ControlRenderer/controls/ColorControl/ColorControl.js +61 -19
  24. package/dist/components/ControlRenderer/controls/ColorControl/types.d.ts +14 -0
  25. package/dist/components/ControlRenderer/controls/DateControl/DateControl.d.ts +17 -5
  26. package/dist/components/ControlRenderer/controls/DateControl/DateControl.js +12 -12
  27. package/dist/components/ControlRenderer/controls/MultiSelectControl/MultiSelectControl.d.ts +28 -0
  28. package/dist/components/ControlRenderer/controls/MultiSelectControl/MultiSelectControl.js +131 -0
  29. package/dist/components/ControlRenderer/controls/MultiSelectControl/index.d.ts +1 -0
  30. package/dist/components/ControlRenderer/controls/MultiSelectControl/index.js +4 -0
  31. package/dist/components/ControlRenderer/controls/MultiSelectControl/types.d.ts +11 -0
  32. package/dist/components/ControlRenderer/controls/NumberControl/NumberControl.d.ts +26 -11
  33. package/dist/components/ControlRenderer/controls/NumberControl/NumberControl.js +14 -14
  34. package/dist/components/ControlRenderer/controls/RangeControl/RangeControl.d.ts +27 -11
  35. package/dist/components/ControlRenderer/controls/RangeControl/RangeControl.js +19 -19
  36. package/dist/components/ControlRenderer/controls/SelectControl/SelectControl.d.ts +29 -5
  37. package/dist/components/ControlRenderer/controls/SeparatorControl/SeparatorControl.d.ts +16 -7
  38. package/dist/components/ControlRenderer/controls/SeparatorControl/SeparatorControl.js +6 -6
  39. package/dist/components/ControlRenderer/controls/TextControl/TextControl.d.ts +24 -13
  40. package/dist/components/ControlRenderer/controls/TextControl/TextControl.js +15 -15
  41. package/dist/components/ControlRenderer/controls/index.d.ts +2 -0
  42. package/dist/components/ControlRenderer/controls/index.js +1 -0
  43. package/dist/components/ControlRenderer/controls/types.d.ts +2 -0
  44. package/dist/components/DevPanel/DevPanel.js +46 -41
  45. package/dist/components/DevPanel/types.d.ts +24 -0
  46. package/dist/components/DevPanelPortal/DevPanelPortal.d.ts +8 -0
  47. package/dist/components/DevPanelPortal/DevPanelPortal.js +17 -0
  48. package/dist/components/DevPanelPortal/index.d.ts +1 -0
  49. package/dist/components/DevPanelPortal/index.js +4 -0
  50. package/dist/components/EmptyContent/EmptyContent.js +5 -5
  51. package/dist/components/Icon/index.d.ts +16 -0
  52. package/dist/components/Icon/index.js +31 -0
  53. package/dist/components/Input/Input.js +4 -4
  54. package/dist/components/Section/Section.js +16 -15
  55. package/dist/components/Select/Select.js +1 -1
  56. package/dist/components/index.d.ts +3 -2
  57. package/dist/components/index.js +8 -6
  58. package/dist/hooks/useDevPanel/useDevPanel.d.ts +10 -5
  59. package/dist/hooks/useDevPanel/useDevPanel.js +25215 -12
  60. package/dist/hooks/useDragAndDrop/useDragAndDrop.d.ts +5 -1
  61. package/dist/hooks/useDragAndDrop/useDragAndDrop.js +24 -24
  62. package/dist/index.d.ts +0 -1
  63. package/dist/index.js +2 -8
  64. package/dist/managers/DevPanelManager.d.ts +85 -0
  65. package/dist/managers/DevPanelManager.js +119 -0
  66. package/dist/managers/index.d.ts +1 -0
  67. package/dist/managers/index.js +4 -0
  68. package/dist/store/SectionsStore.js +112 -5
  69. package/dist/store/ThemeStore.d.ts +68 -0
  70. package/dist/store/ThemeStore.js +102 -0
  71. package/dist/store/UIStore.js +115 -9
  72. package/dist/store/index.d.ts +1 -0
  73. package/dist/store/index.js +16 -11
  74. package/package.json +12 -3
  75. package/dist/UIStore-CQdr4U-2.js +0 -227
  76. package/dist/assets/index2.css +0 -1
  77. package/dist/components/Logger/index.d.ts +0 -20
  78. package/dist/components/Logger/index.js +0 -85
@@ -1,40 +1,40 @@
1
- import { jsxs as g, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
2
  import { useState as o, useEffect as m } from "react";
3
- import '../../../../assets/RangeControl.css';const v = "_container_1ewrb_1", h = "_range_1ewrb_9", d = "_value_1ewrb_116", t = {
3
+ import '../../../../assets/RangeControl.css';const v = "_container_lg827_1", h = "_range_lg827_9", d = "_value_lg827_115", u = {
4
4
  container: v,
5
5
  range: h,
6
6
  value: d
7
7
  };
8
- function b({ control: e }) {
9
- const n = e.event || "onChange", [u, l] = o(e.value);
10
- m(() => {
11
- l(e.value);
12
- }, [e.value]);
13
- const i = (s) => {
8
+ function _({ control: e }) {
9
+ const n = e.event || "onChange", [l, t] = o(e.value);
10
+ function r(s) {
14
11
  const a = Number(s.target.value);
15
- l(a), n === "onChange" && e.onChange(a);
16
- }, c = (s) => {
12
+ t(a), n === "onChange" && e.onChange(a);
13
+ }
14
+ function g(s) {
17
15
  const a = Number(s.target.value);
18
16
  n === "onBlur" && e.onChange(a);
19
- };
20
- return /* @__PURE__ */ g("div", { className: t.container, children: [
21
- /* @__PURE__ */ r(
17
+ }
18
+ return m(() => {
19
+ t(e.value);
20
+ }, [e.value]), /* @__PURE__ */ c("div", { className: u.container, children: [
21
+ /* @__PURE__ */ i(
22
22
  "input",
23
23
  {
24
24
  type: "range",
25
- value: u,
25
+ value: l,
26
26
  min: e.min,
27
27
  max: e.max,
28
28
  step: e.step,
29
29
  disabled: e.disabled,
30
- onChange: i,
31
- ...n === "onBlur" && { onBlur: c },
32
- className: t.range
30
+ onChange: r,
31
+ ...n === "onBlur" && { onBlur: g },
32
+ className: u.range
33
33
  }
34
34
  ),
35
- /* @__PURE__ */ r("span", { className: t.value, children: u })
35
+ /* @__PURE__ */ i("span", { className: u.value, children: l })
36
36
  ] });
37
37
  }
38
38
  export {
39
- b as RangeControl
39
+ _ as RangeControl
40
40
  };
@@ -1,15 +1,39 @@
1
1
  import { SelectControlProps } from './types';
2
2
  /**
3
- * Component that renders a select control
4
- * @param control - The control to render
5
- * @returns The select control component
3
+ * Component that renders a dropdown select control with single selection
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The select control configuration object
7
+ * @param props.control.type - The control type, must be 'select'
8
+ * @param props.control.value - The currently selected option value
9
+ * @param props.control.options - Array of available options (strings or objects with label/value)
10
+ * @param props.control.onChange - Callback function triggered when selection changes
11
+ * @param props.control.disabled - Optional flag to disable the control
12
+ * @returns JSX element representing a dropdown select control
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * <SelectControl control={{
17
+ * type: 'select',
18
+ * value: 'medium',
19
+ * options: ['small', 'medium', 'large'],
20
+ * onChange: (value) => setSize(value),
21
+ * disabled: false
22
+ * }} />
23
+ * ```
6
24
  *
7
25
  * @example
8
26
  * ```typescript
9
27
  * <SelectControl control={{
10
28
  * type: 'select',
11
- * value: 'option1',
12
- * options: ['option1', 'option2', 'option3'],
29
+ * value: 'red',
30
+ * options: [
31
+ * { label: 'Red Color', value: 'red' },
32
+ * { label: 'Blue Color', value: 'blue' },
33
+ * { label: 'Green Color', value: 'green' }
34
+ * ],
35
+ * onChange: (value) => console.log('Selected:', value)
13
36
  * }} />
37
+ * ```
14
38
  */
15
39
  export declare function SelectControl({ control }: SelectControlProps): import("react/jsx-runtime").JSX.Element;
@@ -1,26 +1,35 @@
1
1
  import { SeparatorControlProps } from './types';
2
2
  /**
3
3
  * Component that renders a visual separator to organize control groups
4
- * @param control - The control to render
5
- * @param control.style - The style of separator: "line" (default), "space", or "label"
6
- * @param control.label - Optional label text (only shown when style is "label")
7
- * @returns The separator control component
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The separator control configuration object
7
+ * @param props.control.type - The control type, must be 'separator'
8
+ * @param props.control.style - The style of separator: "line" (default), "space", or "label"
9
+ * @param props.control.label - Optional label text (only displayed when style is "label")
10
+ * @returns JSX element representing a visual separator
8
11
  *
9
12
  * @example
10
13
  * ```typescript
11
- * // Simple line separator
14
+ * // Simple line separator (default)
12
15
  * <SeparatorControl control={{
13
16
  * type: 'separator'
14
17
  * }} />
18
+ * ```
15
19
  *
16
- * // Separator with label
20
+ * @example
21
+ * ```typescript
22
+ * // Separator with label text
17
23
  * <SeparatorControl control={{
18
24
  * type: 'separator',
19
25
  * style: 'label',
20
26
  * label: 'Advanced Settings'
21
27
  * }} />
28
+ * ```
22
29
  *
23
- * // Space separator
30
+ * @example
31
+ * ```typescript
32
+ * // Space separator for extra spacing
24
33
  * <SeparatorControl control={{
25
34
  * type: 'separator',
26
35
  * style: 'space'
@@ -1,14 +1,14 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import '../../../../assets/SeparatorControl.css';const s = "_line_12cvo_1", c = "_space_12cvo_9", t = "_labelContainer_12cvo_14", i = "_label_12cvo_14", l = {
2
+ import '../../../../assets/SeparatorControl.css';const s = "_line_174q4_1", t = "_space_174q4_9", i = "_labelContainer_174q4_14", c = "_label_174q4_14", l = {
3
3
  line: s,
4
- space: c,
5
- labelContainer: t,
6
- label: i
4
+ space: t,
5
+ labelContainer: i,
6
+ label: c
7
7
  };
8
- function r({ control: a }) {
8
+ function o({ control: a }) {
9
9
  const n = a.style || "line";
10
10
  return n === "space" ? /* @__PURE__ */ e("div", { className: l.space }) : n === "label" && a.label ? /* @__PURE__ */ e("div", { className: l.labelContainer, children: /* @__PURE__ */ e("span", { className: l.label, children: a.label }) }) : /* @__PURE__ */ e("div", { className: l.line });
11
11
  }
12
12
  export {
13
- r as SeparatorControl
13
+ o as SeparatorControl
14
14
  };
@@ -1,28 +1,39 @@
1
1
  import { TextControlProps } from './types';
2
2
  /**
3
- * Component that renders a text control with configurable event handling
4
- * @param control - The control to render
5
- * @param control.event - When to trigger onChange: "onChange" (real-time) or "onBlur" (on focus loss). Defaults to "onBlur"
6
- * @returns The text control component
3
+ * Component that renders a text input control with configurable event handling
4
+ *
5
+ * @param props - The component props
6
+ * @param props.control - The text control configuration object
7
+ * @param props.control.type - The control type, must be 'text'
8
+ * @param props.control.value - The current string value of the text input
9
+ * @param props.control.placeholder - Optional placeholder text displayed when input is empty
10
+ * @param props.control.event - When to trigger onChange: "onChange" (real-time) or "onBlur" (on focus loss). Defaults to "onChange"
11
+ * @param props.control.onChange - Callback function triggered when text value changes
12
+ * @param props.control.disabled - Optional flag to disable the control
13
+ * @returns JSX element representing the text input control
7
14
  *
8
15
  * @example
9
16
  * ```typescript
10
- * // Real-time updates
17
+ * // Real-time updates (default behavior)
11
18
  * <TextControl control={{
12
19
  * type: 'text',
13
- * value: 'Hello',
14
- * placeholder: 'Enter your name',
20
+ * value: 'John Doe',
21
+ * placeholder: 'Enter your full name',
15
22
  * event: 'onChange',
16
- * onChange: (value) => setValue(value)
23
+ * onChange: (value) => setUserName(value),
24
+ * disabled: false
17
25
  * }} />
26
+ * ```
18
27
  *
19
- * // Updates only when losing focus (default behavior)
28
+ * @example
29
+ * ```typescript
30
+ * // Updates only when losing focus
20
31
  * <TextControl control={{
21
32
  * type: 'text',
22
- * value: 'Hello',
23
- * placeholder: 'Enter your name',
24
- * event: 'onBlur', // or omit for default
25
- * onChange: (value) => setValue(value)
33
+ * value: 'search query',
34
+ * placeholder: 'Type to search...',
35
+ * event: 'onBlur',
36
+ * onChange: (value) => console.log('Search term:', value)
26
37
  * }} />
27
38
  * ```
28
39
  */
@@ -1,27 +1,27 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useState as h, useEffect as p } from "react";
3
- import { Input as d } from "../../../Input/Input.js";
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { useState as h, useEffect as i } from "react";
3
+ import { Input as s } from "../../../Input/Input.js";
4
4
  function v({ control: e }) {
5
- const n = e.event || "onChange", [u, l] = h(e.value);
6
- p(() => {
7
- l(e.value);
8
- }, [e.value]);
9
- const o = (t) => {
5
+ const n = e.event || "onChange", [l, u] = h(e.value);
6
+ function o(t) {
10
7
  const a = t.target.value;
11
- l(a), n === "onChange" && e.onChange(a);
12
- }, s = (t) => {
8
+ u(a), n === "onChange" && e.onChange(a);
9
+ }
10
+ function r(t) {
13
11
  const a = t.target.value;
14
12
  n === "onBlur" && e.onChange(a);
15
- };
16
- return /* @__PURE__ */ r(
17
- d,
13
+ }
14
+ return i(() => {
15
+ u(e.value);
16
+ }, [e.value]), /* @__PURE__ */ f(
17
+ s,
18
18
  {
19
19
  type: "text",
20
- value: u,
20
+ value: l,
21
21
  placeholder: e.placeholder,
22
22
  disabled: e.disabled,
23
23
  onChange: o,
24
- ...n === "onBlur" && { onBlur: s }
24
+ ...n === "onBlur" && { onBlur: r }
25
25
  }
26
26
  );
27
27
  }
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Exports all control components as a frozen object.
3
+ *
3
4
  * **Note:** This allows components to be loaded lazily.
4
5
  */
5
6
  export declare const controls: Readonly<{
@@ -10,6 +11,7 @@ export declare const controls: Readonly<{
10
11
  number: import('react').LazyExoticComponent<typeof import('./NumberControl').NumberControl>;
11
12
  range: import('react').LazyExoticComponent<typeof import('./RangeControl').RangeControl>;
12
13
  select: import('react').LazyExoticComponent<typeof import('./SelectControl').SelectControl>;
14
+ multiselect: import('react').LazyExoticComponent<typeof import('./MultiSelectControl').MultiSelectControl>;
13
15
  separator: import('react').LazyExoticComponent<typeof import('./SeparatorControl').SeparatorControl>;
14
16
  text: import('react').LazyExoticComponent<typeof import('./TextControl').TextControl>;
15
17
  buttonGroup: import('react').LazyExoticComponent<typeof import('./ButtonGroupControl').ButtonGroupControl>;
@@ -7,6 +7,7 @@ const r = Object.freeze({
7
7
  number: o(() => import("./NumberControl/index.js").then((t) => ({ default: t.NumberControl }))),
8
8
  range: o(() => import("./RangeControl/index.js").then((t) => ({ default: t.RangeControl }))),
9
9
  select: o(() => import("./SelectControl/index.js").then((t) => ({ default: t.SelectControl }))),
10
+ multiselect: o(() => import("./MultiSelectControl/index.js").then((t) => ({ default: t.MultiSelectControl }))),
10
11
  separator: o(() => import("./SeparatorControl/index.js").then((t) => ({ default: t.SeparatorControl }))),
11
12
  text: o(() => import("./TextControl/index.js").then((t) => ({ default: t.TextControl }))),
12
13
  buttonGroup: o(() => import("./ButtonGroupControl/index.js").then((t) => ({ default: t.ButtonGroupControl })))
@@ -3,6 +3,7 @@ import { ButtonControl } from './ButtonControl/types';
3
3
  import { ButtonGroupControl } from './ButtonGroupControl/types';
4
4
  import { ColorControl } from './ColorControl/types';
5
5
  import { DateControl } from './DateControl/types';
6
+ import { MultiSelectControl } from './MultiSelectControl/types';
6
7
  import { NumberControl } from './NumberControl/types';
7
8
  import { RangeControl } from './RangeControl/types';
8
9
  import { SelectControl } from './SelectControl/types';
@@ -23,6 +24,7 @@ export type Controls = {
23
24
  color: ColorControl;
24
25
  boolean: BooleanControl;
25
26
  select: SelectControl;
27
+ multiselect: MultiSelectControl;
26
28
  text: TextControl;
27
29
  button: ButtonControl;
28
30
  number: NumberControl;
@@ -1,67 +1,72 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { useCallback as C } from "react";
3
- import { useDragAndDrop as w } from "../../hooks/useDragAndDrop/useDragAndDrop.js";
4
- import { useHotkey as b } from "../../hooks/useHotkeys/useHotkey.js";
5
- import { b as y, u as D } from "../../UIStore-CQdr4U-2.js";
6
- import { className as P } from "../../utils/className/className.js";
7
- import { EmptyContent as x } from "../EmptyContent/EmptyContent.js";
8
- import { Section as K } from "../Section/Section.js";
9
- import '../../assets/DevPanel.css';const N = "_devPanelContainer_1vath_1", k = "_header_1vath_12", A = "_title_1vath_21", j = "_button_1vath_31", E = "_collapsed_1vath_53", H = "_content_1vath_60", t = {
10
- devPanelContainer: N,
11
- header: k,
12
- title: A,
13
- button: j,
14
- collapsed: E,
15
- content: H
16
- }, M = {
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import { useCallback as D, useEffect as y } from "react";
3
+ import { useDragAndDrop as b } from "../../hooks/useDragAndDrop/useDragAndDrop.js";
4
+ import { useHotkey as w } from "../../hooks/useHotkeys/useHotkey.js";
5
+ import { useDevPanelSections as K } from "../../store/SectionsStore.js";
6
+ import { useDevPanelThemeActions as N } from "../../store/ThemeStore.js";
7
+ import { useDevPanelUI as k } from "../../store/UIStore.js";
8
+ import { className as x } from "../../utils/className/className.js";
9
+ import { EmptyContent as E } from "../EmptyContent/EmptyContent.js";
10
+ import { Icon as f } from "../Icon/index.js";
11
+ import { Section as j } from "../Section/Section.js";
12
+ import '../../assets/DevPanel.css';const A = "_devPanelContainer_vacct_132", S = "_header_vacct_171", H = "_title_vacct_186", I = "_button_vacct_197", T = "_collapsed_vacct_233", V = "_content_vacct_240", t = {
13
+ devPanelContainer: A,
14
+ header: S,
15
+ title: H,
16
+ button: I,
17
+ collapsed: T,
18
+ content: V
19
+ }, O = {
17
20
  ctrlKey: !0,
18
21
  shiftKey: !0,
19
22
  key: "a",
20
23
  altKey: !1,
21
24
  metaKey: !1
22
25
  };
23
- function U({ panelTitle: d = "Dev panel", ...h }) {
24
- const { isVisible: s, isCollapsed: n, position: l, setVisible: a, setCollapsed: m, setPosition: i } = y(), p = D(), v = C(
25
- (o) => {
26
- i(o);
26
+ function Q({ panelTitle: h = "Dev panel", ...o }) {
27
+ const { isVisible: s, isCollapsed: n, position: a, setVisible: l, setCollapsed: u, setPosition: c } = k(), { setTheme: r } = N(), v = K(), p = D(
28
+ (i) => {
29
+ c(i);
27
30
  },
28
- [i]
29
- ), { isDragging: u, elementRef: f, handleMouseDown: g } = w({
30
- onPositionChange: v
31
+ [c]
32
+ ), { isDragging: _, elementRef: C, handlePointerDown: g } = b({
33
+ onPositionChange: p
31
34
  });
32
- if (b({
35
+ if (w({
33
36
  description: "Show Dev Panel",
34
37
  preventDefault: !0,
35
- action: () => a(!s),
36
- ...M,
37
- ...h.hotKeyConfig,
38
+ action: () => l(!s),
39
+ ...O,
40
+ ...o.hotKeyConfig,
38
41
  target: window
39
- }), !s)
42
+ }), y(() => {
43
+ o.theme && r(o.theme);
44
+ }, [o.theme, r]), !s)
40
45
  return null;
41
- const r = Object.entries(p);
42
- return /* @__PURE__ */ c(
46
+ const m = Object.entries(v);
47
+ return /* @__PURE__ */ d(
43
48
  "div",
44
49
  {
45
- ref: f,
46
- ...P(t.devPanelContainer, {
47
- [t.dragging]: u
50
+ ref: C,
51
+ ...x(t.devPanelContainer, {
52
+ [t.dragging]: _
48
53
  }),
49
54
  style: {
50
- left: l.x,
51
- top: l.y,
55
+ left: a.x,
56
+ top: a.y,
52
57
  height: n ? "auto" : void 0
53
58
  },
54
59
  children: [
55
- /* @__PURE__ */ c("div", { className: t.header, onMouseDown: g, children: [
56
- /* @__PURE__ */ e("button", { className: t.button, onClick: () => m(!n), title: n ? "Expand" : "Collapse", children: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", className: n ? t.collapsed : void 0, children: /* @__PURE__ */ e("path", { d: "M16.843 10.211A.75.75 0 0 0 16.251 9H7.75a.75.75 0 0 0-.591 1.212l4.258 5.498a.746.746 0 0 0 1.183-.001l4.243-5.498z" }) }) }),
57
- /* @__PURE__ */ e("div", { className: t.title, children: d }),
58
- /* @__PURE__ */ e("button", { className: t.button, onClick: () => a(!1), title: "Close", children: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { d: "m12 10.93 5.719-5.72a.749.749 0 1 1 1.062 1.062l-5.72 5.719 5.719 5.719a.75.75 0 1 1-1.061 1.062L12 13.053l-5.719 5.719A.75.75 0 0 1 5.22 17.71l5.719-5.719-5.72-5.719A.752.752 0 0 1 6.281 5.21z" }) }) })
60
+ /* @__PURE__ */ d("div", { className: t.header, onPointerDown: g, children: [
61
+ /* @__PURE__ */ e("button", { className: t.button, onClick: () => u(!n), title: n ? "Expand" : "Collapse", children: /* @__PURE__ */ e(f, { name: "ArrowDown", className: n ? t.collapsed : void 0 }) }),
62
+ /* @__PURE__ */ e("div", { className: t.title, children: h }),
63
+ /* @__PURE__ */ e("button", { className: t.button, onClick: () => l(!1), title: "Close", children: /* @__PURE__ */ e(f, { name: "Close" }) })
59
64
  ] }),
60
- !n && /* @__PURE__ */ e("div", { className: t.content, children: r.length ? r.map(([o, _]) => /* @__PURE__ */ e(K, { sectionName: o, section: _ }, `section-${o}`)) : /* @__PURE__ */ e(x, {}) })
65
+ !n && /* @__PURE__ */ e("div", { className: t.content, children: m.length ? m.map(([i, P]) => /* @__PURE__ */ e(j, { sectionName: i, section: P }, `section-${i}`)) : /* @__PURE__ */ e(E, {}) })
61
66
  ]
62
67
  }
63
68
  );
64
69
  }
65
70
  export {
66
- U as DevPanel
71
+ Q as DevPanel
67
72
  };
@@ -1,5 +1,27 @@
1
1
  import { ControlsGroup } from '../ControlRenderer/controls/types';
2
2
  export type DevPanelHotkeyConfig = Pick<HotkeyConfig, "key" | "shiftKey" | "altKey" | "ctrlKey" | "metaKey">;
3
+ export type BuiltInTheme =
4
+ | "auto"
5
+ | "dark"
6
+ | "light"
7
+ | "orange"
8
+ | "purple"
9
+ | "green"
10
+ | "neon"
11
+ | "corporate"
12
+ | "highContrast"
13
+ | "sunset"
14
+ | "ocean"
15
+ | "forest"
16
+ | "midnight"
17
+ | "cherry"
18
+ | "gold"
19
+ | "retro"
20
+ | "pastel"
21
+ | "cyberpunk"
22
+ | "autumn"
23
+ | "arctic"
24
+ | "volcano";
3
25
 
4
26
  export interface DevPanelProps {
5
27
  panelTitle?: string;
@@ -17,6 +39,8 @@ export interface DevPanelProps {
17
39
  * ```
18
40
  */
19
41
  hotKeyConfig?: DevPanelHotkeyConfig;
42
+
43
+ theme?: BuiltInTheme;
20
44
  }
21
45
 
22
46
  export interface DevPanelSection {
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Portal component that renders DevPanel using React's createPortal.
3
+ * Automatically subscribes to DevPanelManager prop changes and renders
4
+ * the DevPanel with merged props into document.body.
5
+ *
6
+ * @returns DevPanel rendered as a portal in document.body
7
+ */
8
+ export declare const DevPanelPortal: () => import('react').ReactPortal;
@@ -0,0 +1,17 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { useState as a, useEffect as m } from "react";
3
+ import { createPortal as c } from "react-dom";
4
+ import { DevPanelManager as r } from "../../managers/DevPanelManager.js";
5
+ import { DevPanel as p } from "../DevPanel/DevPanel.js";
6
+ const b = () => {
7
+ const [t, e] = a({});
8
+ return m(() => {
9
+ const o = r.getInstance().getAllProps();
10
+ return e(o), r.getInstance().onPropsChange((n) => {
11
+ e(n);
12
+ });
13
+ }, []), c(/* @__PURE__ */ s(p, { ...t }), document.body);
14
+ };
15
+ export {
16
+ b as DevPanelPortal
17
+ };
@@ -0,0 +1 @@
1
+ export { DevPanelPortal } from './DevPanelPortal';
@@ -0,0 +1,4 @@
1
+ import { DevPanelPortal as r } from "./DevPanelPortal.js";
2
+ export {
3
+ r as DevPanelPortal
4
+ };
@@ -1,9 +1,9 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import '../../assets/EmptyContent.css';const o = "_empty_1xo8g_1", s = {
3
- empty: o
2
+ import '../../assets/EmptyContent.css';const s = "_empty_1bkns_1", o = {
3
+ empty: s
4
4
  };
5
- function n() {
6
- return /* @__PURE__ */ t("div", { className: s.empty, children: [
5
+ function r() {
6
+ return /* @__PURE__ */ t("div", { className: o.empty, children: [
7
7
  "No controls registered yet.",
8
8
  /* @__PURE__ */ e("br", {}),
9
9
  " ",
@@ -14,5 +14,5 @@ function n() {
14
14
  ] });
15
15
  }
16
16
  export {
17
- n as EmptyContent
17
+ r as EmptyContent
18
18
  };
@@ -0,0 +1,16 @@
1
+ declare const availableIcons: {
2
+ ArrowDown: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
3
+ Close: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
4
+ Check: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
5
+ };
6
+ interface IconProps extends React.SVGProps<SVGSVGElement> {
7
+ /** The name of the icon to render */
8
+ name: keyof typeof availableIcons;
9
+ }
10
+ /**
11
+ * Icon component for rendering SVG icons.
12
+ * @param props - The properties for the icon component.
13
+ * @returns The SVG element for the specified icon, or null if the icon is not found.
14
+ */
15
+ export declare function Icon({ name, ...props }: IconProps): React.ReactNode;
16
+ export {};
@@ -0,0 +1,31 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ const t = {
3
+ ArrowDown: (o) => /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...o, children: /* @__PURE__ */ l("path", { d: "M16.843 10.211A.75.75 0 0 0 16.251 9H7.75a.75.75 0 0 0-.591 1.212l4.258 5.498a.746.746 0 0 0 1.183-.001l4.243-5.498z" }) }),
4
+ Close: (o) => /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...o, children: /* @__PURE__ */ l("path", { d: "m12 10.93 5.719-5.72a.749.749 0 1 1 1.062 1.062l-5.72 5.719 5.719 5.719a.75.75 0 1 1-1.061 1.062L12 13.053l-5.719 5.719A.75.75 0 0 1 5.22 17.71l5.719-5.719-5.72-5.719A.752.752 0 0 1 6.281 5.21z" }) }),
5
+ Check: (o) => /* @__PURE__ */ l(
6
+ "svg",
7
+ {
8
+ xmlns: "http://www.w3.org/2000/svg",
9
+ viewBox: "0 0 24 24",
10
+ clipRule: "evenodd",
11
+ fillRule: "evenodd",
12
+ strokeLinejoin: "round",
13
+ strokeMiterlimit: "2",
14
+ ...o,
15
+ children: /* @__PURE__ */ l(
16
+ "path",
17
+ {
18
+ d: "m21 4.009c0-.478-.379-1-1-1h-16c-.62 0-1 .519-1 1v16c0 .621.52 1 1 1h16c.478 0 1-.379 1-1zm-14.051 8.382c-.165-.148-.249-.352-.249-.557 0-.411.333-.746.748-.746.178 0 .355.063.499.19l3.298 2.938 5.453-5.962c.149-.161.35-.243.554-.243.417 0 .748.337.748.747 0 .179-.065.359-.196.502l-5.953 6.509c-.147.161-.35.242-.552.242-.178 0-.357-.062-.499-.19z",
19
+ fillRule: "nonzero"
20
+ }
21
+ )
22
+ }
23
+ )
24
+ };
25
+ function r({ name: o, ...e }) {
26
+ const n = t[o];
27
+ return n ? /* @__PURE__ */ l(n, { ...e }) : null;
28
+ }
29
+ export {
30
+ r as Icon
31
+ };
@@ -1,10 +1,10 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import '../../assets/Input.css';const p = "_input_161wd_1", u = {
2
+ import '../../assets/Input.css';const p = "_input_pspvf_132", s = {
3
3
  input: p
4
4
  };
5
- function s(t) {
6
- return /* @__PURE__ */ n("input", { ...t, className: u.input });
5
+ function i(t) {
6
+ return /* @__PURE__ */ n("input", { ...t, className: s.input });
7
7
  }
8
8
  export {
9
- s as Input
9
+ i as Input
10
10
  };
@@ -1,24 +1,25 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
2
  import { ControlRenderer as i } from "../ControlRenderer/ControlRenderer.js";
3
- import { a as r } from "../../UIStore-CQdr4U-2.js";
4
- import '../../assets/Section.css';const d = "_section_1vgul_1", g = "_header_1vgul_8", _ = "_title_1vgul_15", p = "_toggle_1vgul_20", m = "_collapsed_1vgul_29", v = "_content_1vgul_35", l = {
3
+ import { useDevPanelSectionActions as r } from "../../store/SectionsStore.js";
4
+ import { Icon as p } from "../Icon/index.js";
5
+ import '../../assets/Section.css';const d = "_section_plx7y_1", _ = "_header_plx7y_9", m = "_title_plx7y_28", g = "_toggle_plx7y_35", h = "_collapsed_plx7y_45", x = "_content_plx7y_54", e = {
5
6
  section: d,
6
- header: g,
7
- title: _,
8
- toggle: p,
9
- collapsed: m,
10
- content: v
7
+ header: _,
8
+ title: m,
9
+ toggle: g,
10
+ collapsed: h,
11
+ content: x
11
12
  };
12
- function x({ sectionName: n, section: t }) {
13
+ function N({ sectionName: s, section: t }) {
13
14
  const { toggleSectionCollapse: c } = r();
14
- return /* @__PURE__ */ o("div", { className: l.section, children: [
15
- /* @__PURE__ */ o("div", { className: l.header, onClick: () => c(n), children: [
16
- /* @__PURE__ */ e("span", { className: l.title, children: t.name }),
17
- /* @__PURE__ */ e("span", { className: l.toggle, children: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", className: t.isCollapsed ? l.collapsed : void 0, children: /* @__PURE__ */ e("path", { d: "M10.211 7.155A.75.75 0 0 0 9 7.747v8.501a.75.75 0 0 0 1.212.591l5.498-4.258a.746.746 0 0 0-.001-1.183l-5.498-4.243z" }) }) })
15
+ return /* @__PURE__ */ n("div", { className: e.section, children: [
16
+ /* @__PURE__ */ n("div", { className: e.header, onClick: () => c(s), children: [
17
+ /* @__PURE__ */ o("span", { className: e.title, children: t.name }),
18
+ /* @__PURE__ */ o("span", { className: e.toggle, children: /* @__PURE__ */ o(p, { name: "ArrowDown", className: t.isCollapsed ? e.collapsed : void 0 }) })
18
19
  ] }),
19
- !t.isCollapsed && /* @__PURE__ */ e("div", { className: l.content, children: Object.entries(t.controls).map(([s, a]) => /* @__PURE__ */ e(i, { name: s, control: a }, s)) })
20
+ !t.isCollapsed && /* @__PURE__ */ o("div", { className: e.content, children: Object.entries(t.controls).map(([l, a]) => /* @__PURE__ */ o(i, { name: l, control: a }, l)) })
20
21
  ] });
21
22
  }
22
23
  export {
23
- x as Section
24
+ N as Section
24
25
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import '../../assets/Select.css';const s = "_select_12f91_1", c = {
2
+ import '../../assets/Select.css';const s = "_select_ia86w_132", c = {
3
3
  select: s
4
4
  };
5
5
  function o(e) {