Skip to content

Commit

Permalink
Merge pull request #66 from jparkerweb/develop
Browse files Browse the repository at this point in the history
v1.10.8
  • Loading branch information
jparkerweb authored Jan 25, 2025
2 parents 2320555 + d2ed0fd commit 3d19524
Show file tree
Hide file tree
Showing 24 changed files with 3,681 additions and 1,340 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@

# Other common ignores
node_modules
*.log
.DS_Store

# AI Rules
/.cursorrules
/.windsurfrules
17 changes: 8 additions & 9 deletions .cursorrules → .rules
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
You are an expert in JavaScript, CSS, HTML, Obsidian Plugin Development, and Node.js.
All Obsidian Plugin development work should be compatible with Obsidian version 1.7.2+

Code Style and Structure:
## Code Style and Structure
- Write Clean, Readable Code: Ensure your code is easy to read and understand. Use descriptive names for variables and functions.
- Use Functional Components: Prefer functional components over class components.
- Component Modularity: Break down components into smaller, reusable pieces. Keep components focused on a single responsibility.
- Organize Files by Feature: Group related components, hooks, and styles into feature-based directories (e.g., user-profile, chat-screen).

Naming Conventions:
## Naming Conventions
- Variables and Functions: Use camelCase for variables and functions (e.g., isFetchingData, handleUserInput).
- Components: Use PascalCase for component names (e.g., UserProfile, ChatScreen).
- Directories: Use lowercase and hyphenated names for directories (e.g., user-profile, chat-screen).

JavaScript Usage:
## JavaScript Usage
- Avoid Global Variables: Minimize the use of global variables to prevent unintended side effects where possible.
- Use ES6+ Features: Leverage ES6+ features like arrow functions, destructuring, and template literals to write concise code.

General preferences:
## General preferences
- Follow the user's requirements carefully & to the letter.
- Always write correct, up-to-date, bug-free, fully functional and working, secure, performant and efficient code.
- Focus on readability over being performant.
Expand All @@ -26,8 +26,7 @@ General preferences:
- Be concise. Minimize any other prose.
- If you think there might not be a correct answer, you say so. If you do not know the answer, say so instead of guessing.



always obey the patterns defined here:
@https://docs.obsidian.md/Plugins/Guides/

## Miscellanious Instructions
- Always obey the patterns defined here: @https://docs.obsidian.md/Plugins/Guides/
- never edit the following line: `const inlineFootnoteRegex = /\^\[((?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*)\]/g;` in @src/main.js
- never edit the following line: `const refFootnoteRegex = /\[\^[^\]]+\]:\s*((?:[^\[\]]|\[(?:[^\[\]]|\[[^\[\]]*\])*\])*)/g;` in @src/main.js
20 changes: 17 additions & 3 deletions .vault/rich-foot-example/.obsidian/plugins/css-editor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9955,6 +9955,13 @@ var CssEditorView = class extends import_obsidian2.ItemView {
import_view5.EditorView.updateListener.of((update) => {
if (update.docChanged) {
this.requestSave(update.state.doc.toString());
if (this.file) {
this.app.workspace.trigger(
"css-editor-change",
this.file,
update.state.doc.toString()
);
}
}
})
]
Expand All @@ -9977,6 +9984,14 @@ var CssEditorView = class extends import_obsidian2.ItemView {
clearInterval(timer);
}, 200);
this.registerInterval(timer);
this.registerEvent(
this.app.workspace.on("css-editor-change", async (file, data) => {
var _a;
if (((_a = this.file) == null ? void 0 : _a.name) === file.name && this.getEditorData() !== data) {
this.dispatchEditorData(data);
}
})
);
}
getEditorData() {
return this.editor.state.doc.toString();
Expand All @@ -9987,7 +10002,8 @@ var CssEditorView = class extends import_obsidian2.ItemView {
from: 0,
to: this.editor.state.doc.length,
insert: data
}
},
selection: this.editor.state.selection
});
}
getState() {
Expand Down Expand Up @@ -10471,5 +10487,3 @@ var CssEditorPlugin = class extends import_obsidian7.Plugin {
});
}
};

