@buoy-gg/shared-ui 7.0.33 → 7.0.35
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/JsModal.js +57 -22
- package/lib/commonjs/dataViewer/CyberpunkInput.js +3 -2
- package/lib/commonjs/dataViewer/DataTreeActionBar.js +3 -2
- package/lib/commonjs/dataViewer/DataTreeActionDock.js +2 -1
- package/lib/commonjs/dataViewer/DiffSummary.js +4 -3
- package/lib/commonjs/dataViewer/LiveExplorer.js +11 -10
- package/lib/commonjs/dataViewer/SplitDiffViewer.js +10 -9
- package/lib/commonjs/dataViewer/ThemedSplitView.js +12 -11
- package/lib/commonjs/dataViewer/ValueEditModal.js +6 -5
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +4 -3
- package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +15 -14
- package/lib/commonjs/hooks/index.js +26 -0
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/hooks/useChangeLog.js +55 -0
- package/lib/commonjs/hooks/useEventStoreEvents.js +65 -0
- package/lib/commonjs/hooks/usePersistedState.js +45 -10
- package/lib/commonjs/icons/index.js +533 -1
- package/lib/commonjs/index.js +143 -0
- package/lib/commonjs/license/FreeAccountPrompt.js +2 -1
- package/lib/commonjs/license/LicenseEntryModal.js +2 -1
- package/lib/commonjs/storage/definePersistedSetting.js +67 -0
- package/lib/commonjs/storage/index.js +8 -1
- package/lib/commonjs/stores/ChangeLog.js +197 -0
- package/lib/commonjs/stores/createToolStore.js +175 -0
- package/lib/commonjs/stores/index.js +15 -1
- package/lib/commonjs/sync/toolSyncAdapter.js +63 -0
- package/lib/commonjs/sync/wireForm.js +172 -0
- package/lib/commonjs/tools/defineTool.js +79 -0
- package/lib/commonjs/ui/components/ChangeRow.js +111 -0
- package/lib/commonjs/ui/components/ChipStrip.js +94 -0
- package/lib/commonjs/ui/components/ClipboardHintBanner.js +2 -1
- package/lib/commonjs/ui/components/CompactRow.js +3 -2
- package/lib/commonjs/ui/components/DataInspector.js +3 -2
- package/lib/commonjs/ui/components/DetailView.js +2 -1
- package/lib/commonjs/ui/components/DetailViewToggle.js +130 -0
- package/lib/commonjs/ui/components/DevToolsCard.js +3 -1
- package/lib/commonjs/ui/components/DynamicFilterView.js +8 -7
- package/lib/commonjs/ui/components/EntityFilterView.js +355 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/CompareBar.js +5 -4
- package/lib/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.js +2 -1
- package/lib/commonjs/ui/components/EventHistoryViewer/EventPickerModal.js +5 -4
- package/lib/commonjs/ui/components/EventStepperFooter.js +4 -3
- package/lib/commonjs/ui/components/ExpandablePopover.js +12 -4
- package/lib/commonjs/ui/components/ExpandedInfoRow.js +3 -2
- package/lib/commonjs/ui/components/ExportPreview.js +174 -0
- package/lib/commonjs/ui/components/FilterComponents.js +2 -1
- package/lib/commonjs/ui/components/InfoRow.js +91 -0
- package/lib/commonjs/ui/components/ModalHeader.js +40 -7
- package/lib/commonjs/ui/components/Pill.js +115 -0
- package/lib/commonjs/ui/components/ToggleRow.js +116 -0
- package/lib/commonjs/ui/components/ToolFooter.js +205 -0
- package/lib/commonjs/ui/components/index.js +100 -1
- package/lib/commonjs/ui/console/CyberpunkSectionButton.js +3 -2
- package/lib/commonjs/ui/fonts.js +12 -0
- package/lib/commonjs/ui/gameUI/components/GameUICollapsibleSection.js +4 -3
- package/lib/commonjs/ui/gameUI/components/GameUICompactStats.js +12 -11
- package/lib/commonjs/ui/gameUI/components/GameUIIssuesList.js +9 -8
- package/lib/commonjs/ui/gameUI/components/GameUIStatusHeader.js +4 -3
- package/lib/commonjs/ui/index.js +32 -2
- package/lib/commonjs/ui/listPresets.js +43 -0
- package/lib/commonjs/ui/night/primitives.js +3 -1
- package/lib/commonjs/ui/toolTheme.js +4 -3
- package/lib/commonjs/utils/snapshotProviderKit.js +167 -0
- package/lib/commonjs/utils/stateTools.js +160 -0
- package/lib/module/JsModal.js +57 -22
- package/lib/module/dataViewer/CyberpunkInput.js +3 -2
- package/lib/module/dataViewer/DataTreeActionBar.js +3 -2
- package/lib/module/dataViewer/DataTreeActionDock.js +2 -1
- package/lib/module/dataViewer/DiffSummary.js +4 -3
- package/lib/module/dataViewer/LiveExplorer.js +11 -11
- package/lib/module/dataViewer/SplitDiffViewer.js +10 -9
- package/lib/module/dataViewer/ThemedSplitView.js +12 -11
- package/lib/module/dataViewer/ValueEditModal.js +6 -5
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +5 -4
- package/lib/module/dataViewer/tree/TreeDiffViewer.js +15 -15
- package/lib/module/hooks/index.js +3 -1
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/hooks/useChangeLog.js +50 -0
- package/lib/module/hooks/useEventStoreEvents.js +61 -0
- package/lib/module/hooks/usePersistedState.js +44 -10
- package/lib/module/icons/index.js +27 -2
- package/lib/module/index.js +11 -1
- package/lib/module/license/FreeAccountPrompt.js +2 -2
- package/lib/module/license/LicenseEntryModal.js +3 -3
- package/lib/module/storage/definePersistedSetting.js +63 -0
- package/lib/module/storage/index.js +2 -1
- package/lib/module/stores/ChangeLog.js +192 -0
- package/lib/module/stores/createToolStore.js +171 -0
- package/lib/module/stores/index.js +3 -1
- package/lib/module/sync/toolSyncAdapter.js +58 -0
- package/lib/module/sync/wireForm.js +159 -0
- package/lib/module/tools/defineTool.js +74 -0
- package/lib/module/ui/components/ChangeRow.js +106 -0
- package/lib/module/ui/components/ChipStrip.js +91 -0
- package/lib/module/ui/components/ClipboardHintBanner.js +2 -1
- package/lib/module/ui/components/CompactRow.js +3 -2
- package/lib/module/ui/components/DataInspector.js +3 -2
- package/lib/module/ui/components/DetailView.js +2 -1
- package/lib/module/ui/components/DetailViewToggle.js +125 -0
- package/lib/module/ui/components/DevToolsCard.js +3 -1
- package/lib/module/ui/components/DynamicFilterView.js +8 -7
- package/lib/module/ui/components/EntityFilterView.js +351 -0
- package/lib/module/ui/components/EventHistoryViewer/CompareBar.js +6 -5
- package/lib/module/ui/components/EventHistoryViewer/DiffModeTabs.js +3 -2
- package/lib/module/ui/components/EventHistoryViewer/EventPickerModal.js +6 -5
- package/lib/module/ui/components/EventStepperFooter.js +4 -3
- package/lib/module/ui/components/ExpandablePopover.js +12 -4
- package/lib/module/ui/components/ExpandedInfoRow.js +3 -2
- package/lib/module/ui/components/ExportPreview.js +169 -0
- package/lib/module/ui/components/FilterComponents.js +2 -2
- package/lib/module/ui/components/InfoRow.js +87 -0
- package/lib/module/ui/components/ModalHeader.js +40 -7
- package/lib/module/ui/components/Pill.js +111 -0
- package/lib/module/ui/components/ToggleRow.js +112 -0
- package/lib/module/ui/components/ToolFooter.js +197 -0
- package/lib/module/ui/components/index.js +10 -1
- package/lib/module/ui/console/CyberpunkSectionButton.js +3 -2
- package/lib/module/ui/fonts.js +8 -0
- package/lib/module/ui/gameUI/components/GameUICollapsibleSection.js +4 -3
- package/lib/module/ui/gameUI/components/GameUICompactStats.js +12 -11
- package/lib/module/ui/gameUI/components/GameUIIssuesList.js +9 -8
- package/lib/module/ui/gameUI/components/GameUIStatusHeader.js +4 -3
- package/lib/module/ui/index.js +7 -1
- package/lib/module/ui/listPresets.js +39 -0
- package/lib/module/ui/night/primitives.js +3 -1
- package/lib/module/ui/toolTheme.js +4 -4
- package/lib/module/utils/snapshotProviderKit.js +156 -0
- package/lib/module/utils/stateTools.js +154 -0
- package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/CyberpunkInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/DataTreeActionBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/DiffSummary.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/SplitDiffViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/ThemedSplitView.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/ValueEditModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/index.d.ts +3 -1
- package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/hooks/useChangeLog.d.ts +38 -0
- package/lib/typescript/commonjs/hooks/useChangeLog.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useEventStoreEvents.d.ts +25 -0
- package/lib/typescript/commonjs/hooks/useEventStoreEvents.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/usePersistedState.d.ts +34 -5
- package/lib/typescript/commonjs/hooks/usePersistedState.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/index.d.ts +4 -1
- package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +6 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/storage/definePersistedSetting.d.ts +39 -0
- package/lib/typescript/commonjs/storage/definePersistedSetting.d.ts.map +1 -0
- package/lib/typescript/commonjs/storage/index.d.ts +1 -0
- package/lib/typescript/commonjs/storage/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/stores/ChangeLog.d.ts +100 -0
- package/lib/typescript/commonjs/stores/ChangeLog.d.ts.map +1 -0
- package/lib/typescript/commonjs/stores/createToolStore.d.ts +92 -0
- package/lib/typescript/commonjs/stores/createToolStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/stores/index.d.ts +2 -0
- package/lib/typescript/commonjs/stores/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/sync/toolSyncAdapter.d.ts +66 -0
- package/lib/typescript/commonjs/sync/toolSyncAdapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/sync/wireForm.d.ts +100 -0
- package/lib/typescript/commonjs/sync/wireForm.d.ts.map +1 -0
- package/lib/typescript/commonjs/tools/defineTool.d.ts +100 -0
- package/lib/typescript/commonjs/tools/defineTool.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ChangeRow.d.ts +52 -0
- package/lib/typescript/commonjs/ui/components/ChangeRow.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ChipStrip.d.ts +41 -0
- package/lib/typescript/commonjs/ui/components/ChipStrip.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ClipboardHintBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/DataInspector.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/DetailView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/DetailViewToggle.d.ts +36 -0
- package/lib/typescript/commonjs/ui/components/DetailViewToggle.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts +8 -1
- package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/EntityFilterView.d.ts +51 -0
- package/lib/typescript/commonjs/ui/components/EntityFilterView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/CompareBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ExpandablePopover.d.ts +5 -1
- package/lib/typescript/commonjs/ui/components/ExpandablePopover.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ExportPreview.d.ts +48 -0
- package/lib/typescript/commonjs/ui/components/ExportPreview.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/FilterComponents.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/InfoRow.d.ts +33 -0
- package/lib/typescript/commonjs/ui/components/InfoRow.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts +31 -1
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/Pill.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/Pill.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ToggleRow.d.ts +33 -0
- package/lib/typescript/commonjs/ui/components/ToggleRow.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ToolFooter.d.ts +69 -0
- package/lib/typescript/commonjs/ui/components/ToolFooter.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/index.d.ts +9 -0
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/console/CyberpunkSectionButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/fonts.d.ts +7 -0
- package/lib/typescript/commonjs/ui/fonts.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/gameUI/components/GameUICompactStats.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/gameUI/components/GameUIIssuesList.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/gameUI/components/GameUIStatusHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +2 -0
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/listPresets.d.ts +28 -0
- package/lib/typescript/commonjs/ui/listPresets.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/night/primitives.d.ts +3 -1
- package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/toolTheme.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/snapshotProviderKit.d.ts +81 -0
- package/lib/typescript/commonjs/utils/snapshotProviderKit.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/stateTools.d.ts +44 -0
- package/lib/typescript/commonjs/utils/stateTools.d.ts.map +1 -0
- package/lib/typescript/module/JsModal.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/CyberpunkInput.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/DataTreeActionBar.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/DiffSummary.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/LiveExplorer.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/SplitDiffViewer.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/ThemedSplitView.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/ValueEditModal.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/module/hooks/index.d.ts +3 -1
- package/lib/typescript/module/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/hooks/useChangeLog.d.ts +38 -0
- package/lib/typescript/module/hooks/useChangeLog.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useEventStoreEvents.d.ts +25 -0
- package/lib/typescript/module/hooks/useEventStoreEvents.d.ts.map +1 -0
- package/lib/typescript/module/hooks/usePersistedState.d.ts +34 -5
- package/lib/typescript/module/hooks/usePersistedState.d.ts.map +1 -1
- package/lib/typescript/module/icons/index.d.ts +4 -1
- package/lib/typescript/module/icons/index.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +6 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -1
- package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -1
- package/lib/typescript/module/storage/definePersistedSetting.d.ts +39 -0
- package/lib/typescript/module/storage/definePersistedSetting.d.ts.map +1 -0
- package/lib/typescript/module/storage/index.d.ts +1 -0
- package/lib/typescript/module/storage/index.d.ts.map +1 -1
- package/lib/typescript/module/stores/ChangeLog.d.ts +100 -0
- package/lib/typescript/module/stores/ChangeLog.d.ts.map +1 -0
- package/lib/typescript/module/stores/createToolStore.d.ts +92 -0
- package/lib/typescript/module/stores/createToolStore.d.ts.map +1 -0
- package/lib/typescript/module/stores/index.d.ts +2 -0
- package/lib/typescript/module/stores/index.d.ts.map +1 -1
- package/lib/typescript/module/sync/toolSyncAdapter.d.ts +66 -0
- package/lib/typescript/module/sync/toolSyncAdapter.d.ts.map +1 -0
- package/lib/typescript/module/sync/wireForm.d.ts +100 -0
- package/lib/typescript/module/sync/wireForm.d.ts.map +1 -0
- package/lib/typescript/module/tools/defineTool.d.ts +100 -0
- package/lib/typescript/module/tools/defineTool.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ChangeRow.d.ts +52 -0
- package/lib/typescript/module/ui/components/ChangeRow.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ChipStrip.d.ts +41 -0
- package/lib/typescript/module/ui/components/ChipStrip.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ClipboardHintBanner.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/DataInspector.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/DetailView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/DetailViewToggle.d.ts +36 -0
- package/lib/typescript/module/ui/components/DetailViewToggle.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/DevToolsCard.d.ts +8 -1
- package/lib/typescript/module/ui/components/DevToolsCard.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/EntityFilterView.d.ts +51 -0
- package/lib/typescript/module/ui/components/EntityFilterView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/CompareBar.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ExpandablePopover.d.ts +5 -1
- package/lib/typescript/module/ui/components/ExpandablePopover.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ExportPreview.d.ts +48 -0
- package/lib/typescript/module/ui/components/ExportPreview.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/FilterComponents.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/InfoRow.d.ts +33 -0
- package/lib/typescript/module/ui/components/InfoRow.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ModalHeader.d.ts +31 -1
- package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Pill.d.ts +38 -0
- package/lib/typescript/module/ui/components/Pill.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ToggleRow.d.ts +33 -0
- package/lib/typescript/module/ui/components/ToggleRow.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ToolFooter.d.ts +69 -0
- package/lib/typescript/module/ui/components/ToolFooter.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/index.d.ts +9 -0
- package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/console/CyberpunkSectionButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/fonts.d.ts +7 -0
- package/lib/typescript/module/ui/fonts.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/gameUI/components/GameUICompactStats.d.ts.map +1 -1
- package/lib/typescript/module/ui/gameUI/components/GameUIIssuesList.d.ts.map +1 -1
- package/lib/typescript/module/ui/gameUI/components/GameUIStatusHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +2 -0
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/listPresets.d.ts +28 -0
- package/lib/typescript/module/ui/listPresets.d.ts.map +1 -0
- package/lib/typescript/module/ui/night/primitives.d.ts +3 -1
- package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/toolTheme.d.ts.map +1 -1
- package/lib/typescript/module/utils/snapshotProviderKit.d.ts +81 -0
- package/lib/typescript/module/utils/snapshotProviderKit.d.ts.map +1 -0
- package/lib/typescript/module/utils/stateTools.d.ts +44 -0
- package/lib/typescript/module/utils/stateTools.d.ts.map +1 -0
- package/package.json +4 -4
package/lib/commonjs/ui/index.js
CHANGED
|
@@ -5,14 +5,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
toolTheme: true,
|
|
8
|
-
|
|
8
|
+
monoFont: true,
|
|
9
|
+
CyberpunkSectionButton: true,
|
|
10
|
+
EVENT_LIST_PRESET: true,
|
|
11
|
+
LOG_LIST_PRESET: true,
|
|
12
|
+
CLIP_OFFSCREEN_CELLS: true
|
|
9
13
|
};
|
|
14
|
+
Object.defineProperty(exports, "CLIP_OFFSCREEN_CELLS", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return _listPresets.CLIP_OFFSCREEN_CELLS;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
10
20
|
Object.defineProperty(exports, "CyberpunkSectionButton", {
|
|
11
21
|
enumerable: true,
|
|
12
22
|
get: function () {
|
|
13
23
|
return _CyberpunkSectionButton.CyberpunkSectionButton;
|
|
14
24
|
}
|
|
15
25
|
});
|
|
26
|
+
Object.defineProperty(exports, "EVENT_LIST_PRESET", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return _listPresets.EVENT_LIST_PRESET;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "LOG_LIST_PRESET", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _listPresets.LOG_LIST_PRESET;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "monoFont", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _fonts.monoFont;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
16
44
|
Object.defineProperty(exports, "toolTheme", {
|
|
17
45
|
enumerable: true,
|
|
18
46
|
get: function () {
|
|
@@ -44,6 +72,7 @@ Object.keys(_index2).forEach(function (key) {
|
|
|
44
72
|
});
|
|
45
73
|
});
|
|
46
74
|
var _toolTheme = require("./toolTheme.js");
|
|
75
|
+
var _fonts = require("./fonts.js");
|
|
47
76
|
var _CyberpunkSectionButton = require("./console/CyberpunkSectionButton.js");
|
|
48
77
|
var _index3 = require("./gameUI/index.js");
|
|
49
78
|
Object.keys(_index3).forEach(function (key) {
|
|
@@ -68,4 +97,5 @@ Object.keys(_index4).forEach(function (key) {
|
|
|
68
97
|
return _index4[key];
|
|
69
98
|
}
|
|
70
99
|
});
|
|
71
|
-
});
|
|
100
|
+
});
|
|
101
|
+
var _listPresets = require("./listPresets.js");
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LOG_LIST_PRESET = exports.EVENT_LIST_PRESET = exports.CLIP_OFFSCREEN_CELLS = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* FlatList presets for tool lists — the tuned window/batch values and the
|
|
9
|
+
* E2E clipping guard that eleven list sites carried as copy-pasted props.
|
|
10
|
+
*
|
|
11
|
+
* Spread them onto a FlatList: `<FlatList {...EVENT_LIST_PRESET} … />`.
|
|
12
|
+
* A tool that later moves to FlashList changes this file, not eleven.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* `removeClippedSubviews` is off in E2E bundles: clipped rows leave the
|
|
17
|
+
* hierarchy entirely, so a row past the fold reads to the test as "the tool
|
|
18
|
+
* stopped capturing".
|
|
19
|
+
*/
|
|
20
|
+
const CLIP_OFFSCREEN_CELLS = exports.CLIP_OFFSCREEN_CELLS = !(typeof process !== "undefined" && process.env?.EXPO_PUBLIC_E2E);
|
|
21
|
+
/**
|
|
22
|
+
* Event / change / request lists: rows are tall-ish and arrive in bursts.
|
|
23
|
+
* Window and batch values are the "tuned" winner of the buoy-optimize
|
|
24
|
+
* batch run on the network tool (2026-07-06, batch-1783396983529-6l7w).
|
|
25
|
+
*/
|
|
26
|
+
const EVENT_LIST_PRESET = exports.EVENT_LIST_PRESET = {
|
|
27
|
+
initialNumToRender: 12,
|
|
28
|
+
maxToRenderPerBatch: 8,
|
|
29
|
+
windowSize: 5,
|
|
30
|
+
updateCellsBatchingPeriod: 50,
|
|
31
|
+
removeClippedSubviews: CLIP_OFFSCREEN_CELLS
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Log tails (console, sentry): rows are short single lines, the list is
|
|
36
|
+
* read from the bottom, and a scroll-to-end must not land on blank cells.
|
|
37
|
+
*/
|
|
38
|
+
const LOG_LIST_PRESET = exports.LOG_LIST_PRESET = {
|
|
39
|
+
initialNumToRender: 30,
|
|
40
|
+
maxToRenderPerBatch: 30,
|
|
41
|
+
windowSize: 21,
|
|
42
|
+
removeClippedSubviews: CLIP_OFFSCREEN_CELLS
|
|
43
|
+
};
|
|
@@ -167,12 +167,14 @@ function NightChip({
|
|
|
167
167
|
selected,
|
|
168
168
|
onPress,
|
|
169
169
|
disabled,
|
|
170
|
-
icon
|
|
170
|
+
icon,
|
|
171
|
+
testID
|
|
171
172
|
}) {
|
|
172
173
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
173
174
|
activeOpacity: 0.7,
|
|
174
175
|
disabled: disabled || !onPress,
|
|
175
176
|
onPress: onPress,
|
|
177
|
+
testID: testID,
|
|
176
178
|
style: [styles.chip, selected ? styles.chipSelected : null, disabled ? styles.chipDisabled : null],
|
|
177
179
|
children: [icon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
178
180
|
style: [styles.chipText, selected ? styles.chipTextSelected : null],
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.toolTheme = void 0;
|
|
7
7
|
var _gameUIColors = require("./gameUI/constants/gameUIColors.js");
|
|
8
|
+
var _fonts = require("./fonts.js");
|
|
8
9
|
/**
|
|
9
10
|
* Semantic design tokens for dev-tool surfaces — the single documented entry
|
|
10
11
|
* point for custom-tool authors (and, over time, internal tools).
|
|
@@ -64,19 +65,19 @@ const toolTheme = exports.toolTheme = {
|
|
|
64
65
|
fontWeight: "700",
|
|
65
66
|
color: _gameUIColors.buoyColors.textMuted,
|
|
66
67
|
letterSpacing: 1.2,
|
|
67
|
-
fontFamily:
|
|
68
|
+
fontFamily: _fonts.monoFont
|
|
68
69
|
},
|
|
69
70
|
/** Monospace values (keys, ids, payload snippets). */
|
|
70
71
|
mono: {
|
|
71
72
|
fontSize: 11,
|
|
72
73
|
color: _gameUIColors.buoyColors.textSecondary,
|
|
73
|
-
fontFamily:
|
|
74
|
+
fontFamily: _fonts.monoFont
|
|
74
75
|
},
|
|
75
76
|
/** Timestamps and fine print. */
|
|
76
77
|
small: {
|
|
77
78
|
fontSize: 9,
|
|
78
79
|
color: _gameUIColors.buoyColors.textMuted,
|
|
79
|
-
fontFamily:
|
|
80
|
+
fontFamily: _fonts.monoFont
|
|
80
81
|
}
|
|
81
82
|
},
|
|
82
83
|
/** 4-based spacing scale used across tool surfaces. */
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PREVIEW_ITEM_RENDER_BYTE_LIMIT = void 0;
|
|
7
|
+
exports.classifyPreviewItem = classifyPreviewItem;
|
|
8
|
+
exports.createRestoreScope = createRestoreScope;
|
|
9
|
+
exports.emptyRestoreResult = emptyRestoreResult;
|
|
10
|
+
exports.failedRestore = failedRestore;
|
|
11
|
+
exports.skippedRestore = skippedRestore;
|
|
12
|
+
exports.unionKeys = unionKeys;
|
|
13
|
+
exports.wontApply = wontApply;
|
|
14
|
+
var _objectDiff = require("../dataViewer/objectDiff.js");
|
|
15
|
+
/**
|
|
16
|
+
* snapshotProviderKit — the parts of a Time Machine `StateSnapshotProvider`
|
|
17
|
+
* that are the same for every source.
|
|
18
|
+
*
|
|
19
|
+
* storage, redux, zustand, jotai and react-query each register a provider
|
|
20
|
+
* (see stateSnapshotRegistry.ts). What differs is how they read and write
|
|
21
|
+
* their source. What was copied five times is:
|
|
22
|
+
*
|
|
23
|
+
* - the restore SCOPE gate: `excludeKeys` (touch all but these) and
|
|
24
|
+
* `includeKeys` (touch only these), the "N item(s) excluded by you"
|
|
25
|
+
* warning, and the empty `StateSnapshotRestoreResult`;
|
|
26
|
+
* - the preview VERDICT ladder: removed → added → unchanged → too-large →
|
|
27
|
+
* changed, with the 256 KB per-item render cap;
|
|
28
|
+
* - the "won't apply" override: a difference restore cannot apply must say
|
|
29
|
+
* so instead of rendering as a green change.
|
|
30
|
+
*
|
|
31
|
+
* The parts that stay per-tool are the ones that matter: redux verifies the
|
|
32
|
+
* jump by reference identity, zustand grafts action functions back, jotai
|
|
33
|
+
* leaves derived atoms to recompute, storage gates MMKV buffers and
|
|
34
|
+
* biometric keys, react-query diffs a comparable projection.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/** Beyond this a preview item is "too-large": restore still applies it, the diff isn't drawn. */
|
|
38
|
+
const PREVIEW_ITEM_RENDER_BYTE_LIMIT = exports.PREVIEW_ITEM_RENDER_BYTE_LIMIT = 256 * 1024;
|
|
39
|
+
/**
|
|
40
|
+
* Both option lists use preview item keys, and both mean "leave everything
|
|
41
|
+
* else untouched in BOTH directions". `includeKeys` wins when present;
|
|
42
|
+
* `excludeKeys` still applies on top.
|
|
43
|
+
*/
|
|
44
|
+
function createRestoreScope(options) {
|
|
45
|
+
const excludedSet = new Set(options?.excludeKeys ?? []);
|
|
46
|
+
const includedSet = options?.includeKeys ? new Set(options.includeKeys) : null;
|
|
47
|
+
let excludedHits = 0;
|
|
48
|
+
const touch = key => !excludedSet.has(key) && (!includedSet || includedSet.has(key));
|
|
49
|
+
return {
|
|
50
|
+
touch,
|
|
51
|
+
allows(key) {
|
|
52
|
+
if (touch(key)) return true;
|
|
53
|
+
excludedHits += 1;
|
|
54
|
+
return false;
|
|
55
|
+
},
|
|
56
|
+
countExcluded(n) {
|
|
57
|
+
excludedHits += n;
|
|
58
|
+
},
|
|
59
|
+
get excludedHits() {
|
|
60
|
+
return excludedHits;
|
|
61
|
+
},
|
|
62
|
+
excludedWarning(noun) {
|
|
63
|
+
return excludedHits > 0 ? `${excludedHits} ${noun} excluded by you` : null;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** A fresh, successful, empty result to accumulate into. */
|
|
69
|
+
function emptyRestoreResult() {
|
|
70
|
+
return {
|
|
71
|
+
ok: true,
|
|
72
|
+
applied: 0,
|
|
73
|
+
skipped: [],
|
|
74
|
+
warnings: []
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** A failed result with one warning (an empty or unusable snapshot). */
|
|
79
|
+
function failedRestore(warning) {
|
|
80
|
+
return {
|
|
81
|
+
ok: false,
|
|
82
|
+
applied: 0,
|
|
83
|
+
skipped: [],
|
|
84
|
+
warnings: [warning]
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** A failed result with one skipped item and its reason. */
|
|
89
|
+
function skippedRestore(id, reason) {
|
|
90
|
+
return {
|
|
91
|
+
ok: false,
|
|
92
|
+
applied: 0,
|
|
93
|
+
skipped: [{
|
|
94
|
+
id,
|
|
95
|
+
reason
|
|
96
|
+
}],
|
|
97
|
+
warnings: []
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The verdict ladder: removed → added → unchanged → too-large → changed.
|
|
102
|
+
* Callers layer source-specific verdicts (`wont-apply`, `recomputes`) on top
|
|
103
|
+
* with `wontApply()`.
|
|
104
|
+
*/
|
|
105
|
+
function classifyPreviewItem(input, options = {}) {
|
|
106
|
+
const {
|
|
107
|
+
key,
|
|
108
|
+
label,
|
|
109
|
+
oldValue,
|
|
110
|
+
newValue,
|
|
111
|
+
inOld,
|
|
112
|
+
inNew
|
|
113
|
+
} = input;
|
|
114
|
+
if (!inNew) return {
|
|
115
|
+
key,
|
|
116
|
+
label,
|
|
117
|
+
verdict: "removed",
|
|
118
|
+
oldValue
|
|
119
|
+
};
|
|
120
|
+
if (!inOld) return {
|
|
121
|
+
key,
|
|
122
|
+
label,
|
|
123
|
+
verdict: "added",
|
|
124
|
+
newValue
|
|
125
|
+
};
|
|
126
|
+
const equal = options.equal ?? _objectDiff.boundedDeepEqual;
|
|
127
|
+
if (equal(oldValue, newValue)) return {
|
|
128
|
+
key,
|
|
129
|
+
label,
|
|
130
|
+
verdict: "unchanged"
|
|
131
|
+
};
|
|
132
|
+
const tooLarge = options.tooLarge ?? (value => (0, _objectDiff.jsonLikelyLargerThan)(value, PREVIEW_ITEM_RENDER_BYTE_LIMIT));
|
|
133
|
+
if (tooLarge(oldValue) || tooLarge(newValue)) {
|
|
134
|
+
return {
|
|
135
|
+
key,
|
|
136
|
+
label,
|
|
137
|
+
verdict: "too-large",
|
|
138
|
+
reason: options.tooLargeReason ?? "value too large to render a diff — restore still applies it"
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
key,
|
|
143
|
+
label,
|
|
144
|
+
verdict: "changed",
|
|
145
|
+
oldValue,
|
|
146
|
+
newValue
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Mark an item as something restore cannot apply. An unchanged item is left
|
|
152
|
+
* alone — there is nothing to apply, so nothing is being refused.
|
|
153
|
+
*/
|
|
154
|
+
function wontApply(item, reason) {
|
|
155
|
+
if (item.verdict === "unchanged") return item;
|
|
156
|
+
return {
|
|
157
|
+
...item,
|
|
158
|
+
verdict: "wont-apply",
|
|
159
|
+
reason
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** Every key present in either record, once. */
|
|
164
|
+
function unionKeys(a, b) {
|
|
165
|
+
const keysOf = r => r === undefined ? [] : r instanceof Map ? Array.from(r.keys()) : Object.keys(r);
|
|
166
|
+
return new Set([...keysOf(a), ...keysOf(b)]);
|
|
167
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.entityColor = entityColor;
|
|
7
|
+
exports.formatValuePreview = formatValuePreview;
|
|
8
|
+
exports.shallowDiffSummary = shallowDiffSummary;
|
|
9
|
+
/**
|
|
10
|
+
* stateTools — helpers the state tools (redux / zustand / jotai) each carried
|
|
11
|
+
* a private copy of. Pure functions; no React, no RN.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// ============================================
|
|
15
|
+
// Entity color
|
|
16
|
+
// ============================================
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Consistent color for a named entity (a zustand store, a jotai atom, a redux
|
|
20
|
+
* slice). Exact match on `known` wins, then a substring match, then a stable
|
|
21
|
+
* HSL hash of the name rendered as `#rrggbb` so the "color + alpha hex"
|
|
22
|
+
* pattern works everywhere.
|
|
23
|
+
*/
|
|
24
|
+
function entityColor(name, known = {}) {
|
|
25
|
+
const lower = name.toLowerCase();
|
|
26
|
+
if (known[lower]) return known[lower];
|
|
27
|
+
for (const [key, color] of Object.entries(known)) {
|
|
28
|
+
if (lower.includes(key)) return color;
|
|
29
|
+
}
|
|
30
|
+
const hash = name.split("").reduce((acc, char) => acc + char.charCodeAt(0), 0);
|
|
31
|
+
const hue = hash * 137 % 360;
|
|
32
|
+
const s = 0.7;
|
|
33
|
+
const l = 0.6;
|
|
34
|
+
const c = (1 - Math.abs(2 * l - 1)) * s;
|
|
35
|
+
const x = c * (1 - Math.abs(hue / 60 % 2 - 1));
|
|
36
|
+
const m = l - c / 2;
|
|
37
|
+
let r = 0;
|
|
38
|
+
let g = 0;
|
|
39
|
+
let b = 0;
|
|
40
|
+
if (hue < 60) {
|
|
41
|
+
r = c;
|
|
42
|
+
g = x;
|
|
43
|
+
} else if (hue < 120) {
|
|
44
|
+
r = x;
|
|
45
|
+
g = c;
|
|
46
|
+
} else if (hue < 180) {
|
|
47
|
+
g = c;
|
|
48
|
+
b = x;
|
|
49
|
+
} else if (hue < 240) {
|
|
50
|
+
g = x;
|
|
51
|
+
b = c;
|
|
52
|
+
} else if (hue < 300) {
|
|
53
|
+
r = x;
|
|
54
|
+
b = c;
|
|
55
|
+
} else {
|
|
56
|
+
r = c;
|
|
57
|
+
b = x;
|
|
58
|
+
}
|
|
59
|
+
const toHex = v => Math.round((v + m) * 255).toString(16).padStart(2, "0");
|
|
60
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// ============================================
|
|
64
|
+
// Value preview
|
|
65
|
+
// ============================================
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* One-line preview of an arbitrary value for a list row: strings quoted and
|
|
69
|
+
* truncated, arrays and objects stringified when short, otherwise collapsed
|
|
70
|
+
* to `[N items]` / `{ N keys }`. Never throws.
|
|
71
|
+
*/
|
|
72
|
+
function formatValuePreview(value, options = {}) {
|
|
73
|
+
const maxLength = options.maxLength ?? 40;
|
|
74
|
+
if (value === undefined) return options.undefinedLabel ?? "undefined";
|
|
75
|
+
if (value === null) return "null";
|
|
76
|
+
try {
|
|
77
|
+
if (typeof value === "function") return options.functionLabel ?? "(fn)";
|
|
78
|
+
if (typeof value === "string") {
|
|
79
|
+
return value.length > maxLength ? `"${value.slice(0, maxLength - 3)}..."` : `"${value}"`;
|
|
80
|
+
}
|
|
81
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
82
|
+
return String(value);
|
|
83
|
+
}
|
|
84
|
+
if (Array.isArray(value)) {
|
|
85
|
+
if (value.length === 0) return "[]";
|
|
86
|
+
const preview = JSON.stringify(value);
|
|
87
|
+
return preview.length > maxLength ? `[${value.length} items]` : preview;
|
|
88
|
+
}
|
|
89
|
+
if (typeof value === "object") {
|
|
90
|
+
const keys = Object.keys(value);
|
|
91
|
+
if (keys.length === 0) return "{}";
|
|
92
|
+
const preview = JSON.stringify(value);
|
|
93
|
+
if (preview.length <= maxLength) return preview;
|
|
94
|
+
return `{ ${keys.length} keys }`;
|
|
95
|
+
}
|
|
96
|
+
return String(value).slice(0, maxLength);
|
|
97
|
+
} catch {
|
|
98
|
+
return "[complex]";
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// ============================================
|
|
103
|
+
// Shallow diff summary
|
|
104
|
+
// ============================================
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Top-level, reference-equality diff between two states. Enough for a list
|
|
108
|
+
* row ("+1 ~2 keys"); the detail view runs the real tree diff.
|
|
109
|
+
*
|
|
110
|
+
* A state object that was REPLACED without any top-level value moving —
|
|
111
|
+
* exactly what zustand's persist middleware does when it rehydrates — is
|
|
112
|
+
* reported as `"nested change"` with no keys, never as one changed key with
|
|
113
|
+
* none named.
|
|
114
|
+
*/
|
|
115
|
+
function shallowDiffSummary(prev, next) {
|
|
116
|
+
if (prev === next) {
|
|
117
|
+
return {
|
|
118
|
+
summary: "no change",
|
|
119
|
+
changedKeys: [],
|
|
120
|
+
changedCount: 0
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
if (typeof prev !== "object" || typeof next !== "object" || prev === null || next === null) {
|
|
124
|
+
return {
|
|
125
|
+
summary: "changed",
|
|
126
|
+
changedKeys: [],
|
|
127
|
+
changedCount: 0
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
const prevRecord = prev;
|
|
131
|
+
const nextRecord = next;
|
|
132
|
+
const prevKeys = Object.keys(prevRecord);
|
|
133
|
+
const nextKeys = Object.keys(nextRecord);
|
|
134
|
+
const added = nextKeys.filter(k => !prevKeys.includes(k));
|
|
135
|
+
const removed = prevKeys.filter(k => !nextKeys.includes(k));
|
|
136
|
+
const changed = [];
|
|
137
|
+
for (const key of prevKeys) {
|
|
138
|
+
if (nextKeys.includes(key) && prevRecord[key] !== nextRecord[key]) {
|
|
139
|
+
changed.push(key);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const changedKeys = [...added, ...removed, ...changed];
|
|
143
|
+
const parts = [];
|
|
144
|
+
if (added.length > 0) parts.push(`+${added.length}`);
|
|
145
|
+
if (removed.length > 0) parts.push(`-${removed.length}`);
|
|
146
|
+
if (changed.length > 0) parts.push(`~${changed.length}`);
|
|
147
|
+
if (parts.length === 0) {
|
|
148
|
+
return {
|
|
149
|
+
summary: "nested change",
|
|
150
|
+
changedKeys: [],
|
|
151
|
+
changedCount: 0
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
const total = changedKeys.length;
|
|
155
|
+
return {
|
|
156
|
+
summary: `${parts.join(" ")} ${total === 1 ? "key" : "keys"}`,
|
|
157
|
+
changedKeys,
|
|
158
|
+
changedCount: total
|
|
159
|
+
};
|
|
160
|
+
}
|
package/lib/module/JsModal.js
CHANGED
|
@@ -602,7 +602,6 @@ const JsModalComponent = ({
|
|
|
602
602
|
// ============================================================================
|
|
603
603
|
// REFS for values we need to track
|
|
604
604
|
// ============================================================================
|
|
605
|
-
const isExternallyControlled = !!externalAnimatedHeight;
|
|
606
605
|
const effectiveMaxHeight = maxHeight || SCREEN.height - insets.top;
|
|
607
606
|
|
|
608
607
|
// Mode toggle handler
|
|
@@ -724,29 +723,57 @@ const JsModalComponent = ({
|
|
|
724
723
|
// ============================================================================
|
|
725
724
|
// EFFECT: Visibility Animations - All using native driver!
|
|
726
725
|
// ============================================================================
|
|
726
|
+
const snapVisibility = shown => {
|
|
727
|
+
if (shown) {
|
|
728
|
+
if (mode === "bottomSheet") {
|
|
729
|
+
bottomSheetTranslateY.setValue(0);
|
|
730
|
+
} else {
|
|
731
|
+
floatingScale.setValue(1);
|
|
732
|
+
floatingPosition.setValue({
|
|
733
|
+
x: currentDimensionsRef.current.left,
|
|
734
|
+
y: currentDimensionsRef.current.top
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
visibilityProgress.setValue(1);
|
|
738
|
+
} else {
|
|
739
|
+
if (mode === "bottomSheet") {
|
|
740
|
+
bottomSheetTranslateY.setValue(SCREEN.height);
|
|
741
|
+
}
|
|
742
|
+
visibilityProgress.setValue(0);
|
|
743
|
+
}
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Snap DURING RENDER when `visible` flips, not only in the effect below.
|
|
748
|
+
*
|
|
749
|
+
* These values drive the sheet's opacity/translate through the native
|
|
750
|
+
* driver. The React commit for a `visible` change carries whatever the
|
|
751
|
+
* JS-side values are at render time — the OLD, hidden ones when the snap
|
|
752
|
+
* only happens in the effect — and on Fabric that commit's mount can land
|
|
753
|
+
* on the main thread AFTER the effect's native `setValue`, overwriting it.
|
|
754
|
+
* The Animated node then says "shown" while the UIView sits at opacity 0,
|
|
755
|
+
* until some unrelated re-render commits the JS-side values again. That
|
|
756
|
+
* is how "restore tool A: nothing; restore tool B: A appears; hide B: now
|
|
757
|
+
* B appears" happened — every restore was one commit behind.
|
|
758
|
+
*
|
|
759
|
+
* Setting the values before the render's props are computed makes the
|
|
760
|
+
* commit and the native node agree, whichever lands last. `setValue` is
|
|
761
|
+
* idempotent, so a re-run render is harmless.
|
|
762
|
+
*/
|
|
763
|
+
const snappedVisibleRef = useRef(null);
|
|
764
|
+
if (INSTANT_MODAL_ENTRANCE && snappedVisibleRef.current !== visible) {
|
|
765
|
+
snappedVisibleRef.current = visible;
|
|
766
|
+
snapVisibility(visible);
|
|
767
|
+
}
|
|
727
768
|
useEffect(() => {
|
|
728
769
|
// Visibility effect
|
|
729
770
|
let openAnimation = null;
|
|
730
771
|
let closeAnimation = null;
|
|
731
772
|
if (INSTANT_MODAL_ENTRANCE) {
|
|
732
|
-
// Snap to the final state — no animation in either direction.
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
} else {
|
|
737
|
-
floatingScale.setValue(1);
|
|
738
|
-
floatingPosition.setValue({
|
|
739
|
-
x: currentDimensionsRef.current.left,
|
|
740
|
-
y: currentDimensionsRef.current.top
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
visibilityProgress.setValue(1);
|
|
744
|
-
} else {
|
|
745
|
-
if (mode === "bottomSheet") {
|
|
746
|
-
bottomSheetTranslateY.setValue(SCREEN.height);
|
|
747
|
-
}
|
|
748
|
-
visibilityProgress.setValue(0);
|
|
749
|
-
}
|
|
773
|
+
// Snap to the final state — no animation in either direction. The
|
|
774
|
+
// render-phase snap above already did this for a `visible` flip; this
|
|
775
|
+
// re-applies it for a `mode` change while shown.
|
|
776
|
+
snapVisibility(visible);
|
|
750
777
|
return;
|
|
751
778
|
}
|
|
752
779
|
if (visible) {
|
|
@@ -911,8 +938,15 @@ const JsModalComponent = ({
|
|
|
911
938
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
912
939
|
}, [benchMotion, visible]);
|
|
913
940
|
const bottomSheetPanResponder = useMemo(() => PanResponder.create({
|
|
914
|
-
|
|
915
|
-
|
|
941
|
+
// An external `animatedHeight` used to disable this responder
|
|
942
|
+
// outright ("externally controlled"), which left Ask Buoy's sheet —
|
|
943
|
+
// the one host that passes one, for its peek animation — with a
|
|
944
|
+
// header that could not be dragged in bottom-sheet mode. The move
|
|
945
|
+
// and release handlers below already write every height into the
|
|
946
|
+
// external value, so the host and the finger share one number; the
|
|
947
|
+
// grab just has to stop whatever the host is animating first.
|
|
948
|
+
onStartShouldSetPanResponder: () => mode === "bottomSheet",
|
|
949
|
+
onMoveShouldSetPanResponder: (evt, gestureState) => mode === "bottomSheet" && Math.abs(gestureState.dy) > 3,
|
|
916
950
|
onPanResponderTerminationRequest: () => false,
|
|
917
951
|
onPanResponderGrant: evt => {
|
|
918
952
|
setIsResizing(true);
|
|
@@ -924,6 +958,7 @@ const JsModalComponent = ({
|
|
|
924
958
|
animatedBottomPosition.stopAnimation(val => {
|
|
925
959
|
currentHeightRef.current = val;
|
|
926
960
|
});
|
|
961
|
+
externalAnimatedHeight?.stopAnimation();
|
|
927
962
|
bottomSheetTranslateY.stopAnimation();
|
|
928
963
|
},
|
|
929
964
|
onPanResponderMove: evt => {
|
|
@@ -970,7 +1005,7 @@ const JsModalComponent = ({
|
|
|
970
1005
|
setIsResizing(false);
|
|
971
1006
|
// snap back to the last stable height if you want; otherwise no-op
|
|
972
1007
|
}
|
|
973
|
-
}), [mode,
|
|
1008
|
+
}), [mode, minHeight, effectiveMaxHeight, animatedBottomPosition, externalAnimatedHeight, bottomSheetTranslateY, visibilityProgress, onClose]);
|
|
974
1009
|
|
|
975
1010
|
// ============================================================================
|
|
976
1011
|
// CREATE RESIZE HANDLER: For 4-corner resize in floating mode (fixed geometry)
|
|
@@ -4,6 +4,7 @@ import { useState, useEffect, useRef } from "react";
|
|
|
4
4
|
import { View, TextInput, StyleSheet, TouchableOpacity, Text, Animated } from "react-native";
|
|
5
5
|
import { ChevronUp, ChevronDown, Trash } from "../icons/index.js";
|
|
6
6
|
import { buoyColors } from "../ui/gameUI/constants/gameUIColors.js";
|
|
7
|
+
import { monoFont } from "../ui/fonts.js";
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
export function CyberpunkInput({
|
|
9
10
|
label,
|
|
@@ -253,7 +254,7 @@ const styles = StyleSheet.create({
|
|
|
253
254
|
label: {
|
|
254
255
|
fontSize: 10,
|
|
255
256
|
fontWeight: "600",
|
|
256
|
-
fontFamily:
|
|
257
|
+
fontFamily: monoFont,
|
|
257
258
|
color: buoyColors.textMuted,
|
|
258
259
|
letterSpacing: 0.5,
|
|
259
260
|
minWidth: 60
|
|
@@ -288,7 +289,7 @@ const styles = StyleSheet.create({
|
|
|
288
289
|
paddingVertical: 6,
|
|
289
290
|
color: buoyColors.text,
|
|
290
291
|
fontSize: 12,
|
|
291
|
-
fontFamily:
|
|
292
|
+
fontFamily: monoFont,
|
|
292
293
|
backgroundColor: "transparent",
|
|
293
294
|
zIndex: 1
|
|
294
295
|
},
|
|
@@ -25,6 +25,7 @@ import { StyleSheet, Text, TextInput, TouchableOpacity, View } from "react-nativ
|
|
|
25
25
|
import { ChevronDown, ChevronUp, Copy, Edit3, Minus, Plus } from "../icons/index.js";
|
|
26
26
|
import { macOSColors } from "../ui/gameUI/index.js";
|
|
27
27
|
import { breadcrumb, treeActionMap, treeActionsFor, typeLabel } from "./treeActions.js";
|
|
28
|
+
import { monoFont } from "../ui/fonts.js";
|
|
28
29
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
30
|
/**
|
|
30
31
|
* Palette. The explorer renders on the phone's dark modal AND inside the
|
|
@@ -285,7 +286,7 @@ const styles = StyleSheet.create({
|
|
|
285
286
|
paddingHorizontal: 9,
|
|
286
287
|
paddingVertical: 0,
|
|
287
288
|
fontSize: 12,
|
|
288
|
-
fontFamily:
|
|
289
|
+
fontFamily: monoFont
|
|
289
290
|
},
|
|
290
291
|
inputInvalid: {
|
|
291
292
|
borderColor: macOSColors.semantic.error
|
|
@@ -334,7 +335,7 @@ const styles = StyleSheet.create({
|
|
|
334
335
|
color: T.label,
|
|
335
336
|
fontSize: 12,
|
|
336
337
|
fontWeight: "600",
|
|
337
|
-
fontFamily:
|
|
338
|
+
fontFamily: monoFont,
|
|
338
339
|
flexShrink: 1
|
|
339
340
|
},
|
|
340
341
|
badge: {
|
|
@@ -17,6 +17,7 @@ import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
|
17
17
|
import { ChevronDown, ChevronUp, Copy, Edit3, Minus, Plus } from "../icons/index.js";
|
|
18
18
|
import { macOSColors } from "../ui/gameUI/index.js";
|
|
19
19
|
import { breadcrumb, treeActionsFor, typeLabel } from "./treeActions.js";
|
|
20
|
+
import { monoFont } from "../ui/fonts.js";
|
|
20
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
22
|
const T = {
|
|
22
23
|
dockBg: macOSColors.background.card,
|
|
@@ -172,7 +173,7 @@ const styles = StyleSheet.create({
|
|
|
172
173
|
color: T.label,
|
|
173
174
|
fontSize: 12,
|
|
174
175
|
fontWeight: "600",
|
|
175
|
-
fontFamily:
|
|
176
|
+
fontFamily: monoFont
|
|
176
177
|
},
|
|
177
178
|
selectionLabelEmpty: {
|
|
178
179
|
color: T.hint,
|