@opentabs-dev/opentabs-plugin-ynab 0.0.75 → 0.0.76

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.
@@ -15092,21 +15092,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15092
15092
  };
15093
15093
  var src_default = new YnabPlugin();
15094
15094
 
15095
- // dist/_adapter_entry_203f761a-9742-4e1b-b19c-bdb6a0061b0a.ts
15095
+ // dist/_adapter_entry_3f87a17d-2a09-4ee7-baaa-738823c57488.ts
15096
15096
  if (!globalThis.__openTabs) {
15097
15097
  globalThis.__openTabs = {};
15098
15098
  } else {
15099
15099
  const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
15100
15100
  if (desc && !desc.writable) {
15101
- const ot2 = globalThis.__openTabs;
15101
+ const ot3 = globalThis.__openTabs;
15102
15102
  const newAdaptersObj = {};
15103
- if (ot2.adapters) {
15104
- for (const key of Object.keys(ot2.adapters)) {
15105
- const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
15103
+ if (ot3.adapters) {
15104
+ for (const key of Object.keys(ot3.adapters)) {
15105
+ const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
15106
15106
  if (d) Object.defineProperty(newAdaptersObj, key, d);
15107
15107
  }
15108
15108
  }
15109
- globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
15109
+ globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
15110
15110
  }
15111
15111
  }
15112
15112
  if (!globalThis.__openTabs.adapters) {
@@ -15144,6 +15144,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15144
15144
  }
15145
15145
  };
15146
15146
  var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
15147
+ var ot2 = globalThis.__openTabs;
15148
+ ot2._notifyReadinessChanged = () => {
15149
+ try {
15150
+ const nonce = globalThis.__openTabs?._readinessNonce;
15151
+ if (nonce) {
15152
+ window.postMessage({ type: "opentabs:readiness-changed", plugin: "ynab", nonce }, "*");
15153
+ }
15154
+ } catch {
15155
+ }
15156
+ };
15147
15157
  var existing = adapters["ynab"];
15148
15158
  if (existing) {
15149
15159
  if (typeof existing.teardown === "function") {
@@ -15155,7 +15165,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15155
15165
  }
15156
15166
  }
15157
15167
  if (!Reflect.deleteProperty(adapters, "ynab")) {
15158
- const ot2 = globalThis.__openTabs;
15168
+ const ot3 = globalThis.__openTabs;
15159
15169
  const newAdapters = {};
15160
15170
  for (const key of Object.keys(adapters)) {
15161
15171
  if (key !== "ynab") {
@@ -15163,7 +15173,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15163
15173
  if (desc) Object.defineProperty(newAdapters, key, desc);
15164
15174
  }
15165
15175
  }
15166
- globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
15176
+ globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
15167
15177
  }
15168
15178
  var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
15169
15179
  for (const tool of src_default.tools) {
@@ -15224,12 +15234,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15224
15234
  }
15225
15235
  }
15226
15236
  };
15227
- const ot2 = globalThis.__openTabs;
15228
- if (!ot2._navigationInterceptor) {
15237
+ const ot3 = globalThis.__openTabs;
15238
+ if (!ot3._navigationInterceptor) {
15229
15239
  const origPushState = history.pushState.bind(history);
15230
15240
  const origReplaceState = history.replaceState.bind(history);
15231
15241
  const callbacks = /* @__PURE__ */ new Map();
15232
- ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15242
+ ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15233
15243
  history.pushState = function(...args) {
15234
15244
  origPushState(...args);
15235
15245
  for (const cb of callbacks.values()) {
@@ -15243,7 +15253,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15243
15253
  }
15244
15254
  };
15245
15255
  }
15246
- const interceptor = ot2._navigationInterceptor;
15256
+ const interceptor = ot3._navigationInterceptor;
15247
15257
  interceptor.callbacks.set("ynab", checkUrl);
15248
15258
  window.addEventListener("popstate", checkUrl);
15249
15259
  window.addEventListener("hashchange", checkUrl);
@@ -15298,5 +15308,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15298
15308
  };
15299
15309
  delete src_default.onDeactivate;
15300
15310
  }
15301
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["ynab"]){var a=o.adapters["ynab"];a.__adapterHash="4c533e5cb35085acdb299d414cd53c6c60b96c37e9261f00fba0ddb156038d46";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"ynab",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15311
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["ynab"]){var a=o.adapters["ynab"];a.__adapterHash="101cfca804e69874ea527a3c48691c32eb268ae40ff91e5d50f4b9fe277b4d62";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"ynab",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15302
15312
  //# sourceMappingURL=adapter.iife.js.map