/* nosourcemap */
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
{
"id": "css-editor",
"name": "CSS Editor",
"version": "1.2.2",
"minAppVersion": "0.15.0",
"description": "Edit CSS files within Obsidian.",
"author": "Zachatoo",
"authorUrl": "https://zachyoung.dev",
"fundingUrl": "https://github.com/sponsors/Zachatoo",
"isDesktopOnly": false
}
{"id":"css-editor","name":"CSS Editor","version":"1.2.3","minAppVersion":"0.15.0","description":"Edit CSS files within Obsidian.","author":"Zachatoo","authorUrl":"https://zachyoung.dev","fundingUrl":"https://github.com/sponsors/Zachatoo","isDesktopOnly":false}
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,18 @@ html > body > div:first-child > header:first-child > div > div:first-child > div
forceIframe: false,
customCss: "",
customJs: ""
},
"readwise-daily-review": {
"url": "https://readwise.io/dailyreview",
"displayName": "Readwise Daily Review",
"icon": "highlighter",
"hideOnMobile": true,
"addRibbonIcon": false,
"openInCenter": false,
"zoomLevel": 1,
"forceIframe": false,
"customCss": ".fixed-nav {\n display: none !important;\n}",
"customJs": ""
}
};
function getIcon(settings) {
Expand All @@ -214,6 +226,7 @@ var CustomFrame = class {
if (import_obsidian.Platform.isDesktopApp && !this.data.forceIframe) {
let frameDoc = parent.doc;
this.frame = frameDoc.createElement("webview");
this.frame.partition = "persist:vault-" + app.appId;
parent.appendChild(this.frame);
this.frame.setAttribute("allowpopups", "");
this.frame.addEventListener("dom-ready", () => {
Expand All @@ -237,13 +250,18 @@ var CustomFrame = class {
this.frame.addClass("custom-frames-frame");
this.frame.addClass(`custom-frames-${getId(this.data)}`);
this.frame.setAttribute("style", style);
let src = this.data.url;
let src = new URL(this.data.url);
if (urlSuffix) {
if (!urlSuffix.startsWith("/"))
src += "/";
src += urlSuffix;
let suffix = new URL(urlSuffix, src.origin);
suffix.searchParams.forEach((value, key) => {
src.searchParams.set(key, value);
});
if (suffix.pathname !== "/") {
src.pathname += suffix.pathname;
}
src.hash = suffix.hash || src.hash;
}
this.frame.setAttribute("src", src);
this.frame.setAttribute("src", src.toString());
}
refresh() {
if (this.frame instanceof HTMLIFrameElement) {
Expand Down Expand Up @@ -297,8 +315,8 @@ var CustomFrame = class {
// src/settings-tab.ts
var import_obsidian2 = __toModule(require("obsidian"));
var CustomFramesSettingTab = class extends import_obsidian2.PluginSettingTab {
constructor(app, plugin) {
super(app, plugin);
constructor(app2, plugin) {
super(app2, plugin);
this.plugin = plugin;
}
display() {
Expand Down Expand Up @@ -427,8 +445,8 @@ var CustomFramesSettingTab = class extends import_obsidian2.PluginSettingTab {
let addDiv = this.containerEl.createDiv();
let dropdown = new import_obsidian2.DropdownComponent(addDiv);
dropdown.addOption("new", "Custom");
for (let key of Object.keys(presets))
dropdown.addOption(key, presets[key].displayName);
for (let [key, value] of Object.entries(presets).sort((a, b) => a[1].displayName.localeCompare(b[1].displayName)))
dropdown.addOption(key, value.displayName);
new import_obsidian2.ButtonComponent(addDiv).setButtonText("Add Frame").setClass("custom-frames-add").onClick(() => __async(this, null, function* () {
let option = dropdown.getValue();
if (option == "new") {
Expand Down Expand Up @@ -459,9 +477,14 @@ var CustomFramesSettingTab = class extends import_obsidian2.PluginSettingTab {
});
disclaimer.createSpan({ text: "." });
this.containerEl.createEl("hr");
this.containerEl.createEl("p", { text: "Need help using the plugin? Feel free to join the Discord server!" });
this.containerEl.createEl("a", { href: "https://link.ellpeck.de/discordweb" }).createEl("img", {
attr: { src: "https://ellpeck.de/res/discord-wide.png" },
cls: "custom-frames-support"
});
this.containerEl.createEl("p", { text: "If you like this plugin and want to support its development, you can do so through my website by clicking this fancy image!" });
this.containerEl.createEl("a", { href: "https://ellpeck.de/support" }).createEl("img", {
attr: { src: "https://ellpeck.de/res/generalsupport.png" },
attr: { src: "https://ellpeck.de/res/generalsupport-wide.png" },
cls: "custom-frames-support"
});
}
Expand Down Expand Up @@ -534,15 +557,15 @@ CustomFrameView.actions = [
icon: "refresh-cw",
action: (v) => v.frame.refresh()
},
{
name: "Go back",
icon: "arrow-left",
action: (v) => v.frame.goBack()
},
{
name: "Go forward",
icon: "arrow-right",
action: (v) => v.frame.goForward()
},
{
name: "Go back",
icon: "arrow-left",
action: (v) => v.frame.goBack()
}
];

Expand Down Expand Up @@ -630,6 +653,3 @@ var CustomFramesPlugin = class extends import_obsidian4.Plugin {
});
}
};


/* nosourcemap */
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
{
"id": "obsidian-custom-frames",
"name": "Custom Frames",
"version": "2.4.7",
"minAppVersion": "1.2.0",
"description": "A plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.",
"author": "Ellpeck",
"authorUrl": "https://ellpeck.de",
"isDesktopOnly": false
}
{"id":"obsidian-custom-frames","name":"Custom Frames","version":"2.5.0","minAppVersion":"1.2.0","description":"A plugin that turns web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.","author":"Ellpeck","authorUrl":"https://ellpeck.de","fundingUrl":"https://ellpeck.de/support","isDesktopOnly":false}
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
.custom-frames-view {
padding: 0 !important;
overflow: hidden !important;
}

.custom-frames-view-file {
padding: 0;
overflow: auto;
}

.custom-frames-frame {
width: 100%;
height: 100%;
border: none;
background-color: white;
background-clip: content-box;
}

.custom-frames-add {
margin-left: 10px;
}

.custom-frames-show {
margin-bottom: 18px;
}

.custom-frames-support {
max-width: 50%;
width: 400px;
height: auto;
}
.custom-frames-view {
padding: 0 !important;
overflow: hidden !important;
}

.custom-frames-view-file {
padding: 0;
overflow: auto;
}

.custom-frames-frame {
width: 100%;
height: 100%;
border: none;
background-color: white;
background-clip: content-box;
}

.custom-frames-add {
margin-left: 10px;
}

.custom-frames-show {
margin-bottom: 18px;
}

.custom-frames-support {
width: 100%;
height: auto;
}
57 changes: 53 additions & 4 deletions .vault/rich-foot-example/.obsidian/plugins/pexels-banner/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,76 @@
"customBannerShuffleField": [
"banner-shuffle"
],
"customBannerIconField": [
"icon"
],
"customBannerIconSizeField": [
"icon-size"
],
"customBannerIconXPositionField": [
"icon-x"
],
"customBannerIconOpacityField": [
"icon-opacity"
],
"customBannerIconColorField": [
"icon-color"
],
"customBannerIconFontWeightField": [
"icon-font-weight"
],
"customBannerIconBackgroundColorField": [
"icon-bg-color"
],
"customBannerIconPaddingXField": [
"icon-padding-x"
],
"customBannerIconPaddingYField": [
"icon-padding-y"
],
"customBannerIconBorderRadiusField": [
"icon-border-radius"
],
"customBannerIconVeritalOffsetField": [
"icon-y"
],
"folderImages": [],
"contentStartPosition": 150,
"imageDisplay": "cover",
"imageRepeat": false,
"bannerHeight": 350,
"fade": -75,
"bannerFadeInAnimationDuration": 300,
"borderRadius": 17,
"showPinIcon": true,
"pinnedImageFolder": "pixel-banner-images",
"showReleaseNotes": true,
"lastVersion": "2.19.2",
"lastVersion": "2.21.1",
"showRefreshIcon": true,
"showViewImageIcon": true,
"hidePixelBannerFields": true,
"hidePropertiesSectionIfOnlyBanner": true,
"showSetTargetXYPosition": true,
"hidePixelBannerFields": false,
"hidePropertiesSectionIfOnlyBanner": false,
"titleColor": "var(--inline-title-color)",
"enableImageShuffle": false,
"hideEmbeddedNoteTitles": false,
"hideEmbeddedNoteBanners": false,
"showSelectImageIcon": true,
"defaultSelectImagePath": "",
"useShortPath": true,
"bannerGap": 12
"bannerGap": 12,
"bannerIconSize": 70,
"bannerIconXPosition": 25,
"bannerIconOpacity": 100,
"bannerIconColor": "",
"bannerIconFontWeight": "normal",
"bannerIconBackgroundColor": "",
"bannerIconPaddingX": "0",
"bannerIconPaddingY": "0",
"bannerIconBorderRadius": "17",
"bannerIconVeritalOffset": "0",
"customBannerIconPaddingField": [
"icon-padding"
],
"bannerIconPadding": "0"
}
Loading

0 comments on commit 3d19524

Please sign in to comment.