react-obsidian 0.0.32 → 0.0.33

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 (73) hide show
  1. package/.eslintrc.json +3 -0
  2. package/README.md +21 -326
  3. package/dist/src/graph/registry/GraphResolveChain.d.ts +1 -1
  4. package/dist/src/graph/registry/GraphResolveChain.d.ts.map +1 -1
  5. package/dist/src/index.d.ts +2 -0
  6. package/dist/src/index.d.ts.map +1 -1
  7. package/dist/src/index.js +5 -1
  8. package/dist/src/index.js.map +1 -1
  9. package/dist/src/injectors/hooks/HookInjector.js +1 -1
  10. package/dist/src/injectors/hooks/HookInjector.js.map +1 -1
  11. package/dist/src/observable/Observable.d.ts +12 -0
  12. package/dist/src/observable/Observable.d.ts.map +1 -0
  13. package/dist/src/observable/Observable.js +31 -0
  14. package/dist/src/observable/Observable.js.map +1 -0
  15. package/dist/src/observable/useObserver.d.ts +3 -0
  16. package/dist/src/observable/useObserver.d.ts.map +1 -0
  17. package/dist/src/observable/useObserver.js +18 -0
  18. package/dist/src/observable/useObserver.js.map +1 -0
  19. package/dist/src/types/index.d.ts +8 -8
  20. package/dist/src/types/index.d.ts.map +1 -1
  21. package/dist/src/utils/React.d.ts +1 -1
  22. package/dist/src/utils/React.d.ts.map +1 -1
  23. package/dist/test/fixtures/LifecycleBoundGraph.d.ts +7 -2
  24. package/dist/test/fixtures/LifecycleBoundGraph.d.ts.map +1 -1
  25. package/dist/test/fixtures/LifecycleBoundGraph.js +15 -3
  26. package/dist/test/fixtures/LifecycleBoundGraph.js.map +1 -1
  27. package/dist/test/fixtures/MainGraph.d.ts +1 -1
  28. package/dist/test/fixtures/MainGraph.d.ts.map +1 -1
  29. package/dist/transformers/babel-plugin-obsidian/helpers/index.d.ts +1 -1
  30. package/dist/transformers/babel-plugin-obsidian/helpers/index.d.ts.map +1 -1
  31. package/documentation/README.md +41 -0
  32. package/documentation/babel.config.js +3 -0
  33. package/documentation/blog/2019-05-28-first-blog-post.md +12 -0
  34. package/documentation/blog/2019-05-29-long-blog-post.md +44 -0
  35. package/documentation/blog/2021-08-01-mdx-blog-post.mdx +20 -0
  36. package/documentation/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
  37. package/documentation/blog/2021-08-26-welcome/index.md +25 -0
  38. package/documentation/blog/authors.yml +17 -0
  39. package/documentation/docs/documentation/documentation.mdx +191 -0
  40. package/documentation/docs/documentation/installation.mdx +65 -0
  41. package/documentation/docs/documentation/meta/clearingGraphs.mdx +13 -0
  42. package/documentation/docs/documentation/meta/middlewares.mdx +27 -0
  43. package/documentation/docs/documentation/usage/ClassComponents.mdx +18 -0
  44. package/documentation/docs/documentation/usage/Classes.mdx +41 -0
  45. package/documentation/docs/documentation/usage/FunctionalComponents.mdx +57 -0
  46. package/documentation/docs/documentation/usage/Graphs.mdx +146 -0
  47. package/documentation/docs/documentation/usage/Hooks.mdx +85 -0
  48. package/documentation/docs/documentation/usage/ServiceLocator.mdx +38 -0
  49. package/documentation/docs/documentation/usage/_category_.json +9 -0
  50. package/documentation/docs/guides/configurableApplications.mdx +205 -0
  51. package/documentation/docs/guides/mockDependencies.mdx +141 -0
  52. package/documentation/docusaurus.config.js +146 -0
  53. package/documentation/package-lock.json +21290 -0
  54. package/documentation/package.json +46 -0
  55. package/documentation/sidebars.js +34 -0
  56. package/documentation/src/components/HomepageFeatures/index.tsx +71 -0
  57. package/documentation/src/components/HomepageFeatures/styles.module.css +11 -0
  58. package/documentation/src/css/custom.css +30 -0
  59. package/documentation/src/pages/index.module.css +23 -0
  60. package/documentation/src/pages/index.tsx +41 -0
  61. package/documentation/static/.nojekyll +0 -0
  62. package/documentation/static/img/api.svg +101 -0
  63. package/documentation/static/img/favicon.ico +0 -0
  64. package/documentation/static/img/logo.svg +265 -0
  65. package/documentation/static/img/obsidian.png +0 -0
  66. package/documentation/static/img/prototype.svg +1 -0
  67. package/documentation/static/img/stethoscope.svg +37 -0
  68. package/documentation/tsconfig.json +7 -0
  69. package/package.json +4 -4
  70. package/src/index.ts +3 -0
  71. package/src/injectors/hooks/HookInjector.ts +1 -1
  72. package/src/observable/Observable.ts +26 -0
  73. package/src/observable/useObserver.ts +17 -0
