@thoughtbot/superglue 2.0.0-alpha.8 → 2.0.0-alpha.9

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.
@@ -1,4 +1,4 @@
1
- import { Action, ThunkDispatch, EnhancedStore, Tuple, StoreEnhancer, ThunkAction } from '@reduxjs/toolkit';
1
+ import { Action, EnhancedStore, Tuple, StoreEnhancer, ThunkDispatch, ThunkAction } from '@reduxjs/toolkit';
2
2
  import { History } from 'history';
3
3
 
4
4
  type FetchArgs = [string, BasicRequestInit];
@@ -280,4 +280,4 @@ declare const visit: VisitCreator;
280
280
 
281
281
  declare function saveAndProcessPage(pageKey: string, page: PageResponse): SaveAndProcessPageThunk;
282
282
 
283
- export { type BasicRequestInit as $, type ApplicationRemote as A, type AllPages as B, type ComponentIdentifier as C, type Defer as D, type AllFragments as E, type FetchArgs as F, type GraftResponse as G, type Handlers as H, type RootState as I, type JSONMappable as J, type Keypath as K, type VisitCreator as L, type Meta as M, type NavigationContextProps as N, type RemoteCreator as O, type PageKey as P, type Dispatch as Q, type RestoreStrategy as R, type SuperglueStore as S, type UJSHandlers as T, type Unproxy as U, type VisitMeta as V, type HistoryState as W, type SaveAndProcessPageThunk as X, type MetaThunk as Y, type VisitMetaThunk as Z, type DefermentThunk as _, type JSONValue as a, type BuildStore as a0, type BuildVisitAndRemote as a1, type Visit as a2, type VisitProps as a3, type Remote as a4, type RemoteProps as a5, type BeforeSave as a6, type GraftingSuccessAction as a7, type GraftingErrorAction as a8, useContent as a9, MismatchedComponentError as aa, remote as ab, visit as ac, type NavigationProviderProps as b, type NavigateTo as c, type SaveResponse as d, type PageResponse as e, type Fragment as f, type FragmentProxy as g, type SuperglueState as h, type SetupProps as i, type ApplicationVisit as j, type ApplicationProps as k, superglueReducer as l, type NavigationAction as m, type JSONPrimitive as n, type JSONObject as o, pageReducer as p, type JSONKeyable as q, rootReducer as r, saveAndProcessPage as s, type ParsedResponse as t, unproxy as u, type Page as v, type StreamMessage as w, type StreamResponse as x, type FragmentPath as y, type FragmentRef as z };
283
+ export { type BasicRequestInit as $, type ApplicationRemote as A, type AllPages as B, type ComponentIdentifier as C, type Defer as D, type AllFragments as E, type FetchArgs as F, type GraftResponse as G, type Handlers as H, type RootState as I, type JSONMappable as J, type Keypath as K, type VisitCreator as L, type Meta as M, type NavigationProviderProps as N, type RemoteCreator as O, type PageKey as P, type Dispatch as Q, type RestoreStrategy as R, type SuperglueStore as S, type UJSHandlers as T, type Unproxy as U, type VisitMeta as V, type HistoryState as W, type SaveAndProcessPageThunk as X, type MetaThunk as Y, type VisitMetaThunk as Z, type DefermentThunk as _, type JSONValue as a, type BuildStore as a0, type BuildVisitAndRemote as a1, type Visit as a2, type VisitProps as a3, type Remote as a4, type RemoteProps as a5, type BeforeSave as a6, type GraftingSuccessAction as a7, type GraftingErrorAction as a8, useContent as a9, MismatchedComponentError as aa, remote as ab, visit as ac, type NavigateTo as b, type NavigationContextProps as c, type SaveResponse as d, type PageResponse as e, type Fragment as f, type FragmentProxy as g, type SuperglueState as h, type ApplicationProps as i, type SetupProps as j, type ApplicationVisit as k, superglueReducer as l, type NavigationAction as m, type JSONPrimitive as n, type JSONObject as o, pageReducer as p, type JSONKeyable as q, rootReducer as r, saveAndProcessPage as s, type ParsedResponse as t, unproxy as u, type Page as v, type StreamMessage as w, type StreamResponse as x, type FragmentPath as y, type FragmentRef as z };
@@ -1,8 +1,8 @@
1
1
  import * as history from 'history';
