@spoosh/react 0.8.0 → 0.9.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/dist/index.js CHANGED
@@ -608,13 +608,21 @@ function create(instance) {
608
608
  eventEmitter,
609
609
  pluginExecutor
610
610
  });
611
+ const plugins = pluginExecutor.getPlugins();
612
+ const setupContext = {
613
+ stateManager,
614
+ eventEmitter,
615
+ pluginExecutor
616
+ };
617
+ for (const plugin of plugins) {
618
+ plugin.setup?.(setupContext);
619
+ }
611
620
  const instanceApiContext = {
612
621
  api,
613
622
  stateManager,
614
623
  eventEmitter,
615
624
  pluginExecutor
616
625
  };
617
- const plugins = pluginExecutor.getPlugins();
618
626
  const instanceApis = plugins.reduce(
619
627
  (acc, plugin) => {
620
628
  if (plugin.instanceApi) {
package/dist/index.mjs CHANGED
@@ -617,13 +617,21 @@ function create(instance) {
617
617
  eventEmitter,
618
618
  pluginExecutor
619
619
  });
620
+ const plugins = pluginExecutor.getPlugins();
621
+ const setupContext = {
622
+ stateManager,
623
+ eventEmitter,
624
+ pluginExecutor
625
+ };
626
+ for (const plugin of plugins) {
627
+ plugin.setup?.(setupContext);
628
+ }
620
629
  const instanceApiContext = {
621
630
  api,
622
631
  stateManager,
623
632
  eventEmitter,
624
633
  pluginExecutor
625
634
  };
626
- const plugins = pluginExecutor.getPlugins();
627
635
  const instanceApis = plugins.reduce(
628
636
  (acc, plugin) => {
629
637
  if (plugin.instanceApi) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spoosh/react",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "license": "MIT",
5
5
  "description": "React hooks for Spoosh API toolkit",
6
6
  "keywords": [
@@ -34,14 +34,14 @@
34
34
  }
35
35
  },
36
36
  "peerDependencies": {
37
- "@spoosh/core": ">=0.12.0",
37
+ "@spoosh/core": ">=0.13.0",
38
38
  "react": "^18 || ^19"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@testing-library/react": "^16.0.0",
42
42
  "jsdom": "^26.0.0",
43
- "@spoosh/core": "0.12.0",
44
- "@spoosh/test-utils": "0.1.8"
43
+ "@spoosh/core": "0.13.0",
44
+ "@spoosh/test-utils": "0.2.0"
45
45
  },
46
46
  "scripts": {
47
47
  "dev": "tsup --watch",