@hatiolab/things-scene 3.0.7 → 3.0.8

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/things-scene.d.ts CHANGED
@@ -87,6 +87,12 @@ declare module '@hatiolab/things-scene' {
87
87
  const LinearHorizontalLayout: LAYOUT
88
88
  const LinearVerticalLayout: LAYOUT
89
89
 
90
+ interface PersistentDataStorage {
91
+ load(key: object): any
92
+ save(key: object, value): void
93
+ clear(key: object): void
94
+ }
95
+
90
96
  type AnimationConfig = {
91
97
  duration?: number
92
98
  delay?: number
@@ -116,6 +122,7 @@ declare module '@hatiolab/things-scene' {
116
122
  mode,
117
123
  refProvider,
118
124
  dataSubscriptionProvider,
125
+ dataStorage,
119
126
  baseUrl,
120
127
  fitMode
121
128
  }: {
@@ -127,6 +134,7 @@ declare module '@hatiolab/things-scene' {
127
134
  mode?: SCENE_MODE
128
135
  refProvider?: ReferenceProvider
129
136
  dataSubscriptionProvider?: DataSubscriptionProvider
137
+ dataStorage?: PersistentDataStorage
130
138
  baseUrl?: string | undefined
131
139
  fitMode?: FITMODE
132
140
  }): Scene
@@ -154,6 +162,7 @@ declare module '@hatiolab/things-scene' {
154
162
 
155
163
  class ApplicationContext {
156
164
  readonly refProvider: ReferenceProvider
165
+ readonly dataStorage: PersistentDataStorage
157
166
  readonly dataSubscriptionProvider: DataSubscriptionProvider
158
167
  readonly isViewMode: boolean
159
168
  readonly isEditMode: boolean