@blocknote/xl-ai 0.32.0-hackdays.0 → 0.32.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.
Files changed (353) hide show
  1. package/dist/blocknote-xl-ai.cjs +8 -8
  2. package/dist/blocknote-xl-ai.cjs.map +1 -1
  3. package/dist/blocknote-xl-ai.js +296 -257
  4. package/dist/blocknote-xl-ai.js.map +1 -1
  5. package/dist/locales.cjs +1 -1
  6. package/dist/locales.cjs.map +1 -1
  7. package/dist/locales.js +98 -27
  8. package/dist/locales.js.map +1 -1
  9. package/dist/webpack-stats.json +1 -1
  10. package/package.json +9 -8
  11. package/src/api/LLMRequest.ts +16 -2
  12. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/Add heading (h1) and code block_1_4ed20a68d545bbcac0a6974406d9b1b1.json +15 -0
  13. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add a list (end)_1_a8c0f5688c447808ea40e16816bc9d88.json +15 -0
  14. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add a new paragraph (empty doc)_1_4200cbf42b5dd56e2fb7c1dc4c0e5c95.json +15 -0
  15. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add a new paragraph (end)_1_3cecc2859589d59d7b2a73b271a02ebb.json +15 -0
  16. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add a new paragraph (start)_1_0b6e5ba7c365aa004ab09915db4747d2.json +15 -0
  17. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading (h1) and code block_1_f09fb671c15594eba4367376e1de7404.json +15 -0
  18. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (paragraph)_1_039df897cf40b1464a3e77597698630f.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a list (end)_1_9ca128e303da5f76048c82f2c1928b5f.json } +2 -2
  19. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/standard update_1_69863686209bcd70d5d432c6c5646ec6.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (empty doc)_1_fedaaecc10d6ddf733d85168d2167795.json } +2 -2
  20. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type_1_cec06b764f3e6538c0a0baeb04d60587.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (end)_1_fe965ef7a99beb3acc090a9f597b4279.json } +2 -2
  21. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify parent content_1_0b00b5e42872d9f249427436ed23ca40.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (start)_1_232100784a2397a470c08d82001cb7fb.json } +2 -2
  22. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_da4995473884c05440ca118c6ae41453.json +15 -0
  23. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_ca41f979b0669b1a9285363b55a53b23.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_bcc7319416c9b14368ea5ad861f9b722.json } +2 -2
  24. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (word)_1_ecfba97d707a7df556c8be55a94491bd.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (empty doc)_1_8fd66df698028c81b94d9c3da3f48565.json } +2 -2
  25. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_18c554c2e45b6f5a1f491396916dcb46.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_1df9f2bee04498ef092f332ebce02289.json } +2 -2
  26. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_c8cc1e445e2ea3a61af98fae49719bb2.json → Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_ddea32bf65559924075cf5a378ff52a9.json } +2 -2
  27. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_411b9303baf0445a2b3d22af986dcbd7.json +15 -0
  28. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_15ae85e2a52e28738a9cd2f4585a5e87.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_b62f9dcc3af6272c847eb867f28464e4.json } +2 -2
  29. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_62ccc02aa192415d17e9a1f5c53dffb1.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (empty doc)_1_e3538aed67ed181c709f2c76ebd3b88c.json } +2 -2
  30. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_e5c648bb981ba9ce20b93054446c721d.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_4da2dc377fad46f51e531f5cb2594b48.json } +2 -2
  31. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_b8c66592925ae0e551a329b7b2f3b3e2.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_9a1739085965869c82a4ab025a9b426c.json } +2 -2
  32. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_91d754a12d792f37fe1483d19a7b4e64.json +15 -0
  33. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_1b9c5367195624176c28a1ca3684ebac.json +15 -0
  34. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_bda56d4903fe73aa33304a959057957d.json +15 -0
  35. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_731edbb5fc3b6e4a927978b9e203f336.json +15 -0
  36. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_56f9b395b16c8dc222ce13deb68cd412.json +15 -0
  37. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add and update paragraph_1_a16755b57abd9123bc8d138ece2fc206.json +15 -0
  38. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/add paragraph and update selection_1_9d3466520f605a356f2c31458954e816.json +15 -0
  39. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add and update paragraph_1_051b564433dad882d26853a2d2e41841.json +15 -0
  40. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add paragraph and update selection_1_0ca431ee9c56812e10198e60552a536f.json +1 -1
  41. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_8ef78aa1880fd8536fa49acb127f51c0.json +15 -0
  42. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_04f9e76ff73eff953288564e5385dbd4.json +1 -1
  43. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_e9e8ca04b228ebbec6f48d24c147fbcf.json +15 -0
  44. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add paragraph and update selection_1_f5cd402d603bead3d759ebb5485f39c3.json +1 -1
  45. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_2551adfcc4ecd63e37094152b44c1144.json +15 -0
  46. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_fc5837fa3ab53d1a511a8092a926d87d.json +1 -1
  47. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/delete first block_1_a4ec61146ba0a517742770cb5843201f.json +15 -0
  48. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/delete first block_1_ee24300ba2c8986f54c02b0d2aec9691.json +15 -0
  49. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_21ad45e4791e6ce60e52c20228c507ff.json +15 -0
  50. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_002ed2fb069e97008c626fe8c2d43637.json +15 -0
  51. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_af53bf5e53a86669deaae43b9ab27c67.json +15 -0
  52. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/drop mark and link and change text within mark_1_a97a8a61e45a5cfa1f37771aefbf06ba.json +15 -0
  53. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/drop mark and link_1_80d39d8c2f69d28a6aec0dee64eb7b4f.json +15 -0
  54. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/modify nested content_1_64d59c27de629179d00d268836aebcba.json +15 -0
  55. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/modify parent content_1_7cb863416d6d953446640251160e084e.json +15 -0
  56. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/plain source block, add mention_1_c6025cf7f6efc3b57f721752b1f49801.json +15 -0
  57. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/standard update_1_b3b73d97f68d26aba18541b8c809ec4d.json +15 -0
  58. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, remove mark_1_f6a509381d62c4242864af576bb7ba61.json +15 -0
  59. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, remove mention_1_61539d923364c797cda8519b7d6dbb77.json +15 -0
  60. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, replace content_1_a73907775c98b6c395eac24591e7f1d4.json +15 -0
  61. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, update mention prop_1_1821b0f5da6b0bdb28f9444c6eaca222.json +15 -0
  62. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in source block, update text_1_82f2d8a07824544fad31d34c8a554af1.json +15 -0
  63. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in target block, add mark (paragraph)_1_c8bc122a4cb48783ca677fc4aa6cd947.json +15 -0
  64. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/styles + ic in target block, add mark (word)_1_686bfcd92e4eb65462c1811ad4a3976d.json +15 -0
  65. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/translate selection_1_2968b738a7996331d8faf2692d652c3c.json +15 -0
  66. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/turn paragraphs into list_1_dd8e963f842a261deec745e8d4608bfd.json +15 -0
  67. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/update block type and content_1_06943ba0bda62a61f058ba07379ab4b7.json +15 -0
  68. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (non-streaming)/update block type_1_9e53c774c99f178f06b3c7b3608d1605.json +15 -0
  69. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading (h1) and code block_1_c9a31b6237ae08647b85c7348edd052f.json → Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link and change text within mark_1_2b911dce06e556a512fa22d1a0042b5a.json } +2 -2
  70. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link_1_f7d042c6ddd42b02098b813fe6e2da2b.json +15 -0
  71. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify nested content_1_0cbaaf87b0c6b588f7d7e21f72ed7a7c.json +15 -0
  72. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify parent content_1_d190a41cfce34eb5362468031cb608fe.json +15 -0
  73. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/plain source block, add mention_1_963338caea5317fbaa588fed459f0895.json +15 -0
  74. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/standard update_1_da09ee8bda5dc347edc748b59bc3bb16.json +15 -0
  75. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mark_1_90482aba878618976330fda1af8f6766.json +15 -0
  76. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mention_1_5c149679babf73b41810f291fcb4d558.json +15 -0
  77. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, replace content_1_0c9d3ace7da95353a998edbaff79177d.json +15 -0
  78. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update mention prop_1_57893638a0ceb0edac342346fa706076.json +15 -0
  79. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update text_1_ef01870ca5f4083b4ea345e00d3c52ff.json +15 -0
  80. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/{drop mark and link and change text within mark_1_6b9ad94993b0b3dc39ee8fab8057b967.json → styles + ic in target block, add mark (paragraph)_1_ee8107efdf5fd19552a7fff0b08f6657.json } +2 -2
  81. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (word)_1_ca95d8d83853d5deb4765c6768a2563f.json +15 -0
  82. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/translate selection_1_674d4ec4b8af2ac528ec90892731f67a.json +1 -1
  83. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/turn paragraphs into list_1_1ec910c96203d1d86b7dcce97e352e91.json +1 -1
  84. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/delete first block_1_d857ced55373d86233599394800f1a63.json → Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type and content_1_e09825f3b2477a73e86972716897a19e.json } +2 -2
  85. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type_1_cf54cfb6c7dfc32b6429ca1a2302a2b6.json +15 -0
  86. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading and code block_1_5790f7702887daff99c884204e6ae3df.json → Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_efeeda50dc4be1869d555c44cc00a5f5.json } +2 -2
  87. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_e3ff518cb46e814abe773f4184678323.json +15 -0
  88. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_c335661f5c1022666f7905497d4a3189.json +15 -0
  89. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_73db91187a949699f0fd921ebe60d841.json +15 -0
  90. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_57f7d170977b8d3400a3a1d7182790b0.json +15 -0
  91. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_67b27460b36b3013a36967448a8522c4.json +15 -0
  92. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_abd6ba31606c51fb682ca64b85af7008.json +15 -0
  93. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_bcb2fc9b7ec7eb1ae370d9387dc7e505.json +15 -0
  94. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_9e6d5cd399d444173556b9dc0afc3334.json +15 -0
  95. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_e1d72f9616d34022fba9ea219eb13748.json +15 -0
  96. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_bd11c0a3efe0e2b04a0133c6ca73a5cd.json +15 -0
  97. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/{drop mark and link and change text within mark_1_60a05ae4a6b034fe6eaafb2b7bfb9638.json → styles + ic in target block, add mark (paragraph)_1_c865fea79947e8f5885f8c7ebc7dd91a.json } +2 -2
  98. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_e155e7bf26070976e31928b82bb13fbc.json +15 -0
  99. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_54ec8515dd6ab214d8b92c5cf4f09529.json +1 -1
  100. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_ec7bd4074c354be223256a9d0ab17e64.json +1 -1
  101. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_f88ee2c9e0a85200bb5550e4502fc0e5.json → Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_a935b00dc3276d6713bffbfb1fdf211e.json } +2 -2
  102. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_21d1130a166f73bca224130b84ed37c4.json +15 -0
  103. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json → Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_8798a9655a7eb7a651bb81f5f811fc60.json } +2 -2
  104. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_001ea299cc5ab0754d17884094fa9d86.json +15 -0
  105. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_3b7f9df9f7701d51e2ccf274e5280a7d.json +15 -0
  106. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_3b9c9ee90eacd058e510ca1c82cbd554.json +15 -0
  107. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_2e588074658964fdee8f372a25645e39.json +15 -0
  108. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_8aa8c7ee6f4c17a92493df542b131069.json +15 -0
  109. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_7c37aad8ce27e926dc486960a90f35eb.json +15 -0
  110. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_a9fa6b0be7fae1d70499aa6ecfea6704.json +15 -0
  111. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_4d4299b8044479fe9e15a4a168707806.json +15 -0
  112. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_c6fa894a14f6be81fb568283e4724af9.json +15 -0
  113. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_aa627d12493a30d6fa1bbf6d282b6ecd.json +15 -0
  114. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{drop mark and link and change text within mark_1_feb4bd702156a044fe3c72729f12d83c.json → styles + ic in target block, add mark (paragraph)_1_711e7638278935cce832085d8cce0abc.json } +2 -2
  115. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_739768c550cdc9eb5af10dbacc7c6d22.json +15 -0
  116. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/translate selection_1_83bf8aa261516bf197d1391294bbcb06.json +1 -1
  117. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/turn paragraphs into list_1_5aa207db4b8600962363d2352bf0b1c4.json +1 -1
  118. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/{Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_c2ce81529453c6009b31fc3e2d3f8aea.json → Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_12e64702225f7eb521a176feffbdde9a.json } +2 -2
  119. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_b81e29ddb0de05a668236685bd2df42c.json +15 -0
  120. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_f48c2d1d72f4c3514c346629fb7f4d0d.json +15 -0
  121. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_c357b571feb374378ba1b288c39b6c31.json +15 -0
  122. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_782caee9bbb515bfdae481d31ea48e48.json +15 -0
  123. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_92e8df7af02866607d407a52926d4f52.json +15 -0
  124. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_69dfced69472e5cf7789a98b3ccbbdd8.json +15 -0
  125. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_f5d03fb0433b5e5b912f40dbffd9f462.json +15 -0
  126. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_d0386ebc8dc8350f33c44c2251cd1d3c.json +15 -0
  127. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_83b1ed76da3ba0a764fdc6fb4d25e47a.json +15 -0
  128. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_dd48a67d4d41880db75515d0a95a53dc.json +15 -0
  129. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_e21784bb9948aac3dd70492535dff192.json +15 -0
  130. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_72b362e3a2e48e9e1d5dad68fc3da63c.json +15 -0
  131. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_968bf60fd7c9520b848955d47ea8a568.json +15 -0
  132. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_45c3fcc7757ac314a77786102326e125.json +15 -0
  133. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/translate selection_1_8cfca4c1847085a8a31be1818346738e.json +1 -1
  134. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_2f31610c836b996af773c3856634d5c3.json +1 -1
  135. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_94cf62e3727b3443984720bc54218659.json +15 -0
  136. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_19432d3e11d58717813be52d54eb6edd.json +15 -0
  137. package/src/api/formats/html-blocks/defaultHTMLPromptBuilder.ts +17 -9
  138. package/src/api/formats/html-blocks/htmlBlocks.test.ts +9 -0
  139. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_da23f47c1267f17138027b6bd115b251.json +15 -0
  140. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_215b02f86ce29cdb7f8834b39d073041.json +15 -0
  141. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (empty doc)_1_56cad0142b200cfff68d9ff03f02e930.json +15 -0
  142. package/src/api/formats/json/__snapshots__/json.test.ts/{Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_6330ddde52ebd48c1e8914a970ad7849.json → Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_87a85aa54d0e545e325753089c3843b2.json } +3 -3
  143. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_572761dc235c6278ed438821af019645.json +15 -0
  144. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_a5e8aef512955120d014d7b2fc72d306.json +15 -0
  145. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_97ac96ad778b2e833c0e43c1a2221a4f.json +15 -0
  146. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (empty doc)_1_25dfbd403ed079997ccc162bd02defa7.json +15 -0
  147. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_240d8ee34ce9447499e1ea1058a6d6e3.json +15 -0
  148. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_ccaaaa4df61f9ed8a174034e7eb066af.json +15 -0
  149. package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_923d9eef4b0b2e7367fd68983678a41a.json +15 -0
  150. package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{add paragraph and update selection_1_caeb25fbcd6743ad509ab18526f09180.json → add paragraph and update selection_1_ca185676c21707be2b3524b104786716.json } +3 -3
  151. package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_6a4c9cc869ec961e3662b788540af827.json +15 -0
  152. package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_8092e1583e60700c3cff810383dbf5ad.json +15 -0
  153. package/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_f36354147821c0e68c7e4d2ff18e8a95.json +15 -0
  154. package/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_4ac561ca5a33ecb3cbb77482471e2477.json +15 -0
  155. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/clear block formatting_1_4479e5ad2d77e8d9f6b49330a706a3af.json +15 -0
  156. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_d8be2007761d56dcf271fa44d6e8a232.json +15 -0
  157. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_ce3a8d756277935c395939e94ffbdfb1.json +15 -0
  158. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_65bac275d973af0c7b46b2b8d5d324fe.json +15 -0
  159. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_e23642dde85b3d958c556c5e4f86ac38.json +15 -0
  160. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_b2b46f2ea1174691cf498ebb089d464a.json +15 -0
  161. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_94dcefb2b5844b8a3f64f32f87115a14.json +15 -0
  162. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_276903909ec4f878e8adc9c6bd53d0cf.json +15 -0
  163. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_e494072895d2e9d6bd0465582b9034f6.json +15 -0
  164. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_0781fecd32901229a780bd5675e62163.json +15 -0
  165. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_2d779ce68436ee4e33b6781e66c95d4d.json +15 -0
  166. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_03a2f68b3d126b81618ffeebec9f2c7f.json +15 -0
  167. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{drop mark and link and change text within mark_1_c94d4dbaf7e20ccafc3a87f8933afd6a.json → styles + ic in target block, add mark (paragraph)_1_7875145fec05f9cae7e28537ac95bc84.json } +3 -3
  168. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_0fe47d4cbf760327d6622e9e27c734c4.json +15 -0
  169. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{translate selection_1_e06a86826098274cfb35046f8f5f67a5.json → translate selection_1_a1c443203ee18f4ec6d71349d0c57311.json } +3 -3
  170. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{turn paragraphs into list_1_c704dd8060467f285e008fcfa10bd3b9.json → turn paragraphs into list_1_641282d2e6c4ebf728bf3d68a286275b.json } +3 -3
  171. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/{styles + ic in source block, update mention prop_1_c2fb024d9d7218c5051012323c39fa0d.json → update block prop and content_1_535c3a219eb5cf340184d102273a2cf4.json } +3 -3
  172. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop_1_c7c286b44674e4f6141b1e95819b7f60.json +15 -0
  173. package/src/api/formats/json/__snapshots__/json.test.ts/{Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_5515f1ecee9bd348f415319f4a843add.json → Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_901d3a54e64251f1be4ee227b9fb4522.json } +3 -3
  174. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_90c759912d4965fb8ce694e2a63e26fb.json +15 -0
  175. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_49a8b14dc6c4c5cc452e22c79dae5b62.json +15 -0
  176. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_2c278aa8dd1cb7a5f35e306e9a02c487.json +15 -0
  177. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_8349974ecc8b2268c1b5b42aa93563b7.json +15 -0
  178. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_3773830b2cf364532410c9c5498a1355.json +15 -0
  179. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_c0dd9920ce66da75022907181066f5c8.json +15 -0
  180. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_255c7e8a0fd687acb58e373b4b4e7bee.json +15 -0
  181. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_462e7956999f00b4e3ff89faa46d3d4d.json +15 -0
  182. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_c7c6246b702c9417679fec382dfa34d1.json +15 -0
  183. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_5eb79311fbbec3ee0ed02e0178b3bee6.json +15 -0
  184. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_5d52b9a4787e7d80ebeabb4ebd975206.json +15 -0
  185. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_18ed7c60005c23092d68b0d1f73af517.json +15 -0
  186. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_b2017bfc7ff6e6440d2459f1042a8a49.json +15 -0
  187. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_b68a744287cba99975e82279562eb768.json +15 -0
  188. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_a435c74c2ca086ce0225445d217e9a2e.json +15 -0
  189. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/{translate selection_1_3f8ef537734ef9b7d2142c49bde8cbdd.json → translate selection_1_ac70d79d18996d3e08a6559885013c70.json } +3 -3
  190. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_92a38569e8e9c873af8553e1607a7ba7.json +15 -0
  191. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_470bec988f3c558f26928b2f29b50637.json +15 -0
  192. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop_1_7e88e61010d66486f9882befa48894db.json +15 -0
  193. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_1c088e30cb25a7508d30c2079426a225.json +15 -0
  194. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_9fed5f51d881546a9031bc6308ff465c.json +15 -0
  195. package/src/api/formats/json/defaultJSONPromptBuilder.ts +48 -6
  196. package/src/api/formats/json/json.test.ts +1 -1
  197. package/src/api/promptHelpers/trimEmptyBlocks.ts +4 -0
  198. package/src/api/schema/__snapshots__/schemaToJSONSchema.test.ts.snap +8 -0
  199. package/src/i18n/locales/he.ts +73 -0
  200. package/src/i18n/locales/index.ts +1 -0
  201. package/src/prosemirror/__snapshots__/agent.test.ts.snap +23 -12
  202. package/src/prosemirror/__snapshots__/changeset.test.ts.snap +2 -0
  203. package/src/testUtil/cases/addOperationTestCases.ts +14 -1
  204. package/src/testUtil/cases/editors/emptyEditor.ts +21 -0
  205. package/src/testUtil/cases/index.ts +4 -1
  206. package/src/testUtil/testAIModels.ts +6 -0
  207. package/types/src/i18n/locales/he.d.ts +2 -0
  208. package/types/src/i18n/locales/index.d.ts +1 -0
  209. package/types/src/testUtil/cases/editors/blockFormatting.d.ts +42 -2
  210. package/types/src/testUtil/cases/editors/emptyEditor.d.ts +584 -0
  211. package/types/src/testUtil/cases/editors/formattingAndMentions.d.ts +42 -2
  212. package/types/src/testUtil/cases/editors/simpleEditor.d.ts +84 -4
  213. package/types/src/testUtil/cases/editors/tables.d.ts +42 -2
  214. package/types/src/testUtil/cases/schemas/mention.d.ts +42 -2
  215. package/types/src/testUtil/testAIModels.d.ts +1 -0
  216. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/Add heading (h1) and code block_1_112bacb4ae22459e8e8b87c510a5a1ab.json +0 -15
  217. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a list (end)_1_fd2cdf7edb597b5eee87ae1b4c9d8a9e.json +0 -15
  218. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (end)_1_f9f8cec49b3218519501c03ff5c4a3ba.json +0 -15
  219. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (start)_1_d152c585ba7d2fa6e68b1d4b063f266c.json +0 -15
  220. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (streaming)/add a new paragraph (start)_1_ae61114b97c12fbf57d14d6c64ffd647.json +0 -15
  221. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading and code block_1_c9a31b6237ae08647b85c7348edd052f.json +0 -15
  222. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a list (end)_1_db45f2ba8778e15e8a5f7a320508be46.json +0 -15
  223. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (end)_1_f3eaf50ddad718f55acaa05dcc1a2809.json +0 -15
  224. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (start)_1_33db3205ea17e8f6ea3a5e2728b6f10e.json +0 -15
  225. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_5790f7702887daff99c884204e6ae3df.json +0 -15
  226. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_321607ef45a4235ca02c411097005de2.json +0 -15
  227. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_709e808af3f5fb39418413416804a03e.json +0 -15
  228. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_034fd3f9b57eba789a6449d5ff3714c4.json +0 -15
  229. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json +0 -15
  230. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_5c081c7846ad89b59477ceda44c2a349.json +0 -15
  231. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_97770b1d0462a25cfacd049807a59110.json +0 -15
  232. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_ecf9943025fd7f7183aac8d86c4e0b6c.json +0 -15
  233. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_b19471ad74a7a4bf4b288369edf35407.json +0 -15
  234. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading and code block_1_b19471ad74a7a4bf4b288369edf35407.json +0 -15
  235. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_8105f57bbca898c1626edd5cd33308ed.json +0 -15
  236. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_2f4aa2dfa4f6046506c9e133c5d60e76.json +0 -15
  237. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_7352df4919df344c441fb32b5cdae62b.json +0 -15
  238. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add and update paragraph_1_861b7da5f0734c4350466fb42da57dfe.json +0 -15
  239. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add paragraph and update selection_1_4821f5b399d9ebc5b564c530740345ea.json +0 -15
  240. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add and update paragraph_1_0d6f9f822d5ba2310e9cb3b5330d1ef0.json +0 -15
  241. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_96cb428c4df1b42645632abe5969170c.json +0 -15
  242. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_80b906ff9d95e8b88b30c4efd246dc4b.json +0 -15
  243. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_e0a277e6c9c61c532876788f8c914f42.json +0 -15
  244. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/delete first block_1_ba835c26344e8e2082ee1f404bacb992.json +0 -15
  245. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_90f8de8d41648f556395ecf223aa0e6e.json +0 -15
  246. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link and change text within mark_1_953804d0569e88c225ebe8711ac1d209.json +0 -15
  247. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link_1_9cfdcdc629e0d2c8ba65e699037e007c.json +0 -15
  248. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify nested content_1_595e0413e677a7d0e1cf7024e2cdbf11.json +0 -15
  249. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify parent content_1_8a40e8e484dd5e6352b3019e81255567.json +0 -15
  250. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/plain source block, add mention_1_03e2c4dfae2ceb146b12fc9a266da98e.json +0 -15
  251. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/standard update_1_f65e23072a2f6be046fc618e0dbf3949.json +0 -15
  252. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mark_1_3e4d4d1ba3f4c2e80cb1d38f35425665.json +0 -15
  253. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mention_1_7c0c0ebbf2e5eb36903b25d3e63f2a96.json +0 -15
  254. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, replace content_1_f8c8827fbecd6977bdb2e5152b493530.json +0 -15
  255. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update mention prop_1_f4e5d300be72cb5a6c2ef33c32ce7325.json +0 -15
  256. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update text_1_388a274079ba06bcec0049a35278fc01.json +0 -15
  257. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_c7be52683c9d405365815f334ed1f4db.json +0 -15
  258. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (word)_1_9bc0da43041ca4b3a188fbdfd9562bae.json +0 -15
  259. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/translate selection_1_6f0c6d98d9a99081b01869826a538c74.json +0 -15
  260. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/turn paragraphs into list_1_122467a8b6979ad2a47b0417976218a9.json +0 -15
  261. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type and content_1_ace9cde890d5c4b2a131f8867e7b5596.json +0 -15
  262. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type_1_d356646093fb778e9c8bce47f7133ef8.json +0 -15
  263. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link_1_bde418f70f7c93522d3cff713cb6e8b2.json +0 -15
  264. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify nested content_1_6d6efada9f514cd6b5d479b784960905.json +0 -15
  265. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/plain source block, add mention_1_a0f2a68ef2f46c1a3c014966a1d41463.json +0 -15
  266. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mark_1_26a2249225e49ac962f2ffc4d186f048.json +0 -15
  267. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mention_1_8a9dfa091990b0ea68d8b5e600e5ded4.json +0 -15
  268. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, replace content_1_b5da218448fab4a6144aee7b49fe7cfd.json +0 -15
  269. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update mention prop_1_93cd31cde8f8a9d7bcc6ec163bd82e32.json +0 -15
  270. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update text_1_98388769d4b6c534a448363e38006369.json +0 -15
  271. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type and content_1_56b6b0d7b3b4585a4ca5598979ccc319.json +0 -15
  272. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_df81f4ea9e9cda25c1ef6b1d0de62e6e.json +0 -15
  273. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_c473102de44b6890149109c418f224a7.json +0 -15
  274. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_e6db90ec1ad4b48b7e225a5ef7b7ea08.json +0 -15
  275. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_afb308d981984d812bf89191d498ddac.json +0 -15
  276. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_7d6962e90a2fb300f8efab2620d77389.json +0 -15
  277. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_a13d0c4ae92fddfbcbef8c619c092951.json +0 -15
  278. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_8d4842fb70ad278064faa2c3c6efa73e.json +0 -15
  279. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_70a3e6c68033303f4dce207ea802bba9.json +0 -15
  280. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_3f639531f292bf1edb20bbb65c6ad0e0.json +0 -15
  281. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_f3cba828671b95cae0b485ad554942cd.json +0 -15
  282. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_d0dca6e4fab1bc2c56ba2099e199fb05.json +0 -15
  283. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_1e8bbd364a267db768002ed243692a79.json +0 -15
  284. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_b48a9c33b3a0d37850bd38f4c95b310f.json +0 -15
  285. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_196e976a8d5748fd3b667cc39b96cc4d.json +0 -15
  286. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_ab9642000a9e81712bf7bf3292769536.json +0 -15
  287. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_aedf9aba96ec8de63204dc0bd079cce0.json +0 -15
  288. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_4032f8de849b4d06146cea086f5faee0.json +0 -15
  289. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_37c8ad3a742c0e37960ee3c688ecff05.json +0 -15
  290. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_34b0f8d08eec54b64843fe3f13048db5.json +0 -15
  291. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_49c10b96b8a5342b3afe37277f0b2ec0.json +0 -15
  292. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_fa30ce9145d3237fa4a0b86a61965fb3.json +0 -15
  293. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_148394a5f5658c93445adc9e68410296.json +0 -15
  294. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_b61d90f1021054f8bcf1258cf9d11fe4.json +0 -15
  295. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_6dcc3499f6996bd4b16327d079c23b21.json +0 -15
  296. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_efbe6b2b8f77c628de12b4ae99dc6939.json +0 -15
  297. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_c3ec555a7988880acc8c448befdc501d.json +0 -15
  298. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_7f328ec2574aff0eba83678fedea486a.json +0 -15
  299. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_2246a490805512b4459ec130c3f7b028.json +0 -15
  300. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_089c1b96e5eef0e337d6ae0646f3670d.json +0 -15
  301. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_1b70479170637ef990c696b81982a9ff.json +0 -15
  302. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_8fc18a40e2b4ccc90a9be4a3a826572b.json +0 -15
  303. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_7187509500683cd511ef79bc79adf45e.json +0 -15
  304. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_263f9c25f7a85f762b255a3778136737.json +0 -15
  305. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_030b36dcdf89ff60ac373c9797f5caa8.json +0 -15
  306. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_6bc68512d0085273aa59c32b20ff22b9.json +0 -15
  307. package/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_171c87db8855dba2d6bbcd06ae45fbb5.json +0 -15
  308. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_4b13d164d4335cc9e201d217c288f3a0.json +0 -15
  309. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_2e1b3d58032f40317616d76bf4fea81c.json +0 -15
  310. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_4267ae57d44c64aa8b70a89aab67f159.json +0 -15
  311. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_9d50ec65e996e7a56294ea29bc698367.json +0 -15
  312. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_8c55f5cd009ab351956e1b40605abc34.json +0 -15
  313. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_eabec381f0f6973116f9e49dc86810d4.json +0 -15
  314. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_018cc4d3757dfb60819403609f61a74d.json +0 -15
  315. package/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_aeee8d53d8e28d27a45229e9f04bfd02.json +0 -15
  316. package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_46911433377fbe117de27b4ebef430f5.json +0 -15
  317. package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_049c64f71763963c05852957cdcd40bd.json +0 -15
  318. package/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_d7907adc86da5742363bfc4422e490e6.json +0 -15
  319. package/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_7c35b931bd8677fa1920b9e5f8128f4a.json +0 -15
  320. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/clear block formatting_1_25bc98ef490234deedb61e16a00d439e.json +0 -15
  321. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_164602425b43f343ccbfb3c2f1509b58.json +0 -15
  322. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_60470c62411dbe76f9d1ebb97160e62c.json +0 -15
  323. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_603268f548d2c26969d79e4e170bd524.json +0 -15
  324. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_dc3adc84764ea9dd8f20a906a4633334.json +0 -15
  325. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_aa396a89a86700c7c1531127331c95b9.json +0 -15
  326. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_e1de4a145c9a98804f8d1fd1ae811da4.json +0 -15
  327. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_ce587e62f1783dd0652ffea5d558fda6.json +0 -15
  328. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_e2f62ab4415528c63105a90c35e202f3.json +0 -15
  329. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_fb966bb5f366d489cd267e48a7455c72.json +0 -15
  330. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_10409eb8f8e256c2c07ee05c2558a2a9.json +0 -15
  331. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop and content_1_be4a66aa5ee43a3fd916166e56052ad0.json +0 -15
  332. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop_1_697c8f64d854e5a824cb735c81d9b7ea.json +0 -15
  333. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_6b93af6e60c455fec9f8bde5b44e587d.json +0 -15
  334. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_fd7ea265becc91c2e55258021a82a016.json +0 -15
  335. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_e9409ed44af8d5b1f3ec7d3b7125386a.json +0 -15
  336. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_35579261c0f297cf664524f0c5e08ff1.json +0 -15
  337. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_d7303b2c5a80c7a016ba6caa2ae7be04.json +0 -15
  338. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_55d150e200dccb9c1ac1b325aa8d5a43.json +0 -15
  339. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_34fba8f0eb2af6cd8d1af416390d9dc4.json +0 -15
  340. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_ae41cefb5832864a8a9b2e67c04c65b4.json +0 -15
  341. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_a7a20bf9510adbbafe889498aa22f0ce.json +0 -15
  342. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_db2880a42dbde80ff9950f502ef1ab8f.json +0 -15
  343. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_48523af48bae8448f99a3d4108bb8a55.json +0 -15
  344. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_024c55cd1b3177f362a2d606090ca19a.json +0 -15
  345. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_549dd0fe54084e4a98588be963db9361.json +0 -15
  346. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_dbf2fb610e354e0daa60de0cbdd77aba.json +0 -15
  347. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_8369c3cd3da93d0e734ed7092c0acf40.json +0 -15
  348. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_7033d19147879fada8c8142ee2be4803.json +0 -15
  349. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_f8fd91cad88cfec6db2a906b564d39d3.json +0 -15
  350. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_708c779a29da274a24e34cea53755e3b.json +0 -15
  351. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop_1_67d9ce65ebaaf76b1dde8492176299fc.json +0 -15
  352. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_f9b7241b0cb9e9e098e13a58b47bfa62.json +0 -15
  353. package/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_dbb1b2b807becf642bb03a71e34b8e21.json +0 -15
