@buoy-gg/zustand 7.0.38 → 7.0.39

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 (62) hide show
  1. package/lib/commonjs/index.js +105 -1
  2. package/lib/commonjs/preset.js +102 -1
  3. package/lib/commonjs/zustand/components/ZustandActionButton.js +118 -1
  4. package/lib/commonjs/zustand/components/ZustandDetailViewToggle.js +48 -1
  5. package/lib/commonjs/zustand/components/ZustandEventFilterView.js +43 -1
  6. package/lib/commonjs/zustand/components/ZustandIcon.js +18 -1
  7. package/lib/commonjs/zustand/components/ZustandModal.js +772 -1
  8. package/lib/commonjs/zustand/components/ZustandStateChangeItem.js +117 -1
  9. package/lib/commonjs/zustand/components/ZustandStateDetailContent.js +372 -1
  10. package/lib/commonjs/zustand/components/ZustandStateInfoView.js +488 -1
  11. package/lib/commonjs/zustand/components/ZustandStoreBrowser.js +204 -1
  12. package/lib/commonjs/zustand/components/ZustandStoreDetailContent.js +471 -1
  13. package/lib/commonjs/zustand/components/ZustandStoreEditorScreen.js +393 -1
  14. package/lib/commonjs/zustand/hooks/useZustandStateChanges.js +74 -1
  15. package/lib/commonjs/zustand/sync/zustandSyncAdapter.js +382 -1
  16. package/lib/commonjs/zustand/utils/buoyZustandMiddleware.js +284 -1
  17. package/lib/commonjs/zustand/utils/editableState.js +146 -1
  18. package/lib/commonjs/zustand/utils/snapshotProvider.js +209 -1
  19. package/lib/commonjs/zustand/utils/testIDs.js +82 -1
  20. package/lib/commonjs/zustand/utils/zustandStateStore.js +379 -1
  21. package/lib/module/index.js +90 -1
  22. package/lib/module/preset.js +98 -1
  23. package/lib/module/zustand/components/ZustandActionButton.js +114 -1
  24. package/lib/module/zustand/components/ZustandDetailViewToggle.js +43 -1
  25. package/lib/module/zustand/components/ZustandEventFilterView.js +39 -1
  26. package/lib/module/zustand/components/ZustandIcon.js +11 -1
  27. package/lib/module/zustand/components/ZustandModal.js +767 -1
  28. package/lib/module/zustand/components/ZustandStateChangeItem.js +113 -1
  29. package/lib/module/zustand/components/ZustandStateDetailContent.js +368 -1
  30. package/lib/module/zustand/components/ZustandStateInfoView.js +483 -1
  31. package/lib/module/zustand/components/ZustandStoreBrowser.js +200 -1
  32. package/lib/module/zustand/components/ZustandStoreDetailContent.js +469 -1
  33. package/lib/module/zustand/components/ZustandStoreEditorScreen.js +389 -1
  34. package/lib/module/zustand/hooks/useZustandStateChanges.js +70 -1
  35. package/lib/module/zustand/sync/zustandSyncAdapter.js +380 -1
  36. package/lib/module/zustand/utils/buoyZustandMiddleware.js +278 -1
  37. package/lib/module/zustand/utils/editableState.js +138 -1
  38. package/lib/module/zustand/utils/snapshotProvider.js +209 -1
  39. package/lib/module/zustand/utils/testIDs.js +74 -1
  40. package/lib/module/zustand/utils/zustandStateStore.js +375 -1
  41. package/lib/typescript/index.d.ts.map +1 -0
  42. package/lib/typescript/preset.d.ts.map +1 -0
  43. package/lib/typescript/zustand/components/ZustandActionButton.d.ts.map +1 -0
  44. package/lib/typescript/zustand/components/ZustandDetailViewToggle.d.ts.map +1 -0
  45. package/lib/typescript/zustand/components/ZustandEventFilterView.d.ts.map +1 -0
  46. package/lib/typescript/zustand/components/ZustandIcon.d.ts.map +1 -0
  47. package/lib/typescript/zustand/components/ZustandModal.d.ts.map +1 -0
  48. package/lib/typescript/zustand/components/ZustandStateChangeItem.d.ts.map +1 -0
  49. package/lib/typescript/zustand/components/ZustandStateDetailContent.d.ts.map +1 -0
  50. package/lib/typescript/zustand/components/ZustandStateInfoView.d.ts.map +1 -0
  51. package/lib/typescript/zustand/components/ZustandStoreBrowser.d.ts.map +1 -0
  52. package/lib/typescript/zustand/components/ZustandStoreDetailContent.d.ts.map +1 -0
  53. package/lib/typescript/zustand/components/ZustandStoreEditorScreen.d.ts.map +1 -0
  54. package/lib/typescript/zustand/hooks/useZustandStateChanges.d.ts.map +1 -0
  55. package/lib/typescript/zustand/sync/zustandSyncAdapter.d.ts.map +1 -0
  56. package/lib/typescript/zustand/types/index.d.ts.map +1 -0
  57. package/lib/typescript/zustand/utils/buoyZustandMiddleware.d.ts.map +1 -0
  58. package/lib/typescript/zustand/utils/editableState.d.ts.map +1 -0
  59. package/lib/typescript/zustand/utils/snapshotProvider.d.ts.map +1 -0
  60. package/lib/typescript/zustand/utils/testIDs.d.ts.map +1 -0
  61. package/lib/typescript/zustand/utils/zustandStateStore.d.ts.map +1 -0
  62. package/package.json +3 -3
@@ -1 +1,43 @@
1
- "use strict";import React,{memo}from"react";import{DetailViewToggle,FileText,Database,GitBranch}from"@buoy-gg/shared-ui";import{jsx as _jsx}from"react/jsx-runtime";const VIEWS=[{key:"change",label:"CHANGE",description:"View change details",icon:FileText},{key:"state",label:"STATE",description:"View current state",icon:Database},{key:"diff",label:"DIFF",description:"Compare changes",icon:GitBranch}],DIFF_DISABLED=["diff"];export const ZustandDetailViewToggle=memo(function({activeView:e,onViewChange:i,diffDisabled:t=!1}){return _jsx(DetailViewToggle,{views:VIEWS,activeView:e,onViewChange:i,disabledKeys:t?DIFF_DISABLED:void 0,testIDPrefix:"buoy-zustand"})});
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";import{useMemo}from"react";import{EntityFilterView}from"@buoy-gg/shared-ui";import{zustandStateStore}from"../utils/zustandStateStore";import{ZUSTAND_TEST_ID,slugForTestID}from"../utils/testIDs";import{jsx as _jsx}from"react/jsx-runtime";const EXAMPLES=["• auth → hides authStore from stores & events","• temp → hides tempStore, tempUserStore","• cart → hides cartStore from both tabs"];export function ZustandEventFilterView({ignoredPatterns:t,onTogglePattern:e,onAddPattern:r,stores:o}){const s=useMemo(()=>o.map(t=>({name:t.name,color:zustandStateStore.getStoreColor(t.name)})),[o]);return _jsx(EntityFilterView,{entities:s,ignoredPatterns:t,onTogglePattern:e,onAddPattern:r,entityNoun:"STORES",entitySingular:"store",entityKey:"store",testIDPrefix:ZUSTAND_TEST_ID,slug:slugForTestID,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.",examples:EXAMPLES})}
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";export{ZustandIcon,ZUSTAND_ICON_COLOR}from"@buoy-gg/shared-ui";
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";