@peers-app/peers-ui 0.14.0 → 0.15.0
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/.github/workflows/publish.yml +8 -5
- package/babel.config.js +4 -4
- package/biome.json +191 -0
- package/dist/command-palette/command-palette-ui.d.ts +1 -2
- package/dist/command-palette/command-palette-ui.js +175 -244
- package/dist/command-palette/command-palette.js +65 -64
- package/dist/components/chat-overlay.d.ts +2 -2
- package/dist/components/chat-overlay.js +160 -217
- package/dist/components/checkbox.d.ts +5 -4
- package/dist/components/checkbox.js +4 -7
- package/dist/components/group-switcher.d.ts +1 -2
- package/dist/components/group-switcher.js +119 -159
- package/dist/components/input-date.d.ts +3 -3
- package/dist/components/input-date.js +6 -6
- package/dist/components/input-number.d.ts +7 -6
- package/dist/components/input-number.js +25 -20
- package/dist/components/input.d.ts +5 -4
- package/dist/components/input.js +4 -7
- package/dist/components/inverse-lazy-list.d.ts +3 -3
- package/dist/components/inverse-lazy-list.js +13 -47
- package/dist/components/io-schema-values.d.ts +5 -6
- package/dist/components/io-schema-values.js +28 -65
- package/dist/components/io-schema.d.ts +4 -5
- package/dist/components/io-schema.js +42 -79
- package/dist/components/lazy-list.d.ts +3 -3
- package/dist/components/lazy-list.js +38 -58
- package/dist/components/list-screen.d.ts +3 -8
- package/dist/components/list-screen.js +28 -23
- package/dist/components/loading-indicator.d.ts +1 -2
- package/dist/components/loading-indicator.js +2 -6
- package/dist/components/markdown-editor/autolink-plugin.js +5 -8
- package/dist/components/markdown-editor/editor-inline.d.ts +2 -3
- package/dist/components/markdown-editor/editor-inline.js +2 -6
- package/dist/components/markdown-editor/editor.d.ts +6 -6
- package/dist/components/markdown-editor/editor.js +9 -19
- package/dist/components/markdown-editor/markdown-plugin.d.ts +1 -1
- package/dist/components/markdown-editor/markdown-plugin.js +20 -21
- package/dist/components/markdown-editor/mention-node.d.ts +2 -2
- package/dist/components/markdown-editor/mention-node.js +24 -24
- package/dist/components/markdown-editor/mentions-plugin.d.ts +2 -2
- package/dist/components/markdown-editor/mentions-plugin.js +61 -62
- package/dist/components/markdown-editor/theme.js +28 -28
- package/dist/components/markdown-editor/toolbar.d.ts +2 -3
- package/dist/components/markdown-editor/toolbar.js +32 -49
- package/dist/components/markdown-with-mentions.d.ts +1 -1
- package/dist/components/markdown-with-mentions.js +43 -43
- package/dist/components/message-logs/message-logs.d.ts +1 -2
- package/dist/components/message-logs/message-logs.js +91 -116
- package/dist/components/messages/avatar.d.ts +3 -4
- package/dist/components/messages/avatar.js +37 -46
- package/dist/components/messages/channel-message-list.d.ts +5 -6
- package/dist/components/messages/channel-message-list.js +34 -34
- package/dist/components/messages/channel-view.d.ts +1 -2
- package/dist/components/messages/channel-view.js +23 -57
- package/dist/components/messages/message-compose.d.ts +3 -4
- package/dist/components/messages/message-compose.js +27 -38
- package/dist/components/messages/message-display.d.ts +2 -3
- package/dist/components/messages/message-display.js +42 -95
- package/dist/components/messages/thread-message-list.d.ts +4 -5
- package/dist/components/messages/thread-message-list.js +29 -29
- package/dist/components/router.d.ts +1 -2
- package/dist/components/router.js +58 -66
- package/dist/components/save-button.d.ts +3 -3
- package/dist/components/save-button.js +23 -33
- package/dist/components/sortable-list.d.ts +11 -12
- package/dist/components/sortable-list.js +42 -22
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/tabs.js +16 -47
- package/dist/components/tooltip.d.ts +4 -4
- package/dist/components/tooltip.js +4 -9
- package/dist/components/trust-level-badge.d.ts +2 -3
- package/dist/components/trust-level-badge.js +16 -16
- package/dist/components/trust-level-dropdown.d.ts +3 -4
- package/dist/components/trust-level-dropdown.js +32 -55
- package/dist/components/typeahead.d.ts +3 -3
- package/dist/components/typeahead.js +48 -89
- package/dist/components/voice-indicator.d.ts +2 -2
- package/dist/components/voice-indicator.js +93 -106
- package/dist/components/voice-subscribe-events.d.ts +32 -0
- package/dist/components/voice-subscribe-events.js +2 -0
- package/dist/globals.d.ts +3 -5
- package/dist/globals.js +22 -33
- package/dist/hooks.d.ts +5 -5
- package/dist/hooks.js +22 -12
- package/dist/hooks.test.js +129 -145
- package/dist/index.d.ts +9 -8
- package/dist/index.js +13 -12
- package/dist/mention-configs.d.ts +2 -2
- package/dist/mention-configs.js +55 -42
- package/dist/screens/assistants/assistant-config.d.ts +2 -3
- package/dist/screens/assistants/assistant-config.js +9 -22
- package/dist/screens/assistants/assistant-details.d.ts +1 -2
- package/dist/screens/assistants/assistant-details.js +13 -28
- package/dist/screens/assistants/assistant-info.d.ts +2 -3
- package/dist/screens/assistants/assistant-info.js +3 -17
- package/dist/screens/assistants/assistant-list.d.ts +1 -2
- package/dist/screens/assistants/assistant-list.js +15 -56
- package/dist/screens/assistants/assistant-tools.d.ts +2 -3
- package/dist/screens/assistants/assistant-tools.js +10 -24
- package/dist/screens/console-logs/console-logs-list.d.ts +1 -2
- package/dist/screens/console-logs/console-logs-list.js +130 -134
- package/dist/screens/console-logs/log-display.d.ts +2 -3
- package/dist/screens/console-logs/log-display.js +40 -42
- package/dist/screens/console-logs/log-filters.d.ts +1 -2
- package/dist/screens/console-logs/log-filters.js +2 -24
- package/dist/screens/console-logs/mobile-log-card.d.ts +2 -3
- package/dist/screens/console-logs/mobile-log-card.js +64 -67
- package/dist/screens/console-logs/resizable-table-header.d.ts +1 -2
- package/dist/screens/console-logs/resizable-table-header.js +31 -67
- package/dist/screens/contacts/contact-details.d.ts +1 -2
- package/dist/screens/contacts/contact-details.js +16 -46
- package/dist/screens/contacts/contact-list.d.ts +1 -2
- package/dist/screens/contacts/contact-list.js +44 -103
- package/dist/screens/contacts/index.d.ts +4 -4
- package/dist/screens/contacts/index.js +1 -1
- package/dist/screens/contacts/user-connect.d.ts +1 -2
- package/dist/screens/contacts/user-connect.js +85 -186
- package/dist/screens/data-explorer/data-explorer.d.ts +1 -2
- package/dist/screens/data-explorer/data-explorer.js +61 -181
- package/dist/screens/data-explorer/index.d.ts +2 -2
- package/dist/screens/data-explorer/query-executor.d.ts +1 -2
- package/dist/screens/data-explorer/query-executor.js +56 -166
- package/dist/screens/groups/group-details.d.ts +1 -2
- package/dist/screens/groups/group-details.js +27 -122
- package/dist/screens/groups/group-invite-listener.d.ts +2 -3
- package/dist/screens/groups/group-invite-listener.js +8 -104
- package/dist/screens/groups/group-list.d.ts +1 -2
- package/dist/screens/groups/group-list.js +56 -133
- package/dist/screens/groups/group-members.d.ts +2 -3
- package/dist/screens/groups/group-members.js +62 -132
- package/dist/screens/groups/index.d.ts +4 -4
- package/dist/screens/groups/index.js +1 -1
- package/dist/screens/join-group/index.d.ts +2 -2
- package/dist/screens/join-group/join-group.d.ts +1 -2
- package/dist/screens/join-group/join-group.js +9 -109
- package/dist/screens/network-viewer/connection-troubleshooter.d.ts +2 -3
- package/dist/screens/network-viewer/connection-troubleshooter.js +89 -193
- package/dist/screens/network-viewer/cpu-usage-graph.d.ts +1 -2
- package/dist/screens/network-viewer/cpu-usage-graph.js +60 -99
- package/dist/screens/network-viewer/device-details-modal.d.ts +1 -2
- package/dist/screens/network-viewer/device-details-modal.js +25 -177
- package/dist/screens/network-viewer/group-details-modal.d.ts +1 -2
- package/dist/screens/network-viewer/group-details-modal.js +31 -142
- package/dist/screens/network-viewer/index.d.ts +4 -4
- package/dist/screens/network-viewer/index.js +3 -3
- package/dist/screens/network-viewer/network-viewer-ipc.d.ts +22 -0
- package/dist/screens/network-viewer/network-viewer-ipc.js +6 -0
- package/dist/screens/network-viewer/network-viewer.d.ts +1 -2
- package/dist/screens/network-viewer/network-viewer.js +91 -296
- package/dist/screens/network-viewer/usage-graph.d.ts +1 -2
- package/dist/screens/network-viewer/usage-graph.js +78 -110
- package/dist/screens/packages/package-details.d.ts +1 -2
- package/dist/screens/packages/package-details.js +35 -41
- package/dist/screens/packages/package-info.d.ts +2 -2
- package/dist/screens/packages/package-info.js +33 -86
- package/dist/screens/packages/package-list.d.ts +1 -2
- package/dist/screens/packages/package-list.js +42 -106
- package/dist/screens/packages/package-new-local.d.ts +1 -2
- package/dist/screens/packages/package-new-local.js +13 -19
- package/dist/screens/packages/package-versions.d.ts +2 -3
- package/dist/screens/packages/package-versions.js +29 -96
- package/dist/screens/peer-types/peer-type-details.d.ts +3 -4
- package/dist/screens/peer-types/peer-type-details.js +26 -78
- package/dist/screens/peer-types/peer-type-list.d.ts +1 -2
- package/dist/screens/peer-types/peer-type-list.js +13 -24
- package/dist/screens/search/global-search.d.ts +1 -2
- package/dist/screens/search/global-search.js +104 -182
- package/dist/screens/settings/color-mode-dropdown.d.ts +3 -4
- package/dist/screens/settings/color-mode-dropdown.js +18 -37
- package/dist/screens/settings/settings-page.d.ts +1 -1
- package/dist/screens/settings/settings-page.js +86 -213
- package/dist/screens/settings/voice-settings-agent.d.ts +1 -1
- package/dist/screens/settings/voice-settings-agent.js +7 -44
- package/dist/screens/settings/voice-settings-api-keys.d.ts +2 -2
- package/dist/screens/settings/voice-settings-api-keys.js +2 -29
- package/dist/screens/settings/voice-settings-output.d.ts +2 -2
- package/dist/screens/settings/voice-settings-output.js +2 -40
- package/dist/screens/settings/voice-settings-providers.d.ts +2 -2
- package/dist/screens/settings/voice-settings-providers.js +2 -19
- package/dist/screens/settings/voice-settings-types.d.ts +4 -4
- package/dist/screens/settings/voice-settings-types.js +31 -31
- package/dist/screens/settings/voice-settings-wake-word.d.ts +2 -2
- package/dist/screens/settings/voice-settings-wake-word.js +2 -33
- package/dist/screens/settings/voice-settings.d.ts +1 -1
- package/dist/screens/settings/voice-settings.js +35 -112
- package/dist/screens/setup-user.d.ts +1 -2
- package/dist/screens/setup-user.js +38 -116
- package/dist/screens/tools/tool-code.d.ts +2 -3
- package/dist/screens/tools/tool-code.js +9 -13
- package/dist/screens/tools/tool-details.d.ts +1 -2
- package/dist/screens/tools/tool-details.js +26 -39
- package/dist/screens/tools/tool-info.d.ts +2 -3
- package/dist/screens/tools/tool-info.js +9 -48
- package/dist/screens/tools/tool-list.d.ts +1 -2
- package/dist/screens/tools/tool-list.js +33 -65
- package/dist/screens/tools/tool-schema.d.ts +2 -3
- package/dist/screens/tools/tool-schema.js +2 -13
- package/dist/screens/tools/tool-test-details.d.ts +1 -2
- package/dist/screens/tools/tool-test-details.js +12 -28
- package/dist/screens/tools/tool-test-list.d.ts +1 -2
- package/dist/screens/tools/tool-test-list.js +17 -56
- package/dist/screens/variables/variable-details.d.ts +1 -2
- package/dist/screens/variables/variable-details.js +19 -86
- package/dist/screens/variables/variable-list.d.ts +1 -2
- package/dist/screens/variables/variable-list.js +16 -27
- package/dist/screens/welcome-modal.d.ts +1 -2
- package/dist/screens/welcome-modal.js +44 -111
- package/dist/screens/workflows/workflow-details.d.ts +1 -2
- package/dist/screens/workflows/workflow-details.js +17 -31
- package/dist/screens/workflows/workflow-info.d.ts +2 -3
- package/dist/screens/workflows/workflow-info.js +2 -9
- package/dist/screens/workflows/workflow-instructions.d.ts +2 -3
- package/dist/screens/workflows/workflow-instructions.js +23 -55
- package/dist/screens/workflows/workflow-list.d.ts +1 -2
- package/dist/screens/workflows/workflow-list.js +23 -62
- package/dist/setupTests.d.ts +1 -1
- package/dist/setupTests.js +10 -11
- package/dist/system-apps/assistants.app.d.ts +1 -1
- package/dist/system-apps/assistants.app.js +3 -3
- package/dist/system-apps/console-logs.app.d.ts +1 -1
- package/dist/system-apps/console-logs.app.js +3 -3
- package/dist/system-apps/contacts.app.d.ts +1 -1
- package/dist/system-apps/contacts.app.js +4 -4
- package/dist/system-apps/data-explorer.app.d.ts +1 -1
- package/dist/system-apps/data-explorer.app.js +4 -4
- package/dist/system-apps/groups.app.d.ts +1 -1
- package/dist/system-apps/groups.app.js +4 -4
- package/dist/system-apps/index.d.ts +17 -17
- package/dist/system-apps/index.js +52 -52
- package/dist/system-apps/join-group.app.d.ts +1 -1
- package/dist/system-apps/join-group.app.js +4 -4
- package/dist/system-apps/mobile-settings.app.d.ts +1 -1
- package/dist/system-apps/mobile-settings.app.js +3 -3
- package/dist/system-apps/network-viewer.app.d.ts +1 -1
- package/dist/system-apps/network-viewer.app.js +4 -4
- package/dist/system-apps/packages.app.d.ts +1 -1
- package/dist/system-apps/packages.app.js +3 -3
- package/dist/system-apps/search.app.d.ts +1 -1
- package/dist/system-apps/search.app.js +4 -4
- package/dist/system-apps/settings.app.d.ts +1 -1
- package/dist/system-apps/settings.app.js +3 -3
- package/dist/system-apps/threads.app.d.ts +1 -1
- package/dist/system-apps/threads.app.js +3 -3
- package/dist/system-apps/tools.app.d.ts +1 -1
- package/dist/system-apps/tools.app.js +3 -3
- package/dist/system-apps/types.app.d.ts +1 -1
- package/dist/system-apps/types.app.js +3 -3
- package/dist/system-apps/variables.app.d.ts +1 -1
- package/dist/system-apps/variables.app.js +3 -3
- package/dist/system-apps/workflows.app.d.ts +1 -1
- package/dist/system-apps/workflows.app.js +3 -3
- package/dist/tabs-layout/tabs-layout.d.ts +2 -3
- package/dist/tabs-layout/tabs-layout.js +215 -246
- package/dist/tabs-layout/tabs-state.d.ts +2 -2
- package/dist/tabs-layout/tabs-state.js +73 -61
- package/dist/ui-defaults/index.d.ts +2 -2
- package/dist/ui-defaults/list-screen.d.ts +2 -3
- package/dist/ui-defaults/list-screen.js +33 -37
- package/dist/ui-defaults/markdown-field.js +24 -56
- package/dist/ui-router/routes-loader.d.ts +1 -1
- package/dist/ui-router/routes-loader.js +17 -13
- package/dist/ui-router/ui-loader.d.ts +6 -6
- package/dist/ui-router/ui-loader.js +172 -268
- package/dist/utils.js +49 -39
- package/jest.config.js +16 -16
- package/package.json +16 -14
- package/src/command-palette/command-palette-ui.tsx +261 -237
- package/src/command-palette/command-palette.ts +81 -78
- package/src/components/chat-overlay.tsx +366 -261
- package/src/components/checkbox.tsx +15 -12
- package/src/components/group-switcher.tsx +150 -105
- package/src/components/input-date.tsx +17 -16
- package/src/components/input-number.tsx +47 -31
- package/src/components/input.tsx +15 -12
- package/src/components/inverse-lazy-list.tsx +14 -13
- package/src/components/io-schema-values.tsx +51 -69
- package/src/components/io-schema.tsx +94 -69
- package/src/components/lazy-list.tsx +51 -34
- package/src/components/list-screen.tsx +51 -35
- package/src/components/loading-indicator.tsx +2 -4
- package/src/components/markdown-editor/autolink-plugin.tsx +4 -11
- package/src/components/markdown-editor/editor-inline.tsx +3 -4
- package/src/components/markdown-editor/editor.tsx +53 -51
- package/src/components/markdown-editor/markdown-plugin.tsx +48 -40
- package/src/components/markdown-editor/mention-node.ts +39 -38
- package/src/components/markdown-editor/mentions-plugin.tsx +99 -101
- package/src/components/markdown-editor/theme.ts +28 -29
- package/src/components/markdown-editor/toolbar.tsx +53 -47
- package/src/components/markdown-with-mentions.tsx +56 -46
- package/src/components/message-logs/message-logs.tsx +225 -165
- package/src/components/messages/avatar.tsx +70 -52
- package/src/components/messages/channel-message-list.tsx +80 -68
- package/src/components/messages/channel-view.tsx +34 -33
- package/src/components/messages/message-compose.tsx +84 -67
- package/src/components/messages/message-display.tsx +103 -89
- package/src/components/messages/thread-message-list.tsx +53 -44
- package/src/components/router.tsx +42 -43
- package/src/components/save-button.tsx +43 -39
- package/src/components/sortable-list.tsx +77 -49
- package/src/components/tabs.tsx +31 -31
- package/src/components/tooltip.tsx +21 -28
- package/src/components/trust-level-badge.tsx +15 -11
- package/src/components/trust-level-dropdown.tsx +49 -19
- package/src/components/typeahead.tsx +57 -59
- package/src/components/voice-indicator.tsx +158 -141
- package/src/components/voice-subscribe-events.ts +20 -0
- package/src/globals.tsx +42 -40
- package/src/hooks.test.tsx +141 -134
- package/src/hooks.ts +80 -48
- package/src/index.tsx +17 -10
- package/src/mention-configs.ts +122 -68
- package/src/screens/assistants/assistant-config.tsx +28 -18
- package/src/screens/assistants/assistant-details.tsx +35 -36
- package/src/screens/assistants/assistant-info.tsx +16 -11
- package/src/screens/assistants/assistant-list.tsx +37 -34
- package/src/screens/assistants/assistant-tools.tsx +41 -20
- package/src/screens/console-logs/console-logs-list.tsx +173 -140
- package/src/screens/console-logs/log-display.tsx +65 -38
- package/src/screens/console-logs/log-filters.tsx +4 -3
- package/src/screens/console-logs/mobile-log-card.tsx +78 -71
- package/src/screens/console-logs/resizable-table-header.tsx +29 -21
- package/src/screens/contacts/contact-details.tsx +29 -30
- package/src/screens/contacts/contact-list.tsx +71 -60
- package/src/screens/contacts/index.ts +5 -5
- package/src/screens/contacts/user-connect.tsx +177 -171
- package/src/screens/data-explorer/data-explorer.tsx +134 -98
- package/src/screens/data-explorer/index.ts +2 -3
- package/src/screens/data-explorer/query-executor.tsx +90 -80
- package/src/screens/groups/group-details.tsx +120 -101
- package/src/screens/groups/group-invite-listener.tsx +34 -37
- package/src/screens/groups/group-list.tsx +119 -103
- package/src/screens/groups/group-members.tsx +225 -164
- package/src/screens/groups/index.ts +5 -6
- package/src/screens/join-group/index.ts +2 -2
- package/src/screens/join-group/join-group.tsx +41 -39
- package/src/screens/network-viewer/connection-troubleshooter.tsx +145 -104
- package/src/screens/network-viewer/cpu-usage-graph.tsx +39 -43
- package/src/screens/network-viewer/device-details-modal.tsx +46 -59
- package/src/screens/network-viewer/group-details-modal.tsx +68 -49
- package/src/screens/network-viewer/index.ts +4 -5
- package/src/screens/network-viewer/network-viewer-ipc.ts +23 -0
- package/src/screens/network-viewer/network-viewer.tsx +261 -236
- package/src/screens/network-viewer/usage-graph.tsx +57 -49
- package/src/screens/packages/package-details.tsx +43 -35
- package/src/screens/packages/package-info.tsx +107 -66
- package/src/screens/packages/package-list.tsx +175 -98
- package/src/screens/packages/package-new-local.tsx +28 -26
- package/src/screens/packages/package-versions.tsx +102 -77
- package/src/screens/peer-types/peer-type-details.tsx +60 -50
- package/src/screens/peer-types/peer-type-list.tsx +20 -30
- package/src/screens/search/global-search.tsx +153 -137
- package/src/screens/settings/color-mode-dropdown.tsx +52 -35
- package/src/screens/settings/settings-page.tsx +215 -141
- package/src/screens/settings/voice-settings-agent.tsx +13 -12
- package/src/screens/settings/voice-settings-api-keys.tsx +14 -12
- package/src/screens/settings/voice-settings-output.tsx +12 -11
- package/src/screens/settings/voice-settings-providers.tsx +7 -3
- package/src/screens/settings/voice-settings-types.ts +52 -49
- package/src/screens/settings/voice-settings-wake-word.tsx +25 -9
- package/src/screens/settings/voice-settings.tsx +66 -43
- package/src/screens/setup-user.tsx +88 -41
- package/src/screens/tools/tool-code.tsx +12 -17
- package/src/screens/tools/tool-details.tsx +28 -28
- package/src/screens/tools/tool-info.tsx +14 -19
- package/src/screens/tools/tool-list.tsx +58 -40
- package/src/screens/tools/tool-schema.tsx +16 -9
- package/src/screens/tools/tool-test-details.tsx +11 -22
- package/src/screens/tools/tool-test-list.tsx +29 -30
- package/src/screens/variables/variable-details.tsx +63 -51
- package/src/screens/variables/variable-list.tsx +29 -30
- package/src/screens/welcome-modal.tsx +68 -48
- package/src/screens/workflows/workflow-details.tsx +40 -30
- package/src/screens/workflows/workflow-info.tsx +4 -11
- package/src/screens/workflows/workflow-instructions.tsx +35 -28
- package/src/screens/workflows/workflow-list.tsx +50 -40
- package/src/setupTests.ts +14 -13
- package/src/system-apps/assistants.app.ts +5 -5
- package/src/system-apps/console-logs.app.ts +4 -4
- package/src/system-apps/contacts.app.ts +6 -6
- package/src/system-apps/data-explorer.app.ts +5 -5
- package/src/system-apps/groups.app.ts +6 -6
- package/src/system-apps/index.ts +49 -49
- package/src/system-apps/join-group.app.ts +5 -5
- package/src/system-apps/mobile-settings.app.ts +4 -5
- package/src/system-apps/network-viewer.app.ts +5 -5
- package/src/system-apps/packages.app.ts +5 -5
- package/src/system-apps/search.app.ts +6 -6
- package/src/system-apps/settings.app.ts +5 -5
- package/src/system-apps/threads.app.ts +5 -5
- package/src/system-apps/tools.app.ts +5 -5
- package/src/system-apps/types.app.ts +5 -5
- package/src/system-apps/variables.app.ts +5 -5
- package/src/system-apps/workflows.app.ts +5 -5
- package/src/tabs-layout/tabs-layout.tsx +345 -254
- package/src/tabs-layout/tabs-state.ts +100 -81
- package/src/ui-defaults/index.ts +2 -3
- package/src/ui-defaults/list-screen.tsx +45 -40
- package/src/ui-defaults/markdown-field.tsx +22 -26
- package/src/ui-router/routes-loader.ts +40 -24
- package/src/ui-router/ui-loader.tsx +312 -214
- package/src/utils.ts +68 -81
- package/tsconfig.json +5 -10
- package/dist/components/input-datetime.d.ts +0 -7
- package/dist/components/input-datetime.js +0 -35
- package/dist/components/lazy-sortable-list.d.ts +0 -29
- package/dist/components/lazy-sortable-list.js +0 -12
- package/dist/components/left-bar.d.ts +0 -5
- package/dist/components/left-bar.js +0 -207
- package/dist/components/main-content-container.d.ts +0 -2
- package/dist/components/main-content-container.js +0 -92
- package/dist/components/messages/thread-view.d.ts +0 -6
- package/dist/components/messages/thread-view.js +0 -174
- package/dist/components/off-canvas.d.ts +0 -13
- package/dist/components/off-canvas.js +0 -89
- package/dist/components/text-list-editor.tsx/text-list-editor.d.ts +0 -6
- package/dist/components/text-list-editor.tsx/text-list-editor.js +0 -13
- package/dist/components/top-bar.d.ts +0 -2
- package/dist/components/top-bar.js +0 -51
- package/dist/components/typeahead/mentions-plugin.d.ts +0 -7
- package/dist/components/typeahead/mentions-plugin.js +0 -203
- package/dist/components/typeahead/typeahead-editor.d.ts +0 -15
- package/dist/components/typeahead/typeahead-editor.js +0 -134
- package/dist/components/typeahead/typeahead.d.ts +0 -12
- package/dist/components/typeahead/typeahead.js +0 -94
- package/dist/screens/profile.d.ts +0 -2
- package/dist/screens/profile.js +0 -76
- package/src/components/input-datetime.tsx +0 -41
- package/src/components/lazy-sortable-list.tsx +0 -51
- package/src/components/left-bar.tsx +0 -322
- package/src/components/main-content-container.tsx +0 -79
- package/src/components/messages/thread-view.tsx +0 -214
- package/src/components/off-canvas.tsx +0 -83
- package/src/components/text-list-editor.tsx/text-list-editor.tsx +0 -13
- package/src/components/top-bar.tsx +0 -119
- package/src/components/typeahead/mentions-plugin.tsx +0 -265
- package/src/components/typeahead/typeahead-editor.tsx +0 -140
- package/src/components/typeahead/typeahead.tsx +0 -77
- package/src/screens/profile.tsx +0 -75
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LoadingIndicator } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { useCallback, useEffect, useState } from "react";
|
|
2
|
+
import { LoadingIndicator } from "../../components/loading-indicator";
|
|
3
|
+
import { isDesktop } from "../../globals";
|
|
4
|
+
import { registerInternalPeersUI } from "../../ui-router/ui-loader";
|
|
5
5
|
|
|
6
6
|
interface ITableInfo {
|
|
7
7
|
tableName: string;
|
|
@@ -13,39 +13,54 @@ interface ITableInfo {
|
|
|
13
13
|
bytes?: number;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
type DataExplorerElectronApi = {
|
|
17
|
+
getCurrentContext: () => Promise<{ contextName: string }>;
|
|
18
|
+
getAllTables: () => Promise<ITableInfo[]>;
|
|
19
|
+
compactDatabase: (beforeTimestamp?: number) => Promise<void>;
|
|
20
|
+
resetChangeTracking: () => Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type WindowWithDataExplorer = Window & {
|
|
24
|
+
electronAPI?: { dataExplorer?: DataExplorerElectronApi };
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function getDataExplorerApi(): DataExplorerElectronApi | undefined {
|
|
28
|
+
return (window as WindowWithDataExplorer).electronAPI?.dataExplorer;
|
|
29
|
+
}
|
|
30
|
+
|
|
16
31
|
export function DataExplorerList() {
|
|
17
32
|
const [tables, setTables] = useState<ITableInfo[]>([]);
|
|
18
33
|
const [loading, setLoading] = useState(true);
|
|
19
|
-
const [currentContext, setCurrentContext] = useState<string>(
|
|
34
|
+
const [currentContext, setCurrentContext] = useState<string>("");
|
|
20
35
|
const [compacting, setCompacting] = useState(false);
|
|
21
36
|
|
|
22
37
|
const formatBytes = (bytes: number | undefined) => {
|
|
23
|
-
if (bytes === undefined) return
|
|
24
|
-
if (bytes === 0) return
|
|
38
|
+
if (bytes === undefined) return "-";
|
|
39
|
+
if (bytes === 0) return "0 B";
|
|
25
40
|
const k = 1024;
|
|
26
|
-
const sizes = [
|
|
41
|
+
const sizes = ["B", "KB", "MB", "GB"];
|
|
27
42
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
28
|
-
return Math.round(bytes /
|
|
43
|
+
return `${Math.round(bytes / k ** i)} ${sizes[i]}`;
|
|
29
44
|
};
|
|
30
45
|
|
|
31
46
|
const getBytesColorClass = (bytes: number | undefined): string => {
|
|
32
|
-
if (bytes === undefined) return
|
|
47
|
+
if (bytes === undefined) return "text-secondary";
|
|
33
48
|
const kb = 1024;
|
|
34
49
|
const mb = kb * 1024;
|
|
35
50
|
|
|
36
|
-
if (bytes < 10 * kb) return
|
|
37
|
-
if (bytes < 10 * mb) return
|
|
38
|
-
if (bytes < 100 * mb) return
|
|
39
|
-
return
|
|
51
|
+
if (bytes < 10 * kb) return "text-secondary"; // 0 to 10KB: secondary (gray)
|
|
52
|
+
if (bytes < 10 * mb) return "text-primary"; // 10KB to 10MB: primary (blue)
|
|
53
|
+
if (bytes < 100 * mb) return "text-warning"; // 10MB to 100MB: warning (orange)
|
|
54
|
+
return "text-danger"; // >100MB: danger (red)
|
|
40
55
|
};
|
|
41
56
|
|
|
42
|
-
const loadTables = async () => {
|
|
57
|
+
const loadTables = useCallback(async () => {
|
|
43
58
|
try {
|
|
44
59
|
if (!isDesktop()) return;
|
|
45
60
|
|
|
46
|
-
const api = (
|
|
61
|
+
const api = getDataExplorerApi();
|
|
47
62
|
if (!api) {
|
|
48
|
-
console.warn(
|
|
63
|
+
console.warn("Data Explorer API not available");
|
|
49
64
|
return;
|
|
50
65
|
}
|
|
51
66
|
|
|
@@ -66,25 +81,25 @@ export function DataExplorerList() {
|
|
|
66
81
|
|
|
67
82
|
setTables(allTablesInfo);
|
|
68
83
|
} catch (error) {
|
|
69
|
-
console.error(
|
|
84
|
+
console.error("Error loading tables:", error);
|
|
70
85
|
} finally {
|
|
71
86
|
setLoading(false);
|
|
72
87
|
}
|
|
73
|
-
};
|
|
88
|
+
}, []);
|
|
74
89
|
|
|
75
90
|
const compactDatabase = async (beforeTimestamp?: number) => {
|
|
76
91
|
try {
|
|
77
92
|
setCompacting(true);
|
|
78
|
-
const api = (
|
|
93
|
+
const api = getDataExplorerApi();
|
|
79
94
|
if (!api) {
|
|
80
|
-
alert(
|
|
95
|
+
alert("Data Explorer API not available");
|
|
81
96
|
return;
|
|
82
97
|
}
|
|
83
98
|
|
|
84
99
|
const isExtreme = beforeTimestamp !== undefined;
|
|
85
100
|
if (isExtreme) {
|
|
86
101
|
const confirmed = window.confirm(
|
|
87
|
-
|
|
102
|
+
"Extreme Compaction will remove ALL change history. This cannot be undone. Continue?",
|
|
88
103
|
);
|
|
89
104
|
if (!confirmed) {
|
|
90
105
|
setCompacting(false);
|
|
@@ -93,14 +108,14 @@ export function DataExplorerList() {
|
|
|
93
108
|
}
|
|
94
109
|
|
|
95
110
|
await api.compactDatabase(beforeTimestamp);
|
|
96
|
-
alert(`Database compacted successfully!${isExtreme ?
|
|
111
|
+
alert(`Database compacted successfully!${isExtreme ? " (Extreme mode)" : ""}`);
|
|
97
112
|
|
|
98
113
|
// Reload tables to show updated sizes
|
|
99
114
|
setLoading(true);
|
|
100
115
|
await loadTables();
|
|
101
|
-
} catch (error:
|
|
102
|
-
console.error(
|
|
103
|
-
alert(`Error compacting database: ${error.message
|
|
116
|
+
} catch (error: unknown) {
|
|
117
|
+
console.error("Error compacting database:", error);
|
|
118
|
+
alert(`Error compacting database: ${error instanceof Error ? error.message : String(error)}`);
|
|
104
119
|
} finally {
|
|
105
120
|
setCompacting(false);
|
|
106
121
|
}
|
|
@@ -109,14 +124,14 @@ export function DataExplorerList() {
|
|
|
109
124
|
const resetChangeTracking = async () => {
|
|
110
125
|
try {
|
|
111
126
|
setCompacting(true);
|
|
112
|
-
const api = (
|
|
127
|
+
const api = getDataExplorerApi();
|
|
113
128
|
if (!api) {
|
|
114
|
-
alert(
|
|
129
|
+
alert("Data Explorer API not available");
|
|
115
130
|
return;
|
|
116
131
|
}
|
|
117
132
|
|
|
118
133
|
const confirmed = window.confirm(
|
|
119
|
-
|
|
134
|
+
"Reset Change Tracking will clear all change history and rebuild it from scratch. This may take a while. Continue?",
|
|
120
135
|
);
|
|
121
136
|
if (!confirmed) {
|
|
122
137
|
setCompacting(false);
|
|
@@ -124,14 +139,16 @@ export function DataExplorerList() {
|
|
|
124
139
|
}
|
|
125
140
|
|
|
126
141
|
await api.resetChangeTracking();
|
|
127
|
-
alert(
|
|
142
|
+
alert("Change tracking reset successfully!");
|
|
128
143
|
|
|
129
144
|
// Reload tables to show updated sizes
|
|
130
145
|
setLoading(true);
|
|
131
146
|
await loadTables();
|
|
132
|
-
} catch (error:
|
|
133
|
-
console.error(
|
|
134
|
-
alert(
|
|
147
|
+
} catch (error: unknown) {
|
|
148
|
+
console.error("Error resetting change tracking:", error);
|
|
149
|
+
alert(
|
|
150
|
+
`Error resetting change tracking: ${error instanceof Error ? error.message : String(error)}`,
|
|
151
|
+
);
|
|
135
152
|
} finally {
|
|
136
153
|
setCompacting(false);
|
|
137
154
|
}
|
|
@@ -139,7 +156,7 @@ export function DataExplorerList() {
|
|
|
139
156
|
|
|
140
157
|
useEffect(() => {
|
|
141
158
|
loadTables();
|
|
142
|
-
}, []);
|
|
159
|
+
}, [loadTables]);
|
|
143
160
|
|
|
144
161
|
if (loading) {
|
|
145
162
|
return <LoadingIndicator />;
|
|
@@ -158,9 +175,7 @@ export function DataExplorerList() {
|
|
|
158
175
|
if (!currentContext && tables.length === 0) {
|
|
159
176
|
return (
|
|
160
177
|
<div className="container-fluid p-4">
|
|
161
|
-
<div className="alert alert-warning">
|
|
162
|
-
Unable to load database information.
|
|
163
|
-
</div>
|
|
178
|
+
<div className="alert alert-warning">Unable to load database information.</div>
|
|
164
179
|
</div>
|
|
165
180
|
);
|
|
166
181
|
}
|
|
@@ -195,7 +210,11 @@ export function DataExplorerList() {
|
|
|
195
210
|
>
|
|
196
211
|
{compacting ? (
|
|
197
212
|
<>
|
|
198
|
-
<span
|
|
213
|
+
<span
|
|
214
|
+
className="spinner-border spinner-border-sm me-1"
|
|
215
|
+
role="status"
|
|
216
|
+
aria-hidden="true"
|
|
217
|
+
></span>
|
|
199
218
|
Compacting...
|
|
200
219
|
</>
|
|
201
220
|
) : (
|
|
@@ -229,7 +248,9 @@ export function DataExplorerList() {
|
|
|
229
248
|
<div className="small text-muted">Remove ALL change history</div>
|
|
230
249
|
</a>
|
|
231
250
|
</li>
|
|
232
|
-
<li
|
|
251
|
+
<li>
|
|
252
|
+
<hr className="dropdown-divider" />
|
|
253
|
+
</li>
|
|
233
254
|
<li>
|
|
234
255
|
<a
|
|
235
256
|
className="dropdown-item"
|
|
@@ -282,13 +303,14 @@ export function DataExplorerList() {
|
|
|
282
303
|
<div className="card mb-4">
|
|
283
304
|
<div className="card-body">
|
|
284
305
|
<h5 className="card-title">
|
|
285
|
-
Registered Tables ({tables.filter(t => t.isRegistered).length})
|
|
306
|
+
Registered Tables ({tables.filter((t) => t.isRegistered).length})
|
|
286
307
|
<span className="badge bg-success ms-2">Active</span>
|
|
287
308
|
</h5>
|
|
288
309
|
<p className="text-muted small">
|
|
289
|
-
These tables are registered with the TableContainer and actively used by the
|
|
310
|
+
These tables are registered with the TableContainer and actively used by the
|
|
311
|
+
application.
|
|
290
312
|
</p>
|
|
291
|
-
{tables.filter(t => t.isRegistered).length === 0 ? (
|
|
313
|
+
{tables.filter((t) => t.isRegistered).length === 0 ? (
|
|
292
314
|
<p className="text-muted">No registered tables found</p>
|
|
293
315
|
) : (
|
|
294
316
|
<div className="table-responsive">
|
|
@@ -302,22 +324,24 @@ export function DataExplorerList() {
|
|
|
302
324
|
</tr>
|
|
303
325
|
</thead>
|
|
304
326
|
<tbody>
|
|
305
|
-
{tables
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
327
|
+
{tables
|
|
328
|
+
.filter((t) => t.isRegistered)
|
|
329
|
+
.map((table) => (
|
|
330
|
+
<tr key={table.tableName}>
|
|
331
|
+
<td>
|
|
332
|
+
<strong>{table.tableName}</strong>
|
|
333
|
+
</td>
|
|
334
|
+
<td>
|
|
335
|
+
<code className="text-muted small">{table.tableId || "system"}</code>
|
|
336
|
+
</td>
|
|
337
|
+
<td className="text-end">
|
|
338
|
+
{table.rowCount !== undefined ? table.rowCount.toLocaleString() : "-"}
|
|
339
|
+
</td>
|
|
340
|
+
<td className={`text-end fw-bold ${getBytesColorClass(table.bytes)}`}>
|
|
341
|
+
{formatBytes(table.bytes)}
|
|
342
|
+
</td>
|
|
343
|
+
</tr>
|
|
344
|
+
))}
|
|
321
345
|
</tbody>
|
|
322
346
|
</table>
|
|
323
347
|
</div>
|
|
@@ -326,16 +350,16 @@ export function DataExplorerList() {
|
|
|
326
350
|
</div>
|
|
327
351
|
|
|
328
352
|
{/* Unregistered Tables (Raw SQLite) */}
|
|
329
|
-
{tables.some(t => !t.isRegistered) && (
|
|
353
|
+
{tables.some((t) => !t.isRegistered) && (
|
|
330
354
|
<div className="card">
|
|
331
355
|
<div className="card-body">
|
|
332
356
|
<h5 className="card-title">
|
|
333
|
-
Unregistered Tables ({tables.filter(t => !t.isRegistered).length})
|
|
357
|
+
Unregistered Tables ({tables.filter((t) => !t.isRegistered).length})
|
|
334
358
|
<span className="badge bg-warning text-dark ms-2">Raw SQLite</span>
|
|
335
359
|
</h5>
|
|
336
360
|
<p className="text-muted small">
|
|
337
|
-
These tables exist in the SQLite database but are not registered with the
|
|
338
|
-
They may be system tables, change tracking tables, or legacy tables.
|
|
361
|
+
These tables exist in the SQLite database but are not registered with the
|
|
362
|
+
TableContainer. They may be system tables, change tracking tables, or legacy tables.
|
|
339
363
|
</p>
|
|
340
364
|
<div className="table-responsive">
|
|
341
365
|
<table className="table table-hover table-sm">
|
|
@@ -349,36 +373,48 @@ export function DataExplorerList() {
|
|
|
349
373
|
</tr>
|
|
350
374
|
</thead>
|
|
351
375
|
<tbody>
|
|
352
|
-
{tables
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
376
|
+
{tables
|
|
377
|
+
.filter((t) => !t.isRegistered)
|
|
378
|
+
.map((table) => (
|
|
379
|
+
<tr key={table.tableName}>
|
|
380
|
+
<td>
|
|
381
|
+
<strong>{table.tableName}</strong>
|
|
382
|
+
</td>
|
|
383
|
+
<td>
|
|
384
|
+
<span className="badge bg-secondary">{table.type || "table"}</span>
|
|
385
|
+
</td>
|
|
386
|
+
<td className="text-end">
|
|
387
|
+
{table.rowCount !== undefined ? table.rowCount.toLocaleString() : "-"}
|
|
388
|
+
</td>
|
|
389
|
+
<td className={`text-end fw-bold ${getBytesColorClass(table.bytes)}`}>
|
|
390
|
+
{formatBytes(table.bytes)}
|
|
391
|
+
</td>
|
|
392
|
+
<td>
|
|
393
|
+
{table.sql ? (
|
|
394
|
+
<details>
|
|
395
|
+
<summary
|
|
396
|
+
className="cursor-pointer text-primary"
|
|
397
|
+
style={{ cursor: "pointer" }}
|
|
398
|
+
>
|
|
399
|
+
<small>View SQL</small>
|
|
400
|
+
</summary>
|
|
401
|
+
<pre
|
|
402
|
+
className="mt-2 p-2 bg-body-secondary border rounded"
|
|
403
|
+
style={{
|
|
404
|
+
fontSize: "0.75rem",
|
|
405
|
+
maxHeight: "300px",
|
|
406
|
+
overflow: "auto",
|
|
407
|
+
}}
|
|
408
|
+
>
|
|
409
|
+
<code className="text-body">{table.sql}</code>
|
|
410
|
+
</pre>
|
|
411
|
+
</details>
|
|
412
|
+
) : (
|
|
413
|
+
<span className="text-muted small">-</span>
|
|
414
|
+
)}
|
|
415
|
+
</td>
|
|
416
|
+
</tr>
|
|
417
|
+
))}
|
|
382
418
|
</tbody>
|
|
383
419
|
</table>
|
|
384
420
|
</div>
|
|
@@ -390,13 +426,13 @@ export function DataExplorerList() {
|
|
|
390
426
|
}
|
|
391
427
|
|
|
392
428
|
registerInternalPeersUI({
|
|
393
|
-
peersUIId:
|
|
429
|
+
peersUIId: "data-explorer-list-ui",
|
|
394
430
|
component: DataExplorerList,
|
|
395
431
|
routes: [
|
|
396
432
|
{
|
|
397
|
-
isMatch: (_props, context) => context.path ===
|
|
398
|
-
uiCategory:
|
|
399
|
-
priority: 2
|
|
400
|
-
}
|
|
401
|
-
]
|
|
433
|
+
isMatch: (_props, context) => context.path === "data-explorer",
|
|
434
|
+
uiCategory: "screen",
|
|
435
|
+
priority: 2,
|
|
436
|
+
},
|
|
437
|
+
],
|
|
402
438
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
1
|
// Import all data explorer screen components to ensure they register their routes
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import "./data-explorer";
|
|
3
|
+
import "./query-executor";
|
|
5
4
|
|
|
6
5
|
export * from "./data-explorer";
|
|
7
6
|
export * from "./query-executor";
|