@afbin/cli 0.4.1 → 0.4.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/README.md +5 -0
- package/dist/afbin.mjs +33 -12
- package/dist/index.mjs +11 -1
- package/dist/runtime/dist/web/.vite/manifest.json +216 -216
- package/dist/runtime/dist/web/assets/{Account-CvOF6jpD.js → Account-qnxwLep7.js} +1 -1
- package/dist/runtime/dist/web/assets/Account-qnxwLep7.js.br +0 -0
- package/dist/runtime/dist/web/assets/Account-qnxwLep7.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{ArtifactAddress-DORDne01.js → ArtifactAddress-1ftOG9A5.js} +2 -2
- package/dist/runtime/dist/web/assets/ArtifactAddress-1ftOG9A5.js.br +0 -0
- package/dist/runtime/dist/web/assets/ArtifactAddress-1ftOG9A5.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{ArtifactData-BdL9R2dA.js → ArtifactData-CZq-MLWc.js} +1 -1
- package/dist/runtime/dist/web/assets/ArtifactData-CZq-MLWc.js.br +0 -0
- package/dist/runtime/dist/web/assets/ArtifactData-CZq-MLWc.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{ArtifactEditor-BZXbOk_F.js → ArtifactEditor-Cd_-Z6DK.js} +1 -1
- package/dist/runtime/dist/web/assets/ArtifactEditor-Cd_-Z6DK.js.br +0 -0
- package/dist/runtime/dist/web/assets/ArtifactEditor-Cd_-Z6DK.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{AssetPageHeader-DX2RcYTv.js → AssetPageHeader-BqdRtu9K.js} +1 -1
- package/dist/runtime/dist/web/assets/AssetPageHeader-BqdRtu9K.js.br +0 -0
- package/dist/runtime/dist/web/assets/AssetPageHeader-BqdRtu9K.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Assets-dgdXIgAW.js → Assets-D6htDZnu.js} +1 -1
- package/dist/runtime/dist/web/assets/Assets-D6htDZnu.js.br +0 -0
- package/dist/runtime/dist/web/assets/Assets-D6htDZnu.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{AvatarCircle-MNnIhRvg.js → AvatarCircle-CBpOuCGy.js} +1 -1
- package/dist/runtime/dist/web/assets/AvatarCircle-CBpOuCGy.js.br +0 -0
- package/dist/runtime/dist/web/assets/AvatarCircle-CBpOuCGy.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Chat-V1ku1-60.js → Chat-DueKnMAf.js} +1 -1
- package/dist/runtime/dist/web/assets/Chat-DueKnMAf.js.br +0 -0
- package/dist/runtime/dist/web/assets/Chat-DueKnMAf.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{ConfirmDialog-Ph1VDgNN.js → ConfirmDialog-hdkXS1mg.js} +1 -1
- package/dist/runtime/dist/web/assets/ConfirmDialog-hdkXS1mg.js.br +0 -0
- package/dist/runtime/dist/web/assets/ConfirmDialog-hdkXS1mg.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{DatasetCatalogView-DBJEPKFI.js → DatasetCatalogView-DKNdjYA_.js} +1 -1
- package/dist/runtime/dist/web/assets/DatasetCatalogView-DKNdjYA_.js.br +0 -0
- package/dist/runtime/dist/web/assets/DatasetCatalogView-DKNdjYA_.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{DatasetEditor-CMqN1duq.js → DatasetEditor-C22-4oJL.js} +1 -1
- package/dist/runtime/dist/web/assets/DatasetEditor-C22-4oJL.js.br +0 -0
- package/dist/runtime/dist/web/assets/DatasetEditor-C22-4oJL.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Docs-DVoW7b7v.js → Docs-B80IZLN8.js} +1 -1
- package/dist/runtime/dist/web/assets/Docs-B80IZLN8.js.br +0 -0
- package/dist/runtime/dist/web/assets/Docs-B80IZLN8.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Document-udhy5mlX.js → Document-C6-E9V3_.js} +4 -4
- package/dist/runtime/dist/web/assets/Document-C6-E9V3_.js.br +0 -0
- package/dist/runtime/dist/web/assets/Document-C6-E9V3_.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{DocumentChrome-EUbW_JvA.js → DocumentChrome-Bw4_z5yQ.js} +1 -1
- package/dist/runtime/dist/web/assets/DocumentChrome-Bw4_z5yQ.js.br +0 -0
- package/dist/runtime/dist/web/assets/DocumentChrome-Bw4_z5yQ.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{DocumentSharing-BuTXuflA.js → DocumentSharing-BiTakFtn.js} +1 -1
- package/dist/runtime/dist/web/assets/DocumentSharing-BiTakFtn.js.br +0 -0
- package/dist/runtime/dist/web/assets/DocumentSharing-BiTakFtn.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{FileUpload-D6RTOrHD.js → FileUpload-B-da-wki.js} +1 -1
- package/dist/runtime/dist/web/assets/FileUpload-B-da-wki.js.br +0 -0
- package/dist/runtime/dist/web/assets/FileUpload-B-da-wki.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Folder-DoNsFB2I.js → Folder-B-OlCz39.js} +1 -1
- package/dist/runtime/dist/web/assets/Folder-B-OlCz39.js.br +0 -0
- package/dist/runtime/dist/web/assets/Folder-B-OlCz39.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{ForkArtifact-DDmXl1BZ.js → ForkArtifact-DXYU1-qL.js} +1 -1
- package/dist/runtime/dist/web/assets/ForkArtifact-DXYU1-qL.js.br +0 -0
- package/dist/runtime/dist/web/assets/ForkArtifact-DXYU1-qL.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{GetStarted-YjltMEeN.js → GetStarted-CFsSvXR0.js} +1 -1
- package/dist/runtime/dist/web/assets/GetStarted-CFsSvXR0.js.br +0 -0
- package/dist/runtime/dist/web/assets/GetStarted-CFsSvXR0.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Home-DijnltFZ.js → Home-BSO7YYXA.js} +1 -1
- package/dist/runtime/dist/web/assets/Home-BSO7YYXA.js.br +0 -0
- package/dist/runtime/dist/web/assets/Home-BSO7YYXA.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Login-DLwn4aUr.js → Login-CszZ8VGu.js} +1 -1
- package/dist/runtime/dist/web/assets/Login-CszZ8VGu.js.br +0 -0
- package/dist/runtime/dist/web/assets/Login-CszZ8VGu.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{NotFound-svz4wCeL.js → NotFound-D2MOGkIO.js} +1 -1
- package/dist/runtime/dist/web/assets/NotFound-D2MOGkIO.js.br +0 -0
- package/dist/runtime/dist/web/assets/NotFound-D2MOGkIO.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Notifications-BGeJKv2W.js → Notifications-M7BiDhSo.js} +1 -1
- package/dist/runtime/dist/web/assets/Notifications-M7BiDhSo.js.br +0 -0
- package/dist/runtime/dist/web/assets/Notifications-M7BiDhSo.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Profile-B38GeCbR.js → Profile-DqV5PMEi.js} +2 -2
- package/dist/runtime/dist/web/assets/Profile-DqV5PMEi.js.br +0 -0
- package/dist/runtime/dist/web/assets/Profile-DqV5PMEi.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Program-D3-Gfvjo.js → Program-CdwfK2zE.js} +1 -1
- package/dist/runtime/dist/web/assets/Program-CdwfK2zE.js.br +0 -0
- package/dist/runtime/dist/web/assets/Program-CdwfK2zE.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{RowMenu-J4Gbci3B.js → RowMenu-B2c9LyOb.js} +1 -1
- package/dist/runtime/dist/web/assets/RowMenu-B2c9LyOb.js.br +0 -0
- package/dist/runtime/dist/web/assets/RowMenu-B2c9LyOb.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Schedules-D05tndQ1.js +1 -0
- package/dist/runtime/dist/web/assets/Schedules-D05tndQ1.js.br +0 -0
- package/dist/runtime/dist/web/assets/Schedules-D05tndQ1.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{ScreenshotEditor-CUmN5F2q.js → ScreenshotEditor-B8g3LiBx.js} +1 -1
- package/dist/runtime/dist/web/assets/ScreenshotEditor-B8g3LiBx.js.br +0 -0
- package/dist/runtime/dist/web/assets/ScreenshotEditor-B8g3LiBx.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{ShareLink-n8KhtnaI.js → ShareLink-qbYss_Eh.js} +1 -1
- package/dist/runtime/dist/web/assets/ShareLink-qbYss_Eh.js.br +0 -0
- package/dist/runtime/dist/web/assets/ShareLink-qbYss_Eh.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Shelf-BgwHOaeW.js → Shelf-anhc5No9.js} +1 -1
- package/dist/runtime/dist/web/assets/Shelf-anhc5No9.js.br +0 -0
- package/dist/runtime/dist/web/assets/Shelf-anhc5No9.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{SocialPreviewEditor-DwHHRW29.js → SocialPreviewEditor-B4nUY6FA.js} +1 -1
- package/dist/runtime/dist/web/assets/SocialPreviewEditor-B4nUY6FA.js.br +0 -0
- package/dist/runtime/dist/web/assets/SocialPreviewEditor-B4nUY6FA.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Starter-I01MNooi.js → Starter-DrID859q.js} +1 -1
- package/dist/runtime/dist/web/assets/Starter-DrID859q.js.br +0 -0
- package/dist/runtime/dist/web/assets/Starter-DrID859q.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Trash-Cu0KXeW7.js → Trash-DoKID_ux.js} +1 -1
- package/dist/runtime/dist/web/assets/Trash-DoKID_ux.js.br +0 -0
- package/dist/runtime/dist/web/assets/Trash-DoKID_ux.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{Welcome-B8iPt_Nh.js → Welcome-Ct29u9Y9.js} +1 -1
- package/dist/runtime/dist/web/assets/Welcome-Ct29u9Y9.js.br +0 -0
- package/dist/runtime/dist/web/assets/Welcome-Ct29u9Y9.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{WorkspaceLayout-fF_ot7EK.js → WorkspaceLayout-Qf3x5yOM.js} +1 -1
- package/dist/runtime/dist/web/assets/WorkspaceLayout-Qf3x5yOM.js.br +0 -0
- package/dist/runtime/dist/web/assets/WorkspaceLayout-Qf3x5yOM.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{browser-artifact-write-ZsGe-hXr.js → browser-artifact-write-CG72iseh.js} +1 -1
- package/dist/runtime/dist/web/assets/browser-artifact-write-CG72iseh.js.br +0 -0
- package/dist/runtime/dist/web/assets/browser-artifact-write-CG72iseh.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{chevron-down-COGO5cmx.js → chevron-down-M1fHuk7u.js} +1 -1
- package/dist/runtime/dist/web/assets/{chevron-left-BJZiR3W-.js → chevron-left-NHmvDJpN.js} +1 -1
- package/dist/runtime/dist/web/assets/{copy-PNNAtmJH.js → copy-v5iTV3kk.js} +1 -1
- package/dist/runtime/dist/web/assets/copy-v5iTV3kk.js.br +0 -0
- package/dist/runtime/dist/web/assets/copy-v5iTV3kk.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{database-CKOnpvwb.js → database-BbH2eTSj.js} +1 -1
- package/dist/runtime/dist/web/assets/database-BbH2eTSj.js.br +2 -0
- package/dist/runtime/dist/web/assets/database-BbH2eTSj.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{document-update-client-DUF0zs2Z.js → document-update-client-td73lQ81.js} +1 -1
- package/dist/runtime/dist/web/assets/document-update-client-td73lQ81.js.br +0 -0
- package/dist/runtime/dist/web/assets/document-update-client-td73lQ81.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{dom-mounter-64phOf1s.js → dom-mounter-BSxIt5bC.js} +1 -1
- package/dist/runtime/dist/web/assets/dom-mounter-BSxIt5bC.js.br +0 -0
- package/dist/runtime/dist/web/assets/dom-mounter-BSxIt5bC.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{download-j-nqks7p.js → download-Dk3mxCBK.js} +1 -1
- package/dist/runtime/dist/web/assets/download-Dk3mxCBK.js.br +0 -0
- package/dist/runtime/dist/web/assets/download-Dk3mxCBK.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{eye-BNpzRKAK.js → eye-DEiYMLrO.js} +1 -1
- package/dist/runtime/dist/web/assets/eye-DEiYMLrO.js.br +0 -0
- package/dist/runtime/dist/web/assets/eye-DEiYMLrO.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{file-up-DH-HiKEX.js → file-up-GoLKOXxO.js} +1 -1
- package/dist/runtime/dist/web/assets/file-up-GoLKOXxO.js.br +1 -0
- package/dist/runtime/dist/web/assets/file-up-GoLKOXxO.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{git-fork-PQOXxmWW.js → git-fork-CN41g1lF.js} +1 -1
- package/dist/runtime/dist/web/assets/git-fork-CN41g1lF.js.br +0 -0
- package/dist/runtime/dist/web/assets/git-fork-CN41g1lF.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{http-C2exCIpl.js → http-DEdzW08u.js} +1 -1
- package/dist/runtime/dist/web/assets/http-DEdzW08u.js.br +0 -0
- package/dist/runtime/dist/web/assets/http-DEdzW08u.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{list-Dj3WErnh.js → list-CA_o21oZ.js} +1 -1
- package/dist/runtime/dist/web/assets/list-CA_o21oZ.js.br +0 -0
- package/dist/runtime/dist/web/assets/list-CA_o21oZ.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{loader-circle-BXxJOPx-.js → loader-circle-2p_rsu6P.js} +1 -1
- package/dist/runtime/dist/web/assets/{lock-B1nhk71f.js → lock-BRsIxNP2.js} +1 -1
- package/dist/runtime/dist/web/assets/lock-BRsIxNP2.js.br +0 -0
- package/dist/runtime/dist/web/assets/lock-BRsIxNP2.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{person-mentions-BEjAedYZ.js → person-mentions-C7vQd7Vr.js} +1 -1
- package/dist/runtime/dist/web/assets/person-mentions-C7vQd7Vr.js.br +0 -0
- package/dist/runtime/dist/web/assets/person-mentions-C7vQd7Vr.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{plus-BtWrAD8F.js → plus-BNzHjmEg.js} +1 -1
- package/dist/runtime/dist/web/assets/{rotate-ccw-CSJ78xUE.js → rotate-ccw-CIMUmeuJ.js} +1 -1
- package/dist/runtime/dist/web/assets/rotate-ccw-CIMUmeuJ.js.br +0 -0
- package/dist/runtime/dist/web/assets/rotate-ccw-CIMUmeuJ.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{search-agWZofH1.js → search-CmIkt7xE.js} +1 -1
- package/dist/runtime/dist/web/assets/{session-D__Apnw9.js → session-BsshdoaV.js} +1 -1
- package/dist/runtime/dist/web/assets/session-BsshdoaV.js.br +0 -0
- package/dist/runtime/dist/web/assets/session-BsshdoaV.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{shelf-CeaX4iBg.js → shelf-DUXW45ap.js} +1 -1
- package/dist/runtime/dist/web/assets/shelf-DUXW45ap.js.br +0 -0
- package/dist/runtime/dist/web/assets/shelf-DUXW45ap.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{solid-app-BtmRR9Ax.js → solid-app-BNcsMwv4.js} +2 -2
- package/dist/runtime/dist/web/assets/solid-app-BNcsMwv4.js.br +0 -0
- package/dist/runtime/dist/web/assets/solid-app-BNcsMwv4.js.gz +0 -0
- package/dist/runtime/dist/web/assets/solid-app-DRAhiXqs.css +2 -0
- package/dist/runtime/dist/web/assets/solid-app-DRAhiXqs.css.br +0 -0
- package/dist/runtime/dist/web/assets/solid-app-DRAhiXqs.css.gz +0 -0
- package/dist/runtime/dist/web/assets/{undo-2-Di8QrlfX.js → undo-2--XbU60MY.js} +1 -1
- package/dist/runtime/dist/web/assets/undo-2--XbU60MY.js.br +0 -0
- package/dist/runtime/dist/web/assets/undo-2--XbU60MY.js.gz +0 -0
- package/dist/runtime/dist/web/assets/{users-BJrdLUkX.js → users-Bm0xpNrq.js} +1 -1
- package/dist/runtime/dist/web/assets/users-Bm0xpNrq.js.br +0 -0
- package/dist/runtime/dist/web/assets/users-Bm0xpNrq.js.gz +0 -0
- package/dist/runtime/dist/web/solid-app.html +2 -2
- package/dist/runtime/draft-compile-worker.mjs +10 -0
- package/dist/runtime/host.mjs +12 -2
- package/dist/runtime/lambda-page-runtime.js +1 -1
- package/dist/runtime/lib/build-assets/.server-reader-cache.json +1 -1
- package/dist/runtime/lib/build-assets/offline/.build-cache.json +10 -7
- package/dist/runtime/lib/build-assets/offline/manifest.json +4 -4
- package/dist/runtime/lib/build-assets/offline/solid.js.gz +0 -0
- package/dist/runtime/lib/build-assets/prepared-sources.sha256 +1 -1
- package/dist/runtime/pool-worker.mjs +3 -0
- package/dist/runtime/preview/{ScreenshotEditor-R3UODF65.js → ScreenshotEditor-LHC3JZSA.js} +1 -1
- package/dist/runtime/preview/{annotate-U27XXRZK.js → annotate-THM7GL72.js} +1 -1
- package/dist/runtime/preview/chrome.css +1 -1
- package/dist/runtime/preview/{chunk-7RMKAFBO.js → chunk-4O7LVK2Q.js} +1 -1
- package/dist/runtime/preview/chunk-7T3V6PAW.js +1 -0
- package/dist/runtime/preview/{chunk-3KKU74WM.js → chunk-RDT3C3F6.js} +1 -1
- package/dist/runtime/preview/client.js +13 -13
- package/dist/runtime/preview/connect.js +1 -0
- package/dist/runtime/preview/{dom-mounter-3OQN7G4J.js → dom-mounter-2URPGP2F.js} +1 -1
- package/dist/runtime/preview/{engine-I6R47UTB.js → engine-5UO3LPN5.js} +1 -1
- package/dist/runtime/preview/{selection-actions-426G2H4N.js → selection-actions-LBFPODLD.js} +1 -1
- package/dist/runtime/preview/{session-UFN5GQK2.js → session-A2Z3M7QD.js} +1 -1
- package/dist/runtime/preview/update-parts-ZLXTYSVY.js +1 -0
- package/dist/runtime/preview.mjs +74496 -74135
- package/dist/runtime/public/chat/install.ps1 +1 -1
- package/dist/runtime/public/chat/install.sh +1 -1
- package/dist/runtime/public/chat/release.json +1 -1
- package/dist/runtime/public/islands/{boot-74e9143aa374c62b.js → boot-281adc05179334e6.js} +1 -1
- package/dist/runtime/public/islands/boot-281adc05179334e6.js.br +0 -0
- package/dist/runtime/public/islands/boot-281adc05179334e6.js.gz +0 -0
- package/dist/runtime/public/islands/{chunk-51a4b62dc42f3594.js → chunk-1af2f1c5f3e99805.js} +1 -1
- package/dist/runtime/public/islands/chunk-1af2f1c5f3e99805.js.br +0 -0
- package/dist/runtime/public/islands/chunk-1af2f1c5f3e99805.js.gz +0 -0
- package/dist/runtime/public/islands/{chunk-f451297257164687.js → chunk-2f5d885a7394f865.js} +1 -1
- package/dist/runtime/public/islands/chunk-2f5d885a7394f865.js.br +0 -0
- package/dist/runtime/public/islands/{chunk-f451297257164687.js.gz → chunk-2f5d885a7394f865.js.gz} +0 -0
- package/dist/runtime/public/islands/{chunk-68a083200dbd5bf7.js → chunk-3cb86bf7badbd2c3.js} +1 -1
- package/dist/runtime/public/islands/chunk-3cb86bf7badbd2c3.js.br +0 -0
- package/dist/runtime/public/islands/chunk-3cb86bf7badbd2c3.js.gz +0 -0
- package/dist/runtime/public/islands/{chunk-adcd632c8be50ba7.js → chunk-5e05b99cb275660b.js} +1 -1
- package/dist/runtime/public/islands/chunk-5e05b99cb275660b.js.br +0 -0
- package/dist/runtime/public/islands/{chunk-adcd632c8be50ba7.js.gz → chunk-5e05b99cb275660b.js.gz} +0 -0
- package/dist/runtime/public/islands/{chunk-e817ee4addba2d95.js → chunk-d924d4620b11b893.js} +1 -1
- package/dist/runtime/public/islands/chunk-d924d4620b11b893.js.br +0 -0
- package/dist/runtime/public/islands/chunk-d924d4620b11b893.js.gz +0 -0
- package/dist/runtime/public/islands/{chunk-1fa28532f51beb9c.js → chunk-dfe07cc2b19c50cc.js} +1 -1
- package/dist/runtime/public/islands/{frame-editor-6b8a50886fff8604.js → frame-editor-66b0c0d98283e912.js} +1 -1
- package/dist/runtime/public/islands/frame-editor-66b0c0d98283e912.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-66b0c0d98283e912.js.gz +0 -0
- package/dist/runtime/public/islands/{frame-editor-chunk-87b0311faf57261c.js → frame-editor-chunk-091e41cba1670be1.js} +1 -1
- package/dist/runtime/public/islands/frame-editor-chunk-091e41cba1670be1.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-091e41cba1670be1.js.gz +0 -0
- package/dist/runtime/public/islands/{frame-editor-chunk-69c553d9c4562981.js → frame-editor-chunk-5ea52db3a6d93294.js} +1 -1
- package/dist/runtime/public/islands/frame-editor-chunk-5ea52db3a6d93294.js.br +2 -0
- package/dist/runtime/public/islands/frame-editor-chunk-5ea52db3a6d93294.js.gz +0 -0
- package/dist/runtime/public/islands/{frame-editor-chunk-c2b9018371100824.js → frame-editor-chunk-a6db6db210776f5c.js} +1 -1
- package/dist/runtime/public/islands/frame-editor-chunk-a6db6db210776f5c.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-a6db6db210776f5c.js.gz +0 -0
- package/dist/runtime/public/islands/{frame-editor-chunk-a13dce46b9b8401f.js → frame-editor-chunk-c9facbfeee3c9bed.js} +1 -1
- package/dist/runtime/public/islands/frame-editor-chunk-c9facbfeee3c9bed.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-c9facbfeee3c9bed.js.gz +0 -0
- package/dist/runtime/public/islands/{frame-editor-chunk-b06f17fc7dae17e8.js → frame-editor-chunk-d6c77179f72db0ab.js} +1 -1
- package/dist/runtime/public/islands/frame-editor-chunk-d6c77179f72db0ab.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-d6c77179f72db0ab.js.gz +0 -0
- package/dist/runtime/public/islands/{image-map-a9f95f7e8d0712c1.js → image-map-7419ab54ff59434a.js} +1 -1
- package/dist/runtime/public/islands/image-map-7419ab54ff59434a.js.br +0 -0
- package/dist/runtime/public/islands/image-map-7419ab54ff59434a.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-basic-cbabcc4b41d6132a.js → kit-basic-c22b54dcd2ea6161.js} +1 -1
- package/dist/runtime/public/islands/kit-basic-c22b54dcd2ea6161.js.br +2 -0
- package/dist/runtime/public/islands/kit-basic-c22b54dcd2ea6161.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-cells-cefbceccdfd0dbe0.js → kit-cells-55ade213f1751716.js} +1 -1
- package/dist/runtime/public/islands/kit-cells-55ade213f1751716.js.br +0 -0
- package/dist/runtime/public/islands/kit-cells-55ade213f1751716.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-controls-81d17a10f9d457f2.js → kit-controls-4f1b98d7d87c4b21.js} +1 -1
- package/dist/runtime/public/islands/kit-controls-4f1b98d7d87c4b21.js.br +0 -0
- package/dist/runtime/public/islands/kit-controls-4f1b98d7d87c4b21.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-data-43947f36f1c501aa.js → kit-data-e1012fd12092b177.js} +1 -1
- package/dist/runtime/public/islands/kit-data-e1012fd12092b177.js.br +0 -0
- package/dist/runtime/public/islands/kit-data-e1012fd12092b177.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-dialog-eedc51ce82feec4b.js → kit-dialog-1e427336472b2906.js} +1 -1
- package/dist/runtime/public/islands/kit-dialog-1e427336472b2906.js.br +0 -0
- package/dist/runtime/public/islands/kit-dialog-1e427336472b2906.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-embed-3c8886cbfa06f74d.js → kit-embed-c7019820c5200806.js} +1 -1
- package/dist/runtime/public/islands/kit-embed-c7019820c5200806.js.br +0 -0
- package/dist/runtime/public/islands/kit-embed-c7019820c5200806.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-files-b7a2cb758f00a68b.js → kit-files-dc0b71ca71f2151c.js} +1 -1
- package/dist/runtime/public/islands/kit-files-dc0b71ca71f2151c.js.br +0 -0
- package/dist/runtime/public/islands/kit-files-dc0b71ca71f2151c.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-image-126e12fcae4215c1.js → kit-image-b31acf4d31a4eeaf.js} +1 -1
- package/dist/runtime/public/islands/kit-image-b31acf4d31a4eeaf.js.br +0 -0
- package/dist/runtime/public/islands/kit-image-b31acf4d31a4eeaf.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-people-5b6f5dd4aa82b657.js → kit-people-6feb1b730c5fd37f.js} +1 -1
- package/dist/runtime/public/islands/kit-people-6feb1b730c5fd37f.js.br +0 -0
- package/dist/runtime/public/islands/kit-people-6feb1b730c5fd37f.js.gz +0 -0
- package/dist/runtime/public/islands/{kit-static-28174bd8f593f8c0.js → kit-static-853aed2cd04c1b4a.js} +1 -1
- package/dist/runtime/public/islands/kit-static-853aed2cd04c1b4a.js.br +0 -0
- package/dist/runtime/public/islands/kit-static-853aed2cd04c1b4a.js.gz +0 -0
- package/dist/runtime/public/islands/manifest.json +211 -211
- package/dist/runtime/public/islands/manifest.json.br +0 -0
- package/dist/runtime/public/islands/manifest.json.gz +0 -0
- package/dist/runtime/public/islands/{morph-engine-4e664485be475dbf.js → morph-engine-c61693caf767d9bd.js} +1 -1
- package/dist/runtime/public/islands/morph-engine-c61693caf767d9bd.js.br +0 -0
- package/dist/runtime/public/islands/morph-engine-c61693caf767d9bd.js.gz +0 -0
- package/dist/runtime/public/islands/offline-ba3717e06bc69a4e.json.gzip +0 -0
- package/dist/runtime/public/islands/{page-5f87c34c7c181387.js → page-c3ae4acf0988c2b6.js} +1 -1
- package/dist/runtime/public/islands/page-c3ae4acf0988c2b6.js.br +0 -0
- package/dist/runtime/public/islands/page-c3ae4acf0988c2b6.js.gz +0 -0
- package/dist/runtime/public/islands/{rt-30ff0d94ee3732a1.js → rt-2ab0fed85481c574.js} +1 -1
- package/dist/runtime/public/islands/rt-2ab0fed85481c574.js.br +0 -0
- package/dist/runtime/public/islands/rt-2ab0fed85481c574.js.gz +0 -0
- package/dist/runtime/public/islands/{sqlite-engine-9fc56fea8b1e2aaf.js → sqlite-engine-f3956693df7cfa5c.js} +8 -8
- package/dist/runtime/public/islands/sqlite-engine-f3956693df7cfa5c.js.br +0 -0
- package/dist/runtime/public/islands/sqlite-engine-f3956693df7cfa5c.js.gz +0 -0
- package/dist/runtime/public/islands/{ssr-456cabbcb26f723d.js → ssr-ce6931fb7bda9b08.js} +3 -0
- package/dist/runtime/public/islands/ssr-ce6931fb7bda9b08.js.br +0 -0
- package/dist/runtime/public/islands/ssr-ce6931fb7bda9b08.js.gz +0 -0
- package/dist/runtime/public/islands/{url-sync-74b5212f7b3417d7.js → url-sync-b179b054c9d958a7.js} +1 -1
- package/dist/runtime/public/islands/url-sync-b179b054c9d958a7.js.br +0 -0
- package/dist/runtime/public/islands/url-sync-b179b054c9d958a7.js.gz +0 -0
- package/dist/share/man/man1/afbin.1 +6 -4
- package/dist/skills/artifactbin/references/commands.md +4 -2
- package/dist/skills/artifactbin/references/publishing.md +5 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/runtime/dist/web/assets/Account-CvOF6jpD.js.br +0 -0
- package/dist/runtime/dist/web/assets/Account-CvOF6jpD.js.gz +0 -0
- package/dist/runtime/dist/web/assets/ArtifactAddress-DORDne01.js.br +0 -0
- package/dist/runtime/dist/web/assets/ArtifactAddress-DORDne01.js.gz +0 -0
- package/dist/runtime/dist/web/assets/ArtifactData-BdL9R2dA.js.br +0 -0
- package/dist/runtime/dist/web/assets/ArtifactData-BdL9R2dA.js.gz +0 -0
- package/dist/runtime/dist/web/assets/ArtifactEditor-BZXbOk_F.js.br +0 -0
- package/dist/runtime/dist/web/assets/ArtifactEditor-BZXbOk_F.js.gz +0 -0
- package/dist/runtime/dist/web/assets/AssetPageHeader-DX2RcYTv.js.br +0 -0
- package/dist/runtime/dist/web/assets/AssetPageHeader-DX2RcYTv.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Assets-dgdXIgAW.js.br +0 -0
- package/dist/runtime/dist/web/assets/Assets-dgdXIgAW.js.gz +0 -0
- package/dist/runtime/dist/web/assets/AvatarCircle-MNnIhRvg.js.br +0 -0
- package/dist/runtime/dist/web/assets/AvatarCircle-MNnIhRvg.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Chat-V1ku1-60.js.br +0 -0
- package/dist/runtime/dist/web/assets/Chat-V1ku1-60.js.gz +0 -0
- package/dist/runtime/dist/web/assets/ConfirmDialog-Ph1VDgNN.js.br +0 -0
- package/dist/runtime/dist/web/assets/ConfirmDialog-Ph1VDgNN.js.gz +0 -0
- package/dist/runtime/dist/web/assets/DatasetCatalogView-DBJEPKFI.js.br +0 -0
- package/dist/runtime/dist/web/assets/DatasetCatalogView-DBJEPKFI.js.gz +0 -0
- package/dist/runtime/dist/web/assets/DatasetEditor-CMqN1duq.js.br +0 -0
- package/dist/runtime/dist/web/assets/DatasetEditor-CMqN1duq.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Docs-DVoW7b7v.js.br +0 -0
- package/dist/runtime/dist/web/assets/Docs-DVoW7b7v.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Document-udhy5mlX.js.br +0 -0
- package/dist/runtime/dist/web/assets/Document-udhy5mlX.js.gz +0 -0
- package/dist/runtime/dist/web/assets/DocumentChrome-EUbW_JvA.js.br +0 -0
- package/dist/runtime/dist/web/assets/DocumentChrome-EUbW_JvA.js.gz +0 -0
- package/dist/runtime/dist/web/assets/DocumentSharing-BuTXuflA.js.br +0 -0
- package/dist/runtime/dist/web/assets/DocumentSharing-BuTXuflA.js.gz +0 -0
- package/dist/runtime/dist/web/assets/FileUpload-D6RTOrHD.js.br +0 -0
- package/dist/runtime/dist/web/assets/FileUpload-D6RTOrHD.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Folder-DoNsFB2I.js.br +0 -0
- package/dist/runtime/dist/web/assets/Folder-DoNsFB2I.js.gz +0 -0
- package/dist/runtime/dist/web/assets/ForkArtifact-DDmXl1BZ.js.br +0 -0
- package/dist/runtime/dist/web/assets/ForkArtifact-DDmXl1BZ.js.gz +0 -0
- package/dist/runtime/dist/web/assets/GetStarted-YjltMEeN.js.br +0 -0
- package/dist/runtime/dist/web/assets/GetStarted-YjltMEeN.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Home-DijnltFZ.js.br +0 -0
- package/dist/runtime/dist/web/assets/Home-DijnltFZ.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Login-DLwn4aUr.js.br +0 -0
- package/dist/runtime/dist/web/assets/Login-DLwn4aUr.js.gz +0 -0
- package/dist/runtime/dist/web/assets/NotFound-svz4wCeL.js.br +0 -0
- package/dist/runtime/dist/web/assets/NotFound-svz4wCeL.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Notifications-BGeJKv2W.js.br +0 -0
- package/dist/runtime/dist/web/assets/Notifications-BGeJKv2W.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Profile-B38GeCbR.js.br +0 -0
- package/dist/runtime/dist/web/assets/Profile-B38GeCbR.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Program-D3-Gfvjo.js.br +0 -0
- package/dist/runtime/dist/web/assets/Program-D3-Gfvjo.js.gz +0 -0
- package/dist/runtime/dist/web/assets/RowMenu-J4Gbci3B.js.br +0 -0
- package/dist/runtime/dist/web/assets/RowMenu-J4Gbci3B.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Schedules-DK3-YUvJ.js +0 -1
- package/dist/runtime/dist/web/assets/Schedules-DK3-YUvJ.js.br +0 -0
- package/dist/runtime/dist/web/assets/Schedules-DK3-YUvJ.js.gz +0 -0
- package/dist/runtime/dist/web/assets/ScreenshotEditor-CUmN5F2q.js.br +0 -0
- package/dist/runtime/dist/web/assets/ScreenshotEditor-CUmN5F2q.js.gz +0 -0
- package/dist/runtime/dist/web/assets/ShareLink-n8KhtnaI.js.br +0 -0
- package/dist/runtime/dist/web/assets/ShareLink-n8KhtnaI.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Shelf-BgwHOaeW.js.br +0 -0
- package/dist/runtime/dist/web/assets/Shelf-BgwHOaeW.js.gz +0 -0
- package/dist/runtime/dist/web/assets/SocialPreviewEditor-DwHHRW29.js.br +0 -0
- package/dist/runtime/dist/web/assets/SocialPreviewEditor-DwHHRW29.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Starter-I01MNooi.js.br +0 -0
- package/dist/runtime/dist/web/assets/Starter-I01MNooi.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Trash-Cu0KXeW7.js.br +0 -0
- package/dist/runtime/dist/web/assets/Trash-Cu0KXeW7.js.gz +0 -0
- package/dist/runtime/dist/web/assets/Welcome-B8iPt_Nh.js.br +0 -0
- package/dist/runtime/dist/web/assets/Welcome-B8iPt_Nh.js.gz +0 -0
- package/dist/runtime/dist/web/assets/WorkspaceLayout-fF_ot7EK.js.br +0 -0
- package/dist/runtime/dist/web/assets/WorkspaceLayout-fF_ot7EK.js.gz +0 -0
- package/dist/runtime/dist/web/assets/browser-artifact-write-ZsGe-hXr.js.br +0 -0
- package/dist/runtime/dist/web/assets/browser-artifact-write-ZsGe-hXr.js.gz +0 -0
- package/dist/runtime/dist/web/assets/copy-PNNAtmJH.js.br +0 -0
- package/dist/runtime/dist/web/assets/copy-PNNAtmJH.js.gz +0 -0
- package/dist/runtime/dist/web/assets/database-CKOnpvwb.js.br +0 -3
- package/dist/runtime/dist/web/assets/database-CKOnpvwb.js.gz +0 -0
- package/dist/runtime/dist/web/assets/document-update-client-DUF0zs2Z.js.br +0 -0
- package/dist/runtime/dist/web/assets/document-update-client-DUF0zs2Z.js.gz +0 -0
- package/dist/runtime/dist/web/assets/dom-mounter-64phOf1s.js.br +0 -0
- package/dist/runtime/dist/web/assets/dom-mounter-64phOf1s.js.gz +0 -0
- package/dist/runtime/dist/web/assets/download-j-nqks7p.js.br +0 -0
- package/dist/runtime/dist/web/assets/download-j-nqks7p.js.gz +0 -0
- package/dist/runtime/dist/web/assets/eye-BNpzRKAK.js.br +0 -0
- package/dist/runtime/dist/web/assets/eye-BNpzRKAK.js.gz +0 -0
- package/dist/runtime/dist/web/assets/file-up-DH-HiKEX.js.br +0 -0
- package/dist/runtime/dist/web/assets/file-up-DH-HiKEX.js.gz +0 -0
- package/dist/runtime/dist/web/assets/git-fork-PQOXxmWW.js.br +0 -0
- package/dist/runtime/dist/web/assets/git-fork-PQOXxmWW.js.gz +0 -0
- package/dist/runtime/dist/web/assets/http-C2exCIpl.js.br +0 -0
- package/dist/runtime/dist/web/assets/http-C2exCIpl.js.gz +0 -0
- package/dist/runtime/dist/web/assets/list-Dj3WErnh.js.br +0 -0
- package/dist/runtime/dist/web/assets/list-Dj3WErnh.js.gz +0 -0
- package/dist/runtime/dist/web/assets/lock-B1nhk71f.js.br +0 -0
- package/dist/runtime/dist/web/assets/lock-B1nhk71f.js.gz +0 -0
- package/dist/runtime/dist/web/assets/person-mentions-BEjAedYZ.js.br +0 -0
- package/dist/runtime/dist/web/assets/person-mentions-BEjAedYZ.js.gz +0 -0
- package/dist/runtime/dist/web/assets/rotate-ccw-CSJ78xUE.js.br +0 -0
- package/dist/runtime/dist/web/assets/rotate-ccw-CSJ78xUE.js.gz +0 -0
- package/dist/runtime/dist/web/assets/session-D__Apnw9.js.br +0 -0
- package/dist/runtime/dist/web/assets/session-D__Apnw9.js.gz +0 -0
- package/dist/runtime/dist/web/assets/shelf-CeaX4iBg.js.br +0 -0
- package/dist/runtime/dist/web/assets/shelf-CeaX4iBg.js.gz +0 -0
- package/dist/runtime/dist/web/assets/solid-app-BmdFnFpX.css +0 -2
- package/dist/runtime/dist/web/assets/solid-app-BmdFnFpX.css.br +0 -0
- package/dist/runtime/dist/web/assets/solid-app-BmdFnFpX.css.gz +0 -0
- package/dist/runtime/dist/web/assets/solid-app-BtmRR9Ax.js.br +0 -0
- package/dist/runtime/dist/web/assets/solid-app-BtmRR9Ax.js.gz +0 -0
- package/dist/runtime/dist/web/assets/undo-2-Di8QrlfX.js.br +0 -0
- package/dist/runtime/dist/web/assets/undo-2-Di8QrlfX.js.gz +0 -0
- package/dist/runtime/dist/web/assets/users-BJrdLUkX.js.br +0 -0
- package/dist/runtime/dist/web/assets/users-BJrdLUkX.js.gz +0 -0
- package/dist/runtime/preview/update-parts-OJC3ZSRW.js +0 -1
- package/dist/runtime/public/islands/boot-74e9143aa374c62b.js.br +0 -0
- package/dist/runtime/public/islands/boot-74e9143aa374c62b.js.gz +0 -0
- package/dist/runtime/public/islands/chunk-51a4b62dc42f3594.js.br +0 -0
- package/dist/runtime/public/islands/chunk-51a4b62dc42f3594.js.gz +0 -0
- package/dist/runtime/public/islands/chunk-68a083200dbd5bf7.js.br +0 -0
- package/dist/runtime/public/islands/chunk-68a083200dbd5bf7.js.gz +0 -0
- package/dist/runtime/public/islands/chunk-adcd632c8be50ba7.js.br +0 -0
- package/dist/runtime/public/islands/chunk-e817ee4addba2d95.js.br +0 -0
- package/dist/runtime/public/islands/chunk-e817ee4addba2d95.js.gz +0 -0
- package/dist/runtime/public/islands/chunk-f451297257164687.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-6b8a50886fff8604.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-6b8a50886fff8604.js.gz +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-69c553d9c4562981.js.br +0 -1
- package/dist/runtime/public/islands/frame-editor-chunk-69c553d9c4562981.js.gz +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-87b0311faf57261c.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-87b0311faf57261c.js.gz +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-a13dce46b9b8401f.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-a13dce46b9b8401f.js.gz +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-b06f17fc7dae17e8.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-b06f17fc7dae17e8.js.gz +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-c2b9018371100824.js.br +0 -0
- package/dist/runtime/public/islands/frame-editor-chunk-c2b9018371100824.js.gz +0 -0
- package/dist/runtime/public/islands/image-map-a9f95f7e8d0712c1.js.br +0 -0
- package/dist/runtime/public/islands/image-map-a9f95f7e8d0712c1.js.gz +0 -0
- package/dist/runtime/public/islands/kit-basic-cbabcc4b41d6132a.js.br +0 -0
- package/dist/runtime/public/islands/kit-basic-cbabcc4b41d6132a.js.gz +0 -0
- package/dist/runtime/public/islands/kit-cells-cefbceccdfd0dbe0.js.br +0 -0
- package/dist/runtime/public/islands/kit-cells-cefbceccdfd0dbe0.js.gz +0 -0
- package/dist/runtime/public/islands/kit-controls-81d17a10f9d457f2.js.br +0 -0
- package/dist/runtime/public/islands/kit-controls-81d17a10f9d457f2.js.gz +0 -0
- package/dist/runtime/public/islands/kit-data-43947f36f1c501aa.js.br +0 -0
- package/dist/runtime/public/islands/kit-data-43947f36f1c501aa.js.gz +0 -0
- package/dist/runtime/public/islands/kit-dialog-eedc51ce82feec4b.js.br +0 -0
- package/dist/runtime/public/islands/kit-dialog-eedc51ce82feec4b.js.gz +0 -0
- package/dist/runtime/public/islands/kit-embed-3c8886cbfa06f74d.js.br +0 -0
- package/dist/runtime/public/islands/kit-embed-3c8886cbfa06f74d.js.gz +0 -0
- package/dist/runtime/public/islands/kit-files-b7a2cb758f00a68b.js.br +0 -0
- package/dist/runtime/public/islands/kit-files-b7a2cb758f00a68b.js.gz +0 -0
- package/dist/runtime/public/islands/kit-image-126e12fcae4215c1.js.br +0 -0
- package/dist/runtime/public/islands/kit-image-126e12fcae4215c1.js.gz +0 -0
- package/dist/runtime/public/islands/kit-people-5b6f5dd4aa82b657.js.br +0 -0
- package/dist/runtime/public/islands/kit-people-5b6f5dd4aa82b657.js.gz +0 -0
- package/dist/runtime/public/islands/kit-static-28174bd8f593f8c0.js.br +0 -0
- package/dist/runtime/public/islands/kit-static-28174bd8f593f8c0.js.gz +0 -0
- package/dist/runtime/public/islands/morph-engine-4e664485be475dbf.js.br +0 -0
- package/dist/runtime/public/islands/morph-engine-4e664485be475dbf.js.gz +0 -0
- package/dist/runtime/public/islands/offline-4446a94ed9f706c3.json.gzip +0 -0
- package/dist/runtime/public/islands/page-5f87c34c7c181387.js.br +0 -0
- package/dist/runtime/public/islands/page-5f87c34c7c181387.js.gz +0 -0
- package/dist/runtime/public/islands/rt-30ff0d94ee3732a1.js.br +0 -0
- package/dist/runtime/public/islands/rt-30ff0d94ee3732a1.js.gz +0 -0
- package/dist/runtime/public/islands/sqlite-engine-9fc56fea8b1e2aaf.js.br +0 -0
- package/dist/runtime/public/islands/sqlite-engine-9fc56fea8b1e2aaf.js.gz +0 -0
- package/dist/runtime/public/islands/ssr-456cabbcb26f723d.js.br +0 -0
- package/dist/runtime/public/islands/ssr-456cabbcb26f723d.js.gz +0 -0
- package/dist/runtime/public/islands/url-sync-74b5212f7b3417d7.js.br +0 -0
- package/dist/runtime/public/islands/url-sync-74b5212f7b3417d7.js.gz +0 -0
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ArtifactAddress-
|
|
2
|
-
import{F as e,M as t,O as n,T as r,_ as i,a,b as o,k as s,l as c,o as l,p as u,s as d,u as f}from"./web-Ckpee-ZJ.js";import{a as p,i as m,n as h,t as g}from"./shelf-CeaX4iBg.js";import{t as _}from"./list-Dj3WErnh.js";import{t as v}from"./search-agWZofH1.js";import{$ as y,K as b,M as x,Y as S,Z as C,l as ee,lt as w,pt as T,s as E,t as D,tt as O}from"./solid-app-BtmRR9Ax.js";import{n as k}from"./sign-in-required-7zEVbzx2.js";import{NotFoundPage as A}from"./NotFound-svz4wCeL.js";import{i as j,n as M,r as N}from"./urls-DtkapM59.js";var P=u(`<main aria-label="Loading page"role=status class="mx-auto max-w-4xl px-4 py-10">Loading profile…`),F=u(`<button type=button aria-label="Retry profile">Could not refresh profile. Retry`),I=u(`<main class="mx-auto max-w-4xl px-4 pt-10 pb-24"><header class="reveal mb-8"><p class="font-mono text-[10px] font-semibold uppercase tracking-[0.14em] text-accent">public index</p><div class="mt-2 flex items-center gap-3"><h1 class="flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-3xl font-semibold tracking-tight text-fg"><a aria-label="Profile root"class="min-w-0 no-underline transition-colors hover:text-accent"><span class=text-accent>@</span></a></h1></div><p class="mt-3 font-mono text-xs text-muted"> public artifact`),L=u(`<p class="reveal font-mono text-sm text-muted"><span class=text-accent>$</span> nothing here yet<span class="caret text-accent">▍`),R=u(`<span class="rounded bg-raised px-1.5 py-0.5 font-mono text-[11px] text-muted">Follows you`),z=u(`<button type=button class="rounded-full border border-fg px-4 py-1.5 text-sm font-semibold">`),B=u(`<p class="text-xs text-muted">Followed by `),V=u(`<div role=group aria-label=Follows class="mt-3 flex flex-col gap-2"><div class="flex flex-wrap items-center gap-x-4 gap-y-2"><p class="flex flex-wrap items-center gap-x-3 text-sm text-muted"><span><strong class=text-fg></strong> Following</span><span><strong class=text-fg></strong> `),H=u(`<a aria-label=Follow class="rounded-full border border-fg bg-fg px-4 py-1.5 text-sm font-semibold text-bg">Follow`),U=u(`<a>`),W=u(`<p aria-label="No matches"class="font-mono text-xs text-faint">nothing matches the active search`),G=u(`<section aria-label=Folders><h2 class="mb-2 font-mono text-[10px] uppercase tracking-[0.13em] text-muted">folders</h2><ul class="grid grid-cols-2 gap-3 lg:grid-cols-4">`),K=u(`<div aria-label="Artifact grid"role=region class="flex flex-col gap-7">`),q=u(`<section aria-label=Shelf class="flex flex-col gap-4"><div class="flex items-center gap-2 rounded-[6px] border border-edge bg-surface px-3 py-1.5"><input aria-label="Search artifacts"placeholder="search artifacts"class="h-7 min-w-0 flex-1 border-0 bg-transparent font-mono text-xs text-fg focus:outline-none"><div role=group aria-label="Shelf view"class="ml-auto flex border-l border-edge pl-1.5"><button type=button aria-label="Grid view"class="h-7 w-8"></button><button type=button aria-label="List view"class="h-7 w-8">`),J=u(`<div aria-label="Artifact list"role=region>`),Y=u(`<a rel=external class="flex items-center justify-between border-b border-edge py-3 text-sm text-fg no-underline"><span></span><span class="font-mono text-xs text-muted">`),X=u(`<li class="rounded-md border border-edge p-3"><a rel=external class="block text-sm font-semibold text-fg no-underline">`),Z=u(`<section><h2 class="mb-2.5 font-mono text-[10px] uppercase tracking-[0.13em] text-muted"></h2><ul class="grid grid-cols-2 gap-2 sm:gap-5 lg:grid-cols-4">`),Q=u(`<p class="line-clamp-2 text-center text-xs text-muted">`),te=u(`<li class="reveal group relative flex min-w-0 flex-col rounded-md p-1 transition-colors hover:bg-raised/60 sm:p-2"><a rel=external class="block no-underline"><div class="aspect-[5/3] rounded-[4px] border border-edge bg-raised shadow-sm"style=background-position:center;background-size:cover></div><span class="mt-2 block text-center font-mono text-[13px] font-semibold text-fg">`),ne=e(()=>D(()=>import(`./ArtifactAddress-DORDne01.js`).then(e=>({default:e.ArtifactAddressRoute})),__vite__mapDeps([0,1,2,3,4,5]))),re=e(()=>D(()=>import(`./Document-udhy5mlX.js`).then(e=>({default:e.DocumentPage})),__vite__mapDeps([6,1,7,2,3,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,5])));function $(){let e=O(),t=y(),n=()=>`/${e.user}`,i=b(()=>`/api/page/profile/${encodeURIComponent(e.user??``)}`,{seed:()=>T(t.pathname,`profile`)});return r(o,{get when(){return i.data()},get fallback(){return r(o,{get when(){return i.error()},get fallback(){return P()},get children(){return r(A,{})}})},children:e=>r(o,{get when(){return d(()=>e().kind===`public-profile`)()&&e().handle},get fallback(){return d(()=>!!(e().kind===`redirect`&&e().to))()?r(C,{get href(){return e().to}}):r(A,{})},get children(){var t=I(),a=t.firstChild,u=a.firstChild.nextSibling,f=u.firstChild,p=f.firstChild;p.firstChild;var m=u.nextSibling,h=m.firstChild;return l(t,r(o,{get when(){return i.error()},get children(){var e=F();return e.$$click=()=>void i.refresh(!0),e}}),a),l(u,r(o,{get when(){return e().owner},get children(){return r(E,{get userId(){return e().owner.id},get image(){return e().owner.image??null},get initial(){return e().handle},size:48})}}),f),l(p,()=>e().handle,null),l(a,r(o,{get when(){return d(()=>!!e().owner)()&&e().social},get children(){return r(ae,{get ownerId(){return e().owner.id},get social(){return e().social},get signedIn(){return!!e().authed}})}}),m),l(m,()=>(e().files??[]).filter(e=>e.format===`markup`||e.format===`folder`).length,h),l(m,()=>(e().files??[]).filter(e=>e.format===`markup`||e.format===`folder`).length===1?``:`s`,null),l(t,r(o,{get when(){return e().files?.length},get fallback(){return L()},get children(){return r(oe,{get handle(){return e().handle},get rows(){return e().files}})}}),null),s(()=>c(p,`href`,n())),t}})})}function ie(){let e=O(),t=y(),i=n(()=>!(e.rest??``).split(`/`).filter(Boolean).length),a=n(()=>/\/edit\/?$/.test(t.pathname)),s=n(()=>j(M(e.rest??``).split(`/`).filter(Boolean))?.id??null);return r(o,{get when(){return!i()},get fallback(){return r($,{})},get children(){return r(o,{get when(){return s()},get fallback(){return r(A,{})},children:e=>r(o,{get when(){return w()},get fallback(){return r(ne,{get id(){return e()},get editing(){return a()}})},get children(){return r(re,{})}})})}})}function ae(e){let[n,a]=t(e.social.relation?.youFollow??!1),[u,d]=t(e.social.followers),[f,p]=t(!1),m=!1,h=async()=>{if(!m){m=!0,p(!0);try{let t=await ee(`/api/users/${e.ownerId}/follow`,n()?`DELETE`:`POST`);if(await k(t)){window.location.assign(x(window.location));return}if(t.ok){let e=await t.json();a(e.following),d(e.count),S()}}catch{}finally{m=!1,p(!1)}}},g=()=>n()?`Following`:e.social.relation?.followsYou?`Follow back`:`Follow`;return(()=>{var t=V(),a=t.firstChild,d=a.firstChild,p=d.firstChild,m=p.firstChild,_=p.nextSibling,v=_.firstChild;return v.nextSibling,l(m,()=>e.social.following.toLocaleString(`en-US`)),l(v,()=>u().toLocaleString(`en-US`)),l(_,()=>u()===1?`Follower`:`Followers`,null),l(d,r(o,{get when(){return e.social.relation?.followsYou},get children(){return R()}}),null),l(a,r(o,{get when(){return e.social.relation||!e.signedIn},get children(){return r(o,{get when(){return e.signedIn},get fallback(){return(()=>{var e=H();return s(()=>c(e,`href`,x(window.location))),e})()},get children(){var e=z();return e.$$click=()=>void h(),l(e,g),s(t=>{var r=g(),i=n(),a=f();return r!==t.e&&c(e,`aria-label`,t.e=r),i!==t.t&&c(e,`aria-pressed`,t.t=i),a!==t.a&&(e.disabled=t.a=a),t},{e:void 0,t:void 0,a:void 0}),e}})}}),null),l(t,r(o,{get when(){return e.social.relation?.knownTotal},get children(){var t=B();return t.firstChild,l(t,r(i,{get each(){return e.social.relation?.known},children:(e,t)=>[r(o,{get when(){return t()>0},children:`, `}),(()=>{var t=U();return l(t,()=>e.username),s(()=>c(t,`href`,`/@${e.username}`)),t})()]}),null),t}}),null),t})()}function oe(e){let[a,u]=t(``),[y,b]=t((()=>{try{return localStorage.getItem(`artifactbin:shelf-view`)===`list`?`list`:`grid`}catch{return`grid`}})()),x=e=>{b(e);try{localStorage.setItem(`artifactbin:shelf-view`,e)}catch{}},S=n(()=>g(e.rows.filter(e=>(e.format===`markup`||e.format===`folder`)&&`${e.title??``} ${e.description??``} ${e.format}`.toLowerCase().includes(a().trim().toLowerCase())))),C=t=>N(t,e.handle);return(()=>{var e=q(),t=e.firstChild,n=t.firstChild,g=n.nextSibling.firstChild,b=g.nextSibling;return l(t,r(v,{size:13,class:`text-faint`}),n),n.$$input=e=>u(e.currentTarget.value),g.$$click=()=>x(`grid`),l(g,r(m,{size:14})),b.$$click=()=>x(`list`),l(b,r(_,{size:14})),l(e,r(o,{get when(){return d(()=>!!a())()&&S().documents.length+S().folders.length===0},get children(){return W()}}),null),l(e,r(o,{get when(){return y()===`grid`},get fallback(){return(()=>{var e=J();return l(e,r(i,{get each(){return[...S().folders,...S().documents]},children:e=>(()=>{var t=Y(),n=t.firstChild,r=n.nextSibling;return l(n,()=>e.title??`Untitled`),l(r,()=>new Date(e.updated_at).toLocaleDateString(`en-US`)),s(n=>{var r=C(e),i=`Open ${e.title??e.id}`;return r!==n.e&&c(t,`href`,n.e=r),i!==n.t&&c(t,`aria-label`,n.t=i),n},{e:void 0,t:void 0}),t})()})),e})()},get children(){return[r(o,{get when(){return S().folders.length},get children(){var e=G(),t=e.firstChild.nextSibling;return l(t,r(i,{get each(){return S().folders},children:e=>(()=>{var t=X(),n=t.firstChild;return l(n,r(p,{size:24,class:`mb-4 text-accent`}),null),l(n,()=>e.title??`Untitled`,null),s(t=>{var r=C(e),i=`Open folder ${e.title??e.id}`;return r!==t.e&&c(n,`href`,t.e=r),i!==t.t&&c(n,`aria-label`,t.t=i),t},{e:void 0,t:void 0}),t})()})),e}}),(()=>{var e=K();return l(e,r(i,{get each(){return h(S().documents)},children:e=>(()=>{var t=Z(),n=t.firstChild,a=n.nextSibling;return l(n,()=>e.label),l(a,r(i,{get each(){return e.rows},children:e=>(()=>{var t=te(),n=t.firstChild,i=n.firstChild,a=i.nextSibling;return l(a,()=>e.title??`Untitled`),l(t,r(o,{get when(){return e.description},get children(){var t=Q();return l(t,()=>e.description),t}}),null),s(t=>{var r=C(e),a=`Open ${e.title??e.id}`,o=`url(/a/${e.id}/export?format=jpg&mode=card&v=${e.version})`;return r!==t.e&&c(n,`href`,t.e=r),a!==t.t&&c(n,`aria-label`,t.t=a),o!==t.a&&f(i,`background-image`,t.a=o),t},{e:void 0,t:void 0,a:void 0}),t})()})),s(()=>c(t,`aria-label`,`${e.label} artifacts`)),t})()})),e})()]}}),null),s(t=>{var n=y(),r=y()===`grid`,i=y()===`list`;return n!==t.e&&c(e,`data-shelf-view`,t.e=n),r!==t.t&&c(g,`aria-pressed`,t.t=r),i!==t.a&&c(b,`aria-pressed`,t.a=i),t},{e:void 0,t:void 0,a:void 0}),s(()=>n.value=a()),e})()}a([`click`,`input`]);export{ie as ProfileAliasRoute,$ as ProfilePage};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ArtifactAddress-1ftOG9A5.js","assets/web-Ckpee-ZJ.js","assets/solid-app-BNcsMwv4.js","assets/solid-app-DRAhiXqs.css","assets/document-navigation-CED4GpXl.js","assets/NotFound-D2MOGkIO.js","assets/Document-C6-E9V3_.js","assets/chevron-down-M1fHuk7u.js","assets/copy-v5iTV3kk.js","assets/DocumentSharing-BiTakFtn.js","assets/src-CcX8uAQo.js","assets/artifact-reference-ChS4TSVz.js","assets/sharing-X_H561x5.js","assets/ConfirmDialog-hdkXS1mg.js","assets/dialog-shell-D1Dv5nY8.js","assets/share-roles-c4EwFuyA.js","assets/copy-text-BWnoOWaK.js","assets/urls-DtkapM59.js","assets/DialogShell-BA3tWbeJ.js","assets/list-CA_o21oZ.js","assets/loader-circle-2p_rsu6P.js","assets/DocumentChrome-Bw4_z5yQ.js","assets/download-Dk3mxCBK.js","assets/git-fork-CN41g1lF.js","assets/users-Bm0xpNrq.js","assets/person-mentions-C7vQd7Vr.js","assets/serialize-n0A-pNlo.js","assets/escape-CVx3RLA2.js","assets/http-DEdzW08u.js","assets/sign-in-required-7zEVbzx2.js","assets/ForkArtifact-DXYU1-qL.js","assets/plus-BNzHjmEg.js","assets/runtime-id-CM5my_RX.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{F as e,M as t,O as n,T as r,_ as i,a,b as o,k as s,l as c,o as l,p as u,s as d,u as f}from"./web-Ckpee-ZJ.js";import{a as p,i as m,n as h,t as g}from"./shelf-DUXW45ap.js";import{t as _}from"./list-CA_o21oZ.js";import{t as v}from"./search-CmIkt7xE.js";import{$ as y,K as b,M as x,Y as S,Z as C,l as ee,lt as w,pt as T,s as E,t as D,tt as O}from"./solid-app-BNcsMwv4.js";import{n as k}from"./sign-in-required-7zEVbzx2.js";import{NotFoundPage as A}from"./NotFound-D2MOGkIO.js";import{i as j,n as M,r as N}from"./urls-DtkapM59.js";var P=u(`<main aria-label="Loading page"role=status class="mx-auto max-w-4xl px-4 py-10">Loading profile…`),F=u(`<button type=button aria-label="Retry profile">Could not refresh profile. Retry`),I=u(`<main class="mx-auto max-w-4xl px-4 pt-10 pb-24"><header class="reveal mb-8"><p class="font-mono text-[10px] font-semibold uppercase tracking-[0.14em] text-accent">public index</p><div class="mt-2 flex items-center gap-3"><h1 class="flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-3xl font-semibold tracking-tight text-fg"><a aria-label="Profile root"class="min-w-0 no-underline transition-colors hover:text-accent"><span class=text-accent>@</span></a></h1></div><p class="mt-3 font-mono text-xs text-muted"> public artifact`),L=u(`<p class="reveal font-mono text-sm text-muted"><span class=text-accent>$</span> nothing here yet<span class="caret text-accent">▍`),R=u(`<span class="rounded bg-raised px-1.5 py-0.5 font-mono text-[11px] text-muted">Follows you`),z=u(`<button type=button class="rounded-full border border-fg px-4 py-1.5 text-sm font-semibold">`),B=u(`<p class="text-xs text-muted">Followed by `),V=u(`<div role=group aria-label=Follows class="mt-3 flex flex-col gap-2"><div class="flex flex-wrap items-center gap-x-4 gap-y-2"><p class="flex flex-wrap items-center gap-x-3 text-sm text-muted"><span><strong class=text-fg></strong> Following</span><span><strong class=text-fg></strong> `),H=u(`<a aria-label=Follow class="rounded-full border border-fg bg-fg px-4 py-1.5 text-sm font-semibold text-bg">Follow`),U=u(`<a>`),W=u(`<p aria-label="No matches"class="font-mono text-xs text-faint">nothing matches the active search`),G=u(`<section aria-label=Folders><h2 class="mb-2 font-mono text-[10px] uppercase tracking-[0.13em] text-muted">folders</h2><ul class="grid grid-cols-2 gap-3 lg:grid-cols-4">`),K=u(`<div aria-label="Artifact grid"role=region class="flex flex-col gap-7">`),q=u(`<section aria-label=Shelf class="flex flex-col gap-4"><div class="flex items-center gap-2 rounded-[6px] border border-edge bg-surface px-3 py-1.5"><input aria-label="Search artifacts"placeholder="search artifacts"class="h-7 min-w-0 flex-1 border-0 bg-transparent font-mono text-xs text-fg focus:outline-none"><div role=group aria-label="Shelf view"class="ml-auto flex border-l border-edge pl-1.5"><button type=button aria-label="Grid view"class="h-7 w-8"></button><button type=button aria-label="List view"class="h-7 w-8">`),J=u(`<div aria-label="Artifact list"role=region>`),Y=u(`<a rel=external class="flex items-center justify-between border-b border-edge py-3 text-sm text-fg no-underline"><span></span><span class="font-mono text-xs text-muted">`),X=u(`<li class="rounded-md border border-edge p-3"><a rel=external class="block text-sm font-semibold text-fg no-underline">`),Z=u(`<section><h2 class="mb-2.5 font-mono text-[10px] uppercase tracking-[0.13em] text-muted"></h2><ul class="grid grid-cols-2 gap-2 sm:gap-5 lg:grid-cols-4">`),Q=u(`<p class="line-clamp-2 text-center text-xs text-muted">`),te=u(`<li class="reveal group relative flex min-w-0 flex-col rounded-md p-1 transition-colors hover:bg-raised/60 sm:p-2"><a rel=external class="block no-underline"><div class="aspect-[5/3] rounded-[4px] border border-edge bg-raised shadow-sm"style=background-position:center;background-size:cover></div><span class="mt-2 block text-center font-mono text-[13px] font-semibold text-fg">`),ne=e(()=>D(()=>import(`./ArtifactAddress-1ftOG9A5.js`).then(e=>({default:e.ArtifactAddressRoute})),__vite__mapDeps([0,1,2,3,4,5]))),re=e(()=>D(()=>import(`./Document-C6-E9V3_.js`).then(e=>({default:e.DocumentPage})),__vite__mapDeps([6,1,7,2,3,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,5])));function $(){let e=O(),t=y(),n=()=>`/${e.user}`,i=b(()=>`/api/page/profile/${encodeURIComponent(e.user??``)}`,{seed:()=>T(t.pathname,`profile`)});return r(o,{get when(){return i.data()},get fallback(){return r(o,{get when(){return i.error()},get fallback(){return P()},get children(){return r(A,{})}})},children:e=>r(o,{get when(){return d(()=>e().kind===`public-profile`)()&&e().handle},get fallback(){return d(()=>!!(e().kind===`redirect`&&e().to))()?r(C,{get href(){return e().to}}):r(A,{})},get children(){var t=I(),a=t.firstChild,u=a.firstChild.nextSibling,f=u.firstChild,p=f.firstChild;p.firstChild;var m=u.nextSibling,h=m.firstChild;return l(t,r(o,{get when(){return i.error()},get children(){var e=F();return e.$$click=()=>void i.refresh(!0),e}}),a),l(u,r(o,{get when(){return e().owner},get children(){return r(E,{get userId(){return e().owner.id},get image(){return e().owner.image??null},get initial(){return e().handle},size:48})}}),f),l(p,()=>e().handle,null),l(a,r(o,{get when(){return d(()=>!!e().owner)()&&e().social},get children(){return r(ae,{get ownerId(){return e().owner.id},get social(){return e().social},get signedIn(){return!!e().authed}})}}),m),l(m,()=>(e().files??[]).filter(e=>e.format===`markup`||e.format===`folder`).length,h),l(m,()=>(e().files??[]).filter(e=>e.format===`markup`||e.format===`folder`).length===1?``:`s`,null),l(t,r(o,{get when(){return e().files?.length},get fallback(){return L()},get children(){return r(oe,{get handle(){return e().handle},get rows(){return e().files}})}}),null),s(()=>c(p,`href`,n())),t}})})}function ie(){let e=O(),t=y(),i=n(()=>!(e.rest??``).split(`/`).filter(Boolean).length),a=n(()=>/\/edit\/?$/.test(t.pathname)),s=n(()=>j(M(e.rest??``).split(`/`).filter(Boolean))?.id??null);return r(o,{get when(){return!i()},get fallback(){return r($,{})},get children(){return r(o,{get when(){return s()},get fallback(){return r(A,{})},children:e=>r(o,{get when(){return w()},get fallback(){return r(ne,{get id(){return e()},get editing(){return a()}})},get children(){return r(re,{})}})})}})}function ae(e){let[n,a]=t(e.social.relation?.youFollow??!1),[u,d]=t(e.social.followers),[f,p]=t(!1),m=!1,h=async()=>{if(!m){m=!0,p(!0);try{let t=await ee(`/api/users/${e.ownerId}/follow`,n()?`DELETE`:`POST`);if(await k(t)){window.location.assign(x(window.location));return}if(t.ok){let e=await t.json();a(e.following),d(e.count),S()}}catch{}finally{m=!1,p(!1)}}},g=()=>n()?`Following`:e.social.relation?.followsYou?`Follow back`:`Follow`;return(()=>{var t=V(),a=t.firstChild,d=a.firstChild,p=d.firstChild,m=p.firstChild,_=p.nextSibling,v=_.firstChild;return v.nextSibling,l(m,()=>e.social.following.toLocaleString(`en-US`)),l(v,()=>u().toLocaleString(`en-US`)),l(_,()=>u()===1?`Follower`:`Followers`,null),l(d,r(o,{get when(){return e.social.relation?.followsYou},get children(){return R()}}),null),l(a,r(o,{get when(){return e.social.relation||!e.signedIn},get children(){return r(o,{get when(){return e.signedIn},get fallback(){return(()=>{var e=H();return s(()=>c(e,`href`,x(window.location))),e})()},get children(){var e=z();return e.$$click=()=>void h(),l(e,g),s(t=>{var r=g(),i=n(),a=f();return r!==t.e&&c(e,`aria-label`,t.e=r),i!==t.t&&c(e,`aria-pressed`,t.t=i),a!==t.a&&(e.disabled=t.a=a),t},{e:void 0,t:void 0,a:void 0}),e}})}}),null),l(t,r(o,{get when(){return e.social.relation?.knownTotal},get children(){var t=B();return t.firstChild,l(t,r(i,{get each(){return e.social.relation?.known},children:(e,t)=>[r(o,{get when(){return t()>0},children:`, `}),(()=>{var t=U();return l(t,()=>e.username),s(()=>c(t,`href`,`/@${e.username}`)),t})()]}),null),t}}),null),t})()}function oe(e){let[a,u]=t(``),[y,b]=t((()=>{try{return localStorage.getItem(`artifactbin:shelf-view`)===`list`?`list`:`grid`}catch{return`grid`}})()),x=e=>{b(e);try{localStorage.setItem(`artifactbin:shelf-view`,e)}catch{}},S=n(()=>g(e.rows.filter(e=>(e.format===`markup`||e.format===`folder`)&&`${e.title??``} ${e.description??``} ${e.format}`.toLowerCase().includes(a().trim().toLowerCase())))),C=t=>N(t,e.handle);return(()=>{var e=q(),t=e.firstChild,n=t.firstChild,g=n.nextSibling.firstChild,b=g.nextSibling;return l(t,r(v,{size:13,class:`text-faint`}),n),n.$$input=e=>u(e.currentTarget.value),g.$$click=()=>x(`grid`),l(g,r(m,{size:14})),b.$$click=()=>x(`list`),l(b,r(_,{size:14})),l(e,r(o,{get when(){return d(()=>!!a())()&&S().documents.length+S().folders.length===0},get children(){return W()}}),null),l(e,r(o,{get when(){return y()===`grid`},get fallback(){return(()=>{var e=J();return l(e,r(i,{get each(){return[...S().folders,...S().documents]},children:e=>(()=>{var t=Y(),n=t.firstChild,r=n.nextSibling;return l(n,()=>e.title??`Untitled`),l(r,()=>new Date(e.updated_at).toLocaleDateString(`en-US`)),s(n=>{var r=C(e),i=`Open ${e.title??e.id}`;return r!==n.e&&c(t,`href`,n.e=r),i!==n.t&&c(t,`aria-label`,n.t=i),n},{e:void 0,t:void 0}),t})()})),e})()},get children(){return[r(o,{get when(){return S().folders.length},get children(){var e=G(),t=e.firstChild.nextSibling;return l(t,r(i,{get each(){return S().folders},children:e=>(()=>{var t=X(),n=t.firstChild;return l(n,r(p,{size:24,class:`mb-4 text-accent`}),null),l(n,()=>e.title??`Untitled`,null),s(t=>{var r=C(e),i=`Open folder ${e.title??e.id}`;return r!==t.e&&c(n,`href`,t.e=r),i!==t.t&&c(n,`aria-label`,t.t=i),t},{e:void 0,t:void 0}),t})()})),e}}),(()=>{var e=K();return l(e,r(i,{get each(){return h(S().documents)},children:e=>(()=>{var t=Z(),n=t.firstChild,a=n.nextSibling;return l(n,()=>e.label),l(a,r(i,{get each(){return e.rows},children:e=>(()=>{var t=te(),n=t.firstChild,i=n.firstChild,a=i.nextSibling;return l(a,()=>e.title??`Untitled`),l(t,r(o,{get when(){return e.description},get children(){var t=Q();return l(t,()=>e.description),t}}),null),s(t=>{var r=C(e),a=`Open ${e.title??e.id}`,o=`url(/a/${e.id}/export?format=jpg&mode=card&v=${e.version})`;return r!==t.e&&c(n,`href`,t.e=r),a!==t.t&&c(n,`aria-label`,t.t=a),o!==t.a&&f(i,`background-image`,t.a=o),t},{e:void 0,t:void 0,a:void 0}),t})()})),s(()=>c(t,`aria-label`,`${e.label} artifacts`)),t})()})),e})()]}}),null),s(t=>{var n=y(),r=y()===`grid`,i=y()===`list`;return n!==t.e&&c(e,`data-shelf-view`,t.e=n),r!==t.t&&c(g,`aria-pressed`,t.t=r),i!==t.a&&c(b,`aria-pressed`,t.a=i),t},{e:void 0,t:void 0,a:void 0}),s(()=>n.value=a()),e})()}a([`click`,`input`]);export{ie as ProfileAliasRoute,$ as ProfilePage};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,M as t,R as n,T as r,a as i,b as a,k as o,l as s,o as c,p as l,s as u}from"./web-Ckpee-ZJ.js";import{t as d}from"./DocumentSharing-
|
|
1
|
+
import{D as e,M as t,R as n,T as r,a as i,b as a,k as o,l as s,o as c,p as l,s as u}from"./web-Ckpee-ZJ.js";import{t as d}from"./DocumentSharing-BiTakFtn.js";import{Y as ee,q as te,u as f}from"./solid-app-BNcsMwv4.js";import{t as p}from"./runtime-id-CM5my_RX.js";var m=l(`<p role=alert class=text-danger>`),h=l(`<p role=status>`),g=l(`<p role=status>Loading program…`),_=l(`<button type=button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised">Run program`),v=l(`<a aria-label="Schedule program"class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised">Schedule`),y=l(`<div class="flex flex-wrap gap-2"><button type=submit class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised">Save program`),ne=l(`<p class="mt-2 text-xs text-muted">Save your changes before running.`),re=l(`<form class="space-y-4 rounded border border-edge bg-surface p-5"><label for=program-title class="block text-sm">Program title<input id=program-title required class="mt-1 w-full rounded border border-edge bg-bg p-2 font-mono text-xs"></label><label for=program-source class="block text-sm">Program JSON<textarea id=program-source rows=16 class="mt-1 w-full rounded border border-edge bg-bg p-2 font-mono text-xs leading-relaxed"></textarea></label><p class="text-xs text-muted">Version 1 requires a command array. Compute and environment configuration are optional. Defaults: 1 vCPU, 2 GiB RAM. Runtime authentication is supplied separately.`),ie=l(`<a class="text-sm underline">Open saved program`),ae=l(`<main class="mx-auto max-w-4xl space-y-6 px-4 py-8"><header><h1 class="text-2xl font-semibold"></h1><p class="mt-2 text-sm text-muted">A saved command runs in a temporary compute box. Its home directory persists between runs. Keep credentials out of the definition.`),b=l(`<p><a href=/login class=underline>Sign in</a> to create a program.`),x=l(`<p>Only the owner can run or schedule this program.`),S=l(`<details><summary>Output</summary><pre class="mt-2 overflow-auto whitespace-pre-wrap text-xs">`),C=l(`<section aria-label="Program run"class="rounded border border-edge p-4"><h2 class=font-semibold>Run </h2><p role=status class=mt-2>`),w={version:1,command:[`node`,`-e`,`console.log("Hello from the program")`],compute:{vcpu:1,memoryMiB:2048,ttlSeconds:600}};function T(i={}){let{session:l}=te(),[T,E]=t(i.artifactId),[D,O]=t(0),[k,A]=t(``),[j,M]=t(i.owner??!i.artifactId),[N,P]=t(``),[F,I]=t(i.artifactId?``:JSON.stringify(w,null,2)),[L,R]=t(!1),[z,B]=t(!!i.artifactId),[V,H]=t(!i.artifactId),[U,W]=t(``),[G,K]=t(``),[q,J]=t(null),Y=()=>j()&&!!l()?.user,X=new AbortController,Z,Q;n(()=>{X.abort(),Z&&clearInterval(Z)});let $=0;e(()=>{let e=i.artifactId,t=i.owner,n=++$;if(!e)return;E(e),B(!0),I(``),P(``),J(null),W(``),K(``),Q=void 0,Z&&=(clearInterval(Z),void 0);let r=()=>n===$&&!X.signal.aborted;(async()=>{try{let n=t===void 0?await f(`/api/page/artifact/${e}`,`GET`,void 0,{signal:X.signal}):void 0,i=t??n?.role===`owner`;if(!r())return;if(M(i),!i){let t=n??await f(`/api/page/artifact/${e}`,`GET`,void 0,{signal:X.signal});if(!r())return;if(t.surface.format!==`program`)throw Error(`This artifact is not a program.`);let i=JSON.parse(t.surface.source??``);P(t.surface.title??``),I(JSON.stringify(i,null,2)),H(!1);return}let a=await f(`/api/my/artifacts/${e}`,`GET`,void 0,{signal:X.signal});if(!r())return;if(!a.program)throw Error(`This artifact is not a program.`);P(a.title??``),I(JSON.stringify(a.program,null,2)),O(a.version),A(a.state),H(!1)}catch(e){r()&&W(e instanceof Error?e.message:`Could not load program.`)}finally{r()&&B(!1)}})()});let oe=async e=>{if(e.preventDefault(),!(L()||!Y())){R(!0),W(``),K(``);try{let e;try{e=JSON.parse(F())}catch{throw Error(`Program must be valid JSON.`)}let t=await f(T()?`/api/my/artifacts/${T()}`:`/api/my/artifacts`,T()?`PUT`:`POST`,{title:N(),program:e,...T()?{expectedVersion:D(),expectedState:k()}:{visibility:`private`}});E(t.id),O(t.version),A(t.state),H(!1),K(`Program saved.`),ee()}catch(e){W(e instanceof Error?e.message:`Could not save program.`)}finally{R(!1)}}},se=async()=>{if(!(!T()||L())){R(!0),W(``);try{let e=Q??p();Q=e;let t=await f(`/api/artifacts/${T()}/invoke`,`POST`,{requestId:e,input:null});Q=void 0;let n=async()=>{try{let e=await f(`/api/runs/${t.runId}`,`GET`,void 0,{signal:X.signal});J(e),![`queued`,`running`].includes(e.status)&&Z&&(clearInterval(Z),Z=void 0)}catch(e){X.signal.aborted||(W(e instanceof Error?e.message:`Could not read run status.`),Z&&clearInterval(Z),Z=void 0)}};Z&&clearInterval(Z),Z=setInterval(()=>void n(),2e3),await n()}catch(e){W(e instanceof Error?e.message:`Could not run program.`)}finally{R(!1)}}};return(()=>{var e=ae(),t=e.firstChild.firstChild;return c(t,()=>i.artifactId?`Saved program`:`New program`),c(e,r(a,{get when(){return U()},get children(){var e=m();return c(e,U),e}}),null),c(e,r(a,{get when(){return G()},get children(){var e=h();return c(e,G),e}}),null),c(e,r(a,{get when(){return z()},get children(){return g()}}),null),c(e,r(a,{get when(){return i.artifactId||l()?.user},get fallback(){return b()},get children(){return r(a,{get when(){return!i.artifactId||F()},get children(){var e=re(),t=e.firstChild,n=t.firstChild.nextSibling,i=t.nextSibling,l=i.firstChild.nextSibling;return i.nextSibling,e.addEventListener(`submit`,e=>void oe(e)),n.$$input=e=>{P(e.currentTarget.value),H(!0)},l.$$input=e=>{I(e.currentTarget.value),H(!0)},s(l,`spellcheck`,!1),c(e,r(a,{get when(){return Y()},get fallback(){return x()},get children(){return[(()=>{var e=y(),t=e.firstChild;return c(e,r(a,{get when(){return T()},get children(){return[(()=>{var e=_();return e.$$click=()=>void se(),o(()=>e.disabled=L()||V()||[`queued`,`running`].includes(q()?.status??``)),e})(),(()=>{var e=v();return o(()=>s(e,`href`,`/schedules?artifact=${encodeURIComponent(T())}`)),e})()]}}),null),o(()=>t.disabled=L()||z()),e})(),r(a,{get when(){return u(()=>!!V())()&&T()},get children(){return ne()}})]}}),null),o(e=>{var t=!Y(),r=!Y();return t!==e.e&&(n.readOnly=e.e=t),r!==e.t&&(l.readOnly=e.t=r),e},{e:void 0,t:void 0}),o(()=>n.value=N()),o(()=>l.value=F()),e}})}}),null),c(e,r(a,{get when(){return u(()=>!!Y())()&&T()},get children(){return r(d,{get id(){return T()},get title(){return N()},owner:!0,get version(){return D()},format:`program`})}}),null),c(e,r(a,{get when(){return T()},get children(){var e=ie();return o(()=>s(e,`href`,`/a/${T()}`)),e}}),null),c(e,r(a,{get when(){return q()},children:e=>(()=>{var t=C(),n=t.firstChild;n.firstChild;var i=n.nextSibling;return c(n,()=>e().runId,null),c(i,()=>e().status),c(t,r(a,{get when(){return e().receipt?.reason},get children(){var t=m();return c(t,()=>e().receipt?.reason),t}}),null),c(t,r(a,{get when(){return e().output!==null},get children(){var t=S(),n=t.firstChild.nextSibling;return c(n,()=>JSON.stringify(e().output,null,2)),t}}),null),t})()}),null),e})()}i([`input`,`click`]);export{T as ProgramPage};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,I as t,M as n,R as r,T as i,a,b as o,i as s,k as c,l,m as u,o as d,p as f,v as p}from"./web-Ckpee-ZJ.js";import{A as m,G as h}from"./solid-app-
|
|
1
|
+
import{D as e,I as t,M as n,R as r,T as i,a,b as o,i as s,k as c,l,m as u,o as d,p as f,v as p}from"./web-Ckpee-ZJ.js";import{A as m,G as h}from"./solid-app-BNcsMwv4.js";var g=[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],_=e=>i(h,t(e,{iconNode:g,name:`ellipsis`})),v=f(`<button type=button>`),y=f(`<div class="absolute right-0 top-full z-30 mt-1 min-w-36 whitespace-nowrap rounded-[6px] border border-edge bg-surface p-1 font-mono text-xs shadow-lg">`),b=f(`<span class="relative z-10 inline-flex">`),x=f(`<button type=button> `),S=`inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-[4px] border-0 bg-transparent p-0 text-muted transition-colors`;function C(t){let[a,f]=n(!1),h,g;return e(()=>{if(!a())return;let e=e=>{h.contains(e.target)||(f(!1),g.focus())},t=e=>{e.key===`Escape`&&(f(!1),g.focus())};document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),r(()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)})}),i(o,{get when(){return t.items.length>0},get children(){var e=b(),n=h;return typeof n==`function`?u(n,e):h=e,d(e,i(m,{content:`more`,get children(){var e=v();e.$$click=()=>f(e=>!e);var n=g;return typeof n==`function`?u(n,e):g=e,d(e,i(_,{size:13})),c(n=>{var r=`${S} ${a()?`text-fg`:`hover:text-accent`}`,i=`More actions for ${t.name}`,o=a();return r!==n.e&&s(e,n.e=r),i!==n.t&&l(e,`aria-label`,n.t=i),o!==n.a&&l(e,`aria-expanded`,n.a=o),n},{e:void 0,t:void 0,a:void 0}),e}}),null),d(e,i(o,{get when(){return a()},get children(){var e=y();return d(e,i(p,{get each(){return t.items},children:e=>(()=>{var t=x(),n=t.firstChild;return t.$$click=()=>{f(!1),g.focus({preventScroll:!0}),e().onSelect()},d(t,()=>e().icon(),n),d(t,()=>e().text,null),c(n=>{var r=e().label,i=e().disabled,a=`flex w-full items-center gap-2 rounded-[4px] px-2 py-1 text-left text-muted disabled:cursor-not-allowed disabled:text-faint disabled:hover:bg-transparent enabled:cursor-pointer enabled:hover:bg-raised ${e().danger?`enabled:hover:text-danger`:`enabled:hover:text-fg`}`;return r!==n.e&&l(t,`aria-label`,n.e=r),i!==n.t&&(t.disabled=n.t=i),a!==n.a&&s(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})()})),e}}),null),e}})}a([`click`]);export{C as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,M as t,T as n,_ as r,a as i,b as a,k as o,l as s,o as c,p as l,s as u}from"./web-Ckpee-ZJ.js";import{nt as d,q as f,u as p}from"./solid-app-BNcsMwv4.js";import{t as m}from"./runtime-id-CM5my_RX.js";var h=l(`<p role=alert class=text-danger>`),g=l(`<p role=status>`),_=l(`<button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised"type=button>Cancel edit`),v=l(`<form class="rounded border border-edge bg-surface p-5"><h2 class="mb-4 text-lg font-semibold"></h2><div class="grid gap-4 sm:grid-cols-2"><label class=text-sm for=schedule-artifact>Artifact ID<input id=schedule-artifact required class="mt-1 w-full rounded border border-edge bg-bg p-2 font-mono text-xs"></label><label class=text-sm for=schedule-cron>Cron expression<input id=schedule-cron aria-label="Cron expression"required class="mt-1 w-full rounded border border-edge bg-bg p-2 font-mono text-xs"aria-describedby=cron-help><span id=cron-help class="mt-1 block text-xs text-muted">Five fields: minute, hour, day, month, weekday. Example: */5 * * * * runs every five minutes.</span></label><label class=text-sm for=schedule-timezone>Timezone<input id=schedule-timezone aria-label=Timezone required class="mt-1 w-full rounded border border-edge bg-bg p-2 font-mono text-xs"><span class="text-xs text-muted">IANA name, such as UTC or America/New_York.</span></label><label class=text-sm for=schedule-input>Input JSON<textarea id=schedule-input class="mt-1 w-full rounded border border-edge bg-bg p-2 font-mono text-xs"rows=3></textarea></label><label class=text-sm for=schedule-attempts>Maximum attempts<input id=schedule-attempts aria-label="Maximum attempts"type=number min=1 max=10 required class="mt-1 w-full rounded border border-edge bg-bg p-2 font-mono text-xs"><span class="text-xs text-muted">Includes the first attempt. Retries may repeat side effects.</span></label><label class=text-sm for=schedule-backoff>Retry backoff (seconds)<input id=schedule-backoff type=number min=1 required class="mt-1 w-full rounded border border-edge bg-bg p-2 font-mono text-xs"></label></div><div class="mt-5 flex gap-2"><button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised"type=submit>`),y=l(`<p role=alert>Could not load schedules. <button>Retry`),b=l(`<p role=status>Loading schedules…`),x=l(`<p class=text-muted>No schedules yet.`),S=l(`<section aria-label="Your schedules"><h2 class="mb-3 text-lg font-semibold">Your schedules`),C=l(`<main class="mx-auto max-w-5xl space-y-8 px-4 py-8"><header><h1 class="text-2xl font-semibold">Schedules</h1><p class="mt-2 max-w-2xl text-sm text-muted">Run the current version of an artifact on a schedule. Native programs require ownership; server handlers use artifact access permissions. The shortest interval is one minute.`),w=l(`<p><a href=/login class=underline>Sign in</a> to manage schedules.`),ee=l(`<span class="self-center text-xs text-muted">Resume to run.`),te=l(`<span class="flex items-center gap-2 text-sm">Delete this schedule? Existing runs remain.<button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised">Confirm delete</button><button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised">Keep schedule`),ne=l(`<article class="mb-3 rounded border border-edge p-4"><div class="flex flex-wrap justify-between gap-2"><a class="font-semibold underline"></a><span></span></div><p class="mt-2 font-mono text-sm"><code></code> · </p><p class="mt-1 text-xs text-muted"> · <!> maximum attempts</p><div class="mt-3 flex flex-wrap gap-2"><button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised">Edit</button><button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised"></button><button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised">Run now</button><button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised">History</button><button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised">Delete`),T=l(`<p>No runs yet.`),E=l(`<section aria-label="Schedule history"class="rounded border border-edge p-5"><h2 class="text-lg font-semibold">History · </h2><button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised mt-3">Refresh history</button><button class="rounded border border-edge px-3 py-2 font-mono text-xs disabled:opacity-50 hover:bg-raised mt-4">Close history`),re=l(`<div class="mt-4 border-t border-edge pt-3"><p> · `),ie=l(`<p class=text-danger>`),D=l(`<details><summary>Run result</summary><pre class="overflow-auto whitespace-pre-wrap text-xs">`),ae=l(`<div class="mt-2 pl-3 text-sm"><p>Attempt <!>: `);function O(){let[e]=d();return n(k,{get artifactId(){return u(()=>typeof e.artifact==`string`)()?e.artifact:``}})}function k(i={}){let{session:l}=f(),[d,{refetch:O}]=e(()=>l()?.user?.id,()=>p(`/api/schedules`)),[k,A]=t(i.artifactId||new URLSearchParams(window.location.search).get(`artifact`)||``),[j,M]=t(`0 * * * *`),[N,P]=t(`UTC`),[F,I]=t(`null`),[L,R]=t(1),[z,B]=t(60),[V,H]=t(null),[U,W]=t(!1),[G,K]=t(``),[q,J]=t(``),[oe,Y]=t(null),[se,X]=t(null),Z=new Map,Q=async e=>{if(!U()){W(!0),K(``),J(``);try{await e()}catch(e){K(e instanceof Error?e.message:`The request failed.`)}finally{W(!1)}}},ce=e=>{e.preventDefault(),Q(async()=>{let e;try{e=JSON.parse(F())}catch{throw Error(`Input must be valid JSON.`)}let t={cron:j(),timezone:N(),input:e,maxAttempts:L(),retryBackoffSeconds:z()};await p(V()?`/api/schedules/${V()}`:`/api/schedules`,V()?`PATCH`:`POST`,V()?t:{artifactId:k().trim(),...t}),H(null),J(`Schedule saved.`),await O()})},le=e=>{H(e.id),A(e.artifactId),M(e.cron),P(e.timezone),I(JSON.stringify(e.input,null,2)),R(e.maxAttempts),B(e.retryBackoffSeconds),K(``),document.getElementById(`schedule-cron`)?.focus()},$=async e=>{let t=await p(`/api/schedules/${e.id}/history`);Y({id:e.id,artifact:e.artifactId,rows:t.history})};return(()=>{var e=C();return e.firstChild,c(e,n(a,{get when(){return l()?.user},get fallback(){return w()},get children(){return[n(a,{get when(){return G()},get children(){var e=h();return c(e,G),e}}),n(a,{get when(){return q()},get children(){var e=g();return c(e,q),e}}),(()=>{var e=v(),t=e.firstChild,r=t.nextSibling,i=r.firstChild,s=i.firstChild.nextSibling,l=i.nextSibling,u=l.firstChild.nextSibling,d=l.nextSibling,f=d.firstChild.nextSibling,p=d.nextSibling,m=p.firstChild.nextSibling,h=p.nextSibling,g=h.firstChild.nextSibling,y=h.nextSibling.firstChild.nextSibling,b=r.nextSibling,x=b.firstChild;return e.addEventListener(`submit`,ce),c(t,()=>V()?`Edit schedule`:`New schedule`),s.$$input=e=>A(e.currentTarget.value),u.$$input=e=>M(e.currentTarget.value),f.$$input=e=>P(e.currentTarget.value),m.$$input=e=>I(e.currentTarget.value),g.$$input=e=>R(Number(e.currentTarget.value)),y.$$input=e=>B(Number(e.currentTarget.value)),c(x,()=>V()?`Save schedule`:`Create schedule`),c(b,n(a,{get when(){return V()},get children(){var e=_();return e.$$click=()=>H(null),e}}),null),o(e=>{var t=!!V(),n=U();return t!==e.e&&(s.readOnly=e.e=t),n!==e.t&&(x.disabled=e.t=n),e},{e:void 0,t:void 0}),o(()=>s.value=k()),o(()=>u.value=j()),o(()=>f.value=N()),o(()=>m.value=F()),o(()=>g.value=L()),o(()=>y.value=z()),e})(),(()=>{var e=S();return e.firstChild,c(e,n(a,{get when(){return d.error},get children(){var e=y(),t=e.firstChild.nextSibling;return t.$$click=()=>void O(),e}}),null),c(e,n(a,{get when(){return d.loading},get children(){return b()}}),null),c(e,n(a,{get when(){return d()?.schedules.length===0},get children(){return x()}}),null),c(e,n(r,{get each(){return d()?.schedules},children:e=>(()=>{var t=ne(),r=t.firstChild,i=r.firstChild,l=i.nextSibling,d=r.nextSibling,f=d.firstChild;f.nextSibling;var h=d.nextSibling,g=h.firstChild,_=g.nextSibling;_.nextSibling;var v=h.nextSibling,y=v.firstChild,b=y.nextSibling,x=b.nextSibling,S=x.nextSibling,C=S.nextSibling;return c(i,()=>e.artifactId),c(l,()=>e.enabled?`Active`:`Paused`),c(f,()=>e.cron),c(d,()=>e.timezone,null),c(h,(()=>{var t=u(()=>!!e.enabled);return()=>t()?`Next: ${new Date(e.nextDueAt).toLocaleString()}`:`No automatic runs while paused`})(),g),c(h,()=>e.maxAttempts,_),y.$$click=()=>le(e),b.$$click=()=>void Q(async()=>{await p(`/api/schedules/${e.id}`,`PATCH`,{enabled:!e.enabled}),await O()}),c(b,()=>e.enabled?`Pause`:`Resume`),x.$$click=()=>void Q(async()=>{let t=Z.get(e.id)??m();Z.set(e.id,t),await p(`/api/schedules/${e.id}/run`,`POST`,{requestId:t}),Z.delete(e.id),J(`Run requested.`),await $(e)}),c(v,n(a,{get when(){return!e.enabled},get children(){return ee()}}),S),S.$$click=()=>void Q(()=>$(e)),C.$$click=()=>X(e.id),c(v,n(a,{get when(){return se()===e.id},get children(){var t=te(),n=t.firstChild.nextSibling,r=n.nextSibling;return n.$$click=()=>void Q(async()=>{await p(`/api/schedules/${e.id}`,`DELETE`),X(null),await O()}),r.$$click=()=>X(null),t}}),null),o(t=>{var n=`/a/${e.artifactId}`,r=U(),a=`Edit ${e.artifactId}`,o=U(),c=`${e.enabled?`Pause`:`Resume`} ${e.artifactId}`,l=U()||!e.enabled,u=`Run now ${e.artifactId}`,d=U(),f=`History ${e.artifactId}`,p=U(),m=`Delete ${e.artifactId}`;return n!==t.e&&s(i,`href`,t.e=n),r!==t.t&&(y.disabled=t.t=r),a!==t.a&&s(y,`aria-label`,t.a=a),o!==t.o&&(b.disabled=t.o=o),c!==t.i&&s(b,`aria-label`,t.i=c),l!==t.n&&(x.disabled=t.n=l),u!==t.s&&s(x,`aria-label`,t.s=u),d!==t.h&&(S.disabled=t.h=d),f!==t.r&&s(S,`aria-label`,t.r=f),p!==t.d&&(C.disabled=t.d=p),m!==t.l&&s(C,`aria-label`,t.l=m),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),t})()}),null),e})(),n(a,{get when(){return oe()},children:e=>(()=>{var t=E(),i=t.firstChild;i.firstChild;var s=i.nextSibling,l=s.nextSibling;return c(i,()=>e().artifact,null),s.$$click=()=>void Q(()=>$({id:e().id,artifactId:e().artifact})),c(t,n(a,{get when(){return!e().rows.length},get children(){return T()}}),l),c(t,n(r,{get each(){return e().rows},children:e=>(()=>{var t=re(),i=t.firstChild,o=i.firstChild;return c(i,()=>new Date(e.scheduledFor).toLocaleString(),o),c(i,()=>e.status,null),c(t,n(r,{get each(){return e.attempts},children:e=>(()=>{var t=ae(),r=t.firstChild,i=r.firstChild.nextSibling;return i.nextSibling,c(r,()=>e.attemptNumber,i),c(r,()=>e.status,null),c(r,n(a,{get when(){return e.runId},get children(){return[` · Run `,u(()=>e.runId)]}}),null),c(t,n(a,{get when(){return e.error},get children(){var t=ie();return c(t,()=>e.error),t}}),null),c(t,n(a,{get when(){return e.result},get children(){var t=D(),n=t.firstChild.nextSibling;return c(n,()=>JSON.stringify(e.result,null,2)),t}}),null),t})()}),null),t})()}),l),l.$$click=()=>Y(null),o(()=>s.disabled=U()),t})()})]}}),null),e})()}i([`input`,`click`]);export{O as SchedulesRoute};
|
|
Binary file
|
|
Binary file
|
package/dist/runtime/dist/web/assets/{ScreenshotEditor-CUmN5F2q.js → ScreenshotEditor-B8g3LiBx.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as e,R as t,T as n,_ as r,a as i,b as a,i as o,k as s,l as c,m as l,o as u,p as d,r as f,u as p,z as m}from"./web-Ckpee-ZJ.js";import{t as h}from"./undo-2
|
|
1
|
+
import{M as e,R as t,T as n,_ as r,a as i,b as a,i as o,k as s,l as c,m as l,o as u,p as d,r as f,u as p,z as m}from"./web-Ckpee-ZJ.js";import{t as h}from"./undo-2--XbU60MY.js";import{A as g,W as _}from"./solid-app-BNcsMwv4.js";import{t as v}from"./upload-limits-Cxiss8cy.js";var y={edge:2048,pixels:4e6,bytes:v,thumbnail:480,strokes:500,points:5e4,stageHours:24},b=d(`<button type=button aria-label="Undo stroke"class="ml-auto inline-flex h-8 items-center gap-2 rounded-lg px-2.5 text-xs font-medium hover:bg-surface disabled:opacity-35">Undo`),x=d(`<p role=alert class="border-t border-edge px-6 py-3 text-sm text-danger">`),S=d(`<div aria-label="Screenshot editor"class="mb-4 overflow-hidden rounded-xl border border-edge bg-surface"><div class="flex flex-wrap items-center gap-x-3 gap-y-3 border-b border-edge px-3 py-3"><div class="flex items-center gap-2"role=group aria-label="Brush colors"><label class="ml-1 flex h-8 w-8 cursor-pointer items-center justify-center overflow-hidden rounded-lg border border-edge"aria-label="Custom brush color"><input aria-label="Brush color"type=color class="h-7 w-7 cursor-pointer border-0 bg-transparent p-0"></label></div><label class="flex items-center gap-3 text-xs text-muted"><span>Size</span><input aria-label="Brush thickness"type=range min=1 max=16 class="w-24 accent-accent"><span class="w-9 tabular-nums text-fg"> px</span></label></div><div class="flex min-h-24 items-center justify-center overflow-auto bg-surface p-3"style="background-image:radial-gradient(var(--color-edge, #d4d4d4) 1px, transparent 1px);background-size:16px 16px"><canvas aria-label="Screenshot drawing canvas"tabindex=0 class="block h-auto max-w-full touch-none rounded-sm bg-white shadow-lg"style=cursor:crosshair></canvas></div><div class="flex items-center justify-between gap-3 border-t border-edge px-3 py-2 text-xs text-muted"><span></span><button type=button class="shrink-0 font-medium hover:text-fg disabled:opacity-40">Retake screenshot`),C=d(`<button type=button>`),w=[[`Red`,`#ef4444`],[`Orange`,`#f59e0b`],[`Blue`,`#3b82f6`],[`Green`,`#22c55e`],[`Black`,`#171717`],[`White`,`#ffffff`]];function T(i){let d,v=null,T=structuredClone(i.initialStrokes),E=null,D=0,O=null,[k,A]=e(T.length),[j,M]=e(`#ef4444`),[N,P]=e(3),[F,I]=e(!1),[L,R]=e(``),z=()=>{let e=d?.getContext(`2d`);if(!(!e||!v)){e.clearRect(0,0,i.image.width,i.image.height),e.drawImage(v,0,0,i.image.width,i.image.height);for(let t of T){e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.width,e.lineCap=`round`,e.lineJoin=`round`,e.beginPath();let[n,...r]=t.points;if(n){if(!r.length){e.arc(n[0],n[1],t.width/2,0,Math.PI*2),e.fill();continue}e.moveTo(...n);for(let t of r)e.lineTo(...t);e.stroke()}}}},B=()=>{D||=requestAnimationFrame(()=>{D=0,z()})};m(()=>{let e=URL.createObjectURL(i.image.blob),n=new Image,r=!0;n.onload=()=>{r&&(v=n,z(),I(!0))},n.onerror=()=>{r&&R(`Could not load the screenshot.`)},n.src=e,t(()=>{r=!1,URL.revokeObjectURL(e),cancelAnimationFrame(D),v=null})});let V=e=>{let t=e.currentTarget.getBoundingClientRect();return[Math.max(0,Math.min(i.image.width,(e.clientX-t.left)*i.image.width/t.width)),Math.max(0,Math.min(i.image.height,(e.clientY-t.top)*i.image.height/t.height))]},H=()=>{E=null},U=()=>{O=null,E=null,T.pop(),A(T.length),B()};return i.exportRef.current=async()=>{if(!F()||!d)throw Error(`The screenshot is still loading. Please try again.`);if(O)return O;H(),z();let e=structuredClone(T),t=await new Promise(e=>d.toBlob(e,`image/png`));if(!t)throw Error(`Could not save the drawing. Please try again.`);return O={preview:t,strokes:e}},t(()=>{i.exportRef.current=null}),(()=>{var e=S(),t=e.firstChild,m=t.firstChild,v=m.firstChild,D=v.firstChild,I=m.nextSibling.firstChild.nextSibling,z=I.nextSibling,W=z.firstChild,G=t.nextSibling,K=G.firstChild,q=G.nextSibling,J=q.firstChild,Y=J.nextSibling;u(m,n(r,{each:w,children:([e,t])=>n(g,{content:e,get children(){var r=C();return r.$$click=()=>M(t),c(r,`aria-label`,`${e} brush`),p(r,`background-color`,t),p(r,`color`,e===`White`?`#171717`:`#ffffff`),u(r,n(a,{get when(){return j()===t},get children(){return n(_,{size:14,strokeWidth:3})}})),s(e=>{var n=j()===t,i=`flex h-7 w-7 items-center justify-center rounded-full border shadow-sm transition-transform hover:scale-110 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ${j()===t?`ring-2 ring-fg ring-offset-2 ring-offset-panel`:`border-black/15`}`;return n!==e.e&&c(r,`aria-pressed`,e.e=n),i!==e.t&&o(r,e.t=i),e},{e:void 0,t:void 0}),r}})}),v),D.addEventListener(`change`,e=>M(e.currentTarget.value)),I.addEventListener(`change`,e=>P(Number(e.currentTarget.value))),I.$$input=e=>P(Number(e.currentTarget.value)),u(z,N,W),u(t,n(g,{content:`Undo last stroke (⌘/Ctrl Z)`,get children(){var e=b(),t=e.firstChild;return e.$$click=U,u(e,n(h,{size:16}),t),s(()=>e.disabled=!k()||i.busy),e}}),null),K.addEventListener(`lostpointercapture`,H),K.addEventListener(`pointercancel`,H),K.$$pointerup=H,K.$$pointermove=e=>{if(E){if(T.reduce((e,t)=>e+t.points.length,0)>=y.points){H(),R(`Drawing limit reached. Undo a stroke to continue.`);return}E.points.push(V(e)),B()}},K.$$pointerdown=e=>{if(!F()||i.busy||e.button!==0||E)return;if(e.preventDefault(),e.currentTarget.focus(),O=null,T.length>=y.strokes){R(`Drawing limit reached. Undo a stroke to continue.`);return}e.currentTarget.setPointerCapture(e.pointerId);let t=i.image.width/e.currentTarget.getBoundingClientRect().width;E={color:j(),width:Math.min(128,N()*t),points:[V(e)]},T.push(E),A(T.length),B()},K.$$keydown=e=>{!i.busy&&(e.metaKey||e.ctrlKey)&&e.key===`z`&&(e.preventDefault(),U())};var X=d;return typeof X==`function`?l(X,K):d=K,u(e,n(a,{get when(){return L()},get children(){var e=x();return u(e,L),e}}),q),u(J,()=>F()?`Draw on the image or write below.`:`Loading screenshot…`),f(Y,`click`,i.onRetake,!0),s(e=>{var t=i.image.width,n=i.image.height,r=!F(),a=`min(100%, ${i.image.width/i.image.height*32}vh, ${i.image.width}px)`,o=i.busy;return t!==e.e&&c(K,`width`,e.e=t),n!==e.t&&c(K,`height`,e.t=n),r!==e.a&&c(K,`aria-busy`,e.a=r),a!==e.o&&p(K,`width`,e.o=a),o!==e.i&&(Y.disabled=e.i=o),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),s(()=>D.value=j()),s(()=>I.value=N()),e})()}i([`input`,`click`,`keydown`,`pointerdown`,`pointermove`,`pointerup`]);export{T as ScreenshotEditor};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e,M as t,T as n,_ as r,a as i,b as a,i as o,k as s,l as c,o as l,p as u,s as d,z as f}from"./web-Ckpee-ZJ.js";import{G as p,l as m}from"./solid-app-
|
|
1
|
+
import{I as e,M as t,T as n,_ as r,a as i,b as a,i as o,k as s,l as c,o as l,p as u,s as d,z as f}from"./web-Ckpee-ZJ.js";import{G as p,l as m}from"./solid-app-BNcsMwv4.js";import{t as h}from"./copy-text-BWnoOWaK.js";import{t as g}from"./DialogShell-BA3tWbeJ.js";var _=[[`path`,{d:`M19 16v6`,key:`tddt3s`}],[`path`,{d:`M21 12.536V5`,key:`zeza6i`}],[`path`,{d:`M22 19h-6`,key:`vcuq98`}],[`path`,{d:`M3 12A9 3 0 0 0 15.1824 14.8061`,key:`ukc3b1`}],[`path`,{d:`M3 5V19A9 3 0 0 0 13.318 21.968`,key:`1lyu4j`}],[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}]],v=t=>n(p,e(t,{iconNode:_,name:`database-plus`})),y=u(`<span role=listbox class="absolute right-0 top-full z-50 min-w-24 rounded border border-edge bg-surface p-1 shadow-xl">`),b=u(`<span class="relative inline-block"><button type=button class="rounded border border-edge bg-surface p-1">`),x=u(`<button type=button role=option class="block w-full p-1 text-left hover:bg-raised">`),S=u(`<button type=button aria-label=Share>`),C=u(`<p role=alert class=text-danger>`),w=u(`<div role=dialog aria-modal=true aria-label=Sharing class="fixed inset-0 z-50 grid place-items-center bg-black/60 p-4"><div class="max-h-[90vh] w-full max-w-lg space-y-4 overflow-auto rounded-xl border border-edge bg-surface p-6 text-sm text-fg"><div class="flex justify-between"><h2 class="text-lg font-semibold">Sharing </h2><button type=button aria-label="Close sharing">Close</button></div><button type=button aria-label="Copy link"class="w-full rounded border border-edge p-2"></button><div class="flex gap-1"></div><input aria-label="Invite email"type=email placeholder=email@example.com class="w-full rounded border border-edge bg-surface p-2">`),T=u(`<button type=button class="flex-1 rounded border border-edge p-2 aria-pressed:border-accent">`),E=u(`<p role=status>Loading sharing…`),D=u(`<div class="flex items-center justify-between">Anyone with the link`),O=u(`<p aria-label="PostgreSQL read-only access">Editors can manage the connection, notebook and whitelist. Viewers can query exposed data. Database rows cannot be changed here.`),k=u(`<div role=alertdialog aria-label="Make this dataset read-only?"><p>Documents that write here will stop working until writes are enabled again. The rows stay.</p><button type=button aria-label="Confirm read-only">Make read-only</button><button type=button>Keep writable`),A=u(`<section aria-label="Dataset writes"class="space-y-2 border-t border-edge pt-4"><h3 class=font-semibold>Writes</h3><div class="flex gap-2"><button type=button aria-label="Make read-only">read-only</button><button type=button aria-label="Make read & write">read & write`),j=u(`<section class="space-y-2 border-t border-edge pt-4"><h3 class=font-semibold>People</h3><form class="flex gap-2"><button type=submit aria-label="Add email">add`),M=u(`<a aria-label="Manage access policies">Manage data actions ↗`),N=u(`<p> · `),P=u(`<div class="flex items-center gap-2"><span class="min-w-0 flex-1 truncate"></span><button type=button>Remove`);function F(e){let[i,o]=t(!1);return(()=>{var t=b(),u=t.firstChild;return u.$$click=()=>o(e=>!e),l(u,()=>e.value===`editor`?`can edit`:`can view`),l(t,n(a,{get when(){return i()},get children(){var t=y();return l(t,n(r,{each:[`viewer`,`editor`],children:t=>(()=>{var n=x();return n.$$click=()=>{o(!1),e.onChange(t)},l(n,t===`editor`?`can edit`:`can view`),s(()=>c(n,`aria-selected`,e.value===t)),n})()})),s(()=>c(t,`aria-label`,e.label)),t}}),null),s(t=>{var n=e.label,r=i();return n!==t.e&&c(u,`aria-label`,t.e=n),r!==t.t&&c(u,`aria-expanded`,t.t=r),t},{e:void 0,t:void 0}),t})()}function I(e){let[i,u]=t(!!e.startOpen),[p,_]=t(null),[v,y]=t(``),[b,x]=t(``),[I,L]=t(!1),[R,z]=t(!1),B=()=>!!(e.artifactId&&e.editable),V=()=>`/api/my/artifacts/${encodeURIComponent(e.artifactId)}/sharing`;f(()=>{B()&&fetch(V()).then(async e=>{if(!e.ok)throw Error(`Could not load sharing.`);return e.json()}).then(_).catch(e=>x(e.message))});let H=async e=>{if(!B())return!1;x(``);try{let t=await m(V(),`PUT`,e);if(!t.ok)throw Error(`Could not update sharing.`);return _(await t.json()),!0}catch(e){return x(e instanceof Error?e.message:`Could not update sharing.`),!1}},U=()=>{h(new URL(e.url??location.pathname,location.origin).href),L(!0)},W=()=>e.format===`dataset`&&(e.datasetKind===`postgres`||p()?.datasetKind===`postgres`),G=()=>e.format===`dataset`&&p()&&!W()&&p()?.policyVersion!==2;return[n(a,{get when(){return!e.startOpen},get children(){var t=S();return t.$$click=()=>B()?u(!0):U(),l(t,(()=>{var e=d(()=>!!I());return()=>e()?`copied`:d(()=>!!p())()?`share: ${p().visibility}`:`Share`})()),s(()=>o(t,e.class)),t}}),n(a,{get when(){return i()},get children(){return n(g,{onClose:()=>{u(!1),e.onClose?.()},get children(){var t=w(),i=t.firstChild,o=i.firstChild,f=o.firstChild;f.firstChild;var m=f.nextSibling,h=o.nextSibling,g=h.nextSibling,_=g.nextSibling;return l(f,()=>e.title,null),m.$$click=()=>{u(!1),e.onClose?.()},h.$$click=U,l(h,()=>I()?`copied`:`copy link`),l(g,n(r,{get each(){return[`public`,`unlisted`,`private`].filter(e=>e!==`private`||p()?.canPrivate!==!1)},children:e=>(()=>{var t=T();return t.$$click=()=>void H({visibility:e}),c(t,`aria-label`,`Make ${e}`),l(t,e),s(n=>{var r=p()?.visibility===e,i=!p();return r!==n.e&&c(t,`aria-pressed`,n.e=r),i!==n.t&&(t.disabled=n.t=i),n},{e:void 0,t:void 0}),t})()})),_.$$input=e=>y(e.currentTarget.value),l(i,n(a,{get when(){return p()},get fallback(){return E()},children:t=>[n(a,{get when(){return t().visibility!==`private`},get children(){var e=D();return e.firstChild,l(e,n(F,{label:`Link role`,get value(){return t().linkRole??`viewer`},onChange:e=>void H({linkRole:e})}),null),e}}),n(a,{get when(){return W()},get children(){return O()}}),n(a,{get when(){return G()},get children(){var e=A(),i=e.firstChild.nextSibling.firstChild,o=i.nextSibling;return i.$$click=()=>t().writtenBy?.length?z(!0):void H({access:`read`}),o.$$click=()=>void H({access:`readwrite`}),l(e,n(r,{get each(){return t().writtenBy??[]},children:e=>(()=>{var t=N(),n=t.firstChild;return l(t,()=>e.title??e.id,n),l(t,()=>e.mutations.join(`, `),null),t})()}),null),l(e,n(a,{get when(){return R()},get children(){var e=k(),t=e.firstChild.nextSibling,n=t.nextSibling;return t.$$click=()=>{H({access:`read`}),z(!1)},n.$$click=()=>z(!1),e}}),null),s(e=>{var n=t().access!==`readwrite`,r=t().access===`readwrite`;return n!==e.e&&c(i,`aria-pressed`,e.e=n),r!==e.t&&c(o,`aria-pressed`,e.t=r),e},{e:void 0,t:void 0}),e}}),(()=>{var e=j(),i=e.firstChild.nextSibling;return l(e,n(r,{get each(){return t().shares},children:e=>(()=>{var r=P(),i=r.firstChild,a=i.nextSibling;return l(i,()=>e.email),l(r,n(F,{get label(){return`Role for ${e.email}`},get value(){return e.role},onChange:n=>void H({shares:t().shares.map(t=>t.email===e.email?{...t,role:n}:t)})}),a),a.$$click=()=>void H({shares:t().shares.filter(t=>t.email!==e.email)}),s(()=>c(a,`aria-label`,`Remove ${e.email}`)),r})()}),i),i.addEventListener(`submit`,e=>{e.preventDefault();let n=v().trim();n&&(H({shares:[...t().shares,{email:n,role:`viewer`}]}),y(``))}),e})(),n(a,{get when(){return d(()=>e.format===`dataset`)()&&!W()},get children(){var t=M();return t.$$click=()=>u(!1),s(()=>c(t,`href`,`/a/${e.artifactId}/edit`)),t}})]}),null),l(i,n(a,{get when(){return b()},get children(){var e=C();return l(e,b),e}}),null),s(()=>_.value=v()),t}})}})]}i([`click`,`input`]);export{v as n,I as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e,M as t,O as n,T as r,_ as i,a,b as o,i as s,k as c,l,o as u,p as d,s as f,u as p}from"./web-Ckpee-ZJ.js";import{t as m}from"./ShareLink-n8KhtnaI.js";import{t as h}from"./RowMenu-J4Gbci3B.js";import{a as g,i as _,r as v,t as y}from"./shelf-CeaX4iBg.js";import{t as b}from"./list-Dj3WErnh.js";import{t as x}from"./lock-B1nhk71f.js";import{v as ee,y as S}from"./person-mentions-BEjAedYZ.js";import{t as C}from"./search-agWZofH1.js";import{A as te,D as ne,G as w,S as T,Y as E,b as D,l as O}from"./solid-app-BtmRR9Ax.js";import{n as k}from"./browser-artifact-write-ZsGe-hXr.js";import{t as A}from"./ConfirmDialog-Ph1VDgNN.js";import{t as re}from"./DialogShell-BA3tWbeJ.js";var j=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]],M=t=>r(w,e(t,{iconNode:j,name:`eye-off`})),N=[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]],P=t=>r(w,e(t,{iconNode:N,name:`folder-input`})),F=[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]],I=t=>r(w,e(t,{iconNode:F,name:`folder-plus`})),L=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]],R=t=>r(w,e(t,{iconNode:L,name:`globe`})),z=[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]],ie=t=>r(w,e(t,{iconNode:z,name:`inbox`})),ae=d(`<span role=img tabindex=0 class="relative z-10 inline-flex shrink-0 rounded bg-slate-700/75 p-1 text-white">`),B=d(`<div class=artifact-cover-visibility>`),V=d(`<div class=artifact-cover><a rel=external class=artifact-cover-link></a><div class=artifact-cover-preview><img alt loading=lazy></div><span class=artifact-cover-fold aria-hidden=true></span><div class=artifact-cover-front><span class="min-w-0 flex-1 line-clamp-2 font-mono text-[12px] font-semibold leading-4"></span><span class="relative z-[3] inline-flex shrink-0">`,!0,!1,!1),H=d(`<input aria-label="Folder name"autofocus class="relative z-20 w-32 border-b border-accent bg-transparent font-mono text-xs focus:outline-none">`),U=d(`<a class="shelf-secondary-action text-muted hover:text-accent">`),W=d(`<span class="relative z-10 inline-flex shrink-0 items-center gap-1">`),oe=d(`<p class="px-2 py-1 font-mono text-xs text-faint">no folder matches`),G=d(`<div role=dialog class="fixed inset-0 z-50 grid place-items-center bg-black/40 p-4"><div class="w-full max-w-sm rounded border border-edge bg-surface p-4"><h2 class="mb-3 font-mono text-sm">Move </h2><input aria-label="Filter folders"placeholder="filter folders"autofocus class="mb-2 w-full rounded-[4px] border border-edge bg-transparent px-2 py-1.5 font-mono text-xs text-fg focus:border-accent focus:outline-none"><div class="max-h-64 overflow-y-auto"><button type=button aria-label="Move to root"class="block w-full px-2 py-1 text-left">root</button></div><button type=button aria-label="Close folder picker"class="mt-3 text-xs text-muted">Cancel`),K=d(`<span>↗`),q=d(`<button type=button class="block w-full px-2 py-1 text-left disabled:opacity-40">`),se=d(`<input aria-label="Folder name"autofocus class="h-7 w-36 rounded border border-edge bg-transparent px-1.5 font-mono text-xs">`),J=d(`<span class="font-mono text-[10px] text-faint">`),ce=d(`<section aria-label=Folders class="relative z-20 mb-6"><div class=mb-2></div><ul>`),le=d(`<section aria-label=Artifacts><div class=mb-2></div><ul>`),ue=d(`<div class="mt-3 flex justify-between font-mono text-xs"><span aria-label="Page range">-<!> of </span><span class="flex gap-2"><button type=button aria-label="Previous page">Previous</button><button type=button aria-label="Next page">Next`),de=d(`<p aria-label="No matches"class="font-mono text-xs text-faint">nothing matches the active `),fe=d(`<div aria-label=Shelf class=min-w-0><div class="mb-5 flex min-w-0 flex-col gap-2 rounded-[6px] border border-edge bg-surface px-3 py-1.5 sm:flex-row sm:flex-wrap sm:items-center"><div class="flex min-w-0 items-center gap-2 sm:flex-1"><input aria-label="Search artifacts"placeholder="search artifacts"class="h-7 min-w-0 flex-1 border-0 bg-transparent font-mono text-xs text-fg placeholder:text-faint focus:outline-none"></div><div class="flex flex-wrap items-center gap-2 sm:contents"><span role=group aria-label="Shelf view"class="ml-auto inline-flex shrink-0 gap-1 border-l border-edge pl-1.5"><button type=button aria-label="Grid view"></button><button type=button aria-label="List view">`),pe=d(`<button type=button class="rounded-full border border-edge px-2 py-0.5 font-mono text-[10px] text-muted">`),me=d(`<button type=button aria-label="New folder"class="inline-flex h-7 items-center gap-1 px-2 font-mono text-[10px] text-muted">new folder`),he=d(`<div class=folder-cover-empty aria-hidden=true>`),ge=d(`<span class="folder-cover-visibility absolute left-2 top-[27px] z-[3] rounded bg-slate-700/75 p-1 text-white">`),_e=d(`<div class=folder-cover><a rel=external class="absolute inset-0 z-[2] rounded-md focus-visible:outline-2 focus-visible:outline-accent"></a><div class=folder-cover-tab><span class="truncate font-mono text-[10px] tabular-nums"></span></div><div class=folder-cover-back></div><div class=folder-cover-papers></div><div class=folder-cover-front><span class="min-w-0 flex-1 truncate pr-2 font-mono text-[13px] font-semibold"></span><span class="relative z-[3] ml-auto">`),ve=d(`<li>`),ye=d(`<a rel=external class="min-w-0 flex-1 truncate font-mono text-sm font-semibold text-fg after:absolute after:inset-0">`),be=d(`<div class=folder-cover-paper><img alt loading=lazy>`,!0,!1,!1),xe=d(`<a rel=external class="flex min-w-0 flex-1 items-center gap-2 font-mono text-sm font-medium text-fg hover:text-accent"><img alt width=24 height=24 loading=lazy class="size-6 shrink-0 rounded-sm border border-edge bg-raised object-cover object-top"><span class=truncate>`,!0,!1,!1),Y=e=>e.title??e.id,Se=[`public`,`unlisted`,`private`];function X(e){return r(o,{get when(){return e.row.visibility},get children(){return r(te,{get content(){return e.row.visibility},get children(){var t=ae();return u(t,r(o,{get when(){return e.row.visibility===`public`},get fallback(){return r(o,{get when(){return e.row.visibility===`private`},get fallback(){return r(M,{size:12})},get children(){return r(x,{size:12})}})},get children(){return r(R,{size:12})}})),c(()=>l(t,`aria-label`,`${Y(e.row)} is ${e.row.visibility}`)),t}})}})}function Ce(e){return(()=>{var t=V(),n=t.firstChild,i=n.nextSibling,a=i.firstChild,s=i.nextSibling.nextSibling,d=s.firstChild,f=d.nextSibling;return u(t,r(o,{get when(){return e.showVisibility},get children(){var t=B();return u(t,r(X,{get row(){return e.row}})),t}}),s),u(d,()=>Y(e.row)),u(f,()=>e.children),c(t=>{var r=e.row.url,i=`Open ${Y(e.row)}`,o=`/a/${e.row.id}/export?format=jpg&mode=card&v=${e.row.version}&r=3`;return r!==t.e&&l(n,`href`,t.e=r),i!==t.t&&l(n,`aria-label`,t.t=i),o!==t.a&&l(a,`src`,t.a=o),t},{e:void 0,t:void 0,a:void 0}),t})()}function Z(e){let[a,s]=t(!1),[d,p]=t(!1),[g,_]=t(null),[y,b]=t(!1),[x,C]=t(``),[ne,w]=t(!1),[T,D]=t(!1),[O,j]=t(``),[M,N]=t(v(e.row)),F=async()=>{let t=O().trim();D(!1),!(!t||t===e.row.title)&&(await k(e.row.id,{title:t}).catch(()=>null))?.ok&&(e.row.title=t,e.onChanged(),E())},I=async t=>{(await k(e.row.id,{parent_id:t}).catch(()=>null))?.ok&&(N(t),b(!1),C(``),e.onChanged(),E())},L=()=>{b(!1),C(``)},R=n(()=>{let t=x().trim().toLowerCase();return t?e.folders.filter(e=>Y(e).toLowerCase().includes(t)):e.folders}),z=async()=>{p(!0),_(null);let t=await fetch(`/api/my/artifacts/${e.row.id}`,{method:`DELETE`}).catch(()=>null);if(p(!1),!t?.ok){_(`Could not delete this artifact.`);return}s(!1),e.onRemoved(e.row.id),E()};return[r(o,{get when(){return T()},get children(){var e=H();return e.$$keydown=e=>{e.key===`Enter`&&F(),e.key===`Escape`&&D(!1)},e.addEventListener(`blur`,()=>void F()),e.$$input=e=>j(e.currentTarget.value),c(()=>e.value=O()),e}}),r(o,{get when(){return e.level===`full`},get children(){var t=W();return u(t,r(o,{get when(){return f(()=>e.row.format!==`folder`)()&&e.showEdit!==!1},get children(){return r(te,{content:`edit`,get children(){var t=U();return u(t,r(S,{size:13})),c(n=>{var r=`Edit ${Y(e.row)}`,i=`/a/${e.row.id}#edit`;return r!==n.e&&l(t,`aria-label`,n.e=r),i!==n.t&&l(t,`href`,n.t=i),n},{e:void 0,t:void 0}),t}})}}),null),u(t,r(h,{get name(){return Y(e.row)},get items(){return[{label:`Manage sharing for ${Y(e.row)}`,text:`share`,icon:()=>K(),onSelect:()=>w(!0)},...e.row.format===`folder`?[{label:`Rename ${Y(e.row)}`,text:`rename`,icon:()=>r(S,{size:12}),onSelect:()=>{j(e.row.title??``),D(!0)}}]:[],{label:`Move ${Y(e.row)}`,text:`move to folder`,icon:()=>r(P,{size:12}),onSelect:()=>b(!0)},{label:`Delete ${Y(e.row)}`,text:e.childCount?`delete (${e.childCount} inside)`:`delete`,icon:()=>r(ee,{size:12}),danger:!0,onSelect:()=>s(!0)}]}}),null),u(t,r(o,{get when(){return ne()},get children(){return r(m,{get artifactId(){return e.row.id},get title(){return Y(e.row)},get format(){return e.row.format},editable:!0,get url(){return e.row.url},startOpen:!0,onClose:()=>w(!1)})}}),null),t}}),r(o,{get when(){return y()},get children(){return r(re,{onClose:L,initialFocus:`[autofocus]`,get children(){var t=G(),n=t.firstChild.firstChild;n.firstChild;var a=n.nextSibling,s=a.nextSibling,d=s.firstChild,p=s.nextSibling;return u(n,()=>Y(e.row),null),a.$$input=e=>C(e.currentTarget.value),d.$$click=()=>void I(null),u(s,r(i,{get each(){return R()},children:t=>(()=>{var n=q();return n.$$click=()=>void I(t.id),u(n,()=>Y(t)),c(r=>{var i=`Move to ${Y(t)}`,a=M()===t.id?`location`:void 0,o=t.id===e.row.id||(t.ancestor_ids??[]).includes(e.row.id);return i!==r.e&&l(n,`aria-label`,r.e=i),a!==r.t&&l(n,`aria-current`,r.t=a),o!==r.a&&(n.disabled=r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}),null),u(s,r(o,{get when(){return f(()=>!!x())()&&R().length===0},get children(){return oe()}}),null),p.$$click=L,c(n=>{var r=`Move ${Y(e.row)}`,i=M()===null?`location`:void 0;return r!==n.e&&l(t,`aria-label`,n.e=r),i!==n.t&&l(d,`aria-current`,n.t=i),n},{e:void 0,t:void 0}),c(()=>a.value=x()),t}})}}),r(o,{get when(){return a()},get children(){return r(A,{get title(){return`Delete ${Y(e.row)}?`},get description(){return f(()=>!!e.childCount)()?`Delete ${Y(e.row)} and the ${e.childCount} item${e.childCount===1?``:`s`} inside it? They go to the trash, and you can restore them any time.`:`Delete ${Y(e.row)}? It goes to the trash, and you can restore it any time.`},action:`Delete`,confirmLabel:`Confirm delete`,danger:!0,get busy(){return d()},get error(){return g()},onCancel:()=>s(!1),onConfirm:()=>void z()})}})]}function we(e){let[a,d]=t([]),[m,h]=t([]),[ee,S]=t(0),[w,k]=t(``),[A,re]=t([]),[j,N]=t(`grid`),[P,F]=t(0),[L,z]=t(!1),[ae,B]=t(``),[V,H]=t(!1),U=n(()=>(ee(),[...e.rows.filter(e=>!m().includes(e.id)),...a()])),W=n(()=>e.scopeParentId===void 0?U():U().filter(t=>v(t)===e.scopeParentId)),oe=n(()=>W().filter(e=>(!w().trim()||`${e.title??``} ${e.id}`.toLowerCase().includes(w().trim().toLowerCase()))&&(!A().length||A().includes(e.visibility??``)))),G=n(()=>y(oe())),K=n(()=>U().filter(e=>e.format===`folder`)),q=n(()=>Se.filter(e=>W().some(t=>t.visibility===e))),we=e=>{re(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),F(0)},Q=e=>U().filter(t=>v(t)===e).length,$=e=>h(t=>[...t,e,...U().filter(t=>(t.ancestor_ids??[]).includes(e)).map(e=>e.id)]),Te=async()=>{let t=ae().trim();if(!t||V())return;H(!0);let n=await O(`/api/my/artifacts`,`POST`,{format:`folder`,title:t,parent_id:e.parentId??null}).catch(()=>null);if(H(!1),!n?.ok)return;let r=await n.json();d(n=>[...n,{id:r.id,url:r.url??`/a/${r.id}`,title:r.title??t,format:`folder`,version:r.version??1,visibility:r.visibility??`private`,updated_at:r.updated_at??new Date().toISOString(),parent_id:r.parent_id??e.parentId??null}]),B(``),z(!1),E()},Ee=()=>G().documents.slice(j()===`list`?P()*10:0,j()===`list`?P()*10+10:void 0);return(()=>{var t=fe(),n=t.firstChild.firstChild,a=n.firstChild,d=n.nextSibling,m=d.firstChild,h=m.firstChild,y=h.nextSibling;return u(n,r(C,{size:13,class:`shrink-0 text-faint`}),a),a.$$input=t=>{k(t.currentTarget.value),F(0),e.onQuery?.(t.currentTarget.value)},u(d,r(o,{get when(){return q().length>=2},get children(){return r(i,{get each(){return q()},children:e=>(()=>{var t=pe();return t.$$click=()=>we(e),l(t,`aria-label`,`Filter ${e}`),u(t,e),c(()=>l(t,`aria-pressed`,A().includes(e))),t})()})}}),m),h.$$click=()=>N(`grid`),u(h,r(_,{size:14})),y.$$click=()=>N(`list`),u(y,r(b,{size:14})),u(d,r(o,{get when(){return e.canCreateFolders},get children(){return r(o,{get when(){return L()},get fallback(){return r(te,{content:`create a folder here`,get children(){var e=me(),t=e.firstChild;return e.$$click=()=>z(!0),u(e,r(I,{size:12}),t),e}})},get children(){return[(()=>{var e=se();return e.$$keydown=e=>{e.key===`Enter`&&Te(),e.key===`Escape`&&z(!1)},e.$$input=e=>B(e.currentTarget.value),c(()=>e.value=ae()),e})(),(()=>{var e=J();return u(e,()=>V()?`creating…`:`enter`),e})()]}})}}),null),u(t,r(o,{get when(){return G().folders.length},get children(){var t=ce(),n=t.firstChild,a=n.nextSibling;return u(n,r(D,{children:`folders`})),u(a,r(i,{get each(){return G().folders},children:t=>{let n=()=>U().filter(e=>v(e)===t.id&&e.format===`markup`).slice(0,5);return(()=>{var a=ve();return u(a,r(o,{get when(){return j()===`grid`},get fallback(){return[r(g,{size:15,class:`shrink-0 text-accent`}),(()=>{var e=ye();return u(e,()=>Y(t)),c(n=>{var r=t.url,i=`Open folder ${Y(t)}`;return r!==n.e&&l(e,`href`,n.e=r),i!==n.t&&l(e,`aria-label`,n.t=i),n},{e:void 0,t:void 0}),e})(),r(o,{get when(){return Q(t.id)},get children(){var e=J();return u(e,()=>Q(t.id)),e}}),r(o,{get when(){return e.showVisibility!==!1},get children(){return r(X,{row:t})}}),r(Z,{row:t,get level(){return e.actions??`none`},get folders(){return K()},get childCount(){return Q(t.id)},onRemoved:$,onChanged:()=>S(e=>e+1)})]},get children(){var a=_e(),s=a.firstChild,d=s.nextSibling,m=d.firstChild,h=d.nextSibling.nextSibling,g=h.nextSibling.firstChild,_=g.nextSibling;return u(m,(()=>{var e=f(()=>!!Q(t.id));return()=>e()?`${Q(t.id)} artifact${Q(t.id)===1?``:`s`}`:`empty folder`})()),u(a,r(o,{get when(){return!n().length},get children(){var e=he();return u(e,r(ie,{size:28})),e}}),h),u(a,r(o,{get when(){return f(()=>e.showVisibility!==!1)()&&t.visibility},get children(){var e=ge();return u(e,r(o,{get when(){return t.visibility===`public`},get fallback(){return r(o,{get when(){return t.visibility===`private`},get fallback(){return r(M,{size:12})},get children(){return r(x,{size:12})}})},get children(){return r(R,{size:12})}})),c(()=>l(e,`aria-label`,`${Y(t)} is ${t.visibility}`)),e}}),h),u(h,r(i,{get each(){return n()},children:(e,t)=>(()=>{var r=be(),i=r.firstChild;return c(a=>{var o=t()/Math.max(1,n().length-1),s=`/a/${e.id}/export?format=jpg&mode=card&v=${e.version}&r=3`;return o!==a.e&&p(r,`--paper-position`,a.e=o),s!==a.t&&l(i,`src`,a.t=s),a},{e:void 0,t:void 0}),r})()})),u(g,()=>Y(t)),u(_,r(Z,{row:t,get level(){return e.actions??`none`},get folders(){return K()},get childCount(){return Q(t.id)},onRemoved:$,onChanged:()=>S(e=>e+1)})),c(e=>{var r=`Preview of folder ${Y(t)}`,i=t.url,o=`Open folder ${Y(t)}`,c=n().length>2?`48%`:`61%`;return r!==e.e&&l(a,`aria-label`,e.e=r),i!==e.t&&l(s,`href`,e.t=i),o!==e.a&&l(s,`aria-label`,e.a=o),c!==e.o&&p(h,`--paper-width`,e.o=c),e},{e:void 0,t:void 0,a:void 0,o:void 0}),a}})),c(()=>s(a,j()===`grid`?`group relative rounded-md p-3 hover:bg-raised/60`:`group relative flex min-w-0 items-center gap-2 rounded-[6px] p-3 ${T}`)),a})()}})),c(()=>s(a,j()===`grid`?`grid grid-cols-2 gap-3 lg:grid-cols-4`:`grid grid-cols-1 gap-3 sm:grid-cols-2`)),t}}),null),u(t,r(o,{get when(){return Ee().length},get children(){var t=le(),n=t.firstChild,a=n.nextSibling;return u(n,r(D,{children:`artifacts`})),u(a,r(i,{get each(){return Ee()},children:t=>(()=>{var n=ve();return u(n,r(o,{get when(){return j()===`grid`},get fallback(){return[(()=>{var e=xe(),n=e.firstChild,r=n.nextSibling;return u(r,()=>Y(t)),c(r=>{var i=t.url,a=`Open ${Y(t)}`,o=`/a/${t.id}/export?format=jpg&mode=card&v=${t.version}&r=3`;return i!==r.e&&l(e,`href`,r.e=i),a!==r.t&&l(e,`aria-label`,r.t=a),o!==r.a&&l(n,`src`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),e})(),r(o,{get when(){return e.showVisibility!==!1},get children(){return r(X,{row:t})}}),(()=>{var e=J();return u(e,()=>ne(t.updated_at)),e})(),r(Z,{row:t,get level(){return e.actions??`none`},get folders(){return K()},childCount:0,onRemoved:$,onChanged:()=>S(e=>e+1)})]},get children(){return r(Ce,{row:t,get showVisibility(){return e.showVisibility!==!1},get children(){return r(Z,{row:t,get level(){return e.actions??`none`},get folders(){return K()},childCount:0,onRemoved:$,onChanged:()=>S(e=>e+1)})}})}})),c(()=>s(n,j()===`grid`?`group relative min-w-0 rounded-md p-3 hover:bg-raised/60`:`group relative ${T} flex items-center gap-3 px-3 py-2`)),n})()})),c(e=>{var t=j()===`grid`?`Artifact grid`:`Artifact list`,n=j()===`grid`?`grid grid-cols-2 gap-3 lg:grid-cols-4`:`flex flex-col gap-2`;return t!==e.e&&l(a,`aria-label`,e.e=t),n!==e.t&&s(a,e.t=n),e},{e:void 0,t:void 0}),t}}),null),u(t,r(o,{get when(){return f(()=>j()===`list`)()&&G().documents.length>10},get children(){var e=ue(),t=e.firstChild,n=t.firstChild,r=n.nextSibling;r.nextSibling;var i=t.nextSibling.firstChild,a=i.nextSibling;return u(t,()=>P()*10+1,n),u(t,()=>Math.min((P()+1)*10,G().documents.length),r),u(t,()=>G().documents.length,null),i.$$click=()=>F(e=>e-1),a.$$click=()=>F(e=>e+1),c(e=>{var t=P()===0,n=(P()+1)*10>=G().documents.length;return t!==e.e&&(i.disabled=e.e=t),n!==e.t&&(a.disabled=e.t=n),e},{e:void 0,t:void 0}),e}}),null),u(t,r(o,{get when(){return f(()=>!G().folders.length&&!G().documents.length)()&&(w()||A().length)},get children(){var e=de();return e.firstChild,u(e,()=>w()?`search`:`filters`,null),e}}),null),c(e=>{var t=j()===`grid`,n=j()===`grid`?`rounded bg-accent-soft p-1.5 text-accent`:`p-1.5 text-faint`,r=j()===`list`,i=j()===`list`?`rounded bg-accent-soft p-1.5 text-accent`:`p-1.5 text-faint`;return t!==e.e&&l(h,`aria-pressed`,e.e=t),n!==e.t&&s(h,e.t=n),r!==e.a&&l(y,`aria-pressed`,e.a=r),i!==e.o&&s(y,e.o=i),e},{e:void 0,t:void 0,a:void 0,o:void 0}),c(()=>a.value=w()),t})()}a([`input`,`keydown`,`click`]);export{I as i,we as n,R as r,Z as t};
|
|
1
|
+
import{I as e,M as t,O as n,T as r,_ as i,a,b as o,i as s,k as c,l,o as u,p as d,s as f,u as p}from"./web-Ckpee-ZJ.js";import{t as m}from"./ShareLink-qbYss_Eh.js";import{t as h}from"./RowMenu-B2c9LyOb.js";import{a as g,i as _,r as v,t as y}from"./shelf-DUXW45ap.js";import{t as b}from"./list-CA_o21oZ.js";import{t as x}from"./lock-BRsIxNP2.js";import{v as ee,y as S}from"./person-mentions-C7vQd7Vr.js";import{t as C}from"./search-CmIkt7xE.js";import{A as te,D as ne,G as w,S as T,Y as E,b as D,l as O}from"./solid-app-BNcsMwv4.js";import{n as k}from"./browser-artifact-write-CG72iseh.js";import{t as A}from"./ConfirmDialog-hdkXS1mg.js";import{t as re}from"./DialogShell-BA3tWbeJ.js";var j=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]],M=t=>r(w,e(t,{iconNode:j,name:`eye-off`})),N=[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]],P=t=>r(w,e(t,{iconNode:N,name:`folder-input`})),F=[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]],I=t=>r(w,e(t,{iconNode:F,name:`folder-plus`})),L=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]],R=t=>r(w,e(t,{iconNode:L,name:`globe`})),z=[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]],ie=t=>r(w,e(t,{iconNode:z,name:`inbox`})),ae=d(`<span role=img tabindex=0 class="relative z-10 inline-flex shrink-0 rounded bg-slate-700/75 p-1 text-white">`),B=d(`<div class=artifact-cover-visibility>`),V=d(`<div class=artifact-cover><a rel=external class=artifact-cover-link></a><div class=artifact-cover-preview><img alt loading=lazy></div><span class=artifact-cover-fold aria-hidden=true></span><div class=artifact-cover-front><span class="min-w-0 flex-1 line-clamp-2 font-mono text-[12px] font-semibold leading-4"></span><span class="relative z-[3] inline-flex shrink-0">`,!0,!1,!1),H=d(`<input aria-label="Folder name"autofocus class="relative z-20 w-32 border-b border-accent bg-transparent font-mono text-xs focus:outline-none">`),U=d(`<a class="shelf-secondary-action text-muted hover:text-accent">`),W=d(`<span class="relative z-10 inline-flex shrink-0 items-center gap-1">`),oe=d(`<p class="px-2 py-1 font-mono text-xs text-faint">no folder matches`),G=d(`<div role=dialog class="fixed inset-0 z-50 grid place-items-center bg-black/40 p-4"><div class="w-full max-w-sm rounded border border-edge bg-surface p-4"><h2 class="mb-3 font-mono text-sm">Move </h2><input aria-label="Filter folders"placeholder="filter folders"autofocus class="mb-2 w-full rounded-[4px] border border-edge bg-transparent px-2 py-1.5 font-mono text-xs text-fg focus:border-accent focus:outline-none"><div class="max-h-64 overflow-y-auto"><button type=button aria-label="Move to root"class="block w-full px-2 py-1 text-left">root</button></div><button type=button aria-label="Close folder picker"class="mt-3 text-xs text-muted">Cancel`),K=d(`<span>↗`),q=d(`<button type=button class="block w-full px-2 py-1 text-left disabled:opacity-40">`),se=d(`<input aria-label="Folder name"autofocus class="h-7 w-36 rounded border border-edge bg-transparent px-1.5 font-mono text-xs">`),J=d(`<span class="font-mono text-[10px] text-faint">`),ce=d(`<section aria-label=Folders class="relative z-20 mb-6"><div class=mb-2></div><ul>`),le=d(`<section aria-label=Artifacts><div class=mb-2></div><ul>`),ue=d(`<div class="mt-3 flex justify-between font-mono text-xs"><span aria-label="Page range">-<!> of </span><span class="flex gap-2"><button type=button aria-label="Previous page">Previous</button><button type=button aria-label="Next page">Next`),de=d(`<p aria-label="No matches"class="font-mono text-xs text-faint">nothing matches the active `),fe=d(`<div aria-label=Shelf class=min-w-0><div class="mb-5 flex min-w-0 flex-col gap-2 rounded-[6px] border border-edge bg-surface px-3 py-1.5 sm:flex-row sm:flex-wrap sm:items-center"><div class="flex min-w-0 items-center gap-2 sm:flex-1"><input aria-label="Search artifacts"placeholder="search artifacts"class="h-7 min-w-0 flex-1 border-0 bg-transparent font-mono text-xs text-fg placeholder:text-faint focus:outline-none"></div><div class="flex flex-wrap items-center gap-2 sm:contents"><span role=group aria-label="Shelf view"class="ml-auto inline-flex shrink-0 gap-1 border-l border-edge pl-1.5"><button type=button aria-label="Grid view"></button><button type=button aria-label="List view">`),pe=d(`<button type=button class="rounded-full border border-edge px-2 py-0.5 font-mono text-[10px] text-muted">`),me=d(`<button type=button aria-label="New folder"class="inline-flex h-7 items-center gap-1 px-2 font-mono text-[10px] text-muted">new folder`),he=d(`<div class=folder-cover-empty aria-hidden=true>`),ge=d(`<span class="folder-cover-visibility absolute left-2 top-[27px] z-[3] rounded bg-slate-700/75 p-1 text-white">`),_e=d(`<div class=folder-cover><a rel=external class="absolute inset-0 z-[2] rounded-md focus-visible:outline-2 focus-visible:outline-accent"></a><div class=folder-cover-tab><span class="truncate font-mono text-[10px] tabular-nums"></span></div><div class=folder-cover-back></div><div class=folder-cover-papers></div><div class=folder-cover-front><span class="min-w-0 flex-1 truncate pr-2 font-mono text-[13px] font-semibold"></span><span class="relative z-[3] ml-auto">`),ve=d(`<li>`),ye=d(`<a rel=external class="min-w-0 flex-1 truncate font-mono text-sm font-semibold text-fg after:absolute after:inset-0">`),be=d(`<div class=folder-cover-paper><img alt loading=lazy>`,!0,!1,!1),xe=d(`<a rel=external class="flex min-w-0 flex-1 items-center gap-2 font-mono text-sm font-medium text-fg hover:text-accent"><img alt width=24 height=24 loading=lazy class="size-6 shrink-0 rounded-sm border border-edge bg-raised object-cover object-top"><span class=truncate>`,!0,!1,!1),Y=e=>e.title??e.id,Se=[`public`,`unlisted`,`private`];function X(e){return r(o,{get when(){return e.row.visibility},get children(){return r(te,{get content(){return e.row.visibility},get children(){var t=ae();return u(t,r(o,{get when(){return e.row.visibility===`public`},get fallback(){return r(o,{get when(){return e.row.visibility===`private`},get fallback(){return r(M,{size:12})},get children(){return r(x,{size:12})}})},get children(){return r(R,{size:12})}})),c(()=>l(t,`aria-label`,`${Y(e.row)} is ${e.row.visibility}`)),t}})}})}function Ce(e){return(()=>{var t=V(),n=t.firstChild,i=n.nextSibling,a=i.firstChild,s=i.nextSibling.nextSibling,d=s.firstChild,f=d.nextSibling;return u(t,r(o,{get when(){return e.showVisibility},get children(){var t=B();return u(t,r(X,{get row(){return e.row}})),t}}),s),u(d,()=>Y(e.row)),u(f,()=>e.children),c(t=>{var r=e.row.url,i=`Open ${Y(e.row)}`,o=`/a/${e.row.id}/export?format=jpg&mode=card&v=${e.row.version}&r=3`;return r!==t.e&&l(n,`href`,t.e=r),i!==t.t&&l(n,`aria-label`,t.t=i),o!==t.a&&l(a,`src`,t.a=o),t},{e:void 0,t:void 0,a:void 0}),t})()}function Z(e){let[a,s]=t(!1),[d,p]=t(!1),[g,_]=t(null),[y,b]=t(!1),[x,C]=t(``),[ne,w]=t(!1),[T,D]=t(!1),[O,j]=t(``),[M,N]=t(v(e.row)),F=async()=>{let t=O().trim();D(!1),!(!t||t===e.row.title)&&(await k(e.row.id,{title:t}).catch(()=>null))?.ok&&(e.row.title=t,e.onChanged(),E())},I=async t=>{(await k(e.row.id,{parent_id:t}).catch(()=>null))?.ok&&(N(t),b(!1),C(``),e.onChanged(),E())},L=()=>{b(!1),C(``)},R=n(()=>{let t=x().trim().toLowerCase();return t?e.folders.filter(e=>Y(e).toLowerCase().includes(t)):e.folders}),z=async()=>{p(!0),_(null);let t=await fetch(`/api/my/artifacts/${e.row.id}`,{method:`DELETE`}).catch(()=>null);if(p(!1),!t?.ok){_(`Could not delete this artifact.`);return}s(!1),e.onRemoved(e.row.id),E()};return[r(o,{get when(){return T()},get children(){var e=H();return e.$$keydown=e=>{e.key===`Enter`&&F(),e.key===`Escape`&&D(!1)},e.addEventListener(`blur`,()=>void F()),e.$$input=e=>j(e.currentTarget.value),c(()=>e.value=O()),e}}),r(o,{get when(){return e.level===`full`},get children(){var t=W();return u(t,r(o,{get when(){return f(()=>e.row.format!==`folder`)()&&e.showEdit!==!1},get children(){return r(te,{content:`edit`,get children(){var t=U();return u(t,r(S,{size:13})),c(n=>{var r=`Edit ${Y(e.row)}`,i=`/a/${e.row.id}#edit`;return r!==n.e&&l(t,`aria-label`,n.e=r),i!==n.t&&l(t,`href`,n.t=i),n},{e:void 0,t:void 0}),t}})}}),null),u(t,r(h,{get name(){return Y(e.row)},get items(){return[{label:`Manage sharing for ${Y(e.row)}`,text:`share`,icon:()=>K(),onSelect:()=>w(!0)},...e.row.format===`folder`?[{label:`Rename ${Y(e.row)}`,text:`rename`,icon:()=>r(S,{size:12}),onSelect:()=>{j(e.row.title??``),D(!0)}}]:[],{label:`Move ${Y(e.row)}`,text:`move to folder`,icon:()=>r(P,{size:12}),onSelect:()=>b(!0)},{label:`Delete ${Y(e.row)}`,text:e.childCount?`delete (${e.childCount} inside)`:`delete`,icon:()=>r(ee,{size:12}),danger:!0,onSelect:()=>s(!0)}]}}),null),u(t,r(o,{get when(){return ne()},get children(){return r(m,{get artifactId(){return e.row.id},get title(){return Y(e.row)},get format(){return e.row.format},editable:!0,get url(){return e.row.url},startOpen:!0,onClose:()=>w(!1)})}}),null),t}}),r(o,{get when(){return y()},get children(){return r(re,{onClose:L,initialFocus:`[autofocus]`,get children(){var t=G(),n=t.firstChild.firstChild;n.firstChild;var a=n.nextSibling,s=a.nextSibling,d=s.firstChild,p=s.nextSibling;return u(n,()=>Y(e.row),null),a.$$input=e=>C(e.currentTarget.value),d.$$click=()=>void I(null),u(s,r(i,{get each(){return R()},children:t=>(()=>{var n=q();return n.$$click=()=>void I(t.id),u(n,()=>Y(t)),c(r=>{var i=`Move to ${Y(t)}`,a=M()===t.id?`location`:void 0,o=t.id===e.row.id||(t.ancestor_ids??[]).includes(e.row.id);return i!==r.e&&l(n,`aria-label`,r.e=i),a!==r.t&&l(n,`aria-current`,r.t=a),o!==r.a&&(n.disabled=r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}),null),u(s,r(o,{get when(){return f(()=>!!x())()&&R().length===0},get children(){return oe()}}),null),p.$$click=L,c(n=>{var r=`Move ${Y(e.row)}`,i=M()===null?`location`:void 0;return r!==n.e&&l(t,`aria-label`,n.e=r),i!==n.t&&l(d,`aria-current`,n.t=i),n},{e:void 0,t:void 0}),c(()=>a.value=x()),t}})}}),r(o,{get when(){return a()},get children(){return r(A,{get title(){return`Delete ${Y(e.row)}?`},get description(){return f(()=>!!e.childCount)()?`Delete ${Y(e.row)} and the ${e.childCount} item${e.childCount===1?``:`s`} inside it? They go to the trash, and you can restore them any time.`:`Delete ${Y(e.row)}? It goes to the trash, and you can restore it any time.`},action:`Delete`,confirmLabel:`Confirm delete`,danger:!0,get busy(){return d()},get error(){return g()},onCancel:()=>s(!1),onConfirm:()=>void z()})}})]}function we(e){let[a,d]=t([]),[m,h]=t([]),[ee,S]=t(0),[w,k]=t(``),[A,re]=t([]),[j,N]=t(`grid`),[P,F]=t(0),[L,z]=t(!1),[ae,B]=t(``),[V,H]=t(!1),U=n(()=>(ee(),[...e.rows.filter(e=>!m().includes(e.id)),...a()])),W=n(()=>e.scopeParentId===void 0?U():U().filter(t=>v(t)===e.scopeParentId)),oe=n(()=>W().filter(e=>(!w().trim()||`${e.title??``} ${e.id}`.toLowerCase().includes(w().trim().toLowerCase()))&&(!A().length||A().includes(e.visibility??``)))),G=n(()=>y(oe())),K=n(()=>U().filter(e=>e.format===`folder`)),q=n(()=>Se.filter(e=>W().some(t=>t.visibility===e))),we=e=>{re(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),F(0)},Q=e=>U().filter(t=>v(t)===e).length,$=e=>h(t=>[...t,e,...U().filter(t=>(t.ancestor_ids??[]).includes(e)).map(e=>e.id)]),Te=async()=>{let t=ae().trim();if(!t||V())return;H(!0);let n=await O(`/api/my/artifacts`,`POST`,{format:`folder`,title:t,parent_id:e.parentId??null}).catch(()=>null);if(H(!1),!n?.ok)return;let r=await n.json();d(n=>[...n,{id:r.id,url:r.url??`/a/${r.id}`,title:r.title??t,format:`folder`,version:r.version??1,visibility:r.visibility??`private`,updated_at:r.updated_at??new Date().toISOString(),parent_id:r.parent_id??e.parentId??null}]),B(``),z(!1),E()},Ee=()=>G().documents.slice(j()===`list`?P()*10:0,j()===`list`?P()*10+10:void 0);return(()=>{var t=fe(),n=t.firstChild.firstChild,a=n.firstChild,d=n.nextSibling,m=d.firstChild,h=m.firstChild,y=h.nextSibling;return u(n,r(C,{size:13,class:`shrink-0 text-faint`}),a),a.$$input=t=>{k(t.currentTarget.value),F(0),e.onQuery?.(t.currentTarget.value)},u(d,r(o,{get when(){return q().length>=2},get children(){return r(i,{get each(){return q()},children:e=>(()=>{var t=pe();return t.$$click=()=>we(e),l(t,`aria-label`,`Filter ${e}`),u(t,e),c(()=>l(t,`aria-pressed`,A().includes(e))),t})()})}}),m),h.$$click=()=>N(`grid`),u(h,r(_,{size:14})),y.$$click=()=>N(`list`),u(y,r(b,{size:14})),u(d,r(o,{get when(){return e.canCreateFolders},get children(){return r(o,{get when(){return L()},get fallback(){return r(te,{content:`create a folder here`,get children(){var e=me(),t=e.firstChild;return e.$$click=()=>z(!0),u(e,r(I,{size:12}),t),e}})},get children(){return[(()=>{var e=se();return e.$$keydown=e=>{e.key===`Enter`&&Te(),e.key===`Escape`&&z(!1)},e.$$input=e=>B(e.currentTarget.value),c(()=>e.value=ae()),e})(),(()=>{var e=J();return u(e,()=>V()?`creating…`:`enter`),e})()]}})}}),null),u(t,r(o,{get when(){return G().folders.length},get children(){var t=ce(),n=t.firstChild,a=n.nextSibling;return u(n,r(D,{children:`folders`})),u(a,r(i,{get each(){return G().folders},children:t=>{let n=()=>U().filter(e=>v(e)===t.id&&e.format===`markup`).slice(0,5);return(()=>{var a=ve();return u(a,r(o,{get when(){return j()===`grid`},get fallback(){return[r(g,{size:15,class:`shrink-0 text-accent`}),(()=>{var e=ye();return u(e,()=>Y(t)),c(n=>{var r=t.url,i=`Open folder ${Y(t)}`;return r!==n.e&&l(e,`href`,n.e=r),i!==n.t&&l(e,`aria-label`,n.t=i),n},{e:void 0,t:void 0}),e})(),r(o,{get when(){return Q(t.id)},get children(){var e=J();return u(e,()=>Q(t.id)),e}}),r(o,{get when(){return e.showVisibility!==!1},get children(){return r(X,{row:t})}}),r(Z,{row:t,get level(){return e.actions??`none`},get folders(){return K()},get childCount(){return Q(t.id)},onRemoved:$,onChanged:()=>S(e=>e+1)})]},get children(){var a=_e(),s=a.firstChild,d=s.nextSibling,m=d.firstChild,h=d.nextSibling.nextSibling,g=h.nextSibling.firstChild,_=g.nextSibling;return u(m,(()=>{var e=f(()=>!!Q(t.id));return()=>e()?`${Q(t.id)} artifact${Q(t.id)===1?``:`s`}`:`empty folder`})()),u(a,r(o,{get when(){return!n().length},get children(){var e=he();return u(e,r(ie,{size:28})),e}}),h),u(a,r(o,{get when(){return f(()=>e.showVisibility!==!1)()&&t.visibility},get children(){var e=ge();return u(e,r(o,{get when(){return t.visibility===`public`},get fallback(){return r(o,{get when(){return t.visibility===`private`},get fallback(){return r(M,{size:12})},get children(){return r(x,{size:12})}})},get children(){return r(R,{size:12})}})),c(()=>l(e,`aria-label`,`${Y(t)} is ${t.visibility}`)),e}}),h),u(h,r(i,{get each(){return n()},children:(e,t)=>(()=>{var r=be(),i=r.firstChild;return c(a=>{var o=t()/Math.max(1,n().length-1),s=`/a/${e.id}/export?format=jpg&mode=card&v=${e.version}&r=3`;return o!==a.e&&p(r,`--paper-position`,a.e=o),s!==a.t&&l(i,`src`,a.t=s),a},{e:void 0,t:void 0}),r})()})),u(g,()=>Y(t)),u(_,r(Z,{row:t,get level(){return e.actions??`none`},get folders(){return K()},get childCount(){return Q(t.id)},onRemoved:$,onChanged:()=>S(e=>e+1)})),c(e=>{var r=`Preview of folder ${Y(t)}`,i=t.url,o=`Open folder ${Y(t)}`,c=n().length>2?`48%`:`61%`;return r!==e.e&&l(a,`aria-label`,e.e=r),i!==e.t&&l(s,`href`,e.t=i),o!==e.a&&l(s,`aria-label`,e.a=o),c!==e.o&&p(h,`--paper-width`,e.o=c),e},{e:void 0,t:void 0,a:void 0,o:void 0}),a}})),c(()=>s(a,j()===`grid`?`group relative rounded-md p-3 hover:bg-raised/60`:`group relative flex min-w-0 items-center gap-2 rounded-[6px] p-3 ${T}`)),a})()}})),c(()=>s(a,j()===`grid`?`grid grid-cols-2 gap-3 lg:grid-cols-4`:`grid grid-cols-1 gap-3 sm:grid-cols-2`)),t}}),null),u(t,r(o,{get when(){return Ee().length},get children(){var t=le(),n=t.firstChild,a=n.nextSibling;return u(n,r(D,{children:`artifacts`})),u(a,r(i,{get each(){return Ee()},children:t=>(()=>{var n=ve();return u(n,r(o,{get when(){return j()===`grid`},get fallback(){return[(()=>{var e=xe(),n=e.firstChild,r=n.nextSibling;return u(r,()=>Y(t)),c(r=>{var i=t.url,a=`Open ${Y(t)}`,o=`/a/${t.id}/export?format=jpg&mode=card&v=${t.version}&r=3`;return i!==r.e&&l(e,`href`,r.e=i),a!==r.t&&l(e,`aria-label`,r.t=a),o!==r.a&&l(n,`src`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),e})(),r(o,{get when(){return e.showVisibility!==!1},get children(){return r(X,{row:t})}}),(()=>{var e=J();return u(e,()=>ne(t.updated_at)),e})(),r(Z,{row:t,get level(){return e.actions??`none`},get folders(){return K()},childCount:0,onRemoved:$,onChanged:()=>S(e=>e+1)})]},get children(){return r(Ce,{row:t,get showVisibility(){return e.showVisibility!==!1},get children(){return r(Z,{row:t,get level(){return e.actions??`none`},get folders(){return K()},childCount:0,onRemoved:$,onChanged:()=>S(e=>e+1)})}})}})),c(()=>s(n,j()===`grid`?`group relative min-w-0 rounded-md p-3 hover:bg-raised/60`:`group relative ${T} flex items-center gap-3 px-3 py-2`)),n})()})),c(e=>{var t=j()===`grid`?`Artifact grid`:`Artifact list`,n=j()===`grid`?`grid grid-cols-2 gap-3 lg:grid-cols-4`:`flex flex-col gap-2`;return t!==e.e&&l(a,`aria-label`,e.e=t),n!==e.t&&s(a,e.t=n),e},{e:void 0,t:void 0}),t}}),null),u(t,r(o,{get when(){return f(()=>j()===`list`)()&&G().documents.length>10},get children(){var e=ue(),t=e.firstChild,n=t.firstChild,r=n.nextSibling;r.nextSibling;var i=t.nextSibling.firstChild,a=i.nextSibling;return u(t,()=>P()*10+1,n),u(t,()=>Math.min((P()+1)*10,G().documents.length),r),u(t,()=>G().documents.length,null),i.$$click=()=>F(e=>e-1),a.$$click=()=>F(e=>e+1),c(e=>{var t=P()===0,n=(P()+1)*10>=G().documents.length;return t!==e.e&&(i.disabled=e.e=t),n!==e.t&&(a.disabled=e.t=n),e},{e:void 0,t:void 0}),e}}),null),u(t,r(o,{get when(){return f(()=>!G().folders.length&&!G().documents.length)()&&(w()||A().length)},get children(){var e=de();return e.firstChild,u(e,()=>w()?`search`:`filters`,null),e}}),null),c(e=>{var t=j()===`grid`,n=j()===`grid`?`rounded bg-accent-soft p-1.5 text-accent`:`p-1.5 text-faint`,r=j()===`list`,i=j()===`list`?`rounded bg-accent-soft p-1.5 text-accent`:`p-1.5 text-faint`;return t!==e.e&&l(h,`aria-pressed`,e.e=t),n!==e.t&&s(h,e.t=n),r!==e.a&&l(y,`aria-pressed`,e.a=r),i!==e.o&&s(y,e.o=i),e},{e:void 0,t:void 0,a:void 0,o:void 0}),c(()=>a.value=w()),t})()}a([`input`,`keydown`,`click`]);export{I as i,we as n,R as r,Z as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./jsx-vj4cHW_Q.js";import{M as t,T as n,a as r,b as i,i as a,k as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,u as m}from"./web-Ckpee-ZJ.js";import{t as ee}from"./rotate-ccw-CSJ78xUE.js";import{P as h,V as te}from"./solid-app-BtmRR9Ax.js";import{d as g}from"./document-update-client-DUF0zs2Z.js";import{t as _}from"./dialog-shell-D1Dv5nY8.js";import{n as v}from"./browser-artifact-write-ZsGe-hXr.js";var y=`artifactbin:og-image-crop`,b=`artifactbin:og-image`,x=`artifactbin:og-crop`,S=1600,C={x:0,y:0,width:S},w=e=>e*840/S,T=e=>{if(!/^(0|[1-9][0-9]*)$/.test(e))return null;let t=Number(e);return Number.isSafeInteger(t)?t:null};function E(e,t=400){let n=/^x=(0|[1-9][0-9]*);y=(0|[1-9][0-9]*);width=(0|[1-9][0-9]*)$/.exec(e);if(!n)return null;let r=T(n[1]),i=T(n[2]),a=T(n[3]);return r===null||i===null||a===null||a<t||a>1600?null:{x:r,y:i,width:a}}var D=(e,t)=>{let n=e.attributes.find(e=>e.name.toLowerCase()===t);return n?.value.static&&typeof n.value.json==`string`?n.value.json:null};function O(t,n=x){let r=e(t);if(!r.ok)return null;let{helmet:i}=g(r.nodes),a=i?.children.find(e=>e.type===`element`&&!e.isComponent&&e.tag.toLowerCase()===`meta`&&D(e,`name`)===n)??null,o=a?D(a,`content`):null;return{helmet:i,element:a,crop:o===null?null:E(o,n===y?1:400)}}function k(e){return O(e)?.crop??null}var A=({x:e,y:t,width:n})=>`<meta name="${x}" content="x=${e};y=${t};width=${n}" />`;function ne(e,t){return j(e,x,t?A(t):null)}function j(e,t,n){let r=O(e,t);if(!r)return e;if(r.element)return e.slice(0,r.element.start)+(n??``)+e.slice(r.element.end);if(!n)return e;if(!r.helmet)return`<Helmet>${n}</Helmet>${e?`\n${e}`:``}`;if(r.helmet.selfClosing)return e.slice(0,r.helmet.start)+`<Helmet>${n}</Helmet>`+e.slice(r.helmet.end);let i=`</${r.helmet.tag}>`,a=r.helmet.end-i.length;return e.slice(0,a)+n+e.slice(a)}function re(e){let t=O(e,b),n=t?.element?D(t.element,`content`):null;return n&&/^ref:[A-Za-z0-9_-]+$/.test(n)?n.slice(4):null}function M(e,t){if(t!==null&&!/^[A-Za-z0-9_-]+$/.test(t))throw Error(`Invalid image reference`);return j(e,b,t===null?null:`<meta name="${b}" content="ref:${t}" />`)}function N(e){return O(e,y)?.crop??null}function ie(e,t){return j(e,y,t?`<meta name="${y}" content="x=${t.x};y=${t.y};width=${t.width}" />`:null)}function P(e){return Math.min(S,e*S/840)}function ae(e){let t=P(e);return{x:(S-t)/2,y:(e-w(t))/2,width:t}}function F(e,t){let n=P(t),r=Math.min(n,Math.max(Math.min(400,n),e.width));return{width:r,x:Math.min(Math.max(0,e.x),S-r),y:Math.min(Math.max(0,e.y),Math.max(0,t-w(r)))}}var oe=d(`<button type=button class="cursor-pointer rounded-[5px] border border-edge px-3 py-2 font-mono text-xs text-muted">use document framing`),se=d(`<span class="text-[10px] text-faint">Complex artifacts can take a few seconds.`),ce=d(`<div role=status aria-live=polite class="absolute inset-0 flex min-h-48 flex-col items-center justify-center gap-3 bg-surface px-4 text-center font-mono text-xs text-muted"><span aria-hidden=true class="h-5 w-5 animate-spin rounded-full border-2 border-edge-bright border-t-accent motion-reduce:animate-none"></span><span>`),le=d(`<div role=status class="absolute inset-0 flex min-h-48 flex-col items-center justify-center gap-3 bg-surface px-4 text-center font-mono text-xs text-muted"><span>The preview could not be loaded.</span><button type=button class="cursor-pointer rounded-[5px] border border-edge-bright bg-raised px-3 py-2 text-fg hover:border-accent">retry`),ue=d(`<img alt aria-hidden=true>`),de=d(`<span aria-live=polite class="absolute right-1.5 top-1.5 flex items-center gap-1.5 bg-black/65 px-2 py-1 font-mono text-[9px] text-white"><span aria-hidden=true class="h-2.5 w-2.5 animate-spin rounded-full border border-white/40 border-t-white motion-reduce:animate-none"></span>sharpening…`),fe=d(`<div role=group tabindex=0 aria-label="Move social preview crop"style=touch-action:none><span class="absolute left-1 top-1 bg-accent px-1.5 py-1 font-mono text-[9px] text-white">1600 × 840 · <!>%</span><div role=slider tabindex=0 aria-label="Resize social preview crop"class="absolute -bottom-2 -right-2 h-5 w-5 cursor-se-resize rounded-full border-2 border-white bg-accent shadow outline-none focus:ring-2 focus:ring-accent"style=touch-action:none>`),pe=d(`<p role=status class="mb-2 font-mono text-[11px] text-danger">`),me=d(`<div class="fixed inset-0 z-[100] flex items-center justify-center p-3 sm:p-8"><button type=button aria-label="Close social preview"class="absolute inset-0 cursor-default border-0 bg-black/50 p-0 backdrop-blur-[2px]"></button><div role=dialog aria-modal=true aria-label="Social preview"class="relative z-10 flex max-h-[92vh] w-full max-w-4xl flex-col overflow-hidden rounded-[9px] border border-edge-bright bg-surface shadow-2xl"><header class="flex shrink-0 items-start justify-between border-b border-edge px-4 py-3"><div><p class="font-mono text-[10px] uppercase tracking-[0.14em] text-accent">Share card</p><h2 class="mt-1 font-sans text-base font-semibold text-fg">Social preview</h2><p class="mt-1 font-sans text-xs text-muted">Drag to pan. Resize the locked 40:21 frame; release to focus.</p></div><button type=button aria-label="Cancel social preview"class="flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-edge bg-transparent text-muted hover:bg-raised hover:text-fg"></button></header><div class="flex items-center gap-3 border-b border-edge px-4 py-3"><input type=file accept=image/png,image/jpeg,image/webp,image/gif,image/svg+xml aria-label="Upload social preview image"class=hidden><button type=button class="cursor-pointer rounded-[5px] border border-edge px-3 py-2 font-mono text-xs text-fg disabled:opacity-60"></button></div><div class="min-h-0 flex-1 bg-ground p-3 sm:p-5"><div class="relative mx-auto aspect-[40/21] max-h-full overflow-hidden border border-edge bg-surface"aria-label="Social preview canvas"><img></div></div><footer class="shrink-0 border-t border-edge bg-surface px-4 py-3"><div class="flex items-center justify-between gap-3"><button type=button aria-label="Reset social preview"class="inline-flex cursor-pointer items-center gap-1.5 rounded-[5px] border-0 bg-transparent px-2 py-2 font-mono text-xs text-muted hover:bg-raised hover:text-fg"> reset</button><div class="flex gap-2"><button type=button class="cursor-pointer rounded-[5px] border border-edge bg-transparent px-3 py-2 font-mono text-xs text-muted hover:border-edge-bright hover:text-fg">cancel</button><button type=button class="cursor-pointer rounded-[5px] border border-accent bg-accent px-3 py-2 font-mono text-xs font-semibold text-white disabled:cursor-default disabled:opacity-60">`),he=e=>({x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width)}),I=1.08,ge=3,_e=(e,t)=>{let n=Math.min(S,Math.max(400,e.width)),r=w(n);return{width:n,x:Math.min(Math.max(0,e.x),S-n),y:Math.min(Math.max(0,e.y),Math.max(0,t-r))}};function L(e){let r=re(e.source),d=k(e.source),g=N(e.source),y={crop:d??C,reset:!1,dirty:!1},b=g,[x,T]=t(r),[E,D]=t(!1),[O,A]=t(!1),[j,L]=t((r?g:d)??C),[R,z]=t(d??C),[ve,ye]=t(!1),[be,xe]=t(``),[Se,B]=t(!1),[V,Ce]=t(840),[H,U]=t(!1),[we,W]=t(!1),[G,Te]=t(0),[K,Ee]=t(!1),[De,q]=t(``),[Oe,ke]=t({source:e.source,editId:e.editId}),Ae,je,J,Y,X=null,Me=()=>`/a/${e.id}/export?mode=preview&format=jpg&v=${e.version}&pv=2${G()?`&attempt=${G()}`:``}`,Ne=()=>{let t=x();return t?t===r?`/a/${e.id}/export?mode=preview&image=1&v=${e.version}&attempt=${G()}`:`/a/${t}/raw?attempt=${G()}`:Me()},Pe=(e,t)=>x()?F(e,t):_e(e,t),Fe=()=>w(j().width),Ie=()=>Math.round(S/j().width*100),Le=()=>he(j()),Re=()=>`/a/${e.id}/export?mode=preview&format=png&v=${e.version}&pv=2&focus=1&crop=${encodeURIComponent(`x=${Le().x};y=${Le().y};width=${Le().width}`)}`,ze=()=>be()===Re(),Z=()=>w(R().width)*I,Q=()=>R().width*I,Be=()=>R().x-(Q()-R().width)/2,Ve=()=>R().y-(Z()-w(R().width))/2;_({panel:()=>Ae,onClose:()=>e.onClose(),initialFocus:()=>je,focusable:`button:not([disabled]), [tabindex="0"]`});let He=e=>{A(!0),B(!1);let t=Pe(e,V());x()&&(b=t),L(t),z(t)},Ue=e=>{let t=e.currentTarget,n=t.naturalWidth/S,r=n>0?t.naturalHeight/n:840,i=x()?r:Math.max(840,r);Ce(i);let a=x()?F(b??ae(i),i):_e(j(),i);z(a),L(a),U(!0),W(!1)},We=e=>t=>{t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId),ye(!0),X={pointerId:t.pointerId,kind:e,clientX:t.clientX,clientY:t.clientY,crop:j(),camera:R(),latest:j()}},Ge=e=>{let t=X;if(!t||t.pointerId!==e.pointerId||!J)return;let n=J.parentElement?.getBoundingClientRect().width??0;if(n<=0)return;let r=t.camera.width*I/n,i=(e.clientX-t.clientX)*r,a=(e.clientY-t.clientY)*r,o=840/S,s=(i+o*a)/(1+o*o),c=s>0?s*ge:s,l=Pe(t.kind===`move`?{...t.crop,x:t.crop.x-i,y:t.crop.y-a}:{...t.crop,width:t.crop.width+c},V());t.latest=l,x()&&(b=l),A(!0),B(!1),L(l),(t.kind===`move`||l.width>=t.crop.width)&&z(l)},$=e=>{let t=X;t?.pointerId===e.pointerId&&(X=null,ye(!1),z(t.latest))},Ke=e=>{let t=e.shiftKey?1:10,n={ArrowLeft:{x:-t,y:0},ArrowRight:{x:t,y:0},ArrowUp:{x:0,y:-t},ArrowDown:{x:0,y:t}}[e.key];n&&(e.preventDefault(),He({...j(),x:j().x+n.x,y:j().y+n.y}))},qe=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault(),e.stopPropagation();let t=e.shiftKey?1:20;He({...j(),width:j().width+(e.key===`ArrowRight`?t:-t)})},Je=async e=>{D(!0),q(``);try{let t=await fetch(`/api/my/artifacts`,{method:`POST`,headers:{"Content-Type":e.type||`application/octet-stream`},body:e}),n=await t.json();if(!t.ok||typeof n.id!=`string`)throw Error(n.details?.find(e=>e.message)?.message??n.error??`Could not upload image.`);x()||Object.assign(y,{crop:j(),reset:Se(),dirty:O()}),b=null,A(!1),B(!1),U(!1),W(!1),T(n.id)}catch(e){q(e instanceof Error?e.message:`Could not upload image. Try again.`)}finally{D(!1),Y&&(Y.value=``)}},Ye=async()=>{if(K()||E())return;Ee(!0),q(``);let t=Se()?null:he(Pe(j(),V())),n=M(Oe().source,x());x()?n=ie(n,t):(O()||!r)&&(n=ne(n,t));try{let t=await v(e.id,{source:n},Oe().editId),r=await t.json().catch(()=>({}));if(t.ok){e.onClose();return}if(t.status===409&&r.edit_id&&typeof r.source==`string`){ke({editId:r.edit_id,source:r.source}),q(`The document changed elsewhere. Your framing is preserved; review it and save again.`);return}let i=r.details?.find(e=>e.message)?.message;q(i??`Could not save the preview (${r.error??t.status}).`)}catch{q(`Could not save the preview. Check your connection and try again.`)}finally{Ee(!1)}},Xe=()=>{T(null),U(!1),W(!1),L(y.crop),z(y.crop),B(y.reset),A(y.dirty)};return n(l,{get mount(){return h(document)??document.body},get children(){var t=me(),r=t.firstChild,l=r.nextSibling,d=l.firstChild,h=d.firstChild.nextSibling,g=d.nextSibling,_=g.firstChild,v=_.nextSibling,y=g.nextSibling,w=y.firstChild,T=w.firstChild,D=y.nextSibling,O=D.firstChild,k=O.firstChild,ne=k.firstChild,re=k.nextSibling.firstChild,M=re.nextSibling;f(r,`click`,e.onClose,!0);var N=Ae;typeof N==`function`?c(N,l):Ae=l,f(h,`click`,e.onClose,!0);var ie=je;typeof ie==`function`?c(ie,h):je=h,u(h,n(te,{size:15})),_.addEventListener(`change`,e=>{let t=e.currentTarget.files?.[0];t&&Je(t)});var F=Y;return typeof F==`function`?c(F,_):Y=_,v.$$click=()=>Y?.click(),u(v,(()=>{var e=p(()=>!!E());return()=>e()?`uploading…`:x()?`replace image`:`upload image`})()),u(g,n(i,{get when(){return x()},get children(){var e=oe();return e.$$click=Xe,o(()=>e.disabled=E()||K()),e}}),null),T.addEventListener(`error`,()=>{W(!0),U(!1)}),T.addEventListener(`load`,Ue),s(T,`draggable`,!1),u(w,n(i,{get when(){return p(()=>!H())()&&!we()},get children(){var e=ce(),t=e.firstChild.nextSibling;return u(t,()=>x()?`loading image…`:`rendering full-page overview…`),u(e,n(i,{get when(){return!x()},get children(){return se()}}),null),e}}),null),u(w,n(i,{get when(){return we()},get children(){var e=le(),t=e.firstChild.nextSibling;return t.$$click=()=>{W(!1),Te(e=>e+1)},e}}),null),u(w,n(i,{get when(){return H()},get children(){var e=fe(),t=e.firstChild,r=t.firstChild.nextSibling;r.nextSibling;var l=t.nextSibling;e.addEventListener(`pointercancel`,$),e.$$pointerup=$,e.$$pointermove=Ge,f(e,`pointerdown`,We(`move`),!0),e.$$keydown=Ke;var d=J;return typeof d==`function`?c(d,e):J=e,u(e,n(i,{get when(){return p(()=>!x())()&&!ve()},get children(){return[(()=>{var e=ue();return e.addEventListener(`load`,()=>xe(Re())),s(e,`draggable`,!1),o(t=>{var n=Re(),r=`pointer-events-none absolute inset-0 h-full w-full select-none transition-opacity duration-150 motion-reduce:transition-none ${ze()?`opacity-100`:`opacity-0`}`;return n!==t.e&&s(e,`src`,t.e=n),r!==t.t&&a(e,t.t=r),t},{e:void 0,t:void 0}),e})(),n(i,{get when(){return!ze()},get children(){return de()}})]}}),t),u(t,Ie,r),l.addEventListener(`pointercancel`,$),l.$$pointerup=$,l.$$pointermove=Ge,f(l,`pointerdown`,We(`resize`),!0),l.$$keydown=qe,o(t=>{var n=`x ${Math.round(j().x)}, y ${Math.round(j().y)}, width ${Math.round(j().width)}`,r=`absolute cursor-move border-2 border-accent shadow-[0_0_0_9999px_rgba(0,0,0,0.55)] outline-none ease-out focus:ring-2 focus:ring-accent focus:ring-offset-2 motion-reduce:transition-none ${ve()?``:`transition-[left,top,width,height] duration-200`}`,i=`${(j().x-Be())/Q()*100}%`,o=`${(j().y-Ve())/Z()*100}%`,c=`${j().width/Q()*100}%`,u=`${Fe()/Z()*100}%`,d=x()?Math.min(400,P(V())):400,f=x()?P(V()):S,p=Math.round(j().width);return n!==t.e&&s(e,`aria-valuetext`,t.e=n),r!==t.t&&a(e,t.t=r),i!==t.a&&m(e,`left`,t.a=i),o!==t.o&&m(e,`top`,t.o=o),c!==t.i&&m(e,`width`,t.i=c),u!==t.n&&m(e,`height`,t.n=u),d!==t.s&&s(l,`aria-valuemin`,t.s=d),f!==t.h&&s(l,`aria-valuemax`,t.h=f),p!==t.r&&s(l,`aria-valuenow`,t.r=p),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),e}}),null),u(D,n(i,{get when(){return De()},get children(){var e=pe();return u(e,De),e}}),O),k.$$click=()=>{A(!0),b=null;let e=x()?ae(V()):C;L(e),z(e),B(!0),q(``)},u(k,n(ee,{size:13}),ne),f(re,`click`,e.onClose,!0),M.$$click=()=>void Ye(),u(M,()=>K()?`saving…`:`save preview`),o(e=>{var t=E()||K(),n=Ne(),r=x()?`Uploaded social preview`:`Artifact preview`,i=`pointer-events-none absolute h-auto max-w-none select-none ease-out motion-reduce:transition-none ${ve()?``:`transition-[left,top,width] duration-200`}`,o=`${S/Q()*100}%`,c=`${-Be()/Q()*100}%`,l=`${-Ve()/Z()*100}%`,u=!H()||E()||K(),d=K()||E()||!H();return t!==e.e&&(v.disabled=e.e=t),n!==e.t&&s(T,`src`,e.t=n),r!==e.a&&s(T,`alt`,e.a=r),i!==e.o&&a(T,e.o=i),o!==e.i&&m(T,`width`,e.i=o),c!==e.n&&m(T,`left`,e.n=c),l!==e.s&&m(T,`top`,e.s=l),u!==e.h&&(k.disabled=e.h=u),d!==e.r&&(M.disabled=e.r=d),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),t}})}r([`click`,`keydown`,`pointerdown`,`pointermove`,`pointerup`]);export{L as SocialPreviewEditor};
|
|
1
|
+
import{l as e}from"./jsx-vj4cHW_Q.js";import{M as t,T as n,a as r,b as i,i as a,k as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,u as m}from"./web-Ckpee-ZJ.js";import{t as ee}from"./rotate-ccw-CIMUmeuJ.js";import{P as h,V as te}from"./solid-app-BNcsMwv4.js";import{d as g}from"./document-update-client-td73lQ81.js";import{t as _}from"./dialog-shell-D1Dv5nY8.js";import{n as v}from"./browser-artifact-write-CG72iseh.js";var y=`artifactbin:og-image-crop`,b=`artifactbin:og-image`,x=`artifactbin:og-crop`,S=1600,C={x:0,y:0,width:S},w=e=>e*840/S,T=e=>{if(!/^(0|[1-9][0-9]*)$/.test(e))return null;let t=Number(e);return Number.isSafeInteger(t)?t:null};function E(e,t=400){let n=/^x=(0|[1-9][0-9]*);y=(0|[1-9][0-9]*);width=(0|[1-9][0-9]*)$/.exec(e);if(!n)return null;let r=T(n[1]),i=T(n[2]),a=T(n[3]);return r===null||i===null||a===null||a<t||a>1600?null:{x:r,y:i,width:a}}var D=(e,t)=>{let n=e.attributes.find(e=>e.name.toLowerCase()===t);return n?.value.static&&typeof n.value.json==`string`?n.value.json:null};function O(t,n=x){let r=e(t);if(!r.ok)return null;let{helmet:i}=g(r.nodes),a=i?.children.find(e=>e.type===`element`&&!e.isComponent&&e.tag.toLowerCase()===`meta`&&D(e,`name`)===n)??null,o=a?D(a,`content`):null;return{helmet:i,element:a,crop:o===null?null:E(o,n===y?1:400)}}function k(e){return O(e)?.crop??null}var A=({x:e,y:t,width:n})=>`<meta name="${x}" content="x=${e};y=${t};width=${n}" />`;function ne(e,t){return j(e,x,t?A(t):null)}function j(e,t,n){let r=O(e,t);if(!r)return e;if(r.element)return e.slice(0,r.element.start)+(n??``)+e.slice(r.element.end);if(!n)return e;if(!r.helmet)return`<Helmet>${n}</Helmet>${e?`\n${e}`:``}`;if(r.helmet.selfClosing)return e.slice(0,r.helmet.start)+`<Helmet>${n}</Helmet>`+e.slice(r.helmet.end);let i=`</${r.helmet.tag}>`,a=r.helmet.end-i.length;return e.slice(0,a)+n+e.slice(a)}function re(e){let t=O(e,b),n=t?.element?D(t.element,`content`):null;return n&&/^ref:[A-Za-z0-9_-]+$/.test(n)?n.slice(4):null}function M(e,t){if(t!==null&&!/^[A-Za-z0-9_-]+$/.test(t))throw Error(`Invalid image reference`);return j(e,b,t===null?null:`<meta name="${b}" content="ref:${t}" />`)}function N(e){return O(e,y)?.crop??null}function ie(e,t){return j(e,y,t?`<meta name="${y}" content="x=${t.x};y=${t.y};width=${t.width}" />`:null)}function P(e){return Math.min(S,e*S/840)}function ae(e){let t=P(e);return{x:(S-t)/2,y:(e-w(t))/2,width:t}}function F(e,t){let n=P(t),r=Math.min(n,Math.max(Math.min(400,n),e.width));return{width:r,x:Math.min(Math.max(0,e.x),S-r),y:Math.min(Math.max(0,e.y),Math.max(0,t-w(r)))}}var oe=d(`<button type=button class="cursor-pointer rounded-[5px] border border-edge px-3 py-2 font-mono text-xs text-muted">use document framing`),se=d(`<span class="text-[10px] text-faint">Complex artifacts can take a few seconds.`),ce=d(`<div role=status aria-live=polite class="absolute inset-0 flex min-h-48 flex-col items-center justify-center gap-3 bg-surface px-4 text-center font-mono text-xs text-muted"><span aria-hidden=true class="h-5 w-5 animate-spin rounded-full border-2 border-edge-bright border-t-accent motion-reduce:animate-none"></span><span>`),le=d(`<div role=status class="absolute inset-0 flex min-h-48 flex-col items-center justify-center gap-3 bg-surface px-4 text-center font-mono text-xs text-muted"><span>The preview could not be loaded.</span><button type=button class="cursor-pointer rounded-[5px] border border-edge-bright bg-raised px-3 py-2 text-fg hover:border-accent">retry`),ue=d(`<img alt aria-hidden=true>`),de=d(`<span aria-live=polite class="absolute right-1.5 top-1.5 flex items-center gap-1.5 bg-black/65 px-2 py-1 font-mono text-[9px] text-white"><span aria-hidden=true class="h-2.5 w-2.5 animate-spin rounded-full border border-white/40 border-t-white motion-reduce:animate-none"></span>sharpening…`),fe=d(`<div role=group tabindex=0 aria-label="Move social preview crop"style=touch-action:none><span class="absolute left-1 top-1 bg-accent px-1.5 py-1 font-mono text-[9px] text-white">1600 × 840 · <!>%</span><div role=slider tabindex=0 aria-label="Resize social preview crop"class="absolute -bottom-2 -right-2 h-5 w-5 cursor-se-resize rounded-full border-2 border-white bg-accent shadow outline-none focus:ring-2 focus:ring-accent"style=touch-action:none>`),pe=d(`<p role=status class="mb-2 font-mono text-[11px] text-danger">`),me=d(`<div class="fixed inset-0 z-[100] flex items-center justify-center p-3 sm:p-8"><button type=button aria-label="Close social preview"class="absolute inset-0 cursor-default border-0 bg-black/50 p-0 backdrop-blur-[2px]"></button><div role=dialog aria-modal=true aria-label="Social preview"class="relative z-10 flex max-h-[92vh] w-full max-w-4xl flex-col overflow-hidden rounded-[9px] border border-edge-bright bg-surface shadow-2xl"><header class="flex shrink-0 items-start justify-between border-b border-edge px-4 py-3"><div><p class="font-mono text-[10px] uppercase tracking-[0.14em] text-accent">Share card</p><h2 class="mt-1 font-sans text-base font-semibold text-fg">Social preview</h2><p class="mt-1 font-sans text-xs text-muted">Drag to pan. Resize the locked 40:21 frame; release to focus.</p></div><button type=button aria-label="Cancel social preview"class="flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-edge bg-transparent text-muted hover:bg-raised hover:text-fg"></button></header><div class="flex items-center gap-3 border-b border-edge px-4 py-3"><input type=file accept=image/png,image/jpeg,image/webp,image/gif,image/svg+xml aria-label="Upload social preview image"class=hidden><button type=button class="cursor-pointer rounded-[5px] border border-edge px-3 py-2 font-mono text-xs text-fg disabled:opacity-60"></button></div><div class="min-h-0 flex-1 bg-ground p-3 sm:p-5"><div class="relative mx-auto aspect-[40/21] max-h-full overflow-hidden border border-edge bg-surface"aria-label="Social preview canvas"><img></div></div><footer class="shrink-0 border-t border-edge bg-surface px-4 py-3"><div class="flex items-center justify-between gap-3"><button type=button aria-label="Reset social preview"class="inline-flex cursor-pointer items-center gap-1.5 rounded-[5px] border-0 bg-transparent px-2 py-2 font-mono text-xs text-muted hover:bg-raised hover:text-fg"> reset</button><div class="flex gap-2"><button type=button class="cursor-pointer rounded-[5px] border border-edge bg-transparent px-3 py-2 font-mono text-xs text-muted hover:border-edge-bright hover:text-fg">cancel</button><button type=button class="cursor-pointer rounded-[5px] border border-accent bg-accent px-3 py-2 font-mono text-xs font-semibold text-white disabled:cursor-default disabled:opacity-60">`),he=e=>({x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width)}),I=1.08,ge=3,_e=(e,t)=>{let n=Math.min(S,Math.max(400,e.width)),r=w(n);return{width:n,x:Math.min(Math.max(0,e.x),S-n),y:Math.min(Math.max(0,e.y),Math.max(0,t-r))}};function L(e){let r=re(e.source),d=k(e.source),g=N(e.source),y={crop:d??C,reset:!1,dirty:!1},b=g,[x,T]=t(r),[E,D]=t(!1),[O,A]=t(!1),[j,L]=t((r?g:d)??C),[R,z]=t(d??C),[ve,ye]=t(!1),[be,xe]=t(``),[Se,B]=t(!1),[V,Ce]=t(840),[H,U]=t(!1),[we,W]=t(!1),[G,Te]=t(0),[K,Ee]=t(!1),[De,q]=t(``),[Oe,ke]=t({source:e.source,editId:e.editId}),Ae,je,J,Y,X=null,Me=()=>`/a/${e.id}/export?mode=preview&format=jpg&v=${e.version}&pv=2${G()?`&attempt=${G()}`:``}`,Ne=()=>{let t=x();return t?t===r?`/a/${e.id}/export?mode=preview&image=1&v=${e.version}&attempt=${G()}`:`/a/${t}/raw?attempt=${G()}`:Me()},Pe=(e,t)=>x()?F(e,t):_e(e,t),Fe=()=>w(j().width),Ie=()=>Math.round(S/j().width*100),Le=()=>he(j()),Re=()=>`/a/${e.id}/export?mode=preview&format=png&v=${e.version}&pv=2&focus=1&crop=${encodeURIComponent(`x=${Le().x};y=${Le().y};width=${Le().width}`)}`,ze=()=>be()===Re(),Z=()=>w(R().width)*I,Q=()=>R().width*I,Be=()=>R().x-(Q()-R().width)/2,Ve=()=>R().y-(Z()-w(R().width))/2;_({panel:()=>Ae,onClose:()=>e.onClose(),initialFocus:()=>je,focusable:`button:not([disabled]), [tabindex="0"]`});let He=e=>{A(!0),B(!1);let t=Pe(e,V());x()&&(b=t),L(t),z(t)},Ue=e=>{let t=e.currentTarget,n=t.naturalWidth/S,r=n>0?t.naturalHeight/n:840,i=x()?r:Math.max(840,r);Ce(i);let a=x()?F(b??ae(i),i):_e(j(),i);z(a),L(a),U(!0),W(!1)},We=e=>t=>{t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId),ye(!0),X={pointerId:t.pointerId,kind:e,clientX:t.clientX,clientY:t.clientY,crop:j(),camera:R(),latest:j()}},Ge=e=>{let t=X;if(!t||t.pointerId!==e.pointerId||!J)return;let n=J.parentElement?.getBoundingClientRect().width??0;if(n<=0)return;let r=t.camera.width*I/n,i=(e.clientX-t.clientX)*r,a=(e.clientY-t.clientY)*r,o=840/S,s=(i+o*a)/(1+o*o),c=s>0?s*ge:s,l=Pe(t.kind===`move`?{...t.crop,x:t.crop.x-i,y:t.crop.y-a}:{...t.crop,width:t.crop.width+c},V());t.latest=l,x()&&(b=l),A(!0),B(!1),L(l),(t.kind===`move`||l.width>=t.crop.width)&&z(l)},$=e=>{let t=X;t?.pointerId===e.pointerId&&(X=null,ye(!1),z(t.latest))},Ke=e=>{let t=e.shiftKey?1:10,n={ArrowLeft:{x:-t,y:0},ArrowRight:{x:t,y:0},ArrowUp:{x:0,y:-t},ArrowDown:{x:0,y:t}}[e.key];n&&(e.preventDefault(),He({...j(),x:j().x+n.x,y:j().y+n.y}))},qe=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault(),e.stopPropagation();let t=e.shiftKey?1:20;He({...j(),width:j().width+(e.key===`ArrowRight`?t:-t)})},Je=async e=>{D(!0),q(``);try{let t=await fetch(`/api/my/artifacts`,{method:`POST`,headers:{"Content-Type":e.type||`application/octet-stream`},body:e}),n=await t.json();if(!t.ok||typeof n.id!=`string`)throw Error(n.details?.find(e=>e.message)?.message??n.error??`Could not upload image.`);x()||Object.assign(y,{crop:j(),reset:Se(),dirty:O()}),b=null,A(!1),B(!1),U(!1),W(!1),T(n.id)}catch(e){q(e instanceof Error?e.message:`Could not upload image. Try again.`)}finally{D(!1),Y&&(Y.value=``)}},Ye=async()=>{if(K()||E())return;Ee(!0),q(``);let t=Se()?null:he(Pe(j(),V())),n=M(Oe().source,x());x()?n=ie(n,t):(O()||!r)&&(n=ne(n,t));try{let t=await v(e.id,{source:n},Oe().editId),r=await t.json().catch(()=>({}));if(t.ok){e.onClose();return}if(t.status===409&&r.edit_id&&typeof r.source==`string`){ke({editId:r.edit_id,source:r.source}),q(`The document changed elsewhere. Your framing is preserved; review it and save again.`);return}let i=r.details?.find(e=>e.message)?.message;q(i??`Could not save the preview (${r.error??t.status}).`)}catch{q(`Could not save the preview. Check your connection and try again.`)}finally{Ee(!1)}},Xe=()=>{T(null),U(!1),W(!1),L(y.crop),z(y.crop),B(y.reset),A(y.dirty)};return n(l,{get mount(){return h(document)??document.body},get children(){var t=me(),r=t.firstChild,l=r.nextSibling,d=l.firstChild,h=d.firstChild.nextSibling,g=d.nextSibling,_=g.firstChild,v=_.nextSibling,y=g.nextSibling,w=y.firstChild,T=w.firstChild,D=y.nextSibling,O=D.firstChild,k=O.firstChild,ne=k.firstChild,re=k.nextSibling.firstChild,M=re.nextSibling;f(r,`click`,e.onClose,!0);var N=Ae;typeof N==`function`?c(N,l):Ae=l,f(h,`click`,e.onClose,!0);var ie=je;typeof ie==`function`?c(ie,h):je=h,u(h,n(te,{size:15})),_.addEventListener(`change`,e=>{let t=e.currentTarget.files?.[0];t&&Je(t)});var F=Y;return typeof F==`function`?c(F,_):Y=_,v.$$click=()=>Y?.click(),u(v,(()=>{var e=p(()=>!!E());return()=>e()?`uploading…`:x()?`replace image`:`upload image`})()),u(g,n(i,{get when(){return x()},get children(){var e=oe();return e.$$click=Xe,o(()=>e.disabled=E()||K()),e}}),null),T.addEventListener(`error`,()=>{W(!0),U(!1)}),T.addEventListener(`load`,Ue),s(T,`draggable`,!1),u(w,n(i,{get when(){return p(()=>!H())()&&!we()},get children(){var e=ce(),t=e.firstChild.nextSibling;return u(t,()=>x()?`loading image…`:`rendering full-page overview…`),u(e,n(i,{get when(){return!x()},get children(){return se()}}),null),e}}),null),u(w,n(i,{get when(){return we()},get children(){var e=le(),t=e.firstChild.nextSibling;return t.$$click=()=>{W(!1),Te(e=>e+1)},e}}),null),u(w,n(i,{get when(){return H()},get children(){var e=fe(),t=e.firstChild,r=t.firstChild.nextSibling;r.nextSibling;var l=t.nextSibling;e.addEventListener(`pointercancel`,$),e.$$pointerup=$,e.$$pointermove=Ge,f(e,`pointerdown`,We(`move`),!0),e.$$keydown=Ke;var d=J;return typeof d==`function`?c(d,e):J=e,u(e,n(i,{get when(){return p(()=>!x())()&&!ve()},get children(){return[(()=>{var e=ue();return e.addEventListener(`load`,()=>xe(Re())),s(e,`draggable`,!1),o(t=>{var n=Re(),r=`pointer-events-none absolute inset-0 h-full w-full select-none transition-opacity duration-150 motion-reduce:transition-none ${ze()?`opacity-100`:`opacity-0`}`;return n!==t.e&&s(e,`src`,t.e=n),r!==t.t&&a(e,t.t=r),t},{e:void 0,t:void 0}),e})(),n(i,{get when(){return!ze()},get children(){return de()}})]}}),t),u(t,Ie,r),l.addEventListener(`pointercancel`,$),l.$$pointerup=$,l.$$pointermove=Ge,f(l,`pointerdown`,We(`resize`),!0),l.$$keydown=qe,o(t=>{var n=`x ${Math.round(j().x)}, y ${Math.round(j().y)}, width ${Math.round(j().width)}`,r=`absolute cursor-move border-2 border-accent shadow-[0_0_0_9999px_rgba(0,0,0,0.55)] outline-none ease-out focus:ring-2 focus:ring-accent focus:ring-offset-2 motion-reduce:transition-none ${ve()?``:`transition-[left,top,width,height] duration-200`}`,i=`${(j().x-Be())/Q()*100}%`,o=`${(j().y-Ve())/Z()*100}%`,c=`${j().width/Q()*100}%`,u=`${Fe()/Z()*100}%`,d=x()?Math.min(400,P(V())):400,f=x()?P(V()):S,p=Math.round(j().width);return n!==t.e&&s(e,`aria-valuetext`,t.e=n),r!==t.t&&a(e,t.t=r),i!==t.a&&m(e,`left`,t.a=i),o!==t.o&&m(e,`top`,t.o=o),c!==t.i&&m(e,`width`,t.i=c),u!==t.n&&m(e,`height`,t.n=u),d!==t.s&&s(l,`aria-valuemin`,t.s=d),f!==t.h&&s(l,`aria-valuemax`,t.h=f),p!==t.r&&s(l,`aria-valuenow`,t.r=p),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),e}}),null),u(D,n(i,{get when(){return De()},get children(){var e=pe();return u(e,De),e}}),O),k.$$click=()=>{A(!0),b=null;let e=x()?ae(V()):C;L(e),z(e),B(!0),q(``)},u(k,n(ee,{size:13}),ne),f(re,`click`,e.onClose,!0),M.$$click=()=>void Ye(),u(M,()=>K()?`saving…`:`save preview`),o(e=>{var t=E()||K(),n=Ne(),r=x()?`Uploaded social preview`:`Artifact preview`,i=`pointer-events-none absolute h-auto max-w-none select-none ease-out motion-reduce:transition-none ${ve()?``:`transition-[left,top,width] duration-200`}`,o=`${S/Q()*100}%`,c=`${-Be()/Q()*100}%`,l=`${-Ve()/Z()*100}%`,u=!H()||E()||K(),d=K()||E()||!H();return t!==e.e&&(v.disabled=e.e=t),n!==e.t&&s(T,`src`,e.t=n),r!==e.a&&s(T,`alt`,e.a=r),i!==e.o&&a(T,e.o=i),o!==e.i&&m(T,`width`,e.i=o),c!==e.n&&m(T,`left`,e.n=c),l!==e.s&&m(T,`top`,e.s=l),u!==e.h&&(k.disabled=e.h=u),d!==e.r&&(M.disabled=e.r=d),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),t}})}r([`click`,`keydown`,`pointerdown`,`pointermove`,`pointerup`]);export{L as SocialPreviewEditor};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as e,M as t,R as n,T as r,a as i,b as a,k as o,l as s,m as c,o as l,p as u,z as d}from"./web-Ckpee-ZJ.js";import{t as f}from"./copy-
|
|
1
|
+
import{D as e,M as t,R as n,T as r,a as i,b as a,k as o,l as s,m as c,o as l,p as u,z as d}from"./web-Ckpee-ZJ.js";import{t as f}from"./copy-v5iTV3kk.js";import{t as p}from"./DocumentSharing-BiTakFtn.js";import{a as m,n as h,r as g,s as _,t as v}from"./DocumentChrome-Bw4_z5yQ.js";import{M as y,W as b,a as x,i as S,q as ee}from"./solid-app-BNcsMwv4.js";import"./src-CcX8uAQo.js";import"./default-server-CJjQV_9Y.js";import{r as C}from"./document-update-client-td73lQ81.js";import{n as w}from"./http-DEdzW08u.js";import{t as T}from"./title-BqVxKtqW.js";import{n as E,r as te}from"./ForkArtifact-DXYU1-qL.js";import{i as ne,n as re,r as ie}from"./share-roles-c4EwFuyA.js";import{t as D}from"./copy-text-BWnoOWaK.js";import{t as O}from"./document-navigation-CED4GpXl.js";var k=`Waiting for your agent…`,A=`Agents: edit this document with the afbin CLI — read /llms.txt on this site, then afbin pull this page's URL.`,j=`Paste what you copied into your coding agent.`,M=(e,t)=>t===1&&!!e?.includes(A)&&e.includes(k);`${j}${k}${A}`;var N=`<article data-design="tw" className="mx-auto max-w-3xl px-6 py-12"><h1 className="text-4xl font-semibold tracking-tight">Untitled report</h1><p className="mt-6 text-lg leading-relaxed">Start writing here.</p></article>`;function P(e,t){let n=e.replace(/\/$/,``),r=n===`https://app.artifactbin.dev`?``:` Pass --server ${n} to every afbin server command.`,i=n===`https://app.artifactbin.dev`?``:` --server ${n}`;return`Edit my artifact at ${F(e,t)} in place. Prepare Node if needed: ${n}/chat/ensure-node.sh (macOS/Linux), ${n}/chat/ensure-node.ps1 (Windows). Run npx --yes @afbin/cli@latest help first, then npx --yes @afbin/cli@latest auth ${F(e,t)}${i}. Windows uses npx.cmd. Approve in the browser that created this artifact; guest access is fine.${r}
|
|
2
2
|
|
|
3
3
|
---
|
|
4
4
|
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as e,O as t,T as n,_ as r,a as i,b as a,i as o,k as s,l as c,o as l,p as u,s as d,u as ee,v as f}from"./web-Ckpee-ZJ.js";import{t as p}from"./chevron-left-
|
|
1
|
+
import{M as e,O as t,T as n,_ as r,a as i,b as a,i as o,k as s,l as c,o as l,p as u,s as d,u as ee,v as f}from"./web-Ckpee-ZJ.js";import{t as p}from"./chevron-left-NHmvDJpN.js";import{t as m}from"./RowMenu-B2c9LyOb.js";import{t as te}from"./rotate-ccw-CIMUmeuJ.js";import{t as h}from"./search-CmIkt7xE.js";import{A as g,C as _,D as v,K as y,S as b,T as ne,U as x,Y as S,Z as C,_ as re,b as w,h as ie,l as T,q as E,w as D}from"./solid-app-BNcsMwv4.js";var O=u(`<button type=button>`),ae=u(`<button aria-label="Retry trash">Could not refresh trash. Retry`),oe=u(`<span class="ml-auto flex shrink-0 items-center gap-1.5 border-l border-edge pl-2">`),k=u(`<span class="shrink-0 font-mono text-[10px] text-faint"> / `),A=u(`<tr><td colspan=5 class="px-4 py-6 text-center font-mono text-xs text-faint">`),j=u(`<button type=button class="inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-[4px] border-0 bg-transparent p-0 text-muted transition-colors enabled:hover:text-accent disabled:cursor-default disabled:text-faint disabled:opacity-40"aria-label="Previous page">`),M=u(`<button type=button class="inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-[4px] border-0 bg-transparent p-0 text-muted transition-colors enabled:hover:text-accent disabled:cursor-default disabled:text-faint disabled:opacity-40"aria-label="Next page">`),N=u(`<div class="flex items-center justify-between border-t border-edge px-4 py-2"><span aria-label="Page range"class="font-mono text-[10px] text-faint">-<!> of </span><span class="inline-flex items-center gap-1">`),P=u(`<main class="mx-auto mt-8 max-w-6xl px-4 pb-24 sm:px-6"><div class="mb-2 flex flex-wrap items-baseline gap-x-2 gap-y-1"><span class="font-mono text-[10px] text-faint">deleted artifacts can be restored</span></div><section aria-label=Trash><div class="flex flex-wrap items-center gap-2 border-b border-edge px-4 py-2"><input aria-label="Search trash"placeholder="search artifacts"class="min-w-32 flex-1 border-0 bg-transparent font-mono text-xs text-fg placeholder:text-faint focus:outline-none"></div><table class="w-full border-collapse text-left text-sm"><thead class="hidden sm:table-header-group"><tr></tr></thead><tbody>`),F=u(`<th class="px-4 py-2.5">`),I=u(`<td class="hidden px-4 py-2.5 text-xs whitespace-nowrap text-muted sm:table-cell">`),L=u(`<tr><td class="w-full max-w-0 px-3 py-3 sm:px-4 sm:py-2.5"><span class="block truncate font-semibold text-fg"></span><span class="mt-1 flex items-center gap-1.5 font-mono text-[10px] leading-none text-faint sm:hidden"><span></span><span aria-hidden=true>·</span><span>v</span><span aria-hidden=true>·</span><time></time></span></td><td class="hidden px-4 py-2.5 whitespace-nowrap sm:table-cell"></td><td class="hidden px-4 py-2.5 whitespace-nowrap sm:table-cell"></td><td class="px-2 py-3 text-right whitespace-nowrap sm:px-4 sm:py-2.5">`),R=10,z=[`folder`,`markup`,`dataset`,`viz`,`image`,`pdf`],B=[`title`,`type`,`ver`,`deleted`,``];function se(e){return(()=>{var t=O();return t.$$click=()=>e.onToggle(e.format),l(t,()=>D(e.format)),s(n=>{var r=`Filter ${e.format}`,i=e.active,a=`inline-flex cursor-pointer items-center rounded-full border px-2 py-0.5 font-mono text-[10px] leading-none whitespace-nowrap transition-colors ${e.active?`border-accent bg-accent-soft text-accent`:`border-edge bg-transparent text-faint hover:border-edge-bright hover:text-muted`}`;return r!==n.e&&c(t,`aria-label`,n.e=r),i!==n.t&&c(t,`aria-pressed`,n.t=i),a!==n.a&&o(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})()}function V(){let{session:i}=E(),u=y(`/api/page/trash`),[O,V]=e(null),[H,ce]=e(``),[U,le]=e([]),[ue,W]=e(0),de=async e=>{V(e);try{if((await T(`/api/my/artifacts/${e}/restore`,`POST`)).ok){let t=u.data();t&&u.seed({files:t.files.filter(t=>t.id!==e)}),S()}}finally{V(null)}},G=()=>u.data()?.files??[],K=t(()=>z.filter(e=>G().some(t=>t.format===e))),q=()=>H().trim().toLowerCase(),J=()=>!!q()||U().length>0,Y=t(()=>{if(!J())return G();let e=q(),t=U();return G().filter(n=>(!e||`${n.title??``} ${D(n.format)}`.toLowerCase().includes(e))&&(t.length===0||t.includes(n.format)))}),X=()=>Math.max(1,Math.ceil(Y().length/R)),Z=()=>Math.min(ue(),X()-1),Q=()=>Z()*R,$=t(()=>Y().slice(Q(),Q()+R)),fe=e=>{le(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),W(0)},pe=()=>{let e=i();return!!(e&&!e.user)};return n(a,{get when(){return!pe()},get fallback(){return n(C,{href:`/login?callbackUrl=/trash`})},get children(){var e=P(),t=e.firstChild,i=t.firstChild,y=t.nextSibling,S=y.firstChild,C=S.firstChild,T=S.nextSibling.firstChild,E=T.firstChild,z=T.nextSibling;return l(t,n(w,{children:`trash`}),i),o(y,b),l(y,n(a,{get when(){return u.error()},get children(){var e=ae();return e.$$click=()=>void u.refresh(!0),e}}),S),l(S,n(h,{size:13,class:`shrink-0 text-faint`}),C),C.$$input=e=>{ce(e.currentTarget.value),W(0)},l(S,n(a,{get when(){return K().length>1},get children(){var e=oe();return l(e,n(r,{get each(){return K()},children:e=>n(se,{format:e,get active(){return U().includes(e)},onToggle:fe})})),e}}),null),l(S,n(a,{get when(){return J()},get children(){var e=k(),t=e.firstChild;return l(e,()=>Y().length,t),l(e,()=>G().length,null),e}}),null),l(E,n(f,{each:B,children:e=>(()=>{var t=F();return l(t,n(w,{get children(){return e()}})),t})()})),l(z,n(a,{get when(){return d(()=>!!u.data())()&&Y().length===0},get children(){var e=A(),t=e.firstChild;return o(e,_),l(t,(()=>{var e=d(()=>!!q());return()=>e()?[`nothing matches “`,d(()=>H().trim()),`”`]:U().length?`nothing matches the active filters`:`nothing deleted`})()),e}}),null),l(z,n(r,{get each(){return $()},children:(e,t)=>{let r=()=>e.title||`Untitled`;return(()=>{var i=L(),a=i.firstChild,u=a.firstChild,f=u.nextSibling.firstChild,p=f.nextSibling.nextSibling;p.firstChild;var h=p.nextSibling.nextSibling,y=a.nextSibling,b=y.nextSibling,x=b.nextSibling;return o(i,`${_} reveal`),l(u,r),l(f,()=>D(e.format)),l(p,()=>e.version,null),l(h,()=>v(e.deleted_at)),l(y,n(re,{get format(){return e.format}})),l(b,n(ie,{tone:`dim`,get children(){return[`v`,d(()=>e.version)]}})),l(i,n(g,{get content(){return ne(e.deleted_at)},get children(){var t=I();return l(t,()=>v(e.deleted_at)),t}}),x),l(x,n(m,{get name(){return r()},get items(){return[{label:`Restore ${r()}`,text:O()===e.id?`restoring…`:`restore`,icon:()=>n(te,{size:12}),disabled:O()===e.id,onSelect:()=>void de(e.id)}]}})),s(n=>{var r=`${t()*40}ms`,a=e.deleted_at;return r!==n.e&&ee(i,`animation-delay`,n.e=r),a!==n.t&&c(h,`datetime`,n.t=a),n},{e:void 0,t:void 0}),i})()}}),null),l(y,n(a,{get when(){return Y().length>R},get children(){var e=N(),t=e.firstChild,r=t.firstChild,i=r.nextSibling;i.nextSibling;var a=t.nextSibling;return l(t,()=>Q()+1,r),l(t,()=>Q()+$().length,i),l(t,()=>Y().length,null),l(a,n(g,{content:`previous`,get children(){var e=j();return e.$$click=()=>W(Z()-1),l(e,n(p,{size:13})),s(()=>e.disabled=Z()===0),e}}),null),l(a,n(g,{content:`next`,get children(){var e=M();return e.$$click=()=>W(Z()+1),l(e,n(x,{size:13})),s(()=>e.disabled=Z()>=X()-1),e}}),null),e}}),null),s(()=>C.value=H()),e}})}i([`click`,`input`]);export{V as TrashPage};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,M as t,R as n,T as r,a as i,b as a,k as o,l as s,o as c,p as l}from"./web-Ckpee-ZJ.js";import{t as u}from"./AvatarCircle-
|
|
1
|
+
import{D as e,M as t,R as n,T as r,a as i,b as a,k as o,l as s,o as c,p as l}from"./web-Ckpee-ZJ.js";import{t as u}from"./AvatarCircle-CBpOuCGy.js";import{X as d,Y as f,Z as p,l as m,q as h}from"./solid-app-BNcsMwv4.js";import{t as g}from"./document-navigation-CED4GpXl.js";import{t as _}from"./safe-redirect-C0PCIKoE.js";var v=l(`<p role=status class="mt-2 ml-6 font-mono text-xs text-danger">`),y=l(`<main class="mx-auto mt-16 max-w-xl px-6"><div class="mx-auto max-w-sm"><h1 class="text-base font-semibold"><span class=text-accent>></span> welcome</h1><div class=mt-6></div><form class=mt-6><label for=welcome-username class="font-mono text-[10px] uppercase tracking-[0.14em] text-faint">handle</label><div class="mt-2 flex items-center gap-2"><span class="w-4 text-center font-mono text-sm text-muted">@</span><input id=welcome-username aria-label=Username autocomplete=off class="min-w-0 flex-1 rounded-[4px] border border-edge bg-surface px-3 py-2 text-sm"></div><div class=mt-6><button type=submit class="rounded-[4px] border border-fg bg-fg px-3 py-1.5 font-mono text-xs font-semibold text-bg">Confirm`),b={username_taken:`that handle is taken — pick another`,invalid_username:`3–32 characters: lowercase letters, numbers, underscore (no hyphens)`};function x(){let{session:i,reload:l}=h(),x=new URLSearchParams(window.location.search),S=x.get(`callbackUrl`),[C,w]=t(``),[T,E]=t(null),[D,O]=t(null),[k,A]=t(!1),[j,M]=t(!1);e(()=>{let e=!0;fetch(`/api/my/profile`,{credentials:`same-origin`}).then(e=>e.ok?e.json():null).then(t=>{e&&t&&(w(t.username??``),E(t.image))}).catch(()=>{}),n(()=>{e=!1})});let N=async()=>{A(!0),O(null);let e=await m(`/api/my/profile`,`PATCH`,{username:C(),welcome_pending:!1}).catch(()=>null);if(A(!1),!e){O(`could not reach the server`);return}let t=await e.json().catch(()=>({}));if(!e.ok){O(b[t.error??``]??`could not save that handle`);return}M(!0),f(),d(),l(),g(_(S,window.location.origin))};return r(a,{get when(){return j()||!i()||!!i()?.user},get fallback(){return r(p,{get href(){return`/login?callbackUrl=${encodeURIComponent(`/welcome${x.toString()?`?${x}`:``}`)}`}})},get children(){return r(a,{get when(){return j()||!i()?.onboarded},get fallback(){return r(p,{href:`/account`})},get children(){var e=y(),t=e.firstChild.firstChild.nextSibling,n=t.nextSibling,l=n.firstChild.nextSibling,d=l.firstChild.nextSibling,f=l.nextSibling,p=f.firstChild;return c(t,r(u,{get image(){return T()},get initial(){return C()||`a`},get userId(){return i()?.user?.id??``},onChange:E})),n.addEventListener(`submit`,e=>{e.preventDefault(),N()}),d.$$input=e=>w(e.currentTarget.value),s(d,`spellcheck`,!1),c(n,r(a,{get when(){return D()},get children(){var e=v();return c(e,D),e}}),f),o(()=>p.disabled=k()||!C().trim()),o(()=>d.value=C()),e}})}})}i([`input`]);export{x as WelcomePage};
|
|
Binary file
|
|
Binary file
|