@seedprotocol/sdk 0.1.63 → 0.1.65

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/main.js CHANGED
@@ -1,4 +1,4 @@
1
- export { h as ImageSrc, I as Item, j as ItemProperty, J as Json, L as List, M as Model, P as Property, R as Relation, T as Text, s as client, t as getCorrectId, r as getGlobalService, m as useCreateItem, o as useDeleteItem, p as useGlobalServiceStatus, k as useItem, l as useItemProperties, n as useItemProperty, u as useItems, q as useServices, w as withSeed } from './index-DCYwncVx.js';
1
+ export { h as ImageSrc, I as Item, j as ItemProperty, J as Json, L as List, M as Model, P as Property, R as Relation, T as Text, s as client, t as getCorrectId, r as getGlobalService, m as useCreateItem, o as useDeleteItem, p as useGlobalServiceStatus, k as useItem, l as useItemProperties, n as useItemProperty, u as useItems, q as useServices, w as withSeed } from './index-UWk43qGs.js';
2
2
  import 'immer';
3
3
  import 'reflect-metadata';
4
4
  import './constants-BLctWkrn.js';
@@ -1,6 +1,6 @@
1
1
  import { _ as __decorate, a as __metadata } from './constants-BLctWkrn.js';
2
2
  import 'drizzle-orm';
3
- import { T as Text, M as Model } from './index-DCYwncVx.js';
3
+ import { T as Text, M as Model } from './index-UWk43qGs.js';
4
4
  import 'react';
5
5
  import 'reflect-metadata';
6
6
  import 'xstate';
@@ -74,4 +74,4 @@ const models = {
74
74
  };
75
75
 
76
76
  export { models };
77
- //# sourceMappingURL=seed.schema.config-8V0ae_un.js.map
77
+ //# sourceMappingURL=seed.schema.config-DA3JNobc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"seed.schema.config-8V0ae_un.js","sources":["../../src/shared/configs/seed.schema.config.ts"],"sourcesContent":["import { Model, Text } from '@/browser'\n\n@Model\nclass Seed {\n @Text() uid!: string\n @Text() type!: string\n}\n\n@Model\nclass Version {\n @Text() seedUid!: string\n @Text() note!: string\n}\n\n@Model\nclass Metadata {\n @Text() key!: string\n @Text() value!: string\n}\n\nexport const models =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["../../src/shared/configs/seed.schema.config.ts"],"sourcesContent":["import { Model, Text } from '@/browser'\n\n@Model\nclass Seed {\n @Text() uid!: string\n @Text() type!: string\n}\n\n@Model\nclass Version {\n @Text() seedUid!: string\n @Text() note!: string\n}\n\n@Model\nclass Metadata {\n @Text() key!: string\n @Text() value!: string\n}\n\nexport const models = {\n Seed,\n Version,\n Metadata,\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,IAAI,GAAV,MAAM,IAAI,CAAA;CAGT;AAFS,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAa,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,KAAA,EAAA,KAAA,CAAA,CAAA;AACZ,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAc,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA;AAFjB,IAAI,GAAA,UAAA,CAAA;IADT;AACK,CAAA,EAAA,IAAI,CAGT;AAGD,IAAM,OAAO,GAAb,MAAM,OAAO,CAAA;CAGZ;AAFS,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAiB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA;AAChB,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAc,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA;AAFjB,OAAO,GAAA,UAAA,CAAA;IADZ;AACK,CAAA,EAAA,OAAO,CAGZ;AAGD,IAAM,QAAQ,GAAd,MAAM,QAAQ,CAAA;CAGb;AAFS,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAa,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,KAAA,EAAA,KAAA,CAAA,CAAA;AACZ,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAe,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA;AAFlB,QAAQ,GAAA,UAAA,CAAA;IADb;AACK,CAAA,EAAA,QAAQ,CAGb;AAEY,MAAA,MAAM,GAAG;IACpB,IAAI;IACJ,OAAO;IACP,QAAQ;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { ItemData } from '@/types'
2
- import { and, eq, isNotNull, isNull, or, SQL, sql } from 'drizzle-orm'
2
+ import { and, eq, gt, isNotNull, isNull, or, SQL, sql } from 'drizzle-orm'
3
3
  import { seeds } from '@/shared/seedSchema'
