jazz-tools 0.18.29 → 0.18.31

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 (107) hide show
  1. package/.svelte-kit/__package__/media/image.svelte +7 -4
  2. package/.svelte-kit/__package__/media/image.svelte.d.ts.map +1 -1
  3. package/.svelte-kit/__package__/media/image.types.d.ts +1 -0
  4. package/.svelte-kit/__package__/media/image.types.d.ts.map +1 -1
  5. package/.svelte-kit/__package__/tests/media/image.svelte.test.js +63 -0
  6. package/.turbo/turbo-build.log +60 -60
  7. package/CHANGELOG.md +26 -0
  8. package/dist/better-auth/auth/client.d.ts +1 -1
  9. package/dist/better-auth/auth/server.d.ts +1 -1
  10. package/dist/better-auth/auth/server.d.ts.map +1 -1
  11. package/dist/better-auth/auth/server.js.map +1 -1
  12. package/dist/better-auth/database-adapter/index.d.ts +3 -3
  13. package/dist/better-auth/database-adapter/index.d.ts.map +1 -1
  14. package/dist/better-auth/database-adapter/index.js +6 -2
  15. package/dist/better-auth/database-adapter/index.js.map +1 -1
  16. package/dist/better-auth/database-adapter/utils.d.ts.map +1 -1
  17. package/dist/browser/index.d.ts +2 -1
  18. package/dist/browser/index.d.ts.map +1 -1
  19. package/dist/browser/index.js.map +1 -1
  20. package/dist/{chunk-F55R554M.js → chunk-6BIYT3KH.js} +51 -30
  21. package/dist/chunk-6BIYT3KH.js.map +1 -0
  22. package/dist/index.js +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/inspector/{custom-element-35MDW4SW.js → custom-element-RQTLPAPJ.js} +584 -298
  25. package/dist/inspector/custom-element-RQTLPAPJ.js.map +1 -0
  26. package/dist/inspector/index.js +570 -338
  27. package/dist/inspector/index.js.map +1 -1
  28. package/dist/inspector/register-custom-element.js +1 -1
  29. package/dist/inspector/ui/index.d.ts +6 -0
  30. package/dist/inspector/ui/index.d.ts.map +1 -0
  31. package/dist/inspector/viewer/group-view.d.ts +3 -2
  32. package/dist/inspector/viewer/group-view.d.ts.map +1 -1
  33. package/dist/inspector/viewer/page.d.ts.map +1 -1
  34. package/dist/react/index.js +2 -2
  35. package/dist/react/index.js.map +1 -1
  36. package/dist/react/media/image.d.ts +8 -0
  37. package/dist/react/media/image.d.ts.map +1 -1
  38. package/dist/react-native-core/index.js +3 -3
  39. package/dist/react-native-core/index.js.map +1 -1
  40. package/dist/react-native-core/media/image.d.ts +15 -0
  41. package/dist/react-native-core/media/image.d.ts.map +1 -1
  42. package/dist/svelte/media/image.svelte +7 -4
  43. package/dist/svelte/media/image.svelte.d.ts.map +1 -1
  44. package/dist/svelte/media/image.types.d.ts +1 -0
  45. package/dist/svelte/media/image.types.d.ts.map +1 -1
  46. package/dist/svelte/tests/media/image.svelte.test.js +63 -0
  47. package/dist/testing.js +8 -1
  48. package/dist/testing.js.map +1 -1
  49. package/dist/tools/coValues/account.d.ts +1 -0
  50. package/dist/tools/coValues/account.d.ts.map +1 -1
  51. package/dist/tools/coValues/group.d.ts +3 -3
  52. package/dist/tools/coValues/group.d.ts.map +1 -1
  53. package/dist/tools/implementation/invites.d.ts +2 -2
  54. package/dist/tools/implementation/invites.d.ts.map +1 -1
  55. package/dist/tools/implementation/zodSchema/runtimeConverters/schemaFieldToCoFieldDef.d.ts +1 -1
  56. package/dist/tools/implementation/zodSchema/runtimeConverters/schemaFieldToCoFieldDef.d.ts.map +1 -1
  57. package/dist/tools/implementation/zodSchema/schemaTypes/AccountSchema.d.ts.map +1 -1
  58. package/dist/tools/implementation/zodSchema/typeConverters/TypeOfZodSchema.d.ts +3 -1
  59. package/dist/tools/implementation/zodSchema/typeConverters/TypeOfZodSchema.d.ts.map +1 -1
  60. package/dist/tools/implementation/zodSchema/zodCo.d.ts.map +1 -1
  61. package/dist/tools/implementation/zodSchema/zodReExport.d.ts +1 -1
  62. package/dist/tools/implementation/zodSchema/zodReExport.d.ts.map +1 -1
  63. package/dist/tools/subscribe/CoValueCoreSubscription.d.ts.map +1 -1
  64. package/dist/tools/subscribe/SubscriptionScope.d.ts +0 -2
  65. package/dist/tools/subscribe/SubscriptionScope.d.ts.map +1 -1
  66. package/dist/tools/testing.d.ts +1 -0
  67. package/dist/tools/testing.d.ts.map +1 -1
  68. package/dist/tools/tests/CoValueCoreSubscription.test.d.ts.map +1 -0
  69. package/package.json +4 -4
  70. package/src/better-auth/auth/server.ts +7 -2
  71. package/src/better-auth/auth/tests/server.test.ts +39 -17
  72. package/src/better-auth/database-adapter/index.ts +8 -5
  73. package/src/better-auth/database-adapter/utils.ts +4 -0
  74. package/src/browser/index.ts +2 -1
  75. package/src/inspector/ui/index.ts +5 -0
  76. package/src/inspector/viewer/group-view.tsx +304 -20
  77. package/src/inspector/viewer/new-app.tsx +4 -4
  78. package/src/inspector/viewer/page.tsx +16 -2
  79. package/src/react/media/image.tsx +11 -2
  80. package/src/react/tests/media/image.test.tsx +94 -0
  81. package/src/react-native-core/media/image.tsx +11 -3
  82. package/src/svelte/media/image.svelte +7 -4
  83. package/src/svelte/media/image.types.ts +1 -0
  84. package/src/svelte/tests/media/image.svelte.test.ts +85 -0
  85. package/src/tools/coValues/account.ts +30 -5
  86. package/src/tools/coValues/group.ts +13 -12
  87. package/src/tools/coValues/inbox.ts +5 -5
  88. package/src/tools/implementation/invites.ts +3 -8
  89. package/src/tools/implementation/zodSchema/runtimeConverters/schemaFieldToCoFieldDef.ts +5 -1
  90. package/src/tools/implementation/zodSchema/schemaTypes/AccountSchema.ts +2 -0
  91. package/src/tools/implementation/zodSchema/typeConverters/TypeOfZodSchema.ts +63 -50
  92. package/src/tools/implementation/zodSchema/zodReExport.ts +2 -2
  93. package/src/tools/subscribe/CoValueCoreSubscription.ts +17 -0
  94. package/src/tools/subscribe/SubscriptionScope.ts +1 -27
  95. package/src/tools/testing.ts +7 -0
  96. package/src/tools/{subscribe → tests}/CoValueCoreSubscription.test.ts +233 -3
  97. package/src/tools/tests/coFeed.branch.test.ts +14 -5
  98. package/src/tools/tests/coMap.test.ts +139 -42
  99. package/src/tools/tests/coOptional.test.ts +9 -1
  100. package/src/tools/tests/groupsAndAccounts.test.ts +156 -1
  101. package/src/tools/tests/load.test.ts +198 -1
  102. package/src/tools/tests/zod.test-d.ts +0 -2
  103. package/src/tools/tests/zod.test.ts +43 -40
  104. package/dist/chunk-F55R554M.js.map +0 -1
  105. package/dist/inspector/custom-element-35MDW4SW.js.map +0 -1
  106. package/dist/tools/subscribe/CoValueCoreSubscription.test.d.ts.map +0 -1
  107. /package/dist/tools/{subscribe → tests}/CoValueCoreSubscription.test.d.ts +0 -0
@@ -4,8 +4,8 @@
4
4
  import React7 from "react";
5
5
 
6
6
  // src/inspector/viewer/new-app.tsx
7
- import { styled as styled19 } from "goober";
8
- import { useState as useState10 } from "react";
7
+ import { styled as styled20 } from "goober";
8
+ import { useState as useState11 } from "react";
9
9
 
10
10
  // src/inspector/ui/button.tsx
11
11
  import { styled } from "goober";
@@ -180,10 +180,10 @@ var Breadcrumbs = ({
180
180
  };
181
181
 
182
182
  // src/inspector/viewer/page-stack.tsx
183
- import { styled as styled15 } from "goober";
183
+ import { styled as styled17 } from "goober";
184
184
 
185
185
  // src/inspector/viewer/page.tsx
186
- import { styled as styled14 } from "goober";
186
+ import { styled as styled16 } from "goober";
187
187
  import React5 from "react";
188
188
 
189
189
  // src/inspector/ui/badge.tsx
@@ -1273,6 +1273,9 @@ function CoPlainTextView({ data }) {
1273
1273
  ] });
1274
1274
  }
1275
1275
 
1276
+ // src/inspector/viewer/group-view.tsx
1277
+ import { useState as useState6 } from "react";
1278
+
1276
1279
  // src/inspector/ui/table.tsx
1277
1280
  import { styled as styled12 } from "goober";
1278
1281
  import React4 from "react";
@@ -1313,49 +1316,442 @@ var TableRow = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ *
1313
1316
  var TableHeader = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx21(StyledTh, { ref, ...props, children }));
1314
1317
  var TableCell = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx21(StyledTd, { ref, ...props, children }));