@@ -2,33 +2,33 @@ var et = Object.defineProperty;
2
2
  var tt = (e, t, o) => t in e ? et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
3
  var j = (e, t, o) => tt(e, typeof t != "symbol" ? t + "" : t, o);
4
4
  import { getPmSchema as ot, UnreachableCaseError as Pe, getNodeById as rt, updateBlockTr as nt, insertBlocks as st, trackPosition as se, removeAndInsertBlocks as it, getBlock as Oe, defaultProps as Me, isStyledTextInlineContent as at, isLinkInlineContent as ct, BlockNoteExtension as lt, filterSuggestionItems as ut, mergeCSSClasses as dt } from "@blocknote/core";
5
- import { applySuggestions as Be, suggestChanges as ft, revertSuggestions as ie } from "@blocknote/prosemirror-suggest-changes";
6
- import { jsonSchema as Le, streamObject as pt, generateObject as mt, APICallError as ht, RetryError as yt } from "ai";
7
- import { TextSelection as kt, Plugin as xe, PluginKey as _e } from "prosemirror-state";
8
- import { fixTablesKey as gt } from "prosemirror-tables";
5
+ import { applySuggestions as Be, suggestChanges as pt, revertSuggestions as ie } from "@blocknote/prosemirror-suggest-changes";
6
+ import { jsonSchema as xe, streamObject as mt, generateObject as ft, APICallError as ht, RetryError as yt } from "ai";
7
+ import { TextSelection as gt, Plugin as Le, PluginKey as _e } from "prosemirror-state";
8
+ import { fixTablesKey as kt } from "prosemirror-tables";
9
9
  import bt from "lodash.isequal";
