@seedprotocol/sdk 0.1.57 → 0.1.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/{index-p5KR99fK.js → index-C_WqqX4v.js} +2 -2
- package/dist/index-C_WqqX4v.js.map +1 -0
- package/dist/{index-COcsVb0S.js → index-RCrXtjiO.js} +17 -15
- package/dist/index-RCrXtjiO.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/{seed.schema.config-CJEIY4ZZ.js → seed.schema.config-BH9Kq1yX.js} +2 -2
- package/dist/{seed.schema.config-CJEIY4ZZ.js.map → seed.schema.config-BH9Kq1yX.js.map} +1 -1
- package/dist/src/resolveRelatedValue.ts +0 -4
- package/dist/src/saveImageSrc.ts +9 -1
- package/dist/types/src/browser/item/Item.d.ts.map +1 -1
- package/dist/types/src/browser/property/actors/resolveRelatedValue.d.ts.map +1 -1
- package/dist/types/src/browser/property/actors/saveValueToDb/saveImageSrc.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-COcsVb0S.js.map +0 -1
- package/dist/index-p5KR99fK.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { f as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, e as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SEEDS, b as GET_SEED_IDS, c as GET_STORAGE_TRANSACTION_ID, d as GET_VERSIONS, I as Item, g as itemMachineAll, i as itemMachineSingle } from './index-
|
|
1
|
+
export { f as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, e as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SEEDS, b as GET_SEED_IDS, c as GET_STORAGE_TRANSACTION_ID, d as GET_VERSIONS, I as Item, g as itemMachineAll, i as itemMachineSingle } from './index-RCrXtjiO.js';
|
|
2
2
|
import './constants-BLctWkrn.js';
|
|
3
3
|
import 'path';
|
|
4
4
|
import 'reflect-metadata';
|
|
@@ -27,4 +27,4 @@ import '@zenfs/dom';
|
|
|
27
27
|
import 'arweave';
|
|
28
28
|
import 'use-immer';
|
|
29
29
|
import '@xstate/react';
|
|
30
|
-
//# sourceMappingURL=index-
|
|
30
|
+
//# sourceMappingURL=index-C_WqqX4v.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-C_WqqX4v.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -516,9 +516,6 @@ const refResolvedValueToContentUrl = new Map();
|
|
|
516
516
|
const seedUidToContentUrl = new Map();
|
|
517
517
|
const resolveRelatedValue = fromCallback(({ sendBack, input: { context } }) => {
|
|
518
518
|
const { isRelation, propertyValue, propertyName, seedUid, propertyRecordSchema, seedLocalId, schemaUid, } = context;
|
|
519
|
-
if (seedLocalId === 'AhiILhtcVq') {
|
|
520
|
-
console.log('[resolveRelatedValue] seedLocalId', seedLocalId);
|
|
521
|
-
}
|
|
522
519
|
const _resolveRelatedValue = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
523
520
|
if (!propertyValue || !isRelation) {
|
|
524
521
|
return;
|
|
@@ -992,7 +989,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
992
989
|
if (propertyRecordSchema &&
|
|
993
990
|
propertyRecordSchema.storageType &&
|
|
994
991
|
propertyRecordSchema.storageType === 'ItemStorage') {
|
|
995
|
-
const { Item } = yield import('./index-
|
|
992
|
+
const { Item } = yield import('./index-C_WqqX4v.js');
|
|
996
993
|
const item = yield Item.find({
|
|
997
994
|
seedLocalId,
|
|
998
995
|
modelName: itemModelName,
|
|
@@ -1487,7 +1484,14 @@ const saveImageSrc = fromCallback(({ sendBack, input: { context, event } }) => {
|
|
|
1487
1484
|
}
|
|
1488
1485
|
if (newValueType === 'imageBase64') {
|
|
1489
1486
|
mimeType = getMimeType(newValue);
|
|
1490
|
-
|
|
1487
|
+
const base64Data = newValue.split(',')[1]; // Strip the Base64 prefix
|
|
1488
|
+
const binaryString = atob(base64Data);
|
|
1489
|
+
const binaryLength = binaryString.length;
|
|
1490
|
+
const binaryArray = new Uint8Array(binaryLength);
|
|
1491
|
+
for (let i = 0; i < binaryLength; i++) {
|
|
1492
|
+
binaryArray[i] = binaryString.charCodeAt(i);
|
|
1493
|
+
}
|
|
1494
|
+
fileData = binaryArray.buffer;
|
|
1491
1495
|
}
|
|
1492
1496
|
if (newValueType === 'url') {
|
|
1493
1497
|
fileData = yield fetchImage(newValue);
|
|
@@ -2873,7 +2877,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2873
2877
|
if (!models$1) {
|
|
2874
2878
|
return;
|
|
2875
2879
|
}
|
|
2876
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
2880
|
+
const { models: SeedModels } = yield import('./seed.schema.config-BH9Kq1yX.js');
|
|
2877
2881
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
2878
2882
|
let hasModelsInDb = false;
|
|
2879
2883
|
const schemaDefsByModelName = new Map();
|
|
@@ -6228,13 +6232,11 @@ class Item {
|
|
|
6228
6232
|
if (!propertyInstance) {
|
|
6229
6233
|
return;
|
|
6230
6234
|
}
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
});
|
|
6237
|
-
}
|
|
6235
|
+
this._service.send({
|
|
6236
|
+
type: 'addPropertyInstance',
|
|
6237
|
+
propertyName: props.propertyName,
|
|
6238
|
+
propertyInstance,
|
|
6239
|
+
});
|
|
6238
6240
|
Object.defineProperty(this, props.propertyName, {
|
|
6239
6241
|
get: () => propertyInstance.value,
|
|
6240
6242
|
set: (value) => (propertyInstance.value = value),
|
|
@@ -6772,7 +6774,7 @@ const client = {
|
|
|
6772
6774
|
console.error('fs listeners not ready during init');
|
|
6773
6775
|
}
|
|
6774
6776
|
globalService.send({ type: 'init', endpoints, models, addresses });
|
|
6775
|
-
import('./seed.schema.config-
|
|
6777
|
+
import('./seed.schema.config-BH9Kq1yX.js').then(({ models }) => {
|
|
6776
6778
|
for (const [key, value] of Object.entries(models)) {
|
|
6777
6779
|
setModel(key, value);
|
|
6778
6780
|
}
|
|
@@ -7345,4 +7347,4 @@ if (isNode()) {
|
|
|
7345
7347
|
}
|
|
7346
7348
|
|
|
7347
7349
|
export { 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, ImageSrc as h, itemMachineSingle as i, ItemProperty as j, useItem as k, useItemProperties as l, useCreateItem as m, useItemProperty as n, useDeleteItem as o, useGlobalServiceStatus as p, useServices as q, getGlobalService as r, client as s, getCorrectId as t, useItems as u, withSeed as w };
|
|
7348
|
-
//# sourceMappingURL=index-
|
|
7350
|
+
//# sourceMappingURL=index-RCrXtjiO.js.map
|