obsidian-typings 6.59.0 → 6.60.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 +12 -0
- package/README.md +68 -2
- package/electron.d.cts +1 -0
- package/electron.d.mts +1 -0
- package/lezer.d.cts +1 -0
- package/lezer.d.mts +1 -0
- package/package.json +34 -2
- package/pdfjs.d.cts +1 -0
- package/pdfjs.d.mts +1 -0
- package/pixi.d.cts +1 -0
- package/pixi.d.mts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 6.60.0
|
|
4
|
+
|
|
5
|
+
- Now resolves to `@obsidian-typings/obsidian-public-latest` `^6.60.0`, which resolves to `@obsidian-typings/obsidian-public-1.15.1` `^1.1.0`. See [its release notes](https://github.com/obsidian-typings/obsidian-typings/releases/tag/obsidian-public-1.15.1-v1.1.0).
|
|
6
|
+
|
|
7
|
+
### Breaking changes in that release
|
|
8
|
+
|
|
9
|
+
- fix!: move the Lezer and CodeMirror language/search boundaries behind an opt-in /lezer subpath
|
|
10
|
+
- fix(hotkey-manager)!: type save and load as returning Promise<void>
|
|
11
|
+
- feat(runtime)!: model the Obsidian catalyst 1.15.1 runtime changes
|
|
12
|
+
- fix(pdfjs)!: match the vendored PDF.js page and render task
|
|
13
|
+
- fix(bases)!: type the Bases file view controller as QueryController
|
|
14
|
+
|
|
3
15
|
## 6.59.0
|
|
4
16
|
|
|
5
17
|
- Now resolves to `@obsidian-typings/obsidian-public-latest` `^6.59.0`, which resolves to `@obsidian-typings/obsidian-public-1.15.0` `^1.1.0`. See [its release notes](https://github.com/obsidian-typings/obsidian-typings/releases/tag/obsidian-public-1.15.0-v1.1.0).
|
package/README.md
CHANGED
|
@@ -47,8 +47,8 @@ To make it easier to adapt to these differences, this package provides typings f
|
|
|
47
47
|
|
|
48
48
|
Typings for each `Obsidian` version can be found in their own git branches: namely `release/obsidian-public/*` and `release/obsidian-catalyst/*`:
|
|
49
49
|
|
|
50
|
-
- Latest `public` release: [`release/obsidian-public/1.15.
|
|
51
|
-
- Latest `catalyst` release: [`release/obsidian-catalyst/1.15.
|
|
50
|
+
- Latest `public` release: [`release/obsidian-public/1.15.1`](https://github.com/obsidian-typings/obsidian-typings/tree/release/obsidian-public/1.15.1) | not published to npm yet | [](https://www.npmjs.com/package/@obsidian-typings/obsidian-public-latest)
|
|
51
|
+
- Latest `catalyst` release: [`release/obsidian-catalyst/1.15.1`](https://github.com/obsidian-typings/obsidian-typings/tree/release/obsidian-catalyst/1.15.1) | [](https://www.npmjs.com/package/@obsidian-typings/obsidian-catalyst-1.15.1) | [](https://www.npmjs.com/package/@obsidian-typings/obsidian-catalyst-latest)
|
|
52
52
|
|
|
53
53
|
Older versions of the package are available, but support for them is limited.
|
|
54
54
|
In most cases, we recommend to always use the latest release.
|
|
@@ -236,10 +236,26 @@ With these scary disclaimers out of the way, hopefully these typings will help y
|
|
|
236
236
|
- `@official` comes from the [official API](https://github.com/obsidianmd/obsidian-api/blob/master/obsidian.d.ts).
|
|
237
237
|
- `@unofficial` based on reverse engineering.
|
|
238
238
|
|
|
239
|
+
## See also
|
|
240
|
+
|
|
241
|
+
[My other Obsidian resources](https://mnaoumov.dev/obsidian/)
|
|
242
|
+
|
|
243
|
+
| Library | Features | How `Obsidian Typings` differs |
|
|
244
|
+
| --- | --- | --- |
|
|
245
|
+
| [`obsidian`](https://github.com/obsidianmd/obsidian-api) | Official type definitions for the documented Obsidian API; supported by the Obsidian team | Extends `obsidian`: augments its module with undocumented and internal members; adds interfaces it does not declare; adds runtime helpers under `/implementations`; unsupported by the Obsidian team |
|
|
246
|
+
| [`obsidian-extra`](https://github.com/eth-p/obsidian-extra) | Runtime helper functions over the undocumented API; version-agnostic; safe and `/unsafe` entry points; last published in 2023 for Obsidian 1.1.x | Different approach from `obsidian-extra`: types the internal members directly instead of wrapping them in functions; adds a package per Obsidian version; omits its version-agnostic wrappers |
|
|
247
|
+
| [`obsidian-undocumented`](https://github.com/eth-p/obsidian-undocumented) | Type definitions for undocumented and internal APIs, used by casting to its own `App`; safe and `/unsafe` flavors; last published in 2023 for Obsidian 1.1.x | Same goal as `obsidian-undocumented`: augments the `obsidian` module instead of requiring casts; adds packages for current `public` and `catalyst` releases; omits the safe/unsafe split |
|
|
248
|
+
|
|
249
|
+
Last searched for similar libraries on 2026-11-12.
|
|
250
|
+
|
|
239
251
|
## Migration
|
|
240
252
|
|
|
241
253
|
If you were using a `1.x.x` version of this package, see the [Migration guide](https://github.com/obsidian-typings/obsidian-typings/blob/main/MIGRATION.md) for upgrading to `2.0.0` or newer.
|
|
242
254
|
|
|
255
|
+
## Changelog
|
|
256
|
+
|
|
257
|
+
All notable changes to this project will be documented in the [CHANGELOG](./CHANGELOG.md).
|
|
258
|
+
|
|
243
259
|
## Contributing
|
|
244
260
|
|
|
245
261
|
Feel free to start typing any part of the Obsidian API that is not yet typed, or fixing/adding additional descriptions to existing typings. If you are unsure about anything, don't hesitate to open an issue.
|
|
@@ -251,3 +267,53 @@ A brief tutorial is available on how you can get started with adding new typings
|
|
|
251
267
|
Open issues through the [issue forms](https://github.com/obsidian-typings/obsidian-typings/issues/new/choose), not as blank issues.
|
|
252
268
|
|
|
253
269
|
Filing from the CLI or the API (`gh issue create --body`, or an AI agent filing for you) skips the form, and `gh issue create --template` cannot load an issue form. In that case, open the matching form in [`.github/ISSUE_TEMPLATE/`](https://github.com/obsidian-typings/obsidian-typings/tree/HEAD/.github/ISSUE_TEMPLATE), copy every field as a `### <label>` heading in the form's order, and fill in each one. Always state the version you used and your operating system.
|
|
270
|
+
|
|
271
|
+
## Optional Electron interoperability
|
|
272
|
+
|
|
273
|
+
The default entry point keeps standalone Electron mirrors and needs no `electron` package. To use installed Electron declarations at Obsidian's window and renderer-module boundaries, install the version matching `process.versions.electron` in your launcher and load the type-only integration:
|
|
274
|
+
|
|
275
|
+
```ts
|
|
276
|
+
import type {} from 'obsidian-typings/electron';
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
The same `/electron` subpath is available on scoped per-version and latest packages. The import is erased from JavaScript and loads no Electron runtime. `FrameDom.eWin`, `electronWindow`, `window.electronWindow`, and the public fields of `electron` and `window.electron` then use installed declarations. Obsidian's IPC channel overloads and `ElectronWindow` extensions remain available. The `webContents.noContextMenu` vendor flag is optional so ordinary upstream windows and web contents remain assignable. Other mirror exports, including `ElectronBrowserWindow` and `ElectronNativeImage`, retain their standalone contracts; import full upstream types from `electron` when using that library.
|
|
280
|
+
|
|
281
|
+
Selection applies to the whole TypeScript program through the reserved `ObsidianElectronTypes` registry, including mixed CommonJS and ESM entry points. The integration does not imply that newer methods exist on an older launcher. Feature-detect APIs and use Electron declarations matching the runtime. The updater currently accepts installers from 1.1.9 (Electron 21); installer 1.14.5 ships Electron 43.8.3. See the [launcher matrix](https://github.com/obsidian-typings/obsidian-typings/blob/main/reports/library-mirror-audit-2026-11-03.md#launcher-matrix-and-interoperability-follow-up) for evidence and compiler pins. In particular, older Electron declarations conflict with recent Node declarations over `Process.noDeprecation`: the consumer checks pin Node declarations 20.17.30 for Electron 21.3.1 and 24.9.0 for Electron 43.8.3, with full declaration checking enabled. These type pins do not change the runtime.
|
|
282
|
+
|
|
283
|
+
## Optional PDF.js interoperability
|
|
284
|
+
|
|
285
|
+
The default declarations keep standalone PDF.js mirrors and require no `pdfjs-dist` package. To use installed public PDF.js declarations, install `pdfjs-dist@5.3.31` as a development dependency and load the type-only integration:
|
|
286
|
+
|
|
287
|
+
```ts
|
|
288
|
+
import type {} from 'obsidian-typings/pdfjs';
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
The same `/pdfjs` subpath is available on scoped per-version and latest packages. It selects installed declarations for `loadPdfJs()` from `obsidian-typings/implementations`, `window.pdfjsLib` and global `pdfjsLib`, across the whole TypeScript program including mixed CommonJS and ESM imports. It loads no JavaScript; continue using Obsidian's PDF.js instance.
|
|
292
|
+
|
|
293
|
+
The exported `InteropPDFDocumentLoadingTask`, `InteropPDFDocumentProxy`, `InteropPDFPageProxy`, `InteropPDFWorker` and `InteropRenderTask` aliases name the selected contracts. Without the integration they select standalone mirrors; with it they retain upstream private-member identity. The original mirror exports and the separate `PdfJsTestingUtils`, `HighlightOutline`, `HighlightOutliner` and testing globals remain available.
|
|
294
|
+
|
|
295
|
+
The verified Obsidian 1.14.4 and 1.15.0 builds vendor PDF.js 5.3.34, build `cc1e2a3e0`, which was never published to npm. Version 5.3.31 is the tested published comparison, not an exact vendor match or a promise about other versions. Selecting the package's public signatures does not establish that every upstream export exists in every Obsidian build. See the [library mirror audit](reports/library-mirror-audit-2026-11-03.md) for the source evidence and limits.
|
|
296
|
+
|
|
297
|
+
## Optional Lezer and CodeMirror language/search interoperability
|
|
298
|
+
|
|
299
|
+
Obsidian exposes three CodeMirror libraries beyond the `@codemirror/state` and `@codemirror/view` that `obsidian` itself requires: `@lezer/common` (the `tokenClassNodeProp` and `lineClassNodeProp` props and `LanguageState.tree`), `@codemirror/language` (`LanguageState.context`) and `@codemirror/search` (`CodeMirrorEditor.addOverlay` and `removeOverlay`). The default entry point needs none of them: those boundaries use standalone mirrors, exported as `NodeProp`, `LezerTree`, `ParseContext` and `SearchQuery`. To use the installed declarations instead, install the three packages and load the type-only integration:
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
import type {} from 'obsidian-typings/lezer';
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
The same `/lezer` subpath is available on scoped per-version and latest packages. The import is erased from JavaScript and loads no runtime. It selects the upstream types at every boundary above, across the whole TypeScript program through the reserved `ObsidianLezerTypes` registry, so `node.type.prop(tokenClassNodeProp)` on a real syntax node compiles without a cast. A locally copied `NodeProp` can never do that, because `NodeProp.add` reaches `NodeType`'s private members. The exported `InteropStringNodeProp`, `InteropLezerTree`, `InteropParseContext` and `InteropSearchQuery` aliases name the selected contracts.
|
|
306
|
+
|
|
307
|
+
## Optional Pixi interoperability
|
|
308
|
+
|
|
309
|
+
The default entry point keeps standalone library mirrors: it does not require `pixi.js-legacy`. For plugins that use the real Pixi declarations, install the exact version Obsidian vendors (currently `pixi.js-legacy@7.2.4`) and explicitly load the type-only integration:
|
|
310
|
+
|
|
311
|
+
```ts
|
|
312
|
+
import type {} from 'obsidian-typings/pixi';
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Use the same `/pixi` subpath on a scoped per-version or latest package. This import is erased from JavaScript; it does not load another Pixi runtime. Continue using Obsidian's `loadPixi()` or the graph iframe's Pixi instance.
|
|
316
|
+
|
|
317
|
+
The integration selects upstream types for `loadPixi()`, `Window.PIXI`, global `PIXI`, and the Pixi fields and methods on graph renderers, nodes, links and power tags. Graph records and vendor members remain available. The exported mirror classes, such as `Container`, remain standalone contracts; import full upstream class types from `pixi.js-legacy` when using that library. Opting in affects the whole TypeScript program through the reserved `ObsidianPixiTypes` registry, including CommonJS and ESM declarations loaded together.
|
|
318
|
+
|
|
319
|
+
Pixi 7.2.4's own declarations have known errors against modern DOM libraries and Node16 package resolution. The consumer checks report those upstream diagnostics separately from errors in our declarations and consumer assignments; `skipLibCheck` stays disabled. The integration preserves class identity but does not repair the upstream declaration baseline. Do not assume compatibility with another Pixi major or version merely because it installs.
|
package/electron.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "@obsidian-typings/obsidian-public-latest/electron";
|
package/electron.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "@obsidian-typings/obsidian-public-latest/electron";
|
package/lezer.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "@obsidian-typings/obsidian-public-latest/lezer";
|
package/lezer.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "@obsidian-typings/obsidian-public-latest/lezer";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@obsidian-typings/obsidian-public-latest": "^6.
|
|
3
|
+
"@obsidian-typings/obsidian-public-latest": "^6.60.0"
|
|
4
4
|
},
|
|
5
5
|
"description": "TypeScript type definitions for Obsidian's internal/unofficial APIs. Wrapper for @obsidian-typings/obsidian-public-latest.",
|
|
6
6
|
"exports": {
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"types": "./types.d.cts"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
+
"./electron": {
|
|
16
|
+
"import": {
|
|
17
|
+
"types": "./electron.d.mts"
|
|
18
|
+
},
|
|
19
|
+
"require": {
|
|
20
|
+
"types": "./electron.d.cts"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
15
23
|
"./implementations": {
|
|
16
24
|
"import": {
|
|
17
25
|
"default": "./implementations.mjs",
|
|
@@ -21,6 +29,30 @@
|
|
|
21
29
|
"default": "./implementations.cjs",
|
|
22
30
|
"types": "./implementations.d.cts"
|
|
23
31
|
}
|
|
32
|
+
},
|
|
33
|
+
"./lezer": {
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./lezer.d.mts"
|
|
36
|
+
},
|
|
37
|
+
"require": {
|
|
38
|
+
"types": "./lezer.d.cts"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"./pdfjs": {
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./pdfjs.d.mts"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./pdfjs.d.cts"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"./pixi": {
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./pixi.d.mts"
|
|
52
|
+
},
|
|
53
|
+
"require": {
|
|
54
|
+
"types": "./pixi.d.cts"
|
|
55
|
+
}
|
|
24
56
|
}
|
|
25
57
|
},
|
|
26
58
|
"license": "MIT",
|
|
@@ -32,5 +64,5 @@
|
|
|
32
64
|
},
|
|
33
65
|
"type": "module",
|
|
34
66
|
"types": "./types.d.cts",
|
|
35
|
-
"version": "6.
|
|
67
|
+
"version": "6.60.0"
|
|
36
68
|
}
|
package/pdfjs.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "@obsidian-typings/obsidian-public-latest/pdfjs";
|
package/pdfjs.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "@obsidian-typings/obsidian-public-latest/pdfjs";
|
package/pixi.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "@obsidian-typings/obsidian-public-latest/pixi";
|
package/pixi.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "@obsidian-typings/obsidian-public-latest/pixi";
|