@ehfuse/forma 1.7.1 → 1.8.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/dist/esm/index.min.js +28 -0
- package/dist/index.min.js +28 -0
- package/package.json +9 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* index.ts
|
|
3
|
+
*
|
|
4
|
+
* Forma - Advanced React form state management library
|
|
5
|
+
* Main entry point and API exports
|
|
6
|
+
*
|
|
7
|
+
* @license MIT License
|
|
8
|
+
* @copyright 2025 KIM YOUNG JIN (Kim Young Jin)
|
|
9
|
+
* @author KIM YOUNG JIN (ehfuse@gmail.com)
|
|
10
|
+
*
|
|
11
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
* in the Software without restriction, including without limitation the rights
|
|
14
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
* furnished to do so, subject to the following conditions:
|
|
17
|
+
*
|
|
18
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
* copies or substantial portions of the Software.
|
|
20
|
+
*
|
|
21
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
* SOFTWARE.
|
|
28
|
+
*/export{useForm}from"./hooks/useForm";export{useGlobalForm}from"./hooks/useGlobalForm";export{useRegisterGlobalForm}from"./hooks/useRegisterGlobalForm";export{useUnregisterGlobalForm}from"./hooks/useUnregisterGlobalForm";export{useFormaState,useFieldSubscription}from"./hooks/useFormaState";export{useGlobalFormaState}from"./hooks/useGlobalFormaState";export{useRegisterGlobalFormaState}from"./hooks/useRegisterGlobalFormaState";export{useUnregisterGlobalFormaState}from"./hooks/useUnregisterGlobalFormaState";export{useModal}from"./hooks/useModal";export{useBreakpoint}from"./hooks/useBreakpoint";export{GlobalFormaContext,GlobalFormaProvider}from"./contexts/GlobalFormaContext";export{FieldStore}from"./core/FieldStore";export{getNestedValue,setNestedValue}from"./utils/dotNotation";export{isDevelopment,devWarn,devError,devLog}from"./utils/environment";export const FORMA_VERSION="1.0.0",FORMA_METADATA={name:"Forma",version:FORMA_VERSION,description:"Advanced React form state management library",author:"KIM YOUNG JIN (Kim Young Jin)",email:"ehfuse@gmail.com",license:"MIT",features:["Optimized re-rendering with individual field subscriptions","Nested object handling with dot notation support","Full compatibility with MUI components","Global form state management","Complete TypeScript support","Leveraging latest React 19 features"]};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* index.ts
|
|
3
|
+
*
|
|
4
|
+
* Forma - Advanced React form state management library
|
|
5
|
+
* Main entry point and API exports
|
|
6
|
+
*
|
|
7
|
+
* @license MIT License
|
|
8
|
+
* @copyright 2025 KIM YOUNG JIN (Kim Young Jin)
|
|
9
|
+
* @author KIM YOUNG JIN (ehfuse@gmail.com)
|
|
10
|
+
*
|
|
11
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
* in the Software without restriction, including without limitation the rights
|
|
14
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
* furnished to do so, subject to the following conditions:
|
|
17
|
+
*
|
|
18
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
* copies or substantial portions of the Software.
|
|
20
|
+
*
|
|
21
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
* SOFTWARE.
|
|
28
|
+
*/Object.defineProperty(exports,"__esModule",{value:!0}),exports.FORMA_METADATA=exports.FORMA_VERSION=exports.devLog=exports.devError=exports.devWarn=exports.isDevelopment=exports.setNestedValue=exports.getNestedValue=exports.FieldStore=exports.GlobalFormaProvider=exports.GlobalFormaContext=exports.useBreakpoint=exports.useModal=exports.useUnregisterGlobalFormaState=exports.useRegisterGlobalFormaState=exports.useGlobalFormaState=exports.useFieldSubscription=exports.useFormaState=exports.useUnregisterGlobalForm=exports.useRegisterGlobalForm=exports.useGlobalForm=exports.useForm=void 0;var useForm_1=require("./hooks/useForm");Object.defineProperty(exports,"useForm",{enumerable:!0,get:function(){return useForm_1.useForm}});var useGlobalForm_1=require("./hooks/useGlobalForm");Object.defineProperty(exports,"useGlobalForm",{enumerable:!0,get:function(){return useGlobalForm_1.useGlobalForm}});var useRegisterGlobalForm_1=require("./hooks/useRegisterGlobalForm");Object.defineProperty(exports,"useRegisterGlobalForm",{enumerable:!0,get:function(){return useRegisterGlobalForm_1.useRegisterGlobalForm}});var useUnregisterGlobalForm_1=require("./hooks/useUnregisterGlobalForm");Object.defineProperty(exports,"useUnregisterGlobalForm",{enumerable:!0,get:function(){return useUnregisterGlobalForm_1.useUnregisterGlobalForm}});var useFormaState_1=require("./hooks/useFormaState");Object.defineProperty(exports,"useFormaState",{enumerable:!0,get:function(){return useFormaState_1.useFormaState}}),Object.defineProperty(exports,"useFieldSubscription",{enumerable:!0,get:function(){return useFormaState_1.useFieldSubscription}});var useGlobalFormaState_1=require("./hooks/useGlobalFormaState");Object.defineProperty(exports,"useGlobalFormaState",{enumerable:!0,get:function(){return useGlobalFormaState_1.useGlobalFormaState}});var useRegisterGlobalFormaState_1=require("./hooks/useRegisterGlobalFormaState");Object.defineProperty(exports,"useRegisterGlobalFormaState",{enumerable:!0,get:function(){return useRegisterGlobalFormaState_1.useRegisterGlobalFormaState}});var useUnregisterGlobalFormaState_1=require("./hooks/useUnregisterGlobalFormaState");Object.defineProperty(exports,"useUnregisterGlobalFormaState",{enumerable:!0,get:function(){return useUnregisterGlobalFormaState_1.useUnregisterGlobalFormaState}});var useModal_1=require("./hooks/useModal");Object.defineProperty(exports,"useModal",{enumerable:!0,get:function(){return useModal_1.useModal}});var useBreakpoint_1=require("./hooks/useBreakpoint");Object.defineProperty(exports,"useBreakpoint",{enumerable:!0,get:function(){return useBreakpoint_1.useBreakpoint}});var GlobalFormaContext_1=require("./contexts/GlobalFormaContext");Object.defineProperty(exports,"GlobalFormaContext",{enumerable:!0,get:function(){return GlobalFormaContext_1.GlobalFormaContext}}),Object.defineProperty(exports,"GlobalFormaProvider",{enumerable:!0,get:function(){return GlobalFormaContext_1.GlobalFormaProvider}});var FieldStore_1=require("./core/FieldStore");Object.defineProperty(exports,"FieldStore",{enumerable:!0,get:function(){return FieldStore_1.FieldStore}});var dotNotation_1=require("./utils/dotNotation");Object.defineProperty(exports,"getNestedValue",{enumerable:!0,get:function(){return dotNotation_1.getNestedValue}}),Object.defineProperty(exports,"setNestedValue",{enumerable:!0,get:function(){return dotNotation_1.setNestedValue}});var environment_1=require("./utils/environment");Object.defineProperty(exports,"isDevelopment",{enumerable:!0,get:function(){return environment_1.isDevelopment}}),Object.defineProperty(exports,"devWarn",{enumerable:!0,get:function(){return environment_1.devWarn}}),Object.defineProperty(exports,"devError",{enumerable:!0,get:function(){return environment_1.devError}}),Object.defineProperty(exports,"devLog",{enumerable:!0,get:function(){return environment_1.devLog}}),exports.FORMA_VERSION="1.0.0",exports.FORMA_METADATA={name:"Forma",version:exports.FORMA_VERSION,description:"Advanced React form state management library",author:"KIM YOUNG JIN (Kim Young Jin)",email:"ehfuse@gmail.com",license:"MIT",features:["Optimized re-rendering with individual field subscriptions","Nested object handling with dot notation support","Full compatibility with MUI components","Global form state management","Complete TypeScript support","Leveraging latest React 19 features"]};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ehfuse/forma",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Advanced React state management library with individual field subscriptions - supports both forms and general state management with useFormaState",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/esm/index.js",
|
|
12
12
|
"require": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./min": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/esm/index.min.js",
|
|
17
|
+
"require": "./dist/index.min.js"
|
|
13
18
|
}
|
|
14
19
|
},
|
|
15
20
|
"files": [
|
|
@@ -22,8 +27,9 @@
|
|
|
22
27
|
"build:cjs": "tsc -p tsconfig.build.json",
|
|
23
28
|
"build:esm": "tsc -p tsconfig.build.json --module esnext --outDir dist/esm",
|
|
24
29
|
"build:types": "tsc -p tsconfig.build.json --declaration --emitDeclarationOnly --outDir dist",
|
|
30
|
+
"build:min": "esbuild dist/index.js --minify --outfile=dist/index.min.js && esbuild dist/esm/index.js --minify --outfile=dist/esm/index.min.js",
|
|
25
31
|
"clean": "rm -rf dist",
|
|
26
|
-
"prepublishOnly": "npm run build",
|
|
32
|
+
"prepublishOnly": "npm run build && npm run build:min",
|
|
27
33
|
"test": "echo \"Tests will be added\" && exit 0",
|
|
28
34
|
"lint": "eslint . --ext .ts,.tsx",
|
|
29
35
|
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
|
|
@@ -73,6 +79,7 @@
|
|
|
73
79
|
},
|
|
74
80
|
"devDependencies": {
|
|
75
81
|
"@types/react": "^19.1.12",
|
|
82
|
+
"esbuild": "^0.23.0",
|
|
76
83
|
"typescript": "^5.9.2"
|
|
77
84
|
}
|
|
78
85
|
}
|