obsidian-dev-utils 97.0.0 → 98.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.
- package/CHANGELOG.md +17 -0
- package/LICENSE +1 -1
- package/dist/integration-test-plugin/main.js +624 -483
- package/dist/lib/cjs/__merged.cjs +14 -9
- package/dist/lib/cjs/__merged.d.cts +2 -1
- package/dist/lib/cjs/generated-during-build.cjs +1 -1
- package/dist/lib/cjs/obsidian/components/rename-delete-handler-component.cjs +38 -38
- package/dist/lib/cjs/obsidian/demo-vault-naming.cjs +167 -0
- package/dist/lib/cjs/obsidian/demo-vault-naming.d.cts +54 -0
- package/dist/lib/cjs/obsidian/desktop-demo-vault-opener.cjs +11 -5
- package/dist/lib/cjs/obsidian/desktop-demo-vault-opener.d.cts +10 -8
- package/dist/lib/cjs/obsidian/desktop-trusted-input.cjs +9 -9
- package/dist/lib/cjs/obsidian/desktop-trusted-input.d.cts +23 -4
- package/dist/lib/cjs/obsidian/index.cjs +10 -1
- package/dist/lib/cjs/obsidian/index.d.cts +3 -0
- package/dist/lib/cjs/obsidian/mobile-trusted-input.cjs +195 -0
- package/dist/lib/cjs/obsidian/mobile-trusted-input.d.cts +93 -0
- package/dist/lib/cjs/obsidian/plugin/obsidian-plugin-repo-paths.cjs +2 -1
- package/dist/lib/cjs/obsidian/plugin/obsidian-plugin-repo-paths.d.cts +4 -0
- package/dist/lib/cjs/obsidian/resource-lock.cjs +122 -122
- package/dist/lib/cjs/obsidian/trusted-input.cjs +206 -0
- package/dist/lib/cjs/obsidian/trusted-input.d.cts +126 -0
- package/dist/lib/cjs/script-utils/build.cjs +30 -6
- package/dist/lib/cjs/script-utils/build.d.cts +5 -0
- package/dist/lib/cjs/script-utils/demo-vault.cjs +26 -6
- package/dist/lib/cjs/script-utils/demo-vault.d.cts +12 -8
- package/dist/lib/cjs/script-utils/exec.cjs +1 -1
- package/dist/lib/cjs/script-utils/formatters/dprint.cjs +3 -2
- package/dist/lib/cjs/script-utils/index.cjs +4 -1
- package/dist/lib/cjs/script-utils/index.d.cts +1 -0
- package/dist/lib/cjs/script-utils/linters/cspell.cjs +3 -3
- package/dist/lib/cjs/script-utils/linters/eslint-config.cjs +39 -1
- package/dist/lib/cjs/script-utils/linters/eslint-rules/index.cjs +16 -1
- package/dist/lib/cjs/script-utils/linters/eslint-rules/index.d.cts +5 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-description.cjs +254 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-description.d.cts +54 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-helpers.cjs +217 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-helpers.d.cts +141 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-id.cjs +214 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-id.d.cts +32 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-name.cjs +215 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-name.d.cts +30 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-schema.cjs +318 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/manifest-schema.d.cts +45 -0
- package/dist/lib/cjs/script-utils/linters/eslint-rules/obsidian-dev-utils-plugin.cjs +9 -1
- package/dist/lib/cjs/script-utils/linters/eslint.cjs +3 -2
- package/dist/lib/cjs/script-utils/linters/markdownlint.cjs +4 -4
- package/dist/lib/cjs/script-utils/npm-run.cjs +4 -3
- package/dist/lib/cjs/script-utils/obsidian-dev-utils-repo-paths.cjs +10 -1
- package/dist/lib/cjs/script-utils/obsidian-dev-utils-repo-paths.d.cts +37 -1
- package/dist/lib/cjs/script-utils/package-manager.cjs +287 -0
- package/dist/lib/cjs/script-utils/package-manager.d.cts +77 -0
- package/dist/lib/cjs/script-utils/version.cjs +21 -9
- package/dist/lib/esm/__merged.d.mts +2 -1
- package/dist/lib/esm/__merged.mjs +16 -10
- package/dist/lib/esm/generated-during-build.mjs +1 -1
- package/dist/lib/esm/obsidian/components/rename-delete-handler-component.mjs +38 -38
- package/dist/lib/esm/obsidian/demo-vault-naming.d.mts +54 -0
- package/dist/lib/esm/obsidian/demo-vault-naming.mjs +61 -0
- package/dist/lib/esm/obsidian/desktop-demo-vault-opener.d.mts +10 -8
- package/dist/lib/esm/obsidian/desktop-demo-vault-opener.mjs +14 -5
- package/dist/lib/esm/obsidian/desktop-trusted-input.d.mts +23 -4
- package/dist/lib/esm/obsidian/desktop-trusted-input.mjs +9 -9
- package/dist/lib/esm/obsidian/index.d.mts +3 -0
- package/dist/lib/esm/obsidian/index.mjs +7 -1
- package/dist/lib/esm/obsidian/mobile-trusted-input.d.mts +93 -0
- package/dist/lib/esm/obsidian/mobile-trusted-input.mjs +84 -0
- package/dist/lib/esm/obsidian/plugin/obsidian-plugin-repo-paths.d.mts +4 -0
- package/dist/lib/esm/obsidian/plugin/obsidian-plugin-repo-paths.mjs +2 -1
- package/dist/lib/esm/obsidian/resource-lock.mjs +122 -122
- package/dist/lib/esm/obsidian/trusted-input.d.mts +126 -0
- package/dist/lib/esm/obsidian/trusted-input.mjs +85 -0
- package/dist/lib/esm/script-utils/build.d.mts +5 -0
- package/dist/lib/esm/script-utils/build.mjs +30 -6
- package/dist/lib/esm/script-utils/demo-vault.d.mts +12 -8
- package/dist/lib/esm/script-utils/demo-vault.mjs +29 -6
- package/dist/lib/esm/script-utils/exec.mjs +1 -1
- package/dist/lib/esm/script-utils/formatters/dprint.mjs +3 -2
- package/dist/lib/esm/script-utils/index.d.mts +1 -0
- package/dist/lib/esm/script-utils/index.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/cspell.mjs +3 -3
- package/dist/lib/esm/script-utils/linters/eslint-config.mjs +39 -1
- package/dist/lib/esm/script-utils/linters/eslint-rules/index.d.mts +5 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/index.mjs +11 -1
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-description.d.mts +54 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-description.mjs +148 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-helpers.d.mts +141 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-helpers.mjs +92 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-id.d.mts +32 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-id.mjs +111 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-name.d.mts +30 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-name.mjs +112 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-schema.d.mts +45 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/manifest-schema.mjs +217 -0
- package/dist/lib/esm/script-utils/linters/eslint-rules/obsidian-dev-utils-plugin.mjs +9 -1
- package/dist/lib/esm/script-utils/linters/eslint.mjs +3 -2
- package/dist/lib/esm/script-utils/linters/markdownlint.mjs +4 -4
- package/dist/lib/esm/script-utils/npm-run.mjs +4 -3
- package/dist/lib/esm/script-utils/obsidian-dev-utils-repo-paths.d.mts +37 -1
- package/dist/lib/esm/script-utils/obsidian-dev-utils-repo-paths.mjs +10 -1
- package/dist/lib/esm/script-utils/package-manager.d.mts +77 -0
- package/dist/lib/esm/script-utils/package-manager.mjs +173 -0
- package/dist/lib/esm/script-utils/version.mjs +21 -9
- package/obsidian/demo-vault-naming/package.json +6 -0
- package/obsidian/mobile-trusted-input/package.json +6 -0
- package/obsidian/trusted-input/package.json +6 -0
- package/package.json +19 -17
- package/script-utils/linters/eslint-rules/manifest-description/package.json +6 -0
- package/script-utils/linters/eslint-rules/manifest-helpers/package.json +6 -0
- package/script-utils/linters/eslint-rules/manifest-id/package.json +6 -0
- package/script-utils/linters/eslint-rules/manifest-name/package.json +6 -0
- package/script-utils/linters/eslint-rules/manifest-schema/package.json +6 -0
- 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
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
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}
|
|
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: () =>
|
|
10267
|
-
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,7 @@ __export(merged_exports, {
|
|
|
10424
10639
|
hasPatchToken: () => hasPatchToken,
|
|
10425
10640
|
hasSingleOccurrence: () => hasSingleOccurrence,
|
|
10426
10641
|
hasWikilinkSyntax: () => hasWikilinkSyntax,
|
|
10427
|
-
hoverElement: () =>
|
|
10642
|
+
hoverElement: () => hoverElement3,
|
|
10428
10643
|
ignoreError: () => ignoreError,
|
|
10429
10644
|
indent: () => indent,
|
|
10430
10645
|
initDebugController: () => initDebugController,
|
|
@@ -10495,7 +10710,7 @@ __export(merged_exports, {
|
|
|
10495
10710
|
markdownToHtml: () => markdownToHtml,
|
|
10496
10711
|
marksAsTerminateRetry: () => marksAsTerminateRetry,
|
|
10497
10712
|
mixinAsyncEvents: () => mixinAsyncEvents,
|
|
10498
|
-
moveMouse: () =>
|
|
10713
|
+
moveMouse: () => moveMouse3,
|
|
10499
10714
|
nameof: () => nameof,
|
|
10500
10715
|
neverEnds: () => neverEnds,
|
|
10501
10716
|
nextTickAsync: () => nextTickAsync,
|
|
@@ -10525,7 +10740,7 @@ __export(merged_exports, {
|
|
|
10525
10740
|
pathsValidator: () => pathsValidator,
|
|
10526
10741
|
pickHighestPriorityNotePath: () => pickHighestPriorityNotePath,
|
|
10527
10742
|
posix: () => posix,
|
|
10528
|
-
pressKey: () =>
|
|
10743
|
+
pressKey: () => pressKey3,
|
|
10529
10744
|
printError: () => printError,
|
|
10530
10745
|
printToPdf: () => printToPdf,
|
|
10531
10746
|
printWithStackTrace: () => printWithStackTrace,
|
|
@@ -10629,10 +10844,10 @@ __export(merged_exports, {
|
|
|
10629
10844
|
trimEnd: () => trimEnd,
|
|
10630
10845
|
trimMarkdownExtension: () => trimMarkdownExtension,
|
|
10631
10846
|
trimStart: () => trimStart,
|
|
10632
|
-
typeIntoEditor: () =>
|
|
10847
|
+
typeIntoEditor: () => typeIntoEditor3,
|
|
10633
10848
|
unescape: () => unescape,
|
|
10634
10849
|
unescapeAlias: () => unescapeAlias,
|
|
10635
|
-
unhoverElement: () =>
|
|
10850
|
+
unhoverElement: () => unhoverElement3,
|
|
10636
10851
|
unindent: () => unindent,
|
|
10637
10852
|
uninstallCommunityPlugin: () => uninstallCommunityPlugin,
|
|
10638
10853
|
unique: () => unique,
|
|
@@ -29652,197 +29867,76 @@ var ResourceLockEventsComponent = class extends ComponentEx {
|
|
|
29652
29867
|
}));
|
|
29653
29868
|
}
|
|
29654
29869
|
};
|
|
29655
|
-
var
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
|
|
29664
|
-
|
|
29665
|
-
|
|
29666
|
-
|
|
29667
|
-
|
|
29668
|
-
|
|
29669
|
-
|
|
29670
|
-
|
|
29671
|
-
|
|
29672
|
-
|
|
29673
|
-
methodName: "copy",
|
|
29674
|
-
patchHandler: ({ fallback, originalArguments: [, newPath] }) => {
|
|
29675
|
-
this.assertNotBlocked([newPath]);
|
|
29676
|
-
return fallback();
|
|
29677
|
-
}
|
|
29870
|
+
var ResourceLockManager = class {
|
|
29871
|
+
beeper = new Beeper();
|
|
29872
|
+
// The inner sets are mutable so a rename can re-key the paths of an in-flight bypass scope in place;
|
|
29873
|
+
// The scope's `Disposable` deletes by set identity, so mutating the contents cannot orphan it.
|
|
29874
|
+
bypassPathSets = /* @__PURE__ */ new Set();
|
|
29875
|
+
eventsComponent = null;
|
|
29876
|
+
indicatorsByView = /* @__PURE__ */ new Map();
|
|
29877
|
+
lockEntriesByPath = /* @__PURE__ */ new Map();
|
|
29878
|
+
mutationBlockerComponent = null;
|
|
29879
|
+
statusBarItemEl = null;
|
|
29880
|
+
bypass(app, pathsOrFiles) {
|
|
29881
|
+
const bypassedPaths = new Set(pathsOrFiles.map((pathOrFile) => getPath2(app, pathOrFile)));
|
|
29882
|
+
this.bypassPathSets.add(bypassedPaths);
|
|
29883
|
+
return new CallbackDisposable({
|
|
29884
|
+
callback: () => {
|
|
29885
|
+
this.bypassPathSets.delete(bypassedPaths);
|
|
29886
|
+
},
|
|
29887
|
+
multipleDisposeBehavior: 1 /* Ignore */
|
|
29678
29888
|
});
|
|
29679
|
-
|
|
29680
|
-
|
|
29681
|
-
|
|
29682
|
-
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
29688
|
-
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
29693
|
-
|
|
29694
|
-
|
|
29695
|
-
|
|
29696
|
-
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
|
|
29700
|
-
|
|
29701
|
-
|
|
29702
|
-
|
|
29703
|
-
|
|
29704
|
-
|
|
29705
|
-
|
|
29706
|
-
|
|
29707
|
-
|
|
29708
|
-
|
|
29709
|
-
|
|
29710
|
-
|
|
29711
|
-
this.
|
|
29712
|
-
|
|
29713
|
-
|
|
29714
|
-
|
|
29715
|
-
|
|
29716
|
-
|
|
29717
|
-
|
|
29718
|
-
|
|
29719
|
-
|
|
29720
|
-
|
|
29721
|
-
|
|
29722
|
-
|
|
29723
|
-
|
|
29724
|
-
|
|
29725
|
-
|
|
29726
|
-
}
|
|
29727
|
-
this.
|
|
29728
|
-
|
|
29729
|
-
|
|
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 */
|
|
29794
|
-
});
|
|
29795
|
-
}
|
|
29796
|
-
/**
|
|
29797
|
-
* Fully unlocks the note at the given path. Resolves the lock covering it — the path itself when
|
|
29798
|
-
* directly locked, otherwise the enclosing `subtree`-locked folder — then aborts every
|
|
29799
|
-
* {@link AbortController} registered on that owner (cancelling the operations that took the locks)
|
|
29800
|
-
* AND removes the owner's lock entries (releasing the lock unconditionally). Unlike
|
|
29801
|
-
* {@link requestUnlock}, which only aborts the exact path's controllers and relies on each operation
|
|
29802
|
-
* releasing its own lock, this resolves ancestor coverage and always releases — so a note held by an
|
|
29803
|
-
* indefinitely-held lock is guaranteed to become editable. A no-op when nothing covers the path.
|
|
29804
|
-
*
|
|
29805
|
-
* @param app - The Obsidian app instance.
|
|
29806
|
-
* @param pathOrFile - The path or file of the note to unlock.
|
|
29807
|
-
*/
|
|
29808
|
-
forceUnlock(app, pathOrFile) {
|
|
29809
|
-
const ownerPath = this.resolveLockOwnerPath(app, getPath2(app, pathOrFile));
|
|
29810
|
-
if (ownerPath === null) {
|
|
29811
|
-
return;
|
|
29812
|
-
}
|
|
29813
|
-
this.abortAndReleaseEntries(app, ownerPath);
|
|
29814
|
-
}
|
|
29815
|
-
isLocked(app, pathOrFile) {
|
|
29816
|
-
return this.isPathLocked(getPath2(app, pathOrFile));
|
|
29817
|
-
}
|
|
29818
|
-
/**
|
|
29819
|
-
* Checks whether the given path is locked directly or is covered by a `subtree`-locked ancestor
|
|
29820
|
-
* folder.
|
|
29821
|
-
*
|
|
29822
|
-
* @param app - The Obsidian app instance.
|
|
29823
|
-
* @param pathOrFile - The path or file to check.
|
|
29824
|
-
* @returns `true` if the path is itself locked or lies under a `subtree`-locked folder.
|
|
29825
|
-
*/
|
|
29826
|
-
isLockedByAncestor(app, pathOrFile) {
|
|
29827
|
-
return this.resolveLockOwnerPath(app, getPath2(app, pathOrFile)) !== null;
|
|
29828
|
-
}
|
|
29829
|
-
/**
|
|
29830
|
-
* Checks whether the given path is covered by a mutation-blocking lock (one taken with
|
|
29831
|
-
* `blocksMutations`) directly or on a `subtree`-locked ancestor folder.
|
|
29832
|
-
*
|
|
29833
|
-
* @param app - The Obsidian app instance.
|
|
29834
|
-
* @param pathOrFile - The path or file to check.
|
|
29835
|
-
* @returns `true` if a mutation of the path is currently blocked.
|
|
29836
|
-
*/
|
|
29837
|
-
isMutationBlockedByAncestor(app, pathOrFile) {
|
|
29838
|
-
const path = getPath2(app, pathOrFile);
|
|
29839
|
-
const exactEntries = this.lockEntriesByPath.get(path);
|
|
29840
|
-
if (exactEntries?.some((entry) => entry.blocksMutations)) {
|
|
29841
|
-
return true;
|
|
29842
|
-
}
|
|
29843
|
-
for (const [lockedPath, entries] of this.lockEntriesByPath) {
|
|
29844
|
-
if (entries.some((entry) => entry.mode === "subtree" && entry.blocksMutations) && isChild({ app, childPathOrFile: path, parentPathOrFile: lockedPath })) {
|
|
29845
|
-
return true;
|
|
29889
|
+
}
|
|
29890
|
+
/**
|
|
29891
|
+
* Fully unlocks the note at the given path. Resolves the lock covering it — the path itself when
|
|
29892
|
+
* directly locked, otherwise the enclosing `subtree`-locked folder — then aborts every
|
|
29893
|
+
* {@link AbortController} registered on that owner (cancelling the operations that took the locks)
|
|
29894
|
+
* AND removes the owner's lock entries (releasing the lock unconditionally). Unlike
|
|
29895
|
+
* {@link requestUnlock}, which only aborts the exact path's controllers and relies on each operation
|
|
29896
|
+
* releasing its own lock, this resolves ancestor coverage and always releases — so a note held by an
|
|
29897
|
+
* indefinitely-held lock is guaranteed to become editable. A no-op when nothing covers the path.
|
|
29898
|
+
*
|
|
29899
|
+
* @param app - The Obsidian app instance.
|
|
29900
|
+
* @param pathOrFile - The path or file of the note to unlock.
|
|
29901
|
+
*/
|
|
29902
|
+
forceUnlock(app, pathOrFile) {
|
|
29903
|
+
const ownerPath = this.resolveLockOwnerPath(app, getPath2(app, pathOrFile));
|
|
29904
|
+
if (ownerPath === null) {
|
|
29905
|
+
return;
|
|
29906
|
+
}
|
|
29907
|
+
this.abortAndReleaseEntries(app, ownerPath);
|
|
29908
|
+
}
|
|
29909
|
+
isLocked(app, pathOrFile) {
|
|
29910
|
+
return this.isPathLocked(getPath2(app, pathOrFile));
|
|
29911
|
+
}
|
|
29912
|
+
/**
|
|
29913
|
+
* Checks whether the given path is locked directly or is covered by a `subtree`-locked ancestor
|
|
29914
|
+
* folder.
|
|
29915
|
+
*
|
|
29916
|
+
* @param app - The Obsidian app instance.
|
|
29917
|
+
* @param pathOrFile - The path or file to check.
|
|
29918
|
+
* @returns `true` if the path is itself locked or lies under a `subtree`-locked folder.
|
|
29919
|
+
*/
|
|
29920
|
+
isLockedByAncestor(app, pathOrFile) {
|
|
29921
|
+
return this.resolveLockOwnerPath(app, getPath2(app, pathOrFile)) !== null;
|
|
29922
|
+
}
|
|
29923
|
+
/**
|
|
29924
|
+
* Checks whether the given path is covered by a mutation-blocking lock (one taken with
|
|
29925
|
+
* `blocksMutations`) directly or on a `subtree`-locked ancestor folder.
|
|
29926
|
+
*
|
|
29927
|
+
* @param app - The Obsidian app instance.
|
|
29928
|
+
* @param pathOrFile - The path or file to check.
|
|
29929
|
+
* @returns `true` if a mutation of the path is currently blocked.
|
|
29930
|
+
*/
|
|
29931
|
+
isMutationBlockedByAncestor(app, pathOrFile) {
|
|
29932
|
+
const path = getPath2(app, pathOrFile);
|
|
29933
|
+
const exactEntries = this.lockEntriesByPath.get(path);
|
|
29934
|
+
if (exactEntries?.some((entry) => entry.blocksMutations)) {
|
|
29935
|
+
return true;
|
|
29936
|
+
}
|
|
29937
|
+
for (const [lockedPath, entries] of this.lockEntriesByPath) {
|
|
29938
|
+
if (entries.some((entry) => entry.mode === "subtree" && entry.blocksMutations) && isChild({ app, childPathOrFile: path, parentPathOrFile: lockedPath })) {
|
|
29939
|
+
return true;
|
|
29846
29940
|
}
|
|
29847
29941
|
}
|
|
29848
29942
|
return false;
|
|
@@ -30367,6 +30461,127 @@ ${entry.operationName}`;
|
|
|
30367
30461
|
}, { once: true });
|
|
30368
30462
|
}
|
|
30369
30463
|
};
|
|
30464
|
+
var ResourceLockMutationBlockerComponent = class extends MonkeyAroundComponent {
|
|
30465
|
+
shouldBlockMutation;
|
|
30466
|
+
constructor(params) {
|
|
30467
|
+
super();
|
|
30468
|
+
this.shouldBlockMutation = params.shouldBlockMutation;
|
|
30469
|
+
}
|
|
30470
|
+
onload() {
|
|
30471
|
+
super.onload();
|
|
30472
|
+
this.registerMethodPatch({
|
|
30473
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30474
|
+
methodName: "append",
|
|
30475
|
+
patchHandler: ({ fallback, originalArguments: [file] }) => {
|
|
30476
|
+
this.assertNotBlocked([file.path]);
|
|
30477
|
+
return fallback();
|
|
30478
|
+
}
|
|
30479
|
+
});
|
|
30480
|
+
this.registerMethodPatch({
|
|
30481
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30482
|
+
methodName: "copy",
|
|
30483
|
+
patchHandler: ({ fallback, originalArguments: [, newPath] }) => {
|
|
30484
|
+
this.assertNotBlocked([newPath]);
|
|
30485
|
+
return fallback();
|
|
30486
|
+
}
|
|
30487
|
+
});
|
|
30488
|
+
this.registerMethodPatch({
|
|
30489
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30490
|
+
methodName: "create",
|
|
30491
|
+
patchHandler: ({ fallback, originalArguments: [path] }) => {
|
|
30492
|
+
this.assertNotBlocked([path]);
|
|
30493
|
+
return fallback();
|
|
30494
|
+
}
|
|
30495
|
+
});
|
|
30496
|
+
this.registerMethodPatch({
|
|
30497
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30498
|
+
methodName: "createBinary",
|
|
30499
|
+
patchHandler: ({ fallback, originalArguments: [path] }) => {
|
|
30500
|
+
this.assertNotBlocked([path]);
|
|
30501
|
+
return fallback();
|
|
30502
|
+
}
|
|
30503
|
+
});
|
|
30504
|
+
this.registerMethodPatch({
|
|
30505
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30506
|
+
methodName: "createFolder",
|
|
30507
|
+
patchHandler: ({ fallback, originalArguments: [path] }) => {
|
|
30508
|
+
this.assertNotBlocked([path]);
|
|
30509
|
+
return fallback();
|
|
30510
|
+
}
|
|
30511
|
+
});
|
|
30512
|
+
this.registerMethodPatch({
|
|
30513
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30514
|
+
methodName: "delete",
|
|
30515
|
+
patchHandler: ({ fallback, originalArguments: [file] }) => {
|
|
30516
|
+
this.assertNotBlocked([file.path]);
|
|
30517
|
+
return fallback();
|
|
30518
|
+
}
|
|
30519
|
+
});
|
|
30520
|
+
this.registerMethodPatch({
|
|
30521
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30522
|
+
methodName: "modify",
|
|
30523
|
+
patchHandler: ({ fallback, originalArguments: [file] }) => {
|
|
30524
|
+
this.assertNotBlocked([file.path]);
|
|
30525
|
+
return fallback();
|
|
30526
|
+
}
|
|
30527
|
+
});
|
|
30528
|
+
this.registerMethodPatch({
|
|
30529
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30530
|
+
methodName: "modifyBinary",
|
|
30531
|
+
patchHandler: ({ fallback, originalArguments: [file] }) => {
|
|
30532
|
+
this.assertNotBlocked([file.path]);
|
|
30533
|
+
return fallback();
|
|
30534
|
+
}
|
|
30535
|
+
});
|
|
30536
|
+
this.registerMethodPatch({
|
|
30537
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30538
|
+
methodName: "process",
|
|
30539
|
+
patchHandler: ({ fallback, originalArguments: [file] }) => {
|
|
30540
|
+
this.assertNotBlocked([file.path]);
|
|
30541
|
+
return fallback();
|
|
30542
|
+
}
|
|
30543
|
+
});
|
|
30544
|
+
this.registerMethodPatch({
|
|
30545
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30546
|
+
methodName: "rename",
|
|
30547
|
+
patchHandler: ({ fallback, originalArguments: [file, newPath] }) => {
|
|
30548
|
+
this.assertNotBlocked([file.path, newPath]);
|
|
30549
|
+
return fallback();
|
|
30550
|
+
}
|
|
30551
|
+
});
|
|
30552
|
+
this.registerMethodPatch({
|
|
30553
|
+
$object: import_obsidian119.Vault.prototype,
|
|
30554
|
+
methodName: "trash",
|
|
30555
|
+
patchHandler: ({ fallback, originalArguments: [file] }) => {
|
|
30556
|
+
this.assertNotBlocked([file.path]);
|
|
30557
|
+
return fallback();
|
|
30558
|
+
}
|
|
30559
|
+
});
|
|
30560
|
+
this.registerMethodPatch({
|
|
30561
|
+
$object: import_obsidian119.FileManager.prototype,
|
|
30562
|
+
methodName: "renameFile",
|
|
30563
|
+
patchHandler: ({ fallback, originalArguments: [file, newPath] }) => {
|
|
30564
|
+
this.assertNotBlocked([file.path, newPath]);
|
|
30565
|
+
return fallback();
|
|
30566
|
+
}
|
|
30567
|
+
});
|
|
30568
|
+
this.registerMethodPatch({
|
|
30569
|
+
$object: import_obsidian119.FileManager.prototype,
|
|
30570
|
+
methodName: "trashFile",
|
|
30571
|
+
patchHandler: ({ fallback, originalArguments: [file] }) => {
|
|
30572
|
+
this.assertNotBlocked([file.path]);
|
|
30573
|
+
return fallback();
|
|
30574
|
+
}
|
|
30575
|
+
});
|
|
30576
|
+
}
|
|
30577
|
+
assertNotBlocked(paths) {
|
|
30578
|
+
for (const path of paths) {
|
|
30579
|
+
if (this.shouldBlockMutation(path)) {
|
|
30580
|
+
throw new ResourceLockedError(path);
|
|
30581
|
+
}
|
|
30582
|
+
}
|
|
30583
|
+
}
|
|
30584
|
+
};
|
|
30370
30585
|
var ResourceLockComponent = class extends ComponentEx {
|
|
30371
30586
|
/**
|
|
30372
30587
|
* The Obsidian app instance.
|
|
@@ -30617,52 +30832,15 @@ async function getSurvivingNotePaths(params, file) {
|
|
|
30617
30832
|
backlinks.clear(deletedNotePath);
|
|
30618
30833
|
}
|
|
30619
30834
|
return backlinks.keys();
|
|
30620
|
-
}
|
|
30621
|
-
function isGoneFromParent(result) {
|
|
30622
|
-
return result === "deleted" /* Deleted */ || result === "rescued" /* Rescued */;
|
|
30623
|
-
}
|
|
30624
|
-
|
|
30625
|
-
// src/obsidian/components/rename-delete-handler-component.ts
|
|
30626
|
-
init_component_ex();
|
|
30627
|
-
init_monkey_around_component();
|
|
30628
|
-
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
|
-
};
|
|
30835
|
+
}
|
|
30836
|
+
function isGoneFromParent(result) {
|
|
30837
|
+
return result === "deleted" /* Deleted */ || result === "rescued" /* Rescued */;
|
|
30838
|
+
}
|
|
30839
|
+
|
|
30840
|
+
// src/obsidian/components/rename-delete-handler-component.ts
|
|
30841
|
+
init_component_ex();
|
|
30842
|
+
init_monkey_around_component();
|
|
30843
|
+
var PATCH_TOKEN = /* @__PURE__ */ Symbol.for("renameDeleteHandler");
|
|
30666
30844
|
var DeleteHandler = class {
|
|
30667
30845
|
abortSignal;
|
|
30668
30846
|
app;
|
|
@@ -31516,6 +31694,43 @@ var RenameMap = class {
|
|
|
31516
31694
|
}
|
|
31517
31695
|
}
|
|
31518
31696
|
};
|
|
31697
|
+
var SettingsManager = class {
|
|
31698
|
+
renameDeleteHandlersMap;
|
|
31699
|
+
constructor() {
|
|
31700
|
+
this.renameDeleteHandlersMap = getObsidianDevUtilsState("renameDeleteHandlersMap", /* @__PURE__ */ new Map()).value;
|
|
31701
|
+
}
|
|
31702
|
+
getSettings() {
|
|
31703
|
+
const settingsBuilders = [...this.renameDeleteHandlersMap.values()].reverse();
|
|
31704
|
+
const settings = {};
|
|
31705
|
+
settings.isNote = (path) => isNote(path);
|
|
31706
|
+
settings.isPathIgnored = () => false;
|
|
31707
|
+
for (const settingsBuilder of settingsBuilders) {
|
|
31708
|
+
const newSettings = settingsBuilder();
|
|
31709
|
+
settings.shouldDeleteConflictingAttachments ||= newSettings.shouldDeleteConflictingAttachments ?? false;
|
|
31710
|
+
if (newSettings.emptyFolderBehavior) {
|
|
31711
|
+
settings.emptyFolderBehavior ??= newSettings.emptyFolderBehavior;
|
|
31712
|
+
}
|
|
31713
|
+
settings.shouldHandleDeletions ||= newSettings.shouldHandleDeletions ?? false;
|
|
31714
|
+
settings.shouldHandleRenames ||= newSettings.shouldHandleRenames ?? false;
|
|
31715
|
+
settings.shouldRenameAttachmentFiles ||= newSettings.shouldRenameAttachmentFiles ?? false;
|
|
31716
|
+
settings.shouldRenameAttachmentFolder ||= newSettings.shouldRenameAttachmentFolder ?? false;
|
|
31717
|
+
settings.shouldUpdateFileNameAliases ||= newSettings.shouldUpdateFileNameAliases ?? false;
|
|
31718
|
+
if (newSettings.getRescuePath) {
|
|
31719
|
+
settings.getRescuePath ??= newSettings.getRescuePath;
|
|
31720
|
+
}
|
|
31721
|
+
const isPathIgnored = settings.isPathIgnored;
|
|
31722
|
+
settings.isPathIgnored = (path) => isPathIgnored(path) || (newSettings.isPathIgnored?.(path) ?? false);
|
|
31723
|
+
const currentIsNote = settings.isNote;
|
|
31724
|
+
settings.isNote = (path) => currentIsNote(path) && (newSettings.isNote?.(path) ?? true);
|
|
31725
|
+
}
|
|
31726
|
+
settings.emptyFolderBehavior ??= "Keep" /* Keep */;
|
|
31727
|
+
return settings;
|
|
31728
|
+
}
|
|
31729
|
+
isNoteEx(path) {
|
|
31730
|
+
const settings = this.getSettings();
|
|
31731
|
+
return settings.isNote?.(path) ?? false;
|
|
31732
|
+
}
|
|
31733
|
+
};
|
|
31519
31734
|
var RenameDeleteHandlerComponent = class extends ComponentEx {
|
|
31520
31735
|
/**
|
|
31521
31736
|
* The abort signal component whose signal cancels in-flight rename operations.
|
|
@@ -32113,142 +32328,15 @@ function showSandboxNotice(app, demoedPluginId) {
|
|
|
32113
32328
|
}
|
|
32114
32329
|
|
|
32115
32330
|
// src/__merged.ts
|
|
32331
|
+
init_demo_vault_naming();
|
|
32116
32332
|
init_desktop_demo_vault_opener();
|
|
32117
32333
|
|
|
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
32334
|
// src/obsidian/editor-extension-registrar.ts
|
|
32247
32335
|
var editor_extension_registrar_exports = {};
|
|
32248
32336
|
__export(editor_extension_registrar_exports, {
|
|
32249
32337
|
PluginEditorExtensionRegistrar: () => PluginEditorExtensionRegistrar
|
|
32250
32338
|
});
|
|
32251
|
-
var
|
|
32339
|
+
var import_obsidian123 = require("obsidian");
|
|
32252
32340
|
var PluginEditorExtensionRegistrar = class {
|
|
32253
32341
|
/**
|
|
32254
32342
|
* Creates a new instance of the {@link PluginEditorExtensionRegistrar} class.
|
|
@@ -32274,7 +32362,7 @@ var editor_suggest_registrar_exports = {};
|
|
|
32274
32362
|
__export(editor_suggest_registrar_exports, {
|
|
32275
32363
|
PluginEditorSuggestRegistrar: () => PluginEditorSuggestRegistrar
|
|
32276
32364
|
});
|
|
32277
|
-
var
|
|
32365
|
+
var import_obsidian124 = require("obsidian");
|
|
32278
32366
|
var PluginEditorSuggestRegistrar = class {
|
|
32279
32367
|
/**
|
|
32280
32368
|
* Creates a new instance of the {@link PluginEditorSuggestRegistrar} class.
|
|
@@ -32300,7 +32388,7 @@ var extensions_registrar_exports = {};
|
|
|
32300
32388
|
__export(extensions_registrar_exports, {
|
|
32301
32389
|
PluginExtensionsRegistrar: () => PluginExtensionsRegistrar
|
|
32302
32390
|
});
|
|
32303
|
-
var
|
|
32391
|
+
var import_obsidian125 = require("obsidian");
|
|
32304
32392
|
var PluginExtensionsRegistrar = class {
|
|
32305
32393
|
/**
|
|
32306
32394
|
* Creates a new instance of the {@link PluginExtensionsRegistrar} class.
|
|
@@ -32329,7 +32417,7 @@ __export(folder_note_exports, {
|
|
|
32329
32417
|
resolveFolderNote: () => resolveFolderNote,
|
|
32330
32418
|
resolveFolderNoteConfig: () => resolveFolderNoteConfig
|
|
32331
32419
|
});
|
|
32332
|
-
var
|
|
32420
|
+
var import_obsidian126 = require("obsidian");
|
|
32333
32421
|
init_path();
|
|
32334
32422
|
init_string();
|
|
32335
32423
|
var FolderNoteLocation = /* @__PURE__ */ ((FolderNoteLocation2) => {
|
|
@@ -32363,7 +32451,7 @@ function resolveFolderNote(params) {
|
|
|
32363
32451
|
return null;
|
|
32364
32452
|
}
|
|
32365
32453
|
for (const extension2 of config.extensions) {
|
|
32366
|
-
const file = app.vault.getFileByPath((0,
|
|
32454
|
+
const file = app.vault.getFileByPath((0, import_obsidian126.normalizePath)(join(parentFolderPath2, `${noteName}.${extension2}`)));
|
|
32367
32455
|
if (file) {
|
|
32368
32456
|
return file;
|
|
32369
32457
|
}
|
|
@@ -32450,7 +32538,7 @@ var hover_link_source_registrar_exports = {};
|
|
|
32450
32538
|
__export(hover_link_source_registrar_exports, {
|
|
32451
32539
|
PluginHoverLinkSourceRegistrar: () => PluginHoverLinkSourceRegistrar
|
|
32452
32540
|
});
|
|
32453
|
-
var
|
|
32541
|
+
var import_obsidian127 = require("obsidian");
|
|
32454
32542
|
var PluginHoverLinkSourceRegistrar = class {
|
|
32455
32543
|
/**
|
|
32456
32544
|
* Creates a new instance of the {@link PluginHoverLinkSourceRegistrar} class.
|
|
@@ -32498,7 +32586,7 @@ var loop_exports = {};
|
|
|
32498
32586
|
__export(loop_exports, {
|
|
32499
32587
|
loop: () => loop
|
|
32500
32588
|
});
|
|
32501
|
-
var
|
|
32589
|
+
var import_obsidian128 = require("obsidian");
|
|
32502
32590
|
init_abort_controller();
|
|
32503
32591
|
init_async();
|
|
32504
32592
|
init_debug();
|
|
@@ -32921,7 +33009,7 @@ var markdown_post_processor_registrar_exports = {};
|
|
|
32921
33009
|
__export(markdown_post_processor_registrar_exports, {
|
|
32922
33010
|
PluginMarkdownPostProcessorRegistrar: () => PluginMarkdownPostProcessorRegistrar
|
|
32923
33011
|
});
|
|
32924
|
-
var
|
|
33012
|
+
var import_obsidian129 = require("obsidian");
|
|
32925
33013
|
init_async();
|
|
32926
33014
|
var PluginMarkdownPostProcessorRegistrar = class {
|
|
32927
33015
|
/**
|
|
@@ -32968,7 +33056,7 @@ __export(markdown_exports, {
|
|
|
32968
33056
|
renderInternalLink: () => renderInternalLink
|
|
32969
33057
|
});
|
|
32970
33058
|
init_i18next();
|
|
32971
|
-
var
|
|
33059
|
+
var import_obsidian130 = require("obsidian");
|
|
32972
33060
|
init_async();
|
|
32973
33061
|
init_object_utils();
|
|
32974
33062
|
init_monkey_around_component();
|
|
@@ -33052,21 +33140,21 @@ var LinkDomEventsHandlers = class {
|
|
|
33052
33140
|
onExternalLinkClick($event, targetEl, linkText) {
|
|
33053
33141
|
$event.preventDefault();
|
|
33054
33142
|
if (!isUrl(linkText)) {
|
|
33055
|
-
new
|
|
33143
|
+
new import_obsidian130.Notice(t(($) => $.obsidianDevUtils.notices.failedToOpenUrl, { url: linkText }));
|
|
33056
33144
|
return;
|
|
33057
33145
|
}
|
|
33058
|
-
const modifierPaneType =
|
|
33146
|
+
const modifierPaneType = import_obsidian130.Keymap.isModEvent($event);
|
|
33059
33147
|
targetEl.win.open(linkText, typeof modifierPaneType === "boolean" ? "" : modifierPaneType);
|
|
33060
33148
|
}
|
|
33061
33149
|
onExternalLinkRightClick($event, targetEl, linkText) {
|
|
33062
|
-
const menu =
|
|
33150
|
+
const menu = import_obsidian130.Menu.forEvent($event);
|
|
33063
33151
|
menu.addSections(EXTERNAL_LINK_MENU_SECTIONS);
|
|
33064
33152
|
addCopyMenuItem(menu, targetEl);
|
|
33065
33153
|
this.info.app.workspace.handleExternalLinkContextMenu(menu, linkText);
|
|
33066
33154
|
}
|
|
33067
33155
|
onInternalLinkClick($event, _targetEl, linkText) {
|
|
33068
33156
|
$event.preventDefault();
|
|
33069
|
-
invokeAsyncSafely(() => this.info.app.workspace.openLinkText(linkText, this.info.path,
|
|
33157
|
+
invokeAsyncSafely(() => this.info.app.workspace.openLinkText(linkText, this.info.path, import_obsidian130.Keymap.isModEvent($event)));
|
|
33070
33158
|
}
|
|
33071
33159
|
onInternalLinkDrag($event, _targetEl, linkText, title) {
|
|
33072
33160
|
const dragManager = this.info.app.dragManager;
|
|
@@ -33083,7 +33171,7 @@ var LinkDomEventsHandlers = class {
|
|
|
33083
33171
|
});
|
|
33084
33172
|
}
|
|
33085
33173
|
onInternalLinkRightClick($event, targetEl, linkText) {
|
|
33086
|
-
const menu =
|
|
33174
|
+
const menu = import_obsidian130.Menu.forEvent($event);
|
|
33087
33175
|
menu.setParentElement(targetEl);
|
|
33088
33176
|
menu.addSections(INTERNAL_LINK_MENU_SECTIONS);
|
|
33089
33177
|
addCopyMenuItem(menu, targetEl);
|
|
@@ -33102,12 +33190,12 @@ async function fullRender(params) {
|
|
|
33102
33190
|
if (params.component) {
|
|
33103
33191
|
component = params.component;
|
|
33104
33192
|
} else {
|
|
33105
|
-
component = new
|
|
33193
|
+
component = new import_obsidian130.Component();
|
|
33106
33194
|
component.load();
|
|
33107
33195
|
shouldUnloadComponent = true;
|
|
33108
33196
|
}
|
|
33109
33197
|
const _ = __using(_stack, component.addChild(new EmbedByExtensionMdPatchComponent(params.app.embedRegistry.embedByExtension)));
|
|
33110
|
-
await
|
|
33198
|
+
await import_obsidian130.MarkdownRenderer.render(params.app, params.markdown, params.el, sourcePath, component);
|
|
33111
33199
|
if (shouldUnloadComponent) {
|
|
33112
33200
|
component.unload();
|
|
33113
33201
|
}
|
|
@@ -33130,10 +33218,10 @@ async function markdownToHtml(params) {
|
|
|
33130
33218
|
markdown,
|
|
33131
33219
|
sourcePath
|
|
33132
33220
|
} = params;
|
|
33133
|
-
const component = new
|
|
33221
|
+
const component = new import_obsidian130.Component();
|
|
33134
33222
|
component.load();
|
|
33135
33223
|
const renderDiv = createDiv();
|
|
33136
|
-
await
|
|
33224
|
+
await import_obsidian130.MarkdownRenderer.render(app, markdown, renderDiv, sourcePath ?? "", component);
|
|
33137
33225
|
const html2 = renderDiv.innerHTML;
|
|
33138
33226
|
component.unload();
|
|
33139
33227
|
return html2;
|
|
@@ -33144,7 +33232,7 @@ function registerLinkHandlers(params) {
|
|
|
33144
33232
|
el,
|
|
33145
33233
|
sourcePath
|
|
33146
33234
|
} = params;
|
|
33147
|
-
|
|
33235
|
+
import_obsidian130.MarkdownPreviewRenderer.registerDomEvents(
|
|
33148
33236
|
el,
|
|
33149
33237
|
new LinkDomEventsHandlers(
|
|
33150
33238
|
new FixedZIndexDomEventsHandlersInfo({
|
|
@@ -33239,7 +33327,7 @@ __export(alert_exports, {
|
|
|
33239
33327
|
alert: () => alert
|
|
33240
33328
|
});
|
|
33241
33329
|
init_i18next();
|
|
33242
|
-
var
|
|
33330
|
+
var import_obsidian131 = require("obsidian");
|
|
33243
33331
|
init_css_class();
|
|
33244
33332
|
init_modal();
|
|
33245
33333
|
var AlertModal = class extends ModalBase {
|
|
@@ -33259,7 +33347,7 @@ var AlertModal = class extends ModalBase {
|
|
|
33259
33347
|
onOpen() {
|
|
33260
33348
|
this.titleEl.setText(this.title);
|
|
33261
33349
|
this.contentEl.createEl("p", { text: this.message });
|
|
33262
|
-
const okButton = new
|
|
33350
|
+
const okButton = new import_obsidian131.ButtonComponent(this.contentEl);
|
|
33263
33351
|
okButton.setButtonText(this.okButtonText);
|
|
33264
33352
|
okButton.setCta();
|
|
33265
33353
|
okButton.onClick(this.close.bind(this));
|
|
@@ -33280,7 +33368,7 @@ var minimizable_modal_exports = {};
|
|
|
33280
33368
|
__export(minimizable_modal_exports, {
|
|
33281
33369
|
MinimizableModal: () => MinimizableModal
|
|
33282
33370
|
});
|
|
33283
|
-
var
|
|
33371
|
+
var import_obsidian132 = require("obsidian");
|
|
33284
33372
|
init_monkey_around_component();
|
|
33285
33373
|
init_css_class();
|
|
33286
33374
|
init_plugin_context();
|
|
@@ -33322,7 +33410,7 @@ var PeekLockComponent = class extends MonkeyAroundComponent {
|
|
|
33322
33410
|
onload() {
|
|
33323
33411
|
super.onload();
|
|
33324
33412
|
this.registerMethodPatch({
|
|
33325
|
-
$object:
|
|
33413
|
+
$object: import_obsidian132.Modal.prototype,
|
|
33326
33414
|
methodName: "open",
|
|
33327
33415
|
patchHandler: ({ fallback, originalThis }) => {
|
|
33328
33416
|
blockOrFallback(originalThis, fallback);
|
|
@@ -33432,7 +33520,7 @@ var MinimizableModal = class {
|
|
|
33432
33520
|
}
|
|
33433
33521
|
createMinimizeButton() {
|
|
33434
33522
|
const buttonEl = this.modal.modalEl.createEl("button", { cls: "minimize-button" /* MinimizeButton */ });
|
|
33435
|
-
(0,
|
|
33523
|
+
(0, import_obsidian132.setIcon)(buttonEl, MINIMIZE_ICON_ID);
|
|
33436
33524
|
buttonEl.addEventListener("click", () => {
|
|
33437
33525
|
this.minimize();
|
|
33438
33526
|
});
|
|
@@ -33446,11 +33534,11 @@ var MinimizableModal = class {
|
|
|
33446
33534
|
text: this.modal.titleEl.textContent
|
|
33447
33535
|
});
|
|
33448
33536
|
const restoreButtonEl = barEl.createEl("button", { cls: "restore-button" /* RestoreButton */ });
|
|
33449
|
-
(0,
|
|
33537
|
+
(0, import_obsidian132.setIcon)(restoreButtonEl, RESTORE_ICON_ID);
|
|
33450
33538
|
if (this.shouldShowCancelButton) {
|
|
33451
33539
|
const cancelButtonEl = barEl.createEl("button", { cls: "cancel-button" /* CancelButton */ });
|
|
33452
|
-
(0,
|
|
33453
|
-
(0,
|
|
33540
|
+
(0, import_obsidian132.setIcon)(cancelButtonEl, CANCEL_ICON_ID);
|
|
33541
|
+
(0, import_obsidian132.setTooltip)(cancelButtonEl, "Cancel");
|
|
33454
33542
|
cancelButtonEl.addEventListener("click", ($event) => {
|
|
33455
33543
|
$event.stopPropagation();
|
|
33456
33544
|
this.modal.close();
|
|
@@ -33589,7 +33677,7 @@ __export(modal_command_builder_exports, {
|
|
|
33589
33677
|
ModalCommandBuilder: () => ModalCommandBuilder,
|
|
33590
33678
|
ModalCommandsRenderMode: () => ModalCommandsRenderMode
|
|
33591
33679
|
});
|
|
33592
|
-
var
|
|
33680
|
+
var import_obsidian133 = require("obsidian");
|
|
33593
33681
|
init_css_class();
|
|
33594
33682
|
init_plugin_context();
|
|
33595
33683
|
var KEYS_MAP = /* @__PURE__ */ new Map([
|
|
@@ -33666,7 +33754,7 @@ var ModalCommandBuilder = class {
|
|
|
33666
33754
|
initButton: null,
|
|
33667
33755
|
initInstruction: (purposeEl, scope) => {
|
|
33668
33756
|
purposeEl.appendText(" ");
|
|
33669
|
-
const dropdownComponent = new
|
|
33757
|
+
const dropdownComponent = new import_obsidian133.DropdownComponent(purposeEl);
|
|
33670
33758
|
command.onInit(dropdownComponent);
|
|
33671
33759
|
dropdownComponent.onChange((value) => {
|
|
33672
33760
|
command.onChange(value);
|
|
@@ -33773,10 +33861,10 @@ var ModalCommandBuilder = class {
|
|
|
33773
33861
|
return "ctrl";
|
|
33774
33862
|
}
|
|
33775
33863
|
case "Meta": {
|
|
33776
|
-
return
|
|
33864
|
+
return import_obsidian133.Platform.isMacOS ? "cmd" : "win";
|
|
33777
33865
|
}
|
|
33778
33866
|
case "Mod": {
|
|
33779
|
-
return
|
|
33867
|
+
return import_obsidian133.Platform.isMacOS ? "cmd" : "ctrl";
|
|
33780
33868
|
}
|
|
33781
33869
|
case "Shift": {
|
|
33782
33870
|
return "shift";
|
|
@@ -33814,7 +33902,7 @@ var ModalCommandBuilder = class {
|
|
|
33814
33902
|
const buttonEl = stripEl.createEl("button", { type: "button" });
|
|
33815
33903
|
addPluginCssClasses(buttonEl, "modal-command" /* ModalCommand */);
|
|
33816
33904
|
buttonEl.createSpan({ text: entry.purpose });
|
|
33817
|
-
if (!
|
|
33905
|
+
if (!import_obsidian133.Platform.isMobile) {
|
|
33818
33906
|
const hotkeyEl = buttonEl.createSpan({ text: entry.commandText });
|
|
33819
33907
|
addPluginCssClasses(hotkeyEl, "modal-command-hotkey" /* ModalCommandHotkey */);
|
|
33820
33908
|
}
|
|
@@ -33904,7 +33992,7 @@ var prompt_exports = {};
|
|
|
33904
33992
|
__export(prompt_exports, {
|
|
33905
33993
|
prompt: () => prompt
|
|
33906
33994
|
});
|
|
33907
|
-
var
|
|
33995
|
+
var import_obsidian134 = require("obsidian");
|
|
33908
33996
|
init_async();
|
|
33909
33997
|
init_function();
|
|
33910
33998
|
init_object_utils();
|
|
@@ -33939,7 +34027,7 @@ var PromptModal = class extends ModalBase {
|
|
|
33939
34027
|
}
|
|
33940
34028
|
onOpen() {
|
|
33941
34029
|
this.titleEl.setText(this.title);
|
|
33942
|
-
const textComponent = new
|
|
34030
|
+
const textComponent = new import_obsidian134.TextComponent(this.contentEl);
|
|
33943
34031
|
const inputEl = textComponent.inputEl;
|
|
33944
34032
|
inputEl.setAttribute("spellcheck", String(isSpellcheckEnabled(this.app)));
|
|
33945
34033
|
const validate = async (shouldReport) => {
|
|
@@ -33974,14 +34062,14 @@ var PromptModal = class extends ModalBase {
|
|
|
33974
34062
|
inputEl.addEventListener("input", convertAsyncToSync(handleInput));
|
|
33975
34063
|
inputEl.addEventListener("focus", convertAsyncToSync(handleFocus));
|
|
33976
34064
|
invokeAsyncSafely(() => validate(false));
|
|
33977
|
-
const okButton = new
|
|
34065
|
+
const okButton = new import_obsidian134.ButtonComponent(this.contentEl);
|
|
33978
34066
|
okButton.setButtonText(this.okButtonText);
|
|
33979
34067
|
okButton.setCta();
|
|
33980
34068
|
okButton.onClick((event) => {
|
|
33981
34069
|
this.handleOk(event, textComponent);
|
|
33982
34070
|
});
|
|
33983
34071
|
okButton.setClass("ok-button" /* OkButton */);
|
|
33984
|
-
const cancelButton = new
|
|
34072
|
+
const cancelButton = new import_obsidian134.ButtonComponent(this.contentEl);
|
|
33985
34073
|
cancelButton.setButtonText(this.cancelButtonText);
|
|
33986
34074
|
cancelButton.onClick(this.close.bind(this));
|
|
33987
34075
|
cancelButton.setClass("cancel-button" /* CancelButton */);
|
|
@@ -34016,11 +34104,11 @@ var select_item_exports = {};
|
|
|
34016
34104
|
__export(select_item_exports, {
|
|
34017
34105
|
selectItem: () => selectItem
|
|
34018
34106
|
});
|
|
34019
|
-
var
|
|
34107
|
+
var import_obsidian135 = require("obsidian");
|
|
34020
34108
|
init_css_class();
|
|
34021
34109
|
init_plugin_context();
|
|
34022
34110
|
init_modal();
|
|
34023
|
-
var ItemSelectModal = class extends
|
|
34111
|
+
var ItemSelectModal = class extends import_obsidian135.FuzzySuggestModal {
|
|
34024
34112
|
isSelected = false;
|
|
34025
34113
|
items;
|
|
34026
34114
|
itemTextFunction;
|
|
@@ -34345,10 +34433,10 @@ var pdf_exports = {};
|
|
|
34345
34433
|
__export(pdf_exports, {
|
|
34346
34434
|
printToPdf: () => printToPdf
|
|
34347
34435
|
});
|
|
34348
|
-
var
|
|
34436
|
+
var import_obsidian136 = require("obsidian");
|
|
34349
34437
|
var ELECTRON_PRINT_TO_PDF_CHANNEL = "print-to-pdf";
|
|
34350
34438
|
async function printToPdf(element, options) {
|
|
34351
|
-
if (
|
|
34439
|
+
if (import_obsidian136.Platform.isMobile) {
|
|
34352
34440
|
throw new Error("Printing to PDF is not supported on mobile devices.");
|
|
34353
34441
|
}
|
|
34354
34442
|
const printDiv = activeDocument.body.createDiv("print");
|
|
@@ -34381,7 +34469,7 @@ var plugin_cli_handler_registrar_exports = {};
|
|
|
34381
34469
|
__export(plugin_cli_handler_registrar_exports, {
|
|
34382
34470
|
PluginCliHandlerRegistrar: () => PluginCliHandlerRegistrar
|
|
34383
34471
|
});
|
|
34384
|
-
var
|
|
34472
|
+
var import_obsidian137 = require("obsidian");
|
|
34385
34473
|
init_async();
|
|
34386
34474
|
var PluginCliHandlerRegistrar = class {
|
|
34387
34475
|
/**
|
|
@@ -34435,6 +34523,7 @@ var ObsidianPluginRepoPaths = /* @__PURE__ */ ((ObsidianPluginRepoPaths2) => {
|
|
|
34435
34523
|
ObsidianPluginRepoPaths2["EslintConfigMts"] = "eslint.config.mts";
|
|
34436
34524
|
ObsidianPluginRepoPaths2["EslintConfigTs"] = "eslint.config.ts";
|
|
34437
34525
|
ObsidianPluginRepoPaths2["HotReload"] = ".hotreload";
|
|
34526
|
+
ObsidianPluginRepoPaths2["License"] = "LICENSE";
|
|
34438
34527
|
ObsidianPluginRepoPaths2["MainCss"] = "main.css";
|
|
34439
34528
|
ObsidianPluginRepoPaths2["MainJs"] = "main.js";
|
|
34440
34529
|
ObsidianPluginRepoPaths2["MainTs"] = "main.ts";
|
|
@@ -34945,7 +35034,7 @@ __export(plugin_settings_tab_exports, {
|
|
|
34945
35034
|
PluginSettingsTabBase: () => PluginSettingsTabBase,
|
|
34946
35035
|
SAVE_TO_FILE_CONTEXT: () => SAVE_TO_FILE_CONTEXT
|
|
34947
35036
|
});
|
|
34948
|
-
var
|
|
35037
|
+
var import_obsidian155 = require("obsidian");
|
|
34949
35038
|
init_async_events();
|
|
34950
35039
|
init_async();
|
|
34951
35040
|
init_function();
|
|
@@ -34983,7 +35072,7 @@ var text_based_component_exports = {};
|
|
|
34983
35072
|
__export(text_based_component_exports, {
|
|
34984
35073
|
getTextBasedComponentValue: () => getTextBasedComponentValue
|
|
34985
35074
|
});
|
|
34986
|
-
var
|
|
35075
|
+
var import_obsidian138 = require("obsidian");
|
|
34987
35076
|
var AbstractTextComponentWrapper = class {
|
|
34988
35077
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- `unknown` doesn't work, getting compiler errors.
|
|
34989
35078
|
constructor(abstractTextComponent) {
|
|
@@ -35005,7 +35094,7 @@ function getTextBasedComponentValue($unknown) {
|
|
|
35005
35094
|
if (isTextBasedComponent($unknown)) {
|
|
35006
35095
|
return $unknown;
|
|
35007
35096
|
}
|
|
35008
|
-
if ($unknown instanceof
|
|
35097
|
+
if ($unknown instanceof import_obsidian138.AbstractTextComponent) {
|
|
35009
35098
|
return new AbstractTextComponentWrapper($unknown);
|
|
35010
35099
|
}
|
|
35011
35100
|
return null;
|
|
@@ -35020,7 +35109,7 @@ var validator_component_exports = {};
|
|
|
35020
35109
|
__export(validator_component_exports, {
|
|
35021
35110
|
getValidatorComponent: () => getValidatorComponent
|
|
35022
35111
|
});
|
|
35023
|
-
var
|
|
35112
|
+
var import_obsidian139 = require("obsidian");
|
|
35024
35113
|
init_css_class();
|
|
35025
35114
|
init_plugin_context();
|
|
35026
35115
|
var OverlayValidatorComponent = class {
|
|
@@ -35081,28 +35170,28 @@ function getValidatorComponent($unknown) {
|
|
|
35081
35170
|
if (isValidatorComponent($unknown)) {
|
|
35082
35171
|
return $unknown;
|
|
35083
35172
|
}
|
|
35084
|
-
if ($unknown instanceof
|
|
35173
|
+
if ($unknown instanceof import_obsidian139.ColorComponent) {
|
|
35085
35174
|
return new ValidatorElementWrapper($unknown.colorPickerEl);
|
|
35086
35175
|
}
|
|
35087
|
-
if ($unknown instanceof
|
|
35176
|
+
if ($unknown instanceof import_obsidian139.DropdownComponent) {
|
|
35088
35177
|
return new ValidatorElementWrapper($unknown.selectEl);
|
|
35089
35178
|
}
|
|
35090
|
-
if ($unknown instanceof
|
|
35179
|
+
if ($unknown instanceof import_obsidian139.ProgressBarComponent) {
|
|
35091
35180
|
return new OverlayValidatorComponent($unknown.progressBar);
|
|
35092
35181
|
}
|
|
35093
|
-
if ($unknown instanceof
|
|
35182
|
+
if ($unknown instanceof import_obsidian139.SearchComponent) {
|
|
35094
35183
|
return new ValidatorElementWrapper($unknown.inputEl);
|
|
35095
35184
|
}
|
|
35096
|
-
if ($unknown instanceof
|
|
35185
|
+
if ($unknown instanceof import_obsidian139.SliderComponent) {
|
|
35097
35186
|
return new ValidatorElementWrapper($unknown.sliderEl);
|
|
35098
35187
|
}
|
|
35099
|
-
if ($unknown instanceof
|
|
35188
|
+
if ($unknown instanceof import_obsidian139.TextAreaComponent) {
|
|
35100
35189
|
return new ValidatorElementWrapper($unknown.inputEl);
|
|
35101
35190
|
}
|
|
35102
|
-
if ($unknown instanceof
|
|
35191
|
+
if ($unknown instanceof import_obsidian139.TextComponent) {
|
|
35103
35192
|
return new ValidatorElementWrapper($unknown.inputEl);
|
|
35104
35193
|
}
|
|
35105
|
-
if ($unknown instanceof
|
|
35194
|
+
if ($unknown instanceof import_obsidian139.ToggleComponent) {
|
|
35106
35195
|
return new OverlayValidatorComponent($unknown.toggleEl);
|
|
35107
35196
|
}
|
|
35108
35197
|
return null;
|
|
@@ -35117,7 +35206,7 @@ __export(setting_ex_exports, {
|
|
|
35117
35206
|
SettingEx: () => SettingEx,
|
|
35118
35207
|
adoptSettingEx: () => adoptSettingEx
|
|
35119
35208
|
});
|
|
35120
|
-
var
|
|
35209
|
+
var import_obsidian153 = require("obsidian");
|
|
35121
35210
|
init_object_utils();
|
|
35122
35211
|
|
|
35123
35212
|
// src/obsidian/setting-components/checkbox-component.ts
|
|
@@ -35125,10 +35214,10 @@ var checkbox_component_exports = {};
|
|
|
35125
35214
|
__export(checkbox_component_exports, {
|
|
35126
35215
|
CheckboxComponent: () => CheckboxComponent
|
|
35127
35216
|
});
|
|
35128
|
-
var
|
|
35217
|
+
var import_obsidian140 = require("obsidian");
|
|
35129
35218
|
init_css_class();
|
|
35130
35219
|
init_plugin_context();
|
|
35131
|
-
var CheckboxComponent = class extends
|
|
35220
|
+
var CheckboxComponent = class extends import_obsidian140.ValueComponent {
|
|
35132
35221
|
/**
|
|
35133
35222
|
* An input element of the checkbox.
|
|
35134
35223
|
*/
|
|
@@ -35205,12 +35294,12 @@ var code_highlighter_component_exports = {};
|
|
|
35205
35294
|
__export(code_highlighter_component_exports, {
|
|
35206
35295
|
CodeHighlighterComponent: () => CodeHighlighterComponent
|
|
35207
35296
|
});
|
|
35208
|
-
var
|
|
35297
|
+
var import_obsidian141 = require("obsidian");
|
|
35209
35298
|
init_array();
|
|
35210
35299
|
init_async();
|
|
35211
35300
|
init_css_class();
|
|
35212
35301
|
init_plugin_context();
|
|
35213
|
-
var CodeHighlighterComponent = class extends
|
|
35302
|
+
var CodeHighlighterComponent = class extends import_obsidian141.ValueComponent {
|
|
35214
35303
|
/**
|
|
35215
35304
|
* An input element of the component.
|
|
35216
35305
|
*
|
|
@@ -35252,7 +35341,7 @@ var CodeHighlighterComponent = class extends import_obsidian142.ValueComponent {
|
|
|
35252
35341
|
addPluginCssClasses(containerEl, "code-highlighter-component" /* CodeHighlighterComponent */);
|
|
35253
35342
|
const wrapper = containerEl.createDiv();
|
|
35254
35343
|
addPluginCssClasses(wrapper, "setting-component-wrapper" /* SettingComponentWrapper */);
|
|
35255
|
-
this.textAreaComponent = new
|
|
35344
|
+
this.textAreaComponent = new import_obsidian141.TextAreaComponent(wrapper);
|
|
35256
35345
|
this.preEl = wrapper.createEl("pre", {
|
|
35257
35346
|
attr: {
|
|
35258
35347
|
tabIndex: "-1"
|
|
@@ -35445,7 +35534,7 @@ var date_component_exports = {};
|
|
|
35445
35534
|
__export(date_component_exports, {
|
|
35446
35535
|
DateComponent: () => DateComponent
|
|
35447
35536
|
});
|
|
35448
|
-
var
|
|
35537
|
+
var import_obsidian143 = require("obsidian");
|
|
35449
35538
|
init_object_utils();
|
|
35450
35539
|
init_css_class();
|
|
35451
35540
|
|
|
@@ -35460,10 +35549,10 @@ var typed_text_component_exports = {};
|
|
|
35460
35549
|
__export(typed_text_component_exports, {
|
|
35461
35550
|
TypedTextComponent: () => TypedTextComponent
|
|
35462
35551
|
});
|
|
35463
|
-
var
|
|
35552
|
+
var import_obsidian142 = require("obsidian");
|
|
35464
35553
|
init_css_class();
|
|
35465
35554
|
init_plugin_context();
|
|
35466
|
-
var TypedTextComponent = class extends
|
|
35555
|
+
var TypedTextComponent = class extends import_obsidian142.ValueComponent {
|
|
35467
35556
|
/**
|
|
35468
35557
|
* An input element of the component.
|
|
35469
35558
|
*/
|
|
@@ -35487,7 +35576,7 @@ var TypedTextComponent = class extends import_obsidian143.ValueComponent {
|
|
|
35487
35576
|
*/
|
|
35488
35577
|
constructor(params) {
|
|
35489
35578
|
super();
|
|
35490
|
-
this.textComponent = new
|
|
35579
|
+
this.textComponent = new import_obsidian142.TextComponent(params.containerEl);
|
|
35491
35580
|
this.inputEl = this.textComponent.inputEl;
|
|
35492
35581
|
this.inputEl.type = params.type;
|
|
35493
35582
|
addPluginCssClasses(params.containerEl, params.cssClass);
|
|
@@ -35586,7 +35675,7 @@ var TypedRangeTextComponent = class extends TypedTextComponent {
|
|
|
35586
35675
|
};
|
|
35587
35676
|
|
|
35588
35677
|
// src/obsidian/setting-components/date-component.ts
|
|
35589
|
-
var moment2 = extractDefaultExportInterop(
|
|
35678
|
+
var moment2 = extractDefaultExportInterop(import_obsidian143.moment);
|
|
35590
35679
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
35591
35680
|
var DateComponent = class extends TypedRangeTextComponent {
|
|
35592
35681
|
/**
|
|
@@ -35626,10 +35715,10 @@ var date_time_component_exports = {};
|
|
|
35626
35715
|
__export(date_time_component_exports, {
|
|
35627
35716
|
DateTimeComponent: () => DateTimeComponent
|
|
35628
35717
|
});
|
|
35629
|
-
var
|
|
35718
|
+
var import_obsidian144 = require("obsidian");
|
|
35630
35719
|
init_object_utils();
|
|
35631
35720
|
init_css_class();
|
|
35632
|
-
var moment3 = extractDefaultExportInterop(
|
|
35721
|
+
var moment3 = extractDefaultExportInterop(import_obsidian144.moment);
|
|
35633
35722
|
var DATE_TIME_FORMAT = "YYYY-MM-DDTHH:mm";
|
|
35634
35723
|
var DateTimeComponent = class extends TypedRangeTextComponent {
|
|
35635
35724
|
/**
|
|
@@ -35769,10 +35858,10 @@ var month_component_exports = {};
|
|
|
35769
35858
|
__export(month_component_exports, {
|
|
35770
35859
|
MonthComponent: () => MonthComponent
|
|
35771
35860
|
});
|
|
35772
|
-
var
|
|
35861
|
+
var import_obsidian145 = require("obsidian");
|
|
35773
35862
|
init_object_utils();
|
|
35774
35863
|
init_css_class();
|
|
35775
|
-
var moment4 = extractDefaultExportInterop(
|
|
35864
|
+
var moment4 = extractDefaultExportInterop(import_obsidian145.moment);
|
|
35776
35865
|
var DATE_FORMAT2 = "YYYY-MM";
|
|
35777
35866
|
var MonthComponent = class extends TypedRangeTextComponent {
|
|
35778
35867
|
/**
|
|
@@ -35820,10 +35909,10 @@ var multiple_dropdown_component_exports = {};
|
|
|
35820
35909
|
__export(multiple_dropdown_component_exports, {
|
|
35821
35910
|
MultipleDropdownComponent: () => MultipleDropdownComponent
|
|
35822
35911
|
});
|
|
35823
|
-
var
|
|
35912
|
+
var import_obsidian146 = require("obsidian");
|
|
35824
35913
|
init_css_class();
|
|
35825
35914
|
init_plugin_context();
|
|
35826
|
-
var MultipleDropdownComponent = class extends
|
|
35915
|
+
var MultipleDropdownComponent = class extends import_obsidian146.ValueComponent {
|
|
35827
35916
|
/**
|
|
35828
35917
|
* A select element of the component.
|
|
35829
35918
|
*
|
|
@@ -35852,7 +35941,7 @@ var MultipleDropdownComponent = class extends import_obsidian147.ValueComponent
|
|
|
35852
35941
|
*/
|
|
35853
35942
|
constructor(containerEl) {
|
|
35854
35943
|
super();
|
|
35855
|
-
this.dropdownComponent = new
|
|
35944
|
+
this.dropdownComponent = new import_obsidian146.DropdownComponent(containerEl);
|
|
35856
35945
|
this.dropdownComponent.selectEl.multiple = true;
|
|
35857
35946
|
addPluginCssClasses(containerEl, "multiple-dropdown-component" /* MultipleDropdownComponent */);
|
|
35858
35947
|
}
|
|
@@ -36025,10 +36114,10 @@ var multiple_text_component_exports = {};
|
|
|
36025
36114
|
__export(multiple_text_component_exports, {
|
|
36026
36115
|
MultipleTextComponent: () => MultipleTextComponent
|
|
36027
36116
|
});
|
|
36028
|
-
var
|
|
36117
|
+
var import_obsidian147 = require("obsidian");
|
|
36029
36118
|
init_css_class();
|
|
36030
36119
|
init_plugin_context();
|
|
36031
|
-
var MultipleTextComponent = class extends
|
|
36120
|
+
var MultipleTextComponent = class extends import_obsidian147.ValueComponent {
|
|
36032
36121
|
/**
|
|
36033
36122
|
* An input element of the component.
|
|
36034
36123
|
*
|
|
@@ -36057,7 +36146,7 @@ var MultipleTextComponent = class extends import_obsidian148.ValueComponent {
|
|
|
36057
36146
|
*/
|
|
36058
36147
|
constructor(containerEl) {
|
|
36059
36148
|
super();
|
|
36060
|
-
this.textAreaComponent = new
|
|
36149
|
+
this.textAreaComponent = new import_obsidian147.TextAreaComponent(containerEl);
|
|
36061
36150
|
addPluginCssClasses(containerEl, "multiple-text-component" /* MultipleTextComponent */);
|
|
36062
36151
|
}
|
|
36063
36152
|
/**
|
|
@@ -36319,7 +36408,7 @@ var time_component_exports = {};
|
|
|
36319
36408
|
__export(time_component_exports, {
|
|
36320
36409
|
TimeComponent: () => TimeComponent
|
|
36321
36410
|
});
|
|
36322
|
-
var
|
|
36411
|
+
var import_obsidian148 = require("obsidian");
|
|
36323
36412
|
init_css_class();
|
|
36324
36413
|
var TimeComponent = class extends TypedRangeTextComponent {
|
|
36325
36414
|
/**
|
|
@@ -36341,7 +36430,7 @@ var TimeComponent = class extends TypedRangeTextComponent {
|
|
|
36341
36430
|
* @returns The date.
|
|
36342
36431
|
*/
|
|
36343
36432
|
valueFromString($string) {
|
|
36344
|
-
return
|
|
36433
|
+
return import_obsidian148.moment.duration($string);
|
|
36345
36434
|
}
|
|
36346
36435
|
/**
|
|
36347
36436
|
* Converts a time to a string.
|
|
@@ -36358,7 +36447,7 @@ var TimeComponent = class extends TypedRangeTextComponent {
|
|
|
36358
36447
|
} else {
|
|
36359
36448
|
format2 = "HH:mm";
|
|
36360
36449
|
}
|
|
36361
|
-
return
|
|
36450
|
+
return import_obsidian148.moment.utc(value.asMilliseconds()).format(format2);
|
|
36362
36451
|
}
|
|
36363
36452
|
};
|
|
36364
36453
|
|
|
@@ -36367,10 +36456,10 @@ var tri_state_checkbox_component_exports = {};
|
|
|
36367
36456
|
__export(tri_state_checkbox_component_exports, {
|
|
36368
36457
|
TriStateCheckboxComponent: () => TriStateCheckboxComponent
|
|
36369
36458
|
});
|
|
36370
|
-
var
|
|
36459
|
+
var import_obsidian149 = require("obsidian");
|
|
36371
36460
|
init_css_class();
|
|
36372
36461
|
init_plugin_context();
|
|
36373
|
-
var TriStateCheckboxComponent = class extends
|
|
36462
|
+
var TriStateCheckboxComponent = class extends import_obsidian149.ValueComponent {
|
|
36374
36463
|
/**
|
|
36375
36464
|
* An input element of the checkbox.
|
|
36376
36465
|
*/
|
|
@@ -36448,10 +36537,10 @@ var typed_dropdown_component_exports = {};
|
|
|
36448
36537
|
__export(typed_dropdown_component_exports, {
|
|
36449
36538
|
TypedDropdownComponent: () => TypedDropdownComponent
|
|
36450
36539
|
});
|
|
36451
|
-
var
|
|
36540
|
+
var import_obsidian150 = require("obsidian");
|
|
36452
36541
|
init_css_class();
|
|
36453
36542
|
init_plugin_context();
|
|
36454
|
-
var TypedDropdownComponent = class extends
|
|
36543
|
+
var TypedDropdownComponent = class extends import_obsidian150.ValueComponent {
|
|
36455
36544
|
/**
|
|
36456
36545
|
* A select element of the component.
|
|
36457
36546
|
*
|
|
@@ -36484,7 +36573,7 @@ var TypedDropdownComponent = class extends import_obsidian151.ValueComponent {
|
|
|
36484
36573
|
*/
|
|
36485
36574
|
constructor(containerEl) {
|
|
36486
36575
|
super();
|
|
36487
|
-
this.dropdownComponent = new
|
|
36576
|
+
this.dropdownComponent = new import_obsidian150.DropdownComponent(containerEl);
|
|
36488
36577
|
addPluginCssClasses(containerEl, "typed-dropdown-component" /* TypedDropdownComponent */);
|
|
36489
36578
|
}
|
|
36490
36579
|
/**
|
|
@@ -36574,10 +36663,10 @@ var typed_multiple_dropdown_component_exports = {};
|
|
|
36574
36663
|
__export(typed_multiple_dropdown_component_exports, {
|
|
36575
36664
|
TypedMultipleDropdownComponent: () => TypedMultipleDropdownComponent
|
|
36576
36665
|
});
|
|
36577
|
-
var
|
|
36666
|
+
var import_obsidian151 = require("obsidian");
|
|
36578
36667
|
init_css_class();
|
|
36579
36668
|
init_plugin_context();
|
|
36580
|
-
var TypedMultipleDropdownComponent = class extends
|
|
36669
|
+
var TypedMultipleDropdownComponent = class extends import_obsidian151.ValueComponent {
|
|
36581
36670
|
/**
|
|
36582
36671
|
* A select element of the component.
|
|
36583
36672
|
*
|
|
@@ -36755,10 +36844,10 @@ var week_component_exports = {};
|
|
|
36755
36844
|
__export(week_component_exports, {
|
|
36756
36845
|
WeekComponent: () => WeekComponent
|
|
36757
36846
|
});
|
|
36758
|
-
var
|
|
36847
|
+
var import_obsidian152 = require("obsidian");
|
|
36759
36848
|
init_object_utils();
|
|
36760
36849
|
init_css_class();
|
|
36761
|
-
var moment6 = extractDefaultExportInterop(
|
|
36850
|
+
var moment6 = extractDefaultExportInterop(import_obsidian152.moment);
|
|
36762
36851
|
var DATE_FORMAT3 = "YYYY-[W]WW";
|
|
36763
36852
|
var WeekComponent = class extends TypedRangeTextComponent {
|
|
36764
36853
|
/**
|
|
@@ -36802,7 +36891,7 @@ var WeekComponent = class extends TypedRangeTextComponent {
|
|
|
36802
36891
|
};
|
|
36803
36892
|
|
|
36804
36893
|
// src/obsidian/setting-ex.ts
|
|
36805
|
-
var SettingEx = class extends
|
|
36894
|
+
var SettingEx = class extends import_obsidian153.Setting {
|
|
36806
36895
|
/**
|
|
36807
36896
|
* Adds a {@link CheckboxComponent} to the setting.
|
|
36808
36897
|
*
|
|
@@ -37019,7 +37108,7 @@ __export(validation_exports, {
|
|
|
37019
37108
|
getOsUnsafePathCharsRegExp: () => getOsUnsafePathCharsRegExp,
|
|
37020
37109
|
isValidationMessageHolder: () => isValidationMessageHolder
|
|
37021
37110
|
});
|
|
37022
|
-
var
|
|
37111
|
+
var import_obsidian154 = require("obsidian");
|
|
37023
37112
|
init_reg_exp();
|
|
37024
37113
|
function isValidationMessageHolder(value) {
|
|
37025
37114
|
return value.validationMessage !== void 0;
|
|
@@ -37034,7 +37123,7 @@ function getOsAndObsidianUnsafePathCharsRegExp(isWindows) {
|
|
|
37034
37123
|
]);
|
|
37035
37124
|
}
|
|
37036
37125
|
function getOsUnsafePathCharsRegExp(isWindows) {
|
|
37037
|
-
isWindows ??=
|
|
37126
|
+
isWindows ??= import_obsidian154.Platform.isWin;
|
|
37038
37127
|
return isWindows ? WINDOWS_UNSAFE_PATH_CHARS : UNIX_UNSAFE_PATH_CHARS;
|
|
37039
37128
|
}
|
|
37040
37129
|
|
|
@@ -37062,7 +37151,7 @@ var PluginSettingsTabEventsComponent = class extends ComponentEx {
|
|
|
37062
37151
|
registerAsyncEvent(this, pluginSettingsComponent.on("saveSettings", (newState, oldState, context) => this.params.onSaveSettings(newState, oldState, context)));
|
|
37063
37152
|
}
|
|
37064
37153
|
};
|
|
37065
|
-
var PluginSettingsTabBase = class extends mixinAsyncEvents()(
|
|
37154
|
+
var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian155.PluginSettingTab) {
|
|
37066
37155
|
/**
|
|
37067
37156
|
* Whether the plugin settings tab is open.
|
|
37068
37157
|
*
|
|
@@ -37100,7 +37189,7 @@ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian156.
|
|
|
37100
37189
|
super(params.plugin.app, params.plugin);
|
|
37101
37190
|
this.pluginSettingsComponent = params.pluginSettingsComponent;
|
|
37102
37191
|
addPluginCssClasses(this.containerEl, "plugin-settings-tab" /* PluginSettingsTab */);
|
|
37103
|
-
this.saveSettingsDebounced = (0,
|
|
37192
|
+
this.saveSettingsDebounced = (0, import_obsidian155.debounce)(
|
|
37104
37193
|
convertAsyncToSync(() => this.pluginSettingsComponent.saveToFile(SAVE_TO_FILE_CONTEXT)),
|
|
37105
37194
|
this.saveSettingsDebounceTimeoutInMilliseconds
|
|
37106
37195
|
);
|
|
@@ -37173,7 +37262,7 @@ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian156.
|
|
|
37173
37262
|
}
|
|
37174
37263
|
let shouldSkipOnChange = false;
|
|
37175
37264
|
const UPDATE_VALIDATOR_EL_TIMEOUT_IN_MILLISECONDS = 100;
|
|
37176
|
-
const updateValidatorElementDebounced = (0,
|
|
37265
|
+
const updateValidatorElementDebounced = (0, import_obsidian155.debounce)(() => {
|
|
37177
37266
|
window.requestAnimationFrame(() => {
|
|
37178
37267
|
updateValidatorEl();
|
|
37179
37268
|
});
|
|
@@ -37256,7 +37345,7 @@ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian156.
|
|
|
37256
37345
|
tooltipContentEl.textContent = validationMessage;
|
|
37257
37346
|
tooltipEl?.toggle(!!validationMessage);
|
|
37258
37347
|
} else if (validationMessage) {
|
|
37259
|
-
(0,
|
|
37348
|
+
(0, import_obsidian155.setTooltip)(validatorEl, validationMessage);
|
|
37260
37349
|
}
|
|
37261
37350
|
}
|
|
37262
37351
|
}
|
|
@@ -37500,7 +37589,7 @@ __export(plugin_exports, {
|
|
|
37500
37589
|
reloadPlugin: () => reloadPlugin,
|
|
37501
37590
|
showErrorAndDisablePlugin: () => showErrorAndDisablePlugin
|
|
37502
37591
|
});
|
|
37503
|
-
var
|
|
37592
|
+
var import_obsidian156 = require("obsidian");
|
|
37504
37593
|
init_async_events();
|
|
37505
37594
|
init_error();
|
|
37506
37595
|
init_function();
|
|
@@ -37509,7 +37598,7 @@ init_component_ex();
|
|
|
37509
37598
|
init_plugin_notice_component();
|
|
37510
37599
|
init_i18n();
|
|
37511
37600
|
init_translations_map();
|
|
37512
|
-
var PluginBase = class extends mixinAsyncEvents()(
|
|
37601
|
+
var PluginBase = class extends mixinAsyncEvents()(import_obsidian156.Plugin) {
|
|
37513
37602
|
/**
|
|
37514
37603
|
* Gets abort signal component.
|
|
37515
37604
|
*
|
|
@@ -37817,7 +37906,7 @@ var field_popover_exports = {};
|
|
|
37817
37906
|
__export(field_popover_exports, {
|
|
37818
37907
|
editFieldsInPopover: () => editFieldsInPopover
|
|
37819
37908
|
});
|
|
37820
|
-
var
|
|
37909
|
+
var import_obsidian158 = require("obsidian");
|
|
37821
37910
|
init_object_utils();
|
|
37822
37911
|
init_css_class();
|
|
37823
37912
|
|
|
@@ -37826,7 +37915,7 @@ var popover_exports = {};
|
|
|
37826
37915
|
__export(popover_exports, {
|
|
37827
37916
|
showPopover: () => showPopover
|
|
37828
37917
|
});
|
|
37829
|
-
var
|
|
37918
|
+
var import_obsidian157 = require("obsidian");
|
|
37830
37919
|
init_css_class();
|
|
37831
37920
|
init_i18n();
|
|
37832
37921
|
init_plugin_context();
|
|
@@ -37883,7 +37972,7 @@ async function showPopover(params) {
|
|
|
37883
37972
|
handleCancel();
|
|
37884
37973
|
}
|
|
37885
37974
|
});
|
|
37886
|
-
const buttonsSetting = new
|
|
37975
|
+
const buttonsSetting = new import_obsidian157.Setting(popoverEl);
|
|
37887
37976
|
buttonsSetting.addButton((button) => {
|
|
37888
37977
|
button.setButtonText(okButtonText ?? t2(($) => $.obsidianDevUtils.buttons.ok)).setCta().setClass("ok-button" /* OkButton */).onClick(handleOk);
|
|
37889
37978
|
});
|
|
@@ -37942,8 +38031,8 @@ async function editFieldsInPopover(params) {
|
|
|
37942
38031
|
}));
|
|
37943
38032
|
}
|
|
37944
38033
|
function addField(containerEl, field) {
|
|
37945
|
-
const setting = new
|
|
37946
|
-
const textComponent = new
|
|
38034
|
+
const setting = new import_obsidian158.Setting(containerEl).setName(field.name);
|
|
38035
|
+
const textComponent = new import_obsidian158.TextComponent(setting.controlEl);
|
|
37947
38036
|
textComponent.setValue(field.defaultValue ?? "");
|
|
37948
38037
|
textComponent.setPlaceholder(field.placeholder ?? "");
|
|
37949
38038
|
textComponent.inputEl.addClass("text-box" /* TextBox */);
|
|
@@ -37956,7 +38045,7 @@ __export(app_context_exports, {
|
|
|
37956
38045
|
AppContext: () => AppContext,
|
|
37957
38046
|
useApp: () => useApp
|
|
37958
38047
|
});
|
|
37959
|
-
var
|
|
38048
|
+
var import_obsidian159 = require("obsidian");
|
|
37960
38049
|
var import_react = __toESM(require_react(), 1);
|
|
37961
38050
|
init_type_guards();
|
|
37962
38051
|
var AppContext = (0, import_react.createContext)(void 0);
|
|
@@ -37969,7 +38058,7 @@ var ribbon_icon_registrar_exports = {};
|
|
|
37969
38058
|
__export(ribbon_icon_registrar_exports, {
|
|
37970
38059
|
PluginRibbonIconRegistrar: () => PluginRibbonIconRegistrar
|
|
37971
38060
|
});
|
|
37972
|
-
var
|
|
38061
|
+
var import_obsidian160 = require("obsidian");
|
|
37973
38062
|
var PluginRibbonIconRegistrar = class {
|
|
37974
38063
|
/**
|
|
37975
38064
|
* Creates a new instance of the {@link PluginRibbonIconRegistrar} class.
|
|
@@ -37996,8 +38085,8 @@ var setting_group_ex_exports = {};
|
|
|
37996
38085
|
__export(setting_group_ex_exports, {
|
|
37997
38086
|
SettingGroupEx: () => SettingGroupEx
|
|
37998
38087
|
});
|
|
37999
|
-
var
|
|
38000
|
-
var SettingGroupEx = class extends
|
|
38088
|
+
var import_obsidian161 = require("obsidian");
|
|
38089
|
+
var SettingGroupEx = class extends import_obsidian161.SettingGroup {
|
|
38001
38090
|
/**
|
|
38002
38091
|
* Creates a new setting group.
|
|
38003
38092
|
*
|
|
@@ -38024,7 +38113,7 @@ var status_bar_item_registrar_exports = {};
|
|
|
38024
38113
|
__export(status_bar_item_registrar_exports, {
|
|
38025
38114
|
PluginStatusBarItemRegistrar: () => PluginStatusBarItemRegistrar
|
|
38026
38115
|
});
|
|
38027
|
-
var
|
|
38116
|
+
var import_obsidian162 = require("obsidian");
|
|
38028
38117
|
var PluginStatusBarItemRegistrar = class {
|
|
38029
38118
|
/**
|
|
38030
38119
|
* Creates a new instance of the {@link PluginStatusBarItemRegistrar} class.
|
|
@@ -38189,6 +38278,50 @@ function isTemplaterApi(value) {
|
|
|
38189
38278
|
return "generate_object" in functionsGenerator && typeof functionsGenerator.generate_object === "function";
|
|
38190
38279
|
}
|
|
38191
38280
|
|
|
38281
|
+
// src/obsidian/trusted-input.ts
|
|
38282
|
+
var trusted_input_exports = {};
|
|
38283
|
+
__export(trusted_input_exports, {
|
|
38284
|
+
clickElement: () => clickElement3,
|
|
38285
|
+
clickMouse: () => clickMouse3,
|
|
38286
|
+
hoverElement: () => hoverElement3,
|
|
38287
|
+
moveMouse: () => moveMouse3,
|
|
38288
|
+
pressKey: () => pressKey3,
|
|
38289
|
+
typeIntoEditor: () => typeIntoEditor3,
|
|
38290
|
+
unhoverElement: () => unhoverElement3
|
|
38291
|
+
});
|
|
38292
|
+
var import_obsidian164 = require("obsidian");
|
|
38293
|
+
async function clickElement3(params) {
|
|
38294
|
+
const arm = await loadArm();
|
|
38295
|
+
await arm.clickElement(params);
|
|
38296
|
+
}
|
|
38297
|
+
async function clickMouse3(params) {
|
|
38298
|
+
const arm = await loadArm();
|
|
38299
|
+
await arm.clickMouse(params);
|
|
38300
|
+
}
|
|
38301
|
+
async function hoverElement3(params) {
|
|
38302
|
+
const arm = await loadArm();
|
|
38303
|
+
await arm.hoverElement(params);
|
|
38304
|
+
}
|
|
38305
|
+
async function moveMouse3(params) {
|
|
38306
|
+
const arm = await loadArm();
|
|
38307
|
+
await arm.moveMouse(params);
|
|
38308
|
+
}
|
|
38309
|
+
async function pressKey3(params) {
|
|
38310
|
+
const arm = await loadArm();
|
|
38311
|
+
await arm.pressKey(params);
|
|
38312
|
+
}
|
|
38313
|
+
async function typeIntoEditor3(params) {
|
|
38314
|
+
const arm = await loadArm();
|
|
38315
|
+
await arm.typeIntoEditor(params);
|
|
38316
|
+
}
|
|
38317
|
+
async function unhoverElement3(params) {
|
|
38318
|
+
const arm = await loadArm();
|
|
38319
|
+
await arm.unhoverElement(params);
|
|
38320
|
+
}
|
|
38321
|
+
async function loadArm() {
|
|
38322
|
+
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));
|
|
38323
|
+
}
|
|
38324
|
+
|
|
38192
38325
|
// src/obsidian/vault-transaction.ts
|
|
38193
38326
|
var vault_transaction_exports = {};
|
|
38194
38327
|
__export(vault_transaction_exports, {
|
|
@@ -38443,7 +38576,7 @@ var view_registrar_exports = {};
|
|
|
38443
38576
|
__export(view_registrar_exports, {
|
|
38444
38577
|
PluginViewRegistrar: () => PluginViewRegistrar
|
|
38445
38578
|
});
|
|
38446
|
-
var
|
|
38579
|
+
var import_obsidian165 = require("obsidian");
|
|
38447
38580
|
var PluginViewRegistrar = class {
|
|
38448
38581
|
/**
|
|
38449
38582
|
* Creates a new instance of the {@link PluginViewRegistrar} class.
|
|
@@ -38655,6 +38788,7 @@ __export(obsidian_exports, {
|
|
|
38655
38788
|
"dataview-link": () => dataview_link_exports,
|
|
38656
38789
|
"demo-vault-helper": () => demo_vault_helper_exports,
|
|
38657
38790
|
"demo-vault-helper-settings": () => demo_vault_helper_settings_exports,
|
|
38791
|
+
"demo-vault-naming": () => demo_vault_naming_exports,
|
|
38658
38792
|
"desktop-demo-vault-opener": () => desktop_demo_vault_opener_exports,
|
|
38659
38793
|
"desktop-trusted-input": () => desktop_trusted_input_exports,
|
|
38660
38794
|
editor: () => editor_exports,
|
|
@@ -38683,6 +38817,7 @@ __export(obsidian_exports, {
|
|
|
38683
38817
|
"markdown-view": () => markdown_view_exports,
|
|
38684
38818
|
"menu-event-registrar": () => menu_event_registrar_exports,
|
|
38685
38819
|
"metadata-cache": () => metadata_cache_exports,
|
|
38820
|
+
"mobile-trusted-input": () => mobile_trusted_input_exports,
|
|
38686
38821
|
modals: () => modals_exports,
|
|
38687
38822
|
"note-priority": () => note_priority_exports,
|
|
38688
38823
|
"notebook-navigator": () => notebook_navigator_exports,
|
|
@@ -38705,6 +38840,7 @@ __export(obsidian_exports, {
|
|
|
38705
38840
|
"setting-group-ex": () => setting_group_ex_exports,
|
|
38706
38841
|
"status-bar-item-registrar": () => status_bar_item_registrar_exports,
|
|
38707
38842
|
templater: () => templater_exports,
|
|
38843
|
+
"trusted-input": () => trusted_input_exports,
|
|
38708
38844
|
validation: () => validation_exports,
|
|
38709
38845
|
vault: () => vault_exports,
|
|
38710
38846
|
"vault-delete": () => vault_delete_exports,
|
|
@@ -38779,7 +38915,9 @@ init_css_class();
|
|
|
38779
38915
|
var demo_vault_helper_settings_exports = {};
|
|
38780
38916
|
|
|
38781
38917
|
// src/obsidian/index.ts
|
|
38918
|
+
init_demo_vault_naming();
|
|
38782
38919
|
init_desktop_demo_vault_opener();
|
|
38920
|
+
init_desktop_trusted_input();
|
|
38783
38921
|
|
|
38784
38922
|
// src/obsidian/i18n/index.ts
|
|
38785
38923
|
var i18n_exports2 = {};
|
|
@@ -38816,6 +38954,9 @@ var link_update_progress_exports = {};
|
|
|
38816
38954
|
// src/obsidian/menu-event-registrar.ts
|
|
38817
38955
|
var menu_event_registrar_exports = {};
|
|
38818
38956
|
|
|
38957
|
+
// src/obsidian/index.ts
|
|
38958
|
+
init_mobile_trusted_input();
|
|
38959
|
+
|
|
38819
38960
|
// src/obsidian/modals/index.ts
|
|
38820
38961
|
var modals_exports = {};
|
|
38821
38962
|
__export(modals_exports, {
|
|
@@ -38918,8 +39059,8 @@ init_value_provider();
|
|
|
38918
39059
|
init_value_wrapper();
|
|
38919
39060
|
|
|
38920
39061
|
// integration-test-plugin/main.ts
|
|
38921
|
-
var
|
|
38922
|
-
var IntegrationTestPlugin = class extends
|
|
39062
|
+
var import_obsidian166 = require("obsidian");
|
|
39063
|
+
var IntegrationTestPlugin = class extends import_obsidian166.Plugin {
|
|
38923
39064
|
onload() {
|
|
38924
39065
|
window.__obsidianDevUtilsModule = src_exports;
|
|
38925
39066
|
}
|