@xyo-network/react-share 7.5.8 → 7.5.11

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 (39) hide show
  1. package/dist/browser/button/ShareButton.d.ts.map +1 -1
  2. package/dist/browser/index.mjs +361 -338
  3. package/dist/browser/index.mjs.map +1 -1
  4. package/dist/browser/out/CopyLinkStack.d.ts.map +1 -1
  5. package/dist/browser/out/lib/AnimatedGradientTypography.d.ts +4 -2
  6. package/dist/browser/out/lib/AnimatedGradientTypography.d.ts.map +1 -1
  7. package/package.json +70 -29
  8. package/src/button/ShareButton.stories.tsx +0 -23
  9. package/src/button/ShareButton.tsx +0 -75
  10. package/src/button/index.ts +0 -1
  11. package/src/global.d.ts +0 -1
  12. package/src/icons/index.ts +0 -1
  13. package/src/icons/social/Facebook.tsx +0 -11
  14. package/src/icons/social/XTwitter.tsx +0 -10
  15. package/src/icons/social/index.ts +0 -2
  16. package/src/index.ts +0 -4
  17. package/src/meta-server/dynamic-share/DynamicShareImage.tsx +0 -23
  18. package/src/meta-server/dynamic-share/index.ts +0 -1
  19. package/src/meta-server/index.ts +0 -2
  20. package/src/meta-server/live-share/HideParentsFlexbox.tsx +0 -40
  21. package/src/meta-server/live-share/index.ts +0 -1
  22. package/src/out/CopyIconButton.tsx +0 -58
  23. package/src/out/CopyLinkStack.stories.tsx +0 -69
  24. package/src/out/CopyLinkStack.tsx +0 -77
  25. package/src/out/CopyLinkTextField.stories.tsx +0 -18
  26. package/src/out/CopyLinkTextField.tsx +0 -41
  27. package/src/out/Dialog.stories.tsx +0 -78
  28. package/src/out/Dialog.tsx +0 -48
  29. package/src/out/Explanation.tsx +0 -29
  30. package/src/out/GenerateShareLinkButton.stories.tsx +0 -18
  31. package/src/out/GenerateShareLinkButton.tsx +0 -31
  32. package/src/out/HeadingFlexbox.tsx +0 -27
  33. package/src/out/SocialButtonsFlexbox.stories.tsx +0 -41
  34. package/src/out/SocialButtonsFlexbox.tsx +0 -79
  35. package/src/out/index.ts +0 -7
  36. package/src/out/lib/AnimatedGradientTypography.tsx +0 -54
  37. package/src/out/lib/ShareLinkProps.ts +0 -8
  38. package/src/out/lib/index.ts +0 -3
  39. package/src/out/lib/splitAroundSubstring.ts +0 -19
@@ -1,54 +0,0 @@
1
- import {
2
- keyframes, styled, Typography,
3
- } from '@mui/material'
4
-
5
- /**
6
- * Start the animation at 100% to give the gradient a left to right effect
7
- */
8
- const moveBg = keyframes(`
9
- 0% {
10
- background-position: 100% 0%;
11
- }
12
- 100% {
13
- background-position: 0% 0%;
14
- }
15
- `)
16
-
17
- /**
18
- * Adapted from - https://codepen.io/web-dot-dev/pen/vYrGPNE
19
- */
20
- export const AnimatedGradientTypography = styled(Typography, { name: 'AnimatedGradientTypography' })<{ color1?: string; color2?: string }>(({
21
- theme, color1, color2,
22
- }) => {
23
- return {
24
- // Set the color variables for the gradient
25
- '--color-one': color1 ?? theme.vars.palette.secondary.dark,
26
- '--color-two': color2 ?? theme.vars.palette.primary.light,
27
- // set the gradient so it has the same start and end color for looping effect
28
- 'background': `linear-gradient(
29
- .25turn,
30
- var(--color-one),
31
- var(--color-two),
32
- var(--color-one)
33
- )`,
34
- // Set the text color to transparent so the gradient shows through
35
- 'color': 'transparent',
36
- // Clip the background to the text shape
37
- 'backgroundClip': 'text',
38
- // Set the background size to 800% so we don't see the third color initially creating the looping effect
39
- 'backgroundSize': '800%',
40
- // Set the text to bold so the gradient is more visible
41
- 'fontWeight': 'bold',
42
- // Set the animation
43
- '@media (prefers-reduced-motion: no-preference)': {
44
- animationName: moveBg,
45
- animationDuration: '2s',
46
- animationIterationCount: 'infinite',
47
- },
48
- // reset for users that prefer reduced motion
49
- '@media (prefers-reduced-motion)': {
50
- background: 'none',
51
- color: theme.vars.palette.text.primary,
52
- },
53
- }
54
- })
@@ -1,8 +0,0 @@
1
- export interface ShareLinkProps {
2
- copiedLinkText?: string
3
- copyLinkText?: string
4
- shareLinkName?: string
5
- shareUrl?: string
6
- uploadPayloads?: () => Promise<void>
7
- xnsName?: string
8
- }
@@ -1,3 +0,0 @@
1
- export * from './AnimatedGradientTypography.tsx'
2
- export * from './ShareLinkProps.ts'
3
- export * from './splitAroundSubstring.ts'
@@ -1,19 +0,0 @@
1
- export const splitAroundSubstring = (path: string, substring: string): [string, string, string] => {
2
- // Find the index of the substring
3
- const index = path.indexOf(substring)
4
-
5
- if (index === -1) {
6
- throw new Error(`XNS name "${substring}" not found in path.`)
7
- }
8
-
9
- // Extract the part before the substring
10
- const part1 = path.slice(0, index)
11
-
12
- // The substring itself is part2
13
- const part2 = substring
14
-
15
- // Extract the part after the substring
16
- const part3 = path.slice(index + substring.length)
17
-
18
- return [part1, part2, part3]
19
- }