@pi-chamber/web 1.0.3 → 1.0.4-rc.2
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/dist/assets/DiagramView-GKGxPczP.js +1 -0
- package/dist/assets/{DiffView-D19Jps0i.js → DiffView-Cay8VAqL.js} +6 -6
- package/dist/assets/FileSaveConflictDialog-BRM9TJo0.js +3 -0
- package/dist/assets/FilesView-CEeQzjc6.js +6 -0
- package/dist/assets/GitHubDetailScaffold-q4YP8iyJ.js +11 -0
- package/dist/assets/GitHubLinkPicker-B9xgIW8y.js +1 -0
- package/dist/assets/GitHubListPrimitives-XkALat1v.js +1 -0
- package/dist/assets/GitView-DV3d0oSJ.js +9 -0
- package/dist/assets/IssuesSurface-OTyt9f3A.js +7 -0
- package/dist/assets/JsonTreeView-X2Auiy_q.js +1 -0
- package/dist/assets/MarkdownRendererImpl-1HameF6j.js +12 -0
- package/dist/assets/PatchDiff-GMQAv4en.js +1 -0
- package/dist/assets/PierreDiffViewer-0X__nypk.js +134 -0
- package/dist/assets/PullRequestsSurface-Dec20SIg.js +2 -0
- package/dist/assets/SessionSwitcherContent-DEw4nz7K.js +1 -0
- package/dist/assets/SessionSwitcherDropdown-DmLhbRzE.js +2 -0
- package/dist/assets/SessionUnreadDot-CJFawQpo.js +1 -0
- package/dist/assets/SettingsView-CwSspvq-.js +6 -0
- package/dist/assets/SettingsWindow-DkPv9MaU.js +1 -0
- package/dist/assets/ToolOutputDialog-DDwbOpTO.js +8 -0
- package/dist/assets/ToolPartDiffPreview-DZRP7p-Q.js +1 -0
- package/dist/assets/{VirtualizedFileDiff-CJondRlh.js → VirtualizedFileDiff-CUWx7JVZ.js} +3 -3
- package/dist/assets/Virtualizer-wpC51ZBQ.js +1 -0
- package/dist/assets/collapsible-Ce85nuXX.js +1 -0
- package/dist/assets/computeVirtualFileMetrics-3PpRLd5B.js +3 -0
- package/dist/assets/{contextFileOpenGuard-CsZL8yie.js → contextFileOpenGuard-PoBklHMz.js} +1 -1
- package/dist/assets/gitStatusPredicates-BvzxqidP.js +1 -0
- package/dist/assets/githubLink-iQ51wqRa.js +10 -0
- package/dist/assets/index-CkMnC_GK.js +1 -0
- package/dist/assets/index-Dd2OcIUY.js +10 -0
- package/dist/assets/index-DvN8zlLT.css +1 -0
- package/dist/assets/main-FasHq7Ck.js +2 -0
- package/dist/assets/main-PSCt716b.js +136 -0
- package/dist/assets/markdownCore-BH56o6Wu.js +2 -0
- package/dist/assets/miniChat-BzfobBDq.js +2 -0
- package/dist/assets/mobile-DAzZE2EL.js +2 -0
- package/dist/assets/permissionStore-B9Hkrqny.js +1 -0
- package/dist/assets/pi-session-focus-preference-D2-1HWmY.js +10 -0
- package/dist/assets/renderDiffWithHighlighter-l8hZWWBO.js +1 -0
- package/dist/assets/renderElectronMiniChatApp-DGYSIihR.js +2 -0
- package/dist/assets/renderFileWithHighlighter-BvDoP7ob.js +1 -0
- package/dist/assets/renderMobileApp-CwgWG0lU.js +11 -0
- package/dist/assets/runtimeEndpointReset-CmI6dBKM.js +62 -0
- package/dist/assets/{runtimeSurface-BdndJV2m.js → runtimeSurface-B1GRkkKC.js} +1 -1
- package/dist/assets/shell-CjFT_Tl9.js +1 -0
- package/dist/assets/sprite-HGQGInUp.js +6510 -0
- package/dist/assets/useAppFontEffects--lKKtKVo.js +212 -0
- package/dist/assets/{useFilesViewSearch-DJ3psTKU.js → useFilesViewSearch-D1jsGQrN.js} +3 -3
- package/dist/assets/useGitHubRemoteSearch-zNgy2bSt.js +1 -0
- package/dist/assets/useSwitcherItems-OCRYcHeu.js +1 -0
- package/dist/assets/vendor-base-ui-DIkTOIJS.js +1 -0
- package/dist/assets/{vendor-beautiful-mermaid-D3YCkKz7.js → vendor-beautiful-mermaid-DApbjBp2.js} +1 -1
- package/dist/assets/vendor-boot-DyL2td56.js +69 -0
- package/dist/assets/vendor-codemirror-autocomplete-DsFn4GLp.js +1 -0
- package/dist/assets/vendor-codemirror-lang-angular-B_NMmBbS.js +1 -0
- package/dist/assets/vendor-codemirror-lang-cpp-GOE7Gjd0.js +1 -0
- package/dist/assets/vendor-codemirror-lang-css-Dwf2XpnZ.js +1 -0
- package/dist/assets/vendor-codemirror-lang-go-C2KHbcll.js +7 -0
- package/dist/assets/vendor-codemirror-lang-html-DcKqyeGk.js +1 -0
- package/dist/assets/vendor-codemirror-lang-java-6eGbyB2k.js +1 -0
- package/dist/assets/vendor-codemirror-lang-javascript-DpTUrvx8.js +13 -0
- package/dist/assets/vendor-codemirror-lang-jinja-xSUJjXhr.js +1 -0
- package/dist/assets/vendor-codemirror-lang-json-CLGxdOCz.js +1 -0
- package/dist/assets/vendor-codemirror-lang-less-6nXi1rS9.js +1 -0
- package/dist/assets/vendor-codemirror-lang-liquid-B9hmb9P8.js +1 -0
- package/dist/assets/vendor-codemirror-lang-markdown-DmFP9s6x.js +1 -0
- package/dist/assets/vendor-codemirror-lang-php-DC6To8iX.js +1 -0
- package/dist/assets/vendor-codemirror-lang-python-yuxIkjit.js +3 -0
- package/dist/assets/vendor-codemirror-lang-rust-di1Sjz-0.js +1 -0
- package/dist/assets/vendor-codemirror-lang-sass-BWpV9NPV.js +1 -0
- package/dist/assets/{vendor-codemirror-lang-sql-HpQWHJjv.js → vendor-codemirror-lang-sql-C_RazIaB.js} +2 -2
- package/dist/assets/vendor-codemirror-lang-vue-BYL0r7KR.js +1 -0
- package/dist/assets/vendor-codemirror-lang-wast-BiVarhcz.js +1 -0
- package/dist/assets/vendor-codemirror-lang-xml-Cn1lY1ts.js +1 -0
- package/dist/assets/vendor-codemirror-lang-yaml-BZ6mZw9L.js +1 -0
- package/dist/assets/vendor-codemirror-language-data-DglcKYWT.js +2 -0
- package/dist/assets/vendor-codemirror-search-DaE6R5gH.js +2 -0
- package/dist/assets/{vendor-elkjs-mzfkf0ML.js → vendor-elkjs-D27273Ms.js} +1 -1
- package/dist/assets/{vendor-heic2any-BHsbokcA.js → vendor-heic2any-pq-UTQQR.js} +1 -1
- package/dist/assets/vendor-lezer-cpp-Dt99h3WT.js +1 -0
- package/dist/assets/vendor-lezer-css-DNU_fzPI.js +1 -0
- package/dist/assets/vendor-lezer-go-BEFtcNyS.js +1 -0
- package/dist/assets/vendor-lezer-html-DDGRhRUz.js +1 -0
- package/dist/assets/vendor-lezer-java-DmfZtW09.js +1 -0
- package/dist/assets/vendor-lezer-javascript-oje4tdp_.js +1 -0
- package/dist/assets/vendor-lezer-json-BRXb_bDX.js +1 -0
- package/dist/assets/vendor-lezer-lr-BU2qmu_5.js +1 -0
- package/dist/assets/{vendor-lezer-markdown-C6g-d6P3.js → vendor-lezer-markdown-CicYv7V9.js} +4 -4
- package/dist/assets/vendor-lezer-php-COORrTpE.js +1 -0
- package/dist/assets/vendor-lezer-python-Cuvm9X9Y.js +1 -0
- package/dist/assets/vendor-lezer-rust-C_zOfHbX.js +1 -0
- package/dist/assets/vendor-lezer-sass-DWP4w7O1.js +1 -0
- package/dist/assets/vendor-lezer-xml-Br6nOYeG.js +1 -0
- package/dist/assets/vendor-lezer-yaml-CYQmm6Sb.js +1 -0
- package/dist/assets/{vendor-lru_map-Cy8fTs3_.js → vendor-lru_map-DOPmc7GU.js} +1 -1
- package/dist/assets/{vendor-qrcode-B0KNSajT.js → vendor-qrcode-Dv4uniC1.js} +1 -1
- package/dist/assets/vendor-react-DASdDPIk.js +1 -0
- package/dist/assets/{vendor-react-drawio-BYDptOsj.js → vendor-react-drawio-Duu5LgQA.js} +1 -1
- package/dist/assets/{vendor-replit-codemirror-vim-DaSwPsXt.js → vendor-replit-codemirror-vim-CZy3BUVv.js} +15 -15
- package/dist/assets/vendor-zustand-CUi8eEds.js +6 -0
- package/dist/assets/{web-components-CCKlju0Z.js → web-components-v9fuidaX.js} +4 -4
- package/dist/index.html +7 -9
- package/dist/mini-chat.html +6 -8
- package/dist/mobile.html +6 -8
- package/package.json +2 -2
- package/server/index.js +3 -1
- package/server/lib/fs/DOCUMENTATION.md +1 -1
- package/server/lib/fs/routes.js +1 -50
- package/server/lib/git/DOCUMENTATION.md +18 -11
- package/server/lib/git/index.js +8 -3
- package/server/lib/git/routes.js +0 -129
- package/server/lib/git/service.js +40 -152
- package/server/lib/git/service.test.js +42 -18
- package/server/lib/github/DOCUMENTATION.md +271 -0
- package/server/lib/github/cache.js +164 -0
- package/server/lib/github/checks.js +230 -0
- package/server/lib/github/client.js +305 -0
- package/server/lib/github/context.js +177 -0
- package/server/lib/github/contracts.test.js +235 -0
- package/server/lib/github/correctness.test.js +356 -0
- package/server/lib/github/credential.js +46 -0
- package/server/lib/github/errors.js +151 -0
- package/server/lib/github/gh-cli.js +336 -0
- package/server/lib/github/index.js +27 -0
- package/server/lib/github/issues.js +495 -0
- package/server/lib/github/pulls.js +699 -0
- package/server/lib/github/repo-scope.js +688 -0
- package/server/lib/github/routes.js +599 -0
- package/server/lib/github/security.test.js +275 -0
- package/server/lib/github/templates.js +153 -0
- package/server/lib/package-manager-detect-child.js +12 -0
- package/server/lib/package-manager.js +366 -92
- package/server/lib/package-manager.test.js +109 -0
- package/server/lib/pi/routes-extension-events.test.js +268 -4
- package/server/lib/pi/routes.js +109 -25
- package/server/lib/pi/routes.test.js +118 -0
- package/server/lib/pi/session-daemon/DOCUMENTATION.md +24 -9
- package/server/lib/pi/session-daemon/builtin-extensions.js +37 -0
- package/server/lib/pi/session-daemon/daemon-process.js +6 -0
- package/server/lib/pi/session-daemon/extension-bridge-draft.test.js +222 -0
- package/server/lib/pi/session-daemon/extension-bridge.js +415 -42
- package/server/lib/pi/session-daemon/extension-name.js +87 -0
- package/server/lib/pi/session-daemon/extension-name.test.js +143 -0
- package/server/lib/pi/session-daemon/extension-theme.js +217 -0
- package/server/lib/pi/session-daemon/extension-theme.test.js +164 -0
- package/server/lib/pi/session-daemon/extension-tool-render.js +365 -0
- package/server/lib/pi/session-daemon/extension-tool-render.test.js +607 -0
- package/server/lib/pi/session-daemon/prompt-operations.test.js +3 -3
- package/server/lib/pi/session-daemon/prompt-preflight.test.js +12 -14
- package/server/lib/pi/session-daemon/sdk-upgrade.test.js +118 -2
- package/server/lib/pi/session-daemon/send-operation-dedup.test.js +1 -1
- package/server/lib/pi/session-daemon/session-daemon-extensions.test.js +323 -3
- package/server/lib/pi/session-daemon/session-daemon-list-live.test.js +244 -0
- package/server/lib/pi/session-daemon/session-daemon-mcp.e2e.test.js +638 -0
- package/server/lib/pi/session-daemon/session-daemon-turn.e2e.test.js +437 -0
- package/server/lib/pi/session-daemon/session-daemon.js +265 -75
- package/server/lib/pi/session-daemon/session-daemon.test.js +271 -5
- package/server/lib/pi/session-daemon/session-idle-residency.test.js +1 -1
- package/server/lib/pi/session-daemon/session-replay.test.js +1 -1
- package/server/lib/pi/session-persistence-gap.test.js +2 -3
- package/server/lib/pi/ui-settings-store.js +2 -1
- package/server/lib/pi/ui-settings-store.test.js +27 -0
- package/server/lib/static-cache-control.js +18 -0
- package/server/lib/static-cache-control.test.js +25 -0
- package/server/lib/workspace/host.js +2 -0
- package/dist/assets/DiagramView-Bj1ZrdhI.js +0 -1
- package/dist/assets/FileSaveConflictDialog-2Z4V_gZU.js +0 -3
- package/dist/assets/FilesView-K18gBSws.js +0 -6
- package/dist/assets/GitView-Hm1KBPaD.js +0 -8
- package/dist/assets/JsonTreeView-fNsiZEIo.js +0 -1
- package/dist/assets/MarkdownRendererImpl-DV5Xkj8N.js +0 -12
- package/dist/assets/PatchDiff-DZaJG6jj.js +0 -1
- package/dist/assets/SessionSwitcherContent-RAsmsuYk.js +0 -1
- package/dist/assets/SessionSwitcherDropdown-DuLPlIF_.js +0 -2
- package/dist/assets/SessionUnreadDot-Dm6k5OCd.js +0 -1
- package/dist/assets/SettingsView-Chu4zbWo.js +0 -6
- package/dist/assets/SettingsWindow-CJzFmmfu.js +0 -1
- package/dist/assets/ToolOutputDialog-uYeXsAGc.js +0 -8
- package/dist/assets/ToolPartDiffPreview-DnAHVRs-.js +0 -1
- package/dist/assets/Virtualizer-BSHVMKgK.js +0 -1
- package/dist/assets/collapsible-BH1vXEAI.js +0 -1
- package/dist/assets/computeVirtualFileMetrics-DXkR5jdw.js +0 -3
- package/dist/assets/gitStatusPredicates-BW8heN1a.js +0 -134
- package/dist/assets/index-5fyXnZFi.css +0 -1
- package/dist/assets/index-BrgKwTb0.js +0 -1
- package/dist/assets/index-C-sV_9sb.js +0 -8
- package/dist/assets/isDiffPlainText-DZFr1Tta.js +0 -1
- package/dist/assets/isFilePlainText-KNpEMvb-.js +0 -1
- package/dist/assets/main-BPY2ug1A.js +0 -135
- package/dist/assets/main-BRIjzIRl.js +0 -2
- package/dist/assets/markdownCore-DYizLr1N.js +0 -3
- package/dist/assets/miniChat-Dva4MINl.js +0 -2
- package/dist/assets/mobile-6jNUNv_x.js +0 -2
- package/dist/assets/permissionStore-iKN1K2_x.js +0 -1
- package/dist/assets/renderElectronMiniChatApp-BIeBrZmO.js +0 -2
- package/dist/assets/renderMobileApp-BDCtZpeS.js +0 -11
- package/dist/assets/runtimeEndpointReset-DqdGOWp8.js +0 -53
- package/dist/assets/useAppFontEffects-BABx-DxZ.js +0 -6722
- package/dist/assets/usePushVisibilityBeacon-BciEu3HS.js +0 -10
- package/dist/assets/useSwitcherItems-C7_5TB_n.js +0 -1
- package/dist/assets/vendor-aria-hidden-DvXkyWUv.js +0 -1
- package/dist/assets/vendor-base-ui-DXSHfszQ.js +0 -1
- package/dist/assets/vendor-class-variance-authority-5VPnzWs2.js +0 -1
- package/dist/assets/vendor-cmdk-zXx6sGnS.js +0 -1
- package/dist/assets/vendor-codemirror-autocomplete-wd6iRebq.js +0 -1
- package/dist/assets/vendor-codemirror-commands-CNlncqrr.js +0 -1
- package/dist/assets/vendor-codemirror-lang-angular-DU_4KiiW.js +0 -1
- package/dist/assets/vendor-codemirror-lang-cpp-CmIT9Z5_.js +0 -1
- package/dist/assets/vendor-codemirror-lang-css-djiuoTi8.js +0 -1
- package/dist/assets/vendor-codemirror-lang-go-COZSwZYW.js +0 -7
- package/dist/assets/vendor-codemirror-lang-html-CKHqhW5R.js +0 -1
- package/dist/assets/vendor-codemirror-lang-java-CNMP5hyC.js +0 -1
- package/dist/assets/vendor-codemirror-lang-javascript-DuOEwJ3f.js +0 -13
- package/dist/assets/vendor-codemirror-lang-jinja-DaKn_b1k.js +0 -1
- package/dist/assets/vendor-codemirror-lang-json-CZ07HmNC.js +0 -1
- package/dist/assets/vendor-codemirror-lang-less-wJdQiDBf.js +0 -1
- package/dist/assets/vendor-codemirror-lang-liquid-0z48Roi8.js +0 -1
- package/dist/assets/vendor-codemirror-lang-markdown-DtcZDGqe.js +0 -1
- package/dist/assets/vendor-codemirror-lang-php-W8plS-JQ.js +0 -1
- package/dist/assets/vendor-codemirror-lang-python-DzzokVau.js +0 -3
- package/dist/assets/vendor-codemirror-lang-rust-C4ulBVpf.js +0 -1
- package/dist/assets/vendor-codemirror-lang-sass-BkZJYEwS.js +0 -1
- package/dist/assets/vendor-codemirror-lang-vue-DiBPljCc.js +0 -1
- package/dist/assets/vendor-codemirror-lang-wast-DoABsogh.js +0 -1
- package/dist/assets/vendor-codemirror-lang-xml-BhLJhOCH.js +0 -1
- package/dist/assets/vendor-codemirror-lang-yaml-D95i1Y5R.js +0 -1
- package/dist/assets/vendor-codemirror-language-BByA_dGF.js +0 -3
- package/dist/assets/vendor-codemirror-language-data-BB5mQv-R.js +0 -2
- package/dist/assets/vendor-codemirror-search-BV44140v.js +0 -2
- package/dist/assets/vendor-codemirror-state-CNWM3Q8V.js +0 -5
- package/dist/assets/vendor-codemirror-view-Ct4T37Ue.js +0 -4
- package/dist/assets/vendor-crelt-C8TCjufn.js +0 -1
- package/dist/assets/vendor-detect-node-es-l0sNRNKZ.js +0 -1
- package/dist/assets/vendor-dnd-kit-accessibility-DZKKhs9S.js +0 -1
- package/dist/assets/vendor-dnd-kit-core-C9qcAm_1.js +0 -5
- package/dist/assets/vendor-dnd-kit-sortable-D8ozj8M-.js +0 -1
- package/dist/assets/vendor-dnd-kit-utilities-DTY1C6ST.js +0 -1
- package/dist/assets/vendor-floating-ui-core-CXmKXOXc.js +0 -1
- package/dist/assets/vendor-floating-ui-dom-WyXykhNi.js +0 -1
- package/dist/assets/vendor-floating-ui-react-dom-BZOGXAGe.js +0 -1
- package/dist/assets/vendor-floating-ui-utils-BzXdqYpP.js +0 -1
- package/dist/assets/vendor-framer-motion-CfplGuM0.js +0 -1
- package/dist/assets/vendor-get-nonce-C-Z93AgS.js +0 -1
- package/dist/assets/vendor-lezer-common-B3-cUCR_.js +0 -1
- package/dist/assets/vendor-lezer-cpp-BleAU9o-.js +0 -1
- package/dist/assets/vendor-lezer-css-C5xB6jxd.js +0 -1
- package/dist/assets/vendor-lezer-go-CXK1UKk8.js +0 -1
- package/dist/assets/vendor-lezer-highlight-CDMHUZ74.js +0 -1
- package/dist/assets/vendor-lezer-html-C0I1p52t.js +0 -1
- package/dist/assets/vendor-lezer-java-D_zzj-NV.js +0 -1
- package/dist/assets/vendor-lezer-javascript-D7Tj24ot.js +0 -1
- package/dist/assets/vendor-lezer-json-Iaex0UN-.js +0 -1
- package/dist/assets/vendor-lezer-lr-bhwg1HMg.js +0 -1
- package/dist/assets/vendor-lezer-php-_DHrbsZG.js +0 -1
- package/dist/assets/vendor-lezer-python-CvuFxeZl.js +0 -1
- package/dist/assets/vendor-lezer-rust-Lqgd5SAo.js +0 -1
- package/dist/assets/vendor-lezer-sass-Dnm2lY4t.js +0 -1
- package/dist/assets/vendor-lezer-xml-hUDuAyS5.js +0 -1
- package/dist/assets/vendor-lezer-yaml-BNIl6S_O.js +0 -1
- package/dist/assets/vendor-marijn-find-cluster-break-DXwl3gUT.js +0 -1
- package/dist/assets/vendor-motion-dom-DhJ-sYS5.js +0 -1
- package/dist/assets/vendor-motion-l0sNRNKZ.js +0 -1
- package/dist/assets/vendor-motion-utils-CKEGc_YG.js +0 -1
- package/dist/assets/vendor-radix-ui-primitive-Dc_FVRD7.js +0 -1
- package/dist/assets/vendor-radix-ui-react-compose-refs-8xy6TJML.js +0 -1
- package/dist/assets/vendor-radix-ui-react-context-CFsX-AUC.js +0 -1
- package/dist/assets/vendor-radix-ui-react-dialog-D2yhEu2p.js +0 -5
- package/dist/assets/vendor-radix-ui-react-dismissable-layer-DrorBNg9.js +0 -1
- package/dist/assets/vendor-radix-ui-react-focus-guards-BfdFmL7c.js +0 -1
- package/dist/assets/vendor-radix-ui-react-focus-scope-D2BkImwt.js +0 -1
- package/dist/assets/vendor-radix-ui-react-id-D2kS9K1j.js +0 -1
- package/dist/assets/vendor-radix-ui-react-portal-YgCRIyi7.js +0 -1
- package/dist/assets/vendor-radix-ui-react-presence-D432pCMB.js +0 -1
- package/dist/assets/vendor-radix-ui-react-primitive-DkH8dMOR.js +0 -1
- package/dist/assets/vendor-radix-ui-react-slot-BIDFZX0-.js +0 -1
- package/dist/assets/vendor-radix-ui-react-use-callback-ref-BwDcSoGV.js +0 -1
- package/dist/assets/vendor-radix-ui-react-use-controllable-state-LiqmKSXO.js +0 -1
- package/dist/assets/vendor-radix-ui-react-use-effect-event-D94va83M.js +0 -1
- package/dist/assets/vendor-radix-ui-react-use-escape-keydown-DTkqjenV.js +0 -1
- package/dist/assets/vendor-radix-ui-react-use-layout-effect-C8Yrsaph.js +0 -1
- package/dist/assets/vendor-react-B5Z1Mdn3.js +0 -9
- package/dist/assets/vendor-react-remove-scroll-bar-CSAHp1YF.js +0 -38
- package/dist/assets/vendor-react-remove-scroll-vR1dy1aP.js +0 -4
- package/dist/assets/vendor-react-style-singleton-Ctw6HnYx.js +0 -1
- package/dist/assets/vendor-reselect-l0sNRNKZ.js +0 -1
- package/dist/assets/vendor-scheduler-7OC5HNn7.js +0 -1
- package/dist/assets/vendor-simplewebauthn-browser-VDA66rT_.js +0 -2
- package/dist/assets/vendor-sonner-BDtm25td.js +0 -1
- package/dist/assets/vendor-style-mod-NZ5MEPvj.js +0 -3
- package/dist/assets/vendor-tanstack-react-virtual-2skouoFw.js +0 -1
- package/dist/assets/vendor-tanstack-virtual-core-Dubg10g5.js +0 -1
- package/dist/assets/vendor-tslib-De9GV7Vy.js +0 -1
- package/dist/assets/vendor-use-callback-ref-CVVuCyLj.js +0 -1
- package/dist/assets/vendor-use-sidecar-Vv4V8Nd1.js +0 -1
- package/dist/assets/vendor-use-sync-external-store-D0AXkdQC.js +0 -1
- package/dist/assets/vendor-w3c-keyname-Vcq4gwWv.js +0 -1
- package/dist/assets/vendor-zustand-GVb4H8HE.js +0 -6
- package/server/lib/git/credentials.js +0 -41
- package/server/lib/git/identity-storage.js +0 -122
- /package/dist/assets/{vendor-katex-CNckGUMB.js → vendor-katex-DZG0Ov6p.js} +0 -0
- /package/dist/assets/{vendor-katex-Cp579UoJ.css → vendor-katex-css-Cp579UoJ.css} +0 -0
- /package/dist/assets/{vendor-xterm-xterm-CrXqRur4.js → vendor-xterm-xterm-B-qIQCd3.js} +0 -0
- /package/dist/assets/{vendor-xterm-xterm-DDGTF8rc.css → vendor-xterm-xterm-css-DDGTF8rc.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{R as c}from"./vendor-react-
|
|
1
|
+
import{R as c}from"./vendor-react-DASdDPIk.js";import{t as l,aL as W}from"./useAppFontEffects--lKKtKVo.js";import{Q as D}from"./index-Dd2OcIUY.js";const v=e=>{const t=u(e);if(!t)return"";if(t==="/"||/^[A-Za-z]:\/$/.test(t))return t;const s=t.lastIndexOf("/");if(s<0)return t;if(s===0)return"/";const n=t.slice(0,s);return/^[A-Za-z]:$/.test(n)?`${n}/`:n},M=e=>e.slice().sort((t,s)=>t.type!==s.type?t.type==="directory"?-1:1:t.name.localeCompare(s.name)),u=e=>{if(!e)return"";const t=e.replace(/\\/g,"/"),s=t.startsWith("//");let n=t.replace(/\/+/g,"/");s&&!n.startsWith("//")&&(n=`/${n}`);const i=n==="/",a=/^[A-Za-z]:\/$/.test(n);return!i&&!a&&(n=n.replace(/\/+$/,"")),n},N=e=>e.startsWith("/")||e.startsWith("//")||/^[A-Za-z]:\//.test(e),y=e=>/^[A-Za-z]:\//.test(e)?e.toLowerCase():e,S=(e,t)=>{const s=u(t),n=u(e);if(!s||!n)return!1;const i=y(s),a=y(n);return a===i||a.startsWith(`${i}/`)},V=(e,t)=>{const s=u(t),n=u(e);if(!S(n,s))return[];const a=n.slice(s.length).replace(/^\//,"").split("/"),w=[];let r=s;for(let d=0;d<a.length-1;d++)r=r?`${r}/${a[d]}`:a[d],w.push(r);return w},Z=(e,t)=>{if(!t)return"";const s=u(t);if(!e||!S(s,e))return s;const n=s.slice(e.length);return n.startsWith("/")?n.slice(1):n},x=new Set(["node_modules"]),q=e=>x.has(e),L=e=>{const t=u(e);return t==="node_modules"||t.endsWith("/node_modules")||t.includes("/node_modules/")},B=e=>{const s=(e instanceof Error?e.message:String(e??"")).toLowerCase();return s.includes("is a directory")||s.includes("eisdir")},H=e=>{const s=(e instanceof Error?e.message:String(e??"")).toLowerCase();return s.includes("file not found")||s.includes("enoent")||s.includes("no such file")||s.includes("does not exist")},O=2e5,Q=e=>{let t=0,s=0;for(let n=0;n<e.length;n+=1)e.charCodeAt(n)===10&&(n>0&&e.charCodeAt(n-1)===13?t+=1:s+=1);return t>s?`\r
|
|
2
2
|
`:`
|
|
3
3
|
`},_=e=>e.replace(/\r\n/g,`
|
|
4
4
|
`).replace(/\r/g,`
|
|
5
|
-
`),
|
|
5
|
+
`),U=(e,t)=>{const s=_(e);return t===`\r
|
|
6
6
|
`?s.replace(/\n/g,`\r
|
|
7
|
-
`):s},J=e=>{if(!e)return!1;const t=e.toLowerCase().split(".").pop();return t==="md"||t==="markdown"},T=e=>{if(!e)return!1;const t=e.toLowerCase().split(".").pop();return t==="json"||t==="jsonc"||t==="json5"||t==="geojson"},X=e=>{if(!e)return!1;const t=e.toLowerCase().split(".").pop();return t==="html"||t==="htm"};function G({files:e,root:t,selectedPath:s,refreshDirectory:n,removeOpenPathsByPrefix:i,clearSelectedPath:a}){const w=c.useRef(null),[r,d]=c.useState(null),[f,R]=c.useState(null),[p,z]=c.useState(""),[h,C]=c.useState(!1),E=c.useCallback(($,m)=>{d($),R(m),z($==="rename"&&m.name||""),C(!1)},[]),b=c.useCallback(()=>d(null),[]),A=c.useCallback(async $=>{if($?.preventDefault(),!r||!f)return;const m=p.trim();if(r==="createFile"&&!m){l.error("Filename is required");return}if(r==="createFolder"&&!m){l.error("Folder name is required");return}if(r==="rename"&&!m){l.error("Name is required");return}if(r==="createFile"&&!e.writeFile){l.error("Write not supported");return}if(r==="rename"&&!e.rename){l.error("Rename not supported");return}if(r==="delete"&&!e.delete){l.error("Delete not supported");return}C(!0);try{if(r==="createFile"){const o=f.path,g=u(`${o?`${o}/`:""}${m}`);try{(await e.writeFile(g,"",{expectedRevision:null})).success&&(l.success("File created"),await n(o))}catch(F){if(F?.reason==="file-revision-conflict"||F?.name==="FileRevisionConflictError")l.error("File already exists");else throw F}}else if(r==="createFolder"){const o=f.path,g=u(`${o?`${o}/`:""}${m}`);(await e.createDirectory(g)).success&&(l.success("Folder created"),await n(o))}else{const o=f.path,g=o.split("/").slice(0,-1).join("/"),F=s===o||s.startsWith(`${o}/`);(r==="rename"?await e.rename(o,u(`${g?`${g}/`:""}${m}`)):await e.delete(o)).success&&(l.success(r==="rename"?"Renamed successfully":"Deleted successfully"),await n(g),t&&i(t,o),F&&a())}d(null)}catch{l.error("Operation failed")}finally{C(!1)}},[a,e,p,r,n,i,t,s,f]);return{operation:r,target:f,inputValue:p,setInputValue:z,submitting:h,inputRef:w,open:E,close:b,submit:A,capabilities:{canCreateFile:!!e.writeFile,canCreateFolder:!!e.createDirectory,canRename:!!e.rename,canDelete:!!e.delete}}}function K({directory:e,query:t,chrome:s,showGitignored:n}){const i=D(R=>R.searchFiles),a=W(t,200),[w,r]=c.useState([]),[d,f]=c.useState(!1);return c.useEffect(()=>{const R=a.trim();if(!e||!R){r([]),f(!1);return}let p=!1;return f(!0),i(e,R,s==="mobile"?40:150,{includeHidden:!0,respectGitignore:s==="desktop"&&!n,type:"file"}).then(z=>{p||r(z.filter(h=>n||!L(h.path)).map(h=>({name:h.name,path:u(h.path),type:"file",extension:h.extension,relativePath:h.relativePath})))}).catch(()=>{p||r([])}).finally(()=>{p||f(!1)}),()=>{p=!0}},[s,a,e,i,n]),{results:w,searching:d}}export{O as M,M as a,G as b,T as c,J as d,X as e,
|
|
7
|
+
`):s},J=e=>{if(!e)return!1;const t=e.toLowerCase().split(".").pop();return t==="md"||t==="markdown"},T=e=>{if(!e)return!1;const t=e.toLowerCase().split(".").pop();return t==="json"||t==="jsonc"||t==="json5"||t==="geojson"},X=e=>{if(!e)return!1;const t=e.toLowerCase().split(".").pop();return t==="html"||t==="htm"};function G({files:e,root:t,selectedPath:s,refreshDirectory:n,removeOpenPathsByPrefix:i,clearSelectedPath:a}){const w=c.useRef(null),[r,d]=c.useState(null),[f,R]=c.useState(null),[p,z]=c.useState(""),[h,C]=c.useState(!1),E=c.useCallback(($,m)=>{d($),R(m),z($==="rename"&&m.name||""),C(!1)},[]),b=c.useCallback(()=>d(null),[]),A=c.useCallback(async $=>{if($?.preventDefault(),!r||!f)return;const m=p.trim();if(r==="createFile"&&!m){l.error("Filename is required");return}if(r==="createFolder"&&!m){l.error("Folder name is required");return}if(r==="rename"&&!m){l.error("Name is required");return}if(r==="createFile"&&!e.writeFile){l.error("Write not supported");return}if(r==="rename"&&!e.rename){l.error("Rename not supported");return}if(r==="delete"&&!e.delete){l.error("Delete not supported");return}C(!0);try{if(r==="createFile"){const o=f.path,g=u(`${o?`${o}/`:""}${m}`);try{(await e.writeFile(g,"",{expectedRevision:null})).success&&(l.success("File created"),await n(o))}catch(F){if(F?.reason==="file-revision-conflict"||F?.name==="FileRevisionConflictError")l.error("File already exists");else throw F}}else if(r==="createFolder"){const o=f.path,g=u(`${o?`${o}/`:""}${m}`);(await e.createDirectory(g)).success&&(l.success("Folder created"),await n(o))}else{const o=f.path,g=o.split("/").slice(0,-1).join("/"),F=s===o||s.startsWith(`${o}/`);(r==="rename"?await e.rename(o,u(`${g?`${g}/`:""}${m}`)):await e.delete(o)).success&&(l.success(r==="rename"?"Renamed successfully":"Deleted successfully"),await n(g),t&&i(t,o),F&&a())}d(null)}catch{l.error("Operation failed")}finally{C(!1)}},[a,e,p,r,n,i,t,s,f]);return{operation:r,target:f,inputValue:p,setInputValue:z,submitting:h,inputRef:w,open:E,close:b,submit:A,capabilities:{canCreateFile:!!e.writeFile,canCreateFolder:!!e.createDirectory,canRename:!!e.rename,canDelete:!!e.delete}}}function K({directory:e,query:t,chrome:s,showGitignored:n}){const i=D(R=>R.searchFiles),a=W(t,200),[w,r]=c.useState([]),[d,f]=c.useState(!1);return c.useEffect(()=>{const R=a.trim();if(!e||!R){r([]),f(!1);return}let p=!1;return f(!0),i(e,R,s==="mobile"?40:150,{includeHidden:!0,respectGitignore:s==="desktop"&&!n,type:"file"}).then(z=>{p||r(z.filter(h=>n||!L(h.path)).map(h=>({name:h.name,path:u(h.path),type:"file",extension:h.extension,relativePath:h.relativePath})))}).catch(()=>{p||r([])}).finally(()=>{p||f(!1)}),()=>{p=!0}},[s,a,e,i,n]),{results:w,searching:d}}export{O as M,M as a,G as b,T as c,J as d,X as e,Q as f,Z as g,u as h,N as i,U as j,S as k,v as l,H as m,_ as n,B as o,V as p,q as s,y as t,K as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,bR as Ne,bS as Ce,bT as ke,bU as Se,bV as Re,aH as He}from"./vendor-boot-DyL2td56.js";import{R as d}from"./vendor-react-DASdDPIk.js";import{o as L,v as Ge,A as Le}from"./index-Dd2OcIUY.js";import{B as N,I as H,ae as Pe,t as Y,cw as Me,cx as Ee,cy as De,cz as Te,cA as Fe,p as ze,q as A,bo as $e,a as Ie,bz as Be,by as te,cI as Ae,a8 as le,ab as ce,ad as ue,ag as _e,cJ as Q,ai as Ke,cu as de,cv as me,cK as Oe,cL as qe,cM as We}from"./useAppFontEffects--lKKtKVo.js";import{am as ne,_ as Ue,an as Ve,ao as Ye}from"./runtimeEndpointReset-CmI6dBKM.js";import{a as Qe,G as he,c as Xe,d as Je,e as Ze,f as es,b as ss,g as ts,h as ns,i as rs}from"./GitHubListPrimitives-XkALat1v.js";import{c as as}from"./vendor-zustand-CUi8eEds.js";import{K as fe,C as is,D as os}from"./GitHubDetailScaffold-q4YP8iyJ.js";const pe=s=>s?s.kind==="rate-limited"?{reason:"rate-limited",retryAt:s.retryAt??null}:s.kind==="failed"?{reason:"failed",message:s.message}:{reason:s.reason,scopes:s.scopes??[]}:{reason:"failed",message:"GitHub request failed"},_=({command:s,label:t})=>{const i=d.useCallback(()=>{Pe(s).then(a=>{Y[a.ok?"success":"error"](a.ok?"Command copied":"Failed to copy command")}).catch(()=>Y.error("Failed to copy command"))},[s]);return e.jsxs("span",{className:"inline-flex max-w-full items-center gap-1.5",children:[e.jsx("code",{className:"min-w-0 truncate rounded bg-[var(--surface-muted)] px-1.5 py-0.5 font-mono typography-micro text-foreground",children:s}),e.jsx("button",{type:"button",onClick:i,className:"shrink-0 rounded p-1 text-muted-foreground hover:bg-interactive-hover hover:text-foreground",title:t??`Copy ${s}`,"aria-label":t??`Copy ${s}`,children:e.jsx(H,{name:"file-copy",className:"size-3.5"})})]})},k=({icon:s,title:t,description:i,children:a})=>e.jsx(Qe,{icon:s,title:t,description:i,action:a?e.jsx("div",{className:"mt-1 flex flex-wrap items-center justify-center gap-2",children:a}):void 0}),D=({info:s,onRetry:t,isRetrying:i})=>{const a=t?e.jsxs(N,{type:"button",variant:"outline",size:"sm",onClick:t,disabled:i,children:[e.jsx(H,{name:"refresh",className:"size-3.5"}),i?"Checking…":"Check again"]}):null;switch(s.reason){case"gh-missing":return e.jsxs(k,{icon:"github-fill",title:"GitHub CLI not found",description:"Install the GitHub CLI on the machine running PiChamber to browse pull requests and issues.",children:[e.jsx(_,{command:"gh --version",label:"Copy gh version check"}),a]});case"gh-outdated":return e.jsxs(k,{icon:"github-fill",title:"GitHub CLI too old",description:"Update gh on the machine running PiChamber, then check again.",children:[e.jsx(_,{command:"gh upgrade",label:"Copy gh upgrade command"}),a]});case"gh-unauthenticated":return e.jsxs(k,{icon:"github-fill",title:"Not signed in",description:"Run gh auth login on the machine running PiChamber, then check again.",children:[e.jsx(_,{command:"gh auth login",label:"Copy gh auth login command"}),a]});case"not-github":return e.jsx(k,{icon:"git-repository",title:"Not a GitHub repository",description:"This directory is a git repository, but none of its remotes point at GitHub."});case"no-repository":return e.jsx(k,{icon:"git-repository",title:"No repository here",description:"Open a directory inside a git repository to browse pull requests and issues."});case"no-access":return e.jsx(k,{icon:"lock",title:"No access",description:"The signed-in GitHub account cannot access this repository. Check the remote and the account in Settings.",children:a});case"scope-missing":{const r=(s.scopes??[]).filter(Boolean),n=r.length>0?`gh auth refresh -s ${r.join(" ")}`:"gh auth refresh -s repo";return e.jsxs(k,{icon:"shield-keyhole",title:"Missing token scope",description:`The GitHub token needs ${r.length>0?r.join(", "):"more scope"}. Run this on the machine running PiChamber, then check again.`,children:[e.jsx(_,{command:n,label:"Copy gh auth refresh command"}),a]})}case"rate-limited":{const r=s.retryAt?new Date(s.retryAt).toLocaleTimeString():null;return e.jsx(k,{icon:"hourglass",title:"Rate limited",description:r?`GitHub rate limit reached. Try again after ${r}.`:"GitHub rate limit reached. Try again shortly.",children:a})}default:return e.jsx(k,{icon:"error-warning",title:"Something went wrong",description:s.message||"GitHub request failed",children:a})}},ls=s=>s.map(t=>({host:t.host,owner:t.owner,repo:t.repo,relativePath:t.relativePath,kind:t.kind,submodule:t.submodule,disabledReason:t.disabledReason??null,ref:t.host&&t.owner&&t.repo?`${t.host}/${t.owner}/${t.repo}`:""})),cs=s=>s.kind==="enclosing"?"enclosing":s.kind==="nested"?"nested":s.submodule?"submodule":null,re=({entries:s,value:t,onChange:i,ariaLabel:a})=>{const r=s.find(n=>n.ref===t)??null;return e.jsxs(Me,{value:t??"",onValueChange:i,children:[e.jsx(Ee,{size:"sm",className:"min-w-0 max-w-56","aria-label":a??"Select repository",children:e.jsx(De,{placeholder:"Select repository",children:n=>{const o=s.find(l=>l.ref===n)??r;return!o||!o.ref?"Select repository":e.jsxs("span",{className:"block truncate",children:[o.relativePath," · ",o.owner,"/",o.repo]})}})}),e.jsx(Te,{children:s.map(n=>{const o=!n.ref||!!n.disabledReason,l=cs(n);return e.jsx(Fe,{value:n.ref,disabled:o,children:e.jsxs("span",{className:L("flex min-w-0 items-center gap-1.5",o&&"opacity-60"),children:[e.jsx(H,{name:"git-repository",className:"size-3.5 shrink-0"}),e.jsxs("span",{className:"min-w-0 truncate",children:[n.relativePath," · ",n.owner&&n.repo?`${n.owner}/${n.repo}`:"not on GitHub"]}),l?e.jsx("span",{className:"shrink-0 rounded bg-[var(--surface-muted)] px-1 typography-micro text-muted-foreground",children:l}):null,n.disabledReason?e.jsxs("span",{className:"shrink-0 typography-micro text-muted-foreground",children:["· ",n.disabledReason]}):null]})},`${n.ref||n.relativePath}:${n.relativePath}`)})})]})},Gs=({directory:s,isRefreshing:t,onRefresh:i,children:a})=>{const n=ze().github??null,o=A(p=>p.entriesByDirectory[Ge(s.trim())]??null),l=A(p=>p.ensureScope),c=A(p=>p.refreshScope),u=A(p=>p.setSelectedRepo),m=$e(s||null),h=ne(p=>p.status),g=ne(p=>p.refresh);d.useEffect(()=>{!s||!n||(l(s,n),g(n))},[s,n,l,g]);const C=d.useCallback(()=>{if(i){i();return}n&&(c(s,n,{force:!0}),g(n,{force:!0}))},[i,n,c,g,s]);if(!n)return e.jsx("div",{className:"flex h-full flex-col",children:e.jsx(D,{info:{reason:"failed",message:"GitHub is not available in this runtime."}})});if(o?.isLoading&&!o.scope&&!o.error)return e.jsx("div",{className:"flex h-full min-h-0 flex-col",children:e.jsx(he,{label:"Finding GitHub repositories"})});if(o?.error&&!o.scope)return e.jsx("div",{className:"flex h-full flex-col",children:e.jsx(D,{info:pe(o.error),onRetry:C,isRetrying:t||o.isLoading})});const j=o?.scope??null;if(j&&!h?.installed)return e.jsx("div",{className:"flex h-full flex-col",children:e.jsx(D,{info:{reason:"gh-missing"},onRetry:C,isRetrying:t})});const x=j?ls(j.repositories):[],f=x.filter(p=>!!(p.ref&&!p.disabledReason));if(j&&f.length===0){const p=j.topLevel?"not-github":"no-repository";return e.jsx("div",{className:"flex h-full flex-col",children:e.jsx(D,{info:{reason:p}})})}if(!m)return e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-2",children:e.jsx(re,{entries:x,value:m,onChange:p=>u(s,p)})}),e.jsxs("div",{className:"flex flex-col items-start gap-2 p-4",children:[e.jsx("div",{className:"typography-ui-header text-foreground",children:"Select a repository"}),e.jsx("p",{className:"typography-ui text-muted-foreground",children:"Several repositories are in scope. Pick one to browse."})]})]});const b=f.length>1;return e.jsxs("div",{className:"flex h-full flex-col",children:[b?e.jsx("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-2",children:e.jsx(re,{entries:x,value:m,onChange:p=>u(s,p)})}):null,e.jsx("div",{className:"min-h-0 flex-1",children:a({repo:m,directory:s})})]})},Ls=({copy:s,busy:t,destructive:i,disabled:a,disabledReason:r,label:n,variant:o="default",icon:l,onConfirm:c})=>{const[u,m]=d.useState(!1);return e.jsxs(Ne,{open:u,onOpenChange:h=>{t||m(h)},children:[e.jsxs(Ce,{render:e.jsx(N,{type:"button",variant:o,size:"xs",className:"shrink-0",disabled:a||t,title:r??n,"aria-label":n}),children:[l,n]}),e.jsx(ke,{children:e.jsx(Se,{side:"bottom",align:"start",sideOffset:6,collisionPadding:8,className:"z-50",children:e.jsxs(Re,{"aria-label":s.title,className:"w-64 rounded-lg border border-border/60 bg-[var(--surface-elevated)] p-3 shadow-lg",children:[e.jsx("p",{className:"typography-ui-label text-foreground",children:s.title}),e.jsx("p",{className:"mt-1 typography-micro text-muted-foreground",children:s.detail}),e.jsxs("div",{className:"mt-3 flex justify-end gap-1.5",children:[e.jsx(N,{type:"button",variant:"outline",size:"xs",disabled:t,onClick:()=>m(!1),children:"Cancel"}),e.jsx(N,{type:"button",variant:i?"destructive":"default",size:"xs",disabled:t,onClick:()=>{Promise.resolve(c()).finally(()=>m(!1))},"aria-label":s.confirm,children:t?s.progress:s.confirm})]})]})})})]})},Ps=async(s,t)=>{if(!t?.listGitWorktrees)return;const i=Ie.getState().projects,a=Be(i,te.getState()),n=Ae(i,a,s)?.path??s;try{await te.getState().refreshProject(n,t,{force:!0})}catch{}},y=(s,t)=>`${s}#${t}`,xe=Object.freeze([]),us=Object.freeze({comments:xe,summary:"",verdict:"comment",commentDraft:""});let ae=0;const ds=()=>(ae+=1,`pending-review-comment-${ae}`),R=(s,t)=>s.entries[t]??us,S=(s,t,i)=>({...s.entries,[t]:{...R(s,t),...i}}),P=as()((s,t)=>({entries:{},addComment:(i,a,r)=>{const n=r.id??ds(),o=y(i,a);return s(l=>({entries:S(l,o,{comments:[...R(l,o).comments,{...r,id:n}]})})),n},removeComment:(i,a,r)=>{const n=y(i,a);s(o=>{const l=R(o,n).comments,c=l.filter(u=>u.id!==r);if(c.length===l.length)return o;if(c.length===0&&R(o,n).summary===""&&R(o,n).commentDraft===""){const u={...o.entries};return delete u[n],{entries:u}}return{entries:S(o,n,{comments:c})}})},removeComments:(i,a,r)=>{if(r.length===0)return;const n=y(i,a),o=new Set(r);s(l=>{const c=R(l,n).comments,u=c.filter(m=>!o.has(m.id));return u.length===c.length?l:{entries:S(l,n,{comments:u})}})},clearComments:(i,a)=>{const r=y(i,a);s(n=>(n.entries[r]?.comments.length??0)===0?n:{entries:S(n,r,{comments:[]})})},setSummary:(i,a,r)=>{const n=y(i,a);t().entries[n]?.summary!==r&&s(o=>({entries:S(o,n,{summary:r})}))},clearSummary:(i,a,r)=>{const n=y(i,a);s(o=>R(o,n).summary!==r?o:{entries:S(o,n,{summary:""})})},setVerdict:(i,a,r)=>{const n=y(i,a);t().entries[n]?.verdict!==r&&s(o=>({entries:S(o,n,{verdict:r})}))},setCommentDraft:(i,a,r)=>{const n=y(i,a);t().entries[n]?.commentDraft!==r&&s(o=>({entries:S(o,n,{commentDraft:r})}))},clearCommentDraft:(i,a)=>{const r=y(i,a);s(n=>R(n,r).commentDraft===""?n:{entries:S(n,r,{commentDraft:""})})},resetForRuntimeSwitch:()=>s({entries:{}})}));typeof window<"u"&&Le(()=>{P.getState().resetForRuntimeSwitch()});const Ms=(s,t)=>P(i=>i.entries[y(s,t)]?.comments??xe),Es=(s,t)=>P(i=>i.entries[y(s,t)]?.summary??""),Ds=(s,t)=>P(i=>i.entries[y(s,t)]?.verdict??"comment"),Ts=(s,t)=>P(i=>i.entries[y(s,t)]?.comments.length??0),ms=300,Fs=(s,t)=>{const i=y(s,t),a=P(h=>h.entries[i]?.commentDraft??""),[r,n]=d.useState(a),o=d.useRef(r);o.current=r;const l=d.useRef(a);l.current=a;const c=d.useRef(a);d.useEffect(()=>{o.current===c.current&&a!==c.current&&(c.current=a,n(a))},[a]);const u=d.useCallback(()=>{const h=o.current;h!==c.current&&(c.current=h,P.getState().setCommentDraft(s,t,h))},[s,t]),m=d.useCallback(h=>{n(h)},[]);return d.useEffect(()=>{if(r===c.current)return;const h=setTimeout(u,ms);return()=>clearTimeout(h)},[r,u]),d.useEffect(()=>()=>u(),[u]),{draft:r,onDraftChange:m,flushDraft:u}},hs=240,zs=({draft:s,onDraftChange:t,placeholder:i="Leave a comment",ariaLabel:a="Leave a comment",busy:r,error:n,disabledReason:o,followUp:l,onSubmitComment:c,onDraftBlur:u})=>{const m=d.useRef(null),[h,g]=d.useState(!1),C=d.useRef(null);d.useLayoutEffect(()=>{const f=m.current;if(!f)return;f.style.height="0px",f.style.height=`${Math.min(f.scrollHeight,hs)}px`;let b=C.current;if(!b){const v=getComputedStyle(f);b={lineHeight:Number.parseFloat(v.lineHeight)||20,padding:Number.parseFloat(v.paddingTop)+Number.parseFloat(v.paddingBottom)||0},C.current=b}const p=f.scrollHeight-b.padding>b.lineHeight*1.5;g(v=>v===p?v:p)},[s]);const j=s.trim().length===0,x=r!==null;return e.jsxs("form",{className:"flex flex-col gap-2 border-t border-border/60 pt-5","aria-label":a,onSubmit:f=>{f.preventDefault(),c()},children:[e.jsxs("div",{className:`flex ${h?"items-end":"items-center"} gap-1.5 rounded-md border border-border bg-[var(--surface-elevated)] py-1 pr-1 focus-within:border-[var(--interactive-focus-ring)]`,children:[e.jsx(Ue,{simple:!0,ref:m,rows:1,value:s,placeholder:`${i} (⌘↩)`,"aria-label":a,disabled:x,onChange:f=>t(f.target.value),onBlur:()=>u?.(),outerClassName:"min-w-0 flex-1",className:"min-h-0 w-full resize-none overflow-y-auto border-0 bg-transparent px-2.5 py-1 typography-ui text-foreground shadow-none outline-none placeholder:text-muted-foreground focus-visible:ring-0",onKeyDown:f=>{f.nativeEvent.isComposing||f.key==="Enter"&&(f.metaKey||f.ctrlKey)&&!f.shiftKey&&!f.altKey&&!f.repeat&&(f.preventDefault(),f.stopPropagation(),!j&&!x&&c())}}),!j&&l&&l.allowed?e.jsx(N,{type:"button",variant:"ghost",size:"xs",disabled:x,title:l.reason??l.label,onClick:l.onRun,children:r===l.id?l.busyLabel:l.label}):null,e.jsx(N,{type:"button",variant:"default",size:"xs",disabled:j||x,title:o??"Post comment",onClick:c,children:r==="comment"?"Posting…":"Comment"})]}),n?e.jsx("p",{className:"typography-micro text-[var(--status-error)]",role:"alert",children:n}):null]})},fs=async s=>{const t=s.notify??((r,n)=>Y[r](n)),i=await s.postComment(s.trimmed);if(!i.ok){const r=i.error?.kind==="failed"&&i.error.message?i.error.message:"Failed to post comment";throw t("error",r),new Error(r)}if(s.afterPost(),s.action==="comment"){t("success","Comment posted");return}const a=await s.runFollowUp(s.action);if(!a.ok){const r=s.verbs[s.action],n=a.error?.kind==="failed"&&a.error.message?a.error.message:`Failed to ${r}`;throw t("error",n),new Error(n)}t("success",s.doneLabels[s.action])},$s=s=>{const[t,i]=d.useState(null),[a,r]=d.useState(null),n=d.useRef(s);n.current=s;const o=d.useCallback(async(l,c)=>{const u=c.trim(),m=n.current;if(!(u.length===0||t!==null)){i(l),r(null);try{await fs({trimmed:u,action:l,postComment:m.postComment,runFollowUp:m.runFollowUp,verbs:m.verbs,doneLabels:m.doneLabels,afterPost:m.afterPost})}catch(h){r(h instanceof Error?h.message:"Failed to post comment")}finally{i(null)}}},[t]);return{busy:t,error:a,submit:o}},ie=({label:s,value:t,options:i,currentLabel:a,onChange:r})=>e.jsxs(Oe,{children:[e.jsxs(qe,{children:[e.jsx("span",{className:"flex-1",children:s}),e.jsx("span",{className:"min-w-0 max-w-32 truncate typography-micro text-muted-foreground",children:a})]}),e.jsx(We,{className:"min-w-48",children:e.jsxs(de,{value:t,onValueChange:n=>{typeof n=="string"&&n!==t&&r(n)},children:[e.jsx(Q,{children:s}),i.map(n=>e.jsx(me,{value:n.id,closeOnClick:!1,children:n.label},n.id))]})})]}),ps=({stateValue:s,stateOptions:t,onStateChange:i,involvementValue:a,involvementOptions:r,onInvolvementChange:n,labelsValue:o,onLabelsChange:l})=>{const c=t.find(g=>g.id===s)?.label??s,u=r.find(g=>g.id===a)?.label??a,m=(o??"").trim().length>0,h=(s!==t[0]?.id?1:0)+(a!==r[0]?.id?1:0)+(m?1:0);return e.jsxs(le,{modal:!1,children:[e.jsx(ce,{asChild:!0,children:e.jsxs(N,{type:"button",variant:"ghost",size:"sm","aria-label":"Filters",title:"Filters",className:"h-8 shrink-0 gap-1.5 px-2 normal-case",children:[e.jsx(H,{name:"equalizer",className:"size-4","aria-hidden":"true"}),e.jsx("span",{children:"Filters"}),h>0?e.jsx("span",{className:"rounded-full bg-[var(--surface-muted)] px-1.5 typography-micro tabular-nums text-muted-foreground",children:h}):null]})}),e.jsxs(ue,{align:"end",className:"w-64",children:[e.jsx(ie,{label:"State",value:s,options:t,currentLabel:c,onChange:i}),e.jsx(ie,{label:"Involvement",value:a,options:r,currentLabel:u,onChange:n}),l?e.jsxs(e.Fragment,{children:[e.jsx(_e,{}),e.jsx(Q,{children:"Labels"}),e.jsxs("div",{className:"px-2 pb-2",children:[e.jsx(Ke,{value:o??"",onChange:g=>l(g.target.value),placeholder:"bug, enhancement","aria-label":"Filter by labels",className:"h-7"}),e.jsx("p",{className:"mt-1 typography-micro text-muted-foreground",children:"Comma-separated. Or type label:bug in search."})]})]}):null]})]})},xs=({value:s,options:t,onChange:i,ariaLabel:a})=>e.jsxs(le,{modal:!1,children:[e.jsx(ce,{asChild:!0,children:e.jsx(N,{type:"button",variant:"ghost",size:"sm","aria-label":a,title:a,className:"h-8 w-8 shrink-0 p-0",children:e.jsx(H,{name:"expand-up-down",className:"size-4","aria-hidden":"true"})})}),e.jsx(ue,{align:"end",className:"w-52",children:e.jsxs(de,{value:s,onValueChange:r=>{typeof r=="string"&&r!==s&&i(r)},children:[e.jsx(Q,{children:"Sort"}),t.map(r=>e.jsx(me,{value:r.id,children:r.label},r.id))]})})]}),oe=({isRefreshing:s,onRefresh:t,label:i,presentation:a="toolbar"})=>a==="desktop"?e.jsx(N,{type:"button",variant:"ghost",size:"sm",onClick:t,disabled:s,title:i??"Refresh","aria-label":i??"Refresh GitHub data",className:"h-8 w-8 shrink-0 p-0",children:e.jsx(H,{name:"refresh",className:L("size-4",s&&"animate-spin"),"aria-hidden":"true"})}):a==="drawer"?e.jsx(N,{type:"button",variant:"ghost",size:"icon",onClick:t,disabled:s,title:i??"Refresh","aria-label":i??"Refresh GitHub data",className:"shrink-0",children:e.jsx(H,{name:"refresh",className:L("size-4",s&&"animate-spin"),"aria-hidden":"true"})}):e.jsx(N,{type:"button",variant:"ghost",size:"sm",onClick:t,disabled:s,title:i??"Refresh","aria-label":i??"Refresh GitHub data",className:"h-8 w-8 shrink-0 p-0",children:e.jsx(H,{name:"refresh",className:L("size-4",s&&"animate-spin"),"aria-hidden":"true"})}),Is=({items:s,renderRow:t,hasMore:i,isLoadingMore:a,isLoading:r,isRefreshing:n,stale:o,error:l,searchValue:c,onSearchChange:u,searchPlaceholder:m,searchAriaLabel:h,toolbarControls:g,primaryAction:C,headerActionsSlot:j=null,headerActionsPresentation:x="drawer",isDefaultFilters:f,stateLabel:b,kindSingular:p,kindPlural:v,noItemsTitle:T,noItemsBody:M,noItemsIcon:K,noItemsAction:X,listAriaLabel:E,skeletonLabel:ge,updatedAtOf:O,countComplete:q=!0,incompleteNotice:F=null,remote:w=null,numberJump:z=null,numberJumpKind:be,onClearFilters:je,onLoadMore:ye,onRetry:$,onOpen:ve})=>{const J=d.useMemo(()=>{if(s.length===0)return null;const G=s.length===1&&q?`1 ${p}`:`${s.length}${q?"":"+"} ${v}`;let B=0;for(const se of s){const V=O(se)?Date.parse(O(se)):NaN;Number.isFinite(V)&&V>B&&(B=V)}const ee=B>0?fe(new Date(B).toISOString()):"";return`${G} · ${b.toLowerCase()}${ee?` · updated ${ee}`:""}`},[s,b,p,v,q,O]),I=!!l&&s.length===0,W=!I&&r&&s.length===0,U=j??null,we=x??"drawer",Z=n||r;return e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[o?e.jsx(Xe,{onRetry:$}):null,e.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-1.5 border-b border-border px-3 py-2",children:[e.jsx(Je,{value:c,onChange:u,placeholder:m,ariaLabel:h}),g,U?null:e.jsxs(e.Fragment,{children:[C,e.jsx(oe,{isRefreshing:Z,onRefresh:$,presentation:"toolbar"})]})]}),U?He.createPortal(e.jsxs(e.Fragment,{children:[C,e.jsx(oe,{isRefreshing:Z,onRefresh:$,presentation:we})]}),U):null,I?e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx(D,{info:pe(l),onRetry:$,isRetrying:r})}):W?e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(he,{label:ge})}):e.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",role:"list","aria-label":E,children:[s.length===0&&z==null?e.jsx(Ze,{kind:f?"no-items":"no-match",noItemsTitle:T,noItemsBody:f?M:void 0,noItemsIcon:K,noItemsAction:f?X:void 0,onClearFilters:f?void 0:je}):e.jsxs(e.Fragment,{children:[s.length>0?e.jsx("ul",{className:"flex flex-col p-1",children:s.map(G=>e.jsx(d.Fragment,{children:t(G)},G.number))}):null,z!=null?e.jsx(es,{number:z,kindLabel:be,onOpen:()=>ve(z)}):null]}),e.jsx(ss,{hasMore:i,isLoading:a||r,onLoadMore:ye}),w&&(w.isSearching||w.error||w.items.length>0)?e.jsx(ts,{title:"More results from GitHub",isSearching:w.isSearching,error:w.error,hasResults:w.items.length>0,hasMore:w.hasMore,isLoadingMore:w.isLoadingMore,onRetry:w.onRetry,onLoadMore:w.onLoadMore,children:e.jsx("ul",{className:"flex flex-col",children:w.items.map(G=>e.jsx(d.Fragment,{children:t(G)},G.number))})}):null]}),!I&&!W&&F?e.jsx(ns,{matchSummary:F.summary,searching:F.searching,onSearchAll:F.onSearchAll}):null,!I&&!W&&J?e.jsx(rs,{summary:J}):null]})},Bs=({stateValue:s,stateOptions:t,onStateChange:i,involvementValue:a,involvementOptions:r,onInvolvementChange:n,labelsValue:o,onLabelsChange:l,sortValue:c,sortOptions:u,onSortChange:m,sortAriaLabel:h})=>e.jsxs(e.Fragment,{children:[e.jsx(ps,{stateValue:s,stateOptions:t,onStateChange:i,involvementValue:a,involvementOptions:r,onInvolvementChange:n,labelsValue:o,onLabelsChange:l}),e.jsx(xs,{value:c,options:u,onChange:m,ariaLabel:h})]}),gs="shrink-0 font-mono typography-micro tabular-nums text-muted-foreground",bs=({glyph:s,below:t})=>e.jsxs("span",{className:"flex w-4 shrink-0 flex-col items-center gap-0.5",children:[e.jsx("span",{className:"inline-flex",children:s}),t?e.jsx("span",{className:"inline-flex",children:t}):null]}),As=({login:s,avatarUrl:t})=>e.jsxs("span",{className:"inline-flex min-w-0 shrink-0 items-center gap-1",title:s??"ghost",children:[e.jsx(is,{login:s,avatarUrl:t,size:"xs"}),e.jsx("span",{className:"truncate",children:s??"ghost"})]}),_s=({head:s,base:t})=>e.jsxs("span",{className:"flex min-w-0 items-center gap-1 font-mono",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",title:s,children:s}),e.jsx("span",{className:"shrink-0",children:"→"}),e.jsx("span",{className:"max-w-[45%] shrink-0 truncate",title:t,children:t})]}),js=[{show:""},{show:"hidden @xl/github-row:inline-flex"},{show:"hidden @3xl/github-row:inline-flex"}],ys=["hidden @xl/github-row:hidden","hidden @xl/github-row:inline-flex @3xl/github-row:hidden",""],Ks=({labels:s})=>s.length===0?null:e.jsx("span",{className:"flex min-w-0 shrink-0 items-center gap-1",children:js.map((t,i)=>{const a=s[i];if(!a)return null;const r=s.length-i-1;return e.jsxs("span",{className:L("min-w-0",t.show),children:[e.jsx(os,{name:a.name,color:a.color}),r>0?e.jsxs("span",{className:L("ml-0.5 shrink-0",ys[i]),"aria-label":`${r} more labels`,children:["+",r]}):null]},a.name)})}),Os=({glyph:s,glyphBelow:t,number:i,title:a,signals:r,status:n,meta:o,updatedAt:l,selected:c,onOpen:u,ariaLabel:m})=>e.jsxs("button",{type:"button",onClick:u,"aria-label":m,"aria-current":c?"true":void 0,className:L("@container/github-row group/github-row flex w-full items-center gap-2 rounded-md px-2 py-1 text-left",c?"bg-interactive-selection text-interactive-selection-foreground":"hover:bg-interactive-hover"),children:[e.jsx(bs,{glyph:s,below:t}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[e.jsx("span",{className:gs,children:i}),e.jsx("span",{className:"min-w-0 flex-1 truncate typography-ui-label text-foreground",title:a,children:a}),r?e.jsx("span",{className:"flex shrink-0 items-center gap-1",children:r}):null,n?e.jsx("span",{className:"ml-auto flex shrink-0 items-center gap-1.5",children:n}):null]}),e.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 overflow-hidden typography-micro text-muted-foreground",children:[o,l?e.jsx("span",{className:"ml-auto shrink-0 whitespace-nowrap tabular-nums",children:fe(l)}):null]})]})]}),qs=s=>{const{repo:t,query:i,queryKey:a,autoRemote:r,indexNumbers:n,visibleItems:o,searchText:l,useRemoteEntry:c,runSearch:u,runLoadMore:m}=s,[h,g]=d.useState(!1),[C,j]=d.useState(null);d.useEffect(()=>j(null),[t]);const x=c(t,i),f=r||C===a||x!=null,b=d.useCallback(()=>{g(!0),u(i).catch(()=>null).finally(()=>g(!1))},[i,u]);d.useEffect(()=>{if(!r||x?.data||x?.isLoading||x?.error||h)return;const E=setTimeout(b,400);return()=>clearTimeout(E)},[r,a,x?.data,x?.isLoading,x?.error,h,b]);const p=d.useCallback(()=>{j(a),b()},[a,b]),v=d.useCallback(()=>{g(!0),m(i).catch(()=>null).finally(()=>g(!1))},[i,m]),T=d.useMemo(()=>Ve(x?.data?.items??[],n),[x?.data?.items,n]),M=Ye(l),K=M!=null&&!o.some(E=>E.number===M)?M:null;return{remoteView:d.useMemo(()=>f?{items:T,isSearching:h||(x?.isLoading??!1),isLoadingMore:h,hasMore:x?.data?.nextCursor!=null,error:x?.error??null,onSearchAll:p,onLoadMore:v,onRetry:b}:null,[f,T,h,x?.isLoading,x?.data?.nextCursor,x?.error,p,v,b]),numberJump:K,remotePending:h,handleSearchAll:p}};export{zs as G,Ms as a,Fs as b,$s as c,Es as d,Ds as e,Ts as f,D as g,Ls as h,Os as i,As as j,_s as k,Is as l,Bs as m,Gs as n,qs as o,Ks as p,Ps as r,pe as t,P as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as p}from"./vendor-react-DASdDPIk.js";import{aJ as z,a as B,b as D,c as L,aO as M,r as j,d as v}from"./useAppFontEffects--lKKtKVo.js";const k=50,P=r=>{if(!r)return null;const s=r.replace(/\\/g,"/");return s==="/"?"/":s.replace(/\/+$/,"")},C=(r,s)=>{const o=P(r),c=P(s);return!o||!c?!1:o===c||o.startsWith(`${c}/`)},O=r=>{if(!r)return null;const s=r.label?.trim();return s||(r.path.split(/[\\/]/).filter(Boolean).at(-1)??r.path)},w=(r,s={})=>{const{scopeProjectId:o=null,maxParents:c=k}=s,u=z({archived:!1}),S=B(e=>e.projects),d=D(e=>e.ids),h=L(e=>e.rankById),b=M(),y=p.useMemo(()=>S.map(e=>({...e,normalizedPath:P(e.path)})).filter(e=>e.normalizedPath),[S]),m=p.useCallback(e=>e?y.filter(i=>C(e,i.normalizedPath)).sort((i,l)=>(l.normalizedPath?.length??0)-(i.normalizedPath?.length??0))[0]??null:null,[y]);return p.useMemo(()=>{if(!r)return[];const e=new Map;for(const t of u){const n=t.parentID;if(!n||t.time?.archived)continue;const a=e.get(n);a?a.push(t):e.set(n,[t])}const g=v(d,h);e.forEach(t=>{t.sort(g)});const i=u.filter(t=>!t.time?.archived).filter(t=>!t.parentID).filter(t=>{if(!o)return!0;const n=j(t);return m(n)?.id===o}).sort(v(d,h)).slice(0,c),l=t=>{const n=e.get(t.id)??[];return{session:t,children:n.map(a=>l(a))}};return i.map(t=>{const n=j(t),a=m(n),I=O(a),f=(n?b.get(n):void 0)??null;return{node:l(t),projectId:a?.id??null,groupDirectory:n,secondaryMeta:{projectLabel:I,branchLabel:f&&f!==I?f:null}}})},[u,b,r,m,c,d,o,h])};export{w as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./vendor-react-DASdDPIk.js";import{u as Q,a as X,b as Y,c as Z,d as q,e as V,t as ee,f as I,g as te,T as K,h as z,i as B,j as ne,k as ie,l as se,A as S,m as re,n as oe,o as ae,p as le,q as ue}from"./vendor-boot-DyL2td56.js";function ce(t){const{open:i,defaultOpen:o,onOpenChange:F,disabled:C}=t,p=i!==void 0,[h,b]=Q({controlled:i,default:o,name:"Collapsible",state:"open"}),{mounted:v,setMounted:m,transitionStatus:c}=X(h,!0,!0),[a,r]=s.useState(h),[{height:u,width:y},R]=s.useState({height:void 0,width:void 0}),P=Y(),[O,A]=s.useState(),N=O??P,[w,T]=s.useState(!1),[j,M]=s.useState(!1),H=s.useRef(null),g=s.useRef(null),D=s.useRef(null),x=s.useRef(null),e=Z(x,!1),d=q(l=>{const n=!h,f=V(ee,l.nativeEvent);if(F(n,f),f.isCanceled)return;const E=x.current;g.current==="css-animation"&&E!=null&&E.style.removeProperty("animation-name"),!w&&!j&&(g.current!=null&&g.current!=="css-animation"&&!v&&n&&m(!0),g.current==="css-animation"&&(!a&&n&&r(!0),!v&&n&&m(!0))),b(n),g.current==="none"&&v&&!n&&m(!1)});return I(()=>{p&&g.current==="none"&&!h&&m(!1)},[p,h,i,m]),s.useMemo(()=>({abortControllerRef:H,animationTypeRef:g,disabled:C,handleTrigger:d,height:u,mounted:v,open:h,panelId:N,panelRef:x,runOnceAnimationsFinish:e,setDimensions:R,setHiddenUntilFound:T,setKeepMounted:M,setMounted:m,setOpen:b,setPanelIdState:A,setVisible:r,transitionDimensionRef:D,transitionStatus:c,visible:a,width:y}),[H,g,C,d,u,v,h,N,x,e,R,T,M,m,b,r,D,c,a,y])}const $=s.createContext(void 0);function G(){const t=s.useContext($);if(t===void 0)throw new Error(te(15));return t}let W=(function(t){return t.open="data-open",t.closed="data-closed",t[t.startingStyle=K.startingStyle]="startingStyle",t[t.endingStyle=K.endingStyle]="endingStyle",t})({}),de=(function(t){return t.panelOpen="data-panel-open",t})({});const fe={[W.open]:""},pe={[W.closed]:""},he={open(t){return t?{[de.panelOpen]:""}:null}},me={open(t){return t?fe:pe}},J={...me,...z},Se=s.forwardRef(function(i,o){const{render:F,className:C,defaultOpen:p=!1,disabled:h=!1,onOpenChange:b,open:v,style:m,...c}=i,a=q(b),r=ce({open:v,defaultOpen:p,onOpenChange:a,disabled:h}),u=s.useMemo(()=>({open:r.open,disabled:r.disabled,transitionStatus:r.transitionStatus}),[r.open,r.disabled,r.transitionStatus]),y=s.useMemo(()=>({...r,onOpenChange:a,state:u}),[r,a,u]),R=B("div",i,{state:u,ref:o,props:c,stateAttributesMapping:J});return ne.jsx($.Provider,{value:y,children:R})}),ge={...he,...z},Ce=s.forwardRef(function(i,o){const{panelId:F,open:C,handleTrigger:p,state:h,disabled:b}=G(),{className:v,disabled:m=b,id:c,render:a,nativeButton:r=!0,style:u,...y}=i,{getButtonProps:R,buttonRef:P}=ie({disabled:m,focusableWhenDisabled:!0,native:r}),O=s.useMemo(()=>({"aria-controls":C?F:void 0,"aria-expanded":C,onClick:p}),[F,C,p]);return B("button",i,{state:h,ref:[o,P],props:[O,y,R],stateAttributesMapping:ge})});let be=(function(t){return t.disabled="data-disabled",t.orientation="data-orientation",t})({});function ye(t){const{abortControllerRef:i,animationTypeRef:o,externalRef:F,height:C,hiddenUntilFound:p,keepMounted:h,id:b,mounted:v,onOpenChange:m,open:c,panelRef:a,runOnceAnimationsFinish:r,setDimensions:u,setMounted:y,setOpen:R,setVisible:P,transitionDimensionRef:O,visible:A,width:N}=t,w=s.useRef(!1),T=s.useRef(null),j=s.useRef(c),M=s.useRef(c),H=se(),g=s.useMemo(()=>o.current==="css-animation"?!A:!c&&!v,[c,v,A,o]),D=q(e=>{if(!e)return;if(o.current==null||O.current==null){const n=getComputedStyle(e),f=n.animationName!=="none"&&n.animationName!=="",E=n.transitionDuration!=="0s"&&n.transitionDuration!=="";f&&E||(n.animationName==="none"&&n.transitionDuration!=="0s"?o.current="css-transition":n.animationName!=="none"&&n.transitionDuration==="0s"?o.current="css-animation":o.current="none"),e.getAttribute(be.orientation)==="horizontal"||n.transitionProperty.indexOf("width")>-1?O.current="width":O.current="height"}if(o.current!=="css-transition")return;(C===void 0||N===void 0)&&(u({height:e.scrollHeight,width:e.scrollWidth}),M.current&&e.style.setProperty("transition-duration","0s"));let d=-1,l=-1;return d=S.request(()=>{M.current=!1,l=S.request(()=>{setTimeout(()=>{e.style.removeProperty("transition-duration")})})}),()=>{S.cancel(d),S.cancel(l)}}),x=re(F,a,D);return I(()=>{if(o.current!=="css-transition")return;const e=a.current;if(!e)return;let d=-1;if(i.current!=null&&(i.current.abort(),i.current=null),c){const l={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(l).forEach(n=>{e.style.setProperty(n,"initial","important")}),!M.current&&!h&&e.setAttribute(W.startingStyle,""),u({height:e.scrollHeight,width:e.scrollWidth}),d=S.request(()=>{Object.entries(l).forEach(([n,f])=>{f===""?e.style.removeProperty(n):e.style.setProperty(n,f)})})}else{if(e.scrollHeight===0&&e.scrollWidth===0)return;u({height:e.scrollHeight,width:e.scrollWidth});const l=new AbortController;i.current=l;const n=l.signal;let f=null;const E=W.endingStyle;return f=new MutationObserver(k=>{k.some(U=>U.type==="attributes"&&U.attributeName===E)&&(f?.disconnect(),f=null,r(()=>{u({height:0,width:0}),e.style.removeProperty("content-visibility"),y(!1),i.current===l&&(i.current=null)},n))}),f.observe(e,{attributes:!0,attributeFilter:[E]}),()=>{f?.disconnect(),H.cancel(),i.current===l&&(l.abort(),i.current=null)}}return()=>{S.cancel(d)}},[i,o,H,p,h,v,c,a,r,u,y]),I(()=>{if(o.current!=="css-animation")return;const e=a.current;e&&(T.current=e.style.animationName||T.current,e.style.setProperty("animation-name","none"),u({height:e.scrollHeight,width:e.scrollWidth}),!j.current&&!w.current&&e.style.removeProperty("animation-name"),c?(i.current!=null&&(i.current.abort(),i.current=null),y(!0),P(!0)):(i.current=new AbortController,r(()=>{y(!1),P(!1),i.current=null},i.current.signal)))},[i,o,c,a,r,u,y,P,A]),oe(()=>{const e=S.request(()=>{j.current=!1});return()=>S.cancel(e)}),I(()=>{if(!p)return;const e=a.current;if(!e)return;let d=-1,l=-1;return c&&w.current&&(e.style.transitionDuration="0s",u({height:e.scrollHeight,width:e.scrollWidth}),d=S.request(()=>{w.current=!1,l=S.request(()=>{setTimeout(()=>{e.style.removeProperty("transition-duration")})})})),()=>{S.cancel(d),S.cancel(l)}},[p,c,a,u]),I(()=>{const e=a.current;e&&p&&g&&(e.setAttribute("hidden","until-found"),o.current==="css-transition"&&e.setAttribute(W.startingStyle,""))},[p,g,o,a]),s.useEffect(function(){const d=a.current;if(!d)return;function l(n){w.current=!0,R(!0),m(!0,V(le,n))}return ae(d,"beforematch",l)},[m,a,R]),s.useMemo(()=>({props:{hidden:g,id:b,ref:x}}),[g,b,x])}let _=(function(t){return t.collapsiblePanelHeight="--collapsible-panel-height",t.collapsiblePanelWidth="--collapsible-panel-width",t})({});const Oe=s.forwardRef(function(i,o){const{className:F,hiddenUntilFound:C,keepMounted:p,render:h,id:b,style:v,...m}=i,{abortControllerRef:c,animationTypeRef:a,height:r,mounted:u,onOpenChange:y,open:R,panelId:P,panelRef:O,runOnceAnimationsFinish:A,setDimensions:N,setHiddenUntilFound:w,setKeepMounted:T,setMounted:j,setPanelIdState:M,setOpen:H,setVisible:g,state:D,transitionDimensionRef:x,visible:e,width:d,transitionStatus:l}=G(),n=C??!1,f=p??!1;I(()=>{if(b)return M(b),()=>{M(void 0)}},[b,M]),I(()=>{w(n)},[w,n]),I(()=>{T(f)},[T,f]);const{props:E}=ye({abortControllerRef:c,animationTypeRef:a,externalRef:o,height:r,hiddenUntilFound:n,id:P,keepMounted:f,mounted:u,onOpenChange:y,open:R,panelRef:O,runOnceAnimationsFinish:A,setDimensions:N,setMounted:j,setOpen:H,setVisible:g,transitionDimensionRef:x,visible:e,width:d});ue({open:R&&l==="idle",ref:O,onComplete(){R&&N({height:void 0,width:void 0})}});const k=s.useMemo(()=>({...D,transitionStatus:l}),[D,l]),L=B("div",i,{state:k,ref:[o,O],props:[E,{style:{[_.collapsiblePanelHeight]:r===void 0?"auto":`${r}px`,[_.collapsiblePanelWidth]:d===void 0?"auto":`${d}px`}},m],stateAttributesMapping:J});return f||n||u?L:null});export{Se as C,Ce as a,Oe as b};
|
package/dist/assets/{vendor-beautiful-mermaid-D3YCkKz7.js → vendor-beautiful-mermaid-DApbjBp2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as Ae}from"./vendor-elkjs-
|
|
1
|
+
import{E as Ae}from"./vendor-elkjs-D27273Ms.js";import{d as Ie}from"./vendor-entities-C3BA0AJP.js";var Ot={bg:"#FFFFFF",fg:"#27272A"},it={textSec:60,textMuted:40,textFaint:25,line:50,arrow:85,nodeFill:3,nodeStroke:20,groupHeader:5,innerStroke:12,keyBadge:10};function vt(t,e){const n=[`@import url('https://fonts.googleapis.com/css2?family=${encodeURIComponent(t)}:wght@400;500;600;700&display=swap');`,...e?["@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');"]:[]],s=`
|
|
2
2
|
/* Derived from --bg and --fg (overridable via --line, --accent, etc.) */
|
|
3
3
|
--_text: var(--fg);
|
|
4
4
|
--_text-sec: var(--muted, color-mix(in srgb, var(--fg) ${it.textSec}%, var(--bg)));
|