Comparing version 1.1.1 to 1.2.3
@@ -1,2 +0,1 @@ | ||
// A color used to encode color data for nodes and edges | ||
@@ -9,3 +8,3 @@ // can be a number (like "1") representing one of the (currently 6) supported colors. | ||
export interface CanvasData { | ||
nodes: (CanvasFileData | CanvasTextData | CanvasLinkData)[]; | ||
nodes: AllCanvasNodeData[]; | ||
edges: CanvasEdgeData[]; | ||
@@ -27,2 +26,4 @@ } | ||
export type AllCanvasNodeData = CanvasFileData | CanvasTextData | CanvasLinkData | CanvasGroupData; | ||
// A node that is a file, where the file is located somewhere in the vault. | ||
@@ -32,2 +33,4 @@ export interface CanvasFileData extends CanvasNodeData { | ||
file: string; | ||
// An optional subpath which links to a heading or a block. Always starts with a `#`. | ||
subpath?: string; | ||
} | ||
@@ -47,5 +50,22 @@ | ||
// The background image rendering style | ||
export type BackgroundStyle = 'cover' | 'ratio' | 'repeat'; | ||
// A node that represents a group. | ||
export interface CanvasGroupData extends CanvasNodeData { | ||
type: 'group'; | ||
// Optional label to display on top of the group. | ||
label?: string; | ||
// Optional background image, stores the path to the image file in the vault. | ||
background?: string; | ||
// Optional background image rendering style; defaults to 'cover'. | ||
backgroundStyle?: BackgroundStyle; | ||
} | ||
// The side of the node that a connection is connected to | ||
export type NodeSide = 'top' | 'right' | 'bottom' | 'left'; | ||
// What to display at the end of an edge | ||
export type EdgeEnd = 'none' | 'arrow'; | ||
// An edge | ||
@@ -58,5 +78,9 @@ export interface CanvasEdgeData { | ||
fromSide: NodeSide; | ||
// The starting edge end; defaults to 'none' | ||
fromEnd?: EdgeEnd; | ||
// The node ID and side where this edge ends | ||
toNode: string; | ||
toSide: NodeSide; | ||
// The ending edge end; defaults to 'arrow' | ||
toEnd?: EdgeEnd; | ||
// The color of this edge | ||
@@ -63,0 +87,0 @@ color?: CanvasColor; |
# Changelog | ||
## v1.1.3 (2022-12-9 — Insider build) | ||
- Updated the [Canvas spec](https://github.com/obsidianmd/obsidian-api/blob/master/canvas.d.ts) to indicate that colors can be stored in 1 or 2 formats: | ||
- as a hex string (i.e. "#FFFFFF") | ||
- as a number "1", "2", etc. | ||
If it's a number, this refers to the palette position. It can be themed via CSS variables. | ||
### Theme Changes | ||
There are some new CSS variables related to canvas and callouts in 1.1.3+. All the extended palette colors now have an RGB variant that is used for callouts and canvas colors. The hex values are primarily used for syntax highlighting. | ||
```css | ||
body { | ||
--callout-bug: var(--color-red-rgb); | ||
--callout-default: var(--color-blue-rgb); | ||
--callout-error: var(--color-red-rgb); | ||
--callout-example: var(--color-purple-rgb); | ||
--callout-fail: var(--color-red-rgb); | ||
--callout-important: var(--color-cyan-rgb); | ||
--callout-info: var(--color-blue-rgb); | ||
--callout-question: var(--color-yellow-rgb); | ||
--callout-success: var(--color-green-rgb); | ||
--callout-summary: var(--color-cyan-rgb); | ||
--callout-tip: var(--color-cyan-rgb); | ||
--callout-todo: var(--color-blue-rgb); | ||
--callout-warning: var(--color-orange-rgb); | ||
--callout-quote: 158, 158, 158; | ||
} | ||
.theme-light { | ||
--color-red-rgb: 228, 55, 75; | ||
--color-red: #E4374B; | ||
--color-orange-rgb: 217, 108, 0; | ||
--color-orange: #d96c00; | ||
--color-yellow-rgb: 189, 142, 55; | ||
--color-yellow: #BD8E37; | ||
--color-green-rgb: 12, 181, 79; | ||
--color-green: #0cb54f; | ||
--color-cyan-rgb: 45, 183, 181; | ||
--color-cyan: #2db7b5; | ||
--color-blue-rgb: 8, 109, 221; | ||
--color-blue: #086DDD; | ||
--color-purple-rgb: 135, 107, 224; | ||
--color-purple: #876be0; | ||
--color-pink-rgb: 195, 43, 116; | ||
--color-pink: #C32B74; | ||
} | ||
.theme-dark { | ||
--color-red-rgb: 251, 70, 76; | ||
--color-red: #fb464c; | ||
--color-orange-rgb: 233, 151, 63; | ||
--color-orange: #E9973F; | ||
--color-yellow-rgb: 224, 222, 113; | ||
--color-yellow: #E0DE71; | ||
--color-green-rgb: 68, 207, 110; | ||
--color-green: #44CF6E; | ||
--color-cyan-rgb: 83, 223, 221; | ||
--color-cyan: #53DFDD; | ||
--color-blue-rgb: 2, 122, 255; | ||
--color-blue: #027aff; | ||
--color-purple-rgb: 168, 130, 255; | ||
--color-purple: #a882ff; | ||
--color-pink-rgb: 250, 153, 205; | ||
--color-pink: #FA99CD; | ||
} | ||
``` | ||
## v1.1.1 (2022-12-8 — Insider build) | ||
<!-- _[Changes since v1.0](https://github.com/obsidianmd/obsidian-api/compare/32fe4c3f...TODO)_ --> | ||
_[Changes since v1.0](https://github.com/obsidianmd/obsidian-api/compare/32fe4c3f...6161bf59)_ | ||
@@ -81,3 +164,3 @@ - [`file-open`](https://github.com/obsidianmd/obsidian-api/blob/ec589e9762a1d7e2faad01f894cb34c41b10ecaf/obsidian.d.ts#L4189) event is now fired when focusing a Canvas file card. | ||
- Added support for an optional `donation` field the plugin manifest. The donation URL will be shown in the plugin gallery entry. | ||
- Added support for an optional `fundingUrl` field the plugin manifest This is a link for users that want to donate to show appreciation and support plugin development. It's displayed when your plugin is selected in the list of community plugins. | ||
- Added macOS calendar entitlements. This allow scripts run from within Obsidian to request calendar access. | ||
@@ -84,0 +167,0 @@ |
{ | ||
"name": "obsidian", | ||
"version": "1.1.1", | ||
"version": "1.2.3", | ||
"description": "Type definitions for the latest Obsidian API (https://obsidian.md)", | ||
@@ -5,0 +5,0 @@ "keywords": ["obsdmd"], |
@@ -22,4 +22,5 @@ ## Obsidian API | ||
- `description` the long description of your plugin. | ||
- `isDesktopOnly` whether your plugin uses NodeJS or Electron APIs. | ||
- `authorUrl` (optional) a URL to your own website. | ||
- `isDesktopOnly` whether your plugin uses NodeJS or Electron APIs. | ||
- `fundingUrl` (optional) a link for users to donation to show appreciation and support plugin development. | ||
@@ -26,0 +27,0 @@ `main.js` |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140580
8
4634
67