@okyrychenko-dev/react-action-guard 1.0.0 → 1.0.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/dist/index.d.cts CHANGED
@@ -532,10 +532,6 @@ declare function createPerformanceMiddleware(config?: PerformanceConfig): Middle
532
532
  */
533
533
  interface UIBlockingProviderProps {
534
534
  children: ReactNode;
535
- /** Enable Redux DevTools integration (default: true in development) */
536
- enableDevtools?: boolean;
537
- /** Name for Redux DevTools (default: "UIBlocking") */
538
- devtoolsName?: string;
539
535
  /** Initial middlewares to register */
540
536
  middlewares?: ReadonlyArray<Middleware>;
541
537
  }
@@ -562,12 +558,10 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
562
558
  * - Modals/Dialogs - Scoped blocking within a dialog
563
559
  *
564
560
  * Uses `createStoreProvider` from `@okyrychenko-dev/react-zustand-toolkit` with
565
- * built-in DevTools support and middleware registration.
561
+ * provider-scoped store creation and middleware registration.
566
562
  *
567
563
  * @param props - Provider configuration
568
564
  * @param props.children - React children to wrap with the provider
569
- * @param props.enableDevtools - Enable Redux DevTools integration. Defaults to true in development, false in production.
570
- * @param props.devtoolsName - Name displayed in Redux DevTools. Defaults to "UIBlocking".
571
565
  * @param props.middlewares - Array of middleware functions to register on store creation
572
566
  *
573
567
  * @example
@@ -585,15 +579,13 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
585
579
  * ```
586
580
  *
587
581
  * @example
588
- * With middleware and custom DevTools name
582
+ * With middleware
589
583
  * ```tsx
590
584
  * import { UIBlockingProvider, loggerMiddleware } from '@okyrychenko-dev/react-action-guard';
591
585
  *
