@vezham/hooks 0.3.3 → 26.0.0-alpha.6

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 ADDED
@@ -0,0 +1,173 @@
1
+ SPDX-License-Identifier: BUSL-1.1
2
+
3
+ Business Source License 1.1
4
+
5
+ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
6
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
7
+
8
+ ---
9
+
10
+ Parameters
11
+
12
+ Licensor: Vezham Technologies Private Limited
13
+
14
+ Licensed Work: The source code and packages in this repository (“the Licensed Work”).
15
+ The Licensed Work is (c) 2025–present Vezham Technologies Private Limited
16
+
17
+ Release Tag: The applicable release tag or commit identifier (for example, “v1.0.0”)
18
+ published by the Licensor for this version of the Licensed Work.
19
+ Users must cross-check the tag or commit identifier to verify
20
+ the release version and applicable Change Date.
21
+
22
+ Additional Use Grant: 1. You may make non-production use of the Licensed Work.
23
+
24
+ 2. You may make production use of the Licensed Work, provided
25
+ your use does not include offering the Licensed Work, or any
26
+ derivative thereof, to third parties on a hosted, embedded,
27
+ or managed basis in order to compete with the Licensor’s
28
+ commercial offerings based on the Licensed Work, or offerings
29
+ that provide substantially similar functionality.
30
+
31
+ For purposes of this license:
32
+
33
+ A “competitive offering” is a Product that is offered to third
34
+ parties on a paid basis, including through paid support,
35
+ consulting, managed service arrangements, or similar commercial
36
+ relationships, that significantly overlaps with the capabilities
37
+ or functionality of the Licensor’s commercial offerings based on
38
+ the Licensed Work.
39
+
40
+ If your Product is not a competitive offering when you first
41
+ make it generally available, it will not become a competitive
42
+ offering solely because the Licensor releases a new version of the
43
+ Licensed Work with additional features or capabilities. Products
44
+ that are not provided on a paid basis are not competitive offerings.
45
+
46
+ “Product” means any software or service that is (a) offered to end
47
+ users for deployment in their own environments (self-managed), or
48
+ (b) offered as a hosted, cloud, or managed service by you or on
49
+ your behalf.
50
+
51
+ “Embedded” means including the source code or executable code of
52
+ the Licensed Work in a competitive offering. “Embedded” also means
53
+ packaging or distributing the competitive offering in a way that
54
+ requires the Licensed Work to be accessed, invoked, or downloaded
55
+ for the competitive offering to function.
56
+
57
+ Hosting or using the Licensed Work internally within your own
58
+ organization, including your affiliates under common control,
59
+ is not considered a competitive offering.
60
+
61
+ 3. Educational institutions and legally recognised non-profit
62
+ organizations may use the Licensed Work in a production
63
+ environment without restriction, provided such use is not
64
+ for commercial profit.
65
+
66
+ For binding interpretive guidance on using Vezham products under
67
+ the Business Source License, please visit our licensing FAQ:
68
+ https://trust.vezham.com/legal/license-faq
69
+
70
+ Change Date: Four (4) years from the date the Licensed Work is first publicly
71
+ released under the specified Release Tag
72
+
73
+ Change License: GNU Affero General Public License v3.0 (AGPL-3.0-or-later)
74
+ The full text of the Change License is available at:
75
+ https://www.gnu.org/licenses/agpl-3.0.html
76
+
77
+ For information about commercial licensing or alternative arrangements,
78
+ please contact the Licensor at: https://vezham.com
79
+ or email: license@vezham.com
80
+
81
+ For formal legal notices or IP-related correspondence,
82
+ please contact: licensor@vezham.com
83
+
84
+ ---
85
+
86
+ Notice
87
+
88
+ The Business Source License (this document, or the "License") is not an Open
89
+ Source license. However, the Licensed Work will eventually be made available
90
+ under an Open Source License, as stated in this License.
91
+
92
+ For more information on the use of the Business Source License generally,
93
+ please visit the Adopting and Developing Business Source License FAQ at:
94
+ https://mariadb.com/bsl-faq-adopting
95
+
96
+ ---
97
+
98
+ Business Source License 1.1
99
+
100
+ ---
101
+
102
+ Terms
103
+
104
+ The Licensor hereby grants you the right to copy, modify, create derivative
105
+ works, redistribute, and make non-production use of the Licensed Work.
106
+ The Licensor may make an Additional Use Grant, above, permitting limited
107
+ production use.
108
+
109
+ Effective on the Change Date, or the fourth anniversary of the first publicly
110
+ available distribution of a specific version of the Licensed Work under this
111
+ License, whichever comes first, the Licensor hereby grants you rights under
112
+ the terms of the Change License, and the rights granted in the paragraph
113
+ above terminate.
114
+
115
+ If your use of the Licensed Work does not comply with the requirements
116
+ currently in effect as described in this License, you must purchase a
117
+ commercial license from the Licensor, its affiliated entities, or authorized
118
+ resellers, or you must refrain from using the Licensed Work.
119
+
120
+ All copies of the original and modified Licensed Work, and derivative works
121
+ of the Licensed Work, are subject to this License. This License applies
122
+ separately for each version of the Licensed Work, and the Change Date may
123
+ vary for each version of the Licensed Work released by the Licensor.
124
+
125
+ You must conspicuously display this License on each original or modified copy
126
+ of the Licensed Work. If you receive the Licensed Work in original or modified
127
+ form from a third party, the terms and conditions set forth in this License
128
+ apply to your use of that work.
129
+
130
+ Any use of the Licensed Work in violation of this License will automatically
131
+ terminate your rights under this License for the current and all other versions
132
+ of the Licensed Work.
133
+
134
+ This License does not grant you any right in any trademark or logo of the
135
+ Licensor or its affiliates (provided that you may use a trademark or logo of
136
+ the Licensor as expressly required by this License).
137
+
138
+ ---
139
+
140
+ Disclaimer
141
+
142
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
143
+ AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
144
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
145
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
146
+ TITLE.
147
+
148
+ -----------------------------------------------------------------------------
149
+
150
+ MariaDB hereby grants you permission to use this License’s text to license your
151
+ works, and to refer to it using the trademark "Business Source License", as long
152
+ as you comply with the Covenants of Licensor below.
153
+
154
+ Covenants of Licensor
155
+
156
+ In consideration of the right to use this License’s text and the "Business
157
+ Source License" name and trademark, Licensor covenants to MariaDB, and to all
158
+ other recipients of the licensed work to be provided by Licensor:
159
+
160
+ 1. To specify as the Change License the GPL Version 3.0 or any later version,
161
+ or a license that is compatible with GPL Version 3.0 or a later version,
162
+ where "compatible" means that software provided under the Change License can
163
+ be included in a program with software provided under GPL Version 3.0 or a
164
+ later version. Licensor may specify additional Change Licenses without
165
+ limitation.
166
+
167
+ 2. To either: (a) specify an additional grant of rights to use that does not
168
+ impose any additional restriction on the right granted in this License, as
169
+ the Additional Use Grant; or (b) insert the text "None".
170
+
171
+ 3. To specify a Change Date.
172
+
173
+ 4. Not to modify this License in any other way.
@@ -0,0 +1,2 @@
1
+ export { CommandContext, useCommand } from './lib/use-command';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import { CommandContext, useCommand } from "./lib/use-command.js";
2
+ export { CommandContext, useCommand };
@@ -0,0 +1,10 @@
1
+ interface CommandContextValue {
2
+ isOpen: boolean;
3
+ openCommand: () => void;
4
+ closeCommand: () => void;
5
+ toggleCommand: () => void;
6
+ }
7
+ export declare const CommandContext: import("react").Context<CommandContextValue | null>;
8
+ export declare const useCommand: () => CommandContextValue;
9
+ export {};
10
+ //# sourceMappingURL=use-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-command.d.ts","sourceRoot":"","sources":["../../src/lib/use-command.ts"],"names":[],"mappings":"AAEA,UAAU,mBAAmB;IAC3B,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,aAAa,EAAE,MAAM,IAAI,CAAA;CAC1B;AAED,eAAO,MAAM,cAAc,qDAAkD,CAAA;AAE7E,eAAO,MAAM,UAAU,2BAQtB,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { createContext, useContext } from "react";
2
+ //#region src/lib/use-command.ts
3
+ var CommandContext = createContext(null);
4
+ var useCommand = () => {
5
+ const context = useContext(CommandContext);
6
+ if (!context) throw new Error("useCommand must be used within CommandProvider");
7
+ return context;
8
+ };
9
+ //#endregion
10
+ export { CommandContext, useCommand };
package/package.json CHANGED
@@ -1,57 +1,27 @@
1
1
  {
2
2
  "name": "@vezham/hooks",
3
- "version": "0.3.3",
4
- "description": "A package for managing hooks",
3
+ "version": "26.0.0-alpha.6",
5
4
  "repository": {
6
5
  "type": "git",
7
- "url": "git+https://github.com/vezham/v0xFE-kit.git",
6
+ "url": "git+https://github.com/vezham/vx-fe-pkgs.git",
8
7
  "directory": "packages/core/hooks"
9
8
  },
9
+ "type": "module",
10
10
  "exports": {
11
11
  ".": {
12
- "types": "./index.d.ts",
13
- "import": "./index.mjs",
14
- "require": "./index.js"
12
+ "@vx/fe-kit": "./src/index.ts",
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js",
15
+ "default": "./dist/index.js"
15
16
  },
16
- "./style.css": "./style.css"
17
+ "./package.json": "./package.json"
17
18
  },
18
- "main": "./index.js",
19
- "types": "./index.d.ts",
20
- "dependencies": {
21
- "@v0xoss/use-aria-accordion": "^0.0.5",
22
- "@v0xoss/use-aria-accordion-item": "^0.0.5",
23
- "@v0xoss/use-aria-button": "^0.0.5",
24
- "@v0xoss/use-aria-link": "^0.0.5",
25
- "@v0xoss/use-aria-modal-overlay": "^0.0.5",
26
- "@v0xoss/use-aria-multiselect": "^0.0.5",
27
- "@v0xoss/use-callback-ref": "^0.0.5",
28
- "@v0xoss/use-clipboard": "^0.0.5",
29
- "@v0xoss/use-data-scroll-overflow": "^0.0.5",
30
- "@v0xoss/use-disclosure": "^0.0.5",
31
- "@v0xoss/use-draggable": "^0.0.5",
32
- "@v0xoss/use-image": "^0.0.5",
33
- "@v0xoss/use-infinite-scroll": "^0.0.5",
34
- "@v0xoss/use-intersection-observer": "^0.0.5",
35
- "@v0xoss/use-is-mobile": "^0.0.5",
36
- "@v0xoss/use-is-mounted": "^0.0.5",
37
- "@v0xoss/use-measure": "^0.0.5",
38
- "@v0xoss/use-pagination": "^0.0.5",
39
- "@v0xoss/use-real-shape": "^0.0.5",
40
- "@v0xoss/use-ref-state": "^0.0.5",
41
- "@v0xoss/use-resize": "^0.0.5",
42
- "@v0xoss/use-safe-layout-effect": "^0.0.5",
43
- "@v0xoss/use-scroll-position": "^0.0.5",
44
- "@v0xoss/use-ssr": "^0.0.5",
45
- "@v0xoss/use-theme": "^0.0.5",
46
- "@v0xoss/use-update-effect": "^0.0.5",
47
- "@v0xoss/usehooks-ts": "^0.0.2",
48
- "@vezham/use-axios": "0.3.3",
49
- "@vezham/use-get-device": "0.3.3",
50
- "@vezham/use-logger": "0.3.3",
51
- "@vezham/use-markdown": "0.3.3",
52
- "@vezham/use-scroll-to": "0.3.3",
53
- "@vezham/use-shortcut": "0.3.3",
54
- "@vezham/use-store": "0.3.3",
55
- "@vezham/use-toast": "0.3.3"
56
- }
19
+ "main": "./dist/index.js",
20
+ "module": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "files": [
23
+ "!**/*.tsbuildinfo",
24
+ "dist",
25
+ "LICENSE"
26
+ ]
57
27
  }
package/index.d.ts DELETED
@@ -1,9 +0,0 @@
1
- export * from './usehooks-ts';
2
- export * from '../../../hooks/use-axios/src/index.ts';
3
- export * from '../../../hooks/use-get-device/src/index.ts';
4
- export * from '../../../hooks/use-logger/src/index.ts';
5
- export * from '../../../hooks/use-markdown/src/index.ts';
6
- export * from '../../../hooks/use-scroll-to/src/index.ts';
7
- export * from '../../../hooks/use-shortcut/src/index.ts';
8
- export * from '../../../hooks/use-store/src/index.ts';
9
- export * from '../../../hooks/use-toast/src/index.ts';