@edenapp/sdk 0.1.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/apps/com/eden/editor/dist/assets/css-DQU6DXDx.js +3 -0
- package/apps/com/eden/editor/dist/assets/editor-BRA9licV.css +1 -0
- package/apps/com/eden/editor/dist/assets/editor.main-DAsyVptA.js +677 -0
- package/apps/com/eden/editor/dist/assets/editor.worker-B4pQIWZD.js +12 -0
- package/apps/com/eden/editor/dist/assets/html-CTBLac3N.js +1 -0
- package/apps/com/eden/editor/dist/assets/index-B7GgDQ9I.css +1 -0
- package/apps/com/eden/editor/dist/assets/index-BWJI9cyM.js +2 -0
- package/apps/com/eden/editor/dist/assets/ini-BvajGCUy.js +1 -0
- package/apps/com/eden/editor/dist/assets/javascript-DJ6Ya8pi.js +1 -0
- package/apps/com/eden/editor/dist/assets/jsonMode-BA0kYRDI.js +10 -0
- package/apps/com/eden/editor/dist/assets/less-GGFNNJHn.js +2 -0
- package/apps/com/eden/editor/dist/assets/markdown-B811l8j2.js +1 -0
- package/apps/com/eden/editor/dist/assets/shell-CsDZo4DB.js +1 -0
- package/apps/com/eden/editor/dist/assets/typescript-C7BsmV0J.js +1 -0
- package/apps/com/eden/editor/dist/assets/yaml-QL02lm_B.js +1 -0
- package/apps/com/eden/editor/dist/index.html +13 -0
- package/apps/com/eden/editor/icon.svg +22 -0
- package/apps/com/eden/editor/index.html +12 -0
- package/apps/com/eden/editor/manifest.json +58 -0
- package/apps/com/eden/editor/node_modules/.bin/browserslist +21 -0
- package/apps/com/eden/editor/node_modules/.bin/tsc +21 -0
- package/apps/com/eden/editor/node_modules/.bin/tsserver +21 -0
- package/apps/com/eden/editor/node_modules/.bin/vite +21 -0
- package/apps/com/eden/editor/package.json +21 -0
- package/apps/com/eden/editor/src/App.tsx +212 -0
- package/apps/com/eden/editor/src/components/ErrorBanner.tsx +13 -0
- package/apps/com/eden/editor/src/components/LazyMonacoEditor.tsx +154 -0
- package/apps/com/eden/editor/src/components/TabBar.tsx +36 -0
- package/apps/com/eden/editor/src/components/Toolbar.tsx +39 -0
- package/apps/com/eden/editor/src/components/WelcomeScreen.tsx +49 -0
- package/apps/com/eden/editor/src/components/index.ts +11 -0
- package/apps/com/eden/editor/src/index.tsx +10 -0
- package/apps/com/eden/editor/src/styles.css +319 -0
- package/apps/com/eden/editor/src/types.ts +69 -0
- package/apps/com/eden/editor/tsconfig.json +24 -0
- package/apps/com/eden/editor/vite.config.mts +67 -0
- package/apps/com/eden/eveshell/assets/apps-grid-icon.svg +17 -0
- package/apps/com/eden/eveshell/assets/default-icon.svg +17 -0
- package/apps/com/eden/eveshell/dist/assets/index-BS2yCXxK.css +1 -0
- package/apps/com/eden/eveshell/dist/assets/index-De0NEh_d.js +1 -0
- package/apps/com/eden/eveshell/dist/index.html +13 -0
- package/apps/com/eden/eveshell/index.html +12 -0
- package/apps/com/eden/eveshell/manifest.json +28 -0
- package/apps/com/eden/eveshell/node_modules/.bin/tsc +21 -0
- package/apps/com/eden/eveshell/node_modules/.bin/tsserver +21 -0
- package/apps/com/eden/eveshell/node_modules/.bin/vite +21 -0
- package/apps/com/eden/eveshell/package.json +20 -0
- package/apps/com/eden/eveshell/src/components/AllApps.tsx +228 -0
- package/apps/com/eden/eveshell/src/components/AppContextMenu.tsx +125 -0
- package/apps/com/eden/eveshell/src/components/AppIcon.tsx +40 -0
- package/apps/com/eden/eveshell/src/components/Clock.tsx +35 -0
- package/apps/com/eden/eveshell/src/components/Dock.tsx +147 -0
- package/apps/com/eden/eveshell/src/components/ShellOverlay.tsx +343 -0
- package/apps/com/eden/eveshell/src/icon-cache.ts +38 -0
- package/apps/com/eden/eveshell/src/index.tsx +11 -0
- package/apps/com/eden/eveshell/src/styles.css +409 -0
- package/apps/com/eden/eveshell/src/types.ts +5 -0
- package/apps/com/eden/eveshell/tsconfig.json +37 -0
- package/apps/com/eden/eveshell/vite.config.mts +23 -0
- package/apps/com/eden/example/appbus/client-a/app.js +239 -0
- package/apps/com/eden/example/appbus/client-a/index.html +48 -0
- package/apps/com/eden/example/appbus/client-a/manifest.json +27 -0
- package/apps/com/eden/example/appbus/client-a/styles.css +52 -0
- package/apps/com/eden/example/appbus/client-b/app.js +130 -0
- package/apps/com/eden/example/appbus/client-b/index.html +35 -0
- package/apps/com/eden/example/appbus/client-b/manifest.json +27 -0
- package/apps/com/eden/example/appbus/client-b/styles.css +48 -0
- package/apps/com/eden/example/appbus/hub/README.md +18 -0
- package/apps/com/eden/example/appbus/hub/backend.js +121 -0
- package/apps/com/eden/example/appbus/hub/manifest.json +17 -0
- package/apps/com/eden/example/appbus/isolated/app.js +107 -0
- package/apps/com/eden/example/appbus/isolated/index.html +35 -0
- package/apps/com/eden/example/appbus/isolated/manifest.json +27 -0
- package/apps/com/eden/example/appbus/isolated/styles.css +52 -0
- package/apps/com/eden/example/calculator/.dev-manifest.json +5 -0
- package/apps/com/eden/example/calculator/app.js +95 -0
- package/apps/com/eden/example/calculator/icon.svg +19 -0
- package/apps/com/eden/example/calculator/index.html +39 -0
- package/apps/com/eden/example/calculator/manifest.json +30 -0
- package/apps/com/eden/example/calculator/styles.css +83 -0
- package/apps/com/eden/example/hello/README.md +3 -0
- package/apps/com/eden/example/hello/backend/dist/backend.js +47 -0
- package/apps/com/eden/example/hello/backend/node_modules/.bin/tsc +21 -0
- package/apps/com/eden/example/hello/backend/node_modules/.bin/tsserver +21 -0
- package/apps/com/eden/example/hello/backend/package.json +13 -0
- package/apps/com/eden/example/hello/backend/src/backend.ts +58 -0
- package/apps/com/eden/example/hello/backend/tsconfig.json +19 -0
- package/apps/com/eden/example/hello/frontend/dist/assets/index-D2WAwW3g.css +1 -0
- package/apps/com/eden/example/hello/frontend/dist/assets/index-D4bTq3-Q.js +1 -0
- package/apps/com/eden/example/hello/frontend/dist/index.html +59 -0
- package/apps/com/eden/example/hello/frontend/index.html +59 -0
- package/apps/com/eden/example/hello/frontend/node_modules/.bin/tsc +21 -0
- package/apps/com/eden/example/hello/frontend/node_modules/.bin/tsserver +21 -0
- package/apps/com/eden/example/hello/frontend/node_modules/.bin/vite +21 -0
- package/apps/com/eden/example/hello/frontend/package.json +15 -0
- package/apps/com/eden/example/hello/frontend/src/App.ts +191 -0
- package/apps/com/eden/example/hello/frontend/styles.css +96 -0
- package/apps/com/eden/example/hello/frontend/tsconfig.json +16 -0
- package/apps/com/eden/example/hello/frontend/vite.config.mts +21 -0
- package/apps/com/eden/example/hello/manifest.json +34 -0
- package/apps/com/eden/example/hello/shared/protocol.d.ts +38 -0
- package/apps/com/eden/example/showcase/app.js +186 -0
- package/apps/com/eden/example/showcase/index.html +637 -0
- package/apps/com/eden/example/showcase/manifest.json +24 -0
- package/apps/com/eden/example/showcase/styles.css +195 -0
- package/apps/com/eden/files/.dev-manifest.json +5 -0
- package/apps/com/eden/files/dist/assets/index-BOw4ESi3.js +1 -0
- package/apps/com/eden/files/dist/assets/index-BPH5FvSW.css +1 -0
- package/apps/com/eden/files/dist/index.html +13 -0
- package/apps/com/eden/files/icon.svg +15 -0
- package/apps/com/eden/files/index.html +12 -0
- package/apps/com/eden/files/manifest.json +28 -0
- package/apps/com/eden/files/node_modules/.bin/tsc +21 -0
- package/apps/com/eden/files/node_modules/.bin/tsserver +21 -0
- package/apps/com/eden/files/node_modules/.bin/vite +21 -0
- package/apps/com/eden/files/node_modules/.vite/deps/_metadata.json +46 -0
- package/apps/com/eden/files/node_modules/.vite/deps/chunk-5W77UGHT.js +1253 -0
- package/apps/com/eden/files/node_modules/.vite/deps/chunk-5W77UGHT.js.map +7 -0
- package/apps/com/eden/files/node_modules/.vite/deps/chunk-K4SCX2FD.js +1809 -0
- package/apps/com/eden/files/node_modules/.vite/deps/chunk-K4SCX2FD.js.map +7 -0
- package/apps/com/eden/files/node_modules/.vite/deps/package.json +3 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js.js +112 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js.js.map +7 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js_h.js +122 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js_h.js.map +7 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js_html.js +606 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js_html.js.map +7 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js_store.js +455 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js_store.js.map +7 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js_web.js +147 -0
- package/apps/com/eden/files/node_modules/.vite/deps/solid-js_web.js.map +7 -0
- package/apps/com/eden/files/package-lock.json +1754 -0
- package/apps/com/eden/files/package.json +20 -0
- package/apps/com/eden/files/src/App.tsx +387 -0
- package/apps/com/eden/files/src/components/FileExplorerHeader.tsx +90 -0
- package/apps/com/eden/files/src/components/FileItem.tsx +70 -0
- package/apps/com/eden/files/src/components/FileList.tsx +77 -0
- package/apps/com/eden/files/src/components/Modal.tsx +48 -0
- package/apps/com/eden/files/src/components/Omnibox.tsx +241 -0
- package/apps/com/eden/files/src/dialogs/CreateFileDialog.tsx +71 -0
- package/apps/com/eden/files/src/dialogs/CreateFolderDialog.tsx +68 -0
- package/apps/com/eden/files/src/dialogs/DeleteConfirmDialog.tsx +35 -0
- package/apps/com/eden/files/src/dialogs/DisplayOptionsModal.tsx +122 -0
- package/apps/com/eden/files/src/dialogs/ErrorDialog.tsx +28 -0
- package/apps/com/eden/files/src/index.tsx +9 -0
- package/apps/com/eden/files/src/styles.css +595 -0
- package/apps/com/eden/files/src/types.ts +20 -0
- package/apps/com/eden/files/src/utils.ts +44 -0
- package/apps/com/eden/files/tsconfig.json +27 -0
- package/apps/com/eden/files/vite.config.mts +23 -0
- package/apps/com/eden/settings/dist/assets/index-CTkJneTg.js +1 -0
- package/apps/com/eden/settings/dist/assets/index-GIMJANTM.css +1 -0
- package/apps/com/eden/settings/dist/index.html +13 -0
- package/apps/com/eden/settings/icon.svg +15 -0
- package/apps/com/eden/settings/index.html +12 -0
- package/apps/com/eden/settings/manifest.json +28 -0
- package/apps/com/eden/settings/node_modules/.bin/tsc +21 -0
- package/apps/com/eden/settings/node_modules/.bin/tsserver +21 -0
- package/apps/com/eden/settings/node_modules/.bin/vite +21 -0
- package/apps/com/eden/settings/package.json +21 -0
- package/apps/com/eden/settings/src/App.css +168 -0
- package/apps/com/eden/settings/src/App.tsx +301 -0
- package/apps/com/eden/settings/src/components/SettingInput.tsx +131 -0
- package/apps/com/eden/settings/src/index.tsx +9 -0
- package/apps/com/eden/settings/tsconfig.json +21 -0
- package/apps/com/eden/settings/vite.config.mts +22 -0
- package/apps/com/eden/toaster/README.md +89 -0
- package/apps/com/eden/toaster/dist/assets/index-8JMcmBCJ.css +1 -0
- package/apps/com/eden/toaster/dist/assets/index-C4cVyh7j.js +16 -0
- package/apps/com/eden/toaster/dist/index.html +16 -0
- package/apps/com/eden/toaster/index.html +16 -0
- package/apps/com/eden/toaster/manifest.json +28 -0
- package/apps/com/eden/toaster/node_modules/.bin/vite +21 -0
- package/apps/com/eden/toaster/package.json +15 -0
- package/apps/com/eden/toaster/src/styles.css +159 -0
- package/apps/com/eden/toaster/src/toaster.ts +470 -0
- package/apps/com/eden/toaster/tsconfig.json +28 -0
- package/apps/com/eden/toaster/vite.config.mts +18 -0
- package/apps/com/eden/webbrowser/.dev-manifest.json +5 -0
- package/apps/com/eden/webbrowser/icon.svg +20 -0
- package/apps/com/eden/webbrowser/index.html +141 -0
- package/apps/com/eden/webbrowser/manifest.json +23 -0
- package/apps/com/eden/webbrowser/node_modules/.bin/vite +21 -0
- package/apps/com/eden/webbrowser/node_modules/.vite/deps/_metadata.json +8 -0
- package/apps/com/eden/webbrowser/node_modules/.vite/deps/package.json +3 -0
- package/apps/com/eden/webbrowser/package.json +13 -0
- package/apps/com/eden/webbrowser/vite.config.mts +11 -0
- package/dist/Eden.d.ts +40 -0
- package/dist/Eden.d.ts.map +1 -0
- package/dist/Eden.js +186 -0
- package/dist/Eden.js.map +1 -0
- package/dist/SystemHandler.d.ts +11 -0
- package/dist/SystemHandler.d.ts.map +1 -0
- package/dist/SystemHandler.js +53 -0
- package/dist/SystemHandler.js.map +1 -0
- package/dist/app-frame/frame-injector.js +19 -0
- package/dist/app-frame/frame-injector.js.map +7 -0
- package/dist/app-frame/frame.css +186 -0
- package/dist/app-runtime/app-preload.js +2 -0
- package/dist/app-runtime/app-preload.js.map +7 -0
- package/dist/app-runtime/backend-preload.js +2 -0
- package/dist/app-runtime/backend-preload.js.map +7 -0
- package/dist/appbus/AppChannelHandler.d.ts +65 -0
- package/dist/appbus/AppChannelHandler.d.ts.map +1 -0
- package/dist/appbus/AppChannelHandler.js +120 -0
- package/dist/appbus/AppChannelHandler.js.map +1 -0
- package/dist/appbus/AppChannelManager.d.ts +80 -0
- package/dist/appbus/AppChannelManager.d.ts.map +1 -0
- package/dist/appbus/AppChannelManager.js +312 -0
- package/dist/appbus/AppChannelManager.js.map +1 -0
- package/dist/appbus/index.d.ts +2 -0
- package/dist/appbus/index.d.ts.map +1 -0
- package/dist/appbus/index.js +18 -0
- package/dist/appbus/index.js.map +1 -0
- package/dist/db/DbHandler.d.ts +119 -0
- package/dist/db/DbHandler.d.ts.map +1 -0
- package/dist/db/DbHandler.js +204 -0
- package/dist/db/DbHandler.js.map +1 -0
- package/dist/db/DbManager.d.ts +49 -0
- package/dist/db/DbManager.d.ts.map +1 -0
- package/dist/db/DbManager.js +172 -0
- package/dist/db/DbManager.js.map +1 -0
- package/dist/db/index.d.ts +3 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +8 -0
- package/dist/db/index.js.map +1 -0
- package/dist/edencss/eden-tokens.css +1 -0
- package/dist/edencss/eden.css +1 -0
- package/dist/file-open/FileOpenHandler.d.ts +59 -0
- package/dist/file-open/FileOpenHandler.d.ts.map +1 -0
- package/dist/file-open/FileOpenHandler.js +122 -0
- package/dist/file-open/FileOpenHandler.js.map +1 -0
- package/dist/file-open/FileOpenManager.d.ts +91 -0
- package/dist/file-open/FileOpenManager.d.ts.map +1 -0
- package/dist/file-open/FileOpenManager.js +411 -0
- package/dist/file-open/FileOpenManager.js.map +1 -0
- package/dist/file-open/index.d.ts +3 -0
- package/dist/file-open/index.d.ts.map +1 -0
- package/dist/file-open/index.js +8 -0
- package/dist/file-open/index.js.map +1 -0
- package/dist/filesystem/FilesystemHandler.d.ts +65 -0
- package/dist/filesystem/FilesystemHandler.d.ts.map +1 -0
- package/dist/filesystem/FilesystemHandler.js +134 -0
- package/dist/filesystem/FilesystemHandler.js.map +1 -0
- package/dist/filesystem/FilesystemManager.d.ts +70 -0
- package/dist/filesystem/FilesystemManager.d.ts.map +1 -0
- package/dist/filesystem/FilesystemManager.js +236 -0
- package/dist/filesystem/FilesystemManager.js.map +1 -0
- package/dist/filesystem/index.d.ts +3 -0
- package/dist/filesystem/index.d.ts.map +1 -0
- package/dist/filesystem/index.js +8 -0
- package/dist/filesystem/index.js.map +1 -0
- package/dist/foundation/foundation-preload.js +15 -0
- package/dist/foundation/foundation.css +40 -0
- package/dist/foundation/foundation.html +22 -0
- package/dist/foundation/foundation.js +69 -0
- package/dist/hotreload-config.d.ts +8 -0
- package/dist/hotreload-config.d.ts.map +1 -0
- package/dist/hotreload-config.js +73 -0
- package/dist/hotreload-config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/ipc/CommandDecorators.d.ts +72 -0
- package/dist/ipc/CommandDecorators.d.ts.map +1 -0
- package/dist/ipc/CommandDecorators.js +49 -0
- package/dist/ipc/CommandDecorators.js.map +1 -0
- package/dist/ipc/CommandRegistry.d.ts +77 -0
- package/dist/ipc/CommandRegistry.d.ts.map +1 -0
- package/dist/ipc/CommandRegistry.js +175 -0
- package/dist/ipc/CommandRegistry.js.map +1 -0
- package/dist/ipc/EdenEmitter.d.ts +54 -0
- package/dist/ipc/EdenEmitter.d.ts.map +1 -0
- package/dist/ipc/EdenEmitter.js +81 -0
- package/dist/ipc/EdenEmitter.js.map +1 -0
- package/dist/ipc/EventHandler.d.ts +21 -0
- package/dist/ipc/EventHandler.d.ts.map +1 -0
- package/dist/ipc/EventHandler.js +87 -0
- package/dist/ipc/EventHandler.js.map +1 -0
- package/dist/ipc/EventSubscriberManager.d.ts +67 -0
- package/dist/ipc/EventSubscriberManager.d.ts.map +1 -0
- package/dist/ipc/EventSubscriberManager.js +204 -0
- package/dist/ipc/EventSubscriberManager.js.map +1 -0
- package/dist/ipc/IPCBridge.d.ts +60 -0
- package/dist/ipc/IPCBridge.d.ts.map +1 -0
- package/dist/ipc/IPCBridge.js +186 -0
- package/dist/ipc/IPCBridge.js.map +1 -0
- package/dist/ipc/PermissionRegistry.d.ts +52 -0
- package/dist/ipc/PermissionRegistry.d.ts.map +1 -0
- package/dist/ipc/PermissionRegistry.js +120 -0
- package/dist/ipc/PermissionRegistry.js.map +1 -0
- package/dist/ipc/index.d.ts +7 -0
- package/dist/ipc/index.d.ts.map +1 -0
- package/dist/ipc/index.js +23 -0
- package/dist/ipc/index.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +15 -0
- package/dist/main.js.map +1 -0
- package/dist/notification/NotificationHandler.d.ts +16 -0
- package/dist/notification/NotificationHandler.d.ts.map +1 -0
- package/dist/notification/NotificationHandler.js +39 -0
- package/dist/notification/NotificationHandler.js.map +1 -0
- package/dist/notification/NotificationManager.d.ts +32 -0
- package/dist/notification/NotificationManager.d.ts.map +1 -0
- package/dist/notification/NotificationManager.js +66 -0
- package/dist/notification/NotificationManager.js.map +1 -0
- package/dist/notification/index.d.ts +3 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/index.js +19 -0
- package/dist/notification/index.js.map +1 -0
- package/dist/package-manager/PackageHandler.d.ts +50 -0
- package/dist/package-manager/PackageHandler.d.ts.map +1 -0
- package/dist/package-manager/PackageHandler.js +107 -0
- package/dist/package-manager/PackageHandler.js.map +1 -0
- package/dist/package-manager/PackageManager.d.ts +73 -0
- package/dist/package-manager/PackageManager.d.ts.map +1 -0
- package/dist/package-manager/PackageManager.js +373 -0
- package/dist/package-manager/PackageManager.js.map +1 -0
- package/dist/package-manager/index.d.ts +3 -0
- package/dist/package-manager/index.d.ts.map +1 -0
- package/dist/package-manager/index.js +8 -0
- package/dist/package-manager/index.js.map +1 -0
- package/dist/process-manager/AutostartManager.d.ts +15 -0
- package/dist/process-manager/AutostartManager.d.ts.map +1 -0
- package/dist/process-manager/AutostartManager.js +56 -0
- package/dist/process-manager/AutostartManager.js.map +1 -0
- package/dist/process-manager/BackendManager.d.ts +63 -0
- package/dist/process-manager/BackendManager.d.ts.map +1 -0
- package/dist/process-manager/BackendManager.js +272 -0
- package/dist/process-manager/BackendManager.js.map +1 -0
- package/dist/process-manager/ProcessHandler.d.ts +29 -0
- package/dist/process-manager/ProcessHandler.d.ts.map +1 -0
- package/dist/process-manager/ProcessHandler.js +66 -0
- package/dist/process-manager/ProcessHandler.js.map +1 -0
- package/dist/process-manager/ProcessManager.d.ts +94 -0
- package/dist/process-manager/ProcessManager.d.ts.map +1 -0
- package/dist/process-manager/ProcessManager.js +286 -0
- package/dist/process-manager/ProcessManager.js.map +1 -0
- package/dist/process-manager/index.d.ts +5 -0
- package/dist/process-manager/index.d.ts.map +1 -0
- package/dist/process-manager/index.js +12 -0
- package/dist/process-manager/index.js.map +1 -0
- package/dist/settings/EdenSettings.d.ts +8 -0
- package/dist/settings/EdenSettings.d.ts.map +1 -0
- package/dist/settings/EdenSettings.js +148 -0
- package/dist/settings/EdenSettings.js.map +1 -0
- package/dist/settings/SettingsHandler.d.ts +117 -0
- package/dist/settings/SettingsHandler.d.ts.map +1 -0
- package/dist/settings/SettingsHandler.js +199 -0
- package/dist/settings/SettingsHandler.js.map +1 -0
- package/dist/settings/SettingsManager.d.ts +64 -0
- package/dist/settings/SettingsManager.d.ts.map +1 -0
- package/dist/settings/SettingsManager.js +221 -0
- package/dist/settings/SettingsManager.js.map +1 -0
- package/dist/settings/index.d.ts +4 -0
- package/dist/settings/index.d.ts.map +1 -0
- package/dist/settings/index.js +11 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/utils/cachedFileReader.d.ts +46 -0
- package/dist/utils/cachedFileReader.d.ts.map +1 -0
- package/dist/utils/cachedFileReader.js +100 -0
- package/dist/utils/cachedFileReader.js.map +1 -0
- package/dist/view-manager/DevToolsManager.d.ts +29 -0
- package/dist/view-manager/DevToolsManager.d.ts.map +1 -0
- package/dist/view-manager/DevToolsManager.js +88 -0
- package/dist/view-manager/DevToolsManager.js.map +1 -0
- package/dist/view-manager/FloatingWindowController.d.ts +44 -0
- package/dist/view-manager/FloatingWindowController.d.ts.map +1 -0
- package/dist/view-manager/FloatingWindowController.js +124 -0
- package/dist/view-manager/FloatingWindowController.js.map +1 -0
- package/dist/view-manager/LayoutCalculator.d.ts +49 -0
- package/dist/view-manager/LayoutCalculator.d.ts.map +1 -0
- package/dist/view-manager/LayoutCalculator.js +94 -0
- package/dist/view-manager/LayoutCalculator.js.map +1 -0
- package/dist/view-manager/MouseTracker.d.ts +65 -0
- package/dist/view-manager/MouseTracker.d.ts.map +1 -0
- package/dist/view-manager/MouseTracker.js +114 -0
- package/dist/view-manager/MouseTracker.js.map +1 -0
- package/dist/view-manager/TilingManager.d.ts +61 -0
- package/dist/view-manager/TilingManager.d.ts.map +1 -0
- package/dist/view-manager/TilingManager.js +142 -0
- package/dist/view-manager/TilingManager.js.map +1 -0
- package/dist/view-manager/ViewCreator.d.ts +72 -0
- package/dist/view-manager/ViewCreator.d.ts.map +1 -0
- package/dist/view-manager/ViewCreator.js +277 -0
- package/dist/view-manager/ViewCreator.js.map +1 -0
- package/dist/view-manager/ViewHandler.d.ts +112 -0
- package/dist/view-manager/ViewHandler.d.ts.map +1 -0
- package/dist/view-manager/ViewHandler.js +307 -0
- package/dist/view-manager/ViewHandler.js.map +1 -0
- package/dist/view-manager/ViewLifecycle.d.ts +66 -0
- package/dist/view-manager/ViewLifecycle.d.ts.map +1 -0
- package/dist/view-manager/ViewLifecycle.js +142 -0
- package/dist/view-manager/ViewLifecycle.js.map +1 -0
- package/dist/view-manager/ViewManager.d.ts +112 -0
- package/dist/view-manager/ViewManager.d.ts.map +1 -0
- package/dist/view-manager/ViewManager.js +422 -0
- package/dist/view-manager/ViewManager.js.map +1 -0
- package/dist/view-manager/index.d.ts +11 -0
- package/dist/view-manager/index.d.ts.map +1 -0
- package/dist/view-manager/index.js +23 -0
- package/dist/view-manager/index.js.map +1 -0
- package/dist/view-manager/types.d.ts +24 -0
- package/dist/view-manager/types.d.ts.map +1 -0
- package/dist/view-manager/types.js +11 -0
- package/dist/view-manager/types.js.map +1 -0
- package/edencss/README.md +214 -0
- package/edencss/components/badges.css +180 -0
- package/edencss/components/buttons.css +221 -0
- package/edencss/components/cards.css +201 -0
- package/edencss/components/inputs.css +424 -0
- package/edencss/components/lists.css +242 -0
- package/edencss/components/modals.css +207 -0
- package/edencss/components/progress.css +186 -0
- package/edencss/components/sidebar.css +232 -0
- package/edencss/components/tabs.css +189 -0
- package/edencss/eden.css +16 -0
- package/edencss/index.ts +11 -0
- package/edencss/style-dictionary.config.mjs +75 -0
- package/edencss/tokens-pink.json +163 -0
- package/edencss/tokens.css +121 -0
- package/edencss/tokens.d.ts +111 -0
- package/edencss/tokens.json +369 -0
- package/edencss/tokens.ts +125 -0
- package/edencss/utilities.css +423 -0
- package/foundation/foundation-preload.js +15 -0
- package/foundation/foundation.css +40 -0
- package/foundation/foundation.html +22 -0
- package/foundation/foundation.js +69 -0
- package/package.json +55 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.CachedFileReader = exports.cachedFileReader = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
/**
|
|
29
|
+
* Cached file reader for non-changing files.
|
|
30
|
+
* Reads from filesystem on first access, then serves from cache.
|
|
31
|
+
*/
|
|
32
|
+
class CachedFileReader {
|
|
33
|
+
cache = new Map();
|
|
34
|
+
/**
|
|
35
|
+
* Reads a file from cache if available, otherwise reads from filesystem and caches the result.
|
|
36
|
+
* @param filePath - Absolute path to the file to read
|
|
37
|
+
* @param encoding - File encoding (default: 'utf-8')
|
|
38
|
+
* @returns The file contents as a string
|
|
39
|
+
*/
|
|
40
|
+
read(filePath, encoding = 'utf-8') {
|
|
41
|
+
const cacheKey = `${filePath}:${encoding}`;
|
|
42
|
+
if (this.cache.has(cacheKey)) {
|
|
43
|
+
return this.cache.get(cacheKey);
|
|
44
|
+
}
|
|
45
|
+
const content = fs.readFileSync(filePath, encoding);
|
|
46
|
+
this.cache.set(cacheKey, content);
|
|
47
|
+
return content;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Asynchronously reads a file from cache if available, otherwise reads from filesystem and caches the result.
|
|
51
|
+
* @param filePath - Absolute path to the file to read
|
|
52
|
+
* @param encoding - File encoding (default: 'utf-8')
|
|
53
|
+
* @returns Promise resolving to the file contents as a string
|
|
54
|
+
*/
|
|
55
|
+
async readAsync(filePath, encoding = 'utf-8') {
|
|
56
|
+
const cacheKey = `${filePath}:${encoding}`;
|
|
57
|
+
if (this.cache.has(cacheKey)) {
|
|
58
|
+
return this.cache.get(cacheKey);
|
|
59
|
+
}
|
|
60
|
+
const content = await fs.promises.readFile(filePath, encoding);
|
|
61
|
+
this.cache.set(cacheKey, content);
|
|
62
|
+
return content;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Flushes the entire cache.
|
|
66
|
+
*/
|
|
67
|
+
flushCache() {
|
|
68
|
+
this.cache.clear();
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Flushes a specific file from the cache.
|
|
72
|
+
* @param filePath - Absolute path to the file to flush
|
|
73
|
+
* @param encoding - File encoding (default: 'utf-8')
|
|
74
|
+
*/
|
|
75
|
+
flushFile(filePath, encoding = 'utf-8') {
|
|
76
|
+
const cacheKey = `${filePath}:${encoding}`;
|
|
77
|
+
this.cache.delete(cacheKey);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Checks if a file is cached.
|
|
81
|
+
* @param filePath - Absolute path to the file
|
|
82
|
+
* @param encoding - File encoding (default: 'utf-8')
|
|
83
|
+
* @returns true if the file is cached, false otherwise
|
|
84
|
+
*/
|
|
85
|
+
isCached(filePath, encoding = 'utf-8') {
|
|
86
|
+
const cacheKey = `${filePath}:${encoding}`;
|
|
87
|
+
return this.cache.has(cacheKey);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Gets the number of cached files.
|
|
91
|
+
* @returns The number of files currently in cache
|
|
92
|
+
*/
|
|
93
|
+
getCacheSize() {
|
|
94
|
+
return this.cache.size;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.CachedFileReader = CachedFileReader;
|
|
98
|
+
// Export singleton instance for convenience
|
|
99
|
+
exports.cachedFileReader = new CachedFileReader();
|
|
100
|
+
//# sourceMappingURL=cachedFileReader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cachedFileReader.js","sourceRoot":"","sources":["../../src/utils/cachedFileReader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AAEzB;;;GAGG;AACH,MAAM,gBAAgB;IACZ,KAAK,GAAwB,IAAI,GAAG,EAAE,CAAC;IAE/C;;;;;OAKG;IACH,IAAI,CAAC,QAAgB,EAAE,WAA2B,OAAO;QACvD,MAAM,QAAQ,GAAG,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC;QACnC,CAAC;QAED,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAElC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CAAC,QAAgB,EAAE,WAA2B,OAAO;QAClE,MAAM,QAAQ,GAAG,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAE3C,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC;QACnC,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC/D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAElC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,QAAgB,EAAE,WAA2B,OAAO;QAC5D,MAAM,QAAQ,GAAG,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,QAAgB,EAAE,WAA2B,OAAO;QAC3D,MAAM,QAAQ,GAAG,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED;;;OAGG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;CACF;AAMQ,4CAAgB;AAJzB,4CAA4C;AAC/B,QAAA,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { WebContentsView } from "electron";
|
|
2
|
+
/**
|
|
3
|
+
* DevToolsManager
|
|
4
|
+
*
|
|
5
|
+
* Manages DevTools for WebContentsViews, including:
|
|
6
|
+
* - Keyboard shortcut registration (Ctrl+Shift+D)
|
|
7
|
+
* - Automatic cleanup when views are destroyed
|
|
8
|
+
*/
|
|
9
|
+
export declare class DevToolsManager {
|
|
10
|
+
private viewsWithDevTools;
|
|
11
|
+
/**
|
|
12
|
+
* Register DevTools shortcut (Ctrl+Shift+D) on a WebContentsView
|
|
13
|
+
* Works on both X11 and Wayland
|
|
14
|
+
*/
|
|
15
|
+
registerShortcut(view: WebContentsView): void;
|
|
16
|
+
/**
|
|
17
|
+
* Close DevTools for a view when it's being destroyed
|
|
18
|
+
*/
|
|
19
|
+
closeDevToolsForView(view: WebContentsView): void;
|
|
20
|
+
/**
|
|
21
|
+
* Get the set of webContents IDs that have DevTools open
|
|
22
|
+
*/
|
|
23
|
+
getViewsWithDevTools(): Set<number>;
|
|
24
|
+
/**
|
|
25
|
+
* Clear all tracked DevTools
|
|
26
|
+
*/
|
|
27
|
+
clear(): void;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=DevToolsManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevToolsManager.d.ts","sourceRoot":"","sources":["../../src/view-manager/DevToolsManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C;;;;;;GAMG;AACH,qBAEa,eAAe;IAC1B,OAAO,CAAC,iBAAiB,CAA0B;IAEnD;;;OAGG;IACH,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI;IA8B7C;;OAEG;IACH,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI;IAqBjD;;OAEG;IACH,oBAAoB,IAAI,GAAG,CAAC,MAAM,CAAC;IAInC;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DevToolsManager = void 0;
|
|
10
|
+
const tsyringe_1 = require("tsyringe");
|
|
11
|
+
/**
|
|
12
|
+
* DevToolsManager
|
|
13
|
+
*
|
|
14
|
+
* Manages DevTools for WebContentsViews, including:
|
|
15
|
+
* - Keyboard shortcut registration (Ctrl+Shift+D)
|
|
16
|
+
* - Automatic cleanup when views are destroyed
|
|
17
|
+
*/
|
|
18
|
+
let DevToolsManager = class DevToolsManager {
|
|
19
|
+
viewsWithDevTools = new Set();
|
|
20
|
+
/**
|
|
21
|
+
* Register DevTools shortcut (Ctrl+Shift+D) on a WebContentsView
|
|
22
|
+
* Works on both X11 and Wayland
|
|
23
|
+
*/
|
|
24
|
+
registerShortcut(view) {
|
|
25
|
+
view.webContents.on("before-input-event", (event, input) => {
|
|
26
|
+
// Check for Ctrl+Shift+D (or Cmd+Shift+D on macOS)
|
|
27
|
+
if (input.type === "keyDown" &&
|
|
28
|
+
input.key.toLowerCase() === "d" &&
|
|
29
|
+
input.shift &&
|
|
30
|
+
(input.control || input.meta) &&
|
|
31
|
+
!input.alt) {
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
try {
|
|
34
|
+
const webContentsId = view.webContents.id;
|
|
35
|
+
if (view.webContents.isDevToolsOpened()) {
|
|
36
|
+
view.webContents.closeDevTools();
|
|
37
|
+
this.viewsWithDevTools.delete(webContentsId);
|
|
38
|
+
console.log("Closed DevTools for view");
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
view.webContents.openDevTools();
|
|
42
|
+
this.viewsWithDevTools.add(webContentsId);
|
|
43
|
+
console.log("Opened DevTools for view");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
console.error("Failed to toggle DevTools:", err);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Close DevTools for a view when it's being destroyed
|
|
54
|
+
*/
|
|
55
|
+
closeDevToolsForView(view) {
|
|
56
|
+
try {
|
|
57
|
+
const webContentsId = view.webContents.id;
|
|
58
|
+
if (!view.webContents.isDestroyed() &&
|
|
59
|
+
view.webContents.isDevToolsOpened()) {
|
|
60
|
+
view.webContents.closeDevTools();
|
|
61
|
+
console.log(`Closed DevTools for view (webContents ID: ${webContentsId})`);
|
|
62
|
+
}
|
|
63
|
+
this.viewsWithDevTools.delete(webContentsId);
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
// Ignore errors during cleanup
|
|
67
|
+
console.debug("Error closing DevTools during cleanup:", err);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Get the set of webContents IDs that have DevTools open
|
|
72
|
+
*/
|
|
73
|
+
getViewsWithDevTools() {
|
|
74
|
+
return new Set(this.viewsWithDevTools);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Clear all tracked DevTools
|
|
78
|
+
*/
|
|
79
|
+
clear() {
|
|
80
|
+
this.viewsWithDevTools.clear();
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
exports.DevToolsManager = DevToolsManager;
|
|
84
|
+
exports.DevToolsManager = DevToolsManager = __decorate([
|
|
85
|
+
(0, tsyringe_1.singleton)(),
|
|
86
|
+
(0, tsyringe_1.injectable)()
|
|
87
|
+
], DevToolsManager);
|
|
88
|
+
//# sourceMappingURL=DevToolsManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevToolsManager.js","sourceRoot":"","sources":["../../src/view-manager/DevToolsManager.ts"],"names":[],"mappings":";;;;;;;;;AACA,uCAAiD;AAEjD;;;;;;GAMG;AAGI,IAAM,eAAe,GAArB,MAAM,eAAe;IAClB,iBAAiB,GAAgB,IA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E1C,IACE,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;gBAC/B,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,EACnC,CAAC;gBACD,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;gBACjC,OAAO,CAAC,GAAG,CACT,6CAA6C,aAAa,GAAG,CAC9D,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC/C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,+BAA+B;YAC/B,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,GAAG,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED;;OAEG;IACH,oBAAoB;QAClB,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;CACF,CAAA;AA1EY,0CAAe;0BAAf,eAAe;IAF3B,IAAA,oBAAS,GAAE;IACX,IAAA,qBAAU,GAAE;GACA,eAAe,CA0E3B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Rectangle as Bounds } from "electron";
|
|
2
|
+
import { WindowConfig } from "@edenapp/types";
|
|
3
|
+
import { ViewInfo } from "./types";
|
|
4
|
+
type ViewCollection = () => Iterable<ViewInfo>;
|
|
5
|
+
/**
|
|
6
|
+
* FloatingWindowController
|
|
7
|
+
*
|
|
8
|
+
* Encapsulates floating window calculations: bounds, constraints, and z-ordering.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FloatingWindowController {
|
|
11
|
+
private readonly getWorkspaceBounds;
|
|
12
|
+
private readonly getViews;
|
|
13
|
+
private static readonly MIN_GRABBABLE_WIDTH;
|
|
14
|
+
private static readonly CASCADE_OFFSET;
|
|
15
|
+
constructor(getWorkspaceBounds: () => Bounds, getViews: ViewCollection);
|
|
16
|
+
/**
|
|
17
|
+
* Calculate initial bounds for a floating window, including cascade offset.
|
|
18
|
+
*/
|
|
19
|
+
calculateInitialBounds(windowConfig?: WindowConfig): Bounds;
|
|
20
|
+
/**
|
|
21
|
+
* Apply window-level constraints and workspace bounds to floating windows.
|
|
22
|
+
*/
|
|
23
|
+
applyWindowConstraints(bounds: Bounds, windowConfig?: WindowConfig): Bounds;
|
|
24
|
+
/**
|
|
25
|
+
* Get the next z-index for floating windows (top-most position).
|
|
26
|
+
*/
|
|
27
|
+
getNextZIndex(): number;
|
|
28
|
+
/**
|
|
29
|
+
* Get the z-index that would place a window at the back of the floating stack.
|
|
30
|
+
*/
|
|
31
|
+
getBackmostZIndex(): number | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Calculate a z-index for a desired position in the floating stack.
|
|
34
|
+
*/
|
|
35
|
+
getZIndexForPosition(position: number): number | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Get floating views ordered by z-index ascending.
|
|
38
|
+
*/
|
|
39
|
+
getOrderedFloatingViews(): ViewInfo[];
|
|
40
|
+
private getFloatingViews;
|
|
41
|
+
private constrainBounds;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=FloatingWindowController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingWindowController.d.ts","sourceRoot":"","sources":["../../src/view-manager/FloatingWindowController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,KAAK,cAAc,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAE/C;;;;GAIG;AACH,qBAAa,wBAAwB;IAKjC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAL3B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAO;IAClD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAM;gBAGzB,kBAAkB,EAAE,MAAM,MAAM,EAChC,QAAQ,EAAE,cAAc;IAG3C;;OAEG;IACH,sBAAsB,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,MAAM;IA+C3D;;OAEG;IACH,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,MAAM;IA4B3E;;OAEG;IACH,aAAa,IAAI,MAAM;IASvB;;OAEG;IACH,iBAAiB,IAAI,MAAM,GAAG,SAAS;IAOvC;;OAEG;IACH,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAY1D;;OAEG;IACH,uBAAuB,IAAI,QAAQ,EAAE;IAMrC,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,eAAe;CAiBxB"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FloatingWindowController = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* FloatingWindowController
|
|
6
|
+
*
|
|
7
|
+
* Encapsulates floating window calculations: bounds, constraints, and z-ordering.
|
|
8
|
+
*/
|
|
9
|
+
class FloatingWindowController {
|
|
10
|
+
getWorkspaceBounds;
|
|
11
|
+
getViews;
|
|
12
|
+
static MIN_GRABBABLE_WIDTH = 100;
|
|
13
|
+
static CASCADE_OFFSET = 30;
|
|
14
|
+
constructor(getWorkspaceBounds, getViews) {
|
|
15
|
+
this.getWorkspaceBounds = getWorkspaceBounds;
|
|
16
|
+
this.getViews = getViews;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Calculate initial bounds for a floating window, including cascade offset.
|
|
20
|
+
*/
|
|
21
|
+
calculateInitialBounds(windowConfig) {
|
|
22
|
+
const { x: workX, y: workY, width: workWidth, height: workHeight, } = this.getWorkspaceBounds();
|
|
23
|
+
const defaultWidth = windowConfig?.defaultSize?.width || 800;
|
|
24
|
+
const defaultHeight = windowConfig?.defaultSize?.height || 600;
|
|
25
|
+
const width = windowConfig?.minSize?.width
|
|
26
|
+
? Math.max(defaultWidth, windowConfig.minSize.width)
|
|
27
|
+
: windowConfig?.maxSize?.width
|
|
28
|
+
? Math.min(defaultWidth, windowConfig.maxSize.width)
|
|
29
|
+
: defaultWidth;
|
|
30
|
+
const height = windowConfig?.minSize?.height
|
|
31
|
+
? Math.max(defaultHeight, windowConfig.minSize.height)
|
|
32
|
+
: windowConfig?.maxSize?.height
|
|
33
|
+
? Math.min(defaultHeight, windowConfig.maxSize.height)
|
|
34
|
+
: defaultHeight;
|
|
35
|
+
let x;
|
|
36
|
+
let y;
|
|
37
|
+
if (windowConfig?.defaultPosition) {
|
|
38
|
+
x = workX + windowConfig.defaultPosition.x;
|
|
39
|
+
y = workY + windowConfig.defaultPosition.y;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
x = workX + (workWidth - width) / 2;
|
|
43
|
+
y = workY + (workHeight - height) / 2;
|
|
44
|
+
}
|
|
45
|
+
const floatingCount = this.getFloatingViews().length;
|
|
46
|
+
const offset = floatingCount * FloatingWindowController.CASCADE_OFFSET;
|
|
47
|
+
const bounds = {
|
|
48
|
+
x: x + offset,
|
|
49
|
+
y: y + offset,
|
|
50
|
+
width,
|
|
51
|
+
height,
|
|
52
|
+
};
|
|
53
|
+
return this.constrainBounds(bounds);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Apply window-level constraints and workspace bounds to floating windows.
|
|
57
|
+
*/
|
|
58
|
+
applyWindowConstraints(bounds, windowConfig) {
|
|
59
|
+
let finalBounds = { ...bounds };
|
|
60
|
+
if (windowConfig?.minSize) {
|
|
61
|
+
finalBounds.width = Math.max(finalBounds.width, windowConfig.minSize.width);
|
|
62
|
+
finalBounds.height = Math.max(finalBounds.height, windowConfig.minSize.height);
|
|
63
|
+
}
|
|
64
|
+
if (windowConfig?.maxSize) {
|
|
65
|
+
finalBounds.width = Math.min(finalBounds.width, windowConfig.maxSize.width);
|
|
66
|
+
finalBounds.height = Math.min(finalBounds.height, windowConfig.maxSize.height);
|
|
67
|
+
}
|
|
68
|
+
return this.constrainBounds(finalBounds);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Get the next z-index for floating windows (top-most position).
|
|
72
|
+
*/
|
|
73
|
+
getNextZIndex() {
|
|
74
|
+
const zIndices = this.getFloatingViews()
|
|
75
|
+
.map((v) => v.zIndex)
|
|
76
|
+
.filter((z) => typeof z === "number");
|
|
77
|
+
if (zIndices.length === 0)
|
|
78
|
+
return 1;
|
|
79
|
+
return Math.max(...zIndices) + 1;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get the z-index that would place a window at the back of the floating stack.
|
|
83
|
+
*/
|
|
84
|
+
getBackmostZIndex() {
|
|
85
|
+
const floatingViews = this.getOrderedFloatingViews();
|
|
86
|
+
if (!floatingViews.length)
|
|
87
|
+
return undefined;
|
|
88
|
+
const minZIndex = floatingViews[0].zIndex ?? 1;
|
|
89
|
+
return minZIndex - 1;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Calculate a z-index for a desired position in the floating stack.
|
|
93
|
+
*/
|
|
94
|
+
getZIndexForPosition(position) {
|
|
95
|
+
const floatingViews = this.getOrderedFloatingViews();
|
|
96
|
+
if (!floatingViews.length)
|
|
97
|
+
return undefined;
|
|
98
|
+
const targetIndex = Math.max(0, Math.min(position, floatingViews.length - 1));
|
|
99
|
+
const baseZIndex = floatingViews[0].zIndex ?? 1;
|
|
100
|
+
return baseZIndex + targetIndex;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get floating views ordered by z-index ascending.
|
|
104
|
+
*/
|
|
105
|
+
getOrderedFloatingViews() {
|
|
106
|
+
return this.getFloatingViews().sort((a, b) => (a.zIndex || 0) - (b.zIndex || 0));
|
|
107
|
+
}
|
|
108
|
+
getFloatingViews() {
|
|
109
|
+
return Array.from(this.getViews()).filter((view) => view.mode === "floating");
|
|
110
|
+
}
|
|
111
|
+
constrainBounds(bounds) {
|
|
112
|
+
const { x: workX, y: workY, width: workWidth } = this.getWorkspaceBounds();
|
|
113
|
+
const constrainedBounds = { ...bounds };
|
|
114
|
+
constrainedBounds.y = Math.max(workY, constrainedBounds.y);
|
|
115
|
+
const maxX = workX + workWidth - FloatingWindowController.MIN_GRABBABLE_WIDTH;
|
|
116
|
+
constrainedBounds.x = Math.min(constrainedBounds.x, maxX);
|
|
117
|
+
const minX = workX -
|
|
118
|
+
(constrainedBounds.width - FloatingWindowController.MIN_GRABBABLE_WIDTH);
|
|
119
|
+
constrainedBounds.x = Math.max(constrainedBounds.x, minX);
|
|
120
|
+
return constrainedBounds;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
exports.FloatingWindowController = FloatingWindowController;
|
|
124
|
+
//# sourceMappingURL=FloatingWindowController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingWindowController.js","sourceRoot":"","sources":["../../src/view-manager/FloatingWindowController.ts"],"names":[],"mappings":";;;AAMA;;;;GAIG;AACH,MAAa,wBAAwB;IAKhB;IACA;IALX,MAAM,CAAU,mBAAmB,GAAG,GAAG,CAAC;IAC1C,MAAM,CAAU,cAAc,GAAG,EAAE,CAAC;IAE5C,YACmB,kBAAgC,EAChC,QAAwB;QADxB,uBAAkB,GAAlB,kBAAkB,CAAc;QAChC,aAAQ,GAAR,QAAQ,CAAgB;IACxC,CAAC;IAEJ;;OAEG;IACH,sBAAsB,CAAC,YAA2B;QAChD,MAAM,EACJ,CAAC,EAAE,KAAK,EACR,CAAC,EAAE,KAAK,EACR,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,UAAU,GACnB,GAAG,IAAI,CAAC,kBAAkB,EAA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E,CAAC,CAAC,MAAM,CACvC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CACnC,CAAC;IACJ,CAAC;IAEO,eAAe,CAAC,MAAc;QACpC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC3E,MAAM,iBAAiB,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;QAExC,iBAAiB,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;QAE3D,MAAM,IAAI,GACR,KAAK,GAAG,SAAS,GAAG,wBAAwB,CAAC,mBAAmB,CAAC;QACnE,iBAAiB,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QAE1D,MAAM,IAAI,GACR,KAAK;YACL,CAAC,iBAAiB,CAAC,KAAK,GAAG,wBAAwB,CAAC,mBAAmB,CAAC,CAAC;QAC3E,iBAAiB,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QAE1D,OAAO,iBAAiB,CAAC;IAC3B,CAAC;;AA9JH,4DA+JC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Rectangle as Bounds } from "electron";
|
|
2
|
+
import { TilingConfig } from "@edenapp/types";
|
|
3
|
+
/**
|
|
4
|
+
* Grid dimensions for a layout
|
|
5
|
+
*/
|
|
6
|
+
interface GridDimensions {
|
|
7
|
+
rows: number;
|
|
8
|
+
columns: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Layout calculation parameters
|
|
12
|
+
*/
|
|
13
|
+
interface LayoutParams {
|
|
14
|
+
workspace: Bounds;
|
|
15
|
+
tileIndex: number;
|
|
16
|
+
visibleCount: number;
|
|
17
|
+
config: TilingConfig;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* LayoutCalculator
|
|
21
|
+
*
|
|
22
|
+
* Generic utility for calculating tile bounds in various layout modes.
|
|
23
|
+
* Provides a pluggable system for different tiling strategies.
|
|
24
|
+
*/
|
|
25
|
+
export declare class LayoutCalculator {
|
|
26
|
+
/**
|
|
27
|
+
* Calculate bounds for a tile at a given index
|
|
28
|
+
*/
|
|
29
|
+
static calculateTileBounds(params: LayoutParams): Bounds;
|
|
30
|
+
/**
|
|
31
|
+
* Apply padding to bounds
|
|
32
|
+
*/
|
|
33
|
+
private static applyPadding;
|
|
34
|
+
/**
|
|
35
|
+
* Determine grid dimensions based on tiling mode
|
|
36
|
+
*/
|
|
37
|
+
private static getGridDimensions;
|
|
38
|
+
/**
|
|
39
|
+
* Calculate bounds for a specific cell in a grid
|
|
40
|
+
*/
|
|
41
|
+
private static calculateGridCell;
|
|
42
|
+
/**
|
|
43
|
+
* Calculate optimal grid dimensions for a given number of items
|
|
44
|
+
* Useful for auto-layout modes
|
|
45
|
+
*/
|
|
46
|
+
static calculateOptimalGrid(itemCount: number): GridDimensions;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=LayoutCalculator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutCalculator.d.ts","sourceRoot":"","sources":["../../src/view-manager/LayoutCalculator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAc,MAAM,gBAAgB,CAAC;AAE1D;;GAEG;AACH,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,UAAU,YAAY;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;;;;GAKG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM;IAmBxD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAS3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAwBhC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAqBhC;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc;CAa/D"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LayoutCalculator = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* LayoutCalculator
|
|
6
|
+
*
|
|
7
|
+
* Generic utility for calculating tile bounds in various layout modes.
|
|
8
|
+
* Provides a pluggable system for different tiling strategies.
|
|
9
|
+
*/
|
|
10
|
+
class LayoutCalculator {
|
|
11
|
+
/**
|
|
12
|
+
* Calculate bounds for a tile at a given index
|
|
13
|
+
*/
|
|
14
|
+
static calculateTileBounds(params) {
|
|
15
|
+
const { workspace, tileIndex, visibleCount, config } = params;
|
|
16
|
+
const { mode, gap = 0, padding = 0, columns = 2, rows = 2 } = config;
|
|
17
|
+
// Apply padding to workspace
|
|
18
|
+
const available = this.applyPadding(workspace, padding);
|
|
19
|
+
// No tiling or no visible items
|
|
20
|
+
if (mode === "none" || visibleCount === 0) {
|
|
21
|
+
return available;
|
|
22
|
+
}
|
|
23
|
+
// Calculate grid dimensions based on mode
|
|
24
|
+
const grid = this.getGridDimensions(mode, visibleCount, rows, columns);
|
|
25
|
+
// Calculate tile bounds in grid
|
|
26
|
+
return this.calculateGridCell(available, tileIndex, grid, gap);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Apply padding to bounds
|
|
30
|
+
*/
|
|
31
|
+
static applyPadding(bounds, padding) {
|
|
32
|
+
return {
|
|
33
|
+
x: bounds.x + padding,
|
|
34
|
+
y: bounds.y + padding,
|
|
35
|
+
width: bounds.width - padding * 2,
|
|
36
|
+
height: bounds.height - padding * 2,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Determine grid dimensions based on tiling mode
|
|
41
|
+
*/
|
|
42
|
+
static getGridDimensions(mode, visibleCount, configRows, configColumns) {
|
|
43
|
+
switch (mode) {
|
|
44
|
+
case "horizontal":
|
|
45
|
+
// Horizontal = 1 row × N columns
|
|
46
|
+
return { rows: 1, columns: visibleCount };
|
|
47
|
+
case "vertical":
|
|
48
|
+
// Vertical = N rows × 1 column
|
|
49
|
+
return { rows: visibleCount, columns: 1 };
|
|
50
|
+
case "grid":
|
|
51
|
+
// Use configured dimensions
|
|
52
|
+
return { rows: configRows, columns: configColumns };
|
|
53
|
+
default:
|
|
54
|
+
return { rows: 1, columns: 1 };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Calculate bounds for a specific cell in a grid
|
|
59
|
+
*/
|
|
60
|
+
static calculateGridCell(available, index, grid, gap) {
|
|
61
|
+
const col = index % grid.columns;
|
|
62
|
+
const row = Math.floor(index / grid.columns);
|
|
63
|
+
const tileWidth = (available.width - gap * (grid.columns - 1)) / grid.columns;
|
|
64
|
+
const tileHeight = (available.height - gap * (grid.rows - 1)) / grid.rows;
|
|
65
|
+
return {
|
|
66
|
+
x: available.x + col * (tileWidth + gap),
|
|
67
|
+
y: available.y + row * (tileHeight + gap),
|
|
68
|
+
width: tileWidth,
|
|
69
|
+
height: tileHeight,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Calculate optimal grid dimensions for a given number of items
|
|
74
|
+
* Useful for auto-layout modes
|
|
75
|
+
*/
|
|
76
|
+
static calculateOptimalGrid(itemCount) {
|
|
77
|
+
if (itemCount <= 0)
|
|
78
|
+
return { rows: 1, columns: 1 };
|
|
79
|
+
if (itemCount === 1)
|
|
80
|
+
return { rows: 1, columns: 1 };
|
|
81
|
+
if (itemCount === 2)
|
|
82
|
+
return { rows: 1, columns: 2 };
|
|
83
|
+
if (itemCount === 3)
|
|
84
|
+
return { rows: 1, columns: 3 };
|
|
85
|
+
if (itemCount === 4)
|
|
86
|
+
return { rows: 2, columns: 2 };
|
|
87
|
+
// For larger counts, try to make it roughly square
|
|
88
|
+
const columns = Math.ceil(Math.sqrt(itemCount));
|
|
89
|
+
const rows = Math.ceil(itemCount / columns);
|
|
90
|
+
return { rows, columns };
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.LayoutCalculator = LayoutCalculator;
|
|
94
|
+
//# sourceMappingURL=LayoutCalculator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutCalculator.js","sourceRoot":"","sources":["../../src/view-manager/LayoutCalculator.ts"],"names":[],"mappings":";;;AAqBA;;;;;GAKG;AACH,MAAa,gBAAgB;IAC3B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,MAAoB;QAC7C,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAC9D,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC;QAErE,6BAA6B;QAC7B,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAExD,gCAAgC;QAChC,IAAI,IAAI,KAAK,MAAM,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;YAC1C,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,0CAA0C;QAC1C,MAAM,IAAI,GAAG,I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,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,CAAC;QAE5C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF;AAvGD,4CAuGC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Callback function for mouse updates
|
|
3
|
+
*/
|
|
4
|
+
export type MouseUpdateCallback = (position: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
deltaTime: number;
|
|
8
|
+
}) => void;
|
|
9
|
+
/**
|
|
10
|
+
* MouseTracker
|
|
11
|
+
*
|
|
12
|
+
* Centralized mouse position tracker for Eden.
|
|
13
|
+
* Provides a single efficient polling mechanism that multiple
|
|
14
|
+
* operations (drag, resize, etc.) can subscribe to.
|
|
15
|
+
*/
|
|
16
|
+
export declare class MouseTracker {
|
|
17
|
+
private subscribers;
|
|
18
|
+
private interval;
|
|
19
|
+
private lastUpdateTime;
|
|
20
|
+
private lastPosition;
|
|
21
|
+
private readonly updateInterval;
|
|
22
|
+
/**
|
|
23
|
+
* @param updateInterval - Update interval in milliseconds (default: 8ms for ~120fps)
|
|
24
|
+
*/
|
|
25
|
+
constructor(updateInterval?: number);
|
|
26
|
+
/**
|
|
27
|
+
* Subscribe to mouse position updates
|
|
28
|
+
* @param id - Unique identifier for this subscriber
|
|
29
|
+
* @param callback - Function to call with mouse updates
|
|
30
|
+
*/
|
|
31
|
+
subscribe(id: string, callback: MouseUpdateCallback): void;
|
|
32
|
+
/**
|
|
33
|
+
* Unsubscribe from mouse position updates
|
|
34
|
+
* @param id - Unique identifier of the subscriber to remove
|
|
35
|
+
*/
|
|
36
|
+
unsubscribe(id: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Get the current mouse position
|
|
39
|
+
*/
|
|
40
|
+
getCurrentPosition(): {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Check if currently tracking
|
|
46
|
+
*/
|
|
47
|
+
isTracking(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Get number of active subscribers
|
|
50
|
+
*/
|
|
51
|
+
getSubscriberCount(): number;
|
|
52
|
+
/**
|
|
53
|
+
* Start the mouse tracking interval
|
|
54
|
+
*/
|
|
55
|
+
private start;
|
|
56
|
+
/**
|
|
57
|
+
* Stop the mouse tracking interval
|
|
58
|
+
*/
|
|
59
|
+
private stop;
|
|
60
|
+
/**
|
|
61
|
+
* Cleanup and stop tracking
|
|
62
|
+
*/
|
|
63
|
+
dispose(): void;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=MouseTracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MouseTracker.d.ts","sourceRoot":"","sources":["../../src/view-manager/MouseTracker.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE;IAC3C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;CACnB,KAAK,IAAI,CAAC;AAEX;;;;;;GAMG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAA+C;IAClE,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,YAAY,CAA4C;IAChE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IAExC;;OAEG;gBACS,cAAc,GAAE,MAAU;IAItC;;;;OAIG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,GAAG,IAAI;IAU1D;;;OAGG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAS7B;;OAEG;IACH,kBAAkB,IAAI;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;IAI9C;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;OAEG;IACH,kBAAkB,IAAI,MAAM;IAI5B;;OAEG;IACH,OAAO,CAAC,KAAK;IAkCb;;OAEG;IACH,OAAO,CAAC,IAAI;IAOZ;;OAEG;IACH,OAAO,IAAI,IAAI;CAIhB"}
|