@@ -0,0 +1,146 @@
1
+ // @ts-check
2
+ // Note: type annotations allow type checking and IDEs autocompletion
3
+
4
+ const lightCodeTheme = require('prism-react-renderer/themes/github');
5
+ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
6
+
7
+ /** @type {import('@docusaurus/types').Config} */
8
+ const config = {
9
+ title: 'Obsidian',
10
+ tagline: 'Dependency injection framework for React and React Native applications',
11
+ url: 'https://your-docusaurus-test-site.com',
12
+ baseUrl: '/obsidian/',
13
+ onBrokenLinks: 'throw',
14
+ onBrokenMarkdownLinks: 'warn',
15
+ favicon: 'img/favicon.ico',
16
+
17
+ // GitHub pages deployment config.
18
+ // If you aren't using GitHub pages, you don't need these.
19
+ organizationName: 'Wix.com', // Usually your GitHub org/user name.
20
+ projectName: 'obsidian', // Usually your repo name.
21
+
22
+ // Even if you don't use internalization, you can use this field to set useful
23
+ // metadata like html lang. For example, if your site is Chinese, you may want
24
+ // to replace "en" with "zh-Hans".
25
+ i18n: {
26
+ defaultLocale: 'en',
27
+ locales: ['en'],
28
+ },
29
+
30
+ presets: [
31
+ [
32
+ 'classic',
33
+ /** @type {import('@docusaurus/preset-classic').Options} */
34
+ ({
35
+ docs: {
36
+ sidebarPath: require.resolve('./sidebars.js'),
37
+ // Please change this to your repo.
38
+ // Remove this to remove the "edit this page" links.
39
+ editUrl:
40
+ 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
41
+ },
42
+ blog: {
43
+ showReadingTime: true,
44
+ // Please change this to your repo.
45
+ // Remove this to remove the "edit this page" links.
46
+ editUrl:
47
+ 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
48
+ },
49
+ theme: {
50
+ customCss: require.resolve('./src/css/custom.css'),
51
+ },
52
+ }),
53
+ ],
54
+ ],
55
+
56
+ themeConfig:
57
+ /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
58
+ ({
59
+ navbar: {
60
+ title: 'Obsidian',
61
+ logo: {
62
+ alt: 'Obsidian Logo',
63
+ src: 'img/logo.svg',
64
+ },
65
+ items: [
66
+ {
67
+ type: 'docSidebar',
68
+ sidebarId: 'docs2',
69
+ position: 'left',
70
+ label: 'Documentation',
71
+ },
72
+ {
73
+ type: 'docSidebar',
74
+ sidebarId: 'guides',
75
+ position: 'left',
76
+ label: 'Guides',
77
+ },
78
+ // {to: '/blog', label: 'Blog', position: 'left'},
79
+ {
80
+ href: 'https://github.com/wix-incubator/obsidian',
81
+ label: 'GitHub',
82
+ position: 'right',
83
+ },
84
+ ],
85
+ },
86
+ footer: {
87
+ style: 'dark',
88
+ links: [
89
+ {
90
+ title: 'Docs',
91
+ items: [
92
+ {
93
+ label: 'Tutorial',
94
+ to: '/docs/documentation#the-2-steps-tutorial-for-injecting-dependencies-with-obsidian',
95
+ },
96
+ {
97
+ label: 'Installation',
98
+ to: '/docs/documentation/installation',
99
+ },
100
+ {
101
+ label: 'API',
102
+ to: '/docs/category/usage',
103
+ }
104
+ ],
105
+ },
106
+ {
107
+ title: 'Community',
108
+ items: [
109
+ // {
110
+ // label: 'Stack Overflow',
111
+ // href: 'https://stackoverflow.com/questions/tagged/docusaurus',
112
+ // },
113
+ {
114
+ label: 'Discord',
115
+ href: 'https://discord.gg/2g5vhGQN',
116
+ },
117
+ // {
118
+ // label: 'Twitter',
119
+ // href: 'https://twitter.com/docusaurus',
120
+ // },
121
+ ],
122
+ },
123
+ {
124
+ title: 'More',
125
+ items: [
126
+ // {
127
+ // label: 'Blog',
128
+ // to: '/blog',
129
+ // },
130
+ {
131
+ label: 'GitHub',
132
+ href: 'https://github.com/wix-incubator/obsidian',
133
+ },
134
+ ],
135
+ },
136
+ ],
137
+ copyright: `Copyright © ${new Date().getFullYear()} Wix.com. Built with Docusaurus.`,
138
+ },
139
+ prism: {
140
+ theme: lightCodeTheme,
141
+ darkTheme: darkCodeTheme,
142
+ },
143
+ }),
144
+ };
145
+
146
+ module.exports = config;