obsidian-typings 2.2.1-beta.13 → 2.2.1-beta.14

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/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.47.5",
4
+ "toolVersion": "7.47.9",
5
5
  "schemaVersion": 1011,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -22707,6 +22707,110 @@
22707
22707
  ],
22708
22708
  "extendsTokenRanges": []
22709
22709
  },
22710
+ {
22711
+ "kind": "Interface",
22712
+ "canonicalReference": "obsidian-typings!LinkSuggestion:interface",
22713
+ "docComment": "/**\n * Suggestion for a link to a file\n *\n * @public\n */\n",
22714
+ "excerptTokens": [
22715
+ {
22716
+ "kind": "Content",
22717
+ "text": "export interface LinkSuggestion "
22718
+ }
22719
+ ],
22720
+ "fileUrlPath": "src/obsidian/internals/LinkSuggestion.d.ts",
22721
+ "releaseTag": "Public",
22722
+ "name": "LinkSuggestion",
22723
+ "preserveMemberOrder": false,
22724
+ "members": [
22725
+ {
22726
+ "kind": "PropertySignature",
22727
+ "canonicalReference": "obsidian-typings!LinkSuggestion#alias:member",
22728
+ "docComment": "/**\n * Resolved link note alias.\n */\n",
22729
+ "excerptTokens": [
22730
+ {
22731
+ "kind": "Content",
22732
+ "text": "alias?: "
22733
+ },
22734
+ {
22735
+ "kind": "Content",
22736
+ "text": "string"
22737
+ },
22738
+ {
22739
+ "kind": "Content",
22740
+ "text": ";"
22741
+ }
22742
+ ],
22743
+ "isReadonly": false,
22744
+ "isOptional": true,
22745
+ "releaseTag": "Public",
22746
+ "name": "alias",
22747
+ "propertyTypeTokenRange": {
22748
+ "startIndex": 1,
22749
+ "endIndex": 2
22750
+ }
22751
+ },
22752
+ {
22753
+ "kind": "PropertySignature",
22754
+ "canonicalReference": "obsidian-typings!LinkSuggestion#file:member",
22755
+ "docComment": "/**\n * File that is suggested. `null` if the link cannot be resolved.\n */\n",
22756
+ "excerptTokens": [
22757
+ {
22758
+ "kind": "Content",
22759
+ "text": "file: "
22760
+ },
22761
+ {
22762
+ "kind": "Reference",
22763
+ "text": "TFile",
22764
+ "canonicalReference": "obsidian!TFile:class"
22765
+ },
22766
+ {
22767
+ "kind": "Content",
22768
+ "text": " | null"
22769
+ },
22770
+ {
22771
+ "kind": "Content",
22772
+ "text": ";"
22773
+ }
22774
+ ],
22775
+ "isReadonly": false,
22776
+ "isOptional": false,
22777
+ "releaseTag": "Public",
22778
+ "name": "file",
22779
+ "propertyTypeTokenRange": {
22780
+ "startIndex": 1,
22781
+ "endIndex": 3
22782
+ }
22783
+ },
22784
+ {
22785
+ "kind": "PropertySignature",
22786
+ "canonicalReference": "obsidian-typings!LinkSuggestion#path:member",
22787
+ "docComment": "/**\n * Path to the file if the link can be resolved. Link text if the link cannot be resolved.\n */\n",
22788
+ "excerptTokens": [
22789
+ {
22790
+ "kind": "Content",
22791
+ "text": "path: "
22792
+ },
22793
+ {
22794
+ "kind": "Content",
22795
+ "text": "string"
22796
+ },
22797
+ {
22798
+ "kind": "Content",
22799
+ "text": ";"
22800
+ }
22801
+ ],
22802
+ "isReadonly": false,
22803
+ "isOptional": false,
22804
+ "releaseTag": "Public",
22805
+ "name": "path",
22806
+ "propertyTypeTokenRange": {
22807
+ "startIndex": 1,
22808
+ "endIndex": 2
22809
+ }
22810
+ }
22811
+ ],
22812
+ "extendsTokenRanges": []
22813
+ },
22710
22814
  {
22711
22815
  "kind": "Interface",
22712
22816
  "canonicalReference": "obsidian-typings!LinkUpdate:interface",
@@ -6,7 +6,7 @@
6
6
  * node_modules/@codemirror/view/dist/index.d.cts:3:40 - error TS7016: Could not find a declaration file for module 'style-mod'. 'F:/dev/projects/obsidian-typings/node_modules/style-mod/dist/style-mod.cjs' implicitly has an 'any' type.
7
7
  * If the 'style-mod' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'style-mod';`
8
8
  * import { StyleModule, StyleSpec } from 'style-mod';
9
- *
9
+ *
10
10
  * @note `export {}` omitted intentionally. This is needed only for dist
11
11
  */
12
12
 
package/dist/types.d.ts CHANGED
@@ -3827,6 +3827,24 @@ export interface FileCacheEntry {
3827
3827
  */
3828
3828
  size: number;
3829
3829
  }
3830
+ /** @public
3831
+ * Suggestion for a link to a file
3832
+ */
3833
+ export interface LinkSuggestion {
3834
+ /**
3835
+ * File that is suggested. `null` if the link cannot be resolved.
3836
+ */
3837
+ file: TFile | null;
3838
+ /**
3839
+ * Path to the file if the link can be resolved.
3840
+ * Link text if the link cannot be resolved.
3841
+ */
3842
+ path: string;
3843
+ /**
3844
+ * Resolved link note alias.
3845
+ */
3846
+ alias?: string;
3847
+ }
3830
3848
  /** @public */
3831
3849
  export interface MetadataCacheFileCacheRecord extends Record<string, FileCacheEntry> {
3832
3850
  }
@@ -3911,12 +3929,10 @@ declare module "obsidian" {
3911
3929
  */
3912
3930
  getLinks(): Record<string, Reference[]>;
3913
3931
  /**
3914
- * Get all links (resolved or unresolved) in the vault
3932
+ * Get all links (resolved or unresolved) in the vault.
3933
+ * If the note has multiple aliases, it will be returned multiple times for each alias.
3915
3934
  */
3916
- getLinkSuggestions(): {
3917
- file: TFile | null;
3918
- path: string;
3919
- }[];
3935
+ getLinkSuggestions(): LinkSuggestion[];
3920
3936
  /**
3921
3937
  * Get all tags within the vault and their usage count
3922
3938
  */
@@ -6025,11 +6041,6 @@ export interface WidgetEditorView extends EmbeddedEditorView {
6025
6041
  */
6026
6042
  showPreview(show?: boolean): void;
6027
6043
  }
6028
- declare global {
6029
- interface DomElementInfo {
6030
- [eventName: `on${string}`]: EventListenerOrEventListenerObject;
6031
- }
6032
- }
6033
6044
  /** @todo Documentation incomplete */
6034
6045
  /** @public */
6035
6046
  export interface VimState {
@@ -6069,12 +6080,6 @@ export interface VimState {
6069
6080
  export interface VimEditor {
6070
6081
  state: VimState;
6071
6082
  }
6072
- declare module "@codemirror/view" {
6073
- /** @todo Documentation incomplete */
6074
- interface EditorView {
6075
- cm?: VimEditor;
6076
- }
6077
- }
6078
6083
  declare module "obsidian" {
6079
6084
  /** @todo Documentation incomplete */
6080
6085
  interface ItemView extends View {
@@ -7114,6 +7119,17 @@ export interface AllPropertiesView extends ItemView {
7114
7119
  /** @todo Documentation incomplete */
7115
7120
  update(): void;
7116
7121
  }
7122
+ declare global {
7123
+ interface DomElementInfo {
7124
+ [eventName: `on${string}`]: EventListenerOrEventListenerObject;
7125
+ }
7126
+ }
7127
+ declare module "@codemirror/view" {
7128
+ /** @todo Documentation incomplete */
7129
+ interface EditorView {
7130
+ cm?: VimEditor;
7131
+ }
7132
+ }
7117
7133
 
7118
7134
  export {};
7119
7135
  import './style-mod.d.cts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-typings",
3
- "version": "2.2.1-beta.13",
3
+ "version": "2.2.1-beta.14",
4
4
  "description": "Extended type definitions for the Obsidian API (https://obsidian.md)",
5
5
  "main": "",
6
6
  "module": "",
@@ -48,16 +48,16 @@
48
48
  "obsidian": "^1.6.6"
49
49
  },
50
50
  "devDependencies": {
51
- "@microsoft/api-extractor": "^7.47.5",
51
+ "@microsoft/api-extractor": "^7.47.9",
52
52
  "@tsconfig/strictest": "^2.0.5",
53
53
  "@types/node": "^18.17.0 || >=20.1.0",
54
54
  "builtin-modules": "^4.0.0",
55
- "cspell": "^8.13.0",
56
- "dprint": "^0.45.1",
55
+ "cspell": "^8.14.2",
56
+ "dprint": "^0.47.2",
57
57
  "dts-bundle-generator": "^9.5.1",
58
- "esbuild": "^0.23.0",
58
+ "esbuild": "^0.23.1",
59
59
  "npm-run-all": "^4.1.5",
60
- "ts-morph": "^22.0.0"
60
+ "ts-morph": "^23.0.0"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "npm-run-all build:clean build:validate build:generate-index build:bundle-types build:implementations build:implementations:generate-types build:implementations:bundle-types build:style-mod build:extract-api",