@fluid-app/portal-sdk 0.1.184 → 0.1.186

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 (25) hide show
  1. package/dist/{PortalContentApiProvider-C5BcaBSL.mjs → PortalContentApiProvider-B8tHeIDR.mjs} +100 -95
  2. package/dist/PortalContentApiProvider-B8tHeIDR.mjs.map +1 -0
  3. package/dist/{PortalContentApiProvider-eSOgc4Nv.cjs → PortalContentApiProvider-D6hzQ1aL.cjs} +105 -94
  4. package/dist/PortalContentApiProvider-D6hzQ1aL.cjs.map +1 -0
  5. package/dist/{ProductsScreen-C2mx-086.cjs → ProductsScreen-C8RdjP3N.cjs} +2 -2
  6. package/dist/{ProductsScreen-CIT--Mnq.mjs → ProductsScreen-CGkz7PDA.mjs} +4 -2
  7. package/dist/{ProductsScreen-CJPwyXvT.cjs → ProductsScreen-MVCgkjrh.cjs} +2 -2
  8. package/dist/{ProductsScreen-CJPwyXvT.cjs.map → ProductsScreen-MVCgkjrh.cjs.map} +1 -1
  9. package/dist/{ProductsScreen-P4n3OFln.mjs → ProductsScreen-oMPbhDAd.mjs} +2 -2
  10. package/dist/{ProductsScreen-P4n3OFln.mjs.map → ProductsScreen-oMPbhDAd.mjs.map} +1 -1
  11. package/dist/{ShareablesScreen-C_KC7Ey1.cjs → ShareablesScreen-BxUL0r-6.cjs} +2 -2
  12. package/dist/{ShareablesScreen-BLNcb2M-.mjs → ShareablesScreen-Ci65hGFM.mjs} +4 -2
  13. package/dist/{ShareablesScreen-CBrJ8Vzm.cjs → ShareablesScreen-DIo7EMlA.cjs} +33 -13
  14. package/dist/ShareablesScreen-DIo7EMlA.cjs.map +1 -0
  15. package/dist/{ShareablesScreen-BII-fIRD.mjs → ShareablesScreen-IMOvttqL.mjs} +33 -13
  16. package/dist/ShareablesScreen-IMOvttqL.mjs.map +1 -0
  17. package/dist/index.cjs +7 -7
  18. package/dist/index.d.cts.map +1 -1
  19. package/dist/index.d.mts.map +1 -1
  20. package/dist/index.mjs +7 -7
  21. package/package.json +10 -10
  22. package/dist/PortalContentApiProvider-C5BcaBSL.mjs.map +0 -1
  23. package/dist/PortalContentApiProvider-eSOgc4Nv.cjs.map +0 -1
  24. package/dist/ShareablesScreen-BII-fIRD.mjs.map +0 -1
  25. package/dist/ShareablesScreen-CBrJ8Vzm.cjs.map +0 -1
@@ -841,12 +841,13 @@ function ShareLinkSection({ shareLink, loading, displayTitle, isVideo, relateabl
841
841
  return;
842
842
  }
843
843
  if (onMySiteShare) try {
844
+ await onMySiteShare({
845
+ shareLink,
846
+ relateable_id: relateableId,
847
+ relateable_type: relateableType
848
+ });
844
849
  showToast({
845
- title: (await onMySiteShare({
846
- shareLink,
847
- relateable_id: relateableId,
848
- relateable_type: relateableType
849
- })).is_favorited ? "Added to MySite" : "Removed from MySite",
850
+ title: "Shared to MySite",
850
851
  type: "success"
851
852
  });
852
853
  } catch (error) {
@@ -1667,89 +1668,6 @@ function MediaDetailScreen({ mediaId, onNavigate: _onNavigate, onBack }) {
1667
1668
  });
1668
1669
  }
1669
1670
  //#endregion
