forked from temberature/obsidian-add2excalidraw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
170 lines (168 loc) · 17.5 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __export = (target, all) => {
__markAsModule(target);
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __reExport = (target, module2, desc) => {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
for (let key of __getOwnPropNames(module2))
if (!__hasOwnProp.call(target, key) && key !== "default")
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
}
return target;
};
var __toModule = (module2) => {
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
// main.ts
__export(exports, {
default: () => MyPlugin
});
var import_obsidian = __toModule(require("obsidian"));
var DEFAULT_SETTINGS = {
mySetting: "default"
};
var MyPlugin = class extends import_obsidian.Plugin {
onload() {
return __async(this, null, function* () {
yield this.loadSettings();
console.log(document.getElementsByClassName("nav-folder-title")[0]);
this.app.workspace.on("file-open", (e) => {
console.log(e, this.relatedNotes);
if (this.relatedNotes && e.basename.contains(".excalidraw")) {
window.setTimeout(() => __async(this, null, function* () {
const ea = window.ExcalidrawAutomate;
ea.reset();
ea.setView("active");
const count = ea.getViewElements().filter((ele) => ele.type === "text").length;
this.relatedNotes.forEach((note, index) => {
ea.addText((count + index) % 10 * 400, Math.floor((count + index) / 10) * 400, "![[" + note.basename + "]]", { width: 300, box: "box" });
});
this.relatedNotes = [];
yield ea.addElementsToView();
}), 2e3);
}
});
const ribbonIconEl = this.addRibbonIcon("dice", "Sample Plugin", (evt) => __async(this, null, function* () {
const file = this.app.workspace.activeLeaf.view.file;
this.relatedNotes = this.relatedNotes || [];
this.relatedNotes.push(file);
const embedLink = "![[" + file.basename + "]]";
new import_obsidian.Notice(embedLink);
}));
ribbonIconEl.addClass("my-plugin-ribbon-class");
const statusBarItemEl = this.addStatusBarItem();
statusBarItemEl.setText("Status Bar Text");
this.addCommand({
id: "open-sample-modal-simple",
name: "Open sample modal (simple)",
callback: () => {
new SampleModal(this.app).open();
}
});
this.addCommand({
id: "sample-editor-command",
name: "Sample editor command",
editorCallback: (editor, view) => {
console.log(editor.getSelection());
editor.replaceSelection("Sample Editor Command");
}
});
this.addCommand({
id: "open-sample-modal-complex",
name: "Open sample modal (complex)",
checkCallback: (checking) => {
const markdownView = this.app.workspace.getActiveViewOfType(import_obsidian.MarkdownView);
if (markdownView) {
if (!checking) {
new SampleModal(this.app).open();
}
return true;
}
}
});
this.addSettingTab(new SampleSettingTab(this.app, this));
this.registerDomEvent(document, "click", (evt) => {
});
this.registerInterval(window.setInterval(() => console.log("setInterval"), 5 * 60 * 1e3));
});
}
onunload() {
console.log("unload");
this.app.workspace.off("file-open", () => {
});
this.app.workspace.off("active-leaf-change", () => {
});
}
loadSettings() {
return __async(this, null, function* () {
this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData());
});
}
saveSettings() {
return __async(this, null, function* () {
yield this.saveData(this.settings);
});
}
};
var SampleModal = class extends import_obsidian.Modal {
constructor(app) {
super(app);
}
onOpen() {
const { contentEl } = this;
contentEl.setText("Woah!");
}
onClose() {
const { contentEl } = this;
contentEl.empty();
}
};
var SampleSettingTab = class extends import_obsidian.PluginSettingTab {
constructor(app, plugin) {
super(app, plugin);
this.plugin = plugin;
}
display() {
const { containerEl } = this;
containerEl.empty();
containerEl.createEl("h2", { text: "Settings for my awesome plugin." });
new import_obsidian.Setting(containerEl).setName("Setting #1").setDesc("It's a secret").addText((text) => text.setPlaceholder("Enter your secret").setValue(this.plugin.settings.mySetting).onChange((value) => __async(this, null, function* () {
console.log("Secret: " + value);
this.plugin.settings.mySetting = value;
yield this.plugin.saveSettings();
})));
}
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibWFpbi50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiaW1wb3J0IHtcclxuXHRBcHAsXHJcblx0RWRpdG9yLFxyXG5cdE1hcmtkb3duVmlldyxcclxuXHRNb2RhbCxcclxuXHROb3RpY2UsXHJcblx0UGx1Z2luLFxyXG5cdFBsdWdpblNldHRpbmdUYWIsXHJcblx0U2V0dGluZyxcclxufSBmcm9tIFwib2JzaWRpYW5cIjtcclxuXHJcbi8vIFJlbWVtYmVyIHRvIHJlbmFtZSB0aGVzZSBjbGFzc2VzIGFuZCBpbnRlcmZhY2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