@xyo-network/react-share 7.6.3 → 8.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../../src/button/ShareButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAIzD,OAAO,KAEN,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,YAAY,CAAA;KAAE,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6DlD,CAAA"}
1
+ {"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../../src/button/ShareButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAIzD,OAAO,KAEN,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,YAAY,CAAA;KAAE,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsElD,CAAA"}
@@ -27,19 +27,26 @@ var ShareButton = ({
27
27
  useEffect(() => {
28
28
  setAnchorEl(anchorRef.current);
29
29
  }, []);
30
- return /* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
30
+ return /* @__PURE__ */ jsxs(FlexRow, { sx: { gap: 1 }, children: [
31
31
  /* @__PURE__ */ jsx(
32
32
  ButtonEx,
33
33
  {
34
34
  variant: "text",
35
- minWidth: 32,
36
35
  size: "small",
37
36
  disabled: !prepared,
38
37
  onClick: () => {
39
38
  setExpanded(true);
40
39
  },
41
40
  ...props,
42
- children: /* @__PURE__ */ jsx(ShareIcon, { htmlColor: "gray", fontSize: "small", ref: anchorRef })
41
+ sx: [{ minWidth: 32 }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
42
+ children: /* @__PURE__ */ jsx(
43
+ ShareIcon,
44
+ {
45
+ htmlColor: "gray",
46
+ ref: anchorRef,
47
+ sx: { fontSize: "small" }
48
+ }
49
+ )
43
50
  }
44
51
  ),
45
52
  /* @__PURE__ */ jsx(
@@ -56,31 +63,40 @@ var ShareButton = ({
56
63
  ...slot?.popover?.sx
57
64
  },
58
65
  ...slot?.popover,
59
- children: /* @__PURE__ */ jsxs(FlexRow, { gap: 0.5, padding: 0.5, children: [
60
- /* @__PURE__ */ jsx(
61
- LinkEx,
62
- {
63
- lineHeight: 0,
64
- onClick: () => {
65
- window.open(`https://x.com/intent/tweet?url=${encodeURIComponent(link)}`);
66
- setExpanded(false);
67
- },
68
- children: /* @__PURE__ */ jsx(XIcon, { fontSize: "small" })
69
- }
70
- ),
71
- /* @__PURE__ */ jsx(
72
- LinkEx,
73
- {
74
- lineHeight: 0,
75
- style: { color: "#4267b2" },
76
- onClick: () => {
77
- window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`);
78
- setExpanded(false);
79
- },
80
- children: /* @__PURE__ */ jsx(FacebookIcon, { fontSize: "small" })
81
- }
82
- )
83
- ] })
66
+ children: /* @__PURE__ */ jsxs(
67
+ FlexRow,
68
+ {
69
+ sx: {
70
+ gap: 0.5,
71
+ padding: 0.5
72
+ },
73
+ children: [
74
+ /* @__PURE__ */ jsx(
75
+ LinkEx,
76
+ {
77
+ onClick: () => {
78
+ window.open(`https://x.com/intent/tweet?url=${encodeURIComponent(link)}`);
79
+ setExpanded(false);
80
+ },
81
+ sx: { lineHeight: 0 },
82
+ children: /* @__PURE__ */ jsx(XIcon, { sx: { fontSize: "small" } })
83
+ }
84
+ ),
85
+ /* @__PURE__ */ jsx(
86
+ LinkEx,
87
+ {
88
+ style: { color: "#4267b2" },
89
+ onClick: () => {
90
+ window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`);
91
+ setExpanded(false);
92
+ },
93
+ sx: { lineHeight: 0 },
94
+ children: /* @__PURE__ */ jsx(FacebookIcon, { sx: { fontSize: "small" } })
95
+ }
96
+ )
97
+ ]
98
+ }
99
+ )
84
100
  }
85
101
  )
86
102
  ] });
@@ -106,16 +122,12 @@ var XTwitterSvgIcon = createSvgIcon2(
106
122
  );
107
123
 
108
124
  // src/meta-server/dynamic-share/DynamicShareImage.tsx
109
- import { Helmet } from "react-helmet";
110
- import { jsx as jsx4 } from "react/jsx-runtime";
111
- var DynamicShareImage = ({ image }) => {
112
- return /* @__PURE__ */ jsx4(Helmet, { children: /* @__PURE__ */ jsx4("meta", { property: "xyo:og:image", content: image }) });
113
- };
125
+ var DynamicShareImage = () => null;
114
126
 
115
127
  // src/meta-server/live-share/HideParentsFlexbox.tsx
116
128
  import { FlexGrowRow } from "@xylabs/react-flexbox";
117
129
  import { useEffect as useEffect2 } from "react";
118
- import { jsx as jsx5 } from "react/jsx-runtime";
130
+ import { jsx as jsx4 } from "react/jsx-runtime";
119
131
  var HideParentsFlexbox = ({ children, ...props }) => {
120
132
  useEffect2(() => {
121
133
  const style = document.createElement("style");
@@ -143,7 +155,18 @@ var HideParentsFlexbox = ({ children, ...props }) => {
143
155
  style.remove();
144
156
  };
145
157
  }, []);
146
- return /* @__PURE__ */ jsx5(FlexGrowRow, { alignItems: "stretch", id: "preview-area", justifyContent: "start", ...props, children });
158
+ return /* @__PURE__ */ jsx4(
159
+ FlexGrowRow,
160
+ {
161
+ id: "preview-area",
162
+ ...props,
163
+ sx: [{
164
+ alignItems: "stretch",
165
+ justifyContent: "start"
166
+ }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
167
+ children
168
+ }
169
+ );
147
170
  };
148
171
 
149
172
  // src/out/CopyLinkStack.tsx
@@ -168,7 +191,7 @@ import {
168
191
  } from "@mui/material";
169
192
  import { forget } from "@xylabs/sdk-js";
170
193
  import { useState as useState2 } from "react";
171
- import { jsx as jsx6 } from "react/jsx-runtime";
194
+ import { jsx as jsx5 } from "react/jsx-runtime";
172
195
  var CopyIconButton = ({
173
196
  copyLinkText,
174
197
  copiedLinkText,
@@ -201,7 +224,7 @@ var CopyIconButton = ({
201
224
  console.warn("tried to copy shareUrl before it was generated");
202
225
  }
203
226
  };
204
- return /* @__PURE__ */ jsx6(Tooltip, { title: copyTooltipTitle, children: loading ? /* @__PURE__ */ jsx6(IconButton, { children: /* @__PURE__ */ jsx6(CircularProgress, { size: "24px" }) }) : /* @__PURE__ */ jsx6(IconButton, { "aria-label": `copy ${shareLinkName} link`, onClick: () => forget(copyToClipboard(shareUrl)), edge: "end", ...props, children: /* @__PURE__ */ jsx6(CopyAllRounded, {}) }) });
227
+ return /* @__PURE__ */ jsx5(Tooltip, { title: copyTooltipTitle, children: loading ? /* @__PURE__ */ jsx5(IconButton, { children: /* @__PURE__ */ jsx5(CircularProgress, { size: "24px" }) }) : /* @__PURE__ */ jsx5(IconButton, { "aria-label": `copy ${shareLinkName} link`, onClick: () => forget(copyToClipboard(shareUrl)), edge: "end", ...props, children: /* @__PURE__ */ jsx5(CopyAllRounded, {}) }) });
205
228
  };
206
229
 
207
230
  // src/out/lib/AnimatedGradientTypography.tsx
@@ -269,7 +292,7 @@ var splitAroundSubstring = (path, substring) => {
269
292
  };
270
293
 
271
294
  // src/out/CopyLinkStack.tsx
272
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
295
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
273
296
  var CopyLinkStack = ({
274
297
  addToXnsName,
275
298
  copiedLinkText,
@@ -296,42 +319,63 @@ var CopyLinkStack = ({
296
319
  }
297
320
  }, [addToXnsName, shareUrl, xnsNameProp]);
298
321
  const [part1, xnsName, part3] = parsedXnsName || [];
299
- return /* @__PURE__ */ jsxs3(Stack, { direction: "row", alignItems: "center", gap: 0.25, ...props, children: [
300
- xnsName && addToXnsName ? /* @__PURE__ */ jsxs3(Stack, { direction: "row", maxWidth: "100%", sx: { overflowX: "auto" }, children: [
301
- /* @__PURE__ */ jsx7(Typography2, { sx: { display: "inline-flex" }, children: part1 }),
302
- /* @__PURE__ */ jsx7(AnimatedGradientTypography, { color1: xnsStartColor, color2: xnsEndColor, sx: { display: "inline-flex" }, children: xnsName }),
303
- /* @__PURE__ */ jsx7(Typography2, { sx: { display: "inline-flex" }, children: part3 })
304
- ] }) : /* @__PURE__ */ jsx7(
305
- Typography2,
306
- {
307
- sx: {
308
- display: "inline-flex",
309
- maxWidth: "100%",
310
- overflow: "auto"
311
- },
312
- children: shareUrl
313
- }
314
- ),
315
- /* @__PURE__ */ jsx7(
316
- CopyIconButton,
317
- {
318
- copiedLinkText,
319
- copyLinkText,
320
- onClickError,
321
- shareLinkName,
322
- shareUrl,
323
- sx: { display: "inline-flex" },
324
- uploadPayloads
325
- }
326
- ),
327
- error ? /* @__PURE__ */ jsx7(Tooltip2, { title: error.message, children: /* @__PURE__ */ jsx7(Cancel, { color: "error", sx: { display: "inline-flex" } }) }) : null
328
- ] });
322
+ return /* @__PURE__ */ jsxs3(
323
+ Stack,
324
+ {
325
+ direction: "row",
326
+ ...props,
327
+ sx: [{
328
+ alignItems: "center",
329
+ gap: 0.25
330
+ }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
331
+ children: [
332
+ xnsName && addToXnsName ? /* @__PURE__ */ jsxs3(
333
+ Stack,
334
+ {
335
+ direction: "row",
336
+ sx: {
337
+ maxWidth: "100%",
338
+ overflowX: "auto"
339
+ },
340
+ children: [
341
+ /* @__PURE__ */ jsx6(Typography2, { sx: { display: "inline-flex" }, children: part1 }),
342
+ /* @__PURE__ */ jsx6(AnimatedGradientTypography, { color1: xnsStartColor, color2: xnsEndColor, sx: { display: "inline-flex" }, children: xnsName }),
343
+ /* @__PURE__ */ jsx6(Typography2, { sx: { display: "inline-flex" }, children: part3 })
344
+ ]
345
+ }
346
+ ) : /* @__PURE__ */ jsx6(
347
+ Typography2,
348
+ {
349
+ sx: {
350
+ display: "inline-flex",
351
+ maxWidth: "100%",
352
+ overflow: "auto"
353
+ },
354
+ children: shareUrl
355
+ }
356
+ ),
357
+ /* @__PURE__ */ jsx6(
358
+ CopyIconButton,
359
+ {
360
+ copiedLinkText,
361
+ copyLinkText,
362
+ onClickError,
363
+ shareLinkName,
364
+ shareUrl,
365
+ sx: { display: "inline-flex" },
366
+ uploadPayloads
367
+ }
368
+ ),
369
+ error ? /* @__PURE__ */ jsx6(Tooltip2, { title: error.message, children: /* @__PURE__ */ jsx6(Cancel, { color: "error", sx: { display: "inline-flex" } }) }) : null
370
+ ]
371
+ }
372
+ );
329
373
  };
330
374
 
331
375
  // src/out/CopyLinkTextField.tsx
332
376
  import { InputAdornment, TextField } from "@mui/material";
333
377
  import { useCallback as useCallback2, useState as useState4 } from "react";
334
- import { jsx as jsx8 } from "react/jsx-runtime";
378
+ import { jsx as jsx7 } from "react/jsx-runtime";
335
379
  var CopyLinkTextField = ({
336
380
  shareLinkName,
337
381
  shareUrl,
@@ -341,7 +385,7 @@ var CopyLinkTextField = ({
341
385
  const onClickError = useCallback2((error2) => {
342
386
  setError(error2);
343
387
  }, []);
344
- return /* @__PURE__ */ jsx8(
388
+ return /* @__PURE__ */ jsx7(
345
389
  TextField,
346
390
  {
347
391
  disabled: true,
@@ -352,7 +396,7 @@ var CopyLinkTextField = ({
352
396
  ...props,
353
397
  slotProps: {
354
398
  input: {
355
- endAdornment: /* @__PURE__ */ jsx8(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx8(CopyIconButton, { shareLinkName, shareUrl, onClickError }) })
399
+ endAdornment: /* @__PURE__ */ jsx7(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx7(CopyIconButton, { shareLinkName, shareUrl, onClickError }) })
356
400
  }
357
401
  }
358
402
  }
@@ -369,7 +413,7 @@ import {
369
413
  Typography as Typography3
370
414
  } from "@mui/material";
371
415
  import { FlexCol, FlexGrowCol } from "@xylabs/react-flexbox";
372
- import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
416
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
373
417
  var ShareOutDialog = ({
374
418
  ShareOutDialogActions,
375
419
  cardImg,
@@ -384,21 +428,39 @@ var ShareOutDialog = ({
384
428
  onClose?.("", "backdropClick");
385
429
  };
386
430
  return /* @__PURE__ */ jsxs4(Dialog, { onClose, open, ...props, children: [
387
- /* @__PURE__ */ jsx9(DialogTitle, { children: /* @__PURE__ */ jsxs4(Stack2, { direction: "row", spacing: 2, children: [
388
- /* @__PURE__ */ jsxs4(FlexGrowCol, { alignItems: "flex-start", width: "60%", children: [
389
- /* @__PURE__ */ jsx9(Typography3, { variant: "h5", children: title }),
390
- /* @__PURE__ */ jsxs4(Typography3, { variant: "body1", children: [
391
- " ",
392
- subtitle
393
- ] })
394
- ] }),
395
- /* @__PURE__ */ jsx9(FlexGrowCol, { alignItems: "flex-end", width: "40%", children: cardImg })
431
+ /* @__PURE__ */ jsx8(DialogTitle, { children: /* @__PURE__ */ jsxs4(Stack2, { direction: "row", spacing: 2, children: [
432
+ /* @__PURE__ */ jsxs4(
433
+ FlexGrowCol,
434
+ {
435
+ sx: {
436
+ alignItems: "flex-start",
437
+ width: "60%"
438
+ },
439
+ children: [
440
+ /* @__PURE__ */ jsx8(Typography3, { variant: "h5", children: title }),
441
+ /* @__PURE__ */ jsxs4(Typography3, { variant: "body1", children: [
442
+ " ",
443
+ subtitle
444
+ ] })
445
+ ]
446
+ }
447
+ ),
448
+ /* @__PURE__ */ jsx8(
449
+ FlexGrowCol,
450
+ {
451
+ sx: {
452
+ alignItems: "flex-end",
453
+ width: "40%"
454
+ },
455
+ children: cardImg
456
+ }
457
+ )
396
458
  ] }) }),
397
459
  /* @__PURE__ */ jsxs4(DialogContent, { children: [
398
460
  shareOutDialogContent,
399
- /* @__PURE__ */ jsx9(FlexCol, { alignItems: "stretch" })
461
+ /* @__PURE__ */ jsx8(FlexCol, { sx: { alignItems: "stretch" } })
400
462
  ] }),
401
- ShareOutDialogActions ? /* @__PURE__ */ jsx9(DialogActions, { children: /* @__PURE__ */ jsx9(ShareOutDialogActions, { onClose: handleClose }) }) : null
463
+ ShareOutDialogActions ? /* @__PURE__ */ jsx8(DialogActions, { children: /* @__PURE__ */ jsx8(ShareOutDialogActions, { onClose: handleClose }) }) : null
402
464
  ] });
403
465
  };
404
466
 
@@ -410,18 +472,31 @@ import {
410
472
  useTheme
411
473
  } from "@mui/material";
412
474
  import { FlexGrowRow as FlexGrowRow2 } from "@xylabs/react-flexbox";
413
- import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
475
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
414
476
  var ShareOutExplanation = ({ toolTipTitle }) => {
415
477
  const theme = useTheme();
416
478
  const title = toolTipTitle ?? "In order for your data to be publicly viewable, it needs to be saved to the XYO Network Public Archivist. Public data can be seen by your friends, and XYO can generate preview images for easier sharing on social media.";
417
- return /* @__PURE__ */ jsxs5(FlexGrowRow2, { alignItems: "center", children: [
418
- /* @__PURE__ */ jsx10(Typography4, { variant: "body2", paddingRight: 0.5, children: "What am I sharing?" }),
419
- /* @__PURE__ */ jsx10(
479
+ return /* @__PURE__ */ jsxs5(FlexGrowRow2, { sx: { alignItems: "center" }, children: [
480
+ /* @__PURE__ */ jsx9(
481
+ Typography4,
482
+ {
483
+ variant: "body2",
484
+ sx: { paddingRight: 0.5 },
485
+ children: "What am I sharing?"
486
+ }
487
+ ),
488
+ /* @__PURE__ */ jsx9(
420
489
  Tooltip3,
421
490
  {
422
491
  title,
423
492
  placement: "bottom",
424
- children: /* @__PURE__ */ jsx10(InfoOutlined, { fontSize: "small", sx: { fontSize: theme.typography.caption.fontSize } })
493
+ children: /* @__PURE__ */ jsx9(
494
+ InfoOutlined,
495
+ {
496
+ fontSize: "small",
497
+ sx: { fontSize: theme.typography.caption.fontSize }
498
+ }
499
+ )
425
500
  }
426
501
  )
427
502
  ] });
@@ -433,17 +508,17 @@ import {
433
508
  CircularProgress as CircularProgress2,
434
509
  styled as styled2
435
510
  } from "@mui/material";
436
- import { jsx as jsx11 } from "react/jsx-runtime";
511
+ import { jsx as jsx10 } from "react/jsx-runtime";
437
512
  var GenerateShareLinkButton = ({
438
513
  children = "Generate My Share Link",
439
514
  loading,
440
515
  ...props
441
516
  }) => {
442
- return /* @__PURE__ */ jsx11(
517
+ return /* @__PURE__ */ jsx10(
443
518
  Button,
444
519
  {
445
520
  variant: "contained",
446
- startIcon: loading ? /* @__PURE__ */ jsx11(StyledCircularProgress, { size: "small" }) : null,
521
+ startIcon: loading ? /* @__PURE__ */ jsx10(StyledCircularProgress, { size: "small" }) : null,
447
522
  ...props,
448
523
  children
449
524
  }
@@ -460,7 +535,7 @@ var StyledCircularProgress = styled2(CircularProgress2, { name: "StyledCircularP
460
535
  // src/out/HeadingFlexbox.tsx
461
536
  import { Typography as Typography5 } from "@mui/material";
462
537
  import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
463
- import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
538
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
464
539
  var ShareOutHeadingFlexbox = ({
465
540
  children,
466
541
  shareLinkName,
@@ -468,11 +543,21 @@ var ShareOutHeadingFlexbox = ({
468
543
  ...props
469
544
  }) => {
470
545
  const GenerateShareLinkExplanation = "When you generate your share link, we'll make a small amount of your data public so friends can check it out!";
471
- return /* @__PURE__ */ jsxs6(FlexGrowCol2, { alignItems: "flex-start", paddingBottom: 1, ...props, children: [
472
- /* @__PURE__ */ jsx12(Typography5, { variant: "body1", gutterBottom: true, children: /* @__PURE__ */ jsx12("strong", { children: "Your Share Link" }) }),
473
- /* @__PURE__ */ jsx12(Typography5, { variant: "body1", children: shareUrl ? `Use this link or the buttons below to share ${shareLinkName}` : GenerateShareLinkExplanation }),
474
- children
475
- ] });
546
+ return /* @__PURE__ */ jsxs6(
547
+ FlexGrowCol2,
548
+ {
549
+ ...props,
550
+ sx: [{
551
+ alignItems: "flex-start",
552
+ paddingBottom: 1
553
+ }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
554
+ children: [
555
+ /* @__PURE__ */ jsx11(Typography5, { variant: "body1", gutterBottom: true, children: /* @__PURE__ */ jsx11("strong", { children: "Your Share Link" }) }),
556
+ /* @__PURE__ */ jsx11(Typography5, { variant: "body1", children: shareUrl ? `Use this link or the buttons below to share ${shareLinkName}` : GenerateShareLinkExplanation }),
557
+ children
558
+ ]
559
+ }
560
+ );
476
561
  };
477
562
 
478
563
  // src/out/SocialButtonsFlexbox.tsx
@@ -481,7 +566,7 @@ import { ButtonEx as ButtonEx2 } from "@xylabs/react-button";
481
566
  import { ErrorRender } from "@xylabs/react-error";
482
567
  import { FlexGrowCol as FlexGrowCol3, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
483
568
  import { useState as useState5 } from "react";
484
- import { Fragment, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
569
+ import { Fragment, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
485
570
  var SocialButtonsFlexbox = ({
486
571
  shareUrl,
487
572
  uploadPayloads,
@@ -503,47 +588,59 @@ var SocialButtonsFlexbox = ({
503
588
  setError(e);
504
589
  }
505
590
  };
506
- return /* @__PURE__ */ jsxs7(FlexGrowCol3, { alignItems: "stretch", paddingTop: 2, ...props, children: [
507
- /* @__PURE__ */ jsx13(Typography6, { variant: "body1", gutterBottom: true, children: /* @__PURE__ */ jsx13("strong", { children: "Share on Social Media" }) }),
508
- /* @__PURE__ */ jsx13(
509
- FlexRow2,
510
- {
511
- gap: 0.5,
512
- sx: { flexDirection: { md: "row", xs: "column" } },
513
- children: shareUrl ? /* @__PURE__ */ jsxs7(Fragment, { children: [
514
- /* @__PURE__ */ jsx13(
515
- ButtonEx2,
516
- {
517
- variant: "contained",
518
- style: { backgroundColor: "#000", color: "#fff" },
519
- busy: xLoading,
520
- onClick: async () => {
521
- const openUrl = () => window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(shareUrl)}`);
522
- await handleClick(openUrl, "x");
523
- },
524
- startIcon: /* @__PURE__ */ jsx13(XTwitterSvgIcon, { width: "20px" }),
525
- children: "Share on X (Twitter)"
526
- }
527
- ),
528
- /* @__PURE__ */ jsx13(
529
- ButtonEx2,
530
- {
531
- busy: fbLoading,
532
- variant: "contained",
533
- style: { backgroundColor: "#4267b2", color: "#fff" },
534
- onClick: async () => {
535
- const openUrl = () => window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}`);
536
- await handleClick(openUrl, "fb");
537
- },
538
- startIcon: /* @__PURE__ */ jsx13(FacebookSvgIcon, {}),
539
- children: "Share on Facebook"
540
- }
541
- )
542
- ] }) : null
543
- }
544
- ),
545
- /* @__PURE__ */ jsx13(ErrorRender, { error, scope: "SocialButtonsFlexbox" })
546
- ] });
591
+ return /* @__PURE__ */ jsxs7(
592
+ FlexGrowCol3,
593
+ {
594
+ ...props,
595
+ sx: [{
596
+ alignItems: "stretch",
597
+ paddingTop: 2
598
+ }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
599
+ children: [
600
+ /* @__PURE__ */ jsx12(Typography6, { variant: "body1", gutterBottom: true, children: /* @__PURE__ */ jsx12("strong", { children: "Share on Social Media" }) }),
601
+ /* @__PURE__ */ jsx12(
602
+ FlexRow2,
603
+ {
604
+ sx: {
605
+ gap: 0.5,
606
+ flexDirection: { md: "row", xs: "column" }
607
+ },
608
+ children: shareUrl ? /* @__PURE__ */ jsxs7(Fragment, { children: [
609
+ /* @__PURE__ */ jsx12(
610
+ ButtonEx2,
611
+ {
612
+ variant: "contained",
613
+ style: { backgroundColor: "#000", color: "#fff" },
614
+ busy: xLoading,
615
+ onClick: async () => {
616
+ const openUrl = () => window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(shareUrl)}`);
617
+ await handleClick(openUrl, "x");
618
+ },
619
+ startIcon: /* @__PURE__ */ jsx12(XTwitterSvgIcon, { sx: { width: "20px" } }),
620
+ children: "Share on X (Twitter)"
621
+ }
622
+ ),
623
+ /* @__PURE__ */ jsx12(
624
+ ButtonEx2,
625
+ {
626
+ busy: fbLoading,
627
+ variant: "contained",
628
+ style: { backgroundColor: "#4267b2", color: "#fff" },
629
+ onClick: async () => {
630
+ const openUrl = () => window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}`);
631
+ await handleClick(openUrl, "fb");
632
+ },
633
+ startIcon: /* @__PURE__ */ jsx12(FacebookSvgIcon, {}),
634
+ children: "Share on Facebook"
635
+ }
636
+ )
637
+ ] }) : null
638
+ }
639
+ ),
640
+ /* @__PURE__ */ jsx12(ErrorRender, { error, scope: "SocialButtonsFlexbox" })
641
+ ]
642
+ }
643
+ );
547
644
  };
548
645
  export {
549
646
  CopyLinkStack,
@@ -559,4 +656,4 @@ export {
559
656
  SocialButtonsFlexbox,
560
657
  XTwitterSvgIcon
561
658
  };
562
- //# sourceMappingURL=index.mjs.map
659
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1,7 @@
1
- {"version":3,"sources":["../../src/button/ShareButton.tsx","../../src/icons/social/Facebook.tsx","../../src/icons/social/XTwitter.tsx","../../src/meta-server/dynamic-share/DynamicShareImage.tsx","../../src/meta-server/live-share/HideParentsFlexbox.tsx","../../src/out/CopyLinkStack.tsx","../../src/out/CopyIconButton.tsx","../../src/out/lib/AnimatedGradientTypography.tsx","../../src/out/lib/splitAroundSubstring.ts","../../src/out/CopyLinkTextField.tsx","../../src/out/Dialog.tsx","../../src/out/Explanation.tsx","../../src/out/GenerateShareLinkButton.tsx","../../src/out/HeadingFlexbox.tsx","../../src/out/SocialButtonsFlexbox.tsx"],"sourcesContent":["import {\n Facebook as FacebookIcon, Share as ShareIcon,\n X as XIcon,\n} from '@mui/icons-material'\nimport type { PopoverProps } from '@mui/material'\nimport { Popover } from '@mui/material'\nimport type { ButtonExProps } from '@xylabs/react-button'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport React, {\n useEffect, useRef, useState,\n} from 'react'\n\nexport type ShareButtonProps = ButtonExProps & {\n prepared?: boolean\n shareLink?: string\n slot?: { popover?: PopoverProps }\n}\n\nexport const ShareButton: React.FC<ShareButtonProps> = ({\n prepared = true, shareLink, slot, ...props\n}) => {\n const [expanded, setExpanded] = useState(false)\n const anchorRef = useRef(null)\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)\n const link = shareLink ?? globalThis.location.href\n\n useEffect(() => {\n setAnchorEl(anchorRef.current)\n }, [])\n\n return (\n <FlexRow gap={1}>\n <ButtonEx\n variant=\"text\"\n minWidth={32}\n size=\"small\"\n disabled={!prepared}\n onClick={() => {\n setExpanded(true)\n }}\n {...props}\n >\n <ShareIcon htmlColor=\"gray\" fontSize=\"small\" ref={anchorRef} />\n </ButtonEx>\n <Popover\n open={prepared ? expanded : false}\n anchorEl={anchorEl}\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n onClose={() => setExpanded(false)}\n transitionDuration={500}\n sx={{\n ml: 1, top: -4, ...slot?.popover?.sx,\n }}\n {...slot?.popover}\n >\n <FlexRow gap={0.5} padding={0.5}>\n <LinkEx\n lineHeight={0}\n onClick={() => {\n window.open(`https://x.com/intent/tweet?url=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <XIcon fontSize=\"small\" />\n </LinkEx>\n <LinkEx\n lineHeight={0}\n style={{ color: '#4267b2' }}\n onClick={() => {\n window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n >\n <FacebookIcon fontSize=\"small\" />\n </LinkEx>\n </FlexRow>\n </Popover>\n </FlexRow>\n )\n}\n","/* eslint-disable @stylistic/max-len */\nimport { createSvgIcon } from '@mui/material'\nimport React from 'react'\n\nexport const FacebookSvgIcon = createSvgIcon(\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"800\" width=\"1200\" viewBox=\"-204.79995 -341.33325 1774.9329 2047.9995\">\n <path d=\"M1365.333 682.667C1365.333 305.64 1059.693 0 682.667 0 305.64 0 0 305.64 0 682.667c0 340.738 249.641 623.16 576 674.373V880H402.667V682.667H576v-150.4c0-171.094 101.917-265.6 257.853-265.6 74.69 0 152.814 13.333 152.814 13.333v168h-86.083c-84.804 0-111.25 52.623-111.25 106.61v128.057h189.333L948.4 880H789.333v477.04c326.359-51.213 576-333.635 576-674.373\" fill=\"#1877f2\" />\n <path d=\"M948.4 880l30.267-197.333H789.333V554.609C789.333 500.623 815.78 448 900.584 448h86.083V280s-78.124-13.333-152.814-13.333c-155.936 0-257.853 94.506-257.853 265.6v150.4H402.667V880H576v477.04a687.805 687.805 0 00106.667 8.293c36.288 0 71.91-2.84 106.666-8.293V880H948.4\" fill=\"#fff\" />\n </svg>,\n 'Facebook',\n)\n","/* eslint-disable @stylistic/max-len */\nimport { createSvgIcon } from '@mui/material'\nimport React from 'react'\n\nexport const XTwitterSvgIcon = createSvgIcon(\n <svg viewBox=\"0 0 1200 1227\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\" fill=\"white\" />\n </svg>,\n 'XTwitterSvgIcon',\n)\n","import React from 'react'\nimport { Helmet } from 'react-helmet'\n\n/**\n * The props for the DynamicShareImage component.\n */\nexport interface DynamicShareImageProps {\n /**\n * The URL of the share image for the page.\n */\n image: string\n}\n\n/**\n * Used in conjunction with the XY Meta Server to dynamically set the share image for a page.\n */\nexport const DynamicShareImage: React.FC<DynamicShareImageProps> = ({ image }) => {\n return (\n <Helmet>\n <meta property=\"xyo:og:image\" content={image} />\n </Helmet>\n )\n}\n","import type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport type { PropsWithChildren } from 'react'\nimport React, { useEffect } from 'react'\n\nexport const HideParentsFlexbox: React.FC<PropsWithChildren & FlexBoxProps> = ({ children, ...props }) => {\n useEffect(() => {\n const style = document.createElement('style')\n document.head.append(style)\n style.innerHTML = `\n /** make all elements hidden */\n * {\n visibility: hidden;\n }\n\n /** move the preview area to the top of the page */\n #preview-area {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 9999;\n }\n\n /** make the preview area and all its children visible */\n #preview-area * {\n visibility: visible;\n }`\n\n return () => {\n style.remove()\n }\n }, [])\n\n return (\n <FlexGrowRow alignItems=\"stretch\" id=\"preview-area\" justifyContent=\"start\" {...props}>\n {children}\n </FlexGrowRow>\n )\n}\n","import { Cancel } from '@mui/icons-material'\nimport type { StackProps } from '@mui/material'\nimport {\n Stack,\n Tooltip,\n Typography,\n} from '@mui/material'\nimport React, {\n useCallback, useMemo, useState,\n} from 'react'\n\nimport { CopyIconButton } from './CopyIconButton.tsx'\nimport {\n AnimatedGradientTypography, type ShareLinkProps, splitAroundSubstring,\n} from './lib/index.ts'\n\nexport interface CopyLinkStackProps extends ShareLinkProps, StackProps {\n addToXnsName?: boolean\n copiedLinkText?: string\n copyLinkText?: string\n xnsEndColor?: string\n xnsStartColor?: string\n}\n\nexport const CopyLinkStack: React.FC<CopyLinkStackProps> = ({\n addToXnsName, copiedLinkText, copyLinkText, shareLinkName, shareUrl, xnsName: xnsNameProp, xnsEndColor, uploadPayloads, xnsStartColor, ...props\n}) => {\n const [error, setError] = useState<Error>()\n\n const onClickError = useCallback((error: Error) => {\n setError(error)\n }, [])\n\n const parsedXnsName = useMemo(() => {\n if (shareUrl && xnsNameProp && addToXnsName) {\n try {\n return splitAroundSubstring(shareUrl, xnsNameProp)\n } catch {\n return\n }\n }\n }, [addToXnsName, shareUrl, xnsNameProp])\n\n const [part1, xnsName, part3] = parsedXnsName || []\n\n return (\n <Stack direction=\"row\" alignItems=\"center\" gap={0.25} {...props}>\n {xnsName && addToXnsName\n ? (\n <Stack direction=\"row\" maxWidth=\"100%\" sx={{ overflowX: 'auto' }}>\n <Typography sx={{ display: 'inline-flex' }}>{part1}</Typography>\n <AnimatedGradientTypography color1={xnsStartColor} color2={xnsEndColor} sx={{ display: 'inline-flex' }}>{xnsName}</AnimatedGradientTypography>\n <Typography sx={{ display: 'inline-flex' }}>{part3}</Typography>\n </Stack>\n )\n : (\n <Typography sx={{\n display: 'inline-flex', maxWidth: '100%', overflow: 'auto',\n }}\n >\n {shareUrl}\n </Typography>\n )}\n <CopyIconButton\n copiedLinkText={copiedLinkText}\n copyLinkText={copyLinkText}\n onClickError={onClickError}\n shareLinkName={shareLinkName}\n shareUrl={shareUrl}\n sx={{ display: 'inline-flex' }}\n uploadPayloads={uploadPayloads}\n />\n {error ? <Tooltip title={error.message}><Cancel color=\"error\" sx={{ display: 'inline-flex' }} /></Tooltip> : null}\n </Stack>\n )\n}\n","import { CopyAllRounded } from '@mui/icons-material'\nimport {\n type ButtonProps, CircularProgress, IconButton, Tooltip,\n} from '@mui/material'\nimport { forget } from '@xylabs/sdk-js'\nimport React, { useState } from 'react'\n\nimport type { ShareLinkProps } from './lib/index.ts'\n\nexport interface CopyIconButtonProps extends ButtonProps, ShareLinkProps {\n onClickError?: (error: Error) => void\n}\n\nexport const CopyIconButton: React.FC<CopyIconButtonProps> = ({\n copyLinkText, copiedLinkText, onClickError, shareLinkName, shareUrl, uploadPayloads, ...props\n}) => {\n const CopyLink = copyLinkText ?? 'Copy Link'\n const Copied = copiedLinkText ?? 'Copied!'\n\n const [copyTooltipTitle, setCopyTooltipTitle] = useState(CopyLink)\n const [loading, setLoading] = useState(false)\n\n const copyToClipboard = async (link?: string) => {\n if (link) {\n try {\n setLoading(true)\n await uploadPayloads?.()\n await navigator.clipboard.writeText(link)\n setCopyTooltipTitle(Copied)\n setTimeout(() => setCopyTooltipTitle(CopyLink), 2000)\n setLoading(false)\n } catch (e) {\n setLoading(false)\n const message = 'Error copying shareUrl to clipboard'\n console.error(message, e, link)\n onClickError?.(new Error(message))\n }\n } else {\n console.warn('tried to copy shareUrl before it was generated')\n }\n }\n\n return (\n <Tooltip title={copyTooltipTitle}>\n {loading\n ? (\n <IconButton>\n <CircularProgress size=\"24px\" />\n </IconButton>\n )\n : (\n <IconButton aria-label={`copy ${shareLinkName} link`} onClick={() => forget(copyToClipboard(shareUrl))} edge=\"end\" {...props}>\n <CopyAllRounded />\n </IconButton>\n )}\n </Tooltip>\n )\n}\n","import {\n keyframes, styled, Typography,\n} from '@mui/material'\nimport type React from 'react'\n\n/**\n * Start the animation at 100% to give the gradient a left to right effect\n */\nconst moveBg = keyframes(`\n 0% {\n background-position: 100% 0%;\n }\n 100% {\n background-position: 0% 0%;\n }\n`)\n\n/**\n * Adapted from - https://codepen.io/web-dot-dev/pen/vYrGPNE\n */\nexport const AnimatedGradientTypography: React.FC<\n React.ComponentProps<typeof Typography> & { color1?: string; color2?: string }\n> = styled(Typography, { name: 'AnimatedGradientTypography' })<{ color1?: string; color2?: string }>(({\n theme, color1, color2,\n}) => {\n return {\n // Set the color variables for the gradient\n '--color-one': color1 ?? theme.vars.palette.secondary.dark,\n '--color-two': color2 ?? theme.vars.palette.primary.light,\n // set the gradient so it has the same start and end color for looping effect\n 'background': `linear-gradient(\n .25turn,\n var(--color-one),\n var(--color-two),\n var(--color-one)\n )`,\n // Set the text color to transparent so the gradient shows through\n 'color': 'transparent',\n // Clip the background to the text shape\n 'backgroundClip': 'text',\n // Set the background size to 800% so we don't see the third color initially creating the looping effect\n 'backgroundSize': '800%',\n // Set the text to bold so the gradient is more visible\n 'fontWeight': 'bold',\n // Set the animation\n '@media (prefers-reduced-motion: no-preference)': {\n animationName: moveBg,\n animationDuration: '2s',\n animationIterationCount: 'infinite',\n },\n // reset for users that prefer reduced motion\n '@media (prefers-reduced-motion)': {\n background: 'none',\n color: theme.vars.palette.text.primary,\n },\n }\n})\n","export const splitAroundSubstring = (path: string, substring: string): [string, string, string] => {\n // Find the index of the substring\n const index = path.indexOf(substring)\n\n if (index === -1) {\n throw new Error(`XNS name \"${substring}\" not found in path.`)\n }\n\n // Extract the part before the substring\n const part1 = path.slice(0, index)\n\n // The substring itself is part2\n const part2 = substring\n\n // Extract the part after the substring\n const part3 = path.slice(index + substring.length)\n\n return [part1, part2, part3]\n}\n","import type { StandardTextFieldProps } from '@mui/material'\nimport { InputAdornment, TextField } from '@mui/material'\nimport React, { useCallback, useState } from 'react'\n\nimport { CopyIconButton } from './CopyIconButton.tsx'\n\nexport interface CopyLinkTextFieldProps extends StandardTextFieldProps {\n shareLinkName?: string\n shareUrl?: string\n}\n\nexport const CopyLinkTextField: React.FC<CopyLinkTextFieldProps> = ({\n shareLinkName, shareUrl, ...props\n}) => {\n const [error, setError] = useState<Error>()\n\n const onClickError = useCallback((error?: Error) => {\n setError(error)\n }, [])\n\n return (\n <TextField\n disabled\n error={!!error}\n helperText={error?.message}\n // to override the color that appears when it's a text field, only on dark mode\n sx={{ input: { WebkitTextFillColor: 'lightgray !important' } }}\n value={shareUrl}\n {...props}\n slotProps={{\n input: {\n endAdornment: (\n <InputAdornment position=\"end\">\n <CopyIconButton shareLinkName={shareLinkName} shareUrl={shareUrl} onClickError={onClickError} />\n </InputAdornment>\n ),\n },\n }}\n />\n )\n}\n","import type { DialogProps } from '@mui/material'\nimport {\n Dialog, DialogActions, DialogContent, DialogTitle, Stack, Typography,\n} from '@mui/material'\nimport { FlexCol, FlexGrowCol } from '@xylabs/react-flexbox'\nimport type { ComponentType, ReactNode } from 'react'\nimport React from 'react'\n\nexport interface ShareOutDialogProps extends DialogProps {\n ShareOutDialogActions?: ComponentType<{ onClose?: () => void }>\n cardImg?: ReactNode\n shareOutDialogContent?: ReactNode\n subtitle?: string\n title?: string\n}\n\nexport const ShareOutDialog: React.FC<ShareOutDialogProps> = ({\n ShareOutDialogActions, cardImg, open, onClose, shareOutDialogContent, subtitle, title, ...props\n}) => {\n const handleClose = () => {\n onClose?.('', 'backdropClick')\n }\n\n return (\n <Dialog onClose={onClose} open={open} {...props}>\n <DialogTitle>\n <Stack direction=\"row\" spacing={2}>\n <FlexGrowCol alignItems=\"flex-start\" width=\"60%\">\n <Typography variant=\"h5\">{title}</Typography>\n <Typography variant=\"body1\">\n {' '}\n {subtitle}\n </Typography>\n </FlexGrowCol>\n <FlexGrowCol alignItems=\"flex-end\" width=\"40%\">\n {cardImg}\n </FlexGrowCol>\n </Stack>\n </DialogTitle>\n <DialogContent>\n {shareOutDialogContent}\n <FlexCol alignItems=\"stretch\">\n </FlexCol>\n </DialogContent>\n {ShareOutDialogActions ? <DialogActions><ShareOutDialogActions onClose={handleClose} /></DialogActions> : null}\n </Dialog>\n )\n}\n","import { InfoOutlined } from '@mui/icons-material'\nimport {\n Tooltip, Typography, useTheme,\n} from '@mui/material'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nexport interface ShareOutExplanationProps {\n toolTipTitle?: string\n}\n\nexport const ShareOutExplanation: React.FC<ShareOutExplanationProps> = ({ toolTipTitle }) => {\n const theme = useTheme()\n // eslint-disable-next-line @stylistic/max-len\n const title = toolTipTitle ?? 'In order for your data to be publicly viewable, it needs to be saved to the XYO Network Public Archivist. Public data can be seen by your friends, and XYO can generate preview images for easier sharing on social media.'\n return (\n <FlexGrowRow alignItems=\"center\">\n <Typography variant=\"body2\" paddingRight={0.5}>\n What am I sharing?\n </Typography>\n <Tooltip\n title={title}\n placement=\"bottom\"\n >\n <InfoOutlined fontSize=\"small\" sx={{ fontSize: theme.typography.caption.fontSize }} />\n </Tooltip>\n </FlexGrowRow>\n )\n}\n","import type { ButtonProps } from '@mui/material'\nimport {\n Button, CircularProgress, styled,\n} from '@mui/material'\nimport React from 'react'\n\nexport interface GenerateShareLinkButtonProps extends ButtonProps {\n loading?: boolean\n}\n\nexport const GenerateShareLinkButton: React.FC<GenerateShareLinkButtonProps> = ({\n children = 'Generate My Share Link', loading, ...props\n}) => {\n return (\n <Button\n variant=\"contained\"\n startIcon={loading ? <StyledCircularProgress size=\"small\" /> : null}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nconst StyledCircularProgress = styled(CircularProgress, { name: 'StyledCircularProgress' })(({ theme }) => ({\n // ensure the color of the spinner is the same as the button color\n color: theme.vars.palette.primary.contrastText,\n height: '20px',\n opacity: '.87',\n width: '20px',\n}))\n","import { Typography } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nexport interface ShareOutHeadingFlexboxProps extends FlexBoxProps {\n shareLinkName?: string\n shareUrl?: string\n}\n\nexport const ShareOutHeadingFlexbox: React.FC<ShareOutHeadingFlexboxProps> = ({\n children, shareLinkName, shareUrl, ...props\n}) => {\n const GenerateShareLinkExplanation = \"When you generate your share link, we'll make a small amount of your data public so friends can check it out!\"\n\n return (\n <FlexGrowCol alignItems=\"flex-start\" paddingBottom={1} {...props}>\n <Typography variant=\"body1\" gutterBottom>\n <strong>Your Share Link</strong>\n </Typography>\n <Typography variant=\"body1\">\n {shareUrl ? `Use this link or the buttons below to share ${shareLinkName}` : GenerateShareLinkExplanation}\n </Typography>\n {children}\n </FlexGrowCol>\n )\n}\n","import { Typography } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { ErrorRender } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport React, { useState } from 'react'\n\nimport { FacebookSvgIcon, XTwitterSvgIcon } from '../icons/index.ts'\n\nexport interface SocialButtonsFlexboxProps extends FlexBoxProps {\n shareUrl?: string\n uploadPayloads?: () => Promise<void>\n}\n\nexport const SocialButtonsFlexbox: React.FC<SocialButtonsFlexboxProps> = ({\n shareUrl, uploadPayloads, ...props\n}) => {\n const [error, setError] = useState<Error>()\n const [xLoading, setXLoading] = useState(false)\n const [fbLoading, setFbLoading] = useState(false)\n\n const handleClick = async (openUrl: () => void, buttonName: 'x' | 'fb') => {\n const setLoading = buttonName === 'x' ? setXLoading : setFbLoading\n try {\n setLoading(true)\n await uploadPayloads?.()\n setLoading(false)\n openUrl()\n } catch (e) {\n setLoading(false)\n console.error('Error uploading payloads', e)\n setError(e as Error)\n }\n }\n\n return (\n <FlexGrowCol alignItems=\"stretch\" paddingTop={2} {...props}>\n <Typography variant=\"body1\" gutterBottom>\n <strong>Share on Social Media</strong>\n </Typography>\n <FlexRow\n gap={0.5}\n sx={{ flexDirection: { md: 'row', xs: 'column' } }}\n >\n {shareUrl\n ? (\n <>\n <ButtonEx\n variant=\"contained\"\n style={{ backgroundColor: '#000', color: '#fff' }}\n busy={xLoading}\n onClick={async () => {\n const openUrl = () => window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(shareUrl)}`)\n await handleClick(openUrl, 'x')\n }}\n startIcon={<XTwitterSvgIcon width=\"20px\" />}\n >\n Share on X (Twitter)\n </ButtonEx>\n <ButtonEx\n busy={fbLoading}\n variant=\"contained\"\n style={{ backgroundColor: '#4267b2', color: '#fff' }}\n onClick={async () => {\n const openUrl = () => window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}`)\n await handleClick(openUrl, 'fb')\n }}\n startIcon={<FacebookSvgIcon />}\n >\n Share on Facebook\n </ButtonEx>\n </>\n )\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AA,IACA,gBAAAA;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,KAAK;AAAA,QACL,IAAI,EAAE,eAAe,EAAE,IAAI,OAAO,IAAI,SAAS,EAAE;AAAA,QAEhD,qBAEK,gBAAAJ,MAAA,YACE;AAAA,0BAAAD;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,OAAO,EAAE,iBAAiB,QAAQ,OAAO,OAAO;AAAA,cAChD,MAAM;AAAA,cACN,SAAS,YAAY;AACnB,sBAAM,UAAU,MAAM,OAAO,KAAK,wCAAwC,mBAAmB,QAAQ,CAAC,EAAE;AACxG,sBAAM,YAAY,SAAS,GAAG;AAAA,cAChC;AAAA,cACA,WAAW,gBAAAN,MAAC,mBAAgB,OAAM,QAAO;AAAA,cAC1C;AAAA;AAAA,UAED;AAAA,UACA,gBAAAA;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,SAAQ;AAAA,cACR,OAAO,EAAE,iBAAiB,WAAW,OAAO,OAAO;AAAA,cACnD,SAAS,YAAY;AACnB,sBAAM,UAAU,MAAM,OAAO,KAAK,gDAAgD,mBAAmB,QAAQ,CAAC,EAAE;AAChH,sBAAM,YAAY,SAAS,IAAI;AAAA,cACjC;AAAA,cACA,WAAW,gBAAAN,MAAC,mBAAgB;AAAA,cAC7B;AAAA;AAAA,UAED;AAAA,WACF,IAEF;AAAA;AAAA,IACN;AAAA,IACA,gBAAAA,MAAC,eAAY,OAAc,OAAM,wBAAuB;AAAA,KAC1D;AAEJ;","names":["jsx","jsxs","createSvgIcon","jsx","jsx","useEffect","jsx","Tooltip","Typography","useState","useState","jsx","jsx","jsxs","useState","error","Typography","Tooltip","useCallback","useState","jsx","useState","useCallback","error","Stack","Typography","jsx","jsxs","Tooltip","Typography","FlexGrowRow","jsx","jsxs","CircularProgress","styled","jsx","Typography","FlexGrowCol","jsx","jsxs","Typography","ButtonEx","FlexGrowCol","FlexRow","useState","jsx","jsxs","useState","FlexGrowCol","Typography","FlexRow","ButtonEx"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/button/ShareButton.tsx", "../../src/icons/social/Facebook.tsx", "../../src/icons/social/XTwitter.tsx", "../../src/meta-server/dynamic-share/DynamicShareImage.tsx", "../../src/meta-server/live-share/HideParentsFlexbox.tsx", "../../src/out/CopyLinkStack.tsx", "../../src/out/CopyIconButton.tsx", "../../src/out/lib/AnimatedGradientTypography.tsx", "../../src/out/lib/splitAroundSubstring.ts", "../../src/out/CopyLinkTextField.tsx", "../../src/out/Dialog.tsx", "../../src/out/Explanation.tsx", "../../src/out/GenerateShareLinkButton.tsx", "../../src/out/HeadingFlexbox.tsx", "../../src/out/SocialButtonsFlexbox.tsx"],
4
+ "sourcesContent": ["import {\n Facebook as FacebookIcon, Share as ShareIcon,\n X as XIcon,\n} from '@mui/icons-material'\nimport type { PopoverProps } from '@mui/material'\nimport { Popover } from '@mui/material'\nimport type { ButtonExProps } from '@xylabs/react-button'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport React, {\n useEffect, useRef, useState,\n} from 'react'\n\nexport type ShareButtonProps = ButtonExProps & {\n prepared?: boolean\n shareLink?: string\n slot?: { popover?: PopoverProps }\n}\n\nexport const ShareButton: React.FC<ShareButtonProps> = ({\n prepared = true, shareLink, slot, ...props\n}) => {\n const [expanded, setExpanded] = useState(false)\n const anchorRef = useRef(null)\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)\n const link = shareLink ?? globalThis.location.href\n\n useEffect(() => {\n setAnchorEl(anchorRef.current)\n }, [])\n\n return (\n <FlexRow sx={{ gap: 1 }}>\n <ButtonEx\n variant=\"text\"\n size=\"small\"\n disabled={!prepared}\n onClick={() => {\n setExpanded(true)\n }}\n {...props}\n sx={[{ minWidth: 32 }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n <ShareIcon\n htmlColor=\"gray\"\n ref={anchorRef}\n sx={{ fontSize: 'small' }}\n />\n </ButtonEx>\n <Popover\n open={prepared ? expanded : false}\n anchorEl={anchorEl}\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n onClose={() => setExpanded(false)}\n transitionDuration={500}\n sx={{\n ml: 1, top: -4, ...slot?.popover?.sx,\n }}\n {...slot?.popover}\n >\n <FlexRow\n sx={{\n gap: 0.5,\n padding: 0.5,\n }}\n >\n <LinkEx\n onClick={() => {\n window.open(`https://x.com/intent/tweet?url=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n sx={{ lineHeight: 0 }}\n >\n <XIcon sx={{ fontSize: 'small' }} />\n </LinkEx>\n <LinkEx\n style={{ color: '#4267b2' }}\n onClick={() => {\n window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(link)}`)\n setExpanded(false)\n }}\n sx={{ lineHeight: 0 }}\n >\n <FacebookIcon sx={{ fontSize: 'small' }} />\n </LinkEx>\n </FlexRow>\n </Popover>\n </FlexRow>\n )\n}\n", "/* eslint-disable @stylistic/max-len */\nimport { createSvgIcon } from '@mui/material'\nimport React from 'react'\n\nexport const FacebookSvgIcon = createSvgIcon(\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"800\" width=\"1200\" viewBox=\"-204.79995 -341.33325 1774.9329 2047.9995\">\n <path d=\"M1365.333 682.667C1365.333 305.64 1059.693 0 682.667 0 305.64 0 0 305.64 0 682.667c0 340.738 249.641 623.16 576 674.373V880H402.667V682.667H576v-150.4c0-171.094 101.917-265.6 257.853-265.6 74.69 0 152.814 13.333 152.814 13.333v168h-86.083c-84.804 0-111.25 52.623-111.25 106.61v128.057h189.333L948.4 880H789.333v477.04c326.359-51.213 576-333.635 576-674.373\" fill=\"#1877f2\" />\n <path d=\"M948.4 880l30.267-197.333H789.333V554.609C789.333 500.623 815.78 448 900.584 448h86.083V280s-78.124-13.333-152.814-13.333c-155.936 0-257.853 94.506-257.853 265.6v150.4H402.667V880H576v477.04a687.805 687.805 0 00106.667 8.293c36.288 0 71.91-2.84 106.666-8.293V880H948.4\" fill=\"#fff\" />\n </svg>,\n 'Facebook',\n)\n", "/* eslint-disable @stylistic/max-len */\nimport { createSvgIcon } from '@mui/material'\nimport React from 'react'\n\nexport const XTwitterSvgIcon = createSvgIcon(\n <svg viewBox=\"0 0 1200 1227\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z\" fill=\"white\" />\n </svg>,\n 'XTwitterSvgIcon',\n)\n", "import type React from 'react'\n\n/**\n * The props for the DynamicShareImage component.\n */\nexport interface DynamicShareImageProps {\n /**\n * The URL of the share image for the page.\n */\n image: string\n}\n\n/**\n * Used in conjunction with the XY Meta Server to dynamically set the share image for a page.\n */\nexport const DynamicShareImage: React.FC<DynamicShareImageProps> = () => null\n", "import type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport type { PropsWithChildren } from 'react'\nimport React, { useEffect } from 'react'\n\nexport const HideParentsFlexbox: React.FC<PropsWithChildren & FlexBoxProps> = ({ children, ...props }) => {\n useEffect(() => {\n const style = document.createElement('style')\n document.head.append(style)\n style.innerHTML = `\n /** make all elements hidden */\n * {\n visibility: hidden;\n }\n\n /** move the preview area to the top of the page */\n #preview-area {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 9999;\n }\n\n /** make the preview area and all its children visible */\n #preview-area * {\n visibility: visible;\n }`\n\n return () => {\n style.remove()\n }\n }, [])\n\n return (\n <FlexGrowRow\n id=\"preview-area\"\n {...props}\n sx={[{\n alignItems: 'stretch',\n justifyContent: 'start',\n }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n {children}\n </FlexGrowRow>\n )\n}\n", "import { Cancel } from '@mui/icons-material'\nimport type { StackProps } from '@mui/material'\nimport {\n Stack,\n Tooltip,\n Typography,\n} from '@mui/material'\nimport React, {\n useCallback, useMemo, useState,\n} from 'react'\n\nimport { CopyIconButton } from './CopyIconButton.tsx'\nimport {\n AnimatedGradientTypography, type ShareLinkProps, splitAroundSubstring,\n} from './lib/index.ts'\n\nexport interface CopyLinkStackProps extends ShareLinkProps, StackProps {\n addToXnsName?: boolean\n copiedLinkText?: string\n copyLinkText?: string\n xnsEndColor?: string\n xnsStartColor?: string\n}\n\nexport const CopyLinkStack: React.FC<CopyLinkStackProps> = ({\n addToXnsName, copiedLinkText, copyLinkText, shareLinkName, shareUrl, xnsName: xnsNameProp, xnsEndColor, uploadPayloads, xnsStartColor, ...props\n}) => {\n const [error, setError] = useState<Error>()\n\n const onClickError = useCallback((error: Error) => {\n setError(error)\n }, [])\n\n const parsedXnsName = useMemo(() => {\n if (shareUrl && xnsNameProp && addToXnsName) {\n try {\n return splitAroundSubstring(shareUrl, xnsNameProp)\n } catch {\n return\n }\n }\n }, [addToXnsName, shareUrl, xnsNameProp])\n\n const [part1, xnsName, part3] = parsedXnsName || []\n\n return (\n <Stack\n direction=\"row\"\n {...props}\n sx={[{\n alignItems: 'center',\n gap: 0.25,\n }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n {xnsName && addToXnsName\n ? (\n <Stack\n direction=\"row\"\n sx={{\n maxWidth: '100%',\n overflowX: 'auto',\n }}\n >\n <Typography sx={{ display: 'inline-flex' }}>{part1}</Typography>\n <AnimatedGradientTypography color1={xnsStartColor} color2={xnsEndColor} sx={{ display: 'inline-flex' }}>{xnsName}</AnimatedGradientTypography>\n <Typography sx={{ display: 'inline-flex' }}>{part3}</Typography>\n </Stack>\n )\n : (\n <Typography sx={{\n display: 'inline-flex', maxWidth: '100%', overflow: 'auto',\n }}\n >\n {shareUrl}\n </Typography>\n )}\n <CopyIconButton\n copiedLinkText={copiedLinkText}\n copyLinkText={copyLinkText}\n onClickError={onClickError}\n shareLinkName={shareLinkName}\n shareUrl={shareUrl}\n sx={{ display: 'inline-flex' }}\n uploadPayloads={uploadPayloads}\n />\n {error ? <Tooltip title={error.message}><Cancel color=\"error\" sx={{ display: 'inline-flex' }} /></Tooltip> : null}\n </Stack>\n )\n}\n", "import { CopyAllRounded } from '@mui/icons-material'\nimport {\n type ButtonProps, CircularProgress, IconButton, Tooltip,\n} from '@mui/material'\nimport { forget } from '@xylabs/sdk-js'\nimport React, { useState } from 'react'\n\nimport type { ShareLinkProps } from './lib/index.ts'\n\nexport interface CopyIconButtonProps extends ButtonProps, ShareLinkProps {\n onClickError?: (error: Error) => void\n}\n\nexport const CopyIconButton: React.FC<CopyIconButtonProps> = ({\n copyLinkText, copiedLinkText, onClickError, shareLinkName, shareUrl, uploadPayloads, ...props\n}) => {\n const CopyLink = copyLinkText ?? 'Copy Link'\n const Copied = copiedLinkText ?? 'Copied!'\n\n const [copyTooltipTitle, setCopyTooltipTitle] = useState(CopyLink)\n const [loading, setLoading] = useState(false)\n\n const copyToClipboard = async (link?: string) => {\n if (link) {\n try {\n setLoading(true)\n await uploadPayloads?.()\n await navigator.clipboard.writeText(link)\n setCopyTooltipTitle(Copied)\n setTimeout(() => setCopyTooltipTitle(CopyLink), 2000)\n setLoading(false)\n } catch (e) {\n setLoading(false)\n const message = 'Error copying shareUrl to clipboard'\n console.error(message, e, link)\n onClickError?.(new Error(message))\n }\n } else {\n console.warn('tried to copy shareUrl before it was generated')\n }\n }\n\n return (\n <Tooltip title={copyTooltipTitle}>\n {loading\n ? (\n <IconButton>\n <CircularProgress size=\"24px\" />\n </IconButton>\n )\n : (\n <IconButton aria-label={`copy ${shareLinkName} link`} onClick={() => forget(copyToClipboard(shareUrl))} edge=\"end\" {...props}>\n <CopyAllRounded />\n </IconButton>\n )}\n </Tooltip>\n )\n}\n", "import {\n keyframes, styled, Typography,\n} from '@mui/material'\nimport type React from 'react'\n\n/**\n * Start the animation at 100% to give the gradient a left to right effect\n */\nconst moveBg = keyframes(`\n 0% {\n background-position: 100% 0%;\n }\n 100% {\n background-position: 0% 0%;\n }\n`)\n\n/**\n * Adapted from - https://codepen.io/web-dot-dev/pen/vYrGPNE\n */\nexport const AnimatedGradientTypography: React.FC<\n React.ComponentProps<typeof Typography> & { color1?: string; color2?: string }\n> = styled(Typography, { name: 'AnimatedGradientTypography' })<{ color1?: string; color2?: string }>(({\n theme, color1, color2,\n}) => {\n return {\n // Set the color variables for the gradient\n '--color-one': color1 ?? theme.vars.palette.secondary.dark,\n '--color-two': color2 ?? theme.vars.palette.primary.light,\n // set the gradient so it has the same start and end color for looping effect\n 'background': `linear-gradient(\n .25turn,\n var(--color-one),\n var(--color-two),\n var(--color-one)\n )`,\n // Set the text color to transparent so the gradient shows through\n 'color': 'transparent',\n // Clip the background to the text shape\n 'backgroundClip': 'text',\n // Set the background size to 800% so we don't see the third color initially creating the looping effect\n 'backgroundSize': '800%',\n // Set the text to bold so the gradient is more visible\n 'fontWeight': 'bold',\n // Set the animation\n '@media (prefers-reduced-motion: no-preference)': {\n animationName: moveBg,\n animationDuration: '2s',\n animationIterationCount: 'infinite',\n },\n // reset for users that prefer reduced motion\n '@media (prefers-reduced-motion)': {\n background: 'none',\n color: theme.vars.palette.text.primary,\n },\n }\n})\n", "export const splitAroundSubstring = (path: string, substring: string): [string, string, string] => {\n // Find the index of the substring\n const index = path.indexOf(substring)\n\n if (index === -1) {\n throw new Error(`XNS name \"${substring}\" not found in path.`)\n }\n\n // Extract the part before the substring\n const part1 = path.slice(0, index)\n\n // The substring itself is part2\n const part2 = substring\n\n // Extract the part after the substring\n const part3 = path.slice(index + substring.length)\n\n return [part1, part2, part3]\n}\n", "import type { StandardTextFieldProps } from '@mui/material'\nimport { InputAdornment, TextField } from '@mui/material'\nimport React, { useCallback, useState } from 'react'\n\nimport { CopyIconButton } from './CopyIconButton.tsx'\n\nexport interface CopyLinkTextFieldProps extends StandardTextFieldProps {\n shareLinkName?: string\n shareUrl?: string\n}\n\nexport const CopyLinkTextField: React.FC<CopyLinkTextFieldProps> = ({\n shareLinkName, shareUrl, ...props\n}) => {\n const [error, setError] = useState<Error>()\n\n const onClickError = useCallback((error?: Error) => {\n setError(error)\n }, [])\n\n return (\n <TextField\n disabled\n error={!!error}\n helperText={error?.message}\n // to override the color that appears when it's a text field, only on dark mode\n sx={{ input: { WebkitTextFillColor: 'lightgray !important' } }}\n value={shareUrl}\n {...props}\n slotProps={{\n input: {\n endAdornment: (\n <InputAdornment position=\"end\">\n <CopyIconButton shareLinkName={shareLinkName} shareUrl={shareUrl} onClickError={onClickError} />\n </InputAdornment>\n ),\n },\n }}\n />\n )\n}\n", "import type { DialogProps } from '@mui/material'\nimport {\n Dialog, DialogActions, DialogContent, DialogTitle, Stack, Typography,\n} from '@mui/material'\nimport { FlexCol, FlexGrowCol } from '@xylabs/react-flexbox'\nimport type { ComponentType, ReactNode } from 'react'\nimport React from 'react'\n\nexport interface ShareOutDialogProps extends DialogProps {\n ShareOutDialogActions?: ComponentType<{ onClose?: () => void }>\n cardImg?: ReactNode\n shareOutDialogContent?: ReactNode\n subtitle?: string\n title?: string\n}\n\nexport const ShareOutDialog: React.FC<ShareOutDialogProps> = ({\n ShareOutDialogActions, cardImg, open, onClose, shareOutDialogContent, subtitle, title, ...props\n}) => {\n const handleClose = () => {\n onClose?.('', 'backdropClick')\n }\n\n return (\n <Dialog onClose={onClose} open={open} {...props}>\n <DialogTitle>\n <Stack direction=\"row\" spacing={2}>\n <FlexGrowCol\n sx={{\n alignItems: 'flex-start',\n width: '60%',\n }}\n >\n <Typography variant=\"h5\">{title}</Typography>\n <Typography variant=\"body1\">\n {' '}\n {subtitle}\n </Typography>\n </FlexGrowCol>\n <FlexGrowCol\n sx={{\n alignItems: 'flex-end',\n width: '40%',\n }}\n >\n {cardImg}\n </FlexGrowCol>\n </Stack>\n </DialogTitle>\n <DialogContent>\n {shareOutDialogContent}\n <FlexCol sx={{ alignItems: 'stretch' }}>\n </FlexCol>\n </DialogContent>\n {ShareOutDialogActions ? <DialogActions><ShareOutDialogActions onClose={handleClose} /></DialogActions> : null}\n </Dialog>\n )\n}\n", "import { InfoOutlined } from '@mui/icons-material'\nimport {\n Tooltip, Typography, useTheme,\n} from '@mui/material'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nexport interface ShareOutExplanationProps {\n toolTipTitle?: string\n}\n\nexport const ShareOutExplanation: React.FC<ShareOutExplanationProps> = ({ toolTipTitle }) => {\n const theme = useTheme()\n // eslint-disable-next-line @stylistic/max-len\n const title = toolTipTitle ?? 'In order for your data to be publicly viewable, it needs to be saved to the XYO Network Public Archivist. Public data can be seen by your friends, and XYO can generate preview images for easier sharing on social media.'\n return (\n <FlexGrowRow sx={{ alignItems: 'center' }}>\n <Typography\n variant=\"body2\"\n sx={{ paddingRight: 0.5 }}\n >\n What am I sharing?\n </Typography>\n <Tooltip\n title={title}\n placement=\"bottom\"\n >\n <InfoOutlined\n fontSize=\"small\"\n sx={{ fontSize: theme.typography.caption.fontSize }}\n />\n </Tooltip>\n </FlexGrowRow>\n )\n}\n", "import type { ButtonProps } from '@mui/material'\nimport {\n Button, CircularProgress, styled,\n} from '@mui/material'\nimport React from 'react'\n\nexport interface GenerateShareLinkButtonProps extends ButtonProps {\n loading?: boolean\n}\n\nexport const GenerateShareLinkButton: React.FC<GenerateShareLinkButtonProps> = ({\n children = 'Generate My Share Link', loading, ...props\n}) => {\n return (\n <Button\n variant=\"contained\"\n startIcon={loading ? <StyledCircularProgress size=\"small\" /> : null}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nconst StyledCircularProgress = styled(CircularProgress, { name: 'StyledCircularProgress' })(({ theme }) => ({\n // ensure the color of the spinner is the same as the button color\n color: theme.vars.palette.primary.contrastText,\n height: '20px',\n opacity: '.87',\n width: '20px',\n}))\n", "import { Typography } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nexport interface ShareOutHeadingFlexboxProps extends FlexBoxProps {\n shareLinkName?: string\n shareUrl?: string\n}\n\nexport const ShareOutHeadingFlexbox: React.FC<ShareOutHeadingFlexboxProps> = ({\n children, shareLinkName, shareUrl, ...props\n}) => {\n const GenerateShareLinkExplanation = \"When you generate your share link, we'll make a small amount of your data public so friends can check it out!\"\n\n return (\n <FlexGrowCol\n {...props}\n sx={[{\n alignItems: 'flex-start',\n paddingBottom: 1,\n }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n <Typography variant=\"body1\" gutterBottom>\n <strong>Your Share Link</strong>\n </Typography>\n <Typography variant=\"body1\">\n {shareUrl ? `Use this link or the buttons below to share ${shareLinkName}` : GenerateShareLinkExplanation}\n </Typography>\n {children}\n </FlexGrowCol>\n )\n}\n", "import { Typography } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { ErrorRender } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport React, { useState } from 'react'\n\nimport { FacebookSvgIcon, XTwitterSvgIcon } from '../icons/index.ts'\n\nexport interface SocialButtonsFlexboxProps extends FlexBoxProps {\n shareUrl?: string\n uploadPayloads?: () => Promise<void>\n}\n\nexport const SocialButtonsFlexbox: React.FC<SocialButtonsFlexboxProps> = ({\n shareUrl, uploadPayloads, ...props\n}) => {\n const [error, setError] = useState<Error>()\n const [xLoading, setXLoading] = useState(false)\n const [fbLoading, setFbLoading] = useState(false)\n\n const handleClick = async (openUrl: () => void, buttonName: 'x' | 'fb') => {\n const setLoading = buttonName === 'x' ? setXLoading : setFbLoading\n try {\n setLoading(true)\n await uploadPayloads?.()\n setLoading(false)\n openUrl()\n } catch (e) {\n setLoading(false)\n console.error('Error uploading payloads', e)\n setError(e as Error)\n }\n }\n\n return (\n <FlexGrowCol\n {...props}\n sx={[{\n alignItems: 'stretch',\n paddingTop: 2,\n }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n <Typography variant=\"body1\" gutterBottom>\n <strong>Share on Social Media</strong>\n </Typography>\n <FlexRow\n sx={{\n gap: 0.5,\n flexDirection: { md: 'row', xs: 'column' },\n }}\n >\n {shareUrl\n ? (\n <>\n <ButtonEx\n variant=\"contained\"\n style={{ backgroundColor: '#000', color: '#fff' }}\n busy={xLoading}\n onClick={async () => {\n const openUrl = () => window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(shareUrl)}`)\n await handleClick(openUrl, 'x')\n }}\n startIcon={(\n <XTwitterSvgIcon sx={{ width: '20px' }} />\n )}\n >\n Share on X (Twitter)\n </ButtonEx>\n <ButtonEx\n busy={fbLoading}\n variant=\"contained\"\n style={{ backgroundColor: '#4267b2', color: '#fff' }}\n onClick={async () => {\n const openUrl = () => window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}`)\n await handleClick(openUrl, 'fb')\n }}\n startIcon={<FacebookSvgIcon />}\n >\n Share on Facebook\n </ButtonEx>\n </>\n )\n : null}\n </FlexRow>\n <ErrorRender error={error} scope=\"SocialButtonsFlexbox\" />\n </FlexGrowCol>\n )\n}\n"],
5
+ "mappings": ";AAAA;AAAA,EACE,YAAY;AAAA,EAAc,SAAS;AAAA,EACnC,KAAK;AAAA,OACA;AAEP,SAAS,eAAe;AAExB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EAAW;AAAA,EAAQ;AAAA,OACd;AAgCC,cAiBA,YAjBA;AAxBD,IAAM,cAA0C,CAAC;AAAA,EACtD,WAAW;AAAA,EAAM;AAAA,EAAW;AAAA,EAAM,GAAG;AACvC,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,YAAY,OAAO,IAAI;AAC7B,QAAM,CAAC,UAAU,WAAW,IAA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AA,kBACN,SAAQ;AAAA,kBACR,OAAO,EAAE,iBAAiB,WAAW,OAAO,OAAO;AAAA,kBACnD,SAAS,YAAY;AACnB,0BAAM,UAAU,MAAM,OAAO,KAAK,gDAAgD,mBAAmB,QAAQ,CAAC,EAAE;AAChH,0BAAM,YAAY,SAAS,IAAI;AAAA,kBACjC;AAAA,kBACA,WAAW,gBAAAN,MAAC,mBAAgB;AAAA,kBAC7B;AAAA;AAAA,cAED;AAAA,eACF,IAEF;AAAA;AAAA,QACN;AAAA,QACA,gBAAAA,MAAC,eAAY,OAAc,OAAM,wBAAuB;AAAA;AAAA;AAAA,EAC1D;AAEJ;",
6
+ "names": ["jsx", "jsxs", "createSvgIcon", "jsx", "useEffect", "jsx", "Tooltip", "Typography", "useState", "useState", "jsx", "jsx", "jsxs", "useState", "error", "Typography", "Tooltip", "useCallback", "useState", "jsx", "useState", "useCallback", "error", "Stack", "Typography", "jsx", "jsxs", "Tooltip", "Typography", "FlexGrowRow", "jsx", "jsxs", "CircularProgress", "styled", "jsx", "Typography", "FlexGrowCol", "jsx", "jsxs", "Typography", "ButtonEx", "FlexGrowCol", "FlexRow", "useState", "jsx", "jsxs", "useState", "FlexGrowCol", "Typography", "FlexRow", "ButtonEx"]
7
+ }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  /**
3
3
  * The props for the DynamicShareImage component.
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicShareImage.d.ts","sourceRoot":"","sources":["../../../../src/meta-server/dynamic-share/DynamicShareImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAM9D,CAAA"}
1
+ {"version":3,"file":"DynamicShareImage.d.ts","sourceRoot":"","sources":["../../../../src/meta-server/dynamic-share/DynamicShareImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAAc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"HideParentsFlexbox.d.ts","sourceRoot":"","sources":["../../../../src/meta-server/live-share/HideParentsFlexbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAoB,MAAM,OAAO,CAAA;AAExC,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG,YAAY,CAkCzE,CAAA"}
1
+ {"version":3,"file":"HideParentsFlexbox.d.ts","sourceRoot":"","sources":["../../../../src/meta-server/live-share/HideParentsFlexbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAoB,MAAM,OAAO,CAAA;AAExC,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG,YAAY,CAyCzE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CopyLinkStack.d.ts","sourceRoot":"","sources":["../../../src/out/CopyLinkStack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAM/C,OAAO,KAEN,MAAM,OAAO,CAAA;AAGd,OAAO,EACuB,KAAK,cAAc,EAChD,MAAM,gBAAgB,CAAA;AAEvB,MAAM,WAAW,kBAAmB,SAAQ,cAAc,EAAE,UAAU;IACpE,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAmDtD,CAAA"}
1
+ {"version":3,"file":"CopyLinkStack.d.ts","sourceRoot":"","sources":["../../../src/out/CopyLinkStack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAM/C,OAAO,KAEN,MAAM,OAAO,CAAA;AAGd,OAAO,EACuB,KAAK,cAAc,EAChD,MAAM,gBAAgB,CAAA;AAEvB,MAAM,WAAW,kBAAmB,SAAQ,cAAc,EAAE,UAAU;IACpE,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgEtD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/out/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAKhD,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,qBAAqB,CAAC,EAAE,aAAa,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAA;IAC/D,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,qBAAqB,CAAC,EAAE,SAAS,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+BxD,CAAA"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/out/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAKhD,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,qBAAqB,CAAC,EAAE,aAAa,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAA;IAC/D,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,qBAAqB,CAAC,EAAE,SAAS,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyCxD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Explanation.d.ts","sourceRoot":"","sources":["../../../src/out/Explanation.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,wBAAwB;IACvC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAiBlE,CAAA"}
1
+ {"version":3,"file":"Explanation.d.ts","sourceRoot":"","sources":["../../../src/out/Explanation.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,wBAAwB;IACvC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAuBlE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"HeadingFlexbox.d.ts","sourceRoot":"","sources":["../../../src/out/HeadingFlexbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,2BAA4B,SAAQ,YAAY;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAgBxE,CAAA"}
1
+ {"version":3,"file":"HeadingFlexbox.d.ts","sourceRoot":"","sources":["../../../src/out/HeadingFlexbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,2BAA4B,SAAQ,YAAY;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAsBxE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SocialButtonsFlexbox.d.ts","sourceRoot":"","sources":["../../../src/out/SocialButtonsFlexbox.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAmB,MAAM,OAAO,CAAA;AAIvC,MAAM,WAAW,yBAA0B,SAAQ,YAAY;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACrC;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAgEpE,CAAA"}
1
+ {"version":3,"file":"SocialButtonsFlexbox.d.ts","sourceRoot":"","sources":["../../../src/out/SocialButtonsFlexbox.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAmB,MAAM,OAAO,CAAA;AAIvC,MAAM,WAAW,yBAA0B,SAAQ,YAAY;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACrC;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA0EpE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/react-share",
3
- "version": "7.6.3",
3
+ "version": "8.0.1",
4
4
  "description": "Common React library for all XYO projects that use React",
5
5
  "keywords": [
6
6
  "xyo",
@@ -41,55 +41,53 @@
41
41
  "README.md"
42
42
  ],
43
43
  "devDependencies": {
44
- "@mui/icons-material": "^7.3.11",
45
- "@mui/material": "^7.3.11",
44
+ "@mui/icons-material": "^9.0.1",
45
+ "@mui/material": "^9.0.1",
46
46
  "@opentelemetry/api": "^1.9.1",
47
47
  "@opentelemetry/sdk-trace-base": "^2.7.1",
48
- "@storybook/react-vite": "~10.3.6",
48
+ "@storybook/react-vite": "~10.4.0",
49
49
  "@types/react": "^19.2.14",
50
- "@types/react-helmet": "~6.1.11",
51
- "@xylabs/pixel": "~5.1.2",
52
- "@xylabs/react-button": "~7.2.4",
53
- "@xylabs/react-error": "~7.2.4",
54
- "@xylabs/react-flexbox": "~7.2.4",
55
- "@xylabs/react-link": "~7.2.4",
56
- "@xylabs/sdk-js": "^5.1.2",
57
- "@xylabs/toolchain": "~7.13.15",
58
- "@xylabs/tsconfig": "^7.13.15",
59
- "@xylabs/tsconfig-dom": "^7.13.15",
60
- "@xylabs/tsconfig-react": "~7.13.15",
50
+ "@xylabs/pixel": "~5.1.3",
51
+ "@xylabs/react-button": "~8.0.3",
52
+ "@xylabs/react-error": "~8.0.3",
53
+ "@xylabs/react-flexbox": "~8.0.3",
54
+ "@xylabs/react-link": "~8.0.3",
55
+ "@xylabs/sdk-js": "^5.1.3",
56
+ "@xylabs/toolchain": "~8.0.6",
57
+ "@xylabs/tsconfig": "^8.0.6",
58
+ "@xylabs/tsconfig-dom": "^8.0.6",
59
+ "@xylabs/tsconfig-react": "~8.0.6",
61
60
  "async-mutex": "^0.5.0",
62
61
  "bn.js": "^5.2.3",
63
62
  "bowser": "^2.14.1",
64
63
  "buffer": "^6.0.3",
65
64
  "chalk": "^5.6.2",
66
- "eslint": "^10.3.0",
65
+ "eslint": "^10.4.0",
67
66
  "ethers": "^6.16.0",
68
67
  "fast-deep-equal": "~3.1.3",
69
- "js-cookie": "~3.0.5",
70
- "mixpanel-browser": "~2.78.0",
68
+ "js-cookie": "~3.0.6",
69
+ "mixpanel-browser": "~2.79.0",
71
70
  "pako": "^2.1.0",
72
71
  "query-string": "~9.3.1",
73
72
  "react": "^19.2.6",
74
73
  "react-dom": "^19.2.6",
75
- "react-helmet": "~6.1.0",
76
- "react-router-dom": "^7.15.0",
74
+ "react-router-dom": "^7.15.1",
77
75
  "spark-md5": "~3.0.2",
78
- "storybook": "^10.3.6",
79
- "typescript": "^5.9.3",
80
- "vite": "^8.0.10",
76
+ "storybook": "^10.4.0",
77
+ "typescript": "^6.0.3",
78
+ "vite": "^8.0.13",
81
79
  "zod": "^4.4.3"
82
80
  },
83
81
  "peerDependencies": {
84
- "@mui/icons-material": "^7.3",
85
- "@mui/material": "^7.3",
82
+ "@mui/icons-material": "^9.0",
83
+ "@mui/material": "^9.0",
86
84
  "@opentelemetry/api": "^1.9",
87
85
  "@opentelemetry/sdk-trace-base": "^2.7",
88
86
  "@xylabs/pixel": "~5.1",
89
- "@xylabs/react-button": "~7.2",
90
- "@xylabs/react-error": "~7.2",
91
- "@xylabs/react-flexbox": "~7.2",
92
- "@xylabs/react-link": "~7.2",
87
+ "@xylabs/react-button": "~8.0",
88
+ "@xylabs/react-error": "~8.0",
89
+ "@xylabs/react-flexbox": "~8.0",
90
+ "@xylabs/react-link": "~8.0",
93
91
  "@xylabs/sdk-js": "^5.1",
94
92
  "async-mutex": "^0.5",
95
93
  "bn.js": "^5.2",
@@ -99,12 +97,11 @@
99
97
  "ethers": "^6.16",
100
98
  "fast-deep-equal": "~3.1",
101
99
  "js-cookie": "~3.0",
102
- "mixpanel-browser": "~2.78",
100
+ "mixpanel-browser": "~2.79",
103
101
  "pako": "^2.1",
104
102
  "query-string": "~9.3",
105
103
  "react": "^19.2",
106
104
  "react-dom": "^19.2",
107
- "react-helmet": "~6.1",
108
105
  "react-router-dom": "^7.15",
109
106
  "spark-md5": "~3.0",
110
107
  "zod": "^4.4"