strapi-content-embeddings 0.1.1 → 0.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.
@@ -6,7 +6,7 @@ import { EmptyStateLayout, Button, Tr, Box, Table, Thead, Th, Typography, Visual
6
6
  import { Plus, ArrowRight, Search, ArrowLeft, Cross, Check, Pencil, Trash } from "@strapi/icons";
7
7
  import { useIntl } from "react-intl";
8
8
  import qs from "qs";
9
- import { P as PLUGIN_ID, R as RobotIcon, M as MarkdownEditor } from "./index-Cz9cEuvw.mjs";
9
+ import { P as PLUGIN_ID, R as RobotIcon, M as MarkdownEditor } from "./index-CXVoFiJp.mjs";
10
10
  import styled from "styled-components";
11
11
  import ReactMarkdown from "react-markdown";
12
12
  const Illo = () => /* @__PURE__ */ jsxs("svg", { width: "159", height: "88", viewBox: "0 0 159 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
@@ -8,7 +8,7 @@ const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const reactIntl = require("react-intl");
10
10
  const qs = require("qs");
11
- const index = require("./index-o-tbBpJG.js");
11
+ const index = require("./index-BpKkUIJY.js");
12
12
  const styled = require("styled-components");
13
13
  const ReactMarkdown = require("react-markdown");
14
14
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
@@ -7,7 +7,6 @@ const styled = require("styled-components");
7
7
  const qs = require("qs");
8
8
  const admin = require("@strapi/strapi/admin");
9
9
  const icons = require("@strapi/icons");
10
- require("@mdxeditor/editor/style.css");
11
10
  const editor = require("@mdxeditor/editor");
12
11
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
13
12
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
@@ -51,6 +50,290 @@ function RobotIcon({ height = 48, width = 48 }) {
51
50
  );
52
51
  }
53
52
  const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsx(RobotIcon, { height: 24, width: 24 });
53
+ const MDXEditorStyles = styled.createGlobalStyle`
54
+ /* MDXEditor CSS Variables */
55
+ :root {
56
+ --mdx-spacing-0_5: 0.125rem;
57
+ --mdx-spacing-1: 0.25rem;
58
+ --mdx-spacing-1_5: 0.375rem;
59
+ --mdx-spacing-2: 0.5rem;
60
+ --mdx-spacing-3: 0.75rem;
61
+ --mdx-spacing-4: 1rem;
62
+ --mdx-spacing-36: 9rem;
63
+ --mdx-radius-base: 0.25rem;
64
+ --mdx-radius-medium: 0.375rem;
65
+ --mdx-text-sm: 0.875rem;
66
+ --mdx-baseBg: #f6f6f9;
67
+ --mdx-baseBgActive: #e8e8ec;
68
+ --mdx-basePageBg: #ffffff;
69
+ --mdx-baseBorder: #dcdce4;
70
+ --mdx-baseBorderHover: #b9bbc6;
71
+ --mdx-baseBase: #e0e1e6;
72
+ --mdx-baseTextContrast: #1c2024;
73
+ --mdx-accentText: #4945ff;
74
+ }
75
+
76
+ /* Toolbar Root - critical for horizontal layout */
77
+ [class*="_toolbarRoot"] {
78
+ z-index: 2;
79
+ display: flex !important;
80
+ flex-direction: row !important;
81
+ flex-wrap: wrap !important;
82
+ gap: var(--mdx-spacing-1);
83
+ border-radius: var(--mdx-radius-medium);
84
+ padding: var(--mdx-spacing-1_5);
85
+ align-items: center !important;
86
+ overflow-x: auto;
87
+ position: sticky;
88
+ top: 0;
89
+ background-color: var(--mdx-baseBg) !important;
90
+ border-bottom: 1px solid var(--mdx-baseBorder);
91
+ width: 100%;
92
+ }
93
+
94
+ [class*="_toolbarRoot"] div[role='separator'] {
95
+ margin: var(--mdx-spacing-2) var(--mdx-spacing-1);
96
+ border-left: 1px solid var(--mdx-baseBorder);
97
+ border-right: 1px solid var(--mdx-baseBase);
98
+ height: var(--mdx-spacing-4);
99
+ }
100
+
101
+ [class*="_toolbarRoot"] svg {
102
+ color: var(--mdx-baseTextContrast);
103
+ display: block;
104
+ }
105
+
106
+ /* Toolbar button groups */
107
+ [class*="_toolbarGroupOfGroups"] {
108
+ display: flex;
109
+ margin: 0 var(--mdx-spacing-1);
110
+ }
111
+
112
+ [class*="_toolbarToggleSingleGroup"] {
113
+ display: flex;
114
+ align-items: center;
115
+ white-space: nowrap;
116
+ }
117
+
118
+ /* Toolbar buttons and toggle items */
119
+ [class*="_toolbarToggleItem"],
120
+ [class*="_toolbarButton"] {
121
+ border: 0;
122
+ background-color: transparent;
123
+ font-size: inherit;
124
+ appearance: none;
125
+ box-sizing: border-box;
126
+ cursor: pointer;
127
+ padding: var(--mdx-spacing-0_5);
128
+ border-radius: var(--mdx-radius-base);
129
+ }
130
+
131
+ [class*="_toolbarToggleItem"]:hover,
132
+ [class*="_toolbarButton"]:hover {
133
+ background-color: var(--mdx-baseBgActive);
134
+ }
135
+
136
+ [class*="_toolbarToggleItem"][data-state='on'],
137
+ [class*="_toolbarButton"][data-state='on'],
138
+ [class*="_toolbarToggleItem"]:active,
139
+ [class*="_toolbarButton"]:active {
140
+ color: var(--mdx-baseTextContrast);
141
+ background-color: var(--mdx-baseBgActive);
142
+ }
143
+
144
+ /* Block type select dropdown */
145
+ [class*="_toolbarNodeKindSelectTrigger"],
146
+ [class*="_selectTrigger"] {
147
+ border: 0;
148
+ display: flex;
149
+ color: inherit;
150
+ align-items: center;
151
+ width: var(--mdx-spacing-36);
152
+ padding: var(--mdx-spacing-0_5) var(--mdx-spacing-1);
153
+ padding-inline-start: var(--mdx-spacing-2);
154
+ border-radius: var(--mdx-radius-medium);
155
+ white-space: nowrap;
156
+ font-size: var(--mdx-text-sm);
157
+ background-color: var(--mdx-basePageBg);
158
+ margin: 0 var(--mdx-spacing-1);
159
+ cursor: pointer;
160
+ }
161
+
162
+ /* Dropdown containers */
163
+ [class*="_toolbarNodeKindSelectContainer"],
164
+ [class*="_selectContainer"] {
165
+ filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));
166
+ z-index: 100;
167
+ width: var(--mdx-spacing-36);
168
+ border-radius: var(--mdx-radius-base);
169
+ background-color: var(--mdx-basePageBg);
170
+ font-size: var(--mdx-text-sm);
171
+ }
172
+
173
+ /* Select items */
174
+ [class*="_toolbarNodeKindSelectItem"],
175
+ [class*="_selectItem"] {
176
+ cursor: pointer;
177
+ display: flex;
178
+ padding: var(--mdx-spacing-2);
179
+ }
180
+
181
+ [class*="_toolbarNodeKindSelectItem"][data-highlighted],
182
+ [class*="_selectItem"][data-highlighted],
183
+ [class*="_toolbarNodeKindSelectItem"][data-state='checked'],
184
+ [class*="_selectItem"][data-state='checked'] {
185
+ background-color: var(--mdx-baseBg);
186
+ outline: none;
187
+ }
188
+
189
+ /* Dropdown arrow */
190
+ [class*="_selectDropdownArrow"] {
191
+ margin-left: auto;
192
+ display: flex;
193
+ align-items: center;
194
+ }
195
+
196
+ /* Content editable area */
197
+ [class*="_contentEditable"] {
198
+ box-sizing: border-box;
199
+ width: 100%;
200
+ color: var(--mdx-baseTextContrast);
201
+ padding: var(--mdx-spacing-3);
202
+ min-height: 200px;
203
+ outline: none;
204
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
205
+ font-size: 14px;
206
+ line-height: 1.6;
207
+ }
208
+
209
+ [class*="_contentEditable"]:focus {
210
+ outline: none;
211
+ }
212
+
213
+ /* Heading styles */
214
+ [class*="_contentEditable"] h1 {
215
+ font-size: 1.75rem;
216
+ font-weight: 600;
217
+ margin: 0 0 1rem;
218
+ }
219
+
220
+ [class*="_contentEditable"] h2 {
221
+ font-size: 1.5rem;
222
+ font-weight: 600;
223
+ margin: 1rem 0 0.75rem;
224
+ }
225
+
226
+ [class*="_contentEditable"] h3 {
227
+ font-size: 1.25rem;
228
+ font-weight: 600;
229
+ margin: 1rem 0 0.5rem;
230
+ }
231
+
232
+ /* Paragraph and list styles */
233
+ [class*="_contentEditable"] p {
234
+ margin: 0 0 1rem;
235
+ }
236
+
237
+ [class*="_contentEditable"] ul,
238
+ [class*="_contentEditable"] ol {
239
+ margin: 0 0 1rem;
240
+ padding-left: 1.5rem;
241
+ }
242
+
243
+ [class*="_contentEditable"] li {
244
+ margin: 0.25rem 0;
245
+ }
246
+
247
+ /* Code styles */
248
+ [class*="_contentEditable"] code {
249
+ background: #f0f0f5;
250
+ padding: 0.2em 0.4em;
251
+ border-radius: 3px;
252
+ font-family: "Monaco", "Menlo", monospace;
253
+ font-size: 0.9em;
254
+ }
255
+
256
+ [class*="_contentEditable"] pre {
257
+ background: #2d2d2d;
258
+ color: #f8f8f2;
259
+ padding: 1rem;
260
+ border-radius: 4px;
261
+ overflow-x: auto;
262
+ margin: 0 0 1rem;
263
+ }
264
+
265
+ [class*="_contentEditable"] pre code {
266
+ background: none;
267
+ padding: 0;
268
+ }
269
+
270
+ /* Blockquote */
271
+ [class*="_contentEditable"] blockquote {
272
+ border-left: 3px solid #dcdce4;
273
+ margin: 0 0 1rem;
274
+ padding-left: 1rem;
275
+ color: #666;
276
+ }
277
+
278
+ /* Links */
279
+ [class*="_contentEditable"] a {
280
+ color: #4945ff;
281
+ text-decoration: underline;
282
+ }
283
+
284
+ /* Horizontal rule */
285
+ [class*="_contentEditable"] hr {
286
+ border: none;
287
+ border-top: 1px solid #dcdce4;
288
+ margin: 1.5rem 0;
289
+ }
290
+
291
+ /* Editor root */
292
+ [class*="_editorRoot"] {
293
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
294
+ color: var(--mdx-baseTextContrast);
295
+ background: var(--mdx-basePageBg);
296
+ }
297
+
298
+ /* Link dialog */
299
+ [class*="_linkDialogPopoverContent"] {
300
+ display: flex;
301
+ flex-direction: column;
302
+ gap: var(--mdx-spacing-2);
303
+ padding: var(--mdx-spacing-3);
304
+ background-color: var(--mdx-basePageBg);
305
+ border-radius: var(--mdx-radius-medium);
306
+ box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
307
+ z-index: 100;
308
+ }
309
+
310
+ [class*="_linkDialogInputWrapper"] {
311
+ display: flex;
312
+ gap: var(--mdx-spacing-1);
313
+ }
314
+
315
+ [class*="_linkDialogInputWrapper"] input {
316
+ flex: 1;
317
+ padding: var(--mdx-spacing-1) var(--mdx-spacing-2);
318
+ border: 1px solid var(--mdx-baseBorder);
319
+ border-radius: var(--mdx-radius-base);
320
+ font-size: var(--mdx-text-sm);
321
+ }
322
+
323
+ [class*="_linkDialogInputWrapper"] button {
324
+ padding: var(--mdx-spacing-1) var(--mdx-spacing-2);
325
+ background-color: var(--mdx-accentText);
326
+ color: white;
327
+ border: none;
328
+ border-radius: var(--mdx-radius-base);
329
+ cursor: pointer;
330
+ }
331
+
332
+ /* Popover positioning */
333
+ [data-radix-popper-content-wrapper] {
334
+ z-index: 100 !important;
335
+ }
336
+ `;
54
337
  const EditorWrapper = styled__default.default(designSystem.Box)`
55
338
  border: 1px solid ${({ $isFocused }) => $isFocused ? "#4945ff" : "#dcdce4"};
56
339
  border-radius: 4px;
@@ -61,45 +344,47 @@ const EditorWrapper = styled__default.default(designSystem.Box)`
61
344
  `;
62
345
  function MarkdownEditor({ content, onChange, height = 300 }) {
63
346
  const [isFocused, setIsFocused] = react.useState(false);
64
- return /* @__PURE__ */ jsxRuntime.jsx(
65
- EditorWrapper,
66
- {
67
- $isFocused: isFocused,
68
- onFocus: () => setIsFocused(true),
69
- onBlur: () => setIsFocused(false),
70
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { minHeight: `${height}px` }, children: /* @__PURE__ */ jsxRuntime.jsx(
71
- editor.MDXEditor,
72
- {
73
- markdown: content,
74
- onChange,
75
- placeholder: "Write your content here...",
76
- contentEditableClassName: "mdx-editor-content",
77
- plugins: [
78
- editor.headingsPlugin(),
79
- editor.listsPlugin(),
80
- editor.quotePlugin(),
81
- editor.thematicBreakPlugin(),
82
- editor.linkPlugin(),
83
- editor.linkDialogPlugin(),
84
- editor.markdownShortcutPlugin(),
85
- editor.toolbarPlugin({
86
- toolbarContents: () => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
87
- /* @__PURE__ */ jsxRuntime.jsx(editor.UndoRedo, {}),
88
- /* @__PURE__ */ jsxRuntime.jsx(editor.Separator, {}),
89
- /* @__PURE__ */ jsxRuntime.jsx(editor.BlockTypeSelect, {}),
90
- /* @__PURE__ */ jsxRuntime.jsx(editor.Separator, {}),
91
- /* @__PURE__ */ jsxRuntime.jsx(editor.BoldItalicUnderlineToggles, {}),
92
- /* @__PURE__ */ jsxRuntime.jsx(editor.Separator, {}),
93
- /* @__PURE__ */ jsxRuntime.jsx(editor.CreateLink, {}),
94
- /* @__PURE__ */ jsxRuntime.jsx(editor.Separator, {}),
95
- /* @__PURE__ */ jsxRuntime.jsx(editor.ListsToggle, {})
96
- ] })
97
- })
98
- ]
99
- }
100
- ) })
101
- }
102
- );
347
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
348
+ /* @__PURE__ */ jsxRuntime.jsx(MDXEditorStyles, {}),
349
+ /* @__PURE__ */ jsxRuntime.jsx(
350
+ EditorWrapper,
351
+ {
352
+ $isFocused: isFocused,
353
+ onFocus: () => setIsFocused(true),
354
+ onBlur: () => setIsFocused(false),
355
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { minHeight: `${height}px` }, children: /* @__PURE__ */ jsxRuntime.jsx(
356
+ editor.MDXEditor,
357
+ {
358
+ markdown: content,
359
+ onChange,
360
+ placeholder: "Write your content here...",
361
+ plugins: [
362
+ editor.headingsPlugin(),
363
+ editor.listsPlugin(),
364
+ editor.quotePlugin(),
365
+ editor.thematicBreakPlugin(),
366
+ editor.linkPlugin(),
367
+ editor.linkDialogPlugin(),
368
+ editor.markdownShortcutPlugin(),
369
+ editor.toolbarPlugin({
370
+ toolbarContents: () => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
371
+ /* @__PURE__ */ jsxRuntime.jsx(editor.UndoRedo, {}),
372
+ /* @__PURE__ */ jsxRuntime.jsx(editor.Separator, {}),
373
+ /* @__PURE__ */ jsxRuntime.jsx(editor.BlockTypeSelect, {}),
374
+ /* @__PURE__ */ jsxRuntime.jsx(editor.Separator, {}),
375
+ /* @__PURE__ */ jsxRuntime.jsx(editor.BoldItalicUnderlineToggles, {}),
376
+ /* @__PURE__ */ jsxRuntime.jsx(editor.Separator, {}),
377
+ /* @__PURE__ */ jsxRuntime.jsx(editor.CreateLink, {}),
378
+ /* @__PURE__ */ jsxRuntime.jsx(editor.Separator, {}),
379
+ /* @__PURE__ */ jsxRuntime.jsx(editor.ListsToggle, {})
380
+ ] })
381
+ })
382
+ ]
383
+ }
384
+ ) })
385
+ }
386
+ )
387
+ ] });
103
388
  }
104
389
  const StyledTypography = styled__default.default(designSystem.Typography)`
105
390
  display: block;
@@ -370,7 +655,7 @@ const index = {
370
655
  defaultMessage: PLUGIN_ID
371
656
  },
372
657
  Component: async () => {
373
- const { App } = await Promise.resolve().then(() => require("./App-wC2qv6kC.js"));
658
+ const { App } = await Promise.resolve().then(() => require("./App-Swmo_WMf.js"));
374
659
  return App;
375
660
  }
376
661
  });
