@vezham/react 26.0.0-alpha.5 → 26.0.0-alpha.6
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/README.md +2 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/lib/components/actions-header/index.d.ts +26 -0
- package/dist/lib/components/actions-header/index.d.ts.map +1 -0
- package/dist/lib/components/actions-header/index.js +126 -0
- package/dist/lib/components/app-icon/index.d.ts +499 -0
- package/dist/lib/components/app-icon/index.d.ts.map +1 -0
- package/dist/lib/components/app-icon/index.js +513 -0
- package/dist/lib/components/app-menu/index.d.ts +22 -0
- package/dist/lib/components/app-menu/index.d.ts.map +1 -0
- package/dist/lib/components/app-menu/index.js +17 -0
- package/dist/lib/components/command/command-dialog.d.ts +10 -0
- package/dist/lib/components/command/command-dialog.d.ts.map +1 -0
- package/dist/lib/components/command/command-dialog.js +129 -0
- package/dist/lib/components/command/command-provider.d.ts +8 -0
- package/dist/lib/components/command/command-provider.d.ts.map +1 -0
- package/dist/lib/components/command/command-provider.js +44 -0
- package/dist/lib/components/command/index.d.ts +3 -0
- package/dist/lib/components/command/index.d.ts.map +1 -0
- package/dist/lib/components/command/index.js +3 -0
- package/dist/lib/components/menu/drawer.d.ts +4 -0
- package/dist/lib/components/menu/drawer.d.ts.map +1 -0
- package/dist/lib/components/menu/drawer.js +56 -0
- package/dist/lib/components/menu/index.d.ts +5 -0
- package/dist/lib/components/menu/index.d.ts.map +1 -0
- package/dist/lib/components/menu/index.js +138 -0
- package/dist/lib/components/menu/sheet.d.ts +15 -0
- package/dist/lib/components/menu/sheet.d.ts.map +1 -0
- package/dist/lib/components/menu/sheet.js +40 -0
- package/dist/lib/components/menu/types.d.ts +30 -0
- package/dist/lib/components/menu/types.d.ts.map +1 -0
- package/dist/lib/components/menu/types.js +7 -0
- package/dist/lib/components/menu/variant.d.ts +27 -0
- package/dist/lib/components/menu/variant.d.ts.map +1 -0
- package/dist/lib/components/menu/variant.js +28 -0
- package/dist/lib/components/mobile-controls/index.d.ts +11 -0
- package/dist/lib/components/mobile-controls/index.d.ts.map +1 -0
- package/dist/lib/components/mobile-controls/index.js +21 -0
- package/dist/lib/components/pagination/index.d.ts +10 -0
- package/dist/lib/components/pagination/index.d.ts.map +1 -0
- package/dist/lib/components/pagination/index.js +25 -0
- package/dist/lib/components/panel/footer/ai/chat-header.d.ts +9 -0
- package/dist/lib/components/panel/footer/ai/chat-header.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/chat-header.js +63 -0
- package/dist/lib/components/panel/footer/ai/composer.d.ts +7 -0
- package/dist/lib/components/panel/footer/ai/composer.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/composer.js +77 -0
- package/dist/lib/components/panel/footer/ai/content.d.ts +13 -0
- package/dist/lib/components/panel/footer/ai/content.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/content.js +148 -0
- package/dist/lib/components/panel/footer/ai/conversation.d.ts +47 -0
- package/dist/lib/components/panel/footer/ai/conversation.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/conversation.js +222 -0
- package/dist/lib/components/panel/footer/ai/index.d.ts +3 -0
- package/dist/lib/components/panel/footer/ai/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/index.js +41 -0
- package/dist/lib/components/panel/footer/ai/message-actions.d.ts +8 -0
- package/dist/lib/components/panel/footer/ai/message-actions.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/message-actions.js +63 -0
- package/dist/lib/components/panel/footer/ai/mock-result.d.ts +6 -0
- package/dist/lib/components/panel/footer/ai/mock-result.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/mock-result.js +121 -0
- package/dist/lib/components/panel/footer/ai/model-logo.d.ts +5 -0
- package/dist/lib/components/panel/footer/ai/model-logo.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/model-logo.js +13 -0
- package/dist/lib/components/panel/footer/ai/model-logos.d.ts +2 -0
- package/dist/lib/components/panel/footer/ai/model-logos.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/model-logos.js +10 -0
- package/dist/lib/components/panel/footer/ai/model-picker.d.ts +8 -0
- package/dist/lib/components/panel/footer/ai/model-picker.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/model-picker.js +166 -0
- package/dist/lib/components/panel/footer/ai/models.d.ts +9 -0
- package/dist/lib/components/panel/footer/ai/models.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/models.js +72 -0
- package/dist/lib/components/panel/footer/ai/permission-picker.d.ts +5 -0
- package/dist/lib/components/panel/footer/ai/permission-picker.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/permission-picker.js +63 -0
- package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts +9 -0
- package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/ai/use-chat-scroll.js +57 -0
- package/dist/lib/components/panel/footer/control-center/appearance.d.ts +16 -0
- package/dist/lib/components/panel/footer/control-center/appearance.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/appearance.js +100 -0
- package/dist/lib/components/panel/footer/control-center/configured.d.ts +13 -0
- package/dist/lib/components/panel/footer/control-center/configured.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/configured.js +157 -0
- package/dist/lib/components/panel/footer/control-center/control-center.d.ts +8 -0
- package/dist/lib/components/panel/footer/control-center/control-center.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/control-center.js +180 -0
- package/dist/lib/components/panel/footer/control-center/default.d.ts +3 -0
- package/dist/lib/components/panel/footer/control-center/default.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/default.js +37 -0
- package/dist/lib/components/panel/footer/control-center/direction.d.ts +9 -0
- package/dist/lib/components/panel/footer/control-center/direction.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/direction.js +40 -0
- package/dist/lib/components/panel/footer/control-center/document.d.ts +5 -0
- package/dist/lib/components/panel/footer/control-center/document.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/document.js +19 -0
- package/dist/lib/components/panel/footer/control-center/editor.d.ts +25 -0
- package/dist/lib/components/panel/footer/control-center/editor.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/editor.js +72 -0
- package/dist/lib/components/panel/footer/control-center/footer-context.d.ts +6 -0
- package/dist/lib/components/panel/footer/control-center/footer-context.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/footer-context.js +5 -0
- package/dist/lib/components/panel/footer/control-center/index.d.ts +15 -0
- package/dist/lib/components/panel/footer/control-center/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/index.js +11 -0
- package/dist/lib/components/panel/footer/control-center/language.d.ts +19 -0
- package/dist/lib/components/panel/footer/control-center/language.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/language.js +44 -0
- package/dist/lib/components/panel/footer/control-center/options.d.ts +7 -0
- package/dist/lib/components/panel/footer/control-center/options.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/options.js +27 -0
- package/dist/lib/components/panel/footer/control-center/preview.d.ts +34 -0
- package/dist/lib/components/panel/footer/control-center/preview.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/preview.js +366 -0
- package/dist/lib/components/panel/footer/control-center/theme.d.ts +6 -0
- package/dist/lib/components/panel/footer/control-center/theme.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/theme.js +150 -0
- package/dist/lib/components/panel/footer/control-center/tile.d.ts +10 -0
- package/dist/lib/components/panel/footer/control-center/tile.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/tile.js +34 -0
- package/dist/lib/components/panel/footer/control-center/types.d.ts +94 -0
- package/dist/lib/components/panel/footer/control-center/types.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/variant.d.ts +268 -0
- package/dist/lib/components/panel/footer/control-center/variant.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/control-center/variant.js +89 -0
- package/dist/lib/components/panel/footer/data.d.ts +38 -0
- package/dist/lib/components/panel/footer/data.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/data.js +90 -0
- package/dist/lib/components/panel/footer/drawer-accessors.d.ts +46 -0
- package/dist/lib/components/panel/footer/drawer-accessors.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/drawer-accessors.js +21 -0
- package/dist/lib/components/panel/footer/drawer-frame.d.ts +12 -0
- package/dist/lib/components/panel/footer/drawer-frame.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/drawer-frame.js +19 -0
- package/dist/lib/components/panel/footer/index.d.ts +4 -0
- package/dist/lib/components/panel/footer/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/index.js +147 -0
- package/dist/lib/components/panel/footer/notification-center/index.d.ts +4 -0
- package/dist/lib/components/panel/footer/notification-center/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/notification-center/index.js +98 -0
- package/dist/lib/components/panel/footer/notification-center/types.d.ts +525 -0
- package/dist/lib/components/panel/footer/notification-center/types.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/notification-center/types.js +62 -0
- package/dist/lib/components/panel/footer/notification-center/variant.d.ts +322 -0
- package/dist/lib/components/panel/footer/notification-center/variant.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/notification-center/variant.js +119 -0
- package/dist/lib/components/panel/footer/notification-center/widget-tiles.d.ts +49 -0
- package/dist/lib/components/panel/footer/notification-center/widget-tiles.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/notification-center/widget-tiles.js +182 -0
- package/dist/lib/components/panel/footer/preferences/data.d.ts +14 -0
- package/dist/lib/components/panel/footer/preferences/data.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/preferences/data.js +304 -0
- package/dist/lib/components/panel/footer/preferences/modal.d.ts +8 -0
- package/dist/lib/components/panel/footer/preferences/modal.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/preferences/modal.js +75 -0
- package/dist/lib/components/panel/footer/preferences/sidebar.d.ts +9 -0
- package/dist/lib/components/panel/footer/preferences/sidebar.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/preferences/sidebar.js +105 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts +3 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/account/index.js +16 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts +3 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.js +16 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts +3 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.js +101 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts +3 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.js +24 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts +3 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.js +103 -0
- package/dist/lib/components/panel/footer/tabs.d.ts +12 -0
- package/dist/lib/components/panel/footer/tabs.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/tabs.js +23 -0
- package/dist/lib/components/panel/footer/types.d.ts +39 -0
- package/dist/lib/components/panel/footer/types.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/user-menu.d.ts +10 -0
- package/dist/lib/components/panel/footer/user-menu.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/user-menu.js +290 -0
- package/dist/lib/components/panel/header/application-menu-sheet.d.ts +21 -0
- package/dist/lib/components/panel/header/application-menu-sheet.d.ts.map +1 -0
- package/dist/lib/components/panel/header/application-menu-sheet.js +227 -0
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/index.d.ts +5 -0
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/index.js +225 -0
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/types.d.ts +13 -0
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/types.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/variants.d.ts +28 -0
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/variants.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/variants.js +249 -0
- package/dist/lib/components/panel/header/bookmarks/context-menu/index.d.ts +5 -0
- package/dist/lib/components/panel/header/bookmarks/context-menu/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/context-menu/index.js +147 -0
- package/dist/lib/components/panel/header/bookmarks/context-menu/types.d.ts +25 -0
- package/dist/lib/components/panel/header/bookmarks/context-menu/types.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/data.d.ts +2 -0
- package/dist/lib/components/panel/header/bookmarks/data.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/empty-state.d.ts +8 -0
- package/dist/lib/components/panel/header/bookmarks/empty-state.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/empty-state.js +15 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/data.d.ts +2 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/data.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/grid-list.d.ts +4 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/grid-list.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/grid-list.js +65 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/index.d.ts +5 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/index.js +76 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/types.d.ts +12 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/types.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/variant.d.ts +211 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/variant.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/favorites/variant.js +77 -0
- package/dist/lib/components/panel/header/bookmarks/folder-modal/index.d.ts +7 -0
- package/dist/lib/components/panel/header/bookmarks/folder-modal/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/folder-modal/index.js +221 -0
- package/dist/lib/components/panel/header/bookmarks/folder-modal/types.d.ts +25 -0
- package/dist/lib/components/panel/header/bookmarks/folder-modal/types.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/folder-modal/variants.d.ts +14 -0
- package/dist/lib/components/panel/header/bookmarks/folder-modal/variants.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/folder-modal/variants.js +95 -0
- package/dist/lib/components/panel/header/bookmarks/index.d.ts +5 -0
- package/dist/lib/components/panel/header/bookmarks/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/index.js +247 -0
- package/dist/lib/components/panel/header/bookmarks/membership.d.ts +14 -0
- package/dist/lib/components/panel/header/bookmarks/membership.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/membership.js +13 -0
- package/dist/lib/components/panel/header/bookmarks/quick-access/index.d.ts +4 -0
- package/dist/lib/components/panel/header/bookmarks/quick-access/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/quick-access/index.js +224 -0
- package/dist/lib/components/panel/header/bookmarks/quick-access/types.d.ts +38 -0
- package/dist/lib/components/panel/header/bookmarks/quick-access/types.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/shortcut-context-menu.d.ts +11 -0
- package/dist/lib/components/panel/header/bookmarks/shortcut-context-menu.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/shortcut-context-menu.js +39 -0
- package/dist/lib/components/panel/header/bookmarks/tree-data.d.ts +4 -0
- package/dist/lib/components/panel/header/bookmarks/tree-data.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/tree-data.js +97 -0
- package/dist/lib/components/panel/header/bookmarks/types.d.ts +648 -0
- package/dist/lib/components/panel/header/bookmarks/types.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/types.js +198 -0
- package/dist/lib/components/panel/header/bookmarks/variant.d.ts +334 -0
- package/dist/lib/components/panel/header/bookmarks/variant.d.ts.map +1 -0
- package/dist/lib/components/panel/header/bookmarks/variant.js +121 -0
- package/dist/lib/components/panel/header/index.d.ts +4 -0
- package/dist/lib/components/panel/header/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/index.js +366 -0
- package/dist/lib/components/panel/header/storage/archive/index.d.ts +4 -0
- package/dist/lib/components/panel/header/storage/archive/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/archive/index.js +138 -0
- package/dist/lib/components/panel/header/storage/archive/types.d.ts +27 -0
- package/dist/lib/components/panel/header/storage/archive/types.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/archive/variants.d.ts +6 -0
- package/dist/lib/components/panel/header/storage/archive/variants.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/archive/variants.js +8 -0
- package/dist/lib/components/panel/header/storage/data.d.ts +2 -0
- package/dist/lib/components/panel/header/storage/data.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/history-actions.d.ts +16 -0
- package/dist/lib/components/panel/header/storage/history-actions.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/history-actions.js +18 -0
- package/dist/lib/components/panel/header/storage/history-date-group.d.ts +9 -0
- package/dist/lib/components/panel/header/storage/history-date-group.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/history-date-group.js +19 -0
- package/dist/lib/components/panel/header/storage/history-item-content.d.ts +11 -0
- package/dist/lib/components/panel/header/storage/history-item-content.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/history-item-content.js +17 -0
- package/dist/lib/components/panel/header/storage/history-shell.d.ts +8 -0
- package/dist/lib/components/panel/header/storage/history-shell.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/history-shell.js +19 -0
- package/dist/lib/components/panel/header/storage/history-utils.d.ts +7 -0
- package/dist/lib/components/panel/header/storage/history-utils.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/history-utils.js +25 -0
- package/dist/lib/components/panel/header/storage/index.d.ts +5 -0
- package/dist/lib/components/panel/header/storage/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/index.js +120 -0
- package/dist/lib/components/panel/header/storage/trash/index.d.ts +4 -0
- package/dist/lib/components/panel/header/storage/trash/index.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/trash/index.js +126 -0
- package/dist/lib/components/panel/header/storage/trash/types.d.ts +27 -0
- package/dist/lib/components/panel/header/storage/trash/types.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/trash/variants.d.ts +6 -0
- package/dist/lib/components/panel/header/storage/trash/variants.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/trash/variants.js +12 -0
- package/dist/lib/components/panel/header/storage/types.d.ts +482 -0
- package/dist/lib/components/panel/header/storage/types.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/types.js +155 -0
- package/dist/lib/components/panel/header/storage/variant.d.ts +289 -0
- package/dist/lib/components/panel/header/storage/variant.d.ts.map +1 -0
- package/dist/lib/components/panel/header/storage/variant.js +106 -0
- package/dist/lib/components/panel/header/types.d.ts +26 -0
- package/dist/lib/components/panel/header/types.d.ts.map +1 -0
- package/dist/lib/components/panel/info-panel/container.d.ts +9 -0
- package/dist/lib/components/panel/info-panel/container.d.ts.map +1 -0
- package/dist/lib/components/panel/info-panel/container.js +90 -0
- package/dist/lib/components/panel/info-panel/container.module.css +48 -0
- package/dist/lib/components/panel/info-panel/container.module.js +8 -0
- package/dist/lib/components/panel/info-panel/index.d.ts +4 -0
- package/dist/lib/components/panel/info-panel/index.d.ts.map +1 -0
- package/dist/lib/components/panel/info-panel/provider.d.ts +7 -0
- package/dist/lib/components/panel/info-panel/provider.d.ts.map +1 -0
- package/dist/lib/components/panel/info-panel/provider.js +104 -0
- package/dist/lib/components/panel/info-panel/sheet.d.ts +9 -0
- package/dist/lib/components/panel/info-panel/sheet.d.ts.map +1 -0
- package/dist/lib/components/panel/info-panel/sheet.js +70 -0
- package/dist/lib/components/panel/info-panel/styles.d.ts +6 -0
- package/dist/lib/components/panel/info-panel/styles.d.ts.map +1 -0
- package/dist/lib/components/panel/info-panel/styles.js +8 -0
- package/dist/lib/components/panel/info-panel/types.d.ts +21 -0
- package/dist/lib/components/panel/info-panel/types.d.ts.map +1 -0
- package/dist/lib/components/panel/menu/index.d.ts +4 -0
- package/dist/lib/components/panel/menu/index.d.ts.map +1 -0
- package/dist/lib/components/panel/menu/index.js +156 -0
- package/dist/lib/components/panel/menu/types.d.ts +522 -0
- package/dist/lib/components/panel/menu/types.d.ts.map +1 -0
- package/dist/lib/components/panel/menu/types.js +71 -0
- package/dist/lib/components/panel/menu/variant.d.ts +259 -0
- package/dist/lib/components/panel/menu/variant.d.ts.map +1 -0
- package/dist/lib/components/panel/menu/variant.js +131 -0
- package/dist/lib/components/panel/responsive.d.ts +3 -0
- package/dist/lib/components/panel/responsive.d.ts.map +1 -0
- package/dist/lib/components/panel/responsive.js +5 -0
- package/dist/lib/components/responsive-toolbar-action/index.d.ts +11 -0
- package/dist/lib/components/responsive-toolbar-action/index.d.ts.map +1 -0
- package/dist/lib/components/responsive-toolbar-action/index.js +21 -0
- package/dist/lib/components/shortcut-key/index.d.ts +18 -0
- package/dist/lib/components/shortcut-key/index.d.ts.map +1 -0
- package/dist/lib/components/shortcut-key/index.js +44 -0
- package/dist/lib/components/toolbar-actions/index.d.ts +31 -0
- package/dist/lib/components/toolbar-actions/index.d.ts.map +1 -0
- package/dist/lib/components/toolbar-actions/index.js +75 -0
- package/dist/lib/components/workspace-navigation/index.d.ts +24 -0
- package/dist/lib/components/workspace-navigation/index.d.ts.map +1 -0
- package/dist/lib/components/workspace-navigation/index.js +74 -0
- package/dist/lib/layouts/app/frame.d.ts +8 -0
- package/dist/lib/layouts/app/frame.d.ts.map +1 -0
- package/dist/lib/layouts/app/frame.js +20 -0
- package/dist/lib/layouts/app/index.d.ts +27 -0
- package/dist/lib/layouts/app/index.d.ts.map +1 -0
- package/dist/lib/layouts/app/index.js +89 -0
- package/dist/lib/layouts/menu-layout/home-navigation-bubble.d.ts +7 -0
- package/dist/lib/layouts/menu-layout/home-navigation-bubble.d.ts.map +1 -0
- package/dist/lib/layouts/menu-layout/home-navigation-bubble.js +22 -0
- package/dist/lib/layouts/menu-layout/index-md.d.ts +4 -0
- package/dist/lib/layouts/menu-layout/index-md.d.ts.map +1 -0
- package/dist/lib/layouts/menu-layout/index-md.js +142 -0
- package/dist/lib/layouts/menu-layout/index-sm.d.ts +5 -0
- package/dist/lib/layouts/menu-layout/index-sm.d.ts.map +1 -0
- package/dist/lib/layouts/menu-layout/index-sm.js +124 -0
- package/dist/lib/layouts/menu-layout/index.d.ts +8 -0
- package/dist/lib/layouts/menu-layout/index.d.ts.map +1 -0
- package/dist/lib/layouts/menu-layout/index.js +17 -0
- package/dist/lib/layouts/section/index.d.ts +29 -0
- package/dist/lib/layouts/section/index.d.ts.map +1 -0
- package/dist/lib/layouts/section/index.js +285 -0
- package/dist/lib/layouts/section/preferences.d.ts +10 -0
- package/dist/lib/layouts/section/preferences.d.ts.map +1 -0
- package/dist/lib/layouts/section/preferences.js +41 -0
- package/dist/lib/layouts/section/sidebar-state.d.ts +7 -0
- package/dist/lib/layouts/section/sidebar-state.d.ts.map +1 -0
- package/dist/lib/layouts/section/sidebar-state.js +35 -0
- package/dist/lib/layouts/section/sidebar.d.ts +11 -0
- package/dist/lib/layouts/section/sidebar.d.ts.map +1 -0
- package/dist/lib/layouts/section/sidebar.js +84 -0
- package/dist/lib/layouts/section/sort-menu.d.ts +27 -0
- package/dist/lib/layouts/section/sort-menu.d.ts.map +1 -0
- package/dist/lib/layouts/section/sort-menu.js +72 -0
- package/dist/lib/layouts/section/toolbar-content.d.ts +11 -0
- package/dist/lib/layouts/section/toolbar-content.d.ts.map +1 -0
- package/dist/lib/layouts/section/toolbar-content.js +31 -0
- package/dist/lib/layouts/section/toolbar-more-sheet.d.ts +38 -0
- package/dist/lib/layouts/section/toolbar-more-sheet.d.ts.map +1 -0
- package/dist/lib/layouts/section/toolbar-more-sheet.js +288 -0
- package/dist/lib/layouts/section/toolbar.d.ts +60 -0
- package/dist/lib/layouts/section/toolbar.d.ts.map +1 -0
- package/dist/lib/layouts/section/toolbar.js +518 -0
- package/dist/lib/layouts/settings/index.d.ts +5 -0
- package/dist/lib/layouts/settings/index.d.ts.map +1 -0
- package/dist/lib/layouts/settings/index.js +9 -0
- package/dist/lib/navigation-toolbar.d.ts +32 -0
- package/dist/lib/navigation-toolbar.d.ts.map +1 -0
- package/dist/lib/navigation-toolbar.js +29 -0
- package/dist/lib/navigation.d.ts +21 -0
- package/dist/lib/navigation.d.ts.map +1 -0
- package/dist/lib/navigation.js +39 -0
- package/dist/lib/pages/settings/index.d.ts +17 -0
- package/dist/lib/pages/settings/index.d.ts.map +1 -0
- package/dist/lib/pages/settings/index.js +276 -0
- package/dist/lib/pages/settings/navigation.d.ts +4 -0
- package/dist/lib/pages/settings/navigation.d.ts.map +1 -0
- package/dist/lib/pages/settings/navigation.js +6 -0
- package/dist/lib/pages/settings/settings-content.d.ts +5 -0
- package/dist/lib/pages/settings/settings-content.d.ts.map +1 -0
- package/dist/lib/pages/settings/settings-content.js +213 -0
- package/dist/lib/pages/settings/tile-gallery.d.ts +19 -0
- package/dist/lib/pages/settings/tile-gallery.d.ts.map +1 -0
- package/dist/lib/pages/settings/tile-gallery.js +411 -0
- package/dist/lib/store/useBookmarks/action.d.ts +6 -0
- package/dist/lib/store/useBookmarks/action.d.ts.map +1 -0
- package/dist/lib/store/useBookmarks/action.js +7 -0
- package/dist/lib/store/useBookmarks/data.d.ts +4 -0
- package/dist/lib/store/useBookmarks/data.d.ts.map +1 -0
- package/dist/lib/store/useBookmarks/data.js +231 -0
- package/dist/lib/store/useBookmarks/index.d.ts +12 -0
- package/dist/lib/store/useBookmarks/index.d.ts.map +1 -0
- package/dist/lib/store/useBookmarks/index.js +29 -0
- package/dist/lib/store/useBookmarks/types.d.ts +30 -0
- package/dist/lib/store/useBookmarks/types.d.ts.map +1 -0
- package/dist/lib/store/useStorage/action.d.ts +6 -0
- package/dist/lib/store/useStorage/action.d.ts.map +1 -0
- package/dist/lib/store/useStorage/action.js +7 -0
- package/dist/lib/store/useStorage/data.d.ts +3 -0
- package/dist/lib/store/useStorage/data.d.ts.map +1 -0
- package/dist/lib/store/useStorage/data.js +219 -0
- package/dist/lib/store/useStorage/index.d.ts +7 -0
- package/dist/lib/store/useStorage/index.d.ts.map +1 -0
- package/dist/lib/store/useStorage/index.js +13 -0
- package/dist/lib/store/useStorage/types.d.ts +20 -0
- package/dist/lib/store/useStorage/types.d.ts.map +1 -0
- package/dist/lib/store/users/useUserStore.d.ts +22 -0
- package/dist/lib/store/users/useUserStore.d.ts.map +1 -0
- package/dist/lib/store/users/useUserStore.js +46 -0
- package/dist/lib/utils/date.d.ts +2 -0
- package/dist/lib/utils/date.d.ts.map +1 -0
- package/dist/lib/utils/date.js +8 -0
- package/dist/lib/utils/url.d.ts +4 -0
- package/dist/lib/utils/url.d.ts.map +1 -0
- package/dist/lib/utils/url.js +19 -0
- package/dist/react.css +49 -0
- package/package.json +90 -2
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { useInfoPanel } from "../../info-panel/provider.js";
|
|
2
|
+
import { ShortcutTooltipLabel } from "../../../shortcut-key/index.js";
|
|
3
|
+
import { useBookmarks } from "../../../../store/useBookmarks/index.js";
|
|
4
|
+
import { getAppPath, getOpenUrl } from "../../../../utils/url.js";
|
|
5
|
+
import { createDefaultFolderForm } from "./folder-modal/variants.js";
|
|
6
|
+
import { FolderModal } from "./folder-modal/index.js";
|
|
7
|
+
import { collectTreeItemIds, createTreeItemId, dedupeTreeItems, getBookmarkTreeSignature, getExpandableBookmarkKeys, insertFolderItem, moveTreeItemToFolder, removeTreeItem, updateTreeItem } from "./bookmark-file-tree/variants.js";
|
|
8
|
+
import { BookmarkFileTree } from "./bookmark-file-tree/index.js";
|
|
9
|
+
import { getBookmarkShortcuts } from "./membership.js";
|
|
10
|
+
import { QuickAccess } from "./quick-access/index.js";
|
|
11
|
+
import { bookmarksToTreeItems, treeItemsToBookmarks } from "./tree-data.js";
|
|
12
|
+
import { useProps } from "./types.js";
|
|
13
|
+
import { useNavigate } from "@tanstack/react-router";
|
|
14
|
+
import { forwardRef, useMemo, useState } from "react";
|
|
15
|
+
import { ScrollShadow, Tooltip, Typography } from "@vezham/react-v3";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { Bookmark } from "@vezham/icons-react";
|
|
18
|
+
//#region src/lib/components/panel/header/bookmarks/index.tsx
|
|
19
|
+
var useBookmarkItemNavigation = (onFavoriteClick, onBookmarkClick) => {
|
|
20
|
+
const navigate = useNavigate();
|
|
21
|
+
const openItem = (url) => {
|
|
22
|
+
if (!url || url === "#") return;
|
|
23
|
+
const appPath = getAppPath(url, window.location.origin);
|
|
24
|
+
if (appPath) {
|
|
25
|
+
navigate({ to: appPath });
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
window.open(getOpenUrl(url), "_blank", "noopener,noreferrer");
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
openBookmark: (url, item) => onBookmarkClick ? onBookmarkClick(url, item) : openItem(url),
|
|
32
|
+
openFavorite: (url, item) => onFavoriteClick ? onFavoriteClick(url, item) : openItem(url)
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
var getSavedFolderItems = ({ items, form, mode, parentId }) => {
|
|
36
|
+
const folderName = form.name.trim();
|
|
37
|
+
if (!folderName) return null;
|
|
38
|
+
if (mode === "edit" && form.id) return updateTreeItem(items, form.id, (item) => ({
|
|
39
|
+
...item,
|
|
40
|
+
title: folderName,
|
|
41
|
+
color: form.color,
|
|
42
|
+
visualType: form.visualType,
|
|
43
|
+
emoji: form.emoji,
|
|
44
|
+
icon: form.icon
|
|
45
|
+
}));
|
|
46
|
+
const result = insertFolderItem(items, {
|
|
47
|
+
id: createTreeItemId("folder:custom", collectTreeItemIds(items)),
|
|
48
|
+
title: folderName,
|
|
49
|
+
kind: "folder",
|
|
50
|
+
color: form.color,
|
|
51
|
+
visualType: form.visualType,
|
|
52
|
+
emoji: form.emoji,
|
|
53
|
+
icon: form.icon,
|
|
54
|
+
children: []
|
|
55
|
+
}, parentId);
|
|
56
|
+
return result.inserted ? result.items : void 0;
|
|
57
|
+
};
|
|
58
|
+
var BookmarksContent = forwardRef((props, ref) => {
|
|
59
|
+
const { Component, getScrollShadowProps, getContentContainerProps, getSectionProps, getSectionHeaderProps, getSectionIconProps, getSectionTitleProps, getFavorite2ItemsProps, getFavoriteBackgroundImageProps, getFavoriteBackgroundGradientProps, getFavoriteOverlayProps, getFavoriteAvatarContainerProps, getFavoriteAvatarProps, getFavoriteAvatarIconProps, getFavoriteAvatarFallbackProps, getFavoriteContentProps, getFavoriteNameProps, getFileTreeProps, getBookmarkTreeEmptyStateProps, externalFavorites, externalBookmarks, externalPins, onFavoriteClick, onBookmarkClick, renderFavoriteItem, onFavoritesChange, onPinsChange, onFavoritesReorder, onBookmarksReorder, onFolderReorder } = useProps({
|
|
60
|
+
...props,
|
|
61
|
+
ref
|
|
62
|
+
});
|
|
63
|
+
const { openBookmark, openFavorite } = useBookmarkItemNavigation(onFavoriteClick, onBookmarkClick);
|
|
64
|
+
const bookmarksQuery = useBookmarks.list({});
|
|
65
|
+
const bookmarkActions = useBookmarks.actions({});
|
|
66
|
+
const [showAllPinsMode, setShowAllPinsMode] = useState(false);
|
|
67
|
+
const [isScrollFavoritesOpen, setIsScrollFavoritesOpen] = useState(true);
|
|
68
|
+
const [folderModalOpen, setFolderModalOpen] = useState(false);
|
|
69
|
+
const [folderModalMode, setFolderModalMode] = useState("create");
|
|
70
|
+
const [folderParentId, setFolderParentId] = useState();
|
|
71
|
+
const [folderForm, setFolderForm] = useState(() => createDefaultFolderForm());
|
|
72
|
+
const sourceFavorites = externalFavorites ?? bookmarksQuery.data.favorites;
|
|
73
|
+
const membership = getBookmarkShortcuts({
|
|
74
|
+
favorites: useMemo(() => sourceFavorites.slice(0, 12), [sourceFavorites]),
|
|
75
|
+
pins: externalPins ?? bookmarksQuery.data.pins,
|
|
76
|
+
onFavoritesChange: onFavoritesChange ?? bookmarkActions.setFavorites,
|
|
77
|
+
onPinsChange: onPinsChange ?? bookmarkActions.setPins
|
|
78
|
+
});
|
|
79
|
+
const favorites = membership.favorites;
|
|
80
|
+
const bookmarks = externalBookmarks ?? bookmarksQuery.data.bookmarks;
|
|
81
|
+
const activeBookmarkTreeItems = useMemo(() => bookmarksToTreeItems(bookmarks), [bookmarks]);
|
|
82
|
+
const bookmarkTreeExpandedKeys = useMemo(() => getExpandableBookmarkKeys(activeBookmarkTreeItems), [activeBookmarkTreeItems]);
|
|
83
|
+
const bookmarkTreeKey = useMemo(() => getBookmarkTreeSignature(activeBookmarkTreeItems), [activeBookmarkTreeItems]);
|
|
84
|
+
const pins = membership.pins;
|
|
85
|
+
const visiblePins = pins.slice(0, 6);
|
|
86
|
+
const hasMorePins = pins.length > 6;
|
|
87
|
+
const getFavoriteAvatarIconPropsForIcon = getFavoriteAvatarIconProps;
|
|
88
|
+
const handleViewAllPins = () => {
|
|
89
|
+
setShowAllPinsMode(true);
|
|
90
|
+
};
|
|
91
|
+
const handleBackToNormalView = () => {
|
|
92
|
+
setShowAllPinsMode(false);
|
|
93
|
+
};
|
|
94
|
+
const toggleScrollFavorites = () => {
|
|
95
|
+
setIsScrollFavoritesOpen(!isScrollFavoritesOpen);
|
|
96
|
+
};
|
|
97
|
+
const handleBookmarkTreeClick = (item) => {
|
|
98
|
+
openBookmark(item.url ?? "#", item);
|
|
99
|
+
};
|
|
100
|
+
const handleBookmarkTreeChange = (items) => {
|
|
101
|
+
const nextBookmarks = treeItemsToBookmarks(dedupeTreeItems(items));
|
|
102
|
+
if (!externalBookmarks) bookmarkActions.setBookmarks(nextBookmarks);
|
|
103
|
+
onBookmarksReorder?.(nextBookmarks);
|
|
104
|
+
onFolderReorder?.(nextBookmarks);
|
|
105
|
+
};
|
|
106
|
+
const handleBookmarkRemove = (id) => {
|
|
107
|
+
handleBookmarkTreeChange(removeTreeItem(activeBookmarkTreeItems, id));
|
|
108
|
+
};
|
|
109
|
+
const openCreateFolderModal = (parentId) => {
|
|
110
|
+
setFolderModalMode("create");
|
|
111
|
+
setFolderParentId(parentId);
|
|
112
|
+
setFolderForm(createDefaultFolderForm());
|
|
113
|
+
setFolderModalOpen(true);
|
|
114
|
+
};
|
|
115
|
+
const openEditFolderModal = (item) => {
|
|
116
|
+
setFolderModalMode("edit");
|
|
117
|
+
setFolderParentId(void 0);
|
|
118
|
+
setFolderForm({
|
|
119
|
+
id: item.id,
|
|
120
|
+
name: item.title,
|
|
121
|
+
color: item.color ?? "#007aff",
|
|
122
|
+
visualType: item.visualType ?? "icon",
|
|
123
|
+
emoji: item.emoji ?? "😀",
|
|
124
|
+
icon: item.icon ?? "vx:list-filled"
|
|
125
|
+
});
|
|
126
|
+
setFolderModalOpen(true);
|
|
127
|
+
};
|
|
128
|
+
const handleFolderSave = () => {
|
|
129
|
+
const nextItems = getSavedFolderItems({
|
|
130
|
+
items: activeBookmarkTreeItems,
|
|
131
|
+
form: folderForm,
|
|
132
|
+
mode: folderModalMode,
|
|
133
|
+
parentId: folderParentId
|
|
134
|
+
});
|
|
135
|
+
if (nextItems === null) return;
|
|
136
|
+
if (nextItems) handleBookmarkTreeChange(nextItems);
|
|
137
|
+
setFolderModalOpen(false);
|
|
138
|
+
};
|
|
139
|
+
const handleBookmarkMove = (id, targetFolderId) => {
|
|
140
|
+
handleBookmarkTreeChange(moveTreeItemToFolder(activeBookmarkTreeItems, id, targetFolderId).items);
|
|
141
|
+
};
|
|
142
|
+
return /* @__PURE__ */ jsxs(Component, {
|
|
143
|
+
className: "h-full min-h-0",
|
|
144
|
+
children: [/* @__PURE__ */ jsx(ScrollShadow, {
|
|
145
|
+
...getScrollShadowProps(),
|
|
146
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
147
|
+
...getContentContainerProps(),
|
|
148
|
+
children: [/* @__PURE__ */ jsx(QuickAccess, {
|
|
149
|
+
mode: showAllPinsMode ? "all" : "sections",
|
|
150
|
+
favorites,
|
|
151
|
+
onUnpin: membership.unpin,
|
|
152
|
+
onFavoriteRemove: membership.removeFavorite,
|
|
153
|
+
onFavoritesReorder: (items) => {
|
|
154
|
+
membership.reorderFavorites(items);
|
|
155
|
+
onFavoritesReorder?.(items);
|
|
156
|
+
},
|
|
157
|
+
pins,
|
|
158
|
+
visiblePins,
|
|
159
|
+
hasMorePins,
|
|
160
|
+
isScrollFavoritesOpen,
|
|
161
|
+
renderFavoriteItem,
|
|
162
|
+
getSectionProps,
|
|
163
|
+
getSectionHeaderProps,
|
|
164
|
+
getSectionTitleProps,
|
|
165
|
+
getSectionIconProps,
|
|
166
|
+
getFavorite2ItemsProps,
|
|
167
|
+
getFavoriteBackgroundImageProps,
|
|
168
|
+
getFavoriteBackgroundGradientProps,
|
|
169
|
+
getFavoriteOverlayProps,
|
|
170
|
+
getFavoriteAvatarContainerProps,
|
|
171
|
+
getFavoriteAvatarProps,
|
|
172
|
+
getFavoriteAvatarIconProps: getFavoriteAvatarIconPropsForIcon,
|
|
173
|
+
getFavoriteAvatarFallbackProps,
|
|
174
|
+
getFavoriteContentProps,
|
|
175
|
+
getFavoriteNameProps,
|
|
176
|
+
onFavoriteClick: openFavorite,
|
|
177
|
+
onViewAllPins: handleViewAllPins,
|
|
178
|
+
onBackToNormalView: handleBackToNormalView,
|
|
179
|
+
onToggleScrollFavorites: toggleScrollFavorites
|
|
180
|
+
}), !showAllPinsMode && /* @__PURE__ */ jsxs("section", {
|
|
181
|
+
...getSectionProps(),
|
|
182
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
183
|
+
...getSectionHeaderProps(),
|
|
184
|
+
children: [/* @__PURE__ */ jsx(Bookmark, {
|
|
185
|
+
...getSectionIconProps("text-primary"),
|
|
186
|
+
weight: "filled",
|
|
187
|
+
"aria-hidden": "true"
|
|
188
|
+
}), /* @__PURE__ */ jsx(Typography.Heading, { ...getSectionTitleProps("Bookmarks") })]
|
|
189
|
+
}), /* @__PURE__ */ jsx(BookmarkFileTree, {
|
|
190
|
+
items: activeBookmarkTreeItems,
|
|
191
|
+
defaultExpandedKeys: bookmarkTreeExpandedKeys,
|
|
192
|
+
getFileTreeProps,
|
|
193
|
+
getBookmarkTreeEmptyStateProps,
|
|
194
|
+
onBookmarkClick: handleBookmarkTreeClick,
|
|
195
|
+
onBookmarkRemove: handleBookmarkRemove,
|
|
196
|
+
onFolderEdit: openEditFolderModal,
|
|
197
|
+
onFolderDelete: handleBookmarkRemove,
|
|
198
|
+
onNewFolder: openCreateFolderModal,
|
|
199
|
+
onBookmarkMove: handleBookmarkMove,
|
|
200
|
+
onTreeChange: handleBookmarkTreeChange
|
|
201
|
+
}, bookmarkTreeKey)]
|
|
202
|
+
})]
|
|
203
|
+
})
|
|
204
|
+
}), /* @__PURE__ */ jsx(FolderModal, {
|
|
205
|
+
open: folderModalOpen,
|
|
206
|
+
mode: folderModalMode,
|
|
207
|
+
form: folderForm,
|
|
208
|
+
onFormChange: setFolderForm,
|
|
209
|
+
onOpenChange: setFolderModalOpen,
|
|
210
|
+
onSave: handleFolderSave
|
|
211
|
+
})]
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
BookmarksContent.displayName = "BookmarksContent";
|
|
215
|
+
var BookmarksTrigger = () => {
|
|
216
|
+
const { activeInfoPanel, isOpen, toggleInfoPanel } = useInfoPanel();
|
|
217
|
+
const isActive = isOpen && activeInfoPanel === "bookmarks";
|
|
218
|
+
return /* @__PURE__ */ jsxs(Tooltip, {
|
|
219
|
+
delay: 0,
|
|
220
|
+
children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { children: /* @__PURE__ */ jsx("span", {
|
|
221
|
+
"aria-label": "Bookmarks",
|
|
222
|
+
children: /* @__PURE__ */ jsx(Bookmark, {
|
|
223
|
+
className: isActive ? "text-muted" : "",
|
|
224
|
+
weight: isActive ? "filled" : "outline",
|
|
225
|
+
size: 20,
|
|
226
|
+
onClick: () => toggleInfoPanel("bookmarks"),
|
|
227
|
+
"aria-hidden": "true"
|
|
228
|
+
})
|
|
229
|
+
}) }), /* @__PURE__ */ jsx(Tooltip.Content, {
|
|
230
|
+
placement: "right",
|
|
231
|
+
children: /* @__PURE__ */ jsx(ShortcutTooltipLabel, {
|
|
232
|
+
label: "Bookmarks",
|
|
233
|
+
shortcut: "Mod ⇧ B"
|
|
234
|
+
})
|
|
235
|
+
})]
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
var BookmarksPanelContent = () => {
|
|
239
|
+
return /* @__PURE__ */ jsx(BookmarksContent, {});
|
|
240
|
+
};
|
|
241
|
+
var bookmarksPanel = {
|
|
242
|
+
title: "Bookmarks",
|
|
243
|
+
scrollable: false,
|
|
244
|
+
content: /* @__PURE__ */ jsx(BookmarksPanelContent, {})
|
|
245
|
+
};
|
|
246
|
+
//#endregion
|
|
247
|
+
export { BookmarksTrigger, bookmarksPanel };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FavoriteItem } from './types';
|
|
2
|
+
export declare const getBookmarkShortcuts: ({ favorites, pins, onFavoritesChange, onPinsChange }: {
|
|
3
|
+
favorites: FavoriteItem[];
|
|
4
|
+
pins: FavoriteItem[];
|
|
5
|
+
onFavoritesChange: (items: FavoriteItem[]) => void;
|
|
6
|
+
onPinsChange: (items: FavoriteItem[]) => void;
|
|
7
|
+
}) => {
|
|
8
|
+
favorites: FavoriteItem[];
|
|
9
|
+
pins: FavoriteItem[];
|
|
10
|
+
unpin: (id: string) => void;
|
|
11
|
+
removeFavorite: (id: string) => void;
|
|
12
|
+
reorderFavorites: (items: readonly FavoriteItem[]) => void;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=membership.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"membership.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/header/bookmarks/membership.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,eAAO,MAAM,oBAAoB,GAAI,sDAKlC;IACD,SAAS,EAAE,YAAY,EAAE,CAAA;IACzB,IAAI,EAAE,YAAY,EAAE,CAAA;IACpB,iBAAiB,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;IAClD,YAAY,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;CAC9C;;;gBAQe,MAAM;yBACG,MAAM;8BAED,SAAS,YAAY,EAAE;CAGpD,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/lib/components/panel/header/bookmarks/membership.ts
|
|
2
|
+
var getBookmarkShortcuts = ({ favorites, pins, onFavoritesChange, onPinsChange }) => {
|
|
3
|
+
const currentFavorites = favorites.length > 12 ? favorites.slice(0, 12) : favorites;
|
|
4
|
+
return {
|
|
5
|
+
favorites: currentFavorites,
|
|
6
|
+
pins,
|
|
7
|
+
unpin: (id) => onPinsChange(pins.filter((item) => item.id !== id)),
|
|
8
|
+
removeFavorite: (id) => onFavoritesChange(currentFavorites.filter((item) => item.id !== id)),
|
|
9
|
+
reorderFavorites: (items) => onFavoritesChange(items.slice(0, 12))
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { getBookmarkShortcuts };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type QuickAccessProps } from './types';
|
|
2
|
+
declare const QuickAccess: ({ mode, favorites, onUnpin, onFavoriteRemove, onFavoritesReorder, pins, visiblePins, hasMorePins, isScrollFavoritesOpen, renderFavoriteItem, getSectionProps, getSectionHeaderProps, getSectionTitleProps, getSectionIconProps, getFavorite2ItemsProps, getFavoriteBackgroundImageProps, getFavoriteBackgroundGradientProps, getFavoriteOverlayProps, getFavoriteAvatarContainerProps, getFavoriteAvatarProps, getFavoriteAvatarIconProps, getFavoriteAvatarFallbackProps, getFavoriteContentProps, getFavoriteNameProps, onFavoriteClick, onViewAllPins, onBackToNormalView, onToggleScrollFavorites }: QuickAccessProps) => import("react").JSX.Element;
|
|
3
|
+
export { QuickAccess };
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/components/panel/header/bookmarks/quick-access/index.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,QAAA,MAAM,WAAW,GAAI,ykBA6BlB,gBAAgB,gCAgPlB,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { BookmarkSectionEmptyState } from "../empty-state.js";
|
|
2
|
+
import { ShortcutContextMenu } from "../shortcut-context-menu.js";
|
|
3
|
+
import { ReorderableGridList } from "../favorites/index.js";
|
|
4
|
+
import { Avatar, Button, ScrollShadow, Typography } from "@vezham/react-v3";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { AltArrowDown, AltArrowUp, ArrowLeft, Eye, Heart, MinusCircle, Pin } from "@vezham/icons-react";
|
|
7
|
+
//#region src/lib/components/panel/header/bookmarks/quick-access/index.tsx
|
|
8
|
+
var QuickAccess = ({ mode, favorites, onUnpin, onFavoriteRemove, onFavoritesReorder, pins, visiblePins, hasMorePins, isScrollFavoritesOpen, renderFavoriteItem, getSectionProps, getSectionHeaderProps, getSectionTitleProps, getSectionIconProps, getFavorite2ItemsProps, getFavoriteBackgroundImageProps, getFavoriteBackgroundGradientProps, getFavoriteOverlayProps, getFavoriteAvatarContainerProps, getFavoriteAvatarProps, getFavoriteAvatarIconProps, getFavoriteAvatarFallbackProps, getFavoriteContentProps, getFavoriteNameProps, onFavoriteClick, onViewAllPins, onBackToNormalView, onToggleScrollFavorites }) => {
|
|
9
|
+
const renderAllPinsFullView = () => {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
className: "space-y-4",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: "mb-4 flex items-center justify-between",
|
|
15
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: "flex min-w-0 items-center gap-2",
|
|
17
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
18
|
+
isIconOnly: true,
|
|
19
|
+
"aria-label": "Back to bookmarks",
|
|
20
|
+
size: "sm",
|
|
21
|
+
variant: "ghost",
|
|
22
|
+
className: "text-default-600 shrink-0",
|
|
23
|
+
onPress: onBackToNormalView,
|
|
24
|
+
children: /* @__PURE__ */ jsx(ArrowLeft, {
|
|
25
|
+
size: 16,
|
|
26
|
+
"aria-hidden": "true"
|
|
27
|
+
})
|
|
28
|
+
}), /* @__PURE__ */ jsx(Typography.Heading, {
|
|
29
|
+
className: "text-xl font-semibold",
|
|
30
|
+
children: "All Pins"
|
|
31
|
+
})]
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
pins.length === 0 && /* @__PURE__ */ jsx(BookmarkSectionEmptyState, {
|
|
35
|
+
title: "No pins yet.",
|
|
36
|
+
description: "Keep useful items within easy reach."
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "space-y-1",
|
|
40
|
+
children: pins.map((item) => /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: "group hover:bg-default has-[:focus-visible]:bg-default relative flex w-full min-w-0 items-center rounded-md",
|
|
42
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
43
|
+
type: "button",
|
|
44
|
+
onClick: () => onFavoriteClick(item.url, item),
|
|
45
|
+
className: "focus-visible:ring-focus flex w-full min-w-0 cursor-[var(--cursor-interactive)] items-center gap-3 rounded-md px-2 py-2 text-left outline-none group-hover:pe-10 group-has-[:focus-visible]:pe-10 focus-visible:ring-2 focus-visible:ring-inset [@media(hover:none)]:pe-10",
|
|
46
|
+
children: [/* @__PURE__ */ jsxs(Avatar, {
|
|
47
|
+
className: "h-5 w-5 shrink-0",
|
|
48
|
+
children: [item.avatar ? /* @__PURE__ */ jsx(Avatar.Image, {
|
|
49
|
+
src: item.avatar,
|
|
50
|
+
alt: item.name
|
|
51
|
+
}) : item.backgroundImage ? /* @__PURE__ */ jsx(Avatar.Image, {
|
|
52
|
+
src: item.backgroundImage,
|
|
53
|
+
alt: item.name
|
|
54
|
+
}) : null, /* @__PURE__ */ jsx(Avatar.Fallback, {
|
|
55
|
+
className: "bg-default-500 text-white",
|
|
56
|
+
children: /* @__PURE__ */ jsx(Pin, {
|
|
57
|
+
className: "text-warning",
|
|
58
|
+
size: "1em",
|
|
59
|
+
weight: "filled",
|
|
60
|
+
"aria-hidden": "true"
|
|
61
|
+
})
|
|
62
|
+
})]
|
|
63
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
64
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
65
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: "text-foreground block truncate text-sm leading-5 font-medium",
|
|
67
|
+
children: item.name
|
|
68
|
+
}), item.url && /* @__PURE__ */ jsx("span", {
|
|
69
|
+
className: "text-muted block truncate text-xs leading-4",
|
|
70
|
+
children: item.url
|
|
71
|
+
})]
|
|
72
|
+
})]
|
|
73
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
74
|
+
isIconOnly: true,
|
|
75
|
+
size: "sm",
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
className: "text-muted hover:text-danger data-[hovered=true]:text-danger pointer-events-none absolute end-1 size-7 min-w-0 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 group-has-[:focus-visible]:pointer-events-auto group-has-[:focus-visible]:opacity-100 hover:bg-transparent data-[hovered=true]:bg-transparent [@media(hover:none)]:pointer-events-auto [@media(hover:none)]:opacity-100",
|
|
78
|
+
"aria-label": `Unpin ${item.name} from Quick Access`,
|
|
79
|
+
onPress: () => onUnpin(item.id),
|
|
80
|
+
children: /* @__PURE__ */ jsx(MinusCircle, {
|
|
81
|
+
size: 16,
|
|
82
|
+
"aria-hidden": "true"
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
}, item.id))
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
const renderPinsForScroll = () => {
|
|
91
|
+
if (renderFavoriteItem) return visiblePins.map((item) => /* @__PURE__ */ jsx("div", {
|
|
92
|
+
"data-shortcut-id": item.id,
|
|
93
|
+
children: renderFavoriteItem({
|
|
94
|
+
item,
|
|
95
|
+
onItemClick: (url) => onFavoriteClick(url, item)
|
|
96
|
+
})
|
|
97
|
+
}, item.id));
|
|
98
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
99
|
+
className: "flex flex-nowrap gap-3 pb-2",
|
|
100
|
+
children: [visiblePins.map((item) => /* @__PURE__ */ jsxs("div", {
|
|
101
|
+
role: "group",
|
|
102
|
+
"data-shortcut-id": item.id,
|
|
103
|
+
...getFavorite2ItemsProps(),
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ jsx("button", {
|
|
106
|
+
type: "button",
|
|
107
|
+
"aria-label": `Open ${item.name}`,
|
|
108
|
+
className: "absolute inset-0 z-10 cursor-pointer rounded-[inherit]",
|
|
109
|
+
onClick: () => onFavoriteClick(item.url, item)
|
|
110
|
+
}),
|
|
111
|
+
item.backgroundImage ? /* @__PURE__ */ jsx("img", {
|
|
112
|
+
...getFavoriteBackgroundImageProps(item.backgroundImage, item.name),
|
|
113
|
+
alt: item.name
|
|
114
|
+
}) : /* @__PURE__ */ jsx("div", { ...getFavoriteBackgroundGradientProps() }),
|
|
115
|
+
/* @__PURE__ */ jsx("div", { ...getFavoriteOverlayProps() }),
|
|
116
|
+
/* @__PURE__ */ jsx("div", {
|
|
117
|
+
...getFavoriteAvatarContainerProps(),
|
|
118
|
+
children: /* @__PURE__ */ jsxs(Avatar, {
|
|
119
|
+
...getFavoriteAvatarProps(),
|
|
120
|
+
children: [item.avatar && /* @__PURE__ */ jsx(Avatar.Image, {
|
|
121
|
+
src: item.avatar,
|
|
122
|
+
alt: item.name
|
|
123
|
+
}), /* @__PURE__ */ jsx(Avatar.Fallback, {
|
|
124
|
+
...getFavoriteAvatarFallbackProps(item.name),
|
|
125
|
+
children: /* @__PURE__ */ jsx(Pin, {
|
|
126
|
+
...getFavoriteAvatarIconProps(),
|
|
127
|
+
weight: "filled",
|
|
128
|
+
"aria-hidden": "true"
|
|
129
|
+
})
|
|
130
|
+
})]
|
|
131
|
+
})
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ jsx("div", {
|
|
134
|
+
...getFavoriteContentProps(),
|
|
135
|
+
children: /* @__PURE__ */ jsx(Typography.Paragraph, { ...getFavoriteNameProps(item.name) })
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
}, item.id)), hasMorePins && /* @__PURE__ */ jsx("button", {
|
|
139
|
+
onClick: onViewAllPins,
|
|
140
|
+
className: "group bg-default-100 hover:bg-default-200 relative flex aspect-square w-[120px] shrink-0 cursor-pointer flex-col items-center justify-center gap-2 rounded-2xl transition-[transform,background-color] hover:scale-[1.02] active:scale-[0.98]",
|
|
141
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
142
|
+
className: "flex flex-col items-center gap-2 p-4",
|
|
143
|
+
children: [/* @__PURE__ */ jsx(Eye, {
|
|
144
|
+
size: 32,
|
|
145
|
+
className: "text-primary",
|
|
146
|
+
weight: "filled",
|
|
147
|
+
"aria-hidden": "true"
|
|
148
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
149
|
+
className: "text-center",
|
|
150
|
+
children: [/* @__PURE__ */ jsx(Typography.Paragraph, {
|
|
151
|
+
className: "text-default-700 text-sm font-semibold",
|
|
152
|
+
children: "View All"
|
|
153
|
+
}), /* @__PURE__ */ jsxs(Typography.Paragraph, {
|
|
154
|
+
className: "text-default-500 text-xs",
|
|
155
|
+
children: [pins.length - 6, " more"]
|
|
156
|
+
})]
|
|
157
|
+
})]
|
|
158
|
+
})
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
if (mode === "all") return renderAllPinsFullView();
|
|
163
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("section", {
|
|
164
|
+
...getSectionProps(),
|
|
165
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
166
|
+
...getSectionHeaderProps(),
|
|
167
|
+
children: [/* @__PURE__ */ jsx(Heart, {
|
|
168
|
+
...getSectionIconProps("text-primary"),
|
|
169
|
+
weight: "filled",
|
|
170
|
+
"aria-hidden": "true"
|
|
171
|
+
}), /* @__PURE__ */ jsx(Typography.Heading, { ...getSectionTitleProps("Favorites") })]
|
|
172
|
+
}), /* @__PURE__ */ jsx(ReorderableGridList, {
|
|
173
|
+
items: favorites,
|
|
174
|
+
onRemove: onFavoriteRemove,
|
|
175
|
+
onReorder: onFavoritesReorder,
|
|
176
|
+
onAction: (item) => onFavoriteClick(item.url, item)
|
|
177
|
+
})]
|
|
178
|
+
}), /* @__PURE__ */ jsxs("section", {
|
|
179
|
+
...getSectionProps(),
|
|
180
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
181
|
+
...getSectionHeaderProps(),
|
|
182
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
183
|
+
className: "flex flex-1 items-center gap-2",
|
|
184
|
+
children: [/* @__PURE__ */ jsx(Pin, {
|
|
185
|
+
...getSectionIconProps("text-primary"),
|
|
186
|
+
weight: "filled",
|
|
187
|
+
"aria-hidden": "true"
|
|
188
|
+
}), /* @__PURE__ */ jsx(Typography.Heading, { ...getSectionTitleProps("Quick Access") })]
|
|
189
|
+
}), pins.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
190
|
+
className: "flex items-center gap-2",
|
|
191
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
192
|
+
"aria-label": isScrollFavoritesOpen ? "Collapse quick access" : "Expand quick access",
|
|
193
|
+
isIconOnly: true,
|
|
194
|
+
size: "sm",
|
|
195
|
+
variant: "ghost",
|
|
196
|
+
onPress: onToggleScrollFavorites,
|
|
197
|
+
className: "text-default-400",
|
|
198
|
+
children: isScrollFavoritesOpen ? /* @__PURE__ */ jsx(AltArrowUp, {
|
|
199
|
+
size: 18,
|
|
200
|
+
"aria-hidden": "true"
|
|
201
|
+
}) : /* @__PURE__ */ jsx(AltArrowDown, {
|
|
202
|
+
size: 18,
|
|
203
|
+
"aria-hidden": "true"
|
|
204
|
+
})
|
|
205
|
+
})
|
|
206
|
+
})]
|
|
207
|
+
}), (isScrollFavoritesOpen || pins.length === 0) && /* @__PURE__ */ jsx(ShortcutContextMenu, {
|
|
208
|
+
items: pins,
|
|
209
|
+
kind: "pin",
|
|
210
|
+
onRemove: onUnpin,
|
|
211
|
+
children: /* @__PURE__ */ jsx(ScrollShadow, {
|
|
212
|
+
orientation: "horizontal",
|
|
213
|
+
className: "max-w-full overflow-x-auto pb-2",
|
|
214
|
+
hideScrollBar: false,
|
|
215
|
+
children: pins.length === 0 ? /* @__PURE__ */ jsx(BookmarkSectionEmptyState, {
|
|
216
|
+
title: "No pins yet.",
|
|
217
|
+
description: "Keep useful items within easy reach."
|
|
218
|
+
}) : renderPinsForScroll()
|
|
219
|
+
})
|
|
220
|
+
})]
|
|
221
|
+
})] });
|
|
222
|
+
};
|
|
223
|
+
//#endregion
|
|
224
|
+
export { QuickAccess };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ComponentProps, type HTMLAttributes, type ImgHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { Star as StarIcon } from '@vezham/icons-react';
|
|
3
|
+
import { Avatar, Typography } from '@vezham/react-v3';
|
|
4
|
+
import { type FavoriteItem } from '../types';
|
|
5
|
+
export interface QuickAccessProps {
|
|
6
|
+
mode: 'sections' | 'all';
|
|
7
|
+
favorites: FavoriteItem[];
|
|
8
|
+
onUnpin: (id: string) => void;
|
|
9
|
+
onFavoriteRemove: (id: string) => void;
|
|
10
|
+
onFavoritesReorder: (items: FavoriteItem[]) => void;
|
|
11
|
+
pins: FavoriteItem[];
|
|
12
|
+
visiblePins: FavoriteItem[];
|
|
13
|
+
hasMorePins: boolean;
|
|
14
|
+
isScrollFavoritesOpen: boolean;
|
|
15
|
+
renderFavoriteItem?: (props: {
|
|
16
|
+
item: FavoriteItem;
|
|
17
|
+
onItemClick?: (url: string) => void;
|
|
18
|
+
}) => ReactNode;
|
|
19
|
+
getSectionProps: () => HTMLAttributes<HTMLElement>;
|
|
20
|
+
getSectionHeaderProps: () => HTMLAttributes<HTMLDivElement>;
|
|
21
|
+
getSectionIconProps: (className?: string) => ComponentProps<typeof StarIcon>;
|
|
22
|
+
getSectionTitleProps: (title: string) => ComponentProps<typeof Typography.Heading>;
|
|
23
|
+
getFavorite2ItemsProps: () => HTMLAttributes<HTMLDivElement>;
|
|
24
|
+
getFavoriteBackgroundImageProps: (src: string, alt: string) => ImgHTMLAttributes<HTMLImageElement>;
|
|
25
|
+
getFavoriteBackgroundGradientProps: () => HTMLAttributes<HTMLDivElement>;
|
|
26
|
+
getFavoriteOverlayProps: () => HTMLAttributes<HTMLDivElement>;
|
|
27
|
+
getFavoriteAvatarContainerProps: () => HTMLAttributes<HTMLDivElement>;
|
|
28
|
+
getFavoriteAvatarProps: () => ComponentProps<typeof Avatar>;
|
|
29
|
+
getFavoriteAvatarIconProps: () => ComponentProps<typeof StarIcon>;
|
|
30
|
+
getFavoriteAvatarFallbackProps: (name: string) => ComponentProps<typeof Avatar.Fallback>;
|
|
31
|
+
getFavoriteContentProps: () => HTMLAttributes<HTMLDivElement>;
|
|
32
|
+
getFavoriteNameProps: (name: string) => ComponentProps<typeof Typography.Paragraph>;
|
|
33
|
+
onFavoriteClick: (url: string, item: FavoriteItem) => void;
|
|
34
|
+
onViewAllPins: () => void;
|
|
35
|
+
onBackToNormalView: () => void;
|
|
36
|
+
onToggleScrollFavorites: () => void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/components/panel/header/bookmarks/quick-access/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,UAAU,GAAG,KAAK,CAAA;IACxB,SAAS,EAAE,YAAY,EAAE,CAAA;IACzB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,kBAAkB,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;IACnD,IAAI,EAAE,YAAY,EAAE,CAAA;IACpB,WAAW,EAAE,YAAY,EAAE,CAAA;IAC3B,WAAW,EAAE,OAAO,CAAA;IACpB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE;QAC3B,IAAI,EAAE,YAAY,CAAA;QAClB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KACpC,KAAK,SAAS,CAAA;IACf,eAAe,EAAE,MAAM,cAAc,CAAC,WAAW,CAAC,CAAA;IAClD,qBAAqB,EAAE,MAAM,cAAc,CAAC,cAAc,CAAC,CAAA;IAC3D,mBAAmB,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAA;IAC5E,oBAAoB,EAAE,CACpB,KAAK,EAAE,MAAM,KACV,cAAc,CAAC,OAAO,UAAU,CAAC,OAAO,CAAC,CAAA;IAC9C,sBAAsB,EAAE,MAAM,cAAc,CAAC,cAAc,CAAC,CAAA;IAC5D,+BAA+B,EAAE,CAC/B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,KACR,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;IACxC,kCAAkC,EAAE,MAAM,cAAc,CAAC,cAAc,CAAC,CAAA;IACxE,uBAAuB,EAAE,MAAM,cAAc,CAAC,cAAc,CAAC,CAAA;IAC7D,+BAA+B,EAAE,MAAM,cAAc,CAAC,cAAc,CAAC,CAAA;IACrE,sBAAsB,EAAE,MAAM,cAAc,CAAC,OAAO,MAAM,CAAC,CAAA;IAC3D,0BAA0B,EAAE,MAAM,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAA;IACjE,8BAA8B,EAAE,CAC9B,IAAI,EAAE,MAAM,KACT,cAAc,CAAC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC3C,uBAAuB,EAAE,MAAM,cAAc,CAAC,cAAc,CAAC,CAAA;IAC7D,oBAAoB,EAAE,CACpB,IAAI,EAAE,MAAM,KACT,cAAc,CAAC,OAAO,UAAU,CAAC,SAAS,CAAC,CAAA;IAChD,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IAC1D,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,uBAAuB,EAAE,MAAM,IAAI,CAAA;CACpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { FavoriteItem } from './types';
|
|
3
|
+
type Props = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
items: readonly FavoriteItem[];
|
|
6
|
+
kind: 'favorite' | 'pin';
|
|
7
|
+
onRemove?: (id: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const ShortcutContextMenu: ({ children, items, kind, onRemove }: Props) => import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=shortcut-context-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcut-context-menu.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/header/bookmarks/shortcut-context-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAA;AAMhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IAC9B,IAAI,EAAE,UAAU,GAAG,KAAK,CAAA;IACxB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,qCAKjC,KAAK,gCAyCP,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { panelContextMenuClass } from "../../info-panel/styles.js";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Label } from "@vezham/react-v3";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ContextMenu } from "@vezham/react-pro-v3";
|
|
6
|
+
//#region src/lib/components/panel/header/bookmarks/shortcut-context-menu.tsx
|
|
7
|
+
var ShortcutContextMenu = ({ children, items, kind, onRemove }) => {
|
|
8
|
+
const [targetId, setTargetId] = useState(null);
|
|
9
|
+
const rememberTarget = (target) => {
|
|
10
|
+
setTargetId((target instanceof Element ? target.closest("[data-shortcut-id]") : null)?.dataset.shortcutId ?? null);
|
|
11
|
+
};
|
|
12
|
+
const target = items.find((item) => item.id === targetId);
|
|
13
|
+
const label = kind === "favorite" ? "Remove Favorite" : "Unpin";
|
|
14
|
+
return /* @__PURE__ */ jsxs(ContextMenu, { children: [/* @__PURE__ */ jsx(ContextMenu.Trigger, {
|
|
15
|
+
className: "block! w-full min-w-0",
|
|
16
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
17
|
+
className: "w-full min-w-0",
|
|
18
|
+
onContextMenuCapture: (event) => rememberTarget(event.target),
|
|
19
|
+
onKeyDownCapture: (event) => {
|
|
20
|
+
if (event.key === "ContextMenu" || event.shiftKey && event.key === "F10") rememberTarget(event.target);
|
|
21
|
+
},
|
|
22
|
+
children
|
|
23
|
+
})
|
|
24
|
+
}), /* @__PURE__ */ jsx(ContextMenu.Popover, {
|
|
25
|
+
className: panelContextMenuClass,
|
|
26
|
+
children: /* @__PURE__ */ jsx(ContextMenu.Menu, {
|
|
27
|
+
"aria-label": target ? `${target.name} actions` : "Item actions",
|
|
28
|
+
children: /* @__PURE__ */ jsx(ContextMenu.Item, {
|
|
29
|
+
id: "remove-shortcut",
|
|
30
|
+
textValue: label,
|
|
31
|
+
isDisabled: !target || !onRemove,
|
|
32
|
+
onPress: () => target && onRemove?.(target.id),
|
|
33
|
+
children: /* @__PURE__ */ jsx(Label, { children: label })
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
})] });
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { ShortcutContextMenu };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BookmarkItem, BookmarkTreeItem } from './types';
|
|
2
|
+
export declare const bookmarksToTreeItems: (bookmarks: BookmarkItem[]) => BookmarkTreeItem[];
|
|
3
|
+
export declare const treeItemsToBookmarks: (items: BookmarkTreeItem[]) => BookmarkItem[];
|
|
4
|
+
//# sourceMappingURL=tree-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-data.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/header/bookmarks/tree-data.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAwB7D,eAAO,MAAM,oBAAoB,GAAI,WAAW,YAAY,EAAE,uBA+E7D,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,OAAO,gBAAgB,EAAE,mBA+B7D,CAAA"}
|