jazz-tools 0.15.0 → 0.15.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/.turbo/turbo-build.log +44 -44
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-FSIM7N33.js → chunk-VBDJM6Z5.js} +142 -31
- package/dist/chunk-VBDJM6Z5.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/inspector/index.js +30 -4
- package/dist/inspector/index.js.map +1 -1
- package/dist/inspector/viewer/new-app.d.ts.map +1 -1
- package/dist/inspector/viewer/use-open-inspector.d.ts +2 -0
- package/dist/inspector/viewer/use-open-inspector.d.ts.map +1 -0
- package/dist/inspector/viewer/use-page-path.d.ts.map +1 -1
- package/dist/react/index.js +0 -2
- package/dist/react/index.js.map +1 -1
- package/dist/react/testing.js +0 -2
- package/dist/react/testing.js.map +1 -1
- package/dist/react-native-core/index.js +2 -18
- package/dist/react-native-core/index.js.map +1 -1
- package/dist/react-native-core/media.d.ts.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/tools/coValues/coFeed.d.ts +9 -0
- package/dist/tools/coValues/coFeed.d.ts.map +1 -1
- package/dist/tools/coValues/coMap.d.ts +98 -2
- package/dist/tools/coValues/coMap.d.ts.map +1 -1
- package/dist/tools/coValues/interfaces.d.ts +3 -0
- package/dist/tools/coValues/interfaces.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts +12 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/zodCo.d.ts.map +1 -1
- package/dist/tools/subscribe/CoValueCoreSubscription.d.ts +2 -1
- package/dist/tools/subscribe/CoValueCoreSubscription.d.ts.map +1 -1
- package/dist/tools/subscribe/SubscriptionScope.d.ts +2 -1
- package/dist/tools/subscribe/SubscriptionScope.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/inspector/viewer/new-app.tsx +2 -1
- package/src/inspector/viewer/use-open-inspector.ts +18 -0
- package/src/inspector/viewer/use-page-path.ts +14 -1
- package/src/react-native-core/media.tsx +2 -22
- package/src/tools/coValues/coFeed.ts +38 -0
- package/src/tools/coValues/coMap.ts +118 -14
- package/src/tools/coValues/interfaces.ts +14 -4
- package/src/tools/implementation/zodSchema/schemaTypes/CoMapSchema.ts +38 -0
- package/src/tools/implementation/zodSchema/zodCo.ts +6 -0
- package/src/tools/subscribe/CoValueCoreSubscription.ts +12 -9
- package/src/tools/subscribe/SubscriptionScope.ts +31 -19
- package/src/tools/tests/coFeed.test.ts +69 -0
- package/src/tools/tests/coMap.test.ts +480 -4
- package/src/tools/tests/load.test.ts +2 -1
- package/dist/chunk-FSIM7N33.js.map +0 -1
package/dist/index.js
CHANGED
package/dist/inspector/index.js
CHANGED
@@ -6,7 +6,7 @@ import React7 from "react";
|
|
6
6
|
// src/inspector/viewer/new-app.tsx
|
7
7
|
import { styled as styled18 } from "goober";
|
8
8
|
import { useJazzContext } from "jazz-tools/react-core";
|
9
|
-
import { useState as
|
9
|
+
import { useState as useState9 } from "react";
|
10
10
|
|
11
11
|
// src/inspector/ui/button.tsx
|
12
12
|
import { styled } from "goober";
|
@@ -1611,10 +1611,22 @@ function PageStack({
|
|
1611
1611
|
|
1612
1612
|
// src/inspector/viewer/use-page-path.ts
|
1613
1613
|
import { useCallback, useEffect as useEffect5, useState as useState7 } from "react";
|
1614
|
+
var STORAGE_KEY = "jazz-inspector-paths";
|
1614
1615
|
function usePagePath(defaultPath) {
|
1615
|
-
const [path, setPath] = useState7(
|
1616
|
+
const [path, setPath] = useState7(() => {
|
1617
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
1618
|
+
if (stored) {
|
1619
|
+
try {
|
1620
|
+
return JSON.parse(stored);
|
1621
|
+
} catch (e) {
|
1622
|
+
console.warn("Failed to parse stored path:", e);
|
1623
|
+
}
|
1624
|
+
}
|
1625
|
+
return defaultPath || [];
|
1626
|
+
});
|
1616
1627
|
const updatePath = useCallback((newPath) => {
|
1617
1628
|
setPath(newPath);
|
1629
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(newPath));
|
1618
1630
|
}, []);
|
1619
1631
|
useEffect5(() => {
|
1620
1632
|
if (defaultPath && JSON.stringify(path) !== JSON.stringify(defaultPath)) {
|
@@ -1813,6 +1825,20 @@ function InspectorButton({
|
|
1813
1825
|
] });
|
1814
1826
|
}
|
1815
1827
|
|
1828
|
+
// src/inspector/viewer/use-open-inspector.ts
|
1829
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
1830
|
+
var STORAGE_KEY2 = "jazz-inspector-open";
|
1831
|
+
function useOpenInspector() {
|
1832
|
+
const [open, setOpen] = useState8(() => {
|
1833
|
+
const stored = localStorage.getItem(STORAGE_KEY2);
|
1834
|
+
return stored ? JSON.parse(stored) : false;
|
1835
|
+
});
|
1836
|
+
useEffect6(() => {
|
1837
|
+
localStorage.setItem(STORAGE_KEY2, JSON.stringify(open));
|
1838
|
+
}, [open]);
|
1839
|
+
return [open, setOpen];
|
1840
|
+
}
|
1841
|
+
|
1816
1842
|
// src/inspector/viewer/new-app.tsx
|
1817
1843
|
import { Fragment as Fragment10, jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
1818
1844
|
var InspectorContainer = styled18("div")`
|
@@ -1876,8 +1902,8 @@ function JazzInspectorInternal({
|
|
1876
1902
|
localNode,
|
1877
1903
|
accountId
|
1878
1904
|
}) {
|
1879
|
-
const [open, setOpen] =
|
1880
|
-
const [coValueId, setCoValueId] =
|
1905
|
+
const [open, setOpen] = useOpenInspector();
|
1906
|
+
const [coValueId, setCoValueId] = useState9("");
|
1881
1907
|
const { path, addPages, goToIndex, goBack, setPage } = usePagePath();
|
1882
1908
|
const handleCoValueIdSubmit = (e) => {
|
1883
1909
|
e.preventDefault();
|