obsidian-dev-utils 67.0.0 → 68.0.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.
Files changed (140) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/dev/main.js +487 -267
  3. package/dist/lib/cjs/async-events.cjs +178 -18
  4. package/dist/lib/cjs/async-events.d.cts +260 -9
  5. package/dist/lib/cjs/error.cjs +6 -7
  6. package/dist/lib/cjs/function.cjs +6 -2
  7. package/dist/lib/cjs/function.d.cts +6 -0
  8. package/dist/lib/cjs/library.cjs +1 -1
  9. package/dist/lib/cjs/object-utils.cjs +1 -1
  10. package/dist/lib/cjs/object-utils.d.cts +2 -0
  11. package/dist/lib/cjs/obsidian/active-file-provider.cjs +1 -1
  12. package/dist/lib/cjs/obsidian/active-file-provider.d.cts +0 -1
  13. package/dist/lib/cjs/obsidian/command-handlers/command-handler-component.cjs +4 -4
  14. package/dist/lib/cjs/obsidian/command-handlers/command-handler-component.d.cts +3 -3
  15. package/dist/lib/cjs/obsidian/components/abort-signal-component.cjs +3 -7
  16. package/dist/lib/cjs/obsidian/components/abort-signal-component.d.cts +2 -6
  17. package/dist/lib/cjs/obsidian/components/all-windows-event-component.cjs +3 -3
  18. package/dist/lib/cjs/obsidian/components/all-windows-event-component.d.cts +2 -2
  19. package/dist/lib/cjs/obsidian/components/async-error-handler-component.cjs +3 -7
  20. package/dist/lib/cjs/obsidian/components/async-error-handler-component.d.cts +2 -6
  21. package/dist/lib/cjs/obsidian/components/async-events-component.cjs +2 -20
  22. package/dist/lib/cjs/obsidian/components/async-events-component.d.cts +1 -18
  23. package/dist/lib/cjs/obsidian/components/component-ex.cjs +235 -0
  24. package/dist/lib/cjs/obsidian/components/component-ex.d.cts +55 -0
  25. package/dist/lib/cjs/obsidian/components/console-debug-component.cjs +3 -7
  26. package/dist/lib/cjs/obsidian/components/console-debug-component.d.cts +2 -6
  27. package/dist/lib/cjs/obsidian/components/disposable-component.cjs +1 -9
  28. package/dist/lib/cjs/obsidian/components/disposable-component.d.cts +0 -10
  29. package/dist/lib/cjs/obsidian/components/i18n-component.cjs +4 -8
  30. package/dist/lib/cjs/obsidian/components/i18n-component.d.cts +3 -7
  31. package/dist/lib/cjs/obsidian/components/index.cjs +9 -6
  32. package/dist/lib/cjs/obsidian/components/index.d.cts +2 -1
  33. package/dist/lib/cjs/obsidian/components/layout-ready-component.cjs +3 -3
  34. package/dist/lib/cjs/obsidian/components/layout-ready-component.d.cts +2 -2
  35. package/dist/lib/cjs/obsidian/components/menu-event-registrar-component.cjs +3 -3
  36. package/dist/lib/cjs/obsidian/components/menu-event-registrar-component.d.cts +2 -3
  37. package/dist/lib/cjs/obsidian/components/monkey-around-component.cjs +4 -4
  38. package/dist/lib/cjs/obsidian/components/monkey-around-component.d.cts +3 -3
  39. package/dist/lib/cjs/obsidian/components/plugin-context-component.cjs +3 -7
  40. package/dist/lib/cjs/obsidian/components/plugin-context-component.d.cts +2 -6
  41. package/dist/lib/cjs/obsidian/components/plugin-notice-component.cjs +3 -7
  42. package/dist/lib/cjs/obsidian/components/plugin-notice-component.d.cts +2 -6
  43. package/dist/lib/cjs/obsidian/components/plugin-settings-component.cjs +53 -12
  44. package/dist/lib/cjs/obsidian/components/plugin-settings-component.d.cts +53 -18
  45. package/dist/lib/cjs/obsidian/components/plugin-settings-tab-component.cjs +3 -3
  46. package/dist/lib/cjs/obsidian/components/plugin-settings-tab-component.d.cts +2 -2
  47. package/dist/lib/cjs/obsidian/components/registry-component.cjs +180 -0
  48. package/dist/lib/cjs/obsidian/components/registry-component.d.cts +36 -0
  49. package/dist/lib/cjs/obsidian/markdown.cjs +2 -3
  50. package/dist/lib/cjs/obsidian/menu-event-registrar.cjs +1 -1
  51. package/dist/lib/cjs/obsidian/menu-event-registrar.d.cts +0 -1
  52. package/dist/lib/cjs/obsidian/plugin/plugin-settings-tab.cjs +21 -20
  53. package/dist/lib/cjs/obsidian/plugin/plugin-settings-tab.d.cts +7 -3
  54. package/dist/lib/cjs/obsidian/plugin/plugin.cjs +35 -76
  55. package/dist/lib/cjs/obsidian/plugin/plugin.d.cts +35 -36
  56. package/dist/lib/cjs/obsidian/rename-delete-handler.cjs +1 -2
  57. package/dist/lib/cjs/obsidian/setting-components/typed-dropdown-component.cjs +3 -1
  58. package/dist/lib/cjs/obsidian/setting-components/typed-dropdown-component.d.cts +2 -0
  59. package/dist/lib/cjs/obsidian/setting-ex.cjs +3 -1
  60. package/dist/lib/cjs/obsidian/setting-ex.d.cts +2 -0
  61. package/dist/lib/cjs/script-utils/linters/eslint-config.cjs +2 -1
  62. package/dist/lib/cjs/script-utils/linters/eslint-rules/index.cjs +4 -1
  63. package/dist/lib/cjs/script-utils/linters/eslint-rules/index.d.cts +1 -0
  64. package/dist/lib/cjs/script-utils/linters/eslint-rules/obsidian-dev-utils-plugin.cjs +3 -1
  65. package/dist/lib/cjs/script-utils/linters/eslint-rules/require-component-suffix.cjs +2 -2
  66. package/dist/lib/cjs/script-utils/linters/eslint-rules/require-method-template.cjs +222 -0
  67. package/dist/lib/cjs/script-utils/linters/eslint-rules/require-method-template.d.cts +4 -0
  68. package/dist/lib/esm/async-events.d.mts +260 -9
  69. package/dist/lib/esm/async-events.mjs +175 -17
  70. package/dist/lib/esm/error.mjs +6 -7
  71. package/dist/lib/esm/function.d.mts +6 -0
  72. package/dist/lib/esm/function.mjs +5 -2
  73. package/dist/lib/esm/library.mjs +1 -1
  74. package/dist/lib/esm/object-utils.d.mts +2 -0
  75. package/dist/lib/esm/object-utils.mjs +1 -1
  76. package/dist/lib/esm/obsidian/active-file-provider.d.mts +0 -1
  77. package/dist/lib/esm/obsidian/active-file-provider.mjs +1 -1
  78. package/dist/lib/esm/obsidian/command-handlers/command-handler-component.d.mts +3 -3
  79. package/dist/lib/esm/obsidian/command-handlers/command-handler-component.mjs +4 -4
  80. package/dist/lib/esm/obsidian/components/abort-signal-component.d.mts +2 -6
  81. package/dist/lib/esm/obsidian/components/abort-signal-component.mjs +3 -7
  82. package/dist/lib/esm/obsidian/components/all-windows-event-component.d.mts +2 -2
  83. package/dist/lib/esm/obsidian/components/all-windows-event-component.mjs +3 -3
  84. package/dist/lib/esm/obsidian/components/async-error-handler-component.d.mts +2 -6
  85. package/dist/lib/esm/obsidian/components/async-error-handler-component.mjs +3 -7
  86. package/dist/lib/esm/obsidian/components/async-events-component.d.mts +1 -18
  87. package/dist/lib/esm/obsidian/components/async-events-component.mjs +2 -19
  88. package/dist/lib/esm/obsidian/components/component-ex.d.mts +55 -0
  89. package/dist/lib/esm/obsidian/components/component-ex.mjs +130 -0
  90. package/dist/lib/esm/obsidian/components/console-debug-component.d.mts +2 -6
  91. package/dist/lib/esm/obsidian/components/console-debug-component.mjs +3 -7
  92. package/dist/lib/esm/obsidian/components/disposable-component.d.mts +0 -10
  93. package/dist/lib/esm/obsidian/components/disposable-component.mjs +1 -8
  94. package/dist/lib/esm/obsidian/components/i18n-component.d.mts +3 -7
  95. package/dist/lib/esm/obsidian/components/i18n-component.mjs +4 -8
  96. package/dist/lib/esm/obsidian/components/index.d.mts +2 -1
  97. package/dist/lib/esm/obsidian/components/index.mjs +6 -4
  98. package/dist/lib/esm/obsidian/components/layout-ready-component.d.mts +2 -2
  99. package/dist/lib/esm/obsidian/components/layout-ready-component.mjs +3 -3
  100. package/dist/lib/esm/obsidian/components/menu-event-registrar-component.d.mts +2 -3
  101. package/dist/lib/esm/obsidian/components/menu-event-registrar-component.mjs +3 -3
  102. package/dist/lib/esm/obsidian/components/monkey-around-component.d.mts +3 -3
  103. package/dist/lib/esm/obsidian/components/monkey-around-component.mjs +4 -4
  104. package/dist/lib/esm/obsidian/components/plugin-context-component.d.mts +2 -6
  105. package/dist/lib/esm/obsidian/components/plugin-context-component.mjs +3 -7
  106. package/dist/lib/esm/obsidian/components/plugin-notice-component.d.mts +2 -6
  107. package/dist/lib/esm/obsidian/components/plugin-notice-component.mjs +3 -7
  108. package/dist/lib/esm/obsidian/components/plugin-settings-component.d.mts +53 -18
  109. package/dist/lib/esm/obsidian/components/plugin-settings-component.mjs +53 -12
  110. package/dist/lib/esm/obsidian/components/plugin-settings-tab-component.d.mts +2 -2
  111. package/dist/lib/esm/obsidian/components/plugin-settings-tab-component.mjs +3 -3
  112. package/dist/lib/esm/obsidian/components/registry-component.d.mts +36 -0
  113. package/dist/lib/esm/obsidian/components/registry-component.mjs +72 -0
  114. package/dist/lib/esm/obsidian/markdown.mjs +2 -3
  115. package/dist/lib/esm/obsidian/menu-event-registrar.d.mts +0 -1
  116. package/dist/lib/esm/obsidian/plugin/plugin-settings-tab.d.mts +7 -3
  117. package/dist/lib/esm/obsidian/plugin/plugin-settings-tab.mjs +22 -21
  118. package/dist/lib/esm/obsidian/plugin/plugin.d.mts +35 -36
  119. package/dist/lib/esm/obsidian/plugin/plugin.mjs +35 -77
  120. package/dist/lib/esm/obsidian/rename-delete-handler.mjs +1 -2
  121. package/dist/lib/esm/obsidian/setting-components/typed-dropdown-component.d.mts +2 -0
  122. package/dist/lib/esm/obsidian/setting-components/typed-dropdown-component.mjs +3 -1
  123. package/dist/lib/esm/obsidian/setting-ex.d.mts +2 -0
  124. package/dist/lib/esm/obsidian/setting-ex.mjs +3 -1
  125. package/dist/lib/esm/script-utils/linters/eslint-config.mjs +2 -1
  126. package/dist/lib/esm/script-utils/linters/eslint-rules/index.d.mts +1 -0
  127. package/dist/lib/esm/script-utils/linters/eslint-rules/index.mjs +3 -1
  128. package/dist/lib/esm/script-utils/linters/eslint-rules/obsidian-dev-utils-plugin.mjs +3 -1
  129. package/dist/lib/esm/script-utils/linters/eslint-rules/require-component-suffix.mjs +2 -2
  130. package/dist/lib/esm/script-utils/linters/eslint-rules/require-method-template.d.mts +4 -0
  131. package/dist/lib/esm/script-utils/linters/eslint-rules/require-method-template.mjs +112 -0
  132. package/obsidian/Components/component-ex/package.json +6 -0
  133. package/obsidian/Components/registry-component/package.json +6 -0
  134. package/package.json +21 -20
  135. package/script-utils/linters/eslint-rules/require-method-template/package.json +6 -0
  136. package/dist/lib/cjs/obsidian/components/async-component.cjs +0 -183
  137. package/dist/lib/cjs/obsidian/components/async-component.d.cts +0 -43
  138. package/dist/lib/esm/obsidian/components/async-component.d.mts +0 -43
  139. package/dist/lib/esm/obsidian/components/async-component.mjs +0 -73
  140. package/obsidian/Components/async-component/package.json +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-dev-utils",