4
4
  import { getAppDb } from '@/browser/db/sqlWasmClient'
5
5
  import { getVersionData } from './subqueries/versionData'
@@ -58,7 +58,7 @@ export const getItemsData: GetItemsData = async ({
58
58
  })
59
59
  .from(seeds)
60
60
  .leftJoin(versionData, eq(seeds.localId, versionData.seedLocalId))
61
- .where(and(...conditions))
61
+ .where(and(gt(versionData.versionsCount, 0), ...conditions))
62
62
  .orderBy(sql.raw('COALESCE(attestation_created_at, created_at) DESC'))
63
63
  .groupBy(seeds.localId)
64
64
 
@@ -74,7 +74,6 @@ export const hydrateFromDb = fromCallback<EventObject, typeof propertyMachine>(
74
74
  if (!propertyName.endsWith('Id')) {
75
75
  missingPropertyNameVariant = propertyName + 'Id'
76
76
  }
77
- propertyNameQueryString += ` OR property_name = '${missingPropertyNameVariant}'`
78
77
  propertyNameQuery = or(
79
78
  eq(metadata.propertyName, propertyName),
80
79
  eq(metadata.propertyName, missingPropertyNameVariant),
@@ -131,10 +130,14 @@ export const hydrateFromDb = fromCallback<EventObject, typeof propertyMachine>(
131
130
  versionUid: versionUidFromDb,
132
131
  refValueType,
133
132
  refResolvedValue,
134
- refResolvedDisplayValue,
135
133
  localStorageDir,
136
134
  } = firstRow
137
135
 
136
+ let { refResolvedDisplayValue } = firstRow
137
+
138
+ let propertyValueProcessed: string | string[] | undefined | null =
139
+ propertyValueFromDb
140
+
138
141
  if (propertyName && !propertyNameFromDb) {
139
142
  logger(
140
143
  `Property name from code is ${propertyName} but has not value in db ${propertyNameFromDb} for Property.${localId}`,
@@ -171,11 +174,51 @@ export const hydrateFromDb = fromCallback<EventObject, typeof propertyMachine>(
171
174
  )
172
175
  }
173
176
 
177
+ if (
178
+ refResolvedValue &&
179
+ refResolvedDisplayValue &&
180
+ refResolvedDisplayValue.includes('http')
181
+ ) {
182
+ let urlNeedsToBeRefreshed = false
183
+
184
+ try {
185
+ const response = await fetch(refResolvedDisplayValue, {
186
+ method: 'HEAD',
187
+ })
188
+
189
+ // Check if the status is in the 200-299 range
190
+ if (!response.ok) {
191
+ urlNeedsToBeRefreshed = true
192
+ }
193
+ } catch (error) {
194
+ urlNeedsToBeRefreshed = true
195
+ }
196
+
197
+ if (urlNeedsToBeRefreshed) {
198
+ const filePath = `/files/${localStorageDir}/${refResolvedValue}`
199
+ const fileExists = await fs.promises.exists(filePath)
200
+ if (fileExists) {
201
+ const fileContents = await fs.promises.readFile(filePath)
202
+ const fileHandler = new File([fileContents], refResolvedValue)
203
+ refResolvedDisplayValue = URL.createObjectURL(fileHandler)
204
+ }
205
+ }
206
+ }
207
+
208
+ if (
209
+ propertyRecordSchema &&
210
+ propertyRecordSchema.dataType === 'List' &&
211
+ propertyRecordSchema.ref &&
212
+ typeof propertyValueFromDb === 'string'
213
+ ) {
214
+ propertyValueProcessed = propertyValueFromDb.split(',')
215
+ }
216
+
174
217
  sendBack({
175
218
  type: 'updateContext',
176
219
  localId,
177
220
  uid,
178
- propertyValue: propertyValueFromDb,
221
+ propertyValue: propertyValueProcessed,
179
222
  seedLocalId: seedLocalIdFromDb,
180
223
  seedUid: seedUidFromDb,
181
224
  versionLocalId: versionLocalIdFromDb,
package/dist/src/item.ts CHANGED
@@ -177,8 +177,6 @@ export const useItem: UseItem<any> = ({ modelName, seedLocalId, seedUid }) => {
177
177
  }
178
178
  }, [])
179
179
 
180
- console.log(`returning item ${seedLocalId}`, item)
181
-
182
180
  return {
183
181
  item,
184
182
  itemData,
@@ -1,6 +1,6 @@
1
1
  import { useImmer } from 'use-immer'
2
2
  import { Item } from '@/browser/item'
3
- import { useCallback, useEffect, useState } from 'react'
3
+ import { useCallback, useEffect, useRef, useState } from 'react'
4
4
  import { useSelector } from '@xstate/react'
5
5
  import debug from 'debug'
6
6
  import { eventEmitter } from '@/eventBus'
@@ -18,7 +18,6 @@ type UseItemPropertyProps = {
18
18
  type UseItemPropertyReturn = {
19
19
  property: ItemProperty<any> | undefined
20
20
  isInitialized: boolean
21
- isReadingFromDb: boolean
22
21
  value: any
23
22
  status: string
24
23
  }
@@ -31,13 +30,12 @@ export const useItemProperty: UseItemProperty = ({
31
30
  seedUid,
32
31
  }) => {
33
32
  const [property, setProperty] = useState<ItemProperty<any> | undefined>()
34
- const [isReadingFromDb, setIsReadingFromDb] = useState(false)
35
33
  const [isInitialized, setIsInitialized] = useState(false)
36
34
 
37
- // const isDbReady = useMemo(() => useIsDbReady(), [])
38
-
39
35
  const { internalStatus } = useGlobalServiceStatus()
40
36
 
37
+ const isReadingDb = useRef(false)
38
+
41
39
  const value = useSelector(property?.getService(), (snapshot) => {
42
40
  if (!snapshot || !snapshot.context) {
43
41
  return
@@ -50,31 +48,25 @@ export const useItemProperty: UseItemProperty = ({
50
48
  (snapshot) => snapshot?.value as string,
51
49
  )
52
50
 
53
- // useEffect(() => {
54
- // if (property && property.value !== value) {
55
- // readFromDb()
56
- // }
57
- // }, [property, value])
58
-
59
51
  const readFromDb = useCallback(async () => {
60
52
  if (
61
53
  internalStatus !== 'ready' ||
62
- isReadingFromDb ||
54
+ isReadingDb.current ||
63
55
  (!seedLocalId && !seedUid)
64
56
  ) {
65
57
  return
66
58
  }
67
- setIsReadingFromDb(true)
59
+ isReadingDb.current = true
68
60
  const foundProperty = await ItemProperty.find({
69
61
  propertyName,
70
62
  seedLocalId,
71
63
  seedUid,
72
64
  })
73
- setIsReadingFromDb(false)
74
65
  if (!foundProperty) {
75
66
  logger(
76
67
  `[useItemPropertyTest] [readFromDb] no property found for Item.${seedLocalId}.${propertyName}`,
77
68
  )
69
+ isReadingDb.current = false
78
70
  return
79
71
  }
80
72
  if (foundProperty.status === 'waitingForDb') {
@@ -82,14 +74,14 @@ export const useItemProperty: UseItemProperty = ({
82
74
  }
83
75
  setProperty(foundProperty)
84
76
  setIsInitialized(true)
85
- }, [internalStatus, isReadingFromDb])
77
+ isReadingDb.current = false
78
+ }, [internalStatus])
79
+
80
+ const listenerRef = useRef(readFromDb)
86
81
 
87
- // let count = 0
88
- //
89
- // const refresh = useCallback(() => {
90
- // count++
91
- // console.log('[useItemPropertyTest] [refresh] property', property)
92
- // }, [property])
82
+ useEffect(() => {
83
+ listenerRef.current = readFromDb
84
+ }, [readFromDb])
93
85
 
94
86
  useEffect(() => {
95
87
  if (internalStatus === 'ready') {
@@ -97,25 +89,24 @@ export const useItemProperty: UseItemProperty = ({
97
89
  }
98
90
  }, [internalStatus])
99
91
 
100
- // useEffect(() => {
101
- // eventEmitter.addListener(
102
- // `property.${seedUid || seedLocalId}.${propertyName}.update`,
103
- // (event) => {
104
- // refresh()
105
- // },
106
- // )
107
- //
108
- // return () => {
109
- // eventEmitter.removeListener(
110
- // `property.${seedUid || seedLocalId}.${propertyName}.update`,
111
- // )
112
- // }
113
- // }, [])
92
+ useEffect(() => {
93
+ eventEmitter.addListener(
94
+ `property.${seedUid || seedLocalId}.${propertyName}.update`,
95
+ () => {
96
+ listenerRef.current()
97
+ },
98
+ )
99
+
100
+ return () => {
101
+ eventEmitter.removeListener(
102
+ `property.${seedUid || seedLocalId}.${propertyName}.update`,
103
+ )
104
+ }
105
+ }, [])
114
106
 
115
107
  return {
116
108
  property,
117
109
  isInitialized,
118
- isReadingFromDb,
119
110
  value,
120
111
  status,
121
112
  }
@@ -0,0 +1,107 @@
1
+ import { EventObject, fromCallback } from 'xstate'
2
+ import { FromCallbackInput } from '@/types/machines'
3
+ import {
4
+ ItemPropertyValueType,
5
+ PropertyMachineContext,
6
+ SaveValueToDbEvent,
7
+ } from '@/types/property'
8
+
9
+ export const saveListRelation = fromCallback<
10
+ EventObject,
11
+ FromCallbackInput<PropertyMachineContext, SaveValueToDbEvent>
12
+ >(({ sendBack, input: { context, event } }) => {
13
+ const {
14
+ localId,
15
+ propertyName: propertyNameRaw,
16
+ versionLocalId,
17
+ seedUid,
18
+ seedLocalId,
19
+ propertyValue: existingValue,
20
+ propertyRecordSchema,
21
+ } = context
22
+
23
+ if (!propertyRecordSchema) {
24
+ throw new Error('Missing propertyRecordSchema')
25
+ }
26
+
27
+ let newValue: ItemPropertyValueType
28
+
29
+ if (event) {
30
+ newValue = event.newValue
31
+ }
32
+
33
+ const _saveListRelation = async (): Promise<boolean> => {
34
+ let refResolvedDisplayValue
35
+ let refSeedType
36
+ let propertyName = propertyNameRaw
37
+ let versionLocalIdToSave = versionLocalId
38
+
39
+ const refResolvedValue = newValue
40
+
41
+ if (!propertyName.endsWith('Ids')) {
42
+ propertyName = `${propertyName}Ids`
43
+ }
44
+
45
+ let newValueType
46
+
47
+ if (typeof newValue === 'string') {
48
+ newValue = newValue.split(',')
49
+ }
50
+
51
+ if (!Array.isArray(newValue)) {
52
+ sendBack({
53
+ type: 'saveListRelationFailure',
54
+ })
55
+ return false
56
+ }
57
+
58
+ // Should have array of ids here
59
+
60
+ return true
61
+
62
+ // let fileType
63
+ //
64
+ // const dirs = await fs.promises.readdir('/files')
65
+ //
66
+ // for (const dir of dirs) {
67
+ // const files = await fs.promises.readdir(`/files/${dir}`)
68
+ // if (newValue && files.includes(newValue as string)) {
69
+ // fileType = dir
70
+ // break
71
+ // }
72
+ // }
73
+ //
74
+ // if (newValue && fileType === 'images') {
75
+ // const filePath = `/files/images/${newValue}`
76
+ // refResolvedDisplayValue = await getContentUrlFromPath(filePath)
77
+ // refSeedType = 'image'
78
+ // newValue = await createSeed({
79
+ // type: refSeedType,
80
+ // })
81
+ // await createVersion({
82
+ // seedLocalId,
83
+ // seedUid,
84
+ // seedType: refSeedType,
85
+ // })
86
+ // }
87
+ //
88
+ // await updateItemPropertyValue({
89
+ // propertyLocalId: localId,
90
+ // propertyName,
91
+ // newValue,
92
+ // seedLocalId,
93
+ // refSeedType,
94
+ // refResolvedValue,
95
+ // refResolvedDisplayValue,
96
+ // versionLocalId,
97
+ // modelName: itemModelName,
98
+ // schemaUid,
99
+ // })
100
+ }
101
+
102
+ _saveListRelation().then((success) => {
103
+ if (success) {
104
+ sendBack({ type: 'saveRelationSuccess' })
105
+ }
106
+ })
107
+ })
@@ -1 +1 @@
1
- {"version":3,"file":"hydrateFromDb.d.ts","sourceRoot":"","sources":["../../../../../../src/browser/property/actors/hydrateFromDb.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,aAAa,KAiNzB,CAAA"}
1
+ {"version":3,"file":"hydrateFromDb.d.ts","sourceRoot":"","sources":["../../../../../../src/browser/property/actors/hydrateFromDb.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,aAAa,KA4PzB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/browser/property/actors/saveValueToDb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgB,MAAM,QAAQ,CAAA;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAEL,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AAEzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AAEjC,eAAO,MAAM,YAAY,8HA0FvB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/browser/property/actors/saveValueToDb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgB,MAAM,QAAQ,CAAA;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAEL,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AAEzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AAEjC,eAAO,MAAM,YAAY,8HAqGvB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { EventObject } from 'xstate';
2
+ import { FromCallbackInput } from '@/types/machines';
3
+ import { PropertyMachineContext, SaveValueToDbEvent } from '@/types/property';
4
+ export declare const saveListRelation: import("xstate").CallbackActorLogic<EventObject, FromCallbackInput<PropertyMachineContext, SaveValueToDbEvent>, EventObject>;
5
+ //# sourceMappingURL=saveListRelation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"saveListRelation.d.ts","sourceRoot":"","sources":["../../../../../../../src/browser/property/actors/saveValueToDb/saveListRelation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgB,MAAM,QAAQ,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAEL,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AAEzB,eAAO,MAAM,gBAAgB,8HAkG3B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../../src/browser/react/item.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAOrC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAMrC,KAAK,YAAY,GAAG;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,KAAK,aAAa,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,IAAI;IAC7C,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;IACzB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;IACrB,UAAU,EAAE,MAAM,G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GAAG;IAC1B,WAAW,EAAE,CACX,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,EAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,GAAG,KACzC,IAAI,CAAA;IACT,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AASD,eAAO,MAAM,cAAc,QAAO,oBA8BjC,CAAA"}
@@ -8,7 +8,6 @@ type UseItemPropertyProps = {
8
8
  type UseItemPropertyReturn = {
9
9
  property: ItemProperty<any> | undefined;
10
10
  isInitialized: boolean;
11
- isReadingFromDb: boolean;
12
11
  value: any;
13
12
  status: string;
14
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"property.d.ts","sourceRoot":"","sources":["../../../../../src/browser/react/property.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAKrC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAKjD,KAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,SAAS,CAAA;IACvC,aAAa,EAAE,OAAO,CAAA;IACtB,eAAe,EAAE,OAAO,CAAA;IACxB,KAAK,EAAE,GAAG,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,KAAK,eAAe,GAAG,CAAC,KAAK,EAAE,oBAAoB,KAAK,qBAAqB,CAAA;AAE7E,eAAO,MAAM,eAAe,EAAE,eA8F7B,CAAA;AACD,eAAO,MAAM,iBAAiB,UAAW,IAAI,CAAC,GAAG,CAAC;;CAsCjD,CAAA"}
1
+ {"version":3,"file":"property.d.ts","sourceRoot":"","sources":["../../../../../src/browser/react/property.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAKrC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAKjD,KAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,SAAS,CAAA;IACvC,aAAa,EAAE,OAAO,CAAA;IACtB,KAAK,EAAE,GAAG,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,KAAK,eAAe,GAAG,CAAC,KAAK,EAAE,oBAAoB,KAAK,qBAAqB,CAAA;AAE7E,eAAO,MAAM,eAAe,EAAE,eAsF7B,CAAA;AACD,eAAO,MAAM,iBAAiB,UAAW,IAAI,CAAC,GAAG,CAAC;;CAsCjD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seedprotocol/sdk",
3
- "version": "0.1.63",
3
+ "version": "0.1.65",
4
4
  "description": "The SDK for Seed Protocol",
5
5
  "type": "module",
6
6
  "types": "./dist/types/src/index.d.ts",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-C351N4sQ.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}