jazz-tools 0.18.6 → 0.18.7

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 (84) hide show
  1. package/.turbo/turbo-build.log +49 -49
  2. package/CHANGELOG.md +17 -0
  3. package/dist/better-auth/auth/server.d.ts.map +1 -1
  4. package/dist/better-auth/auth/server.js +8 -4
  5. package/dist/better-auth/auth/server.js.map +1 -1
  6. package/dist/{chunk-45VKEOXG.js → chunk-CFAY3FMQ.js} +70 -21
  7. package/dist/chunk-CFAY3FMQ.js.map +1 -0
  8. package/dist/index.js +1 -1
  9. package/dist/inspector/{custom-element-IBHKHN27.js → custom-element-G6SPZEBR.js} +292 -31
  10. package/dist/inspector/custom-element-G6SPZEBR.js.map +1 -0
  11. package/dist/inspector/index.d.ts +1 -1
  12. package/dist/inspector/index.js +302 -41
  13. package/dist/inspector/index.js.map +1 -1
  14. package/dist/inspector/register-custom-element.js +1 -1
  15. package/dist/inspector/ui/button.d.ts +1 -1
  16. package/dist/inspector/ui/button.d.ts.map +1 -1
  17. package/dist/inspector/ui/heading.d.ts +2 -1
  18. package/dist/inspector/ui/heading.d.ts.map +1 -1
  19. package/dist/inspector/ui/input.d.ts.map +1 -1
  20. package/dist/inspector/ui/modal.d.ts +16 -0
  21. package/dist/inspector/ui/modal.d.ts.map +1 -0
  22. package/dist/inspector/viewer/delete-local-data.d.ts +2 -0
  23. package/dist/inspector/viewer/delete-local-data.d.ts.map +1 -0
  24. package/dist/inspector/viewer/{inpsector-button.d.ts → inspector-button.d.ts} +1 -1
  25. package/dist/inspector/viewer/{inpsector-button.d.ts.map → inspector-button.d.ts.map} +1 -1
  26. package/dist/inspector/viewer/new-app.d.ts +1 -1
  27. package/dist/inspector/viewer/new-app.d.ts.map +1 -1
  28. package/dist/react/hooks.d.ts +1 -1
  29. package/dist/react/hooks.d.ts.map +1 -1
  30. package/dist/react/index.d.ts +1 -1
  31. package/dist/react/index.d.ts.map +1 -1
  32. package/dist/react/index.js +3 -1
  33. package/dist/react/index.js.map +1 -1
  34. package/dist/react-core/hooks.d.ts +133 -0
  35. package/dist/react-core/hooks.d.ts.map +1 -1
  36. package/dist/react-core/index.js +80 -16
  37. package/dist/react-core/index.js.map +1 -1
  38. package/dist/react-core/tests/useCoStateWithSelector.test.d.ts +2 -0
  39. package/dist/react-core/tests/useCoStateWithSelector.test.d.ts.map +1 -0
  40. package/dist/react-native-core/hooks.d.ts +1 -1
  41. package/dist/react-native-core/hooks.d.ts.map +1 -1
  42. package/dist/react-native-core/index.js +3 -1
  43. package/dist/react-native-core/index.js.map +1 -1
  44. package/dist/testing.js +1 -1
  45. package/dist/tools/coValues/CoValueBase.d.ts +14 -0
  46. package/dist/tools/coValues/CoValueBase.d.ts.map +1 -1
  47. package/dist/tools/coValues/coMap.d.ts +0 -12
  48. package/dist/tools/coValues/coMap.d.ts.map +1 -1
  49. package/dist/tools/implementation/createContext.d.ts +2 -1
  50. package/dist/tools/implementation/createContext.d.ts.map +1 -1
  51. package/dist/tools/tests/utils.d.ts.map +1 -1
  52. package/dist/worker/index.d.ts +4 -0
  53. package/dist/worker/index.d.ts.map +1 -1
  54. package/dist/worker/index.js +4 -2
  55. package/dist/worker/index.js.map +1 -1
  56. package/package.json +6 -4
  57. package/src/better-auth/auth/server.ts +8 -4
  58. package/src/better-auth/auth/tests/server.test.ts +2 -2
  59. package/src/inspector/index.tsx +1 -1
  60. package/src/inspector/ui/button.tsx +15 -1
  61. package/src/inspector/ui/heading.tsx +7 -2
  62. package/src/inspector/ui/input.tsx +6 -2
  63. package/src/inspector/ui/modal.tsx +158 -0
  64. package/src/inspector/viewer/delete-local-data.tsx +101 -0
  65. package/src/inspector/viewer/new-app.tsx +3 -1
  66. package/src/react/hooks.tsx +1 -0
  67. package/src/react/index.ts +1 -0
  68. package/src/react-core/hooks.ts +162 -0
  69. package/src/react-core/tests/useCoStateWithSelector.test.ts +149 -0
  70. package/src/react-native-core/hooks.tsx +1 -0
  71. package/src/tools/coValues/CoValueBase.ts +32 -0
  72. package/src/tools/coValues/coList.ts +35 -0
  73. package/src/tools/coValues/coMap.ts +0 -18
  74. package/src/tools/implementation/createContext.ts +9 -2
  75. package/src/tools/tests/coList.test.ts +41 -0
  76. package/src/tools/tests/coPlainText.test.ts +24 -0
  77. package/src/tools/tests/createContext.test.ts +24 -0
  78. package/src/tools/tests/deepLoading.test.ts +2 -0
  79. package/src/tools/tests/patterns/requestToJoin.test.ts +14 -6
  80. package/src/tools/tests/utils.ts +1 -0
  81. package/src/worker/index.ts +6 -0
  82. package/dist/chunk-45VKEOXG.js.map +0 -1
  83. package/dist/inspector/custom-element-IBHKHN27.js.map +0 -1
  84. /package/src/inspector/viewer/{inpsector-button.tsx → inspector-button.tsx} +0 -0
