decocms 2.293.7 → 2.293.8

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.
Files changed (219) hide show
  1. package/dist/client/assets/{AlertCircle-DXfdk9MK.js → AlertCircle-DveGq_Ka.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-m25Ex3xE.js → ArrowNarrowLeft-DHWYg1cd.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-DOO4R0VI.js → ArrowUpRight-CCBySLzZ.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-BC9E8CH0.js → CheckCircle-6bGazfo7.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-0xFW1Tjk.js → ChevronDown-Bg0fGsAy.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-Da2pMeyD.js → ChevronRight-DMa-ECep.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-C8WLqMFJ.js → ChevronUp-hL_C00tb.js} +1 -1
  8. package/dist/client/assets/{Container-BuB3esl0.js → Container-L4zxxTEg.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-C2eXnxdz.js → DotsVertical-DCxBI0BW.js} +1 -1
  10. package/dist/client/assets/{LinkExternal01-BoMA8nX9.js → LinkExternal01-BQ6T0Nws.js} +1 -1
  11. package/dist/client/assets/{Lock01-D-9xfOJy.js → Lock01-0zry6wgC.js} +1 -1
  12. package/dist/client/assets/{Palette-B95ZD3_M.js → Palette-Cd-fSUE0.js} +1 -1
  13. package/dist/client/assets/{Play-DINvkeGT.js → Play-PF2rNc4W.js} +1 -1
  14. package/dist/client/assets/{Plus-Cz_QF-nO.js → Plus-DYo953wk.js} +1 -1
  15. package/dist/client/assets/{RefreshCcw01-C9pW6sTt.js → RefreshCcw01-D1Vi0tae.js} +1 -1
  16. package/dist/client/assets/{SearchMd-BRBTca_N.js → SearchMd-BxcVY0hk.js} +1 -1
  17. package/dist/client/assets/{Settings02-rRANi0Px.js → Settings02-DfEUH8Vu.js} +1 -1
  18. package/dist/client/assets/{Shield01-Ca51KHJr.js → Shield01-DkQy31Nt.js} +1 -1
  19. package/dist/client/assets/{Star01-DeIf7B7B.js → Star01-B6ksoZr0.js} +1 -1
  20. package/dist/client/assets/{Sun-DhTV9qec.js → Sun-vFyK4_Ll.js} +1 -1
  21. package/dist/client/assets/{Tool01-Ba9DB62y.js → Tool01-Cb8li5k6.js} +1 -1
  22. package/dist/client/assets/{Trash01--9QdImzp.js → Trash01-CqSlmOZQ.js} +1 -1
  23. package/dist/client/assets/{User01-Blfyt5S4.js → User01-BHjwWDd7.js} +1 -1
  24. package/dist/client/assets/{Users03-BFWP6Eo7.js → Users03-CsGzKQhD.js} +1 -1
  25. package/dist/client/assets/{X-Bq9xP96R.js → X-BSw526sh.js} +1 -1
  26. package/dist/client/assets/{XCircle-Cc09MSdO.js → XCircle-DGL-4U6P.js} +1 -1
  27. package/dist/client/assets/{XClose-CVgNkrOC.js → XClose-DfM5GjZF.js} +1 -1
  28. package/dist/client/assets/{Zap-jDm5-swv.js → Zap-D55ucbXC.js} +1 -1
  29. package/dist/client/assets/{ZapSquare-CLMBz7MJ.js → ZapSquare-T3gHYvlz.js} +1 -1
  30. package/dist/client/assets/{accordion-DAgtJ1RN.js → accordion-BEf7bBJ7.js} +1 -1
  31. package/dist/client/assets/{agent-icon-Bei3Y6Nv.js → agent-icon-ChIrIWeW.js} +1 -1
  32. package/dist/client/assets/{agents-list-BEcGQnnc.js → agents-list-DdL2YfiV.js} +1 -1
  33. package/dist/client/assets/ai-providers-ObNEA0nx.js +1 -0
  34. package/dist/client/assets/{alert-dialog-BVSxM9YJ.js → alert-dialog-D6jDWQW-.js} +1 -1
  35. package/dist/client/assets/{auth-catchall-DsAh3g7W.js → auth-catchall-M0Jr5kFb.js} +1 -1
  36. package/dist/client/assets/{automation-list-row-OM3ZLG5b.js → automation-list-row-Csh5lumM.js} +1 -1
  37. package/dist/client/assets/{automations-Bfdp-lBm.js → automations-obZ5ZVAW.js} +1 -1
  38. package/dist/client/assets/{avatar-LDMZpKRg.js → avatar-CKkXwPlY.js} +1 -1
  39. package/dist/client/assets/{badge-D4FFGy4o.js → badge-yfBx4pKw.js} +1 -1
  40. package/dist/client/assets/{brand-context-DoIQ0i3H.js → brand-context-DVAt0TKP.js} +1 -1
  41. package/dist/client/assets/{card-Du9Iuv0G.js → card-e-NpS5kl.js} +1 -1
  42. package/dist/client/assets/{chat-context-Cu3HdQoP.js → chat-context-GRw0JUF-.js} +1 -1
  43. package/dist/client/assets/{checkbox-D3HYUnZN.js → checkbox-BWpfDwfi.js} +1 -1
  44. package/dist/client/assets/{collection-detail-C_Qc4MbL.js → collection-detail-DOCM2IPO.js} +1 -1
  45. package/dist/client/assets/{collection-display-button-SRtbYzi1.js → collection-display-button-BANI3stw.js} +1 -1
  46. package/dist/client/assets/{collection-search-BvT81eua.js → collection-search-DyFOds5R.js} +1 -1
  47. package/dist/client/assets/{collection-search-jeIjsobA.js → collection-search-w3FCfjcj.js} +1 -1
  48. package/dist/client/assets/{collection-table-wrapper-D1vIquPS.js → collection-table-wrapper-Ro_jHI87.js} +1 -1
  49. package/dist/client/assets/{collection-tabs-DPgWxe2m.js → collection-tabs-BI0p7qpI.js} +1 -1
  50. package/dist/client/assets/{collections-Di3Xclr5.js → collections-FijcH0pF.js} +1 -1
  51. package/dist/client/assets/{command-CqgC97xW.js → command-nLSAlSuK.js} +1 -1
  52. package/dist/client/assets/{connection-card-DqAomVSf.js → connection-card-wj_vHsSr.js} +1 -1
  53. package/dist/client/assets/{connection-detail-CGFhkom4.js → connection-detail-BvUUuCYo.js} +1 -1
  54. package/dist/client/assets/{connection-form-helpers-Bf4nHE9_.js → connection-form-helpers-WMrQb6eb.js} +1 -1
  55. package/dist/client/assets/{connections-nP3l3Xn5.js → connections-D0bzAtOI.js} +1 -1
  56. package/dist/client/assets/{constants-Bymra3Z3.js → constants-ChdU9xvz.js} +1 -1
  57. package/dist/client/assets/{constants-CRmflr8M.js → constants-D7vrREO4.js} +1 -1
  58. package/dist/client/assets/{dialog-Bnn50qLi.js → dialog-B0QYUD88.js} +1 -1
  59. package/dist/client/assets/{domain-settings-DyvTdw8S.js → domain-settings-9Q2boaGd.js} +1 -1
  60. package/dist/client/assets/{drawer-t00j5Ew9.js → drawer-B9QExE6j.js} +1 -1
  61. package/dist/client/assets/{dropdown-menu-CqTx-nNo.js → dropdown-menu-Dqqv-DxC.js} +1 -1
  62. package/dist/client/assets/{dynamic-plugin-layout-aon9v2dL.js → dynamic-plugin-layout-BVAHZf_l.js} +1 -1
  63. package/dist/client/assets/{empty-state-DQOABzrz.js → empty-state-Brbj3WdC.js} +1 -1
  64. package/dist/client/assets/{empty-state-BCisGTAH.js → empty-state-CtpU7jLB.js} +1 -1
  65. package/dist/client/assets/{extract-connection-data-Db8ZLaq1.js → extract-connection-data-BdGRQa2R.js} +1 -1
  66. package/dist/client/assets/{features-B0-ag3C3.js → features-CW2iqt4o.js} +1 -1
  67. package/dist/client/assets/{form-B5N66yji.js → form-CEqJ4N_7.js} +1 -1
  68. package/dist/client/assets/{general-C2wzdkNU.js → general-DfPdaroT.js} +1 -1
  69. package/dist/client/assets/{index-CDTT3e7s.js → index-B6VjlsLE.js} +1 -1
  70. package/dist/client/assets/index-B6jYwthz.js +1 -0
  71. package/dist/client/assets/{index-BOmVBt-L.js → index-B9-yB4gn.js} +1 -1
  72. package/dist/client/assets/{index-C31S4jpX.js → index-Bf3SCl0m.js} +3 -3
  73. package/dist/client/assets/{index-CzZ-Z-oS.js → index-BsAZNtTY.js} +1 -1
  74. package/dist/client/assets/{index-skEMlwzP.js → index-C-hC1pHz.js} +1 -1
  75. package/dist/client/assets/{index-YLWObp9P.js → index-C2C_Qiwh.js} +1 -1
  76. package/dist/client/assets/{index-SH970SJ0.js → index-CZs7_uJZ.js} +1 -1
  77. package/dist/client/assets/{index-D_S2FIdU.js → index-CwWV7ZbX.js} +1 -1
  78. package/dist/client/assets/{index-_ffZL8NJ.js → index-DCHF8zOG.js} +1 -1
  79. package/dist/client/assets/{index-DzRCCgl0.js → index-DRficqI-.js} +1 -1
  80. package/dist/client/assets/{index-CRBLJNJY.js → index-DcVnAzZR.js} +1 -1
  81. package/dist/client/assets/{index-CCSxUcSR.js → index-O-xThSQt.js} +2 -2
  82. package/dist/client/assets/{index-D0dh_hfJ.js → index-VDFVZp7i.js} +1 -1
  83. package/dist/client/assets/{index-DZ4C7ecc.js → index-dnp-3LXJ.js} +1 -1
  84. package/dist/client/assets/{index-BwHYJNqQ.js → index-wTKQdlAH.js} +1 -1
  85. package/dist/client/assets/{infiniteQueryObserver-COI6ybpz.js → infiniteQueryObserver-BVq9Pm2a.js} +1 -1
  86. package/dist/client/assets/{input-CGOXGU1T.js → input-oRQz03qA.js} +1 -1
  87. package/dist/client/assets/{integration-icon-CsIISZIk.js → integration-icon-Dl850mlU.js} +1 -1
  88. package/dist/client/assets/{label-D4SEK3ff.js → label-C1-enMbO.js} +1 -1
  89. package/dist/client/assets/{layout-4V4C6eb5.js → layout-DNdIWyZp.js} +1 -1
  90. package/dist/client/assets/{lean-canvas-recruit-modal-Bh9iIV1t.js → lean-canvas-recruit-modal-CRZY0Eb-.js} +1 -1
  91. package/dist/client/assets/{login-DzbRx3GK.js → login-BfUv2H8w.js} +1 -1
  92. package/dist/client/assets/{members-S87fVUKE.js → members-CCgRCx0J.js} +1 -1
  93. package/dist/client/assets/{monaco-editor-lCTWnCWQ.js → monaco-editor-u9gnS6t8.js} +1 -1
  94. package/dist/client/assets/{monitoring-stats-row-Bdkg2lXe.js → monitoring-stats-row--8mo81f4.js} +1 -1
  95. package/dist/client/assets/{oauth-callback-gRWCWpy9.js → oauth-callback-CXfLfK0p.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-ai-provider-pudhCVgi.js → oauth-callback-ai-provider-CBc0oyoe.js} +1 -1
  97. package/dist/client/assets/{onboarding-D_RZPnOJ.js → onboarding-CvXVvrci.js} +1 -1
  98. package/dist/client/assets/{org-layout-CyPgK3Oz.js → org-layout-uft5TcR0.js} +1 -1
  99. package/dist/client/assets/{org-plugin-layout-CuqX6Tv7.js → org-plugin-layout-BCAbckW3.js} +1 -1
  100. package/dist/client/assets/{pair-B_xTWu6o.js → pair-D89tt-Oa.js} +1 -1
  101. package/dist/client/assets/{plugin-empty-state-31-4FfVV.js → plugin-empty-state-CdC4a2f5.js} +1 -1
  102. package/dist/client/assets/{plugin-header-SM3MfaW8.js → plugin-header-C436xgxX.js} +1 -1
  103. package/dist/client/assets/{plugin-layout-oCouCQJ1.js → plugin-layout-Ck_aFT7l.js} +1 -1
  104. package/dist/client/assets/{popover-CA7wjTzr.js → popover-Co2M62hE.js} +1 -1
  105. package/dist/client/assets/{profile-D1kET1t3.js → profile-D8aA_SfN.js} +1 -1
  106. package/dist/client/assets/{project-app-view-BnnlNd0S.js → project-app-view-BQN6gYM4.js} +1 -1
  107. package/dist/client/assets/registry-F9ZprpXD.js +2 -0
  108. package/dist/client/assets/{registry-layout-C7uUKQwM.js → registry-layout-CDOchZNA.js} +1 -1
  109. package/dist/client/assets/{required-auth-layout-BARTxmgG.js → required-auth-layout-WPul4l6C.js} +1 -1
  110. package/dist/client/assets/{reset-password-DldtE7pq.js → reset-password-CCvsOolV.js} +1 -1
  111. package/dist/client/assets/{roles-jDo56Odb.js → roles-CfoKq5oL.js} +1 -1
  112. package/dist/client/assets/{scroll-area-CO1r6tWJ.js → scroll-area-ePY6ucBL.js} +1 -1
  113. package/dist/client/assets/{search-input-ChGtPve4.js → search-input-BA02UXZa.js} +1 -1
  114. package/dist/client/assets/{select-CuiyoiL_.js → select-Cq_PvnKV.js} +1 -1
  115. package/dist/client/assets/{select-model-DnX3-EsU.js → select-model-BpJHvnyq.js} +1 -1
  116. package/dist/client/assets/{settings-layout-CTMYFxx3.js → settings-layout-Dl8RrXAU.js} +1 -1
  117. package/dist/client/assets/{settings-section-BmjPsExf.js → settings-section-BzS4xloW.js} +1 -1
  118. package/dist/client/assets/{shell-layout-CWH_Y15a.js → shell-layout-DOMzE0SQ.js} +1 -1
  119. package/dist/client/assets/{skeleton-BodtHV9I.js → skeleton-YcXGprZE.js} +1 -1
  120. package/dist/client/assets/{sso-C2OaFdPj.js → sso-pG-n5D-C.js} +1 -1
  121. package/dist/client/assets/{store-DQliQdSk.js → store-DsWe3E_F.js} +1 -1
  122. package/dist/client/assets/store-registry-C1Sfy2sE.js +2 -0
  123. package/dist/client/assets/{switch-CdHRMTW9.js → switch-BjSXi4cA.js} +1 -1
  124. package/dist/client/assets/{table-DVtFTUHZ.js → table-q-k_hgAt.js} +1 -1
  125. package/dist/client/assets/{tabs-BgJeSqk4.js → tabs-C3iMtl0f.js} +1 -1
  126. package/dist/client/assets/{task-status-CfDV-ew7.js → task-status-jHWa41cV.js} +1 -1
  127. package/dist/client/assets/{textarea-DzkVG7JD.js → textarea-BSpBSpMd.js} +1 -1
  128. package/dist/client/assets/{toggle-group-qQMNUT-A.js → toggle-group-Z4_K_UMR.js} +1 -1
  129. package/dist/client/assets/{tools-list-m5KatPL5.js → tools-list-DVlfSdCs.js} +1 -1
  130. package/dist/client/assets/{tooltip-BqNUzMrI.js → tooltip-CZKTj_88.js} +1 -1
  131. package/dist/client/assets/{types-AfFc_tMd.js → types-CTCqQWQm.js} +1 -1
  132. package/dist/client/assets/{use-ai-providers-BK_veNO4.js → use-ai-providers-Bi5zwgNs.js} +1 -1
  133. package/dist/client/assets/{use-collections-DwZut8wL.js → use-collections-DpHr_hEj.js} +1 -1
  134. package/dist/client/assets/{use-connection-BJpbsOIS.js → use-connection-Dkzl6ATr.js} +1 -1
  135. package/dist/client/assets/{use-copy-Bo8GL7eE.js → use-copy-CpuPfSHn.js} +1 -1
  136. package/dist/client/assets/{use-create-virtual-mcp-D6JQCBq2.js → use-create-virtual-mcp-BDDTbSDu.js} +1 -1
  137. package/dist/client/assets/{use-decopilot-events-C5NKtuSG.js → use-decopilot-events-DfNhZiit.js} +1 -1
  138. package/dist/client/assets/{use-delete-connection-DxaPbg-L.js → use-delete-connection-DzmSSfSC.js} +1 -1
  139. package/dist/client/assets/{use-infinite-scroll-x7s39dsa.js → use-infinite-scroll-ZB6EnEL9.js} +1 -1
  140. package/dist/client/assets/{use-list-state-BnhDBtx8.js → use-list-state-BxmWtMlf.js} +1 -1
  141. package/dist/client/assets/{use-mcp-tools-CpGxrE2n.js → use-mcp-tools-dN493Per.js} +1 -1
  142. package/dist/client/assets/{use-members-CguSIAh8.js → use-members-BLQ9W5Dc.js} +1 -1
  143. package/dist/client/assets/{use-navigate-to-agent-DL1SSMeI.js → use-navigate-to-agent-CBd-r96N.js} +1 -1
  144. package/dist/client/assets/{use-org-sso-BRsOtHzg.js → use-org-sso-Fy8p-ia7.js} +1 -1
  145. package/dist/client/assets/{use-organization-roles-CIvbWsgj.js → use-organization-roles-BY5zQhyp.js} +1 -1
  146. package/dist/client/assets/{use-organization-settings-DXVGYoSK.js → use-organization-settings-BiTIuKde.js} +1 -1
  147. package/dist/client/assets/{use-registry-connections-BKsU7-eH.js → use-registry-connections-B1h0NOZd.js} +1 -1
  148. package/dist/client/assets/{use-status-sounds-BCtmxJQJ.js → use-status-sounds-ChN-g_Kb.js} +1 -1
  149. package/dist/client/assets/{use-tasks-BImSKPbl.js → use-tasks-CMJbyrNa.js} +1 -1
  150. package/dist/client/assets/{use-view-mode-R5lOl_7l.js → use-view-mode-BglVjHEt.js} +1 -1
  151. package/dist/client/assets/{use-virtual-mcp-mfRFtB08.js → use-virtual-mcp-Cn-xT_JW.js} +1 -1
  152. package/dist/client/assets/useInfiniteQuery-BTmoYoSz.js +1 -0
  153. package/dist/client/assets/useSuspenseInfiniteQuery-D3qWdmTu.js +1 -0
  154. package/dist/client/assets/{user-DdWZGaQJ.js → user-BnKZSLel.js} +1 -1
  155. package/dist/client/assets/{view-mode-toggle-DhxRxMVU.js → view-mode-toggle-BueYVsWt.js} +1 -1
  156. package/dist/client/assets/{workflow-BIU8orVo.js → workflow-DbzdHDRp.js} +1 -1
  157. package/dist/client/assets/workflow-detail-D1gDF37Z.js +1 -0
  158. package/dist/client/index.html +1 -1
  159. package/dist/server/cli.js +3 -3
  160. package/dist/server/migrate.js +88 -88
  161. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  162. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  163. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  164. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  165. package/dist/server/node_modules/environment/index.d.ts +74 -0
  166. package/dist/server/node_modules/environment/index.js +47 -0
  167. package/dist/server/node_modules/{slice-ansi → environment}/license +0 -1
  168. package/dist/server/node_modules/environment/package.json +74 -0
  169. package/dist/server/node_modules/environment/readme.md +94 -0
  170. package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
  171. package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
  172. package/dist/server/node_modules/escape-string-regexp/license +9 -0
  173. package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
  174. package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
  175. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  176. package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
  177. package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
  178. package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
  179. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
  180. package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
  181. package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
  182. package/dist/server/node_modules/is-unicode-supported/license +9 -0
  183. package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
  184. package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
  185. package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
  186. package/dist/server/node_modules/mimic-fn/index.js +13 -0
  187. package/dist/server/node_modules/mimic-fn/license +9 -0
  188. package/dist/server/node_modules/{onetime → mimic-fn}/package.json +15 -16
  189. package/dist/server/node_modules/mimic-fn/readme.md +69 -0
  190. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  191. package/dist/server/node_modules/pg-int8/README.md +16 -0
  192. package/dist/server/node_modules/pg-int8/index.js +100 -0
  193. package/dist/server/node_modules/pg-int8/package.json +24 -0
  194. package/dist/server/node_modules/postgres-date/index.js +116 -0
  195. package/dist/server/node_modules/postgres-date/license +21 -0
  196. package/dist/server/node_modules/postgres-date/package.json +33 -0
  197. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  198. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  199. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  200. package/dist/server/node_modules/postgres-interval/license +21 -0
  201. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  202. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  203. package/package.json +1 -1
  204. package/dist/client/assets/ai-providers-Dp405boW.js +0 -1
  205. package/dist/client/assets/index-ShFS2Xm9.js +0 -1
  206. package/dist/client/assets/registry-D3F48l8n.js +0 -2
  207. package/dist/client/assets/store-registry-BFBR78Ii.js +0 -2
  208. package/dist/client/assets/useInfiniteQuery-W0R8FLKd.js +0 -1
  209. package/dist/client/assets/useSuspenseInfiniteQuery-Vv5DMGlP.js +0 -1
  210. package/dist/client/assets/workflow-detail-cJknrHKx.js +0 -1
  211. package/dist/server/node_modules/onetime/index.d.ts +0 -64
  212. package/dist/server/node_modules/onetime/index.js +0 -44
  213. package/dist/server/node_modules/onetime/readme.md +0 -94
  214. package/dist/server/node_modules/slice-ansi/index.d.ts +0 -19
  215. package/dist/server/node_modules/slice-ansi/index.js +0 -260
  216. package/dist/server/node_modules/slice-ansi/package.json +0 -59
  217. package/dist/server/node_modules/slice-ansi/readme.md +0 -54
  218. package/dist/server/node_modules/slice-ansi/tokenize-ansi.js +0 -752
  219. /package/dist/server/node_modules/{onetime → ansi-styles}/license +0 -0
