@tak-ps/cloudtak 13.72.3 → 13.72.5

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.
@@ -95,6 +95,15 @@ export default class Overlay {
95
95
  before?: string;
96
96
  }): Promise<void>;
97
97
  delete(): Promise<void>;
98
+ /**
99
+ * Bring this loaded overlay in line with its local database record.
100
+ * Changes are applied to the map directly and never saved, so records
101
+ * written by another client (via AtlasSync) or by this client's own
102
+ * update()/save() are reflected without echoing a PATCH back to the API.
103
+ */
104
+ applyRecord(record: DBOverlay, opts?: {
105
+ before?: string;
106
+ }): Promise<void>;
98
107
  update(body: {
99
108
  pos?: number;
100
109
  visible?: boolean;
@@ -36,6 +36,16 @@ export default class OverlayManager extends BaseInterface {
36
36
  static appendLoaded(...overlays: Overlay[]): void;
37
37
  static createLoaded(body: Parameters<typeof Overlay.create>[0], opts?: Overlay_CreateLoadedOptions): Promise<Overlay>;
38
38
  static reorderLoaded(orderedIds: number[], movedId: string | number): Promise<void>;
39
+ /**
40
+ * Move every loaded overlay's map layers so their stacking matches the
41
+ * `loaded` order (index 0 at the bottom)
42
+ */
43
+ static applyLoadedOrder(): void;
44
+ /**
45
+ * First renderable layer id of the overlay stacked directly above the
46
+ * given one - used to re-insert its layers at the same position
47
+ */
48
+ static loadedBeforeOverlay(overlay: Overlay): string | undefined;
39
49
  static deleteLoaded(idOrOverlay: string | number | Overlay): Promise<void>;
40
50
  static queryableOverlayNames(): string[];
41
51
  static clickableLayerMap(): Map<string, {
@@ -31,6 +31,11 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
31
31
  _cotResync?: Promise<void>;
32
32
  _removeBackgroundStateListener?: () => void;
33
33
  _removePushTokenListener?: () => void;
34
+ _overlaySubscription?: {
35
+ unsubscribe: () => void;
36
+ };
37
+ _overlayReconcile?: Promise<void>;
38
+ _overlayReconcileQueued?: boolean;
34
39
  _lastLocationHttpSubmit?: number;
35
40
  channel: BroadcastChannel;
36
41
  toImport: Feature[];
@@ -157,13 +162,13 @@ export declare const useMapStore: import("pinia").StoreDefinition<"cloudtak", {
157
162
  initOverlays: () => Promise<void>;
158
163
  /**
159
164
  * Reconcile the loaded map overlays against the local overlay
160
- * database after a sync triggered by another of the user's connected
161
- * clients. Adds newly created overlays, removes deleted ones and
162
- * applies visibility/opacity changes. Changes are applied to the map
163
- * directly (not via Overlay.update/save) so the reconcile does not
164
- * PATCH the API and echo the event back to the originating client.
165
+ * database: add new overlays, remove deleted ones and apply field
166
+ * changes. Runs serially - a change landing mid-reconcile queues one
167
+ * follow-up pass. Applies to the map directly (never save()) so the
168
+ * originating client's change is not echoed back to the API.
165
169
  */
166
170
  reconcileOverlays: () => Promise<void>;
171
+ reconcileOverlaysOnce: () => Promise<void>;
167
172
  updateIconRotation: (enabled: boolean) => void;
168
173
  updateDistanceUnit: (unit: string) => void;
169
174
  updateBackground: () => void;
@@ -23,7 +23,6 @@ export declare enum WorkerMessageType {
23
23
  Profile_Update = "cloudtak:profile:update",
24
24
  Sync_Start = "cloudtak:sync:start",
25
25
  Sync_Complete = "cloudtak:sync:complete",
26
- Sync_Update = "cloudtak:sync:update",
27
26
  Iconset_Change = "cloudtak:iconset:change",
28
27
  VideoWall_Ping = "cloudtak:videowall:ping",
29
28
  VideoWall_Pong = "cloudtak:videowall:pong",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/cloudtak",
3
3
  "type": "module",
4
- "version": "13.72.3",
4
+ "version": "13.72.5",
5
5
  "types": "dist/types/plugin.d.ts",
6
6
  "files": [
7
7
  "dist/types"