@marimo-team/islands 0.20.5-dev79 → 0.20.5-dev83

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
@@ -70720,7 +70720,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
70720
70720
  return Logger.warn("Failed to get version from mount config"), null;
70721
70721
  }
70722
70722
  }
70723
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.20.5-dev79"), showCodeInRunModeAtom = atom(true);
70723
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.20.5-dev83"), showCodeInRunModeAtom = atom(true);
70724
70724
  atom(null);
70725
70725
  var import_compiler_runtime$89 = require_compiler_runtime();
70726
70726
  function useKeydownOnElement(e, r) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.20.5-dev79",
3
+ "version": "0.20.5-dev83",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -247,21 +247,26 @@ function applyVimCommands(vimCommands: VimCommand[]) {
247
247
  }
248
248
  }
249
249
 
250
- type VimWithGlobalState = typeof Vim & {
251
- getVimGlobalState_?: () => {
250
+ interface ExtendedVim {
251
+ getVimGlobalState_: () => {
252
252
  macroModeState?: {
253
253
  isRecording: boolean;
254
254
  isPlaying: boolean;
255
255
  };
256
256
  };
257
- };
257
+ }
258
+
259
+ function isExtendedVim(vim: typeof Vim): vim is typeof Vim & ExtendedVim {
260
+ return (
261
+ "getVimGlobalState_" in vim && typeof vim.getVimGlobalState_ === "function"
262
+ );
263
+ }
258
264
 
259
265
  function isMacroActive() {
260
- const getGlobalState = (Vim as VimWithGlobalState).getVimGlobalState_;
261
- if (typeof getGlobalState !== "function") {
266
+ if (!isExtendedVim(Vim)) {
262
267
  return false;
263
268
  }
264
- const macroModeState = getGlobalState()?.macroModeState;
269
+ const macroModeState = Vim.getVimGlobalState_()?.macroModeState;
265
270
  if (!macroModeState) {
266
271
  return false;
267
272
  }