@copilotkit/react-textarea 1.3.0 → 1.3.1
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/CHANGELOG.md +10 -0
- package/dist/chunk-224UKA7C.mjs +38 -0
- package/dist/chunk-224UKA7C.mjs.map +1 -0
- package/dist/chunk-23Q6A46J.mjs +103 -0
- package/dist/chunk-23Q6A46J.mjs.map +1 -0
- package/dist/chunk-2C7O2EVM.mjs +27 -0
- package/dist/chunk-2C7O2EVM.mjs.map +1 -0
- package/dist/chunk-2QDCE7PD.mjs +32 -0
- package/dist/chunk-2QDCE7PD.mjs.map +1 -0
- package/dist/chunk-2XDYLKPH.mjs +181 -0
- package/dist/chunk-2XDYLKPH.mjs.map +1 -0
- package/dist/chunk-3PQ7GSFE.mjs +17 -0
- package/dist/chunk-3PQ7GSFE.mjs.map +1 -0
- package/dist/chunk-4AMCUMC7.mjs +124 -0
- package/dist/chunk-4AMCUMC7.mjs.map +1 -0
- package/dist/chunk-4CVSOOJY.mjs +30 -0
- package/dist/chunk-4CVSOOJY.mjs.map +1 -0
- package/dist/chunk-4NHVQZ67.mjs +108 -0
- package/dist/chunk-4NHVQZ67.mjs.map +1 -0
- package/dist/chunk-4PDYALMP.mjs +52 -0
- package/dist/chunk-4PDYALMP.mjs.map +1 -0
- package/dist/chunk-5UNJXFUO.mjs +29 -0
- package/dist/chunk-5UNJXFUO.mjs.map +1 -0
- package/dist/chunk-7LSRNPNI.mjs +59 -0
- package/dist/chunk-7LSRNPNI.mjs.map +1 -0
- package/dist/chunk-AJ5OMEXM.mjs +13 -0
- package/dist/chunk-AJ5OMEXM.mjs.map +1 -0
- package/dist/chunk-CF5GISTC.mjs +113 -0
- package/dist/chunk-CF5GISTC.mjs.map +1 -0
- package/dist/chunk-D2SUDM2O.mjs +99 -0
- package/dist/chunk-D2SUDM2O.mjs.map +1 -0
- package/dist/chunk-D47EKHIF.mjs +26 -0
- package/dist/chunk-D47EKHIF.mjs.map +1 -0
- package/dist/chunk-DE5K76I2.mjs +1 -0
- package/dist/chunk-DE5K76I2.mjs.map +1 -0
- package/dist/chunk-DFTV4TST.mjs +36 -0
- package/dist/chunk-DFTV4TST.mjs.map +1 -0
- package/dist/chunk-DRV2FOHZ.mjs +70 -0
- package/dist/chunk-DRV2FOHZ.mjs.map +1 -0
- package/dist/chunk-ECR45NSD.mjs +104 -0
- package/dist/chunk-ECR45NSD.mjs.map +1 -0
- package/dist/chunk-EJGGLWWR.mjs +82 -0
- package/dist/chunk-EJGGLWWR.mjs.map +1 -0
- package/dist/chunk-FYCQE57K.mjs +60 -0
- package/dist/chunk-FYCQE57K.mjs.map +1 -0
- package/dist/chunk-GQN2HYFJ.mjs +22 -0
- package/dist/chunk-GQN2HYFJ.mjs.map +1 -0
- package/dist/chunk-H4VKQGVU.mjs +1 -0
- package/dist/chunk-H4VKQGVU.mjs.map +1 -0
- package/dist/chunk-HL7EF7KA.mjs +32 -0
- package/dist/chunk-HL7EF7KA.mjs.map +1 -0
- package/dist/chunk-I3SPIGAI.mjs +31 -0
- package/dist/chunk-I3SPIGAI.mjs.map +1 -0
- package/dist/chunk-I72DKFHD.mjs +114 -0
- package/dist/chunk-I72DKFHD.mjs.map +1 -0
- package/dist/chunk-IU3WTXLQ.mjs +1 -0
- package/dist/chunk-IU3WTXLQ.mjs.map +1 -0
- package/dist/chunk-J62KUPFZ.mjs +264 -0
- package/dist/chunk-J62KUPFZ.mjs.map +1 -0
- package/dist/chunk-KMVGEY7Q.mjs +51 -0
- package/dist/chunk-KMVGEY7Q.mjs.map +1 -0
- package/dist/chunk-KNQIEOFP.mjs +19 -0
- package/dist/chunk-KNQIEOFP.mjs.map +1 -0
- package/dist/chunk-L7VVZH4Q.mjs +1 -0
- package/dist/chunk-L7VVZH4Q.mjs.map +1 -0
- package/dist/chunk-LQ2OWQU7.mjs +49 -0
- package/dist/chunk-LQ2OWQU7.mjs.map +1 -0
- package/dist/chunk-LYB4B6MK.mjs +19 -0
- package/dist/chunk-LYB4B6MK.mjs.map +1 -0
- package/dist/chunk-MCNXIA4Q.mjs +75 -0
- package/dist/chunk-MCNXIA4Q.mjs.map +1 -0
- package/dist/chunk-MMVDU6DF.mjs +1 -0
- package/dist/chunk-MMVDU6DF.mjs.map +1 -0
- package/dist/chunk-MRXNTQOX.mjs +59 -0
- package/dist/chunk-MRXNTQOX.mjs.map +1 -0
- package/dist/chunk-QJNFNPWH.mjs +85 -0
- package/dist/chunk-QJNFNPWH.mjs.map +1 -0
- package/dist/chunk-RUV6NBIF.mjs +1 -0
- package/dist/chunk-RUV6NBIF.mjs.map +1 -0
- package/dist/chunk-SDHH6DI6.mjs +63 -0
- package/dist/chunk-SDHH6DI6.mjs.map +1 -0
- package/dist/chunk-T6MTDQZ7.mjs +45 -0
- package/dist/chunk-T6MTDQZ7.mjs.map +1 -0
- package/dist/chunk-UGEKMSRR.mjs +225 -0
- package/dist/chunk-UGEKMSRR.mjs.map +1 -0
- package/dist/chunk-VSVQZUPW.mjs +124 -0
- package/dist/chunk-VSVQZUPW.mjs.map +1 -0
- package/dist/chunk-WADHCMPK.mjs +1 -0
- package/dist/chunk-WADHCMPK.mjs.map +1 -0
- package/dist/chunk-WGWQRALG.mjs +83 -0
- package/dist/chunk-WGWQRALG.mjs.map +1 -0
- package/dist/chunk-WJHSY5T6.mjs +1 -0
- package/dist/chunk-WJHSY5T6.mjs.map +1 -0
- package/dist/chunk-XW3ICO4S.mjs +25 -0
- package/dist/chunk-XW3ICO4S.mjs.map +1 -0
- package/dist/chunk-YLFAIYRY.mjs +50 -0
- package/dist/chunk-YLFAIYRY.mjs.map +1 -0
- package/dist/components/base-copilot-textarea/base-copilot-textarea.css +9 -0
- package/dist/components/base-copilot-textarea/base-copilot-textarea.css.map +1 -0
- package/dist/components/base-copilot-textarea/base-copilot-textarea.d.ts +1 -1
- package/dist/components/base-copilot-textarea/base-copilot-textarea.js +114 -49
- package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +1 -1
- package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +36 -1687
- package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs.map +1 -1
- package/dist/components/base-copilot-textarea/render-element.d.ts +1 -1
- package/dist/components/base-copilot-textarea/render-element.mjs +4 -48
- package/dist/components/base-copilot-textarea/render-element.mjs.map +1 -1
- package/dist/components/base-copilot-textarea/render-placeholder.d.ts +1 -1
- package/dist/components/base-copilot-textarea/render-placeholder.mjs +4 -46
- package/dist/components/base-copilot-textarea/render-placeholder.mjs.map +1 -1
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.js +4 -2
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.js.map +1 -1
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs +5 -81
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs.map +1 -1
- package/dist/components/base-copilot-textarea/use-add-branding-css.js.map +1 -1
- package/dist/components/base-copilot-textarea/use-add-branding-css.mjs +4 -54
- package/dist/components/base-copilot-textarea/use-add-branding-css.mjs.map +1 -1
- package/dist/components/copilot-textarea/copilot-textarea.css +9 -0
- package/dist/components/copilot-textarea/copilot-textarea.css.map +1 -0
- package/dist/components/copilot-textarea/copilot-textarea.d.ts +9 -3
- package/dist/components/copilot-textarea/copilot-textarea.js +116 -51
- package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
- package/dist/components/copilot-textarea/copilot-textarea.mjs +44 -2212
- package/dist/components/copilot-textarea/copilot-textarea.mjs.map +1 -1
- package/dist/components/hovering-toolbar/hovering-editor-provider.d.ts +1 -1
- package/dist/components/hovering-toolbar/hovering-editor-provider.mjs +5 -13
- package/dist/components/hovering-toolbar/hovering-editor-provider.mjs.map +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar-components.d.ts +2 -1
- package/dist/components/hovering-toolbar/hovering-toolbar-components.js +21 -0
- package/dist/components/hovering-toolbar/hovering-toolbar-components.js.map +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs +9 -111
- package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs.map +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar.d.ts +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar.js +94 -31
- package/dist/components/hovering-toolbar/hovering-toolbar.js.map +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar.mjs +19 -808
- package/dist/components/hovering-toolbar/hovering-toolbar.mjs.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.d.ts +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js +65 -21
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +14 -520
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.d.ts +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js +68 -24
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +15 -543
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.d.ts +16 -0
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js +133 -0
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js.map +1 -0
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.mjs +12 -0
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.mjs.map +1 -0
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js +68 -24
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +16 -543
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs.map +1 -1
- package/dist/components/index.css +9 -0
- package/dist/components/index.css.map +1 -0
- package/dist/components/index.js +116 -51
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +46 -2211
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/manual-ui/chip-with-icon.d.ts +1 -1
- package/dist/components/manual-ui/chip-with-icon.mjs +2 -0
- package/dist/components/manual-ui/chip-with-icon.mjs.map +1 -1
- package/dist/components/source-search-box/source-search-box.d.ts +1 -1
- package/dist/components/source-search-box/source-search-box.js +4 -2
- package/dist/components/source-search-box/source-search-box.js.map +1 -1
- package/dist/components/source-search-box/source-search-box.mjs +8 -200
- package/dist/components/source-search-box/source-search-box.mjs.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.mjs +6 -76
- package/dist/components/ui/button.mjs.map +1 -1
- package/dist/components/ui/command.mjs +14 -233
- package/dist/components/ui/command.mjs.map +1 -1
- package/dist/components/ui/dialog.mjs +11 -135
- package/dist/components/ui/dialog.mjs.map +1 -1
- package/dist/components/ui/label.mjs +5 -51
- package/dist/components/ui/label.mjs.map +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.mjs +1 -0
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.d.ts +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.js.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs +7 -152
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs +5 -165
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +6 -141
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +1 -0
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js.map +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +4 -139
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs.map +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js.map +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +4 -221
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs.map +1 -1
- package/dist/hooks/misc/use-autosize-textarea.mjs +4 -12
- package/dist/hooks/misc/use-autosize-textarea.mjs.map +1 -1
- package/dist/index.css +644 -1
- package/dist/index.css.map +1 -0
- package/dist/index.js +116 -58
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -2218
- package/dist/index.mjs.map +1 -1
- package/dist/lib/debouncer.d.ts +1 -1
- package/dist/lib/debouncer.js.map +1 -1
- package/dist/lib/debouncer.mjs +4 -48
- package/dist/lib/debouncer.mjs.map +1 -1
- package/dist/lib/editor-to-text.mjs +4 -40
- package/dist/lib/editor-to-text.mjs.map +1 -1
- package/dist/lib/get-text-around-cursor.d.ts +1 -1
- package/dist/lib/get-text-around-cursor.mjs +7 -96
- package/dist/lib/get-text-around-cursor.mjs.map +1 -1
- package/dist/lib/retry.mjs +4 -14
- package/dist/lib/retry.mjs.map +1 -1
- package/dist/lib/slatejs-edits/add-autocompletions.mjs +4 -22
- package/dist/lib/slatejs-edits/add-autocompletions.mjs.map +1 -1
- package/dist/lib/slatejs-edits/clear-autocompletions.js.map +1 -1
- package/dist/lib/slatejs-edits/clear-autocompletions.mjs +4 -17
- package/dist/lib/slatejs-edits/clear-autocompletions.mjs.map +1 -1
- package/dist/lib/slatejs-edits/replace-text.mjs +4 -24
- package/dist/lib/slatejs-edits/replace-text.mjs.map +1 -1
- package/dist/lib/slatejs-edits/with-partial-history.d.ts +1 -1
- package/dist/lib/slatejs-edits/with-partial-history.mjs +5 -102
- package/dist/lib/slatejs-edits/with-partial-history.mjs.map +1 -1
- package/dist/lib/stream-promise-flatten.js.map +1 -1
- package/dist/lib/stream-promise-flatten.mjs +4 -44
- package/dist/lib/stream-promise-flatten.mjs.map +1 -1
- package/dist/lib/utils.mjs +8 -58
- package/dist/lib/utils.mjs.map +1 -1
- package/dist/lib/utils.test.d.ts +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.d.ts +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config.d.ts +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config.js.map +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config.mjs +9 -258
- package/dist/types/autosuggestions-config/autosuggestions-config.mjs.map +1 -1
- package/dist/types/autosuggestions-config/editing-api-config.d.ts +1 -1
- package/dist/types/autosuggestions-config/editing-api-config.js.map +1 -1
- package/dist/types/autosuggestions-config/editing-api-config.mjs +6 -75
- package/dist/types/autosuggestions-config/editing-api-config.mjs.map +1 -1
- package/dist/types/autosuggestions-config/index.js.map +1 -1
- package/dist/types/autosuggestions-config/index.mjs +10 -258
- package/dist/types/autosuggestions-config/index.mjs.map +1 -1
- package/dist/types/autosuggestions-config/insertions-api-config.d.ts +1 -1
- package/dist/types/autosuggestions-config/insertions-api-config.js.map +1 -1
- package/dist/types/autosuggestions-config/insertions-api-config.mjs +6 -68
- package/dist/types/autosuggestions-config/insertions-api-config.mjs.map +1 -1
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.d.ts +1 -1
- package/dist/types/autosuggestions-config/suggestions-api-config.d.ts +1 -1
- package/dist/types/autosuggestions-config/suggestions-api-config.js.map +1 -1
- package/dist/types/autosuggestions-config/suggestions-api-config.mjs +6 -56
- package/dist/types/autosuggestions-config/suggestions-api-config.mjs.map +1 -1
- package/dist/types/base/autosuggestion-state.d.ts +1 -1
- package/dist/types/base/autosuggestions-bare-function.d.ts +1 -1
- package/dist/types/base/base-autosuggestions-config.d.ts +1 -1
- package/dist/types/base/base-autosuggestions-config.mjs +4 -25
- package/dist/types/base/base-autosuggestions-config.mjs.map +1 -1
- package/dist/types/base/custom-editor.d.ts +1 -1
- package/dist/types/base/editor-autocomplete-state.d.ts +1 -1
- package/dist/types/base/editor-autocomplete-state.mjs +5 -9
- package/dist/types/base/editor-autocomplete-state.mjs.map +1 -1
- package/dist/types/base/index.d.ts +1 -1
- package/dist/types/base/index.mjs +5 -25
- package/dist/types/base/index.mjs.map +1 -1
- package/dist/types/html-copilot-textarea-element.d.ts +1 -1
- package/dist/types/html-copilot-textarea-element.mjs +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +14 -258
- package/dist/types/index.mjs.map +1 -1
- package/package.json +11 -17
- package/src/components/base-copilot-textarea/base-copilot-textarea.css +9 -0
- package/src/components/base-copilot-textarea/base-copilot-textarea.tsx +1 -0
- package/src/components/copilot-textarea/copilot-textarea.tsx +8 -2
- package/src/components/hovering-toolbar/hovering-toolbar-components.tsx +17 -0
- package/src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.tsx +7 -4
- package/src/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.tsx +55 -0
- package/src/styles.css +2 -9
- package/tsup.config.ts +15 -63
- package/dist/components/base-copilot-textarea/base-copilot-textarea.d.mts +0 -43
- package/dist/components/base-copilot-textarea/render-element.d.mts +0 -6
- package/dist/components/base-copilot-textarea/render-placeholder.d.mts +0 -6
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.d.mts +0 -8
- package/dist/components/base-copilot-textarea/use-add-branding-css.d.mts +0 -3
- package/dist/components/copilot-textarea/copilot-textarea.d.mts +0 -165
- package/dist/components/hovering-toolbar/hovering-editor-provider.d.mts +0 -18
- package/dist/components/hovering-toolbar/hovering-toolbar-components.d.mts +0 -17
- package/dist/components/hovering-toolbar/hovering-toolbar.d.mts +0 -12
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.d.mts +0 -16
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.d.mts +0 -14
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.d.mts +0 -4
- package/dist/components/index.d.mts +0 -15
- package/dist/components/manual-ui/chip-with-icon.d.mts +0 -10
- package/dist/components/source-search-box/source-search-box.d.mts +0 -16
- package/dist/components/ui/button.d.mts +0 -14
- package/dist/components/ui/command.d.mts +0 -53
- package/dist/components/ui/dialog.d.mts +0 -19
- package/dist/components/ui/label.d.mts +0 -8
- package/dist/context/index.d.mts +0 -2
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.d.mts +0 -15
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.d.mts +0 -8
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.d.mts +0 -7
- package/dist/hooks/index.d.mts +0 -2
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.d.mts +0 -22
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.d.mts +0 -23
- package/dist/hooks/misc/use-autosize-textarea.d.mts +0 -5
- package/dist/index.d.mts +0 -15
- package/dist/lib/debouncer.d.mts +0 -11
- package/dist/lib/editor-to-text.d.mts +0 -7
- package/dist/lib/get-text-around-cursor.d.mts +0 -15
- package/dist/lib/retry.d.mts +0 -3
- package/dist/lib/slatejs-edits/add-autocompletions.d.mts +0 -8
- package/dist/lib/slatejs-edits/clear-autocompletions.d.mts +0 -8
- package/dist/lib/slatejs-edits/replace-text.d.mts +0 -5
- package/dist/lib/slatejs-edits/with-partial-history.d.mts +0 -8
- package/dist/lib/stream-promise-flatten.d.mts +0 -12
- package/dist/lib/utils.d.mts +0 -9
- package/dist/lib/utils.test.d.mts +0 -2
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.d.mts +0 -23
- package/dist/types/autosuggestions-config/autosuggestions-config.d.mts +0 -20
- package/dist/types/autosuggestions-config/editing-api-config.d.mts +0 -15
- package/dist/types/autosuggestions-config/index.d.mts +0 -10
- package/dist/types/autosuggestions-config/insertions-api-config.d.mts +0 -15
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.d.mts +0 -3
- package/dist/types/autosuggestions-config/suggestions-api-config.d.mts +0 -14
- package/dist/types/base/autosuggestion-state.d.mts +0 -8
- package/dist/types/base/autosuggestions-bare-function.d.mts +0 -19
- package/dist/types/base/base-autosuggestions-config.d.mts +0 -83
- package/dist/types/base/base-copilot-textarea-props.d.mts +0 -5
- package/dist/types/base/custom-editor.d.mts +0 -29
- package/dist/types/base/editor-autocomplete-state.d.mts +0 -10
- package/dist/types/base/index.d.mts +0 -54
- package/dist/types/html-copilot-textarea-element.d.mts +0 -7
- package/dist/types/index.d.mts +0 -13
package/tsup.config.ts
CHANGED
|
@@ -1,64 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
import { defineConfig, Options } from "tsup-async-inject-style";
|
|
4
|
-
import postcss from "postcss";
|
|
5
|
-
import autoprefixer from "autoprefixer";
|
|
6
|
-
import tailwindcss from "tailwindcss";
|
|
7
|
-
import cssnano from "cssnano";
|
|
8
|
-
import postcssPrefixSelector from "postcss-prefix-selector";
|
|
9
|
-
import postcssImport from "postcss-import";
|
|
10
|
-
import postcssNested from "postcss-nested";
|
|
1
|
+
import { defineConfig, Options } from "tsup";
|
|
11
2
|
|
|
12
|
-
export default defineConfig((options: Options) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
],
|
|
27
|
-
onSuccess: async () => {
|
|
28
|
-
// Create index.css file for backwards compatibility
|
|
29
|
-
fs.writeFileSync(
|
|
30
|
-
path.resolve(process.cwd(), "dist/index.css"),
|
|
31
|
-
`/* This is here for backwards compatibility */`,
|
|
32
|
-
);
|
|
33
|
-
},
|
|
34
|
-
injectStyle: async (_, filePath) => {
|
|
35
|
-
const cwd = process.cwd();
|
|
36
|
-
const outputPath = path.resolve(cwd, "dist/index.css");
|
|
37
|
-
const rawCSS = fs.readFileSync(filePath, "utf8");
|
|
38
|
-
|
|
39
|
-
const resultCSS = await postcss([
|
|
40
|
-
postcssImport(),
|
|
41
|
-
postcssNested(),
|
|
42
|
-
postcssPrefixSelector({
|
|
43
|
-
prefix: ".copilot-kit-textarea-css-scope",
|
|
44
|
-
}),
|
|
45
|
-
tailwindcss,
|
|
46
|
-
autoprefixer,
|
|
47
|
-
cssnano({ preset: "default" }),
|
|
48
|
-
]).process(rawCSS, { from: filePath, to: outputPath });
|
|
49
|
-
|
|
50
|
-
if (resultCSS.css === undefined) {
|
|
51
|
-
throw new Error("No CSS output");
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return `
|
|
55
|
-
if (globalThis.hasOwnProperty("document")) {
|
|
56
|
-
const style = document?.createElement("style");
|
|
57
|
-
style.innerHTML = '${resultCSS}';
|
|
58
|
-
document?.head.appendChild(style);
|
|
59
|
-
}
|
|
60
|
-
`;
|
|
61
|
-
},
|
|
62
|
-
...options,
|
|
63
|
-
};
|
|
64
|
-
});
|
|
3
|
+
export default defineConfig((options: Options) => ({
|
|
4
|
+
entry: ["src/**/*.{ts,tsx}"],
|
|
5
|
+
format: ["esm", "cjs"],
|
|
6
|
+
dts: true,
|
|
7
|
+
minify: false,
|
|
8
|
+
external: ["react"],
|
|
9
|
+
sourcemap: true,
|
|
10
|
+
exclude: [
|
|
11
|
+
"**/*.test.ts", // Exclude TypeScript test files
|
|
12
|
+
"**/*.test.tsx", // Exclude TypeScript React test files
|
|
13
|
+
"**/__tests__/*", // Exclude any files inside a __tests__ directory
|
|
14
|
+
],
|
|
15
|
+
...options,
|
|
16
|
+
}));
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import { BaseCopilotTextareaProps } from '../../types/base/index.mjs';
|
|
3
|
-
import '../../types/base/base-autosuggestions-config.mjs';
|
|
4
|
-
import '../../types/base/autosuggestions-bare-function.mjs';
|
|
5
|
-
import '@copilotkit/react-core';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Purpose: to be used as the `ref` type for `CopilotTextarea` and `BaseCopilotTextarea`.
|
|
9
|
-
*
|
|
10
|
-
* This interface extends `HTMLElement`, and is the subset of `HTMLTextAreaElement` that "actually matters".
|
|
11
|
-
* It provides the core functionality that consumers of `HTMLTextAreaElement` need 99.9% of the time:
|
|
12
|
-
* - `value`: the current value of the textarea
|
|
13
|
-
* - `focus`: make the textarea focused
|
|
14
|
-
* - `blur`: make the textarea unfocused
|
|
15
|
-
*/
|
|
16
|
-
interface HTMLCopilotTextAreaElement extends HTMLElement {
|
|
17
|
-
/**
|
|
18
|
-
* The current value of the textarea.
|
|
19
|
-
*/
|
|
20
|
-
value: string;
|
|
21
|
-
/**
|
|
22
|
-
* focus on the textarea
|
|
23
|
-
*/
|
|
24
|
-
focus: () => void;
|
|
25
|
-
/**
|
|
26
|
-
* unfocus the textarea.
|
|
27
|
-
*
|
|
28
|
-
* Called `blur` for syntactic compatibility with `HTMLTextAreaElement`.
|
|
29
|
-
*/
|
|
30
|
-
blur: () => void;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Not intended for direct use. Use CopilotTextarea instead.
|
|
34
|
-
*
|
|
35
|
-
* The `BaseCopilotTextarea` includes the basic UX component,
|
|
36
|
-
* without the business logic / AI logic that makes the content useful and coherent.
|
|
37
|
-
*
|
|
38
|
-
* It is useful if you want to build your own backend, with fully custom business logic
|
|
39
|
-
* for figuring out which contnet to fill in.
|
|
40
|
-
*/
|
|
41
|
-
declare const BaseCopilotTextarea: React__default.ForwardRefExoticComponent<BaseCopilotTextareaProps & React__default.RefAttributes<HTMLCopilotTextAreaElement>>;
|
|
42
|
-
|
|
43
|
-
export { BaseCopilotTextarea, type HTMLCopilotTextAreaElement };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { RenderElementProps } from 'slate-react';
|
|
2
|
-
|
|
3
|
-
type RenderElementFunction = (props: RenderElementProps) => JSX.Element;
|
|
4
|
-
declare function makeRenderElementFunction(suggestionsStyle: React.CSSProperties): RenderElementFunction;
|
|
5
|
-
|
|
6
|
-
export { type RenderElementFunction, makeRenderElementFunction };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { RenderPlaceholderProps } from 'slate-react';
|
|
2
|
-
|
|
3
|
-
type RenderPlaceholderFunction = (props: RenderPlaceholderProps) => JSX.Element;
|
|
4
|
-
declare function makeRenderPlaceholderFunction(placeholderStyle?: React.CSSProperties): RenderPlaceholderFunction;
|
|
5
|
-
|
|
6
|
-
export { type RenderPlaceholderFunction, makeRenderPlaceholderFunction };
|
package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
interface TrackerTextEditedSinceLastCursorMovementProps {
|
|
4
|
-
setCursorMovedSinceLastTextChange: (value: boolean) => void;
|
|
5
|
-
}
|
|
6
|
-
declare function TrackerTextEditedSinceLastCursorMovement(props: TrackerTextEditedSinceLastCursorMovementProps): react_jsx_runtime.JSX.Element;
|
|
7
|
-
|
|
8
|
-
export { TrackerTextEditedSinceLastCursorMovement };
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import { BaseCopilotTextareaProps } from '../../types/base/index.mjs';
|
|
3
|
-
import { HTMLCopilotTextAreaElement } from '../../types/html-copilot-textarea-element.mjs';
|
|
4
|
-
import { AutosuggestionsConfigUserSpecified } from '../../types/autosuggestions-config/autosuggestions-config-user-specified.mjs';
|
|
5
|
-
import '../../types/base/base-autosuggestions-config.mjs';
|
|
6
|
-
import '../../types/base/autosuggestions-bare-function.mjs';
|
|
7
|
-
import '@copilotkit/react-core';
|
|
8
|
-
import '../../types/autosuggestions-config/autosuggestions-config.mjs';
|
|
9
|
-
import '../../types/autosuggestions-config/suggestions-api-config.mjs';
|
|
10
|
-
import '@copilotkit/runtime-client-gql';
|
|
11
|
-
import '../../types/autosuggestions-config/subtypes/make-system-prompt.mjs';
|
|
12
|
-
import '../../types/autosuggestions-config/insertions-api-config.mjs';
|
|
13
|
-
import '../../types/autosuggestions-config/editing-api-config.mjs';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* <br/>
|
|
17
|
-
* <img src="/images/CopilotTextarea.gif" width="500" />
|
|
18
|
-
*
|
|
19
|
-
* `<CopilotTextarea>` is a React component that acts as a drop-in replacement for the standard `<textarea>`,
|
|
20
|
-
* offering enhanced autocomplete features powered by AI. It is context-aware, integrating seamlessly with the
|
|
21
|
-
* [`useCopilotReadable`](/reference/hooks/useCopilotReadable) hook to provide intelligent suggestions based on the application context.
|
|
22
|
-
*
|
|
23
|
-
* In addition, it provides a hovering editor window (available by default via `Cmd + K` on Mac and `Ctrl + K` on Windows) that allows the user to
|
|
24
|
-
* suggest changes to the text, for example providing a summary or rephrasing the text.
|
|
25
|
-
*
|
|
26
|
-
* ## Example
|
|
27
|
-
*
|
|
28
|
-
* ```tsx
|
|
29
|
-
* import { CopilotTextarea } from '@copilot/react-textarea';
|
|
30
|
-
* <CopilotTextarea
|
|
31
|
-
* autosuggestionsConfig={{
|
|
32
|
-
* textareaPurpose:
|
|
33
|
-
* "the body of an email message",
|
|
34
|
-
* chatApiConfigs: {},
|
|
35
|
-
* }}
|
|
36
|
-
* />
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* ## Usage
|
|
40
|
-
*
|
|
41
|
-
* ### Install Dependencies
|
|
42
|
-
*
|
|
43
|
-
* This component is part of the [@copilotkit/react-textarea](https://npmjs.com/package/@copilotkit/react-textarea) package.
|
|
44
|
-
*
|
|
45
|
-
* ```shell npm2yarn \"@copilotkit/react-textarea"\
|
|
46
|
-
* npm install @copilotkit/react-core @copilotkit/react-textarea
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* ### Usage
|
|
50
|
-
*
|
|
51
|
-
* Use the CopilotTextarea component in your React application similarly to a standard `<textarea />`,
|
|
52
|
-
* with additional configurations for AI-powered features.
|
|
53
|
-
*
|
|
54
|
-
* For example:
|
|
55
|
-
*
|
|
56
|
-
* ```tsx
|
|
57
|
-
* import { useState } from "react";
|
|
58
|
-
* import { CopilotTextarea } from "@copilotkit/react-textarea";
|
|
59
|
-
* export function ExampleComponent() {
|
|
60
|
-
* const [text, setText] = useState("");
|
|
61
|
-
*
|
|
62
|
-
* return (
|
|
63
|
-
* <CopilotTextarea
|
|
64
|
-
* className="custom-textarea-class"
|
|
65
|
-
* value={text}
|
|
66
|
-
* onValueChange={(value: string) => setText(value)}
|
|
67
|
-
* placeholder="Enter your text here..."
|
|
68
|
-
* autosuggestionsConfig={{
|
|
69
|
-
* textareaPurpose: "Provide context or purpose of the textarea.",
|
|
70
|
-
* chatApiConfigs: {
|
|
71
|
-
* suggestionsApiConfig: {
|
|
72
|
-
* maxTokens: 20,
|
|
73
|
-
* stop: [".", "?", "!"],
|
|
74
|
-
* },
|
|
75
|
-
* },
|
|
76
|
-
* }}
|
|
77
|
-
* />
|
|
78
|
-
* );
|
|
79
|
-
* }
|
|
80
|
-
* ```
|
|
81
|
-
*
|
|
82
|
-
* ### Look & Feel
|
|
83
|
-
*
|
|
84
|
-
* By default, CopilotKit components do not have any styles. You can import CopilotKit's stylesheet at the root of your project:
|
|
85
|
-
* ```tsx fileName="YourRootComponent.tsx"
|
|
86
|
-
* ...
|
|
87
|
-
* export function YourRootComponent() {
|
|
88
|
-
* return (
|
|
89
|
-
* <CopilotKit>
|
|
90
|
-
* ...
|
|
91
|
-
* </CopilotKit>
|
|
92
|
-
* );
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
95
|
-
* For more information about how to customize the styles, check out the [Customize Look & Feel](/concepts/customize-look-and-feel) guide.
|
|
96
|
-
* */
|
|
97
|
-
|
|
98
|
-
interface CopilotTextareaProps extends Omit<BaseCopilotTextareaProps, "baseAutosuggestionsConfig"> {
|
|
99
|
-
/**
|
|
100
|
-
* Configuration settings for the autosuggestions feature.
|
|
101
|
-
* For full reference, [check the interface on GitHub](https://github.com/CopilotKit/CopilotKit/blob/main/CopilotKit/packages/react-textarea/src/types/base/base-copilot-textarea-props.tsx#L8).
|
|
102
|
-
*
|
|
103
|
-
* <PropertyReference name="textareaPurpose" type="string" required={true} >
|
|
104
|
-
* The purpose of the text area in plain text.
|
|
105
|
-
*
|
|
106
|
-
* Example: *"The body of the email response"*
|
|
107
|
-
* </PropertyReference>
|
|
108
|
-
*
|
|
109
|
-
* <PropertyReference name="chatApiConfigs" type="ChatApiConfigs" >
|
|
110
|
-
* The chat API configurations.
|
|
111
|
-
*
|
|
112
|
-
* <strong>NOTE:</strong> You must provide specify at least one of `suggestionsApiConfig` or `insertionApiConfig`.
|
|
113
|
-
*
|
|
114
|
-
* <PropertyReference name="suggestionsApiConfig" type="SuggestionsApiConfig">
|
|
115
|
-
* For full reference, please [click here](https://github.com/CopilotKit/CopilotKit/blob/main/CopilotKit/packages/react-textarea/src/types/autosuggestions-config/suggestions-api-config.tsx#L4).
|
|
116
|
-
* </PropertyReference>
|
|
117
|
-
* <PropertyReference name="insertionApiConfig" type="InsertionApiConfig">
|
|
118
|
-
* For full reference, please [click here](https://github.com/CopilotKit/CopilotKit/blob/main/CopilotKit/packages/react-textarea/src/types/autosuggestions-config/insertions-api-config.tsx#L4).
|
|
119
|
-
* </PropertyReference>
|
|
120
|
-
* </PropertyReference>
|
|
121
|
-
*
|
|
122
|
-
* <PropertyReference name="disabled" type="boolean" >
|
|
123
|
-
* Whether the textarea is disabled.
|
|
124
|
-
* </PropertyReference>
|
|
125
|
-
*
|
|
126
|
-
* <PropertyReference name="disableBranding" type="boolean" >
|
|
127
|
-
* Whether to disable the CopilotKit branding.
|
|
128
|
-
* </PropertyReference>
|
|
129
|
-
*
|
|
130
|
-
* <PropertyReference name="placeholderStyle" type="React.CSSProperties" >
|
|
131
|
-
* Specifies the CSS styles to apply to the placeholder text.
|
|
132
|
-
* </PropertyReference>
|
|
133
|
-
*
|
|
134
|
-
* <PropertyReference name="suggestionsStyle" type="React.CSSProperties" >
|
|
135
|
-
* Specifies the CSS styles to apply to the suggestions list.
|
|
136
|
-
* </PropertyReference>
|
|
137
|
-
*
|
|
138
|
-
* <PropertyReference name="hoverMenuClassname" type="string" >
|
|
139
|
-
* A class name to apply to the editor popover window.
|
|
140
|
-
* </PropertyReference>
|
|
141
|
-
*
|
|
142
|
-
* <PropertyReference name="value" type="string" >
|
|
143
|
-
* The initial value of the textarea. Can be controlled via `onValueChange`.
|
|
144
|
-
* </PropertyReference>
|
|
145
|
-
*
|
|
146
|
-
* <PropertyReference name="onValueChange" type="(value: string) => void" >
|
|
147
|
-
* Callback invoked when the value of the textarea changes.
|
|
148
|
-
* </PropertyReference>
|
|
149
|
-
*
|
|
150
|
-
* <PropertyReference name="onChange" type="(event: React.ChangeEvent<HTMLTextAreaElement>) => void" >
|
|
151
|
-
* Callback invoked when a `change` event is triggered on the textarea element.
|
|
152
|
-
* </PropertyReference>
|
|
153
|
-
*
|
|
154
|
-
* <PropertyReference name="shortcut" type="string" >
|
|
155
|
-
* The shortcut to use to open the editor popover window. Default is `"Cmd-k"`.
|
|
156
|
-
* </PropertyReference>
|
|
157
|
-
*/
|
|
158
|
-
autosuggestionsConfig: AutosuggestionsConfigUserSpecified;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* A copilot textarea that uses the standard autosuggestions function.
|
|
162
|
-
*/
|
|
163
|
-
declare const CopilotTextarea: React__default.ForwardRefExoticComponent<CopilotTextareaProps & React__default.RefAttributes<HTMLCopilotTextAreaElement>>;
|
|
164
|
-
|
|
165
|
-
export { CopilotTextarea, type CopilotTextareaProps };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface HoveringEditorContextProps {
|
|
5
|
-
isDisplayed: boolean;
|
|
6
|
-
setIsDisplayed: (value: boolean) => void;
|
|
7
|
-
}
|
|
8
|
-
interface HoveringEditorProviderProps {
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* A context provider for the hovering editor over the `CopilotTextarea`
|
|
13
|
-
* (used to edit and insert text into the `CopilotTextarea`).
|
|
14
|
-
*/
|
|
15
|
-
declare const HoveringEditorProvider: ({ children }: HoveringEditorProviderProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
-
declare const useHoveringEditorContext: () => HoveringEditorContextProps;
|
|
17
|
-
|
|
18
|
-
export { HoveringEditorProvider, type HoveringEditorProviderProps, useHoveringEditorContext };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
interface BaseProps {
|
|
4
|
-
className: string;
|
|
5
|
-
[key: string]: unknown;
|
|
6
|
-
}
|
|
7
|
-
declare const Button: React__default.ForwardRefExoticComponent<Omit<React__default.PropsWithChildren<{
|
|
8
|
-
active: boolean;
|
|
9
|
-
reversed: boolean;
|
|
10
|
-
} & BaseProps>, "ref"> & React__default.RefAttributes<HTMLSpanElement>>;
|
|
11
|
-
declare const Menu: React__default.ForwardRefExoticComponent<Omit<React__default.PropsWithChildren<BaseProps>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const Portal: ({ children }: {
|
|
13
|
-
children: React__default.ReactNode;
|
|
14
|
-
}) => React__default.ReactPortal | null;
|
|
15
|
-
declare const Toolbar: React__default.ForwardRefExoticComponent<Omit<React__default.PropsWithChildren<BaseProps>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
|
|
17
|
-
export { Button, Menu, Portal, Toolbar };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { InsertionEditorApiConfig } from '../../types/base/autosuggestions-bare-function.mjs';
|
|
3
|
-
import '@copilotkit/react-core';
|
|
4
|
-
|
|
5
|
-
interface HoveringToolbarProps {
|
|
6
|
-
apiConfig: InsertionEditorApiConfig;
|
|
7
|
-
contextCategories: string[];
|
|
8
|
-
hoverMenuClassname: string | undefined;
|
|
9
|
-
}
|
|
10
|
-
declare const HoveringToolbar: (props: HoveringToolbarProps) => react_jsx_runtime.JSX.Element | null;
|
|
11
|
-
|
|
12
|
-
export { HoveringToolbar, type HoveringToolbarProps };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { EditingEditorState, Generator_InsertionOrEditingSuggestion } from '../../../types/base/autosuggestions-bare-function.mjs';
|
|
3
|
-
import '@copilotkit/react-core';
|
|
4
|
-
|
|
5
|
-
type SuggestionState = {
|
|
6
|
-
editorState: EditingEditorState;
|
|
7
|
-
};
|
|
8
|
-
interface HoveringInsertionPromptBoxCoreProps {
|
|
9
|
-
state: SuggestionState;
|
|
10
|
-
performInsertion: (insertedText: string) => void;
|
|
11
|
-
insertionOrEditingFunction: Generator_InsertionOrEditingSuggestion;
|
|
12
|
-
contextCategories: string[];
|
|
13
|
-
}
|
|
14
|
-
declare const HoveringInsertionPromptBoxCore: ({ performInsertion, state, insertionOrEditingFunction, contextCategories, }: HoveringInsertionPromptBoxCoreProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
-
|
|
16
|
-
export { HoveringInsertionPromptBoxCore, type HoveringInsertionPromptBoxCoreProps, type SuggestionState };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { EditingEditorState, InsertionEditorApiConfig } from '../../../types/base/autosuggestions-bare-function.mjs';
|
|
3
|
-
import '@copilotkit/react-core';
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
editorState: EditingEditorState;
|
|
7
|
-
apiConfig: InsertionEditorApiConfig;
|
|
8
|
-
performInsertion: (insertedText: string) => void;
|
|
9
|
-
closeWindow: () => void;
|
|
10
|
-
contextCategories: string[];
|
|
11
|
-
}
|
|
12
|
-
declare const HoveringInsertionPromptBox: (props: Props) => react_jsx_runtime.JSX.Element;
|
|
13
|
-
|
|
14
|
-
export { HoveringInsertionPromptBox, type Props };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { BaseCopilotTextarea } from './base-copilot-textarea/base-copilot-textarea.mjs';
|
|
2
|
-
export { CopilotTextarea, CopilotTextareaProps } from './copilot-textarea/copilot-textarea.mjs';
|
|
3
|
-
import '../types/base/base-autosuggestions-config.mjs';
|
|
4
|
-
import '../types/base/autosuggestions-bare-function.mjs';
|
|
5
|
-
import '../types/base/index.mjs';
|
|
6
|
-
import '../types/html-copilot-textarea-element.mjs';
|
|
7
|
-
import '../types/autosuggestions-config/autosuggestions-config.mjs';
|
|
8
|
-
import '../types/autosuggestions-config/subtypes/make-system-prompt.mjs';
|
|
9
|
-
import '../types/autosuggestions-config/autosuggestions-config-user-specified.mjs';
|
|
10
|
-
import 'react';
|
|
11
|
-
import '@copilotkit/react-core';
|
|
12
|
-
import '../types/autosuggestions-config/suggestions-api-config.mjs';
|
|
13
|
-
import '@copilotkit/runtime-client-gql';
|
|
14
|
-
import '../types/autosuggestions-config/insertions-api-config.mjs';
|
|
15
|
-
import '../types/autosuggestions-config/editing-api-config.mjs';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
interface ChipWithIconProps {
|
|
4
|
-
label: string;
|
|
5
|
-
onDelete: () => void;
|
|
6
|
-
iconUrl: string;
|
|
7
|
-
}
|
|
8
|
-
declare const ChipWithIcon: ({ label, onDelete, iconUrl }: ChipWithIconProps) => react_jsx_runtime.JSX.Element;
|
|
9
|
-
|
|
10
|
-
export { ChipWithIcon, type ChipWithIconProps };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { DocumentPointer } from '@copilotkit/react-core';
|
|
3
|
-
|
|
4
|
-
interface SourceSearchBoxProps {
|
|
5
|
-
searchTerm: string;
|
|
6
|
-
suggestedFiles: DocumentPointer[];
|
|
7
|
-
onSelectedFile: (filePointer: DocumentPointer) => void;
|
|
8
|
-
}
|
|
9
|
-
declare function SourceSearchBox(props: SourceSearchBoxProps): react_jsx_runtime.JSX.Element;
|
|
10
|
-
declare function Logo({ children, width, height, }: {
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
width: string;
|
|
13
|
-
height: string;
|
|
14
|
-
}): react_jsx_runtime.JSX.Element;
|
|
15
|
-
|
|
16
|
-
export { Logo, SourceSearchBox, type SourceSearchBoxProps };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
|
|
5
|
-
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
7
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
8
|
-
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
9
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
|
-
asChild?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
|
|
14
|
-
export { Button, type ButtonProps, buttonVariants };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { DialogProps } from '@radix-ui/react-dialog';
|
|
4
|
-
|
|
5
|
-
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
} & React.HTMLAttributes<HTMLDivElement> & {
|
|
8
|
-
label?: string;
|
|
9
|
-
shouldFilter?: boolean;
|
|
10
|
-
filter?: (value: string, search: string) => number;
|
|
11
|
-
defaultValue?: string;
|
|
12
|
-
value?: string;
|
|
13
|
-
onValueChange?: (value: string) => void;
|
|
14
|
-
loop?: boolean;
|
|
15
|
-
vimBindings?: boolean;
|
|
16
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
interface CommandDialogProps extends DialogProps {
|
|
18
|
-
}
|
|
19
|
-
declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => react_jsx_runtime.JSX.Element;
|
|
20
|
-
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "type"> & {
|
|
21
|
-
value?: string;
|
|
22
|
-
onValueChange?: (search: string) => void;
|
|
23
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
24
|
-
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
25
|
-
children?: React.ReactNode;
|
|
26
|
-
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
28
|
-
children?: React.ReactNode;
|
|
29
|
-
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
31
|
-
children?: React.ReactNode;
|
|
32
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "value" | "heading"> & {
|
|
33
|
-
heading?: React.ReactNode;
|
|
34
|
-
value?: string;
|
|
35
|
-
forceMount?: boolean;
|
|
36
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement> & {
|
|
38
|
-
alwaysRender?: boolean;
|
|
39
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
-
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
41
|
-
children?: React.ReactNode;
|
|
42
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "disabled" | "value" | "onSelect"> & {
|
|
43
|
-
disabled?: boolean;
|
|
44
|
-
onSelect?: (value: string) => void;
|
|
45
|
-
value?: string;
|
|
46
|
-
forceMount?: boolean;
|
|
47
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
-
declare const CommandShortcut: {
|
|
49
|
-
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
50
|
-
displayName: string;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
|
-
|
|
5
|
-
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
6
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const DialogHeader: {
|
|
9
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
|
12
|
-
declare const DialogFooter: {
|
|
13
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
16
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
-
|
|
19
|
-
export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
|
-
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
|
|
6
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_dist_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
7
|
-
|
|
8
|
-
export { Label };
|
package/dist/context/index.d.mts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AutosuggestionsBareFunction } from '../../types/base/autosuggestions-bare-function.mjs';
|
|
2
|
-
import { AutosuggestionState } from '../../types/base/autosuggestion-state.mjs';
|
|
3
|
-
import { EditorAutocompleteState } from '../../types/base/editor-autocomplete-state.mjs';
|
|
4
|
-
import '@copilotkit/react-core';
|
|
5
|
-
import 'slate';
|
|
6
|
-
|
|
7
|
-
interface UseAutosuggestionsResult {
|
|
8
|
-
currentAutocompleteSuggestion: AutosuggestionState | null;
|
|
9
|
-
onChangeHandler: (newEditorState: EditorAutocompleteState | null) => void;
|
|
10
|
-
onKeyDownHandler: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
11
|
-
onTouchStartHandler: (event: React.TouchEvent<HTMLDivElement>) => void;
|
|
12
|
-
}
|
|
13
|
-
declare function useAutosuggestions(debounceTime: number, shouldAcceptAutosuggestionOnKeyPress: (event: React.KeyboardEvent<HTMLDivElement>) => boolean, shouldAcceptAutosuggestionOnTouch: (event: React.TouchEvent<HTMLDivElement>) => boolean, autosuggestionFunction: AutosuggestionsBareFunction, insertAutocompleteSuggestion: (suggestion: AutosuggestionState) => void, disableWhenEmpty: boolean, disabled: boolean): UseAutosuggestionsResult;
|
|
14
|
-
|
|
15
|
-
export { type UseAutosuggestionsResult, useAutosuggestions };
|
package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.d.mts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import { Editor } from 'slate';
|
|
3
|
-
import { HTMLCopilotTextAreaElement } from '../../types/html-copilot-textarea-element.mjs';
|
|
4
|
-
|
|
5
|
-
declare function usePopulateCopilotTextareaRef(editor: Editor, ref: React__default.Ref<HTMLCopilotTextAreaElement>): void;
|
|
6
|
-
|
|
7
|
-
export { usePopulateCopilotTextareaRef };
|
package/dist/hooks/index.d.mts
DELETED
package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.d.mts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AutosuggestionsBareFunction } from '../../types/base/autosuggestions-bare-function.mjs';
|
|
2
|
-
import { SuggestionsApiConfig } from '../../types/autosuggestions-config/suggestions-api-config.mjs';
|
|
3
|
-
import '@copilotkit/react-core';
|
|
4
|
-
import '@copilotkit/runtime-client-gql';
|
|
5
|
-
import '../../types/autosuggestions-config/subtypes/make-system-prompt.mjs';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Returns a memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.
|
|
9
|
-
* The function takes in the text before and after the cursor, and an abort signal.
|
|
10
|
-
* It sends a POST request to the API endpoint with the messages array containing the system message, few shot messages, and user messages.
|
|
11
|
-
* The function returns the suggestion from the API response.
|
|
12
|
-
*
|
|
13
|
-
* @param textareaPurpose - The purpose of the textarea. This is included in the system message.
|
|
14
|
-
* @param apiEndpoint - The API endpoint to send the autosuggestion request to.
|
|
15
|
-
* @param makeSystemMessage - A function that takes in a context string and returns a system message to include in the autosuggestion request.
|
|
16
|
-
* @param fewShotMessages - An array of few shot messages to include in the autosuggestion request.
|
|
17
|
-
* @param contextCategories - The categories of context strings we want to include. By default, we include the (default) "global" context category.
|
|
18
|
-
* @returns A memoized function that sends a request to the specified API endpoint to get an autosuggestion for the user's input.
|
|
19
|
-
*/
|
|
20
|
-
declare function useMakeStandardAutosuggestionFunction(textareaPurpose: string, contextCategories: string[], apiConfig: SuggestionsApiConfig): AutosuggestionsBareFunction;
|
|
21
|
-
|
|
22
|
-
export { useMakeStandardAutosuggestionFunction };
|