2
- import { J as JSONMappable, K as Keypath, a as JSONValue, P as PageKey, A as ApplicationRemote, S as SuperglueStore, N as NavigationContextProps, b as NavigationProviderProps, c as NavigateTo, d as SaveResponse, F as FetchArgs, e as PageResponse, f as Fragment, U as Unproxy, g as FragmentProxy, h as SuperglueState, i as SetupProps, j as ApplicationVisit, H as Handlers, k as ApplicationProps } from './index-CsQ3b41B.mjs';
3
- export { E as AllFragments, B as AllPages, $ as BasicRequestInit, a6 as BeforeSave, a0 as BuildStore, a1 as BuildVisitAndRemote, C as ComponentIdentifier, D as Defer, _ as DefermentThunk, Q as Dispatch, y as FragmentPath, z as FragmentRef, G as GraftResponse, a8 as GraftingErrorAction, a7 as GraftingSuccessAction, W as HistoryState, q as JSONKeyable, o as JSONObject, n as JSONPrimitive, M as Meta, Y as MetaThunk, m as NavigationAction, v as Page, t as ParsedResponse, a4 as Remote, O as RemoteCreator, a5 as RemoteProps, R as RestoreStrategy, I as RootState, X as SaveAndProcessPageThunk, w as StreamMessage, x as StreamResponse, T as UJSHandlers, a2 as Visit, L as VisitCreator, V as VisitMeta, Z as VisitMetaThunk, a3 as VisitProps, p as pageReducer, r as rootReducer, s as saveAndProcessPage, l as superglueReducer, u as unproxy, a9 as useContent } from './index-CsQ3b41B.mjs';
2
+ import { J as JSONMappable, K as Keypath, a as JSONValue, P as PageKey, A as ApplicationRemote, S as SuperglueStore, N as NavigationProviderProps, b as NavigateTo, c as NavigationContextProps, F as FetchArgs, d as SaveResponse, e as PageResponse, f as Fragment, U as Unproxy, g as FragmentProxy, h as SuperglueState, i as ApplicationProps, j as SetupProps, k as ApplicationVisit, H as Handlers } from './index-j0c-9ZLt.mjs';
3
+ export { E as AllFragments, B as AllPages, $ as BasicRequestInit, a6 as BeforeSave, a0 as BuildStore, a1 as BuildVisitAndRemote, C as ComponentIdentifier, D as Defer, _ as DefermentThunk, Q as Dispatch, y as FragmentPath, z as FragmentRef, G as GraftResponse, a8 as GraftingErrorAction, a7 as GraftingSuccessAction, W as HistoryState, q as JSONKeyable, o as JSONObject, n as JSONPrimitive, M as Meta, Y as MetaThunk, m as NavigationAction, v as Page, t as ParsedResponse, a4 as Remote, O as RemoteCreator, a5 as RemoteProps, R as RestoreStrategy, I as RootState, X as SaveAndProcessPageThunk, w as StreamMessage, x as StreamResponse, T as UJSHandlers, a2 as Visit, L as VisitCreator, V as VisitMeta, Z as VisitMetaThunk, a3 as VisitProps, p as pageReducer, r as rootReducer, s as saveAndProcessPage, l as superglueReducer, u as unproxy, a9 as useContent } from './index-j0c-9ZLt.mjs';
4
4
  import React from 'react';
5
- import { Subscription, ChannelNameWithParams } from '@rails/actioncable';
5
+ import { ChannelNameWithParams, Subscription } from '@rails/actioncable';
6
6
  import { DebouncedFunc } from 'lodash';
7
7
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
8
8
 
@@ -33,7 +33,7 @@ import {
33
33
  ujsHandlers,
34
34
  unproxy,
35
35
  urlToPageKey
36
- } from "./chunk-ZATKIRIF.mjs";
36
+ } from "./chunk-M74JY6QK.mjs";
37
37
 
38
38
  // node_modules/lodash/lodash.js
39
39
  var require_lodash = __commonJS({
@@ -5575,7 +5575,9 @@ function unproxy2(proxy) {
5575
5575
 
5576
5576
  // lib/hooks/useSetFragment.tsx
5577
5577
  import { useDispatch, useSelector as useSelector2 } from "react-redux";
5578
- import { produce } from "immer";
5578
+ import { Immer } from "immer";
5579
+ var immer = new Immer();
5580
+ immer.setAutoFreeze(false);
5579
5581
  function useSetFragment() {
5580
5582
  const dispatch = useDispatch();
5581
5583
  const fragments = useSelector2((state) => state.fragments);
@@ -5585,7 +5587,7 @@ function useSetFragment() {
5585
5587
  if (currentFragment === void 0) {
5586
5588
  throw new Error(`Fragment with id "${fragmentId}" not found`);
5587
5589
  }
5588
- const updatedFragment = produce(currentFragment, updater);
5590
+ const updatedFragment = immer.produce(currentFragment, updater);
5589
5591
  dispatch(
5590
5592
  saveFragment({
5591
5593
  fragmentId,