@dreamtree-org/twreact-ui 1.0.93 → 1.0.95

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.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import * as React$1 from 'react';
1
+ import * as React from 'react';
2
2
  import React__default, { forwardRef, createElement, useId, useRef, useState, useEffect, useImperativeHandle, useMemo, memo, useLayoutEffect, useCallback, createContext, useContext, cloneElement, PureComponent } from 'react';
3
3
  import ReactDOM, { createPortal } from 'react-dom';
4
4
 
@@ -3907,7 +3907,7 @@ var DEFAULT_ACTIONS = [{
3907
3907
  onClick: function onClick() {
3908
3908
  return console.log("Edit action clicked");
3909
3909
  },
3910
- icon: /*#__PURE__*/React.createElement(PenSquare, {
3910
+ icon: /*#__PURE__*/React__default.createElement(PenSquare, {
3911
3911
  size: 16
3912
3912
  })
3913
3913
  }, {
@@ -3916,7 +3916,7 @@ var DEFAULT_ACTIONS = [{
3916
3916
  onClick: function onClick() {
3917
3917
  return console.log("Delete action clicked");
3918
3918
  },
3919
- icon: /*#__PURE__*/React.createElement(Trash, {
3919
+ icon: /*#__PURE__*/React__default.createElement(Trash, {
3920
3920
  size: 16
3921
3921
  })
3922
3922
  }, {
@@ -3925,7 +3925,7 @@ var DEFAULT_ACTIONS = [{
3925
3925
  onClick: function onClick() {
3926
3926
  return console.log("View action clicked");
3927
3927
  },
3928
- icon: /*#__PURE__*/React.createElement(Eye, {
3928
+ icon: /*#__PURE__*/React__default.createElement(Eye, {
3929
3929
  size: 16
3930
3930
  })
3931
3931
  }];
@@ -17758,7 +17758,7 @@ var canUseDOM = () => !!(typeof window !== "undefined" && typeof window.document
17758
17758
  var isDOM = /* @__PURE__ */ canUseDOM();
17759
17759
  var isRunningInReactNative = () => typeof navigator !== "undefined" && navigator.product === "ReactNative";
17760
17760
  var isReactNative = /* @__PURE__ */ isRunningInReactNative();
17761
- var getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? React$1.useLayoutEffect : React$1.useEffect;
17761
+ var getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? React.useLayoutEffect : React.useEffect;
17762
17762
  var useIsomorphicLayoutEffect = /* @__PURE__ */ getUseIsomorphicLayoutEffect();
17763
17763
 
17764
17764
  // src/components/Context.ts
@@ -17768,17 +17768,17 @@ var gT = typeof globalThis !== "undefined" ? globalThis : (
17768
17768
  {}
17769
17769
  );
17770
17770
  function getContext() {
17771
- if (!React$1.createContext) return {};
17771
+ if (!React.createContext) return {};
17772
17772
  const contextMap = gT[ContextKey] ??= /* @__PURE__ */ new Map();
17773
- let realContext = contextMap.get(React$1.createContext);
17773
+ let realContext = contextMap.get(React.createContext);
17774
17774
  if (!realContext) {
17775
- realContext = React$1.createContext(
17775
+ realContext = React.createContext(
17776
17776
  null
17777
17777
  );
17778
17778
  if (process.env.NODE_ENV !== "production") {
17779
17779
  realContext.displayName = "ReactRedux";
17780
17780
  }
17781
- contextMap.set(React$1.createContext, realContext);
17781
+ contextMap.set(React.createContext, realContext);
17782
17782
  }
17783
17783
  return realContext;
17784
17784
  }
@@ -17787,7 +17787,7 @@ var ReactReduxContext = /* @__PURE__ */ getContext();
17787
17787
  // src/components/Provider.tsx
17788
17788
  function Provider(providerProps) {
17789
17789
  const { children, context, serverState, store } = providerProps;
17790
- const contextValue = React$1.useMemo(() => {
17790
+ const contextValue = React.useMemo(() => {
17791
17791
  const subscription = createSubscription(store);
17792
17792
  const baseContextValue = {
17793
17793
  store,
@@ -17804,7 +17804,7 @@ function Provider(providerProps) {
17804
17804
  });
17805
17805
  }
17806
17806
  }, [store, serverState]);
17807
- const previousState = React$1.useMemo(() => store.getState(), [store]);
17807
+ const previousState = React.useMemo(() => store.getState(), [store]);
17808
17808
  useIsomorphicLayoutEffect(() => {
17809
17809
  const { subscription } = contextValue;
17810
17810
  subscription.onStateChange = subscription.notifyNestedSubs;
@@ -17818,14 +17818,14 @@ function Provider(providerProps) {
17818
17818
  };
17819
17819
  }, [contextValue, previousState]);
17820
17820
  const Context = context || ReactReduxContext;
17821
- return /* @__PURE__ */ React$1.createElement(Context.Provider, { value: contextValue }, children);
17821
+ return /* @__PURE__ */ React.createElement(Context.Provider, { value: contextValue }, children);
17822
17822
  }
17823
17823
  var Provider_default = Provider;
17824
17824
 
17825
17825
  // src/hooks/useReduxContext.ts
17826
17826
  function createReduxContextHook(context = ReactReduxContext) {
17827
17827
  return function useReduxContext2() {
17828
- const contextValue = React$1.useContext(context);
17828
+ const contextValue = React.useContext(context);
17829
17829
  if (process.env.NODE_ENV !== "production" && !contextValue) {
17830
17830
  throw new Error(
17831
17831
  "could not find react-redux context value; please ensure the component is wrapped in a <Provider>"
@@ -17886,8 +17886,8 @@ function createSelectorHook(context = ReactReduxContext) {
17886
17886
  }
17887
17887
  const reduxContext = useReduxContext2();
17888
17888
  const { store, subscription, getServerState } = reduxContext;
17889
- const firstRun = React$1.useRef(true);
17890
- const wrappedSelector = React$1.useCallback(
17889
+ const firstRun = React.useRef(true);
17890
+ const wrappedSelector = React.useCallback(
17891
17891
  {
17892
17892
  [selector.name](state) {
17893
17893
  const selected = selector(state);
@@ -17950,7 +17950,7 @@ function createSelectorHook(context = ReactReduxContext) {
17950
17950
  wrappedSelector,
17951
17951
  equalityFn
17952
17952
  );
17953
- React$1.useDebugValue(selectedState);
17953
+ React.useDebugValue(selectedState);
17954
17954
  return selectedState;
17955
17955
  };
17956
17956
  Object.assign(useSelector2, {