@croct/plug-react 0.4.2 → 0.5.0-next.1

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 (68) hide show
  1. package/CroctProvider.d.ts +7 -7
  2. package/CroctProvider.js +37 -0
  3. package/CroctProvider.js.map +1 -0
  4. package/README.md +245 -107
  5. package/api/evaluate.d.ts +7 -0
  6. package/api/evaluate.js +15 -0
  7. package/api/evaluate.js.map +1 -0
  8. package/api/fetchContent.d.ts +13 -0
  9. package/api/fetchContent.js +17 -0
  10. package/api/fetchContent.js.map +1 -0
  11. package/api/index.d.ts +2 -0
  12. package/api/index.js +19 -0
  13. package/api/index.js.map +1 -0
  14. package/components/Personalization/index.d.ts +10 -10
  15. package/components/Personalization/index.js +13 -0
  16. package/components/Personalization/index.js.map +1 -0
  17. package/components/Slot/index.d.ts +19 -19
  18. package/components/Slot/index.js +13 -0
  19. package/components/Slot/index.js.map +1 -0
  20. package/components/index.d.ts +2 -2
  21. package/components/index.js +19 -0
  22. package/components/index.js.map +1 -0
  23. package/hooks/Cache.d.ts +22 -22
  24. package/hooks/Cache.js +62 -0
  25. package/hooks/Cache.js.map +1 -0
  26. package/hooks/index.d.ts +3 -3
  27. package/hooks/index.js +20 -0
  28. package/hooks/index.js.map +1 -0
  29. package/hooks/useContent.d.ts +18 -17
  30. package/hooks/useContent.js +25 -0
  31. package/hooks/useContent.js.map +1 -0
  32. package/hooks/useCroct.d.ts +2 -2
  33. package/hooks/useCroct.js +14 -0
  34. package/hooks/useCroct.js.map +1 -0
  35. package/hooks/useEvaluation.d.ts +11 -11
  36. package/hooks/useEvaluation.js +35 -0
  37. package/hooks/useEvaluation.js.map +1 -0
  38. package/hooks/useLoader.d.ts +5 -5
  39. package/hooks/useLoader.js +41 -0
  40. package/hooks/useLoader.js.map +1 -0
  41. package/index.d.ts +5 -3
  42. package/index.js +20 -337
  43. package/index.js.map +1 -1
  44. package/package.json +31 -44
  45. package/ssr-polyfills.d.ts +3 -3
  46. package/ssr-polyfills.js +64 -0
  47. package/ssr-polyfills.js.map +1 -0
  48. package/CroctProvider.test.d.ts +0 -1
  49. package/components/Personalization/index.d.test.d.ts +0 -1
  50. package/components/Personalization/index.stories.d.ts +0 -7
  51. package/components/Personalization/index.test.d.ts +0 -1
  52. package/components/Slot/index.d.test.d.ts +0 -1
  53. package/components/Slot/index.stories.d.ts +0 -17
  54. package/components/Slot/index.test.d.ts +0 -1
  55. package/hooks/Cache.test.d.ts +0 -1
  56. package/hooks/useContent.d.test.d.ts +0 -1
  57. package/hooks/useContent.ssr.test.d.ts +0 -1
  58. package/hooks/useContent.stories.d.ts +0 -19
  59. package/hooks/useContent.test.d.ts +0 -1
  60. package/hooks/useCroct.ssr.test.d.ts +0 -1
  61. package/hooks/useCroct.test.d.ts +0 -1
  62. package/hooks/useEvaluation.d.test.d.ts +0 -1
  63. package/hooks/useEvaluation.ssr.test.d.ts +0 -1
  64. package/hooks/useEvaluation.stories.d.ts +0 -8
  65. package/hooks/useEvaluation.test.d.ts +0 -1
  66. package/hooks/useLoader.test.d.ts +0 -1
  67. package/ssr-polyfills.ssr.test.d.ts +0 -1
  68. package/ssr-polyfills.test.d.ts +0 -1
@@ -1,19 +0,0 @@
1
- import { Story, Meta } from '@storybook/react/types-6-0';
2
- import { UseContentOptions } from './useContent';
3
- declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
4
- export default _default;
5
- declare type HomeBannerProps = {
6
- loading?: true;
7
- title: string;
8
- subtitle: string;
9
- cta: {
10
- label: string;
11
- link: string;
12
- };
13
- };
14
- declare type HeroOptions = UseContentOptions<HomeBannerProps, HomeBannerProps> & {
15
- slotId?: 'home-banner';
16
- };
17
- export declare const WithSuspense: Story<HeroOptions>;
18
- export declare const WithInitialState: Story<HeroOptions>;
19
- export declare const WithFallbackState: Story<HeroOptions>;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- import { Story, Meta } from '@storybook/react/types-6-0';
2
- import { UseEvaluationOptions } from './useEvaluation';
3
- declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
4
- export default _default;
5
- declare type PersonalizedNewsWidgetProps = UseEvaluationOptions<string | null, string>;
6
- export declare const WithSuspense: Story<PersonalizedNewsWidgetProps>;
7
- export declare const WithInitialState: Story<PersonalizedNewsWidgetProps>;
8
- export declare const WithFallbackState: Story<PersonalizedNewsWidgetProps>;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};