1315
1318
 
1319
+ // src/inspector/ui/modal.tsx
1320
+ import { styled as styled13 } from "goober";
1321
+ import { forwardRef as forwardRef3, useEffect as useEffect5, useRef } from "react";
1322
+ import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
1323
+ var ModalContent = styled13("dialog")`
1324
+ background-color: var(--j-background);
1325
+ border-radius: var(--j-radius-lg);
1326
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
1327
+ border: 1px solid var(--j-border-color);
1328
+ max-width: 32rem;
1329
+ margin-block: auto;
1330
+ margin-inline: auto;
1331
+ &::backdrop {
1332
+ background-color: rgba(0, 0, 0, 0.7);
1333
+ }
1334
+
1335
+ `;
1336
+ var ModalHeader = styled13("div")`
1337
+ display: flex;
1338
+ justify-content: space-between;
1339
+ align-items: flex-start;
1340
+ padding: 1.5rem 1.5rem 0 1.5rem;
1341
+ gap: 1rem;
1342
+ `;
1343
+ var ModalBody = styled13("div")`
1344
+ padding: 1rem 1.5rem;
1345
+ flex: 1;
1346
+ `;
1347
+ var ModalFooter = styled13("div")`
1348
+ display: flex;
1349
+ justify-content: flex-end;
1350
+ gap: 0.75rem;
1351
+ padding: 0 1.5rem 1.5rem 1.5rem;
1352
+ `;
1353
+ var CloseButton = styled13("button")`
1354
+ background: none;
1355
+ border: none;
1356
+ cursor: pointer;
1357
+ padding: 0.25rem;
1358
+ border-radius: var(--j-radius-sm);
1359
+ color: var(--j-text-color);
1360
+ font-size: 1.25rem;
1361
+ line-height: 1;
1362
+ display: flex;
1363
+ align-items: center;
1364
+ justify-content: center;
1365
+ min-width: 2rem;
1366
+ min-height: 2rem;
1367
+
1368
+ &:hover {
1369
+ background-color: var(--j-foreground);
1370
+ }
1371
+
1372
+ &:focus-visible {
1373
+ outline: 2px solid var(--j-border-focus);
1374
+ outline-offset: 2px;
1375
+ }
1376
+ `;
1377
+ var Modal = forwardRef3(
1378
+ ({
1379
+ isOpen,
1380
+ onClose,
1381
+ heading,
1382
+ text,
1383
+ children,
1384
+ confirmText = "Confirm",
1385
+ cancelText = "Cancel",
1386
+ onConfirm,
1387
+ onCancel,
1388
+ showButtons = true,
1389
+ className
1390
+ }, ref) => {
1391
+ const modalRef = useRef(null);
1392
+ useEffect5(() => {
1393
+ if (isOpen) {
1394
+ modalRef.current?.showModal();
1395
+ } else {
1396
+ onClose();
1397
+ modalRef.current?.close();
1398
+ }
1399
+ }, [isOpen, onClose]);
1400
+ const handleConfirm = () => {
1401
+ onConfirm?.();
1402
+ onClose();
1403
+ };
1404
+ const handleCancel = () => {
1405
+ onCancel?.();
1406
+ onClose();
1407
+ };
1408
+ if (!isOpen) return null;
1409
+ return /* @__PURE__ */ jsxs11(
1410
+ ModalContent,
1411
+ {
1412
+ ref: ref || modalRef,
1413
+ className,
1414
+ role: "dialog",
1415
+ "aria-labelledby": "modal-heading",
1416
+ onClose,
1417
+ children: [
1418
+ /* @__PURE__ */ jsxs11(ModalHeader, { children: [
1419
+ /* @__PURE__ */ jsx22(Heading, { id: "modal-heading", children: heading }),
1420
+ /* @__PURE__ */ jsx22(CloseButton, { onClick: onClose, "aria-label": "Close modal", type: "button", children: "\xD7" })
1421
+ ] }),
1422
+ /* @__PURE__ */ jsxs11(ModalBody, { children: [
1423
+ text && /* @__PURE__ */ jsx22("p", { style: { margin: "0 0 1rem 0", color: "var(--j-text-color)" }, children: text }),
1424
+ children
1425
+ ] }),
1426
+ showButtons && /* @__PURE__ */ jsxs11(ModalFooter, { children: [
1427
+ /* @__PURE__ */ jsx22(Button, { variant: "secondary", onClick: handleCancel, children: cancelText }),
1428
+ /* @__PURE__ */ jsx22(Button, { variant: "primary", onClick: handleConfirm, children: confirmText })
1429
+ ] })
1430
+ ]
1431
+ }
1432
+ );
1433
+ }
1434
+ );
1435
+ Modal.displayName = "Modal";
1436
+
1437
+ // src/inspector/ui/select.tsx
1438
+ import { styled as styled14 } from "goober";
1439
+ import { useId as useId2 } from "react";
1440
+ import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
1441
+ var SelectContainer = styled14("div")`
1442
+ display: grid;
1443
+ gap: 0.25rem;
1444
+ `;
1445
+ var SelectWrapper = styled14("div")`
1446
+ position: relative;
1447
+ display: flex;
1448
+ align-items: center;
1449
+ `;
1450
+ var StyledSelect = styled14("select")`
1451
+ width: 100%;
1452
+ border-radius: var(--j-radius-md);
1453
+ border: 1px solid var(--j-border-color);
1454
+ padding: 0.5rem 0.875rem 0.5rem 0.875rem;
1455
+ padding-right: 2rem;
1456
+ box-shadow: var(--j-shadow-sm);
1457
+ font-weight: 500;
1458
+ color: var(--j-text-color-strong);
1459
+ appearance: none;
1460
+ overflow: hidden;
1461
+ text-overflow: ellipsis;
1462
+ white-space: nowrap;
1463
+
1464
+ @media (prefers-color-scheme: dark) {
1465
+ background-color: var(--j-foreground);
1466
+ }
1467
+ `;
1468
+ var SelectIcon = styled14("span")`
1469
+ position: absolute;
1470
+ right: 0.5em;
1471
+ color: var(--j-neutral-400);
1472
+ pointer-events: none;
1473
+
1474
+ @media (prefers-color-scheme: dark) {
1475
+ color: var(--j-neutral-900);
1476
+ }
1477
+ `;
1478
+ function Select(props) {
1479
+ const { label, hideLabel, id: customId, className, ...selectProps } = props;
1480
+ const generatedId = useId2();
1481
+ const id = customId || generatedId;
1482
+ return /* @__PURE__ */ jsxs12(SelectContainer, { className, children: [
1483
+ /* @__PURE__ */ jsx23("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
1484
+ /* @__PURE__ */ jsxs12(SelectWrapper, { children: [
1485
+ /* @__PURE__ */ jsx23(StyledSelect, { ...selectProps, id, children: props.children }),
1486
+ /* @__PURE__ */ jsx23(SelectIcon, { children: /* @__PURE__ */ jsx23(Icon, { name: "chevronDown", size: "sm" }) })
1487
+ ] })
1488
+ ] });
1489
+ }
1490
+
1316
1491
  // src/inspector/viewer/group-view.tsx
1317
- import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
1492
+ import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
1493
+ function partitionMembers(data) {
1494
+ const everyone = Object.entries(data).filter(([key]) => key === "everyone").map(([key, value]) => ({
1495
+ id: key,
1496
+ role: value
1497
+ }));
1498
+ const members = Object.entries(data).filter(([key]) => isCoId(key)).map(([key, value]) => ({
1499
+ id: key,
1500
+ role: value
1501
+ }));
1502
+ const parentGroups = Object.entries(data).filter(([key]) => key.startsWith("parent_co_")).map(([key, value]) => ({
1503
+ id: key.slice(7),
1504
+ role: value
1505
+ }));
1506
+ const childGroups = Object.entries(data).filter(
1507
+ ([key, value]) => key.startsWith("child_co_") && value !== "revoked"
1508
+ ).map(([key, value]) => ({
1509
+ id: key.slice(6),
1510
+ role: value
1511
+ }));
1512
+ return { everyone, members, parentGroups, childGroups };
1513
+ }
1318
1514
  function GroupView({
1515
+ coValue,
1319
1516
  data,
1320
1517
  onNavigate,
1321
1518
  node
1322
1519
  }) {
1323
- return /* @__PURE__ */ jsxs11(Fragment7, { children: [
1324
- /* @__PURE__ */ jsx22(Text, { strong: true, children: "Members" }),
1325
- /* @__PURE__ */ jsxs11(Table, { children: [
1326
- /* @__PURE__ */ jsx22(TableHead, { children: /* @__PURE__ */ jsxs11(TableRow, { children: [
1327
- /* @__PURE__ */ jsx22(TableHeader, { children: "Account" }),
1328
- /* @__PURE__ */ jsx22(TableHeader, { children: "Permission" })
1520
+ const [addMemberType, setAddMemberType] = useState6(null);
1521
+ const { everyone, members, parentGroups, childGroups } = partitionMembers(
1522
+ data
1523
+ );
1524
+ const onRemoveMember = async (id) => {
1525
+ if (confirm("Are you sure you want to remove this member?") === false) {
1526
+ return;
1527
+ }
1528
+ try {
1529
+ const group = await node.load(coValue.id);
1530
+ if (group === "unavailable") {
1531
+ throw new Error("Group not found");
1532
+ }
1533
+ const rawGroup = group;
1534
+ rawGroup.removeMember(id);
1535
+ } catch (error) {
1536
+ console.error(error);
1537
+ throw error;
1538
+ }
1539
+ };
1540
+ const onRemoveGroup = async (id) => {
1541
+ if (confirm("Are you sure you want to remove this group?") === false) {
1542
+ return;
1543
+ }
1544
+ try {
1545
+ const group = await node.load(coValue.id);
1546
+ if (group === "unavailable") {
1547
+ throw new Error("Group not found");
1548
+ }
1549
+ const rawGroup = group;
1550
+ const targetGroup = await node.load(id);
1551
+ if (targetGroup === "unavailable") {
1552
+ throw new Error("Group not found");
1553
+ }
1554
+ const rawTargetGroup = targetGroup;
1555
+ rawGroup.revokeExtend(rawTargetGroup);
1556
+ } catch (error) {
1557
+ console.error(error);
1558
+ throw error;
1559
+ }
1560
+ };
1561
+ const handleAddMemberSubmit = async (event) => {
1562
+ event.preventDefault();
1563
+ const form = event.currentTarget;
1564
+ const memberId = form.elements.namedItem("memberId")?.value;
1565
+ const role = form.elements.namedItem("role")?.value;
1566
+ try {
1567
+ const group = await node.load(coValue.id);
1568
+ if (group === "unavailable") {
1569
+ throw new Error("Group not found");
1570
+ }
1571
+ const rawGroup = group;
1572
+ if (addMemberType === "account") {
1573
+ let rawAccount = "everyone";
1574
+ if (memberId !== "everyone") {
1575
+ const account = await node.load(memberId);
1576
+ if (account === "unavailable") {
1577
+ throw new Error("Account not found");
1578
+ }
1579
+ rawAccount = account;
1580
+ }
1581
+ rawGroup.addMember(rawAccount, role);
1582
+ } else if (addMemberType === "group") {
1583
+ const targetGroup = await node.load(memberId);
1584
+ if (targetGroup === "unavailable") {
1585
+ throw new Error("Group not found");
1586
+ }
1587
+ const rawTargetGroup = targetGroup;
1588
+ rawGroup.extend(
1589
+ rawTargetGroup,
1590
+ role
1591
+ );
1592
+ }
1593
+ setAddMemberType(null);
1594
+ } catch (error) {
1595
+ console.error(error);
1596
+ alert(`Failed to add ${addMemberType}: ${error.message}`);
1597
+ }
1598
+ };
1599
+ return /* @__PURE__ */ jsxs13(Fragment7, { children: [
1600
+ /* @__PURE__ */ jsxs13(Table, { children: [
1601
+ /* @__PURE__ */ jsx24(TableHead, { children: /* @__PURE__ */ jsxs13(TableRow, { children: [
1602
+ /* @__PURE__ */ jsx24(TableHeader, { children: "Member" }),
1603
+ /* @__PURE__ */ jsx24(TableHeader, { children: "Permission" }),
1604
+ /* @__PURE__ */ jsx24(TableHeader, {})
1329
1605
  ] }) }),
1330
- /* @__PURE__ */ jsxs11(TableBody, { children: [
1331
- "everyone" in data && typeof data.everyone === "string" ? /* @__PURE__ */ jsxs11(TableRow, { children: [
1332
- /* @__PURE__ */ jsx22(TableCell, { children: "everyone" }),
1333
- /* @__PURE__ */ jsx22(TableCell, { children: data.everyone })
1334
- ] }) : null,
1335
- Object.entries(data).map(
1336
- ([key, value]) => isCoId(key) ? /* @__PURE__ */ jsxs11(TableRow, { children: [
1337
- /* @__PURE__ */ jsx22(TableCell, { children: /* @__PURE__ */ jsx22(
1338
- AccountOrGroupText,
1339
- {
1340
- coId: key,
1341
- node,
1342
- showId: true,
1343
- onClick: () => {
1344
- onNavigate([{ coId: key, name: key }]);
1345
- }
1606
+ /* @__PURE__ */ jsxs13(TableBody, { children: [
1607
+ everyone.map((member) => /* @__PURE__ */ jsxs13(TableRow, { children: [
1608
+ /* @__PURE__ */ jsx24(TableCell, { children: member.id }),
1609
+ /* @__PURE__ */ jsx24(TableCell, { children: member.role }),
1610
+ /* @__PURE__ */ jsx24(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ jsx24(
1611
+ Button,
1612
+ {
1613
+ variant: "secondary",
1614
+ onClick: () => onRemoveMember(member.id),
1615
+ children: /* @__PURE__ */ jsx24(Icon, { name: "delete" })
1616
+ }
1617
+ ) })
1618
+ ] }, member.id)),
1619
+ members.map((member) => /* @__PURE__ */ jsxs13(TableRow, { children: [
1620
+ /* @__PURE__ */ jsx24(TableCell, { children: /* @__PURE__ */ jsx24(
1621
+ AccountOrGroupText,
1622
+ {
1623
+ coId: member.id,
1624
+ node,
1625
+ showId: true,
1626
+ onClick: () => {
1627
+ onNavigate([{ coId: member.id, name: member.id }]);
1346
1628
  }
1347
- ) }),
1348
- /* @__PURE__ */ jsx22(TableCell, { children: value })
1349
- ] }, key) : null
1350
- )
1629
+ }
1630
+ ) }),
1631
+ /* @__PURE__ */ jsx24(TableCell, { children: member.role }),
1632
+ /* @__PURE__ */ jsx24(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ jsx24(
1633
+ Button,
1634
+ {
1635
+ variant: "secondary",
1636
+ onClick: () => onRemoveMember(member.id),
1637
+ children: /* @__PURE__ */ jsx24(Icon, { name: "delete" })
1638
+ }
1639
+ ) })
1640
+ ] }, member.id)),
1641
+ parentGroups.map((group) => /* @__PURE__ */ jsxs13(TableRow, { children: [
1642
+ /* @__PURE__ */ jsx24(TableCell, { children: /* @__PURE__ */ jsx24(
1643
+ AccountOrGroupText,
1644
+ {
1645
+ coId: group.id,
1646
+ node,
1647
+ showId: true,
1648
+ onClick: () => {
1649
+ onNavigate([{ coId: group.id, name: group.id }]);
1650
+ }
1651
+ }
1652
+ ) }),
1653
+ /* @__PURE__ */ jsx24(TableCell, { children: group.role }),
1654
+ /* @__PURE__ */ jsx24(TableCell, { children: group.role !== "revoked" && /* @__PURE__ */ jsx24(
1655
+ Button,
1656
+ {
1657
+ variant: "secondary",
1658
+ onClick: () => onRemoveGroup(group.id),
1659
+ children: /* @__PURE__ */ jsx24(Icon, { name: "delete" })
1660
+ }
1661
+ ) })
1662
+ ] }, group.id))
1351
1663
  ] })
1352
1664
  ] }),
1353
- /* @__PURE__ */ jsx22(RawDataCard, { data })
1665
+ /* @__PURE__ */ jsxs13(
1666
+ "div",
1667
+ {
1668
+ style: {
1669
+ display: "flex",
1670
+ justifyContent: "flex-end",
1671
+ gap: "0.75rem",
1672
+ marginTop: "1rem"
1673
+ },
1674
+ children: [
1675
+ /* @__PURE__ */ jsx24(Button, { variant: "primary", onClick: () => setAddMemberType("account"), children: "Add Account" }),
1676
+ /* @__PURE__ */ jsx24(Button, { variant: "primary", onClick: () => setAddMemberType("group"), children: "Add Group" })
1677
+ ]
1678
+ }
1679
+ ),
1680
+ childGroups.length > 0 && /* @__PURE__ */ jsxs13(Table, { children: [
1681
+ /* @__PURE__ */ jsx24(TableHead, { children: /* @__PURE__ */ jsx24(TableRow, { children: /* @__PURE__ */ jsx24(TableHeader, { children: "Member of" }) }) }),
1682
+ /* @__PURE__ */ jsx24(TableBody, { children: childGroups.map((group) => /* @__PURE__ */ jsx24(TableRow, { children: /* @__PURE__ */ jsx24(TableCell, { children: /* @__PURE__ */ jsx24(
1683
+ AccountOrGroupText,
1684
+ {
1685
+ coId: group.id,
1686
+ node,
1687
+ showId: true,
1688
+ onClick: () => {
1689
+ onNavigate([{ coId: group.id, name: group.id }]);
1690
+ }
1691
+ }
1692
+ ) }) }, group.id)) })
1693
+ ] }),
1694
+ /* @__PURE__ */ jsx24(RawDataCard, { data }),
1695
+ /* @__PURE__ */ jsx24(
1696
+ Modal,
1697
+ {
1698
+ isOpen: addMemberType !== null,
1699
+ onClose: () => setAddMemberType(null),
1700
+ heading: addMemberType === "account" ? "Add Account" : "Add Group",
1701
+ showButtons: false,
1702
+ children: /* @__PURE__ */ jsx24("form", { onSubmit: handleAddMemberSubmit, children: /* @__PURE__ */ jsxs13(
1703
+ "div",
1704
+ {
1705
+ style: { display: "flex", flexDirection: "column", gap: "1rem" },
1706
+ children: [
1707
+ /* @__PURE__ */ jsx24(
1708
+ Input,
1709
+ {
1710
+ name: "memberId",
1711
+ label: addMemberType === "account" ? "Account ID" : "Group ID",
1712
+ placeholder: addMemberType === "account" ? "Enter account ID" : "Enter group ID",
1713
+ required: true
1714
+ }
1715
+ ),
1716
+ /* @__PURE__ */ jsxs13(Select, { name: "role", label: "Role", children: [
1717
+ /* @__PURE__ */ jsx24("option", { value: "reader", children: "Reader" }),
1718
+ /* @__PURE__ */ jsx24("option", { value: "writer", children: "Writer" }),
1719
+ /* @__PURE__ */ jsx24("option", { value: "admin", children: "Admin" }),
1720
+ addMemberType === "account" ? /* @__PURE__ */ jsx24(Fragment7, { children: /* @__PURE__ */ jsx24("option", { value: "writeOnly", children: "Write Only" }) }) : /* @__PURE__ */ jsx24(Fragment7, { children: /* @__PURE__ */ jsx24("option", { value: "inherit", children: "Inherit" }) })
1721
+ ] }),
1722
+ /* @__PURE__ */ jsxs13(
1723
+ "div",
1724
+ {
1725
+ style: {
1726
+ display: "flex",
1727
+ gap: "0.75rem",
1728
+ justifyContent: "flex-end",
1729
+ marginTop: "0.5rem"
1730
+ },
1731
+ children: [
1732
+ /* @__PURE__ */ jsx24(
1733
+ Button,
1734
+ {
1735
+ type: "button",
1736
+ variant: "secondary",
1737
+ onClick: () => setAddMemberType(null),
1738
+ children: "Cancel"
1739
+ }
1740
+ ),
1741
+ /* @__PURE__ */ jsx24(Button, { type: "submit", variant: "primary", children: "Add" })
1742
+ ]
1743
+ }
1744
+ )
1745
+ ]
1746
+ }
1747
+ ) })
1748
+ }
1749
+ )
1354
1750
  ] });
1355
1751
  }
1356
1752
 
1357
1753
  // src/inspector/viewer/role-display.tsx
1358
- import { jsxs as jsxs12 } from "react/jsx-runtime";
1754
+ import { jsxs as jsxs14 } from "react/jsx-runtime";
1359
1755
  function RoleDisplay({
1360
1756
  node,
1361
1757
  value
@@ -1374,24 +1770,24 @@ function RoleDisplay({
1374
1770
  } else {
1375
1771
  role = "unauthorized";
1376
1772
  }
1377
- return /* @__PURE__ */ jsxs12(Text, { children: [
1773
+ return /* @__PURE__ */ jsxs14(Text, { children: [
1378
1774
  "Role: ",
1379
1775
  role
1380
1776
  ] });
1381
1777
  }
1382
1778
 
1383
1779
  // src/inspector/viewer/table-viewer.tsx
1384
- import { styled as styled13 } from "goober";
1385
- import { useMemo, useState as useState6 } from "react";
1386
- import { Fragment as Fragment8, jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
1387
- var PaginationContainer = styled13("div")`
1780
+ import { styled as styled15 } from "goober";
1781
+ import { useMemo, useState as useState7 } from "react";
1782
+ import { Fragment as Fragment8, jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
1783
+ var PaginationContainer = styled15("div")`
1388
1784
  padding: 1rem 0;
1389
1785
  display: flex;
1390
1786
  align-items: center;
1391
1787
  justify-content: space-between;
1392
1788
  gap: 0.5rem;
1393
1789
  `;
1394
- var RedTooltip = styled13("span")`
1790
+ var RedTooltip = styled15("span")`
1395
1791
  position:relative; /* making the .tooltip span a container for the tooltip text */
1396
1792
  border-bottom:1px dashed #000; /* little indicater to indicate it's hoverable */
1397
1793
 
@@ -1428,7 +1824,7 @@ function CoValuesTableView({
1428
1824
  onNavigate,
1429
1825
  onRemove
1430
1826
  }) {
1431
- const [visibleRowsCount, setVisibleRowsCount] = useState6(10);
1827
+ const [visibleRowsCount, setVisibleRowsCount] = useState7(10);
1432
1828
  const [coIdArray, visibleRows] = useMemo(() => {
1433
1829
  const coIdArray2 = Array.isArray(data) ? data : Object.values(data).every((k) => typeof k === "string" && isCoId(k)) ? Object.values(data).map((k) => k) : [];
1434
1830
  const visibleRows2 = coIdArray2.slice(0, visibleRowsCount);
@@ -1437,10 +1833,10 @@ function CoValuesTableView({
1437
1833
  const resolvedRows = useResolvedCoValues(visibleRows, node);
1438
1834
  const hasMore = visibleRowsCount < coIdArray.length;
1439
1835
  if (!coIdArray.length) {
1440
- return /* @__PURE__ */ jsx23("div", { children: "No data to display" });
1836
+ return /* @__PURE__ */ jsx25("div", { children: "No data to display" });
1441
1837
  }
1442
1838
  if (resolvedRows.length === 0) {
1443
- return /* @__PURE__ */ jsx23("div", { children: "Loading..." });
1839
+ return /* @__PURE__ */ jsx25("div", { children: "Loading..." });
1444
1840
  }
1445
1841
  const keys = Array.from(
1446
1842
  new Set(
@@ -1450,15 +1846,15 @@ function CoValuesTableView({
1450
1846
  const loadMore = () => {
1451
1847
  setVisibleRowsCount((prevVisibleRows) => prevVisibleRows + 10);
1452
1848
  };
1453
- return /* @__PURE__ */ jsxs13(Fragment8, { children: [
1454
- /* @__PURE__ */ jsxs13(Table, { children: [
1455
- /* @__PURE__ */ jsx23(TableHead, { children: /* @__PURE__ */ jsxs13(TableRow, { children: [
1456
- ["ID", ...keys, "Action"].map((key) => /* @__PURE__ */ jsx23(TableHeader, { children: key }, key)),
1457
- onRemove && /* @__PURE__ */ jsx23(TableHeader, {})
1849
+ return /* @__PURE__ */ jsxs15(Fragment8, { children: [
1850
+ /* @__PURE__ */ jsxs15(Table, { children: [
1851
+ /* @__PURE__ */ jsx25(TableHead, { children: /* @__PURE__ */ jsxs15(TableRow, { children: [
1852
+ ["ID", ...keys, "Action"].map((key) => /* @__PURE__ */ jsx25(TableHeader, { children: key }, key)),
1853
+ onRemove && /* @__PURE__ */ jsx25(TableHeader, {})
1458
1854
  ] }) }),
1459
- /* @__PURE__ */ jsx23(TableBody, { children: resolvedRows.slice(0, visibleRowsCount).map((item, index) => /* @__PURE__ */ jsxs13(TableRow, { children: [
1460
- /* @__PURE__ */ jsx23(TableCell, { children: /* @__PURE__ */ jsx23(Text, { mono: true, children: item.snapshot === "unavailable" ? /* @__PURE__ */ jsxs13(RedTooltip, { "data-text": "Unavailable", children: [
1461
- /* @__PURE__ */ jsx23(
1855
+ /* @__PURE__ */ jsx25(TableBody, { children: resolvedRows.slice(0, visibleRowsCount).map((item, index) => /* @__PURE__ */ jsxs15(TableRow, { children: [
1856
+ /* @__PURE__ */ jsx25(TableCell, { children: /* @__PURE__ */ jsx25(Text, { mono: true, children: item.snapshot === "unavailable" ? /* @__PURE__ */ jsxs15(RedTooltip, { "data-text": "Unavailable", children: [
1857
+ /* @__PURE__ */ jsx25(
1462
1858
  Icon,
1463
1859
  {
1464
1860
  name: "caution",
@@ -1471,7 +1867,7 @@ function CoValuesTableView({
1471
1867
  ),
1472
1868
  visibleRows[index]
1473
1869
  ] }) : visibleRows[index] }) }),
1474
- keys.map((key) => /* @__PURE__ */ jsx23(TableCell, { children: item.snapshot !== "unavailable" && /* @__PURE__ */ jsx23(
1870
+ keys.map((key) => /* @__PURE__ */ jsx25(TableCell, { children: item.snapshot !== "unavailable" && /* @__PURE__ */ jsx25(
1475
1871
  ValueRenderer,
1476
1872
  {
1477
1873
  json: item.snapshot[key],
@@ -1492,7 +1888,7 @@ function CoValuesTableView({
1492
1888
  }
1493
1889
  }
1494
1890
  ) }, key)),
1495
- /* @__PURE__ */ jsx23(TableCell, { children: /* @__PURE__ */ jsx23(
1891
+ /* @__PURE__ */ jsx25(TableCell, { children: /* @__PURE__ */ jsx25(
1496
1892
  Button,
1497
1893
  {
1498
1894
  variant: "secondary",
@@ -1505,18 +1901,18 @@ function CoValuesTableView({
1505
1901
  children: "View"
1506
1902
  }
1507
1903
  ) }),
1508
- onRemove && /* @__PURE__ */ jsx23(TableCell, { children: /* @__PURE__ */ jsx23(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
1904
+ onRemove && /* @__PURE__ */ jsx25(TableCell, { children: /* @__PURE__ */ jsx25(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
1509
1905
  ] }, index)) })
1510
1906
  ] }),
1511
- /* @__PURE__ */ jsxs13(PaginationContainer, { children: [
1512
- /* @__PURE__ */ jsxs13(Text, { muted: true, small: true, children: [
1907
+ /* @__PURE__ */ jsxs15(PaginationContainer, { children: [
1908
+ /* @__PURE__ */ jsxs15(Text, { muted: true, small: true, children: [
1513
1909
  "Showing ",
1514
1910
  Math.min(visibleRowsCount, coIdArray.length),
1515
1911
  " of",
1516
1912
  " ",
1517
1913
  coIdArray.length
1518
1914
  ] }),
1519
- hasMore && /* @__PURE__ */ jsx23(Button, { variant: "secondary", onClick: loadMore, children: "Load more" })
1915
+ hasMore && /* @__PURE__ */ jsx25(Button, { variant: "secondary", onClick: loadMore, children: "Load more" })
1520
1916
  ] })
1521
1917
  ] });
1522
1918
  }
@@ -1530,7 +1926,7 @@ function TableView({
1530
1926
  return Array.isArray(data) && data.every((k) => isCoId(k));
1531
1927
  }, [data]);
1532
1928
  if (isListOfCoValues) {
1533
- return /* @__PURE__ */ jsx23(
1929
+ return /* @__PURE__ */ jsx25(
1534
1930
  CoValuesTableView,
1535
1931
  {
1536
1932
  data,
@@ -1540,26 +1936,26 @@ function TableView({
1540
1936
  }
1541
1937
  );
1542
1938
  }
1543
- return /* @__PURE__ */ jsxs13(Table, { children: [
1544
- /* @__PURE__ */ jsx23(TableHead, { children: /* @__PURE__ */ jsxs13(TableRow, { children: [
1545
- /* @__PURE__ */ jsx23(TableHeader, { style: { width: "5rem" }, children: "Index" }),
1546
- /* @__PURE__ */ jsx23(TableHeader, { children: "Value" }),
1547
- onRemove && /* @__PURE__ */ jsx23(TableHeader, { children: "Action" })
1939
+ return /* @__PURE__ */ jsxs15(Table, { children: [
1940
+ /* @__PURE__ */ jsx25(TableHead, { children: /* @__PURE__ */ jsxs15(TableRow, { children: [
1941
+ /* @__PURE__ */ jsx25(TableHeader, { style: { width: "5rem" }, children: "Index" }),
1942
+ /* @__PURE__ */ jsx25(TableHeader, { children: "Value" }),
1943
+ onRemove && /* @__PURE__ */ jsx25(TableHeader, { children: "Action" })
1548
1944
  ] }) }),
1549
- /* @__PURE__ */ jsx23(TableBody, { children: Array.isArray(data) && data?.map((value, index) => /* @__PURE__ */ jsxs13(TableRow, { children: [
1550
- /* @__PURE__ */ jsx23(TableCell, { children: /* @__PURE__ */ jsx23(Text, { mono: true, children: index }) }),
1551
- /* @__PURE__ */ jsx23(TableCell, { children: /* @__PURE__ */ jsx23(ValueRenderer, { json: value }) }),
1552
- onRemove && /* @__PURE__ */ jsx23(TableCell, { children: /* @__PURE__ */ jsx23(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
1945
+ /* @__PURE__ */ jsx25(TableBody, { children: Array.isArray(data) && data?.map((value, index) => /* @__PURE__ */ jsxs15(TableRow, { children: [
1946
+ /* @__PURE__ */ jsx25(TableCell, { children: /* @__PURE__ */ jsx25(Text, { mono: true, children: index }) }),
1947
+ /* @__PURE__ */ jsx25(TableCell, { children: /* @__PURE__ */ jsx25(ValueRenderer, { json: value }) }),
1948
+ onRemove && /* @__PURE__ */ jsx25(TableCell, { children: /* @__PURE__ */ jsx25(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
1553
1949
  ] }, index)) })
1554
1950
  ] });
1555
1951
  }
1556
1952
 
1557
1953
  // src/inspector/viewer/page.tsx
1558
- import { Fragment as Fragment9, jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
1954
+ import { Fragment as Fragment9, jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
1559
1955
  var BasePageContainer = React5.forwardRef(
1560
- ({ isTopLevel, ...rest }, ref) => /* @__PURE__ */ jsx24("div", { ref, ...rest })
1956
+ ({ isTopLevel, ...rest }, ref) => /* @__PURE__ */ jsx26("div", { ref, ...rest })
1561
1957
  );
1562
- var PageContainer = styled14(BasePageContainer)`
1958
+ var PageContainer = styled16(BasePageContainer)`
1563
1959
  position: absolute;
1564
1960
  z-index: 10;
1565
1961
  inset: 0;
@@ -1567,36 +1963,36 @@ var PageContainer = styled14(BasePageContainer)`
1567
1963
  height: 100%;
1568
1964
  padding: 0 0.75rem;
1569
1965
  `;
1570
- var BackButton = styled14("div")`
1966
+ var BackButton = styled16("div")`
1571
1967
  position: absolute;
1572
1968
  left: 0;
1573
1969
  right: 0;
1574
1970
  top: 0;
1575
1971
  height: 2.5rem;
1576
1972
  `;
1577
- var HeaderContainer = styled14("div")`
1973
+ var HeaderContainer = styled16("div")`
1578
1974
  display: flex;
1579
1975
  justify-content: space-between;
1580
1976
  align-items: center;
1581
1977
  margin-bottom: 1rem;
1582
1978
  `;
1583
- var TitleContainer = styled14("div")`
1979
+ var TitleContainer = styled16("div")`
1584
1980
  display: flex;
1585
1981
  align-items: center;
1586
1982
  gap: 0.75rem;
1587
1983
  `;
1588
- var Title = styled14(Heading)`
1984
+ var Title = styled16(Heading)`
1589
1985
  display: flex;
1590
1986
  flex-direction: column;
1591
1987
  align-items: flex-start;
1592
1988
  gap: 0.25rem;
1593
1989
  `;
1594
- var BadgeContainer = styled14("div")`
1990
+ var BadgeContainer = styled16("div")`
1595
1991
  display: flex;
1596
1992
  align-items: center;
1597
1993
  gap: 0.75rem;
1598
1994
  `;
1599
- var ContentContainer = styled14("div")`
1995
+ var ContentContainer = styled16("div")`
1600
1996
  overflow: auto;
1601
1997
  display: flex;
1602
1998
  flex-direction: column;
@@ -1617,7 +2013,7 @@ function View(props) {
1617
2013
  const { node, onNavigate } = props;
1618
2014
  if (!snapshot || snapshot === "unavailable") return;
1619
2015
  if (type === "costream") {
1620
- return /* @__PURE__ */ jsx24(
2016
+ return /* @__PURE__ */ jsx26(
1621
2017
  CoStreamView,
1622
2018
  {
1623
2019
  data: snapshot,
@@ -1628,13 +2024,21 @@ function View(props) {
1628
2024
  );
1629
2025
  }
1630
2026
  if (extendedType === "group") {
1631
- return /* @__PURE__ */ jsx24(GroupView, { data: snapshot, node, onNavigate });
2027
+ return /* @__PURE__ */ jsx26(
2028
+ GroupView,
2029
+ {
2030
+ coValue: value,
2031
+ data: snapshot,
2032
+ node,
2033
+ onNavigate
2034
+ }
2035
+ );
1632
2036
  }
1633
2037
  if (extendedType === "account") {
1634
- return /* @__PURE__ */ jsx24(AccountView, { data: snapshot, node, onNavigate });
2038
+ return /* @__PURE__ */ jsx26(AccountView, { data: snapshot, node, onNavigate });
1635
2039
  }
1636
2040
  if (type === "coplaintext") {
1637
- return /* @__PURE__ */ jsx24(CoPlainTextView, { data: snapshot });
2041
+ return /* @__PURE__ */ jsx26(CoPlainTextView, { data: snapshot });
1638
2042
  }
1639
2043
  if (type === "colist") {
1640
2044
  const handleRemove = (index) => {
@@ -1643,7 +2047,7 @@ function View(props) {
1643
2047
  list.delete(index);
1644
2048
  }
1645
2049
  };
1646
- return /* @__PURE__ */ jsx24(
2050
+ return /* @__PURE__ */ jsx26(
1647
2051
  TableView,
1648
2052
  {
1649
2053
  data: snapshot,
@@ -1654,9 +2058,9 @@ function View(props) {
1654
2058
  );
1655
2059
  }
1656
2060
  if (extendedType === "record") {
1657
- return /* @__PURE__ */ jsx24(TableView, { data: snapshot, node, onNavigate });
2061
+ return /* @__PURE__ */ jsx26(TableView, { data: snapshot, node, onNavigate });
1658
2062
  }
1659
- return /* @__PURE__ */ jsx24(GridView, { data: snapshot, onNavigate, node });
2063
+ return /* @__PURE__ */ jsx26(GridView, { data: snapshot, onNavigate, node });
1660
2064
  }
1661
2065
  function Page(props) {
1662
2066
  const {
@@ -1672,13 +2076,13 @@ function Page(props) {
1672
2076
  const coValue = useResolvedCoValue(coId, node);
1673
2077
  const { value, snapshot, type, extendedType } = coValue;
1674
2078
  if (snapshot === "unavailable") {
1675
- return /* @__PURE__ */ jsx24("div", { style, children: "Data unavailable" });
2079
+ return /* @__PURE__ */ jsx26("div", { style, children: "Data unavailable" });
1676
2080
  }
1677
2081
  if (!snapshot) {
1678
- return /* @__PURE__ */ jsx24("div", { style });
2082
+ return /* @__PURE__ */ jsx26("div", { style });
1679
2083
  }
1680
- return /* @__PURE__ */ jsxs14(PageContainer, { style, className, isTopLevel, children: [
1681
- !isTopLevel && /* @__PURE__ */ jsx24(
2084
+ return /* @__PURE__ */ jsxs16(PageContainer, { style, className, isTopLevel, children: [
2085
+ !isTopLevel && /* @__PURE__ */ jsx26(
1682
2086
  BackButton,
1683
2087
  {
1684
2088
  "aria-label": "Back",
@@ -1688,27 +2092,27 @@ function Page(props) {
1688
2092
  "aria-hidden": "true"
1689
2093
  }
1690
2094
  ),
1691
- /* @__PURE__ */ jsx24(HeaderContainer, { children: /* @__PURE__ */ jsxs14(TitleContainer, { children: [
1692
- /* @__PURE__ */ jsx24(Title, { children: /* @__PURE__ */ jsxs14("span", { children: [
2095
+ /* @__PURE__ */ jsx26(HeaderContainer, { children: /* @__PURE__ */ jsxs16(TitleContainer, { children: [
2096
+ /* @__PURE__ */ jsx26(Title, { children: /* @__PURE__ */ jsxs16("span", { children: [
1693
2097
  name,
1694
- typeof snapshot === "object" && "name" in snapshot ? /* @__PURE__ */ jsxs14("span", { style: { color: "#57534e", fontWeight: 500 }, children: [
2098
+ typeof snapshot === "object" && "name" in snapshot ? /* @__PURE__ */ jsxs16("span", { style: { color: "#57534e", fontWeight: 500 }, children: [
1695
2099
  " ",
1696
2100
  snapshot.name
1697
2101
  ] }) : null
1698
2102
  ] }) }),
1699
- /* @__PURE__ */ jsxs14(BadgeContainer, { children: [
1700
- /* @__PURE__ */ jsx24(Badge, { children: type && /* @__PURE__ */ jsx24(TypeIcon, { type, extendedType }) }),
1701
- /* @__PURE__ */ jsx24(Badge, { children: coId })
2103
+ /* @__PURE__ */ jsxs16(BadgeContainer, { children: [
2104
+ /* @__PURE__ */ jsx26(Badge, { children: type && /* @__PURE__ */ jsx26(TypeIcon, { type, extendedType }) }),
2105
+ /* @__PURE__ */ jsx26(Badge, { children: coId })
1702
2106
  ] })
1703
2107
  ] }) }),
1704
- /* @__PURE__ */ jsxs14(ContentContainer, { children: [
1705
- /* @__PURE__ */ jsx24(View, { ...props, coValue }),
1706
- extendedType !== "account" && extendedType !== "group" && /* @__PURE__ */ jsxs14(Fragment9, { children: [
1707
- /* @__PURE__ */ jsx24(RoleDisplay, { node, value }),
1708
- /* @__PURE__ */ jsxs14(Text, { muted: true, children: [
2108
+ /* @__PURE__ */ jsxs16(ContentContainer, { children: [
2109
+ /* @__PURE__ */ jsx26(View, { ...props, coValue }),
2110
+ extendedType !== "account" && extendedType !== "group" && /* @__PURE__ */ jsxs16(Fragment9, { children: [
2111
+ /* @__PURE__ */ jsx26(RoleDisplay, { node, value }),
2112
+ /* @__PURE__ */ jsxs16(Text, { muted: true, children: [
1709
2113
  "Owned by",
1710
2114
  " ",
1711
- /* @__PURE__ */ jsx24(
2115
+ /* @__PURE__ */ jsx26(
1712
2116
  AccountOrGroupText,
1713
2117
  {
1714
2118
  coId: value.group.id,
@@ -1726,8 +2130,8 @@ function Page(props) {
1726
2130
  }
1727
2131
 
1728
2132
  // src/inspector/viewer/page-stack.tsx
1729
- import { Fragment as Fragment10, jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
1730
- var PageStackContainer = styled15("div")`
2133
+ import { Fragment as Fragment10, jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
2134
+ var PageStackContainer = styled17("div")`
1731
2135
  position: relative;
1732
2136
  padding: 0 0.75rem;
1733
2137
  overflow-y: auto;
@@ -1744,9 +2148,9 @@ function PageStack({
1744
2148
  }) {
1745
2149
  const page = path[path.length - 1];
1746
2150
  const index = path.length - 1;
1747
- return /* @__PURE__ */ jsx25(Fragment10, { children: /* @__PURE__ */ jsxs15(PageStackContainer, { children: [
2151
+ return /* @__PURE__ */ jsx27(Fragment10, { children: /* @__PURE__ */ jsxs17(PageStackContainer, { children: [
1748
2152
  children,
1749
- node && page && /* @__PURE__ */ jsx25(
2153
+ node && page && /* @__PURE__ */ jsx27(
1750
2154
  Page,
1751
2155
  {
1752
2156
  coId: page.coId,
@@ -1761,10 +2165,10 @@ function PageStack({
1761
2165
  }
1762
2166
 
1763
2167
  // src/inspector/viewer/use-page-path.ts
1764
- import { useCallback, useEffect as useEffect5, useState as useState7 } from "react";
2168
+ import { useCallback, useEffect as useEffect6, useState as useState8 } from "react";
1765
2169
  var STORAGE_KEY = "jazz-inspector-paths";
1766
2170
  function usePagePath(defaultPath) {
1767
- const [path, setPath] = useState7(() => {
2171
+ const [path, setPath] = useState8(() => {
1768
2172
  if (typeof window === "undefined") return [];
1769
2173
  const stored = localStorage.getItem(STORAGE_KEY);
1770
2174
  if (stored) {
@@ -1780,7 +2184,7 @@ function usePagePath(defaultPath) {
1780
2184
  setPath(newPath);
1781
2185
  localStorage.setItem(STORAGE_KEY, JSON.stringify(newPath));
1782
2186
  }, []);
1783
- useEffect5(() => {
2187
+ useEffect6(() => {
1784
2188
  if (defaultPath && JSON.stringify(path) !== JSON.stringify(defaultPath)) {
1785
2189
  updatePath(defaultPath);
1786
2190
  }
@@ -1818,8 +2222,8 @@ function usePagePath(defaultPath) {
1818
2222
  }
1819
2223
 
1820
2224
  // src/inspector/ui/global-styles.tsx
1821
- import { styled as styled16 } from "goober";
1822
- var GlobalStyles = styled16("div")`
2225
+ import { styled as styled18 } from "goober";
2226
+ var GlobalStyles = styled18("div")`
1823
2227
  /* Colors */
1824
2228
  --j-primary-color: #146AFF;
1825
2229
  --j-link-color: var(--j-primary-color);
@@ -1893,9 +2297,9 @@ var GlobalStyles = styled16("div")`
1893
2297
  `;
1894
2298
 
1895
2299
  // src/inspector/viewer/inspector-button.tsx
1896
- import { styled as styled17 } from "goober";
1897
- import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
1898
- var StyledInspectorButton = styled17("button")`
2300
+ import { styled as styled19 } from "goober";
2301
+ import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
2302
+ var StyledInspectorButton = styled19("button")`
1899
2303
  position: fixed;
1900
2304
  width: 2.5rem;
1901
2305
  height: 2.5rem;
@@ -1926,7 +2330,7 @@ var StyledInspectorButton = styled17("button")`
1926
2330
  }
1927
2331
  }}
1928
2332
  `;
1929
- var JazzIcon = styled17("svg")`
2333
+ var JazzIcon = styled19("svg")`
1930
2334
  width: 100%;
1931
2335
  height: auto;
1932
2336
  position: relative;
@@ -1937,8 +2341,8 @@ function InspectorButton({
1937
2341
  position = "right",
1938
2342
  ...buttonProps
1939
2343
  }) {
1940
- return /* @__PURE__ */ jsxs16(StyledInspectorButton, { position, ...buttonProps, children: [
1941
- /* @__PURE__ */ jsx26(
2344
+ return /* @__PURE__ */ jsxs18(StyledInspectorButton, { position, ...buttonProps, children: [
2345
+ /* @__PURE__ */ jsx28(
1942
2346
  JazzIcon,
1943
2347
  {
1944
2348
  xmlns: "http://www.w3.org/2000/svg",
@@ -1946,7 +2350,7 @@ function InspectorButton({
1946
2350
  height: "115",
1947
2351
  viewBox: "0 0 119 115",
1948
2352
  fill: "none",
1949
- children: /* @__PURE__ */ jsx26(
2353
+ children: /* @__PURE__ */ jsx28(
1950
2354
  "path",
1951
2355
  {
1952
2356
  fillRule: "evenodd",
@@ -1957,7 +2361,7 @@ function InspectorButton({
1957
2361
  )
1958
2362
  }
1959
2363
  ),
1960
- /* @__PURE__ */ jsx26(
2364
+ /* @__PURE__ */ jsx28(
1961
2365
  "span",
1962
2366
  {
1963
2367
  style: {
@@ -1978,148 +2382,30 @@ function InspectorButton({
1978
2382
  }
1979
2383
 
1980
2384
  // src/inspector/viewer/use-open-inspector.ts
1981
- import { useEffect as useEffect6, useState as useState8 } from "react";
2385
+ import { useEffect as useEffect7, useState as useState9 } from "react";
1982
2386
  var STORAGE_KEY2 = "jazz-inspector-open";
1983
2387
  function useOpenInspector() {
1984
- const [open, setOpen] = useState8(() => {
2388
+ const [open, setOpen] = useState9(() => {
1985
2389
  if (typeof window === "undefined") return false;
1986
2390
  const stored = localStorage.getItem(STORAGE_KEY2);
1987
2391
  return stored ? JSON.parse(stored) : false;
1988
2392
  });
1989
- useEffect6(() => {
2393
+ useEffect7(() => {
1990
2394
  localStorage.setItem(STORAGE_KEY2, JSON.stringify(open));
1991
2395
  }, [open]);
1992
2396
  return [open, setOpen];
1993
2397
  }
1994
2398
 
1995
- // src/inspector/ui/modal.tsx
1996
- import { styled as styled18 } from "goober";
1997
- import { forwardRef as forwardRef3, useEffect as useEffect7, useRef } from "react";
1998
- import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
1999
- var ModalContent = styled18("dialog")`
2000
- background-color: var(--j-background);
2001
- border-radius: var(--j-radius-lg);
2002
- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
2003
- border: 1px solid var(--j-border-color);
2004
- max-width: 32rem;
2005
- margin-block: auto;
2006
- margin-inline: auto;
2007
- &::backdrop {
2008
- background-color: rgba(0, 0, 0, 0.7);
2009
- }
2010
-
2011
- `;
2012
- var ModalHeader = styled18("div")`
2013
- display: flex;
2014
- justify-content: space-between;
2015
- align-items: flex-start;
2016
- padding: 1.5rem 1.5rem 0 1.5rem;
2017
- gap: 1rem;
2018
- `;
2019
- var ModalBody = styled18("div")`
2020
- padding: 1rem 1.5rem;
2021
- flex: 1;
2022
- `;
2023
- var ModalFooter = styled18("div")`
2024
- display: flex;
2025
- justify-content: flex-end;
2026
- gap: 0.75rem;
2027
- padding: 0 1.5rem 1.5rem 1.5rem;
2028
- `;
2029
- var CloseButton = styled18("button")`
2030
- background: none;
2031
- border: none;
2032
- cursor: pointer;
2033
- padding: 0.25rem;
2034
- border-radius: var(--j-radius-sm);
2035
- color: var(--j-text-color);
2036
- font-size: 1.25rem;
2037
- line-height: 1;
2038
- display: flex;
2039
- align-items: center;
2040
- justify-content: center;
2041
- min-width: 2rem;
2042
- min-height: 2rem;
2043
-
2044
- &:hover {
2045
- background-color: var(--j-foreground);
2046
- }
2047
-
2048
- &:focus-visible {
2049
- outline: 2px solid var(--j-border-focus);
2050
- outline-offset: 2px;
2051
- }
2052
- `;
2053
- var Modal = forwardRef3(
2054
- ({
2055
- isOpen,
2056
- onClose,
2057
- heading,
2058
- text,
2059
- children,
2060
- confirmText = "Confirm",
2061
- cancelText = "Cancel",
2062
- onConfirm,
2063
- onCancel,
2064
- showButtons = true,
2065
- className
2066
- }, ref) => {
2067
- const modalRef = useRef(null);
2068
- useEffect7(() => {
2069
- if (isOpen) {
2070
- modalRef.current?.showModal();
2071
- } else {
2072
- onClose();
2073
- modalRef.current?.close();
2074
- }
2075
- }, [isOpen, onClose]);
2076
- const handleConfirm = () => {
2077
- onConfirm?.();
2078
- onClose();
2079
- };
2080
- const handleCancel = () => {
2081
- onCancel?.();
2082
- onClose();
2083
- };
2084
- if (!isOpen) return null;
2085
- return /* @__PURE__ */ jsxs17(
2086
- ModalContent,
2087
- {
2088
- ref: ref || modalRef,
2089
- className,
2090
- role: "dialog",
2091
- "aria-labelledby": "modal-heading",
2092
- onClose,
2093
- children: [
2094
- /* @__PURE__ */ jsxs17(ModalHeader, { children: [
2095
- /* @__PURE__ */ jsx27(Heading, { id: "modal-heading", children: heading }),
2096
- /* @__PURE__ */ jsx27(CloseButton, { onClick: onClose, "aria-label": "Close modal", type: "button", children: "\xD7" })
2097
- ] }),
2098
- /* @__PURE__ */ jsxs17(ModalBody, { children: [
2099
- text && /* @__PURE__ */ jsx27("p", { style: { margin: "0 0 1rem 0", color: "var(--j-text-color)" }, children: text }),
2100
- children
2101
- ] }),
2102
- showButtons && /* @__PURE__ */ jsxs17(ModalFooter, { children: [
2103
- /* @__PURE__ */ jsx27(Button, { variant: "secondary", onClick: handleCancel, children: cancelText }),
2104
- /* @__PURE__ */ jsx27(Button, { variant: "primary", onClick: handleConfirm, children: confirmText })
2105
- ] })
2106
- ]
2107
- }
2108
- );
2109
- }
2110
- );
2111
- Modal.displayName = "Modal";
2112
-
2113
2399
  // src/inspector/viewer/delete-local-data.tsx
2114
- import { useState as useState9 } from "react";
2115
- import { Fragment as Fragment11, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
2400
+ import { useState as useState10 } from "react";
2401
+ import { Fragment as Fragment11, jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
2116
2402
  var DELETE_LOCAL_DATA_STRING = "delete my local data";
2117
2403
  function DeleteLocalData() {
2118
- const [showDeleteModal, setShowDeleteModal] = useState9(false);
2119
- const [confirmDeleteString, setConfirmDeleteString] = useState9("");
2120
- return /* @__PURE__ */ jsxs18(Fragment11, { children: [
2121
- /* @__PURE__ */ jsx28(Button, { variant: "destructive", onClick: () => setShowDeleteModal(true), children: "Delete my local data" }),
2122
- /* @__PURE__ */ jsxs18(
2404
+ const [showDeleteModal, setShowDeleteModal] = useState10(false);
2405
+ const [confirmDeleteString, setConfirmDeleteString] = useState10("");
2406
+ return /* @__PURE__ */ jsxs19(Fragment11, { children: [
2407
+ /* @__PURE__ */ jsx29(Button, { variant: "destructive", onClick: () => setShowDeleteModal(true), children: "Delete my local data" }),
2408
+ /* @__PURE__ */ jsxs19(
2123
2409
  Modal,
2124
2410
  {
2125
2411
  isOpen: showDeleteModal,
@@ -2127,7 +2413,7 @@ function DeleteLocalData() {
2127
2413
  heading: "Delete Local Data",
2128
2414
  showButtons: false,
2129
2415
  children: [
2130
- /* @__PURE__ */ jsxs18(
2416
+ /* @__PURE__ */ jsxs19(
2131
2417
  "div",
2132
2418
  {
2133
2419
  style: {
@@ -2138,33 +2424,33 @@ function DeleteLocalData() {
2138
2424
  gap: "0.5rem"
2139
2425
  },
2140
2426
  children: [
2141
- /* @__PURE__ */ jsxs18("p", { children: [
2427
+ /* @__PURE__ */ jsxs19("p", { children: [
2142
2428
  "This action ",
2143
- /* @__PURE__ */ jsx28("strong", { children: "cannot" }),
2429
+ /* @__PURE__ */ jsx29("strong", { children: "cannot" }),
2144
2430
  " be undone."
2145
2431
  ] }),
2146
- /* @__PURE__ */ jsxs18("p", { children: [
2432
+ /* @__PURE__ */ jsxs19("p", { children: [
2147
2433
  "Be aware that the following data will be",
2148
2434
  " ",
2149
- /* @__PURE__ */ jsx28("strong", { children: "permanently" }),
2435
+ /* @__PURE__ */ jsx29("strong", { children: "permanently" }),
2150
2436
  " deleted:"
2151
2437
  ] }),
2152
- /* @__PURE__ */ jsxs18("ul", { style: { listStyleType: "disc", paddingLeft: "1rem" }, children: [
2153
- /* @__PURE__ */ jsxs18("li", { children: [
2438
+ /* @__PURE__ */ jsxs19("ul", { style: { listStyleType: "disc", paddingLeft: "1rem" }, children: [
2439
+ /* @__PURE__ */ jsxs19("li", { children: [
2154
2440
  "Unsynced data for ",
2155
- /* @__PURE__ */ jsx28("strong", { children: "all apps" }),
2441
+ /* @__PURE__ */ jsx29("strong", { children: "all apps" }),
2156
2442
  " on",
2157
2443
  " ",
2158
- /* @__PURE__ */ jsx28("code", { children: window.location.origin })
2444
+ /* @__PURE__ */ jsx29("code", { children: window.location.origin })
2159
2445
  ] }),
2160
- /* @__PURE__ */ jsx28("li", { children: "Accounts" }),
2161
- /* @__PURE__ */ jsx28("li", { children: "Logged in sessions" })
2446
+ /* @__PURE__ */ jsx29("li", { children: "Accounts" }),
2447
+ /* @__PURE__ */ jsx29("li", { children: "Logged in sessions" })
2162
2448
  ] }),
2163
- /* @__PURE__ */ jsx28("p", {})
2449
+ /* @__PURE__ */ jsx29("p", {})
2164
2450
  ]
2165
2451
  }
2166
2452
  ),
2167
- /* @__PURE__ */ jsx28(
2453
+ /* @__PURE__ */ jsx29(
2168
2454
  Input,
2169
2455
  {
2170
2456
  label: `Type "${DELETE_LOCAL_DATA_STRING}" to confirm`,
@@ -2175,7 +2461,7 @@ function DeleteLocalData() {
2175
2461
  }
2176
2462
  }
2177
2463
  ),
2178
- /* @__PURE__ */ jsx28(
2464
+ /* @__PURE__ */ jsx29(
2179
2465
  "p",
2180
2466
  {
2181
2467
  style: {
@@ -2185,14 +2471,14 @@ function DeleteLocalData() {
2185
2471
  flexDirection: "column",
2186
2472
  gap: "0.5rem"
2187
2473
  },
2188
- children: /* @__PURE__ */ jsxs18("small", { children: [
2474
+ children: /* @__PURE__ */ jsxs19("small", { children: [
2189
2475
  "Data synced to a sync server will ",
2190
- /* @__PURE__ */ jsx28("strong", { children: "not" }),
2476
+ /* @__PURE__ */ jsx29("strong", { children: "not" }),
2191
2477
  " be deleted, and will be synced when you log in again."
2192
2478
  ] })
2193
2479
  }
2194
2480
  ),
2195
- /* @__PURE__ */ jsxs18(
2481
+ /* @__PURE__ */ jsxs19(
2196
2482
  "div",
2197
2483
  {
2198
2484
  style: {
@@ -2202,8 +2488,8 @@ function DeleteLocalData() {
2202
2488
  gap: "0.5rem"
2203
2489
  },
2204
2490
  children: [
2205
- /* @__PURE__ */ jsx28(Button, { variant: "secondary", onClick: () => setShowDeleteModal(false), children: "Cancel" }),
2206
- /* @__PURE__ */ jsx28(
2491
+ /* @__PURE__ */ jsx29(Button, { variant: "secondary", onClick: () => setShowDeleteModal(false), children: "Cancel" }),
2492
+ /* @__PURE__ */ jsx29(
2207
2493
  Button,
2208
2494
  {
2209
2495
  variant: "destructive",
@@ -2230,8 +2516,8 @@ function DeleteLocalData() {
2230
2516
  }
2231
2517
 
2232
2518
  // src/inspector/viewer/new-app.tsx
2233
- import { Fragment as Fragment12, jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
2234
- var InspectorContainer = styled19("div")`
2519
+ import { Fragment as Fragment12, jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
2520
+ var InspectorContainer = styled20("div")`
2235
2521
  position: fixed;
2236
2522
  height: 50vh;
2237
2523
  max-height: 800px;
@@ -2248,17 +2534,17 @@ var InspectorContainer = styled19("div")`
2248
2534
  background-color: var(--j-background);
2249
2535
  }
2250
2536
  `;
2251
- var HeaderContainer2 = styled19("div")`
2537
+ var HeaderContainer2 = styled20("div")`
2252
2538
  display: flex;
2253
2539
  align-items: center;
2254
2540
  gap: 1rem;
2255
2541
  padding: 0 0.75rem;
2256
2542
  margin: 0.75rem 0;
2257
2543
  `;
2258
- var Form = styled19("form")`
2544
+ var Form = styled20("form")`
2259
2545
  width: 24rem;
2260
2546
  `;
2261
- var InitialForm = styled19("form")`
2547
+ var InitialForm = styled20("form")`
2262
2548
  display: flex;
2263
2549
  flex-direction: column;
2264
2550
  position: relative;
@@ -2270,7 +2556,7 @@ var InitialForm = styled19("form")`
2270
2556
  max-width: 24rem;
2271
2557
  margin: 0 auto;
2272
2558
  `;
2273
- var OrText = styled19("p")`
2559
+ var OrText = styled20("p")`
2274
2560
  text-align: center;
2275
2561
  `;
2276
2562
  function JazzInspectorInternal({
@@ -2279,7 +2565,7 @@ function JazzInspectorInternal({
2279
2565
  accountId
2280
2566
  }) {
2281
2567
  const [open, setOpen] = useOpenInspector();
2282
- const [coValueId, setCoValueId] = useState10("");
2568
+ const [coValueId, setCoValueId] = useState11("");
2283
2569
  const { path, addPages, goToIndex, goBack, setPage } = usePagePath();
2284
2570
  const handleCoValueIdSubmit = (e) => {
2285
2571
  e.preventDefault();
@@ -2289,12 +2575,12 @@ function JazzInspectorInternal({
2289
2575
  setCoValueId("");
2290
2576
  };
2291
2577
  if (!open) {
2292
- return /* @__PURE__ */ jsx29(InspectorButton, { position, onClick: () => setOpen(true) });
2578
+ return /* @__PURE__ */ jsx30(InspectorButton, { position, onClick: () => setOpen(true) });
2293
2579
  }
2294
- return /* @__PURE__ */ jsxs19(InspectorContainer, { as: GlobalStyles, style: { zIndex: 999 }, children: [
2295
- /* @__PURE__ */ jsxs19(HeaderContainer2, { children: [
2296
- /* @__PURE__ */ jsx29(Breadcrumbs, { path, onBreadcrumbClick: goToIndex }),
2297
- /* @__PURE__ */ jsx29(Form, { onSubmit: handleCoValueIdSubmit, children: path.length !== 0 && /* @__PURE__ */ jsx29(
2580
+ return /* @__PURE__ */ jsxs20(InspectorContainer, { as: GlobalStyles, style: { zIndex: 999 }, children: [
2581
+ /* @__PURE__ */ jsxs20(HeaderContainer2, { children: [
2582
+ /* @__PURE__ */ jsx30(Breadcrumbs, { path, onBreadcrumbClick: goToIndex }),
2583
+ path.length !== 0 && /* @__PURE__ */ jsx30(Form, { onSubmit: handleCoValueIdSubmit, children: /* @__PURE__ */ jsx30(
2298
2584
  Input,
2299
2585
  {
2300
2586
  label: "CoValue ID",
@@ -2305,24 +2591,24 @@ function JazzInspectorInternal({
2305
2591
  onChange: (e) => setCoValueId(e.target.value)
2306
2592
  }
2307
2593
  ) }),
2308
- /* @__PURE__ */ jsx29(DeleteLocalData, {}),
2309
- /* @__PURE__ */ jsx29(Button, { variant: "plain", type: "button", onClick: () => setOpen(false), children: "Close" })
2594
+ /* @__PURE__ */ jsx30(DeleteLocalData, {}),
2595
+ /* @__PURE__ */ jsx30(Button, { variant: "plain", type: "button", onClick: () => setOpen(false), children: "Close" })
2310
2596
  ] }),
2311
- /* @__PURE__ */ jsx29(
2597
+ /* @__PURE__ */ jsx30(
2312
2598
  PageStack,
2313
2599
  {
2314
2600
  path,
2315
2601
  node: localNode,
2316
2602
  goBack,
2317
2603
  addPages,
2318
- children: path.length <= 0 && /* @__PURE__ */ jsxs19(
2604
+ children: path.length <= 0 && /* @__PURE__ */ jsxs20(
2319
2605
  InitialForm,
2320
2606
  {
2321
2607
  onSubmit: handleCoValueIdSubmit,
2322
2608
  "aria-hidden": path.length !== 0,
2323
2609
  children: [
2324
- /* @__PURE__ */ jsx29(Heading, { children: "Jazz CoValue Inspector" }),
2325
- /* @__PURE__ */ jsx29(
2610
+ /* @__PURE__ */ jsx30(Heading, { children: "Jazz CoValue Inspector" }),
2611
+ /* @__PURE__ */ jsx30(
2326
2612
  Input,
2327
2613
  {
2328
2614
  label: "CoValue ID",
@@ -2333,10 +2619,10 @@ function JazzInspectorInternal({
2333
2619
  onChange: (e) => setCoValueId(e.target.value)
2334
2620
  }
2335
2621
  ),
2336
- /* @__PURE__ */ jsx29(Button, { type: "submit", variant: "primary", children: "Inspect CoValue" }),
2337
- accountId && /* @__PURE__ */ jsxs19(Fragment12, { children: [
2338
- /* @__PURE__ */ jsx29(OrText, { children: "or" }),
2339
- /* @__PURE__ */ jsx29(
2622
+ /* @__PURE__ */ jsx30(Button, { type: "submit", variant: "primary", children: "Inspect CoValue" }),
2623
+ accountId && /* @__PURE__ */ jsxs20(Fragment12, { children: [
2624
+ /* @__PURE__ */ jsx30(OrText, { children: "or" }),
2625
+ /* @__PURE__ */ jsx30(
2340
2626
  Button,
2341
2627
  {
2342
2628
  variant: "secondary",
@@ -2356,60 +2642,6 @@ function JazzInspectorInternal({
2356
2642
  ] });
2357
2643
  }
2358
2644
 
2359
- // src/inspector/ui/select.tsx
2360
- import { styled as styled20 } from "goober";
2361
- import { useId as useId2 } from "react";
2362
- import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
2363
- var SelectContainer = styled20("div")`
2364
- display: grid;
2365
- gap: 0.25rem;
2366
- `;
2367
- var SelectWrapper = styled20("div")`
2368
- position: relative;
2369
- display: flex;
2370
- align-items: center;
2371
- `;
2372
- var StyledSelect = styled20("select")`
2373
- width: 100%;
2374
- border-radius: var(--j-radius-md);
2375
- border: 1px solid var(--j-border-color);
2376
- padding: 0.5rem 0.875rem 0.5rem 0.875rem;
2377
- padding-right: 2rem;
2378
- box-shadow: var(--j-shadow-sm);
2379
- font-weight: 500;
2380
- color: var(--j-text-color-strong);
2381
- appearance: none;
2382
- overflow: hidden;
2383
- text-overflow: ellipsis;
2384
- white-space: nowrap;
2385
-
2386
- @media (prefers-color-scheme: dark) {
2387
- background-color: var(--j-foreground);
2388
- }
2389
- `;
2390
- var SelectIcon = styled20("span")`
2391
- position: absolute;
2392
- right: 0.5em;
2393
- color: var(--j-neutral-400);
2394
- pointer-events: none;
2395
-
2396
- @media (prefers-color-scheme: dark) {
2397
- color: var(--j-neutral-900);
2398
- }
2399
- `;
2400
- function Select(props) {
2401
- const { label, hideLabel, id: customId, className, ...selectProps } = props;
2402
- const generatedId = useId2();
2403
- const id = customId || generatedId;
2404
- return /* @__PURE__ */ jsxs20(SelectContainer, { className, children: [
2405
- /* @__PURE__ */ jsx30("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
2406
- /* @__PURE__ */ jsxs20(SelectWrapper, { children: [
2407
- /* @__PURE__ */ jsx30(StyledSelect, { ...selectProps, id, children: props.children }),
2408
- /* @__PURE__ */ jsx30(SelectIcon, { children: /* @__PURE__ */ jsx30(Icon, { name: "chevronDown", size: "sm" }) })
2409
- ] })
2410
- ] });
2411
- }
2412
-
2413
2645
  // src/inspector/index.tsx
2414
2646
  import { setup } from "goober";
2415
2647
  import { useJazzContext } from "jazz-tools/react-core";