Skip to content
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
13aba6a
feat: initial commit for ai implementation
Mar 26, 2025
9ab0fa4
fix: add ai icons to commons
Mar 27, 2025
0d4529a
Merge remote-tracking branch 'origin/main' into feat/ai/insights-writ…
Mar 27, 2025
a699dc1
fix: self contain the ai writer styles
Mar 27, 2025
e672dbd
refactor: no need to pass the whole toolbar to ai writer
Mar 27, 2025
e466138
feat: add magic wand icon to superdoc icons
Mar 27, 2025
dd0c357
feat: integrate AI Writer functionality with cursor positioning and U…
Mar 27, 2025
ad582e6
feat: enhance AI Writer with text selection highlighting and improved…
Mar 27, 2025
bea95b4
feat: streamline AI Writer to always use streaming approach and close…
Mar 31, 2025
1a641df
Merge remote-tracking branch 'origin/main' into feat/ai/insights-writ…
Mar 31, 2025
cef1d22
feat: enhance AIWriter component to support event emission through su…
Mar 31, 2025
a728ea6
refactor: remove unused AI icon from superdocIcons and update SuperDo…
Mar 31, 2025
17235ba
feat: implement AI animation mark and enhance streaming functions in …
Apr 1, 2025
d43e907
feat: add AI layer toggle functionality in SuperDoc component
Apr 1, 2025
03e912e
Merge remote-tracking branch 'origin/main' into feat/ai/insights-writ…
Apr 3, 2025
65d1a13
chore: revert to main toolbar with ai key config
Apr 3, 2025
9c84bf1
chore: branch cleanup
Apr 3, 2025
99e22de
Merge remote-tracking branch 'origin/main' into feat/ai/insights-writ…
Apr 9, 2025
8fc98a8
Merge remote-tracking branch 'origin/main' into feat/ai/insights-writ…
Apr 12, 2025
91e2c73
fix: enhance AI text animation and processing
Apr 12, 2025
5b453d6
Merge remote-tracking branch 'origin/main' into feat/ai/insights-writ…
Apr 23, 2025
0c27840
doc: add modules jsdoc
Apr 23, 2025
a2a94fc
fix: make ai event more generic
Apr 23, 2025
112c087
fix: prefix or remove global styles
Apr 23, 2025
e40adf2
fix: use a ref for ai layer
Apr 23, 2025
3550f80
fix: add in safety check for dispatch
Apr 23, 2025
b4f62da
chore: cleanup
Apr 23, 2025
28d5ade
fix: format conditional
Apr 23, 2025
27ba4eb
feat: add composable for selected text in editor
Apr 24, 2025
c6db2d3
feat: integrate AI layer functionality with new composable
Apr 24, 2025
274fd41
fix: update data attribute naming for AI animation marks
Apr 24, 2025
15f2960
feat: enhance AIWriter component with new SVG icons and gradient styles
Apr 24, 2025
53c261d
refactor: helper functions for event handling and selection management
Apr 24, 2025
5f6c8df
feat: support custom endpoint configuration
Apr 24, 2025
e18ae60
Merge remote-tracking branch 'origin/main' into feat/ai/insights-writ…
Apr 24, 2025
2617e2d
Prevent AI button showing up unless api key is provided
harbournick Apr 28, 2025
02667ff
Prevent ai floating tool if no API key
harbournick Apr 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/super-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"./file-zipper": {
"import": "./dist/file-zipper.es.js"
},
"./ai-writer": {
"import": "./dist/ai-writer.es.js"
},
"./style.css": "./dist/style.css"
},
"main": "./dist/super-editor.es.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@import './prosemirror.css';
@import './toolbar.css';
@import './toolbar-custom.css';
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* Custom toolbar styling */

/* AI button icon styling with gradient */
.toolbar-icon__icon--ai {
position: relative;
z-index: 1;
}

.toolbar-icon__icon--ai svg {
fill: transparent;
}

.toolbar-icon__icon--ai::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
background: linear-gradient(
270deg,
rgba(218, 215, 118, 0.5) -20%,
rgba(191, 100, 100, 1) 30%,
rgba(77, 82, 217, 1) 60%,
rgb(255, 219, 102) 150%
);
-webkit-mask: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.7-53.3L160 80l-53.3-26.7L80 0 53.3 53.3 0 80l53.3 26.7L80 160zm352 128l-26.7 53.3L352 368l53.3 26.7L432 448l26.7-53.3L512 368l-53.3-26.7L432 288zm70.6-193.8L417.8 9.4C411.5 3.1 403.3 0 395.2 0c-8.2 0-16.4 3.1-22.6 9.4L9.4 372.5c-12.5 12.5-12.5 32.8 0 45.3l84.9 84.9c6.3 6.3 14.4 9.4 22.6 9.4 8.2 0 16.4-3.1 22.6-9.4l363.1-363.2c12.5-12.5 12.5-32.8 0-45.2zM359.5 203.5l-50.9-50.9 86.6-86.6 50.9 50.9-86.6 86.6z'/></svg>") center / contain no-repeat;
mask: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.7-53.3L160 80l-53.3-26.7L80 0 53.3 53.3 0 80l53.3 26.7L80 160zm352 128l-26.7 53.3L352 368l53.3 26.7L432 448l26.7-53.3L512 368l-53.3-26.7L432 288zm70.6-193.8L417.8 9.4C411.5 3.1 403.3 0 395.2 0c-8.2 0-16.4 3.1-22.6 9.4L9.4 372.5c-12.5 12.5-12.5 32.8 0 45.3l84.9 84.9c6.3 6.3 14.4 9.4 22.6 9.4 8.2 0 16.4-3.1 22.6-9.4l363.1-363.2c12.5-12.5 12.5-32.8 0-45.2zM359.5 203.5l-50.9-50.9 86.6-86.6 50.9 50.9-86.6 86.6z'/></svg>") center / contain no-repeat;
filter: brightness(1.2);
transition: filter 0.2s ease;
}

.toolbar-icon__icon--ai:hover::before {
filter: brightness(1.3);
}



@keyframes aiTextAppear {
from {
opacity: 0;
transform: translateY(5px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

.sd-ai-text-appear {
display: inline;
opacity: 0;
animation: aiTextAppear .7s ease-out forwards;
animation-fill-mode: both;
will-change: opacity, transform;
/* Ensure each mark is treated as a separate animation context */
contain: content;
}
Loading
Loading