@superblocksteam/library 2.0.59-next.8 → 2.0.59
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/jsx-dev-runtime/index.js +1 -1
- package/dist/{jsx-wrapper-Ddb528TO.js → jsx-wrapper-BaEUS0A1.js} +14 -26
- package/dist/jsx-wrapper-BaEUS0A1.js.map +1 -0
- package/dist/lib/index.d.ts +11 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -1
- package/package.json +2 -2
- package/dist/jsx-wrapper-Ddb528TO.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as api_hmr_tracker_default, _ as root_store_default, t as makeWrappedComponent } from "../jsx-wrapper-
|
|
1
|
+
import { D as api_hmr_tracker_default, _ as root_store_default, t as makeWrappedComponent } from "../jsx-wrapper-BaEUS0A1.js";
|
|
2
2
|
import "../utils-AzBGeVXo.js";
|
|
3
3
|
import * as ReactJsxDevRuntime from "react/jsx-dev-runtime";
|
|
4
4
|
import { SOURCE_ID_ATTRIBUTE } from "@superblocksteam/library-shared";
|
|
@@ -933,6 +933,9 @@ var SuperblocksAppContext = class {
|
|
|
933
933
|
...context$2
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
|
+
getGlobal() {
|
|
937
|
+
return this.context;
|
|
938
|
+
}
|
|
936
939
|
};
|
|
937
940
|
const context$1 = new SuperblocksAppContext();
|
|
938
941
|
const SuperblocksContext = createContext(context$1);
|
|
@@ -951,40 +954,25 @@ function useSuperblocksContext() {
|
|
|
951
954
|
}
|
|
952
955
|
function useSuperblocksUser() {
|
|
953
956
|
const context$2 = useSuperblocksContext();
|
|
954
|
-
|
|
957
|
+
const user = useSyncExternalStore((onStoreChange) => {
|
|
955
958
|
return reaction(() => context$2.user, onStoreChange);
|
|
956
|
-
}, () =>
|
|
957
|
-
|
|
958
|
-
return toJS(context$2.user);
|
|
959
|
-
}, () => {
|
|
960
|
-
if (!context$2.user) return;
|
|
961
|
-
return toJS(context$2.user);
|
|
962
|
-
});
|
|
959
|
+
}, () => context$2.user, () => context$2.user);
|
|
960
|
+
return useMemo(() => toJS(user), [user]);
|
|
963
961
|
}
|
|
964
962
|
function useSuperblocksGroups() {
|
|
965
963
|
const context$2 = useSuperblocksContext();
|
|
966
|
-
|
|
964
|
+
const groups = useSyncExternalStore((onStoreChange) => {
|
|
967
965
|
return reaction(() => context$2.groups, onStoreChange);
|
|
968
|
-
}, () =>
|
|
969
|
-
|
|
970
|
-
return toJS(context$2.groups);
|
|
971
|
-
}, () => {
|
|
972
|
-
if (!context$2.groups) return;
|
|
973
|
-
return toJS(context$2.groups);
|
|
974
|
-
});
|
|
966
|
+
}, () => context$2.groups, () => context$2.groups);
|
|
967
|
+
return useMemo(() => toJS(groups), [groups]);
|
|
975
968
|
}
|
|
976
969
|
function useSuperblocksProfiles() {
|
|
977
970
|
const context$2 = useSuperblocksContext();
|
|
971
|
+
const profiles = useSyncExternalStore((onStoreChange) => {
|
|
972
|
+
return reaction(() => context$2.profiles, onStoreChange);
|
|
973
|
+
}, () => context$2.profiles, () => context$2.profiles);
|
|
978
974
|
return {
|
|
979
|
-
profiles:
|
|
980
|
-
return reaction(() => context$2.profiles, onStoreChange);
|
|
981
|
-
}, () => {
|
|
982
|
-
if (!context$2.profiles) return;
|
|
983
|
-
return toJS(context$2.profiles);
|
|
984
|
-
}, () => {
|
|
985
|
-
if (!context$2.profiles) return;
|
|
986
|
-
return toJS(context$2.profiles);
|
|
987
|
-
}),
|
|
975
|
+
profiles: useMemo(() => toJS(profiles), [profiles]),
|
|
988
976
|
setProfile: useCallback((profileName) => {
|
|
989
977
|
context$2.setProfile(profileName);
|
|
990
978
|
}, [context$2])
|
|
@@ -3458,4 +3446,4 @@ const useJSXContext = () => {
|
|
|
3458
3446
|
|
|
3459
3447
|
//#endregion
|
|
3460
3448
|
export { SuperblocksContextProvider as A, iframeMessageHandler as B, startEditorSync as C, api_hmr_tracker_default as D, getContextFromTraceHeaders as E, useSuperblocksUser as F, isEditMode as H, sendNotification as I, colors as L, useSuperblocksContext as M, useSuperblocksGroups as N, rejectById as O, useSuperblocksProfiles as P, editorBridge as R, createPropertiesPanelDefinition as S, createIframeSpan as T, isEmbeddedBySuperblocksFirstParty as V, root_store_default as _, FixWithClarkButton as a, PropsCategory as b, ErrorContent as c, ErrorMessage as d, ErrorStack as f, StyledClarkIcon as g, SecondaryButton as h, getWidgetRectAnchorName as i, getAppMode as j, resolveById as k, ErrorDetails as l, ErrorTitle as m, useJSXContext as n, ActionsContainer as o, ErrorSummary as p, getWidgetAnchorName as r, ErrorContainer as s, makeWrappedComponent as t, ErrorIconContainer as u, createManagedPropsList as v, generateId as w, Section as x, Prop as y, getEditStore as z };
|
|
3461
|
-
//# sourceMappingURL=jsx-wrapper-
|
|
3449
|
+
//# sourceMappingURL=jsx-wrapper-BaEUS0A1.js.map
|