@openhands/agent-canvas 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-C921BlYB.js → acp-providers-DLe_gVDY.js} +1 -1
- package/build/assets/active-backend-context-B0wI7OzM.js +2 -0
- package/build/assets/agent-context-settings-CaQtdNA-.js +1 -0
- package/build/assets/{agent-profiles-settings-BymJf3EP.js → agent-profiles-settings-CvuErjp6.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-km_8sOVf.js +41 -0
- package/build/assets/{agent-settings-WzqXk6B4.js → agent-settings-UE-U4Xii.js} +2 -2
- package/build/assets/agent-settings-nmO-KSXr.js +1 -0
- package/build/assets/alert-banner-BMaOtTCG.js +1 -0
- package/build/assets/{api-key-entry-screen-DI0I04O3.js → api-key-entry-screen-Cy66vT4D.js} +1 -1
- package/build/assets/{app-settings-DGistSFV.js → app-settings-9ok42bV6.js} +1 -1
- package/build/assets/automation-detail-fuITm6i3.js +3 -0
- package/build/assets/automation-export-CRq40mux.js +2 -0
- package/build/assets/automation-setup-route-EXDazOHW.js +1 -0
- package/build/assets/automation-templates-BArZsaxP.js +1 -0
- package/build/assets/automations-list-CG4HKOTn.js +1 -0
- package/build/assets/{back-nav-button-D4ngzpSh.js → back-nav-button-BZB6H7xz.js} +1 -1
- package/build/assets/{backend-form-modal-B8D5hBzK.js → backend-form-modal-B_lXjOGa.js} +1 -1
- package/build/assets/{backend-synced-settings-badge-BnzI8Ysj.js → backend-synced-settings-badge-B_NXJ3u1.js} +1 -1
- package/build/assets/{badge-1Mf1iPcX.js → badge-C64c-7PO.js} +1 -1
- package/build/assets/{base-modal-BBuy0WQQ.js → base-modal-C0RQPug5.js} +1 -1
- package/build/assets/bot-DuN83i3p.js +1 -0
- package/build/assets/{brand-button-DGN6Y9o6.js → brand-button-DJmFCyMK.js} +1 -1
- package/build/assets/{browser-D_ekTlTS.js → browser-D3gd2n83.js} +2 -2
- package/build/assets/{browser-tab-D4a4Ou_w.js → browser-tab-BicAWuJ1.js} +1 -1
- package/build/assets/{chat-send-button-CgbcjD97.js → chat-send-button-CCrH1E8u.js} +1 -1
- package/build/assets/check-DLOKoFU9.js +1 -0
- package/build/assets/{checkmark-CxdXtM3b.js → checkmark-XZyokq_Y.js} +1 -1
- package/build/assets/chevron-down-CnIbtM6i.js +1 -0
- package/build/assets/circle-check-CxCYJrpZ.js +1 -0
- package/build/assets/{circle-plus-check-toggle-yTAS-nX3.js → circle-plus-check-toggle-CB_sNERY.js} +1 -1
- package/build/assets/{close-CDAVqnTn.js → close-ScPlnwyq.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-CEOl5Gxr.js → cloud-funnel-analytics-XynamQGU.js} +1 -1
- package/build/assets/{combobox-caret-Bd2yySnF.js → combobox-caret-Bwiifgjs.js} +1 -1
- package/build/assets/command-menu-CA3IjGNc.js +1 -0
- package/build/assets/condenser-settings-cNGy75gq.js +1 -0
- package/build/assets/{confirmation-modal-NCUPr2-O.js → confirmation-modal-BATFmFyP.js} +1 -1
- package/build/assets/context-menu-list-item-DhJCcBA0.js +1 -0
- package/build/assets/conversation-B6t6EiVp.js +1 -0
- package/build/assets/{conversation-CUJ0Vo8g.js → conversation-Csdxh9Xt.js} +7 -7
- package/build/assets/conversation-panel-B6t6EiVp.js +1 -0
- package/build/assets/{conversation-state-store-F62HvuI1.js → conversation-state-store-C2QzhPaK.js} +1 -1
- package/build/assets/{conversation-store-C6hSXHw0.js → conversation-store-B8Eahyeg.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-BCZ7rUMH.js → conversation-tab-empty-state-D3fb5xIA.js} +1 -1
- package/build/assets/{copy-DCmZtz6n.js → copy-DaHuDtG4.js} +1 -1
- package/build/assets/{copy-z7idLzWO.js → copy-Drmhc2jD.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-D_Lp6-Fl.js → copy-to-clipboard-button-c4MQwKGj.js} +1 -1
- package/build/assets/{device-verify-DLmolX8Q.js → device-verify-oFpQoLgm.js} +1 -1
- package/build/assets/{dist-hOnv1nn2.js → dist-Bl64nBZL.js} +1 -1
- package/build/assets/{dropdown-classes-BB8rzqXL.js → dropdown-classes-f91ARMV1.js} +1 -1
- package/build/assets/entry.client-BCzY2Bf3.js +2 -0
- package/build/assets/enum-filter-dropdown-HG3q3rkV.js +1 -0
- package/build/assets/{environment-switch-overlay-BepBBX66.js → environment-switch-overlay-CquZXolz.js} +1 -1
- package/build/assets/{extensions-hub-R3KNv-5V.js → extensions-hub-BeweE0PW.js} +1 -1
- package/build/assets/{extensions-navigation-CfWFmI1I.js → extensions-navigation-Dd58NlUF.js} +1 -1
- package/build/assets/{external-link-BdBSg8rk.js → external-link-zWbg5KXS.js} +1 -1
- package/build/assets/file-text-RecuaId_.js +1 -0
- package/build/assets/files-tab-CLLG55-q.js +1 -0
- package/build/assets/{folder-C86qXV7M.js → folder-C1ou4_DT.js} +1 -1
- package/build/assets/{form-control-classes-DAfsCJTe.js → form-control-classes-pHtZUI6K.js} +1 -1
- package/build/assets/format-relative-time-6-3uvOXe.js +1 -0
- package/build/assets/format-time-delta-BIR5Os7T.js +1 -0
- package/build/assets/{git-provider-icon-BZqqUPlm.js → git-provider-icon-wg7ShB98.js} +1 -1
- package/build/assets/{git-repo-dropdown-DEpOwUez.js → git-repo-dropdown-CWnaUyxL.js} +1 -1
- package/build/assets/git-repo-dropdown-TzOuG5Ef.js +1 -0
- package/build/assets/{highlighted-source-view-CX9oIoVT.js → highlighted-source-view-DBtI3por.js} +1 -1
- package/build/assets/home-BpZQkDWM.js +1 -0
- package/build/assets/home-OEx0XtfP.js +1 -0
- package/build/assets/{home-store-Ch1ErdBc.js → home-store-DM4qw1lF.js} +1 -1
- package/build/assets/{iconBase-B2rQun3J.js → iconBase-C2sR-uAp.js} +1 -1
- package/build/assets/index-home-OEx0XtfP.js +1 -0
- package/build/assets/info-C9lpK5pw.js +1 -0
- package/build/assets/install-server-modal-DnjZrJUy.js +1 -0
- package/build/assets/kebab-menu-item-content-By16Tm_0.js +1 -0
- package/build/assets/{launch-B1POpHuP.js → launch-C9uijypN.js} +1 -1
- package/build/assets/{link-external-BDBCz-_z.js → link-external-BNZzCM1I.js} +1 -1
- package/build/assets/list-filter-C86CBRDE.js +1 -0
- package/build/assets/{list-todo-DtiL3lTp.js → list-todo-CheUtB7F.js} +1 -1
- package/build/assets/llm-not-configured-banner-DrBrhfN0.js +27 -0
- package/build/assets/{llm-settings-CXo8iPNW.js → llm-settings-CRsLqxgu.js} +1 -1
- package/build/assets/llm-settings-RBm_3kNm.js +1 -0
- package/build/assets/{llm-subscription-service-DBJbfd8Z.js → llm-subscription-service-DwjJ8-_X.js} +1 -1
- package/build/assets/loader-circle-C5AnEN8r.js +1 -0
- package/build/assets/{loading-spinner-DfZ_bhV7.js → loading-spinner-6Yj-YyoS.js} +1 -1
- package/build/assets/{manage-backends-modal-CwyWsiag.js → manage-backends-modal-DrwErS0N.js} +1 -1
- package/build/assets/manifest-c352d453.js +1 -0
- package/build/assets/manifest-subpage-layout-CtqVwIvJ.js +1 -0
- package/build/assets/{markdown-renderer-DgiLLhW6.js → markdown-renderer-lsvsp7jn.js} +4 -4
- package/build/assets/mcp-DD4hPTRE.js +9 -0
- package/build/assets/mcp-marketplace-utils-BMnYz0Gc.js +1 -0
- package/build/assets/messages-Dt77e0qi.js +40 -0
- package/build/assets/{modal-backdrop-X-vKo61e.js → modal-backdrop-BSzNhM4r.js} +1 -1
- package/build/assets/{modal-body-CMsDpalT.js → modal-body-BHGCSAtj.js} +1 -1
- package/build/assets/{modal-classes-B6PDrxXo.js → modal-classes-DSTLuxkA.js} +1 -1
- package/build/assets/{modal-close-button-DyxBZaAb.js → modal-close-button-dheWZ2ys.js} +1 -1
- package/build/assets/mouse-pointer-click-Px-dXWcS.js +1 -0
- package/build/assets/{navigation-context-BOGzIng3.js → navigation-context-CQZwH_tC.js} +1 -1
- package/build/assets/navigation-link-Bxo3-4vo.js +1 -0
- package/build/assets/onboarding-5CZvRBbh.js +1 -0
- package/build/assets/onboarding-modal-CD2ehuxt.js +1 -0
- package/build/assets/{openhands-logo-CmYvJXBa.js → openhands-logo-BS-Epajy.js} +1 -1
- package/build/assets/{organization-service.api-UDy63-oC.js → organization-service.api-Dsuoep0g.js} +1 -1
- package/build/assets/{pencil-BjgtZmWp.js → pencil-Bl3GWhgq.js} +1 -1
- package/build/assets/{planner-tab-BWk8885v.js → planner-tab-DeO7Thb0.js} +1 -1
- package/build/assets/{plugins-management-service-CjkgF2dd.js → plugins-management-service-C9f75R6X.js} +1 -1
- package/build/assets/plus-CtzlyAoF.js +1 -0
- package/build/assets/{profiles-service.api-CukSFLzz.js → profiles-service.api-Dl20_2IM.js} +1 -1
- package/build/assets/{providers-CqUWC85T.js → providers-CeuhK46N.js} +1 -1
- package/build/assets/{proxy-BBUG3sd2.js → proxy-CIGI9zQC.js} +1 -1
- package/build/assets/{puzzle-BoNc6zZ8.js → puzzle-B3v361yY.js} +1 -1
- package/build/assets/recommended-automations-launcher-6xmbf7lh.js +1 -0
- package/build/assets/{refresh-cw-BrM5ZAZD.js → refresh-cw-B9GhC3QC.js} +1 -1
- package/build/assets/root-BQPNqNvD.js +2 -0
- package/build/assets/root-BeuHFY2s.css +1 -0
- package/build/assets/root-layout-Dl_2CDoq.js +3 -0
- package/build/assets/{schema-field-nImDoY6-.js → schema-field-z2vSLuLo.js} +1 -1
- package/build/assets/{sdk-section-page-BxMrtUNV.js → sdk-section-page-BnCXAytf.js} +1 -1
- package/build/assets/{search-7DRiGm4Z.js → search-BatSpWed.js} +1 -1
- package/build/assets/search-CYaiKHRp.js +1 -0
- package/build/assets/{secrets-service-Dhjh3HhH.js → secrets-service-DGUNlwQd.js} +1 -1
- package/build/assets/{secrets-settings-CPdxceT_.js → secrets-settings-DUmML_dK.js} +1 -1
- package/build/assets/{segmented-toggle-Do6oyepX.js → segmented-toggle-eSofF7gn.js} +1 -1
- package/build/assets/settings-CWFxymAf.js +1 -0
- package/build/assets/{settings-BRbnfKEm.js → settings-Co-M5bK9.js} +1 -1
- package/build/assets/{settings-dropdown-input-DYCULKpp.js → settings-dropdown-input-Cx4g7Xfl.js} +1 -1
- package/build/assets/{settings-gear-TYXnELES.js → settings-gear-DaJj6Pde.js} +1 -1
- package/build/assets/{settings-index-C9o2NBO0.js → settings-index-BECdgecg.js} +1 -1
- package/build/assets/{settings-input-B-q2gkVy.js → settings-input-BQY115xH.js} +1 -1
- package/build/assets/settings-like-page-layout-classes-Cw4Yzv_P.js +1 -0
- package/build/assets/{settings-list-classes-WpQi0q1L.js → settings-list-classes-C9cLrrcc.js} +1 -1
- package/build/assets/{settings-modal-CEK0AIx6.js → settings-modal-ChBJNTdd.js} +1 -1
- package/build/assets/{settings-section-header-context-CnIIQAUn.js → settings-section-header-context-BOJ_Fbak.js} +1 -1
- package/build/assets/settings-service.api-Dz9cZyvx.js +1 -0
- package/build/assets/{settings-switch-LqKdGxHL.js → settings-switch-BIodMVz9.js} +1 -1
- package/build/assets/{shared-conversation-Bu-dQlgp.js → shared-conversation-CSF0aTuE.js} +1 -1
- package/build/assets/{sidebar-layout-oHBGQmLh.js → sidebar-layout-DEycoFd_.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-DeRvTupV.js +1 -0
- package/build/assets/{sidebar-nav-link-CrujNA09.js → sidebar-nav-link-BjpQ-NVc.js} +1 -1
- package/build/assets/{sidebar-store-Bui-WNEr.js → sidebar-store-B04sX8aP.js} +1 -1
- package/build/assets/{skill-card-pill-row-CZBI7OqH.js → skill-card-pill-row-BH6fPGba.js} +1 -1
- package/build/assets/{skill-icon-badge-BOov_phZ.js → skill-icon-badge-D4uznfjU.js} +1 -1
- package/build/assets/skill-scope-DH_AUUUP.js +1 -0
- package/build/assets/{skills-CYFLsN5U.js → skills-B0IliMxw.js} +1 -1
- package/build/assets/{skills-plugins-D0PiHWAD.js → skills-plugins-vfvOk34h.js} +1 -1
- package/build/assets/skills-settings-DnbIu2eO.js +2 -0
- package/build/assets/sparkles-g7y3r-Ut.js +1 -0
- package/build/assets/{styled-tooltip-C7grwnOX.js → styled-tooltip-CQ9JEFiO.js} +1 -1
- package/build/assets/{switch-skeleton-BQoOhQTB.js → switch-skeleton-DwOoCqaL.js} +1 -1
- package/build/assets/{syntax-highlighter-B92AFGMy.js → syntax-highlighter-BGDg_7w9.js} +1 -1
- package/build/assets/{task-list-tab-R3ac6m7O.js → task-list-tab-DeF_uXdw.js} +1 -1
- package/build/assets/{terminal-cMS3RgVE.js → terminal-BUpID2wS.js} +1 -1
- package/build/assets/{terminal-yqkNdEAx.js → terminal-DRc4rup7.js} +1 -1
- package/build/assets/{toggle-switch-BeSrbgCg.js → toggle-switch--8n8NeV_.js} +1 -1
- package/build/assets/{trash-2-wW5TWcdN.js → trash-2-CzDVN-Iw.js} +1 -1
- package/build/assets/{typography-iYhzLlHO.js → typography-BSbUhJPn.js} +1 -1
- package/build/assets/{u-check-circle-DBEvndTS.js → u-check-circle-BKn1spCL.js} +1 -1
- package/build/assets/{u-edit-809W9D9T.js → u-edit-DAkcF52u.js} +1 -1
- package/build/assets/{u-robot-CJtSzy5X.js → u-robot-BvAOA2ZD.js} +1 -1
- package/build/assets/{use-acp-credential-form-DUxbxmbq.js → use-acp-credential-form-BGKFi1VL.js} +1 -1
- package/build/assets/{use-activate-agent-profile-CDHA52tC.js → use-activate-agent-profile-2nvALjC-.js} +1 -1
- package/build/assets/{use-agent-profiles-TsOdIyw5.js → use-agent-profiles-BlQA67MW.js} +1 -1
- package/build/assets/{use-breakpoint-DA7JqsRN.js → use-breakpoint-DWtihr9g.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-Bt1M71u5.js → use-can-manage-org-profiles-Clw5Dh1s.js} +1 -1
- package/build/assets/{use-click-outside-element-DKqpqEEm.js → use-click-outside-element-W6Os4Nlb.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-DWt7HCgf.js → use-cloud-current-user-id-B8AQSQFM.js} +1 -1
- package/build/assets/{use-config-CxlEdf_v.js → use-config-C3zGuUQI.js} +1 -1
- package/build/assets/{use-create-conversation-nOJ6Um5h.js → use-create-conversation-FaP0kUpg.js} +1 -1
- package/build/assets/{use-create-secret-Dj5ang9x.js → use-create-secret-CgQ3pXd6.js} +1 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +1 -0
- package/build/assets/{use-is-creating-conversation-CAggrM75.js → use-is-creating-conversation-CVefC9Ns.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-DKzCTMt0.js → use-launch-skill-in-chat-BcKNjxxd.js} +1 -1
- package/build/assets/use-llm-profiles-C-tDO6UB.js +1 -0
- package/build/assets/use-manifest-capabilities-DLP5wCxp.js +1 -0
- package/build/assets/{use-onboarding-completion-gxQlcEy2.js → use-onboarding-completion-BiCdXvlU.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CVO7sXYR.js → use-plugins-marketplace-DRFNLBlr.js} +1 -1
- package/build/assets/use-save-agent-profile-CaGVAudI.js +1 -0
- package/build/assets/{use-save-settings-L3aMaDeS.js → use-save-settings-C9B8Y-h3.js} +1 -1
- package/build/assets/{use-settings-8nt3DGxW.js → use-settings-3RcgdUuZ.js} +1 -1
- package/build/assets/{use-settings-nav-items-DHAAD-zk.js → use-settings-nav-items-y-Oyc93G.js} +2 -2
- package/build/assets/use-tracking-CTtkLAmx.js +3 -0
- package/build/assets/{use-user-conversation-BIIpGUgM.js → use-user-conversation-Bei82QsZ.js} +1 -1
- package/build/assets/{useInfiniteQuery-BLRVmVPU.js → useInfiniteQuery-DbCv0Jzd.js} +1 -1
- package/build/assets/{useMutation-CaSHLnX0.js → useMutation-ChpkYxI5.js} +1 -1
- package/build/assets/{useQueries--d_WWAzc.js → useQueries-Cjv3E8_1.js} +1 -1
- package/build/assets/useQuery-BCnzy4LX.js +1 -0
- package/build/assets/utils-BX9XJ0IE.js +1 -0
- package/build/assets/{vendor-markdown-BML7QbqS.js → vendor-markdown-j0kYzV48.js} +1 -1
- package/build/assets/{vendor-styling-Bcgpimp9.js → vendor-styling-Ck5D_A2Q.js} +6 -6
- package/build/assets/{vendor~browser-jaN4ilxM.js → vendor~browser-C6uXH-dw.js} +2 -2
- package/build/assets/vendor~browser-DJ1pl_wn.js +47 -0
- package/build/assets/{vendor~browser-tab-_-VCXq8n.js → vendor~browser-tab-C5uuAxZX.js} +1 -1
- package/build/assets/vendor~entry.client-CgNUwtQL.js +1 -0
- package/build/assets/{vendor~entry.client-BcYIVQvB.js → vendor~entry.client-zSIea5EO.js} +2 -2
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js} +4 -4
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js +26 -0
- package/build/assets/{vendor~files-tab-C7RmQJwN.js → vendor~files-tab-C87pjSpi.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-Bqp1ZqJM.js → vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js → vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js} +1 -1
- package/build/assets/{vendor~launch-ChXCOGw8.js → vendor~launch-CHwEQG6e.js} +1 -1
- package/build/assets/vendor~module-DyG7x7JT.js +2 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BCn8lzeG.js → vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-DRblkyXD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-B_L-gcOG.js → vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-sjx0x5ac.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~dfc8ddxy-tTyxnjXT.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js} +1 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js +73 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~dufan6ng-Dtdw8H0q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js} +162 -54
- package/build/assets/{verification-settings-DBsnSXC3.js → verification-settings-nD61Ijph.js} +1 -1
- package/build/assets/wrench-DRitTfwe.js +1 -0
- package/build/assets/x-RYDBg-e2.js +1 -0
- package/build/assets/{x-mark-jcTkPiOB.js → x-mark-BopmFoBq.js} +1 -1
- package/build/assets/zap-tbKDzCe3.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +70 -4
- package/build/locales/ca/openhands.json +70 -4
- package/build/locales/de/openhands.json +70 -4
- package/build/locales/en/openhands.json +70 -4
- package/build/locales/es/openhands.json +70 -4
- package/build/locales/fr/openhands.json +70 -4
- package/build/locales/it/openhands.json +70 -4
- package/build/locales/ja/openhands.json +70 -4
- package/build/locales/ko-KR/openhands.json +70 -4
- package/build/locales/no/openhands.json +70 -4
- package/build/locales/pt/openhands.json +70 -4
- package/build/locales/tr/openhands.json +70 -4
- package/build/locales/uk/openhands.json +70 -4
- package/build/locales/zh-CN/openhands.json +70 -4
- package/build/locales/zh-TW/openhands.json +70 -4
- package/build/mockServiceWorker.js +21 -9
- package/config/defaults.json +3 -3
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +5 -0
- package/dist/api/automation-service/automation-service.api.js +11 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/backend-registry/active-store.cjs +1 -1
- package/dist/api/backend-registry/active-store.cjs.map +1 -1
- package/dist/api/backend-registry/active-store.js +36 -31
- package/dist/api/backend-registry/active-store.js.map +1 -1
- package/dist/api/backend-registry/url-selection.cjs +2 -0
- package/dist/api/backend-registry/url-selection.cjs.map +1 -0
- package/dist/api/backend-registry/url-selection.d.ts +31 -0
- package/dist/api/backend-registry/url-selection.js +29 -0
- package/dist/api/backend-registry/url-selection.js.map +1 -0
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -2
- package/dist/api/mcp-service/mcp-redacted-credentials.js +32 -27
- package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.js +19 -19
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +10 -0
- package/dist/api/settings-service/settings-service.api.js +90 -100
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/api/skills-service.cjs +1 -1
- package/dist/api/skills-service.cjs.map +1 -1
- package/dist/api/skills-service.js +1 -0
- package/dist/api/skills-service.js.map +1 -1
- package/dist/assets/chevron-left.d.ts +1 -1
- package/dist/assets/chevron-right.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/collapsible-thinking.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/error-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-item-expanded.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-ready-content-list.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/conversation-events/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/alerts/alert-banner.d.ts +1 -1
- package/dist/components/features/analytics/telemetry-consent-banner.d.ts +2 -1
- package/dist/components/features/automations/add-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/automation-card-skeleton.d.ts +1 -1
- package/dist/components/features/automations/automation-card.d.ts +9 -1
- package/dist/components/features/automations/automation-group.d.ts +9 -1
- package/dist/components/features/automations/automation-health-badge.d.ts +8 -0
- package/dist/components/features/automations/automation-list-row.d.ts +3 -1
- package/dist/components/features/automations/automation-run-insights.d.ts +17 -0
- package/dist/components/features/automations/automation-view-toggle.d.ts +1 -1
- package/dist/components/features/automations/backend-not-configured.d.ts +1 -1
- package/dist/components/features/automations/create-instructions.d.ts +2 -2
- package/dist/components/features/automations/dashboard/automations-dashboard-controls.d.ts +18 -0
- package/dist/components/features/automations/dashboard/automations-filtered-empty-state.d.ts +9 -0
- package/dist/components/features/automations/dashboard/use-automation-sub-page-nav.d.ts +12 -0
- package/dist/components/features/automations/delete-confirmation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/active-status-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-item.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -1
- package/dist/components/features/automations/detail/activity-section.d.ts +1 -1
- package/dist/components/features/automations/detail/back-link.d.ts +1 -1
- package/dist/components/features/automations/detail/branch-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/config-field.d.ts +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +1 -1
- package/dist/components/features/automations/detail/debug-automation-button.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-skeleton.d.ts +1 -1
- package/dist/components/features/automations/detail/edit-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/not-found-state.d.ts +1 -1
- package/dist/components/features/automations/detail/plugin-chip.d.ts +1 -1
- package/dist/components/features/automations/detail/plugins-section.d.ts +1 -1
- package/dist/components/features/automations/detail/prompt-section.d.ts +2 -1
- package/dist/components/features/automations/detail/run-logs-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/run-status-badge.d.ts +10 -1
- package/dist/components/features/automations/detail/section-card.d.ts +1 -1
- package/dist/components/features/automations/empty-state.d.ts +1 -1
- package/dist/components/features/automations/error-state.d.ts +1 -1
- package/dist/components/features/automations/import-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu-item-content.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu.d.ts +1 -1
- package/dist/components/features/automations/metadata-chip.d.ts +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.d.ts +1 -1
- package/dist/components/features/automations/recommended-automations-section.d.ts +1 -1
- package/dist/components/features/automations/responder-deployment-modal.d.ts +1 -1
- package/dist/components/features/automations/search-input.d.ts +1 -1
- package/dist/components/features/automations/status-badge.d.ts +1 -1
- package/dist/components/features/automations/turn-off-confirmation-modal.d.ts +8 -0
- package/dist/components/features/automations/view-menu-item-content.d.ts +1 -1
- package/dist/components/features/backends/add-backend-modal.d.ts +1 -1
- package/dist/components/features/backends/api-key-entry-screen.d.ts +2 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +3 -3
- package/dist/components/features/backends/backend-row.d.ts +1 -1
- package/dist/components/features/backends/backend-selector.d.ts +2 -1
- package/dist/components/features/backends/backend-status-dot.d.ts +2 -1
- package/dist/components/features/backends/backend-version.d.ts +1 -1
- package/dist/components/features/backends/device-flow-auth.d.ts +1 -1
- package/dist/components/features/backends/manage-backends-modal.d.ts +2 -1
- package/dist/components/features/browser/browser-chrome-bar.d.ts +1 -1
- package/dist/components/features/browser/browser-snapshot.d.ts +1 -1
- package/dist/components/features/browser/browser.d.ts +1 -1
- package/dist/components/features/browser/empty-browser-message.d.ts +1 -1
- package/dist/components/features/chat/btw-messages.d.ts +1 -1
- package/dist/components/features/chat/change-agent-button.d.ts +2 -1
- package/dist/components/features/chat/change-agent-context-menu.d.ts +1 -1
- package/dist/components/features/chat/chat-action-tooltip.d.ts +1 -1
- package/dist/components/features/chat/chat-add-file-button.d.ts +2 -1
- package/dist/components/features/chat/chat-interface.d.ts +2 -1
- package/dist/components/features/chat/chat-message.d.ts +1 -1
- package/dist/components/features/chat/chat-messages-skeleton.d.ts +2 -1
- package/dist/components/features/chat/chat-play-button.d.ts +1 -1
- package/dist/components/features/chat/chat-send-button.d.ts +1 -1
- package/dist/components/features/chat/chat-status-indicator.d.ts +1 -1
- package/dist/components/features/chat/chat-stop-button.d.ts +1 -1
- package/dist/components/features/chat/chat-suggestions.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-container.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-field.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-model.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-row.d.ts +1 -1
- package/dist/components/features/chat/components/hidden-file-input.d.ts +1 -1
- package/dist/components/features/chat/components/slash-command-menu.d.ts +2 -1
- package/dist/components/features/chat/confirmation-mode-enabled.d.ts +1 -1
- package/dist/components/features/chat/custom-chat-input.d.ts +1 -1
- package/dist/components/features/chat/drag-over.d.ts +1 -1
- package/dist/components/features/chat/error-message-banner.d.ts +2 -1
- package/dist/components/features/chat/error-message.d.ts +2 -1
- package/dist/components/features/chat/generic-event-message.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-branch-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-repo-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-tooltip-wrapper.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar.d.ts +1 -1
- package/dist/components/features/chat/git-external-link-icon.d.ts +1 -1
- package/dist/components/features/chat/goal-status-banner.d.ts +1 -1
- package/dist/components/features/chat/goal-status-content.d.ts +1 -1
- package/dist/components/features/chat/got-it-button.d.ts +1 -1
- package/dist/components/features/chat/interactive-chat-box.d.ts +1 -1
- package/dist/components/features/chat/model-messages.d.ts +2 -1
- package/dist/components/features/chat/mono-component.d.ts +1 -1
- package/dist/components/features/chat/open-repository-modal.d.ts +2 -1
- package/dist/components/features/chat/pasted-image-upload-as-file-button.d.ts +1 -1
- package/dist/components/features/chat/path-component.d.ts +1 -1
- package/dist/components/features/chat/pending-stop-icon.d.ts +1 -1
- package/dist/components/features/chat/pending-user-messages.d.ts +2 -1
- package/dist/components/features/chat/plan-preview.d.ts +1 -1
- package/dist/components/features/chat/remove-file-button.d.ts +1 -1
- package/dist/components/features/chat/skill-install-restart-banner.d.ts +1 -1
- package/dist/components/features/chat/success-indicator.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-badge.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-icon.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/diff-view.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/key-value-grid.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -1
- package/dist/components/features/chat/typing-indicator.d.ts +1 -1
- package/dist/components/features/chat/uploaded-file.d.ts +1 -1
- package/dist/components/features/chat/uploaded-files.d.ts +1 -1
- package/dist/components/features/chat/uploaded-image.d.ts +2 -1
- package/dist/components/features/chat/user-message-body.d.ts +2 -2
- package/dist/components/features/chat/waiting-for-runtime-message.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-icon.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-selector.d.ts +1 -1
- package/dist/components/features/command-menu/command-menu-trigger.d.ts +2 -1
- package/dist/components/features/context-menu/archived-disabled-tooltip.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.d.ts +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js.map +1 -1
- package/dist/components/features/controls/agent-loading.d.ts +1 -1
- package/dist/components/features/controls/agent-status.d.ts +1 -1
- package/dist/components/features/controls/git-tools-submenu.d.ts +1 -1
- package/dist/components/features/controls/macros-submenu.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu.d.ts +1 -1
- package/dist/components/features/controls/server-status.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu.d.ts +1 -1
- package/dist/components/features/controls/tools.d.ts +2 -1
- package/dist/components/features/conversation/conversation-loading.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-main.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-mobile-panel-page.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name.d.ts +2 -1
- package/dist/components/features/conversation/conversation-tab-empty-state.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/suspense-pending-fallback.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-container.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-content-area.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-nav.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.d.ts +1 -1
- package/dist/components/features/conversation/right-panel-toggle.d.ts +1 -1
- package/dist/components/features/conversation/transcript-export-modal.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.d.ts +1 -1
- package/dist/components/features/conversation-panel/budget-usage-text.d.ts +2 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.js +38 -37
- package/dist/components/features/conversation-panel/compact-conversation-row.js.map +1 -1
- package/dist/components/features/conversation-panel/confirm-delete-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/confirm-stop-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-skeleton.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-title.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-status-badges.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/no-repository.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-new-thread-picker.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-pinned-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +221 -220
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-status-dot.d.ts +1 -1
- package/dist/components/features/conversation-panel/exit-conversation-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-event-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-matcher-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-heading.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-separator.d.ts +1 -1
- package/dist/components/features/conversation-panel/new-conversation-button.d.ts +2 -1
- package/dist/components/features/conversation-panel/plugins-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/runtime-waiting-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-triggers.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-footer.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-indicator.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/empty-tools-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-navigation.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/toggle-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-parameters.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tools-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal.d.ts +1 -1
- package/dist/components/features/diff-viewer/commit-list.d.ts +2 -1
- package/dist/components/features/diff-viewer/commit-row.d.ts +2 -1
- package/dist/components/features/diff-viewer/diff-drawer-icon.d.ts +1 -1
- package/dist/components/features/diff-viewer/editor-container.d.ts +1 -1
- package/dist/components/features/diff-viewer/empty-changes-message.d.ts +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +2 -1
- package/dist/components/features/diff-viewer/loading-spinner.d.ts +1 -1
- package/dist/components/features/files/file-item.d.ts +1 -1
- package/dist/components/features/files/file-list.d.ts +2 -1
- package/dist/components/features/files-tab/file-content-viewer.d.ts +1 -1
- package/dist/components/features/files-tab/file-quick-row.d.ts +1 -1
- package/dist/components/features/files-tab/file-tree-view.d.ts +1 -1
- package/dist/components/features/files-tab/highlighted-source-view.d.ts +1 -1
- package/dist/components/features/files-tab/no-file-selected-message.d.ts +1 -1
- package/dist/components/features/files-tab/segmented-toggle.d.ts +1 -1
- package/dist/components/features/files-tab/tree-node.d.ts +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.d.ts +11 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +18 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +14 -0
- package/dist/components/features/home/featured-automations/automation-run-health.d.ts +25 -0
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +39 -0
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +22 -0
- package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +23 -0
- package/dist/components/features/home/featured-automations/home-automation-menu.d.ts +13 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +12 -0
- package/dist/components/features/home/featured-automations/pinned-automation-card.d.ts +21 -0
- package/dist/components/features/home/featured-automations/pinned-automations-dashboard.d.ts +6 -0
- package/dist/components/features/home/featured-automations/running-automations-list.d.ts +6 -0
- package/dist/components/features/home/git-branch-dropdown/branch-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.d.ts +2 -1
- package/dist/components/features/home/home-chat-launcher.d.ts +1 -1
- package/dist/components/features/home/home-git-control-bar-preview.d.ts +1 -1
- package/dist/components/features/home/home-header/guide-message.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header-title.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header.d.ts +1 -1
- package/dist/components/features/home/llm-not-configured-banner.d.ts +1 -1
- package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +1 -1
- package/dist/components/features/home/new-conversation/new-conversation.d.ts +1 -1
- package/dist/components/features/home/new-conversation.d.ts +1 -1
- package/dist/components/features/home/open-launcher-button.d.ts +1 -1
- package/dist/components/features/home/open-repository-dialog.d.ts +1 -1
- package/dist/components/features/home/open-workspace-dialog.d.ts +1 -1
- package/dist/components/features/home/repo-selection-form.d.ts +2 -1
- package/dist/components/features/home/shared/clear-button.d.ts +2 -1
- package/dist/components/features/home/shared/dropdown-item.d.ts +1 -1
- package/dist/components/features/home/shared/empty-state.d.ts +2 -1
- package/dist/components/features/home/shared/error-message.d.ts +2 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/shared/loading-spinner.d.ts +2 -1
- package/dist/components/features/home/shared/toggle-button.d.ts +1 -1
- package/dist/components/features/home/tasks/task-card.d.ts +1 -1
- package/dist/components/features/home/tasks/task-group.d.ts +1 -1
- package/dist/components/features/home/tasks/task-issue-number.d.ts +1 -1
- package/dist/components/features/home/tasks/task-item-title.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions.d.ts +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/workspace-dropdown.d.ts +2 -1
- package/dist/components/features/home/workspace-selection-form.d.ts +2 -1
- package/dist/components/features/images/image-carousel.d.ts +2 -1
- package/dist/components/features/images/image-preview.d.ts +1 -1
- package/dist/components/features/images/thumbnail.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-modal.d.ts +2 -1
- package/dist/components/features/launch/plugin-launch-parameter-input.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-plugin-section.d.ts +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +1 -1
- package/dist/components/features/manifest/manifest-icons.d.ts +13 -0
- package/dist/components/features/manifest/manifest-overview-tiles.d.ts +19 -0
- package/dist/components/features/manifest/manifest-prerequisites-step.d.ts +1 -1
- package/dist/components/features/manifest/manifest-review-step.d.ts +1 -1
- package/dist/components/features/manifest/manifest-setup-dialog.d.ts +1 -1
- package/dist/components/features/manifest/manifest-subpage-layout.d.ts +23 -0
- package/dist/components/features/markdown/anchor.d.ts +1 -1
- package/dist/components/features/markdown/blockquote.d.ts +1 -1
- package/dist/components/features/markdown/code.d.ts +1 -1
- package/dist/components/features/markdown/headings.d.ts +6 -6
- package/dist/components/features/markdown/horizontal-rule.d.ts +1 -1
- package/dist/components/features/markdown/list.d.ts +3 -3
- package/dist/components/features/markdown/markdown-renderer.d.ts +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.d.ts +1 -1
- package/dist/components/features/markdown/paragraph.d.ts +1 -1
- package/dist/components/features/markdown/plan-components.d.ts +36 -36
- package/dist/components/features/markdown/table.d.ts +3 -3
- package/dist/components/features/mcp-logo-badge.d.ts +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.d.ts +2 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +5 -0
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.d.ts +2 -1
- package/dist/components/features/mcp-page/install-server-modal.js +117 -118
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -1
- package/dist/components/features/mcp-page/installed-servers-section.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-card.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-section.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-logo-stack-badge.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-section-filter-dropdown.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.d.ts +2 -1
- package/dist/components/features/mcp-page/mcp-toolbar.d.ts +1 -1
- package/dist/components/features/mcp-page/save-as-secret-toggle.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-host.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-modal.d.ts +2 -1
- package/dist/components/features/onboarding/onboarding-progress-bar.d.ts +1 -1
- package/dist/components/features/onboarding/steps/check-backend-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/choose-agent-step.d.ts +3 -2
- package/dist/components/features/onboarding/steps/say-hello-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-acp-secrets-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +2 -1
- package/dist/components/features/plugins/add-plugin-modal.d.ts +2 -1
- package/dist/components/features/plugins/plugin-card.d.ts +2 -1
- package/dist/components/features/plugins/plugin-detail-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-files-section.d.ts +2 -1
- package/dist/components/features/plugins/plugin-picker-card.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-trigger.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker.d.ts +1 -1
- package/dist/components/features/plugins/plugins-toolbar.d.ts +1 -1
- package/dist/components/features/settings/acp-auth-status-banner.d.ts +1 -1
- package/dist/components/features/settings/acp-conflict-warnings.d.ts +2 -1
- package/dist/components/features/settings/acp-credentials-section.d.ts +1 -1
- package/dist/components/features/settings/acp-secret-field.d.ts +2 -1
- package/dist/components/features/settings/agent-canvas-update-card.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/agent-server-onboarding.d.ts +2 -1
- package/dist/components/features/settings/api-key-modal-base.d.ts +1 -1
- package/dist/components/features/settings/app-settings/app-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/app-settings/language-input.d.ts +1 -1
- package/dist/components/features/settings/app-settings/theme-input.d.ts +2 -1
- package/dist/components/features/settings/backend-synced-settings-badge.d.ts +1 -1
- package/dist/components/features/settings/banner-message.d.ts +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +1 -1
- package/dist/components/features/settings/input-skeleton.d.ts +1 -1
- package/dist/components/features/settings/integrations-settings-link.d.ts +1 -1
- package/dist/components/features/settings/key-status-icon.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/delete-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.d.ts +2 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu-item.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/rename-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/llm-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -1
- package/dist/components/features/settings/mobile-header.d.ts +1 -1
- package/dist/components/features/settings/optional-tag.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/schema-field.d.ts +2 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/view-toggle.d.ts +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.d.ts +2 -1
- package/dist/components/features/settings/secrets-settings/secret-list-item.d.ts +2 -2
- package/dist/components/features/settings/settings-desktop-sidebar.d.ts +1 -1
- package/dist/components/features/settings/settings-dropdown-input.d.ts +1 -1
- package/dist/components/features/settings/settings-layout.d.ts +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.d.ts +1 -1
- package/dist/components/features/settings/settings-mobile-hub.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-divider.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-header.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-link.d.ts +1 -1
- package/dist/components/features/settings/settings-navigation.d.ts +1 -1
- package/dist/components/features/settings/settings-switch.d.ts +1 -1
- package/dist/components/features/settings/subtext-skeleton.d.ts +1 -1
- package/dist/components/features/settings/switch-skeleton.d.ts +1 -1
- package/dist/components/features/settings/upgrade-banner.d.ts +1 -1
- package/dist/components/features/settings/upgrade-button.d.ts +1 -1
- package/dist/components/features/sidebar/avatar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-collapsed-icon-slot.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-conversation-list.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-bar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-toggle.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-nav-context.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar.d.ts +2 -1
- package/dist/components/features/sidebar/user-avatar.d.ts +1 -1
- package/dist/components/features/skills/add-skill-modal.d.ts +2 -1
- package/dist/components/features/skills/extensions-mobile-hub.d.ts +1 -1
- package/dist/components/features/skills/extensions-navigation.d.ts +1 -1
- package/dist/components/features/skills/skill-card-pill-row.d.ts +1 -1
- package/dist/components/features/skills/skill-card.d.ts +2 -1
- package/dist/components/features/skills/skill-detail-modal.d.ts +2 -1
- package/dist/components/features/skills/skill-facet-rail.d.ts +8 -0
- package/dist/components/features/skills/skill-facet-row.d.ts +13 -0
- package/dist/components/features/skills/skill-filter.d.ts +34 -0
- package/dist/components/features/skills/skill-filters-modal.d.ts +10 -0
- package/dist/components/features/skills/skill-icon-badge.d.ts +1 -1
- package/dist/components/features/skills/skill-type-badge.d.ts +1 -1
- package/dist/components/features/skills/skills-toolbar.d.ts +3 -4
- package/dist/components/features/suggestions/suggestion-item.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.d.ts +1 -1
- package/dist/components/features/terminal/empty-terminal-message.d.ts +1 -1
- package/dist/components/features/terminal/terminal.d.ts +1 -1
- package/dist/components/features/tips/random-tip.d.ts +2 -1
- package/dist/components/providers/agent-server-ui-providers.d.ts +1 -1
- package/dist/components/providers/agent-server-ui-root.d.ts +1 -1
- package/dist/components/providers/telemetry-provider.d.ts +1 -1
- package/dist/components/shared/action-tooltip.d.ts +1 -1
- package/dist/components/shared/agent-brand-icon.d.ts +1 -1
- package/dist/components/shared/badge.d.ts +1 -1
- package/dist/components/shared/buttons/back-nav-button-content.d.ts +1 -1
- package/dist/components/shared/buttons/circle-plus-check-toggle.d.ts +3 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.d.ts +1 -1
- package/dist/components/shared/buttons/copy-to-clipboard-button.d.ts +1 -1
- package/dist/components/shared/buttons/copyable-content-wrapper.d.ts +1 -1
- package/dist/components/shared/buttons/modal-button.d.ts +1 -1
- package/dist/components/shared/buttons/openhands-logo-button.d.ts +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +1 -1
- package/dist/components/shared/buttons/scroll-to-bottom-button.d.ts +1 -1
- package/dist/components/shared/buttons/styled-tooltip.d.ts +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.d.ts +6 -2
- package/dist/components/shared/filters/enum-filter-dropdown.js +13 -13
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/git-provider-icon.d.ts +1 -1
- package/dist/components/shared/hook-execution-event-message.d.ts +2 -1
- package/dist/components/shared/loading-spinner.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modal.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.d.ts +3 -3
- package/dist/components/shared/modals/confirmation-modals/danger-modal.d.ts +1 -1
- package/dist/components/shared/modals/modal-body.d.ts +1 -1
- package/dist/components/shared/modals/modal-close-button.d.ts +1 -1
- package/dist/components/shared/modals/settings/model-selector.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-form.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-modal.d.ts +1 -1
- package/dist/components/shared/navigation-link.cjs +1 -1
- package/dist/components/shared/navigation-link.cjs.map +1 -1
- package/dist/components/shared/navigation-link.js +11 -7
- package/dist/components/shared/navigation-link.js.map +1 -1
- package/dist/components/shared/risk-alert.d.ts +1 -1
- package/dist/components/shared/text-shimmer.d.ts +1 -1
- package/dist/components/ui/resize-handle.d.ts +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/context/navigation-context.d.ts +1 -1
- package/dist/context/scroll-context.d.ts +1 -1
- package/dist/contexts/active-backend-context.d.ts +1 -1
- package/dist/contexts/conversation-websocket-context.d.ts +1 -1
- package/dist/contexts/settings-section-header-context.d.ts +1 -1
- package/dist/contexts/websocket-provider-wrapper.d.ts +1 -1
- package/dist/fixtures/home-automations-demo.d.ts +19 -0
- package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.js +10 -14
- package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.d.ts +2 -7
- package/dist/hooks/mutation/use-delete-mcp-server.js +8 -34
- package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
- package/dist/hooks/mutation/use-save-settings.js +8 -4
- package/dist/hooks/mutation/use-save-settings.js.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.d.ts +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +31 -16
- package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
- package/dist/hooks/query/use-active-conversation.d.ts +1 -1
- package/dist/hooks/query/use-agent-profiles.d.ts +1 -1
- package/dist/hooks/query/use-app-installations.d.ts +1 -1
- package/dist/hooks/query/use-automation-detail.d.ts +2 -2
- package/dist/hooks/query/use-automation-health.d.ts +2 -0
- package/dist/hooks/query/use-automations.d.ts +5 -1
- package/dist/hooks/query/use-bash-command-logs.d.ts +1 -1
- package/dist/hooks/query/use-cloud-sandbox.d.ts +1 -1
- package/dist/hooks/query/use-commit-changes.d.ts +1 -1
- package/dist/hooks/query/use-config.d.ts +1 -1
- package/dist/hooks/query/use-conversation-history.d.ts +1 -1
- package/dist/hooks/query/use-conversation-hooks.d.ts +1 -1
- package/dist/hooks/query/use-conversation-skills.d.ts +1 -1
- package/dist/hooks/query/use-get-secrets.d.ts +1 -1
- package/dist/hooks/query/use-home-automations.d.ts +20 -0
- package/dist/hooks/query/use-latest-automation-runs.d.ts +19 -0
- package/dist/hooks/query/use-llm-profiles.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-models.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-status.d.ts +1 -1
- package/dist/hooks/query/use-local-git-info.d.ts +1 -1
- package/dist/hooks/query/use-local-workspaces.d.ts +1 -1
- package/dist/hooks/query/use-manifest-capabilities.d.ts +2 -0
- package/dist/hooks/query/use-plugin-file-content.d.ts +1 -1
- package/dist/hooks/query/use-plugins-marketplace.d.ts +1 -1
- package/dist/hooks/query/use-provider-models.d.ts +1 -1
- package/dist/hooks/query/use-search-branches.d.ts +1 -1
- package/dist/hooks/query/use-search-providers.d.ts +1 -1
- package/dist/hooks/query/use-search-repositories.d.ts +1 -1
- package/dist/hooks/query/use-search-subdirs.d.ts +2 -2
- package/dist/hooks/query/use-settings.d.ts +2 -2
- package/dist/hooks/query/use-skills.d.ts +1 -1
- package/dist/hooks/query/use-start-tasks.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversation-task-polling.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversations.d.ts +1 -1
- package/dist/hooks/query/use-suggested-tasks.d.ts +1 -1
- package/dist/hooks/query/use-task-polling.d.ts +2 -2
- package/dist/hooks/query/use-unified-get-git-changes.d.ts +1 -1
- package/dist/hooks/query/use-unified-git-diff.d.ts +1 -1
- package/dist/hooks/query/use-user-conversation.d.ts +1 -1
- package/dist/hooks/query/use-workspace-file-content.d.ts +1 -1
- package/dist/hooks/use-backend-scoped-path.cjs +2 -0
- package/dist/hooks/use-backend-scoped-path.cjs.map +1 -0
- package/dist/hooks/use-backend-scoped-path.d.ts +10 -0
- package/dist/hooks/use-backend-scoped-path.js +13 -0
- package/dist/hooks/use-backend-scoped-path.js.map +1 -0
- package/dist/hooks/use-home-automation-actions.d.ts +23 -0
- package/dist/hooks/use-home-pinned-automations.d.ts +26 -0
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +4 -0
- package/dist/hooks/use-tracking.js +6 -0
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +68 -2
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +1169 -47
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/code-pill.d.ts +1 -1
- package/dist/locales/ar/openhands.json +70 -4
- package/dist/locales/ca/openhands.json +70 -4
- package/dist/locales/de/openhands.json +70 -4
- package/dist/locales/en/openhands.json +70 -4
- package/dist/locales/es/openhands.json +70 -4
- package/dist/locales/fr/openhands.json +70 -4
- package/dist/locales/it/openhands.json +70 -4
- package/dist/locales/ja/openhands.json +70 -4
- package/dist/locales/ko-KR/openhands.json +70 -4
- package/dist/locales/no/openhands.json +70 -4
- package/dist/locales/pt/openhands.json +70 -4
- package/dist/locales/tr/openhands.json +70 -4
- package/dist/locales/uk/openhands.json +70 -4
- package/dist/locales/zh-CN/openhands.json +70 -4
- package/dist/locales/zh-TW/openhands.json +70 -4
- package/dist/manifests/automation-insights.d.ts +64 -0
- package/dist/manifests/automation-interface.cjs +1 -1
- package/dist/manifests/automation-interface.cjs.map +1 -1
- package/dist/manifests/automation-interface.d.ts +33 -1
- package/dist/manifests/automation-interface.js +2 -1
- package/dist/manifests/automation-interface.js.map +1 -1
- package/dist/manifests/interface-validation.cjs +1 -1
- package/dist/manifests/interface-validation.cjs.map +1 -1
- package/dist/manifests/interface-validation.js +228 -50
- package/dist/manifests/interface-validation.js.map +1 -1
- package/dist/manifests/manifest-template.d.ts +2 -0
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/manifests/types.cjs +1 -1
- package/dist/manifests/types.cjs.map +1 -1
- package/dist/manifests/types.d.ts +128 -0
- package/dist/manifests/types.js +35 -2
- package/dist/manifests/types.js.map +1 -1
- package/dist/mockServiceWorker.js +21 -9
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js +74 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +6 -4
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js +126 -5
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +161 -53
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +112 -50
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js +12 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +14 -12
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs +2 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs.map +1 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js +177 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js.map +1 -0
- package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.js +31 -24
- package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
- package/dist/node_modules/posthog-js/dist/module.cjs +2 -2
- package/dist/node_modules/posthog-js/dist/module.cjs.map +1 -1
- package/dist/node_modules/posthog-js/dist/module.js +2055 -1929
- package/dist/node_modules/posthog-js/dist/module.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js +43 -62
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js +12 -6
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +352 -310
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +34 -33
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +3 -2
- package/dist/routes/app-settings.d.ts +2 -1
- package/dist/routes/browser-tab.d.ts +1 -1
- package/dist/routes/changes-tab.d.ts +2 -1
- package/dist/routes/commits-tab.d.ts +1 -1
- package/dist/routes/conversation.d.ts +2 -1
- package/dist/routes/files-tab.d.ts +1 -1
- package/dist/routes/llm-settings.d.ts +3 -2
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.d.ts +2 -1
- package/dist/routes/mcp.js +1 -1
- package/dist/routes/mcp.js.map +1 -1
- package/dist/routes/planner-tab.d.ts +2 -1
- package/dist/routes/secrets-settings.d.ts +2 -1
- package/dist/routes/task-list-tab.d.ts +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +3 -7
- package/dist/services/settings.js.map +1 -1
- package/dist/types/automation.d.ts +16 -1
- package/dist/types/mcp-auth.cjs.map +1 -1
- package/dist/types/mcp-auth.d.ts +5 -41
- package/dist/types/mcp-auth.js.map +1 -1
- package/dist/types/mcp-server.d.ts +17 -32
- package/dist/types/settings.d.ts +8 -28
- package/dist/ui/card-title.d.ts +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/combobox-caret.d.ts +3 -3
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.cjs.map +1 -1
- package/dist/ui/context-menu.d.ts +3 -2
- package/dist/ui/context-menu.js +10 -9
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/divider.d.ts +1 -1
- package/dist/ui/dropdown/clear-button.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-input.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown/dropdown.d.ts +1 -1
- package/dist/ui/dropdown/loading-spinner.d.ts +1 -1
- package/dist/ui/dropdown/toggle-button.d.ts +1 -1
- package/dist/ui/help-link.d.ts +1 -1
- package/dist/ui/pre.d.ts +1 -1
- package/dist/ui/toggle-switch.d.ts +2 -2
- package/dist/ui/typography.d.ts +7 -7
- package/dist/utils/automation-activity-log-export.d.ts +17 -0
- package/dist/utils/automation-timeout.d.ts +4 -6
- package/dist/utils/custom-toast-handlers.d.ts +2 -2
- package/dist/utils/format-relative-time.d.ts +3 -0
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.d.ts +12 -29
- package/dist/utils/mcp-config.js +161 -143
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-installed-servers.cjs +1 -1
- package/dist/utils/mcp-installed-servers.cjs.map +1 -1
- package/dist/utils/mcp-installed-servers.d.ts +2 -2
- package/dist/utils/mcp-installed-servers.js +21 -32
- package/dist/utils/mcp-installed-servers.js.map +1 -1
- package/dist/utils/mcp-server-health-key.cjs.map +1 -1
- package/dist/utils/mcp-server-health-key.d.ts +2 -4
- package/dist/utils/mcp-server-health-key.js.map +1 -1
- package/dist/utils/settings-like-page-layout-classes.cjs +1 -1
- package/dist/utils/settings-like-page-layout-classes.cjs.map +1 -1
- package/dist/utils/settings-like-page-layout-classes.d.ts +6 -2
- package/dist/utils/settings-like-page-layout-classes.js +1 -1
- package/dist/utils/settings-like-page-layout-classes.js.map +1 -1
- package/dist/utils/skill-category.d.ts +12 -0
- package/package.json +36 -33
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +2 -2
- package/scripts/dev-with-automation.mjs +3 -2
- package/build/assets/Trans-Bwpzk1wT.js +0 -1
- package/build/assets/active-backend-context-BiwzkzDy.js +0 -2
- package/build/assets/agent-context-settings-DXNT_dcw.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CYSWw-2g.js +0 -41
- package/build/assets/agent-settings-BjgQQe-_.js +0 -1
- package/build/assets/alert-banner-DR8EVyZM.js +0 -1
- package/build/assets/api-error-message-e16L1kwH.js +0 -1
- package/build/assets/automation-detail-DY6x2FW1.js +0 -2
- package/build/assets/automation-export-C09f-Lua.js +0 -2
- package/build/assets/automation-setup-route-CqKp0717.js +0 -1
- package/build/assets/automations-list-CqWJ7qXW.js +0 -1
- package/build/assets/check-CPLXgluF.js +0 -1
- package/build/assets/chevron-down-CP4QHvyc.js +0 -1
- package/build/assets/circle-check-Dpy2_xSI.js +0 -1
- package/build/assets/command-menu-Bj6X4ckE.js +0 -1
- package/build/assets/condenser-settings-EAXQNR2E.js +0 -1
- package/build/assets/context-menu-list-item-CrCrYuPF.js +0 -1
- package/build/assets/conversation-BzyIcSwr.js +0 -1
- package/build/assets/conversation-panel-BzyIcSwr.js +0 -1
- package/build/assets/entry.client-BbIYOsIg.js +0 -2
- package/build/assets/enum-filter-dropdown-C08-srev.js +0 -1
- package/build/assets/files-tab-DEq8MbHu.js +0 -1
- package/build/assets/format-time-delta-CxfPJpzC.js +0 -1
- package/build/assets/git-repo-dropdown-9WKINV6J.js +0 -1
- package/build/assets/home-CY0JaxiY.js +0 -1
- package/build/assets/home-CaNWlVvB.js +0 -1
- package/build/assets/index-home-CaNWlVvB.js +0 -1
- package/build/assets/info-CmWQXtRQ.js +0 -1
- package/build/assets/install-server-modal-BWrudmZU.js +0 -1
- package/build/assets/llm-not-configured-banner-3tMsM4K6.js +0 -27
- package/build/assets/llm-settings-D0W8mJDk.js +0 -1
- package/build/assets/loader-circle-B4QDBARx.js +0 -1
- package/build/assets/manifest-39f4789d.js +0 -1
- package/build/assets/mcp-DXG9LWrI.js +0 -9
- package/build/assets/mcp-marketplace-utils-DFmhKc5s.js +0 -1
- package/build/assets/messages-kBjKaAeA.js +0 -40
- package/build/assets/navigation-link-Bxmn-pCs.js +0 -1
- package/build/assets/onboarding-47hh2IHA.js +0 -1
- package/build/assets/onboarding-modal-9BuvvROo.js +0 -1
- package/build/assets/plus-DrKuuvMe.js +0 -1
- package/build/assets/recommended-automations-launcher-ejxy1P27.js +0 -1
- package/build/assets/root-5S-M8SYa.js +0 -2
- package/build/assets/root-DZ39lS5f.css +0 -1
- package/build/assets/root-layout-BPqoa0gv.js +0 -3
- package/build/assets/search-Dc2qR4O2.js +0 -1
- package/build/assets/settings-Chfn5xTD.js +0 -1
- package/build/assets/settings-like-page-layout-classes-DyxyJ0k4.js +0 -1
- package/build/assets/settings-service.api-CZiPD8__.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-ND-hgygu.js +0 -1
- package/build/assets/skills-settings-B43KArIz.js +0 -2
- package/build/assets/use-is-authed-BT7Iud4U.js +0 -1
- package/build/assets/use-llm-profiles-2Wc2db8u.js +0 -1
- package/build/assets/use-save-agent-profile-D0wC5ExW.js +0 -1
- package/build/assets/use-skills-CE6miQ3r.js +0 -1
- package/build/assets/use-tracking-BGboadaZ.js +0 -68
- package/build/assets/useQuery-DiPh8LRJ.js +0 -1
- package/build/assets/utils-BgGG1znF.js +0 -1
- package/build/assets/v4-DDdyfk2q.js +0 -1
- package/build/assets/vendor~browser-IVYgIgG1.js +0 -47
- package/build/assets/vendor~entry.client-CXM9oiAk.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~d4by102p-C2f0ZhS-.js +0 -26
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js +0 -1
- package/build/assets/vendor~module-BZXjBMvd.js +0 -2
- package/build/assets/x-omAzpXkl.js +0 -1
- package/dist/components/features/skills/skill-type-filter.d.ts +0 -3
- package/dist/components/features/skills/skills-type-filter-dropdown.d.ts +0 -7
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs +0 -2
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs.map +0 -1
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +0 -81
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map +0 -1
- package/dist/node_modules/void-elements/index.cjs +0 -2
- package/dist/node_modules/void-elements/index.cjs.map +0 -1
- package/dist/node_modules/void-elements/index.js +0 -25
- package/dist/node_modules/void-elements/index.js.map +0 -1
- /package/build/assets/{vendor~root-layout~index-home~home~mcp~automations-list~automation-setup-route~onboarding-modal-D7IDevqN.js → vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../i18next/dist/esm/i18next.cjs"),t=require("../../../html-parse-stringify/dist/html-parse-stringify.
|
|
1
|
+
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../i18next/dist/esm/i18next.cjs"),t=require("../../../html-parse-stringify/dist/esm/html-parse-stringify.cjs"),n=require("./utils.cjs"),r=require("./unescape.cjs"),i=require("./defaults.cjs"),a=require("./i18nInstance.cjs");let o=require("react");var s=(e,t)=>{if(!e)return!1;let n=e.props?.children??e.children;return t?n.length>0:!!n},c=e=>{if(!e)return[];let t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?u(t):t},l=e=>Array.isArray(e)&&e.every(o.isValidElement),u=e=>Array.isArray(e)?e:[e],d=(e,t)=>{let n={...t};return n.props={...t.props,...e.props},n},f=e=>{let t={};if(!e)return t;let r=e=>{u(e).forEach(e=>{n.isString(e)||(s(e)?r(c(e)):n.isObject(e)&&!(0,o.isValidElement)(e)&&Object.assign(t,e))})};return r(e),t},p=(e,t,r,i)=>{if(!e)return``;let a=``,s=u(e),c=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return s.forEach((e,s)=>{if(n.isString(e)){a+=`${e}`;return}if((0,o.isValidElement)(e)){let{props:o,type:l}=e,u=Object.keys(o).length,d=c.indexOf(l)>-1,f=o.children;if(!f&&d&&!u){a+=`<${l}/>`;return}if(!f&&(!d||u)||o.i18nIsDynamicList){a+=`<${s}></${s}>`;return}if(d&&u<=1){let e=n.isString(f)?f:p(f,t,r,i);a+=`<${l}>${e}</${l}>`;return}let m=p(f,t,r,i);a+=`<${s}>${m}</${s}>`;return}if(e===null){n.warn(r,`TRANS_NULL_VALUE`,`Passed in a null value as child`,{i18nKey:i});return}if(n.isObject(e)){let{format:t,...o}=e,s=Object.keys(o);if(s.length===1){let e=t?`${s[0]}, ${t}`:s[0];a+=`{{${e}}}`;return}n.warn(r,`TRANS_INVALID_OBJ`,`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,{i18nKey:i,child:e});return}n.warn(r,`TRANS_INVALID_VAR`,`Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`,{i18nKey:i,child:e})}),a},m=(e,a,f,p,m,h,g)=>{if(f===``)return[];let _=m.transKeepBasicHtmlNodesFor||[],v=f&&new RegExp(_.map(e=>`<${e}`).join(`|`)).test(f);if(!e&&!a&&!v&&!g)return[f];let y=a??{},b=e=>{u(e).forEach(e=>{n.isString(e)||(s(e)?b(c(e)):n.isObject(e)&&!(0,o.isValidElement)(e)&&Object.assign(y,e))})};b(e);let x=Object.keys(y),S=t.index.parse(`<0>${f}</0>`,{allowedTags:e=>/^\d+$/.test(e)||_.indexOf(e)>-1||x.indexOf(e)>-1}),C={...y,...h},w=(e,t,n)=>{let r=c(e),i=E(r,t.children,n);return l(r)&&i.length===0||e.props?.i18nIsDynamicList?r:i},T=(e,t,n,r,i)=>{e.dummy?(e.children=t,n.push((0,o.cloneElement)(e,{key:r},i?void 0:t))):n.push(...o.Children.map([e],e=>{if(e.type===o.Fragment||e.props?.i18nIsDynamicList!==void 0){let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`children`||t===`i18nIsDynamicList`||(n[t]=e.props[t])}),(0,o.createElement)(e.type,n,i?null:t)}let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`ref`||t===`children`||(n[t]=e.props[t])}),(0,o.cloneElement)(e,n,i?null:t)}))},E=(e,t,l)=>{let f=u(e),h=u(t),y={};return h.reduce((e,t,h)=>{let b=t.children?.[0]?.content&&p.services.interpolator.interpolate(t.children[0].content,C,p.language);if(t.type===`tag`){let i=f[parseInt(t.name,10)];!i&&a&&(i=a[t.name]),l.length===1&&!i&&(i=l[0][t.name]),i||={};let x={...t.attrs};g&&Object.keys(x).forEach(e=>{let t=x[e];n.isString(t)&&(x[e]=r.unescape(t))});let S=Object.keys(x).length===0?i:d({props:x},i),D=(0,o.isValidElement)(S),O=D&&s(t,!0)&&!t.voidElement,k=v&&n.isObject(S)&&S.dummy&&!D,A=n.isObject(a)&&Object.hasOwnProperty.call(a,t.name);if(n.isString(S)){let t=p.services.interpolator.interpolate(S,C,p.language);e.push(t)}else if(s(S)||O)T(S,w(S,t,l),e,h);else if(k)T(S,E(f,t.children,l),e,h);else if(Number.isNaN(parseFloat(t.name)))if(A)T(S,w(S,t,l),e,h,t.voidElement);else if(m.transSupportBasicHtmlNodes&&_.indexOf(t.name)>-1)if(t.voidElement)e.push((0,o.createElement)(t.name,{key:`${t.name}-${h}`}));else{let n=y[t.name]||0;y[t.name]=n+1;let r,i=0;for(let e=0;e<f.length;e+=1){let a=f[e];if((0,o.isValidElement)(a)&&a.type===t.name){if(i===n){r=a;break}i+=1}}let a=E(r?u(c(r)):f,t.children,l);e.push((0,o.createElement)(t.name,{key:`${t.name}-${h}`},a))}else if(t.voidElement)e.push(`<${t.name} />`);else{let n=E(f,t.children,l);e.push(`<${t.name}>${n}</${t.name}>`)}else if(n.isObject(S)&&!D){let n=t.children[0]?b:null;n&&e.push(n)}else T(S,b,e,h,t.children.length!==1||!b)}else if(t.type===`text`){let n=m.transWrapTextNodes,r=typeof m.unescape==`function`?m.unescape:i.getDefaults().unescape,a=g?r(p.services.interpolator.interpolate(t.content,C,p.language)):p.services.interpolator.interpolate(t.content,C,p.language);n?e.push((0,o.createElement)(n,{key:`${t.name}-${h}`},a)):e.push(a)}return e},[])};return c(E([{dummy:!0,children:e||[]}],S,u(e||[]))[0])},h=(e,t,n)=>{let r=e.key||t,i=(0,o.cloneElement)(e,{key:r});if(!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return i;function a(){return(0,o.createElement)(o.Fragment,null,i)}return(0,o.createElement)(a,{key:r})},g=(e,t)=>e.map((e,n)=>h(e,n,t)),_=(e,t)=>{let n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:h(e[r],r,t)})}),n},v=(e,t,r,i)=>e?Array.isArray(e)?g(e,t):n.isObject(e)?_(e,t):(n.warnOnce(r,`TRANS_INVALID_COMPONENTS`,`<Trans /> "components" prop expects an object or array`,{i18nKey:i}),null):null,y=e=>!n.isObject(e)||Array.isArray(e)?!1:Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function b({children:t,count:r,parent:s,i18nKey:c,context:l,tOptions:u={},values:d,defaults:h,components:g,ns:_,i18n:b,t:x,shouldUnescape:S,...C}){let w=b||a.getI18n();if(!w)return n.warnOnce(w,`NO_I18NEXT_INSTANCE`,`Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`,{i18nKey:c}),t;let T=x||w.t.bind(w)||(e=>e),E={...i.getDefaults(),...w.options?.react},D=_||T.ns||w.options?.defaultNS;D=n.isString(D)?[D]:D||[`translation`];let{transDefaultProps:O}=E,k=O?.tOptions?{...O.tOptions,...u}:u,A=S??O?.shouldUnescape,j=O?.values?{...O.values,...d}:d,M=O?.components?{...O.components,...g}:g,N=p(t,E,w,c),P=h||k?.defaultValue||N||E.transEmptyNodeValue||(typeof c==`function`?e.keysFromSelector(c):c),{hashTransKey:F}=E,I=c||(F?F(N||P):N||P);d=w.options?.interpolation?.defaultVariables?j&&Object.keys(j).length>0?{...j,...w.options.interpolation.defaultVariables}:{...w.options.interpolation.defaultVariables}:j;let L=f(t);L&&typeof L.count==`number`&&r===void 0&&(r=L.count);let R=d||r!==void 0&&!w.options?.interpolation?.alwaysFormat||!t?k.interpolation:{interpolation:{...k.interpolation,prefix:`#$?`,suffix:`?$#`}},z={...k,context:l||k.context,count:r,...d,...R,defaultValue:P,ns:D},B=I?T(I,z):P;B===I&&P&&(B=P);let V=v(M,B,w,c),H=V||t,U=null;y(V)&&(U=V,H=t);let W=m(H,U,B,w,E,z,A),G=s??E.defaultTransParent;return G?(0,o.createElement)(G,C,W):W}exports.Trans=b,exports.nodesToString=p;
|
|
2
2
|
//# sourceMappingURL=TransWithoutContext.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransWithoutContext.cjs","names":["isValidElement","isString","isObject","HTML","Children","Fragment","unescape","getDefaults","getI18n","keyFromSelector"],"sources":["../../../../../node_modules/react-i18next/dist/es/TransWithoutContext.js"],"sourcesContent":["import { Fragment, isValidElement, cloneElement, createElement, Children } from 'react';\nimport { keyFromSelector } from 'i18next';\nimport HTML from 'html-parse-stringify';\nimport { isObject, isString, warn, warnOnce } from './utils.js';\nimport { getDefaults } from './defaults.js';\nimport { getI18n } from './i18nInstance.js';\nimport { unescape } from './unescape.js';\nconst hasChildren = (node, checkLength) => {\n if (!node) return false;\n const base = node.props?.children ?? node.children;\n if (checkLength) return base.length > 0;\n return !!base;\n};\nconst getChildren = node => {\n if (!node) return [];\n const children = node.props?.children ?? node.children;\n return node.props?.i18nIsDynamicList ? getAsArray(children) : children;\n};\nconst hasValidReactChildren = children => Array.isArray(children) && children.every(isValidElement);\nconst getAsArray = data => Array.isArray(data) ? data : [data];\nconst mergeProps = (source, target) => {\n const newTarget = {\n ...target\n };\n newTarget.props = {\n ...target.props,\n ...source.props\n };\n return newTarget;\n};\nconst getValuesFromChildren = children => {\n const values = {};\n if (!children) return values;\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(values, child);\n });\n };\n getData(children);\n return values;\n};\nexport const nodesToString = (children, i18nOptions, i18n, i18nKey) => {\n if (!children) return '';\n let stringNode = '';\n const childrenArray = getAsArray(children);\n const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];\n childrenArray.forEach((child, childIndex) => {\n if (isString(child)) {\n stringNode += `${child}`;\n return;\n }\n if (isValidElement(child)) {\n const {\n props,\n type\n } = child;\n const childPropsCount = Object.keys(props).length;\n const shouldKeepChild = keepArray.indexOf(type) > -1;\n const childChildren = props.children;\n if (!childChildren && shouldKeepChild && !childPropsCount) {\n stringNode += `<${type}/>`;\n return;\n }\n if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {\n stringNode += `<${childIndex}></${childIndex}>`;\n return;\n }\n if (shouldKeepChild && childPropsCount <= 1) {\n const cnt = isString(childChildren) ? childChildren : nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${type}>${cnt}</${type}>`;\n return;\n }\n const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${childIndex}>${content}</${childIndex}>`;\n return;\n }\n if (child === null) {\n warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {\n i18nKey\n });\n return;\n }\n if (isObject(child)) {\n const {\n format,\n ...clone\n } = child;\n const keys = Object.keys(clone);\n if (keys.length === 1) {\n const value = format ? `${keys[0]}, ${format}` : keys[0];\n stringNode += `{{${value}}}`;\n return;\n }\n warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {\n i18nKey,\n child\n });\n return;\n }\n warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {\n i18nKey,\n child\n });\n });\n return stringNode;\n};\nconst escapeLiteralLessThan = (str, keepArray = [], knownComponentsMap = {}) => {\n if (!str) return str;\n const knownNames = Object.keys(knownComponentsMap);\n const allValidNames = [...keepArray, ...knownNames];\n let result = '';\n let i = 0;\n while (i < str.length) {\n if (str[i] === '<') {\n let isValidTag = false;\n const closingMatch = str.slice(i).match(/^<\\/(\\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);\n if (closingMatch) {\n const tagName = closingMatch[1];\n if (/^\\d+$/.test(tagName) || allValidNames.includes(tagName)) {\n isValidTag = true;\n result += closingMatch[0];\n i += closingMatch[0].length;\n }\n }\n if (!isValidTag) {\n const openingMatch = str.slice(i).match(/^<(\\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\\s+[\\w-]+(?:=(?:\"[^\"]*\"|'[^']*'|[^\\s>]+))?)*\\s*(\\/)?>/);\n if (openingMatch) {\n const tagName = openingMatch[1];\n if (/^\\d+$/.test(tagName) || allValidNames.includes(tagName)) {\n isValidTag = true;\n result += openingMatch[0];\n i += openingMatch[0].length;\n }\n }\n }\n if (!isValidTag) {\n result += '<';\n i += 1;\n }\n } else {\n result += str[i];\n i += 1;\n }\n }\n return result;\n};\nconst renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {\n if (targetString === '') return [];\n const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];\n const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);\n if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];\n const data = knownComponentsMap ?? {};\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);\n });\n };\n getData(children);\n const escapedString = escapeLiteralLessThan(targetString, keepArray, data);\n const ast = HTML.parse(`<0>${escapedString}</0>`);\n const opts = {\n ...data,\n ...combinedTOpts\n };\n const renderInner = (child, node, rootReactNode) => {\n const childs = getChildren(child);\n const mappedChildren = mapAST(childs, node.children, rootReactNode);\n return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;\n };\n const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {\n if (child.dummy) {\n child.children = inner;\n mem.push(cloneElement(child, {\n key: i\n }, isVoid ? undefined : inner));\n } else {\n mem.push(...Children.map([child], c => {\n if (c.type === Fragment || c.props?.i18nIsDynamicList !== undefined) {\n const freshProps = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'children' || k === 'i18nIsDynamicList') return;\n freshProps[k] = c.props[k];\n });\n }\n return createElement(c.type, freshProps, isVoid ? null : inner);\n }\n const override = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'ref' || k === 'children') return;\n override[k] = c.props[k];\n });\n }\n return cloneElement(c, override, isVoid ? null : inner);\n }));\n }\n };\n const mapAST = (reactNode, astNode, rootReactNode) => {\n const reactNodes = getAsArray(reactNode);\n const astNodes = getAsArray(astNode);\n const keepTagOccurrence = {};\n return astNodes.reduce((mem, node, i) => {\n const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);\n if (node.type === 'tag') {\n let tmp = reactNodes[parseInt(node.name, 10)];\n if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];\n if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];\n if (!tmp) tmp = {};\n const props = {\n ...node.attrs\n };\n if (shouldUnescape) {\n Object.keys(props).forEach(p => {\n const val = props[p];\n if (isString(val)) {\n props[p] = unescape(val);\n }\n });\n }\n const child = Object.keys(props).length !== 0 ? mergeProps({\n props\n }, tmp) : tmp;\n const isElement = isValidElement(child);\n const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;\n const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;\n const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);\n if (isString(child)) {\n const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);\n mem.push(value);\n } else if (hasChildren(child) || isValidTranslationWithChildren) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (isEmptyTransWithHTML) {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (Number.isNaN(parseFloat(node.name))) {\n if (isKnownComponent) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i, node.voidElement);\n } else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {\n if (node.voidElement) {\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }));\n } else {\n const occurrence = keepTagOccurrence[node.name] || 0;\n keepTagOccurrence[node.name] = occurrence + 1;\n let matched;\n let seen = 0;\n for (let r = 0; r < reactNodes.length; r += 1) {\n const rn = reactNodes[r];\n if (isValidElement(rn) && rn.type === node.name) {\n if (seen === occurrence) {\n matched = rn;\n break;\n }\n seen += 1;\n }\n }\n const innerScope = matched ? getAsArray(getChildren(matched)) : reactNodes;\n const inner = mapAST(innerScope, node.children, rootReactNode);\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }, inner));\n }\n } else if (node.voidElement) {\n mem.push(`<${node.name} />`);\n } else {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n mem.push(`<${node.name}>${inner}</${node.name}>`);\n }\n } else if (isObject(child) && !isElement) {\n const content = node.children[0] ? translationContent : null;\n if (content) mem.push(content);\n } else {\n pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);\n }\n } else if (node.type === 'text') {\n const wrapTextNodes = i18nOptions.transWrapTextNodes;\n const unescapeFn = typeof i18nOptions.unescape === 'function' ? i18nOptions.unescape : getDefaults().unescape;\n const content = shouldUnescape ? unescapeFn(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);\n if (wrapTextNodes) {\n mem.push(createElement(wrapTextNodes, {\n key: `${node.name}-${i}`\n }, content));\n } else {\n mem.push(content);\n }\n }\n return mem;\n }, []);\n };\n const result = mapAST([{\n dummy: true,\n children: children || []\n }], ast, getAsArray(children || []));\n return getChildren(result[0]);\n};\nconst fixComponentProps = (component, index, translation) => {\n const componentKey = component.key || index;\n const comp = cloneElement(component, {\n key: componentKey\n });\n if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {\n return comp;\n }\n function Componentized() {\n return createElement(Fragment, null, comp);\n }\n return createElement(Componentized, {\n key: componentKey\n });\n};\nconst generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));\nconst generateObjectComponents = (components, translation) => {\n const componentMap = {};\n Object.keys(components).forEach(c => {\n Object.assign(componentMap, {\n [c]: fixComponentProps(components[c], c, translation)\n });\n });\n return componentMap;\n};\nconst generateComponents = (components, translation, i18n, i18nKey) => {\n if (!components) return null;\n if (Array.isArray(components)) {\n return generateArrayComponents(components, translation);\n }\n if (isObject(components)) {\n return generateObjectComponents(components, translation);\n }\n warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> \"components\" prop expects an object or array`, {\n i18nKey\n });\n return null;\n};\nconst isComponentsMap = object => {\n if (!isObject(object)) return false;\n if (Array.isArray(object)) return false;\n return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);\n};\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const i18n = i18nFromProps || getI18n();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using i18nextReactModule`, {\n i18nKey\n });\n return children;\n }\n const t = tFromProps || i18n.t.bind(i18n) || (k => k);\n const reactI18nextOptions = {\n ...getDefaults(),\n ...i18n.options?.react\n };\n let namespaces = ns || t.ns || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n const {\n transDefaultProps\n } = reactI18nextOptions;\n const mergedTOptions = transDefaultProps?.tOptions ? {\n ...transDefaultProps.tOptions,\n ...tOptions\n } : tOptions;\n const mergedShouldUnescape = shouldUnescape ?? transDefaultProps?.shouldUnescape;\n const mergedValues = transDefaultProps?.values ? {\n ...transDefaultProps.values,\n ...values\n } : values;\n const mergedComponents = transDefaultProps?.components ? {\n ...transDefaultProps.components,\n ...components\n } : components;\n const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);\n const defaultValue = defaults || mergedTOptions?.defaultValue || nodeAsString || reactI18nextOptions.transEmptyNodeValue || (typeof i18nKey === 'function' ? keyFromSelector(i18nKey) : i18nKey);\n const {\n hashTransKey\n } = reactI18nextOptions;\n const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);\n if (i18n.options?.interpolation?.defaultVariables) {\n values = mergedValues && Object.keys(mergedValues).length > 0 ? {\n ...mergedValues,\n ...i18n.options.interpolation.defaultVariables\n } : {\n ...i18n.options.interpolation.defaultVariables\n };\n } else {\n values = mergedValues;\n }\n const valuesFromChildren = getValuesFromChildren(children);\n if (valuesFromChildren && typeof valuesFromChildren.count === 'number' && count === undefined) {\n count = valuesFromChildren.count;\n }\n const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? mergedTOptions.interpolation : {\n interpolation: {\n ...mergedTOptions.interpolation,\n prefix: '#$?',\n suffix: '?$#'\n }\n };\n const combinedTOpts = {\n ...mergedTOptions,\n context: context || mergedTOptions.context,\n count,\n ...values,\n ...interpolationOverride,\n defaultValue,\n ns: namespaces\n };\n let translation = key ? t(key, combinedTOpts) : defaultValue;\n if (translation === key && defaultValue) translation = defaultValue;\n const generatedComponents = generateComponents(mergedComponents, translation, i18n, i18nKey);\n let indexedChildren = generatedComponents || children;\n let componentsMap = null;\n if (isComponentsMap(generatedComponents)) {\n componentsMap = generatedComponents;\n indexedChildren = children;\n }\n const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, mergedShouldUnescape);\n const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;\n return useAsParent ? createElement(useAsParent, additionalProps, content) : content;\n}"],"x_google_ignoreList":[0],"mappings":"uUAOA,IAAM,GAAe,EAAM,IAAgB,CACzC,GAAI,CAAC,EAAM,MAAO,GAClB,IAAM,EAAO,EAAK,OAAO,UAAY,EAAK,SAE1C,OADI,EAAoB,EAAK,OAAS,EAC/B,CAAC,CAAC,CACX,EACM,EAAc,GAAQ,CAC1B,GAAI,CAAC,EAAM,MAAO,CAAC,EACnB,IAAM,EAAW,EAAK,OAAO,UAAY,EAAK,SAC9C,OAAO,EAAK,OAAO,kBAAoB,EAAW,CAAQ,EAAI,CAChE,EACM,EAAwB,GAAY,MAAM,QAAQ,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c,gBAChC,EAES,EAEX,IAAM,EAAqB,EAAsB,CAAQ,EACrD,GAAsB,OAAO,EAAmB,OAAU,UAAY,IAAU,IAAA,KAClF,EAAQ,EAAmB,OAE7B,IAAM,EAAwB,GAAU,IAAU,IAAA,IAAa,CAAC,EAAK,SAAS,eAAe,cAAgB,CAAC,EAAW,EAAe,cAAgB,CACtJ,cAAe,CACb,GAAG,EAAe,cAClB,OAAQ,MACR,OAAQ,KACV,CACF,EACM,EAAgB,CACpB,GAAG,EACH,QAAS,GAAW,EAAe,QACnC,QACA,GAAG,EACH,GAAG,EACH,eACA,GAAI,CACN,EACI,EAAc,EAAM,EAAE,EAAK,CAAa,EAAI,EAC5C,IAAgB,GAAO,IAAc,EAAc,GACvD,IAAM,EAAsB,EAAmB,EAAkB,EAAa,EAAM,CAAO,EACvF,EAAkB,GAAuB,EACzC,EAAgB,KAChB,EAAgB,CAAmB,IACrC,EAAgB,EAChB,EAAkB,GAEpB,IAAM,EAAU,EAAY,EAAiB,EAAe,EAAa,EAAM,EAAqB,EAAe,CAAoB,EACjI,EAAc,GAAU,EAAoB,mBAClD,OAAO,GAAA,EAAA,EAAA,eAA4B,EAAa,EAAiB,CAAO,EAAI,CAC9E"}
|
|
1
|
+
{"version":3,"file":"TransWithoutContext.cjs","names":["isValidElement","isString","isObject","HTML","Children","Fragment","unescape","getDefaults","getI18n","keyFromSelector"],"sources":["../../../../../node_modules/react-i18next/dist/es/TransWithoutContext.js"],"sourcesContent":["import { Fragment, isValidElement, cloneElement, createElement, Children } from 'react';\nimport { keyFromSelector } from 'i18next';\nimport HTML from 'html-parse-stringify';\nimport { isObject, isString, warn, warnOnce } from './utils.js';\nimport { getDefaults } from './defaults.js';\nimport { getI18n } from './i18nInstance.js';\nimport { unescape } from './unescape.js';\nconst hasChildren = (node, checkLength) => {\n if (!node) return false;\n const base = node.props?.children ?? node.children;\n if (checkLength) return base.length > 0;\n return !!base;\n};\nconst getChildren = node => {\n if (!node) return [];\n const children = node.props?.children ?? node.children;\n return node.props?.i18nIsDynamicList ? getAsArray(children) : children;\n};\nconst hasValidReactChildren = children => Array.isArray(children) && children.every(isValidElement);\nconst getAsArray = data => Array.isArray(data) ? data : [data];\nconst mergeProps = (source, target) => {\n const newTarget = {\n ...target\n };\n newTarget.props = {\n ...target.props,\n ...source.props\n };\n return newTarget;\n};\nconst getValuesFromChildren = children => {\n const values = {};\n if (!children) return values;\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(values, child);\n });\n };\n getData(children);\n return values;\n};\nexport const nodesToString = (children, i18nOptions, i18n, i18nKey) => {\n if (!children) return '';\n let stringNode = '';\n const childrenArray = getAsArray(children);\n const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];\n childrenArray.forEach((child, childIndex) => {\n if (isString(child)) {\n stringNode += `${child}`;\n return;\n }\n if (isValidElement(child)) {\n const {\n props,\n type\n } = child;\n const childPropsCount = Object.keys(props).length;\n const shouldKeepChild = keepArray.indexOf(type) > -1;\n const childChildren = props.children;\n if (!childChildren && shouldKeepChild && !childPropsCount) {\n stringNode += `<${type}/>`;\n return;\n }\n if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {\n stringNode += `<${childIndex}></${childIndex}>`;\n return;\n }\n if (shouldKeepChild && childPropsCount <= 1) {\n const cnt = isString(childChildren) ? childChildren : nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${type}>${cnt}</${type}>`;\n return;\n }\n const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${childIndex}>${content}</${childIndex}>`;\n return;\n }\n if (child === null) {\n warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {\n i18nKey\n });\n return;\n }\n if (isObject(child)) {\n const {\n format,\n ...clone\n } = child;\n const keys = Object.keys(clone);\n if (keys.length === 1) {\n const value = format ? `${keys[0]}, ${format}` : keys[0];\n stringNode += `{{${value}}}`;\n return;\n }\n warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {\n i18nKey,\n child\n });\n return;\n }\n warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {\n i18nKey,\n child\n });\n });\n return stringNode;\n};\nconst renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {\n if (targetString === '') return [];\n const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];\n const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);\n if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];\n const data = knownComponentsMap ?? {};\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);\n });\n };\n getData(children);\n const knownNames = Object.keys(data);\n const allowedTags = name => /^\\d+$/.test(name) || keepArray.indexOf(name) > -1 || knownNames.indexOf(name) > -1;\n const ast = HTML.parse(`<0>${targetString}</0>`, {\n allowedTags\n });\n const opts = {\n ...data,\n ...combinedTOpts\n };\n const renderInner = (child, node, rootReactNode) => {\n const childs = getChildren(child);\n const mappedChildren = mapAST(childs, node.children, rootReactNode);\n return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;\n };\n const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {\n if (child.dummy) {\n child.children = inner;\n mem.push(cloneElement(child, {\n key: i\n }, isVoid ? undefined : inner));\n } else {\n mem.push(...Children.map([child], c => {\n if (c.type === Fragment || c.props?.i18nIsDynamicList !== undefined) {\n const freshProps = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'children' || k === 'i18nIsDynamicList') return;\n freshProps[k] = c.props[k];\n });\n }\n return createElement(c.type, freshProps, isVoid ? null : inner);\n }\n const override = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'ref' || k === 'children') return;\n override[k] = c.props[k];\n });\n }\n return cloneElement(c, override, isVoid ? null : inner);\n }));\n }\n };\n const mapAST = (reactNode, astNode, rootReactNode) => {\n const reactNodes = getAsArray(reactNode);\n const astNodes = getAsArray(astNode);\n const keepTagOccurrence = {};\n return astNodes.reduce((mem, node, i) => {\n const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);\n if (node.type === 'tag') {\n let tmp = reactNodes[parseInt(node.name, 10)];\n if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];\n if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];\n if (!tmp) tmp = {};\n const props = {\n ...node.attrs\n };\n if (shouldUnescape) {\n Object.keys(props).forEach(p => {\n const val = props[p];\n if (isString(val)) {\n props[p] = unescape(val);\n }\n });\n }\n const child = Object.keys(props).length !== 0 ? mergeProps({\n props\n }, tmp) : tmp;\n const isElement = isValidElement(child);\n const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;\n const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;\n const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);\n if (isString(child)) {\n const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);\n mem.push(value);\n } else if (hasChildren(child) || isValidTranslationWithChildren) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (isEmptyTransWithHTML) {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (Number.isNaN(parseFloat(node.name))) {\n if (isKnownComponent) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i, node.voidElement);\n } else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {\n if (node.voidElement) {\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }));\n } else {\n const occurrence = keepTagOccurrence[node.name] || 0;\n keepTagOccurrence[node.name] = occurrence + 1;\n let matched;\n let seen = 0;\n for (let r = 0; r < reactNodes.length; r += 1) {\n const rn = reactNodes[r];\n if (isValidElement(rn) && rn.type === node.name) {\n if (seen === occurrence) {\n matched = rn;\n break;\n }\n seen += 1;\n }\n }\n const innerScope = matched ? getAsArray(getChildren(matched)) : reactNodes;\n const inner = mapAST(innerScope, node.children, rootReactNode);\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }, inner));\n }\n } else if (node.voidElement) {\n mem.push(`<${node.name} />`);\n } else {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n mem.push(`<${node.name}>${inner}</${node.name}>`);\n }\n } else if (isObject(child) && !isElement) {\n const content = node.children[0] ? translationContent : null;\n if (content) mem.push(content);\n } else {\n pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);\n }\n } else if (node.type === 'text') {\n const wrapTextNodes = i18nOptions.transWrapTextNodes;\n const unescapeFn = typeof i18nOptions.unescape === 'function' ? i18nOptions.unescape : getDefaults().unescape;\n const content = shouldUnescape ? unescapeFn(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);\n if (wrapTextNodes) {\n mem.push(createElement(wrapTextNodes, {\n key: `${node.name}-${i}`\n }, content));\n } else {\n mem.push(content);\n }\n }\n return mem;\n }, []);\n };\n const result = mapAST([{\n dummy: true,\n children: children || []\n }], ast, getAsArray(children || []));\n return getChildren(result[0]);\n};\nconst fixComponentProps = (component, index, translation) => {\n const componentKey = component.key || index;\n const comp = cloneElement(component, {\n key: componentKey\n });\n if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {\n return comp;\n }\n function Componentized() {\n return createElement(Fragment, null, comp);\n }\n return createElement(Componentized, {\n key: componentKey\n });\n};\nconst generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));\nconst generateObjectComponents = (components, translation) => {\n const componentMap = {};\n Object.keys(components).forEach(c => {\n Object.assign(componentMap, {\n [c]: fixComponentProps(components[c], c, translation)\n });\n });\n return componentMap;\n};\nconst generateComponents = (components, translation, i18n, i18nKey) => {\n if (!components) return null;\n if (Array.isArray(components)) {\n return generateArrayComponents(components, translation);\n }\n if (isObject(components)) {\n return generateObjectComponents(components, translation);\n }\n warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> \"components\" prop expects an object or array`, {\n i18nKey\n });\n return null;\n};\nconst isComponentsMap = object => {\n if (!isObject(object)) return false;\n if (Array.isArray(object)) return false;\n return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);\n};\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const i18n = i18nFromProps || getI18n();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`, {\n i18nKey\n });\n return children;\n }\n const t = tFromProps || i18n.t.bind(i18n) || (k => k);\n const reactI18nextOptions = {\n ...getDefaults(),\n ...i18n.options?.react\n };\n let namespaces = ns || t.ns || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n const {\n transDefaultProps\n } = reactI18nextOptions;\n const mergedTOptions = transDefaultProps?.tOptions ? {\n ...transDefaultProps.tOptions,\n ...tOptions\n } : tOptions;\n const mergedShouldUnescape = shouldUnescape ?? transDefaultProps?.shouldUnescape;\n const mergedValues = transDefaultProps?.values ? {\n ...transDefaultProps.values,\n ...values\n } : values;\n const mergedComponents = transDefaultProps?.components ? {\n ...transDefaultProps.components,\n ...components\n } : components;\n const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);\n const defaultValue = defaults || mergedTOptions?.defaultValue || nodeAsString || reactI18nextOptions.transEmptyNodeValue || (typeof i18nKey === 'function' ? keyFromSelector(i18nKey) : i18nKey);\n const {\n hashTransKey\n } = reactI18nextOptions;\n const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);\n if (i18n.options?.interpolation?.defaultVariables) {\n values = mergedValues && Object.keys(mergedValues).length > 0 ? {\n ...mergedValues,\n ...i18n.options.interpolation.defaultVariables\n } : {\n ...i18n.options.interpolation.defaultVariables\n };\n } else {\n values = mergedValues;\n }\n const valuesFromChildren = getValuesFromChildren(children);\n if (valuesFromChildren && typeof valuesFromChildren.count === 'number' && count === undefined) {\n count = valuesFromChildren.count;\n }\n const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? mergedTOptions.interpolation : {\n interpolation: {\n ...mergedTOptions.interpolation,\n prefix: '#$?',\n suffix: '?$#'\n }\n };\n const combinedTOpts = {\n ...mergedTOptions,\n context: context || mergedTOptions.context,\n count,\n ...values,\n ...interpolationOverride,\n defaultValue,\n ns: namespaces\n };\n let translation = key ? t(key, combinedTOpts) : defaultValue;\n if (translation === key && defaultValue) translation = defaultValue;\n const generatedComponents = generateComponents(mergedComponents, translation, i18n, i18nKey);\n let indexedChildren = generatedComponents || children;\n let componentsMap = null;\n if (isComponentsMap(generatedComponents)) {\n componentsMap = generatedComponents;\n indexedChildren = children;\n }\n const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, mergedShouldUnescape);\n const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;\n return useAsParent ? createElement(useAsParent, additionalProps, content) : content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EAAgB,CACpB,GAAG,EACH,QAAS,GAAW,EAAe,QACnC,QACA,GAAG,EACH,GAAG,EACH,eACA,GAAI,CACN,EACI,EAAc,EAAM,EAAE,EAAK,CAAa,EAAI,EAC5C,IAAgB,GAAO,IAAc,EAAc,GACvD,IAAM,EAAsB,EAAmB,EAAkB,EAAa,EAAM,CAAO,EACvF,EAAkB,GAAuB,EACzC,EAAgB,KAChB,EAAgB,CAAmB,IACrC,EAAgB,EAChB,EAAkB,GAEpB,IAAM,EAAU,EAAY,EAAiB,EAAe,EAAa,EAAM,EAAqB,EAAe,CAAoB,EACjI,EAAc,GAAU,EAAoB,mBAClD,OAAO,GAAA,EAAA,EAAA,eAA4B,EAAa,EAAiB,CAAO,EAAI,CAC9E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { keysFromSelector as e } from "../../../i18next/dist/esm/i18next.js";
|
|
2
|
-
import t from "../../../html-parse-stringify/dist/html-parse-stringify.
|
|
2
|
+
import { index as t } from "../../../html-parse-stringify/dist/esm/html-parse-stringify.js";
|
|
3
3
|
import { isObject as n, isString as r, warn as i, warnOnce as a } from "./utils.js";
|
|
4
4
|
import { unescape as o } from "./unescape.js";
|
|
5
5
|
import { getDefaults as s } from "./defaults.js";
|
|
@@ -78,42 +78,23 @@ var m = (e, t) => {
|
|
|
78
78
|
child: e
|
|
79
79
|
});
|
|
80
80
|
}), s;
|
|
81
|
-
}, x = (e,
|
|
82
|
-
if (!e) return e;
|
|
83
|
-
let r = Object.keys(n), i = [...t, ...r], a = "", o = 0;
|
|
84
|
-
for (; o < e.length;) if (e[o] === "<") {
|
|
85
|
-
let t = !1, n = e.slice(o).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);
|
|
86
|
-
if (n) {
|
|
87
|
-
let e = n[1];
|
|
88
|
-
(/^\d+$/.test(e) || i.includes(e)) && (t = !0, a += n[0], o += n[0].length);
|
|
89
|
-
}
|
|
90
|
-
if (!t) {
|
|
91
|
-
let n = e.slice(o).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);
|
|
92
|
-
if (n) {
|
|
93
|
-
let e = n[1];
|
|
94
|
-
(/^\d+$/.test(e) || i.includes(e)) && (t = !0, a += n[0], o += n[0].length);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
t || (a += "<", o += 1);
|
|
98
|
-
} else a += e[o], o += 1;
|
|
99
|
-
return a;
|
|
100
|
-
}, S = (e, i, a, c, y, b, S) => {
|
|
81
|
+
}, x = (e, i, a, c, y, b, x) => {
|
|
101
82
|
if (a === "") return [];
|
|
102
|
-
let
|
|
103
|
-
if (!e && !i && !
|
|
104
|
-
let
|
|
83
|
+
let S = y.transKeepBasicHtmlNodesFor || [], C = a && new RegExp(S.map((e) => `<${e}`).join("|")).test(a);
|
|
84
|
+
if (!e && !i && !C && !x) return [a];
|
|
85
|
+
let w = i ?? {}, T = (e) => {
|
|
105
86
|
_(e).forEach((e) => {
|
|
106
|
-
r(e) || (m(e) ?
|
|
87
|
+
r(e) || (m(e) ? T(h(e)) : n(e) && !p(e) && Object.assign(w, e));
|
|
107
88
|
});
|
|
108
89
|
};
|
|
109
|
-
|
|
110
|
-
let
|
|
111
|
-
...
|
|
90
|
+
T(e);
|
|
91
|
+
let E = Object.keys(w), D = t.parse(`<0>${a}</0>`, { allowedTags: (e) => /^\d+$/.test(e) || S.indexOf(e) > -1 || E.indexOf(e) > -1 }), O = {
|
|
92
|
+
...w,
|
|
112
93
|
...b
|
|
113
|
-
},
|
|
114
|
-
let r = h(e), i =
|
|
94
|
+
}, k = (e, t, n) => {
|
|
95
|
+
let r = h(e), i = j(r, t.children, n);
|
|
115
96
|
return g(r) && i.length === 0 || e.props?.i18nIsDynamicList ? r : i;
|
|
116
|
-
},
|
|
97
|
+
}, A = (e, t, n, r, i) => {
|
|
117
98
|
e.dummy ? (e.children = t, n.push(d(e, { key: r }, i ? void 0 : t))) : n.push(...l.map([e], (e) => {
|
|
118
99
|
if (e.type === u || e.props?.i18nIsDynamicList !== void 0) {
|
|
119
100
|
let n = { key: r };
|
|
@@ -126,26 +107,26 @@ var m = (e, t) => {
|
|
|
126
107
|
t === "ref" || t === "children" || (n[t] = e.props[t]);
|
|
127
108
|
}), d(e, n, i ? null : t);
|
|
128
109
|
}));
|
|
129
|
-
},
|
|
110
|
+
}, j = (e, t, a) => {
|
|
130
111
|
let l = _(e), u = _(t), d = {};
|
|
131
112
|
return u.reduce((e, t, u) => {
|
|
132
|
-
let g = t.children?.[0]?.content && c.services.interpolator.interpolate(t.children[0].content,
|
|
113
|
+
let g = t.children?.[0]?.content && c.services.interpolator.interpolate(t.children[0].content, O, c.language);
|
|
133
114
|
if (t.type === "tag") {
|
|
134
115
|
let s = l[parseInt(t.name, 10)];
|
|
135
116
|
!s && i && (s = i[t.name]), a.length === 1 && !s && (s = a[0][t.name]), s ||= {};
|
|
136
117
|
let b = { ...t.attrs };
|
|
137
|
-
|
|
118
|
+
x && Object.keys(b).forEach((e) => {
|
|
138
119
|
let t = b[e];
|
|
139
120
|
r(t) && (b[e] = o(t));
|
|
140
121
|
});
|
|
141
|
-
let
|
|
142
|
-
if (r(
|
|
143
|
-
let t = c.services.interpolator.interpolate(
|
|
122
|
+
let w = Object.keys(b).length === 0 ? s : v({ props: b }, s), T = p(w), E = T && m(t, !0) && !t.voidElement, D = C && n(w) && w.dummy && !T, M = n(i) && Object.hasOwnProperty.call(i, t.name);
|
|
123
|
+
if (r(w)) {
|
|
124
|
+
let t = c.services.interpolator.interpolate(w, O, c.language);
|
|
144
125
|
e.push(t);
|
|
145
|
-
} else if (m(
|
|
146
|
-
else if (D)
|
|
147
|
-
else if (Number.isNaN(parseFloat(t.name))) if (
|
|
148
|
-
else if (y.transSupportBasicHtmlNodes &&
|
|
126
|
+
} else if (m(w) || E) A(w, k(w, t, a), e, u);
|
|
127
|
+
else if (D) A(w, j(l, t.children, a), e, u);
|
|
128
|
+
else if (Number.isNaN(parseFloat(t.name))) if (M) A(w, k(w, t, a), e, u, t.voidElement);
|
|
129
|
+
else if (y.transSupportBasicHtmlNodes && S.indexOf(t.name) > -1) if (t.voidElement) e.push(f(t.name, { key: `${t.name}-${u}` }));
|
|
149
130
|
else {
|
|
150
131
|
let n = d[t.name] || 0;
|
|
151
132
|
d[t.name] = n + 1;
|
|
@@ -160,51 +141,51 @@ var m = (e, t) => {
|
|
|
160
141
|
i += 1;
|
|
161
142
|
}
|
|
162
143
|
}
|
|
163
|
-
let o =
|
|
144
|
+
let o = j(r ? _(h(r)) : l, t.children, a);
|
|
164
145
|
e.push(f(t.name, { key: `${t.name}-${u}` }, o));
|
|
165
146
|
}
|
|
166
147
|
else if (t.voidElement) e.push(`<${t.name} />`);
|
|
167
148
|
else {
|
|
168
|
-
let n =
|
|
149
|
+
let n = j(l, t.children, a);
|
|
169
150
|
e.push(`<${t.name}>${n}</${t.name}>`);
|
|
170
151
|
}
|
|
171
|
-
else if (n(
|
|
152
|
+
else if (n(w) && !T) {
|
|
172
153
|
let n = t.children[0] ? g : null;
|
|
173
154
|
n && e.push(n);
|
|
174
|
-
} else
|
|
155
|
+
} else A(w, g, e, u, t.children.length !== 1 || !g);
|
|
175
156
|
} else if (t.type === "text") {
|
|
176
|
-
let n = y.transWrapTextNodes, r = typeof y.unescape == "function" ? y.unescape : s().unescape, i =
|
|
157
|
+
let n = y.transWrapTextNodes, r = typeof y.unescape == "function" ? y.unescape : s().unescape, i = x ? r(c.services.interpolator.interpolate(t.content, O, c.language)) : c.services.interpolator.interpolate(t.content, O, c.language);
|
|
177
158
|
n ? e.push(f(n, { key: `${t.name}-${u}` }, i)) : e.push(i);
|
|
178
159
|
}
|
|
179
160
|
return e;
|
|
180
161
|
}, []);
|
|
181
162
|
};
|
|
182
|
-
return h(
|
|
163
|
+
return h(j([{
|
|
183
164
|
dummy: !0,
|
|
184
165
|
children: e || []
|
|
185
|
-
}],
|
|
186
|
-
},
|
|
166
|
+
}], D, _(e || []))[0]);
|
|
167
|
+
}, S = (e, t, n) => {
|
|
187
168
|
let r = e.key || t, i = d(e, { key: r });
|
|
188
169
|
if (!i.props || !i.props.children || n.indexOf(`${t}/>`) < 0 && n.indexOf(`${t} />`) < 0) return i;
|
|
189
170
|
function a() {
|
|
190
171
|
return f(u, null, i);
|
|
191
172
|
}
|
|
192
173
|
return f(a, { key: r });
|
|
193
|
-
},
|
|
174
|
+
}, C = (e, t) => e.map((e, n) => S(e, n, t)), w = (e, t) => {
|
|
194
175
|
let n = {};
|
|
195
176
|
return Object.keys(e).forEach((r) => {
|
|
196
|
-
Object.assign(n, { [r]:
|
|
177
|
+
Object.assign(n, { [r]: S(e[r], r, t) });
|
|
197
178
|
}), n;
|
|
198
|
-
},
|
|
199
|
-
function
|
|
179
|
+
}, T = (e, t, r, i) => e ? Array.isArray(e) ? C(e, t) : n(e) ? w(e, t) : (a(r, "TRANS_INVALID_COMPONENTS", "<Trans /> \"components\" prop expects an object or array", { i18nKey: i }), null) : null, E = (e) => !n(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((e, t) => e && Number.isNaN(Number.parseFloat(t)), !0);
|
|
180
|
+
function D({ children: t, count: n, parent: i, i18nKey: o, context: l, tOptions: u = {}, values: d, defaults: p, components: m, ns: h, i18n: g, t: _, shouldUnescape: v, ...S }) {
|
|
200
181
|
let C = g || c();
|
|
201
|
-
if (!C) return a(C, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using
|
|
202
|
-
let w = _ || C.t.bind(C) || ((e) => e),
|
|
182
|
+
if (!C) return a(C, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.", { i18nKey: o }), t;
|
|
183
|
+
let w = _ || C.t.bind(C) || ((e) => e), D = {
|
|
203
184
|
...s(),
|
|
204
185
|
...C.options?.react
|
|
205
186
|
}, O = h || w.ns || C.options?.defaultNS;
|
|
206
187
|
O = r(O) ? [O] : O || ["translation"];
|
|
207
|
-
let { transDefaultProps: k } =
|
|
188
|
+
let { transDefaultProps: k } = D, A = k?.tOptions ? {
|
|
208
189
|
...k.tOptions,
|
|
209
190
|
...u
|
|
210
191
|
} : u, j = v ?? k?.shouldUnescape, M = k?.values ? {
|
|
@@ -213,7 +194,7 @@ function O({ children: t, count: n, parent: i, i18nKey: o, context: l, tOptions:
|
|
|
213
194
|
} : d, N = k?.components ? {
|
|
214
195
|
...k.components,
|
|
215
196
|
...m
|
|
216
|
-
} : m, P = b(t,
|
|
197
|
+
} : m, P = b(t, D, C, o), F = p || A?.defaultValue || P || D.transEmptyNodeValue || (typeof o == "function" ? e(o) : o), { hashTransKey: I } = D, L = o || (I ? I(P || F) : P || F);
|
|
217
198
|
d = C.options?.interpolation?.defaultVariables ? M && Object.keys(M).length > 0 ? {
|
|
218
199
|
...M,
|
|
219
200
|
...C.options.interpolation.defaultVariables
|
|
@@ -234,12 +215,12 @@ function O({ children: t, count: n, parent: i, i18nKey: o, context: l, tOptions:
|
|
|
234
215
|
ns: O
|
|
235
216
|
}, V = L ? w(L, B) : F;
|
|
236
217
|
V === L && F && (V = F);
|
|
237
|
-
let H =
|
|
238
|
-
|
|
239
|
-
let G =
|
|
240
|
-
return K ? f(K,
|
|
218
|
+
let H = T(N, V, C, o), U = H || t, W = null;
|
|
219
|
+
E(H) && (W = H, U = t);
|
|
220
|
+
let G = x(U, W, V, C, D, B, j), K = i ?? D.defaultTransParent;
|
|
221
|
+
return K ? f(K, S, G) : G;
|
|
241
222
|
}
|
|
242
223
|
//#endregion
|
|
243
|
-
export {
|
|
224
|
+
export { D as Trans, b as nodesToString };
|
|
244
225
|
|
|
245
226
|
//# sourceMappingURL=TransWithoutContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransWithoutContext.js","names":["HTML","keyFromSelector"],"sources":["../../../../../node_modules/react-i18next/dist/es/TransWithoutContext.js"],"sourcesContent":["import { Fragment, isValidElement, cloneElement, createElement, Children } from 'react';\nimport { keyFromSelector } from 'i18next';\nimport HTML from 'html-parse-stringify';\nimport { isObject, isString, warn, warnOnce } from './utils.js';\nimport { getDefaults } from './defaults.js';\nimport { getI18n } from './i18nInstance.js';\nimport { unescape } from './unescape.js';\nconst hasChildren = (node, checkLength) => {\n if (!node) return false;\n const base = node.props?.children ?? node.children;\n if (checkLength) return base.length > 0;\n return !!base;\n};\nconst getChildren = node => {\n if (!node) return [];\n const children = node.props?.children ?? node.children;\n return node.props?.i18nIsDynamicList ? getAsArray(children) : children;\n};\nconst hasValidReactChildren = children => Array.isArray(children) && children.every(isValidElement);\nconst getAsArray = data => Array.isArray(data) ? data : [data];\nconst mergeProps = (source, target) => {\n const newTarget = {\n ...target\n };\n newTarget.props = {\n ...target.props,\n ...source.props\n };\n return newTarget;\n};\nconst getValuesFromChildren = children => {\n const values = {};\n if (!children) return values;\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(values, child);\n });\n };\n getData(children);\n return values;\n};\nexport const nodesToString = (children, i18nOptions, i18n, i18nKey) => {\n if (!children) return '';\n let stringNode = '';\n const childrenArray = getAsArray(children);\n const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];\n childrenArray.forEach((child, childIndex) => {\n if (isString(child)) {\n stringNode += `${child}`;\n return;\n }\n if (isValidElement(child)) {\n const {\n props,\n type\n } = child;\n const childPropsCount = Object.keys(props).length;\n const shouldKeepChild = keepArray.indexOf(type) > -1;\n const childChildren = props.children;\n if (!childChildren && shouldKeepChild && !childPropsCount) {\n stringNode += `<${type}/>`;\n return;\n }\n if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {\n stringNode += `<${childIndex}></${childIndex}>`;\n return;\n }\n if (shouldKeepChild && childPropsCount <= 1) {\n const cnt = isString(childChildren) ? childChildren : nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${type}>${cnt}</${type}>`;\n return;\n }\n const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${childIndex}>${content}</${childIndex}>`;\n return;\n }\n if (child === null) {\n warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {\n i18nKey\n });\n return;\n }\n if (isObject(child)) {\n const {\n format,\n ...clone\n } = child;\n const keys = Object.keys(clone);\n if (keys.length === 1) {\n const value = format ? `${keys[0]}, ${format}` : keys[0];\n stringNode += `{{${value}}}`;\n return;\n }\n warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {\n i18nKey,\n child\n });\n return;\n }\n warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {\n i18nKey,\n child\n });\n });\n return stringNode;\n};\nconst escapeLiteralLessThan = (str, keepArray = [], knownComponentsMap = {}) => {\n if (!str) return str;\n const knownNames = Object.keys(knownComponentsMap);\n const allValidNames = [...keepArray, ...knownNames];\n let result = '';\n let i = 0;\n while (i < str.length) {\n if (str[i] === '<') {\n let isValidTag = false;\n const closingMatch = str.slice(i).match(/^<\\/(\\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);\n if (closingMatch) {\n const tagName = closingMatch[1];\n if (/^\\d+$/.test(tagName) || allValidNames.includes(tagName)) {\n isValidTag = true;\n result += closingMatch[0];\n i += closingMatch[0].length;\n }\n }\n if (!isValidTag) {\n const openingMatch = str.slice(i).match(/^<(\\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\\s+[\\w-]+(?:=(?:\"[^\"]*\"|'[^']*'|[^\\s>]+))?)*\\s*(\\/)?>/);\n if (openingMatch) {\n const tagName = openingMatch[1];\n if (/^\\d+$/.test(tagName) || allValidNames.includes(tagName)) {\n isValidTag = true;\n result += openingMatch[0];\n i += openingMatch[0].length;\n }\n }\n }\n if (!isValidTag) {\n result += '<';\n i += 1;\n }\n } else {\n result += str[i];\n i += 1;\n }\n }\n return result;\n};\nconst renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {\n if (targetString === '') return [];\n const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];\n const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);\n if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];\n const data = knownComponentsMap ?? {};\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);\n });\n };\n getData(children);\n const escapedString = escapeLiteralLessThan(targetString, keepArray, data);\n const ast = HTML.parse(`<0>${escapedString}</0>`);\n const opts = {\n ...data,\n ...combinedTOpts\n };\n const renderInner = (child, node, rootReactNode) => {\n const childs = getChildren(child);\n const mappedChildren = mapAST(childs, node.children, rootReactNode);\n return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;\n };\n const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {\n if (child.dummy) {\n child.children = inner;\n mem.push(cloneElement(child, {\n key: i\n }, isVoid ? undefined : inner));\n } else {\n mem.push(...Children.map([child], c => {\n if (c.type === Fragment || c.props?.i18nIsDynamicList !== undefined) {\n const freshProps = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'children' || k === 'i18nIsDynamicList') return;\n freshProps[k] = c.props[k];\n });\n }\n return createElement(c.type, freshProps, isVoid ? null : inner);\n }\n const override = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'ref' || k === 'children') return;\n override[k] = c.props[k];\n });\n }\n return cloneElement(c, override, isVoid ? null : inner);\n }));\n }\n };\n const mapAST = (reactNode, astNode, rootReactNode) => {\n const reactNodes = getAsArray(reactNode);\n const astNodes = getAsArray(astNode);\n const keepTagOccurrence = {};\n return astNodes.reduce((mem, node, i) => {\n const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);\n if (node.type === 'tag') {\n let tmp = reactNodes[parseInt(node.name, 10)];\n if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];\n if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];\n if (!tmp) tmp = {};\n const props = {\n ...node.attrs\n };\n if (shouldUnescape) {\n Object.keys(props).forEach(p => {\n const val = props[p];\n if (isString(val)) {\n props[p] = unescape(val);\n }\n });\n }\n const child = Object.keys(props).length !== 0 ? mergeProps({\n props\n }, tmp) : tmp;\n const isElement = isValidElement(child);\n const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;\n const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;\n const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);\n if (isString(child)) {\n const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);\n mem.push(value);\n } else if (hasChildren(child) || isValidTranslationWithChildren) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (isEmptyTransWithHTML) {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (Number.isNaN(parseFloat(node.name))) {\n if (isKnownComponent) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i, node.voidElement);\n } else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {\n if (node.voidElement) {\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }));\n } else {\n const occurrence = keepTagOccurrence[node.name] || 0;\n keepTagOccurrence[node.name] = occurrence + 1;\n let matched;\n let seen = 0;\n for (let r = 0; r < reactNodes.length; r += 1) {\n const rn = reactNodes[r];\n if (isValidElement(rn) && rn.type === node.name) {\n if (seen === occurrence) {\n matched = rn;\n break;\n }\n seen += 1;\n }\n }\n const innerScope = matched ? getAsArray(getChildren(matched)) : reactNodes;\n const inner = mapAST(innerScope, node.children, rootReactNode);\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }, inner));\n }\n } else if (node.voidElement) {\n mem.push(`<${node.name} />`);\n } else {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n mem.push(`<${node.name}>${inner}</${node.name}>`);\n }\n } else if (isObject(child) && !isElement) {\n const content = node.children[0] ? translationContent : null;\n if (content) mem.push(content);\n } else {\n pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);\n }\n } else if (node.type === 'text') {\n const wrapTextNodes = i18nOptions.transWrapTextNodes;\n const unescapeFn = typeof i18nOptions.unescape === 'function' ? i18nOptions.unescape : getDefaults().unescape;\n const content = shouldUnescape ? unescapeFn(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);\n if (wrapTextNodes) {\n mem.push(createElement(wrapTextNodes, {\n key: `${node.name}-${i}`\n }, content));\n } else {\n mem.push(content);\n }\n }\n return mem;\n }, []);\n };\n const result = mapAST([{\n dummy: true,\n children: children || []\n }], ast, getAsArray(children || []));\n return getChildren(result[0]);\n};\nconst fixComponentProps = (component, index, translation) => {\n const componentKey = component.key || index;\n const comp = cloneElement(component, {\n key: componentKey\n });\n if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {\n return comp;\n }\n function Componentized() {\n return createElement(Fragment, null, comp);\n }\n return createElement(Componentized, {\n key: componentKey\n });\n};\nconst generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));\nconst generateObjectComponents = (components, translation) => {\n const componentMap = {};\n Object.keys(components).forEach(c => {\n Object.assign(componentMap, {\n [c]: fixComponentProps(components[c], c, translation)\n });\n });\n return componentMap;\n};\nconst generateComponents = (components, translation, i18n, i18nKey) => {\n if (!components) return null;\n if (Array.isArray(components)) {\n return generateArrayComponents(components, translation);\n }\n if (isObject(components)) {\n return generateObjectComponents(components, translation);\n }\n warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> \"components\" prop expects an object or array`, {\n i18nKey\n });\n return null;\n};\nconst isComponentsMap = object => {\n if (!isObject(object)) return false;\n if (Array.isArray(object)) return false;\n return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);\n};\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const i18n = i18nFromProps || getI18n();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using i18nextReactModule`, {\n i18nKey\n });\n return children;\n }\n const t = tFromProps || i18n.t.bind(i18n) || (k => k);\n const reactI18nextOptions = {\n ...getDefaults(),\n ...i18n.options?.react\n };\n let namespaces = ns || t.ns || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n const {\n transDefaultProps\n } = reactI18nextOptions;\n const mergedTOptions = transDefaultProps?.tOptions ? {\n ...transDefaultProps.tOptions,\n ...tOptions\n } : tOptions;\n const mergedShouldUnescape = shouldUnescape ?? transDefaultProps?.shouldUnescape;\n const mergedValues = transDefaultProps?.values ? {\n ...transDefaultProps.values,\n ...values\n } : values;\n const mergedComponents = transDefaultProps?.components ? {\n ...transDefaultProps.components,\n ...components\n } : components;\n const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);\n const defaultValue = defaults || mergedTOptions?.defaultValue || nodeAsString || reactI18nextOptions.transEmptyNodeValue || (typeof i18nKey === 'function' ? keyFromSelector(i18nKey) : i18nKey);\n const {\n hashTransKey\n } = reactI18nextOptions;\n const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);\n if (i18n.options?.interpolation?.defaultVariables) {\n values = mergedValues && Object.keys(mergedValues).length > 0 ? {\n ...mergedValues,\n ...i18n.options.interpolation.defaultVariables\n } : {\n ...i18n.options.interpolation.defaultVariables\n };\n } else {\n values = mergedValues;\n }\n const valuesFromChildren = getValuesFromChildren(children);\n if (valuesFromChildren && typeof valuesFromChildren.count === 'number' && count === undefined) {\n count = valuesFromChildren.count;\n }\n const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? mergedTOptions.interpolation : {\n interpolation: {\n ...mergedTOptions.interpolation,\n prefix: '#$?',\n suffix: '?$#'\n }\n };\n const combinedTOpts = {\n ...mergedTOptions,\n context: context || mergedTOptions.context,\n count,\n ...values,\n ...interpolationOverride,\n defaultValue,\n ns: namespaces\n };\n let translation = key ? t(key, combinedTOpts) : defaultValue;\n if (translation === key && defaultValue) translation = defaultValue;\n const generatedComponents = generateComponents(mergedComponents, translation, i18n, i18nKey);\n let indexedChildren = generatedComponents || children;\n let componentsMap = null;\n if (isComponentsMap(generatedComponents)) {\n componentsMap = generatedComponents;\n indexedChildren = children;\n }\n const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, mergedShouldUnescape);\n const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;\n return useAsParent ? createElement(useAsParent, additionalProps, content) : content;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAOA,IAAM,KAAe,GAAM,MAAgB;CACzC,IAAI,CAAC,GAAM,OAAO;CAClB,IAAM,IAAO,EAAK,OAAO,YAAY,EAAK;CAE1C,OADI,IAAoB,EAAK,SAAS,IAC/B,CAAC,CAAC;AACX,GACM,KAAc,MAAQ;CAC1B,IAAI,CAAC,GAAM,OAAO,CAAC;CACnB,IAAM,IAAW,EAAK,OAAO,YAAY,EAAK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EACR,QAAQ;CACV,EACF,GACM,IAAgB;EACpB,GAAG;EACH,SAAS,KAAW,EAAe;EACnC;EACA,GAAG;EACH,GAAG;EACH;EACA,IAAI;CACN,GACI,IAAc,IAAM,EAAE,GAAK,CAAa,IAAI;CAChD,AAAI,MAAgB,KAAO,MAAc,IAAc;CACvD,IAAM,IAAsB,EAAmB,GAAkB,GAAa,GAAM,CAAO,GACvF,IAAkB,KAAuB,GACzC,IAAgB;CACpB,AAAI,EAAgB,CAAmB,MACrC,IAAgB,GAChB,IAAkB;CAEpB,IAAM,IAAU,EAAY,GAAiB,GAAe,GAAa,GAAM,GAAqB,GAAe,CAAoB,GACjI,IAAc,KAAU,EAAoB;CAClD,OAAO,IAAc,EAAc,GAAa,GAAiB,CAAO,IAAI;AAC9E"}
|
|
1
|
+
{"version":3,"file":"TransWithoutContext.js","names":["HTML","keyFromSelector"],"sources":["../../../../../node_modules/react-i18next/dist/es/TransWithoutContext.js"],"sourcesContent":["import { Fragment, isValidElement, cloneElement, createElement, Children } from 'react';\nimport { keyFromSelector } from 'i18next';\nimport HTML from 'html-parse-stringify';\nimport { isObject, isString, warn, warnOnce } from './utils.js';\nimport { getDefaults } from './defaults.js';\nimport { getI18n } from './i18nInstance.js';\nimport { unescape } from './unescape.js';\nconst hasChildren = (node, checkLength) => {\n if (!node) return false;\n const base = node.props?.children ?? node.children;\n if (checkLength) return base.length > 0;\n return !!base;\n};\nconst getChildren = node => {\n if (!node) return [];\n const children = node.props?.children ?? node.children;\n return node.props?.i18nIsDynamicList ? getAsArray(children) : children;\n};\nconst hasValidReactChildren = children => Array.isArray(children) && children.every(isValidElement);\nconst getAsArray = data => Array.isArray(data) ? data : [data];\nconst mergeProps = (source, target) => {\n const newTarget = {\n ...target\n };\n newTarget.props = {\n ...target.props,\n ...source.props\n };\n return newTarget;\n};\nconst getValuesFromChildren = children => {\n const values = {};\n if (!children) return values;\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(values, child);\n });\n };\n getData(children);\n return values;\n};\nexport const nodesToString = (children, i18nOptions, i18n, i18nKey) => {\n if (!children) return '';\n let stringNode = '';\n const childrenArray = getAsArray(children);\n const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];\n childrenArray.forEach((child, childIndex) => {\n if (isString(child)) {\n stringNode += `${child}`;\n return;\n }\n if (isValidElement(child)) {\n const {\n props,\n type\n } = child;\n const childPropsCount = Object.keys(props).length;\n const shouldKeepChild = keepArray.indexOf(type) > -1;\n const childChildren = props.children;\n if (!childChildren && shouldKeepChild && !childPropsCount) {\n stringNode += `<${type}/>`;\n return;\n }\n if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {\n stringNode += `<${childIndex}></${childIndex}>`;\n return;\n }\n if (shouldKeepChild && childPropsCount <= 1) {\n const cnt = isString(childChildren) ? childChildren : nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${type}>${cnt}</${type}>`;\n return;\n }\n const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${childIndex}>${content}</${childIndex}>`;\n return;\n }\n if (child === null) {\n warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {\n i18nKey\n });\n return;\n }\n if (isObject(child)) {\n const {\n format,\n ...clone\n } = child;\n const keys = Object.keys(clone);\n if (keys.length === 1) {\n const value = format ? `${keys[0]}, ${format}` : keys[0];\n stringNode += `{{${value}}}`;\n return;\n }\n warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {\n i18nKey,\n child\n });\n return;\n }\n warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {\n i18nKey,\n child\n });\n });\n return stringNode;\n};\nconst renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {\n if (targetString === '') return [];\n const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];\n const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);\n if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];\n const data = knownComponentsMap ?? {};\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);\n });\n };\n getData(children);\n const knownNames = Object.keys(data);\n const allowedTags = name => /^\\d+$/.test(name) || keepArray.indexOf(name) > -1 || knownNames.indexOf(name) > -1;\n const ast = HTML.parse(`<0>${targetString}</0>`, {\n allowedTags\n });\n const opts = {\n ...data,\n ...combinedTOpts\n };\n const renderInner = (child, node, rootReactNode) => {\n const childs = getChildren(child);\n const mappedChildren = mapAST(childs, node.children, rootReactNode);\n return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;\n };\n const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {\n if (child.dummy) {\n child.children = inner;\n mem.push(cloneElement(child, {\n key: i\n }, isVoid ? undefined : inner));\n } else {\n mem.push(...Children.map([child], c => {\n if (c.type === Fragment || c.props?.i18nIsDynamicList !== undefined) {\n const freshProps = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'children' || k === 'i18nIsDynamicList') return;\n freshProps[k] = c.props[k];\n });\n }\n return createElement(c.type, freshProps, isVoid ? null : inner);\n }\n const override = {\n key: i\n };\n if (c && c.props) {\n Object.keys(c.props).forEach(k => {\n if (k === 'ref' || k === 'children') return;\n override[k] = c.props[k];\n });\n }\n return cloneElement(c, override, isVoid ? null : inner);\n }));\n }\n };\n const mapAST = (reactNode, astNode, rootReactNode) => {\n const reactNodes = getAsArray(reactNode);\n const astNodes = getAsArray(astNode);\n const keepTagOccurrence = {};\n return astNodes.reduce((mem, node, i) => {\n const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);\n if (node.type === 'tag') {\n let tmp = reactNodes[parseInt(node.name, 10)];\n if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];\n if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];\n if (!tmp) tmp = {};\n const props = {\n ...node.attrs\n };\n if (shouldUnescape) {\n Object.keys(props).forEach(p => {\n const val = props[p];\n if (isString(val)) {\n props[p] = unescape(val);\n }\n });\n }\n const child = Object.keys(props).length !== 0 ? mergeProps({\n props\n }, tmp) : tmp;\n const isElement = isValidElement(child);\n const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;\n const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;\n const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);\n if (isString(child)) {\n const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);\n mem.push(value);\n } else if (hasChildren(child) || isValidTranslationWithChildren) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (isEmptyTransWithHTML) {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (Number.isNaN(parseFloat(node.name))) {\n if (isKnownComponent) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i, node.voidElement);\n } else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {\n if (node.voidElement) {\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }));\n } else {\n const occurrence = keepTagOccurrence[node.name] || 0;\n keepTagOccurrence[node.name] = occurrence + 1;\n let matched;\n let seen = 0;\n for (let r = 0; r < reactNodes.length; r += 1) {\n const rn = reactNodes[r];\n if (isValidElement(rn) && rn.type === node.name) {\n if (seen === occurrence) {\n matched = rn;\n break;\n }\n seen += 1;\n }\n }\n const innerScope = matched ? getAsArray(getChildren(matched)) : reactNodes;\n const inner = mapAST(innerScope, node.children, rootReactNode);\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }, inner));\n }\n } else if (node.voidElement) {\n mem.push(`<${node.name} />`);\n } else {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n mem.push(`<${node.name}>${inner}</${node.name}>`);\n }\n } else if (isObject(child) && !isElement) {\n const content = node.children[0] ? translationContent : null;\n if (content) mem.push(content);\n } else {\n pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);\n }\n } else if (node.type === 'text') {\n const wrapTextNodes = i18nOptions.transWrapTextNodes;\n const unescapeFn = typeof i18nOptions.unescape === 'function' ? i18nOptions.unescape : getDefaults().unescape;\n const content = shouldUnescape ? unescapeFn(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);\n if (wrapTextNodes) {\n mem.push(createElement(wrapTextNodes, {\n key: `${node.name}-${i}`\n }, content));\n } else {\n mem.push(content);\n }\n }\n return mem;\n }, []);\n };\n const result = mapAST([{\n dummy: true,\n children: children || []\n }], ast, getAsArray(children || []));\n return getChildren(result[0]);\n};\nconst fixComponentProps = (component, index, translation) => {\n const componentKey = component.key || index;\n const comp = cloneElement(component, {\n key: componentKey\n });\n if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {\n return comp;\n }\n function Componentized() {\n return createElement(Fragment, null, comp);\n }\n return createElement(Componentized, {\n key: componentKey\n });\n};\nconst generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));\nconst generateObjectComponents = (components, translation) => {\n const componentMap = {};\n Object.keys(components).forEach(c => {\n Object.assign(componentMap, {\n [c]: fixComponentProps(components[c], c, translation)\n });\n });\n return componentMap;\n};\nconst generateComponents = (components, translation, i18n, i18nKey) => {\n if (!components) return null;\n if (Array.isArray(components)) {\n return generateArrayComponents(components, translation);\n }\n if (isObject(components)) {\n return generateObjectComponents(components, translation);\n }\n warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> \"components\" prop expects an object or array`, {\n i18nKey\n });\n return null;\n};\nconst isComponentsMap = object => {\n if (!isObject(object)) return false;\n if (Array.isArray(object)) return false;\n return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);\n};\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const i18n = i18nFromProps || getI18n();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`, {\n i18nKey\n });\n return children;\n }\n const t = tFromProps || i18n.t.bind(i18n) || (k => k);\n const reactI18nextOptions = {\n ...getDefaults(),\n ...i18n.options?.react\n };\n let namespaces = ns || t.ns || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n const {\n transDefaultProps\n } = reactI18nextOptions;\n const mergedTOptions = transDefaultProps?.tOptions ? {\n ...transDefaultProps.tOptions,\n ...tOptions\n } : tOptions;\n const mergedShouldUnescape = shouldUnescape ?? transDefaultProps?.shouldUnescape;\n const mergedValues = transDefaultProps?.values ? {\n ...transDefaultProps.values,\n ...values\n } : values;\n const mergedComponents = transDefaultProps?.components ? {\n ...transDefaultProps.components,\n ...components\n } : components;\n const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);\n const defaultValue = defaults || mergedTOptions?.defaultValue || nodeAsString || reactI18nextOptions.transEmptyNodeValue || (typeof i18nKey === 'function' ? keyFromSelector(i18nKey) : i18nKey);\n const {\n hashTransKey\n } = reactI18nextOptions;\n const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);\n if (i18n.options?.interpolation?.defaultVariables) {\n values = mergedValues && Object.keys(mergedValues).length > 0 ? {\n ...mergedValues,\n ...i18n.options.interpolation.defaultVariables\n } : {\n ...i18n.options.interpolation.defaultVariables\n };\n } else {\n values = mergedValues;\n }\n const valuesFromChildren = getValuesFromChildren(children);\n if (valuesFromChildren && typeof valuesFromChildren.count === 'number' && count === undefined) {\n count = valuesFromChildren.count;\n }\n const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? mergedTOptions.interpolation : {\n interpolation: {\n ...mergedTOptions.interpolation,\n prefix: '#$?',\n suffix: '?$#'\n }\n };\n const combinedTOpts = {\n ...mergedTOptions,\n context: context || mergedTOptions.context,\n count,\n ...values,\n ...interpolationOverride,\n defaultValue,\n ns: namespaces\n };\n let translation = key ? t(key, combinedTOpts) : defaultValue;\n if (translation === key && defaultValue) translation = defaultValue;\n const generatedComponents = generateComponents(mergedComponents, translation, i18n, i18nKey);\n let indexedChildren = generatedComponents || children;\n let componentsMap = null;\n if (isComponentsMap(generatedComponents)) {\n componentsMap = generatedComponents;\n indexedChildren = children;\n }\n const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, mergedShouldUnescape);\n const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;\n return useAsParent ? createElement(useAsParent, additionalProps, content) : content;\n}"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAOA,IAAM,KAAe,GAAM,MAAgB;CACzC,IAAI,CAAC,GAAM,OAAO;CAClB,IAAM,IAAO,EAAK,OAAO,YAAY,EAAK;CAE1C,OADI,IAAoB,EAAK,SAAS,IAC/B,CAAC,CAAC;AACX,GACM,KAAc,MAAQ;CAC1B,IAAI,CAAC,GAAM,OAAO,CAAC;CACnB,IAAM,IAAW,EAAK,OAAO,YAAY,EAAK;CAC9C,OAAO,EAA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AAI,IAClL,EACJ,oBACE,GACE,IAAM,MAAY,IAAe,EAAa,KAAgB,CAAY,IAAI,KAAgB;CACpG,AAQE,IARE,EAAK,SAAS,eAAe,mBACtB,KAAgB,OAAO,KAAK,CAAY,EAAE,SAAS,IAAI;EAC9D,GAAG;EACH,GAAG,EAAK,QAAQ,cAAc;CAChC,IAAI,EACF,GAAG,EAAK,QAAQ,cAAc,iBAChC,IAES;CAEX,IAAM,IAAqB,EAAsB,CAAQ;CACzD,AAAI,KAAsB,OAAO,EAAmB,SAAU,YAAY,MAAU,KAAA,MAClF,IAAQ,EAAmB;CAE7B,IAAM,IAAwB,KAAU,MAAU,KAAA,KAAa,CAAC,EAAK,SAAS,eAAe,gBAAgB,CAAC,IAAW,EAAe,gBAAgB,EACtJ,eAAe;EACb,GAAG,EAAe;EAClB,QAAQ;EACR,QAAQ;CACV,EACF,GACM,IAAgB;EACpB,GAAG;EACH,SAAS,KAAW,EAAe;EACnC;EACA,GAAG;EACH,GAAG;EACH;EACA,IAAI;CACN,GACI,IAAc,IAAM,EAAE,GAAK,CAAa,IAAI;CAChD,AAAI,MAAgB,KAAO,MAAc,IAAc;CACvD,IAAM,IAAsB,EAAmB,GAAkB,GAAa,GAAM,CAAO,GACvF,IAAkB,KAAuB,GACzC,IAAgB;CACpB,AAAI,EAAgB,CAAmB,MACrC,IAAgB,GAChB,IAAkB;CAEpB,IAAM,IAAU,EAAY,GAAiB,GAAe,GAAa,GAAM,GAAqB,GAAe,CAAoB,GACjI,IAAc,KAAU,EAAoB;CAClD,OAAO,IAAc,EAAc,GAAa,GAAiB,CAAO,IAAI;AAC9E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("./utils.cjs"),t=require("./defaults.cjs"),n=require("./i18nInstance.cjs"),r=require("./context.cjs"),i=require("../../../use-sync-external-store/shim/index.cjs");let a=require("react");var o=i.default,s={t:(t,n)=>{if(e.isString(n))return n;if(e.isObject(n)&&e.isString(n.defaultValue))return n.defaultValue;if(typeof t==`function`)return``;if(Array.isArray(t)){let e=t[t.length-1];return typeof e==`function`?``:e}return t},ready:!1},c=()=>()=>{},l=(i,l={})=>{let{i18n:u}=l,{i18n:d,defaultNS:f}=(0,a.useContext)(r.I18nContext)||{},p=u||d||n.getI18n();p&&!p.reportNamespaces&&(p.reportNamespaces=new r.ReportNamespaces),p||e.warnOnce(p,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next
|
|
1
|
+
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("./utils.cjs"),t=require("./defaults.cjs"),n=require("./i18nInstance.cjs"),r=require("./context.cjs"),i=require("../../../use-sync-external-store/shim/index.cjs");let a=require("react");var o=i.default,s={t:(t,n)=>{if(e.isString(n))return n;if(e.isObject(n)&&e.isString(n.defaultValue))return n.defaultValue;if(typeof t==`function`)return``;if(Array.isArray(t)){let e=t[t.length-1];return typeof e==`function`?``:e}return t},ready:!1},c=()=>()=>{},l=(i,l={})=>{let{i18n:u}=l,{i18n:d,defaultNS:f}=(0,a.useContext)(r.I18nContext)||{},p=u||d||n.getI18n();p&&!p.reportNamespaces&&(p.reportNamespaces=new r.ReportNamespaces),p||e.warnOnce(p,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let m=(0,a.useMemo)(()=>({...t.getDefaults(),...p?.options?.react,...l}),[p,l]),{useSuspense:h,keyPrefix:g}=m,_=i||f||p?.options?.defaultNS,v=e.isString(_)?[_]:_||[`translation`],y=(0,a.useMemo)(()=>v,v);p?.reportNamespaces?.addUsedNamespaces?.(y);let b=(0,a.useRef)(0),x=(0,a.useCallback)(e=>{if(!p)return c;let{bindI18n:t,bindI18nStore:n}=m,r=()=>{b.current+=1,e()};return t&&p.on(t,r),n&&p.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>p.off(e,r)),n&&n.split(` `).forEach(e=>p.store.off(e,r))}},[p,m]),S=(0,a.useRef)(),C=(0,a.useCallback)(()=>{if(!p)return s;let t=!!(p.isInitialized||p.initializedStoreOnce)&&y.every(t=>e.hasLoadedNamespace(t,p,m)),n=l.lng||p.language,r=b.current,i=S.current;if(i&&i.ready===t&&i.lng===n&&i.keyPrefix===g&&i.revision===r)return i;let a={t:p.getFixedT(n,m.nsMode===`fallback`?y:y[0],g,{scopeNs:y}),ready:t,lng:n,keyPrefix:g,revision:r};return S.current=a,a},[p,y,g,m,l.lng]),[w,T]=(0,a.useState)(0),{t:E,ready:D}=(0,o.useSyncExternalStore)(x,C,C);(0,a.useEffect)(()=>{if(p&&!D&&!h){let t=()=>T(e=>e+1);l.lng?e.loadLanguages(p,l.lng,y,t):e.loadNamespaces(p,y,t)}},[p,l.lng,y,D,h,w]);let O=p||{},k=(0,a.useRef)(null),A=(0,a.useRef)(),j=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},M=(0,a.useMemo)(()=>{let t=O,n=t?.language,r=t;t&&(k.current&&k.current.__original===t&&A.current===n?r=k.current:(r=j(t),k.current=r,A.current=n));let i=!D&&!h?(...t)=>(e.warnOnce(p,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),E(...t)):E,a=[i,r,D];return a.t=i,a.i18n=r,a.ready=D,a},[E,O,D,O.resolvedLanguage,O.language,O.languages]);if(p&&h&&!D){let t=!1;try{t=process.env.NODE_ENV!==`production`}catch{}throw t&&e.warnOnce(p,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(t=>{let n=()=>t();l.lng?e.loadLanguages(p,l.lng,y,n):e.loadNamespaces(p,y,n)})}return M};exports.useTranslation=l;
|
|
2
2
|
//# sourceMappingURL=useTranslation.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslation.cjs","names":["isString","isObject","I18nContext","getI18n","ReportNamespaces","getDefaults","hasLoadedNamespace"],"sources":["../../../../../node_modules/react-i18next/dist/es/useTranslation.js"],"sourcesContent":["import { useContext, useCallback, useMemo, useEffect, useRef, useState } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n if (typeof k === 'function') return '';\n if (Array.isArray(k)) {\n const last = k[k.length - 1];\n return typeof last === 'function' ? '' : last;\n }\n return k;\n};\nconst notReadySnapshot = {\n t: notReadyT,\n ready: false\n};\nconst dummySubscribe = () => () => {};\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');\n }\n const i18nOptions = useMemo(() => ({\n ...getDefaults(),\n ...i18n?.options?.react,\n ...props\n }), [i18n, props]);\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n const nsOrContext = ns || defaultNSFromContext || i18n?.options?.defaultNS;\n const unstableNamespaces = isString(nsOrContext) ? [nsOrContext] : nsOrContext || ['translation'];\n const namespaces = useMemo(() => unstableNamespaces, unstableNamespaces);\n i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);\n const revisionRef = useRef(0);\n const subscribe = useCallback(callback => {\n if (!i18n) return dummySubscribe;\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n const wrappedCallback = () => {\n revisionRef.current += 1;\n callback();\n };\n if (bindI18n) i18n.on(bindI18n, wrappedCallback);\n if (bindI18nStore) i18n.store.on(bindI18nStore, wrappedCallback);\n return () => {\n if (bindI18n) bindI18n.split(' ').forEach(e => i18n.off(e, wrappedCallback));\n if (bindI18nStore) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, wrappedCallback));\n };\n }, [i18n, i18nOptions]);\n const snapshotRef = useRef();\n const getSnapshot = useCallback(() => {\n if (!i18n) {\n return notReadySnapshot;\n }\n const calculatedReady = !!(i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const currentLng = props.lng || i18n.language;\n const currentRevision = revisionRef.current;\n const lastSnapshot = snapshotRef.current;\n if (lastSnapshot && lastSnapshot.ready === calculatedReady && lastSnapshot.lng === currentLng && lastSnapshot.keyPrefix === keyPrefix && lastSnapshot.revision === currentRevision) {\n return lastSnapshot;\n }\n const calculatedT = i18n.getFixedT(currentLng, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);\n const newSnapshot = {\n t: calculatedT,\n ready: calculatedReady,\n lng: currentLng,\n keyPrefix,\n revision: currentRevision\n };\n snapshotRef.current = newSnapshot;\n return newSnapshot;\n }, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);\n const [loadCount, setLoadCount] = useState(0);\n const {\n t,\n ready\n } = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n useEffect(() => {\n if (i18n && !ready && !useSuspense) {\n const onLoaded = () => setLoadCount(c => c + 1);\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n }\n }, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);\n const finalI18n = i18n || {};\n const wrapperRef = useRef(null);\n const wrapperLangRef = useRef();\n const createI18nWrapper = original => {\n const descriptors = Object.getOwnPropertyDescriptors(original);\n if (descriptors.__original) delete descriptors.__original;\n const wrapper = Object.create(Object.getPrototypeOf(original), descriptors);\n if (!Object.prototype.hasOwnProperty.call(wrapper, '__original')) {\n try {\n Object.defineProperty(wrapper, '__original', {\n value: original,\n writable: false,\n enumerable: false,\n configurable: false\n });\n } catch (_) {}\n }\n return wrapper;\n };\n const ret = useMemo(() => {\n const original = finalI18n;\n const lang = original?.language;\n let i18nWrapper = original;\n if (original) {\n if (wrapperRef.current && wrapperRef.current.__original === original) {\n if (wrapperLangRef.current !== lang) {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n } else {\n i18nWrapper = wrapperRef.current;\n }\n } else {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n }\n }\n const effectiveT = !ready && !useSuspense ? (...args) => {\n warnOnce(i18n, 'USE_T_BEFORE_READY', 'useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.');\n return t(...args);\n } : t;\n const arr = [effectiveT, i18nWrapper, ready];\n arr.t = effectiveT;\n arr.i18n = i18nWrapper;\n arr.ready = ready;\n return arr;\n }, [t, finalI18n, ready, finalI18n.resolvedLanguage, finalI18n.language, finalI18n.languages]);\n if (i18n && useSuspense && !ready) {\n throw new Promise(resolve => {\n const onLoaded = () => resolve();\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n });\n }\n return ret;\n};"],"x_google_ignoreList":[0],"mappings":"gRAcM,EAAmB,CACvB,GAXiB,EAAG,IAAuB,CAC3C,GAAIA,EAAAA,SAAS,CAAk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Defaults","hasLoadedNamespace"],"sources":["../../../../../node_modules/react-i18next/dist/es/useTranslation.js"],"sourcesContent":["import { useContext, useCallback, useMemo, useEffect, useRef, useState } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n if (typeof k === 'function') return '';\n if (Array.isArray(k)) {\n const last = k[k.length - 1];\n return typeof last === 'function' ? '' : last;\n }\n return k;\n};\nconst notReadySnapshot = {\n t: notReadyT,\n ready: false\n};\nconst dummySubscribe = () => () => {};\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.');\n }\n const i18nOptions = useMemo(() => ({\n ...getDefaults(),\n ...i18n?.options?.react,\n ...props\n }), [i18n, props]);\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n const nsOrContext = ns || defaultNSFromContext || i18n?.options?.defaultNS;\n const unstableNamespaces = isString(nsOrContext) ? [nsOrContext] : nsOrContext || ['translation'];\n const namespaces = useMemo(() => unstableNamespaces, unstableNamespaces);\n i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);\n const revisionRef = useRef(0);\n const subscribe = useCallback(callback => {\n if (!i18n) return dummySubscribe;\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n const wrappedCallback = () => {\n revisionRef.current += 1;\n callback();\n };\n if (bindI18n) i18n.on(bindI18n, wrappedCallback);\n if (bindI18nStore) i18n.store.on(bindI18nStore, wrappedCallback);\n return () => {\n if (bindI18n) bindI18n.split(' ').forEach(e => i18n.off(e, wrappedCallback));\n if (bindI18nStore) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, wrappedCallback));\n };\n }, [i18n, i18nOptions]);\n const snapshotRef = useRef();\n const getSnapshot = useCallback(() => {\n if (!i18n) {\n return notReadySnapshot;\n }\n const calculatedReady = !!(i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const currentLng = props.lng || i18n.language;\n const currentRevision = revisionRef.current;\n const lastSnapshot = snapshotRef.current;\n if (lastSnapshot && lastSnapshot.ready === calculatedReady && lastSnapshot.lng === currentLng && lastSnapshot.keyPrefix === keyPrefix && lastSnapshot.revision === currentRevision) {\n return lastSnapshot;\n }\n const calculatedT = i18n.getFixedT(currentLng, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix, {\n scopeNs: namespaces\n });\n const newSnapshot = {\n t: calculatedT,\n ready: calculatedReady,\n lng: currentLng,\n keyPrefix,\n revision: currentRevision\n };\n snapshotRef.current = newSnapshot;\n return newSnapshot;\n }, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);\n const [loadCount, setLoadCount] = useState(0);\n const {\n t,\n ready\n } = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n useEffect(() => {\n if (i18n && !ready && !useSuspense) {\n const onLoaded = () => setLoadCount(c => c + 1);\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n }\n }, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);\n const finalI18n = i18n || {};\n const wrapperRef = useRef(null);\n const wrapperLangRef = useRef();\n const createI18nWrapper = original => {\n const descriptors = Object.getOwnPropertyDescriptors(original);\n if (descriptors.__original) delete descriptors.__original;\n const wrapper = Object.create(Object.getPrototypeOf(original), descriptors);\n if (!Object.prototype.hasOwnProperty.call(wrapper, '__original')) {\n try {\n Object.defineProperty(wrapper, '__original', {\n value: original,\n writable: false,\n enumerable: false,\n configurable: false\n });\n } catch (_) {}\n }\n return wrapper;\n };\n const ret = useMemo(() => {\n const original = finalI18n;\n const lang = original?.language;\n let i18nWrapper = original;\n if (original) {\n if (wrapperRef.current && wrapperRef.current.__original === original) {\n if (wrapperLangRef.current !== lang) {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n } else {\n i18nWrapper = wrapperRef.current;\n }\n } else {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n }\n }\n const effectiveT = !ready && !useSuspense ? (...args) => {\n warnOnce(i18n, 'USE_T_BEFORE_READY', 'useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.');\n return t(...args);\n } : t;\n const arr = [effectiveT, i18nWrapper, ready];\n arr.t = effectiveT;\n arr.i18n = i18nWrapper;\n arr.ready = ready;\n return arr;\n }, [t, finalI18n, ready, finalI18n.resolvedLanguage, finalI18n.language, finalI18n.languages]);\n if (i18n && useSuspense && !ready) {\n let inDevelopment = false;\n try {\n inDevelopment = process.env.NODE_ENV !== 'production';\n } catch (e) {}\n if (inDevelopment) {\n warnOnce(i18n, 'SUSPENDED_WHILE_LOADING', 'useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook');\n }\n throw new Promise(resolve => {\n const onLoaded = () => resolve();\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n });\n }\n return ret;\n};"],"x_google_ignoreList":[0],"mapp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3B,IAAM,MAAiB,EAAQ,EAC3B,EAAM,IACR,EAAA,cAAc,EAAM,EAAM,IAAK,EAAY,CAAQ,EAEnD,EAAA,eAAe,EAAM,EAAY,CAAQ,CAE7C,CAAC,CACH,CACA,OAAO,CACT"}
|
|
@@ -19,7 +19,7 @@ var _ = u(), v = {
|
|
|
19
19
|
ready: !1
|
|
20
20
|
}, y = () => () => {}, b = (t, u = {}) => {
|
|
21
21
|
let { i18n: b } = u, { i18n: x, defaultNS: S } = f(c) || {}, C = b || x || s();
|
|
22
|
-
C && !C.reportNamespaces && (C.reportNamespaces = new l()), C || a(C, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
22
|
+
C && !C.reportNamespaces && (C.reportNamespaces = new l()), C || a(C, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");
|
|
23
23
|
let w = m(() => ({
|
|
24
24
|
...o(),
|
|
25
25
|
...C?.options?.react,
|
|
@@ -39,7 +39,7 @@ var _ = u(), v = {
|
|
|
39
39
|
let t = !!(C.isInitialized || C.initializedStoreOnce) && k.every((t) => e(t, C, w)), n = u.lng || C.language, r = A.current, i = M.current;
|
|
40
40
|
if (i && i.ready === t && i.lng === n && i.keyPrefix === E && i.revision === r) return i;
|
|
41
41
|
let a = {
|
|
42
|
-
t: C.getFixedT(n, w.nsMode === "fallback" ? k : k[0], E),
|
|
42
|
+
t: C.getFixedT(n, w.nsMode === "fallback" ? k : k[0], E, { scopeNs: k }),
|
|
43
43
|
ready: t,
|
|
44
44
|
lng: n,
|
|
45
45
|
keyPrefix: E,
|
|
@@ -96,10 +96,16 @@ var _ = u(), v = {
|
|
|
96
96
|
R.language,
|
|
97
97
|
R.languages
|
|
98
98
|
]);
|
|
99
|
-
if (C && T && !L)
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
if (C && T && !L) {
|
|
100
|
+
let e = !1;
|
|
101
|
+
try {
|
|
102
|
+
e = process.env.NODE_ENV !== "production";
|
|
103
|
+
} catch {}
|
|
104
|
+
throw e && a(C, "SUSPENDED_WHILE_LOADING", "useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"), new Promise((e) => {
|
|
105
|
+
let t = () => e();
|
|
106
|
+
u.lng ? r(C, u.lng, k, t) : i(C, k, t);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
103
109
|
return H;
|
|
104
110
|
};
|
|
105
111
|
//#endregion
|