obsidian-dev-utils 97.0.0 → 99.0.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.
Files changed (143) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +1 -1
  3. package/dist/integration-test-plugin/main.js +686 -439
  4. package/dist/lib/cjs/__merged.cjs +22 -9
  5. package/dist/lib/cjs/__merged.d.cts +4 -3
  6. package/dist/lib/cjs/generated-during-build.cjs +1 -1
  7. package/dist/lib/cjs/obsidian/components/plugin-settings-component.cjs +36 -1
  8. package/dist/lib/cjs/obsidian/components/plugin-settings-component.d.cts +21 -0
  9. package/dist/lib/cjs/obsidian/components/plugin-suggestion-component.cjs +20 -6
  10. package/dist/lib/cjs/obsidian/components/plugin-suggestion-component.d.cts +26 -4
  11. package/dist/lib/cjs/obsidian/components/rename-delete-handler-component.cjs +38 -38
  12. package/dist/lib/cjs/obsidian/demo-vault-naming.cjs +167 -0
  13. package/dist/lib/cjs/obsidian/demo-vault-naming.d.cts +54 -0
  14. package/dist/lib/cjs/obsidian/desktop-demo-vault-opener.cjs +11 -5
  15. package/dist/lib/cjs/obsidian/desktop-demo-vault-opener.d.cts +10 -8
  16. package/dist/lib/cjs/obsidian/desktop-trusted-input.cjs +9 -9
  17. package/dist/lib/cjs/obsidian/desktop-trusted-input.d.cts +23 -4
  18. package/dist/lib/cjs/obsidian/file-change.cjs +6 -6
  19. package/dist/lib/cjs/obsidian/index.cjs +10 -1
  20. package/dist/lib/cjs/obsidian/index.d.cts +3 -0
  21. package/dist/lib/cjs/obsidian/link.cjs +33 -6
  22. package/dist/lib/cjs/obsidian/link.d.cts +35 -0
  23. package/dist/lib/cjs/obsidian/mobile-trusted-input.cjs +195 -0
  24. package/dist/lib/cjs/obsidian/mobile-trusted-input.d.cts +93 -0
  25. package/dist/lib/cjs/obsidian/plugin/obsidian-plugin-repo-paths.cjs +2 -1
  26. package/dist/lib/cjs/obsidian/plugin/obsidian-plugin-repo-paths.d.cts +4 -0
  27. package/dist/lib/cjs/obsidian/reference.cjs +9 -1
  28. package/dist/lib/cjs/obsidian/reference.d.cts +33 -0
  29. package/dist/lib/cjs/obsidian/resource-lock.cjs +122 -122
  30. package/dist/lib/cjs/obsidian/trusted-input.cjs +206 -0
  31. package/dist/lib/cjs/obsidian/trusted-input.d.cts +126 -0
  32. package/dist/lib/cjs/obsidian/validation.cjs +22 -3
  33. package/dist/lib/cjs/obsidian/validation.d.cts +37 -0
  34. package/dist/lib/cjs/obsidian/vault.cjs +4 -1
  35. package/dist/lib/cjs/obsidian/vault.d.cts +8 -1
  36. package/dist/lib/cjs/script-utils/build.cjs +30 -6
  37. package/dist/lib/cjs/script-utils/build.d.cts +5 -0
  38. package/dist/lib/cjs/script-utils/demo-vault.cjs +26 -6
  39. package/dist/lib/cjs/script-utils/demo-vault.d.cts +12 -8
  40. package/dist/lib/cjs/script-utils/exec.cjs +1 -1
  41. package/dist/lib/cjs/script-utils/formatters/dprint.cjs +3 -2
  42. package/dist/lib/cjs/script-utils/index.cjs +4 -1
  43. package/dist/lib/cjs/script-utils/index.d.cts +1 -0
  44. package/dist/lib/cjs/script-utils/linters/cspell.cjs +3 -3
  45. package/dist/lib/cjs/script-utils/linters/eslint-config.cjs +39 -1
  46. package/dist/lib/cjs/script-utils/linters/eslint-rules/index.cjs +16 -1
  47. package/dist/lib/cjs/script-utils/linters/eslint-rules/index.d.cts +5 -0
  48. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-description.cjs +254 -0
  49. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-description.d.cts +54 -0
  50. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-helpers.cjs +217 -0
  51. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-helpers.d.cts +141 -0
  52. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-id.cjs +214 -0
  53. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-id.d.cts +32 -0
  54. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-name.cjs +215 -0
  55. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-name.d.cts +30 -0
  56. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-schema.cjs +318 -0
  57. package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-schema.d.cts +45 -0
  58. package/dist/lib/cjs/script-utils/linters/eslint-rules/obsidian-dev-utils-plugin.cjs +9 -1
  59. package/dist/lib/cjs/script-utils/linters/eslint.cjs +3 -2
  60. package/dist/lib/cjs/script-utils/linters/markdownlint.cjs +4 -4
  61. package/dist/lib/cjs/script-utils/nano-staged-config.cjs +7 -5
  62. package/dist/lib/cjs/script-utils/nano-staged-config.d.cts +5 -2
  63. package/dist/lib/cjs/script-utils/npm-run.cjs +4 -3
  64. package/dist/lib/cjs/script-utils/obsidian-dev-utils-repo-paths.cjs +10 -1
  65. package/dist/lib/cjs/script-utils/obsidian-dev-utils-repo-paths.d.cts +37 -1
  66. package/dist/lib/cjs/script-utils/package-manager.cjs +370 -0
  67. package/dist/lib/cjs/script-utils/package-manager.d.cts +93 -0
  68. package/dist/lib/cjs/script-utils/version.cjs +21 -9
  69. package/dist/lib/esm/__merged.d.mts +4 -3
  70. package/dist/lib/esm/__merged.mjs +24 -10
  71. package/dist/lib/esm/generated-during-build.mjs +1 -1
  72. package/dist/lib/esm/obsidian/components/plugin-settings-component.d.mts +21 -0
  73. package/dist/lib/esm/obsidian/components/plugin-settings-component.mjs +36 -1
  74. package/dist/lib/esm/obsidian/components/plugin-suggestion-component.d.mts +26 -4
  75. package/dist/lib/esm/obsidian/components/plugin-suggestion-component.mjs +20 -6
  76. package/dist/lib/esm/obsidian/components/rename-delete-handler-component.mjs +38 -38
  77. package/dist/lib/esm/obsidian/demo-vault-naming.d.mts +54 -0
  78. package/dist/lib/esm/obsidian/demo-vault-naming.mjs +61 -0
  79. package/dist/lib/esm/obsidian/desktop-demo-vault-opener.d.mts +10 -8
  80. package/dist/lib/esm/obsidian/desktop-demo-vault-opener.mjs +14 -5
  81. package/dist/lib/esm/obsidian/desktop-trusted-input.d.mts +23 -4
  82. package/dist/lib/esm/obsidian/desktop-trusted-input.mjs +9 -9
  83. package/dist/lib/esm/obsidian/file-change.mjs +6 -6
  84. package/dist/lib/esm/obsidian/index.d.mts +3 -0
  85. package/dist/lib/esm/obsidian/index.mjs +7 -1
  86. package/dist/lib/esm/obsidian/link.d.mts +35 -0
  87. package/dist/lib/esm/obsidian/link.mjs +38 -7
  88. package/dist/lib/esm/obsidian/mobile-trusted-input.d.mts +93 -0
  89. package/dist/lib/esm/obsidian/mobile-trusted-input.mjs +84 -0
  90. package/dist/lib/esm/obsidian/plugin/obsidian-plugin-repo-paths.d.mts +4 -0
  91. package/dist/lib/esm/obsidian/plugin/obsidian-plugin-repo-paths.mjs +2 -1
  92. package/dist/lib/esm/obsidian/reference.d.mts +33 -0
  93. package/dist/lib/esm/obsidian/reference.mjs +8 -1
  94. package/dist/lib/esm/obsidian/resource-lock.mjs +122 -122
  95. package/dist/lib/esm/obsidian/trusted-input.d.mts +126 -0
  96. package/dist/lib/esm/obsidian/trusted-input.mjs +85 -0
  97. package/dist/lib/esm/obsidian/validation.d.mts +37 -0
  98. package/dist/lib/esm/obsidian/validation.mjs +21 -2
  99. package/dist/lib/esm/obsidian/vault.d.mts +8 -1
  100. package/dist/lib/esm/obsidian/vault.mjs +4 -1
  101. package/dist/lib/esm/script-utils/build.d.mts +5 -0
  102. package/dist/lib/esm/script-utils/build.mjs +30 -6
  103. package/dist/lib/esm/script-utils/demo-vault.d.mts +12 -8
  104. package/dist/lib/esm/script-utils/demo-vault.mjs +29 -6
  105. package/dist/lib/esm/script-utils/exec.mjs +1 -1
  106. package/dist/lib/esm/script-utils/formatters/dprint.mjs +3 -2
  107. package/dist/lib/esm/script-utils/index.d.mts +1 -0
  108. package/dist/lib/esm/script-utils/index.mjs +3 -1
  109. package/dist/lib/esm/script-utils/linters/cspell.mjs +3 -3
  110. package/dist/lib/esm/script-utils/linters/eslint-config.mjs +39 -1
  111. package/dist/lib/esm/script-utils/linters/eslint-rules/index.d.mts +5 -0
  112. package/dist/lib/esm/script-utils/linters/eslint-rules/index.mjs +11 -1
  113. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-description.d.mts +54 -0
  114. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-description.mjs +148 -0
  115. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-helpers.d.mts +141 -0
  116. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-helpers.mjs +92 -0
  117. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-id.d.mts +32 -0
  118. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-id.mjs +111 -0
  119. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-name.d.mts +30 -0
  120. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-name.mjs +112 -0
  121. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-schema.d.mts +45 -0
  122. package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-schema.mjs +217 -0
  123. package/dist/lib/esm/script-utils/linters/eslint-rules/obsidian-dev-utils-plugin.mjs +9 -1
  124. package/dist/lib/esm/script-utils/linters/eslint.mjs +3 -2
  125. package/dist/lib/esm/script-utils/linters/markdownlint.mjs +4 -4
  126. package/dist/lib/esm/script-utils/nano-staged-config.d.mts +5 -2
  127. package/dist/lib/esm/script-utils/nano-staged-config.mjs +7 -5
  128. package/dist/lib/esm/script-utils/npm-run.mjs +4 -3
  129. package/dist/lib/esm/script-utils/obsidian-dev-utils-repo-paths.d.mts +37 -1
  130. package/dist/lib/esm/script-utils/obsidian-dev-utils-repo-paths.mjs +10 -1
  131. package/dist/lib/esm/script-utils/package-manager.d.mts +93 -0
  132. package/dist/lib/esm/script-utils/package-manager.mjs +256 -0
  133. package/dist/lib/esm/script-utils/version.mjs +21 -9
  134. package/obsidian/demo-vault-naming/package.json +6 -0
  135. package/obsidian/mobile-trusted-input/package.json +6 -0
  136. package/obsidian/trusted-input/package.json +6 -0
  137. package/package.json +19 -17
  138. package/script-utils/linters/eslint-rules/manifest-description/package.json +6 -0
  139. package/script-utils/linters/eslint-rules/manifest-helpers/package.json +6 -0
  140. package/script-utils/linters/eslint-rules/manifest-id/package.json +6 -0
  141. package/script-utils/linters/eslint-rules/manifest-name/package.json +6 -0
  142. package/script-utils/linters/eslint-rules/manifest-schema/package.json +6 -0
  143. package/script-utils/package-manager/package.json +6 -0
@@ -8309,6 +8309,31 @@ var init_plugin_notice_component = __esm({
8309
8309
  }
8310
8310
  });
8311
8311
 
8312
+ // src/obsidian/demo-vault-naming.ts
8313
+ var demo_vault_naming_exports = {};
8314
+ __export(demo_vault_naming_exports, {
8315
+ getDemoVaultArchiveFileName: () => getDemoVaultArchiveFileName,
8316
+ getDemoVaultFolderName: () => getDemoVaultFolderName
8317
+ });
8318
+ function getDemoVaultArchiveFileName(pluginId) {
8319
+ return `${getDemoVaultBaseName(pluginId)}.zip`;
8320
+ }
8321
+ function getDemoVaultFolderName(params) {
8322
+ const {
8323
+ pluginId,
8324
+ version
8325
+ } = params;
8326
+ return `${getDemoVaultBaseName(pluginId)}-${version}`;
8327
+ }
8328
+ function getDemoVaultBaseName(pluginId) {
8329
+ return `${pluginId}-demo-vault`;
8330
+ }
8331
+ var init_demo_vault_naming = __esm({
8332
+ "src/obsidian/demo-vault-naming.ts"() {
8333
+ "use strict";
8334
+ }
8335
+ });
8336
+
8312
8337
  // src/obsidian/modals/modal.ts
8313
8338
  var modal_exports = {};
