asasvirtuais 2.4.0 → 2.4.2

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": "asasvirtuais",
3
3
  "type": "module",
4
- "version": "2.4.0",
4
+ "version": "2.4.2",
5
5
  "description": "React form and action management utilities",
6
6
  "directories": {
7
7
  "packages": "./packages"
@@ -15,6 +15,10 @@
15
15
  ],
16
16
  "exports": {
17
17
  "./package.json": "./package.json",
18
+ "./auth0": {
19
+ "types": "./packages/auth0.ts",
20
+ "default": "./packages/auth0.ts"
21
+ },
18
22
  "./action": {
19
23
  "types": "./packages/action.tsx",
20
24
  "default": "./packages/action.tsx"
@@ -307,9 +307,10 @@ export function SingleProvider<TSchema extends TableSchema>({
307
307
  table: string
308
308
  schema: TSchema
309
309
  children: React.ReactNode | ((props: ReturnType<typeof useSingleProvider<TSchema>>) => React.ReactNode)
310
+ nullIfNotFound?: boolean
310
311
  }) {
311
312
  const value = useSingleProvider<TSchema>(props)
312
- if (!value.single) return null
313
+ if (props.nullIfNotFound && !value.single) return null
313
314
  return (
314
315
  // @ts-expect-error
315
316
  <SingleContext.Provider value={value}>