1670
- //#region ../../file-picker/ui/src/context/FilePickerApiContext.tsx
1671
- const FilePickerApiContext = createContext(null);
1672
- function FilePickerApiProvider({ api, children }) {
1673
- return /* @__PURE__ */ jsx(FilePickerApiContext.Provider, {
1674
- value: api,
1675
- children
1676
- });
1677
- }
1678
- function useFilePickerApi() {
1679
- const ctx = useContext(FilePickerApiContext);
1680
- if (!ctx) throw new Error("useFilePickerApi must be used within a FilePickerApiProvider");
1681
- return ctx;
1682
- }
1683
- //#endregion
1684
- //#region ../../file-picker/ui/src/context/FilePickerContext.tsx
1685
- const FilePickerContext = createContext(null);
1686
- function FilePickerProvider({ children, value }) {
1687
- return /* @__PURE__ */ jsx(FilePickerContext.Provider, {
1688
- value,
1689
- children
1690
- });
1691
- }
1692
- function useFilePickerContext() {
1693
- const ctx = useContext(FilePickerContext);
1694
- if (!ctx) throw new Error("useFilePickerContext must be used within a FilePickerProvider");
1695
- return ctx;
1696
- }
1697
- //#endregion
1698
- //#region ../../file-picker/ui/src/utils/brand-icons.tsx
1699
- function GoogleIcon({ className }) {
1700
- return /* @__PURE__ */ jsxs("svg", {
1701
- className,
1702
- viewBox: "0 0 24 24",
1703
- fill: "currentColor",
1704
- children: [
1705
- /* @__PURE__ */ jsx("path", { d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" }),
1706
- /* @__PURE__ */ jsx("path", { d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }),
1707
- /* @__PURE__ */ jsx("path", { d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }),
1708
- /* @__PURE__ */ jsx("path", { d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" })
1709
- ]
1710
- });
1711
- }
1712
- function InstagramIcon({ className }) {
1713
- return /* @__PURE__ */ jsx("svg", {
1714
- className,
1715
- viewBox: "0 0 24 24",
1716
- fill: "currentColor",
1717
- children: /* @__PURE__ */ jsx("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 0 0 0-12.324zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm6.406-11.845a1.44 1.44 0 1 0 0 2.881 1.44 1.44 0 0 0 0-2.881z" })
1718
- });
1719
- }
1720
- function FacebookIcon({ className }) {
1721
- return /* @__PURE__ */ jsx("svg", {
1722
- className,
1723
- viewBox: "0 0 24 24",
1724
- fill: "currentColor",
1725
- children: /* @__PURE__ */ jsx("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" })
1726
- });
1727
- }
1728
- function TiktokIcon({ className }) {
1729
- return /* @__PURE__ */ jsx("svg", {
1730
- className,
1731
- viewBox: "0 0 24 24",
1732
- fill: "currentColor",
1733
- children: /* @__PURE__ */ jsx("path", { d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z" })
1734
- });
1735
- }
1736
- function DropboxIcon({ className }) {
1737
- return /* @__PURE__ */ jsx("svg", {
1738
- className,
1739
- viewBox: "0 0 24 24",
1740
- fill: "currentColor",
1741
- children: /* @__PURE__ */ jsx("path", { d: "M12 6.13L6 10.13l6 4-6 4-6-4 6-4-6-4 6-4 6 4zm0 0l6-4 6 4-6 4 6 4-6 4-6-4 6-4-6-4zm0 16.74l-6-4 6-4 6 4-6 4z" })
1742
- });
1743
- }
1744
- function UnsplashIcon({ className }) {
1745
- return /* @__PURE__ */ jsx("svg", {
1746
- className,
1747
- viewBox: "0 0 24 24",
1748
- fill: "currentColor",
1749
- children: /* @__PURE__ */ jsx("path", { d: "M7.5 6.75V0h9v6.75h-9zm9 3.75H24V24H0V10.5h7.5v6.75h9V10.5z" })
1750
- });
1751
- }
1752
- //#endregion
1753
1671
  //#region ../../file-picker/core/src/query-keys.ts
1754
1672
  const damQueryKeys = {
1755
1673
  all: ["dam"],
@@ -1761,6 +1679,15 @@ const damQueryKeys = {
1761
1679
  ]
1762
1680
  };
1763
1681
  //#endregion
1682
+ //#region ../../file-picker/core/src/file-picker-api-context.ts
1683
+ const FilePickerApiContext = createContext(null);
1684
+ const FilePickerApiProvider$1 = FilePickerApiContext.Provider;
1685
+ function useFilePickerApi() {
1686
+ const api = useContext(FilePickerApiContext);
1687
+ if (!api) throw new Error("useFilePickerApi must be used within a FilePickerApiProvider");
1688
+ return api;
1689
+ }
1690
+ //#endregion
1764
1691
  //#region ../../file-picker/core/src/schemas/dam.ts
1765
1692
  const damVariantSchema = z.object({
1766
1693
  id: z.string(),
@@ -2594,6 +2521,83 @@ function getSanitizedAssetName(filename) {
2594
2521
  return sanitizedName;
2595
2522
  }
2596
2523
  //#endregion
2524
+ //#region ../../file-picker/ui/src/context/FilePickerApiContext.tsx
2525
+ function FilePickerApiProvider({ api, children }) {
2526
+ return /* @__PURE__ */ jsx(FilePickerApiProvider$1, {
2527
+ value: api,
2528
+ children
2529
+ });
2530
+ }
2531
+ //#endregion
2532
+ //#region ../../file-picker/ui/src/context/FilePickerContext.tsx
2533
+ const FilePickerContext = createContext(null);
2534
+ function FilePickerProvider({ children, value }) {
2535
+ return /* @__PURE__ */ jsx(FilePickerContext.Provider, {
2536
+ value,
2537
+ children
2538
+ });
2539
+ }
2540
+ function useFilePickerContext() {
2541
+ const ctx = useContext(FilePickerContext);
2542
+ if (!ctx) throw new Error("useFilePickerContext must be used within a FilePickerProvider");
2543
+ return ctx;
2544
+ }
2545
+ //#endregion
2546
+ //#region ../../file-picker/ui/src/utils/brand-icons.tsx
2547
+ function GoogleIcon({ className }) {
2548
+ return /* @__PURE__ */ jsxs("svg", {
2549
+ className,
2550
+ viewBox: "0 0 24 24",
2551
+ fill: "currentColor",
2552
+ children: [
2553
+ /* @__PURE__ */ jsx("path", { d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" }),
2554
+ /* @__PURE__ */ jsx("path", { d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }),
2555
+ /* @__PURE__ */ jsx("path", { d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }),
2556
+ /* @__PURE__ */ jsx("path", { d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" })
2557
+ ]
2558
+ });
2559
+ }
2560
+ function InstagramIcon({ className }) {
2561
+ return /* @__PURE__ */ jsx("svg", {
2562
+ className,
2563
+ viewBox: "0 0 24 24",
2564
+ fill: "currentColor",
2565
+ children: /* @__PURE__ */ jsx("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 0 0 0-12.324zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm6.406-11.845a1.44 1.44 0 1 0 0 2.881 1.44 1.44 0 0 0 0-2.881z" })
2566
+ });
2567
+ }
2568
+ function FacebookIcon({ className }) {
2569
+ return /* @__PURE__ */ jsx("svg", {
2570
+ className,
2571
+ viewBox: "0 0 24 24",
2572
+ fill: "currentColor",
2573
+ children: /* @__PURE__ */ jsx("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" })
2574
+ });
2575
+ }
2576
+ function TiktokIcon({ className }) {
2577
+ return /* @__PURE__ */ jsx("svg", {
2578
+ className,
2579
+ viewBox: "0 0 24 24",
2580
+ fill: "currentColor",
2581
+ children: /* @__PURE__ */ jsx("path", { d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z" })
2582
+ });
2583
+ }
2584
+ function DropboxIcon({ className }) {
2585
+ return /* @__PURE__ */ jsx("svg", {
2586
+ className,
2587
+ viewBox: "0 0 24 24",
2588
+ fill: "currentColor",
2589
+ children: /* @__PURE__ */ jsx("path", { d: "M12 6.13L6 10.13l6 4-6 4-6-4 6-4-6-4 6-4 6 4zm0 0l6-4 6 4-6 4 6 4-6 4-6-4 6-4-6-4zm0 16.74l-6-4 6-4 6 4-6 4z" })
2590
+ });
2591
+ }
2592
+ function UnsplashIcon({ className }) {
2593
+ return /* @__PURE__ */ jsx("svg", {
2594
+ className,
2595
+ viewBox: "0 0 24 24",
2596
+ fill: "currentColor",
2597
+ children: /* @__PURE__ */ jsx("path", { d: "M7.5 6.75V0h9v6.75h-9zm9 3.75H24V24H0V10.5h7.5v6.75h9V10.5z" })
2598
+ });
2599
+ }
2600
+ //#endregion
2597
2601
  //#region ../../file-picker/ui/src/hooks/use-debounced-search.ts
2598
2602
  const useDebouncedSearch = (delay = 300) => {
2599
2603
  const [searchQuery, setSearchQuery] = useState("");
@@ -9867,23 +9871,24 @@ function PortalContentApiProvider({ children }) {
9867
9871
  const ctx = useMemo(() => ({
9868
9872
  productsApi,
9869
9873
  playlistsAdapter,
9870
- mediaProductsAdapter,
9871
- filePickerApi
9874
+ mediaProductsAdapter
9872
9875
  }), [
9873
9876
  productsApi,
9874
9877
  playlistsAdapter,
9875
- mediaProductsAdapter,
9876
- filePickerApi
9878
+ mediaProductsAdapter
9877
9879
  ]);
9878
9880
  return /* @__PURE__ */ jsx(ContentContext.Provider, {
9879
9881
  value: ctx,
9880
9882
  children: /* @__PURE__ */ jsx(ShareablesApiProvider, {
9881
9883
  value: contentApi,
9882
- children
9884
+ children: /* @__PURE__ */ jsx(FilePickerApiProvider$1, {
9885
+ value: filePickerApi,
9886
+ children
9887
+ })
9883
9888
  })
9884
9889
  });
9885
9890
  }
9886
9891
  //#endregion
9887
- export { ShareablesApp as a, ProductsApp as i, usePortalContentContext as n, ShareablesUIProvider as o, toggleFavorite as r, ShareablesCoreProvider as s, PortalContentApiProvider as t };
9892
+ export { ShareablesApp as a, ShareablesCoreProvider as c, ProductsApp as i, usePortalContentContext as n, useFilePickerApi as o, toggleFavorite as r, ShareablesUIProvider as s, PortalContentApiProvider as t };
9888
9893
 
9889
- //# sourceMappingURL=PortalContentApiProvider-C5BcaBSL.mjs.map
9894
+ //# sourceMappingURL=PortalContentApiProvider-B8tHeIDR.mjs.map