@seedprotocol/sdk 0.1.31 → 0.1.32
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-DdDMDXe3.js → index-D3rRD7XE.js} +11 -8
- package/dist/{index-DdDMDXe3.js.map → index-D3rRD7XE.js.map} +1 -1
- package/dist/{index-Cu0y-Vyn.js → index-DO_8pXy8.js} +2 -2
- package/dist/index-DO_8pXy8.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/{seed-CiQDWpvn.js → seed-BPDg8Msg.js} +3 -3
- package/dist/{seed-CiQDWpvn.js.map → seed-BPDg8Msg.js.map} +1 -1
- package/dist/{seed-7auWiC8E.js → seed-C0EQDRcF.js} +3 -3
- package/dist/{seed-7auWiC8E.js.map → seed-C0EQDRcF.js.map} +1 -1
- package/dist/{seed-RhCp4Y2x.js → seed-Cf-ElPkP.js} +2 -2
- package/dist/{seed-RhCp4Y2x.js.map → seed-Cf-ElPkP.js.map} +1 -1
- package/dist/{seed.schema.config-D7AhI8aC.js → seed.schema.config-CZJE4P0T.js} +2 -2
- package/dist/{seed.schema.config-D7AhI8aC.js.map → seed.schema.config-CZJE4P0T.js.map} +1 -1
- package/dist/types/src/browser/react/property.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-Cu0y-Vyn.js.map +0 -1
|
@@ -999,7 +999,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
999
999
|
renderValue: refResolvedDisplayValue,
|
|
1000
1000
|
});
|
|
1001
1001
|
if (propertyNameFromDb === 'storageTransactionId') {
|
|
1002
|
-
const { Item } = yield import('./index-
|
|
1002
|
+
const { Item } = yield import('./index-DO_8pXy8.js');
|
|
1003
1003
|
const item = yield Item.find({
|
|
1004
1004
|
seedLocalId,
|
|
1005
1005
|
modelName: itemModelName,
|
|
@@ -4319,7 +4319,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
4319
4319
|
if (!models$1) {
|
|
4320
4320
|
return;
|
|
4321
4321
|
}
|
|
4322
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
4322
|
+
const { models: SeedModels } = yield import('./seed.schema.config-CZJE4P0T.js');
|
|
4323
4323
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
4324
4324
|
let hasModelsInDb = false;
|
|
4325
4325
|
const schemaDefsByModelName = new Map();
|
|
@@ -5783,11 +5783,11 @@ const globalMachine = setup({
|
|
|
5783
5783
|
(_a) => __awaiter(void 0, [_a], void 0, function* ({ context }) {
|
|
5784
5784
|
let SeedClass;
|
|
5785
5785
|
if (context.environment === 'node') {
|
|
5786
|
-
const { SeedNode } = yield import('./seed-
|
|
5786
|
+
const { SeedNode } = yield import('./seed-C0EQDRcF.js');
|
|
5787
5787
|
SeedClass = SeedNode;
|
|
5788
5788
|
}
|
|
5789
5789
|
else {
|
|
5790
|
-
const { SeedBrowser } = yield import('./seed-
|
|
5790
|
+
const { SeedBrowser } = yield import('./seed-BPDg8Msg.js');
|
|
5791
5791
|
SeedClass = SeedBrowser;
|
|
5792
5792
|
}
|
|
5793
5793
|
return SeedClass;
|
|
@@ -6189,6 +6189,7 @@ const useItemProperty = ({ propertyName, seedLocalId, seedUid, }) => {
|
|
|
6189
6189
|
const [property, setProperty] = useImmer(undefined);
|
|
6190
6190
|
const [isReadingFromDb, setIsReadingFromDb] = useState(false);
|
|
6191
6191
|
const [isInitialized, setIsInitialized] = useState(false);
|
|
6192
|
+
const { internalStatus } = useGlobalServiceStatus();
|
|
6192
6193
|
const value = useSelector(property === null || property === void 0 ? void 0 : property.getService(), (snapshot) => {
|
|
6193
6194
|
if (!snapshot || !snapshot.context) {
|
|
6194
6195
|
return;
|
|
@@ -6220,8 +6221,10 @@ const useItemProperty = ({ propertyName, seedLocalId, seedUid, }) => {
|
|
|
6220
6221
|
setIsInitialized(true);
|
|
6221
6222
|
}), [isReadingFromDb]);
|
|
6222
6223
|
useEffect(() => {
|
|
6223
|
-
|
|
6224
|
-
|
|
6224
|
+
if (internalStatus === 'ready') {
|
|
6225
|
+
readFromDb();
|
|
6226
|
+
}
|
|
6227
|
+
}, [internalStatus]);
|
|
6225
6228
|
// TODO: How can we force a re-render when the property is updated?
|
|
6226
6229
|
// Right now, the value will trigger an update because it's using a selector
|
|
6227
6230
|
// and a change is pushed to the hook listener.
|
|
@@ -6541,7 +6544,7 @@ const client = {
|
|
|
6541
6544
|
console.error('fs listeners not ready during init');
|
|
6542
6545
|
}
|
|
6543
6546
|
globalService.send({ type: 'init', endpoints, models, addresses });
|
|
6544
|
-
import('./seed.schema.config-
|
|
6547
|
+
import('./seed.schema.config-CZJE4P0T.js').then(({ models }) => {
|
|
6545
6548
|
for (const [key, value] of Object.entries(models)) {
|
|
6546
6549
|
setModel(key, value);
|
|
6547
6550
|
}
|
|
@@ -6598,4 +6601,4 @@ if (isNode()) {
|
|
|
6598
6601
|
}
|
|
6599
6602
|
|
|
6600
6603
|
export { CHILD_SNAPSHOT as C, GET_SCHEMAS as G, Item as I, Json as J, List as L, Model as M, Property as P, Relation as R, Text as T, GET_SEEDS as a, GET_SEED_IDS as b, GET_STORAGE_TRANSACTION_ID as c, GET_VERSIONS as d, GET_PROPERTIES as e, GET_ALL_PROPERTIES_FOR_ALL_VERSIONS as f, itemMachineAll as g, internalMachine as h, itemMachineSingle as i, isNode as j, isBrowser as k, isReactNative as l, ImageSrc as m, ItemProperty as n, useItem as o, useItemProperties as p, useCreateItem as q, useItemProperty as r, useDeleteItem as s, useGlobalServiceStatus as t, useItems as u, useServices as v, withSeed as w, getGlobalService as x, client as y, getCorrectId as z };
|
|
6601
|
-
//# sourceMappingURL=index-
|
|
6604
|
+
//# sourceMappingURL=index-D3rRD7XE.js.map
|