3
- "version": "67.0.0",
3
+ "version": "68.0.0",
4
4
  "description": "This is the collection of useful functions that you can use for your Obsidian plugin development.",
5
5
  "keywords": [
6
6
  "obsidian"
@@ -640,6 +640,8 @@
640
640
  "version": "jiti scripts/version.ts"
641
641
  },
642
642
  "overrides": {
643
+ "@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin",
644
+ "@typescript-eslint/parser": "$@typescript-eslint/parser",
643
645
  "eslint": "$eslint",
644
646
  "typescript": "$typescript"
645
647
  },
@@ -651,36 +653,36 @@
651
653
  "@eslint/config-helpers": "^0.6.0",
652
654
  "@eslint/js": "^10.0.1",
653
655
  "@lezer/common": "1.2.3",
654
- "@obsidian-typings/obsidian-public-latest": "^6.4.0",
656
+ "@obsidian-typings/obsidian-public-latest": "^6.10.0",
655
657
  "@stylistic/eslint-plugin": "^5.10.0",
656
658
  "@tsconfig/strictest": "^2.0.8",
657
659
  "@types/babel__core": "^7.20.5",
658
660
  "@types/doctrine": "^0.0.9",
659
661
  "@types/eslint": "^9.6.1",
660
662
  "@types/luxon": "^3.7.1",
