@ai-matrx/sharing 0.1.0 → 0.1.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.1.1
4
4
 
5
5
  - **"Can't remove it" is a summon overlay (X3).** `offerOwnerChoices` / `ensureRemovable` open `CANT_REMOVE_DIALOG` (`"cantRemoveDialog"`) through the host's overlay doors and await summon's `requestOverlay`; new `requestCantRemove(request): Promise<"hidden" | "closed">` (one screen per record). Removed: `cantRemoveOpener` (kit opener), `CantRemoveDialogHostBody`, the `ensureDialogHosts` env field. New env field `overlays: { open(id, instanceId, data), close(id, instanceId) }`; new public module `./access/react/cantRemoveDialog.render`. **Consumer action:** pass `overlays` to `configureAccessUi` (dispatch summon open/close), register overlay `cantRemoveDialog` with that render; matrx-frontend's own copy (`features/access-gate/cant-remove/*`) then goes.
6
6
  - **Reconciled with the web's copies (2026-10-21).** Ported the web's changes made after the sheet moved: `GuestBadge` (a person outside the thing's organization is marked Guest in the share list; `PermissionWithDetails.grantedToUser.isGuest` parsed from `get_resource_permissions`), `WhoCouldSeeOn` (a record owner asks who could see it at a past moment, `custom.who_could_see_on`) shown in the share dialog for records, and the registry's display labels (Sending mailbox, Applet, Flashcard Deck, Quiz session, Cloud document, Contact, Form, Google file).
@@ -13,3 +13,4 @@ Skeleton release: the name's sections exist (`/core`, `/react`) and export nothi
13
13
  ### Consumer action
14
14
 
15
15
  None. Do not adopt until a unit ships the API.
16
+
@@ -425,7 +425,7 @@ function LevelChoice({
425
425
  "aria-pressed": active,
426
426
  onClick,
427
427
  className: [
428
- "rounded-full border px-3 py-1 text-xs font-medium transition-colors",
428
+ "whitespace-nowrap rounded-full border px-3 py-1 text-xs font-medium transition-colors",
429
429
  active ? "border-primary bg-primary/10 text-primary-ink" : "border-border bg-background text-muted-foreground hover:bg-accent"
430
430
  ].join(" "),
431
431
  children: label
@@ -2421,8 +2421,6 @@ function EmptyState({ box }) {
2421
2421
  function AccessRequestsSurface() {
2422
2422
  const ui = useAccessUi();
2423
2423
  const { toast, confirm } = ui;
2424
- const NAV_ITEM_SELECTED = ui.navItemClasses.selected;
2425
- const NAV_ITEM_UNSELECTED = ui.navItemClasses.unselected;
2426
2424
  const [box, setBox] = (0, import_react17.useState)(() => boxFromParam(ui.searchParam("box")));
2427
2425
  const currentUserId = ui.useCurrentUser().id;
2428
2426
  const [rows, setRows] = (0, import_react17.useState)({
@@ -2530,24 +2528,10 @@ function AccessRequestsSurface() {
2530
2528
  "Request withdrawn."
2531
2529
  );
2532
2530
  }
2533
- const tab = (target, label, count) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2534
- "button",
2535
- {
2536
- type: "button",
2537
- onClick: () => setBox(target),
2538
- "aria-current": box === target ? "page" : void 0,
2539
- className: (0, import_design_system12.cn)(
2540
- "inline-flex items-center gap-1.5 whitespace-nowrap rounded-full px-3 py-1 text-xs transition-colors",
2541
- box === target ? NAV_ITEM_SELECTED : NAV_ITEM_UNSELECTED
2542
- ),
2543
- children: [
2544
- target === "inbox" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.Inbox, { className: "h-3.5 w-3.5", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.Send, { className: "h-3.5 w-3.5", "aria-hidden": true }),
2545
- label,
2546
- count > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_design_system12.Badge, { className: "pointer-events-none h-4 min-w-[16px] border-0 bg-primary px-1 text-[9px] font-semibold text-primary-foreground hover:bg-primary", children: count > 99 ? "99+" : count })
2547
- ]
2548
- },
2549
- target
2550
- );
2531
+ const tabLabel = (target, label) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
2532
+ target === "inbox" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.Inbox, { className: "h-3.5 w-3.5", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.Send, { className: "h-3.5 w-3.5", "aria-hidden": true }),
2533
+ label
2534
+ ] });
2551
2535
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "mx-auto w-full max-w-3xl", children: [
2552
2536
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "mb-3 flex items-center justify-between gap-2", children: [
2553
2537
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "hidden items-center gap-1.5 text-sm font-medium sm:inline-flex", children: [
@@ -2555,10 +2539,18 @@ function AccessRequestsSurface() {
2555
2539
  "Access requests"
2556
2540
  ] }),
2557
2541
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
2558
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "matrx-glass-thin-border inline-flex items-center gap-1 rounded-full p-1", children: [
2559
- tab("inbox", "To me", inboxCount),
2560
- tab("sent", "I sent", sentPending)
2561
- ] }),
2542
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2543
+ import_controls11.SegmentedControl,
2544
+ {
2545
+ "aria-label": "Request box",
2546
+ value: box,
2547
+ onValueChange: setBox,
2548
+ data: [
2549
+ { value: "inbox", label: tabLabel("inbox", "To me"), count: inboxCount > 0 ? inboxCount : null },
2550
+ { value: "sent", label: tabLabel("sent", "I sent"), count: sentPending > 0 ? sentPending : null }
2551
+ ]
2552
+ }
2553
+ ),
2562
2554
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2563
2555
  import_buttons.RefreshCwTapButton,
2564
2556
  {