@buoy-gg/zustand 7.0.38 → 7.0.40
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/lib/commonjs/index.js +105 -1
- package/lib/commonjs/preset.js +102 -1
- package/lib/commonjs/zustand/components/ZustandActionButton.js +118 -1
- package/lib/commonjs/zustand/components/ZustandDetailViewToggle.js +48 -1
- package/lib/commonjs/zustand/components/ZustandEventFilterView.js +43 -1
- package/lib/commonjs/zustand/components/ZustandIcon.js +18 -1
- package/lib/commonjs/zustand/components/ZustandModal.js +772 -1
- package/lib/commonjs/zustand/components/ZustandStateChangeItem.js +117 -1
- package/lib/commonjs/zustand/components/ZustandStateDetailContent.js +372 -1
- package/lib/commonjs/zustand/components/ZustandStateInfoView.js +488 -1
- package/lib/commonjs/zustand/components/ZustandStoreBrowser.js +204 -1
- package/lib/commonjs/zustand/components/ZustandStoreDetailContent.js +471 -1
- package/lib/commonjs/zustand/components/ZustandStoreEditorScreen.js +393 -1
- package/lib/commonjs/zustand/hooks/useZustandStateChanges.js +74 -1
- package/lib/commonjs/zustand/sync/zustandSyncAdapter.js +382 -1
- package/lib/commonjs/zustand/utils/buoyZustandMiddleware.js +284 -1
- package/lib/commonjs/zustand/utils/editableState.js +146 -1
- package/lib/commonjs/zustand/utils/snapshotProvider.js +209 -1
- package/lib/commonjs/zustand/utils/testIDs.js +82 -1
- package/lib/commonjs/zustand/utils/zustandStateStore.js +379 -1
- package/lib/module/index.js +90 -1
- package/lib/module/preset.js +98 -1
- package/lib/module/zustand/components/ZustandActionButton.js +114 -1
- package/lib/module/zustand/components/ZustandDetailViewToggle.js +43 -1
- package/lib/module/zustand/components/ZustandEventFilterView.js +39 -1
- package/lib/module/zustand/components/ZustandIcon.js +11 -1
- package/lib/module/zustand/components/ZustandModal.js +767 -1
- package/lib/module/zustand/components/ZustandStateChangeItem.js +113 -1
- package/lib/module/zustand/components/ZustandStateDetailContent.js +368 -1
- package/lib/module/zustand/components/ZustandStateInfoView.js +483 -1
- package/lib/module/zustand/components/ZustandStoreBrowser.js +200 -1
- package/lib/module/zustand/components/ZustandStoreDetailContent.js +469 -1
- package/lib/module/zustand/components/ZustandStoreEditorScreen.js +389 -1
- package/lib/module/zustand/hooks/useZustandStateChanges.js +70 -1
- package/lib/module/zustand/sync/zustandSyncAdapter.js +380 -1
- package/lib/module/zustand/utils/buoyZustandMiddleware.js +278 -1
- package/lib/module/zustand/utils/editableState.js +138 -1
- package/lib/module/zustand/utils/snapshotProvider.js +209 -1
- package/lib/module/zustand/utils/testIDs.js +74 -1
- package/lib/module/zustand/utils/zustandStateStore.js +375 -1
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/preset.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandActionButton.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandDetailViewToggle.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandEventFilterView.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandIcon.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandModal.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandStateChangeItem.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandStateDetailContent.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandStateInfoView.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandStoreBrowser.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandStoreDetailContent.d.ts.map +1 -0
- package/lib/typescript/zustand/components/ZustandStoreEditorScreen.d.ts.map +1 -0
- package/lib/typescript/zustand/hooks/useZustandStateChanges.d.ts.map +1 -0
- package/lib/typescript/zustand/sync/zustandSyncAdapter.d.ts.map +1 -0
- package/lib/typescript/zustand/types/index.d.ts.map +1 -0
- package/lib/typescript/zustand/utils/buoyZustandMiddleware.d.ts.map +1 -0
- package/lib/typescript/zustand/utils/editableState.d.ts.map +1 -0
- package/lib/typescript/zustand/utils/snapshotProvider.d.ts.map +1 -0
- package/lib/typescript/zustand/utils/testIDs.d.ts.map +1 -0
- package/lib/typescript/zustand/utils/zustandStateStore.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -1 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ZustandDetailViewToggle
|
|
5
|
+
*
|
|
6
|
+
* Three-card toggle for switching between Change, State, and Diff views.
|
|
7
|
+
* The cards themselves are the shared `DetailViewToggle`; this file owns
|
|
8
|
+
* the zustand view list and testID prefix.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import React, { memo } from "react";
|
|
12
|
+
import { DetailViewToggle, FileText, Database, GitBranch } from "@buoy-gg/shared-ui";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const VIEWS = [{
|
|
15
|
+
key: "change",
|
|
16
|
+
label: "CHANGE",
|
|
17
|
+
description: "View change details",
|
|
18
|
+
icon: FileText
|
|
19
|
+
}, {
|
|
20
|
+
key: "state",
|
|
21
|
+
label: "STATE",
|
|
22
|
+
description: "View current state",
|
|
23
|
+
icon: Database
|
|
24
|
+
}, {
|
|
25
|
+
key: "diff",
|
|
26
|
+
label: "DIFF",
|
|
27
|
+
description: "Compare changes",
|
|
28
|
+
icon: GitBranch
|
|
29
|
+
}];
|
|
30
|
+
const DIFF_DISABLED = ["diff"];
|
|
31
|
+
export const ZustandDetailViewToggle = /*#__PURE__*/memo(function ZustandDetailViewToggle({
|
|
32
|
+
activeView,
|
|
33
|
+
onViewChange,
|
|
34
|
+
diffDisabled = false
|
|
35
|
+
}) {
|
|
36
|
+
return /*#__PURE__*/_jsx(DetailViewToggle, {
|
|
37
|
+
views: VIEWS,
|
|
38
|
+
activeView: activeView,
|
|
39
|
+
onViewChange: onViewChange,
|
|
40
|
+
disabledKeys: diffDisabled ? DIFF_DISABLED : undefined,
|
|
41
|
+
testIDPrefix: "buoy-zustand"
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -1 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ZustandEventFilterView
|
|
5
|
+
*
|
|
6
|
+
* The shared `EntityFilterView` with zustand's nouns: registered stores you
|
|
7
|
+
* can tap to hide, active store-name patterns, and how it works.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { useMemo } from "react";
|
|
11
|
+
import { EntityFilterView } from "@buoy-gg/shared-ui";
|
|
12
|
+
import { zustandStateStore } from "../utils/zustandStateStore";
|
|
13
|
+
import { ZUSTAND_TEST_ID, slugForTestID } from "../utils/testIDs";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
const EXAMPLES = ["• auth → hides authStore from stores & events", "• temp → hides tempStore, tempUserStore", "• cart → hides cartStore from both tabs"];
|
|
16
|
+
export function ZustandEventFilterView({
|
|
17
|
+
ignoredPatterns,
|
|
18
|
+
onTogglePattern,
|
|
19
|
+
onAddPattern,
|
|
20
|
+
stores
|
|
21
|
+
}) {
|
|
22
|
+
const entities = useMemo(() => stores.map(store => ({
|
|
23
|
+
name: store.name,
|
|
24
|
+
color: zustandStateStore.getStoreColor(store.name)
|
|
25
|
+
})), [stores]);
|
|
26
|
+
return /*#__PURE__*/_jsx(EntityFilterView, {
|
|
27
|
+
entities: entities,
|
|
28
|
+
ignoredPatterns: ignoredPatterns,
|
|
29
|
+
onTogglePattern: onTogglePattern,
|
|
30
|
+
onAddPattern: onAddPattern,
|
|
31
|
+
entityNoun: "STORES",
|
|
32
|
+
entitySingular: "store",
|
|
33
|
+
entityKey: "store",
|
|
34
|
+
testIDPrefix: ZUSTAND_TEST_ID,
|
|
35
|
+
slug: slugForTestID,
|
|
36
|
+
howItWorks: "Patterns hide matching stores from both the Stores tab and the Events tab. Tap a store above to quickly add it as a filter.",
|
|
37
|
+
examples: EXAMPLES
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ZustandIcon — re-exported from the Buoy Icon Format.
|
|
5
|
+
*
|
|
6
|
+
* The artwork lives in shared/icons/zustand.json and is generated into
|
|
7
|
+
* @buoy-gg/floating-tools-core, so React Native, the desktop dashboard and
|
|
8
|
+
* Flutter all render the same drawing. Edit the JSON, then `pnpm icons`.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export { ZustandIcon, ZUSTAND_ICON_COLOR } from "@buoy-gg/shared-ui";
|