@pronto-tools-and-more/files 11.0.0 → 11.2.0

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.
@@ -192,11 +192,24 @@ const updateViews = () => {
192
192
  document.body.append(currentFrame);
193
193
  };
194
194
 
195
+ const incrementalUpdate = (changes) => {
196
+ const pidKey = `data-prid`;
197
+ for (const change of changes) {
198
+ if (change.type === "text-change") {
199
+ const $Node = document.querySelector(`[${pidKey}="${change.ref}"]`);
200
+ if ($Node) {
201
+ $Node.textContent = change.newText;
202
+ }
203
+ }
204
+ }
205
+ };
206
+
195
207
  const commandMap = {
196
208
  reload,
197
209
  updateCss,
198
210
  updateCssError,
199
211
  updateViews,
212
+ incrementalUpdate,
200
213
  };
201
214
 
202
215
  const getCommand = (method) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/files",
3
- "version": "11.0.0",
3
+ "version": "11.2.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {},