@polyipseity/obsidian-plugin-library 1.6.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 (60) hide show
  1. package/LICENSE.txt +21 -0
  2. package/README.md +83 -0
  3. package/dist/assets/locales.d.ts +6392 -0
  4. package/dist/assets/locales.d.ts.map +1 -0
  5. package/dist/index.js +6 -0
  6. package/dist/index.js.map +7 -0
  7. package/dist/sources/@types/lib.es5.d.ts +9 -0
  8. package/dist/sources/@types/lib.es5.d.ts.map +1 -0
  9. package/dist/sources/@types/obsidian.d.ts +57 -0
  10. package/dist/sources/@types/obsidian.d.ts.map +1 -0
  11. package/dist/sources/components/find.d.ts +9 -0
  12. package/dist/sources/components/find.d.ts.map +1 -0
  13. package/dist/sources/components/find.svelte +118 -0
  14. package/dist/sources/components/index.d.ts +3 -0
  15. package/dist/sources/components/index.d.ts.map +1 -0
  16. package/dist/sources/documentation.d.ts +40 -0
  17. package/dist/sources/documentation.d.ts.map +1 -0
  18. package/dist/sources/fixers.d.ts +13 -0
  19. package/dist/sources/fixers.d.ts.map +1 -0
  20. package/dist/sources/i18n.d.ts +27 -0
  21. package/dist/sources/i18n.d.ts.map +1 -0
  22. package/dist/sources/icons.d.ts +9 -0
  23. package/dist/sources/icons.d.ts.map +1 -0
  24. package/dist/sources/import.d.ts +6 -0
  25. package/dist/sources/import.d.ts.map +1 -0
  26. package/dist/sources/index.d.ts +23 -0
  27. package/dist/sources/index.d.ts.map +1 -0
  28. package/dist/sources/internals/@types/i18next.d.ts +9 -0
  29. package/dist/sources/internals/@types/i18next.d.ts.map +1 -0
  30. package/dist/sources/internals/magic.d.ts +5 -0
  31. package/dist/sources/internals/magic.d.ts.map +1 -0
  32. package/dist/sources/magic.d.ts +11 -0
  33. package/dist/sources/magic.d.ts.map +1 -0
  34. package/dist/sources/modals.d.ts +89 -0
  35. package/dist/sources/modals.d.ts.map +1 -0
  36. package/dist/sources/obsidian.d.ts +48 -0
  37. package/dist/sources/obsidian.d.ts.map +1 -0
  38. package/dist/sources/platform.d.ts +11 -0
  39. package/dist/sources/platform.d.ts.map +1 -0
  40. package/dist/sources/plugin.d.ts +16 -0
  41. package/dist/sources/plugin.d.ts.map +1 -0
  42. package/dist/sources/private.d.ts +17 -0
  43. package/dist/sources/private.d.ts.map +1 -0
  44. package/dist/sources/settings-tab.d.ts +22 -0
  45. package/dist/sources/settings-tab.d.ts.map +1 -0
  46. package/dist/sources/settings-widgets.d.ts +19 -0
  47. package/dist/sources/settings-widgets.d.ts.map +1 -0
  48. package/dist/sources/settings.d.ts +25 -0
  49. package/dist/sources/settings.d.ts.map +1 -0
  50. package/dist/sources/status-bar.d.ts +13 -0
  51. package/dist/sources/status-bar.d.ts.map +1 -0
  52. package/dist/sources/typeof.d.ts +28 -0
  53. package/dist/sources/typeof.d.ts.map +1 -0
  54. package/dist/sources/types.d.ts +29 -0
  55. package/dist/sources/types.d.ts.map +1 -0
  56. package/dist/sources/util.d.ts +98 -0
  57. package/dist/sources/util.d.ts.map +1 -0
  58. package/dist/style.css +2 -0
  59. package/dist/style.css.map +7 -0
  60. package/package.json +105 -0
package/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022- The obsidian-plugin-library authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # Plugin Library for Obsidian [![release](https://img.shields.io/github/v/release/polyipseity/obsidian-plugin-library)][latest release]
2
+
3
+ [Buy Me a Coffee]: https://buymeacoffee.com/polyipseity
4
+ [Buy Me a Coffee/embed]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20coffee&emoji=&slug=polyipseity&button_colour=40DCA5&font_colour=ffffff&font_family=Lato&outline_colour=000000&coffee_colour=FFDD00
5
+ [Obsidian]: https://obsidian.md/
6
+ [changelog]: https://github.com/polyipseity/obsidian-plugin-library/blob/main/CHANGELOG.md
7
+ [latest release]: https://github.com/polyipseity/obsidian-plugin-library/releases/latest
8
+ [other things]: https://github.com/polyipseity/obsidian-monorepo
9
+ [repository]: https://github.com/polyipseity/obsidian-plugin-library
10
+
11
+ Library for [Obsidian] plugins.
12
+
13
+ [![Buy Me a Coffee/embed]][Buy Me a Coffee]
14
+
15
+ __[Repository] · [Changelog] · [Other things] · [Installation](#installation) · [Contributing](#contributing) · [Security](#security)__
16
+
17
+ ## Installation
18
+
19
+ This is NOT an installable plugin.
20
+
21
+ ## Contributing
22
+
23
+ Contributions are welcome!
24
+
25
+ ### Todos
26
+
27
+ The todos here, ordered alphabetically, are things planned for the plugin. There are no guarantees that they will be completed. However, we are likely to accept contributions for them.
28
+
29
+ - (None)
30
+
31
+ ### Translating
32
+
33
+ Translation files are under [`assets/locales/`](assets/locales/). Each locale has its own directory named with its corresponding __[IETF language tag](https://wikipedia.org/wiki/IETF_language_tag)__.
34
+
35
+ To contribute translation for an existing locale, modify the files in the corresponding directory.
36
+
37
+ For a new locale, create a new directory named with its language tag and copy [`assets/locales/en/translation.json`](assets/locales/en/translation.json) into it. Then, add an entry to [`assets/locales/en/language.json`](assets/locales/en/language.json) in this format:
38
+ ```JSONc
39
+ {
40
+ // ...
41
+ "en": "English",
42
+ "(your-language-tag)": "(Native name of your language)",
43
+ "uwu": "Uwuish",
44
+ // ...
45
+ }
46
+ ```
47
+ Sort the list of languages by the alphabetical order of their language tags. Then modify the files in the new directory. There will be errors in [`assets/locales.ts`](assets/locales.ts), which you can ignore and we will fix them for you. You are welcome to fix them yourself if you know TypeScript.
48
+
49
+ When translating, keep in mind the following things:
50
+ - Do not translate anything between `{{` and `}}` (`{{example}}`). They are __interpolations__ and will be replaced by localized strings at runtime.
51
+ - Do not translate anything between `$t(` and `)` (`$t(example)`). They refer to other localized strings. To find the localized string being referred to, follow the path of the key, which is separated by dots (`.`). For example, the key [`youtu.be./dQw4w9WgXcQ`](https://youtu.be./dQw4w9WgXcQ) refers to:
52
+ ```JSONc
53
+ {
54
+ // ...
55
+ "youtu": {
56
+ // ...
57
+ "be": {
58
+ // ...
59
+ "/dQw4w9WgXcQ": "I am 'youtu.be./dQw4w9WgXcQ'!",
60
+ // ...
61
+ },
62
+ // ...
63
+ },
64
+ // ...
65
+ }
66
+ ```
67
+ - The keys under `generic` are vocabularies. They can be referred in translation strings by `$t(generic.key)`. Refer to them as much as possible to standardize translations for vocabularies that appear in different places.
68
+ - It is okay to move interpolations and references to other localized strings around to make the translation natural. It is also okay to not use some references used in the original translation. However, it is NOT okay to not use all interpolations.
69
+
70
+ ## Security
71
+
72
+ We hope that there will never be any security vulnerabilities, but unfortunately it does happen. Please [report](#reporting-a-vulnerability) them!
73
+
74
+ ### Supported versions
75
+
76
+ | Version | Supported |
77
+ |-|-|
78
+ | latest | ✅ |
79
+ | outdated | ❌ |
80
+
81
+ ### Reporting a vulnerability
82
+
83
+ Please report a vulerability by opening an new issue. We will get back to you as soon as possible.