@homecode/ui 5.3.7 → 5.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +1 -1
- package/dist/esm/src/components/Autocomplete/Autocomplete.js +0 -2
- package/dist/esm/src/components/Draggable/Draggable.js +0 -1
- package/dist/esm/src/components/Gallery/Gallery.js +1 -1
- package/dist/esm/src/components/InputFile/InputFile.js +1 -2
- package/dist/esm/src/components/Popup/Popup.helpers.js +0 -1
- package/dist/esm/src/components/PromptComposer/PromptComposer.js +3 -1
- package/dist/esm/src/components/PromptComposer/promptComposerInsert.js +18 -1
- package/dist/esm/src/components/PromptComposer/usePromptComposerEditor.js +9 -4
- package/dist/esm/src/components/Router/store.js +0 -1
- package/dist/esm/src/components/Select/Select.js +2 -3
- package/dist/esm/src/components/Select/Select2.js +1 -1
- package/dist/esm/src/components/Text/Text.js +0 -1
- package/dist/esm/src/components/VH/VH.js +0 -1
- package/dist/esm/src/components/Virtualized/List/List.js +1 -2
- package/dist/esm/src/components/Virtualized/Virtualized.js +1 -1
- package/dist/esm/src/hooks/useListKeyboardControl.js +4 -0
- package/dist/esm/src/tiptap/slash-mention/SlashSuggestionList.js +2 -1
- package/dist/esm/src/tiptap/slash-mention/createSlashMentionExtension.js +10 -4
- package/dist/esm/src/tools/dom.js +0 -1
- package/dist/esm/src/tools/object.js +16 -1
- package/dist/esm/src/tools/resizeObserver.js +1 -1
- package/dist/esm/types/src/components/Notifications/Notifications.d.ts +2 -2
- package/dist/esm/types/src/components/Notifications/store.d.ts +2 -2
- package/dist/esm/types/src/components/PromptComposer/PromptComposer.d.ts +2 -1
- package/dist/esm/types/src/components/PromptComposer/PromptComposer.types.d.ts +3 -1
- package/dist/esm/types/src/components/PromptComposer/index.d.ts +1 -1
- package/dist/esm/types/src/components/PromptComposer/promptComposerInsert.d.ts +3 -0
- package/dist/esm/types/src/components/PromptComposer/usePromptComposerEditor.d.ts +3 -2
- package/dist/esm/types/src/components/Router/Router.d.ts +2 -2
- package/dist/esm/types/src/components/Router/store.d.ts +4 -4
- package/dist/esm/types/src/components/Select/Select.types.d.ts +1 -1
- package/dist/esm/types/src/services/i18n.d.ts +4 -4
- package/dist/esm/types/src/tools/object.d.ts +2 -0
- package/graphify-out/.graphify_labels.json +219 -0
- package/graphify-out/.graphify_python +1 -0
- package/graphify-out/.graphify_root +1 -0
- package/graphify-out/2026-06-18/.graphify_labels.json +219 -0
- package/graphify-out/2026-06-18/GRAPH_REPORT.md +1008 -0
- package/graphify-out/2026-06-18/cost.json +12 -0
- package/graphify-out/2026-06-18/graph.json +68467 -0
- package/graphify-out/2026-06-18/manifest.json +2262 -0
- package/graphify-out/GRAPH_REPORT.md +1008 -0
- package/graphify-out/cache/ast/00346d96a76a1f06ea9bc36ab1d0e12681a94e47a7c65ef93f5e2f1751b009ca.json +1 -0
- package/graphify-out/cache/ast/0fdeea4db8e141ebab07bf243987272f54facc2456c38a7a307a51349b0cd614.json +1 -0
- package/graphify-out/cache/ast/14988f05c120c67aaaf89402115ac549696b70918f71f5452fcb487cf88a3e78.json +1 -0
- package/graphify-out/cache/ast/1abef75ab6fbd60f67ffc8f02d7754a8d17f5f8aaff67431ef17ef91d0b19293.json +1 -0
- package/graphify-out/cache/ast/42bf1e462fac54def8ffb8ac0d2815f50a9b0153253b989db83a73c129550108.json +1 -0
- package/graphify-out/cache/ast/60a7a206457546b362df11b1fb0574fcffa9aef15ea634770e10fb3bd10318b4.json +1 -0
- package/graphify-out/cache/ast/64dfe527ce1f7047bf3626b788b056b8541dd3b49f4067f978da9d845df2852d.json +1 -0
- package/graphify-out/cache/ast/72c82f7c05412fdcefa9df4a90e647e33f7c92f391a27d164861260964f294fd.json +1 -0
- package/graphify-out/cache/ast/aabc79823e5e3e59c3543e385f6142697b6c9ffa8d64be6a601b16f5a401f84d.json +1 -0
- package/graphify-out/cache/ast/b0183d2742b6512fad31da35ebb8e6af9599e614d7f085e986daf10ce11bd614.json +1 -0
- package/graphify-out/cache/ast/bdfba7e439d8215261b9abab976ea9b018a0947580ed37c46a61113e90ddde95.json +1 -0
- package/graphify-out/cache/ast/bfb8fd3a37bd702d28e1ec5d651be8cf421ef1ccc0952b7ca86f82612f1ac855.json +1 -0
- package/graphify-out/cache/semantic/015f234a8437b74659356b0c7cf8e93f8eff41ca3104f7925e3bffcae47f3c72.json +1 -0
- package/graphify-out/cache/semantic/046a46acc84330d3b7a64b11577ae374cb7c561aac396c622d288ed4ee85b873.json +1 -0
- package/graphify-out/cache/semantic/04fa096cde049f636eb4e483e2ee7cc188a18f1b1de12f11681fe43241134e06.json +1 -0
- package/graphify-out/cache/semantic/052873cbc2d4a1760c2cedba851afd43b53895be4b8c1eeda1a86cf532ef4a9d.json +1 -0
- package/graphify-out/cache/semantic/0afebf341ec4de64948fb4ba7047121637233380f69b829ec38e14b7b2cfbf76.json +1 -0
- package/graphify-out/cache/semantic/0bc94d402610976edc02c8b8fe1df6012a7246f47ae75e94810e4716f5788dc0.json +1 -0
- package/graphify-out/cache/semantic/0fdeea4db8e141ebab07bf243987272f54facc2456c38a7a307a51349b0cd614.json +1 -0
- package/graphify-out/cache/semantic/199cac5b62378221d8f26f85f9ddf562f4bd59c06ee0259affbae994323b4031.json +1 -0
- package/graphify-out/cache/semantic/1fc9c9e36dedd810d8845f96a6781152481344e01f53c7095eec2d5afd3f7769.json +1 -0
- package/graphify-out/cache/semantic/20f558bf7b782614829802a8c1460dad9c0c5e53a16c426937804710c86e04e6.json +1 -0
- package/graphify-out/cache/semantic/26d475e8b831b100a4ab3ea3ce8e013c370a16147a15fdf61d40f496da8489db.json +1 -0
- package/graphify-out/cache/semantic/2946657a126b41149c3582a068ef3480ce7c977546d94b825d204fe2accceb8a.json +1 -0
- package/graphify-out/cache/semantic/29e9ac0ff47578aeb03bbeb9dc9970ef2f92513c16c9451d1bf020ebb5727d83.json +1 -0
- package/graphify-out/cache/semantic/2a1164e229054695f9bafb93e04c334c29ffedfa4969d327cc8feb91a107a464.json +1 -0
- package/graphify-out/cache/semantic/2f4bffad646428447919313cb61e2b1240234053128cc78498e960109174aef4.json +1 -0
- package/graphify-out/cache/semantic/305f670d07659733e228abe6e79e5e42d8f0b2b1825abda5bb9b944c91a63976.json +1 -0
- package/graphify-out/cache/semantic/4038cbf93d048b57b03fa8d2606a44c2e4cec947f1b8c464263a4ba8d6df24e8.json +1 -0
- package/graphify-out/cache/semantic/40b29be54a920198a3a3f720ea44ce8599c0641b4db7199a2815b9686de3edb1.json +1 -0
- package/graphify-out/cache/semantic/41962b28af47a037208fc80a409314c9ae5a5c5a726ea913134c38f4d748015a.json +1 -0
- package/graphify-out/cache/semantic/41b108238ab072aa4b39e5f271ff625f3f273b1742027595d1732029b2da7c83.json +1 -0
- package/graphify-out/cache/semantic/41cd712038a93ea27d3729b394b12f64a6e64daa36a20162ed1e3e8acddae4c3.json +1 -0
- package/graphify-out/cache/semantic/437df45b75a68c9952dcd61fda7642dcbe2d9a7ac7d318086efe6ecd739ba991.json +1 -0
- package/graphify-out/cache/semantic/48e4ee5bd85d3a18e98b3e9f6915ec15f60ecb422100931bc1acf6a737f4fa4d.json +1 -0
- package/graphify-out/cache/semantic/4ab88d3f555a3241cec0ff801f5d2ca28ecb8463e2b03fbe05e62233c2ef65a7.json +1 -0
- package/graphify-out/cache/semantic/4def2888ec417f9936441998b8c0e21feb5f9f2bded6c1cc4aaaccb1aaed7756.json +1 -0
- package/graphify-out/cache/semantic/5465e865a7ccf7df8938e341597e8d4222f6230b01df40a8e516918db20ae8fa.json +1 -0
- package/graphify-out/cache/semantic/547235ff1f7a65ae5b0216d8869e2deff3e2d1767142bc2b2e6720cf80451c1c.json +1 -0
- package/graphify-out/cache/semantic/5973310dcf9b1314c6372847614e2ee10c2277b95a7cc9662fe5ddb5c4175858.json +1 -0
- package/graphify-out/cache/semantic/5d030e47120503defde17c904de484e32ac7bcd219c1fd2a746c36ff76821249.json +1 -0
- package/graphify-out/cache/semantic/5e8027c02a797dd984c245c9cb3d2a487bea7b2f172b63477dd1242e066f3bcd.json +1 -0
- package/graphify-out/cache/semantic/5f4a70a338c123e7886c29afa8f53730c02706fd294b6aa9fb4b3a36155c70cd.json +1 -0
- package/graphify-out/cache/semantic/60233df9b32ea458c4a1955f08234e2468dee893537b014cf611b7f70e99b2cc.json +1 -0
- package/graphify-out/cache/semantic/60a7a206457546b362df11b1fb0574fcffa9aef15ea634770e10fb3bd10318b4.json +1 -0
- package/graphify-out/cache/semantic/63480e84144afdb2d52824745423c11c5b1be382af8c2ff41d59dc6cb19162c7.json +1 -0
- package/graphify-out/cache/semantic/63683ed092288dd5efab32f115e2b5a5cc9237d18bedeb0e0254d25665472161.json +1 -0
- package/graphify-out/cache/semantic/65b29460c6daea292031ac815e82d56de9622f9ec13519424aaf1e69c9547945.json +1 -0
- package/graphify-out/cache/semantic/67b08fc0156de884418c6db4f006c7339aa6bd77b616e58192f845455f4caa1f.json +1 -0
- package/graphify-out/cache/semantic/697849a9ef29f1ab7a3419cd8f51f95697a82338fbdb1c19cb39471576d220f6.json +1 -0
- package/graphify-out/cache/semantic/6addf1cfd544bb2f4b50373446481115e1a82c35ff0728c1aa2cdbbf79f781f8.json +1 -0
- package/graphify-out/cache/semantic/6c91f59da0baa5be4f2830ba1bcb5566168fa95ac29519af26872f46a6787d23.json +1 -0
- package/graphify-out/cache/semantic/6f7d7e9162d521d3bdee5046e53d770cda25bfc99831c59287a973a81f59667e.json +1 -0
- package/graphify-out/cache/semantic/70493d07c6879f209a7a4c91a94048085979f6e286c2ffe8f58994b3fe3be652.json +1 -0
- package/graphify-out/cache/semantic/71b30a36162a55f7dbe8ff20a34da79618ffa70e1bcbe5ba3f8077f6f840173f.json +1 -0
- package/graphify-out/cache/semantic/71ed746eb0c550874e6effce0af4ecf17e683b0dbcb303808d493a1b02803111.json +1 -0
- package/graphify-out/cache/semantic/7561f78cc00b76e25fd37de39b6c700e1d09da8ce056f0c7428e4568fd681786.json +1 -0
- package/graphify-out/cache/semantic/77a8a2e9c0596b440279167560f6f11cc25b63c07d0313169cad28a3a55214cc.json +1 -0
- package/graphify-out/cache/semantic/7ab7f6f8dec9b6505f5a1ccc3a9b8211d808ff387e0d5e493907e2ef77968f65.json +1 -0
- package/graphify-out/cache/semantic/7d2bc6ec28b494d581cc059125218e23e5a01cbca01a383e02ae66292b5671aa.json +1 -0
- package/graphify-out/cache/semantic/7d8851929ecb0b7634e6fbf6a1e9518b40b5ba55d84c7b87f9921c0b76d28b68.json +1 -0
- package/graphify-out/cache/semantic/7fabc8ec7f6abf3c9d32f48c1b96148b1b238485510f1bf8f604904e5e9b7640.json +1 -0
- package/graphify-out/cache/semantic/825a5f5e545cb7b33a550a8dc396e082ef79a46973556dfe83a42ab8b04fc8ad.json +1 -0
- package/graphify-out/cache/semantic/83f8b730266d7ad38ce226c24e12921b8f6179470d8eaf3ad969b35930508a1b.json +1 -0
- package/graphify-out/cache/semantic/87b463fb0697667c7b3f9857f1e5507d79f41ca62295255f953481b58f95c97d.json +1 -0
- package/graphify-out/cache/semantic/88f01bfa0e795399148476fe7da92f06d6cf1cfd1904d13b0d23d4f8f1549bbb.json +1 -0
- package/graphify-out/cache/semantic/89c9af422deed22cf3fcd273c80423e70d585b6d75dddc67aab761f9ab038370.json +1 -0
- package/graphify-out/cache/semantic/8fec9bc14c17533cb1f3fd0b3d3e753c84d41ec1bfc5fa26d37de9138829908e.json +1 -0
- package/graphify-out/cache/semantic/94854def2ce6ba82bbf802acf63e41a518cf33693a2abf65966cac6b63aa6872.json +1 -0
- package/graphify-out/cache/semantic/9616ede4f0dba798e38970e707b96d54c92fdf14bbf98d725f778612cadfc809.json +1 -0
- package/graphify-out/cache/semantic/9863045ab7773fe3e393a0d14520e05220c107ad66c22ef76d584526fc394c7c.json +1 -0
- package/graphify-out/cache/semantic/99e248f766d6f88dfb2cd75388e8f6d2913b8215823c74bfb30a3de29a3938f7.json +1 -0
- package/graphify-out/cache/semantic/9e145d7b658d5b0aa5dcfd02ed3656bd2b16b2266f964c65ed09e55ab09133a5.json +1 -0
- package/graphify-out/cache/semantic/9eae2d0eb2e11ad9797c5cc8c690024fa06510fb93318f2a67412ea61c879597.json +1 -0
- package/graphify-out/cache/semantic/a29bda455dec5f719a56663638ec554474c2ba450f8f67bd9706fe397b7bc1e2.json +1 -0
- package/graphify-out/cache/semantic/a4fae20e66e60fee154de812889afebd9a8d03b9f88a4bb9128e97bc01308eaa.json +1 -0
- package/graphify-out/cache/semantic/a7e57a10bb40c4475113d1d3519ce3aa6c9a9733fd9c526d69f8f5ff913f7af2.json +1 -0
- package/graphify-out/cache/semantic/a8932fc483ae4a5ef68c4d0ad120446caab4ff2321dfaf133c008b504cba4882.json +1 -0
- package/graphify-out/cache/semantic/a8ecf3963b40fb444d84ab704f60752adc505d66b1786b5cac5aeebab0bbb113.json +1 -0
- package/graphify-out/cache/semantic/af227629246e8de493f1917ea85b59199adb979a658e9c67923e5e96b397ec2e.json +1 -0
- package/graphify-out/cache/semantic/b3632333adc154f84b4a87f02ec9b7623636f5483a6d3e8a6fb3829399e859af.json +1 -0
- package/graphify-out/cache/semantic/b68b1208f92257bd0426dfddfc4e91021e5d4a21e7346134c60b7deb2663caac.json +1 -0
- package/graphify-out/cache/semantic/b7463dc58034edd1c1e22ea69648cc22a595d4a447514c88bffdb8df653b3e09.json +1 -0
- package/graphify-out/cache/semantic/b860d0f96eba65111665f02f6950557434ecc21928fc6974092db7d379096e58.json +1 -0
- package/graphify-out/cache/semantic/b905ecd7078e176f5cfc01e7025a4a600e249cdcdcb07c86a22f14b14f5c7479.json +1 -0
- package/graphify-out/cache/semantic/ba3108bde1b64238e6ea6e230a833bc2aa42c2692e3727fbd85d7718bf8191cf.json +1 -0
- package/graphify-out/cache/semantic/bc02ab95207a45cbfde472019776126d4c3be04106bcc77f0fbeadef330add5d.json +1 -0
- package/graphify-out/cache/semantic/bdae5143204a52383c727d505e5fba4f19e9de230ae850a54e44211979f47a74.json +1 -0
- package/graphify-out/cache/semantic/c2251f1e6bb132b6c56c73471786696e3bf60fe06a961d809745c3c3edacf1d4.json +1 -0
- package/graphify-out/cache/semantic/c4e6a7e0854bdd5dcf7892a256c410b2742852b47cc8ab486bb7bd1fdfa02b9a.json +1 -0
- package/graphify-out/cache/semantic/c4f7e2cc8a84b3960456eacde3203ec00fd898340ad2a5048f4ebd071e0d3908.json +1 -0
- package/graphify-out/cache/semantic/c70af08c8276e4c6eb2fe56987f29ef924e72a519bc6b982a15f70f956c2faa8.json +1 -0
- package/graphify-out/cache/semantic/c7faa8fe895d781405cde44d570cfa494b224a8283c583c5f1e76bc619af6625.json +1 -0
- package/graphify-out/cache/semantic/c967c2c75ae4491d4e598eed580e10b2de0b9fba25d0d31b2a01b62d7cf466d0.json +1 -0
- package/graphify-out/cache/semantic/cc1c5a027b1f4c478d8c9e5274599d08394635bdfd02db0ec3aa2cf10e442314.json +1 -0
- package/graphify-out/cache/semantic/ce7eebac88eec9bc4db10875391349e227352340ae7f9c030c791ed43bbb4975.json +1 -0
- package/graphify-out/cache/semantic/cf9d24720de3bf51d46009431d6cdaf208eefeb86e29083e755367c3ca514f27.json +1 -0
- package/graphify-out/cache/semantic/d03454d523b284ed22ac4c324c1493f7a87e620670ea10cb07d4d69f930d1e90.json +1 -0
- package/graphify-out/cache/semantic/d5c3fa4e182e24466af1ee5a2468d7b1312fa50379f6237dfe7e6939eecf6426.json +1 -0
- package/graphify-out/cache/semantic/d96df693960ceb28c9622f887920d2f358d94656baa4b3006c9a2b63fdb80cbd.json +1 -0
- package/graphify-out/cache/semantic/df0c4dc80f448b4e0483dad1c564cde7b2cd5f62924d2315c6edd8efae0d03af.json +1 -0
- package/graphify-out/cache/semantic/e007f51abbdda39f46b16f67d88b9ca986ad0de003fdee4c6deb2e8053b6bc6a.json +1 -0
- package/graphify-out/cache/semantic/e6a7860db84b96816f7b4ef24d962e483b1cc58d04d1c9b9781dcddb3dd47d4e.json +1 -0
- package/graphify-out/cache/semantic/e9542b76568732b92e08324fd71b4a65cec5b8c4d93251d478c826490ac339b9.json +1 -0
- package/graphify-out/cache/semantic/e9a768ff72b8d89f18d08bccd9997ff97b3b403ea9c12d71c6bdb1b1a2cb9aae.json +1 -0
- package/graphify-out/cache/semantic/eb43c20f3dc8139aaabbc9b060650dbb3c7722d7e5e5be52076e1a1513628228.json +1 -0
- package/graphify-out/cache/semantic/eea4f455cf1bed5405ceea550a487e987c426529f607f5c73a46db13a2c42159.json +1 -0
- package/graphify-out/cache/semantic/efcc09a4efc4df5902c45ecd52fa7c4c325bb39c97fe96166a39c44005d6b8be.json +1 -0
- package/graphify-out/cache/semantic/f2ddc79ae916a38409e7024575bf2759951e5d42b088053beaed67c32f6afcec.json +1 -0
- package/graphify-out/cache/semantic/f3b3a6416b6f59b0e4a567b9d0a8931b2c16c9f99e90627dba86728f317e9e25.json +1 -0
- package/graphify-out/cache/semantic/f58974b4ecd93b9a8e615b4ca158d56a06717906f2ce5a1137ba8bf7d1dc9e3d.json +1 -0
- package/graphify-out/cache/semantic/f5e83a9e5d525dc1b0dd012e21529e9e8f32a839747437455d924b7b4e9429eb.json +1 -0
- package/graphify-out/cache/semantic/f699ccc92e85b7689c2f513df7050ae18b7a8f7381df404fb0d461a99f93c8c4.json +1 -0
- package/graphify-out/cache/semantic/f7b9fe8a41b2521598e81c6dc4fac9506c52e261c830b6bdb01f6a40e6dc7fa0.json +1 -0
- package/graphify-out/cache/semantic/f8f3b0e7242143f49cfd0858d7602b9d278aa74bcaa400e2cf9cbad17814522d.json +1 -0
- package/graphify-out/cache/semantic/fae9f5d8f53678ce29603705d74849af51a6d83d7b7ffb033d701845b95e6d94.json +1 -0
- package/graphify-out/cache/semantic/fb66ac4a7f0fbf6db84ef6d52d6e26afd22b86a7167ed0703aae5d3859951e75.json +1 -0
- package/graphify-out/cache/stat-index.json +1 -0
- package/graphify-out/cost.json +12 -0
- package/graphify-out/graph.html +307 -0
- package/graphify-out/graph.json +68467 -0
- package/graphify-out/manifest.json +2262 -0
- package/package.json +1 -3
package/dist/esm/index.js
CHANGED
|
@@ -35,7 +35,7 @@ export { Progress } from './src/components/Progress/Progress.js';
|
|
|
35
35
|
export { ProgressCircular } from './src/components/ProgressCircular/ProgressCircular.js';
|
|
36
36
|
export { PromptComposer } from './src/components/PromptComposer/PromptComposer.js';
|
|
37
37
|
export { usePromptComposerEditor } from './src/components/PromptComposer/usePromptComposerEditor.js';
|
|
38
|
-
export { PROMPT_COMPOSER_COMMAND_CHIP_CLASS, createPromptComposerHandle, getPromptComposerTokenRangeBeforePos, insertPromptComposerContentAtCaret, promptComposerChipHtml, promptComposerMentionNode } from './src/components/PromptComposer/promptComposerInsert.js';
|
|
38
|
+
export { PROMPT_COMPOSER_COMMAND_CHIP_CLASS, createPromptComposerHandle, getPromptComposerTokenRangeBeforePos, insertPromptComposerContentAtCaret, openPromptComposerSlashSuggestion, promptComposerChipHtml, promptComposerMentionNode } from './src/components/PromptComposer/promptComposerInsert.js';
|
|
39
39
|
export { RadioButton } from './src/components/RadioButton/RadioButton.js';
|
|
40
40
|
export { RadioGroup } from './src/components/RadioGroup/RadioGroup.js';
|
|
41
41
|
export { Router, RouterContext, RouterStore } from './src/components/Router/Router.js';
|
|
@@ -22,8 +22,6 @@ import '../Select/Select.styl.js';
|
|
|
22
22
|
import '../Scroll/Scroll.js';
|
|
23
23
|
import 'compareq';
|
|
24
24
|
import 'justorm/react';
|
|
25
|
-
import 'lodash.omit';
|
|
26
|
-
import 'lodash.pick';
|
|
27
25
|
import 'nanoid';
|
|
28
26
|
import '../Checkbox/Checkbox.styl.js';
|
|
29
27
|
import '../Chip/Chip.styl.js';
|
|
@@ -4,12 +4,12 @@ import { createStore } from 'justorm/react';
|
|
|
4
4
|
import Time from 'timen';
|
|
5
5
|
import compare from 'compareq';
|
|
6
6
|
import cn from 'classnames';
|
|
7
|
-
import omit from 'lodash.omit';
|
|
8
7
|
import { Button } from '../Button/Button.js';
|
|
9
8
|
import { Icon } from '../Icon/Icon.js';
|
|
10
9
|
import { Spinner } from '../Spinner/Spinner.js';
|
|
11
10
|
import throttle from '../../tools/throttle.js';
|
|
12
11
|
import { circularSlice } from '../../tools/array.js';
|
|
12
|
+
import { omit } from '../../tools/object.js';
|
|
13
13
|
import S from './Gallery.styl.js';
|
|
14
14
|
import { Lazy } from '../Lazy/Lazy.js';
|
|
15
15
|
|
|
@@ -2,7 +2,6 @@ import { Component, createRef, createElement } from 'react';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { createStore } from 'justorm/react';
|
|
4
4
|
import cn from 'classnames';
|
|
5
|
-
import pick from 'lodash.pick';
|
|
6
5
|
import compare from 'compareq';
|
|
7
6
|
import Time from 'timen';
|
|
8
7
|
import { Label } from '../Label/Label.js';
|
|
@@ -10,6 +9,7 @@ import { Icon } from '../Icon/Icon.js';
|
|
|
10
9
|
import { Scroll } from '../Scroll/Scroll.js';
|
|
11
10
|
import { toBase64 } from '../../tools/file.js';
|
|
12
11
|
import { spliceWhere } from '../../tools/array.js';
|
|
12
|
+
import { pick } from '../../tools/object.js';
|
|
13
13
|
import S from './InputFile.styl.js';
|
|
14
14
|
import Item from './Item/Item.js';
|
|
15
15
|
import '../AssistiveText/AssistiveText.styl.js';
|
|
@@ -28,7 +28,6 @@ import '../Paranja/Paranja.styl.js';
|
|
|
28
28
|
import '../Popup/Popup.styl.js';
|
|
29
29
|
import '../RequiredStar/RequiredStar.styl.js';
|
|
30
30
|
import '../Select/Select.styl.js';
|
|
31
|
-
import 'lodash.omit';
|
|
32
31
|
import '../Checkbox/Checkbox.styl.js';
|
|
33
32
|
import '../Chip/Chip.styl.js';
|
|
34
33
|
import '../Tooltip/Tooltip.styl.js';
|
|
@@ -7,11 +7,12 @@ import S from './PromptComposer.styl.js';
|
|
|
7
7
|
import { createPromptComposerHandle } from './promptComposerInsert.js';
|
|
8
8
|
import { usePromptComposerEditor } from './usePromptComposerEditor.js';
|
|
9
9
|
|
|
10
|
-
const PromptComposer = forwardRef(function PromptComposer({ disabled = false, placeholder, className, slashCommandItems, onSlashItemCommand, prefillMessage, attachmentsCount = 0, allowEnterSubmit = true, onSubmit, onChange, scrollProps = {}, }, ref) {
|
|
10
|
+
const PromptComposer = forwardRef(function PromptComposer({ disabled = false, placeholder, className, slashCommandItems, slashSuggestionPlacement, onSlashItemCommand, prefillMessage, attachmentsCount = 0, allowEnterSubmit = true, onSubmit, onChange, scrollProps = {}, }, ref) {
|
|
11
11
|
const { editor } = usePromptComposerEditor({
|
|
12
12
|
disabled,
|
|
13
13
|
placeholder,
|
|
14
14
|
slashCommandItems,
|
|
15
|
+
slashSuggestionPlacement,
|
|
15
16
|
onSlashItemCommand,
|
|
16
17
|
prefillMessage,
|
|
17
18
|
attachmentsCount,
|
|
@@ -28,6 +29,7 @@ const PromptComposer = forwardRef(function PromptComposer({ disabled = false, pl
|
|
|
28
29
|
getEditor: () => {
|
|
29
30
|
throw new Error('PromptComposer editor is not ready yet');
|
|
30
31
|
},
|
|
32
|
+
openSlashSuggestion: () => undefined,
|
|
31
33
|
}), []);
|
|
32
34
|
useImperativeHandle(ref, () => (editor ? createPromptComposerHandle(editor) : unavailableHandle), [editor, unavailableHandle]);
|
|
33
35
|
return (jsx("div", { className: cn(S.root, className), "data-disabled": disabled ? 'true' : 'false', children: jsx(Scroll, { y: true, fadeSize: "s", ...scrollProps, className: S.scroller, children: jsx(EditorContent, { editor: editor, className: S.editorMount }) }) }));
|
|
@@ -81,6 +81,22 @@ function setPromptComposerEditorText(editor, text, options) {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
function openPromptComposerSlashSuggestion(editor, slashChar = '/') {
|
|
85
|
+
if (editor.isDestroyed)
|
|
86
|
+
return;
|
|
87
|
+
editor.chain().focus('end').run();
|
|
88
|
+
const { doc, selection } = editor.state;
|
|
89
|
+
const pos = selection.to;
|
|
90
|
+
const $pos = doc.resolve(pos);
|
|
91
|
+
let insert = slashChar;
|
|
92
|
+
if ($pos.parentOffset > 0) {
|
|
93
|
+
const before = doc.textBetween(pos - 1, pos);
|
|
94
|
+
if (!/\s/.test(before)) {
|
|
95
|
+
insert = ` ${slashChar}`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
editor.chain().focus('end').insertContent(insert).run();
|
|
99
|
+
}
|
|
84
100
|
function createPromptComposerHandle(editor) {
|
|
85
101
|
return {
|
|
86
102
|
insertAtCaret: (content, options) => insertPromptComposerContentAtCaret(editor, content, options),
|
|
@@ -99,7 +115,8 @@ function createPromptComposerHandle(editor) {
|
|
|
99
115
|
setPromptComposerEditorText(editor, text, options);
|
|
100
116
|
},
|
|
101
117
|
getEditor: () => editor,
|
|
118
|
+
openSlashSuggestion: slashChar => openPromptComposerSlashSuggestion(editor, slashChar),
|
|
102
119
|
};
|
|
103
120
|
}
|
|
104
121
|
|
|
105
|
-
export { PROMPT_COMPOSER_COMMAND_CHIP_CLASS, createPromptComposerHandle, getPromptComposerTokenRangeBeforePos, insertPromptComposerContentAtCaret, promptComposerChipHtml, promptComposerMentionNode };
|
|
122
|
+
export { PROMPT_COMPOSER_COMMAND_CHIP_CLASS, createPromptComposerHandle, getPromptComposerTokenRangeBeforePos, insertPromptComposerContentAtCaret, openPromptComposerSlashSuggestion, promptComposerChipHtml, promptComposerMentionNode };
|
|
@@ -10,7 +10,7 @@ import { PROMPT_COMPOSER_EMPTY_DOC, promptComposerParagraphDoc } from './promptC
|
|
|
10
10
|
const PROMPT_COMPOSER_EDITOR_CLASS = 'promptComposerEditor';
|
|
11
11
|
const PROMPT_COMPOSER_EMPTY_EDITOR_CLASS = 'promptComposerEmptyEditor';
|
|
12
12
|
const PROMPT_COMPOSER_EMPTY_NODE_CLASS = 'promptComposerEmptyNode';
|
|
13
|
-
function usePromptComposerEditor({ disabled, placeholder, slashCommandItems, onSlashItemCommand, prefillMessage, attachmentsCount = 0, allowEnterSubmit, onSubmit, onChange, }) {
|
|
13
|
+
function usePromptComposerEditor({ disabled, placeholder, slashCommandItems, slashSuggestionPlacement = 'above', onSlashItemCommand, prefillMessage, attachmentsCount = 0, allowEnterSubmit, onSubmit, onChange, }) {
|
|
14
14
|
const slashOpenRef = useRef(false);
|
|
15
15
|
const onSlashItemCommandRef = useRef(onSlashItemCommand);
|
|
16
16
|
onSlashItemCommandRef.current = onSlashItemCommand;
|
|
@@ -23,7 +23,7 @@ function usePromptComposerEditor({ disabled, placeholder, slashCommandItems, onS
|
|
|
23
23
|
slashOpenRef.current = active;
|
|
24
24
|
}, []);
|
|
25
25
|
const slashItemsFingerprint = JSON.stringify(slashCommandItems ?? null);
|
|
26
|
-
const slashItemsStable = useMemo(() => slashCommandItems ?? DEFAULT_CHAT_SLASH_ITEMS, [
|
|
26
|
+
const slashItemsStable = useMemo(() => slashCommandItems ?? DEFAULT_CHAT_SLASH_ITEMS, [slashItemsFingerprint]);
|
|
27
27
|
const placeholderText = useMemo(() => {
|
|
28
28
|
if (placeholder === undefined || placeholder === null) {
|
|
29
29
|
return 'Type a message...';
|
|
@@ -57,13 +57,18 @@ function usePromptComposerEditor({ disabled, placeholder, slashCommandItems, onS
|
|
|
57
57
|
if (slashItemsStable.length > 0) {
|
|
58
58
|
exts.push(createSlashMentionExtension({
|
|
59
59
|
items: slashItemsStable,
|
|
60
|
-
suggestionPlacement:
|
|
60
|
+
suggestionPlacement: slashSuggestionPlacement,
|
|
61
61
|
onSuggestionUiActiveChange: suggestionActiveUpdater,
|
|
62
62
|
onItemCommand: ctx => onSlashItemCommandRef.current?.(ctx) === true,
|
|
63
63
|
}));
|
|
64
64
|
}
|
|
65
65
|
return exts;
|
|
66
|
-
}, [
|
|
66
|
+
}, [
|
|
67
|
+
placeholderText,
|
|
68
|
+
slashItemsStable,
|
|
69
|
+
slashSuggestionPlacement,
|
|
70
|
+
suggestionActiveUpdater,
|
|
71
|
+
]);
|
|
67
72
|
const [text, setText] = useState('');
|
|
68
73
|
const editorDomRef = useRef(null);
|
|
69
74
|
const bindEditorDom = useCallback(({ editor }) => {
|
|
@@ -15,8 +15,7 @@ import { Scroll } from '../Scroll/Scroll.js';
|
|
|
15
15
|
import cn from 'classnames';
|
|
16
16
|
import compare from 'compareq';
|
|
17
17
|
import { createStore } from 'justorm/react';
|
|
18
|
-
import omit from '
|
|
19
|
-
import pick from 'lodash.pick';
|
|
18
|
+
import { pick, omit } from '../../tools/object.js';
|
|
20
19
|
import throttle from '../../tools/throttle.js';
|
|
21
20
|
|
|
22
21
|
const SelectHelpers = Select_helpers;
|
|
@@ -445,7 +444,7 @@ class Select extends Component {
|
|
|
445
444
|
'variant',
|
|
446
445
|
// 'inputProps',
|
|
447
446
|
// 'required',
|
|
448
|
-
'
|
|
447
|
+
'autoComplete',
|
|
449
448
|
// 'hideRequiredStar',
|
|
450
449
|
]),
|
|
451
450
|
...triggerProps,
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
3
3
|
import { mapById, isMultiple, renderLabel } from './Select.helpers.js';
|
|
4
4
|
import { INTERACTION_MODE, getInteractionMode } from '../../tools/dom.js';
|
|
5
5
|
import cn from 'classnames';
|
|
6
|
-
import omit from '
|
|
6
|
+
import { omit } from '../../tools/object.js';
|
|
7
7
|
import { AssistiveText } from '../AssistiveText/AssistiveText.js';
|
|
8
8
|
import { Button } from '../Button/Button.js';
|
|
9
9
|
import { Chip } from '../Chip/Chip.js';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Component, createRef } from 'react';
|
|
3
|
-
import omit from 'lodash.omit';
|
|
4
3
|
import { createStore } from 'justorm/react';
|
|
5
4
|
import Time from 'timen';
|
|
6
5
|
import * as number from '../../../tools/number.js';
|
|
6
|
+
import { omit } from '../../../tools/object.js';
|
|
7
7
|
import 'nanoid';
|
|
8
8
|
import '../../../tools/dom.js';
|
|
9
9
|
import 'compareq';
|
|
10
|
-
import 'lodash.pick';
|
|
11
10
|
import '../../../tools/queryParams.js';
|
|
12
11
|
import Virtualized from '../Virtualized.js';
|
|
13
12
|
import S from './List.styl.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import pick from 'lodash.pick';
|
|
4
3
|
import compare from 'compareq';
|
|
5
4
|
import Time from 'timen';
|
|
6
5
|
import debounce from '../../tools/debounce.js';
|
|
6
|
+
import { pick } from '../../tools/object.js';
|
|
7
7
|
import throttle from '../../tools/throttle.js';
|
|
8
8
|
import { getHeight, getIndexes } from './Virtualized.helpers.js';
|
|
9
9
|
import S from './Virtualized.styl.js';
|
|
@@ -28,6 +28,10 @@ const useListKeyboardControl = ({ isActive, itemsCount, onSelect, }) => {
|
|
|
28
28
|
if (e.key === 'Enter') {
|
|
29
29
|
if (newIndex < 0 || newIndex >= itemsCount)
|
|
30
30
|
return;
|
|
31
|
+
const active = document.activeElement;
|
|
32
|
+
if (active?.closest('.promptComposerEditor, .ProseMirror, [contenteditable="true"], [aria-label="Slash commands"]')) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
31
35
|
e.preventDefault();
|
|
32
36
|
e.stopPropagation();
|
|
33
37
|
onSelect?.(newIndex);
|
|
@@ -31,6 +31,7 @@ function SlashSuggestionListInner({ items, command, listHandleRef, }) {
|
|
|
31
31
|
}
|
|
32
32
|
if (event.key === 'Enter') {
|
|
33
33
|
event.preventDefault();
|
|
34
|
+
event.stopPropagation();
|
|
34
35
|
const max = Math.max(items.length - 1, 0);
|
|
35
36
|
const idx = Math.min(selected, max);
|
|
36
37
|
const item = items[idx];
|
|
@@ -46,7 +47,7 @@ function SlashSuggestionListInner({ items, command, listHandleRef, }) {
|
|
|
46
47
|
useImperativeHandle(listHandleRef, () => ({ onKeyboardEvent }), [
|
|
47
48
|
onKeyboardEvent,
|
|
48
49
|
]);
|
|
49
|
-
return (jsx("div", { className: S.root, children: jsx(Menu, { className: S.menu, role: "listbox", "aria-label": "Slash commands", children: items.map((item, idx) => (jsxs(Menu.Item, { role: "option", "aria-selected": idx === safeSel, className: cn(S.item, idx === safeSel && S.itemHighlighted, item.className), onMouseDown: e => e.preventDefault(), onMouseEnter: () => setSelected(idx), onClick: () => onPick(idx), textOverflow: true, children: [
|
|
50
|
+
return (jsx("div", { className: S.root, children: jsx(Menu, { className: S.menu, role: "listbox", "aria-label": "Slash commands", children: items.map((item, idx) => (jsxs(Menu.Item, { role: "option", "aria-selected": idx === safeSel, className: cn(S.item, idx === safeSel && S.itemHighlighted, item.className), onMouseDown: e => e.preventDefault(), onMouseEnter: () => setSelected(idx), onClick: () => onPick(idx), textOverflow: true, children: [jsx("span", { className: S.itemLabel, children: item.label }), item.description ? (jsx("span", { className: S.itemDesc, children: item.description })) : null] }, `${item.id}-${idx}`))) }) }));
|
|
50
51
|
}
|
|
51
52
|
function SlashSuggestionList(props) {
|
|
52
53
|
if (props.items.length === 0)
|
|
@@ -31,11 +31,13 @@ const SlashMention = Mention.extend({
|
|
|
31
31
|
},
|
|
32
32
|
});
|
|
33
33
|
const SUGGESTION_GAP_PX = 4;
|
|
34
|
-
function placeSlashSuggestionPopup(popupElement, clientRect, placement) {
|
|
34
|
+
function placeSlashSuggestionPopup(popupElement, clientRect, placement, editorElement) {
|
|
35
35
|
if (!clientRect)
|
|
36
36
|
return;
|
|
37
37
|
const el = popupElement;
|
|
38
|
-
const
|
|
38
|
+
const popupRect = el.getBoundingClientRect();
|
|
39
|
+
const popupHeight = popupRect.height;
|
|
40
|
+
const popupWidth = popupRect.width;
|
|
39
41
|
const spaceBelow = window.innerHeight - clientRect.bottom - SUGGESTION_GAP_PX;
|
|
40
42
|
const spaceAbove = clientRect.top - SUGGESTION_GAP_PX;
|
|
41
43
|
let showAbove = placement === 'above';
|
|
@@ -45,7 +47,11 @@ function placeSlashSuggestionPopup(popupElement, clientRect, placement) {
|
|
|
45
47
|
const top = showAbove
|
|
46
48
|
? Math.max(SUGGESTION_GAP_PX, clientRect.top - popupHeight - SUGGESTION_GAP_PX)
|
|
47
49
|
: clientRect.bottom + SUGGESTION_GAP_PX;
|
|
48
|
-
|
|
50
|
+
const editorRect = editorElement?.getBoundingClientRect();
|
|
51
|
+
let left = editorRect ? editorRect.left : clientRect.left;
|
|
52
|
+
const maxLeft = window.innerWidth - popupWidth - SUGGESTION_GAP_PX;
|
|
53
|
+
left = Math.max(SUGGESTION_GAP_PX, Math.min(left, maxLeft));
|
|
54
|
+
el.style.left = `${left}px`;
|
|
49
55
|
el.style.top = `${top}px`;
|
|
50
56
|
}
|
|
51
57
|
function slashMentionSuggestionRender(uiRef, placement = 'below') {
|
|
@@ -53,7 +59,7 @@ function slashMentionSuggestionRender(uiRef, placement = 'below') {
|
|
|
53
59
|
const place = (props) => {
|
|
54
60
|
if (!popup?.element)
|
|
55
61
|
return;
|
|
56
|
-
placeSlashSuggestionPopup(popup.element, props.clientRect?.() ?? null, placement);
|
|
62
|
+
placeSlashSuggestionPopup(popup.element, props.clientRect?.() ?? null, placement, props.editor.view.dom);
|
|
57
63
|
};
|
|
58
64
|
return {
|
|
59
65
|
onStart: props => {
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
function clone(obj) {
|
|
2
2
|
return JSON.parse(JSON.stringify(obj));
|
|
3
|
+
}
|
|
4
|
+
function pick(obj, keys) {
|
|
5
|
+
const result = {};
|
|
6
|
+
keys.forEach(key => {
|
|
7
|
+
if (key in obj)
|
|
8
|
+
result[key] = obj[key];
|
|
9
|
+
});
|
|
10
|
+
return result;
|
|
11
|
+
}
|
|
12
|
+
function omit(obj, keys) {
|
|
13
|
+
const result = { ...obj };
|
|
14
|
+
keys.forEach(key => {
|
|
15
|
+
delete result[key];
|
|
16
|
+
});
|
|
17
|
+
return result;
|
|
3
18
|
}
|
|
4
19
|
|
|
5
|
-
export { clone };
|
|
20
|
+
export { clone, omit, pick };
|
|
@@ -2,7 +2,7 @@ import * as T from './Notifications.types';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
store?: any;
|
|
4
4
|
};
|
|
5
|
-
export declare const NotificationsStore:
|
|
5
|
+
export declare const NotificationsStore: {
|
|
6
6
|
items: string[];
|
|
7
7
|
autoHide: string[];
|
|
8
8
|
data: {};
|
|
@@ -12,6 +12,6 @@ export declare const NotificationsStore: import("justorm/dist/esm/proxy").ProxyS
|
|
|
12
12
|
unpause(): void;
|
|
13
13
|
close(id: any): void;
|
|
14
14
|
remove(id: any): void;
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
export declare const Notifications: (props: Props) => JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ItemParams } from './Notifications.types';
|
|
2
|
-
declare const STORE:
|
|
2
|
+
declare const STORE: {
|
|
3
3
|
items: string[];
|
|
4
4
|
autoHide: string[];
|
|
5
5
|
data: {};
|
|
@@ -9,6 +9,6 @@ declare const STORE: import("justorm/dist/esm/proxy").ProxyStore<{
|
|
|
9
9
|
unpause(): void;
|
|
10
10
|
close(id: any): void;
|
|
11
11
|
remove(id: any): void;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
export default STORE;
|
|
14
14
|
export type NotificationsStore = typeof STORE;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type PromptComposerHandle } from './promptComposerInsert';
|
|
2
2
|
export type { PromptComposerHandle, PromptComposerInsertOptions, } from './promptComposerInsert';
|
|
3
|
-
export declare const PromptComposer: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
export declare const PromptComposer: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement>, "onSubmit" | "onChange"> & {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
slashCommandItems?: import(".").SlashCommandItem[];
|
|
7
|
+
slashSuggestionPlacement?: import(".").SlashSuggestionPlacement;
|
|
7
8
|
onSlashItemCommand?: import(".").SlashOnItemCommand;
|
|
8
9
|
prefillMessage?: string;
|
|
9
10
|
attachmentsCount?: number;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { Editor } from '@tiptap/core';
|
|
2
2
|
import type { HTMLAttributes } from 'react';
|
|
3
|
-
import type { SlashCommandItem, SlashOnItemCommand } from '../../tiptap/slash-mention';
|
|
3
|
+
import type { SlashCommandItem, SlashOnItemCommand, SlashSuggestionPlacement } from '../../tiptap/slash-mention';
|
|
4
4
|
import type { Props as ScrollProps } from '../Scroll/Scroll.types';
|
|
5
5
|
export type Props = Omit<HTMLAttributes<HTMLDivElement>, 'onSubmit' | 'onChange'> & {
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
slashCommandItems?: SlashCommandItem[];
|
|
9
|
+
/** Slash menu vertical placement; defaults to above chat input. */
|
|
10
|
+
slashSuggestionPlacement?: SlashSuggestionPlacement;
|
|
9
11
|
onSlashItemCommand?: SlashOnItemCommand;
|
|
10
12
|
prefillMessage?: string | null;
|
|
11
13
|
/** Staged attachment count - Enter can submit even when text empty. */
|
|
@@ -2,6 +2,6 @@ export { PromptComposer } from './PromptComposer';
|
|
|
2
2
|
export type { PromptComposerProps } from './PromptComposer.types';
|
|
3
3
|
export { usePromptComposerEditor } from './usePromptComposerEditor';
|
|
4
4
|
export type { UsePromptComposerEditorOptions } from './usePromptComposerEditor';
|
|
5
|
-
export { getPromptComposerTokenRangeBeforePos, createPromptComposerHandle, insertPromptComposerContentAtCaret, promptComposerChipHtml, promptComposerMentionNode, PROMPT_COMPOSER_COMMAND_CHIP_CLASS, } from './promptComposerInsert';
|
|
5
|
+
export { getPromptComposerTokenRangeBeforePos, createPromptComposerHandle, insertPromptComposerContentAtCaret, openPromptComposerSlashSuggestion, promptComposerChipHtml, promptComposerMentionNode, PROMPT_COMPOSER_COMMAND_CHIP_CLASS, } from './promptComposerInsert';
|
|
6
6
|
export type { PromptComposerHandle, PromptComposerInsertOptions, PromptComposerMentionNodeInput, } from './promptComposerInsert';
|
|
7
7
|
export type { SlashCommandItem, SlashItemCommandContext, SlashOnItemCommand, SlashSuggestionPlacement, } from '../../tiptap/slash-mention';
|
|
@@ -24,6 +24,8 @@ export type PromptComposerHandle = {
|
|
|
24
24
|
atEnd?: boolean;
|
|
25
25
|
}) => void;
|
|
26
26
|
getEditor: () => Editor;
|
|
27
|
+
/** Inserts `/` (with leading space when needed) to open slash suggestions. */
|
|
28
|
+
openSlashSuggestion: (slashChar?: string) => void;
|
|
27
29
|
};
|
|
28
30
|
export declare function getPromptComposerTokenRangeBeforePos(editor: Editor, pos: number): {
|
|
29
31
|
from: number;
|
|
@@ -39,4 +41,5 @@ export type PromptComposerMentionNodeInput = {
|
|
|
39
41
|
};
|
|
40
42
|
export declare function promptComposerMentionNode(input: PromptComposerMentionNodeInput): JSONContent;
|
|
41
43
|
export declare function insertPromptComposerContentAtCaret(editor: Editor, content: string | JSONContent, options?: PromptComposerInsertOptions): void;
|
|
44
|
+
export declare function openPromptComposerSlashSuggestion(editor: Editor, slashChar?: string): void;
|
|
42
45
|
export declare function createPromptComposerHandle(editor: Editor): PromptComposerHandle;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type Editor } from '@tiptap/core';
|
|
2
|
-
import type { SlashCommandItem, SlashOnItemCommand } from '../../tiptap/slash-mention';
|
|
2
|
+
import type { SlashCommandItem, SlashOnItemCommand, SlashSuggestionPlacement } from '../../tiptap/slash-mention';
|
|
3
3
|
export type UsePromptComposerEditorOptions = {
|
|
4
4
|
disabled: boolean;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
slashCommandItems?: SlashCommandItem[];
|
|
7
|
+
slashSuggestionPlacement?: SlashSuggestionPlacement;
|
|
7
8
|
onSlashItemCommand?: SlashOnItemCommand;
|
|
8
9
|
prefillMessage?: string | null;
|
|
9
10
|
attachmentsCount?: number;
|
|
@@ -16,4 +17,4 @@ export type UsePromptComposerEditorResult = {
|
|
|
16
17
|
text: string;
|
|
17
18
|
trimmedText: string;
|
|
18
19
|
};
|
|
19
|
-
export declare function usePromptComposerEditor({ disabled, placeholder, slashCommandItems, onSlashItemCommand, prefillMessage, attachmentsCount, allowEnterSubmit, onSubmit, onChange, }: UsePromptComposerEditorOptions): UsePromptComposerEditorResult;
|
|
20
|
+
export declare function usePromptComposerEditor({ disabled, placeholder, slashCommandItems, slashSuggestionPlacement, onSlashItemCommand, prefillMessage, attachmentsCount, allowEnterSubmit, onSubmit, onChange, }: UsePromptComposerEditorOptions): UsePromptComposerEditorResult;
|
|
@@ -7,7 +7,7 @@ export * from './Route';
|
|
|
7
7
|
export * from './Redirect';
|
|
8
8
|
export * from './Link/Link';
|
|
9
9
|
export { type RouterStore as RouterStoreType } from './store';
|
|
10
|
-
export declare const RouterStore:
|
|
10
|
+
export declare const RouterStore: {
|
|
11
11
|
path: string;
|
|
12
12
|
params: {};
|
|
13
13
|
query: Record<string, string>;
|
|
@@ -24,5 +24,5 @@ export declare const RouterStore: import("justorm/dist/esm/proxy").ProxyStore<{
|
|
|
24
24
|
replaceState(href: string, params?: {
|
|
25
25
|
quiet?: boolean;
|
|
26
26
|
}): void;
|
|
27
|
-
}
|
|
27
|
+
};
|
|
28
28
|
export declare const RouterContext: import("react").Context<import("./context").ContextType>;
|
|
@@ -4,7 +4,7 @@ type GoParams = {
|
|
|
4
4
|
type ReplaceStateParams = {
|
|
5
5
|
quiet?: boolean;
|
|
6
6
|
};
|
|
7
|
-
declare const STORE:
|
|
7
|
+
declare const STORE: {
|
|
8
8
|
path: string;
|
|
9
9
|
params: {};
|
|
10
10
|
query: Record<string, string>;
|
|
@@ -17,9 +17,9 @@ declare const STORE: import("justorm/dist/esm/proxy").ProxyStore<{
|
|
|
17
17
|
removeQuery(fields: string[]): void;
|
|
18
18
|
back(): void;
|
|
19
19
|
replaceState(href: string, params?: ReplaceStateParams): void;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
export type RouterStore = typeof STORE;
|
|
22
|
-
declare const _default:
|
|
22
|
+
declare const _default: {
|
|
23
23
|
path: string;
|
|
24
24
|
params: {};
|
|
25
25
|
query: Record<string, string>;
|
|
@@ -32,5 +32,5 @@ declare const _default: import("justorm/dist/esm/proxy").ProxyStore<{
|
|
|
32
32
|
removeQuery(fields: string[]): void;
|
|
33
33
|
back(): void;
|
|
34
34
|
replaceState(href: string, params?: ReplaceStateParams): void;
|
|
35
|
-
}
|
|
35
|
+
};
|
|
36
36
|
export default _default;
|
|
@@ -29,7 +29,7 @@ type SelectPopupProps = Omit<PopupProps, 'disabled' | 'direction' | 'autoClose'
|
|
|
29
29
|
}> & Partial<Pick<PopupProps, 'onOpen' | 'onClose'>>;
|
|
30
30
|
type Selected = Record<string, true | Id[]>;
|
|
31
31
|
export type Value = Id | Id[] | null;
|
|
32
|
-
type InheritedInputProps = Partial<Pick<InputProps, 'onFocus' | 'onBlur'>>;
|
|
32
|
+
type InheritedInputProps = Partial<Pick<InputProps, 'onFocus' | 'onBlur' | 'autoComplete'>>;
|
|
33
33
|
export type Props = FormControl<Value> & InheritedInputProps & {
|
|
34
34
|
className?: string;
|
|
35
35
|
isOpen?: boolean;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as T from './i18n.types';
|
|
2
|
-
export declare const store:
|
|
2
|
+
export declare const store: {
|
|
3
3
|
lang: string | void;
|
|
4
4
|
changeLang(lang: any): Promise<void>;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
export declare function init(config: T.RegisterConfig): {
|
|
7
7
|
storeName: string;
|
|
8
|
-
componentStore:
|
|
8
|
+
componentStore: {
|
|
9
9
|
_updated: string;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
withI18N: (Component: any) => (props: any) => JSX.Element;
|
|
12
12
|
i18n: (key: any, props?: any) => any;
|
|
13
13
|
I18N: import("react").NamedExoticComponent<T.I18NProps>;
|