obsidian-dev-utils 94.1.0 → 94.3.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 +9 -0
- package/dist/integration-test-plugin/main.js +251 -99
- package/dist/lib/cjs/__merged.cjs +10 -1
- package/dist/lib/cjs/__merged.d.cts +1 -0
- package/dist/lib/cjs/generated-during-build.cjs +1 -1
- package/dist/lib/cjs/obsidian/folder-note.cjs +253 -0
- package/dist/lib/cjs/obsidian/folder-note.d.cts +166 -0
- package/dist/lib/cjs/obsidian/index.cjs +4 -1
- package/dist/lib/cjs/obsidian/index.d.cts +1 -0
- package/dist/lib/cjs/obsidian/markdown.cjs +27 -3
- package/dist/lib/cjs/obsidian/markdown.d.cts +70 -1
- package/dist/lib/cjs/script-utils/demo-vault-coverage.cjs +13 -8
- package/dist/lib/cjs/script-utils/demo-vault-coverage.d.cts +15 -6
- package/dist/lib/esm/__merged.d.mts +1 -0
- package/dist/lib/esm/__merged.mjs +11 -1
- package/dist/lib/esm/generated-during-build.mjs +1 -1
- package/dist/lib/esm/obsidian/folder-note.d.mts +166 -0
- package/dist/lib/esm/obsidian/folder-note.mjs +146 -0
- package/dist/lib/esm/obsidian/index.d.mts +1 -0
- package/dist/lib/esm/obsidian/index.mjs +3 -1
- package/dist/lib/esm/obsidian/markdown.d.mts +70 -1
- package/dist/lib/esm/obsidian/markdown.mjs +35 -4
- package/dist/lib/esm/script-utils/demo-vault-coverage.d.mts +15 -6
- package/dist/lib/esm/script-utils/demo-vault-coverage.mjs +13 -8
- package/obsidian/folder-note/package.json +6 -0
- package/package.json +1 -1
|
@@ -12972,6 +12972,7 @@ __export(obsidian_exports, {
|
|
|
12972
12972
|
"file-change": () => file_change_exports,
|
|
12973
12973
|
"file-manager": () => file_manager_exports,
|
|
12974
12974
|
"file-system": () => file_system_exports,
|
|
12975
|
+
"folder-note": () => folder_note_exports,
|
|
12975
12976
|
frontmatter: () => frontmatter_exports,
|
|
12976
12977
|
"frontmatter-link-cache-with-offsets": () => frontmatter_link_cache_with_offsets_exports,
|
|
12977
12978
|
"hover-link-source-registrar": () => hover_link_source_registrar_exports,
|
|
@@ -33409,12 +33410,136 @@ var PluginExtensionsRegistrar = class {
|
|
|
33409
33410
|
}
|
|
33410
33411
|
};
|
|
33411
33412
|
|
|
33413
|
+
// src/obsidian/folder-note.ts
|
|
33414
|
+
var folder_note_exports = {};
|
|
33415
|
+
__export(folder_note_exports, {
|
|
33416
|
+
FOLDER_NOTES_PLUGIN_ID: () => FOLDER_NOTES_PLUGIN_ID2,
|
|
33417
|
+
FolderNoteLocation: () => FolderNoteLocation,
|
|
33418
|
+
resolveFolderNote: () => resolveFolderNote,
|
|
33419
|
+
resolveFolderNoteConfig: () => resolveFolderNoteConfig
|
|
33420
|
+
});
|
|
33421
|
+
var import_obsidian125 = require("obsidian");
|
|
33422
|
+
init_path();
|
|
33423
|
+
init_string();
|
|
33424
|
+
var FolderNoteLocation = /* @__PURE__ */ ((FolderNoteLocation2) => {
|
|
33425
|
+
FolderNoteLocation2["Auto"] = "Auto";
|
|
33426
|
+
FolderNoteLocation2["InsideFolder"] = "InsideFolder";
|
|
33427
|
+
FolderNoteLocation2["None"] = "None";
|
|
33428
|
+
FolderNoteLocation2["ParentFolder"] = "ParentFolder";
|
|
33429
|
+
return FolderNoteLocation2;
|
|
33430
|
+
})(FolderNoteLocation || {});
|
|
33431
|
+
var FOLDER_NOTES_PLUGIN_ID2 = "folder-notes";
|
|
33432
|
+
var FOLDER_NOTES_FOLDER_NAME_TOKEN_REG_EXP = /\{\{folder_name\}\}/gi;
|
|
33433
|
+
var EXCALIDRAW_FILE_EXTENSION = "excalidraw";
|
|
33434
|
+
var FALLBACK_FOLDER_NOTE_CONFIG = {
|
|
33435
|
+
extensions: [MARKDOWN_FILE_EXTENSION],
|
|
33436
|
+
isHidden: false,
|
|
33437
|
+
location: "InsideFolder" /* InsideFolder */,
|
|
33438
|
+
resolveName: (folder) => folder.name
|
|
33439
|
+
};
|
|
33440
|
+
function resolveFolderNote(params) {
|
|
33441
|
+
const { app, folder } = params;
|
|
33442
|
+
const config = params.config ?? resolveFolderNoteConfig({ app });
|
|
33443
|
+
if (config.location === "None" /* None */) {
|
|
33444
|
+
return null;
|
|
33445
|
+
}
|
|
33446
|
+
const parentFolderPath2 = config.location === "ParentFolder" /* ParentFolder */ ? folder.parent?.path : folder.path;
|
|
33447
|
+
if (parentFolderPath2 === void 0) {
|
|
33448
|
+
return null;
|
|
33449
|
+
}
|
|
33450
|
+
const noteName = config.resolveName(folder).trim();
|
|
33451
|
+
if (!noteName) {
|
|
33452
|
+
return null;
|
|
33453
|
+
}
|
|
33454
|
+
for (const extension2 of config.extensions) {
|
|
33455
|
+
const file = app.vault.getFileByPath((0, import_obsidian125.normalizePath)(join(parentFolderPath2, `${noteName}.${extension2}`)));
|
|
33456
|
+
if (file) {
|
|
33457
|
+
return file;
|
|
33458
|
+
}
|
|
33459
|
+
}
|
|
33460
|
+
return null;
|
|
33461
|
+
}
|
|
33462
|
+
function resolveFolderNoteConfig(params) {
|
|
33463
|
+
const {
|
|
33464
|
+
app,
|
|
33465
|
+
extensions,
|
|
33466
|
+
isHidden,
|
|
33467
|
+
location,
|
|
33468
|
+
resolveName
|
|
33469
|
+
} = params;
|
|
33470
|
+
if (location !== void 0 && location !== "Auto" /* Auto */) {
|
|
33471
|
+
return {
|
|
33472
|
+
extensions: normalizeExtensions(extensions ?? [MARKDOWN_FILE_EXTENSION]),
|
|
33473
|
+
isHidden: isHidden ?? false,
|
|
33474
|
+
location,
|
|
33475
|
+
resolveName: resolveName ?? FALLBACK_FOLDER_NOTE_CONFIG.resolveName
|
|
33476
|
+
};
|
|
33477
|
+
}
|
|
33478
|
+
return readFolderNotesPluginConfig(app) ?? FALLBACK_FOLDER_NOTE_CONFIG;
|
|
33479
|
+
}
|
|
33480
|
+
function normalizeExtensions(extensions) {
|
|
33481
|
+
const normalizedExtensions = extensions.map((extension2) => extension2.trim().toLowerCase().replace(/^\./, "")).map((extension2) => extension2 === EXCALIDRAW_FILE_EXTENSION ? MARKDOWN_FILE_EXTENSION : extension2).filter(Boolean);
|
|
33482
|
+
return [...new Set(normalizedExtensions)];
|
|
33483
|
+
}
|
|
33484
|
+
function readFolderNotesPluginConfig(app) {
|
|
33485
|
+
const folderNotesPlugin = app.plugins.getPlugin(FOLDER_NOTES_PLUGIN_ID2);
|
|
33486
|
+
if (!folderNotesPlugin || !("settings" in folderNotesPlugin)) {
|
|
33487
|
+
return null;
|
|
33488
|
+
}
|
|
33489
|
+
const folderNotesSettings = folderNotesPlugin.settings;
|
|
33490
|
+
if (typeof folderNotesSettings !== "object" || folderNotesSettings === null) {
|
|
33491
|
+
return null;
|
|
33492
|
+
}
|
|
33493
|
+
const location = toFolderNoteLocation("storageLocation" in folderNotesSettings ? folderNotesSettings.storageLocation : null);
|
|
33494
|
+
if (!location) {
|
|
33495
|
+
return null;
|
|
33496
|
+
}
|
|
33497
|
+
const folderNoteName = "folderNoteName" in folderNotesSettings ? folderNotesSettings.folderNoteName : null;
|
|
33498
|
+
if (typeof folderNoteName !== "string" || !folderNoteName) {
|
|
33499
|
+
return null;
|
|
33500
|
+
}
|
|
33501
|
+
const folderNoteType = "folderNoteType" in folderNotesSettings ? folderNotesSettings.folderNoteType : null;
|
|
33502
|
+
const supportedFileTypes = "supportedFileTypes" in folderNotesSettings ? folderNotesSettings.supportedFileTypes : null;
|
|
33503
|
+
const isHidden = "hideFolderNote" in folderNotesSettings ? folderNotesSettings.hideFolderNote : null;
|
|
33504
|
+
return {
|
|
33505
|
+
// Its own resolver tries the primary type first and every other supported type after it, which is the
|
|
33506
|
+
// Order reproduced here. An unusable pair leaves Markdown, the extension it cannot be configured
|
|
33507
|
+
// Without.
|
|
33508
|
+
extensions: normalizeExtensions([
|
|
33509
|
+
typeof folderNoteType === "string" ? folderNoteType : MARKDOWN_FILE_EXTENSION,
|
|
33510
|
+
...Array.isArray(supportedFileTypes) ? supportedFileTypes.filter((type) => typeof type === "string") : [],
|
|
33511
|
+
MARKDOWN_FILE_EXTENSION
|
|
33512
|
+
]),
|
|
33513
|
+
isHidden: isHidden === true,
|
|
33514
|
+
location,
|
|
33515
|
+
resolveName: (folder) => replaceAll({
|
|
33516
|
+
$string: folderNoteName,
|
|
33517
|
+
// A function replacer, so a folder name containing `$&` is inserted literally.
|
|
33518
|
+
replacer: () => folder.name,
|
|
33519
|
+
searchValue: FOLDER_NOTES_FOLDER_NAME_TOKEN_REG_EXP
|
|
33520
|
+
})
|
|
33521
|
+
};
|
|
33522
|
+
}
|
|
33523
|
+
function toFolderNoteLocation(storageLocation) {
|
|
33524
|
+
switch (storageLocation) {
|
|
33525
|
+
case "insideFolder": {
|
|
33526
|
+
return "InsideFolder" /* InsideFolder */;
|
|
33527
|
+
}
|
|
33528
|
+
case "parentFolder": {
|
|
33529
|
+
return "ParentFolder" /* ParentFolder */;
|
|
33530
|
+
}
|
|
33531
|
+
default: {
|
|
33532
|
+
return null;
|
|
33533
|
+
}
|
|
33534
|
+
}
|
|
33535
|
+
}
|
|
33536
|
+
|
|
33412
33537
|
// src/obsidian/hover-link-source-registrar.ts
|
|
33413
33538
|
var hover_link_source_registrar_exports = {};
|
|
33414
33539
|
__export(hover_link_source_registrar_exports, {
|
|
33415
33540
|
PluginHoverLinkSourceRegistrar: () => PluginHoverLinkSourceRegistrar
|
|
33416
33541
|
});
|
|
33417
|
-
var
|
|
33542
|
+
var import_obsidian126 = require("obsidian");
|
|
33418
33543
|
var PluginHoverLinkSourceRegistrar = class {
|
|
33419
33544
|
/**
|
|
33420
33545
|
* Creates a new instance of the {@link PluginHoverLinkSourceRegistrar} class.
|
|
@@ -33489,7 +33614,7 @@ var loop_exports = {};
|
|
|
33489
33614
|
__export(loop_exports, {
|
|
33490
33615
|
loop: () => loop
|
|
33491
33616
|
});
|
|
33492
|
-
var
|
|
33617
|
+
var import_obsidian127 = require("obsidian");
|
|
33493
33618
|
init_abort_controller();
|
|
33494
33619
|
init_async();
|
|
33495
33620
|
init_debug();
|
|
@@ -33912,7 +34037,7 @@ var markdown_post_processor_registrar_exports = {};
|
|
|
33912
34037
|
__export(markdown_post_processor_registrar_exports, {
|
|
33913
34038
|
PluginMarkdownPostProcessorRegistrar: () => PluginMarkdownPostProcessorRegistrar
|
|
33914
34039
|
});
|
|
33915
|
-
var
|
|
34040
|
+
var import_obsidian128 = require("obsidian");
|
|
33916
34041
|
init_async();
|
|
33917
34042
|
var PluginMarkdownPostProcessorRegistrar = class {
|
|
33918
34043
|
/**
|
|
@@ -33958,10 +34083,11 @@ __export(markdown_exports, {
|
|
|
33958
34083
|
renderExternalLink: () => renderExternalLink,
|
|
33959
34084
|
renderInternalLink: () => renderInternalLink
|
|
33960
34085
|
});
|
|
33961
|
-
var
|
|
34086
|
+
var import_obsidian129 = require("obsidian");
|
|
33962
34087
|
init_async();
|
|
33963
34088
|
init_object_utils();
|
|
33964
34089
|
init_monkey_around_component();
|
|
34090
|
+
var DELAY_BEFORE_OPEN_IN_MILLISECONDS = 200;
|
|
33965
34091
|
var moduleState4 = {
|
|
33966
34092
|
domEventsHandlersConstructor: null
|
|
33967
34093
|
};
|
|
@@ -34024,12 +34150,12 @@ async function fullRender(params) {
|
|
|
34024
34150
|
if (params.component) {
|
|
34025
34151
|
component = params.component;
|
|
34026
34152
|
} else {
|
|
34027
|
-
component = new
|
|
34153
|
+
component = new import_obsidian129.Component();
|
|
34028
34154
|
component.load();
|
|
34029
34155
|
shouldUnloadComponent = true;
|
|
34030
34156
|
}
|
|
34031
34157
|
const _ = __using(_stack, component.addChild(new EmbedByExtensionMdPatchComponent(params.app.embedRegistry.embedByExtension)));
|
|
34032
|
-
await
|
|
34158
|
+
await import_obsidian129.MarkdownRenderer.render(params.app, params.markdown, params.el, sourcePath, component);
|
|
34033
34159
|
if (shouldUnloadComponent) {
|
|
34034
34160
|
component.unload();
|
|
34035
34161
|
}
|
|
@@ -34052,10 +34178,10 @@ async function markdownToHtml(params) {
|
|
|
34052
34178
|
markdown,
|
|
34053
34179
|
sourcePath
|
|
34054
34180
|
} = params;
|
|
34055
|
-
const component = new
|
|
34181
|
+
const component = new import_obsidian129.Component();
|
|
34056
34182
|
component.load();
|
|
34057
34183
|
const renderDiv = createDiv();
|
|
34058
|
-
await
|
|
34184
|
+
await import_obsidian129.MarkdownRenderer.render(app, markdown, renderDiv, sourcePath ?? "", component);
|
|
34059
34185
|
const html2 = renderDiv.innerHTML;
|
|
34060
34186
|
component.unload();
|
|
34061
34187
|
return html2;
|
|
@@ -34067,7 +34193,7 @@ async function registerLinkHandlers(params) {
|
|
|
34067
34193
|
sourcePath
|
|
34068
34194
|
} = params;
|
|
34069
34195
|
moduleState4.domEventsHandlersConstructor ??= await getDomEventsHandlersConstructor(app);
|
|
34070
|
-
|
|
34196
|
+
import_obsidian129.MarkdownPreviewRenderer.registerDomEvents(
|
|
34071
34197
|
el,
|
|
34072
34198
|
new moduleState4.domEventsHandlersConstructor(
|
|
34073
34199
|
new FixedZIndexDomEventsHandlersInfo({
|
|
@@ -34100,7 +34226,9 @@ async function renderExternalLink(params) {
|
|
|
34100
34226
|
async function renderInternalLink(params) {
|
|
34101
34227
|
const {
|
|
34102
34228
|
app,
|
|
34103
|
-
|
|
34229
|
+
folderNote,
|
|
34230
|
+
pathOrAbstractFile,
|
|
34231
|
+
shouldRevealFile
|
|
34104
34232
|
} = params;
|
|
34105
34233
|
const abstractFile = getAbstractFileOrNull({ app, pathOrFile: pathOrAbstractFile });
|
|
34106
34234
|
const path = getPath2(app, pathOrAbstractFile);
|
|
@@ -34109,7 +34237,12 @@ async function renderInternalLink(params) {
|
|
|
34109
34237
|
return createEl("a", { text: displayText }, (aEl2) => {
|
|
34110
34238
|
aEl2.addEventListener("click", ($event) => {
|
|
34111
34239
|
$event.preventDefault();
|
|
34112
|
-
app
|
|
34240
|
+
const config = resolveFolderNoteConfig({ app, ...folderNote });
|
|
34241
|
+
const folderNoteFile = resolveFolderNote({ app, config, folder: abstractFile });
|
|
34242
|
+
revealInFileExplorer(app, folderNoteFile && !config.isHidden ? folderNoteFile : abstractFile);
|
|
34243
|
+
if (folderNoteFile) {
|
|
34244
|
+
invokeAsyncSafely(() => openAfterSettling(app, folderNoteFile));
|
|
34245
|
+
}
|
|
34113
34246
|
});
|
|
34114
34247
|
});
|
|
34115
34248
|
}
|
|
@@ -34124,8 +34257,23 @@ async function renderInternalLink(params) {
|
|
|
34124
34257
|
app,
|
|
34125
34258
|
el: aEl
|
|
34126
34259
|
});
|
|
34260
|
+
if (shouldRevealFile ?? false) {
|
|
34261
|
+
aEl.addEventListener("click", () => {
|
|
34262
|
+
const file = getAbstractFileOrNull({ app, pathOrFile: pathOrAbstractFile });
|
|
34263
|
+
if (isFile(file)) {
|
|
34264
|
+
revealInFileExplorer(app, file);
|
|
34265
|
+
}
|
|
34266
|
+
});
|
|
34267
|
+
}
|
|
34127
34268
|
return aEl;
|
|
34128
34269
|
}
|
|
34270
|
+
async function openAfterSettling(app, file) {
|
|
34271
|
+
await sleep2({ milliseconds: DELAY_BEFORE_OPEN_IN_MILLISECONDS });
|
|
34272
|
+
await app.workspace.getLeaf().openFile(file, { active: true });
|
|
34273
|
+
}
|
|
34274
|
+
function revealInFileExplorer(app, abstractFile) {
|
|
34275
|
+
app.internalPlugins.getEnabledPluginById(InternalPluginName.FileExplorer)?.revealInFolder(abstractFile);
|
|
34276
|
+
}
|
|
34129
34277
|
|
|
34130
34278
|
// src/obsidian/menu-event-registrar.ts
|
|
34131
34279
|
var menu_event_registrar_exports = {};
|
|
@@ -34149,7 +34297,7 @@ __export(alert_exports, {
|
|
|
34149
34297
|
alert: () => alert
|
|
34150
34298
|
});
|
|
34151
34299
|
init_i18next();
|
|
34152
|
-
var
|
|
34300
|
+
var import_obsidian130 = require("obsidian");
|
|
34153
34301
|
init_css_class();
|
|
34154
34302
|
init_modal();
|
|
34155
34303
|
var AlertModal = class extends ModalBase {
|
|
@@ -34169,7 +34317,7 @@ var AlertModal = class extends ModalBase {
|
|
|
34169
34317
|
onOpen() {
|
|
34170
34318
|
this.titleEl.setText(this.title);
|
|
34171
34319
|
this.contentEl.createEl("p", { text: this.message });
|
|
34172
|
-
const okButton = new
|
|
34320
|
+
const okButton = new import_obsidian130.ButtonComponent(this.contentEl);
|
|
34173
34321
|
okButton.setButtonText(this.okButtonText);
|
|
34174
34322
|
okButton.setCta();
|
|
34175
34323
|
okButton.onClick(this.close.bind(this));
|
|
@@ -34190,7 +34338,7 @@ var minimizable_modal_exports = {};
|
|
|
34190
34338
|
__export(minimizable_modal_exports, {
|
|
34191
34339
|
MinimizableModal: () => MinimizableModal
|
|
34192
34340
|
});
|
|
34193
|
-
var
|
|
34341
|
+
var import_obsidian131 = require("obsidian");
|
|
34194
34342
|
init_monkey_around_component();
|
|
34195
34343
|
init_css_class();
|
|
34196
34344
|
init_plugin_context();
|
|
@@ -34232,7 +34380,7 @@ var PeekLockComponent = class extends MonkeyAroundComponent {
|
|
|
34232
34380
|
onload() {
|
|
34233
34381
|
super.onload();
|
|
34234
34382
|
this.registerMethodPatch({
|
|
34235
|
-
$object:
|
|
34383
|
+
$object: import_obsidian131.Modal.prototype,
|
|
34236
34384
|
methodName: "open",
|
|
34237
34385
|
patchHandler: ({ fallback, originalThis }) => {
|
|
34238
34386
|
blockOrFallback(originalThis, fallback);
|
|
@@ -34342,7 +34490,7 @@ var MinimizableModal = class {
|
|
|
34342
34490
|
}
|
|
34343
34491
|
createMinimizeButton() {
|
|
34344
34492
|
const buttonEl = this.modal.modalEl.createEl("button", { cls: "minimize-button" /* MinimizeButton */ });
|
|
34345
|
-
(0,
|
|
34493
|
+
(0, import_obsidian131.setIcon)(buttonEl, MINIMIZE_ICON_ID);
|
|
34346
34494
|
buttonEl.addEventListener("click", () => {
|
|
34347
34495
|
this.minimize();
|
|
34348
34496
|
});
|
|
@@ -34356,11 +34504,11 @@ var MinimizableModal = class {
|
|
|
34356
34504
|
text: this.modal.titleEl.textContent
|
|
34357
34505
|
});
|
|
34358
34506
|
const restoreButtonEl = barEl.createEl("button", { cls: "restore-button" /* RestoreButton */ });
|
|
34359
|
-
(0,
|
|
34507
|
+
(0, import_obsidian131.setIcon)(restoreButtonEl, RESTORE_ICON_ID);
|
|
34360
34508
|
if (this.shouldShowCancelButton) {
|
|
34361
34509
|
const cancelButtonEl = barEl.createEl("button", { cls: "cancel-button" /* CancelButton */ });
|
|
34362
|
-
(0,
|
|
34363
|
-
(0,
|
|
34510
|
+
(0, import_obsidian131.setIcon)(cancelButtonEl, CANCEL_ICON_ID);
|
|
34511
|
+
(0, import_obsidian131.setTooltip)(cancelButtonEl, "Cancel");
|
|
34364
34512
|
cancelButtonEl.addEventListener("click", ($event) => {
|
|
34365
34513
|
$event.stopPropagation();
|
|
34366
34514
|
this.modal.close();
|
|
@@ -34501,7 +34649,7 @@ var prompt_exports = {};
|
|
|
34501
34649
|
__export(prompt_exports, {
|
|
34502
34650
|
prompt: () => prompt
|
|
34503
34651
|
});
|
|
34504
|
-
var
|
|
34652
|
+
var import_obsidian132 = require("obsidian");
|
|
34505
34653
|
init_async();
|
|
34506
34654
|
init_function();
|
|
34507
34655
|
init_css_class();
|
|
@@ -34531,7 +34679,7 @@ var PromptModal = class extends ModalBase {
|
|
|
34531
34679
|
}
|
|
34532
34680
|
onOpen() {
|
|
34533
34681
|
this.titleEl.setText(this.title);
|
|
34534
|
-
const textComponent = new
|
|
34682
|
+
const textComponent = new import_obsidian132.TextComponent(this.contentEl);
|
|
34535
34683
|
const inputEl = textComponent.inputEl;
|
|
34536
34684
|
inputEl.setAttribute("spellcheck", String(isSpellcheckEnabled(this.app)));
|
|
34537
34685
|
const validate = async (shouldReport) => {
|
|
@@ -34566,14 +34714,14 @@ var PromptModal = class extends ModalBase {
|
|
|
34566
34714
|
inputEl.addEventListener("input", convertAsyncToSync(handleInput));
|
|
34567
34715
|
inputEl.addEventListener("focus", convertAsyncToSync(handleFocus));
|
|
34568
34716
|
invokeAsyncSafely(() => validate(false));
|
|
34569
|
-
const okButton = new
|
|
34717
|
+
const okButton = new import_obsidian132.ButtonComponent(this.contentEl);
|
|
34570
34718
|
okButton.setButtonText(this.okButtonText);
|
|
34571
34719
|
okButton.setCta();
|
|
34572
34720
|
okButton.onClick((event) => {
|
|
34573
34721
|
this.handleOk(event, textComponent);
|
|
34574
34722
|
});
|
|
34575
34723
|
okButton.setClass("ok-button" /* OkButton */);
|
|
34576
|
-
const cancelButton = new
|
|
34724
|
+
const cancelButton = new import_obsidian132.ButtonComponent(this.contentEl);
|
|
34577
34725
|
cancelButton.setButtonText(this.cancelButtonText);
|
|
34578
34726
|
cancelButton.onClick(this.close.bind(this));
|
|
34579
34727
|
cancelButton.setClass("cancel-button" /* CancelButton */);
|
|
@@ -34607,11 +34755,11 @@ var select_item_exports = {};
|
|
|
34607
34755
|
__export(select_item_exports, {
|
|
34608
34756
|
selectItem: () => selectItem
|
|
34609
34757
|
});
|
|
34610
|
-
var
|
|
34758
|
+
var import_obsidian133 = require("obsidian");
|
|
34611
34759
|
init_css_class();
|
|
34612
34760
|
init_plugin_context();
|
|
34613
34761
|
init_modal();
|
|
34614
|
-
var ItemSelectModal = class extends
|
|
34762
|
+
var ItemSelectModal = class extends import_obsidian133.FuzzySuggestModal {
|
|
34615
34763
|
isSelected = false;
|
|
34616
34764
|
items;
|
|
34617
34765
|
itemTextFunction;
|
|
@@ -34663,7 +34811,7 @@ var suggest_modal_command_builder_exports = {};
|
|
|
34663
34811
|
__export(suggest_modal_command_builder_exports, {
|
|
34664
34812
|
SuggestModalCommandBuilder: () => SuggestModalCommandBuilder
|
|
34665
34813
|
});
|
|
34666
|
-
var
|
|
34814
|
+
var import_obsidian134 = require("obsidian");
|
|
34667
34815
|
var KEYS_MAP = /* @__PURE__ */ new Map([
|
|
34668
34816
|
["Enter", "\u21B5"],
|
|
34669
34817
|
["UpDown", "\u2191\u2193"]
|
|
@@ -34710,7 +34858,7 @@ var SuggestModalCommandBuilder = class {
|
|
|
34710
34858
|
command: this.buildCommand(command),
|
|
34711
34859
|
init: (purposeEl, scope) => {
|
|
34712
34860
|
purposeEl.appendText(" ");
|
|
34713
|
-
const dropdownComponent = new
|
|
34861
|
+
const dropdownComponent = new import_obsidian134.DropdownComponent(purposeEl);
|
|
34714
34862
|
command.onInit(dropdownComponent);
|
|
34715
34863
|
dropdownComponent.onChange((value) => {
|
|
34716
34864
|
command.onChange(value);
|
|
@@ -34785,10 +34933,10 @@ var SuggestModalCommandBuilder = class {
|
|
|
34785
34933
|
return "ctrl";
|
|
34786
34934
|
}
|
|
34787
34935
|
case "Meta": {
|
|
34788
|
-
return
|
|
34936
|
+
return import_obsidian134.Platform.isMacOS ? "cmd" : "win";
|
|
34789
34937
|
}
|
|
34790
34938
|
case "Mod": {
|
|
34791
|
-
return
|
|
34939
|
+
return import_obsidian134.Platform.isMacOS ? "cmd" : "ctrl";
|
|
34792
34940
|
}
|
|
34793
34941
|
case "Shift": {
|
|
34794
34942
|
return "shift";
|
|
@@ -34966,10 +35114,10 @@ var pdf_exports = {};
|
|
|
34966
35114
|
__export(pdf_exports, {
|
|
34967
35115
|
printToPdf: () => printToPdf
|
|
34968
35116
|
});
|
|
34969
|
-
var
|
|
35117
|
+
var import_obsidian135 = require("obsidian");
|
|
34970
35118
|
var ELECTRON_PRINT_TO_PDF_CHANNEL = "print-to-pdf";
|
|
34971
35119
|
async function printToPdf(element, options) {
|
|
34972
|
-
if (
|
|
35120
|
+
if (import_obsidian135.Platform.isMobile) {
|
|
34973
35121
|
throw new Error("Printing to PDF is not supported on mobile devices.");
|
|
34974
35122
|
}
|
|
34975
35123
|
const printDiv = activeDocument.body.createDiv("print");
|
|
@@ -35168,7 +35316,7 @@ __export(plugin_settings_tab_exports, {
|
|
|
35168
35316
|
PluginSettingsTabBase: () => PluginSettingsTabBase,
|
|
35169
35317
|
SAVE_TO_FILE_CONTEXT: () => SAVE_TO_FILE_CONTEXT
|
|
35170
35318
|
});
|
|
35171
|
-
var
|
|
35319
|
+
var import_obsidian153 = require("obsidian");
|
|
35172
35320
|
init_async_events();
|
|
35173
35321
|
init_async();
|
|
35174
35322
|
init_function();
|
|
@@ -35206,7 +35354,7 @@ var text_based_component_exports = {};
|
|
|
35206
35354
|
__export(text_based_component_exports, {
|
|
35207
35355
|
getTextBasedComponentValue: () => getTextBasedComponentValue
|
|
35208
35356
|
});
|
|
35209
|
-
var
|
|
35357
|
+
var import_obsidian136 = require("obsidian");
|
|
35210
35358
|
var AbstractTextComponentWrapper = class {
|
|
35211
35359
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- `unknown` doesn't work, getting compiler errors.
|
|
35212
35360
|
constructor(abstractTextComponent) {
|
|
@@ -35228,7 +35376,7 @@ function getTextBasedComponentValue($unknown) {
|
|
|
35228
35376
|
if (isTextBasedComponent($unknown)) {
|
|
35229
35377
|
return $unknown;
|
|
35230
35378
|
}
|
|
35231
|
-
if ($unknown instanceof
|
|
35379
|
+
if ($unknown instanceof import_obsidian136.AbstractTextComponent) {
|
|
35232
35380
|
return new AbstractTextComponentWrapper($unknown);
|
|
35233
35381
|
}
|
|
35234
35382
|
return null;
|
|
@@ -35243,7 +35391,7 @@ var validator_component_exports = {};
|
|
|
35243
35391
|
__export(validator_component_exports, {
|
|
35244
35392
|
getValidatorComponent: () => getValidatorComponent
|
|
35245
35393
|
});
|
|
35246
|
-
var
|
|
35394
|
+
var import_obsidian137 = require("obsidian");
|
|
35247
35395
|
init_css_class();
|
|
35248
35396
|
init_plugin_context();
|
|
35249
35397
|
var OverlayValidatorComponent = class {
|
|
@@ -35304,28 +35452,28 @@ function getValidatorComponent($unknown) {
|
|
|
35304
35452
|
if (isValidatorComponent($unknown)) {
|
|
35305
35453
|
return $unknown;
|
|
35306
35454
|
}
|
|
35307
|
-
if ($unknown instanceof
|
|
35455
|
+
if ($unknown instanceof import_obsidian137.ColorComponent) {
|
|
35308
35456
|
return new ValidatorElementWrapper($unknown.colorPickerEl);
|
|
35309
35457
|
}
|
|
35310
|
-
if ($unknown instanceof
|
|
35458
|
+
if ($unknown instanceof import_obsidian137.DropdownComponent) {
|
|
35311
35459
|
return new ValidatorElementWrapper($unknown.selectEl);
|
|
35312
35460
|
}
|
|
35313
|
-
if ($unknown instanceof
|
|
35461
|
+
if ($unknown instanceof import_obsidian137.ProgressBarComponent) {
|
|
35314
35462
|
return new OverlayValidatorComponent($unknown.progressBar);
|
|
35315
35463
|
}
|
|
35316
|
-
if ($unknown instanceof
|
|
35464
|
+
if ($unknown instanceof import_obsidian137.SearchComponent) {
|
|
35317
35465
|
return new ValidatorElementWrapper($unknown.inputEl);
|
|
35318
35466
|
}
|
|
35319
|
-
if ($unknown instanceof
|
|
35467
|
+
if ($unknown instanceof import_obsidian137.SliderComponent) {
|
|
35320
35468
|
return new ValidatorElementWrapper($unknown.sliderEl);
|
|
35321
35469
|
}
|
|
35322
|
-
if ($unknown instanceof
|
|
35470
|
+
if ($unknown instanceof import_obsidian137.TextAreaComponent) {
|
|
35323
35471
|
return new ValidatorElementWrapper($unknown.inputEl);
|
|
35324
35472
|
}
|
|
35325
|
-
if ($unknown instanceof
|
|
35473
|
+
if ($unknown instanceof import_obsidian137.TextComponent) {
|
|
35326
35474
|
return new ValidatorElementWrapper($unknown.inputEl);
|
|
35327
35475
|
}
|
|
35328
|
-
if ($unknown instanceof
|
|
35476
|
+
if ($unknown instanceof import_obsidian137.ToggleComponent) {
|
|
35329
35477
|
return new OverlayValidatorComponent($unknown.toggleEl);
|
|
35330
35478
|
}
|
|
35331
35479
|
return null;
|
|
@@ -35340,7 +35488,7 @@ __export(setting_ex_exports, {
|
|
|
35340
35488
|
SettingEx: () => SettingEx,
|
|
35341
35489
|
adoptSettingEx: () => adoptSettingEx
|
|
35342
35490
|
});
|
|
35343
|
-
var
|
|
35491
|
+
var import_obsidian151 = require("obsidian");
|
|
35344
35492
|
init_object_utils();
|
|
35345
35493
|
|
|
35346
35494
|
// src/obsidian/setting-components/checkbox-component.ts
|
|
@@ -35348,10 +35496,10 @@ var checkbox_component_exports = {};
|
|
|
35348
35496
|
__export(checkbox_component_exports, {
|
|
35349
35497
|
CheckboxComponent: () => CheckboxComponent
|
|
35350
35498
|
});
|
|
35351
|
-
var
|
|
35499
|
+
var import_obsidian138 = require("obsidian");
|
|
35352
35500
|
init_css_class();
|
|
35353
35501
|
init_plugin_context();
|
|
35354
|
-
var CheckboxComponent = class extends
|
|
35502
|
+
var CheckboxComponent = class extends import_obsidian138.ValueComponent {
|
|
35355
35503
|
/**
|
|
35356
35504
|
* An input element of the checkbox.
|
|
35357
35505
|
*/
|
|
@@ -35428,12 +35576,12 @@ var code_highlighter_component_exports = {};
|
|
|
35428
35576
|
__export(code_highlighter_component_exports, {
|
|
35429
35577
|
CodeHighlighterComponent: () => CodeHighlighterComponent
|
|
35430
35578
|
});
|
|
35431
|
-
var
|
|
35579
|
+
var import_obsidian139 = require("obsidian");
|
|
35432
35580
|
init_array();
|
|
35433
35581
|
init_async();
|
|
35434
35582
|
init_css_class();
|
|
35435
35583
|
init_plugin_context();
|
|
35436
|
-
var CodeHighlighterComponent = class extends
|
|
35584
|
+
var CodeHighlighterComponent = class extends import_obsidian139.ValueComponent {
|
|
35437
35585
|
/**
|
|
35438
35586
|
* An input element of the component.
|
|
35439
35587
|
*
|
|
@@ -35475,7 +35623,7 @@ var CodeHighlighterComponent = class extends import_obsidian138.ValueComponent {
|
|
|
35475
35623
|
addPluginCssClasses(containerEl, "code-highlighter-component" /* CodeHighlighterComponent */);
|
|
35476
35624
|
const wrapper = containerEl.createDiv();
|
|
35477
35625
|
addPluginCssClasses(wrapper, "setting-component-wrapper" /* SettingComponentWrapper */);
|
|
35478
|
-
this.textAreaComponent = new
|
|
35626
|
+
this.textAreaComponent = new import_obsidian139.TextAreaComponent(wrapper);
|
|
35479
35627
|
this.preEl = wrapper.createEl("pre", {
|
|
35480
35628
|
attr: {
|
|
35481
35629
|
tabIndex: "-1"
|
|
@@ -35668,7 +35816,7 @@ var date_component_exports = {};
|
|
|
35668
35816
|
__export(date_component_exports, {
|
|
35669
35817
|
DateComponent: () => DateComponent
|
|
35670
35818
|
});
|
|
35671
|
-
var
|
|
35819
|
+
var import_obsidian141 = require("obsidian");
|
|
35672
35820
|
init_object_utils();
|
|
35673
35821
|
init_css_class();
|
|
35674
35822
|
|
|
@@ -35683,10 +35831,10 @@ var typed_text_component_exports = {};
|
|
|
35683
35831
|
__export(typed_text_component_exports, {
|
|
35684
35832
|
TypedTextComponent: () => TypedTextComponent
|
|
35685
35833
|
});
|
|
35686
|
-
var
|
|
35834
|
+
var import_obsidian140 = require("obsidian");
|
|
35687
35835
|
init_css_class();
|
|
35688
35836
|
init_plugin_context();
|
|
35689
|
-
var TypedTextComponent = class extends
|
|
35837
|
+
var TypedTextComponent = class extends import_obsidian140.ValueComponent {
|
|
35690
35838
|
/**
|
|
35691
35839
|
* An input element of the component.
|
|
35692
35840
|
*/
|
|
@@ -35710,7 +35858,7 @@ var TypedTextComponent = class extends import_obsidian139.ValueComponent {
|
|
|
35710
35858
|
*/
|
|
35711
35859
|
constructor(params) {
|
|
35712
35860
|
super();
|
|
35713
|
-
this.textComponent = new
|
|
35861
|
+
this.textComponent = new import_obsidian140.TextComponent(params.containerEl);
|
|
35714
35862
|
this.inputEl = this.textComponent.inputEl;
|
|
35715
35863
|
this.inputEl.type = params.type;
|
|
35716
35864
|
addPluginCssClasses(params.containerEl, params.cssClass);
|
|
@@ -35809,7 +35957,7 @@ var TypedRangeTextComponent = class extends TypedTextComponent {
|
|
|
35809
35957
|
};
|
|
35810
35958
|
|
|
35811
35959
|
// src/obsidian/setting-components/date-component.ts
|
|
35812
|
-
var moment2 = extractDefaultExportInterop(
|
|
35960
|
+
var moment2 = extractDefaultExportInterop(import_obsidian141.moment);
|
|
35813
35961
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
35814
35962
|
var DateComponent = class extends TypedRangeTextComponent {
|
|
35815
35963
|
/**
|
|
@@ -35849,10 +35997,10 @@ var date_time_component_exports = {};
|
|
|
35849
35997
|
__export(date_time_component_exports, {
|
|
35850
35998
|
DateTimeComponent: () => DateTimeComponent
|
|
35851
35999
|
});
|
|
35852
|
-
var
|
|
36000
|
+
var import_obsidian142 = require("obsidian");
|
|
35853
36001
|
init_object_utils();
|
|
35854
36002
|
init_css_class();
|
|
35855
|
-
var moment3 = extractDefaultExportInterop(
|
|
36003
|
+
var moment3 = extractDefaultExportInterop(import_obsidian142.moment);
|
|
35856
36004
|
var DATE_TIME_FORMAT = "YYYY-MM-DDTHH:mm";
|
|
35857
36005
|
var DateTimeComponent = class extends TypedRangeTextComponent {
|
|
35858
36006
|
/**
|
|
@@ -35992,10 +36140,10 @@ var month_component_exports = {};
|
|
|
35992
36140
|
__export(month_component_exports, {
|
|
35993
36141
|
MonthComponent: () => MonthComponent
|
|
35994
36142
|
});
|
|
35995
|
-
var
|
|
36143
|
+
var import_obsidian143 = require("obsidian");
|
|
35996
36144
|
init_object_utils();
|
|
35997
36145
|
init_css_class();
|
|
35998
|
-
var moment4 = extractDefaultExportInterop(
|
|
36146
|
+
var moment4 = extractDefaultExportInterop(import_obsidian143.moment);
|
|
35999
36147
|
var DATE_FORMAT2 = "YYYY-MM";
|
|
36000
36148
|
var MonthComponent = class extends TypedRangeTextComponent {
|
|
36001
36149
|
/**
|
|
@@ -36043,10 +36191,10 @@ var multiple_dropdown_component_exports = {};
|
|
|
36043
36191
|
__export(multiple_dropdown_component_exports, {
|
|
36044
36192
|
MultipleDropdownComponent: () => MultipleDropdownComponent
|
|
36045
36193
|
});
|
|
36046
|
-
var
|
|
36194
|
+
var import_obsidian144 = require("obsidian");
|
|
36047
36195
|
init_css_class();
|
|
36048
36196
|
init_plugin_context();
|
|
36049
|
-
var MultipleDropdownComponent = class extends
|
|
36197
|
+
var MultipleDropdownComponent = class extends import_obsidian144.ValueComponent {
|
|
36050
36198
|
/**
|
|
36051
36199
|
* A select element of the component.
|
|
36052
36200
|
*
|
|
@@ -36075,7 +36223,7 @@ var MultipleDropdownComponent = class extends import_obsidian143.ValueComponent
|
|
|
36075
36223
|
*/
|
|
36076
36224
|
constructor(containerEl) {
|
|
36077
36225
|
super();
|
|
36078
|
-
this.dropdownComponent = new
|
|
36226
|
+
this.dropdownComponent = new import_obsidian144.DropdownComponent(containerEl);
|
|
36079
36227
|
this.dropdownComponent.selectEl.multiple = true;
|
|
36080
36228
|
addPluginCssClasses(containerEl, "multiple-dropdown-component" /* MultipleDropdownComponent */);
|
|
36081
36229
|
}
|
|
@@ -36248,10 +36396,10 @@ var multiple_text_component_exports = {};
|
|
|
36248
36396
|
__export(multiple_text_component_exports, {
|
|
36249
36397
|
MultipleTextComponent: () => MultipleTextComponent
|
|
36250
36398
|
});
|
|
36251
|
-
var
|
|
36399
|
+
var import_obsidian145 = require("obsidian");
|
|
36252
36400
|
init_css_class();
|
|
36253
36401
|
init_plugin_context();
|
|
36254
|
-
var MultipleTextComponent = class extends
|
|
36402
|
+
var MultipleTextComponent = class extends import_obsidian145.ValueComponent {
|
|
36255
36403
|
/**
|
|
36256
36404
|
* An input element of the component.
|
|
36257
36405
|
*
|
|
@@ -36280,7 +36428,7 @@ var MultipleTextComponent = class extends import_obsidian144.ValueComponent {
|
|
|
36280
36428
|
*/
|
|
36281
36429
|
constructor(containerEl) {
|
|
36282
36430
|
super();
|
|
36283
|
-
this.textAreaComponent = new
|
|
36431
|
+
this.textAreaComponent = new import_obsidian145.TextAreaComponent(containerEl);
|
|
36284
36432
|
addPluginCssClasses(containerEl, "multiple-text-component" /* MultipleTextComponent */);
|
|
36285
36433
|
}
|
|
36286
36434
|
/**
|
|
@@ -36542,7 +36690,7 @@ var time_component_exports = {};
|
|
|
36542
36690
|
__export(time_component_exports, {
|
|
36543
36691
|
TimeComponent: () => TimeComponent
|
|
36544
36692
|
});
|
|
36545
|
-
var
|
|
36693
|
+
var import_obsidian146 = require("obsidian");
|
|
36546
36694
|
init_css_class();
|
|
36547
36695
|
var TimeComponent = class extends TypedRangeTextComponent {
|
|
36548
36696
|
/**
|
|
@@ -36564,7 +36712,7 @@ var TimeComponent = class extends TypedRangeTextComponent {
|
|
|
36564
36712
|
* @returns The date.
|
|
36565
36713
|
*/
|
|
36566
36714
|
valueFromString($string) {
|
|
36567
|
-
return
|
|
36715
|
+
return import_obsidian146.moment.duration($string);
|
|
36568
36716
|
}
|
|
36569
36717
|
/**
|
|
36570
36718
|
* Converts a time to a string.
|
|
@@ -36581,7 +36729,7 @@ var TimeComponent = class extends TypedRangeTextComponent {
|
|
|
36581
36729
|
} else {
|
|
36582
36730
|
format2 = "HH:mm";
|
|
36583
36731
|
}
|
|
36584
|
-
return
|
|
36732
|
+
return import_obsidian146.moment.utc(value.asMilliseconds()).format(format2);
|
|
36585
36733
|
}
|
|
36586
36734
|
};
|
|
36587
36735
|
|
|
@@ -36590,10 +36738,10 @@ var tri_state_checkbox_component_exports = {};
|
|
|
36590
36738
|
__export(tri_state_checkbox_component_exports, {
|
|
36591
36739
|
TriStateCheckboxComponent: () => TriStateCheckboxComponent
|
|
36592
36740
|
});
|
|
36593
|
-
var
|
|
36741
|
+
var import_obsidian147 = require("obsidian");
|
|
36594
36742
|
init_css_class();
|
|
36595
36743
|
init_plugin_context();
|
|
36596
|
-
var TriStateCheckboxComponent = class extends
|
|
36744
|
+
var TriStateCheckboxComponent = class extends import_obsidian147.ValueComponent {
|
|
36597
36745
|
/**
|
|
36598
36746
|
* An input element of the checkbox.
|
|
36599
36747
|
*/
|
|
@@ -36671,10 +36819,10 @@ var typed_dropdown_component_exports = {};
|
|
|
36671
36819
|
__export(typed_dropdown_component_exports, {
|
|
36672
36820
|
TypedDropdownComponent: () => TypedDropdownComponent
|
|
36673
36821
|
});
|
|
36674
|
-
var
|
|
36822
|
+
var import_obsidian148 = require("obsidian");
|
|
36675
36823
|
init_css_class();
|
|
36676
36824
|
init_plugin_context();
|
|
36677
|
-
var TypedDropdownComponent = class extends
|
|
36825
|
+
var TypedDropdownComponent = class extends import_obsidian148.ValueComponent {
|
|
36678
36826
|
/**
|
|
36679
36827
|
* A select element of the component.
|
|
36680
36828
|
*
|
|
@@ -36707,7 +36855,7 @@ var TypedDropdownComponent = class extends import_obsidian147.ValueComponent {
|
|
|
36707
36855
|
*/
|
|
36708
36856
|
constructor(containerEl) {
|
|
36709
36857
|
super();
|
|
36710
|
-
this.dropdownComponent = new
|
|
36858
|
+
this.dropdownComponent = new import_obsidian148.DropdownComponent(containerEl);
|
|
36711
36859
|
addPluginCssClasses(containerEl, "typed-dropdown-component" /* TypedDropdownComponent */);
|
|
36712
36860
|
}
|
|
36713
36861
|
/**
|
|
@@ -36797,10 +36945,10 @@ var typed_multiple_dropdown_component_exports = {};
|
|
|
36797
36945
|
__export(typed_multiple_dropdown_component_exports, {
|
|
36798
36946
|
TypedMultipleDropdownComponent: () => TypedMultipleDropdownComponent
|
|
36799
36947
|
});
|
|
36800
|
-
var
|
|
36948
|
+
var import_obsidian149 = require("obsidian");
|
|
36801
36949
|
init_css_class();
|
|
36802
36950
|
init_plugin_context();
|
|
36803
|
-
var TypedMultipleDropdownComponent = class extends
|
|
36951
|
+
var TypedMultipleDropdownComponent = class extends import_obsidian149.ValueComponent {
|
|
36804
36952
|
/**
|
|
36805
36953
|
* A select element of the component.
|
|
36806
36954
|
*
|
|
@@ -36978,10 +37126,10 @@ var week_component_exports = {};
|
|
|
36978
37126
|
__export(week_component_exports, {
|
|
36979
37127
|
WeekComponent: () => WeekComponent
|
|
36980
37128
|
});
|
|
36981
|
-
var
|
|
37129
|
+
var import_obsidian150 = require("obsidian");
|
|
36982
37130
|
init_object_utils();
|
|
36983
37131
|
init_css_class();
|
|
36984
|
-
var moment6 = extractDefaultExportInterop(
|
|
37132
|
+
var moment6 = extractDefaultExportInterop(import_obsidian150.moment);
|
|
36985
37133
|
var DATE_FORMAT3 = "YYYY-[W]WW";
|
|
36986
37134
|
var WeekComponent = class extends TypedRangeTextComponent {
|
|
36987
37135
|
/**
|
|
@@ -37025,7 +37173,7 @@ var WeekComponent = class extends TypedRangeTextComponent {
|
|
|
37025
37173
|
};
|
|
37026
37174
|
|
|
37027
37175
|
// src/obsidian/setting-ex.ts
|
|
37028
|
-
var SettingEx = class extends
|
|
37176
|
+
var SettingEx = class extends import_obsidian151.Setting {
|
|
37029
37177
|
/**
|
|
37030
37178
|
* Adds a {@link CheckboxComponent} to the setting.
|
|
37031
37179
|
*
|
|
@@ -37242,7 +37390,7 @@ __export(validation_exports, {
|
|
|
37242
37390
|
getOsUnsafePathCharsRegExp: () => getOsUnsafePathCharsRegExp,
|
|
37243
37391
|
isValidationMessageHolder: () => isValidationMessageHolder
|
|
37244
37392
|
});
|
|
37245
|
-
var
|
|
37393
|
+
var import_obsidian152 = require("obsidian");
|
|
37246
37394
|
init_reg_exp();
|
|
37247
37395
|
function isValidationMessageHolder(value) {
|
|
37248
37396
|
return value.validationMessage !== void 0;
|
|
@@ -37257,7 +37405,7 @@ function getOsAndObsidianUnsafePathCharsRegExp(isWindows) {
|
|
|
37257
37405
|
]);
|
|
37258
37406
|
}
|
|
37259
37407
|
function getOsUnsafePathCharsRegExp(isWindows) {
|
|
37260
|
-
isWindows ??=
|
|
37408
|
+
isWindows ??= import_obsidian152.Platform.isWin;
|
|
37261
37409
|
return isWindows ? WINDOWS_UNSAFE_PATH_CHARS : UNIX_UNSAFE_PATH_CHARS;
|
|
37262
37410
|
}
|
|
37263
37411
|
|
|
@@ -37285,7 +37433,7 @@ var PluginSettingsTabEventsComponent = class extends ComponentEx {
|
|
|
37285
37433
|
registerAsyncEvent(this, pluginSettingsComponent.on("saveSettings", (newState, oldState, context) => this.params.onSaveSettings(newState, oldState, context)));
|
|
37286
37434
|
}
|
|
37287
37435
|
};
|
|
37288
|
-
var PluginSettingsTabBase = class extends mixinAsyncEvents()(
|
|
37436
|
+
var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian153.PluginSettingTab) {
|
|
37289
37437
|
/**
|
|
37290
37438
|
* Whether the plugin settings tab is open.
|
|
37291
37439
|
*
|
|
@@ -37323,7 +37471,7 @@ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian152.
|
|
|
37323
37471
|
super(params.plugin.app, params.plugin);
|
|
37324
37472
|
this.pluginSettingsComponent = params.pluginSettingsComponent;
|
|
37325
37473
|
addPluginCssClasses(this.containerEl, "plugin-settings-tab" /* PluginSettingsTab */);
|
|
37326
|
-
this.saveSettingsDebounced = (0,
|
|
37474
|
+
this.saveSettingsDebounced = (0, import_obsidian153.debounce)(
|
|
37327
37475
|
convertAsyncToSync(() => this.pluginSettingsComponent.saveToFile(SAVE_TO_FILE_CONTEXT)),
|
|
37328
37476
|
this.saveSettingsDebounceTimeoutInMilliseconds
|
|
37329
37477
|
);
|
|
@@ -37396,7 +37544,7 @@ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian152.
|
|
|
37396
37544
|
}
|
|
37397
37545
|
let shouldSkipOnChange = false;
|
|
37398
37546
|
const UPDATE_VALIDATOR_EL_TIMEOUT_IN_MILLISECONDS = 100;
|
|
37399
|
-
const updateValidatorElementDebounced = (0,
|
|
37547
|
+
const updateValidatorElementDebounced = (0, import_obsidian153.debounce)(() => {
|
|
37400
37548
|
window.requestAnimationFrame(() => {
|
|
37401
37549
|
updateValidatorEl();
|
|
37402
37550
|
});
|
|
@@ -37479,7 +37627,7 @@ var PluginSettingsTabBase = class extends mixinAsyncEvents()(import_obsidian152.
|
|
|
37479
37627
|
tooltipContentEl.textContent = validationMessage;
|
|
37480
37628
|
tooltipEl?.toggle(!!validationMessage);
|
|
37481
37629
|
} else if (validationMessage) {
|
|
37482
|
-
(0,
|
|
37630
|
+
(0, import_obsidian153.setTooltip)(validatorEl, validationMessage);
|
|
37483
37631
|
}
|
|
37484
37632
|
}
|
|
37485
37633
|
}
|
|
@@ -37723,7 +37871,7 @@ __export(plugin_exports, {
|
|
|
37723
37871
|
reloadPlugin: () => reloadPlugin,
|
|
37724
37872
|
showErrorAndDisablePlugin: () => showErrorAndDisablePlugin
|
|
37725
37873
|
});
|
|
37726
|
-
var
|
|
37874
|
+
var import_obsidian154 = require("obsidian");
|
|
37727
37875
|
init_async_events();
|
|
37728
37876
|
init_error();
|
|
37729
37877
|
init_function();
|
|
@@ -37732,7 +37880,7 @@ init_component_ex();
|
|
|
37732
37880
|
init_plugin_notice_component();
|
|
37733
37881
|
init_i18n();
|
|
37734
37882
|
init_translations_map();
|
|
37735
|
-
var PluginBase = class extends mixinAsyncEvents()(
|
|
37883
|
+
var PluginBase = class extends mixinAsyncEvents()(import_obsidian154.Plugin) {
|
|
37736
37884
|
/**
|
|
37737
37885
|
* Gets abort signal component.
|
|
37738
37886
|
*
|
|
@@ -38040,7 +38188,7 @@ var plugin_cli_handler_registrar_exports = {};
|
|
|
38040
38188
|
__export(plugin_cli_handler_registrar_exports, {
|
|
38041
38189
|
PluginCliHandlerRegistrar: () => PluginCliHandlerRegistrar
|
|
38042
38190
|
});
|
|
38043
|
-
var
|
|
38191
|
+
var import_obsidian155 = require("obsidian");
|
|
38044
38192
|
init_async();
|
|
38045
38193
|
var PluginCliHandlerRegistrar = class {
|
|
38046
38194
|
/**
|
|
@@ -38075,7 +38223,7 @@ var field_popover_exports = {};
|
|
|
38075
38223
|
__export(field_popover_exports, {
|
|
38076
38224
|
editFieldsInPopover: () => editFieldsInPopover
|
|
38077
38225
|
});
|
|
38078
|
-
var
|
|
38226
|
+
var import_obsidian157 = require("obsidian");
|
|
38079
38227
|
init_object_utils();
|
|
38080
38228
|
init_css_class();
|
|
38081
38229
|
|
|
@@ -38084,7 +38232,7 @@ var popover_exports = {};
|
|
|
38084
38232
|
__export(popover_exports, {
|
|
38085
38233
|
showPopover: () => showPopover
|
|
38086
38234
|
});
|
|
38087
|
-
var
|
|
38235
|
+
var import_obsidian156 = require("obsidian");
|
|
38088
38236
|
init_css_class();
|
|
38089
38237
|
init_i18n();
|
|
38090
38238
|
init_plugin_context();
|
|
@@ -38141,7 +38289,7 @@ async function showPopover(params) {
|
|
|
38141
38289
|
handleCancel();
|
|
38142
38290
|
}
|
|
38143
38291
|
});
|
|
38144
|
-
const buttonsSetting = new
|
|
38292
|
+
const buttonsSetting = new import_obsidian156.Setting(popoverEl);
|
|
38145
38293
|
buttonsSetting.addButton((button) => {
|
|
38146
38294
|
button.setButtonText(okButtonText ?? t2(($) => $.obsidianDevUtils.buttons.ok)).setCta().setClass("ok-button" /* OkButton */).onClick(handleOk);
|
|
38147
38295
|
});
|
|
@@ -38200,8 +38348,8 @@ async function editFieldsInPopover(params) {
|
|
|
38200
38348
|
}));
|
|
38201
38349
|
}
|
|
38202
38350
|
function addField(containerEl, field) {
|
|
38203
|
-
const setting = new
|
|
38204
|
-
const textComponent = new
|
|
38351
|
+
const setting = new import_obsidian157.Setting(containerEl).setName(field.name);
|
|
38352
|
+
const textComponent = new import_obsidian157.TextComponent(setting.controlEl);
|
|
38205
38353
|
textComponent.setValue(field.defaultValue ?? "");
|
|
38206
38354
|
textComponent.setPlaceholder(field.placeholder ?? "");
|
|
38207
38355
|
textComponent.inputEl.addClass("text-box" /* TextBox */);
|
|
@@ -38220,7 +38368,7 @@ __export(app_context_exports, {
|
|
|
38220
38368
|
AppContext: () => AppContext,
|
|
38221
38369
|
useApp: () => useApp
|
|
38222
38370
|
});
|
|
38223
|
-
var
|
|
38371
|
+
var import_obsidian158 = require("obsidian");
|
|
38224
38372
|
var import_react = __toESM(require_react(), 1);
|
|
38225
38373
|
init_type_guards();
|
|
38226
38374
|
var AppContext = (0, import_react.createContext)(void 0);
|
|
@@ -38233,7 +38381,7 @@ var ribbon_icon_registrar_exports = {};
|
|
|
38233
38381
|
__export(ribbon_icon_registrar_exports, {
|
|
38234
38382
|
PluginRibbonIconRegistrar: () => PluginRibbonIconRegistrar
|
|
38235
38383
|
});
|
|
38236
|
-
var
|
|
38384
|
+
var import_obsidian159 = require("obsidian");
|
|
38237
38385
|
var PluginRibbonIconRegistrar = class {
|
|
38238
38386
|
/**
|
|
38239
38387
|
* Creates a new instance of the {@link PluginRibbonIconRegistrar} class.
|
|
@@ -38294,8 +38442,8 @@ var setting_group_ex_exports = {};
|
|
|
38294
38442
|
__export(setting_group_ex_exports, {
|
|
38295
38443
|
SettingGroupEx: () => SettingGroupEx
|
|
38296
38444
|
});
|
|
38297
|
-
var
|
|
38298
|
-
var SettingGroupEx = class extends
|
|
38445
|
+
var import_obsidian160 = require("obsidian");
|
|
38446
|
+
var SettingGroupEx = class extends import_obsidian160.SettingGroup {
|
|
38299
38447
|
/**
|
|
38300
38448
|
* Creates a new setting group.
|
|
38301
38449
|
*
|
|
@@ -38322,7 +38470,7 @@ var status_bar_item_registrar_exports = {};
|
|
|
38322
38470
|
__export(status_bar_item_registrar_exports, {
|
|
38323
38471
|
PluginStatusBarItemRegistrar: () => PluginStatusBarItemRegistrar
|
|
38324
38472
|
});
|
|
38325
|
-
var
|
|
38473
|
+
var import_obsidian161 = require("obsidian");
|
|
38326
38474
|
var PluginStatusBarItemRegistrar = class {
|
|
38327
38475
|
/**
|
|
38328
38476
|
* Creates a new instance of the {@link PluginStatusBarItemRegistrar} class.
|
|
@@ -38597,7 +38745,7 @@ var view_registrar_exports = {};
|
|
|
38597
38745
|
__export(view_registrar_exports, {
|
|
38598
38746
|
PluginViewRegistrar: () => PluginViewRegistrar
|
|
38599
38747
|
});
|
|
38600
|
-
var
|
|
38748
|
+
var import_obsidian162 = require("obsidian");
|
|
38601
38749
|
var PluginViewRegistrar = class {
|
|
38602
38750
|
/**
|
|
38603
38751
|
* Creates a new instance of the {@link PluginViewRegistrar} class.
|
|
@@ -38816,10 +38964,12 @@ __export(merged_exports, {
|
|
|
38816
38964
|
EmptyFolderBehavior: () => EmptyFolderBehavior,
|
|
38817
38965
|
ErrorWrapper: () => ErrorWrapper,
|
|
38818
38966
|
EventRefDisposable: () => EventRefDisposable,
|
|
38967
|
+
FOLDER_NOTES_PLUGIN_ID: () => FOLDER_NOTES_PLUGIN_ID2,
|
|
38819
38968
|
FileCommandHandler: () => FileCommandHandler,
|
|
38820
38969
|
FileComponent: () => FileComponent,
|
|
38821
38970
|
FileSystemType: () => FileSystemType,
|
|
38822
38971
|
FolderCommandHandler: () => FolderCommandHandler,
|
|
38972
|
+
FolderNoteLocation: () => FolderNoteLocation,
|
|
38823
38973
|
FunctionHandlingMode: () => FunctionHandlingMode,
|
|
38824
38974
|
GenerateMarkdownLinkDefaultParamsComponent: () => GenerateMarkdownLinkDefaultParamsComponent,
|
|
38825
38975
|
GlobalCommandHandler: () => GlobalCommandHandler,
|
|
@@ -39236,6 +39386,8 @@ __export(merged_exports, {
|
|
|
39236
39386
|
requestResourceUnlockForPath: () => requestResourceUnlockForPath,
|
|
39237
39387
|
resetObsidianDevUtilsState: () => resetObsidianDevUtilsState,
|
|
39238
39388
|
resolve: () => resolve,
|
|
39389
|
+
resolveFolderNote: () => resolveFolderNote,
|
|
39390
|
+
resolveFolderNoteConfig: () => resolveFolderNoteConfig,
|
|
39239
39391
|
resolveNotebookNavigatorApi: () => resolveNotebookNavigatorApi,
|
|
39240
39392
|
resolveValue: () => resolveValue,
|
|
39241
39393
|
retryWithTimeout: () => retryWithTimeout,
|
|
@@ -39348,8 +39500,8 @@ init_value_provider();
|
|
|
39348
39500
|
init_value_wrapper();
|
|
39349
39501
|
|
|
39350
39502
|
// integration-test-plugin/main.ts
|
|
39351
|
-
var
|
|
39352
|
-
var IntegrationTestPlugin = class extends
|
|
39503
|
+
var import_obsidian163 = require("obsidian");
|
|
39504
|
+
var IntegrationTestPlugin = class extends import_obsidian163.Plugin {
|
|
39353
39505
|
onload() {
|
|
39354
39506
|
window.__obsidianDevUtilsModule = src_exports;
|
|
39355
39507
|
}
|