@collabchron/notiq 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -9
- package/dist/index.mjs +11 -9
- package/package.json +11 -12
- package/src/styles/notiq.css +23 -22
- package/src/styles/tailwind-plugin.ts +2 -2
- package/dist/index.d.mts +0 -145
- package/dist/index.d.ts +0 -145
- package/dist/styles/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/styles/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/styles/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/styles/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/styles/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/styles/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/styles/notiq.css +0 -2
package/dist/index.js
CHANGED
|
@@ -57547,7 +57547,7 @@ function Core({
|
|
|
57547
57547
|
});
|
|
57548
57548
|
return unregister;
|
|
57549
57549
|
}, [editor]);
|
|
57550
|
-
return /* @__PURE__ */ React.createElement(
|
|
57550
|
+
return /* @__PURE__ */ React.createElement("div", { className: "notiq-editor w-full h-full" }, isEditable && /* @__PURE__ */ React.createElement(
|
|
57551
57551
|
ToolbarPlugin2,
|
|
57552
57552
|
{
|
|
57553
57553
|
editor,
|
|
@@ -57557,8 +57557,7 @@ function Core({
|
|
|
57557
57557
|
toolbarConfig
|
|
57558
57558
|
}
|
|
57559
57559
|
), isEditable && /* @__PURE__ */ React.createElement(ContentAnalyticsPlugin, null), /* @__PURE__ */ React.createElement("div", { className: cn(
|
|
57560
|
-
"flex justify-center w-full
|
|
57561
|
-
"dark:md:from-gray-900/50 dark:md:to-gray-800/30",
|
|
57560
|
+
"flex justify-center w-full transition-all duration-300",
|
|
57562
57561
|
"pt-20 md:pt-10"
|
|
57563
57562
|
) }, /* @__PURE__ */ React.createElement(
|
|
57564
57563
|
import_framer_motion9.motion.div,
|
|
@@ -57568,11 +57567,11 @@ function Core({
|
|
|
57568
57567
|
"prose prose-lg dark:prose-invert lg:prose-xl leading-relaxed",
|
|
57569
57568
|
"md:rounded-2xl md:shadow-2xl md:shadow-black/5",
|
|
57570
57569
|
"md:dark:shadow-black/20",
|
|
57571
|
-
"bg-
|
|
57570
|
+
"bg-notiq-background text-notiq-foreground",
|
|
57572
57571
|
"md:border md:border-gray-200/50 dark:md:border-gray-800/50"
|
|
57573
57572
|
)
|
|
57574
57573
|
},
|
|
57575
|
-
/* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 rounded-2xl overflow-hidden pointer-events-none" }, /* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 bg-gradient-to-br from-blue-50/
|
|
57574
|
+
/* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 rounded-2xl overflow-hidden pointer-events-none" }, /* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 bg-gradient-to-br from-blue-50/10 via-transparent to-purple-50/10 dark:from-blue-900/5 dark:to-purple-900/5" }), /* @__PURE__ */ React.createElement("div", { className: "absolute top-0 left-0 w-full h-px bg-gradient-to-r from-transparent via-gray-200 to-transparent dark:via-gray-700" })),
|
|
57576
57575
|
/* @__PURE__ */ React.createElement(
|
|
57577
57576
|
import_LexicalRichTextPlugin4.RichTextPlugin,
|
|
57578
57577
|
{
|
|
@@ -57584,9 +57583,9 @@ function Core({
|
|
|
57584
57583
|
className: cn(
|
|
57585
57584
|
"editor-content relative z-20 outline-none",
|
|
57586
57585
|
"px-4 md:px-12 py-8 md:py-16",
|
|
57587
|
-
"min-h-[
|
|
57586
|
+
"min-h-[400px]",
|
|
57588
57587
|
"focus:outline-none focus:ring-0",
|
|
57589
|
-
"text-foreground selection:bg-blue-100 dark:selection:bg-blue-900/30",
|
|
57588
|
+
"text-notiq-foreground selection:bg-blue-100 dark:selection:bg-blue-900/30",
|
|
57590
57589
|
"font-['Inter',_system-ui,_sans-serif] antialiased",
|
|
57591
57590
|
"leading-relaxed tracking-wide",
|
|
57592
57591
|
"transition-all duration-200 ease-in-out",
|
|
@@ -57707,7 +57706,7 @@ var u = g2;
|
|
|
57707
57706
|
// src/styles/tailwind-plugin.ts
|
|
57708
57707
|
var notiqPlugin = u(function({ addBase, theme: theme2 }) {
|
|
57709
57708
|
addBase({
|
|
57710
|
-
"
|
|
57709
|
+
".notiq-editor": {
|
|
57711
57710
|
"--background": "oklch(1 0 0)",
|
|
57712
57711
|
"--foreground": "oklch(0.145 0 0)",
|
|
57713
57712
|
"--card": "oklch(1 0 0)",
|
|
@@ -57747,7 +57746,7 @@ var notiqPlugin = u(function({ addBase, theme: theme2 }) {
|
|
|
57747
57746
|
"--background-pink": "#f4dfeb",
|
|
57748
57747
|
"--background-red": "#fbe4e4"
|
|
57749
57748
|
},
|
|
57750
|
-
".dark": {
|
|
57749
|
+
".dark .notiq-editor, .notiq-editor.dark": {
|
|
57751
57750
|
"--background": "oklch(0.145 0 0)",
|
|
57752
57751
|
"--foreground": "oklch(0.985 0 0)",
|
|
57753
57752
|
"--card": "oklch(0.145 0 0)",
|
|
@@ -57833,6 +57832,9 @@ var notiqPlugin = u(function({ addBase, theme: theme2 }) {
|
|
|
57833
57832
|
}
|
|
57834
57833
|
}
|
|
57835
57834
|
});
|
|
57835
|
+
|
|
57836
|
+
// src/index.ts
|
|
57837
|
+
var import_notiq = require("./styles/notiq.css");
|
|
57836
57838
|
// Annotate the CommonJS export names for ESM import in node:
|
|
57837
57839
|
0 && (module.exports = {
|
|
57838
57840
|
AIProvider,
|
package/dist/index.mjs
CHANGED
|
@@ -1492,7 +1492,7 @@ function Core({
|
|
|
1492
1492
|
});
|
|
1493
1493
|
return unregister;
|
|
1494
1494
|
}, [editor]);
|
|
1495
|
-
return /* @__PURE__ */ React.createElement(
|
|
1495
|
+
return /* @__PURE__ */ React.createElement("div", { className: "notiq-editor w-full h-full" }, isEditable && /* @__PURE__ */ React.createElement(
|
|
1496
1496
|
ToolbarPlugin,
|
|
1497
1497
|
{
|
|
1498
1498
|
editor,
|
|
@@ -1502,8 +1502,7 @@ function Core({
|
|
|
1502
1502
|
toolbarConfig
|
|
1503
1503
|
}
|
|
1504
1504
|
), isEditable && /* @__PURE__ */ React.createElement(ContentAnalyticsPlugin, null), /* @__PURE__ */ React.createElement("div", { className: cn(
|
|
1505
|
-
"flex justify-center w-full
|
|
1506
|
-
"dark:md:from-gray-900/50 dark:md:to-gray-800/30",
|
|
1505
|
+
"flex justify-center w-full transition-all duration-300",
|
|
1507
1506
|
"pt-20 md:pt-10"
|
|
1508
1507
|
) }, /* @__PURE__ */ React.createElement(
|
|
1509
1508
|
motion.div,
|
|
@@ -1513,11 +1512,11 @@ function Core({
|
|
|
1513
1512
|
"prose prose-lg dark:prose-invert lg:prose-xl leading-relaxed",
|
|
1514
1513
|
"md:rounded-2xl md:shadow-2xl md:shadow-black/5",
|
|
1515
1514
|
"md:dark:shadow-black/20",
|
|
1516
|
-
"bg-
|
|
1515
|
+
"bg-notiq-background text-notiq-foreground",
|
|
1517
1516
|
"md:border md:border-gray-200/50 dark:md:border-gray-800/50"
|
|
1518
1517
|
)
|
|
1519
1518
|
},
|
|
1520
|
-
/* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 rounded-2xl overflow-hidden pointer-events-none" }, /* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 bg-gradient-to-br from-blue-50/
|
|
1519
|
+
/* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 rounded-2xl overflow-hidden pointer-events-none" }, /* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 bg-gradient-to-br from-blue-50/10 via-transparent to-purple-50/10 dark:from-blue-900/5 dark:to-purple-900/5" }), /* @__PURE__ */ React.createElement("div", { className: "absolute top-0 left-0 w-full h-px bg-gradient-to-r from-transparent via-gray-200 to-transparent dark:via-gray-700" })),
|
|
1521
1520
|
/* @__PURE__ */ React.createElement(
|
|
1522
1521
|
RichTextPlugin,
|
|
1523
1522
|
{
|
|
@@ -1529,9 +1528,9 @@ function Core({
|
|
|
1529
1528
|
className: cn(
|
|
1530
1529
|
"editor-content relative z-20 outline-none",
|
|
1531
1530
|
"px-4 md:px-12 py-8 md:py-16",
|
|
1532
|
-
"min-h-[
|
|
1531
|
+
"min-h-[400px]",
|
|
1533
1532
|
"focus:outline-none focus:ring-0",
|
|
1534
|
-
"text-foreground selection:bg-blue-100 dark:selection:bg-blue-900/30",
|
|
1533
|
+
"text-notiq-foreground selection:bg-blue-100 dark:selection:bg-blue-900/30",
|
|
1535
1534
|
"font-['Inter',_system-ui,_sans-serif] antialiased",
|
|
1536
1535
|
"leading-relaxed tracking-wide",
|
|
1537
1536
|
"transition-all duration-200 ease-in-out",
|
|
@@ -1643,7 +1642,7 @@ var u = g;
|
|
|
1643
1642
|
// src/styles/tailwind-plugin.ts
|
|
1644
1643
|
var notiqPlugin = u(function({ addBase, theme: theme2 }) {
|
|
1645
1644
|
addBase({
|
|
1646
|
-
"
|
|
1645
|
+
".notiq-editor": {
|
|
1647
1646
|
"--background": "oklch(1 0 0)",
|
|
1648
1647
|
"--foreground": "oklch(0.145 0 0)",
|
|
1649
1648
|
"--card": "oklch(1 0 0)",
|
|
@@ -1683,7 +1682,7 @@ var notiqPlugin = u(function({ addBase, theme: theme2 }) {
|
|
|
1683
1682
|
"--background-pink": "#f4dfeb",
|
|
1684
1683
|
"--background-red": "#fbe4e4"
|
|
1685
1684
|
},
|
|
1686
|
-
".dark": {
|
|
1685
|
+
".dark .notiq-editor, .notiq-editor.dark": {
|
|
1687
1686
|
"--background": "oklch(0.145 0 0)",
|
|
1688
1687
|
"--foreground": "oklch(0.985 0 0)",
|
|
1689
1688
|
"--card": "oklch(0.145 0 0)",
|
|
@@ -1769,6 +1768,9 @@ var notiqPlugin = u(function({ addBase, theme: theme2 }) {
|
|
|
1769
1768
|
}
|
|
1770
1769
|
}
|
|
1771
1770
|
});
|
|
1771
|
+
|
|
1772
|
+
// src/index.ts
|
|
1773
|
+
import "./styles/notiq.css";
|
|
1772
1774
|
export {
|
|
1773
1775
|
AIProvider,
|
|
1774
1776
|
DEFAULT_FONT_SIZE,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@collabchron/notiq",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -56,17 +56,6 @@
|
|
|
56
56
|
"bugs": {
|
|
57
57
|
"url": "https://github.com/chinonsochikelue/notiq/issues"
|
|
58
58
|
},
|
|
59
|
-
"scripts": {
|
|
60
|
-
"dev": "next dev --turbopack",
|
|
61
|
-
"build": "pnpm install --no-frozen-lockfile && next build",
|
|
62
|
-
"build:lib": "tsup && pnpm build:css",
|
|
63
|
-
"build:css": "tailwindcss -i src/styles/notiq.css -o dist/styles/notiq.css --minify && pwsh -Command \"Copy-Item -Path node_modules/katex/dist/fonts -Destination dist/styles -Recurse -Force\"",
|
|
64
|
-
"start": "next start",
|
|
65
|
-
"lint": "next lint",
|
|
66
|
-
"test": "vitest --run",
|
|
67
|
-
"test:dev": "vitest",
|
|
68
|
-
"prepare": "husky"
|
|
69
|
-
},
|
|
70
59
|
"dependencies": {
|
|
71
60
|
"@ai-sdk/google": "^3.0.7",
|
|
72
61
|
"@ai-sdk/groq": "^3.0.7",
|
|
@@ -204,5 +193,15 @@
|
|
|
204
193
|
"tsup": "^8.5.1",
|
|
205
194
|
"typescript": "^5.9.2",
|
|
206
195
|
"vitest": "^4.0.17"
|
|
196
|
+
},
|
|
197
|
+
"scripts": {
|
|
198
|
+
"dev": "next dev --turbopack",
|
|
199
|
+
"build": "pnpm install --no-frozen-lockfile && next build",
|
|
200
|
+
"build:lib": "tsup && pnpm build:css",
|
|
201
|
+
"build:css": "tailwindcss -i src/styles/notiq.css -o dist/styles/notiq.css --minify && pwsh -Command \"Copy-Item -Path node_modules/katex/dist/fonts -Destination dist/styles -Recurse -Force\"",
|
|
202
|
+
"start": "next start",
|
|
203
|
+
"lint": "next lint",
|
|
204
|
+
"test": "vitest --run",
|
|
205
|
+
"test:dev": "vitest"
|
|
207
206
|
}
|
|
208
207
|
}
|
package/src/styles/notiq.css
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
@custom-variant dark (&:is(.dark *));
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
.notiq-editor {
|
|
10
10
|
--background: oklch(1 0 0);
|
|
11
11
|
--foreground: oklch(0.145 0 0);
|
|
12
12
|
--card: oklch(1 0 0);
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
--background-red: #fbe4e4;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.dark
|
|
53
|
+
.dark .notiq-editor,
|
|
54
|
+
.notiq-editor.dark {
|
|
54
55
|
--background: oklch(0.145 0 0);
|
|
55
56
|
--foreground: oklch(0.985 0 0);
|
|
56
57
|
--card: oklch(0.145 0 0);
|
|
@@ -93,25 +94,25 @@
|
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
@theme inline {
|
|
96
|
-
--color-background: var(--background);
|
|
97
|
-
--color-foreground: var(--foreground);
|
|
98
|
-
--color-card: var(--card);
|
|
99
|
-
--color-card-foreground: var(--card-foreground);
|
|
100
|
-
--color-popover: var(--popover);
|
|
101
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
102
|
-
--color-primary: var(--primary);
|
|
103
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
104
|
-
--color-secondary: var(--secondary);
|
|
105
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
106
|
-
--color-muted: var(--muted);
|
|
107
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
108
|
-
--color-accent: var(--accent);
|
|
109
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
110
|
-
--color-destructive: var(--destructive);
|
|
111
|
-
--color-destructive-foreground: var(--destructive-foreground);
|
|
112
|
-
--color-border: var(--border);
|
|
113
|
-
--color-input: var(--input);
|
|
114
|
-
--color-ring: var(--ring);
|
|
97
|
+
--color-notiq-background: var(--color-background, var(--background));
|
|
98
|
+
--color-notiq-foreground: var(--color-foreground, var(--foreground));
|
|
99
|
+
--color-notiq-card: var(--color-card, var(--card));
|
|
100
|
+
--color-notiq-card-foreground: var(--color-card-foreground, var(--card-foreground));
|
|
101
|
+
--color-notiq-popover: var(--color-popover, var(--popover));
|
|
102
|
+
--color-notiq-popover-foreground: var(--color-popover-foreground, var(--popover-foreground));
|
|
103
|
+
--color-notiq-primary: var(--color-primary, var(--primary));
|
|
104
|
+
--color-notiq-primary-foreground: var(--color-primary-foreground, var(--primary-foreground));
|
|
105
|
+
--color-notiq-secondary: var(--color-secondary, var(--secondary));
|
|
106
|
+
--color-notiq-secondary-foreground: var(--color-secondary-foreground, var(--secondary-foreground));
|
|
107
|
+
--color-notiq-muted: var(--color-muted, var(--muted));
|
|
108
|
+
--color-notiq-muted-foreground: var(--color-muted-foreground, var(--muted-foreground));
|
|
109
|
+
--color-notiq-accent: var(--color-accent, var(--accent));
|
|
110
|
+
--color-notiq-accent-foreground: var(--color-accent-foreground, var(--accent-foreground));
|
|
111
|
+
--color-notiq-destructive: var(--color-destructive, var(--destructive));
|
|
112
|
+
--color-notiq-destructive-foreground: var(--color-destructive-foreground, var(--destructive-foreground));
|
|
113
|
+
--color-notiq-border: var(--color-border, var(--border));
|
|
114
|
+
--color-notiq-input: var(--color-input, var(--input));
|
|
115
|
+
--color-notiq-ring: var(--color-ring, var(--ring));
|
|
115
116
|
--radius-sm: calc(var(--radius) - 4px);
|
|
116
117
|
--radius-md: calc(var(--radius) - 2px);
|
|
117
118
|
--radius-lg: var(--radius);
|
|
@@ -120,7 +121,7 @@
|
|
|
120
121
|
|
|
121
122
|
@layer base {
|
|
122
123
|
* {
|
|
123
|
-
@apply border-border outline-ring/50;
|
|
124
|
+
@apply border-notiq-border outline-notiq-ring/50;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
|
|
@@ -6,7 +6,7 @@ import plugin from "tailwindcss/plugin";
|
|
|
6
6
|
*/
|
|
7
7
|
export const notiqPlugin = (plugin as any)(function ({ addBase, theme }: any) {
|
|
8
8
|
addBase({
|
|
9
|
-
'
|
|
9
|
+
'.notiq-editor': {
|
|
10
10
|
'--background': 'oklch(1 0 0)',
|
|
11
11
|
'--foreground': 'oklch(0.145 0 0)',
|
|
12
12
|
'--card': 'oklch(1 0 0)',
|
|
@@ -46,7 +46,7 @@ export const notiqPlugin = (plugin as any)(function ({ addBase, theme }: any) {
|
|
|
46
46
|
'--background-pink': '#f4dfeb',
|
|
47
47
|
'--background-red': '#fbe4e4',
|
|
48
48
|
},
|
|
49
|
-
'.dark': {
|
|
49
|
+
'.dark .notiq-editor, .notiq-editor.dark': {
|
|
50
50
|
'--background': 'oklch(0.145 0 0)',
|
|
51
51
|
'--foreground': 'oklch(0.985 0 0)',
|
|
52
52
|
'--card': 'oklch(0.145 0 0)',
|
package/dist/index.d.mts
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { ElementFormatType } from 'lexical';
|
|
4
|
-
import { HistoryState } from '@lexical/react/LexicalHistoryPlugin';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Configuration for AI features in the Notiq editor.
|
|
8
|
-
*/
|
|
9
|
-
interface AIConfig {
|
|
10
|
-
/**
|
|
11
|
-
* The API endpoint for AI completions. Defaults to "/api/ai".
|
|
12
|
-
*/
|
|
13
|
-
apiEndpoint?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Hook to access the current AI configuration.
|
|
17
|
-
*/
|
|
18
|
-
declare const useAI: () => AIConfig;
|
|
19
|
-
/**
|
|
20
|
-
* Provider component for AI configuration.
|
|
21
|
-
*/
|
|
22
|
-
declare const AIProvider: ({ config, children }: {
|
|
23
|
-
config?: AIConfig;
|
|
24
|
-
children: ReactNode;
|
|
25
|
-
}) => React__default.JSX.Element;
|
|
26
|
-
|
|
27
|
-
interface UploadResponse {
|
|
28
|
-
url: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* A function that handles file uploads.
|
|
32
|
-
* @param file The file to upload.
|
|
33
|
-
* @param onProgress Callback to report upload progress (0-100).
|
|
34
|
-
* @returns A promise that resolves to an object containing the uploaded file's URL.
|
|
35
|
-
*/
|
|
36
|
-
type UploadHandler = (file: File, onProgress?: (progress: number) => void) => Promise<UploadResponse>;
|
|
37
|
-
interface UploadConfig {
|
|
38
|
-
/**
|
|
39
|
-
* Custom upload handler. If not provided, the editor will attempt to use its default
|
|
40
|
-
* (which currently depends on EdgeStore if configured).
|
|
41
|
-
*/
|
|
42
|
-
uploadHandler?: UploadHandler;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Hook to access the current Upload configuration.
|
|
46
|
-
*/
|
|
47
|
-
declare const useUpload: () => UploadConfig | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Provider component for Upload configuration.
|
|
50
|
-
*/
|
|
51
|
-
declare const UploadProvider: ({ config, children }: {
|
|
52
|
-
config?: UploadConfig;
|
|
53
|
-
children: ReactNode;
|
|
54
|
-
}) => React__default.JSX.Element;
|
|
55
|
-
|
|
56
|
-
type ToolbarItem = "undo" | "redo" | "block-format" | "font-family" | "font-size" | "bold" | "italic" | "underline" | "code" | "link" | "color" | "bg-color" | "text-format" | "insert" | "align" | "speech" | "template" | "download" | "export-md" | "export-pdf" | "separator";
|
|
57
|
-
type ToolbarConfig = {
|
|
58
|
-
items?: ToolbarItem[];
|
|
59
|
-
className?: string;
|
|
60
|
-
itemClassName?: string;
|
|
61
|
-
activeItemClassName?: string;
|
|
62
|
-
mobileClassName?: string;
|
|
63
|
-
mobileItemClassName?: string;
|
|
64
|
-
};
|
|
65
|
-
declare function Editor({ isEditable, content, aiConfig, uploadConfig, toolbarConfig, }: {
|
|
66
|
-
isEditable: boolean;
|
|
67
|
-
content?: unknown;
|
|
68
|
-
aiConfig?: AIConfig;
|
|
69
|
-
uploadConfig?: UploadConfig;
|
|
70
|
-
toolbarConfig?: ToolbarConfig;
|
|
71
|
-
}): React__default.JSX.Element;
|
|
72
|
-
|
|
73
|
-
declare const MIN_ALLOWED_FONT_SIZE = 8;
|
|
74
|
-
declare const MAX_ALLOWED_FONT_SIZE = 72;
|
|
75
|
-
declare const DEFAULT_FONT_SIZE = 15;
|
|
76
|
-
declare const rootTypeToRootName: {
|
|
77
|
-
root: string;
|
|
78
|
-
table: string;
|
|
79
|
-
};
|
|
80
|
-
declare const blockTypeToBlockName: {
|
|
81
|
-
bullet: string;
|
|
82
|
-
check: string;
|
|
83
|
-
code: string;
|
|
84
|
-
h1: string;
|
|
85
|
-
h2: string;
|
|
86
|
-
h3: string;
|
|
87
|
-
h4: string;
|
|
88
|
-
h5: string;
|
|
89
|
-
h6: string;
|
|
90
|
-
number: string;
|
|
91
|
-
paragraph: string;
|
|
92
|
-
quote: string;
|
|
93
|
-
};
|
|
94
|
-
declare const INITIAL_TOOLBAR_STATE: {
|
|
95
|
-
bgColor: string;
|
|
96
|
-
blockType: keyof typeof blockTypeToBlockName;
|
|
97
|
-
canRedo: boolean;
|
|
98
|
-
canUndo: boolean;
|
|
99
|
-
codeLanguage: string;
|
|
100
|
-
elementFormat: ElementFormatType;
|
|
101
|
-
fontColor: string;
|
|
102
|
-
fontFamily: string;
|
|
103
|
-
fontSize: string;
|
|
104
|
-
fontSizeInputValue: string;
|
|
105
|
-
isBold: boolean;
|
|
106
|
-
isCode: boolean;
|
|
107
|
-
isImageCaption: boolean;
|
|
108
|
-
isItalic: boolean;
|
|
109
|
-
isLink: boolean;
|
|
110
|
-
isRTL: boolean;
|
|
111
|
-
isStrikethrough: boolean;
|
|
112
|
-
isSubscript: boolean;
|
|
113
|
-
isSuperscript: boolean;
|
|
114
|
-
isUnderline: boolean;
|
|
115
|
-
isLowercase: boolean;
|
|
116
|
-
isUppercase: boolean;
|
|
117
|
-
isCapitalize: boolean;
|
|
118
|
-
rootType: keyof typeof rootTypeToRootName;
|
|
119
|
-
};
|
|
120
|
-
type ToolbarState = typeof INITIAL_TOOLBAR_STATE;
|
|
121
|
-
type ToolbarStateKey = keyof ToolbarState;
|
|
122
|
-
type ToolbarStateValue<Key extends ToolbarStateKey> = ToolbarState[Key];
|
|
123
|
-
type ContextShape$1 = {
|
|
124
|
-
toolbarState: ToolbarState;
|
|
125
|
-
updateToolbarState<Key extends ToolbarStateKey>(key: Key, value: ToolbarStateValue<Key>): void;
|
|
126
|
-
};
|
|
127
|
-
declare const ToolbarContext: ({ children, }: {
|
|
128
|
-
children: ReactNode;
|
|
129
|
-
}) => React__default.JSX.Element;
|
|
130
|
-
declare const useToolbarState: () => ContextShape$1;
|
|
131
|
-
|
|
132
|
-
type ContextShape = {
|
|
133
|
-
historyState?: HistoryState;
|
|
134
|
-
};
|
|
135
|
-
declare const SharedHistoryContext: ({ children, }: {
|
|
136
|
-
children: ReactNode;
|
|
137
|
-
}) => React.JSX.Element;
|
|
138
|
-
declare const useSharedHistoryContext: () => ContextShape;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* A Tailwind CSS plugin that adds Notiq's custom theme variables and styles.
|
|
142
|
-
*/
|
|
143
|
-
declare const notiqPlugin: any;
|
|
144
|
-
|
|
145
|
-
export { type AIConfig, AIProvider, type ContextShape$1 as ContextShape, DEFAULT_FONT_SIZE, Editor, MAX_ALLOWED_FONT_SIZE, MIN_ALLOWED_FONT_SIZE, SharedHistoryContext, type ToolbarConfig, ToolbarContext, type ToolbarItem, type UploadConfig, type UploadHandler, UploadProvider, type UploadResponse, blockTypeToBlockName, notiqPlugin, useAI, useSharedHistoryContext, useToolbarState, useUpload };
|
package/dist/index.d.ts
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { ElementFormatType } from 'lexical';
|
|
4
|
-
import { HistoryState } from '@lexical/react/LexicalHistoryPlugin';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Configuration for AI features in the Notiq editor.
|
|
8
|
-
*/
|
|
9
|
-
interface AIConfig {
|
|
10
|
-
/**
|
|
11
|
-
* The API endpoint for AI completions. Defaults to "/api/ai".
|
|
12
|
-
*/
|
|
13
|
-
apiEndpoint?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Hook to access the current AI configuration.
|
|
17
|
-
*/
|
|
18
|
-
declare const useAI: () => AIConfig;
|
|
19
|
-
/**
|
|
20
|
-
* Provider component for AI configuration.
|
|
21
|
-
*/
|
|
22
|
-
declare const AIProvider: ({ config, children }: {
|
|
23
|
-
config?: AIConfig;
|
|
24
|
-
children: ReactNode;
|
|
25
|
-
}) => React__default.JSX.Element;
|
|
26
|
-
|
|
27
|
-
interface UploadResponse {
|
|
28
|
-
url: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* A function that handles file uploads.
|
|
32
|
-
* @param file The file to upload.
|
|
33
|
-
* @param onProgress Callback to report upload progress (0-100).
|
|
34
|
-
* @returns A promise that resolves to an object containing the uploaded file's URL.
|
|
35
|
-
*/
|
|
36
|
-
type UploadHandler = (file: File, onProgress?: (progress: number) => void) => Promise<UploadResponse>;
|
|
37
|
-
interface UploadConfig {
|
|
38
|
-
/**
|
|
39
|
-
* Custom upload handler. If not provided, the editor will attempt to use its default
|
|
40
|
-
* (which currently depends on EdgeStore if configured).
|
|
41
|
-
*/
|
|
42
|
-
uploadHandler?: UploadHandler;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Hook to access the current Upload configuration.
|
|
46
|
-
*/
|
|
47
|
-
declare const useUpload: () => UploadConfig | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Provider component for Upload configuration.
|
|
50
|
-
*/
|
|
51
|
-
declare const UploadProvider: ({ config, children }: {
|
|
52
|
-
config?: UploadConfig;
|
|
53
|
-
children: ReactNode;
|
|
54
|
-
}) => React__default.JSX.Element;
|
|
55
|
-
|
|
56
|
-
type ToolbarItem = "undo" | "redo" | "block-format" | "font-family" | "font-size" | "bold" | "italic" | "underline" | "code" | "link" | "color" | "bg-color" | "text-format" | "insert" | "align" | "speech" | "template" | "download" | "export-md" | "export-pdf" | "separator";
|
|
57
|
-
type ToolbarConfig = {
|
|
58
|
-
items?: ToolbarItem[];
|
|
59
|
-
className?: string;
|
|
60
|
-
itemClassName?: string;
|
|
61
|
-
activeItemClassName?: string;
|
|
62
|
-
mobileClassName?: string;
|
|
63
|
-
mobileItemClassName?: string;
|
|
64
|
-
};
|
|
65
|
-
declare function Editor({ isEditable, content, aiConfig, uploadConfig, toolbarConfig, }: {
|
|
66
|
-
isEditable: boolean;
|
|
67
|
-
content?: unknown;
|
|
68
|
-
aiConfig?: AIConfig;
|
|
69
|
-
uploadConfig?: UploadConfig;
|
|
70
|
-
toolbarConfig?: ToolbarConfig;
|
|
71
|
-
}): React__default.JSX.Element;
|
|
72
|
-
|
|
73
|
-
declare const MIN_ALLOWED_FONT_SIZE = 8;
|
|
74
|
-
declare const MAX_ALLOWED_FONT_SIZE = 72;
|
|
75
|
-
declare const DEFAULT_FONT_SIZE = 15;
|
|
76
|
-
declare const rootTypeToRootName: {
|
|
77
|
-
root: string;
|
|
78
|
-
table: string;
|
|
79
|
-
};
|
|
80
|
-
declare const blockTypeToBlockName: {
|
|
81
|
-
bullet: string;
|
|
82
|
-
check: string;
|
|
83
|
-
code: string;
|
|
84
|
-
h1: string;
|
|
85
|
-
h2: string;
|
|
86
|
-
h3: string;
|
|
87
|
-
h4: string;
|
|
88
|
-
h5: string;
|
|
89
|
-
h6: string;
|
|
90
|
-
number: string;
|
|
91
|
-
paragraph: string;
|
|
92
|
-
quote: string;
|
|
93
|
-
};
|
|
94
|
-
declare const INITIAL_TOOLBAR_STATE: {
|
|
95
|
-
bgColor: string;
|
|
96
|
-
blockType: keyof typeof blockTypeToBlockName;
|
|
97
|
-
canRedo: boolean;
|
|
98
|
-
canUndo: boolean;
|
|
99
|
-
codeLanguage: string;
|
|
100
|
-
elementFormat: ElementFormatType;
|
|
101
|
-
fontColor: string;
|
|
102
|
-
fontFamily: string;
|
|
103
|
-
fontSize: string;
|
|
104
|
-
fontSizeInputValue: string;
|
|
105
|
-
isBold: boolean;
|
|
106
|
-
isCode: boolean;
|
|
107
|
-
isImageCaption: boolean;
|
|
108
|
-
isItalic: boolean;
|
|
109
|
-
isLink: boolean;
|
|
110
|
-
isRTL: boolean;
|
|
111
|
-
isStrikethrough: boolean;
|
|
112
|
-
isSubscript: boolean;
|
|
113
|
-
isSuperscript: boolean;
|
|
114
|
-
isUnderline: boolean;
|
|
115
|
-
isLowercase: boolean;
|
|
116
|
-
isUppercase: boolean;
|
|
117
|
-
isCapitalize: boolean;
|
|
118
|
-
rootType: keyof typeof rootTypeToRootName;
|
|
119
|
-
};
|
|
120
|
-
type ToolbarState = typeof INITIAL_TOOLBAR_STATE;
|
|
121
|
-
type ToolbarStateKey = keyof ToolbarState;
|
|
122
|
-
type ToolbarStateValue<Key extends ToolbarStateKey> = ToolbarState[Key];
|
|
123
|
-
type ContextShape$1 = {
|
|
124
|
-
toolbarState: ToolbarState;
|
|
125
|
-
updateToolbarState<Key extends ToolbarStateKey>(key: Key, value: ToolbarStateValue<Key>): void;
|
|
126
|
-
};
|
|
127
|
-
declare const ToolbarContext: ({ children, }: {
|
|
128
|
-
children: ReactNode;
|
|
129
|
-
}) => React__default.JSX.Element;
|
|
130
|
-
declare const useToolbarState: () => ContextShape$1;
|
|
131
|
-
|
|
132
|
-
type ContextShape = {
|
|
133
|
-
historyState?: HistoryState;
|
|
134
|
-
};
|
|
135
|
-
declare const SharedHistoryContext: ({ children, }: {
|
|
136
|
-
children: ReactNode;
|
|
137
|
-
}) => React.JSX.Element;
|
|
138
|
-
declare const useSharedHistoryContext: () => ContextShape;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* A Tailwind CSS plugin that adds Notiq's custom theme variables and styles.
|
|
142
|
-
*/
|
|
143
|
-
declare const notiqPlugin: any;
|
|
144
|
-
|
|
145
|
-
export { type AIConfig, AIProvider, type ContextShape$1 as ContextShape, DEFAULT_FONT_SIZE, Editor, MAX_ALLOWED_FONT_SIZE, MIN_ALLOWED_FONT_SIZE, SharedHistoryContext, type ToolbarConfig, ToolbarContext, type ToolbarItem, type UploadConfig, type UploadHandler, UploadProvider, type UploadResponse, blockTypeToBlockName, notiqPlugin, useAI, useSharedHistoryContext, useToolbarState, useUpload };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|