Skip to content

Commit 29bbf8e

Browse files
committed
feat: add subscript and superscript and generate icons
1 parent 2f56fa7 commit 29bbf8e

File tree

15 files changed

+164
-4
lines changed

15 files changed

+164
-4
lines changed

package-lock.json

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@
213213
"@tiptap/extension-paragraph": "^2.7.4",
214214
"@tiptap/extension-placeholder": "^2.7.4",
215215
"@tiptap/extension-strike": "^2.7.4",
216+
"@tiptap/extension-subscript": "^2.7.4",
217+
"@tiptap/extension-superscript": "^2.7.4",
216218
"@tiptap/extension-table": "^2.7.4",
217219
"@tiptap/extension-table-cell": "^2.7.4",
218220
"@tiptap/extension-table-header": "^2.7.4",

src/external/tiptap/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export { Link } from '@tiptap/extension-link';
2323
export { ListItem } from '@tiptap/extension-list-item';
2424
export { OrderedList } from '@tiptap/extension-ordered-list';
2525
export { Strike } from '@tiptap/extension-strike';
26+
export { Subscript } from '@tiptap/extension-subscript';
27+
export { Superscript } from '@tiptap/extension-superscript';
2628
export { Table } from '@tiptap/extension-table';
2729
export { TableCell } from '@tiptap/extension-table-cell';
2830
export { TableHeader } from '@tiptap/extension-table-header';

src/packages/core/icon-registry/icon-dictionary.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,6 +1966,14 @@
19661966
"name": "icon-strikethrough",
19671967
"file": "strikethrough.svg"
19681968
},
1969+
{
1970+
"name": "icon-subscript",
1971+
"file": "subscript.svg"
1972+
},
1973+
{
1974+
"name": "icon-superscript",
1975+
"file": "superscript.svg"
1976+
},
19691977
{
19701978
"name": "icon-sunny",
19711979
"file": "sun.svg"

src/packages/core/icon-registry/icons.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1712,7 +1712,7 @@ name: "icon-shipping",
17121712
path: () => import("./icons/icon-shipping.js"),
17131713
},{
17141714
name: "icon-shoe",
1715-
1715+
legacy: true,
17161716
path: () => import("./icons/icon-shoe.js"),
17171717
},{
17181718
name: "icon-shopping-basket-alt-2",
@@ -1851,6 +1851,14 @@ name: "icon-strikethrough",
18511851

18521852
path: () => import("./icons/icon-strikethrough.js"),
18531853
},{
1854+
name: "icon-subscript",
1855+
1856+
path: () => import("./icons/icon-subscript.js"),
1857+
},{
1858+
name: "icon-superscript",
1859+
1860+
path: () => import("./icons/icon-superscript.js"),
1861+
},{
18541862
name: "icon-sunny",
18551863

18561864
path: () => import("./icons/icon-sunny.js"),

src/packages/core/icon-registry/icons/icon-science.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default `<!-- @license lucide-static v0.424.0 - ISC -->
1+
export default `<!-- @license lucide-static v0.446.0 - ISC -->
22
<svg
33
class="lucide lucide-atom"
44
xmlns="http://www.w3.org/2000/svg"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export default `<!-- @license lucide-static v0.446.0 - ISC -->
2+
<svg
3+
class="lucide lucide-subscript"
4+
xmlns="http://www.w3.org/2000/svg"
5+
viewBox="0 0 24 24"
6+
fill="none"
7+
stroke="currentColor"
8+
stroke-width="1.75"
9+
stroke-linecap="round"
10+
stroke-linejoin="round"
11+
>
12+
<path d="m4 5 8 8" />
13+
<path d="m12 5-8 8" />
14+
<path d="M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07" />
15+
</svg>
16+
`;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export default `<!-- @license lucide-static v0.446.0 - ISC -->
2+
<svg
3+
class="lucide lucide-superscript"
4+
xmlns="http://www.w3.org/2000/svg"
5+
viewBox="0 0 24 24"
6+
fill="none"
7+
stroke="currentColor"
8+
stroke-width="1.75"
9+
stroke-linecap="round"
10+
stroke-linejoin="round"
11+
>
12+
<path d="m4 19 8-8" />
13+
<path d="m12 19-8-8" />
14+
<path d="M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06" />
15+
</svg>
16+
`;

src/packages/core/icon-registry/icons/icon-unlink.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default `<!-- @license lucide-static v0.424.0 - ISC -->
1+
export default `<!-- @license lucide-static v0.446.0 - ISC -->
22
<svg
33
class="lucide lucide-unlink"
44
xmlns="http://www.w3.org/2000/svg"

src/packages/rte/tiptap/extensions/core/manifests.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,39 @@ export const manifests: Array<ManifestTiptapExtension> = [
119119
alias: 'Umb.Tiptap.Strike',
120120
name: 'Strike Tiptap Extension',
121121
api: () => import('./strike.extension.js'),
122-
weight: 996,
122+
weight: 998,
123123
meta: {
124124
icon: 'icon-strikethrough',
125125
label: 'Strike',
126126
group: 'Text Formatting',
127127
},
128128
},
129+
{
130+
type: 'tiptapExtension',
131+
kind: 'button',
132+
alias: 'Umb.Tiptap.Subscript',
133+
name: 'Subscript Tiptap Extension',
134+
api: () => import('./subscript.extension.js'),
135+
weight: 1010,
136+
meta: {
137+
icon: 'icon-subscript',
138+
label: 'Subscript',
139+
group: 'Text Formatting',
140+
},
141+
},
142+
{
143+
type: 'tiptapExtension',
144+
kind: 'button',
145+
alias: 'Umb.Tiptap.Superscript',
146+
name: 'Superscript Tiptap Extension',
147+
api: () => import('./superscript.extension.js'),
148+
weight: 1011,
149+
meta: {
150+
icon: 'icon-superscript',
151+
label: 'Superscript',
152+
group: 'Text Formatting',
153+
},
154+
},
129155
{
130156
type: 'tiptapExtension',
131157
kind: 'button',

0 commit comments

Comments
 (0)