661
- "@types/node": "^25.8.0",
663
+ "@types/node": "^25.9.1",
662
664
  "@types/parsimmon": "^1.10.9",
663
665
  "@types/path-browserify": "^1.0.3",
664
666
  "@types/picomatch": "^4.0.3",
665
667
  "@types/pug": "^2.0.10",
666
- "@types/react": "^19.2.14",
668
+ "@types/react": "^19.2.15",
667
669
  "@types/semver": "^7.7.1",
668
670
  "@types/shell-quote": "^1.7.5",
669
- "@typescript-eslint/eslint-plugin": "^8.59.3",
670
- "@typescript-eslint/parser": "^8.59.3",
671
+ "@typescript-eslint/eslint-plugin": "^8.59.4",
672
+ "@typescript-eslint/parser": "^8.59.4",
671
673
  "commander": "^14.0.3",
672
674
  "compare-versions": "^6.1.1",
673
675
  "cspell": "^10.0.0",
674
676
  "debug": "^4.4.3",
675
677
  "dprint": "^0.54.0",
676
- "enhanced-resolve": "^5.21.3",
678
+ "enhanced-resolve": "^5.22.0",
677
679
  "esbuild": "^0.28.0",
678
680
  "esbuild-sass-plugin": "^3.7.0",
679
681
  "esbuild-svelte": "^0.9.5",
680
682
  "eslint": "^10.4.0",
681
683
  "eslint-import-resolver-typescript": "^4.4.4",
682
684
  "eslint-plugin-import-x": "^4.16.2",
683
- "eslint-plugin-jsdoc": "^62.9.0",
685
+ "eslint-plugin-jsdoc": "^63.0.0",
684
686
  "eslint-plugin-no-unsanitized": "^4.1.5",
685
687
  "eslint-plugin-obsidianmd": "^0.3.0",
686
688
  "eslint-plugin-perfectionist": "^5.9.0",
@@ -690,30 +692,29 @@
690
692
  "jiti": "^2.7.0",
691
693
  "linkinator": "^7.6.1",
692
694
  "localforage": "^1.10.0",
693
- "lru-cache": "^11.3.6",
695
+ "lru-cache": "^11.5.0",
694
696
  "markdownlint": "^0.40.0",
695
697
  "markdownlint-cli2": "^0.22.1",
696
698
  "markdownlint-rule-relative-links": "^5.1.0",
697
699
  "monkey-around": "^3.0.0",
698
- "npm-run-all2": "^8.0.4",
699
700
  "obsidian": "^1.12.3",
700
701
  "obsidian-integration-testing": "^4.1.4",
701
702
  "path-browserify": "^1.0.1",
702
- "postcss": "^8.5.14",
703
+ "postcss": "^8.5.15",
703
704
  "postcss-modules": "^6.0.1",
704
705
  "preact": "^10.29.2",
705
706
  "react": "^19.2.6",
706
707
  "remark": "^15.0.1",
707
708
  "remark-parse": "^11.0.0",
708
709
  "remark-wiki-link": "^2.0.1",
709
- "sass": "^1.99.0",
710
- "semver": "^7.8.0",
711
- "shell-quote": "^1.8.3",
710
+ "sass": "^1.100.0",
711
+ "semver": "^7.8.1",
712
+ "shell-quote": "^1.8.4",
712
713
  "svelte-check": "^4.4.8",
713
- "svelte-preprocess": "^6.0.3",
714
+ "svelte-preprocess": "^6.0.4",
714
715
  "type-fest": "^5.6.0",
715
716
  "typescript": "^6.0.3",
716
- "typescript-eslint": "^8.59.3",
717
+ "typescript-eslint": "^8.59.4",
717
718
  "unist-util-visit": "^5.1.0"
718
719
  },
719
720
  "devDependencies": {
@@ -722,9 +723,9 @@
722
723
  "@commitlint/types": "^21.0.1",
723
724
  "@total-typescript/ts-reset": "^0.6.1",
724
725
  "@types/markdown-it": "^14.1.2",
725
- "@typescript-eslint/rule-tester": "^8.59.3",
726
- "@vitest/coverage-v8": "^4.1.6",
727
- "@vitest/runner": "^4.1.6",
726
+ "@typescript-eslint/rule-tester": "^8.59.4",
727
+ "@vitest/coverage-v8": "^4.1.7",
728
+ "@vitest/runner": "^4.1.7",
728
729
  "better-typescript-lib": "^2.12.0",
729
730
  "czg": "^1.13.1",
730
731
  "eslint-plugin-import-x": "^4.16.2",
@@ -735,7 +736,7 @@
735
736
  "obsidian-integration-testing": "^4.1.4",
736
737
  "obsidian-test-mocks": "^2.0.3",
737
738
  "patch-package": "^8.0.1",
738
- "vitest": "^4.1.6",
739
+ "vitest": "^4.1.7",
739
740
  "yaml": "^2.9.0"
740
741
  },
