@berenjena/react-dev-panel 2.2.0 → 2.4.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.
- package/README.md +97 -239
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/components/ControlRenderer/controls/BooleanControl/index.js +1 -1
- package/dist/components/ControlRenderer/controls/ButtonControl/index.js +1 -1
- package/dist/components/ControlRenderer/controls/ButtonGroupControl/index.js +1 -1
- package/dist/components/ControlRenderer/controls/ColorControl/index.js +1 -1
- package/dist/components/ControlRenderer/controls/DragAndDropControl/index.js +1 -1
- package/dist/components/ControlRenderer/controls/LocalStorageControl/index.d.ts +23 -0
- package/dist/components/ControlRenderer/controls/LocalStorageControl/index.js +252 -0
- package/dist/components/ControlRenderer/controls/LocalStorageControl/types.d.ts +14 -0
- package/dist/components/ControlRenderer/controls/SelectControl/index.js +15 -5
- package/dist/components/ControlRenderer/controls/SelectControl/types.d.ts +2 -0
- package/dist/components/ControlRenderer/controls/index.d.ts +1 -0
- package/dist/components/ControlRenderer/controls/index.js +2 -1
- package/dist/components/ControlRenderer/controls/types.d.ts +3 -0
- package/dist/components/ControlRenderer/index.js +23 -23
- package/dist/components/Select/index.d.ts +3 -1
- package/dist/components/Select/index.js +132 -97
- package/dist/hooks/useDevPanel/index.js +45 -17
- package/dist/store/ControlPersistenceService.d.ts +33 -0
- package/dist/store/ControlPersistenceService.js +61 -0
- package/dist/utils/copyToClipboard/copyToClipboard.d.ts +17 -0
- package/dist/utils/copyToClipboard/copyToClipboard.js +10 -0
- package/dist/utils/copyToClipboard/index.d.ts +1 -0
- package/dist/utils/copyToClipboard/index.js +4 -0
- package/dist/utils/getStringPreview/getStringPreview.d.ts +14 -0
- package/dist/utils/getStringPreview/getStringPreview.js +6 -0
- package/dist/utils/getStringPreview/index.d.ts +1 -0
- package/dist/utils/getStringPreview/index.js +4 -0
- package/dist/utils/prettifyJson/index.d.ts +1 -0
- package/dist/utils/prettifyJson/index.js +4 -0
- package/dist/utils/prettifyJson/prettifyJson.d.ts +13 -0
- package/dist/utils/prettifyJson/prettifyJson.js +11 -0
- package/package.json +9 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prettifies a JSON string by formatting it with indentation or returning it as-is if not valid JSON
|
|
3
|
+
*
|
|
4
|
+
* @param value - The JSON string to prettify
|
|
5
|
+
* @returns Prettified JSON string or original value if parsing fails
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* prettifyJson('{"name":"John"}') // Returns '{\n "name": "John"\n}'
|
|
10
|
+
* prettifyJson('invalid') // Returns 'invalid'
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare function prettifyJson(value: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"name": "@berenjena/react-dev-panel",
|
|
6
6
|
"description": "A React development panel with various tools and utilities.",
|
|
@@ -65,9 +65,12 @@
|
|
|
65
65
|
"test": "vitest",
|
|
66
66
|
"test:ui": "vitest --ui",
|
|
67
67
|
"coverage": "vitest run --coverage",
|
|
68
|
-
"
|
|
68
|
+
"size": "size-limit",
|
|
69
|
+
"size:analyze": "npm run build && size-limit --json > .size-limit-output.json && node scripts/analyze-bundle.js",
|
|
70
|
+
"size:watch": "bundlewatch",
|
|
71
|
+
"prepublishOnly": "vitest run && npm run build && npm run size",
|
|
69
72
|
"changeset": "changeset",
|
|
70
|
-
"prerelease": "vitest run && npm run build",
|
|
73
|
+
"prerelease": "vitest run && npm run build && npm run size",
|
|
71
74
|
"release": "changeset publish",
|
|
72
75
|
"prepare": "npx husky",
|
|
73
76
|
"commit": "git-cz"
|
|
@@ -86,6 +89,7 @@
|
|
|
86
89
|
"@commitlint/cz-commitlint": "^19.8.1",
|
|
87
90
|
"@eslint/js": "^9.32.0",
|
|
88
91
|
"@rollup/plugin-terser": "^0.4.4",
|
|
92
|
+
"@size-limit/preset-small-lib": "^12.0.0",
|
|
89
93
|
"@storybook/addon-docs": "^9.1.0",
|
|
90
94
|
"@storybook/react-vite": "^9.1.0",
|
|
91
95
|
"@types/node": "^24.1.0",
|
|
@@ -94,6 +98,7 @@
|
|
|
94
98
|
"@vitejs/plugin-react-swc": "^3.11.0",
|
|
95
99
|
"@vitest/coverage-v8": "^3.2.4",
|
|
96
100
|
"@vitest/ui": "^3.2.4",
|
|
101
|
+
"bundlewatch": "^0.4.1",
|
|
97
102
|
"commitizen": "^4.3.1",
|
|
98
103
|
"eslint": "^9.32.0",
|
|
99
104
|
"eslint-plugin-react": "^7.37.5",
|
|
@@ -109,6 +114,7 @@
|
|
|
109
114
|
"react": "^19.1.1",
|
|
110
115
|
"react-dom": "^19.1.1",
|
|
111
116
|
"sass-embedded": "^1.89.2",
|
|
117
|
+
"size-limit": "^12.0.0",
|
|
112
118
|
"storybook": "^9.1.0",
|
|
113
119
|
"stylelint": "^16.23.0",
|
|
114
120
|
"typescript": "^5.9.2",
|