@@ -1,260 +0,0 @@
1
- import tokenizeAnsi from './tokenize-ansi.js';
2
-
3
- function applySgrFragments(activeStyles, fragments) {
4
- for (const fragment of fragments) {
5
- switch (fragment.type) {
6
- case 'reset': {
7
- activeStyles.clear();
8
- break;
9
- }
10
-
11
- case 'end': {
12
- activeStyles.delete(fragment.endCode);
13
- break;
14
- }
15
-
16
- case 'start': {
17
- activeStyles.delete(fragment.endCode);
18
- activeStyles.set(fragment.endCode, fragment.code);
19
- break;
20
- }
21
-
22
- default: {
23
- break;
24
- }
25
- }
26
- }
27
-
28
- return activeStyles;
29
- }
30
-
31
- function undoAnsiCodes(activeStyles) {
32
- return [...activeStyles.keys()].reverse().join('');
33
- }
34
-
35
- function closeHyperlink(hyperlinkToken) {
36
- return `${hyperlinkToken.closePrefix}${hyperlinkToken.terminator}`;
37
- }
38
-
39
- function shouldIncludeSgrAfterEnd(token, activeStyles) {
40
- let hasStartFragment = false;
41
- let hasClosingEffect = false;
42
-
43
- for (const fragment of token.fragments) {
44
- if (fragment.type === 'start') {
45
- hasStartFragment = true;
46
- continue;
47
- }
48
-
49
- if (fragment.type === 'reset' && activeStyles.size > 0) {
50
- hasClosingEffect = true;
51
- continue;
52
- }
53
-
54
- if (fragment.type === 'end' && activeStyles.has(fragment.endCode)) {
55
- hasClosingEffect = true;
56
- }
57
- }
58
-
59
- return hasClosingEffect && !hasStartFragment;
60
- }
61
-
62
- function applySgrToken({token, isPastEnd, activeStyles, returnValue, include, activeHyperlink, position}) {
63
- if (isPastEnd && !shouldIncludeSgrAfterEnd(token, activeStyles)) {
64
- return {
65
- activeStyles,
66
- activeHyperlink,
67
- position,
68
- returnValue,
69
- include,
70
- };
71
- }
72
-
73
- activeStyles = applySgrFragments(activeStyles, token.fragments);
74
- if (include) {
75
- returnValue += token.code;
76
- }
77
-
78
- return {
79
- activeStyles,
80
- activeHyperlink,
81
- position,
82
- returnValue,
83
- include,
84
- };
85
- }
86
-
87
- function applyHyperlinkToken({token, isPastEnd, activeStyles, activeHyperlink, position, returnValue, include}) {
88
- if (
89
- isPastEnd
90
- && (
91
- token.action !== 'close'
92
- || !activeHyperlink
93
- )
94
- ) {
95
- return {
96
- activeStyles,
97
- activeHyperlink,
98
- position,
99
- returnValue,
100
- include,
101
- };
102
- }
103
-
104
- if (token.action === 'open') {
105
- activeHyperlink = token;
106
- } else if (token.action === 'close') {
107
- activeHyperlink = undefined;
108
- }
109
-
110
- if (include) {
111
- returnValue += token.code;
112
- }
113
-
114
- return {
115
- activeStyles,
116
- activeHyperlink,
117
- position,
118
- returnValue,
119
- include,
120
- };
121
- }
122
-
123
- function applyControlToken({token, isPastEnd, activeStyles, activeHyperlink, position, returnValue, include}) {
124
- if (!isPastEnd && include) {
125
- returnValue += token.code;
126
- }
127
-
128
- return {
129
- activeStyles,
130
- activeHyperlink,
131
- position,
132
- returnValue,
133
- include,
134
- };
135
- }
136
-
137
- function applyCharacterToken({token, start, activeStyles, activeHyperlink, position, returnValue, include}) {
138
- if (
139
- !include
140
- && position >= start
141
- && !token.isGraphemeContinuation
142
- ) {
143
- include = true;
144
- returnValue = [...activeStyles.values()].join('');
145
- if (activeHyperlink) {
146
- returnValue += activeHyperlink.code;
147
- }
148
- }
149
-
150
- if (include) {
151
- returnValue += token.value;
152
- }
153
-
154
- position += token.visibleWidth;
155
- return {
156
- activeStyles,
157
- activeHyperlink,
158
- position,
159
- returnValue,
160
- include,
161
- };
162
- }
163
-
164
- const tokenHandlers = {
165
- sgr: applySgrToken,
166
- hyperlink: applyHyperlinkToken,
167
- control: applyControlToken,
168
- character: applyCharacterToken,
169
- };
170
-
171
- function applyToken(parameters) {
172
- const tokenHandler = tokenHandlers[parameters.token.type];
173
- if (!tokenHandler) {
174
- const {
175
- activeStyles,
176
- activeHyperlink,
177
- position,
178
- returnValue,
179
- include,
180
- } = parameters;
181
-
182
- return {
183
- activeStyles,
184
- activeHyperlink,
185
- position,
186
- returnValue,
187
- include,
188
- };
189
- }
190
-
191
- return tokenHandler(parameters);
192
- }
193
-
194
- function createHasContinuationAheadMap(tokens) {
195
- const hasContinuationAhead = Array.from({length: tokens.length}, () => false);
196
- let nextCharacterIsContinuation = false;
197
-
198
- for (let tokenIndex = tokens.length - 1; tokenIndex >= 0; tokenIndex--) {
199
- const token = tokens[tokenIndex];
200
- hasContinuationAhead[tokenIndex] = nextCharacterIsContinuation;
201
- if (token.type === 'character') {
202
- nextCharacterIsContinuation = Boolean(token.isGraphemeContinuation);
203
- }
204
- }
205
-
206
- return hasContinuationAhead;
207
- }
208
-
209
- export default function sliceAnsi(string, start, end) {
210
- const tokens = tokenizeAnsi(string, {endCharacter: end});
211
- const hasContinuationAhead = createHasContinuationAheadMap(tokens);
212
- let activeStyles = new Map();
213
- let activeHyperlink;
214
- let position = 0;
215
- let returnValue = '';
216
- let include = false;
217
-
218
- for (const [tokenIndex, token] of tokens.entries()) {
219
- let isPastEnd = end !== undefined && position >= end;
220
- if (
221
- isPastEnd
222
- && token.type !== 'character'
223
- && hasContinuationAhead[tokenIndex]
224
- ) {
225
- isPastEnd = false;
226
- }
227
-
228
- if (
229
- isPastEnd
230
- && token.type === 'character'
231
- && !token.isGraphemeContinuation
232
- ) {
233
- break;
234
- }
235
-
236
- ({activeStyles, activeHyperlink, position, returnValue, include} = applyToken({
237
- token,
238
- isPastEnd,
239
- start,
240
- activeStyles,
241
- activeHyperlink,
242
- position,
243
- returnValue,
244
- include,
245
- }));
246
- }
247
-
248
- if (!include) {
249
- return '';
250
- }
251
-
252
- if (activeHyperlink) {
253
- returnValue += closeHyperlink(activeHyperlink);
254
- }
255
-
256
- // Disable active codes at the end
257
- returnValue += undoAnsiCodes(activeStyles);
258
-
259
- return returnValue;
260
- }
@@ -1,59 +0,0 @@
1
- {
2
- "name": "slice-ansi",
3
- "version": "8.0.0",
4
- "description": "Slice a string with ANSI escape codes",
5
- "license": "MIT",
6
- "repository": "chalk/slice-ansi",
7
- "funding": "https://github.com/chalk/slice-ansi?sponsor=1",
8
- "type": "module",
9
- "exports": {
10
- "types": "./index.d.ts",
11
- "default": "./index.js"
12
- },
13
- "sideEffects": false,
14
- "engines": {
15
- "node": ">=20"
16
- },
17
- "scripts": {
18
- "test": "xo && ava && tsc --lib esnext index.d.ts"
19
- },
20
- "files": [
21
- "index.js",
22
- "tokenize-ansi.js",
23
- "index.d.ts"
24
- ],
25
- "keywords": [
26
- "slice",
27
- "string",
28
- "ansi",
29
- "styles",
30
- "color",
31
- "colour",
32
- "colors",
33
- "terminal",
34
- "console",
35
- "cli",
36
- "tty",
37
- "escape",
38
- "formatting",
39
- "rgb",
40
- "256",
41
- "shell",
42
- "xterm",
43
- "log",
44
- "logging",
45
- "command-line",
46
- "text"
47
- ],
48
- "dependencies": {
49
- "ansi-styles": "^6.2.3",
50
- "is-fullwidth-code-point": "^5.1.0"
51
- },
52
- "devDependencies": {
53
- "ava": "^6.4.1",
54
- "chalk": "^5.6.2",
55
- "random-item": "^4.0.1",
56
- "strip-ansi": "^7.1.2",
57
- "xo": "^1.2.3"
58
- }
59
- }
@@ -1,54 +0,0 @@
1
- # slice-ansi [![XO: Linted](https://img.shields.io/badge/xo-linted-blue.svg)](https://github.com/xojs/xo)
2
-
3
- > Slice a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles)
4
-
5
- ## Install
6
-
7
- ```sh
8
- npm install slice-ansi
9
- ```
10
-
11
- ## Usage
12
-
13
- ```js
14
- import chalk from 'chalk';
15
- import sliceAnsi from 'slice-ansi';
16
-
17
- const string = 'The quick brown ' + chalk.red('fox jumped over ') +
18
- 'the lazy ' + chalk.green('dog and then ran away with the unicorn.');
19
-
20
- console.log(sliceAnsi(string, 20, 30));
21
- ```
22
-
23
- ## API
24
-
25
- ### sliceAnsi(string, startSlice, endSlice?)
26
-
27
- #### string
28
-
29
- Type: `string`
30
-
31
- String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk).
32
-
33
- #### startSlice
34
-
35
- Type: `number`
36
-
37
- Zero-based visible-column index at which to start the slice. Grapheme clusters (for example, emoji sequences and combining marks) are kept intact.
38
-
39
- #### endSlice
40
-
41
- Type: `number`
42
-
43
- Zero-based visible-column index at which to end the slice.
44
-
45
- ## Related
46
-
47
- - [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
48
- - [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal
49
- - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
50
-
51
- ## Maintainers
52
-
53
- - [Sindre Sorhus](https://github.com/sindresorhus)
54
- - [Josh Junon](https://github.com/qix-)