8314
8339
  __export(modal_exports, {
@@ -8525,9 +8550,14 @@ function extractDemoVaultToFreshFolder(params) {
8525
8550
  const extractedVaultsRoot = join((0, import_node_os.tmpdir)(), DEMO_VAULTS_CACHE_FOLDER, EXTRACTED_VAULTS_SUBFOLDER);
8526
8551
  (0, import_node_fs.mkdirSync)(extractedVaultsRoot, { recursive: true });
8527
8552
  const uniqueParentDirectory = (0, import_node_fs.mkdtempSync)(join(extractedVaultsRoot, `${pluginId}-${version}-`));
8528
- const vaultDirectory = join(uniqueParentDirectory, `${pluginId}-${version}.demo-vault`);
8529
- extractDemoVaultArchive(archive, vaultDirectory);
8530
- return vaultDirectory;
8553
+ extractDemoVaultArchive(archive, uniqueParentDirectory);
8554
+ return join(
8555
+ uniqueParentDirectory,
8556
+ getDemoVaultFolderName({
8557
+ pluginId,
8558
+ version
8559
+ })
8560
+ );
8531
8561
  }
8532
8562
  async function resolveDemoVaultArchive(params) {
8533
8563
  const {
@@ -8544,7 +8574,7 @@ async function resolveDemoVaultArchive(params) {
8544
8574
  return (0, import_node_fs.readFileSync)(archivePath);
8545
8575
  }
8546
8576
  progressNotice.setContent(`Downloading demo vault for ${pluginName} v${version}\u2026`);
8547
- const assetUrl = `https://github.com/${repo}/releases/download/${version}/${pluginId}-demo-vault-${version}.zip`;
8577
+ const assetUrl = `https://github.com/${repo}/releases/download/${version}/${getDemoVaultArchiveFileName(pluginId)}`;
8548
8578
  const response = await (0, import_obsidian109.requestUrl)({
8549
8579
  throw: false,
8550
8580
  url: assetUrl
@@ -8571,6 +8601,7 @@ var init_desktop_demo_vault_opener = __esm({
8571
8601
  init_path();
8572
8602
  init_community_plugins();
8573
8603
  init_plugin_notice_component();
8604
+ init_demo_vault_naming();
8574
8605
  init_select_option();
8575
8606
  DEMO_VAULTS_CACHE_FOLDER = "obsidian-demo-vaults";
8576
8607
  ARCHIVES_SUBFOLDER = "archives";
@@ -10005,6 +10036,188 @@ var require_react = __commonJS({
10005
10036
  }
10006
10037
  });
10007
10038
 
10039
+ // src/obsidian/desktop-trusted-input.ts
10040
+ var desktop_trusted_input_exports = {};
10041
+ __export(desktop_trusted_input_exports, {
10042
+ clickElement: () => clickElement,
10043
+ clickMouse: () => clickMouse,
10044
+ hoverElement: () => hoverElement,
10045
+ moveMouse: () => moveMouse,
10046
+ pressKey: () => pressKey,
10047
+ typeIntoEditor: () => typeIntoEditor,
10048
+ unhoverElement: () => unhoverElement
10049
+ });
10050
+ async function clickElement(params) {
10051
+ const { button = "left", element, modifiers = [] } = params;
10052
+ const rect = element.getBoundingClientRect();
10053
+ await clickMouse({
10054
+ button,
10055
+ modifiers,
10056
+ x: rect.left + rect.width / CENTER_DIVISOR,
10057
+ y: rect.top + rect.height / CENTER_DIVISOR
10058
+ });
10059
+ }
10060
+ async function clickMouse(params) {
10061
+ const { button = "left", modifiers = [], x, y } = params;
10062
+ const electronModifiers = toElectronModifiers(modifiers);
10063
+ const roundedX = Math.round(x);
10064
+ const roundedY = Math.round(y);
10065
+ const webContents = getWebContents();
10066
+ webContents.sendInputEvent({ modifiers: electronModifiers, type: "mouseMove", x: roundedX, y: roundedY });
10067
+ webContents.sendInputEvent({
10068
+ button,
10069
+ clickCount: SINGLE_CLICK_COUNT,
10070
+ modifiers: electronModifiers,
10071
+ type: "mouseDown",
10072
+ x: roundedX,
10073
+ y: roundedY
10074
+ });
10075
+ webContents.sendInputEvent({
10076
+ button,
10077
+ clickCount: SINGLE_CLICK_COUNT,
10078
+ modifiers: electronModifiers,
10079
+ type: "mouseUp",
10080
+ x: roundedX,
10081
+ y: roundedY
10082
+ });
10083
+ }
10084
+ async function hoverElement(params) {
10085
+ const { element } = params;
10086
+ const rect = element.getBoundingClientRect();
10087
+ await moveMouse({ x: rect.left + rect.width / CENTER_DIVISOR, y: rect.top + rect.height / CENTER_DIVISOR });
10088
+ const startTime = Date.now();
10089
+ while (!element.matches(":hover") && Date.now() - startTime < INPUT_TIMEOUT_IN_MILLISECONDS) {
10090
+ await sleep(INPUT_POLL_INTERVAL_IN_MILLISECONDS);
10091
+ }
10092
+ }
10093
+ async function moveMouse(params) {
10094
+ getWebContents().sendInputEvent({ type: "mouseMove", x: Math.round(params.x), y: Math.round(params.y) });
10095
+ }
10096
+ async function pressKey(params) {
10097
+ const { key, modifiers = [] } = params;
10098
+ const electronModifiers = toElectronModifiers(modifiers);
10099
+ const webContents = getWebContents();
10100
+ webContents.sendInputEvent({ keyCode: key, modifiers: electronModifiers, type: "keyDown" });
10101
+ webContents.sendInputEvent({ keyCode: key, modifiers: electronModifiers, type: "char" });
10102
+ webContents.sendInputEvent({ keyCode: key, modifiers: electronModifiers, type: "keyUp" });
10103
+ }
10104
+ async function typeIntoEditor(params) {
10105
+ const FOCUS_SETTLE_DELAY_IN_MILLISECONDS = 300;
10106
+ const { editor, text: text4 } = params;
10107
+ const valueBeforeTyping = editor.getValue();
10108
+ editor.focus();
10109
+ const lastLine = editor.lastLine();
10110
+ editor.setCursor(lastLine, editor.getLine(lastLine).length);
10111
+ await sleep(FOCUS_SETTLE_DELAY_IN_MILLISECONDS);
10112
+ for (const char of text4) {
10113
+ await pressKey({ key: char });
10114
+ }
10115
+ const startTime = Date.now();
10116
+ while (editor.getValue() === valueBeforeTyping && Date.now() - startTime < INPUT_TIMEOUT_IN_MILLISECONDS) {
10117
+ await sleep(INPUT_POLL_INTERVAL_IN_MILLISECONDS);
10118
+ }
10119
+ }
10120
+ async function unhoverElement(params) {
10121
+ const OUTSIDE_OFFSET_IN_PIXELS = 1;
10122
+ const { element } = params;
10123
+ const rect = element.getBoundingClientRect();
10124
+ const x = rect.left >= OUTSIDE_OFFSET_IN_PIXELS ? rect.left - OUTSIDE_OFFSET_IN_PIXELS : rect.right + OUTSIDE_OFFSET_IN_PIXELS;
10125
+ const y = rect.top + rect.height / CENTER_DIVISOR;
10126
+ await moveMouse({ x, y });
10127
+ const startTime = Date.now();
10128
+ while (element.matches(":hover") && Date.now() - startTime < INPUT_TIMEOUT_IN_MILLISECONDS) {
10129
+ await sleep(INPUT_POLL_INTERVAL_IN_MILLISECONDS);
10130
+ }
10131
+ }
10132
+ function getWebContents() {
10133
+ return window.electron.remote.getCurrentWebContents();
10134
+ }
10135
+ function toElectronModifiers(modifiers) {
10136
+ const isMacOS = import_obsidian163.Platform.isMacOS;
10137
+ return modifiers.map((modifier) => {
10138
+ switch (modifier) {
10139
+ case "Alt": {
10140
+ return "alt";
10141
+ }
10142
+ case "Ctrl": {
10143
+ return "control";
10144
+ }
10145
+ case "Meta": {
10146
+ return "meta";
10147
+ }
10148
+ case "Mod": {
10149
+ return isMacOS ? "meta" : "control";
10150
+ }
10151
+ case "Shift": {
10152
+ return "shift";
10153
+ }
10154
+ default: {
10155
+ return assertNever(modifier);
10156
+ }
10157
+ }
10158
+ });
10159
+ }
10160
+ var import_obsidian163, INPUT_POLL_INTERVAL_IN_MILLISECONDS, INPUT_TIMEOUT_IN_MILLISECONDS, CENTER_DIVISOR, SINGLE_CLICK_COUNT;
10161
+ var init_desktop_trusted_input = __esm({
10162
+ "src/obsidian/desktop-trusted-input.ts"() {
10163
+ "use strict";
10164
+ import_obsidian163 = require("obsidian");
10165
+ init_type_guards();
10166
+ INPUT_POLL_INTERVAL_IN_MILLISECONDS = 50;
10167
+ INPUT_TIMEOUT_IN_MILLISECONDS = 5e3;
10168
+ CENTER_DIVISOR = 2;
10169
+ SINGLE_CLICK_COUNT = 1;
10170
+ }
10171
+ });
10172
+
10173
+ // src/obsidian/mobile-trusted-input.ts
10174
+ var mobile_trusted_input_exports = {};
10175
+ __export(mobile_trusted_input_exports, {
10176
+ clickElement: () => clickElement2,
10177
+ clickMouse: () => clickMouse2,
10178
+ hoverElement: () => hoverElement2,
10179
+ moveMouse: () => moveMouse2,
10180
+ pressKey: () => pressKey2,
10181
+ typeIntoEditor: () => typeIntoEditor2,
10182
+ unhoverElement: () => unhoverElement2
10183
+ });
10184
+ async function clickElement2(params) {
10185
+ await getSeamFunction("clickElement")(params);
10186
+ }
10187
+ async function clickMouse2(params) {
10188
+ await getSeamFunction("clickMouse")(params);
10189
+ }
10190
+ async function hoverElement2(params) {
10191
+ await getSeamFunction("hoverElement")(params);
10192
+ }
10193
+ async function moveMouse2(params) {
10194
+ await getSeamFunction("moveMouse")(params);
10195
+ }
10196
+ async function pressKey2(params) {
10197
+ await getSeamFunction("pressKey")(params);
10198
+ }
10199
+ async function typeIntoEditor2(params) {
10200
+ await getSeamFunction("typeIntoEditor")(params);
10201
+ }
10202
+ async function unhoverElement2(params) {
10203
+ await getSeamFunction("unhoverElement")(params);
10204
+ }
10205
+ function getSeamFunction(name) {
10206
+ const holder = globalThis;
10207
+ const seamFunction = holder.__obsidianIntegrationTesting?.trustedInput?.[name];
10208
+ if (!seamFunction) {
10209
+ throw new Error(
10210
+ `Trusted input is unavailable on mobile: \`window.__obsidianIntegrationTesting.trustedInput.${name}\` is not installed. A phone has no in-renderer route to a trusted event, so the injection is a round-trip to the host over the \`obsidian-integration-testing\` Appium transport's channel \u2014 which means these helpers only work inside an app that harness bootstrapped.`
10211
+ );
10212
+ }
10213
+ return seamFunction;
10214
+ }
10215
+ var init_mobile_trusted_input = __esm({
10216
+ "src/obsidian/mobile-trusted-input.ts"() {
10217
+ "use strict";
10218
+ }
10219
+ });
10220
+
10008
10221
  // integration-test-plugin/main.ts
10009
10222
  var main_exports = {};
10010
10223
  __export(main_exports, {
@@ -10263,8 +10476,8 @@ __export(merged_exports, {
10263
10476
  chain: () => chain,
10264
10477
  checkExtension: () => checkExtension,
10265
10478
  cleanupEmptyFolders: () => cleanupEmptyFolders,
10266
- clickElement: () => clickElement,
10267
- clickMouse: () => clickMouse,
10479
+ clickElement: () => clickElement3,
10480
+ clickMouse: () => clickMouse3,
10268
10481
  cloneFunction: () => cloneFunction,
10269
10482
  cloneWithNonEnumerableProperties: () => cloneWithNonEnumerableProperties,
10270
10483
  configureCommunityPlugin: () => configureCommunityPlugin,
@@ -10365,6 +10578,8 @@ __export(merged_exports, {
10365
10578
  getCommunityPluginRepo: () => getCommunityPluginRepo,
10366
10579
  getDebugController: () => getDebugController,
10367
10580
  getDebugger: () => getDebugger,
10581
+ getDemoVaultArchiveFileName: () => getDemoVaultArchiveFileName,
10582
+ getDemoVaultFolderName: () => getDemoVaultFolderName,
10368
10583
  getDocumentWindow: () => getDocumentWindow,
10369
10584
  getDomEventsHandlersConstructor: () => getDomEventsHandlersConstructor,
10370
10585
  getEnumKey: () => getEnumKey,
@@ -10424,7 +10639,8 @@ __export(merged_exports, {
10424
10639
  hasPatchToken: () => hasPatchToken,
10425
10640
  hasSingleOccurrence: () => hasSingleOccurrence,
10426
10641
  hasWikilinkSyntax: () => hasWikilinkSyntax,
10427
- hoverElement: () => hoverElement,
10642
+ hasWindowsTrailingChars: () => hasWindowsTrailingChars,
10643
+ hoverElement: () => hoverElement3,
10428
10644
  ignoreError: () => ignoreError,
10429
10645
  indent: () => indent,
10430
10646
  initDebugController: () => initDebugController,
@@ -10478,6 +10694,7 @@ __export(merged_exports, {
10478
10694
  isNote: () => isNote,
10479
10695
  isParseLinkFrontmatterReference: () => isParseLinkFrontmatterReference,
10480
10696
  isParseLinkReference: () => isParseLinkReference,
10697
+ isReferenceInOffsetRange: () => isReferenceInOffsetRange,
10481
10698
  isResourceLockedForPath: () => isResourceLockedForPath,
10482
10699
  isResourceLockedForPathByAncestor: () => isResourceLockedForPathByAncestor,
10483
10700
  isSpellcheckEnabled: () => isSpellcheckEnabled,
@@ -10485,6 +10702,7 @@ __export(merged_exports, {
10485
10702
  isUrl: () => isUrl,
10486
10703
  isValidRegExp: () => isValidRegExp,
10487
10704
  isValidationMessageHolder: () => isValidationMessageHolder,
10705
+ isWindowsReservedName: () => isWindowsReservedName,
10488
10706
  join: () => join,
10489
10707
  listSafe: () => listSafe,
10490
10708
  lockResourceForPath: () => lockResourceForPath,
@@ -10495,7 +10713,7 @@ __export(merged_exports, {
10495
10713
  markdownToHtml: () => markdownToHtml,
10496
10714
  marksAsTerminateRetry: () => marksAsTerminateRetry,
10497
10715
  mixinAsyncEvents: () => mixinAsyncEvents,
10498
- moveMouse: () => moveMouse,
10716
+ moveMouse: () => moveMouse3,
10499
10717
  nameof: () => nameof,
10500
10718
  neverEnds: () => neverEnds,
10501
10719
  nextTickAsync: () => nextTickAsync,
@@ -10525,7 +10743,7 @@ __export(merged_exports, {
10525
10743
  pathsValidator: () => pathsValidator,
10526
10744
  pickHighestPriorityNotePath: () => pickHighestPriorityNotePath,
10527
10745
  posix: () => posix,
10528
- pressKey: () => pressKey,
10746
+ pressKey: () => pressKey3,
10529
10747
  printError: () => printError,
10530
10748
  printToPdf: () => printToPdf,
10531
10749
  printWithStackTrace: () => printWithStackTrace,
@@ -10629,10 +10847,11 @@ __export(merged_exports, {
10629
10847
  trimEnd: () => trimEnd,
10630
10848
  trimMarkdownExtension: () => trimMarkdownExtension,
10631
10849
  trimStart: () => trimStart,
10632
- typeIntoEditor: () => typeIntoEditor,
10850
+ trimWindowsTrailingChars: () => trimWindowsTrailingChars,
10851
+ typeIntoEditor: () => typeIntoEditor3,
10633
10852
  unescape: () => unescape,
10634
10853
  unescapeAlias: () => unescapeAlias,
10635
- unhoverElement: () => unhoverElement,
10854
+ unhoverElement: () => unhoverElement3,
10636
10855
  unindent: () => unindent,
10637
10856
  uninstallCommunityPlugin: () => uninstallCommunityPlugin,
10638
10857
  unique: () => unique,
@@ -13071,6 +13290,7 @@ __export(link_exports, {
13071
13290
  });
13072
13291
  var import_obsidian102 = require("obsidian");
13073
13292
  init_abort_controller();
13293
+ init_debug();
13074
13294
  init_object_utils();
13075
13295
  init_obsidian_dev_utils_state();
13076
13296
  init_path();
@@ -13282,6 +13502,7 @@ __export(reference_exports, {
13282
13502
  isCanvasFileNodeReference: () => isCanvasFileNodeReference,
13283
13503
  isCanvasReference: () => isCanvasReference,
13284
13504
  isCanvasTextNodeReference: () => isCanvasTextNodeReference,
13505
+ isReferenceInOffsetRange: () => isReferenceInOffsetRange,
13285
13506
  referenceToFileChange: () => referenceToFileChange,
13286
13507
  sortReferences: () => sortReferences
13287
13508
  });
@@ -13294,6 +13515,12 @@ function isCanvasReference(reference) {
13294
13515
  function isCanvasTextNodeReference(reference) {
13295
13516
  return isCanvasReference(reference) && reference.type === "text";
13296
13517
  }
13518
+ function isReferenceInOffsetRange(reference, offsetRange) {
13519
+ if (!isReferenceCache(reference)) {
13520
+ return false;
13521
+ }
13522
+ return offsetRange.startOffset <= reference.position.start.offset && reference.position.end.offset <= offsetRange.endOffset;
13523
+ }
13297
13524
  function referenceToFileChange(reference, newContent) {
13298
13525
  if (isFrontmatterLinkCacheWithOffsets(reference)) {
13299
13526
  return {
@@ -13672,6 +13899,9 @@ async function process2(params) {
13672
13899
  if (newContent === null) {
13673
13900
  return false;
13674
13901
  }
13902
+ if (newContent === oldContent) {
13903
+ return true;
13904
+ }
13675
13905
  let isSuccess = true;
13676
13906
  const result = await invokeFileActionSafe({
13677
13907
  app,
@@ -13908,7 +14138,7 @@ async function applyCanvasChanges(params) {
13908
14138
  const canvasData = parseJsonSafe(content3);
13909
14139
  if (!Array.isArray(canvasData.nodes) || !Array.isArray(canvasData.edges)) {
13910
14140
  getLibDebugger("FileChange:applyCanvasChanges")("Not a valid canvas; skipping rewrite", { path });
13911
- return null;
14141
+ return content3;
13912
14142
  }
13913
14143
  const canvasTextChanges = /* @__PURE__ */ new Map();
13914
14144
  for (const change of changes) {
@@ -13927,7 +14157,7 @@ async function applyCanvasChanges(params) {
13927
14157
  nodeIndex: change.reference.nodeIndex,
13928
14158
  path
13929
14159
  });
13930
- return null;
14160
+ return content3;
13931
14161
  }
13932
14162
  if (isCanvasFileNodeChange(change)) {
13933
14163
  if (node2.file !== change.oldContent) {
@@ -13938,7 +14168,7 @@ async function applyCanvasChanges(params) {
13938
14168
  path,
13939
14169
  type: "file"
13940
14170
  });
13941
- return null;
14171
+ return content3;
13942
14172
  }
13943
14173
  node2.file = change.newContent;
13944
14174
  } else if (isCanvasTextNodeChange(change)) {
@@ -13958,7 +14188,7 @@ async function applyCanvasChanges(params) {
13958
14188
  nodeIndex,
13959
14189
  path
13960
14190
  });
13961
- return null;
14191
+ return content3;
13962
14192
  }
13963
14193
  if (typeof node2.text !== "string") {
13964
14194
  const message = "Node text is not a string";
@@ -13966,7 +14196,7 @@ async function applyCanvasChanges(params) {
13966
14196
  nodeIndex,
13967
14197
  path
13968
14198
  });
13969
- return null;
14199
+ return content3;
13970
14200
  }
13971
14201
  const contentChanges = canvasTextChangesForNode.map((change) => {
13972
14202
  const newContent = change.reference.originalReference.original.includes(ESCAPED_WIKILINK_DIVIDER) ? change.newContent.replaceAll(UNESCAPED_WIKILINK_DIVIDER_REGEXP, () => ESCAPED_WIKILINK_DIVIDER) : change.newContent;
@@ -25094,12 +25324,16 @@ async function editLinks(params) {
25094
25324
  const {
25095
25325
  app,
25096
25326
  linkConverter,
25327
+ offsetRange,
25097
25328
  pathOrFile,
25098
25329
  shouldEditExternalLinks = false,
25099
25330
  shouldEditFrontmatterExternalLinks = false,
25100
25331
  shouldEditMultiValueFrontmatterExternalLinks = false,
25101
25332
  ...options
25102
25333
  } = params;
25334
+ if (offsetRange !== void 0) {
25335
+ validateOffsetRange(offsetRange);
25336
+ }
25103
25337
  await applyFileChanges({
25104
25338
  app,
25105
25339
  changesProvider: async ({ abortSignal, content: content3 }) => {
@@ -25115,25 +25349,29 @@ async function editLinks(params) {
25115
25349
  if (content3 !== cachedContent) {
25116
25350
  return null;
25117
25351
  }
25118
- return await getFileChanges({
25352
+ return await getFileChanges(normalizeOptionalProperties({
25119
25353
  abortSignal,
25120
25354
  cache,
25121
25355
  isCanvasFileCache: isCanvasFile(pathOrFile),
25122
25356
  linkConverter,
25357
+ offsetRange,
25123
25358
  shouldIncludeExternalLinks: shouldEditExternalLinks,
25124
25359
  shouldIncludeFrontmatterExternalLinks: shouldEditFrontmatterExternalLinks,
25125
25360
  shouldIncludeMultiValueFrontmatterExternalLinks: shouldEditMultiValueFrontmatterExternalLinks
25126
- });
25361
+ }));
25127
25362
  },
25128
25363
  pathOrFile,
25129
25364
  ...options
25130
25365
  });
25131
25366
  }
25132
25367
  async function editLinksInContent(params) {
25133
- const { app, content: content3, linkConverter, shouldEditExternalLinks = false, shouldEditFrontmatterExternalLinks = false, shouldEditMultiValueFrontmatterExternalLinks = false } = params;
25368
+ const { app, content: content3, linkConverter, offsetRange, shouldEditExternalLinks = false, shouldEditFrontmatterExternalLinks = false, shouldEditMultiValueFrontmatterExternalLinks = false } = params;
25134
25369
  let { abortSignal } = params;
25135
25370
  abortSignal ??= abortSignalNever();
25136
25371
  abortSignal.throwIfAborted();
25372
+ if (offsetRange !== void 0) {
25373
+ validateOffsetRange(offsetRange);
25374
+ }
25137
25375
  const newContent = await applyContentChanges({
25138
25376
  abortSignal,
25139
25377
  changesProvider: async () => {
@@ -25143,15 +25381,16 @@ async function editLinksInContent(params) {
25143
25381
  shouldParseMultiValueFrontmatterExternalLinks: shouldEditMultiValueFrontmatterExternalLinks
25144
25382
  });
25145
25383
  abortSignal.throwIfAborted();
25146
- const changes = await getFileChanges({
25384
+ const changes = await getFileChanges(normalizeOptionalProperties({
25147
25385
  abortSignal,
25148
25386
  cache,
25149
25387
  isCanvasFileCache: false,
25150
25388
  linkConverter,
25389
+ offsetRange,
25151
25390
  shouldIncludeExternalLinks: shouldEditExternalLinks,
25152
25391
  shouldIncludeFrontmatterExternalLinks: shouldEditFrontmatterExternalLinks,
25153
25392
  shouldIncludeMultiValueFrontmatterExternalLinks: shouldEditMultiValueFrontmatterExternalLinks
25154
- });
25393
+ }));
25155
25394
  abortSignal.throwIfAborted();
25156
25395
  return changes;
25157
25396
  },
@@ -25596,6 +25835,7 @@ async function getFileChanges(params) {
25596
25835
  cache,
25597
25836
  isCanvasFileCache,
25598
25837
  linkConverter,
25838
+ offsetRange,
25599
25839
  shouldIncludeExternalLinks = false,
25600
25840
  shouldIncludeFrontmatterExternalLinks = false,
25601
25841
  shouldIncludeMultiValueFrontmatterExternalLinks = false
@@ -25611,8 +25851,16 @@ async function getFileChanges(params) {
25611
25851
  end: section.position.end.offset,
25612
25852
  start: section.position.start.offset
25613
25853
  }));
25854
+ const getFileChangesDebugger = getLibDebugger("Link:getFileChanges");
25614
25855
  for (const link2 of getLinks({ cache, shouldIncludeExternalLinks, shouldIncludeFrontmatterExternalLinks, shouldIncludeMultiValueFrontmatterExternalLinks })) {
25615
25856
  abortSignal.throwIfAborted();
25857
+ if (offsetRange !== void 0 && !isReferenceInOffsetRange(link2, offsetRange)) {
25858
+ getFileChangesDebugger(
25859
+ isReferenceCache(link2) ? "Skipping a link that is not fully contained in the offset range" : "Skipping a link that carries no position within the content, so it can never be in the offset range",
25860
+ { link: link2.original, offsetRange }
25861
+ );
25862
+ continue;
25863
+ }
25616
25864
  const newContent = await linkConverter(link2, abortSignal);
25617
25865
  abortSignal.throwIfAborted();
25618
25866
  if (newContent === void 0) {
@@ -25739,6 +25987,14 @@ function shouldUseWikilinkStyle(params) {
25739
25987
  }
25740
25988
  }
25741
25989
  }
25990
+ function validateOffsetRange(offsetRange) {
25991
+ if (offsetRange.startOffset < 0) {
25992
+ throw new Error(`Invalid offset range: the start offset ${String(offsetRange.startOffset)} must not be negative.`);
25993
+ }
25994
+ if (offsetRange.endOffset < offsetRange.startOffset) {
25995
+ throw new Error(`Invalid offset range: the end offset ${String(offsetRange.endOffset)} must not be less than the start offset ${String(offsetRange.startOffset)}.`);
25996
+ }
25997
+ }
25742
25998
 
25743
25999
  // src/obsidian/backlink.ts
25744
26000
  async function renderBacklinksTable(dv, pathOrFiles) {
@@ -28603,8 +28859,10 @@ var PluginSettingsComponentBase = class extends ComponentEx {
28603
28859
  pluginSettingsClass;
28604
28860
  asyncEvents = new AsyncEvents();
28605
28861
  currentState;
28862
+ isLoadedFromFile = false;
28606
28863
  lastSavedState;
28607
28864
  legacySettingsConverters = [];
28865
+ loadedFromFileResolvers = [];
28608
28866
  propertyNames;
28609
28867
  validators = /* @__PURE__ */ new Map();
28610
28868
  /**
@@ -28702,6 +28960,7 @@ var PluginSettingsComponentBase = class extends ComponentEx {
28702
28960
  await this.saveToFileImpl();
28703
28961
  }
28704
28962
  } finally {
28963
+ this.markLoadedFromFile();
28705
28964
  await this.asyncEvents.triggerAsync("loadSettings", this.currentState, isInitialLoad);
28706
28965
  }
28707
28966
  }
@@ -28871,6 +29130,31 @@ var PluginSettingsComponentBase = class extends ComponentEx {
28871
29130
  }
28872
29131
  return result;
28873
29132
  }
29133
+ /**
29134
+ * Waits until the settings have been read from `data.json` at least once.
29135
+ *
29136
+ * Anything that reads a setting from outside this component has to wait for this, because until the first
29137
+ * {@link loadFromFile} completes {@link settings} still holds the DEFAULTS — reading it earlier answers
29138
+ * with a default rather than with what the user actually stored. That window is easy to miss, since it is
29139
+ * empty on a cold start (the workspace layout is not ready yet, so nothing has run) but wide open on a
29140
+ * runtime enable from the Community Plugins tab or a re-enable after an update, where a layout-ready
29141
+ * handler fires immediately while this component's own async load is still in flight.
29142
+ *
29143
+ * Resolves immediately once the settings have loaded, so a caller that arrives late is not stranded
29144
+ * waiting for an event that has already been raised. Later reloads (an external `data.json` change) do
29145
+ * not reset it — the question it answers is whether the settings have EVER been read, not whether the
29146
+ * most recent read has finished.
29147
+ *
29148
+ * @returns A {@link Promise} that resolves once the settings have been loaded from the file.
29149
+ */
29150
+ whenLoadedFromFile() {
29151
+ if (this.isLoadedFromFile) {
29152
+ return noopAsync();
29153
+ }
29154
+ return new Promise((resolve2) => {
29155
+ this.loadedFromFileResolvers.push(resolve2);
29156
+ });
29157
+ }
28874
29158
  /**
28875
29159
  * Gets the transformer.
28876
29160
  *
@@ -28973,6 +29257,13 @@ var PluginSettingsComponentBase = class extends ComponentEx {
28973
29257
  }
28974
29258
  return this.propertyNames.includes(property);
28975
29259
  }
29260
+ markLoadedFromFile() {
29261
+ this.isLoadedFromFile = true;
29262
+ const resolvers = this.loadedFromFileResolvers.splice(0);
29263
+ for (const resolve2 of resolvers) {
29264
+ resolve2();
29265
+ }
29266
+ }
28976
29267
  async rawRecordToSettings(rawRecord) {
28977
29268
  rawRecord = this.getTransformer().transformObjectRecursively(rawRecord);
28978
29269
  await this.onLoadRecord(rawRecord);
@@ -29077,6 +29368,7 @@ var PluginSuggestionComponent = class extends ComponentEx {
29077
29368
  app;
29078
29369
  isSuggestionDeclined;
29079
29370
  pluginNoticeComponent;
29371
+ pluginSettingsComponent;
29080
29372
  reason;
29081
29373
  setSuggestionDeclined;
29082
29374
  suggestedPluginId;
@@ -29090,6 +29382,7 @@ var PluginSuggestionComponent = class extends ComponentEx {
29090
29382
  super();
29091
29383
  this.app = params.app;
29092
29384
  this.pluginNoticeComponent = params.pluginNoticeComponent;
29385
+ this.pluginSettingsComponent = params.pluginSettingsComponent;
29093
29386
  this.reason = params.reason;
29094
29387
  this.suggestedPluginId = params.suggestedPluginId;
29095
29388
  this.suggestedPluginName = params.suggestedPluginName;
@@ -29142,15 +29435,27 @@ var PluginSuggestionComponent = class extends ComponentEx {
29142
29435
  }));
29143
29436
  }
29144
29437
  /**
29145
- * Loads the component, showing the suggestion notice once the layout is ready.
29438
+ * Loads the component, showing the suggestion notice once the layout is ready AND the host's settings
29439
+ * have been read from disk.
29146
29440
  *
29147
- * The wait matters: plugins load in an unspecified order, so the suggested plugin may well be enabled
29148
- * a moment after this one. Checking before the layout is ready would suggest installing something the
29149
- * user already has.
29441
+ * Both waits matter, and neither implies the other:
29442
+ *
29443
+ * - Layout-ready, because plugins load in an unspecified order, so the suggested plugin may well be
29444
+ * enabled a moment after this one. Checking earlier would suggest installing something the user
29445
+ * already has.
29446
+ * - Settings-loaded, because {@link PluginSuggestionComponentConstructorParams.isSuggestionDeclined}
29447
+ * reads a setting of the host, and the host's settings component is a SIBLING whose own async load is
29448
+ * still in flight here. On a layout that is already ready — a runtime enable from the Community
29449
+ * Plugins tab, or a re-enable after an update — the layout-ready callback fires immediately, so the
29450
+ * read would see the default `false` and ask again a user who has already declined.
29150
29451
  */
29151
29452
  onload() {
29152
29453
  this.addChild(
29153
- new CallbackLayoutReadyComponent(this.app, () => {
29454
+ new CallbackLayoutReadyComponent(this.app, async () => {
29455
+ await this.pluginSettingsComponent.whenLoadedFromFile();
29456
+ if (this.isUnloaded()) {
29457
+ return;
29458
+ }
29154
29459
  this.showSuggestionNotice();
29155
29460
  })
29156
29461
  );
@@ -29652,145 +29957,24 @@ var ResourceLockEventsComponent = class extends ComponentEx {
29652
29957
  }));
29653
29958
  }
29654
29959
  };
29655
- var ResourceLockMutationBlockerComponent = class extends MonkeyAroundComponent {
29656
- shouldBlockMutation;
29657
- constructor(params) {
29658
- super();
29659
- this.shouldBlockMutation = params.shouldBlockMutation;
29660
- }
29661
- onload() {
29662
- super.onload();
29663
- this.registerMethodPatch({
29664
- $object: import_obsidian119.Vault.prototype,
29665
- methodName: "append",
29666
- patchHandler: ({ fallback, originalArguments: [file] }) => {
29667
- this.assertNotBlocked([file.path]);
29668
- return fallback();
29669
- }
29670
- });
29671
- this.registerMethodPatch({
29672
- $object: import_obsidian119.Vault.prototype,
29673
- methodName: "copy",
29674
- patchHandler: ({ fallback, originalArguments: [, newPath] }) => {
29675
- this.assertNotBlocked([newPath]);
29676
- return fallback();
29677
- }
29678
- });
29679
- this.registerMethodPatch({
29680
- $object: import_obsidian119.Vault.prototype,
29681
- methodName: "create",
29682
- patchHandler: ({ fallback, originalArguments: [path] }) => {
29683
- this.assertNotBlocked([path]);
29684
- return fallback();
29685
- }
29686
- });
29687
- this.registerMethodPatch({
29688
- $object: import_obsidian119.Vault.prototype,
29689
- methodName: "createBinary",
29690
- patchHandler: ({ fallback, originalArguments: [path] }) => {
29691
- this.assertNotBlocked([path]);
29692
- return fallback();
29693
- }
29694
- });
29695
- this.registerMethodPatch({
29696
- $object: import_obsidian119.Vault.prototype,
29697
- methodName: "createFolder",
29698
- patchHandler: ({ fallback, originalArguments: [path] }) => {
29699
- this.assertNotBlocked([path]);
29700
- return fallback();
29701
- }
29702
- });
29703
- this.registerMethodPatch({
29704
- $object: import_obsidian119.Vault.prototype,
29705
- methodName: "delete",
29706
- patchHandler: ({ fallback, originalArguments: [file] }) => {
29707
- this.assertNotBlocked([file.path]);
29708
- return fallback();
29709
- }
29710
- });
29711
- this.registerMethodPatch({
29712
- $object: import_obsidian119.Vault.prototype,
29713
- methodName: "modify",
29714
- patchHandler: ({ fallback, originalArguments: [file] }) => {
29715
- this.assertNotBlocked([file.path]);
29716
- return fallback();
29717
- }
29718
- });
29719
- this.registerMethodPatch({
29720
- $object: import_obsidian119.Vault.prototype,
29721
- methodName: "modifyBinary",
29722
- patchHandler: ({ fallback, originalArguments: [file] }) => {
29723
- this.assertNotBlocked([file.path]);
29724
- return fallback();
29725
- }
29726
- });
29727
- this.registerMethodPatch({
29728
- $object: import_obsidian119.Vault.prototype,
29729
- methodName: "process",
29730
- patchHandler: ({ fallback, originalArguments: [file] }) => {
29731
- this.assertNotBlocked([file.path]);
29732
- return fallback();
29733
- }
29734
- });
29735
- this.registerMethodPatch({
29736
- $object: import_obsidian119.Vault.prototype,
29737
- methodName: "rename",
29738
- patchHandler: ({ fallback, originalArguments: [file, newPath] }) => {
29739
- this.assertNotBlocked([file.path, newPath]);
29740
- return fallback();
29741
- }
29742
- });
29743
- this.registerMethodPatch({
29744
- $object: import_obsidian119.Vault.prototype,
29745
- methodName: "trash",
29746
- patchHandler: ({ fallback, originalArguments: [file] }) => {
29747
- this.assertNotBlocked([file.path]);
29748
- return fallback();
29749
- }
29750
- });
29751
- this.registerMethodPatch({
29752
- $object: import_obsidian119.FileManager.prototype,
29753
- methodName: "renameFile",
29754
- patchHandler: ({ fallback, originalArguments: [file, newPath] }) => {
29755
- this.assertNotBlocked([file.path, newPath]);
29756
- return fallback();
29757
- }
29758
- });
29759
- this.registerMethodPatch({
29760
- $object: import_obsidian119.FileManager.prototype,
29761
- methodName: "trashFile",
29762
- patchHandler: ({ fallback, originalArguments: [file] }) => {
29763
- this.assertNotBlocked([file.path]);
29764
- return fallback();
29765
- }
29766
- });
29767
- }
29768
- assertNotBlocked(paths) {
29769
- for (const path of paths) {
29770
- if (this.shouldBlockMutation(path)) {
29771
- throw new ResourceLockedError(path);
29772
- }
29773
- }
29774
- }
29775
- };
29776
- var ResourceLockManager = class {
29777
- beeper = new Beeper();
29778
- // The inner sets are mutable so a rename can re-key the paths of an in-flight bypass scope in place;
29779
- // The scope's `Disposable` deletes by set identity, so mutating the contents cannot orphan it.
29780
- bypassPathSets = /* @__PURE__ */ new Set();
29781
- eventsComponent = null;
29782
- indicatorsByView = /* @__PURE__ */ new Map();
29783
- lockEntriesByPath = /* @__PURE__ */ new Map();
29784
- mutationBlockerComponent = null;
29785
- statusBarItemEl = null;
29786
- bypass(app, pathsOrFiles) {
29787
- const bypassedPaths = new Set(pathsOrFiles.map((pathOrFile) => getPath2(app, pathOrFile)));
29788
- this.bypassPathSets.add(bypassedPaths);
29789
- return new CallbackDisposable({
29790
- callback: () => {
29791
- this.bypassPathSets.delete(bypassedPaths);
29792
- },
29793
- multipleDisposeBehavior: 1 /* Ignore */
29960
+ var ResourceLockManager = class {
29961
+ beeper = new Beeper();
29962
+ // The inner sets are mutable so a rename can re-key the paths of an in-flight bypass scope in place;
29963
+ // The scope's `Disposable` deletes by set identity, so mutating the contents cannot orphan it.
29964
+ bypassPathSets = /* @__PURE__ */ new Set();
29965
+ eventsComponent = null;
29966
+ indicatorsByView = /* @__PURE__ */ new Map();
29967
+ lockEntriesByPath = /* @__PURE__ */ new Map();
29968
+ mutationBlockerComponent = null;
29969
+ statusBarItemEl = null;
29970
+ bypass(app, pathsOrFiles) {
29971
+ const bypassedPaths = new Set(pathsOrFiles.map((pathOrFile) => getPath2(app, pathOrFile)));
29972
+ this.bypassPathSets.add(bypassedPaths);
29973
+ return new CallbackDisposable({
29974
+ callback: () => {
29975
+ this.bypassPathSets.delete(bypassedPaths);
29976
+ },
29977
+ multipleDisposeBehavior: 1 /* Ignore */
29794
29978
  });
29795
29979
  }
29796
29980
  /**
@@ -30367,6 +30551,127 @@ ${entry.operationName}`;
30367
30551
  }, { once: true });
30368
30552
  }
30369
30553
  };
30554
+ var ResourceLockMutationBlockerComponent = class extends MonkeyAroundComponent {
30555
+ shouldBlockMutation;
30556
+ constructor(params) {
30557
+ super();
30558
+ this.shouldBlockMutation = params.shouldBlockMutation;
30559
+ }
30560
+ onload() {
30561
+ super.onload();
30562
+ this.registerMethodPatch({
30563
+ $object: import_obsidian119.Vault.prototype,
30564
+ methodName: "append",
30565
+ patchHandler: ({ fallback, originalArguments: [file] }) => {
30566
+ this.assertNotBlocked([file.path]);
30567
+ return fallback();
30568
+ }
30569
+ });
30570
+ this.registerMethodPatch({
30571
+ $object: import_obsidian119.Vault.prototype,
30572
+ methodName: "copy",
30573
+ patchHandler: ({ fallback, originalArguments: [, newPath] }) => {
30574
+ this.assertNotBlocked([newPath]);
30575
+ return fallback();
30576
+ }
30577
+ });
30578
+ this.registerMethodPatch({
30579
+ $object: import_obsidian119.Vault.prototype,
30580
+ methodName: "create",
30581
+ patchHandler: ({ fallback, originalArguments: [path] }) => {
30582
+ this.assertNotBlocked([path]);
30583
+ return fallback();
30584
+ }
30585
+ });
30586
+ this.registerMethodPatch({
30587
+ $object: import_obsidian119.Vault.prototype,
30588
+ methodName: "createBinary",
30589
+ patchHandler: ({ fallback, originalArguments: [path] }) => {
30590
+ this.assertNotBlocked([path]);
30591
+ return fallback();
30592
+ }
30593
+ });
30594
+ this.registerMethodPatch({
30595
+ $object: import_obsidian119.Vault.prototype,
30596
+ methodName: "createFolder",
30597
+ patchHandler: ({ fallback, originalArguments: [path] }) => {
30598
+ this.assertNotBlocked([path]);
30599
+ return fallback();
30600
+ }
30601
+ });
30602
+ this.registerMethodPatch({
30603
+ $object: import_obsidian119.Vault.prototype,
30604
+ methodName: "delete",
30605
+ patchHandler: ({ fallback, originalArguments: [file] }) => {
30606
+ this.assertNotBlocked([file.path]);
30607
+ return fallback();
30608
+ }
30609
+ });
30610
+ this.registerMethodPatch({
30611
+ $object: import_obsidian119.Vault.prototype,
30612
+ methodName: "modify",
30613
+ patchHandler: ({ fallback, originalArguments: [file] }) => {
30614
+ this.assertNotBlocked([file.path]);
30615
+ return fallback();
30616
+ }
30617
+ });
30618
+ this.registerMethodPatch({
30619
+ $object: import_obsidian119.Vault.prototype,
30620
+ methodName: "modifyBinary",
30621
+ patchHandler: ({ fallback, originalArguments: [file] }) => {
30622
+ this.assertNotBlocked([file.path]);
30623
+ return fallback();
30624
+ }
30625
+ });
30626
+ this.registerMethodPatch({
30627
+ $object: import_obsidian119.Vault.prototype,
30628
+ methodName: "process",
30629
+ patchHandler: ({ fallback, originalArguments: [file] }) => {
30630
+ this.assertNotBlocked([file.path]);
30631
+ return fallback();
30632
+ }
30633
+ });
30634
+ this.registerMethodPatch({
30635
+ $object: import_obsidian119.Vault.prototype,
30636
+ methodName: "rename",
30637
+ patchHandler: ({ fallback, originalArguments: [file, newPath] }) => {
30638
+ this.assertNotBlocked([file.path, newPath]);
30639
+ return fallback();
30640
+ }
30641
+ });
30642
+ this.registerMethodPatch({
30643
+ $object: import_obsidian119.Vault.prototype,
30644
+ methodName: "trash",
30645
+ patchHandler: ({ fallback, originalArguments: [file] }) => {
30646
+ this.assertNotBlocked([file.path]);
30647
+ return fallback();
30648
+ }
30649
+ });
30650
+ this.registerMethodPatch({
30651
+ $object: import_obsidian119.FileManager.prototype,
30652
+ methodName: "renameFile",
30653
+ patchHandler: ({ fallback, originalArguments: [file, newPath] }) => {
30654
+ this.assertNotBlocked([file.path, newPath]);
30655
+ return fallback();
30656
+ }
30657
+ });
30658
+ this.registerMethodPatch({
30659
+ $object: import_obsidian119.FileManager.prototype,
30660
+ methodName: "trashFile",
30661
+ patchHandler: ({ fallback, originalArguments: [file] }) => {
30662
+ this.assertNotBlocked([file.path]);
30663
+ return fallback();
30664
+ }
30665
+ });
30666
+ }
30667
+ assertNotBlocked(paths) {
30668
+ for (const path of paths) {
30669
+ if (this.shouldBlockMutation(path)) {
30670
+ throw new ResourceLockedError(path);
30671
+ }
30672
+ }
30673
+ }
30674
+ };
30370
30675
  var ResourceLockComponent = class extends ComponentEx {
30371
30676
  /**
30372
30677
  * The Obsidian app instance.
@@ -30626,43 +30931,6 @@ function isGoneFromParent(result) {
30626
30931
  init_component_ex();
30627
30932
  init_monkey_around_component();
30628
30933
  var PATCH_TOKEN = /* @__PURE__ */ Symbol.for("renameDeleteHandler");
30629
- var SettingsManager = class {
30630
- renameDeleteHandlersMap;
30631
- constructor() {
30632
- this.renameDeleteHandlersMap = getObsidianDevUtilsState("renameDeleteHandlersMap", /* @__PURE__ */ new Map()).value;
30633
- }
30634
- getSettings() {
30635
- const settingsBuilders = [...this.renameDeleteHandlersMap.values()].reverse();
30636
- const settings = {};
30637
- settings.isNote = (path) => isNote(path);
30638
- settings.isPathIgnored = () => false;
30639
- for (const settingsBuilder of settingsBuilders) {
30640
- const newSettings = settingsBuilder();
30641
- settings.shouldDeleteConflictingAttachments ||= newSettings.shouldDeleteConflictingAttachments ?? false;
30642
- if (newSettings.emptyFolderBehavior) {
30643
- settings.emptyFolderBehavior ??= newSettings.emptyFolderBehavior;
30644
- }
30645
- settings.shouldHandleDeletions ||= newSettings.shouldHandleDeletions ?? false;
30646
- settings.shouldHandleRenames ||= newSettings.shouldHandleRenames ?? false;
30647
- settings.shouldRenameAttachmentFiles ||= newSettings.shouldRenameAttachmentFiles ?? false;
30648
- settings.shouldRenameAttachmentFolder ||= newSettings.shouldRenameAttachmentFolder ?? false;
30649
- settings.shouldUpdateFileNameAliases ||= newSettings.shouldUpdateFileNameAliases ?? false;
30650
- if (newSettings.getRescuePath) {
30651
- settings.getRescuePath ??= newSettings.getRescuePath;
30652
- }
30653
- const isPathIgnored = settings.isPathIgnored;
30654
- settings.isPathIgnored = (path) => isPathIgnored(path) || (newSettings.isPathIgnored?.(path) ?? false);
30655
- const currentIsNote = settings.isNote;
30656
- settings.isNote = (path) => currentIsNote(path) && (newSettings.isNote?.(path) ?? true);
30657
- }
30658
- settings.emptyFolderBehavior ??= "Keep" /* Keep */;
30659
- return settings;
30660
- }
30661
- isNoteEx(path) {
30662
- const settings = this.getSettings();
30663
- return settings.isNote?.(path) ?? false;
30664
- }
30665
- };
30666
30934
  var DeleteHandler = class {
30667
30935
  abortSignal;
30668
30936
  app;
@@ -31516,6 +31784,43 @@ var RenameMap = class {
31516
31784
  }
31517
31785
  }
31518
31786
  };
31787
+ var SettingsManager = class {
31788
+ renameDeleteHandlersMap;
31789
+ constructor() {
31790
+ this.renameDeleteHandlersMap = getObsidianDevUtilsState("renameDeleteHandlersMap", /* @__PURE__ */ new Map()).value;
31791
+ }
31792
+ getSettings() {
31793
+ const settingsBuilders = [...this.renameDeleteHandlersMap.values()].reverse();
31794
+ const settings = {};
31795
+ settings.isNote = (path) => isNote(path);
31796
+ settings.isPathIgnored = () => false;
31797
+ for (const settingsBuilder of settingsBuilders) {
31798
+ const newSettings = settingsBuilder();
31799
+ settings.shouldDeleteConflictingAttachments ||= newSettings.shouldDeleteConflictingAttachments ?? false;
31800
+ if (newSettings.emptyFolderBehavior) {
31801
+ settings.emptyFolderBehavior ??= newSettings.emptyFolderBehavior;
31802
+ }
31803
+ settings.shouldHandleDeletions ||= newSettings.shouldHandleDeletions ?? false;
31804
+ settings.shouldHandleRenames ||= newSettings.shouldHandleRenames ?? false;
31805
+ settings.shouldRenameAttachmentFiles ||= newSettings.shouldRenameAttachmentFiles ?? false;
31806
+ settings.shouldRenameAttachmentFolder ||= newSettings.shouldRenameAttachmentFolder ?? false;
31807
+ settings.shouldUpdateFileNameAliases ||= newSettings.shouldUpdateFileNameAliases ?? false;
31808
+ if (newSettings.getRescuePath) {
31809
+ settings.getRescuePath ??= newSettings.getRescuePath;
31810
+ }
31811
+ const isPathIgnored = settings.isPathIgnored;
31812
+ settings.isPathIgnored = (path) => isPathIgnored(path) || (newSettings.isPathIgnored?.(path) ?? false);
31813
+ const currentIsNote = settings.isNote;
31814
+ settings.isNote = (path) => currentIsNote(path) && (newSettings.isNote?.(path) ?? true);
31815
+ }
31816
+ settings.emptyFolderBehavior ??= "Keep" /* Keep */;
31817
+ return settings;
31818
+ }
31819
+ isNoteEx(path) {
31820
+ const settings = this.getSettings();
31821
+ return settings.isNote?.(path) ?? false;
31822
+ }
31823
+ };
31519
31824
  var RenameDeleteHandlerComponent = class extends ComponentEx {
31520
31825
  /**
31521
31826
  * The abort signal component whose signal cancels in-flight rename operations.
@@ -32113,142 +32418,15 @@ function showSandboxNotice(app, demoedPluginId) {
32113
32418
  }
32114
32419
 
32115
32420
  // src/__merged.ts
32421
+ init_demo_vault_naming();
32116
32422
  init_desktop_demo_vault_opener();
32117
32423
 
32118
- // src/obsidian/desktop-trusted-input.ts
32119
- var desktop_trusted_input_exports = {};
32120
- __export(desktop_trusted_input_exports, {
32121
- clickElement: () => clickElement,
32122
- clickMouse: () => clickMouse,
32123
- hoverElement: () => hoverElement,
32124
- moveMouse: () => moveMouse,
32125
- pressKey: () => pressKey,
32126
- typeIntoEditor: () => typeIntoEditor,
32127
- unhoverElement: () => unhoverElement
32128
- });
32129
- var import_obsidian123 = require("obsidian");
32130
- init_type_guards();
32131
- var INPUT_POLL_INTERVAL_IN_MILLISECONDS = 50;
32132
- var INPUT_TIMEOUT_IN_MILLISECONDS = 5e3;
32133
- var CENTER_DIVISOR = 2;
32134
- var SINGLE_CLICK_COUNT = 1;
32135
- function clickElement(params) {
32136
- const { button = "left", element, modifiers = [] } = params;
32137
- const rect = element.getBoundingClientRect();
32138
- clickMouse({
32139
- button,
32140
- modifiers,
32141
- x: rect.left + rect.width / CENTER_DIVISOR,
32142
- y: rect.top + rect.height / CENTER_DIVISOR
32143
- });
32144
- }
32145
- function clickMouse(params) {
32146
- const { button = "left", modifiers = [], x, y } = params;
32147
- const electronModifiers = toElectronModifiers(modifiers);
32148
- const roundedX = Math.round(x);
32149
- const roundedY = Math.round(y);
32150
- const webContents = getWebContents();
32151
- webContents.sendInputEvent({ modifiers: electronModifiers, type: "mouseMove", x: roundedX, y: roundedY });
32152
- webContents.sendInputEvent({
32153
- button,
32154
- clickCount: SINGLE_CLICK_COUNT,
32155
- modifiers: electronModifiers,
32156
- type: "mouseDown",
32157
- x: roundedX,
32158
- y: roundedY
32159
- });
32160
- webContents.sendInputEvent({
32161
- button,
32162
- clickCount: SINGLE_CLICK_COUNT,
32163
- modifiers: electronModifiers,
32164
- type: "mouseUp",
32165
- x: roundedX,
32166
- y: roundedY
32167
- });
32168
- }
32169
- async function hoverElement(params) {
32170
- const { element } = params;
32171
- const rect = element.getBoundingClientRect();
32172
- moveMouse({ x: rect.left + rect.width / CENTER_DIVISOR, y: rect.top + rect.height / CENTER_DIVISOR });
32173
- const startTime = Date.now();
32174
- while (!element.matches(":hover") && Date.now() - startTime < INPUT_TIMEOUT_IN_MILLISECONDS) {
32175
- await sleep(INPUT_POLL_INTERVAL_IN_MILLISECONDS);
32176
- }
32177
- }
32178
- function moveMouse(params) {
32179
- getWebContents().sendInputEvent({ type: "mouseMove", x: Math.round(params.x), y: Math.round(params.y) });
32180
- }
32181
- function pressKey(params) {
32182
- const { key, modifiers = [] } = params;
32183
- const electronModifiers = toElectronModifiers(modifiers);
32184
- const webContents = getWebContents();
32185
- webContents.sendInputEvent({ keyCode: key, modifiers: electronModifiers, type: "keyDown" });
32186
- webContents.sendInputEvent({ keyCode: key, modifiers: electronModifiers, type: "char" });
32187
- webContents.sendInputEvent({ keyCode: key, modifiers: electronModifiers, type: "keyUp" });
32188
- }
32189
- async function typeIntoEditor(params) {
32190
- const FOCUS_SETTLE_DELAY_IN_MILLISECONDS = 300;
32191
- const { editor, text: text4 } = params;
32192
- const valueBeforeTyping = editor.getValue();
32193
- editor.focus();
32194
- const lastLine = editor.lastLine();
32195
- editor.setCursor(lastLine, editor.getLine(lastLine).length);
32196
- await sleep(FOCUS_SETTLE_DELAY_IN_MILLISECONDS);
32197
- for (const char of text4) {
32198
- pressKey({ key: char });
32199
- }
32200
- const startTime = Date.now();
32201
- while (editor.getValue() === valueBeforeTyping && Date.now() - startTime < INPUT_TIMEOUT_IN_MILLISECONDS) {
32202
- await sleep(INPUT_POLL_INTERVAL_IN_MILLISECONDS);
32203
- }
32204
- }
32205
- async function unhoverElement(params) {
32206
- const OUTSIDE_OFFSET_IN_PIXELS = 1;
32207
- const { element } = params;
32208
- const rect = element.getBoundingClientRect();
32209
- const x = rect.left >= OUTSIDE_OFFSET_IN_PIXELS ? rect.left - OUTSIDE_OFFSET_IN_PIXELS : rect.right + OUTSIDE_OFFSET_IN_PIXELS;
32210
- const y = rect.top + rect.height / CENTER_DIVISOR;
32211
- moveMouse({ x, y });
32212
- const startTime = Date.now();
32213
- while (element.matches(":hover") && Date.now() - startTime < INPUT_TIMEOUT_IN_MILLISECONDS) {
32214
- await sleep(INPUT_POLL_INTERVAL_IN_MILLISECONDS);
32215
- }
32216
- }
32217
- function getWebContents() {
32218
- return window.electron.remote.getCurrentWebContents();
32219
- }
32220
- function toElectronModifiers(modifiers) {
32221
- const isMacOS = import_obsidian123.Platform.isMacOS;
32222
- return modifiers.map((modifier) => {
32223
- switch (modifier) {
32224
- case "Alt": {
32225
- return "alt";
32226
- }
32227
- case "Ctrl": {
32228
- return "control";
32229
- }
32230
- case "Meta": {
32231
- return "meta";
32232
- }
32233
- case "Mod": {
32234
- return isMacOS ? "meta" : "control";
32235
- }
32236
- case "Shift": {
32237
- return "shift";
32238
- }
32239
- default: {
32240
- return assertNever(modifier);
32241
- }
32242
- }
32243
- });
32244
- }
32245
-
32246
32424
  // src/obsidian/editor-extension-registrar.ts
32247
32425
  var editor_extension_registrar_exports = {};
32248
32426
  __export(editor_extension_registrar_exports, {
32249
32427
  PluginEditorExtensionRegistrar: () => PluginEditorExtensionRegistrar
32250
32428
  });
32251
- var import_obsidian124 = require("obsidian");
32429
+ var import_obsidian123 = require("obsidian");
32252
32430
  var PluginEditorExtensionRegistrar = class {
32253
32431
  /**
32254
32432
  * Creates a new instance of the {@link PluginEditorExtensionRegistrar} class.
@@ -32274,7 +32452,7 @@ var editor_suggest_registrar_exports = {};
32274
32452
  __export(editor_suggest_registrar_exports, {
32275
32453
  PluginEditorSuggestRegistrar: () => PluginEditorSuggestRegistrar
32276
32454
  });
32277
- var import_obsidian125 = require("obsidian");
32455
+ var import_obsidian124 = require("obsidian");
32278
32456
  var PluginEditorSuggestRegistrar = class {
32279
32457
  /**
32280
32458
  * Creates a new instance of the {@link PluginEditorSuggestRegistrar} class.
@@ -32300,7 +32478,7 @@ var extensions_registrar_exports = {};
32300
32478
  __export(extensions_registrar_exports, {
32301
32479
  PluginExtensionsRegistrar: () => PluginExtensionsRegistrar
32302
32480
  });
32303
- var import_obsidian126 = require("obsidian");
32481
+ var import_obsidian125 = require("obsidian");
32304
32482
  var PluginExtensionsRegistrar = class {
32305
32483
  /**
32306
32484
  * Creates a new instance of the {@link PluginExtensionsRegistrar} class.
@@ -32329,7 +32507,7 @@ __export(folder_note_exports, {
32329
32507
  resolveFolderNote: () => resolveFolderNote,
32330
32508
  resolveFolderNoteConfig: () => resolveFolderNoteConfig
32331
32509
  });
32332
- var import_obsidian127 = require("obsidian");
32510
+ var import_obsidian126 = require("obsidian");
32333
32511
  init_path();
32334
32512
  init_string();
32335
32513
  var FolderNoteLocation = /* @__PURE__ */ ((FolderNoteLocation2) => {
@@ -32363,7 +32541,7 @@ function resolveFolderNote(params) {
32363
32541
  return null;
32364
32542
  }
32365
32543
  for (const extension2 of config.extensions) {
32366
- const file = app.vault.getFileByPath((0, import_obsidian127.normalizePath)(join(parentFolderPath2, `${noteName}.${extension2}`)));
32544
+ const file = app.vault.getFileByPath((0, import_obsidian126.normalizePath)(join(parentFolderPath2, `${noteName}.${extension2}`)));
32367
32545
  if (file) {
32368
32546
  return file;
32369
32547
  }
@@ -32450,7 +32628,7 @@ var hover_link_source_registrar_exports = {};
32450
32628
  __export(hover_link_source_registrar_exports, {
32451
32629
  PluginHoverLinkSourceRegistrar: () => PluginHoverLinkSourceRegistrar
32452
32630
  });
32453
- var import_obsidian128 = require("obsidian");
32631
+ var import_obsidian127 = require("obsidian");
32454
32632
  var PluginHoverLinkSourceRegistrar = class {
32455
32633
  /**
32456
32634
  * Creates a new instance of the {@link PluginHoverLinkSourceRegistrar} class.
@@ -32498,7 +32676,7 @@ var loop_exports = {};
32498
32676
  __export(loop_exports, {
32499
32677
  loop: () => loop
32500
32678
  });
32501
- var import_obsidian129 = require("obsidian");
32679
+ var import_obsidian128 = require("obsidian");
32502
32680
  init_abort_controller();
32503
32681
  init_async();
32504
32682
  init_debug();
@@ -32921,7 +33099,7 @@ var markdown_post_processor_registrar_exports = {};
32921
33099
  __export(markdown_post_processor_registrar_exports, {
32922
33100
  PluginMarkdownPostProcessorRegistrar: () => PluginMarkdownPostProcessorRegistrar
32923
33101
  });
32924
- var import_obsidian130 = require("obsidian");
33102
+ var import_obsidian129 = require("obsidian");
32925
33103
  init_async();
32926
33104
  var PluginMarkdownPostProcessorRegistrar = class {
32927
33105
  /**
@@ -32968,7 +33146,7 @@ __export(markdown_exports, {
32968
33146
  renderInternalLink: () => renderInternalLink
32969
33147
  });
32970
33148
  init_i18next();
32971
- var import_obsidian131 = require("obsidian");
33149
+ var import_obsidian130 = require("obsidian");
32972
33150
  init_async();
32973
33151
  init_object_utils();
32974
33152
  init_monkey_around_component();
@@ -33052,21 +33230,21 @@ var LinkDomEventsHandlers = class {
33052
33230
  onExternalLinkClick($event, targetEl, linkText) {
33053
33231
  $event.preventDefault();
33054
33232
  if (!isUrl(linkText)) {
33055
- new import_obsidian131.Notice(t(($) => $.obsidianDevUtils.notices.failedToOpenUrl, { url: linkText }));
33233
+ new import_obsidian130.Notice(t(($) => $.obsidianDevUtils.notices.failedToOpenUrl, { url: linkText }));
33056
33234
  return;
33057
33235
  }
33058
- const modifierPaneType = import_obsidian131.Keymap.isModEvent($event);
33236
+ const modifierPaneType = import_obsidian130.Keymap.isModEvent($event);
33059
33237
  targetEl.win.open(linkText, typeof modifierPaneType === "boolean" ? "" : modifierPaneType);
33060
33238
  }
33061
33239
  onExternalLinkRightClick($event, targetEl, linkText) {
33062
- const menu = import_obsidian131.Menu.forEvent($event);
33240
+ const menu = import_obsidian130.Menu.forEvent($event);
33063
33241
  menu.addSections(EXTERNAL_LINK_MENU_SECTIONS);
33064
33242
  addCopyMenuItem(menu, targetEl);
33065
33243
  this.info.app.workspace.handleExternalLinkContextMenu(menu, linkText);
33066
33244
  }
33067
33245
  onInternalLinkClick($event, _targetEl, linkText) {
33068
33246
  $event.preventDefault();
33069
- invokeAsyncSafely(() => this.info.app.workspace.openLinkText(linkText, this.info.path, import_obsidian131.Keymap.isModEvent($event)));
33247
+ invokeAsyncSafely(() => this.info.app.workspace.openLinkText(linkText, this.info.path, import_obsidian130.Keymap.isModEvent($event)));
33070
33248
  }
33071
33249
  onInternalLinkDrag($event, _targetEl, linkText, title) {
33072
33250
  const dragManager = this.info.app.dragManager;
@@ -33083,7 +33261,7 @@ var LinkDomEventsHandlers = class {
33083
33261
  });
33084
33262
  }
33085
33263
  onInternalLinkRightClick($event, targetEl, linkText) {
33086
- const menu = import_obsidian131.Menu.forEvent($event);
33264
+ const menu = import_obsidian130.Menu.forEvent($event);
33087
33265
  menu.setParentElement(targetEl);
33088
33266
  menu.addSections(INTERNAL_LINK_MENU_SECTIONS);
33089
33267
  addCopyMenuItem(menu, targetEl);
@@ -33102,12 +33280,12 @@ async function fullRender(params) {
33102
33280
  if (params.component) {
33103
33281
  component = params.component;
33104
33282
  } else {
33105
- component = new import_obsidian131.Component();
33283
+ component = new import_obsidian130.Component();
33106
33284
  component.load();
33107
33285
  shouldUnloadComponent = true;
33108
33286
  }
33109
33287
  const _ = __using(_stack, component.addChild(new EmbedByExtensionMdPatchComponent(params.app.embedRegistry.embedByExtension)));
33110
- await import_obsidian131.MarkdownRenderer.render(params.app, params.markdown, params.el, sourcePath, component);
33288
+ await import_obsidian130.MarkdownRenderer.render(params.app, params.markdown, params.el, sourcePath, component);
33111
33289
  if (shouldUnloadComponent) {
33112
33290
  component.unload();
33113
33291
  }
@@ -33130,10 +33308,10 @@ async function markdownToHtml(params) {
33130
33308
  markdown,
33131
33309
  sourcePath
33132
33310
  } = params;
33133
- const component = new import_obsidian131.Component();
33311
+ const component = new import_obsidian130.Component();
33134
33312
  component.load();
33135
33313
  const renderDiv = createDiv();
33136
- await import_obsidian131.MarkdownRenderer.render(app, markdown, renderDiv, sourcePath ?? "", component);
33314
+ await import_obsidian130.MarkdownRenderer.render(app, markdown, renderDiv, sourcePath ?? "", component);
33137
33315
  const html2 = renderDiv.innerHTML;
33138
33316
  component.unload();
33139
33317
  return html2;
@@ -33144,7 +33322,7 @@ function registerLinkHandlers(params) {
33144
33322
  el,
33145
33323
  sourcePath
33146
33324
  } = params;
33147
- import_obsidian131.MarkdownPreviewRenderer.registerDomEvents(
33325
+ import_obsidian130.MarkdownPreviewRenderer.registerDomEvents(
33148
33326
  el,
33149
33327
  new LinkDomEventsHandlers(
33150
33328
  new FixedZIndexDomEventsHandlersInfo({
@@ -33239,7 +33417,7 @@ __export(alert_exports, {
33239
33417
  alert: () => alert
33240
33418
  });
33241
33419
  init_i18next();
33242
- var import_obsidian132 = require("obsidian");
33420
+ var import_obsidian131 = require("obsidian");
33243
33421
  init_css_class();
33244
33422
  init_modal();
33245
33423
  var AlertModal = class extends ModalBase {
@@ -33259,7 +33437,7 @@ var AlertModal = class extends ModalBase {
33259
33437
  onOpen() {
33260
33438
  this.titleEl.setText(this.title);
33261
33439
  this.contentEl.createEl("p", { text: this.message });
33262
- const okButton = new import_obsidian132.ButtonComponent(this.contentEl);
33440
+ const okButton = new import_obsidian131.ButtonComponent(this.contentEl);
33263
33441
  okButton.setButtonText(this.okButtonText);
33264
33442
  okButton.setCta();
33265
33443
  okButton.onClick(this.close.bind(this));
@@ -33280,7 +33458,7 @@ var minimizable_modal_exports = {};
33280
33458
  __export(minimizable_modal_exports, {
33281
33459
  MinimizableModal: () => MinimizableModal
33282
33460
  });
33283
- var import_obsidian133 = require("obsidian");
33461
+ var import_obsidian132 = require("obsidian");
33284
33462
  init_monkey_around_component();
33285
33463
  init_css_class();
33286
33464
  init_plugin_context();
@@ -33322,7 +33500,7 @@ var PeekLockComponent = class extends MonkeyAroundComponent {
33322
33500
  onload() {
33323
33501
  super.onload();
33324
33502
  this.registerMethodPatch({
33325
- $object: import_obsidian133.Modal.prototype,
33503
+ $object: import_obsidian132.Modal.prototype,
33326
33504
  methodName: "open",
33327
33505
  patchHandler: ({ fallback, originalThis }) => {
33328
33506
  blockOrFallback(originalThis, fallback);
@@ -33432,7 +33610,7 @@ var MinimizableModal = class {
33432
33610
  }
33433
33611
  createMinimizeButton() {
33434
33612
  const buttonEl = this.modal.modalEl.createEl("button", { cls: "minimize-button" /* MinimizeButton */ });
33435
- (0, import_obsidian133.setIcon)(buttonEl, MINIMIZE_ICON_ID);
33613
+ (0, import_obsidian132.setIcon)(buttonEl, MINIMIZE_ICON_ID);
33436
33614
  buttonEl.addEventListener("click", () => {
33437
33615
  this.minimize();
33438
33616
  });
@@ -33446,11 +33624,11 @@ var MinimizableModal = class {
33446
33624
  text: this.modal.titleEl.textContent
33447
33625
  });
33448
33626
  const restoreButtonEl = barEl.createEl("button", { cls: "restore-button" /* RestoreButton */ });
33449
- (0, import_obsidian133.setIcon)(restoreButtonEl, RESTORE_ICON_ID);
33627
+ (0, import_obsidian132.setIcon)(restoreButtonEl, RESTORE_ICON_ID);
33450
33628
  if (this.shouldShowCancelButton) {
33451
33629
  const cancelButtonEl = barEl.createEl("button", { cls: "cancel-button" /* CancelButton */ });
33452
- (0, import_obsidian133.setIcon)(cancelButtonEl, CANCEL_ICON_ID);
33453
- (0, import_obsidian133.setTooltip)(cancelButtonEl, "Cancel");
33630
+ (0, import_obsidian132.setIcon)(cancelButtonEl, CANCEL_ICON_ID);
33631
+ (0, import_obsidian132.setTooltip)(cancelButtonEl, "Cancel");
33454
33632
  cancelButtonEl.addEventListener("click", ($event) => {
33455
33633
  $event.stopPropagation();
33456
33634
  this.modal.close();
@@ -33589,7 +33767,7 @@ __export(modal_command_builder_exports, {
33589
33767
  ModalCommandBuilder: () => ModalCommandBuilder,
33590
33768
  ModalCommandsRenderMode: () => ModalCommandsRenderMode
33591
33769
  });
33592
- var import_obsidian134 = require("obsidian");
33770
+ var import_obsidian133 = require("obsidian");
33593
33771
  init_css_class();
33594
33772
  init_plugin_context();
33595
33773
  var KEYS_MAP = /* @__PURE__ */ new Map([
@@ -33666,7 +33844,7 @@ var ModalCommandBuilder = class {
33666
33844
  initButton: null,
33667
33845
  initInstruction: (purposeEl, scope) => {
33668
33846
  purposeEl.appendText(" ");
33669
- const dropdownComponent = new import_obsidian134.DropdownComponent(purposeEl);
33847
+ const dropdownComponent = new import_obsidian133.DropdownComponent(purposeEl);
33670
33848
  command.onInit(dropdownComponent);
33671
33849
  dropdownComponent.onChange((value) => {
33672
33850
  command.onChange(value);
@@ -33773,10 +33951,10 @@ var ModalCommandBuilder = class {
33773
33951
  return "ctrl";
33774
33952
  }
33775
33953
  case "Meta": {
33776
- return import_obsidian134.Platform.isMacOS ? "cmd" : "win";
33954
+ return import_obsidian133.Platform.isMacOS ? "cmd" : "win";
33777
33955
  }
33778
33956
  case "Mod": {
33779
- return import_obsidian134.Platform.isMacOS ? "cmd" : "ctrl";
33957
+ return import_obsidian133.Platform.isMacOS ? "cmd" : "ctrl";
33780
33958
  }
33781
33959
  case "Shift": {
33782
33960
  return "shift";
@@ -33814,7 +33992,7 @@ var ModalCommandBuilder = class {
33814
33992
  const buttonEl = stripEl.createEl("button", { type: "button" });
33815
33993
  addPluginCssClasses(buttonEl, "modal-command" /* ModalCommand */);
33816
33994
  buttonEl.createSpan({ text: entry.purpose });
33817
- if (!import_obsidian134.Platform.isMobile) {
33995
+ if (!import_obsidian133.Platform.isMobile) {
33818
33996
  const hotkeyEl = buttonEl.createSpan({ text: entry.commandText });
33819
33997
  addPluginCssClasses(hotkeyEl, "modal-command-hotkey" /* ModalCommandHotkey */);
33820
33998
  }
@@ -33904,7 +34082,7 @@ var prompt_exports = {};
33904
34082
  __export(prompt_exports, {
33905
34083
  prompt: () => prompt
33906
34084
  });
33907
- var import_obsidian135 = require("obsidian");
34085
+ var import_obsidian134 = require("obsidian");
33908
34086
  init_async();
33909
34087
  init_function();
33910
34088
  init_object_utils();
@@ -33939,7 +34117,7 @@ var PromptModal = class extends ModalBase {
33939
34117
  }
33940
34118
  onOpen() {
33941
34119
  this.titleEl.setText(this.title);
33942
- const textComponent = new import_obsidian135.TextComponent(this.contentEl);
34120
+ const textComponent = new import_obsidian134.TextComponent(this.contentEl);
33943
34121
  const inputEl = textComponent.inputEl;
33944
34122
  inputEl.setAttribute("spellcheck", String(isSpellcheckEnabled(this.app)));
33945
34123
  const validate = async (shouldReport) => {
@@ -33974,14 +34152,14 @@ var PromptModal = class extends ModalBase {
33974
34152
  inputEl.addEventListener("input", convertAsyncToSync(handleInput));
33975
34153
  inputEl.addEventListener("focus", convertAsyncToSync(handleFocus));
33976
34154
  invokeAsyncSafely(() => validate(false));
33977
- const okButton = new import_obsidian135.ButtonComponent(this.contentEl);
34155
+ const okButton = new import_obsidian134.ButtonComponent(this.contentEl);
33978
34156
  okButton.setButtonText(this.okButtonText);
33979
34157
  okButton.setCta();
33980
34158
  okButton.onClick((event) => {
33981
34159
  this.handleOk(event, textComponent);
33982
34160
  });
33983
34161
  okButton.setClass("ok-button" /* OkButton */);
33984
- const cancelButton = new import_obsidian135.ButtonComponent(this.contentEl);
34162
+ const cancelButton = new import_obsidian134.ButtonComponent(this.contentEl);
33985
34163
  cancelButton.setButtonText(this.cancelButtonText);
33986
34164
  cancelButton.onClick(this.close.bind(this));
33987
34165
  cancelButton.setClass("cancel-button" /* CancelButton */);
@@ -34016,11 +34194,11 @@ var select_item_exports = {};
34016
34194
  __export(select_item_exports, {
34017
34195
  selectItem: () => selectItem
34018
34196
  });
34019
- var import_obsidian136 = require("obsidian");
34197
+ var import_obsidian135 = require("obsidian");
34020
34198
  init_css_class();
34021
34199
  init_plugin_context();
34022
34200
  init_modal();
34023
- var ItemSelectModal = class extends import_obsidian136.FuzzySuggestModal {
34201
+ var ItemSelectModal = class extends import_obsidian135.FuzzySuggestModal {
34024
34202
  isSelected = false;
34025
34203
  items;
34026
34204
  itemTextFunction;
@@ -34345,10 +34523,10 @@ var pdf_exports = {};
34345
34523
  __export(pdf_exports, {
34346
34524
  printToPdf: () => printToPdf
34347
34525
  });
34348
- var import_obsidian137 = require("obsidian");
34526
+ var import_obsidian136 = require("obsidian");
34349
34527
  var ELECTRON_PRINT_TO_PDF_CHANNEL = "print-to-pdf";
34350
34528
  async function printToPdf(element, options) {
34351
- if (import_obsidian137.Platform.isMobile) {
34529
+ if (import_obsidian136.Platform.isMobile) {
34352
34530
  throw new Error("Printing to PDF is not supported on mobile devices.");
34353
34531
  }
34354
34532
  const printDiv = activeDocument.body.createDiv("print");
@@ -34381,7 +34559,7 @@ var plugin_cli_handler_registrar_exports = {};
34381
34559
  __export(plugin_cli_handler_registrar_exports, {
34382
34560
  PluginCliHandlerRegistrar: () => PluginCliHandlerRegistrar
34383
34561
  });
34384
- var import_obsidian138 = require("obsidian");
34562
+ var import_obsidian137 = require("obsidian");
34385
34563
  init_async();
34386
34564
  var PluginCliHandlerRegistrar = class {
34387
34565
  /**
@@ -34435,6 +34613,7 @@ var ObsidianPluginRepoPaths = /* @__PURE__ */ ((ObsidianPluginRepoPaths2) => {
34435
34613
  ObsidianPluginRepoPaths2["EslintConfigMts"] = "eslint.config.mts";
34436
34614
  ObsidianPluginRepoPaths2["EslintConfigTs"] = "eslint.config.ts";
34437
34615
  ObsidianPluginRepoPaths2["HotReload"] = ".hotreload";
34616
+ ObsidianPluginRepoPaths2["License"] = "LICENSE";
34438
34617
  ObsidianPluginRepoPaths2["MainCss"] = "main.css";
34439
34618
  ObsidianPluginRepoPaths2["MainJs"] = "main.js";
34440
34619
  ObsidianPluginRepoPaths2["MainTs"] = "main.ts";
@@ -34945,7 +35124,7 @@ __export(plugin_settings_tab_exports, {
34945
35124
  PluginSettingsTabBase: () => PluginSettingsTabBase,
34946
35125
  SAVE_TO_FILE_CONTEXT: () => SAVE_TO_FILE_CONTEXT
34947
35126
  });
34948
- var import_obsidian156 = require("obsidian");
35127
+ var import_obsidian155 = require("obsidian");
34949
35128
  init_async_events();
34950
35129
  init_async();
34951
35130
  init_function();
@@ -34983,7 +35162,7 @@ var text_based_component_exports = {};
34983
35162
  __export(text_based_component_exports, {
34984
35163
  getTextBasedComponentValue: () => getTextBasedComponentValue
34985
35164
  });
34986
- var import_obsidian139 = require("obsidian");
35165
+ var import_obsidian138 = require("obsidian");
34987
35166
  var AbstractTextComponentWrapper = class {
34988
35167
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- `unknown` doesn't work, getting compiler errors.
34989
35168
  constructor(abstractTextComponent) {
@@ -35005,7 +35184,7 @@ function getTextBasedComponentValue($unknown) {
35005
35184
  if (isTextBasedComponent($unknown)) {
35006
35185
  return $unknown;
35007
35186
  }
35008
- if ($unknown instanceof import_obsidian139.AbstractTextComponent) {
35187
+ if ($unknown instanceof import_obsidian138.AbstractTextComponent) {
35009
35188
  return new AbstractTextComponentWrapper($unknown);
35010
35189
  }
35011
35190
  return null;
@@ -35020,7 +35199,7 @@ var validator_component_exports = {};
35020
35199
  __export(validator_component_exports, {
35021
35200
  getValidatorComponent: () => getValidatorComponent
35022
35201
  });
35023
- var import_obsidian140 = require("obsidian");
35202
+ var import_obsidian139 = require("obsidian");
35024
35203
  init_css_class();
35025
35204
  init_plugin_context();
35026
35205
  var OverlayValidatorComponent = class {
@@ -35081,28 +35260,28 @@ function getValidatorComponent($unknown) {
35081
35260
  if (isValidatorComponent($unknown)) {
35082
35261
  return $unknown;
35083
35262
  }
35084
- if ($unknown instanceof import_obsidian140.ColorComponent) {
35263
+ if ($unknown instanceof import_obsidian139.ColorComponent) {
35085
35264
  return new ValidatorElementWrapper($unknown.colorPickerEl);
35086
35265
  }
35087
- if ($unknown instanceof import_obsidian140.DropdownComponent) {
35266
+ if ($unknown instanceof import_obsidian139.DropdownComponent) {
35088
35267
  return new ValidatorElementWrapper($unknown.selectEl);
35089
35268
  }
35090
- if ($unknown instanceof import_obsidian140.ProgressBarComponent) {
35269
+ if ($unknown instanceof import_obsidian139.ProgressBarComponent) {
35091
35270
  return new OverlayValidatorComponent($unknown.progressBar);
35092
35271
  }
35093
- if ($unknown instanceof import_obsidian140.SearchComponent) {
35272
+ if ($unknown instanceof import_obsidian139.SearchComponent) {
35094
35273
  return new ValidatorElementWrapper($unknown.inputEl);
35095
35274
  }
35096
- if ($unknown instanceof import_obsidian140.SliderComponent) {
35275
+ if ($unknown instanceof import_obsidian139.SliderComponent) {
35097
35276
  return new ValidatorElementWrapper($unknown.sliderEl);
35098
35277
  }
35099
- if ($unknown instanceof import_obsidian140.TextAreaComponent) {
35278
+ if ($unknown instanceof import_obsidian139.TextAreaComponent) {
35100
35279
  return new ValidatorElementWrapper($unknown.inputEl);
35101
35280
  }
35102
- if ($unknown instanceof import_obsidian140.TextComponent) {
35281
+ if ($unknown instanceof import_obsidian139.TextComponent) {
35103
35282
  return new ValidatorElementWrapper($unknown.inputEl);
35104
35283
  }
35105
- if ($unknown instanceof import_obsidian140.ToggleComponent) {
35284
+ if ($unknown instanceof import_obsidian139.ToggleComponent) {
35106
35285
  return new OverlayValidatorComponent($unknown.toggleEl);
35107
35286
  }
35108
35287
  return null;
@@ -35117,7 +35296,7 @@ __export(setting_ex_exports, {
35117
35296
  SettingEx: () => SettingEx,
35118
35297
  adoptSettingEx: () => adoptSettingEx
35119
35298
  });
35120
- var import_obsidian154 = require("obsidian");
35299
+ var import_obsidian153 = require("obsidian");
35121
35300
  init_object_utils();
35122
35301
 
35123
35302
  // src/obsidian/setting-components/checkbox-component.ts
@@ -35125,10 +35304,10 @@ var checkbox_component_exports = {};
35125
35304
  __export(checkbox_component_exports, {
35126
35305
  CheckboxComponent: () => CheckboxComponent
35127
35306
  });
35128
- var import_obsidian141 = require("obsidian");
35307
+ var import_obsidian140 = require("obsidian");
35129
35308
  init_css_class();
35130
35309
  init_plugin_context();
35131
- var CheckboxComponent = class extends import_obsidian141.ValueComponent {
35310
+ var CheckboxComponent = class extends import_obsidian140.ValueComponent {
35132
35311
  /**
35133
35312
  * An input element of the checkbox.
35134
35313
  */
@@ -35205,12 +35384,12 @@ var code_highlighter_component_exports = {};
35205
35384
  __export(code_highlighter_component_exports, {
35206
35385
  CodeHighlighterComponent: () => CodeHighlighterComponent
35207
35386
  });
35208
- var import_obsidian142 = require("obsidian");
35387
+ var import_obsidian141 = require("obsidian");
35209
35388
  init_array();
35210
35389
  init_async();
35211
35390
  init_css_class();
35212
35391
  init_plugin_context();
35213
- var CodeHighlighterComponent = class extends import_obsidian142.ValueComponent {
35392
+ var CodeHighlighterComponent = class extends import_obsidian141.ValueComponent {
35214
35393
  /**
35215
35394
  * An input element of the component.
35216
35395
  *
@@ -35252,7 +35431,7 @@ var CodeHighlighterComponent = class extends import_obsidian142.ValueComponent {
35252
35431
  addPluginCssClasses(containerEl, "code-highlighter-component" /* CodeHighlighterComponent */);
35253
35432
  const wrapper = containerEl.createDiv();
35254
35433
  addPluginCssClasses(wrapper, "setting-component-wrapper" /* SettingComponentWrapper */);
35255
- this.textAreaComponent = new import_obsidian142.TextAreaComponent(wrapper);
35434
+ this.textAreaComponent = new import_obsidian141.TextAreaComponent(wrapper);
35256
35435
  this.preEl = wrapper.createEl("pre", {
35257
35436
  attr: {
35258
35437
  tabIndex: "-1"
@@ -35445,7 +35624,7 @@ var date_component_exports = {};
35445
35624
  __export(date_component_exports, {
35446
35625
  DateComponent: () => DateComponent
35447
35626
  });
35448
- var import_obsidian144 = require("obsidian");
35627
+ var import_obsidian143 = require("obsidian");
35449
35628
  init_object_utils();
35450
35629
  init_css_class();
35451
35630
 
@@ -35460,10 +35639,10 @@ var typed_text_component_exports = {};
35460
35639
  __export(typed_text_component_exports, {
35461
35640
  TypedTextComponent: () => TypedTextComponent
35462
35641
  });
35463
- var import_obsidian143 = require("obsidian");
35642
+ var import_obsidian142 = require("obsidian");
35464
35643
  init_css_class();
35465
35644
  init_plugin_context();
35466
- var TypedTextComponent = class extends import_obsidian143.ValueComponent {
35645
+ var TypedTextComponent = class extends import_obsidian142.ValueComponent {
35467
35646
  /**
35468
35647
  * An input element of the component.
35469
35648
  */
@@ -35487,7 +35666,7 @@ var TypedTextComponent = class extends import_obsidian143.ValueComponent {
35487
35666
  */
35488
35667
  constructor(params) {
35489
35668
  super();
35490
- this.textComponent = new import_obsidian143.TextComponent(params.containerEl);
35669
+ this.textComponent = new import_obsidian142.TextComponent(params.containerEl);
35491
35670
  this.inputEl = this.textComponent.inputEl;
35492
35671
  this.inputEl.type = params.type;
35493
35672
  addPluginCssClasses(params.containerEl, params.cssClass);
@@ -35586,7 +35765,7 @@ var TypedRangeTextComponent = class extends TypedTextComponent {
35586
35765
  };
35587
35766
 
35588
35767
  // src/obsidian/setting-components/date-component.ts
35589
- var moment2 = extractDefaultExportInterop(import_obsidian144.moment);
35768
+ var moment2 = extractDefaultExportInterop(import_obsidian143.moment);
35590
35769
  var DATE_FORMAT = "YYYY-MM-DD";
35591
35770
  var DateComponent = class extends TypedRangeTextComponent {
35592
35771
  /**
@@ -35626,10 +35805,10 @@ var date_time_component_exports = {};
35626
35805
  __export(date_time_component_exports, {
35627
35806
  DateTimeComponent: () => DateTimeComponent
35628
35807
  });
35629
- var import_obsidian145 = require("obsidian");
35808
+ var import_obsidian144 = require("obsidian");
35630
35809
  init_object_utils();
35631
35810
  init_css_class();
35632
- var moment3 = extractDefaultExportInterop(import_obsidian145.moment);
35811
+ var moment3 = extractDefaultExportInterop(import_obsidian144.moment);
35633
35812
  var DATE_TIME_FORMAT = "YYYY-MM-DDTHH:mm";
35634
35813
  var DateTimeComponent = class extends TypedRangeTextComponent {
35635
35814
  /**
@@ -35769,10 +35948,10 @@ var month_component_exports = {};
35769
35948
  __export(month_component_exports, {
35770
35949
  MonthComponent: () => MonthComponent
35771
35950
  });
35772
- var import_obsidian146 = require("obsidian");
35951
+ var import_obsidian145 = require("obsidian");
35773
35952
  init_object_utils();
35774
35953
  init_css_class();
35775
- var moment4 = extractDefaultExportInterop(import_obsidian146.moment);
35954
+ var moment4 = extractDefaultExportInterop(import_obsidian145.moment);
35776
35955
  var DATE_FORMAT2 = "YYYY-MM";
35777
35956
  var MonthComponent = class extends TypedRangeTextComponent {
35778
35957
  /**
@@ -35820,10 +35999,10 @@ var multiple_dropdown_component_exports = {};
35820
35999
  __export(multiple_dropdown_component_exports, {
35821
36000
  MultipleDropdownComponent: () => MultipleDropdownComponent
35822
36001
  });
35823
- var import_obsidian147 = require("obsidian");
36002
+ var import_obsidian146 = require("obsidian");
35824
36003
  init_css_class();
35825
36004
  init_plugin_context();
35826
- var MultipleDropdownComponent = class extends import_obsidian147.ValueComponent {
36005
+ var MultipleDropdownComponent = class extends import_obsidian146.ValueComponent {
35827
36006
  /**
35828
36007
  * A select element of the component.
35829
36008
  *
@@ -35852,7 +36031,7 @@ var MultipleDropdownComponent = class extends import_obsidian147.ValueComponent
35852
36031
  */
35853
36032
  constructor(containerEl) {
35854
36033
  super();
35855
- this.dropdownComponent = new import_obsidian147.DropdownComponent(containerEl);
36034
+ this.dropdownComponent = new import_obsidian146.DropdownComponent(containerEl);
35856
36035
  this.dropdownComponent.selectEl.multiple = true;
35857
36036
  addPluginCssClasses(containerEl, "multiple-dropdown-component" /* MultipleDropdownComponent */);
35858
36037
  }
@@ -36025,10 +36204,10 @@ var multiple_text_component_exports = {};
36025
36204
  __export(multiple_text_component_exports, {
36026
36205
  MultipleTextComponent: () => MultipleTextComponent
36027
36206
  });
36028
- var import_obsidian148 = require("obsidian");
36207
+ var import_obsidian147 = require("obsidian");
36029
36208
  init_css_class();
36030
36209
  init_plugin_context();
36031
- var MultipleTextComponent = class extends import_obsidian148.ValueComponent {
36210
+ var MultipleTextComponent = class extends import_obsidian147.ValueComponent {
36032
36211
  /**
36033
36212
  * An input element of the component.
36034
36213
  *
@@ -36057,7 +36236,7 @@ var MultipleTextComponent = class extends import_obsidian148.ValueComponent {
36057
36236
  */
36058
36237
  constructor(containerEl) {
36059
36238
  super();
36060
- this.textAreaComponent = new import_obsidian148.TextAreaComponent(containerEl);
36239
+ this.textAreaComponent = new import_obsidian147.TextAreaComponent(containerEl);
36061
36240
  addPluginCssClasses(containerEl, "multiple-text-component" /* MultipleTextComponent */);
36062
36241
  }
36063
36242
  /**
@@ -36319,7 +36498,7 @@ var time_component_exports = {};
36319
36498
  __export(time_component_exports, {
36320
36499
  TimeComponent: () => TimeComponent
36321
36500
  });
36322
- var import_obsidian149 = require("obsidian");
36501
+ var import_obsidian148 = require("obsidian");
36323
36502
  init_css_class();
36324
36503
  var TimeComponent = class extends TypedRangeTextComponent {
36325
36504
  /**
@@ -36341,7 +36520,7 @@ var TimeComponent = class extends TypedRangeTextComponent {
36341
36520
  * @returns The date.
36342
36521
  */
36343
36522
  valueFromString($string) {
36344
- return import_obsidian149.moment.duration($string);
36523
+ return import_obsidian148.moment.duration($string);
36345
36524
  }
36346
36525
  /**
36347
36526
  * Converts a time to a string.
@@ -36358,7 +36537,7 @@ var TimeComponent = class extends TypedRangeTextComponent {
36358
36537
  } else {
36359
36538
  format2 = "HH:mm";
36360
36539
  }
36361
- return import_obsidian149.moment.utc(value.asMilliseconds()).format(format2);
36540
+ return import_obsidian148.moment.utc(value.asMilliseconds()).format(format2);
36362
36541
  }
36363
36542
  };
36364
36543
 
@@ -36367,10 +36546,10 @@ var tri_state_checkbox_component_exports = {};
36367
36546
  __export(tri_state_checkbox_component_exports, {
36368
36547
  TriStateCheckboxComponent: () => TriStateCheckboxComponent
36369
36548
  });
36370
- var import_obsidian150 = require("obsidian");
36549
+ var import_obsidian149 = require("obsidian");
36371
36550
  init_css_class();
36372
36551
  init_plugin_context();
36373
- var TriStateCheckboxComponent = class extends import_obsidian150.ValueComponent {
36552
+ var TriStateCheckboxComponent = class extends import_obsidian149.ValueComponent {
36374
36553
  /**
36375
36554
  * An input element of the checkbox.
36376
36555
  */
@@ -36448,10 +36627,10 @@ var typed_dropdown_component_exports = {};
36448
36627
  __export(typed_dropdown_component_exports, {
36449
36628
  TypedDropdownComponent: () => TypedDropdownComponent
36450
36629
  });
36451
- var import_obsidian151 = require("obsidian");
36630
+ var import_obsidian150 = require("obsidian");
36452
36631
  init_css_class();
36453
36632
  init_plugin_context();
36454
- var TypedDropdownComponent = class extends import_obsidian151.ValueComponent {
36633
+ var TypedDropdownComponent = class extends import_obsidian150.ValueComponent {
36455
36634
  /**
36456
36635
  * A select element of the component.
36457
36636
  *
@@ -36484,7 +36663,7 @@ var TypedDropdownComponent = class extends import_obsidian151.ValueComponent {
36484
36663
  */
36485
36664
  constructor(containerEl) {
36486
36665
  super();
36487
- this.dropdownComponent = new import_obsidian151.DropdownComponent(containerEl);
36666
+ this.dropdownComponent = new import_obsidian150.DropdownComponent(containerEl);
36488
36667
  addPluginCssClasses(containerEl, "typed-dropdown-component" /* TypedDropdownComponent */);
36489
36668
  }
36490
36669
  /**
@@ -36574,10 +36753,10 @@ var typed_multiple_dropdown_component_exports = {};
36574
36753
  __export(typed_multiple_dropdown_component_exports, {
36575
36754
  TypedMultipleDropdownComponent: () => TypedMultipleDropdownComponent
36576
36755
  });
36577
- var import_obsidian152 = require("obsidian");
36756
+ var import_obsidian151 = require("obsidian");
36578
36757
  init_css_class();
36579
36758
  init_plugin_context();
36580
- var TypedMultipleDropdownComponent = class extends import_obsidian152.ValueComponent {
36759
+ var TypedMultipleDropdownComponent = class extends import_obsidian151.ValueComponent {
36581
36760
  /**
36582
36761
  * A select element of the component.
36583
36762
  *
@@ -36755,10 +36934,10 @@ var week_component_exports = {};
36755
36934
  __export(week_component_exports, {
36756
36935
  WeekComponent: () => WeekComponent
36757
36936
  });
36758
- var import_obsidian153 = require("obsidian");
36937
+ var import_obsidian152 = require("obsidian");
36759
36938
  init_object_utils();
36760
36939
  init_css_class();
36761
- var moment6 = extractDefaultExportInterop(import_obsidian153.moment);
36940
+ var moment6 = extractDefaultExportInterop(import_obsidian152.moment);
36762
36941
  var DATE_FORMAT3 = "YYYY-[W]WW";
36763
36942
  var WeekComponent = class extends TypedRangeTextComponent {
36764
36943
  /**
@@ -36802,7 +36981,7 @@ var WeekComponent = class extends TypedRangeTextComponent {
36802
36981
  };
36803
36982
 
36804
36983
  // src/obsidian/setting-ex.ts
36805
- var SettingEx = class extends import_obsidian154.Setting {
36984
+ var SettingEx = class extends import_obsidian153.Setting {
36806
36985
  /**
36807
36986
  * Adds a {@link CheckboxComponent} to the setting.
36808
36987
  *
@@ -37017,9 +37196,13 @@ __export(validation_exports, {
37017
37196
  WINDOWS_UNSAFE_PATH_CHARS: () => WINDOWS_UNSAFE_PATH_CHARS,
37018
37197
  getOsAndObsidianUnsafePathCharsRegExp: () => getOsAndObsidianUnsafePathCharsRegExp,
37019
37198
  getOsUnsafePathCharsRegExp: () => getOsUnsafePathCharsRegExp,
37020
- isValidationMessageHolder: () => isValidationMessageHolder
37199
+ hasWindowsTrailingChars: () => hasWindowsTrailingChars,
37200
+ isValidationMessageHolder: () => isValidationMessageHolder,
37201
+ isWindowsReservedName: () => isWindowsReservedName,
37202
+ trimWindowsTrailingChars: () => trimWindowsTrailingChars
37021
37203
  });
37022
- var import_obsidian155 = require("obsidian");
37204
+ var import_obsidian154 = require("obsidian");
37205
+ init_path();
37023
37206
  init_reg_exp();
37024
37207
  function isValidationMessageHolder(value) {
37025
37208
  return value.validationMessage !== void 0;
@@ -37027,6 +37210,8 @@ function isValidationMessageHolder(value) {
37027
37210
  var OBSIDIAN_UNSAFE_FILENAME_CHARS = /[#^[\]|]/g;
37028
37211
  var WINDOWS_UNSAFE_PATH_CHARS = /[*\\/<>:|?"]/g;
37029
37212
  var UNIX_UNSAFE_PATH_CHARS = /[\0/]/g;
37213
+ var WINDOWS_RESERVED_NAME_REG_EXP = /^(?:AUX|COM[1-9]|CON|LPT[1-9]|NUL|PRN)$/i;
37214
+ var WINDOWS_TRAILING_CHARS_REG_EXP = /[ .]+$/;
37030
37215
  function getOsAndObsidianUnsafePathCharsRegExp(isWindows) {
37031
37216
  return oneOf([
37032
37217
  getOsUnsafePathCharsRegExp(isWindows),
@@ -37034,9 +37219,19 @@ function getOsAndObsidianUnsafePathCharsRegExp(isWindows) {
37034
37219
  ]);
37035
37220
  }
37036
37221
  function getOsUnsafePathCharsRegExp(isWindows) {
37037
- isWindows ??= import_obsidian155.Platform.isWin;
37222
+ isWindows ??= import_obsidian154.Platform.isWin;
37038
37223
  return isWindows ? WINDOWS_UNSAFE_PATH_CHARS : UNIX_UNSAFE_PATH_CHARS;
37039
37224
  }
37225
+ function hasWindowsTrailingChars(name) {
37226
+ return WINDOWS_TRAILING_CHARS_REG_EXP.test(name);
37227
+ }
37228
+ function isWindowsReservedName(name) {
37229
+ const trimmedName = trimWindowsTrailingChars(name);
37230
+ return WINDOWS_RESERVED_NAME_REG_EXP.test(basename(trimmedName, extname(trimmedName)));
37231
+ }
37232
+ function trimWindowsTrailingChars(name) {
37233
+ return name.replace(WINDOWS_TRAILING_CHARS_REG_EXP, "");
37234
+ }
37040
37235
 
37041
37236
  // src/obsidian/plugin/plugin-settings-tab.ts
37042
37237
  init_plugin_context();
@@ -37062,7 +37257,7 @@ var PluginSettingsTabEventsComponent = class extends ComponentEx {
37062
37257
  registerAsyncEvent(this, pluginSettingsComponent.on("saveSettings", (newState, oldState, context) => this.params.onSaveSettings(newState, oldState, context)));
37063
37258
  }
37064
37259
  };
37065
- var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian156.PluginSettingTab) {
37260
+ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian155.PluginSettingTab) {
37066
37261
  /**
37067
37262
  * Whether the plugin settings tab is open.
37068
37263
  *
@@ -37100,7 +37295,7 @@ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian156.
37100
37295
  super(params.plugin.app, params.plugin);
37101
37296
  this.pluginSettingsComponent = params.pluginSettingsComponent;
37102
37297
  addPluginCssClasses(this.containerEl, "plugin-settings-tab" /* PluginSettingsTab */);
37103
- this.saveSettingsDebounced = (0, import_obsidian156.debounce)(
37298
+ this.saveSettingsDebounced = (0, import_obsidian155.debounce)(
37104
37299
  convertAsyncToSync(() => this.pluginSettingsComponent.saveToFile(SAVE_TO_FILE_CONTEXT)),
37105
37300
  this.saveSettingsDebounceTimeoutInMilliseconds
37106
37301
  );
@@ -37173,7 +37368,7 @@ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian156.
37173
37368
  }
37174
37369
  let shouldSkipOnChange = false;
37175
37370
  const UPDATE_VALIDATOR_EL_TIMEOUT_IN_MILLISECONDS = 100;
37176
- const updateValidatorElementDebounced = (0, import_obsidian156.debounce)(() => {
37371
+ const updateValidatorElementDebounced = (0, import_obsidian155.debounce)(() => {
37177
37372
  window.requestAnimationFrame(() => {
37178
37373
  updateValidatorEl();
37179
37374
  });
@@ -37256,7 +37451,7 @@ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian156.
37256
37451
  tooltipContentEl.textContent = validationMessage;
37257
37452
  tooltipEl?.toggle(!!validationMessage);
37258
37453
  } else if (validationMessage) {
37259
- (0, import_obsidian156.setTooltip)(validatorEl, validationMessage);
37454
+ (0, import_obsidian155.setTooltip)(validatorEl, validationMessage);
37260
37455
  }
37261
37456
  }
37262
37457
  }
@@ -37500,7 +37695,7 @@ __export(plugin_exports, {
37500
37695
  reloadPlugin: () => reloadPlugin,
37501
37696
  showErrorAndDisablePlugin: () => showErrorAndDisablePlugin
37502
37697
  });
37503
- var import_obsidian157 = require("obsidian");
37698
+ var import_obsidian156 = require("obsidian");
37504
37699
  init_async_events();
37505
37700
  init_error();
37506
37701
  init_function();
@@ -37509,7 +37704,7 @@ init_component_ex();
37509
37704
  init_plugin_notice_component();
37510
37705
  init_i18n();
37511
37706
  init_translations_map();
37512
- var PluginBase = class extends mixinAsyncEvents()(import_obsidian157.Plugin) {
37707
+ var PluginBase = class extends mixinAsyncEvents()(import_obsidian156.Plugin) {
37513
37708
  /**
37514
37709
  * Gets abort signal component.
37515
37710
  *
@@ -37817,7 +38012,7 @@ var field_popover_exports = {};
37817
38012
  __export(field_popover_exports, {
37818
38013
  editFieldsInPopover: () => editFieldsInPopover
37819
38014
  });
37820
- var import_obsidian159 = require("obsidian");
38015
+ var import_obsidian158 = require("obsidian");
37821
38016
  init_object_utils();
37822
38017
  init_css_class();
37823
38018
 
@@ -37826,7 +38021,7 @@ var popover_exports = {};
37826
38021
  __export(popover_exports, {
37827
38022
  showPopover: () => showPopover
37828
38023
  });
37829
- var import_obsidian158 = require("obsidian");
38024
+ var import_obsidian157 = require("obsidian");
37830
38025
  init_css_class();
37831
38026
  init_i18n();
37832
38027
  init_plugin_context();
@@ -37883,7 +38078,7 @@ async function showPopover(params) {
37883
38078
  handleCancel();
37884
38079
  }
37885
38080
  });
37886
- const buttonsSetting = new import_obsidian158.Setting(popoverEl);
38081
+ const buttonsSetting = new import_obsidian157.Setting(popoverEl);
37887
38082
  buttonsSetting.addButton((button) => {
37888
38083
  button.setButtonText(okButtonText ?? t2(($) => $.obsidianDevUtils.buttons.ok)).setCta().setClass("ok-button" /* OkButton */).onClick(handleOk);
37889
38084
  });
@@ -37942,8 +38137,8 @@ async function editFieldsInPopover(params) {
37942
38137
  }));
37943
38138
  }
37944
38139
  function addField(containerEl, field) {
37945
- const setting = new import_obsidian159.Setting(containerEl).setName(field.name);
37946
- const textComponent = new import_obsidian159.TextComponent(setting.controlEl);
38140
+ const setting = new import_obsidian158.Setting(containerEl).setName(field.name);
38141
+ const textComponent = new import_obsidian158.TextComponent(setting.controlEl);
37947
38142
  textComponent.setValue(field.defaultValue ?? "");
37948
38143
  textComponent.setPlaceholder(field.placeholder ?? "");
37949
38144
  textComponent.inputEl.addClass("text-box" /* TextBox */);
@@ -37956,7 +38151,7 @@ __export(app_context_exports, {
37956
38151
  AppContext: () => AppContext,
37957
38152
  useApp: () => useApp
37958
38153
  });
37959
- var import_obsidian160 = require("obsidian");
38154
+ var import_obsidian159 = require("obsidian");
37960
38155
  var import_react = __toESM(require_react(), 1);
37961
38156
  init_type_guards();
37962
38157
  var AppContext = (0, import_react.createContext)(void 0);
@@ -37969,7 +38164,7 @@ var ribbon_icon_registrar_exports = {};
37969
38164
  __export(ribbon_icon_registrar_exports, {
37970
38165
  PluginRibbonIconRegistrar: () => PluginRibbonIconRegistrar
37971
38166
  });
37972
- var import_obsidian161 = require("obsidian");
38167
+ var import_obsidian160 = require("obsidian");
37973
38168
  var PluginRibbonIconRegistrar = class {
37974
38169
  /**
37975
38170
  * Creates a new instance of the {@link PluginRibbonIconRegistrar} class.
@@ -37996,8 +38191,8 @@ var setting_group_ex_exports = {};
37996
38191
  __export(setting_group_ex_exports, {
37997
38192
  SettingGroupEx: () => SettingGroupEx
37998
38193
  });
37999
- var import_obsidian162 = require("obsidian");
38000
- var SettingGroupEx = class extends import_obsidian162.SettingGroup {
38194
+ var import_obsidian161 = require("obsidian");
38195
+ var SettingGroupEx = class extends import_obsidian161.SettingGroup {
38001
38196
  /**
38002
38197
  * Creates a new setting group.
38003
38198
  *
@@ -38024,7 +38219,7 @@ var status_bar_item_registrar_exports = {};
38024
38219
  __export(status_bar_item_registrar_exports, {
38025
38220
  PluginStatusBarItemRegistrar: () => PluginStatusBarItemRegistrar
38026
38221
  });
38027
- var import_obsidian163 = require("obsidian");
38222
+ var import_obsidian162 = require("obsidian");
38028
38223
  var PluginStatusBarItemRegistrar = class {
38029
38224
  /**
38030
38225
  * Creates a new instance of the {@link PluginStatusBarItemRegistrar} class.
@@ -38189,6 +38384,50 @@ function isTemplaterApi(value) {
38189
38384
  return "generate_object" in functionsGenerator && typeof functionsGenerator.generate_object === "function";
38190
38385
  }
38191
38386
 
38387
+ // src/obsidian/trusted-input.ts
38388
+ var trusted_input_exports = {};
38389
+ __export(trusted_input_exports, {
38390
+ clickElement: () => clickElement3,
38391
+ clickMouse: () => clickMouse3,
38392
+ hoverElement: () => hoverElement3,
38393
+ moveMouse: () => moveMouse3,
38394
+ pressKey: () => pressKey3,
38395
+ typeIntoEditor: () => typeIntoEditor3,
38396
+ unhoverElement: () => unhoverElement3
38397
+ });
38398
+ var import_obsidian164 = require("obsidian");
38399
+ async function clickElement3(params) {
38400
+ const arm = await loadArm();
38401
+ await arm.clickElement(params);
38402
+ }
38403
+ async function clickMouse3(params) {
38404
+ const arm = await loadArm();
38405
+ await arm.clickMouse(params);
38406
+ }
38407
+ async function hoverElement3(params) {
38408
+ const arm = await loadArm();
38409
+ await arm.hoverElement(params);
38410
+ }
38411
+ async function moveMouse3(params) {
38412
+ const arm = await loadArm();
38413
+ await arm.moveMouse(params);
38414
+ }
38415
+ async function pressKey3(params) {
38416
+ const arm = await loadArm();
38417
+ await arm.pressKey(params);
38418
+ }
38419
+ async function typeIntoEditor3(params) {
38420
+ const arm = await loadArm();
38421
+ await arm.typeIntoEditor(params);
38422
+ }
38423
+ async function unhoverElement3(params) {
38424
+ const arm = await loadArm();
38425
+ await arm.unhoverElement(params);
38426
+ }
38427
+ async function loadArm() {
38428
+ return import_obsidian164.Platform.isDesktopApp ? await Promise.resolve().then(() => (init_desktop_trusted_input(), desktop_trusted_input_exports)) : await Promise.resolve().then(() => (init_mobile_trusted_input(), mobile_trusted_input_exports));
38429
+ }
38430
+
38192
38431
  // src/obsidian/vault-transaction.ts
38193
38432
  var vault_transaction_exports = {};
38194
38433
  __export(vault_transaction_exports, {
@@ -38443,7 +38682,7 @@ var view_registrar_exports = {};
38443
38682
  __export(view_registrar_exports, {
38444
38683
  PluginViewRegistrar: () => PluginViewRegistrar
38445
38684
  });
38446
- var import_obsidian164 = require("obsidian");
38685
+ var import_obsidian165 = require("obsidian");
38447
38686
  var PluginViewRegistrar = class {
38448
38687
  /**
38449
38688
  * Creates a new instance of the {@link PluginViewRegistrar} class.
@@ -38655,6 +38894,7 @@ __export(obsidian_exports, {
38655
38894
  "dataview-link": () => dataview_link_exports,
38656
38895
  "demo-vault-helper": () => demo_vault_helper_exports,
38657
38896
  "demo-vault-helper-settings": () => demo_vault_helper_settings_exports,
38897
+ "demo-vault-naming": () => demo_vault_naming_exports,
38658
38898
  "desktop-demo-vault-opener": () => desktop_demo_vault_opener_exports,
38659
38899
  "desktop-trusted-input": () => desktop_trusted_input_exports,
38660
38900
  editor: () => editor_exports,
@@ -38683,6 +38923,7 @@ __export(obsidian_exports, {
38683
38923
  "markdown-view": () => markdown_view_exports,
38684
38924
  "menu-event-registrar": () => menu_event_registrar_exports,
38685
38925
  "metadata-cache": () => metadata_cache_exports,
38926
+ "mobile-trusted-input": () => mobile_trusted_input_exports,
38686
38927
  modals: () => modals_exports,
38687
38928
  "note-priority": () => note_priority_exports,
38688
38929
  "notebook-navigator": () => notebook_navigator_exports,
@@ -38705,6 +38946,7 @@ __export(obsidian_exports, {
38705
38946
  "setting-group-ex": () => setting_group_ex_exports,
38706
38947
  "status-bar-item-registrar": () => status_bar_item_registrar_exports,
38707
38948
  templater: () => templater_exports,
38949
+ "trusted-input": () => trusted_input_exports,
38708
38950
  validation: () => validation_exports,
38709
38951
  vault: () => vault_exports,
38710
38952
  "vault-delete": () => vault_delete_exports,
@@ -38779,7 +39021,9 @@ init_css_class();
38779
39021
  var demo_vault_helper_settings_exports = {};
38780
39022
 
38781
39023
  // src/obsidian/index.ts
39024
+ init_demo_vault_naming();
38782
39025
  init_desktop_demo_vault_opener();
39026
+ init_desktop_trusted_input();
38783
39027
 
38784
39028
  // src/obsidian/i18n/index.ts
38785
39029
  var i18n_exports2 = {};
@@ -38816,6 +39060,9 @@ var link_update_progress_exports = {};
38816
39060
  // src/obsidian/menu-event-registrar.ts
38817
39061
  var menu_event_registrar_exports = {};
38818
39062
 
39063
+ // src/obsidian/index.ts
39064
+ init_mobile_trusted_input();
39065
+
38819
39066
  // src/obsidian/modals/index.ts
38820
39067
  var modals_exports = {};
38821
39068
  __export(modals_exports, {
@@ -38918,8 +39165,8 @@ init_value_provider();
38918
39165
  init_value_wrapper();
38919
39166
 
38920
39167
  // integration-test-plugin/main.ts
38921
- var import_obsidian165 = require("obsidian");
38922
- var IntegrationTestPlugin = class extends import_obsidian165.Plugin {
39168
+ var import_obsidian166 = require("obsidian");
39169
+ var IntegrationTestPlugin = class extends import_obsidian166.Plugin {
38923
39170
  onload() {
38924
39171
  window.__obsidianDevUtilsModule = src_exports;
38925
39172
  }