@ai-matrx/sharing 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.js CHANGED
@@ -4533,8 +4533,26 @@ function DefaultCopyButtons(props) {
4533
4533
  }
4534
4534
  );
4535
4535
  }
4536
+ var announced = /* @__PURE__ */ new Set();
4537
+ function announceStandIn(port) {
4538
+ if (announced.has(port)) return;
4539
+ announced.add(port);
4540
+ console.warn(
4541
+ `[share] The share sheet is using its built-in stand-in for "${port}": the host did not pass it, so that part of the sheet is absent. Pass it with configureShareSheetUi({ ${port} }).`
4542
+ );
4543
+ }
4544
+ function StandIn({ port }) {
4545
+ useEffect(() => announceStandIn(port), [port]);
4546
+ return /* @__PURE__ */ jsx("span", { hidden: true, "data-share-sheet-host": "unconfigured", "data-share-sheet-port": port });
4547
+ }
4536
4548
  function DefaultErrorMenu(_props) {
4537
- return null;
4549
+ return /* @__PURE__ */ jsx(StandIn, { port: "ErrorAlchemyMenu" });
4550
+ }
4551
+ function DefaultPageCaptureButton(_props) {
4552
+ return /* @__PURE__ */ jsx(StandIn, { port: "PageCaptureButton" });
4553
+ }
4554
+ function DefaultEntityDoorControls(_props) {
4555
+ return /* @__PURE__ */ jsx(StandIn, { port: "EntityDoorControls" });
4538
4556
  }
4539
4557
  function DefaultInfoHint(props) {
4540
4558
  return /* @__PURE__ */ jsx("span", { title: String(props.text ?? ""), "aria-label": String(props.label ?? "More info"), className: "cursor-help text-muted-foreground", children: "\u24D8" });
@@ -4644,14 +4662,23 @@ var DEFAULTS = {
4644
4662
  useUserConnections: useDefaultConnections,
4645
4663
  confirm: (o) => kitConfirm(o),
4646
4664
  CopyButtons: DefaultCopyButtons,
4647
- csvExportItem: () => null,
4648
- jsonExportItem: () => null,
4649
- usePageCapture: () => void 0,
4665
+ csvExportItem: () => {
4666
+ announceStandIn("csvExportItem");
4667
+ return null;
4668
+ },
4669
+ jsonExportItem: () => {
4670
+ announceStandIn("jsonExportItem");
4671
+ return null;
4672
+ },
4673
+ usePageCapture: () => {
4674
+ announceStandIn("usePageCapture");
4675
+ return void 0;
4676
+ },
4650
4677
  dialogCapture: (input) => input,
4651
- PageCaptureButton: () => null,
4678
+ PageCaptureButton: DefaultPageCaptureButton,
4652
4679
  ErrorAlchemyMenu: DefaultErrorMenu,
4653
4680
  InfoHint: DefaultInfoHint,
4654
- EntityDoorControls: () => null,
4681
+ EntityDoorControls: DefaultEntityDoorControls,
4655
4682
  EntityRef: DefaultEntityRef,
4656
4683
  UserAvatarDisplay: DefaultUserAvatar,
4657
4684
  ConnectionsReadNotice: DefaultConnectionsNotice,