592
586
  * function App() {
593
587
  * return (
594
588
  * <UIBlockingProvider
595
- * enableDevtools={true}
596
- * devtoolsName="MyApp-UIBlocking"
597
589
  * middlewares={[loggerMiddleware]}
598
590
  * >
599
591
  * <MyApplication />
@@ -608,11 +600,11 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
608
600
  * function MicroFrontendApp() {
609
601
  * return (
610
602
  * <div>
611
- * <UIBlockingProvider devtoolsName="MicroApp1">
603
+ * <UIBlockingProvider>
612
604
  * <MicroApp1 />
613
605
  * </UIBlockingProvider>
614
606
  *
615
- * <UIBlockingProvider devtoolsName="MicroApp2">
607
+ * <UIBlockingProvider>
616
608
  * <MicroApp2 />
617
609
  * </UIBlockingProvider>
618
610
  * </div>
@@ -629,7 +621,7 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
629
621
  *
630
622
  * test('blocker behavior', () => {
631
623
  * render(
632
- * <UIBlockingProvider enableDevtools={false}>
624
+ * <UIBlockingProvider>
633
625
  * <ComponentUnderTest />
634
626
  * </UIBlockingProvider>
635
627
  * );
@@ -644,7 +636,7 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
644
636
  * @public
645
637
  * @since 0.6.0
646
638
  */
647
- declare function UIBlockingProvider({ children, enableDevtools, devtoolsName, middlewares, }: UIBlockingProviderProps): ReactNode;
639
+ declare function UIBlockingProvider({ children, middlewares, }: UIBlockingProviderProps): ReactNode;
648
640
 
649
641
  /**
650
642
  * Hook that resolves to either the context store or global store
package/dist/index.d.ts CHANGED
@@ -532,10 +532,6 @@ declare function createPerformanceMiddleware(config?: PerformanceConfig): Middle
532
532
  */
533
533
  interface UIBlockingProviderProps {
534
534
  children: ReactNode;
535
- /** Enable Redux DevTools integration (default: true in development) */
536
- enableDevtools?: boolean;
537
- /** Name for Redux DevTools (default: "UIBlocking") */
538
- devtoolsName?: string;
539
535
  /** Initial middlewares to register */
540
536
  middlewares?: ReadonlyArray<Middleware>;
541
537
  }
@@ -562,12 +558,10 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
562
558
  * - Modals/Dialogs - Scoped blocking within a dialog
563
559
  *
564
560
  * Uses `createStoreProvider` from `@okyrychenko-dev/react-zustand-toolkit` with
565
- * built-in DevTools support and middleware registration.
561
+ * provider-scoped store creation and middleware registration.
566
562
  *
567
563
  * @param props - Provider configuration
568
564
  * @param props.children - React children to wrap with the provider
569
- * @param props.enableDevtools - Enable Redux DevTools integration. Defaults to true in development, false in production.
570
- * @param props.devtoolsName - Name displayed in Redux DevTools. Defaults to "UIBlocking".
571
565
  * @param props.middlewares - Array of middleware functions to register on store creation
572
566
  *
573
567
  * @example
@@ -585,15 +579,13 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
585
579
  * ```
586
580
  *
587
581
  * @example
588
- * With middleware and custom DevTools name
582
+ * With middleware
589
583
  * ```tsx
590
584
  * import { UIBlockingProvider, loggerMiddleware } from '@okyrychenko-dev/react-action-guard';
591
585
  *
592
586
  * function App() {
593
587
  * return (
594
588
  * <UIBlockingProvider
595
- * enableDevtools={true}
596
- * devtoolsName="MyApp-UIBlocking"
597
589
  * middlewares={[loggerMiddleware]}
598
590
  * >
599
591
  * <MyApplication />
@@ -608,11 +600,11 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
608
600
  * function MicroFrontendApp() {
609
601
  * return (
610
602
  * <div>
611
- * <UIBlockingProvider devtoolsName="MicroApp1">
603
+ * <UIBlockingProvider>
612
604
  * <MicroApp1 />
613
605
  * </UIBlockingProvider>
614
606
  *
615
- * <UIBlockingProvider devtoolsName="MicroApp2">
607
+ * <UIBlockingProvider>
616
608
  * <MicroApp2 />
617
609
  * </UIBlockingProvider>
618
610
  * </div>
@@ -629,7 +621,7 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
629
621
  *
630
622
  * test('blocker behavior', () => {
631
623
  * render(
632
- * <UIBlockingProvider enableDevtools={false}>
624
+ * <UIBlockingProvider>
633
625
  * <ComponentUnderTest />
634
626
  * </UIBlockingProvider>
635
627
  * );
@@ -644,7 +636,7 @@ declare function useUIBlockingStoreFromContext<T>(selector: (state: UIBlockingSt
644
636
  * @public
645
637
  * @since 0.6.0
646
638
  */
647
- declare function UIBlockingProvider({ children, enableDevtools, devtoolsName, middlewares, }: UIBlockingProviderProps): ReactNode;
639
+ declare function UIBlockingProvider({ children, middlewares, }: UIBlockingProviderProps): ReactNode;
648
640
 
649
641
  /**
650
642
  * Hook that resolves to either the context store or global store
package/dist/index.js CHANGED
@@ -461,8 +461,6 @@ function useUIBlockingStoreFromContext(selector, equalityFn) {
461
461
  }
462
462
  function UIBlockingProvider({
463
463
  children,
464
- enableDevtools = process.env.NODE_ENV === "development",
465
- devtoolsName = "UIBlocking",
466
464
  middlewares = []
467
465
  }) {
468
466
  const handleStoreInit = (store) => {
@@ -470,15 +468,7 @@ function UIBlockingProvider({
470
468
  store.getState().registerMiddleware(`provider-middleware-${index.toString()}`, mw);
471
469
  });
472
470
  };
473
- return /* @__PURE__ */ jsx(
474
- BaseUIBlockingProvider,
475
- {
476
- enableDevtools,
477
- devtoolsName,
478
- onStoreInit: handleStoreInit,
479
- children
480
- }
481
- );
471
+ return /* @__PURE__ */ jsx(BaseUIBlockingProvider, { onStoreInit: handleStoreInit, children });
482
472
  }
483
473
 
484
474
  // src/store/uiBlockingStore.config.ts