@hanzogui/use-constant 4.4.0 → 7.3.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/LICENSE +40 -19
- package/dist/cjs/index.native.js.map +1 -1
- package/package.json +9 -7
package/LICENSE
CHANGED
|
@@ -1,21 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present, Hanzo AI, Inc.
|
|
4
|
+
|
|
5
|
+
Portions of this software are derived from upstream code originally licensed under
|
|
6
|
+
the MIT License, with the following copyright notices retained per its terms:
|
|
2
7
|
|
|
3
8
|
Copyright (c) 2020 Nate Wienert
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
Copyright (c) 2015-present, Nicolas Gallagher.
|
|
10
|
+
Copyright (c) 2015-present, Facebook, Inc.
|
|
11
|
+
Copyright (c) 2021 Radix
|
|
12
|
+
Copyright (c) 2017 Carmelo Pullara
|
|
13
|
+
Copyright (c) 2018 Framer B.V.
|
|
14
|
+
Copyright (c) 2022 WorkOS
|
|
15
|
+
|
|
16
|
+
All rights reserved.
|
|
17
|
+
|
|
18
|
+
Redistribution and use in source and binary forms, with or without
|
|
19
|
+
modification, are permitted provided that the following conditions are met:
|
|
20
|
+
|
|
21
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
22
|
+
list of conditions and the following disclaimer.
|
|
23
|
+
|
|
24
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
25
|
+
this list of conditions and the following disclaimer in the documentation
|
|
26
|
+
and/or other materials provided with the distribution.
|
|
27
|
+
|
|
28
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
29
|
+
may be used to endorse or promote products derived from this software
|
|
30
|
+
without specific prior written permission.
|
|
31
|
+
|
|
32
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
33
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
34
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
35
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
36
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
37
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
38
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
39
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
40
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
41
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
42
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","index_exports","useConstant","module","exports","React","require","fn","document","useMemo","ref","useRef","current","v"],"sources":["index.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n useConstant: () => useConstant\n});\nmodule.exports = __toCommonJS(index_exports);\nvar React = __toESM(require(\"react\"), 1);\nfunction useConstant(fn) {\n if (typeof document === \"undefined\") {\n return React.useMemo(function() {\n return fn();\n }, []);\n }\n var ref = React.useRef(void 0);\n if (!ref.current) {\n ref.current = {\n v: fn()\n };\n }\n return ref.current.v;\n}\n//# sourceMappingURL=index.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,QAAQ,GAAGC,MAAM,CAACC,MAAM;AAC5B,IAAIC,SAAS,GAAGF,MAAM,CAACG,cAAc;AACrC,IAAIC,gBAAgB,GAAGJ,MAAM,CAACK,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGN,MAAM,CAACO,mBAAmB;AAClD,IAAIC,YAAY,G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K,EAAEH,GAAG;EAAET,UAAU,EAAE;AAAK,CAAC,CAAC,GAAGJ,MAAM,EAC/Ga,GACF,CAAC,CAAC;AACF,IAAII,YAAY,GAAIJ,GAAG,IAAKR,WAAW,CAACjB,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE;EAAE4B,KAAK,EAAE;AAAK,CAAC,CAAC,EAAEH,GAAG,CAAC;AAC1F,IAAIK,aAAa,GAAG,CAAC,CAAC;AACtBnB,QAAQ,CAACmB,aAAa,EAAE;EACtBC,WAAW,EAAEA,CAAA,KAAMA;AACrB,CAAC,CAAC;AACFC,MAAM,CAACC,OAAO,GAAGJ,YAAY,CAACC,aAAa,CAAC;AAC5C,IAAII,KAAK,GAAGV,OAAO,CAACW,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AACxC,SAASJ,WAAWA,CAACK,EAAE,EAAE;EACvB,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;IACnC,OAAOH,KAAK,CAACI,OAAO,CAAC,YAAW;MAC9B,OAAOF,EAAE,CAAC,CAAC;IACb,CAAC,EAAE,EAAE,CAAC;EACR;EACA,IAAIG,GAAG,GAAGL,KAAK,CAACM,MAAM,CAAC,KAAK,CAAC,CAAC;EAC9B,IAAI,CAACD,GAAG,CAACE,OAAO,EAAE;IAChBF,GAAG,CAACE,OAAO,GAAG;MACZC,CAAC,EAAEN,EAAE,CAAC;IACR,CAAC;EACH;EACA,OAAOG,GAAG,CAACE,OAAO,CAACC,CAAC;AACtB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/use-constant",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"src",
|
|
6
6
|
"types",
|
|
@@ -27,16 +27,18 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "
|
|
31
|
-
"watch": "
|
|
32
|
-
"clean": "
|
|
33
|
-
"clean:build": "
|
|
30
|
+
"build": "gui-build",
|
|
31
|
+
"watch": "gui-build --watch",
|
|
32
|
+
"clean": "gui-build clean",
|
|
33
|
+
"clean:build": "gui-build clean:build"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@hanzogui/build": "
|
|
36
|
+
"@hanzogui/build": "7.3.0",
|
|
37
37
|
"react": ">=19"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": ">=19"
|
|
41
|
-
}
|
|
41
|
+
},
|
|
42
|
+
"license": "BSD-3-Clause",
|
|
43
|
+
"author": "Hanzo AI <dev@hanzo.ai>"
|
|
42
44
|
}
|