@quartz-community/obsidian-plugin-excalidraw 0.1.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 +23 -0
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +4169 -0
- package/dist/components/index.js.map +1 -0
- package/dist/frames/index.d.ts +5 -0
- package/dist/frames/index.js +107 -0
- package/dist/frames/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +4926 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +78 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +139 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export { BuildCtx, CSSResource, ChangeEvent, FilePath, FullSlug, JSResource, PageGenerator, PageMatcher, ProcessedContent, QuartzComponent, QuartzComponentConstructor, QuartzComponentProps, QuartzEmitterPlugin, QuartzEmitterPluginInstance, QuartzFilterPlugin, QuartzFilterPluginInstance, QuartzPageTypePlugin, QuartzPageTypePluginInstance, QuartzPluginData, QuartzTransformerPlugin, QuartzTransformerPluginInstance, StaticResources, VirtualPage } from '@quartz-community/types';
|
|
2
|
+
|
|
3
|
+
interface ExcalidrawPageOptions {
|
|
4
|
+
/** Enable client-side pan/zoom interaction on the SVG. */
|
|
5
|
+
enableInteraction?: boolean;
|
|
6
|
+
/** Theme for rendering: "auto" follows system preference. */
|
|
7
|
+
darkMode?: "auto" | "light" | "dark";
|
|
8
|
+
/** Padding around drawing content in the SVG (px). */
|
|
9
|
+
exportPadding?: number;
|
|
10
|
+
}
|
|
11
|
+
interface ExcalidrawData {
|
|
12
|
+
type: "excalidraw";
|
|
13
|
+
version: number;
|
|
14
|
+
source?: string;
|
|
15
|
+
elements: ExcalidrawElement[];
|
|
16
|
+
appState: Partial<ExcalidrawAppState>;
|
|
17
|
+
files: Record<string, ExcalidrawFileData>;
|
|
18
|
+
/** Parsed from # Embedded files section — maps file hash → wikilink target */
|
|
19
|
+
embeddedFiles?: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
interface ExcalidrawElement {
|
|
22
|
+
id: string;
|
|
23
|
+
type: string;
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
angle: number;
|
|
29
|
+
strokeColor: string;
|
|
30
|
+
backgroundColor: string;
|
|
31
|
+
fillStyle: string;
|
|
32
|
+
strokeWidth: number;
|
|
33
|
+
strokeStyle: string;
|
|
34
|
+
roughness: number;
|
|
35
|
+
opacity: number;
|
|
36
|
+
seed: number;
|
|
37
|
+
isDeleted: boolean;
|
|
38
|
+
roundness: {
|
|
39
|
+
type: number;
|
|
40
|
+
value?: number;
|
|
41
|
+
} | null;
|
|
42
|
+
points?: Array<[number, number]>;
|
|
43
|
+
text?: string;
|
|
44
|
+
rawText?: string;
|
|
45
|
+
fontSize?: number;
|
|
46
|
+
fontFamily?: number;
|
|
47
|
+
textAlign?: string;
|
|
48
|
+
verticalAlign?: string;
|
|
49
|
+
fileId?: string;
|
|
50
|
+
startBinding?: unknown;
|
|
51
|
+
endBinding?: unknown;
|
|
52
|
+
startArrowhead?: string | null;
|
|
53
|
+
endArrowhead?: string | null;
|
|
54
|
+
groupIds?: string[];
|
|
55
|
+
frameId?: string | null;
|
|
56
|
+
boundElements?: Array<{
|
|
57
|
+
id: string;
|
|
58
|
+
type: string;
|
|
59
|
+
}> | null;
|
|
60
|
+
link?: string | null;
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
interface ExcalidrawAppState {
|
|
64
|
+
viewBackgroundColor: string;
|
|
65
|
+
exportBackground: boolean;
|
|
66
|
+
exportWithDarkMode: boolean;
|
|
67
|
+
gridSize?: number | null;
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
}
|
|
70
|
+
interface ExcalidrawFileData {
|
|
71
|
+
mimeType: string;
|
|
72
|
+
id: string;
|
|
73
|
+
dataURL: string;
|
|
74
|
+
created: number;
|
|
75
|
+
lastRetrieved?: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type { ExcalidrawAppState, ExcalidrawData, ExcalidrawElement, ExcalidrawFileData, ExcalidrawPageOptions };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
package/package.json
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@quartz-community/obsidian-plugin-excalidraw",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Excalidraw page type plugin for Quartz v5. Renders Obsidian Excalidraw drawings as interactive SVG pages.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Quartz Community",
|
|
8
|
+
"homepage": "https://quartz.jzhao.xyz",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/quartz-community/obsidian-plugin-excalidraw"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"quartz",
|
|
15
|
+
"quartz-plugin",
|
|
16
|
+
"excalidraw",
|
|
17
|
+
"obsidian",
|
|
18
|
+
"page-type",
|
|
19
|
+
"svg"
|
|
20
|
+
],
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"CHANGELOG.md"
|
|
26
|
+
],
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./types": {
|
|
33
|
+
"types": "./dist/types.d.ts",
|
|
34
|
+
"import": "./dist/types.js"
|
|
35
|
+
},
|
|
36
|
+
"./components": {
|
|
37
|
+
"types": "./dist/components/index.d.ts",
|
|
38
|
+
"import": "./dist/components/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./frames": {
|
|
41
|
+
"types": "./dist/frames/index.d.ts",
|
|
42
|
+
"import": "./dist/frames/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./package.json": "./package.json"
|
|
45
|
+
},
|
|
46
|
+
"main": "./dist/index.js",
|
|
47
|
+
"types": "./dist/index.d.ts",
|
|
48
|
+
"sideEffects": false,
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsup",
|
|
51
|
+
"dev": "tsup --watch",
|
|
52
|
+
"lint": "eslint . --max-warnings=0",
|
|
53
|
+
"format": "prettier . --check",
|
|
54
|
+
"test": "vitest run",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"check": "npm run typecheck && npm run lint && npm run format && npm run test",
|
|
57
|
+
"prepublishOnly": "npm run build"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"preact": "^10.0.0"
|
|
61
|
+
},
|
|
62
|
+
"peerDependenciesMeta": {
|
|
63
|
+
"preact": {
|
|
64
|
+
"optional": false
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@quartz-community/types": "^0.2.1",
|
|
69
|
+
"@quartz-community/utils": "^0.1.0",
|
|
70
|
+
"github-slugger": "^2.0.0",
|
|
71
|
+
"lz-string": "^1.5.0",
|
|
72
|
+
"perfect-freehand": "^1.2.2",
|
|
73
|
+
"roughjs": "^4.6.6"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@types/lz-string": "^1.3.34",
|
|
77
|
+
"@types/node": "^24.10.0",
|
|
78
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
79
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
80
|
+
"eslint": "^8.57.0",
|
|
81
|
+
"eslint-config-prettier": "^9.1.0",
|
|
82
|
+
"hast-util-to-html": "^9.0.5",
|
|
83
|
+
"preact": "^10.28.2",
|
|
84
|
+
"prettier": "^3.6.2",
|
|
85
|
+
"sass": "^1.97.3",
|
|
86
|
+
"sass-embedded": "^1.97.3",
|
|
87
|
+
"tsup": "^8.5.0",
|
|
88
|
+
"typescript": "^5.9.3",
|
|
89
|
+
"vfile": "^6.0.3",
|
|
90
|
+
"vitest": "^2.1.9"
|
|
91
|
+
},
|
|
92
|
+
"quartz": {
|
|
93
|
+
"name": "obsidian-plugin-excalidraw",
|
|
94
|
+
"displayName": "Excalidraw",
|
|
95
|
+
"category": [
|
|
96
|
+
"pageType",
|
|
97
|
+
"filter",
|
|
98
|
+
"component"
|
|
99
|
+
],
|
|
100
|
+
"version": "1.0.0",
|
|
101
|
+
"quartzVersion": ">=5.0.0",
|
|
102
|
+
"dependencies": [],
|
|
103
|
+
"defaultOrder": 50,
|
|
104
|
+
"defaultEnabled": true,
|
|
105
|
+
"defaultOptions": {
|
|
106
|
+
"enableInteraction": true,
|
|
107
|
+
"darkMode": "auto",
|
|
108
|
+
"exportPadding": 20
|
|
109
|
+
},
|
|
110
|
+
"optionSchema": {
|
|
111
|
+
"enableInteraction": {
|
|
112
|
+
"type": "boolean"
|
|
113
|
+
},
|
|
114
|
+
"darkMode": {
|
|
115
|
+
"type": "enum",
|
|
116
|
+
"values": [
|
|
117
|
+
"auto",
|
|
118
|
+
"light",
|
|
119
|
+
"dark"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"exportPadding": {
|
|
123
|
+
"type": "number"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"frames": {
|
|
127
|
+
"ExcalidrawFrame": {
|
|
128
|
+
"exportName": "ExcalidrawFrame"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"engines": {
|
|
133
|
+
"node": ">=22",
|
|
134
|
+
"npm": ">=10.9.2"
|
|
135
|
+
},
|
|
136
|
+
"publishConfig": {
|
|
137
|
+
"access": "public"
|
|
138
|
+
}
|
|
139
|
+
}
|