741
742
  "engines": {
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../../../../dist/lib/cjs/script-utils/linters/eslint-rules/require-method-template.cjs",
3
+ "module": "../../../../dist/lib/esm/script-utils/linters/eslint-rules/require-method-template.mjs",
4
+ "type": "module",
5
+ "types": "../../../../dist/lib/cjs/script-utils/linters/eslint-rules/require-method-template.d.cts"
6
+ }
@@ -1,183 +0,0 @@
1
- /*
2
- THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
3
- if you want to view the source, please visit the github repository of this plugin
4
- */
5
-
6
- (function initCjs() {
7
- // eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
8
- const globalThisRecord = globalThis;
9
- globalThisRecord['__name'] ??= name;
10
- const originalRequire = require;
11
- if (originalRequire && !originalRequire.__isPatched) {
12
- // eslint-disable-next-line no-global-assign, no-implicit-globals -- We need to patch the `require()` function.
13
- require = Object.assign(
14
- (id) => requirePatched(id),
15
- originalRequire,
16
- {
17
- __isPatched: true
18
- }
19
- );
20
- }
21
-
22
- const newFuncs = {
23
- __extractDefault() {
24
- return extractDefault;
25
- },
26
- process() {
27
- const browserProcess = {
28
- browser: true,
29
- cwd() {
30
- return '/';
31
- },
32
- env: {},
33
- platform: 'android'
34
- };
35
- return browserProcess;
36
- }
37
- };
38
-
39
- for (const key of Object.keys(newFuncs)) {
40
- globalThisRecord[key] ??= newFuncs[key]?.();
41
- }
42
-
43
- function name(obj) {
44
- return obj;
45
- }
46
-
47
- function extractDefault(module) {
48
- return module && module.__esModule && 'default' in module ? module.default : module;
49
- }
50
-
51
- const OBSIDIAN_BUILT_IN_MODULE_NAMES = [
52
- 'obsidian',
53
- '@codemirror/autocomplete',
54
- '@codemirror/collab',
55
- '@codemirror/commands',
56
- '@codemirror/language',
57
- '@codemirror/lint',
58
- '@codemirror/search',
59
- '@codemirror/state',
60
- '@codemirror/text',
61
- '@codemirror/view',
62
- '@lezer/common',
63
- '@lezer/lr',
64
- '@lezer/highlight'];
65
-
66
-
67
- const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = [
68
- '@codemirror/closebrackets',
69
- '@codemirror/comment',
70
- '@codemirror/fold',
71
- '@codemirror/gutter',
72
- '@codemirror/highlight',
73
- '@codemirror/history',
74
- '@codemirror/matchbrackets',
75
- '@codemirror/panel',
76
- '@codemirror/rangeset',
77
- '@codemirror/rectangular-selection',
78
- '@codemirror/stream-parser',
79
- '@codemirror/tooltip'];
80
-
81
-
82
- function requirePatched(id) {
83
- if (OBSIDIAN_BUILT_IN_MODULE_NAMES.includes(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.includes(id)) {
84
- return originalRequire?.(id);
85
- }
86
-
87
- // eslint-disable-next-line @typescript-eslint/no-deprecated, obsidianmd/no-global-this -- Need access to app. Actively use globalThis.
88
- if (globalThis.app.isMobile) {
89
- if (id === 'process' || id === 'node:process') {
90
- // eslint-disable-next-line no-console -- Valid usage.
91
- console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
92
- // eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
93
- return globalThis.process;
94
- }
95
- } else {
96
- const module = originalRequire?.(id);
97
- if (module) {
98
- return extractDefault(module);
99
- }
100
- }
101
-
102
- // eslint-disable-next-line no-console -- Valid usage.
103
- console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
104
- return {};
105
- }
106
- })();
107
-
108
- "use strict";
109
- var __defProp = Object.defineProperty;
110
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
111
- var __getOwnPropNames = Object.getOwnPropertyNames;
112
- var __hasOwnProp = Object.prototype.hasOwnProperty;
113
- var __export = (target, all) => {
114
- for (var name in all)
115
- __defProp(target, name, { get: all[name], enumerable: true });
116
- };
117
- var __copyProps = (to, from, except, desc) => {
118
- if (from && typeof from === "object" || typeof from === "function") {
119
- for (let key of __getOwnPropNames(from))
120
- if (!__hasOwnProp.call(to, key) && key !== except)
121
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
122
- }
123
- return to;
124
- };
125
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
126
- var async_component_exports = {};
127
- __export(async_component_exports, {
128
- AsyncComponent: () => AsyncComponent,
129
- loadAsync: () => loadAsync,
130
- loadChildrenFirstAsync: () => loadChildrenFirstAsync
131
- });
132
- module.exports = __toCommonJS(async_component_exports);
133
- var import_obsidian = require('obsidian');
134
- var import_function = require('../../function.cjs');
135
- var import_disposable_component = require('./disposable-component.cjs');
136
- class AsyncComponent extends import_disposable_component.DisposableComponent {
137
- /**
138
- * Loads this component and its children sequentially.
139
- *
140
- * Unlike Component's `load()` which runs `onload()` and children concurrently,
141
- * this awaits `onload()` first, then loads children in order.
142
- */
143
- // eslint-disable-next-line @typescript-eslint/no-misused-promises -- Obsidian's load() handles async returns at runtime. Intentionally replaces synchronous Component.load() with async loadAsync().
144
- async load() {
145
- await loadAsync(this);
146
- }
147
- /**
148
- * Override this method to perform async initialization.
149
- *
150
- * @returns A {@link Promise} that resolves when initialization is complete.
151
- */
152
- // eslint-disable-next-line @typescript-eslint/no-misused-promises -- Intentional async override; called from our own async load(). Base hook providing async default for subclasses.
153
- async onload() {
154
- await (0, import_function.noopAsync)();
155
- }
156
- }
157
- async function loadAsync(component) {
158
- if (component._loaded) {
159
- return;
160
- }
161
- component._loaded = true;
162
- await component.onload();
163
- for (const child of component._children) {
164
- await loadAsync(child);
165
- }
166
- }
167
- async function loadChildrenFirstAsync(component) {
168
- if (component._loaded) {
169
- return;
170
- }
171
- for (const child of component._children) {
172
- await loadChildrenFirstAsync(child);
173
- }
174
- component._loaded = true;
175
- await component.onload();
176
- }
177
- // Annotate the CommonJS export names for ESM import in node:
178
- 0 && (module.exports = {
179
- AsyncComponent,
180
- loadAsync,
181
- loadChildrenFirstAsync
182
- });
183
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vLi4vc3JjL29ic2lkaWFuL2NvbXBvbmVudHMvYXN5bmMtY29tcG9uZW50LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIEBmaWxlXG4gKlxuICogQmFzZSBjbGFzcyBmb3IgY29tcG9uZW50cyB0aGF0IG5lZWQgYXN5bmMgbGlmZWN5Y2xlIG1ldGhvZHMuXG4gKi9cblxuaW1wb3J0IHR5cGUgeyBQcm9taXNhYmxlIH0gZnJvbSAndHlwZS1mZXN0JztcblxuaW1wb3J0IHsgQ29tcG9uZW50IH0gZnJvbSAn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RUFDRjtBQUNBLFlBQVUsVUFBVTtBQUVwQixRQUFPLFVBQVUsT0FBTztBQUV4QixhQUFXLFNBQVMsVUFBVSxXQUFXO0FBQ3ZDLFVBQU0sVUFBVSxLQUFLO0FBQUEsRUFDdkI7QUFDRjtBQVFBLGVBQXNCLHVCQUF1QixXQUFxQztBQUNoRixNQUFJLFVBQVUsU0FBUztBQUNyQjtBQUFBLEVBQ0Y7QUFFQSxhQUFXLFNBQVMsVUFBVSxXQUFXO0FBQ3ZDLFVBQU0sdUJBQXVCLEtBQUs7QUFBQSxFQUNwQztBQUVBLFlBQVUsVUFBVTtBQUVwQixRQUFPLFVBQVUsT0FBTztBQUMxQjsiLAogICJuYW1lcyI6IFtdCn0K
@@ -1,43 +0,0 @@
1
- /**
2
- * @file
3
- *
4
- * Base class for components that need async lifecycle methods.
5
- */
6
- import { Component } from 'obsidian';
7
- import { DisposableComponent } from './disposable-component.cjs';
8
- /**
9
- * A {@link Component} that supports async lifecycle methods.
10
- *
11
- * Obsidian's `Component.load()` captures the return value of `onload()` and includes Promises
12
- * in a `Promise.all()`. This class overrides `load()` to `await` `onload()` before loading children,
13
- * ensuring ordered initialization.
14
- */
15
- export declare class AsyncComponent extends DisposableComponent {
16
- /**
17
- * Loads this component and its children sequentially.
18
- *
19
- * Unlike Component's `load()` which runs `onload()` and children concurrently,
20
- * this awaits `onload()` first, then loads children in order.
21
- */
22
- load(): Promise<void>;
23
- /**
24
- * Override this method to perform async initialization.
25
- *
26
- * @returns A {@link Promise} that resolves when initialization is complete.
27
- */
28
- onload(): Promise<void>;
29
- }
30
- /**
31
- * Loads a component and its children sequentially.
32
- *
33
- * @param component - The component to load.
34
- * @returns A {@link Promise} that resolves when the component is loaded.
35
- */
36
- export declare function loadAsync(component: Component): Promise<void>;
37
- /**
38
- * Loads a component and its children (children first).
39
- *
40
- * @param component - The component to load.
41
- * @returns A {@link Promise} that resolves when the component is loaded.
42
- */
43
- export declare function loadChildrenFirstAsync(component: Component): Promise<void>;
@@ -1,43 +0,0 @@
1
- /**
2
- * @file
3
- *
4
- * Base class for components that need async lifecycle methods.
5
- */
6
- import { Component } from 'obsidian';
7
- import { DisposableComponent } from './disposable-component.mjs';
8
- /**
9
- * A {@link Component} that supports async lifecycle methods.
10
- *
11
- * Obsidian's `Component.load()` captures the return value of `onload()` and includes Promises
12
- * in a `Promise.all()`. This class overrides `load()` to `await` `onload()` before loading children,
13
- * ensuring ordered initialization.
14
- */
15
- export declare class AsyncComponent extends DisposableComponent {
16
- /**
17
- * Loads this component and its children sequentially.
18
- *
19
- * Unlike Component's `load()` which runs `onload()` and children concurrently,
20
- * this awaits `onload()` first, then loads children in order.
21
- */
22
- load(): Promise<void>;
23
- /**
24
- * Override this method to perform async initialization.
25
- *
26
- * @returns A {@link Promise} that resolves when initialization is complete.
27
- */
28
- onload(): Promise<void>;
29
- }
30
- /**
31
- * Loads a component and its children sequentially.
32
- *
33
- * @param component - The component to load.
34
- * @returns A {@link Promise} that resolves when the component is loaded.
35
- */
36
- export declare function loadAsync(component: Component): Promise<void>;
37
- /**
38
- * Loads a component and its children (children first).
39
- *
40
- * @param component - The component to load.
41
- * @returns A {@link Promise} that resolves when the component is loaded.
42
- */
43
- export declare function loadChildrenFirstAsync(component: Component): Promise<void>;
@@ -1,73 +0,0 @@
1
- /*
2
- THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
3
- if you want to view the source, please visit the github repository of this plugin
4
- */
5
-
6
- (function initEsm() {
7
- // eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
8
- if (globalThis.process) {
9
- return;
10
- }
11
-
12
- const browserProcess = {
13
- browser: true,
14
- cwd() {
15
- return '/';
16
- },
17
- env: {},
18
- platform: 'android'
19
- };
20
- // eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
21
- globalThis.process = browserProcess;
22
- })();
23
-
24
- import { Component } from "obsidian";
25
- import { noopAsync } from "../../function.mjs";
26
- import { DisposableComponent } from "./disposable-component.mjs";
27
- class AsyncComponent extends DisposableComponent {
28
- /**
29
- * Loads this component and its children sequentially.
30
- *
31
- * Unlike Component's `load()` which runs `onload()` and children concurrently,
32
- * this awaits `onload()` first, then loads children in order.
33
- */
34
- // eslint-disable-next-line @typescript-eslint/no-misused-promises -- Obsidian's load() handles async returns at runtime. Intentionally replaces synchronous Component.load() with async loadAsync().
35
- async load() {
36
- await loadAsync(this);
37
- }
38
- /**
39
- * Override this method to perform async initialization.
40
- *
41
- * @returns A {@link Promise} that resolves when initialization is complete.
42
- */
43
- // eslint-disable-next-line @typescript-eslint/no-misused-promises -- Intentional async override; called from our own async load(). Base hook providing async default for subclasses.
44
- async onload() {
45
- await noopAsync();
46
- }
47
- }
48
- async function loadAsync(component) {
49
- if (component._loaded) {
50
- return;
51
- }
52
- component._loaded = true;
53
- await component.onload();
54
- for (const child of component._children) {
55
- await loadAsync(child);
56
- }
57
- }
58
- async function loadChildrenFirstAsync(component) {
59
- if (component._loaded) {
60
- return;
61
- }
62
- for (const child of component._children) {
63
- await loadChildrenFirstAsync(child);
64
- }
65
- component._loaded = true;
66
- await component.onload();
67
- }
68
- export {
69
- AsyncComponent,
70
- loadAsync,
71
- loadChildrenFirstAsync
72
- };
73
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vLi4vc3JjL29ic2lkaWFuL2NvbXBvbmVudHMvYXN5bmMtY29tcG9uZW50LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIEBmaWxlXG4gKlxuICogQmFzZSBjbGFzcyBmb3IgY29tcG9uZW50cyB0aGF0IG5lZWQgYXN5bmMgbGlmZWN5Y2xlIG1ldGhvZHMuXG4gKi9cblxuaW1wb3J0IHR5cGUgeyBQcm9taXNhYmxlIH0gZnJvbSAndHlwZS1mZXN0JztcblxuaW1wb3J0IHsgQ29tcG9uZW50IH0gZnJvbSAnb2JzaWRpYW4nO1xuXG5pbXBvcnQgeyBub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QVMsVUFBVSxXQUFXO0FBQ3ZDLFVBQU0sdUJBQXVCLEtBQUs7QUFBQSxFQUNwQztBQUVBLFlBQVUsVUFBVTtBQUVwQixRQUFPLFVBQVUsT0FBTztBQUMxQjsiLAogICJuYW1lcyI6IFtdCn0K
@@ -1,6 +0,0 @@
1
- {
2
- "main": "../../../dist/lib/cjs/obsidian/components/async-component.cjs",
3
- "module": "../../../dist/lib/esm/obsidian/components/async-component.mjs",
4
- "type": "module",
5
- "types": "../../../dist/lib/cjs/obsidian/components/async-component.d.cts"
6
- }