@@ -2,11 +2,10 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useRef, useEffect, useState } from "react";
3
3
  import { Box, Typography, Loader, Flex, Button, Modal, Field, TextInput } from "@strapi/design-system";
4
4
  import { useNavigate } from "react-router-dom";
5
- import styled from "styled-components";
5
+ import styled, { createGlobalStyle } from "styled-components";
6
6
  import qs from "qs";
7
7
  import { useFetchClient, useNotification, unstable_useContentManagerContext } from "@strapi/strapi/admin";
8
8
  import { Eye, Pencil, Plus } from "@strapi/icons";
9
- import "@mdxeditor/editor/style.css";
10
9
  import { MDXEditor, headingsPlugin, listsPlugin, quotePlugin, thematicBreakPlugin, linkPlugin, linkDialogPlugin, markdownShortcutPlugin, toolbarPlugin, UndoRedo, Separator, BlockTypeSelect, BoldItalicUnderlineToggles, CreateLink, ListsToggle } from "@mdxeditor/editor";
11
10
  const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
12
11
  const v = glob[path];
@@ -47,6 +46,290 @@ function RobotIcon({ height = 48, width = 48 }) {
47
46
  );
48
47
  }
49
48
  const PluginIcon = () => /* @__PURE__ */ jsx(RobotIcon, { height: 24, width: 24 });
