@bendyline/docblocks-react 2.7.5 → 2.7.7
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/THIRD_PARTY_NOTICES.txt +26 -26
- package/dist/{AiDiagrams-5P657GFC.js → AiDiagrams-7KBAOXPB.js} +4 -2
- package/dist/{AiEditorAssistant-V4MZRC6Q.js → AiEditorAssistant-4B2PFFOT.js} +128 -12
- package/dist/{AiStudyDialog-GSCFTG3G.js → AiStudyDialog-JPVFFZBB.js} +14 -4
- package/dist/{AudioExportDialog-IOYIEAER.js → AudioExportDialog-EICCBSSE.js} +1 -1
- package/dist/{ExportDialog-LGWBXIWN.js → ExportDialog-EYDGTJ3S.js} +1 -1
- package/dist/{ExportToolbarControls-HOV424TO.js → ExportToolbarControls-2XY2CKGH.js} +45 -4
- package/dist/{PresentationMaker-H5B44Q7P.js → PresentationMaker-VYQKNL3L.js} +2 -2
- package/dist/{SpeechToolbarControl-KNI2C4JJ.js → SpeechToolbarControl-E6OSJGHL.js} +217 -71
- package/dist/{TextFromNarration-EYOMW2IW.js → TextFromNarration-ME6FAYWO.js} +1 -1
- package/dist/{WorkspaceSearchPanel-J6BKEZQJ.js → WorkspaceSearchPanel-MEBBTK7F.js} +3 -3
- package/dist/{chunk-I44HKDQX.js → chunk-3TSJQESW.js} +16 -3
- package/dist/chunk-5OIHB3SR.js +1162 -0
- package/dist/chunk-6QHZNL6C.js +208 -0
- package/dist/{chunk-FBPCURCS.js → chunk-7HBKKXRV.js} +291 -82
- package/dist/{chunk-KBDZDFPU.js → chunk-BNKIPCXO.js} +4 -1
- package/dist/{chunk-2IYBBFQX.js → chunk-BZRYQENB.js} +59 -16
- package/dist/{chunk-GFK4TCKN.js → chunk-G63YXKBC.js} +8 -5
- package/dist/{chunk-DICE7VBJ.js → chunk-KHQ44ZFA.js} +16 -1
- package/dist/{chunk-CUCWCZRO.js → chunk-N7AKLJPY.js} +143 -98
- package/dist/{chunk-USKX66SA.js → chunk-T2PA7QEF.js} +1 -1
- package/dist/editor.js +2 -2
- package/dist/export/index.js +1 -1
- package/dist/index.js +232 -134
- package/dist/settings/index.js +2 -1
- package/package.json +8 -8
- package/src/styles/docblocks.css +547 -11
- package/dist/chunk-I4JURPYS.js +0 -812
- package/dist/{QuickOpenDialog-ENVFGIHS.js → QuickOpenDialog-3QEX7RZG.js} +3 -3
package/THIRD_PARTY_NOTICES.txt
CHANGED
|
@@ -15,15 +15,15 @@ This notice is included in the published npm tarball. Transitive packages instal
|
|
|
15
15
|
| Package | Version | License | Source |
|
|
16
16
|
| --- | --- | --- | --- |
|
|
17
17
|
| @antfu/install-pkg | 2.1.0 | MIT | https://github.com/antfu-collective/install-pkg |
|
|
18
|
-
| @bendyline/squisq | 2.13.
|
|
18
|
+
| @bendyline/squisq | 2.13.3 | MIT | https://github.com/bendyline/squisq |
|
|
19
19
|
| @bendyline/squisq-calc | 2.11.2 | MIT | https://github.com/bendyline/squisq |
|
|
20
|
-
| @bendyline/squisq-editor-react | 2.13.
|
|
21
|
-
| @bendyline/squisq-formats | 2.8.
|
|
20
|
+
| @bendyline/squisq-editor-react | 2.13.5 | MIT | https://github.com/bendyline/squisq |
|
|
21
|
+
| @bendyline/squisq-formats | 2.8.4 | MIT | https://github.com/bendyline/squisq |
|
|
22
22
|
| @bendyline/squisq-graph | 2.13.0 | MIT | https://github.com/bendyline/squisq |
|
|
23
|
-
| @bendyline/squisq-grid-react | 2.11.
|
|
24
|
-
| @bendyline/squisq-react | 2.12.
|
|
25
|
-
| @bendyline/squisq-video | 2.4.
|
|
26
|
-
| @bendyline/squisq-video-react | 2.5.
|
|
23
|
+
| @bendyline/squisq-grid-react | 2.11.32 | MIT | https://github.com/bendyline/squisq |
|
|
24
|
+
| @bendyline/squisq-react | 2.12.12 | MIT | https://github.com/bendyline/squisq |
|
|
25
|
+
| @bendyline/squisq-video | 2.4.9 | MIT | https://github.com/bendyline/squisq |
|
|
26
|
+
| @bendyline/squisq-video-react | 2.5.13 | MIT | https://github.com/bendyline/squisq |
|
|
27
27
|
| @braintree/sanitize-url | 7.1.2 | MIT | https://github.com/braintree/sanitize-url |
|
|
28
28
|
| @chevrotain/types | 11.1.2 | Apache-2.0 | https://github.com/Chevrotain/chevrotain |
|
|
29
29
|
| @ffmpeg/core | 0.12.10 | GPL-2.0-or-later | https://github.com/ffmpegwasm/ffmpeg.wasm |
|
|
@@ -205,7 +205,7 @@ This notice is included in the published npm tarball. Transitive packages instal
|
|
|
205
205
|
| dequal | 2.0.3 | MIT | https://github.com/lukeed/dequal |
|
|
206
206
|
| devlop | 1.1.0 | MIT | https://github.com/wooorm/devlop |
|
|
207
207
|
| dijkstrajs | 1.0.3 | MIT | https://github.com/tcort/dijkstrajs |
|
|
208
|
-
| dompurify | 3.4.
|
|
208
|
+
| dompurify | 3.4.17 | (MPL-2.0 OR Apache-2.0) | https://github.com/cure53/DOMPurify |
|
|
209
209
|
| emoji-regex | 8.0.0 | MIT | https://github.com/mathiasbynens/emoji-regex |
|
|
210
210
|
| entities | 4.5.0 | BSD-2-Clause | https://github.com/fb55/entities |
|
|
211
211
|
| entities | 6.0.1 | BSD-2-Clause | https://github.com/fb55/entities |
|
|
@@ -438,7 +438,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
438
438
|
SOFTWARE.
|
|
439
439
|
|
|
440
440
|
==============================================================================
|
|
441
|
-
Components: @bendyline/squisq-calc@2.11.2, @bendyline/squisq-editor-react@2.13.
|
|
441
|
+
Components: @bendyline/squisq-calc@2.11.2, @bendyline/squisq-editor-react@2.13.5, @bendyline/squisq-formats@2.8.4, @bendyline/squisq-graph@2.13.0, @bendyline/squisq-grid-react@2.11.32, @bendyline/squisq-react@2.12.12, @bendyline/squisq-video-react@2.5.13, @bendyline/squisq-video@2.4.9, @bendyline/squisq@2.13.3
|
|
442
442
|
Source files: node_modules/@bendyline/squisq-calc/LICENSE, node_modules/@bendyline/squisq-editor-react/LICENSE, node_modules/@bendyline/squisq-formats/LICENSE, node_modules/@bendyline/squisq-graph/LICENSE, node_modules/@bendyline/squisq-grid-react/LICENSE, node_modules/@bendyline/squisq-react/LICENSE, node_modules/@bendyline/squisq-video-react/LICENSE, node_modules/@bendyline/squisq-video/LICENSE, node_modules/@bendyline/squisq/LICENSE
|
|
443
443
|
==============================================================================
|
|
444
444
|
MIT License
|
|
@@ -638,7 +638,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
638
638
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
639
639
|
|
|
640
640
|
==============================================================================
|
|
641
|
-
Components: @bendyline/squisq-editor-react@2.13.
|
|
641
|
+
Components: @bendyline/squisq-editor-react@2.13.5
|
|
642
642
|
Source files: node_modules/@bendyline/squisq-editor-react/NOTICE.md
|
|
643
643
|
==============================================================================
|
|
644
644
|
# Third-Party Notices for @bendyline/squisq-editor-react
|
|
@@ -687,7 +687,7 @@ Exact third-party license texts for the bundled adapter, loader, state helper,
|
|
|
687
687
|
and Font Awesome assets are shipped in THIRD_PARTY_LICENSES.txt.
|
|
688
688
|
|
|
689
689
|
==============================================================================
|
|
690
|
-
Components: @bendyline/squisq-editor-react@2.13.
|
|
690
|
+
Components: @bendyline/squisq-editor-react@2.13.5, @tiptap/core@2.27.3, @tiptap/extension-blockquote@2.27.3, @tiptap/extension-bold@2.27.3, @tiptap/extension-bubble-menu@2.27.3, @tiptap/extension-bullet-list@2.27.3, @tiptap/extension-code-block@2.27.3, @tiptap/extension-code@2.27.3, @tiptap/extension-document@2.27.3, @tiptap/extension-dropcursor@2.27.3, @tiptap/extension-floating-menu@2.27.3, @tiptap/extension-gapcursor@2.27.3, @tiptap/extension-hard-break@2.27.3, @tiptap/extension-heading@2.27.3, @tiptap/extension-history@2.27.3, @tiptap/extension-horizontal-rule@2.27.3, @tiptap/extension-image@2.27.3, @tiptap/extension-italic@2.27.3, @tiptap/extension-link@2.27.3, @tiptap/extension-list-item@2.27.3, @tiptap/extension-mention@2.27.3, @tiptap/extension-ordered-list@2.27.3, @tiptap/extension-paragraph@2.27.3, @tiptap/extension-placeholder@2.27.3, @tiptap/extension-strike@2.27.3, @tiptap/extension-table-cell@2.27.3, @tiptap/extension-table-header@2.27.3, @tiptap/extension-table-row@2.27.3, @tiptap/extension-table@2.27.3, @tiptap/extension-task-item@2.27.3, @tiptap/extension-task-list@2.27.3, @tiptap/extension-text-style@2.27.3, @tiptap/extension-text@2.27.3, @tiptap/pm@2.27.3, @tiptap/react@2.27.3, @tiptap/starter-kit@2.27.3, @tiptap/suggestion@2.27.3
|
|
691
691
|
Source files: node_modules/@bendyline/squisq-editor-react/THIRD_PARTY_LICENSES.txt
|
|
692
692
|
==============================================================================
|
|
693
693
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-editor-react
|
|
@@ -1628,7 +1628,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
1628
1628
|
**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.**
|
|
1629
1629
|
|
|
1630
1630
|
==============================================================================
|
|
1631
|
-
Components: @bendyline/squisq-formats@2.8.
|
|
1631
|
+
Components: @bendyline/squisq-formats@2.8.4
|
|
1632
1632
|
Source files: node_modules/@bendyline/squisq-formats/NOTICE.md
|
|
1633
1633
|
==============================================================================
|
|
1634
1634
|
# Third-Party Notices for @bendyline/squisq-formats
|
|
@@ -1654,7 +1654,7 @@ texts for these dependencies are included in their respective npm
|
|
|
1654
1654
|
distributions and source repositories.
|
|
1655
1655
|
|
|
1656
1656
|
==============================================================================
|
|
1657
|
-
Components: @bendyline/squisq-formats@2.8.
|
|
1657
|
+
Components: @bendyline/squisq-formats@2.8.4
|
|
1658
1658
|
Source files: node_modules/@bendyline/squisq-formats/THIRD_PARTY_LICENSES.txt
|
|
1659
1659
|
==============================================================================
|
|
1660
1660
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-formats
|
|
@@ -2058,7 +2058,7 @@ repository license, the pinned upstream copy is vendored and identified below.
|
|
|
2058
2058
|
COMPONENTS
|
|
2059
2059
|
|
|
2060
2060
|
==============================================================================
|
|
2061
|
-
Components: @bendyline/squisq-grid-react@2.11.
|
|
2061
|
+
Components: @bendyline/squisq-grid-react@2.11.32
|
|
2062
2062
|
Source files: node_modules/@bendyline/squisq-grid-react/NOTICE.md
|
|
2063
2063
|
==============================================================================
|
|
2064
2064
|
# Third-Party Notices for @bendyline/squisq-grid-react
|
|
@@ -2079,7 +2079,7 @@ Copyright and complete license texts for these dependencies are included in
|
|
|
2079
2079
|
their respective npm distributions and source repositories.
|
|
2080
2080
|
|
|
2081
2081
|
==============================================================================
|
|
2082
|
-
Components: @bendyline/squisq-grid-react@2.11.
|
|
2082
|
+
Components: @bendyline/squisq-grid-react@2.11.32
|
|
2083
2083
|
Source files: node_modules/@bendyline/squisq-grid-react/THIRD_PARTY_LICENSES.txt
|
|
2084
2084
|
==============================================================================
|
|
2085
2085
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-grid-react
|
|
@@ -2091,7 +2091,7 @@ repository license, the pinned upstream copy is vendored and identified below.
|
|
|
2091
2091
|
COMPONENTS
|
|
2092
2092
|
|
|
2093
2093
|
==============================================================================
|
|
2094
|
-
Components: @bendyline/squisq-react@2.12.
|
|
2094
|
+
Components: @bendyline/squisq-react@2.12.12
|
|
2095
2095
|
Source files: node_modules/@bendyline/squisq-react/NOTICE.md
|
|
2096
2096
|
==============================================================================
|
|
2097
2097
|
# Third-Party Notices for @bendyline/squisq-react
|
|
@@ -2116,7 +2116,7 @@ third-party license texts for the complete standalone bundle graph are shipped
|
|
|
2116
2116
|
in THIRD_PARTY_LICENSES.txt.
|
|
2117
2117
|
|
|
2118
2118
|
==============================================================================
|
|
2119
|
-
Components: @bendyline/squisq-react@2.12.
|
|
2119
|
+
Components: @bendyline/squisq-react@2.12.12
|
|
2120
2120
|
Source files: node_modules/@bendyline/squisq-react/THIRD_PARTY_LICENSES.txt
|
|
2121
2121
|
==============================================================================
|
|
2122
2122
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-react
|
|
@@ -6603,7 +6603,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
6603
6603
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
6604
6604
|
|
|
6605
6605
|
==============================================================================
|
|
6606
|
-
Components: @bendyline/squisq-video-react@2.5.
|
|
6606
|
+
Components: @bendyline/squisq-video-react@2.5.13
|
|
6607
6607
|
Source files: node_modules/@bendyline/squisq-video-react/COPYING.GPL-2.0.txt
|
|
6608
6608
|
==============================================================================
|
|
6609
6609
|
GNU GENERAL PUBLIC LICENSE
|
|
@@ -6946,7 +6946,7 @@ library. If this is what you want to do, use the GNU Lesser General
|
|
|
6946
6946
|
Public License instead of this License.
|
|
6947
6947
|
|
|
6948
6948
|
==============================================================================
|
|
6949
|
-
Components: @bendyline/squisq-video-react@2.5.
|
|
6949
|
+
Components: @bendyline/squisq-video-react@2.5.13
|
|
6950
6950
|
Source files: node_modules/@bendyline/squisq-video-react/NOTICE.md
|
|
6951
6951
|
==============================================================================
|
|
6952
6952
|
# Third-Party Notices for @bendyline/squisq-video-react
|
|
@@ -7002,7 +7002,7 @@ at the version listed above and from https://github.com/Vanilagy/mediabunny.
|
|
|
7002
7002
|
The complete MPL-2.0 text is shipped in THIRD_PARTY_LICENSES.txt.
|
|
7003
7003
|
|
|
7004
7004
|
==============================================================================
|
|
7005
|
-
Components: @bendyline/squisq-video-react@2.5.
|
|
7005
|
+
Components: @bendyline/squisq-video-react@2.5.13, @ffmpeg/core@0.12.10, @ffmpeg/ffmpeg@0.12.15, @ffmpeg/types@0.12.4, @ffmpeg/util@0.12.2
|
|
7006
7006
|
Source files: node_modules/@bendyline/squisq-video-react/THIRD_PARTY_LICENSES.txt
|
|
7007
7007
|
==============================================================================
|
|
7008
7008
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-video-react
|
|
@@ -7444,7 +7444,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
7444
7444
|
SOFTWARE.
|
|
7445
7445
|
|
|
7446
7446
|
==============================================================================
|
|
7447
|
-
Components: @bendyline/squisq-video@2.4.
|
|
7447
|
+
Components: @bendyline/squisq-video@2.4.9
|
|
7448
7448
|
Source files: node_modules/@bendyline/squisq-video/NOTICE.md
|
|
7449
7449
|
==============================================================================
|
|
7450
7450
|
# Third-Party Notices for @bendyline/squisq-video
|
|
@@ -7469,7 +7469,7 @@ Copyright and complete license texts for the listed dependencies are included
|
|
|
7469
7469
|
in their respective npm distributions and source repositories.
|
|
7470
7470
|
|
|
7471
7471
|
==============================================================================
|
|
7472
|
-
Components: @bendyline/squisq-video@2.4.
|
|
7472
|
+
Components: @bendyline/squisq-video@2.4.9
|
|
7473
7473
|
Source files: node_modules/@bendyline/squisq-video/THIRD_PARTY_LICENSES.txt
|
|
7474
7474
|
==============================================================================
|
|
7475
7475
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-video
|
|
@@ -7481,7 +7481,7 @@ repository license, the pinned upstream copy is vendored and identified below.
|
|
|
7481
7481
|
COMPONENTS
|
|
7482
7482
|
|
|
7483
7483
|
==============================================================================
|
|
7484
|
-
Components: @bendyline/squisq@2.13.
|
|
7484
|
+
Components: @bendyline/squisq@2.13.3
|
|
7485
7485
|
Source files: node_modules/@bendyline/squisq/NOTICE.md
|
|
7486
7486
|
==============================================================================
|
|
7487
7487
|
# Third-Party Notices for @bendyline/squisq
|
|
@@ -7512,7 +7512,7 @@ third-party license texts for bundled code and data are shipped in
|
|
|
7512
7512
|
THIRD_PARTY_LICENSES.txt.
|
|
7513
7513
|
|
|
7514
7514
|
==============================================================================
|
|
7515
|
-
Components: @bendyline/squisq@2.13.
|
|
7515
|
+
Components: @bendyline/squisq@2.13.3
|
|
7516
7516
|
Source files: node_modules/@bendyline/squisq/THIRD_PARTY_LICENSES.txt
|
|
7517
7517
|
==============================================================================
|
|
7518
7518
|
THIRD-PARTY LICENSES FOR @bendyline/squisq
|
|
@@ -7720,7 +7720,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
7720
7720
|
SOFTWARE.
|
|
7721
7721
|
|
|
7722
7722
|
==============================================================================
|
|
7723
|
-
Components: @chevrotain/types@11.1.2, dompurify@3.4.
|
|
7723
|
+
Components: @chevrotain/types@11.1.2, dompurify@3.4.17
|
|
7724
7724
|
Source files: node_modules/@chevrotain/types/LICENSE.txt, node_modules/dompurify/LICENSE
|
|
7725
7725
|
==============================================================================
|
|
7726
7726
|
|
|
@@ -9848,7 +9848,7 @@ THE SOFTWARE.
|
|
|
9848
9848
|
```
|
|
9849
9849
|
|
|
9850
9850
|
==============================================================================
|
|
9851
|
-
Components: dompurify@3.4.
|
|
9851
|
+
Components: dompurify@3.4.17
|
|
9852
9852
|
Source files: node_modules/dompurify/LICENSE-MPL
|
|
9853
9853
|
==============================================================================
|
|
9854
9854
|
Mozilla Public License Version 2.0
|
|
@@ -2,8 +2,10 @@ import {
|
|
|
2
2
|
AiDiagramDialog,
|
|
3
3
|
AiIllustratePanel,
|
|
4
4
|
DiagramPreview
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-5OIHB3SR.js";
|
|
6
|
+
import "./chunk-6QHZNL6C.js";
|
|
7
|
+
import "./chunk-KHQ44ZFA.js";
|
|
8
|
+
import "./chunk-N7AKLJPY.js";
|
|
7
9
|
import "./chunk-K4I3NJFL.js";
|
|
8
10
|
import "./chunk-VJPGZCFS.js";
|
|
9
11
|
export {
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AiDiagramDialog
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5OIHB3SR.js";
|
|
4
4
|
import {
|
|
5
5
|
AiGenerationStatus,
|
|
6
6
|
STUDY_AID_KINDS,
|
|
7
7
|
STUDY_AID_LABELS
|
|
8
8
|
} from "./chunk-XNT66JC2.js";
|
|
9
|
+
import {
|
|
10
|
+
AiFactsIndicator,
|
|
11
|
+
AiKnowledgeIndicator,
|
|
12
|
+
factCheckRequest,
|
|
13
|
+
factsNeedReview,
|
|
14
|
+
useAiKnowledge,
|
|
15
|
+
useFactCheck
|
|
16
|
+
} from "./chunk-6QHZNL6C.js";
|
|
9
17
|
import {
|
|
10
18
|
useConfirmDialog
|
|
11
19
|
} from "./chunk-KBUHWZCF.js";
|
|
20
|
+
import "./chunk-KHQ44ZFA.js";
|
|
12
21
|
import {
|
|
13
22
|
useMenuKeyboard
|
|
14
23
|
} from "./chunk-GMA4KGGO.js";
|
|
@@ -28,7 +37,7 @@ import {
|
|
|
28
37
|
reviewDocumentCharacters,
|
|
29
38
|
sanitizeGeneratedMarkdown,
|
|
30
39
|
withoutPictureFindings
|
|
31
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-N7AKLJPY.js";
|
|
32
41
|
import {
|
|
33
42
|
unavailableSentence,
|
|
34
43
|
useAiStatus
|
|
@@ -53,6 +62,75 @@ import {
|
|
|
53
62
|
useEditorContextMenuItems
|
|
54
63
|
} from "@bendyline/squisq-editor-react";
|
|
55
64
|
|
|
65
|
+
// src/Ai/knowledge-citations.ts
|
|
66
|
+
var MARKER = /[ \t]?(?<![\]\\\p{L}_])\[(\d{1,3}(?:\s*(?:[-–]|,)\s*\d{1,3})*)\](?![(:[])/gu;
|
|
67
|
+
function citationNumbers(inner) {
|
|
68
|
+
const numbers = [];
|
|
69
|
+
for (const part of inner.split(",")) {
|
|
70
|
+
const range = /^\s*(\d{1,3})\s*[-–]\s*(\d{1,3})\s*$/u.exec(part);
|
|
71
|
+
if (range) {
|
|
72
|
+
const from = Number(range[1]);
|
|
73
|
+
const to = Number(range[2]);
|
|
74
|
+
for (let n = Math.min(from, to); n <= Math.max(from, to) && numbers.length < 50; n++) {
|
|
75
|
+
numbers.push(n);
|
|
76
|
+
}
|
|
77
|
+
} else if (/^\s*\d{1,3}\s*$/u.test(part)) numbers.push(Number(part));
|
|
78
|
+
}
|
|
79
|
+
return [...new Set(numbers)];
|
|
80
|
+
}
|
|
81
|
+
function mapProse(markdown, transform) {
|
|
82
|
+
let fence = null;
|
|
83
|
+
return markdown.split("\n").map((line) => {
|
|
84
|
+
const opener = /^\s{0,3}(`{3,}|~{3,})/u.exec(line)?.[1];
|
|
85
|
+
if (fence !== null) {
|
|
86
|
+
if (opener && opener[0] === fence[0] && opener.length >= fence.length) fence = null;
|
|
87
|
+
return line;
|
|
88
|
+
}
|
|
89
|
+
if (opener) {
|
|
90
|
+
fence = opener;
|
|
91
|
+
return line;
|
|
92
|
+
}
|
|
93
|
+
return transform(line);
|
|
94
|
+
}).join("\n");
|
|
95
|
+
}
|
|
96
|
+
function stripCitationMarkers(markdown) {
|
|
97
|
+
return mapProse(markdown, (line) => line.replace(MARKER, ""));
|
|
98
|
+
}
|
|
99
|
+
function citationsToFootnotes(markdown, evidence, catalogNames, document2) {
|
|
100
|
+
const taken = new Set([...document2.matchAll(/\[\^([^\]\s]+)\]/gu)].map((match) => match[1]));
|
|
101
|
+
const labels = /* @__PURE__ */ new Map();
|
|
102
|
+
let next = 1;
|
|
103
|
+
const labelFor = (n) => {
|
|
104
|
+
const passage = evidence[n - 1];
|
|
105
|
+
const article = passage.title ? `${passage.catalogId}\0${passage.title}` : `#${n}`;
|
|
106
|
+
const known = labels.get(article);
|
|
107
|
+
if (known) return known.label;
|
|
108
|
+
let label = `source-${next++}`;
|
|
109
|
+
while (taken.has(label)) label = `source-${next++}`;
|
|
110
|
+
labels.set(article, { label, passage });
|
|
111
|
+
return label;
|
|
112
|
+
};
|
|
113
|
+
const body = mapProse(
|
|
114
|
+
markdown,
|
|
115
|
+
(line) => line.replace(
|
|
116
|
+
MARKER,
|
|
117
|
+
(_marker, inner) => [
|
|
118
|
+
...new Set(
|
|
119
|
+
citationNumbers(inner).filter((n) => n >= 1 && n <= evidence.length).map(labelFor)
|
|
120
|
+
)
|
|
121
|
+
].map((label) => `[^${label}]`).join("")
|
|
122
|
+
)
|
|
123
|
+
);
|
|
124
|
+
if (labels.size === 0) return body;
|
|
125
|
+
const notes = [...labels.values()].map(({ label, passage }) => {
|
|
126
|
+
const catalog = catalogNames.get(passage.catalogId) ?? passage.catalogId;
|
|
127
|
+
return `[^${label}]: ${passage.title || "Untitled article"}, from the ${catalog} knowledge catalog.`;
|
|
128
|
+
});
|
|
129
|
+
return `${body.trimEnd()}
|
|
130
|
+
|
|
131
|
+
${notes.join("\n")}`;
|
|
132
|
+
}
|
|
133
|
+
|
|
56
134
|
// src/Ai/draft-capacity.ts
|
|
57
135
|
import { AI_WIRE_LIMITS } from "@bendyline/docblocks/host";
|
|
58
136
|
function estimateTokens(text) {
|
|
@@ -83,7 +161,7 @@ function draftCapacityNotice(request, model, expectedOutput = "") {
|
|
|
83
161
|
// src/Ai/AiEditorAssistant.tsx
|
|
84
162
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
85
163
|
var AiStudyDialog = lazy(
|
|
86
|
-
() => import("./AiStudyDialog-
|
|
164
|
+
() => import("./AiStudyDialog-JPVFFZBB.js").then((module) => ({ default: module.AiStudyDialog }))
|
|
87
165
|
);
|
|
88
166
|
function AiToolbarControl({
|
|
89
167
|
ai,
|
|
@@ -340,7 +418,13 @@ function AiDraftDialog({
|
|
|
340
418
|
const handleRef = useRef(null);
|
|
341
419
|
const requestRef = useRef(0);
|
|
342
420
|
const { confirm: confirmAction, confirmDialog } = useConfirmDialog();
|
|
421
|
+
const { knowledge, citable, ai: knowledgeAi, reset: resetKnowledge } = useAiKnowledge(ai);
|
|
343
422
|
const selectedMarkdown = capturedSelection.markdown ?? capturedSelection.text;
|
|
423
|
+
const factsGiven = useMemo(
|
|
424
|
+
() => originalRequest?.messages.filter((message) => message.role === "user").map((message) => message.content).join("\n\n") ?? "",
|
|
425
|
+
[originalRequest]
|
|
426
|
+
);
|
|
427
|
+
const facts = useFactCheck(ai, running ? null : draft, knowledge, factsGiven, citable);
|
|
344
428
|
const draftRequest = useMemo(
|
|
345
429
|
() => ({
|
|
346
430
|
...buildDraftRequest({
|
|
@@ -377,10 +461,11 @@ function AiDraftDialog({
|
|
|
377
461
|
setFinishNote(null);
|
|
378
462
|
setIncomplete(false);
|
|
379
463
|
setRunning(true);
|
|
464
|
+
if (!prefix) resetKnowledge();
|
|
380
465
|
const startedAt = Date.now();
|
|
381
466
|
setGeneration({ progress: null, startedAt, lastActivityAt: startedAt });
|
|
382
|
-
const handle =
|
|
383
|
-
if (requestRef.current !== requestId) return;
|
|
467
|
+
const handle = knowledgeAi.chat(request, (event) => {
|
|
468
|
+
if (requestRef.current !== requestId || event.kind === "knowledge") return;
|
|
384
469
|
if (event.kind === "progress") {
|
|
385
470
|
setGeneration(
|
|
386
471
|
(current) => current && {
|
|
@@ -435,7 +520,7 @@ function AiDraftDialog({
|
|
|
435
520
|
});
|
|
436
521
|
handleRef.current = handle;
|
|
437
522
|
},
|
|
438
|
-
[
|
|
523
|
+
[knowledgeAi, resetKnowledge, documentSource]
|
|
439
524
|
);
|
|
440
525
|
const generate = useCallback(async () => {
|
|
441
526
|
if (running || draftCapacityNotice(draftRequest, model)?.blocked) return;
|
|
@@ -463,6 +548,22 @@ function AiDraftDialog({
|
|
|
463
548
|
if (running) return;
|
|
464
549
|
const replacement = sanitizeGeneratedMarkdown(draft ?? "", documentSource);
|
|
465
550
|
if (!replacement) return;
|
|
551
|
+
const factCheck = !incomplete && ai.checkFacts && factCheckRequest(replacement, knowledge, factsGiven, citable);
|
|
552
|
+
if (factCheck) {
|
|
553
|
+
const previousRequest = requestRef.current;
|
|
554
|
+
const checked = await ai.checkFacts?.(factCheck);
|
|
555
|
+
if (requestRef.current !== previousRequest) return;
|
|
556
|
+
if (checked?.ok && factsNeedReview(checked.value)) {
|
|
557
|
+
const count = checked.value.unsourced.length;
|
|
558
|
+
const accepted = await confirmAction({
|
|
559
|
+
title: "Use details no source shows?",
|
|
560
|
+
message: `${count} ${count === 1 ? "statement in this draft includes" : "statements in this draft include"} names, dates or numbers that neither your document nor the reference passages show. The model may have written them from memory. Check them before you rely on them.`,
|
|
561
|
+
confirmLabel: mode === "rewrite" ? "Replace anyway" : "Insert anyway",
|
|
562
|
+
cancelLabel: "Review draft"
|
|
563
|
+
});
|
|
564
|
+
if (!accepted || requestRef.current !== previousRequest) return;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
466
567
|
if (incomplete) {
|
|
467
568
|
const previousRequest = requestRef.current;
|
|
468
569
|
const accepted = await confirmAction({
|
|
@@ -486,7 +587,13 @@ function AiDraftDialog({
|
|
|
486
587
|
setError("The selected text changed. Close this dialog and select it again.");
|
|
487
588
|
return;
|
|
488
589
|
}
|
|
489
|
-
|
|
590
|
+
const inserted = knowledge?.outcome !== "used" ? replacement : mode === "compose" && citable ? citationsToFootnotes(
|
|
591
|
+
replacement,
|
|
592
|
+
knowledge.evidence,
|
|
593
|
+
new Map(knowledge.sources.map((source) => [source.catalogId, source.name])),
|
|
594
|
+
documentSource
|
|
595
|
+
) : stripCitationMarkers(replacement);
|
|
596
|
+
if (!replaceSelection(inserted)) {
|
|
490
597
|
setError("DocBlocks could not apply the draft in the current editor view.");
|
|
491
598
|
return;
|
|
492
599
|
}
|
|
@@ -502,7 +609,11 @@ function AiDraftDialog({
|
|
|
502
609
|
replaceSelection,
|
|
503
610
|
running,
|
|
504
611
|
incomplete,
|
|
505
|
-
confirmAction
|
|
612
|
+
confirmAction,
|
|
613
|
+
ai,
|
|
614
|
+
knowledge,
|
|
615
|
+
factsGiven,
|
|
616
|
+
citable
|
|
506
617
|
]);
|
|
507
618
|
const dialog = /* @__PURE__ */ jsxs(
|
|
508
619
|
Dialog,
|
|
@@ -516,7 +627,7 @@ function AiDraftDialog({
|
|
|
516
627
|
bodyClassName: "db-ai-draft-body",
|
|
517
628
|
footerClassName: "db-ai-draft-footer",
|
|
518
629
|
footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
519
|
-
(running || finishNote || error || capacity) && /* @__PURE__ */ jsxs("div", { className: "db-ai-footer-status", children: [
|
|
630
|
+
(running || finishNote || error || capacity || knowledge || facts?.checked) && /* @__PURE__ */ jsxs("div", { className: "db-ai-footer-status", children: [
|
|
520
631
|
running && generation && /* @__PURE__ */ jsx(
|
|
521
632
|
AiGenerationStatus,
|
|
522
633
|
{
|
|
@@ -524,6 +635,8 @@ function AiDraftDialog({
|
|
|
524
635
|
characters: Math.max(0, (draft?.length ?? 0) - prefixCharacters)
|
|
525
636
|
}
|
|
526
637
|
),
|
|
638
|
+
/* @__PURE__ */ jsx(AiKnowledgeIndicator, { knowledge }),
|
|
639
|
+
!running && /* @__PURE__ */ jsx(AiFactsIndicator, { check: facts }),
|
|
527
640
|
finishNote && /* @__PURE__ */ jsx("p", { className: "db-ai-note", children: finishNote }),
|
|
528
641
|
!running && capacity && /* @__PURE__ */ jsx("p", { className: "db-ai-note", role: "status", children: capacity.message }),
|
|
529
642
|
error && /* @__PURE__ */ jsx("p", { className: "db-ai-error", role: "alert", children: error })
|
|
@@ -618,6 +731,7 @@ function AiReviewPanel({ ai, onClose }) {
|
|
|
618
731
|
const handleRef = useRef(null);
|
|
619
732
|
const requestRef = useRef(0);
|
|
620
733
|
const startedRef = useRef(false);
|
|
734
|
+
const { knowledge, ai: knowledgeAi, reset: resetKnowledge } = useAiKnowledge(ai);
|
|
621
735
|
const cancelReview = useCallback(() => {
|
|
622
736
|
requestRef.current += 1;
|
|
623
737
|
handleRef.current?.cancel();
|
|
@@ -647,8 +761,9 @@ function AiReviewPanel({ ai, onClose }) {
|
|
|
647
761
|
setResolvedIds(/* @__PURE__ */ new Set());
|
|
648
762
|
setApplyErrorId(null);
|
|
649
763
|
setError(null);
|
|
650
|
-
|
|
651
|
-
|
|
764
|
+
resetKnowledge();
|
|
765
|
+
const handle = knowledgeAi.chat(buildReviewRequest(source), (event) => {
|
|
766
|
+
if (requestRef.current !== requestId || event.kind === "delta" || event.kind === "progress" || event.kind === "knowledge")
|
|
652
767
|
return;
|
|
653
768
|
handleRef.current = null;
|
|
654
769
|
if (event.kind === "error") {
|
|
@@ -672,7 +787,7 @@ function AiReviewPanel({ ai, onClose }) {
|
|
|
672
787
|
setPhase("ready");
|
|
673
788
|
});
|
|
674
789
|
handleRef.current = handle;
|
|
675
|
-
}, [
|
|
790
|
+
}, [knowledgeAi, resetKnowledge, markdownSource]);
|
|
676
791
|
useEffect(() => {
|
|
677
792
|
if (startedRef.current) return;
|
|
678
793
|
startedRef.current = true;
|
|
@@ -733,6 +848,7 @@ function AiReviewPanel({ ai, onClose }) {
|
|
|
733
848
|
/* @__PURE__ */ jsx("span", { className: "db-ai-spinner", "aria-hidden": "true" }),
|
|
734
849
|
" Reviewing this document\u2026"
|
|
735
850
|
] }),
|
|
851
|
+
phase !== "idle" && knowledge && /* @__PURE__ */ jsx("div", { className: "db-ai-review-knowledge", children: /* @__PURE__ */ jsx(AiKnowledgeIndicator, { knowledge }) }),
|
|
736
852
|
phase === "error" && error && /* @__PURE__ */ jsx("div", { className: "db-ai-review-empty db-ai-error", role: "alert", children: error }),
|
|
737
853
|
cutOff && phase === "ready" && /* @__PURE__ */ jsxs("div", { className: "db-ai-review-stale", role: "status", children: [
|
|
738
854
|
"The AI ran out of room after ",
|
|
@@ -9,6 +9,11 @@ import {
|
|
|
9
9
|
withStudyAidFrontmatter,
|
|
10
10
|
writeStudyAid
|
|
11
11
|
} from "./chunk-XNT66JC2.js";
|
|
12
|
+
import {
|
|
13
|
+
AiKnowledgeIndicator,
|
|
14
|
+
useAiKnowledge
|
|
15
|
+
} from "./chunk-6QHZNL6C.js";
|
|
16
|
+
import "./chunk-KHQ44ZFA.js";
|
|
12
17
|
import {
|
|
13
18
|
AiReportButton,
|
|
14
19
|
bodyLine,
|
|
@@ -25,7 +30,7 @@ import {
|
|
|
25
30
|
extractNumbers,
|
|
26
31
|
sanitizeGeneratedMarkdown,
|
|
27
32
|
stripReasoning
|
|
28
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-N7AKLJPY.js";
|
|
29
34
|
import {
|
|
30
35
|
unavailableSentence,
|
|
31
36
|
useAiStatus
|
|
@@ -902,6 +907,7 @@ function AiStudyDialog({
|
|
|
902
907
|
const primaryRef = useRef(null);
|
|
903
908
|
const controllerRef = useRef(null);
|
|
904
909
|
const requestRef = useRef(0);
|
|
910
|
+
const { knowledge, ai: knowledgeAi, reset: resetKnowledge } = useAiKnowledge(ai);
|
|
905
911
|
useEffect(
|
|
906
912
|
() => () => {
|
|
907
913
|
requestRef.current += 1;
|
|
@@ -972,8 +978,9 @@ function AiStudyDialog({
|
|
|
972
978
|
setNotes([]);
|
|
973
979
|
setShowSource(false);
|
|
974
980
|
setGeneration({ progress: null, startedAt, lastActivityAt: startedAt });
|
|
981
|
+
resetKnowledge();
|
|
975
982
|
const outcome = await generateStudyAid({
|
|
976
|
-
ai,
|
|
983
|
+
ai: knowledgeAi,
|
|
977
984
|
kind,
|
|
978
985
|
source: documentSource,
|
|
979
986
|
sourceName: documentName,
|
|
@@ -1008,7 +1015,7 @@ function AiStudyDialog({
|
|
|
1008
1015
|
if (saveError === null) setSaved({ status: "found", aid });
|
|
1009
1016
|
else setError(`The ${labels.noun} could not be saved: ${saveError}`);
|
|
1010
1017
|
}, [
|
|
1011
|
-
|
|
1018
|
+
knowledgeAi,
|
|
1012
1019
|
budget,
|
|
1013
1020
|
container,
|
|
1014
1021
|
documentName,
|
|
@@ -1018,6 +1025,7 @@ function AiStudyDialog({
|
|
|
1018
1025
|
model,
|
|
1019
1026
|
onEvent,
|
|
1020
1027
|
ready,
|
|
1028
|
+
resetKnowledge,
|
|
1021
1029
|
running
|
|
1022
1030
|
]);
|
|
1023
1031
|
const stop = useCallback(() => controllerRef.current?.abort(), []);
|
|
@@ -1072,6 +1080,7 @@ function AiStudyDialog({
|
|
|
1072
1080
|
const viewer = shown && /* @__PURE__ */ jsxs("div", { className: "db-ai-study-result", children: [
|
|
1073
1081
|
/* @__PURE__ */ jsx(StudyAidViewer, { kind, markdown: shown.markdown }),
|
|
1074
1082
|
notes.map((note) => /* @__PURE__ */ jsx("p", { className: "db-ai-note", children: note }, note)),
|
|
1083
|
+
/* @__PURE__ */ jsx(AiKnowledgeIndicator, { knowledge }),
|
|
1075
1084
|
/* @__PURE__ */ jsxs("div", { className: "db-ai-study-meta", children: [
|
|
1076
1085
|
/* @__PURE__ */ jsxs("p", { className: "db-ai-disclaimer", children: [
|
|
1077
1086
|
describeProvenance(shown.provenance),
|
|
@@ -1107,7 +1116,8 @@ function AiStudyDialog({
|
|
|
1107
1116
|
] });
|
|
1108
1117
|
const progress = running && /* @__PURE__ */ jsxs("div", { className: "db-ai-study-running", children: [
|
|
1109
1118
|
/* @__PURE__ */ jsx("p", { className: "db-ai-study-stage", "aria-live": "polite", children: stageLabel(kind, stage) }),
|
|
1110
|
-
generation && /* @__PURE__ */ jsx(AiGenerationStatus, { state: generation, characters: 0 })
|
|
1119
|
+
generation && /* @__PURE__ */ jsx(AiGenerationStatus, { state: generation, characters: 0 }),
|
|
1120
|
+
/* @__PURE__ */ jsx(AiKnowledgeIndicator, { knowledge })
|
|
1111
1121
|
] });
|
|
1112
1122
|
const dialog = /* @__PURE__ */ jsx(
|
|
1113
1123
|
Dialog,
|