@@ -9,7 +9,7 @@ export { Icon } from "./ui/icon.js";
9
9
  export { GlobalStyles } from "./ui/global-styles.js";
10
10
  export { resolveCoValue, useResolvedCoValue, } from "./viewer/use-resolve-covalue.js";
11
11
  export type { PageInfo } from "./viewer/types.js";
12
- import { Position } from "./viewer/inpsector-button.js";
12
+ import { Position } from "./viewer/inspector-button.js";
13
13
  export declare function JazzInspector({ position }: {
14
14
  position?: Position;
15
15
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -4,8 +4,8 @@
4
4
  import React7 from "react";
5
5
 
6
6
  // src/inspector/viewer/new-app.tsx
7
- import { styled as styled18 } from "goober";
8
- import { useState as useState9 } from "react";
7
+ import { styled as styled19 } from "goober";
8
+ import { useState as useState10 } from "react";
9
9
 
10
10
  // src/inspector/ui/button.tsx
11
11
  import { styled } from "goober";
@@ -32,6 +32,9 @@ var StyledButton = styled("button")`
32
32
  border-color: var(--j-primary-color);
33
33
  color: white;
34
34
  font-weight: 500;
35
+ &:hover {
36
+ opacity: 0.8;
37
+ }
35
38
  `;
36
39
  case "secondary":
37
40
  return `
@@ -50,6 +53,17 @@ var StyledButton = styled("button")`
50
53
  text-decoration: underline;
51
54
  }
52
55
  `;
56
+ case "destructive":
57
+ return `
58
+ padding: 0.375rem 0.75rem;
59
+ background-color: var(--j-destructive-color);
60
+ border-color: var(--j-destructive-color);
61
+ color: white;
62
+ font-weight: 500;
63
+ &:hover {
64
+ opacity: 0.8;
65
+ }
66
+ `;
53
67
  default:
54
68
  return "";
55
69
  }
@@ -95,7 +109,7 @@ var StyledInput = styled2("input")`
95
109
  box-shadow: var(--j-shadow-sm);
96
110
  font-weight: 500;
97
111
  background-color: white;
98
- color: var(--text-color-strong);
112
+ color: var(--j-text-color-strong);
99
113
 
100
114
  @media (prefers-color-scheme: dark) {
101
115
  background-color: var(--j-foreground);
@@ -106,7 +120,15 @@ var Input = forwardRef2(
106
120
  const generatedId = useId();
107
121
  const id = customId || generatedId;
108
122
  return /* @__PURE__ */ jsxs(Container, { className, children: [
109
- /* @__PURE__ */ jsx2("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
123
+ /* @__PURE__ */ jsx2(
124
+ "label",
125
+ {
126
+ htmlFor: id,
127
+ className: hideLabel ? "j-sr-only" : "",
128
+ style: { color: "var(--j-text-color)" },
129
+ children: label
130
+ }
131
+ ),
110
132
  /* @__PURE__ */ jsx2(StyledInput, { ref, ...inputProps, id })
111
133
  ] });
112
134
  }
@@ -196,9 +218,10 @@ var StyledHeading = styled5("h1")`
196
218
  `;
197
219
  function Heading({
198
220
  children,
199
- className
221
+ className,
222
+ id
200
223
  }) {
201
- return /* @__PURE__ */ jsx5(StyledHeading, { className, children });
224
+ return /* @__PURE__ */ jsx5(StyledHeading, { className, id, children });
202
225
  }
203
226
 
204
227
  // src/inspector/ui/text.tsx
@@ -1797,7 +1820,7 @@ var GlobalStyles = styled16("div")`
1797
1820
  }
1798
1821
  `;
1799
1822
 
1800
- // src/inspector/viewer/inpsector-button.tsx
1823
+ // src/inspector/viewer/inspector-button.tsx
1801
1824
  import { styled as styled17 } from "goober";
1802
1825
  import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
1803
1826
  var StyledInspectorButton = styled17("button")`
@@ -1896,9 +1919,246 @@ function useOpenInspector() {
1896
1919
  return [open, setOpen];
1897
1920
  }
1898
1921
 
1922
+ // src/inspector/ui/modal.tsx
1923
+ import { styled as styled18 } from "goober";
1924
+ import { forwardRef as forwardRef3, useEffect as useEffect7, useRef } from "react";
1925
+ import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
1926
+ var ModalContent = styled18("dialog")`
1927
+ background-color: var(--j-background);
1928
+ border-radius: var(--j-radius-lg);
1929
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
1930
+ border: 1px solid var(--j-border-color);
1931
+ max-width: 32rem;
1932
+ margin-block: auto;
1933
+ margin-inline: auto;
1934
+ &::backdrop {
1935
+ background-color: rgba(0, 0, 0, 0.7);
1936
+ }
1937
+
1938
+ `;
1939
+ var ModalHeader = styled18("div")`
1940
+ display: flex;
1941
+ justify-content: space-between;
1942
+ align-items: flex-start;
1943
+ padding: 1.5rem 1.5rem 0 1.5rem;
1944
+ gap: 1rem;
1945
+ `;
1946
+ var ModalBody = styled18("div")`
1947
+ padding: 1rem 1.5rem;
1948
+ flex: 1;
1949
+ `;
1950
+ var ModalFooter = styled18("div")`
1951
+ display: flex;
1952
+ justify-content: flex-end;
1953
+ gap: 0.75rem;
1954
+ padding: 0 1.5rem 1.5rem 1.5rem;
1955
+ `;
1956
+ var CloseButton = styled18("button")`
1957
+ background: none;
1958
+ border: none;
1959
+ cursor: pointer;
1960
+ padding: 0.25rem;
1961
+ border-radius: var(--j-radius-sm);
1962
+ color: var(--j-text-color);
1963
+ font-size: 1.25rem;
1964
+ line-height: 1;
1965
+ display: flex;
1966
+ align-items: center;
1967
+ justify-content: center;
1968
+ min-width: 2rem;
1969
+ min-height: 2rem;
1970
+
1971
+ &:hover {
1972
+ background-color: var(--j-foreground);
1973
+ }
1974
+
1975
+ &:focus-visible {
1976
+ outline: 2px solid var(--j-border-focus);
1977
+ outline-offset: 2px;
1978
+ }
1979
+ `;
1980
+ var Modal = forwardRef3(
1981
+ ({
1982
+ isOpen,
1983
+ onClose,
1984
+ heading,
1985
+ text,
1986
+ children,
1987
+ confirmText = "Confirm",
1988
+ cancelText = "Cancel",
1989
+ onConfirm,
1990
+ onCancel,
1991
+ showButtons = true,
1992
+ className
1993
+ }, ref) => {
1994
+ const modalRef = useRef(null);
1995
+ useEffect7(() => {
1996
+ if (isOpen) {
1997
+ modalRef.current?.showModal();
1998
+ } else {
1999
+ onClose();
2000
+ modalRef.current?.close();
2001
+ }
2002
+ }, [isOpen, onClose]);
2003
+ const handleConfirm = () => {
2004
+ onConfirm?.();
2005
+ onClose();
2006
+ };
2007
+ const handleCancel = () => {
2008
+ onCancel?.();
2009
+ onClose();
2010
+ };
2011
+ if (!isOpen) return null;
2012
+ return /* @__PURE__ */ jsxs16(
2013
+ ModalContent,
2014
+ {
2015
+ ref: ref || modalRef,
2016
+ className,
2017
+ role: "dialog",
2018
+ "aria-labelledby": "modal-heading",
2019
+ onClose,
2020
+ children: [
2021
+ /* @__PURE__ */ jsxs16(ModalHeader, { children: [
2022
+ /* @__PURE__ */ jsx26(Heading, { id: "modal-heading", children: heading }),
2023
+ /* @__PURE__ */ jsx26(CloseButton, { onClick: onClose, "aria-label": "Close modal", type: "button", children: "\xD7" })
2024
+ ] }),
2025
+ /* @__PURE__ */ jsxs16(ModalBody, { children: [
2026
+ text && /* @__PURE__ */ jsx26("p", { style: { margin: "0 0 1rem 0", color: "var(--j-text-color)" }, children: text }),
2027
+ children
2028
+ ] }),
2029
+ showButtons && /* @__PURE__ */ jsxs16(ModalFooter, { children: [
2030
+ /* @__PURE__ */ jsx26(Button, { variant: "secondary", onClick: handleCancel, children: cancelText }),
2031
+ /* @__PURE__ */ jsx26(Button, { variant: "primary", onClick: handleConfirm, children: confirmText })
2032
+ ] })
2033
+ ]
2034
+ }
2035
+ );
2036
+ }
2037
+ );
2038
+ Modal.displayName = "Modal";
2039
+
2040
+ // src/inspector/viewer/delete-local-data.tsx
2041
+ import { useState as useState9 } from "react";
2042
+ import { Fragment as Fragment11, jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
2043
+ var DELETE_LOCAL_DATA_STRING = "delete my local data";
2044
+ function DeleteLocalData() {
2045
+ const [showDeleteModal, setShowDeleteModal] = useState9(false);
2046
+ const [confirmDeleteString, setConfirmDeleteString] = useState9("");
2047
+ return /* @__PURE__ */ jsxs17(Fragment11, { children: [
2048
+ /* @__PURE__ */ jsx27(Button, { variant: "destructive", onClick: () => setShowDeleteModal(true), children: "Delete my local data" }),
2049
+ /* @__PURE__ */ jsxs17(
2050
+ Modal,
2051
+ {
2052
+ isOpen: showDeleteModal,
2053
+ onClose: () => setShowDeleteModal(false),
2054
+ heading: "Delete Local Data",
2055
+ showButtons: false,
2056
+ children: [
2057
+ /* @__PURE__ */ jsxs17(
2058
+ "div",
2059
+ {
2060
+ style: {
2061
+ margin: "0 0 1rem 0",
2062
+ color: "var(--j-text-color)",
2063
+ display: "flex",
2064
+ flexDirection: "column",
2065
+ gap: "0.5rem"
2066
+ },
2067
+ children: [
2068
+ /* @__PURE__ */ jsxs17("p", { children: [
2069
+ "This action ",
2070
+ /* @__PURE__ */ jsx27("strong", { children: "cannot" }),
2071
+ " be undone."
2072
+ ] }),
2073
+ /* @__PURE__ */ jsxs17("p", { children: [
2074
+ "Be aware that the following data will be",
2075
+ " ",
2076
+ /* @__PURE__ */ jsx27("strong", { children: "permanently" }),
2077
+ " deleted:"
2078
+ ] }),
2079
+ /* @__PURE__ */ jsxs17("ul", { style: { listStyleType: "disc", paddingLeft: "1rem" }, children: [
2080
+ /* @__PURE__ */ jsxs17("li", { children: [
2081
+ "Unsynced data for ",
2082
+ /* @__PURE__ */ jsx27("strong", { children: "all apps" }),
2083
+ " on",
2084
+ " ",
2085
+ /* @__PURE__ */ jsx27("code", { children: window.location.origin })
2086
+ ] }),
2087
+ /* @__PURE__ */ jsx27("li", { children: "Accounts" }),
2088
+ /* @__PURE__ */ jsx27("li", { children: "Logged in sessions" })
2089
+ ] }),
2090
+ /* @__PURE__ */ jsx27("p", {})
2091
+ ]
2092
+ }
2093
+ ),
2094
+ /* @__PURE__ */ jsx27(
2095
+ Input,
2096
+ {
2097
+ label: `Type "${DELETE_LOCAL_DATA_STRING}" to confirm`,
2098
+ placeholder: DELETE_LOCAL_DATA_STRING,
2099
+ value: confirmDeleteString,
2100
+ onChange: (e) => {
2101
+ setConfirmDeleteString(e.target.value);
2102
+ }
2103
+ }
2104
+ ),
2105
+ /* @__PURE__ */ jsx27(
2106
+ "p",
2107
+ {
2108
+ style: {
2109
+ margin: "0 0 1rem 0",
2110
+ color: "var(--j-text-color)",
2111
+ display: "flex",
2112
+ flexDirection: "column",
2113
+ gap: "0.5rem"
2114
+ },
2115
+ children: /* @__PURE__ */ jsxs17("small", { children: [
2116
+ "Data synced to a sync server will ",
2117
+ /* @__PURE__ */ jsx27("strong", { children: "not" }),
2118
+ " be deleted, and will be synced when you log in again."
2119
+ ] })
2120
+ }
2121
+ ),
2122
+ /* @__PURE__ */ jsxs17(
2123
+ "div",
2124
+ {
2125
+ style: {
2126
+ display: "flex",
2127
+ marginTop: "0.5rem",
2128
+ justifyContent: "flex-end",
2129
+ gap: "0.5rem"
2130
+ },
2131
+ children: [
2132
+ /* @__PURE__ */ jsx27(Button, { variant: "secondary", onClick: () => setShowDeleteModal(false), children: "Cancel" }),
2133
+ /* @__PURE__ */ jsx27(
2134
+ Button,
2135
+ {
2136
+ variant: "destructive",
2137
+ disabled: confirmDeleteString !== DELETE_LOCAL_DATA_STRING,
2138
+ onClick: () => {
2139
+ const jazzKeys = Object.keys(localStorage).filter(
2140
+ (key) => key.startsWith("jazz-") || key.startsWith("co_z")
2141
+ );
2142
+ jazzKeys.forEach((key) => localStorage.removeItem(key));
2143
+ indexedDB.deleteDatabase("jazz-storage");
2144
+ window.location.reload();
2145
+ setShowDeleteModal(false);
2146
+ },
2147
+ children: "I'm sure, delete my local data"
2148
+ }
2149
+ )
2150
+ ]
2151
+ }
2152
+ )
2153
+ ]
2154
+ }
2155
+ )
2156
+ ] });
2157
+ }
2158
+
1899
2159
  // src/inspector/viewer/new-app.tsx
1900
- import { Fragment as Fragment11, jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
1901
- var InspectorContainer = styled18("div")`
2160
+ import { Fragment as Fragment12, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
2161
+ var InspectorContainer = styled19("div")`
1902
2162
  position: fixed;
1903
2163
  height: 50vh;
1904
2164
  max-height: 800px;
@@ -1915,17 +2175,17 @@ var InspectorContainer = styled18("div")`
1915
2175
  background-color: var(--j-background);
1916
2176
  }
1917
2177
  `;
1918
- var HeaderContainer2 = styled18("div")`
2178
+ var HeaderContainer2 = styled19("div")`
1919
2179
  display: flex;
1920
2180
  align-items: center;
1921
2181
  gap: 1rem;
1922
2182
  padding: 0 0.75rem;
1923
2183
  margin: 0.75rem 0;
1924
2184
  `;
1925
- var Form = styled18("form")`
2185
+ var Form = styled19("form")`
1926
2186
  width: 24rem;
1927
2187
  `;
1928
- var InitialForm = styled18("form")`
2188
+ var InitialForm = styled19("form")`
1929
2189
  display: flex;
1930
2190
  flex-direction: column;
1931
2191
  position: relative;
@@ -1937,7 +2197,7 @@ var InitialForm = styled18("form")`
1937
2197
  max-width: 24rem;
1938
2198
  margin: 0 auto;
1939
2199
  `;
1940
- var OrText = styled18("p")`
2200
+ var OrText = styled19("p")`
1941
2201
  text-align: center;
1942
2202
  `;
1943
2203
  function JazzInspectorInternal({
@@ -1946,7 +2206,7 @@ function JazzInspectorInternal({
1946
2206
  accountId
1947
2207
  }) {
1948
2208
  const [open, setOpen] = useOpenInspector();
1949
- const [coValueId, setCoValueId] = useState9("");
2209
+ const [coValueId, setCoValueId] = useState10("");
1950
2210
  const { path, addPages, goToIndex, goBack, setPage } = usePagePath();
1951
2211
  const handleCoValueIdSubmit = (e) => {
1952
2212
  e.preventDefault();
@@ -1956,12 +2216,12 @@ function JazzInspectorInternal({
1956
2216
  setCoValueId("");
1957
2217
  };
1958
2218
  if (!open) {
1959
- return /* @__PURE__ */ jsx26(InspectorButton, { position, onClick: () => setOpen(true) });
2219
+ return /* @__PURE__ */ jsx28(InspectorButton, { position, onClick: () => setOpen(true) });
1960
2220
  }
1961
- return /* @__PURE__ */ jsxs16(InspectorContainer, { as: GlobalStyles, style: { zIndex: 999 }, children: [
1962
- /* @__PURE__ */ jsxs16(HeaderContainer2, { children: [
1963
- /* @__PURE__ */ jsx26(Breadcrumbs, { path, onBreadcrumbClick: goToIndex }),
1964
- /* @__PURE__ */ jsx26(Form, { onSubmit: handleCoValueIdSubmit, children: path.length !== 0 && /* @__PURE__ */ jsx26(
2221
+ return /* @__PURE__ */ jsxs18(InspectorContainer, { as: GlobalStyles, style: { zIndex: 999 }, children: [
2222
+ /* @__PURE__ */ jsxs18(HeaderContainer2, { children: [
2223
+ /* @__PURE__ */ jsx28(Breadcrumbs, { path, onBreadcrumbClick: goToIndex }),
2224
+ /* @__PURE__ */ jsx28(Form, { onSubmit: handleCoValueIdSubmit, children: path.length !== 0 && /* @__PURE__ */ jsx28(
1965
2225
  Input,
1966
2226
  {
1967
2227
  label: "CoValue ID",
@@ -1972,23 +2232,24 @@ function JazzInspectorInternal({
1972
2232
  onChange: (e) => setCoValueId(e.target.value)
1973
2233
  }
1974
2234
  ) }),
1975
- /* @__PURE__ */ jsx26(Button, { variant: "plain", type: "button", onClick: () => setOpen(false), children: "Close" })
2235
+ /* @__PURE__ */ jsx28(DeleteLocalData, {}),
2236
+ /* @__PURE__ */ jsx28(Button, { variant: "plain", type: "button", onClick: () => setOpen(false), children: "Close" })
1976
2237
  ] }),
1977
- /* @__PURE__ */ jsx26(
2238
+ /* @__PURE__ */ jsx28(
1978
2239
  PageStack,
1979
2240
  {
1980
2241
  path,
1981
2242
  node: localNode,
1982
2243
  goBack,
1983
2244
  addPages,
1984
- children: path.length <= 0 && /* @__PURE__ */ jsxs16(
2245
+ children: path.length <= 0 && /* @__PURE__ */ jsxs18(
1985
2246
  InitialForm,
1986
2247
  {
1987
2248
  onSubmit: handleCoValueIdSubmit,
1988
2249
  "aria-hidden": path.length !== 0,
1989
2250
  children: [
1990
- /* @__PURE__ */ jsx26(Heading, { children: "Jazz CoValue Inspector" }),
1991
- /* @__PURE__ */ jsx26(
2251
+ /* @__PURE__ */ jsx28(Heading, { children: "Jazz CoValue Inspector" }),
2252
+ /* @__PURE__ */ jsx28(
1992
2253
  Input,
1993
2254
  {
1994
2255
  label: "CoValue ID",
@@ -1999,10 +2260,10 @@ function JazzInspectorInternal({
1999
2260
  onChange: (e) => setCoValueId(e.target.value)
2000
2261
  }
2001
2262
  ),
2002
- /* @__PURE__ */ jsx26(Button, { type: "submit", variant: "primary", children: "Inspect CoValue" }),
2003
- accountId && /* @__PURE__ */ jsxs16(Fragment11, { children: [
2004
- /* @__PURE__ */ jsx26(OrText, { children: "or" }),
2005
- /* @__PURE__ */ jsx26(
2263
+ /* @__PURE__ */ jsx28(Button, { type: "submit", variant: "primary", children: "Inspect CoValue" }),
2264
+ accountId && /* @__PURE__ */ jsxs18(Fragment12, { children: [
2265
+ /* @__PURE__ */ jsx28(OrText, { children: "or" }),
2266
+ /* @__PURE__ */ jsx28(
2006
2267
  Button,
2007
2268
  {
2008
2269
  variant: "secondary",
@@ -2023,19 +2284,19 @@ function JazzInspectorInternal({
2023
2284
  }
2024
2285
 
2025
2286
  // src/inspector/ui/select.tsx
2026
- import { styled as styled19 } from "goober";
2287
+ import { styled as styled20 } from "goober";
2027
2288
  import { useId as useId2 } from "react";
2028
- import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
2029
- var SelectContainer = styled19("div")`
2289
+ import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
2290
+ var SelectContainer = styled20("div")`
2030
2291
  display: grid;
2031
2292
  gap: 0.25rem;
2032
2293
  `;
2033
- var SelectWrapper = styled19("div")`
2294
+ var SelectWrapper = styled20("div")`
2034
2295
  position: relative;
2035
2296
  display: flex;
2036
2297
  align-items: center;
2037
2298
  `;
2038
- var StyledSelect = styled19("select")`
2299
+ var StyledSelect = styled20("select")`
2039
2300
  width: 100%;
2040
2301
  border-radius: var(--j-radius-md);
2041
2302
  border: 1px solid var(--j-border-color);
@@ -2053,7 +2314,7 @@ var StyledSelect = styled19("select")`
2053
2314
  background-color: var(--j-foreground);
2054
2315
  }
2055
2316
  `;
2056
- var SelectIcon = styled19("span")`
2317
+ var SelectIcon = styled20("span")`
2057
2318
  position: absolute;
2058
2319
  right: 0.5em;
2059
2320
  color: var(--j-neutral-400);
@@ -2067,11 +2328,11 @@ function Select(props) {
2067
2328
  const { label, hideLabel, id: customId, className, ...selectProps } = props;
2068
2329
  const generatedId = useId2();
2069
2330
  const id = customId || generatedId;
2070
- return /* @__PURE__ */ jsxs17(SelectContainer, { className, children: [
2071
- /* @__PURE__ */ jsx27("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
2072
- /* @__PURE__ */ jsxs17(SelectWrapper, { children: [
2073
- /* @__PURE__ */ jsx27(StyledSelect, { ...selectProps, id, children: props.children }),
2074
- /* @__PURE__ */ jsx27(SelectIcon, { children: /* @__PURE__ */ jsx27(Icon, { name: "chevronDown", size: "sm" }) })
2331
+ return /* @__PURE__ */ jsxs19(SelectContainer, { className, children: [
2332
+ /* @__PURE__ */ jsx29("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
2333
+ /* @__PURE__ */ jsxs19(SelectWrapper, { children: [
2334
+ /* @__PURE__ */ jsx29(StyledSelect, { ...selectProps, id, children: props.children }),
2335
+ /* @__PURE__ */ jsx29(SelectIcon, { children: /* @__PURE__ */ jsx29(Icon, { name: "chevronDown", size: "sm" }) })
2075
2336
  ] })
2076
2337
  ] });
2077
2338
  }
@@ -2079,13 +2340,13 @@ function Select(props) {
2079
2340
  // src/inspector/index.tsx
2080
2341
  import { setup } from "goober";
2081
2342
  import { useJazzContext } from "jazz-tools/react-core";
2082
- import { jsx as jsx28 } from "react/jsx-runtime";
2343
+ import { jsx as jsx30 } from "react/jsx-runtime";
2083
2344
  function JazzInspector({ position = "right" }) {
2084
2345
  const context = useJazzContext();
2085
2346
  const localNode = context.node;
2086
2347
  const me = "me" in context ? context.me : void 0;
2087
2348
  if (process.env.NODE_ENV !== "development") return null;
2088
- return /* @__PURE__ */ jsx28(
2349
+ return /* @__PURE__ */ jsx30(
2089
2350
  JazzInspectorInternal,
2090
2351
  {
2091
2352
  position,