49
+ const MDXEditorStyles = createGlobalStyle`
50
+ /* MDXEditor CSS Variables */
51
+ :root {
52
+ --mdx-spacing-0_5: 0.125rem;
53
+ --mdx-spacing-1: 0.25rem;
54
+ --mdx-spacing-1_5: 0.375rem;
55
+ --mdx-spacing-2: 0.5rem;
56
+ --mdx-spacing-3: 0.75rem;
57
+ --mdx-spacing-4: 1rem;
58
+ --mdx-spacing-36: 9rem;
59
+ --mdx-radius-base: 0.25rem;
60
+ --mdx-radius-medium: 0.375rem;
61
+ --mdx-text-sm: 0.875rem;
62
+ --mdx-baseBg: #f6f6f9;
63
+ --mdx-baseBgActive: #e8e8ec;
64
+ --mdx-basePageBg: #ffffff;
65
+ --mdx-baseBorder: #dcdce4;
66
+ --mdx-baseBorderHover: #b9bbc6;
67
+ --mdx-baseBase: #e0e1e6;
68
+ --mdx-baseTextContrast: #1c2024;
69
+ --mdx-accentText: #4945ff;
70
+ }
71
+
72
+ /* Toolbar Root - critical for horizontal layout */
73
+ [class*="_toolbarRoot"] {
74
+ z-index: 2;
75
+ display: flex !important;
76
+ flex-direction: row !important;
77
+ flex-wrap: wrap !important;
78
+ gap: var(--mdx-spacing-1);
79
+ border-radius: var(--mdx-radius-medium);
80
+ padding: var(--mdx-spacing-1_5);
81
+ align-items: center !important;
82
+ overflow-x: auto;
83
+ position: sticky;
84
+ top: 0;
85
+ background-color: var(--mdx-baseBg) !important;
86
+ border-bottom: 1px solid var(--mdx-baseBorder);
87
+ width: 100%;
88
+ }
89
+
90
+ [class*="_toolbarRoot"] div[role='separator'] {
91
+ margin: var(--mdx-spacing-2) var(--mdx-spacing-1);
92
+ border-left: 1px solid var(--mdx-baseBorder);
93
+ border-right: 1px solid var(--mdx-baseBase);
94
+ height: var(--mdx-spacing-4);
95
+ }
96
+
97
+ [class*="_toolbarRoot"] svg {
98
+ color: var(--mdx-baseTextContrast);
99
+ display: block;
100
+ }
101
+
102
+ /* Toolbar button groups */
103
+ [class*="_toolbarGroupOfGroups"] {
104
+ display: flex;
105
+ margin: 0 var(--mdx-spacing-1);
106
+ }
107
+
108
+ [class*="_toolbarToggleSingleGroup"] {
109
+ display: flex;
110
+ align-items: center;
111
+ white-space: nowrap;
112
+ }
113
+
114
+ /* Toolbar buttons and toggle items */
115
+ [class*="_toolbarToggleItem"],
116
+ [class*="_toolbarButton"] {
117
+ border: 0;
118
+ background-color: transparent;
119
+ font-size: inherit;
120
+ appearance: none;
121
+ box-sizing: border-box;
122
+ cursor: pointer;
123
+ padding: var(--mdx-spacing-0_5);
124
+ border-radius: var(--mdx-radius-base);
125
+ }
126
+
127
+ [class*="_toolbarToggleItem"]:hover,
128
+ [class*="_toolbarButton"]:hover {
129
+ background-color: var(--mdx-baseBgActive);
130
+ }
131
+
132
+ [class*="_toolbarToggleItem"][data-state='on'],
133
+ [class*="_toolbarButton"][data-state='on'],
134
+ [class*="_toolbarToggleItem"]:active,
135
+ [class*="_toolbarButton"]:active {
136
+ color: var(--mdx-baseTextContrast);
137
+ background-color: var(--mdx-baseBgActive);
138
+ }
139
+
140
+ /* Block type select dropdown */
141
+ [class*="_toolbarNodeKindSelectTrigger"],
142
+ [class*="_selectTrigger"] {
143
+ border: 0;
144
+ display: flex;
145
+ color: inherit;
146
+ align-items: center;
147
+ width: var(--mdx-spacing-36);
148
+ padding: var(--mdx-spacing-0_5) var(--mdx-spacing-1);
149
+ padding-inline-start: var(--mdx-spacing-2);
150
+ border-radius: var(--mdx-radius-medium);
151
+ white-space: nowrap;
152
+ font-size: var(--mdx-text-sm);
153
+ background-color: var(--mdx-basePageBg);
154
+ margin: 0 var(--mdx-spacing-1);
155
+ cursor: pointer;
156
+ }
157
+
158
+ /* Dropdown containers */
159
+ [class*="_toolbarNodeKindSelectContainer"],
160
+ [class*="_selectContainer"] {
161
+ filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));
162
+ z-index: 100;
163
+ width: var(--mdx-spacing-36);
164
+ border-radius: var(--mdx-radius-base);
165
+ background-color: var(--mdx-basePageBg);
166
+ font-size: var(--mdx-text-sm);
167
+ }
168
+
169
+ /* Select items */
170
+ [class*="_toolbarNodeKindSelectItem"],
171
+ [class*="_selectItem"] {
172
+ cursor: pointer;
173
+ display: flex;
174
+ padding: var(--mdx-spacing-2);
175
+ }
176
+
177
+ [class*="_toolbarNodeKindSelectItem"][data-highlighted],
178
+ [class*="_selectItem"][data-highlighted],
179
+ [class*="_toolbarNodeKindSelectItem"][data-state='checked'],
180
+ [class*="_selectItem"][data-state='checked'] {
181
+ background-color: var(--mdx-baseBg);
182
+ outline: none;
183
+ }
184
+
185
+ /* Dropdown arrow */
186
+ [class*="_selectDropdownArrow"] {
187
+ margin-left: auto;
188
+ display: flex;
189
+ align-items: center;
190
+ }
191
+
192
+ /* Content editable area */
193
+ [class*="_contentEditable"] {
194
+ box-sizing: border-box;
195
+ width: 100%;
196
+ color: var(--mdx-baseTextContrast);
197
+ padding: var(--mdx-spacing-3);
198
+ min-height: 200px;
199
+ outline: none;
200
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
201
+ font-size: 14px;
202
+ line-height: 1.6;
203
+ }
204
+
205
+ [class*="_contentEditable"]:focus {
206
+ outline: none;
207
+ }
208
+
209
+ /* Heading styles */
210
+ [class*="_contentEditable"] h1 {
211
+ font-size: 1.75rem;
212
+ font-weight: 600;
213
+ margin: 0 0 1rem;
214
+ }
215
+
216
+ [class*="_contentEditable"] h2 {
217
+ font-size: 1.5rem;
218
+ font-weight: 600;
219
+ margin: 1rem 0 0.75rem;
220
+ }
221
+
222
+ [class*="_contentEditable"] h3 {
223
+ font-size: 1.25rem;
224
+ font-weight: 600;
225
+ margin: 1rem 0 0.5rem;
226
+ }
227
+
228
+ /* Paragraph and list styles */
229
+ [class*="_contentEditable"] p {
230
+ margin: 0 0 1rem;
231
+ }
232
+
233
+ [class*="_contentEditable"] ul,
234
+ [class*="_contentEditable"] ol {
235
+ margin: 0 0 1rem;
236
+ padding-left: 1.5rem;
237
+ }
238
+
239
+ [class*="_contentEditable"] li {
240
+ margin: 0.25rem 0;
241
+ }
242
+
243
+ /* Code styles */
244
+ [class*="_contentEditable"] code {
245
+ background: #f0f0f5;
246
+ padding: 0.2em 0.4em;
247
+ border-radius: 3px;
248
+ font-family: "Monaco", "Menlo", monospace;
249
+ font-size: 0.9em;
250
+ }
251
+
252
+ [class*="_contentEditable"] pre {
253
+ background: #2d2d2d;
254
+ color: #f8f8f2;
255
+ padding: 1rem;
256
+ border-radius: 4px;
257
+ overflow-x: auto;
258
+ margin: 0 0 1rem;
259
+ }
260
+
261
+ [class*="_contentEditable"] pre code {
262
+ background: none;
263
+ padding: 0;
264
+ }
265
+
266
+ /* Blockquote */
267
+ [class*="_contentEditable"] blockquote {
268
+ border-left: 3px solid #dcdce4;
269
+ margin: 0 0 1rem;
270
+ padding-left: 1rem;
271
+ color: #666;
272
+ }
273
+
274
+ /* Links */
275
+ [class*="_contentEditable"] a {
276
+ color: #4945ff;
277
+ text-decoration: underline;
278
+ }
279
+
280
+ /* Horizontal rule */
281
+ [class*="_contentEditable"] hr {
282
+ border: none;
283
+ border-top: 1px solid #dcdce4;
284
+ margin: 1.5rem 0;
285
+ }
286
+
287
+ /* Editor root */
288
+ [class*="_editorRoot"] {
289
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
290
+ color: var(--mdx-baseTextContrast);
291
+ background: var(--mdx-basePageBg);
292
+ }
293
+
294
+ /* Link dialog */
295
+ [class*="_linkDialogPopoverContent"] {
296
+ display: flex;
297
+ flex-direction: column;
298
+ gap: var(--mdx-spacing-2);
299
+ padding: var(--mdx-spacing-3);
300
+ background-color: var(--mdx-basePageBg);
301
+ border-radius: var(--mdx-radius-medium);
302
+ box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
303
+ z-index: 100;
304
+ }
305
+
306
+ [class*="_linkDialogInputWrapper"] {
307
+ display: flex;
308
+ gap: var(--mdx-spacing-1);
309
+ }
310
+
311
+ [class*="_linkDialogInputWrapper"] input {
312
+ flex: 1;
313
+ padding: var(--mdx-spacing-1) var(--mdx-spacing-2);
314
+ border: 1px solid var(--mdx-baseBorder);
315
+ border-radius: var(--mdx-radius-base);
316
+ font-size: var(--mdx-text-sm);
317
+ }
318
+
319
+ [class*="_linkDialogInputWrapper"] button {
320
+ padding: var(--mdx-spacing-1) var(--mdx-spacing-2);
321
+ background-color: var(--mdx-accentText);
322
+ color: white;
323
+ border: none;
324
+ border-radius: var(--mdx-radius-base);
325
+ cursor: pointer;
326
+ }
327
+
328
+ /* Popover positioning */
329
+ [data-radix-popper-content-wrapper] {
330
+ z-index: 100 !important;
331
+ }
332
+ `;
50
333
  const EditorWrapper = styled(Box)`
51
334
  border: 1px solid ${({ $isFocused }) => $isFocused ? "#4945ff" : "#dcdce4"};
52
335
  border-radius: 4px;
@@ -57,45 +340,47 @@ const EditorWrapper = styled(Box)`
57
340
  `;
58
341
  function MarkdownEditor({ content, onChange, height = 300 }) {
59
342
  const [isFocused, setIsFocused] = useState(false);
60
- return /* @__PURE__ */ jsx(
61
- EditorWrapper,
62
- {
63
- $isFocused: isFocused,
64
- onFocus: () => setIsFocused(true),
65
- onBlur: () => setIsFocused(false),
66
- children: /* @__PURE__ */ jsx("div", { style: { minHeight: `${height}px` }, children: /* @__PURE__ */ jsx(
67
- MDXEditor,
68
- {
69
- markdown: content,
70
- onChange,
71
- placeholder: "Write your content here...",
72
- contentEditableClassName: "mdx-editor-content",
73
- plugins: [
74
- headingsPlugin(),
75
- listsPlugin(),
76
- quotePlugin(),
77
- thematicBreakPlugin(),
78
- linkPlugin(),
79
- linkDialogPlugin(),
80
- markdownShortcutPlugin(),
81
- toolbarPlugin({
82
- toolbarContents: () => /* @__PURE__ */ jsxs(Fragment, { children: [
83
- /* @__PURE__ */ jsx(UndoRedo, {}),
84
- /* @__PURE__ */ jsx(Separator, {}),
85
- /* @__PURE__ */ jsx(BlockTypeSelect, {}),
86
- /* @__PURE__ */ jsx(Separator, {}),
87
- /* @__PURE__ */ jsx(BoldItalicUnderlineToggles, {}),
88
- /* @__PURE__ */ jsx(Separator, {}),
89
- /* @__PURE__ */ jsx(CreateLink, {}),
90
- /* @__PURE__ */ jsx(Separator, {}),
91
- /* @__PURE__ */ jsx(ListsToggle, {})
92
- ] })
93
- })
94
- ]
95
- }
96
- ) })
97
- }
98
- );
343
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
344
+ /* @__PURE__ */ jsx(MDXEditorStyles, {}),
345
+ /* @__PURE__ */ jsx(
346
+ EditorWrapper,
347
+ {
348
+ $isFocused: isFocused,
349
+ onFocus: () => setIsFocused(true),
350
+ onBlur: () => setIsFocused(false),
351
+ children: /* @__PURE__ */ jsx("div", { style: { minHeight: `${height}px` }, children: /* @__PURE__ */ jsx(
352
+ MDXEditor,
353
+ {
354
+ markdown: content,
355
+ onChange,
356
+ placeholder: "Write your content here...",
357
+ plugins: [
358
+ headingsPlugin(),
359
+ listsPlugin(),
360
+ quotePlugin(),
361
+ thematicBreakPlugin(),
362
+ linkPlugin(),
363
+ linkDialogPlugin(),
364
+ markdownShortcutPlugin(),
365
+ toolbarPlugin({
366
+ toolbarContents: () => /* @__PURE__ */ jsxs(Fragment, { children: [
367
+ /* @__PURE__ */ jsx(UndoRedo, {}),
368
+ /* @__PURE__ */ jsx(Separator, {}),
369
+ /* @__PURE__ */ jsx(BlockTypeSelect, {}),
370
+ /* @__PURE__ */ jsx(Separator, {}),
371
+ /* @__PURE__ */ jsx(BoldItalicUnderlineToggles, {}),
372
+ /* @__PURE__ */ jsx(Separator, {}),
373
+ /* @__PURE__ */ jsx(CreateLink, {}),
374
+ /* @__PURE__ */ jsx(Separator, {}),
375
+ /* @__PURE__ */ jsx(ListsToggle, {})
376
+ ] })
377
+ })
378
+ ]
379
+ }
380
+ ) })
381
+ }
382
+ )
383
+ ] });
99
384
  }
100
385
  const StyledTypography = styled(Typography)`
