@next-box/appsettings 0.0.4 → 0.0.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@next-box/appsettings",
3
3
  "description": "A configuration management library for TypeScript applications, inspired by .NET’s appsettings.json.",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "author": "miami-man",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/badbatch/next-box",
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@ export { AppSettingsProvider } from '#components/AppSettingsProvider.tsx';
2
2
  export { Setting } from '#components/Setting.tsx';
3
3
  export { useAppSetting } from '#hooks/useAppSetting.ts';
4
4
  export { useAppSettings } from '#hooks/useAppSettings.ts';
5
+ export { useAppSettingsContext } from '#hooks/useAppSettingsContext.ts';
5
6
  export type { AppSettings, ScopedSettings } from '#types/AppSettings.types.ts';
6
7
  export type { SettingPath, SettingSectionPath, SettingValue } from '#types/Config.types.ts';
7
8
 
@@ -17,11 +17,11 @@ export type SettingPath<T extends object, Depth extends number = 5> = Depth exte
17
17
  export type SettingSectionPath<T extends object, Depth extends number = 5> = Depth extends 0
18
18
  ? never
19
19
  : {
20
- [K in Extract<keyof T, string>]: T[K] extends Primitive | readonly Primitive[]
20
+ [K in Exclude<Extract<keyof T, string>, '__appSettingsSchema'>]: T[K] extends Primitive | readonly Primitive[]
21
21
  ? never
22
22
  : T[K] extends object
23
23
  ? K | `${K}.${SettingSectionPath<T[K], PreviousDepth[Depth]>}`
24
24
  : never;
25
- }[Extract<keyof T, string>];
25
+ }[Exclude<Extract<keyof T, string>, '__appSettingsSchema'>];
26
26
 
27
27
  export type SettingValue<T extends object, P extends SettingPath<T>> = Get<T, P>;