10
10
  import { Slice as Y, Fragment as ae } from "prosemirror-model";
11
- import { Transform as N, Mapping as Ie, ReplaceStep as x, ReplaceAroundStep as St } from "prosemirror-transform";
11
+ import { Transform as N, Mapping as Ee, ReplaceStep as L, ReplaceAroundStep as St } from "prosemirror-transform";
12
12
  import { ChangeSet as ce, simplifyChanges as wt } from "prosemirror-changeset";
13
13
  import { DecorationSet as le, Decoration as ue } from "prosemirror-view";
14
14
  import { defaultSelectionBuilder as Tt } from "y-prosemirror";
15
15
  import { jsxs as vt, jsx as y } from "react/jsx-runtime";
16
16
  import { useBlockNoteContext as Ct, useComponentsContext as G, useSuggestionMenuKeyboardHandler as Pt, useBlockNoteEditor as K, useUIElementPositioning as Ot } from "@blocknote/react";
17
- import B, { useState as Ee, useCallback as $, useMemo as I, useEffect as Ne } from "react";
17
+ import B, { useState as Ie, useCallback as D, useMemo as E, useEffect as Ne } from "react";
18
18
  import { useStore as Ae } from "zustand";
19
- import { offset as Mt, size as Bt, autoUpdate as Lt } from "@floating-ui/react";
19
+ import { offset as Mt, size as Bt, autoUpdate as xt } from "@floating-ui/react";
20
20
  const de = (e) => {
21
21
  let t;
22
- const o = /* @__PURE__ */ new Set(), r = (u, p) => {
22
+ const o = /* @__PURE__ */ new Set(), r = (u, m) => {
23
23
  const l = typeof u == "function" ? u(t) : u;
24
24
  if (!Object.is(l, t)) {
25
- const m = t;
26
- t = p ?? (typeof l != "object" || l === null) ? l : Object.assign({}, t, l), o.forEach((f) => f(t, m));
25
+ const f = t;
26
+ t = m ?? (typeof l != "object" || l === null) ? l : Object.assign({}, t, l), o.forEach((p) => p(t, f));
27
27
  }
28
28
  }, n = () => t, s = { setState: r, getState: n, getInitialState: () => c, subscribe: (u) => (o.add(u), () => o.delete(u)) }, c = t = e(r, n, s);
29
29
  return s;
30
- }, fe = (e) => e ? de(e) : de;
31
- function xt(e) {
30
+ }, pe = (e) => e ? de(e) : de;
31
+ function Lt(e) {
32
32
  const { properties: t, required: o, $defs: r, ...n } = e.parameters;
33
33
  return {
34
34
  schema: {
@@ -49,7 +49,7 @@ function xt(e) {
49
49
  };
50
50
  }
51
51
  function je(e) {
52
- const t = e.map((r) => xt(r)), o = {};
52
+ const t = e.map((r) => Lt(r)), o = {};
53
53
  for (const r of t)
54
54
  for (const n in r.$defs) {
55
55
  if (o[n] && !bt(o[n], r.$defs[n]))
@@ -84,7 +84,7 @@ function _t(e) {
84
84
  }
85
85
  });
86
86
  }
87
- function E(e) {
87
+ function I(e) {
88
88
  if (e.locked)
89
89
  throw new Error(
90
90
  "Stream (source) is already locked and cannot be iterated."
@@ -102,10 +102,10 @@ function E(e) {
102
102
  };
103
103
  }, t;
104
104
  }
105
- function $e(e) {
106
- return E(_t(e));
105
+ function De(e) {
106
+ return I(_t(e));
107
107
  }
108
- async function* It(e) {
108
+ async function* Et(e) {
109
109
  var n;
110
110
  let t = 0, o = !0, r;
111
111
  for await (const i of e)
@@ -128,7 +128,7 @@ async function* It(e) {
128
128
  isPossiblyPartial: !1
129
129
  };
130
130
  }
131
- async function* De(e, t) {
131
+ async function* $e(e, t) {
132
132
  let o = !1;
133
133
  for await (const r of e) {
134
134
  const n = r.operation;
@@ -165,12 +165,12 @@ async function* Re(e, t) {
165
165
  };
166
166
  }
167
167
  }
168
- async function* Et(e, t) {
168
+ async function* It(e, t) {
169
169
  const o = Re(
170
170
  e,
171
171
  t
172
172
  );
173
- yield* De(
173
+ yield* $e(
174
174
  o,
175
175
  (n) => {
176
176
  if (!n.isPossiblyPartial)
@@ -183,7 +183,7 @@ async function* Nt(e, t) {
183
183
  e,
184
184
  t
185
185
  );
186
- yield* De(
186
+ yield* $e(
187
187
  o,
188
188
  (n) => {
189
189
  throw new Error("invalid operation: " + n.operation.error);
@@ -199,7 +199,7 @@ async function At(e, t) {
199
199
  const i = {
200
200
  // non-overridable options for streamObject
201
201
  output: "object",
202
- schema: Le(je(e)),
202
+ schema: xe(je(e)),
203
203
  // configurable options for streamObject
204
204
  // - optional, with defaults
205
205
  // mistral somehow needs "auto", while groq/llama needs "tool"
@@ -210,7 +210,7 @@ async function At(e, t) {
210
210
  ...r,
211
211
  // extra options for streamObject
212
212
  ...o ?? {}
213
- }, a = await mt(i), s = jt(a.object);
213
+ }, a = await ft(i), s = jt(a.object);
214
214
  if (!s.ok)
215
215
  throw new Error(s.error);
216
216
  let c;
@@ -218,7 +218,7 @@ async function At(e, t) {
218
218
  streamObjectResult: void 0,
219
219
  generateObjectResult: a,
220
220
  get operationsSource() {
221
- return c || (c = $e(
221
+ return c || (c = De(
222
222
  Nt(s.value, e)
223
223
  )), c;
224
224
  },
@@ -247,7 +247,7 @@ function jt(e) {
247
247
  value: o()
248
248
  };
249
249
  }
250
- async function $t(e, t, o = () => {
250
+ async function Dt(e, t, o = () => {
251
251
  }) {
252
252
  const { _streamObjectOptions: r, ...n } = t;
253
253
  if (r && ("output" in r || "schema" in r))
@@ -255,7 +255,7 @@ async function $t(e, t, o = () => {
255
255
  const a = {
256
256
  // non-overridable options for streamObject
257
257
  output: "object",
258
- schema: Le(je(e)),
258
+ schema: xe(je(e)),
259
259
  // configurable options for streamObject
260
260
  // - optional, with defaults
261
261
  // mistral somehow needs "auto", while groq/llama needs "tool"
@@ -266,29 +266,29 @@ async function $t(e, t, o = () => {
266
266
  ...n,
267
267
  // extra options for streamObject
268
268
  ...t._streamObjectOptions ?? {}
269
- }, s = pt(a);
269
+ }, s = mt(a);
270
270
  let c;
271
- const [u, p] = s.fullStream.tee(), l = (async () => {
272
- let m = {
271
+ const [u, m] = s.fullStream.tee(), l = (async () => {
272
+ let f = {
273
273
  operations: []
274
274
  };
275
- const f = E(
276
- Ht(p)
275
+ const p = I(
276
+ Ht(m)
277
277
  );
278
- for await (const h of f)
279
- h && typeof h == "object" && "operations" in h && (m = h);
280
- return m;
278
+ for await (const h of p)
279
+ h && typeof h == "object" && "operations" in h && (f = h);
280
+ return f;
281
281
  })();
282
282
  return {
283
283
  streamObjectResult: s,
284
284
  generateObjectResult: void 0,
285
285
  get operationsSource() {
286
- return c || (c = $e(
287
- Et(
288
- It(
289
- Dt(
286
+ return c || (c = De(
287
+ It(
288
+ Et(
289
+ $t(
290
290
  Rt(
291
- E(u)
291
+ I(u)
292
292
  ),
293
293
  o
294
294
  )
@@ -302,13 +302,13 @@ async function $t(e, t, o = () => {
302
302
  }
303
303
  };
304
304
  }
305
- async function* Dt(e, t) {
305
+ async function* $t(e, t) {
306
306
  let o = !0;
307
307
  for await (const r of e)
308
308
  o && (t(), o = !1), yield r;
309
309
  }
310
310
  function Rt(e) {
311
- return E(
311
+ return I(
312
312
  e.pipeThrough(
313
313
  new TransformStream({
314
314
  transform(t, o) {
@@ -333,7 +333,7 @@ function Rt(e) {
333
333
  );
334
334
  }
335
335
  function Ht(e) {
336
- return E(
336
+ return I(
337
337
  e.pipeThrough(
338
338
  new TransformStream({
339
339
  transform(t, o) {
@@ -394,7 +394,7 @@ class qt {
394
394
  console.log(JSON.stringify(t, null, 2));
395
395
  }
396
396
  }
397
- function U(e, t) {
397
+ function z(e, t) {
398
398
  const o = e.getTextCursorPosition(), r = [];
399
399
  for (const n of t) {
400
400
  const i = n.id === o.block.id;
@@ -422,13 +422,13 @@ function T(e) {
422
422
  ...T(t.children)
423
423
  ]);
424
424
  }
425
- function L(e) {
425
+ function x(e) {
426
426
  return e.map((t) => typeof t == "object" && t && "id" in t ? {
427
427
  ...t,
428
428
  id: `${t.id}$`
429
429
  } : t);
430
430
  }
431
- function zt(e, t, o = !0, r = !0) {
431
+ function Ut(e, t, o = !0, r = !0) {
432
432
  let n = 0, i = e.length;
433
433
  if (o)
434
434
  for (; n < i && t(e[n]); )
@@ -439,7 +439,7 @@ function zt(e, t, o = !0, r = !0) {
439
439
  return e.slice(n, i);
440
440
  }
441
441
  function F(e, t) {
442
- return zt(
442
+ return e.length === 1 ? e : Ut(
443
443
  e,
444
444
  (r) => X(r),
445
445
  (t == null ? void 0 : t.trimStart) ?? !1,
@@ -450,11 +450,11 @@ async function He(e, t) {
450
450
  const o = F(e.document), r = await C(
451
451
  T(o),
452
452
  async (s) => e.blocksToHTMLLossy([s])
453
- ), i = U(e, r).filter(
453
+ ), i = z(e, r).filter(
454
454
  (s) => "cursor" in s || !(t.excludeBlockIds || []).includes(s.id)
455
455
  );
456
456
  return {
457
- htmlBlocks: L(i)
457
+ htmlBlocks: x(i)
458
458
  };
459
459
  }
460
460
  async function qe(e, t) {
@@ -463,12 +463,12 @@ async function qe(e, t) {
463
463
  async (n) => e.blocksToHTMLLossy([n])
464
464
  );
465
465
  return {
466
- htmlSelectedBlocks: L(o),
466
+ htmlSelectedBlocks: x(o),
467
467
  htmlDocument: (await C(T(e.document), async (n) => e.blocksToHTMLLossy([n]))).map(({ block: n }) => ({ block: n }))
468
468
  // strip ids so LLM can't accidentally issue updates to ids not in selection
469
469
  };
470
470
  }
471
- function Ut(e) {
471
+ function zt(e) {
472
472
  return [
473
473
  {
474
474
  role: "system",
@@ -506,6 +506,10 @@ function Ft(e) {
506
506
  role: "system",
507
507
  content: JSON.stringify(e.htmlBlocks)
508
508
  },
509
+ {
510
+ role: "system",
511
+ content: 'First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\n EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), \n then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\n \n ' + (e.isEmptyDocument ? "Because the document is empty, first update the empty block before adding new blocks." : "Prefer updating existing blocks over removing and adding (but this also depends on the user's question).")
512
+ },
509
513
  {
510
514
  role: "system",
511
515
  content: "The user asks you to do the following:"
@@ -513,10 +517,6 @@ function Ft(e) {
513
517
  {
514
518
  role: "user",
515
519
  content: e.userPrompt
516
- },
517
- {
518
- role: "system",
519
- content: 'First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\n EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\n \n Prefer updating existing blocks over removing and adding (but this also depends on the user\'s question).'
520
520
  }
521
521
  ];
522
522
  }
@@ -555,9 +555,10 @@ const Jt = async (e, t) => {
555
555
  role: "user",
556
556
  content: t.userPrompt
557
557
  }
558
- ] : Ut({
558
+ ] : zt({
559
559
  ...o,
560
- userPrompt: t.userPrompt
560
+ userPrompt: t.userPrompt,
561
+ isEmptyDocument: e.isEmpty
561
562
  });
562
563
  } else {
563
564
  const o = await He(e, t);
@@ -585,7 +586,8 @@ const Jt = async (e, t) => {
585
586
  }
586
587
  ] : Ft({
587
588
  ...o,
588
- userPrompt: t.userPrompt
589
+ userPrompt: t.userPrompt,
590
+ isEmptyDocument: e.isEmpty
589
591
  });
590
592
  }
591
593
  };
@@ -593,13 +595,13 @@ function Vt(e) {
593
595
  let t, o = !1;
594
596
  return e.descendants((r, n) => o ? !1 : (r.isText && (o = !0, t = n), !0)), t;
595
597
  }
596
- function D(e) {
598
+ function $(e) {
597
599
  var i;
598
600
  const t = ot(e), { modification: o } = t.marks, r = [], n = new N(e.before);
599
601
  for (let a = 0; a < e.steps.length; a++) {
600
- const s = e.steps[a], c = new Ie(e.mapping.maps.slice(0, a)).invert();
602
+ const s = e.steps[a], c = new Ee(e.mapping.maps.slice(0, a)).invert();
601
603
  if (s.structure) {
602
- if (s instanceof x) {
604
+ if (s instanceof L) {
603
605
  if (s.to !== s.from + 1 || s.slice.openStart !== 0 || s.slice.openEnd !== 1 || s.slice.content.size !== 2)
604
606
  throw new Error(
605
607
  "Structure change is not in expected format (ReplaceStep)"
@@ -611,29 +613,29 @@ function D(e) {
611
613
  );
612
614
  } else
613
615
  throw new Error("Step is not a ReplaceStep or ReplaceAroundStep");
614
- const b = c.map(s.from), k = s.slice.content.firstChild, g = n.doc.resolve(n.mapping.map(b)).nodeAfter;
615
- let w = k.marks || [];
616
- k.type !== g.type && (w = o.create({
616
+ const b = c.map(s.from), g = s.slice.content.firstChild, k = n.doc.resolve(n.mapping.map(b)).nodeAfter;
617
+ let w = g.marks || [];
618
+ g.type !== k.type && (w = o.create({
617
619
  type: "nodeType",
618
- previousValue: g.type.name,
619
- newValue: k.type.name
620
+ previousValue: k.type.name,
621
+ newValue: g.type.name
620
622
  }).addToSet(w));
621
623
  const A = /* @__PURE__ */ new Set([
622
- ...Object.keys(k.attrs),
623
- ...Object.keys(g.attrs)
624
+ ...Object.keys(g.attrs),
625
+ ...Object.keys(k.attrs)
624
626
  ]);
625
627
  for (const P of A)
626
- k.attrs[P] !== g.attrs[P] && (w = o.create({
628
+ g.attrs[P] !== k.attrs[P] && (w = o.create({
627
629
  type: "attr",
628
630
  attrName: P,
629
- previousValue: g.attrs[P],
630
- newValue: k.attrs[P]
631
+ previousValue: k.attrs[P],
632
+ newValue: g.attrs[P]
631
633
  }).addToSet(w));
632
634
  const M = n.steps.length;
633
635
  n.setNodeMarkup(
634
636
  n.mapping.map(b),
635
- k.type,
636
- k.attrs,
637
+ g.type,
638
+ g.attrs,
637
639
  w
638
640
  ), r.push({
639
641
  prosemirrorSteps: n.steps.slice(M),
@@ -642,9 +644,9 @@ function D(e) {
642
644
  });
643
645
  continue;
644
646
  }
645
- if (!(s instanceof x))
647
+ if (!(s instanceof L))
646
648
  throw new Error("Step is not a ReplaceStep");
647
- const u = c.map(s.from), p = c.map(s.to);
649
+ const u = c.map(s.from), m = c.map(s.to);
648
650
  if (s.slice.openStart > 0 || s.slice.openEnd > 0)
649
651
  throw new Error(
650
652
  "Slice has openStart or openEnd > 0, but structure=false"
@@ -653,30 +655,30 @@ function D(e) {
653
655
  prosemirrorSteps: [],
654
656
  selection: {
655
657
  anchor: n.mapping.map(u),
656
- head: n.mapping.map(p)
658
+ head: n.mapping.map(m)
657
659
  },
658
660
  type: "select"
659
661
  });
660
- const l = s.slice.content.textBetween(0, s.slice.size), m = l === n.doc.textBetween(n.mapping.map(u), n.mapping.map(p));
661
- let f;
662
- if (m)
663
- f = s.slice.content.size;
662
+ const l = s.slice.content.textBetween(0, s.slice.size), f = l === n.doc.textBetween(n.mapping.map(u), n.mapping.map(m));
663
+ let p;
664
+ if (f)
665
+ p = s.slice.content.size;
664
666
  else if (l.length === 0)
665
- f = s.slice.content.size;
667
+ p = s.slice.content.size;
666
668
  else {
667
669
  const b = Vt(s.slice.content);
668
670
  if (b === void 0)
669
671
  throw new Error("unexpected: no first character found");
670
- f = b + 1;
672
+ p = b + 1;
671
673
  }
672
- let h = n.mapping.map(p);
673
- const d = n.mapping.map(p);
674
+ let h = n.mapping.map(m);
675
+ const d = n.mapping.map(m);
674
676
  let S = !0;
675
- for (let b = f; b <= s.slice.content.size; b++) {
676
- const k = S && u !== p, g = n.steps.length;
677
- if (k) {
677
+ for (let b = p; b <= s.slice.content.size; b++) {
678
+ const g = S && u !== m, k = n.steps.length;
679
+ if (g) {
678
680
  const M = n.doc.resolve(n.mapping.map(u));
679
- (i = M.nodeAfter) != null && i.isBlock && n.addNodeMark(M.pos, t.mark("deletion", {})), n.addMark(M.pos, h, t.mark("deletion", {})), h = n.mapping.map(p);
681
+ (i = M.nodeAfter) != null && i.isBlock && n.addNodeMark(M.pos, t.mark("deletion", {})), n.addMark(M.pos, h, t.mark("deletion", {})), h = n.mapping.map(m);
680
682
  }
681
683
  const w = new Y(s.slice.content.cut(0, b), 0, 0);
682
684
  n.replace(d, h, w).addMark(
@@ -687,18 +689,18 @@ function D(e) {
687
689
  d,
688
690
  d + w.content.size,
689
691
  (M, P) => P < d || P > d + w.content.size ? !0 : (M.isBlock && n.addNodeMark(P, t.mark("insertion", {})), !1)
690
- ), h = n.mapping.slice(g).map(h);
691
- const A = kt.near(
692
+ ), h = n.mapping.slice(k).map(h);
693
+ const A = gt.near(
692
694
  n.doc.resolve(d + w.content.size),
693
695
  -1
694
696
  );
695
697
  r.push({
696
- prosemirrorSteps: n.steps.slice(g),
698
+ prosemirrorSteps: n.steps.slice(k),
697
699
  selection: {
698
700
  anchor: A.from,
699
701
  head: A.from
700
702
  },
701
- type: k ? "replace" : "insert"
703
+ type: g ? "replace" : "insert"
702
704
  // 3. Insert the replacement character by character
703
705
  }), S = !1;
704
706
  }
@@ -731,7 +733,7 @@ function ee(e, t) {
731
733
  function Zt(e, t, o) {
732
734
  const r = new N(t);
733
735
  for (const a of e) {
734
- const s = new x(
736
+ const s = new L(
735
737
  r.mapping.map(a.fromA),
736
738
  r.mapping.map(a.toA),
737
739
  o.slice(a.fromB, a.toB)
@@ -744,26 +746,26 @@ function Zt(e, t, o) {
744
746
  const a = o.resolve(i).nodeAfter, s = r.doc.resolve(i).nodeAfter;
745
747
  if (!a || !s)
746
748
  throw new Error("diffNode not found");
747
- const c = !a.isLeaf && a.content.eq(s.content), u = c ? 1 : Math.min(a.nodeSize, s.nodeSize), p = i + u, l = n.map(i), m = n.map(p);
748
- let f = e.length;
749
+ const c = !a.isLeaf && a.content.eq(s.content), u = c ? 1 : Math.min(a.nodeSize, s.nodeSize), m = i + u, l = n.map(i), f = n.map(m);
750
+ let p = e.length;
749
751
  for (let d = 0; d < e.length; d++)
750
- if (e[d].fromA >= m) {
751
- f = d;
752
+ if (e[d].fromA >= f) {
753
+ p = d;
752
754
  break;
753
755
  }
754
- e.splice(f, 0, {
756
+ e.splice(p, 0, {
755
757
  fromA: l,
756
- toA: m,
758
+ toA: f,
757
759
  fromB: i,
758
- toB: p,
760
+ toB: m,
759
761
  deleted: [],
760
762
  inserted: [],
761
763
  type: c ? "node-type-or-attr-update" : "mark-update"
762
764
  }), r.step(
763
- new x(
765
+ new L(
764
766
  i,
765
- p,
766
- o.slice(i, p),
767
+ m,
768
+ o.slice(i, m),
767
769
  c
768
770
  )
769
771
  );
@@ -774,7 +776,7 @@ function Zt(e, t, o) {
774
776
  }
775
777
  return e;
776
778
  }
777
- const pe = (e, t) => {
779
+ const me = (e, t) => {
778
780
  const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
779
781
  e.descendants((a) => {
780
782
  a.type.name === "tableCell" && o.add(JSON.stringify(a.toJSON()));
@@ -815,63 +817,63 @@ function J(e, t, o = !1, r, n) {
815
817
  let s = a.doc, c = ce.create(
816
818
  t,
817
819
  void 0,
818
- pe(t, s)
820
+ me(t, s)
819
821
  );
820
822
  if (c = c.addSteps(s, a.mapping.maps, 0), o && c.changes.length > 0) {
821
- const l = c.changes[c.changes.length - 1], m = l.toA - l.fromA, f = l.toB - l.fromB;
822
- if (m > f) {
823
+ const l = c.changes[c.changes.length - 1], f = l.toA - l.fromA, p = l.toB - l.fromB;
824
+ if (f > p) {
823
825
  const h = t.slice(
824
- l.fromA + f,
826
+ l.fromA + p,
825
827
  l.toA
826
828
  );
827
829
  a.step(
828
- new x(l.toB, l.toB, h)
830
+ new L(l.toB, l.toB, h)
829
831
  ), s = a.doc, c = ce.create(
830
832
  c.startDoc,
831
833
  void 0,
832
- pe(c.startDoc, s)
834
+ me(c.startDoc, s)
833
835
  ), c = c.addSteps(s, a.mapping.maps, 0);
834
836
  }
835
837
  }
836
- const u = [], p = wt(
838
+ const u = [], m = wt(
837
839
  c.changes,
838
840
  s
839
841
  );
840
- for (let l = 0; l < p.length; l++) {
841
- const m = p[l], f = s.slice(m.fromB, m.toB);
842
- if (f.openEnd === 1 && f.openStart === 0 && (m.type = "node-type-or-attr-update", f.size > 2)) {
842
+ for (let l = 0; l < m.length; l++) {
843
+ const f = m[l], p = s.slice(f.fromB, f.toB);
844
+ if (p.openEnd === 1 && p.openStart === 0 && (f.type = "node-type-or-attr-update", p.size > 2)) {
843
845
  const h = {
844
- fromA: m.fromA,
845
- toA: m.fromA + 1,
846
- fromB: m.fromB,
847
- toB: m.fromB + 1,
846
+ fromA: f.fromA,
847
+ toA: f.fromA + 1,
848
+ fromB: f.fromB,
849
+ toB: f.fromB + 1,
848
850
  deleted: [],
849
851
  inserted: [],
850
852
  type: "node-type-or-attr-update"
851
853
  }, d = {
852
- fromA: m.fromA + 1,
853
- toA: m.toA,
854
- fromB: m.fromB + 1,
855
- toB: m.toB,
854
+ fromA: f.fromA + 1,
855
+ toA: f.toA,
856
+ fromB: f.fromB + 1,
857
+ toB: f.toB,
856
858
  deleted: [],
857
859
  inserted: []
858
860
  };
859
- p.splice(l, 1, h, d), l++;
861
+ m.splice(l, 1, h, d), l++;
860
862
  }
861
863
  }
862
- Zt(p, t, s);
863
- for (let l = 0; l < p.length; l++) {
864
- const m = p[l], f = s.slice(m.fromB, m.toB);
865
- if (f.openEnd > 0 && f.size > 1)
864
+ Zt(m, t, s);
865
+ for (let l = 0; l < m.length; l++) {
866
+ const f = m[l], p = s.slice(f.fromB, f.toB);
867
+ if (p.openEnd > 0 && p.size > 1)
866
868
  throw new Error(
867
869
  "unexpected, openEnd > 0 and size > 1, this should have been split into two steps"
868
870
  );
869
- l === p.length - 1 && o && m.type === "mark-update" || u.push(
870
- new x(
871
- m.fromA,
872
- m.toA,
873
- f,
874
- m.type === "node-type-or-attr-update"
871
+ l === m.length - 1 && o && f.type === "mark-update" || u.push(
872
+ new L(
873
+ f.fromA,
874
+ f.toA,
875
+ p,
876
+ f.type === "node-type-or-attr-update"
875
877
  )
876
878
  );
877
879
  }
@@ -979,36 +981,36 @@ function te(e) {
979
981
  yield c;
980
982
  continue;
981
983
  }
982
- const u = c.operation, p = await e.toJSONToolCall(t, {
984
+ const u = c.operation, m = await e.toJSONToolCall(t, {
983
985
  ...c,
984
986
  operation: u
985
987
  });
986
- if (p && !(c.isPossiblyPartial && X(
987
- p.blocks[p.blocks.length - 1]
988
+ if (m && !(c.isPossiblyPartial && X(
989
+ m.blocks[m.blocks.length - 1]
988
990
  ))) {
989
- for (let l = 0; l < p.blocks.length; l++) {
990
- const m = p.blocks[l], f = t.prosemirrorState.tr;
991
+ for (let l = 0; l < m.blocks.length; l++) {
992
+ const f = m.blocks[l], p = t.prosemirrorState.tr;
991
993
  let h = [];
992
994
  if (l < i.length) {
993
995
  const d = await e.rebaseTool(i[l], t), b = J(
994
996
  {
995
997
  id: i[l],
996
- block: m
998
+ block: f
997
999
  },
998
1000
  d.doc,
999
1001
  !1
1000
- ).map((k) => k.map(d.invertMap));
1001
- for (const k of b)
1002
- f.step(k.map(f.mapping));
1003
- h = D(f), h = h.filter((k) => k.type !== "select");
1002
+ ).map((g) => g.map(d.invertMap));
1003
+ for (const g of b)
1004
+ p.step(g.map(p.mapping));
1005
+ h = $(p), h = h.filter((g) => g.type !== "select");
1004
1006
  } else {
1005
1007
  const d = u.position === "after" ? a[u.referenceId] : void 0, S = st(
1006
- f,
1007
- [m],
1008
+ p,
1009
+ [f],
1008
1010
  l > 0 ? i[l - 1] : d || u.referenceId,
1009
1011
  l > 0 ? "after" : u.position
1010
1012
  );
1011
- i.push(...S.map((b) => b.id)), h = D(f);
1013
+ i.push(...S.map((b) => b.id)), h = $(p);
1012
1014
  }
1013
1015
  h.find((d) => d.type === "replace");
1014
1016
  for (const d of h)
@@ -1096,34 +1098,34 @@ function oe(e) {
1096
1098
  yield u;
1097
1099
  continue;
1098
1100
  }
1099
- const p = u.operation;
1101
+ const m = u.operation;
1100
1102
  if (u.isPossiblyPartial) {
1101
- const g = JSON.stringify(p.block).length;
1102
- if (g < a)
1103
+ const k = JSON.stringify(m.block).length;
1104
+ if (k < a)
1103
1105
  continue;
1104
- a = g + 50;
1106
+ a = k + 50;
1105
1107
  } else
1106
1108
  a = 50;
1107
- const l = await e.rebaseTool(p.id, t), m = s ? l.invertMap.invert().map(s.from()) : void 0, f = s ? l.invertMap.invert().map(s.to()) : void 0, h = await e.toJSONToolCall(t, u);
1109
+ const l = await e.rebaseTool(m.id, t), f = s ? l.invertMap.invert().map(s.from()) : void 0, p = s ? l.invertMap.invert().map(s.to()) : void 0, h = await e.toJSONToolCall(t, u);
1108
1110
  if (!h)
1109
1111
  continue;
1110
1112
  const d = J(
1111
1113
  h,
1112
1114
  l.doc,
1113
1115
  u.isPossiblyPartial,
1114
- m,
1115
- f
1116
+ f,
1117
+ p
1116
1118
  );
1117
1119
  if (d.length === 1 && u.isPossiblyPartial)
1118
1120
  continue;
1119
- const S = d.map((g) => g.map(l.invertMap)), b = new N(t.prosemirrorState.doc);
1120
- for (const g of S)
1121
- b.step(g.map(b.mapping));
1122
- const k = D(b);
1123
- for (const g of k)
1124
- o.withDelays && await Q(g), t.transact((w) => {
1125
- ee(w, g);
1126
- }), (c = o.onBlockUpdate) == null || c.call(o, p.id);
1121
+ const S = d.map((k) => k.map(l.invertMap)), b = new N(t.prosemirrorState.doc);
1122
+ for (const k of S)
1123
+ b.step(k.map(b.mapping));
1124
+ const g = $(b);
1125
+ for (const k of g)
1126
+ o.withDelays && await Q(k), t.transact((w) => {
1127
+ ee(w, k);
1128
+ }), (c = o.onBlockUpdate) == null || c.call(o, m.id);
1127
1129
  }
1128
1130
  }
1129
1131
  };
@@ -1184,7 +1186,7 @@ const re = (e, t) => ({
1184
1186
  }
1185
1187
  const i = n.operation, a = e.prosemirrorState.tr;
1186
1188
  it(a, [i.id], []);
1187
- const s = D(a);
1189
+ const s = $(a);
1188
1190
  for (const c of s)
1189
1191
  t.withDelays && await Q(c), e.transact((u) => {
1190
1192
  ee(u, c);
@@ -1192,7 +1194,7 @@ const re = (e, t) => ({
1192
1194
  }
1193
1195
  }
1194
1196
  });
1195
- function me(e) {
1197
+ function fe(e) {
1196
1198
  const t = e.lastIndexOf("<"), o = e.lastIndexOf(">");
1197
1199
  let r = e;
1198
1200
  if (t > o && (r = e.substring(0, t), !r.trim()))
@@ -1301,7 +1303,7 @@ const V = {
1301
1303
  var n;
1302
1304
  const o = (n = window.__TEST_OPTIONS) == null ? void 0 : n.mockID, r = (await Promise.all(
1303
1305
  t.operation.blocks.map(async (i) => {
1304
- const a = t.isPossiblyPartial ? me(i) : i;
1306
+ const a = t.isPossiblyPartial ? fe(i) : i;
1305
1307
  return a ? (await e.tryParseHTMLToBlocks(a)).map(
1306
1308
  (s) => (delete s.id, s)
1307
1309
  ) : [];
@@ -1330,7 +1332,7 @@ const V = {
1330
1332
  validateBlock: ye,
1331
1333
  rebaseTool: he,
1332
1334
  toJSONToolCall: async (e, t) => {
1333
- const o = t.isPossiblyPartial ? me(t.operation.block) : t.operation.block;
1335
+ const o = t.isPossiblyPartial ? fe(t.operation.block) : t.operation.block;
1334
1336
  if (!o)
1335
1337
  return;
1336
1338
  const r = (await e.tryParseHTMLToBlocks(o))[0];
@@ -1362,7 +1364,7 @@ function Yt(e, t, o, r, n) {
1362
1364
  ...i.delete ? [V.delete(e, { idsSuffixed: !0, withDelays: t, onBlockUpdate: n })] : []
1363
1365
  ];
1364
1366
  }
1365
- const ze = {
1367
+ const Ue = {
1366
1368
  /**
1367
1369
  * Function to get the stream tools that can apply HTML block updates to the editor
1368
1370
  */
@@ -1390,17 +1392,20 @@ async function Gt(e, t) {
1390
1392
  withDelays: s,
1391
1393
  dataFormat: c,
1392
1394
  previousResponse: u,
1393
- ...p
1395
+ ...m
1394
1396
  } = {
1395
1397
  maxRetries: 2,
1396
1398
  deleteEmptyCursorBlock: !0,
1397
1399
  stream: !0,
1398
1400
  withDelays: !0,
1399
- dataFormat: ze,
1401
+ dataFormat: Ue,
1400
1402
  ...t
1401
- }, l = t.promptBuilder ?? c.defaultPromptBuilder, m = c.getStreamTools, f = r ? void 0 : e.getTextCursorPosition().block, h = f && n && X(f) ? f.id : void 0, d = r ? e.getSelectionCutBlocks() : void 0;
1403
+ }, l = t.promptBuilder ?? c.defaultPromptBuilder, f = c.getStreamTools, p = r ? void 0 : e.getTextCursorPosition().block, h = p && n && X(p) && e.document.length > 1 ? p.id : void 0, d = r ? e.getSelectionCutBlocks() : void 0;
1402
1404
  let S;
1403
- u && (S = u.messages, S.push({
1405
+ u && (S = u.messages.map((w) => w.role === "user" && typeof w.content == "string" ? {
1406
+ role: "system",
1407
+ content: `USER_MESSAGE: ${w.content}`
1408
+ } : w), S.push({
1404
1409
  role: "assistant",
1405
1410
  content: `These are the operations returned by a previous LLM call:
1406
1411
  ` + JSON.stringify(
@@ -1412,40 +1417,40 @@ async function Gt(e, t) {
1412
1417
  userPrompt: o,
1413
1418
  excludeBlockIds: h ? [h] : void 0,
1414
1419
  previousMessages: S
1415
- }), k = m(
1420
+ }), g = f(
1416
1421
  e,
1417
1422
  s,
1418
1423
  t.defaultStreamTools,
1419
1424
  d ? { from: d._meta.startPos, to: d._meta.endPos } : void 0,
1420
1425
  t.onBlockUpdate
1421
1426
  );
1422
- let g;
1423
- return i ? g = await $t(
1424
- k,
1427
+ let k;
1428
+ return i ? k = await Dt(
1429
+ g,
1425
1430
  {
1426
1431
  messages: b,
1427
- ...p
1432
+ ...m
1428
1433
  },
1429
1434
  () => {
1430
1435
  h && e.removeBlocks([h]), a == null || a();
1431
1436
  }
1432
- ) : (g = await At(k, {
1437
+ ) : (k = await At(g, {
1433
1438
  messages: b,
1434
- ...p
1435
- }), h && e.removeBlocks([h]), a == null || a()), new qt(b, g, k);
1439
+ ...m
1440
+ }), h && e.removeBlocks([h]), a == null || a()), new qt(b, k, g);
1436
1441
  }
1437
- async function Ue(e, t) {
1442
+ async function ze(e, t) {
1438
1443
  const o = F(e.document), r = await C(
1439
1444
  T(o),
1440
1445
  async (s) => ({
1441
1446
  ...s,
1442
1447
  children: void 0
1443
1448
  })
1444
- ), i = U(e, r).filter(
1449
+ ), i = z(e, r).filter(
1445
1450
  (s) => "cursor" in s || !(t.excludeBlockIds || []).includes(s.id)
1446
1451
  );
1447
1452
  return {
1448
- jsonBlocks: L(i)
1453
+ jsonBlocks: x(i)
1449
1454
  };
1450
1455
  }
1451
1456
  async function Fe(e, t) {
@@ -1454,7 +1459,7 @@ async function Fe(e, t) {
1454
1459
  async (n) => n
1455
1460
  );
1456
1461
  return {
1457
- jsonSelectedBlocks: L(o),
1462
+ jsonSelectedBlocks: x(o),
1458
1463
  jsonDocument: (await C(T(e.document), async (n) => ({
1459
1464
  ...n,
1460
1465
  id: void 0,
@@ -1506,17 +1511,49 @@ function Xt(e) {
1506
1511
  role: "system",
1507
1512
  content: JSON.stringify(e.jsonBlocks)
1508
1513
  },
1514
+ ...e.isEmptyDocument ? [
1515
+ {
1516
+ role: "system",
1517
+ content: "Because the actual document is empty, this is an example document to understand the schema:"
1518
+ },
1519
+ {
1520
+ role: "system",
1521
+ content: JSON.stringify({
1522
+ id: "ref3",
1523
+ type: "paragraph",
1524
+ content: [
1525
+ {
1526
+ type: "text",
1527
+ text: "Hello, world! ",
1528
+ styles: {}
1529
+ },
1530
+ {
1531
+ type: "text",
1532
+ text: "Bold text. ",
1533
+ styles: {
1534
+ bold: !0
1535
+ }
1536
+ },
1537
+ {
1538
+ type: "link",
1539
+ href: "https://www.w3.org",
1540
+ content: "Link."
1541
+ }
1542
+ ]
1543
+ })
1544
+ }
1545
+ ] : [],
1509
1546
  {
1510
1547
  role: "system",
1511
1548
  content: "The user asks you to do the following:"
1512
1549
  },
1513
1550
  {
1514
- role: "user",
1515
- content: e.userPrompt
1551
+ role: "system",
1552
+ content: 'First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\n EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\n \n ' + (e.isEmptyDocument ? "Because the document is empty, first update the empty block before adding new blocks." : "Prefer updating existing blocks over removing and adding (but this also depends on the user's question).")
1516
1553
  },
1517
1554
  {
1518
- role: "system",
1519
- content: 'First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\n EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\n \n Prefer updating blocks over adding or removing (but this also depends on the user\'s question).'
1555
+ role: "user",
1556
+ content: e.userPrompt
1520
1557
  }
1521
1558
  ];
1522
1559
  }
@@ -1527,13 +1564,15 @@ const Qt = async (e, t) => {
1527
1564
  });
1528
1565
  return Kt({
1529
1566
  ...o,
1530
- userPrompt: t.userPrompt
1567
+ userPrompt: t.userPrompt,
1568
+ isEmptyDocument: e.isEmpty
1531
1569
  });
1532
1570
  } else {
1533
- const o = await Ue(e, t);
1571
+ const o = await ze(e, t);
1534
1572
  return Xt({
1535
1573
  ...o,
1536
- userPrompt: t.userPrompt
1574
+ userPrompt: t.userPrompt,
1575
+ isEmptyDocument: e.isEmpty
1537
1576
  });
1538
1577
  }
1539
1578
  };
@@ -1715,7 +1754,7 @@ function so(e) {
1715
1754
  }
1716
1755
  };
1717
1756
  }
1718
- function ke(e) {
1757
+ function ge(e) {
1719
1758
  return e = so(e).removeFileBlocks().removeDefaultProps().get(), {
1720
1759
  $defs: {
1721
1760
  styles: to(e.styleSchema),
@@ -1730,7 +1769,7 @@ function ke(e) {
1730
1769
  function Ve(e, t) {
1731
1770
  return !t.schema.inlineContentSchema[e.type] || at(e) && !("text" in e) ? !1 : ct(e) ? !("content" in e) || !("href" in e) ? !1 : Ve(e.content, t) : !0;
1732
1771
  }
1733
- function ge(e, t, o) {
1772
+ function ke(e, t, o) {
1734
1773
  const r = e.type || o, n = t.schema.blockSchema[r];
1735
1774
  if (!n)
1736
1775
  return {
@@ -1777,9 +1816,9 @@ const Z = {
1777
1816
  block: {
1778
1817
  $ref: "#/$defs/block"
1779
1818
  },
1780
- ...ke(e.schema)
1819
+ ...ge(e.schema)
1781
1820
  }),
1782
- validateBlock: ge,
1821
+ validateBlock: ke,
1783
1822
  rebaseTool: async (e, t) => H(t, R(t)),
1784
1823
  toJSONToolCall: async (e, t) => t.operation
1785
1824
  }),
@@ -1789,9 +1828,9 @@ const Z = {
1789
1828
  block: {
1790
1829
  $ref: "#/$defs/block"
1791
1830
  },
1792
- ...ke(e.schema)
1831
+ ...ge(e.schema)
1793
1832
  }),
1794
- validateBlock: ge,
1833
+ validateBlock: ke,
1795
1834
  rebaseTool: async (e, t) => H(t, R(t)),
1796
1835
  toJSONToolCall: async (e, t) => {
1797
1836
  const o = Object.fromEntries(
@@ -1844,7 +1883,7 @@ const ao = {
1844
1883
  * Helper functions which can be used when implementing a custom PromptBuilder
1845
1884
  */
1846
1885
  promptHelpers: {
1847
- getDataForPromptNoSelection: Ue,
1886
+ getDataForPromptNoSelection: ze,
1848
1887
  getDataForPromptWithSelection: Fe
1849
1888
  }
1850
1889
  };
@@ -1852,11 +1891,11 @@ async function Ze(e, t) {
1852
1891
  const o = F(e.document), r = await C(
1853
1892
  T(o),
1854
1893
  async (s) => e.blocksToMarkdownLossy([s])
1855
- ), i = U(e, r).filter(
1894
+ ), i = z(e, r).filter(
1856
1895
  (s) => "cursor" in s || !(t.excludeBlockIds || []).includes(s.id)
1857
1896
  );
1858
1897
  return {
1859
- markdownBlocks: L(i)
1898
+ markdownBlocks: x(i)
1860
1899
  };
1861
1900
  }
1862
1901
  async function We(e, t) {
@@ -1865,7 +1904,7 @@ async function We(e, t) {
1865
1904
  async (n) => e.blocksToMarkdownLossy([n])
1866
1905
  );
1867
1906
  return {
1868
- markdownSelectedBlocks: L(o),
1907
+ markdownSelectedBlocks: x(o),
1869
1908
  markdownDocument: (await C(T(e.document), async (n) => e.blocksToMarkdownLossy([n]))).map(({ block: n }) => ({ block: n }))
1870
1909
  // strip ids so LLM can't accidentally issue updates to ids not in selection
1871
1910
  };
@@ -1950,7 +1989,7 @@ async function be(e, t) {
1950
1989
  block: n[0]
1951
1990
  },
1952
1991
  o.doc
1953
- ), a = new Ie();
1992
+ ), a = new Ee();
1954
1993
  for (const s of i) {
1955
1994
  const c = s.map(a);
1956
1995
  if (!c)
@@ -2016,7 +2055,7 @@ const W = {
2016
2055
  }),
2017
2056
  delete: re
2018
2057
  };
2019
- function fo(e, t, o, r) {
2058
+ function po(e, t, o, r) {
2020
2059
  const n = {
2021
2060
  add: !0,
2022
2061
  update: !0,
@@ -2035,11 +2074,11 @@ function fo(e, t, o, r) {
2035
2074
  ...n.delete ? [W.delete(e, { idsSuffixed: !0, withDelays: t })] : []
2036
2075
  ];
2037
2076
  }
2038
- const po = {
2077
+ const mo = {
2039
2078
  /**
2040
2079
  * Function to get the stream tools that can apply BlockNote Markdown block updates to the editor
2041
2080
  */
2042
- getStreamTools: fo,
2081
+ getStreamTools: po,
2043
2082
  /**
2044
2083
  * The default PromptBuilder that determines how a userPrompt is converted to an array of
2045
2084
  * LLM Messages (CoreMessage[])
@@ -2053,18 +2092,18 @@ const po = {
2053
2092
  getDataForPromptWithSelection: We
2054
2093
  }
2055
2094
  }, ir = {
2056
- addCursorPosition: U,
2095
+ addCursorPosition: z,
2057
2096
  flattenBlocks: T,
2058
- suffixIDs: L,
2097
+ suffixIDs: x,
2059
2098
  trimEmptyBlocks: F,
2060
2099
  convertBlocks: C
2061
- }, mo = {
2100
+ }, fo = {
2062
2101
  _experimental_json: ao,
2063
- _experimental_markdown: po,
2064
- html: ze
2102
+ _experimental_markdown: mo,
2103
+ html: Ue
2065
2104
  }, we = new _e("blocknote-agent-cursor");
2066
2105
  function ho(e) {
2067
- return new xe({
2106
+ return new Le({
2068
2107
  key: we,
2069
2108
  view: (t) => ({}),
2070
2109
  state: {
@@ -2109,7 +2148,7 @@ const yo = (e) => {
2109
2148
  o.setAttribute("contentedEditable", "false"), o.classList.add("bn-collaboration-cursor__caret"), o.setAttribute("style", `background-color: ${e.color}`);
2110
2149
  const r = document.createElement("span");
2111
2150
  return r.classList.add("bn-collaboration-cursor__label"), r.setAttribute("style", `background-color: ${e.color}`), r.insertBefore(document.createTextNode(e.name), null), o.insertBefore(r, null), t.insertBefore(document.createTextNode("⁠"), null), t.insertBefore(o, null), t.insertBefore(document.createTextNode("⁠"), null), t;
2112
- }, ko = new _e("blocknote-ai-plugin");
2151
+ }, go = new _e("blocknote-ai-plugin");
2113
2152
  class Ye extends lt {
2114
2153
  /**
2115
2154
  * @internal use `createAIExtension` instead
@@ -2118,7 +2157,7 @@ class Ye extends lt {
2118
2157
  super();
2119
2158
  j(this, "previousRequestOptions");
2120
2159
  // internal store including setters
2121
- j(this, "_store", fe()((o) => ({
2160
+ j(this, "_store", pe()((o) => ({
2122
2161
  aiMenuState: "closed"
2123
2162
  })));
2124
2163
  /**
@@ -2126,20 +2165,20 @@ class Ye extends lt {
2126
2165
  * These options are used by default across all LLM calls when calling {@link doLLMRequest}
2127
2166
  */
2128
2167
  j(this, "options");
2129
- this.editor = o, this.options = fe()((n) => ({
2130
- dataFormat: mo.html,
2168
+ this.editor = o, this.options = pe()((n) => ({
2169
+ dataFormat: fo.html,
2131
2170
  stream: !0,
2132
2171
  ...r
2133
2172
  })), this.addProsemirrorPlugin(
2134
- new xe({
2135
- key: ko,
2173
+ new Le({
2174
+ key: go,
2136
2175
  filterTransaction: (n) => {
2137
2176
  var a;
2138
2177
  const i = this.store.getState().aiMenuState;
2139
- return !(i !== "closed" && i.status === "ai-writing" && (a = n.getMeta(gt)) != null && a.fixTables);
2178
+ return !(i !== "closed" && i.status === "ai-writing" && (a = n.getMeta(kt)) != null && a.fixTables);
2140
2179
  }
2141
2180
  })
2142
- ), this.addProsemirrorPlugin(ft()), this.addProsemirrorPlugin(
2181
+ ), this.addProsemirrorPlugin(pt()), this.addProsemirrorPlugin(
2143
2182
  ho(
2144
2183
  r.agentCursor || { name: "AI", color: "#8bc6ff" }
2145
2184
  )
@@ -2303,7 +2342,7 @@ function ar(e) {
2303
2342
  function O(e) {
2304
2343
  return e.extension(Ye);
2305
2344
  }
2306
- const go = (e, t) => async (o, r) => {
2345
+ const ko = (e, t) => async (o, r) => {
2307
2346
  const n = new Request(o, r), i = new Request(
2308
2347
  `${e}?provider=${encodeURIComponent(
2309
2348
  t
@@ -2342,7 +2381,7 @@ function cr(e) {
2342
2381
  */
2343
2382
  getProviderSettings: (t) => ({
2344
2383
  apiKey: e.apiKey,
2345
- fetch: go(e.baseURL, t)
2384
+ fetch: ko(e.baseURL, t)
2346
2385
  })
2347
2386
  };
2348
2387
  }
@@ -2393,7 +2432,7 @@ function ve(e, t) {
2393
2432
  }
2394
2433
  return o;
2395
2434
  }
2396
- function z(e) {
2435
+ function U(e) {
2397
2436
  for (var t = 1; t < arguments.length; t++) {
2398
2437
  var o = arguments[t] != null ? arguments[t] : {};
2399
2438
  t % 2 ? ve(Object(o), !0).forEach(function(r) {
@@ -2422,13 +2461,13 @@ function Co(e, t) {
2422
2461
  return (t === "string" ? String : Number)(e);
2423
2462
  }
2424
2463
  function Ke(e) {
2425
- return e && e.map((t, o) => /* @__PURE__ */ B.createElement(t.tag, z({
2464
+ return e && e.map((t, o) => /* @__PURE__ */ B.createElement(t.tag, U({
2426
2465
  key: o
2427
2466
  }, t.attr), Ke(t.child)));
2428
2467
  }
2429
2468
  function v(e) {
2430
2469
  return (t) => /* @__PURE__ */ B.createElement(Po, q({
2431
- attr: z({}, e.attr)
2470
+ attr: U({}, e.attr)
2432
2471
  }, t), Ke(e.child));
2433
2472
  }
2434
2473
  function Po(e) {
@@ -2444,7 +2483,7 @@ function Po(e) {
2444
2483
  strokeWidth: "0"
2445
2484
  }, o.attr, r, a, {
2446
2485
  className: c,
2447
- style: z(z({
2486
+ style: U(U({
2448
2487
  color: e.color || o.color
2449
2488
  }, o.style), e.style),
2450
2489
  height: s,
@@ -2469,19 +2508,19 @@ function Mo(e) {
2469
2508
  function Bo(e) {
2470
2509
  return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M15 18H16.5C17.8807 18 19 16.8807 19 15.5C19 14.1193 17.8807 13 16.5 13H3V11H16.5C18.9853 11 21 13.0147 21 15.5C21 17.9853 18.9853 20 16.5 20H15V22L11 19L15 16V18ZM3 4H21V6H3V4ZM9 18V20H3V18H9Z" }, child: [] }] })(e);
2471
2510
  }
2472
- function Lo(e) {
2511
+ function xo(e) {
2473
2512
  return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M13 6V21H11V6H5V4H19V6H13Z" }, child: [] }] })(e);
2474
2513
  }
2475
- function xo(e) {
2514
+ function Lo(e) {
2476
2515
  return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M6.23509 6.45329C4.85101 7.89148 4 9.84636 4 12C4 16.4183 7.58172 20 12 20C13.0808 20 14.1116 19.7857 15.0521 19.3972C15.1671 18.6467 14.9148 17.9266 14.8116 17.6746C14.582 17.115 13.8241 16.1582 12.5589 14.8308C12.2212 14.4758 12.2429 14.2035 12.3636 13.3943L12.3775 13.3029C12.4595 12.7486 12.5971 12.4209 14.4622 12.1248C15.4097 11.9746 15.6589 12.3533 16.0043 12.8777C16.0425 12.9358 16.0807 12.9928 16.1198 13.0499C16.4479 13.5297 16.691 13.6394 17.0582 13.8064C17.2227 13.881 17.428 13.9751 17.7031 14.1314C18.3551 14.504 18.3551 14.9247 18.3551 15.8472V15.9518C18.3551 16.3434 18.3168 16.6872 18.2566 16.9859C19.3478 15.6185 20 13.8854 20 12C20 8.70089 18.003 5.8682 15.1519 4.64482C14.5987 5.01813 13.8398 5.54726 13.575 5.91C13.4396 6.09538 13.2482 7.04166 12.6257 7.11976C12.4626 7.14023 12.2438 7.12589 12.012 7.11097C11.3905 7.07058 10.5402 7.01606 10.268 7.75495C10.0952 8.2232 10.0648 9.49445 10.6239 10.1543C10.7134 10.2597 10.7307 10.4547 10.6699 10.6735C10.59 10.9608 10.4286 11.1356 10.3783 11.1717C10.2819 11.1163 10.0896 10.8931 9.95938 10.7412C9.64554 10.3765 9.25405 9.92233 8.74797 9.78176C8.56395 9.73083 8.36166 9.68867 8.16548 9.64736C7.6164 9.53227 6.99443 9.40134 6.84992 9.09302C6.74442 8.8672 6.74488 8.55621 6.74529 8.22764C6.74529 7.8112 6.74529 7.34029 6.54129 6.88256C6.46246 6.70541 6.35689 6.56446 6.23509 6.45329ZM12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22Z" }, child: [] }] })(e);
2477
2516
  }
2478
2517
  function _o(e) {
2479
2518
  return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" }, child: [] }] })(e);
2480
2519
  }
2481
- function Io(e) {
2520
+ function Eo(e) {
2482
2521
  return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" }, child: [] }] })(e);
2483
2522
  }
2484
- function Eo(e) {
2523
+ function Io(e) {
2485
2524
  return v({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M12 4C9.4095 4 7.10606 5.23053 5.64274 7.14274L8 9.5H2V3.5L4.21863 5.71863C6.05061 3.452 8.85558 2 12 2 17.5228 2 22 6.47715 22 12H20C20 7.58172 16.4183 4 12 4ZM4 12C4 16.4183 7.58172 20 12 20 14.5905 20 16.894 18.7695 18.3573 16.8573L16 14.5 22 14.5V20.5L19.7814 18.2814C17.9494 20.548 15.1444 22 12 22 6.47715 22 2 17.5228 2 12H4Z" }, child: [] }] })(e);
2486
2525
  }
2487
2526
  function ne(e) {
@@ -2497,26 +2536,26 @@ function Qe() {
2497
2536
  return _(e.editor);
2498
2537
  }
2499
2538
  const No = (e) => {
2500
- const t = G(), { onManualPromptSubmit: o, promptText: r, onPromptTextChange: n } = e, [i, a] = Ee(""), s = r || i, c = $(
2539
+ const t = G(), { onManualPromptSubmit: o, promptText: r, onPromptTextChange: n } = e, [i, a] = Ie(""), s = r || i, c = D(
2501
2540
  async (d) => {
2502
2541
  d.key === "Enter" && o(s);
2503
2542
  },
2504
2543
  [s, o]
2505
- ), u = $(
2544
+ ), u = D(
2506
2545
  (d) => {
2507
2546
  const S = d.currentTarget.value;
2508
2547
  n && n(S), r === void 0 && a(S);
2509
2548
  },
2510
2549
  [n, a, r]
2511
- ), p = I(() => ut(e.items, s), [s, e.items]), { selectedIndex: l, setSelectedIndex: m, handler: f } = Pt(p, (d) => d.onItemClick()), h = $(
2550
+ ), m = E(() => ut(e.items, s), [s, e.items]), { selectedIndex: l, setSelectedIndex: f, handler: p } = Pt(m, (d) => d.onItemClick()), h = D(
2512
2551
  (d) => {
2513
- d.key === "Enter" ? p.length > 0 ? f(d) : c(d) : f(d);
2552
+ d.key === "Enter" ? m.length > 0 ? p(d) : c(d) : p(d);
2514
2553
  },
2515
- [c, f, p.length]
2554
+ [c, p, m.length]
2516
2555
  );
2517
2556
  return Ne(() => {
2518
- m(0);
2519
- }, [s, m]), /* @__PURE__ */ vt("div", { className: "bn-combobox", children: [
2557
+ f(0);
2558
+ }, [s, f]), /* @__PURE__ */ vt("div", { className: "bn-combobox", children: [
2520
2559
  /* @__PURE__ */ y(t.Generic.Form.Root, { children: /* @__PURE__ */ y(
2521
2560
  t.Generic.Form.TextInput,
2522
2561
  {
@@ -2540,7 +2579,7 @@ const No = (e) => {
2540
2579
  {
2541
2580
  className: "bn-combobox-items",
2542
2581
  id: "ai-suggestion-menu",
2543
- children: p.map((d, S) => /* @__PURE__ */ y(
2582
+ children: m.map((d, S) => /* @__PURE__ */ y(
2544
2583
  t.SuggestionMenu.Item,
2545
2584
  {
2546
2585
  className: dt(
@@ -2634,7 +2673,7 @@ function jo(e) {
2634
2673
  key: "improve_writing",
2635
2674
  title: t.ai_default_commands.improve_writing.title,
2636
2675
  aliases: t.ai_default_commands.improve_writing.aliases,
2637
- icon: /* @__PURE__ */ y(Lo, { size: 18 }),
2676
+ icon: /* @__PURE__ */ y(xo, { size: 18 }),
2638
2677
  onItemClick: async () => {
2639
2678
  await o.callLLM({
2640
2679
  useSelection: !0,
@@ -2653,7 +2692,7 @@ function jo(e) {
2653
2692
  key: "fix_spelling",
2654
2693
  title: t.ai_default_commands.fix_spelling.title,
2655
2694
  aliases: t.ai_default_commands.fix_spelling.aliases,
2656
- icon: /* @__PURE__ */ y(Io, { size: 18 }),
2695
+ icon: /* @__PURE__ */ y(Eo, { size: 18 }),
2657
2696
  onItemClick: async () => {
2658
2697
  await o.callLLM({
2659
2698
  useSelection: !0,
@@ -2672,7 +2711,7 @@ function jo(e) {
2672
2711
  key: "translate",
2673
2712
  title: t.ai_default_commands.translate.title,
2674
2713
  aliases: t.ai_default_commands.translate.aliases,
2675
- icon: /* @__PURE__ */ y(xo, { size: 18 }),
2714
+ icon: /* @__PURE__ */ y(Lo, { size: 18 }),
2676
2715
  onItemClick: (r) => {
2677
2716
  r(t.ai_default_commands.translate.prompt_placeholder);
2678
2717
  },
@@ -2699,7 +2738,7 @@ function jo(e) {
2699
2738
  }
2700
2739
  ];
2701
2740
  }
2702
- function $o(e) {
2741
+ function Do(e) {
2703
2742
  const t = _(e), o = O(e);
2704
2743
  return [
2705
2744
  {
@@ -2724,14 +2763,14 @@ function $o(e) {
2724
2763
  }
2725
2764
  ];
2726
2765
  }
2727
- function Do(e) {
2766
+ function $o(e) {
2728
2767
  const t = _(e), o = O(e);
2729
2768
  return [
2730
2769
  {
2731
2770
  key: "retry",
2732
2771
  title: t.ai_menu.actions.retry.title,
2733
2772
  aliases: t.ai_menu.actions.retry.aliases,
2734
- icon: /* @__PURE__ */ y(Eo, { size: 18 }),
2773
+ icon: /* @__PURE__ */ y(Io, { size: 18 }),
2735
2774
  onItemClick: async () => {
2736
2775
  await o.retry();
2737
2776
  },
@@ -2750,24 +2789,24 @@ function Do(e) {
2750
2789
  ];
2751
2790
  }
2752
2791
  function Ro(e, t) {
2753
- return t === "user-input" ? e.getSelection() ? jo(e) : Ao(e) : t === "user-reviewing" ? $o(e) : t === "error" ? Do(e) : [];
2792
+ return t === "user-input" ? e.getSelection() ? jo(e) : Ao(e) : t === "user-reviewing" ? Do(e) : t === "error" ? $o(e) : [];
2754
2793
  }
2755
2794
  const Ho = (e) => {
2756
- const t = K(), [o, r] = Ee(""), n = Qe(), i = G(), a = O(t), s = Ae(
2795
+ const t = K(), [o, r] = Ie(""), n = Qe(), i = G(), a = O(t), s = Ae(
2757
2796
  a.store,
2758
- (f) => f.aiMenuState !== "closed" ? f.aiMenuState.status : "closed"
2759
- ), { items: c } = e, u = I(() => {
2760
- let f = [];
2761
- return c ? f = c(t, s) : f = Ro(t, s), f.map((h) => ({
2797
+ (p) => p.aiMenuState !== "closed" ? p.aiMenuState.status : "closed"
2798
+ ), { items: c } = e, u = E(() => {
2799
+ let p = [];
2800
+ return c ? p = c(t, s) : p = Ro(t, s), p.map((h) => ({
2762
2801
  ...h,
2763
2802
  onItemClick: () => {
2764
2803
  h.onItemClick(r);
2765
2804
  }
2766
2805
  }));
2767
- }, [c, s, t]), p = $(
2768
- async (f) => {
2806
+ }, [c, s, t]), m = D(
2807
+ async (p) => {
2769
2808
  await a.callLLM({
2770
- userPrompt: f,
2809
+ userPrompt: p,
2771
2810
  useSelection: t.getSelection() !== void 0
2772
2811
  });
2773
2812
  },
@@ -2776,7 +2815,7 @@ const Ho = (e) => {
2776
2815
  Ne(() => {
2777
2816
  (s === "user-reviewing" || s === "error") && r("");
2778
2817
  }, [s]);
2779
- const l = I(() => s === "thinking" ? n.ai_menu.status.thinking : s === "ai-writing" ? n.ai_menu.status.editing : s === "error" ? n.ai_menu.status.error : n.ai_menu.input_placeholder, [s, n]), m = I(() => {
2818
+ const l = E(() => s === "thinking" ? n.ai_menu.status.thinking : s === "ai-writing" ? n.ai_menu.status.editing : s === "error" ? n.ai_menu.status.error : n.ai_menu.input_placeholder, [s, n]), f = E(() => {
2780
2819
  if (s === "thinking" || s === "ai-writing")
2781
2820
  return /* @__PURE__ */ y(
2782
2821
  i.SuggestionMenu.Loader,
@@ -2800,18 +2839,18 @@ const Ho = (e) => {
2800
2839
  return /* @__PURE__ */ y(
2801
2840
  No,
2802
2841
  {
2803
- onManualPromptSubmit: e.onManualPromptSubmit || p,
2842
+ onManualPromptSubmit: e.onManualPromptSubmit || m,
2804
2843
  items: u,
2805
2844
  promptText: o,
2806
2845
  onPromptTextChange: r,
2807
2846
  placeholder: l,
2808
2847
  disabled: s === "thinking" || s === "ai-writing",
2809
2848
  icon: /* @__PURE__ */ y("div", { className: "bn-combobox-icon", children: /* @__PURE__ */ y(ne, {}) }),
2810
- rightSection: m
2849
+ rightSection: f
2811
2850
  }
2812
2851
  );
2813
2852
  }, qo = (e) => {
2814
- const t = e.blockID ? document.querySelector(`[data-id="${e.blockID}"]`) : void 0, o = I(() => t ? {
2853
+ const t = e.blockID ? document.querySelector(`[data-id="${e.blockID}"]`) : void 0, o = E(() => t ? {
2815
2854
  getBoundingClientRect: () => t.getBoundingClientRect(),
2816
2855
  contextElement: t
2817
2856
  } : null, [t]), { isMounted: r, ref: n, style: i, getFloatingProps: a, isPositioned: s } = Ot(!!t, o, 3e3, {
@@ -2833,7 +2872,7 @@ const Ho = (e) => {
2833
2872
  })
2834
2873
  ],
2835
2874
  onOpenChange: e.onOpenChange,
2836
- whileElementsMounted: (c, u, p) => Lt(c, u, p, {
2875
+ whileElementsMounted: (c, u, m) => xt(c, u, m, {
2837
2876
  animationFrame: !0
2838
2877
  })
2839
2878
  });
@@ -2880,7 +2919,7 @@ const Ho = (e) => {
2880
2919
  onClick: n
2881
2920
  }
2882
2921
  ) : null;
2883
- }, zo = {
2922
+ }, Uo = {
2884
2923
  AI: ne
2885
2924
  };
2886
2925
  function dr(e) {
@@ -2894,7 +2933,7 @@ function dr(e) {
2894
2933
  r.block.content.length === 0 && r.prevBlock ? t.openAIMenuAtBlock(r.prevBlock.id) : t.openAIMenuAtBlock(r.block.id);
2895
2934
  },
2896
2935
  ..._(e).slash_menu.ai,
2897
- icon: /* @__PURE__ */ y(zo.AI, {})
2936
+ icon: /* @__PURE__ */ y(Uo.AI, {})
2898
2937
  }
2899
2938
  ];
2900
2939
  }
@@ -2912,7 +2951,7 @@ export {
2912
2951
  O as getAIExtension,
2913
2952
  dr as getAISlashMenuItems,
2914
2953
  Ro as getDefaultAIMenuItems,
2915
- mo as llmFormats,
2954
+ fo as llmFormats,
2916
2955
  ir as promptHelpers
2917
2956
  };
2918
2957
  //# sourceMappingURL=blocknote-xl-ai.js.map