decocms 2.302.4 → 2.302.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DSZVvcru.js → AlertCircle-DYsBkqgk.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-wBASxb0P.js → ArrowNarrowLeft-f4NsG2u2.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BJxEOPu7.js → ArrowUpRight-0SvsPZ4w.js} +1 -1
- package/dist/client/assets/{CheckCircle-DSvfPMkA.js → CheckCircle-CXidvOnE.js} +1 -1
- package/dist/client/assets/{ChevronDown-B_jGx88V.js → ChevronDown-T3J_FVZJ.js} +1 -1
- package/dist/client/assets/{ChevronRight-09l0V0oC.js → ChevronRight-CAh53MYi.js} +1 -1
- package/dist/client/assets/{ChevronUp-Xo8mQp9m.js → ChevronUp-BB9elRBQ.js} +1 -1
- package/dist/client/assets/{Container-DQvWHFPX.js → Container-CzTl4K2T.js} +1 -1
- package/dist/client/assets/{DotsVertical-nZJzgZx0.js → DotsVertical-BzVzv-oX.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BcaOFSiB.js → LinkExternal01-w4yRWGwt.js} +1 -1
- package/dist/client/assets/{Lock01-DbjvwJgn.js → Lock01-y59fY-pi.js} +1 -1
- package/dist/client/assets/{Palette-TeQrEtkV.js → Palette-DHavAHjq.js} +1 -1
- package/dist/client/assets/{Play-Cz6iqYd_.js → Play-iXdmlyAm.js} +1 -1
- package/dist/client/assets/{Plus-0-k0Hxon.js → Plus-CxFWwhW1.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Vt7bKU5A.js → RefreshCcw01-D9tZoyTd.js} +1 -1
- package/dist/client/assets/{SearchMd-DG7BRBsB.js → SearchMd-DESZBiw-.js} +1 -1
- package/dist/client/assets/{Settings02-CZTMhu7x.js → Settings02-Hf6ZIRqV.js} +1 -1
- package/dist/client/assets/{Shield01-CPJPF_Ay.js → Shield01-BoHQvnPl.js} +1 -1
- package/dist/client/assets/{Star01-BZD48_CN.js → Star01-DXGNUfAS.js} +1 -1
- package/dist/client/assets/{Sun-lT2K9iFv.js → Sun-27B3YKPV.js} +1 -1
- package/dist/client/assets/{Tool01-DsyAZlOV.js → Tool01-_70cqt2t.js} +1 -1
- package/dist/client/assets/{Trash01-DIdMBm6d.js → Trash01-BFWH9msw.js} +1 -1
- package/dist/client/assets/{User01-DaLU_pXs.js → User01-Cn3EgXS1.js} +1 -1
- package/dist/client/assets/{Users03-Cbyo-F1N.js → Users03-DQJCKjsg.js} +1 -1
- package/dist/client/assets/{X-A3ULnTw9.js → X-D7XtWfgE.js} +1 -1
- package/dist/client/assets/{XCircle-CuwuLpDW.js → XCircle-C4cR7ffS.js} +1 -1
- package/dist/client/assets/{XClose-OklkH08P.js → XClose-BIyC5w2n.js} +1 -1
- package/dist/client/assets/{Zap-CW7j_KaA.js → Zap-5CNC0Ept.js} +1 -1
- package/dist/client/assets/{ZapSquare-CdMzJWXO.js → ZapSquare-C5LgmBxA.js} +1 -1
- package/dist/client/assets/{accordion-DAcUC4jB.js → accordion-Cd97pZzi.js} +1 -1
- package/dist/client/assets/{agent-icon-CK-hSz5q.js → agent-icon-B9_saWOv.js} +1 -1
- package/dist/client/assets/{agents-list-DEQZ8M-w.js → agents-list-BgyjjVf_.js} +1 -1
- package/dist/client/assets/ai-providers-DK0_8BYC.js +1 -0
- package/dist/client/assets/{alert-dialog-D4Jvme0e.js → alert-dialog-OujxhZeA.js} +1 -1
- package/dist/client/assets/{auth-catchall-DuAZGZax.js → auth-catchall-DjKppIi6.js} +1 -1
- package/dist/client/assets/{automation-list-row-8dom_e1K.js → automation-list-row-DGv6wybK.js} +1 -1
- package/dist/client/assets/{automations-mgGmd5TI.js → automations-BwhFPhC-.js} +1 -1
- package/dist/client/assets/{avatar-BUBvvhIv.js → avatar-C_UGze8T.js} +1 -1
- package/dist/client/assets/badge-DpwrE1zH.js +1 -0
- package/dist/client/assets/{brand-context-6VCqCZSQ.js → brand-context-D4_qXiHY.js} +1 -1
- package/dist/client/assets/{card-DZs0RAqk.js → card-B2FlHiSa.js} +1 -1
- package/dist/client/assets/{chat-context-CG5zBnYY.js → chat-context-BehWdIE_.js} +1 -1
- package/dist/client/assets/{checkbox-B55iEWyJ.js → checkbox-ByEBQCLB.js} +1 -1
- package/dist/client/assets/{collection-detail-DoZcGn2N.js → collection-detail-BO6A-6D3.js} +1 -1
- package/dist/client/assets/{collection-display-button-CICwHIX8.js → collection-display-button-Duh_PqWr.js} +1 -1
- package/dist/client/assets/{collection-search-BADJfP_J.js → collection-search-B9TJgiJz.js} +1 -1
- package/dist/client/assets/{collection-search-fx6Spuba.js → collection-search-Buik536F.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DDLpL1jQ.js → collection-table-wrapper-E2fNxYM9.js} +1 -1
- package/dist/client/assets/{collection-tabs-B8djx9Os.js → collection-tabs-BPN7Casr.js} +1 -1
- package/dist/client/assets/{collections-CeGK4D-B.js → collections-nZFIaO7A.js} +1 -1
- package/dist/client/assets/{command-BEXz4Lt5.js → command-8r7A67dg.js} +1 -1
- package/dist/client/assets/connection-card-B84kBAnY.js +1 -0
- package/dist/client/assets/{connection-detail-DuNMfEDw.js → connection-detail-T4cI2Rar.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D2dSK2gm.js → connection-form-helpers-DXAccRFx.js} +1 -1
- package/dist/client/assets/{connections-mIOfz5MO.js → connections-DdrV40z5.js} +1 -1
- package/dist/client/assets/{constants-CvP2J0Da.js → constants-DFyn79Ih.js} +1 -1
- package/dist/client/assets/{constants-Rylzc13S.js → constants-DYjDD2hw.js} +1 -1
- package/dist/client/assets/{dialog-DcC4qK4p.js → dialog-CmncC-6K.js} +1 -1
- package/dist/client/assets/{domain-settings-Bme96_yK.js → domain-settings-CtzaIQej.js} +1 -1
- package/dist/client/assets/{drawer-DheXDt7Y.js → drawer-DGcXLXQn.js} +1 -1
- package/dist/client/assets/{dropdown-menu-5YhjKraV.js → dropdown-menu-CDsPRIxB.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-B66dsxIy.js → dynamic-plugin-layout-hLPoR_s6.js} +1 -1
- package/dist/client/assets/{empty-state-BQjpyTXG.js → empty-state-BoNuHRpQ.js} +1 -1
- package/dist/client/assets/{empty-state-B14XOtus.js → empty-state-Dy2IUdp3.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B0WCs7Jq.js → extract-connection-data-VJ13de98.js} +1 -1
- package/dist/client/assets/{features-FCLXcMws.js → features-C9HfymjH.js} +1 -1
- package/dist/client/assets/{form-CYioe919.js → form-D2IsM6ud.js} +1 -1
- package/dist/client/assets/{general-DkKeU3zi.js → general-DF9nKrr6.js} +1 -1
- package/dist/client/assets/{index-Bq7njAR3.js → index-BDWHZF4c.js} +2 -2
- package/dist/client/assets/{index-o3NndZ7_.js → index-BVSR2SFo.js} +1 -1
- package/dist/client/assets/{index-C9eHGGCk.js → index-BXLSydrA.js} +1 -1
- package/dist/client/assets/{index-B6SyqeP3.js → index-BlJhA7rZ.js} +1 -1
- package/dist/client/assets/{index-H3n8wMaA.js → index-C9vZi4B1.js} +1 -1
- package/dist/client/assets/{index-DJENJFf2.js → index-CETKIyXW.js} +1 -1
- package/dist/client/assets/{index-BhGZvj_W.js → index-CT7XdYTs.js} +1 -1
- package/dist/client/assets/{index-BLC3SCf1.js → index-CWU3080-.js} +1 -1
- package/dist/client/assets/{index-DUTcr7uJ.js → index-CkKhKJfC.js} +1 -1
- package/dist/client/assets/index-D4C2QwcG.js +1 -0
- package/dist/client/assets/{index-BDJ4CpRL.js → index-DEwSM5UO.js} +3 -3
- package/dist/client/assets/{index-cRj7F9hc.js → index-DJ4-TGQU.js} +1 -1
- package/dist/client/assets/{index-BVW_--B-.js → index-DN6IuHkz.js} +1 -1
- package/dist/client/assets/{index-DWaeWHhi.js → index-DPbaB7jD.js} +1 -1
- package/dist/client/assets/{index-Bo7ASdxG.js → index-FR3V6lrD.js} +1 -1
- package/dist/client/assets/index-KELtbXYG.js +547 -0
- package/dist/client/assets/{infiniteQueryObserver-BuhXJbqQ.js → infiniteQueryObserver-DMzx8Ajh.js} +1 -1
- package/dist/client/assets/{input-BkWsAq4v.js → input-Bdzlyvmj.js} +1 -1
- package/dist/client/assets/{integration-icon-CmLA0-j7.js → integration-icon-Cy5BK0qE.js} +1 -1
- package/dist/client/assets/{label-cw8oC-NC.js → label-Bw2PIYCj.js} +1 -1
- package/dist/client/assets/{layout-C33hnjGM.js → layout-CYPmG5mO.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-CVrGAzhI.js → lean-canvas-recruit-modal-BT4juGyz.js} +1 -1
- package/dist/client/assets/{login-Drkd5MAZ.js → login-B28e1Wyf.js} +1 -1
- package/dist/client/assets/{members-BMHMEL8M.js → members-MaYKbIl8.js} +1 -1
- package/dist/client/assets/{monaco-editor-S4Yr9AYv.js → monaco-editor-B0DWqYLF.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CYI_lOC2.js → monitoring-stats-row-DH201TcG.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B-62OUqZ.js → oauth-callback-ai-provider-DNZYP_aS.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dy0zmJ7-.js → oauth-callback-sJETWziT.js} +1 -1
- package/dist/client/assets/{onboarding-ZV0W1iC3.js → onboarding-CarvRKmy.js} +1 -1
- package/dist/client/assets/{org-layout-D1yIafts.js → org-layout-DHW0VeFP.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-CEMSbUvq.js → org-plugin-layout-CXpJSkkf.js} +1 -1
- package/dist/client/assets/{pair-BUNffFJU.js → pair-OadcxUG9.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DrlGnvya.js → plugin-empty-state-DesCuNpH.js} +1 -1
- package/dist/client/assets/{plugin-header-BW1pO1C8.js → plugin-header--6VZlO2H.js} +1 -1
- package/dist/client/assets/{plugin-layout-BVHruk13.js → plugin-layout-C9GSESK4.js} +1 -1
- package/dist/client/assets/{popover-2ISvfsE_.js → popover-BY5xAQmF.js} +1 -1
- package/dist/client/assets/{profile-CY5sK6mR.js → profile-BoZLpLkD.js} +1 -1
- package/dist/client/assets/{project-app-view-CYNow9wd.js → project-app-view-DzdWARcC.js} +1 -1
- package/dist/client/assets/registry-CR-1KhXP.js +2 -0
- package/dist/client/assets/{registry-layout-bFrphQI4.js → registry-layout-CdwMJvbZ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C5zM-TSa.js → required-auth-layout-BDnZ49oa.js} +1 -1
- package/dist/client/assets/{reset-password-Ckt278kq.js → reset-password-DUYGrA7L.js} +1 -1
- package/dist/client/assets/{roles-CTcYLqYx.js → roles-Y85thY7n.js} +1 -1
- package/dist/client/assets/{scroll-area-D4wMmkUg.js → scroll-area-qCxE2hon.js} +1 -1
- package/dist/client/assets/{search-input-BUVesVPS.js → search-input-B5lcLg8G.js} +1 -1
- package/dist/client/assets/{select-DYqvh3_c.js → select-CPOZtPOm.js} +1 -1
- package/dist/client/assets/{select-model-BGBPSevv.js → select-model-BtIjEXHL.js} +1 -1
- package/dist/client/assets/{settings-layout-CyDZGzMS.js → settings-layout-DLuUhrGj.js} +1 -1
- package/dist/client/assets/{settings-section-7hbZS_yJ.js → settings-section-CjgR1v3b.js} +1 -1
- package/dist/client/assets/{shell-layout-CV4tpkGi.js → shell-layout-DSlnYQwS.js} +1 -1
- package/dist/client/assets/{skeleton-9MYCgaQ4.js → skeleton-CIdd6LnB.js} +1 -1
- package/dist/client/assets/{sso-BCyLES5c.js → sso-7YErCYvk.js} +1 -1
- package/dist/client/assets/{store-DakLos2q.js → store-3uf30l0N.js} +1 -1
- package/dist/client/assets/store-registry-ClZqe9d2.js +2 -0
- package/dist/client/assets/{switch-CGr49I35.js → switch-BKqARx2z.js} +1 -1
- package/dist/client/assets/{table-DiwglyaB.js → table-DSnKB3WU.js} +1 -1
- package/dist/client/assets/{tabs-CK4nnUqp.js → tabs-BqvlcXR7.js} +1 -1
- package/dist/client/assets/{task-status-CHFlhuh2.js → task-status-CEH-hhyq.js} +1 -1
- package/dist/client/assets/{textarea-822XUY9e.js → textarea-BDXFkTIX.js} +1 -1
- package/dist/client/assets/{toggle-group-BE9FnkNQ.js → toggle-group-BNTZzdFS.js} +1 -1
- package/dist/client/assets/{tools-list-rU4QiWsU.js → tools-list-Dw6JwtIs.js} +1 -1
- package/dist/client/assets/{tooltip-B7nNUfEo.js → tooltip-_WWA2f_Q.js} +1 -1
- package/dist/client/assets/{types-JgiT8Bse.js → types-3fOwpBiV.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Brv8buwj.js → use-ai-providers-CeAjYVgE.js} +1 -1
- package/dist/client/assets/{use-collections-DnqE67dD.js → use-collections-CsI9zuvk.js} +1 -1
- package/dist/client/assets/{use-connection-Bt8euDxJ.js → use-connection-c2fdn_Q4.js} +1 -1
- package/dist/client/assets/{use-copy-DZtO8qAn.js → use-copy-CkKvvrYW.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bkj-wV7o.js → use-create-virtual-mcp-DG6IAqew.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DM6z0Ifz.js → use-decopilot-events-BJCOOgAS.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CXzN1WRx.js → use-delete-connection-BjJoFZAR.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BLdqgFii.js → use-infinite-scroll-C1mLbaq7.js} +1 -1
- package/dist/client/assets/{use-list-state-CPe9u7jX.js → use-list-state-BIGugSjM.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DRn5dFY0.js → use-mcp-tools-CLk_EUg4.js} +1 -1
- package/dist/client/assets/{use-members-8qM3iZmd.js → use-members-C52huH1h.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CNAJSj47.js → use-navigate-to-agent-DY3jsv9_.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B0Gbq_9m.js → use-org-auth-client-Brlzufmt.js} +1 -1
- package/dist/client/assets/{use-org-sso-Cu63Lnrr.js → use-org-sso-D0sdE_Rr.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DWPth5GG.js → use-organization-roles-CxDdUjnY.js} +1 -1
- package/dist/client/assets/{use-organization-settings-noixypnE.js → use-organization-settings-qeGEmxxb.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CJrGOgDq.js → use-registry-connections-B3dA54zD.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CDDHN7Kx.js → use-status-sounds-DyfabNoq.js} +1 -1
- package/dist/client/assets/{use-tasks-uqKteXuB.js → use-tasks-CalaAWsj.js} +1 -1
- package/dist/client/assets/{use-view-mode-DznwpBrl.js → use-view-mode-J-pl-NFS.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DpzvUiG8.js → use-virtual-mcp-Ci2IQchC.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-_4aHbhXJ.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DEL5b49j.js +1 -0
- package/dist/client/assets/{user-sP6NNtk7.js → user-BduM2bsi.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-eoGLdH4L.js → view-mode-toggle-CAxEHNjr.js} +1 -1
- package/dist/client/assets/{workflow-BW932QMe.js → workflow-B-q1l-SU.js} +1 -1
- package/dist/client/assets/workflow-detail-Jmd9Dc5X.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +3 -3
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/{ansi-regex → ansi-styles}/package.json +13 -20
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/environment/index.d.ts +74 -0
- package/dist/server/node_modules/environment/index.js +47 -0
- package/dist/server/node_modules/{ink → environment}/license +0 -1
- package/dist/server/node_modules/environment/package.json +74 -0
- package/dist/server/node_modules/environment/readme.md +94 -0
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
- package/dist/server/node_modules/escape-string-regexp/license +9 -0
- package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
- package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
- package/dist/server/node_modules/get-east-asian-width/index.d.ts +60 -0
- package/dist/server/node_modules/get-east-asian-width/index.js +30 -0
- package/dist/server/node_modules/get-east-asian-width/license +9 -0
- package/dist/server/node_modules/get-east-asian-width/lookup-data.js +18 -0
- package/dist/server/node_modules/get-east-asian-width/lookup.js +135 -0
- package/dist/server/node_modules/get-east-asian-width/package.json +71 -0
- package/dist/server/node_modules/get-east-asian-width/readme.md +65 -0
- package/dist/server/node_modules/get-east-asian-width/utilities.js +24 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
- package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
- package/dist/server/node_modules/is-unicode-supported/license +9 -0
- package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
- package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/restore-cursor/index.d.ts +11 -0
- package/dist/server/node_modules/restore-cursor/index.js +11 -0
- package/dist/server/node_modules/restore-cursor/license +9 -0
- package/dist/server/node_modules/restore-cursor/package.json +55 -0
- package/dist/server/node_modules/restore-cursor/readme.md +31 -0
- package/dist/server/node_modules/string-width/index.d.ts +39 -0
- package/dist/server/node_modules/string-width/index.js +82 -0
- package/dist/server/node_modules/string-width/license +9 -0
- package/dist/server/node_modules/string-width/package.json +64 -0
- package/dist/server/node_modules/string-width/readme.md +66 -0
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-eSe6EudA.js +0 -1
- package/dist/client/assets/badge-CXl7STJk.js +0 -1
- package/dist/client/assets/connection-card-BvXL_NIo.js +0 -1
- package/dist/client/assets/index-C4Q3dCeS.js +0 -1
- package/dist/client/assets/index-D0Ti9-Ih.js +0 -547
- package/dist/client/assets/registry-DtqCQOIM.js +0 -2
- package/dist/client/assets/store-registry-D4mMbvuq.js +0 -2
- package/dist/client/assets/useInfiniteQuery-6G1Nxi-e.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Da9T4bxn.js +0 -1
- package/dist/client/assets/workflow-detail-DH5Ldknq.js +0 -1
- package/dist/server/node_modules/ansi-regex/index.d.ts +0 -33
- package/dist/server/node_modules/ansi-regex/index.js +0 -14
- package/dist/server/node_modules/ansi-regex/readme.md +0 -66
- package/dist/server/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/dist/server/node_modules/emoji-regex/README.md +0 -107
- package/dist/server/node_modules/emoji-regex/index.d.ts +0 -3
- package/dist/server/node_modules/emoji-regex/index.js +0 -4
- package/dist/server/node_modules/emoji-regex/index.mjs +0 -4
- package/dist/server/node_modules/emoji-regex/package.json +0 -45
- package/dist/server/node_modules/ink/build/ansi-tokenizer.d.ts +0 -38
- package/dist/server/node_modules/ink/build/ansi-tokenizer.js +0 -316
- package/dist/server/node_modules/ink/build/ansi-tokenizer.js.map +0 -1
- package/dist/server/node_modules/ink/build/apply-styles.js +0 -175
- package/dist/server/node_modules/ink/build/build-layout.js +0 -77
- package/dist/server/node_modules/ink/build/calculate-wrapped-text.js +0 -53
- package/dist/server/node_modules/ink/build/colorize.d.ts +0 -3
- package/dist/server/node_modules/ink/build/colorize.js +0 -48
- package/dist/server/node_modules/ink/build/colorize.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.d.ts +0 -3
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.js +0 -5
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/App.d.ts +0 -18
- package/dist/server/node_modules/ink/build/components/App.js +0 -351
- package/dist/server/node_modules/ink/build/components/App.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/AppContext.d.ts +0 -15
- package/dist/server/node_modules/ink/build/components/AppContext.js +0 -11
- package/dist/server/node_modules/ink/build/components/AppContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/BackgroundContext.d.ts +0 -4
- package/dist/server/node_modules/ink/build/components/BackgroundContext.js +0 -3
- package/dist/server/node_modules/ink/build/components/BackgroundContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Box.d.ts +0 -117
- package/dist/server/node_modules/ink/build/components/Box.js +0 -34
- package/dist/server/node_modules/ink/build/components/Box.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Color.js +0 -62
- package/dist/server/node_modules/ink/build/components/Cursor.d.ts +0 -83
- package/dist/server/node_modules/ink/build/components/Cursor.js +0 -53
- package/dist/server/node_modules/ink/build/components/Cursor.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/CursorContext.d.ts +0 -11
- package/dist/server/node_modules/ink/build/components/CursorContext.js +0 -8
- package/dist/server/node_modules/ink/build/components/CursorContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.d.ts +0 -18
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.js +0 -23
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/ErrorOverview.d.ts +0 -6
- package/dist/server/node_modules/ink/build/components/ErrorOverview.js +0 -84
- package/dist/server/node_modules/ink/build/components/ErrorOverview.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/FocusContext.d.ts +0 -16
- package/dist/server/node_modules/ink/build/components/FocusContext.js +0 -17
- package/dist/server/node_modules/ink/build/components/FocusContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Newline.d.ts +0 -13
- package/dist/server/node_modules/ink/build/components/Newline.js +0 -8
- package/dist/server/node_modules/ink/build/components/Newline.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Spacer.d.ts +0 -7
- package/dist/server/node_modules/ink/build/components/Spacer.js +0 -11
- package/dist/server/node_modules/ink/build/components/Spacer.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Static.d.ts +0 -24
- package/dist/server/node_modules/ink/build/components/Static.js +0 -28
- package/dist/server/node_modules/ink/build/components/Static.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/StderrContext.d.ts +0 -15
- package/dist/server/node_modules/ink/build/components/StderrContext.js +0 -13
- package/dist/server/node_modules/ink/build/components/StderrContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/StdinContext.d.ts +0 -22
- package/dist/server/node_modules/ink/build/components/StdinContext.js +0 -19
- package/dist/server/node_modules/ink/build/components/StdinContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/StdoutContext.d.ts +0 -15
- package/dist/server/node_modules/ink/build/components/StdoutContext.js +0 -13
- package/dist/server/node_modules/ink/build/components/StdoutContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Text.d.ts +0 -55
- package/dist/server/node_modules/ink/build/components/Text.js +0 -50
- package/dist/server/node_modules/ink/build/components/Text.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Transform.d.ts +0 -16
- package/dist/server/node_modules/ink/build/components/Transform.js +0 -15
- package/dist/server/node_modules/ink/build/components/Transform.js.map +0 -1
- package/dist/server/node_modules/ink/build/cursor-helpers.d.ts +0 -38
- package/dist/server/node_modules/ink/build/cursor-helpers.js +0 -56
- package/dist/server/node_modules/ink/build/cursor-helpers.js.map +0 -1
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.d.ts +0 -1
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.js +0 -65
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.js.map +0 -1
- package/dist/server/node_modules/ink/build/devtools.d.ts +0 -1
- package/dist/server/node_modules/ink/build/devtools.js +0 -11
- package/dist/server/node_modules/ink/build/devtools.js.map +0 -1
- package/dist/server/node_modules/ink/build/dom.d.ts +0 -56
- package/dist/server/node_modules/ink/build/dom.js +0 -124
- package/dist/server/node_modules/ink/build/dom.js.map +0 -1
- package/dist/server/node_modules/ink/build/experimental/apply-style.js +0 -140
- package/dist/server/node_modules/ink/build/experimental/dom.js +0 -123
- package/dist/server/node_modules/ink/build/experimental/output.js +0 -91
- package/dist/server/node_modules/ink/build/experimental/reconciler.js +0 -141
- package/dist/server/node_modules/ink/build/experimental/renderer.js +0 -81
- package/dist/server/node_modules/ink/build/get-max-width.d.ts +0 -3
- package/dist/server/node_modules/ink/build/get-max-width.js +0 -10
- package/dist/server/node_modules/ink/build/get-max-width.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-app.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-app.js +0 -8
- package/dist/server/node_modules/ink/build/hooks/use-app.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-cursor.d.ts +0 -12
- package/dist/server/node_modules/ink/build/hooks/use-cursor.js +0 -29
- package/dist/server/node_modules/ink/build/hooks/use-cursor.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.d.ts +0 -28
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js +0 -17
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-focus.d.ts +0 -29
- package/dist/server/node_modules/ink/build/hooks/use-focus.js +0 -42
- package/dist/server/node_modules/ink/build/hooks/use-focus.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-input.d.ts +0 -131
- package/dist/server/node_modules/ink/build/hooks/use-input.js +0 -124
- package/dist/server/node_modules/ink/build/hooks/use-input.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js +0 -11
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-stderr.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-stderr.js +0 -8
- package/dist/server/node_modules/ink/build/hooks/use-stderr.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-stdin.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-stdin.js +0 -8
- package/dist/server/node_modules/ink/build/hooks/use-stdin.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-stdout.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-stdout.js +0 -8
- package/dist/server/node_modules/ink/build/hooks/use-stdout.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/useInput.js +0 -38
- package/dist/server/node_modules/ink/build/index.d.ts +0 -34
- package/dist/server/node_modules/ink/build/index.js +0 -20
- package/dist/server/node_modules/ink/build/index.js.map +0 -1
- package/dist/server/node_modules/ink/build/ink.d.ts +0 -90
- package/dist/server/node_modules/ink/build/ink.js +0 -637
- package/dist/server/node_modules/ink/build/ink.js.map +0 -1
- package/dist/server/node_modules/ink/build/input-parser.d.ts +0 -7
- package/dist/server/node_modules/ink/build/input-parser.js +0 -154
- package/dist/server/node_modules/ink/build/input-parser.js.map +0 -1
- package/dist/server/node_modules/ink/build/instance.js +0 -205
- package/dist/server/node_modules/ink/build/instances.d.ts +0 -3
- package/dist/server/node_modules/ink/build/instances.js +0 -8
- package/dist/server/node_modules/ink/build/instances.js.map +0 -1
- package/dist/server/node_modules/ink/build/kitty-keyboard.d.ts +0 -23
- package/dist/server/node_modules/ink/build/kitty-keyboard.js +0 -32
- package/dist/server/node_modules/ink/build/kitty-keyboard.js.map +0 -1
- package/dist/server/node_modules/ink/build/layout.d.ts +0 -7
- package/dist/server/node_modules/ink/build/layout.js +0 -33
- package/dist/server/node_modules/ink/build/layout.js.map +0 -1
- package/dist/server/node_modules/ink/build/log-update.d.ts +0 -19
- package/dist/server/node_modules/ink/build/log-update.js +0 -242
- package/dist/server/node_modules/ink/build/log-update.js.map +0 -1
- package/dist/server/node_modules/ink/build/measure-element.d.ts +0 -16
- package/dist/server/node_modules/ink/build/measure-element.js +0 -9
- package/dist/server/node_modules/ink/build/measure-element.js.map +0 -1
- package/dist/server/node_modules/ink/build/measure-text.d.ts +0 -6
- package/dist/server/node_modules/ink/build/measure-text.js +0 -21
- package/dist/server/node_modules/ink/build/measure-text.js.map +0 -1
- package/dist/server/node_modules/ink/build/options.d.ts +0 -52
- package/dist/server/node_modules/ink/build/options.js +0 -2
- package/dist/server/node_modules/ink/build/options.js.map +0 -1
- package/dist/server/node_modules/ink/build/output.d.ts +0 -35
- package/dist/server/node_modules/ink/build/output.js +0 -183
- package/dist/server/node_modules/ink/build/output.js.map +0 -1
- package/dist/server/node_modules/ink/build/parse-keypress.d.ts +0 -22
- package/dist/server/node_modules/ink/build/parse-keypress.js +0 -493
- package/dist/server/node_modules/ink/build/parse-keypress.js.map +0 -1
- package/dist/server/node_modules/ink/build/reconciler.d.ts +0 -4
- package/dist/server/node_modules/ink/build/reconciler.js +0 -274
- package/dist/server/node_modules/ink/build/reconciler.js.map +0 -1
- package/dist/server/node_modules/ink/build/render-background.d.ts +0 -4
- package/dist/server/node_modules/ink/build/render-background.js +0 -25
- package/dist/server/node_modules/ink/build/render-background.js.map +0 -1
- package/dist/server/node_modules/ink/build/render-border.d.ts +0 -4
- package/dist/server/node_modules/ink/build/render-border.js +0 -73
- package/dist/server/node_modules/ink/build/render-border.js.map +0 -1
- package/dist/server/node_modules/ink/build/render-node-to-output.d.ts +0 -14
- package/dist/server/node_modules/ink/build/render-node-to-output.js +0 -147
- package/dist/server/node_modules/ink/build/render-node-to-output.js.map +0 -1
- package/dist/server/node_modules/ink/build/render-to-string.d.ts +0 -38
- package/dist/server/node_modules/ink/build/render-to-string.js +0 -115
- package/dist/server/node_modules/ink/build/render-to-string.js.map +0 -1
- package/dist/server/node_modules/ink/build/render.d.ts +0 -121
- package/dist/server/node_modules/ink/build/render.js +0 -55
- package/dist/server/node_modules/ink/build/render.js.map +0 -1
- package/dist/server/node_modules/ink/build/renderer.d.ts +0 -8
- package/dist/server/node_modules/ink/build/renderer.js +0 -55
- package/dist/server/node_modules/ink/build/renderer.js.map +0 -1
- package/dist/server/node_modules/ink/build/sanitize-ansi.d.ts +0 -2
- package/dist/server/node_modules/ink/build/sanitize-ansi.js +0 -27
- package/dist/server/node_modules/ink/build/sanitize-ansi.js.map +0 -1
- package/dist/server/node_modules/ink/build/screen-reader-update.d.ts +0 -13
- package/dist/server/node_modules/ink/build/screen-reader-update.js +0 -38
- package/dist/server/node_modules/ink/build/screen-reader-update.js.map +0 -1
- package/dist/server/node_modules/ink/build/squash-text-nodes.d.ts +0 -3
- package/dist/server/node_modules/ink/build/squash-text-nodes.js +0 -36
- package/dist/server/node_modules/ink/build/squash-text-nodes.js.map +0 -1
- package/dist/server/node_modules/ink/build/styles.d.ts +0 -240
- package/dist/server/node_modules/ink/build/styles.js +0 -232
- package/dist/server/node_modules/ink/build/styles.js.map +0 -1
- package/dist/server/node_modules/ink/build/utils.d.ts +0 -2
- package/dist/server/node_modules/ink/build/utils.js +0 -4
- package/dist/server/node_modules/ink/build/utils.js.map +0 -1
- package/dist/server/node_modules/ink/build/wrap-text.d.ts +0 -3
- package/dist/server/node_modules/ink/build/wrap-text.js +0 -31
- package/dist/server/node_modules/ink/build/wrap-text.js.map +0 -1
- package/dist/server/node_modules/ink/build/write-synchronized.d.ts +0 -4
- package/dist/server/node_modules/ink/build/write-synchronized.js +0 -7
- package/dist/server/node_modules/ink/build/write-synchronized.js.map +0 -1
- package/dist/server/node_modules/ink/package.json +0 -201
- package/dist/server/node_modules/ink/readme.md +0 -2636
- /package/dist/server/node_modules/{ansi-regex → ansi-styles}/license +0 -0
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _yogaLayoutPrebuilt = _interopRequireDefault(require("yoga-layout-prebuilt"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
const applyPositionStyles = (node, style) => {
|
|
13
|
-
if (!style.position) {
|
|
14
|
-
node.setPositionType(NaN);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (style.position === 'absolute') {
|
|
18
|
-
node.setPositionType(_yogaLayoutPrebuilt.default.POSITION_TYPE_ABSOLUTE);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const applyMarginStyles = (node, style) => {
|
|
23
|
-
node.setMargin(_yogaLayoutPrebuilt.default.EDGE_START, style.marginLeft || style.marginX || style.margin || 0);
|
|
24
|
-
node.setMargin(_yogaLayoutPrebuilt.default.EDGE_END, style.marginRight || style.marginX || style.margin || 0);
|
|
25
|
-
node.setMargin(_yogaLayoutPrebuilt.default.EDGE_TOP, style.marginTop || style.marginY || style.margin || 0);
|
|
26
|
-
node.setMargin(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.marginBottom || style.marginY || style.margin || 0);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const applyPaddingStyles = (node, style) => {
|
|
30
|
-
node.setPadding(_yogaLayoutPrebuilt.default.EDGE_LEFT, style.paddingLeft || style.paddingX || style.padding || 0);
|
|
31
|
-
node.setPadding(_yogaLayoutPrebuilt.default.EDGE_RIGHT, style.paddingRight || style.paddingX || style.padding || 0);
|
|
32
|
-
node.setPadding(_yogaLayoutPrebuilt.default.EDGE_TOP, style.paddingTop || style.paddingY || style.padding || 0);
|
|
33
|
-
node.setPadding(_yogaLayoutPrebuilt.default.EDGE_BOTTOM, style.paddingBottom || style.paddingY || style.padding || 0);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const applyFlexStyles = (node, style) => {
|
|
37
|
-
node.setFlexGrow(style.flexGrow || 0);
|
|
38
|
-
node.setFlexShrink(typeof style.flexShrink === 'number' ? style.flexShrink : 1);
|
|
39
|
-
|
|
40
|
-
if (style.flexDirection === 'row') {
|
|
41
|
-
node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_ROW);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (style.flexDirection === 'row-reverse') {
|
|
45
|
-
node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_ROW_REVERSE);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (style.flexDirection === 'column') {
|
|
49
|
-
node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_COLUMN);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (style.flexDirection === 'column-reverse') {
|
|
53
|
-
node.setFlexDirection(_yogaLayoutPrebuilt.default.FLEX_DIRECTION_COLUMN_REVERSE);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (typeof style.flexBasis === 'number') {
|
|
57
|
-
node.setFlexBasis(style.flexBasis);
|
|
58
|
-
} else if (typeof style.flexBasis === 'string') {
|
|
59
|
-
node.setFlexBasisPercent(parseInt(style.flexBasis, 10));
|
|
60
|
-
} else {
|
|
61
|
-
// This should be replaced with node.setFlexBasisAuto() when new Yoga release is out
|
|
62
|
-
node.setFlexBasis(NaN);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (style.alignItems === 'stretch' || !style.alignItems) {
|
|
66
|
-
node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_STRETCH);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (style.alignItems === 'flex-start') {
|
|
70
|
-
node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_FLEX_START);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (style.alignItems === 'center') {
|
|
74
|
-
node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_CENTER);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (style.alignItems === 'flex-end') {
|
|
78
|
-
node.setAlignItems(_yogaLayoutPrebuilt.default.ALIGN_FLEX_END);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (style.justifyContent === 'flex-start' || !style.justifyContent) {
|
|
82
|
-
node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_FLEX_START);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (style.justifyContent === 'center') {
|
|
86
|
-
node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_CENTER);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (style.justifyContent === 'flex-end') {
|
|
90
|
-
node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_FLEX_END);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (style.justifyContent === 'space-between') {
|
|
94
|
-
node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_SPACE_BETWEEN);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (style.justifyContent === 'space-around') {
|
|
98
|
-
node.setJustifyContent(_yogaLayoutPrebuilt.default.JUSTIFY_SPACE_AROUND);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const applyDimensionStyles = (node, style) => {
|
|
103
|
-
if (typeof style.width === 'number') {
|
|
104
|
-
node.setWidth(style.width);
|
|
105
|
-
} else if (typeof style.width === 'string') {
|
|
106
|
-
node.setWidthPercent(parseInt(style.width, 10));
|
|
107
|
-
} else {
|
|
108
|
-
node.setWidthAuto();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (typeof style.height === 'number') {
|
|
112
|
-
node.setHeight(style.height);
|
|
113
|
-
} else if (typeof style.height === 'string') {
|
|
114
|
-
node.setHeightPercent(parseInt(style.height, 10));
|
|
115
|
-
} else {
|
|
116
|
-
node.setHeightAuto();
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (typeof style.minWidth === 'string') {
|
|
120
|
-
node.setMinWidthPercent(parseInt(style.minWidth, 10));
|
|
121
|
-
} else {
|
|
122
|
-
node.setMinWidth(style.minWidth || 0);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (typeof style.minHeight === 'string') {
|
|
126
|
-
node.setMinHeightPercent(parseInt(style.minHeight, 10));
|
|
127
|
-
} else {
|
|
128
|
-
node.setMinHeight(style.minHeight || 0);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
var _default = (node, style = {}) => {
|
|
133
|
-
applyPositionStyles(node, style);
|
|
134
|
-
applyMarginStyles(node, style);
|
|
135
|
-
applyPaddingStyles(node, style);
|
|
136
|
-
applyFlexStyles(node, style);
|
|
137
|
-
applyDimensionStyles(node, style);
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
exports.default = _default;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.setTextContent = exports.createTextNode = exports.setAttribute = exports.setStyle = exports.removeChildNode = exports.insertBeforeNode = exports.appendChildNode = exports.createNode = void 0;
|
|
7
|
-
|
|
8
|
-
var _yogaLayoutPrebuilt = _interopRequireDefault(require("yoga-layout-prebuilt"));
|
|
9
|
-
|
|
10
|
-
var _measureText = _interopRequireDefault(require("../measure-text"));
|
|
11
|
-
|
|
12
|
-
var _applyStyle = _interopRequireDefault(require("./apply-style"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
// Helper utilities implementing some common DOM methods to simplify reconciliation code
|
|
17
|
-
const createNode = tagName => ({
|
|
18
|
-
nodeName: tagName.toUpperCase(),
|
|
19
|
-
style: {},
|
|
20
|
-
attributes: {},
|
|
21
|
-
childNodes: [],
|
|
22
|
-
parentNode: null,
|
|
23
|
-
textContent: null,
|
|
24
|
-
yogaNode: _yogaLayoutPrebuilt.default.Node.create()
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
exports.createNode = createNode;
|
|
28
|
-
|
|
29
|
-
const appendChildNode = (node, childNode) => {
|
|
30
|
-
if (childNode.parentNode) {
|
|
31
|
-
removeChildNode(childNode.parentNode, childNode);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
childNode.parentNode = node;
|
|
35
|
-
node.childNodes.push(childNode);
|
|
36
|
-
node.yogaNode.insertChild(childNode.yogaNode, node.yogaNode.getChildCount());
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
exports.appendChildNode = appendChildNode;
|
|
40
|
-
|
|
41
|
-
const insertBeforeNode = (node, newChildNode, beforeChildNode) => {
|
|
42
|
-
if (newChildNode.parentNode) {
|
|
43
|
-
removeChildNode(newChildNode.parentNode, newChildNode);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
newChildNode.parentNode = node;
|
|
47
|
-
const index = node.childNodes.indexOf(beforeChildNode);
|
|
48
|
-
|
|
49
|
-
if (index >= 0) {
|
|
50
|
-
node.childNodes.splice(index, 0, newChildNode);
|
|
51
|
-
node.yogaNode.insertChild(newChildNode.yogaNode, index);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
node.childNodes.push(newChildNode);
|
|
56
|
-
node.yogaNode.insertChild(newChildNode.yogaNode, node.yogaNode.getChildCount());
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
exports.insertBeforeNode = insertBeforeNode;
|
|
60
|
-
|
|
61
|
-
const removeChildNode = (node, removeNode) => {
|
|
62
|
-
removeNode.parentNode.yogaNode.removeChild(removeNode.yogaNode);
|
|
63
|
-
removeNode.parentNode = null;
|
|
64
|
-
const index = node.childNodes.indexOf(removeNode);
|
|
65
|
-
|
|
66
|
-
if (index >= 0) {
|
|
67
|
-
node.childNodes.splice(index, 1);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
exports.removeChildNode = removeChildNode;
|
|
72
|
-
|
|
73
|
-
const setStyle = (node, style) => {
|
|
74
|
-
node.style = style;
|
|
75
|
-
(0, _applyStyle.default)(node.yogaNode, style);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
exports.setStyle = setStyle;
|
|
79
|
-
|
|
80
|
-
const setAttribute = (node, key, value) => {
|
|
81
|
-
node.attributes[key] = value;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
exports.setAttribute = setAttribute;
|
|
85
|
-
|
|
86
|
-
const createTextNode = text => {
|
|
87
|
-
const node = {
|
|
88
|
-
nodeName: '#text',
|
|
89
|
-
nodeValue: text,
|
|
90
|
-
yogaNode: _yogaLayoutPrebuilt.default.Node.create()
|
|
91
|
-
};
|
|
92
|
-
setTextContent(node, text);
|
|
93
|
-
return node;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
exports.createTextNode = createTextNode;
|
|
97
|
-
|
|
98
|
-
const setTextContent = (node, text) => {
|
|
99
|
-
if (typeof text !== 'string') {
|
|
100
|
-
text = String(text);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
let width = 0;
|
|
104
|
-
let height = 0;
|
|
105
|
-
|
|
106
|
-
if (text.length > 0) {
|
|
107
|
-
const dimensions = (0, _measureText.default)(text);
|
|
108
|
-
width = dimensions.width;
|
|
109
|
-
height = dimensions.height;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (node.nodeName === '#text') {
|
|
113
|
-
node.nodeValue = text;
|
|
114
|
-
node.yogaNode.setWidth(width);
|
|
115
|
-
node.yogaNode.setHeight(height);
|
|
116
|
-
} else {
|
|
117
|
-
node.textContent = text;
|
|
118
|
-
node.yogaNode.setWidth(node.style.width || width);
|
|
119
|
-
node.yogaNode.setHeight(node.style.height || height);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
exports.setTextContent = setTextContent;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _stringLength = _interopRequireDefault(require("string-length"));
|
|
9
|
-
|
|
10
|
-
var _sliceAnsi = _interopRequireDefault(require("slice-ansi"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* "Virtual" output class
|
|
16
|
-
*
|
|
17
|
-
* Handles the positioning and saving of the output of each node in the tree.
|
|
18
|
-
* Also responsible for applying transformations to each character of the output.
|
|
19
|
-
*
|
|
20
|
-
* Used to generate the final output of all nodes before writing it to actual output stream (e.g. stdout)
|
|
21
|
-
*/
|
|
22
|
-
class Output {
|
|
23
|
-
constructor({
|
|
24
|
-
width,
|
|
25
|
-
height
|
|
26
|
-
}) {
|
|
27
|
-
this.width = width;
|
|
28
|
-
this.height = height;
|
|
29
|
-
this.writes = []; // Initialize output array with a specific set of rows, so that margin/padding at the bottom is preserved
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
write(x, y, text, {
|
|
33
|
-
transformers
|
|
34
|
-
}) {
|
|
35
|
-
if (!text) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
this.writes.push({
|
|
40
|
-
x,
|
|
41
|
-
y,
|
|
42
|
-
text,
|
|
43
|
-
transformers
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
get() {
|
|
48
|
-
const output = [];
|
|
49
|
-
|
|
50
|
-
for (let y = 0; y < this.height; y++) {
|
|
51
|
-
output.push(' '.repeat(this.width));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
for (const write of this.writes) {
|
|
55
|
-
const {
|
|
56
|
-
x,
|
|
57
|
-
y,
|
|
58
|
-
text,
|
|
59
|
-
transformers
|
|
60
|
-
} = write;
|
|
61
|
-
const lines = text.split('\n');
|
|
62
|
-
let offsetY = 0;
|
|
63
|
-
|
|
64
|
-
for (let line of lines) {
|
|
65
|
-
const currentLine = output[y + offsetY]; // Line can be missing if `text` is taller than height of pre-initialized `this.output`
|
|
66
|
-
|
|
67
|
-
if (!currentLine) {
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const length = (0, _stringLength.default)(line);
|
|
72
|
-
|
|
73
|
-
for (const transformer of transformers) {
|
|
74
|
-
line = transformer(line);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
output[y + offsetY] = (0, _sliceAnsi.default)(currentLine, 0, x) + line + (0, _sliceAnsi.default)(currentLine, x + length);
|
|
78
|
-
offsetY++;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const generatedOutput = output.map(line => line.trimRight()).join('\n');
|
|
83
|
-
return {
|
|
84
|
-
output: generatedOutput,
|
|
85
|
-
height: output.length
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
exports.default = Output;
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _scheduler = require("scheduler");
|
|
9
|
-
|
|
10
|
-
var _reactReconciler = _interopRequireDefault(require("react-reconciler"));
|
|
11
|
-
|
|
12
|
-
var _dom = require("./dom");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
const NO_CONTEXT = true;
|
|
17
|
-
const hostConfig = {
|
|
18
|
-
schedulePassiveEffects: _scheduler.unstable_scheduleCallback,
|
|
19
|
-
cancelPassiveEffects: _scheduler.unstable_cancelCallback,
|
|
20
|
-
now: Date.now,
|
|
21
|
-
getRootHostContext: () => NO_CONTEXT,
|
|
22
|
-
prepareForCommit: () => {},
|
|
23
|
-
resetAfterCommit: rootNode => {
|
|
24
|
-
// Since renders are throttled at the instance level and <Static> component children
|
|
25
|
-
// are rendered only once and then get deleted, we need an escape hatch to
|
|
26
|
-
// trigger an immediate render to ensure <Static> children are written to output before they get erased
|
|
27
|
-
if (rootNode.isStaticDirty) {
|
|
28
|
-
rootNode.isStaticDirty = false;
|
|
29
|
-
rootNode.onImmediateRender();
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
rootNode.onRender();
|
|
34
|
-
},
|
|
35
|
-
getChildHostContext: () => NO_CONTEXT,
|
|
36
|
-
shouldSetTextContent: (type, props) => {
|
|
37
|
-
return typeof props.children === 'string' || typeof props.children === 'number';
|
|
38
|
-
},
|
|
39
|
-
createInstance: (type, newProps) => {
|
|
40
|
-
const node = (0, _dom.createNode)(type);
|
|
41
|
-
|
|
42
|
-
for (const [key, value] of Object.entries(newProps)) {
|
|
43
|
-
if (key === 'children') {
|
|
44
|
-
if (typeof value === 'string' || typeof value === 'number') {
|
|
45
|
-
if (type === 'div') {
|
|
46
|
-
// Text node must be wrapped in another node, so that text can be aligned within container
|
|
47
|
-
const textNode = (0, _dom.createNode)('div');
|
|
48
|
-
(0, _dom.setTextContent)(textNode, value);
|
|
49
|
-
(0, _dom.appendChildNode)(node, textNode);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (type === 'span') {
|
|
53
|
-
(0, _dom.setTextContent)(node, value);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
} else if (key === 'style') {
|
|
57
|
-
(0, _dom.setStyle)(node, value);
|
|
58
|
-
} else if (key === 'unstable__transformChildren') {
|
|
59
|
-
node.unstable__transformChildren = value; // eslint-disable-line camelcase
|
|
60
|
-
} else if (key === 'unstable__static') {
|
|
61
|
-
node.unstable__static = true; // eslint-disable-line camelcase
|
|
62
|
-
} else {
|
|
63
|
-
(0, _dom.setAttribute)(node, key, value);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return node;
|
|
68
|
-
},
|
|
69
|
-
createTextInstance: _dom.createTextNode,
|
|
70
|
-
resetTextContent: node => {
|
|
71
|
-
if (node.textContent) {
|
|
72
|
-
node.textContent = '';
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (node.childNodes.length > 0) {
|
|
76
|
-
for (const childNode of node.childNodes) {
|
|
77
|
-
(0, _dom.removeChildNode)(node, childNode);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
getPublicInstance: instance => instance,
|
|
82
|
-
appendInitialChild: _dom.appendChildNode,
|
|
83
|
-
appendChild: _dom.appendChildNode,
|
|
84
|
-
insertBefore: _dom.insertBeforeNode,
|
|
85
|
-
finalizeInitialChildren: (node, type, props, rootNode) => {
|
|
86
|
-
if (node.unstable__static) {
|
|
87
|
-
rootNode.isStaticDirty = true;
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
supportsMutation: true,
|
|
91
|
-
appendChildToContainer: _dom.appendChildNode,
|
|
92
|
-
insertInContainerBefore: _dom.insertBeforeNode,
|
|
93
|
-
removeChildFromContainer: _dom.removeChildNode,
|
|
94
|
-
prepareUpdate: (node, type, oldProps, newProps, rootNode) => {
|
|
95
|
-
if (node.unstable__static) {
|
|
96
|
-
rootNode.isStaticDirty = true;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return true;
|
|
100
|
-
},
|
|
101
|
-
commitUpdate: (node, updatePayload, type, oldProps, newProps) => {
|
|
102
|
-
for (const [key, value] of Object.entries(newProps)) {
|
|
103
|
-
if (key === 'children') {
|
|
104
|
-
if (typeof value === 'string' || typeof value === 'number') {
|
|
105
|
-
if (type === 'div') {
|
|
106
|
-
// Text node must be wrapped in another node, so that text can be aligned within container
|
|
107
|
-
// If there's no such node, a new one must be created
|
|
108
|
-
if (node.childNodes.length === 0) {
|
|
109
|
-
const textNode = (0, _dom.createNode)('div');
|
|
110
|
-
(0, _dom.setTextContent)(textNode, value);
|
|
111
|
-
(0, _dom.appendChildNode)(node, textNode);
|
|
112
|
-
} else {
|
|
113
|
-
(0, _dom.setTextContent)(node.childNodes[0], value);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (type === 'span') {
|
|
118
|
-
(0, _dom.setTextContent)(node, value);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
} else if (key === 'style') {
|
|
122
|
-
(0, _dom.setStyle)(node, value);
|
|
123
|
-
} else if (key === 'unstable__transformChildren') {
|
|
124
|
-
node.unstable__transformChildren = value; // eslint-disable-line camelcase
|
|
125
|
-
} else if (key === 'unstable__static') {
|
|
126
|
-
node.unstable__static = true; // eslint-disable-line camelcase
|
|
127
|
-
} else {
|
|
128
|
-
(0, _dom.setAttribute)(node, key, value);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
commitTextUpdate: (node, oldText, newText) => {
|
|
133
|
-
(0, _dom.setTextContent)(node, newText);
|
|
134
|
-
},
|
|
135
|
-
removeChild: _dom.removeChildNode
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
var _default = (0, _reactReconciler.default)(hostConfig); // eslint-disable-line new-cap
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
exports.default = _default;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _yogaLayoutPrebuilt = _interopRequireDefault(require("yoga-layout-prebuilt"));
|
|
9
|
-
|
|
10
|
-
var _renderNodeToOutput = _interopRequireDefault(require("../render-node-to-output"));
|
|
11
|
-
|
|
12
|
-
var _calculateWrappedText = _interopRequireDefault(require("../calculate-wrapped-text"));
|
|
13
|
-
|
|
14
|
-
var _output = _interopRequireDefault(require("./output"));
|
|
15
|
-
|
|
16
|
-
var _dom = require("./dom");
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
// Since <Static> components can be placed anywhere in the tree, this helper finds and returns them
|
|
21
|
-
const findStaticNode = node => {
|
|
22
|
-
if (node.unstable__static) {
|
|
23
|
-
return node;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
for (const childNode of node.childNodes) {
|
|
27
|
-
if (childNode.unstable__static) {
|
|
28
|
-
return childNode;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (Array.isArray(childNode.childNodes) && childNode.childNodes.length > 0) {
|
|
32
|
-
return findStaticNode(childNode);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
var _default = ({
|
|
38
|
-
terminalWidth = 100
|
|
39
|
-
}) => {
|
|
40
|
-
return node => {
|
|
41
|
-
(0, _dom.setStyle)(node, {
|
|
42
|
-
width: terminalWidth
|
|
43
|
-
});
|
|
44
|
-
node.yogaNode.calculateLayout(_yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.DIRECTION_LTR);
|
|
45
|
-
(0, _calculateWrappedText.default)(node);
|
|
46
|
-
node.yogaNode.calculateLayout(_yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.UNDEFINED, _yogaLayoutPrebuilt.default.DIRECTION_LTR);
|
|
47
|
-
const output = new _output.default({
|
|
48
|
-
width: node.yogaNode.getComputedWidth(),
|
|
49
|
-
height: node.yogaNode.getComputedHeight()
|
|
50
|
-
});
|
|
51
|
-
(0, _renderNodeToOutput.default)(node, output, {
|
|
52
|
-
skipStaticElements: true
|
|
53
|
-
});
|
|
54
|
-
const staticNode = findStaticNode(node);
|
|
55
|
-
let staticOutput;
|
|
56
|
-
|
|
57
|
-
if (staticNode) {
|
|
58
|
-
staticOutput = new _output.default({
|
|
59
|
-
width: staticNode.yogaNode.getComputedWidth(),
|
|
60
|
-
height: staticNode.yogaNode.getComputedHeight()
|
|
61
|
-
});
|
|
62
|
-
(0, _renderNodeToOutput.default)(staticNode, staticOutput, {
|
|
63
|
-
skipStaticElements: false
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const {
|
|
68
|
-
output: generatedOutput,
|
|
69
|
-
height: outputHeight
|
|
70
|
-
} = output.get();
|
|
71
|
-
return {
|
|
72
|
-
output: generatedOutput,
|
|
73
|
-
outputHeight,
|
|
74
|
-
// Newline at the end is needed, because static output doesn't have one, so
|
|
75
|
-
// interactive output will override last line of static output
|
|
76
|
-
staticOutput: staticOutput ? `${staticOutput.get().output}\n` : undefined
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
exports.default = _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import Yoga from 'yoga-layout';
|
|
2
|
-
const getMaxWidth = (yogaNode) => {
|
|
3
|
-
return (yogaNode.getComputedWidth() -
|
|
4
|
-
yogaNode.getComputedPadding(Yoga.EDGE_LEFT) -
|
|
5
|
-
yogaNode.getComputedPadding(Yoga.EDGE_RIGHT) -
|
|
6
|
-
yogaNode.getComputedBorder(Yoga.EDGE_LEFT) -
|
|
7
|
-
yogaNode.getComputedBorder(Yoga.EDGE_RIGHT));
|
|
8
|
-
};
|
|
9
|
-
export default getMaxWidth;
|
|
10
|
-
//# sourceMappingURL=get-max-width.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-max-width.js","sourceRoot":"","sources":["../src/get-max-width.ts"],"names":[],"mappings":"AAAA,OAAO,IAA6B,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,GAAG,CAAC,QAAkB,EAAE,EAAE;IAC1C,OAAO,CACN,QAAQ,CAAC,gBAAgB,EAAE;QAC3B,QAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC;QAC3C,QAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC;QAC5C,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC;QAC1C,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAC3C,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { useContext } from 'react';
|
|
2
|
-
import AppContext from '../components/AppContext.js';
|
|
3
|
-
/**
|
|
4
|
-
`useApp` is a React hook that exposes a method to manually exit the app (unmount).
|
|
5
|
-
*/
|
|
6
|
-
const useApp = () => useContext(AppContext);
|
|
7
|
-
export default useApp;
|
|
8
|
-
//# sourceMappingURL=use-app.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-app.js","sourceRoot":"","sources":["../../src/hooks/use-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,UAAU,MAAM,6BAA6B,CAAC;AAErD;;EAEE;AACF,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC5C,eAAe,MAAM,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type CursorPosition } from '../log-update.js';
|
|
2
|
-
/**
|
|
3
|
-
`useCursor` is a React hook that lets you control the terminal cursor position.
|
|
4
|
-
|
|
5
|
-
Setting a cursor position makes the cursor visible at the specified coordinates (relative to the Ink output origin). This is useful for IME (Input Method Editor) support, where the composing character is displayed at the cursor location.
|
|
6
|
-
|
|
7
|
-
Pass `undefined` to hide the cursor.
|
|
8
|
-
*/
|
|
9
|
-
declare const useCursor: () => {
|
|
10
|
-
setCursorPosition: (position: CursorPosition | undefined) => void;
|
|
11
|
-
};
|
|
12
|
-
export default useCursor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useContext, useRef, useCallback, useInsertionEffect } from 'react';
|
|
2
|
-
import CursorContext from '../components/CursorContext.js';
|
|
3
|
-
/**
|
|
4
|
-
`useCursor` is a React hook that lets you control the terminal cursor position.
|
|
5
|
-
|
|
6
|
-
Setting a cursor position makes the cursor visible at the specified coordinates (relative to the Ink output origin). This is useful for IME (Input Method Editor) support, where the composing character is displayed at the cursor location.
|
|
7
|
-
|
|
8
|
-
Pass `undefined` to hide the cursor.
|
|
9
|
-
*/
|
|
10
|
-
const useCursor = () => {
|
|
11
|
-
const context = useContext(CursorContext);
|
|
12
|
-
const positionRef = useRef(undefined);
|
|
13
|
-
const setCursorPosition = useCallback((position) => {
|
|
14
|
-
positionRef.current = position;
|
|
15
|
-
}, []);
|
|
16
|
-
// Propagate cursor position to log-update only during commit phase.
|
|
17
|
-
// useInsertionEffect runs before resetAfterCommit (which triggers onRender),
|
|
18
|
-
// and does NOT run for abandoned concurrent renders (e.g. suspended components).
|
|
19
|
-
// This prevents cursor state from leaking across render boundaries.
|
|
20
|
-
useInsertionEffect(() => {
|
|
21
|
-
context.setCursorPosition(positionRef.current);
|
|
22
|
-
return () => {
|
|
23
|
-
context.setCursorPosition(undefined);
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
return { setCursorPosition };
|
|
27
|
-
};
|
|
28
|
-
export default useCursor;
|
|
29
|
-
//# sourceMappingURL=use-cursor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-cursor.js","sourceRoot":"","sources":["../../src/hooks/use-cursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAC,MAAM,OAAO,CAAC;AAC1E,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAG3D;;;;;;EAME;AACF,MAAM,SAAS,GAAG,GAAG,EAAE;IACtB,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,MAAM,CAA6B,SAAS,CAAC,CAAC;IAElE,MAAM,iBAAiB,GAAG,WAAW,CACpC,CAAC,QAAoC,EAAE,EAAE;QACxC,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IAChC,CAAC,EACD,EAAE,CACF,CAAC;IAEF,oEAAoE;IACpE,6EAA6E;IAC7E,iFAAiF;IACjF,oEAAoE;IACpE,kBAAkB,CAAC,GAAG,EAAE;QACvB,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,GAAG,EAAE;YACX,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,EAAC,iBAAiB,EAAC,CAAC;AAC5B,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|