101
386
  display: block;
@@ -366,7 +651,7 @@ const index = {
366
651
  defaultMessage: PLUGIN_ID
367
652
  },
368
653
  Component: async () => {
369
- const { App } = await import("./App-7LMg3lrX.mjs");
654
+ const { App } = await import("./App-BlCKKuQN.mjs");
370
655
  return App;
371
656
  }
372
657
  });
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-o-tbBpJG.js");
2
+ const index = require("../_chunks/index-BpKkUIJY.js");
3
3
  require("react/jsx-runtime");
4
4
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-Cz9cEuvw.mjs";
1
+ import { i } from "../_chunks/index-CXVoFiJp.mjs";
2
2
  import "react/jsx-runtime";
3
3
  export {
4
4
  i as default
@@ -1,5 +1,3 @@
1
- import '@mdxeditor/editor/style.css';
2
- import './markdown-editor.css';
3
1
  interface MarkdownEditorProps {
4
2
  content: string;
5
3
  onChange: (content: string) => void;
@@ -220,8 +220,12 @@ class PluginManager {
220
220
  this.embeddings,
221
221
  this.vectorStoreConfig
222
222
  );
223
- const retriever = vectorStore.asRetriever({ k: 4 });
224
- const sourceDocuments = await retriever.invoke(query);
223
+ const resultsWithScores = await vectorStore.similaritySearchWithScore(query, 6);
224
+ const SIMILARITY_THRESHOLD = 0.5;
225
+ const relevantResults = resultsWithScores.filter(([_, score]) => score < SIMILARITY_THRESHOLD);
226
+ const topResults = relevantResults.slice(0, 3);
227
+ const sourceDocuments = topResults.map(([doc]) => doc);
228
+ const bestMatchForDisplay = topResults.length > 0 ? [topResults[0][0]] : [];
225
229
  const formatDocs = (docs) => {
226
230
  return docs.map((doc) => {
227
231
  const title = doc.metadata?.title ? `Title: ${doc.metadata.title}
@@ -252,7 +256,8 @@ Context:
252
256
  const text = await ragChain.invoke(query);
253
257
  return {
254
258
  text,
255
- sourceDocuments
259
+ sourceDocuments: bestMatchForDisplay
260
+ // Only return best match to display
256
261
  };
257
262
  } catch (error) {
258
263
  console.error(`Failed to query embeddings: ${error}`);
@@ -219,8 +219,12 @@ class PluginManager {
219
219
  this.embeddings,
220
220
  this.vectorStoreConfig
221
221
  );
222
- const retriever = vectorStore.asRetriever({ k: 4 });
223
- const sourceDocuments = await retriever.invoke(query);
222
+ const resultsWithScores = await vectorStore.similaritySearchWithScore(query, 6);
223
+ const SIMILARITY_THRESHOLD = 0.5;
224
+ const relevantResults = resultsWithScores.filter(([_, score]) => score < SIMILARITY_THRESHOLD);
225
+ const topResults = relevantResults.slice(0, 3);
226
+ const sourceDocuments = topResults.map(([doc]) => doc);
227
+ const bestMatchForDisplay = topResults.length > 0 ? [topResults[0][0]] : [];
224
228
  const formatDocs = (docs) => {
225
229
  return docs.map((doc) => {
226
230
  const title = doc.metadata?.title ? `Title: ${doc.metadata.title}
@@ -251,7 +255,8 @@ Context:
251
255
  const text = await ragChain.invoke(query);
252
256
  return {
253
257
  text,
254
- sourceDocuments
258
+ sourceDocuments: bestMatchForDisplay
259
+ // Only return best match to display
255
260
  };
256
261
  } catch (error) {
257
262
  console.error(`Failed to query embeddings: ${error}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-content-embeddings",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Strapi v5 plugin for vector embeddings with OpenAI and Neon PostgreSQL. Enables semantic search, RAG chat, and MCP (Model Context Protocol) integration.",
5
5
  "keywords": [
6
6
  "strapi",
package/dist/style.css DELETED
@@ -1,350 +0,0 @@
1
- /* MDXEditor CSS Variables - required for toolbar styling */
2
- :root {
3
- --spacing-0_5: 0.125rem;
4
- --spacing-1: 0.25rem;
5
- --spacing-1_5: 0.375rem;
6
- --spacing-2: 0.5rem;
7
- --spacing-3: 0.75rem;
8
- --spacing-4: 1rem;
9
- --spacing-5: 1.25rem;
10
- --spacing-36: 9rem;
11
- --spacing-48: 12rem;
12
- --radius-none: 0;
13
- --radius-base: 0.25rem;
14
- --radius-medium: 0.375rem;
15
- --text-xs: 0.75rem;
16
- --text-sm: 0.875rem;
17
- --baseBg: #f6f6f9;
18
- --baseBgActive: #e8e8ec;
19
- --basePageBg: #ffffff;
20
- --baseBorder: #dcdce4;
21
- --baseBorderHover: #b9bbc6;
22
- --baseBase: #e0e1e6;
23
- --baseText: #60646c;
24
- --baseTextContrast: #1c2024;
25
- --accentText: #4945ff;
26
- }
27
-
28
- /* MDXEditor Toolbar Root - critical for horizontal layout */
29
- [class*="_toolbarRoot"],
30
- .mdxeditor-toolbar {
31
- z-index: 2;
32
- display: flex !important;
33
- flex-direction: row !important;
34
- flex-wrap: wrap !important;
35
- gap: var(--spacing-1);
36
- border-radius: var(--radius-medium);
37
- padding: var(--spacing-1_5);
38
- align-items: center !important;
39
- overflow-x: auto;
40
- position: sticky;
41
- top: 0;
42
- background-color: var(--baseBg) !important;
43
- border-bottom: 1px solid var(--baseBorder);
44
- width: 100%;
45
- }
46
-
47
- [class*="_toolbarRoot"] div[role='separator'],
48
- .mdxeditor-toolbar div[role='separator'] {
49
- margin: var(--spacing-2) var(--spacing-1);
50
- border-left: 1px solid var(--baseBorder);
51
- border-right: 1px solid var(--baseBase);
52
- height: var(--spacing-4);
53
- }
54
-
55
- [class*="_toolbarRoot"] svg,
56
- .mdxeditor-toolbar svg {
57
- color: var(--baseTextContrast);
58
- display: block;
59
- }
60
-
61
- /* Toolbar button groups */
62
- [class*="_toolbarGroupOfGroups"] {
63
- display: flex;
64
- margin: 0 var(--spacing-1);
65
- }
66
-
67
- [class*="_toolbarToggleSingleGroup"] {
68
- display: flex;
69
- align-items: center;
70
- white-space: nowrap;
71
- }
72
-
73
- /* Toolbar buttons and toggle items */
74
- [class*="_toolbarToggleItem"],
75
- [class*="_toolbarButton"] {
76
- border: 0;
77
- background-color: transparent;
78
- font-size: inherit;
79
- appearance: none;
80
- box-sizing: border-box;
81
- cursor: default;
82
- padding: var(--spacing-0_5);
83
- border-radius: var(--radius-base);
84
- }
85
-
86
- [class*="_toolbarToggleItem"]:hover,
87
- [class*="_toolbarButton"]:hover {
88
- background-color: var(--baseBgActive);
89
- }
90
-
91
- [class*="_toolbarToggleItem"][data-state='on'],
92
- [class*="_toolbarButton"][data-state='on'],
93
- [class*="_toolbarToggleItem"]:active,
94
- [class*="_toolbarButton"]:active {
95
- color: var(--baseTextContrast);
96
- background-color: var(--baseBgActive);
97
- }
98
-
99
- [class*="_toolbarToggleItem"][data-disabled],
100
- [class*="_toolbarButton"][data-disabled] {
101
- pointer-events: none;
102
- }
103
-
104
- [class*="_toolbarToggleItem"][data-disabled] svg,
105
- [class*="_toolbarButton"][data-disabled] svg {
106
- color: var(--baseBorderHover);
107
- }
108
-
109
- /* Block type select dropdown */
110
- [class*="_toolbarNodeKindSelectTrigger"],
111
- [class*="_selectTrigger"] {
112
- border: 0;
113
- background-color: transparent;
114
- display: flex;
115
- color: inherit;
116
- align-items: center;
117
- width: var(--spacing-36);
118
- padding: var(--spacing-0_5) var(--spacing-1);
119
- padding-inline-start: var(--spacing-2);
120
- border-radius: var(--radius-medium);
121
- white-space: nowrap;
122
- flex-wrap: nowrap;
123
- font-size: var(--text-sm);
124
- background-color: var(--basePageBg);
125
- margin: 0 var(--spacing-1);
126
- }
127
-
128
- [class*="_toolbarNodeKindSelectTrigger"][data-state='open'],
129
- [class*="_selectTrigger"][data-state='open'] {
130
- filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));
131
- border-bottom-right-radius: var(--radius-none);
132
- border-bottom-left-radius: var(--radius-none);
133
- }
134
-
135
- /* Dropdown containers */
136
- [class*="_toolbarNodeKindSelectContainer"],
137
- [class*="_toolbarButtonDropdownContainer"],
138
- [class*="_selectContainer"] {
139
- filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));
140
- z-index: 3;
141
- width: var(--spacing-36);
142
- border-bottom-left-radius: var(--radius-base);
143
- border-bottom-right-radius: var(--radius-base);
144
- background-color: var(--basePageBg);
145
- font-size: var(--text-sm);
146
- }
147
-
148
- /* Select items in dropdowns */
149
- [class*="_toolbarNodeKindSelectItem"],
150
- [class*="_selectItem"] {
151
- cursor: default;
152
- display: flex;
153
- padding: var(--spacing-2);
154
- }
155
-
156
- [class*="_toolbarNodeKindSelectItem"][data-highlighted],
157
- [class*="_selectItem"][data-highlighted] {
158
- background-color: var(--baseBg);
159
- outline: none;
160
- }
161
-
162
- [class*="_toolbarNodeKindSelectItem"][data-state='checked'],
163
- [class*="_selectItem"][data-state='checked'] {
164
- color: var(--baseTextContrast);
165
- background-color: var(--baseBg);
166
- }
167
-
168
- [class*="_toolbarNodeKindSelectItem"]:last-child,
169
- [class*="_selectItem"]:last-child {
170
- border-bottom-left-radius: var(--radius-base);
171
- border-bottom-right-radius: var(--radius-base);
172
- }
173
-
174
- /* Dropdown arrow */
175
- [class*="_toolbarNodeKindSelectDropdownArrow"],
176
- [class*="_selectDropdownArrow"] {
177
- margin-left: auto;
178
- display: flex;
179
- align-items: center;
180
- }
181
-
182
- /* Content editable area styling */
183
- [class*="_contentEditable"],
184
- .mdx-editor-content {
185
- box-sizing: border-box;
186
- width: 100%;
187
- color: var(--baseTextContrast);
188
- padding: var(--spacing-3);
189
- min-height: 200px;
190
- outline: none;
191
- font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
192
- Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
193
- font-size: 14px;
194
- line-height: 1.6;
195
- }
196
-
197
- [class*="_contentEditable"]:focus,
198
- .mdx-editor-content:focus {
199
- outline: none;
200
- }
201
-
202
- /* Heading styles */
203
- .mdx-editor-content h1,
204
- [class*="_contentEditable"] h1 {
205
- font-size: 1.75rem;
206
- font-weight: 600;
207
- margin: 0 0 1rem;
208
- }
209
-
210
- .mdx-editor-content h2,
211
- [class*="_contentEditable"] h2 {
212
- font-size: 1.5rem;
213
- font-weight: 600;
214
- margin: 1rem 0 0.75rem;
215
- }
216
-
217
- .mdx-editor-content h3,
218
- [class*="_contentEditable"] h3 {
219
- font-size: 1.25rem;
220
- font-weight: 600;
221
- margin: 1rem 0 0.5rem;
222
- }
223
-
224
- /* Paragraph and list styles */
225
- .mdx-editor-content p,
226
- [class*="_contentEditable"] p {
227
- margin: 0 0 1rem;
228
- }
229
-
230
- .mdx-editor-content ul,
231
- .mdx-editor-content ol,
232
- [class*="_contentEditable"] ul,
233
- [class*="_contentEditable"] ol {
234
- margin: 0 0 1rem;
235
- padding-left: 1.5rem;
236
- }
237
-
238
- .mdx-editor-content li,
239
- [class*="_contentEditable"] li {
240
- margin: 0.25rem 0;
241
- }
242
-
243
- /* Code styles */
244
- .mdx-editor-content code,
245
- [class*="_contentEditable"] code {
246
- background: #f0f0f5;
247
- padding: 0.2em 0.4em;
248
- border-radius: 3px;
249
- font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
250
- font-size: 0.9em;
251
- }
252
-
253
- .mdx-editor-content pre,
254
- [class*="_contentEditable"] pre {
255
- background: #2d2d2d;
256
- color: #f8f8f2;
257
- padding: 1rem;
258
- border-radius: 4px;
259
- overflow-x: auto;
260
- margin: 0 0 1rem;
261
- }
262
-
263
- .mdx-editor-content pre code,
264
- [class*="_contentEditable"] pre code {
265
- background: none;
266
- padding: 0;
267
- }
268
-
269
- /* Blockquote styles */
270
- .mdx-editor-content blockquote,
271
- [class*="_contentEditable"] blockquote {
272
- border-left: 3px solid #dcdce4;
273
- margin: 0 0 1rem;
274
- padding-left: 1rem;
275
- color: #666;
276
- }
277
-
278
- /* Link styles */
279
- .mdx-editor-content a,
280
- [class*="_contentEditable"] a {
281
- color: #4945ff;
282
- text-decoration: underline;
283
- }
284
-
285
- /* Horizontal rule */
286
- .mdx-editor-content hr,
287
- [class*="_contentEditable"] hr {
288
- border: none;
289
- border-top: 1px solid #dcdce4;
290
- margin: 1.5rem 0;
291
- }
292
-
293
- /* MDXEditor root wrapper */
294
- [class*="_editorRoot"] {
295
- --font-mono: "Monaco", "Menlo", "Ubuntu Mono", monospace;
296
- font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
297
- Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
298
- color: var(--baseTextContrast);
299
- background: var(--basePageBg);
300
- }
301
-
302
- /* Link dialog */
303
- [class*="_linkDialogPopoverContent"] {
304
- display: flex;
305
- flex-direction: column;
306
- gap: var(--spacing-2);
307
- padding: var(--spacing-3);
308
- background-color: var(--basePageBg);
309
- border-radius: var(--radius-medium);
310
- box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
311
- z-index: 10;
312
- }
313
-
314
- [class*="_linkDialogInputContainer"] {
315
- display: flex;
316
- flex-direction: column;
317
- gap: var(--spacing-1);
318
- }
319
-
320
- [class*="_linkDialogInputWrapper"] {
321
- display: flex;
322
- gap: var(--spacing-1);
323
- }
324
-
325
- [class*="_linkDialogInputWrapper"] input {
326
- flex: 1;
327
- padding: var(--spacing-1) var(--spacing-2);
328
- border: 1px solid var(--baseBorder);
329
- border-radius: var(--radius-base);
330
- font-size: var(--text-sm);
331
- }
332
-
333
- [class*="_linkDialogInputWrapper"] button {
334
- padding: var(--spacing-1) var(--spacing-2);
335
- background-color: var(--accentText);
336
- color: white;
337
- border: none;
338
- border-radius: var(--radius-base);
339
- cursor: pointer;
340
- font-size: var(--text-sm);
341
- }
342
-
343
- [class*="_linkDialogInputWrapper"] button:hover {
344
- opacity: 0.9;
345
- }
346
-
347
- /* Popover positioning */
348
- [data-radix-popper-content-wrapper] {
349
- z-index: 100 !important;
350
- }