@intlayer/design-system 9.5.5 → 9.5.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/dist/esm/api/hooks/auth.mjs +1 -0
- package/dist/esm/api/hooks/auth.mjs.map +1 -1
- package/dist/esm/api/index.mjs +2 -2
- package/dist/esm/api/useAuth/useOAuth2.mjs +1 -1
- package/dist/esm/api/useAuth/useSession.mjs +1 -1
- package/dist/esm/api/useUser/index.mjs +1 -1
- package/dist/esm/components/Accordion/Accordion.mjs +1 -1
- package/dist/esm/components/Avatar/index.mjs +1 -1
- package/dist/esm/components/Badge/index.mjs +1 -1
- package/dist/esm/components/Breadcrumb/index.mjs +2 -2
- package/dist/esm/components/Browser/Browser.mjs +1 -1
- package/dist/esm/components/Browser/extractUrlFromSitemap.mjs +29 -24
- package/dist/esm/components/Browser/extractUrlFromSitemap.mjs.map +1 -1
- package/dist/esm/components/Browser/index.mjs +2 -1
- package/dist/esm/components/Button/Button.mjs +1 -1
- package/dist/esm/components/Carousel/index.mjs +1 -1
- package/dist/esm/components/CollapsibleTable/CollapsibleTable.mjs +2 -2
- package/dist/esm/components/Command/index.mjs +1 -1
- package/dist/esm/components/Container/index.mjs +1 -1
- package/dist/esm/components/ContentEditor/ContentEditor.mjs +1 -1
- package/dist/esm/components/ContentEditor/ContentEditorInput.mjs +1 -1
- package/dist/esm/components/ContentEditor/ContentEditorTextArea.mjs +2 -2
- package/dist/esm/components/CopyButton/index.mjs +1 -1
- package/dist/esm/components/CopyToClipboard/index.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +3 -3
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +7 -7
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +2 -2
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
- package/dist/esm/components/DictionaryFieldEditor/NodeEditor.mjs +2 -2
- package/dist/esm/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +3 -3
- package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs +2 -2
- package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +1 -1
- package/dist/esm/components/EditableField/EditableFieldLayout.mjs +1 -1
- package/dist/esm/components/Form/elements/OTPElement.mjs +1 -1
- package/dist/esm/components/HideShow/index.mjs +1 -1
- package/dist/esm/components/IDE/FileTree.mjs +1 -1
- package/dist/esm/components/IDE/MarkDownRender.mjs +1 -1
- package/dist/esm/components/IDE/shikiLanguages.mjs +1 -3
- package/dist/esm/components/IDE/shikiLanguages.mjs.map +1 -1
- package/dist/esm/components/Input/Checkbox.mjs +1 -1
- package/dist/esm/components/Input/Input.mjs +1 -1
- package/dist/esm/components/Input/InputPassword.mjs +1 -1
- package/dist/esm/components/Input/OTPInput.mjs +2 -2
- package/dist/esm/components/Input/Radio.mjs +1 -1
- package/dist/esm/components/Input/SearchInput.mjs +1 -1
- package/dist/esm/components/Link/Link.mjs +2 -2
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -2
- package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +24 -6
- package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/esm/components/MarkDownRender/MarkDownIframe.mjs +1 -1
- package/dist/esm/components/MarkdownEditor/generative/AICompletionCommands.mjs +1 -1
- package/dist/esm/components/MarkdownEditor/generative/AISelector.mjs +2 -2
- package/dist/esm/components/MarkdownEditor/generative/AISelectorCommands.mjs +1 -1
- package/dist/esm/components/MarkdownEditor/generative/GenerativeMenuSwitch.mjs +1 -1
- package/dist/esm/components/MarkdownEditor/selectors/ColorSelector.mjs +1 -1
- package/dist/esm/components/MarkdownEditor/selectors/LinkSelector.mjs +1 -1
- package/dist/esm/components/MarkdownEditor/selectors/NodeSelector.mjs +1 -1
- package/dist/esm/components/MarkdownEditor/selectors/TextButtons.mjs +1 -1
- package/dist/esm/components/MarkdownEditor/slashCommand.mjs +1 -1
- package/dist/esm/components/Modal/Modal.mjs +4 -4
- package/dist/esm/components/Navbar/MobileNavbar.mjs +1 -1
- package/dist/esm/components/Pagination/Pagination.mjs +3 -3
- package/dist/esm/components/Pattern/GridDistortionPattern.mjs +1 -1
- package/dist/esm/components/RightDrawer/RightDrawer.mjs +4 -4
- package/dist/esm/components/Select/Multiselect.mjs +1 -1
- package/dist/esm/components/Select/Select.mjs +1 -1
- package/dist/esm/components/Status/index.mjs +1 -1
- package/dist/esm/components/SwitchSelector/SwitchSelector.mjs +1 -1
- package/dist/esm/components/SwitchSelector/VerticalSwitchSelector.mjs +1 -1
- package/dist/esm/components/Tab/Tab.mjs +2 -2
- package/dist/esm/components/TabSelector/TabSelector.mjs +1 -1
- package/dist/esm/components/Table/ExpandButton.mjs +1 -1
- package/dist/esm/components/Tag/index.mjs +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs +1 -1
- package/dist/esm/components/Toaster/Toast.mjs +2 -2
- package/dist/esm/components/index.mjs +5 -4
- package/dist/esm/hooks/index.mjs +9 -9
- package/dist/esm/hooks/useRemoteMcpTools.mjs +1 -1
- package/dist/esm/hooks/useScrollDetection.mjs +1 -1
- package/dist/esm/hooks/useScrollY.mjs +1 -1
- package/dist/esm/libs/auth.mjs +7 -1
- package/dist/esm/libs/auth.mjs.map +1 -1
- package/dist/esm/providers/ReactQueryProvider.mjs +1 -1
- package/dist/esm/providers/ThemeProvider.mjs +2 -2
- package/dist/esm/providers/ThemeProvider.mjs.map +1 -1
- package/dist/esm/providers/index.mjs +1 -1
- package/dist/esm/routes.mjs +4 -2
- package/dist/esm/routes.mjs.map +1 -1
- package/dist/esm/structured-data/index.mjs +5 -5
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/webmcp/index.mjs +1 -1
- package/dist/types/api/hooks/auth.d.ts.map +1 -1
- package/dist/types/components/Browser/extractUrlFromSitemap.d.ts +15 -1
- package/dist/types/components/Browser/extractUrlFromSitemap.d.ts.map +1 -1
- package/dist/types/components/Browser/index.d.ts +2 -1
- package/dist/types/components/IDE/shikiBundle.d.ts +0 -2
- package/dist/types/components/IDE/shikiBundle.d.ts.map +1 -1
- package/dist/types/components/IDE/shikiLanguages.d.ts +1 -3
- package/dist/types/components/IDE/shikiLanguages.d.ts.map +1 -1
- package/dist/types/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +3 -0
- package/dist/types/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
- package/dist/types/components/LocaleSwitcherDropDown/index.d.ts +2 -2
- package/dist/types/components/index.d.ts +3 -2
- package/dist/types/libs/auth.d.ts +5 -0
- package/dist/types/libs/auth.d.ts.map +1 -1
- package/dist/types/providers/ThemeProvider.d.ts +7 -0
- package/dist/types/providers/ThemeProvider.d.ts.map +1 -1
- package/dist/types/routes.d.ts +3 -1
- package/dist/types/routes.d.ts.map +1 -1
- package/package.json +21 -23
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { Button } from "../Button/Button.mjs";
|
|
5
|
+
import { Check, Pencil, X } from "lucide-react";
|
|
5
6
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Check, Pencil, X } from "lucide-react";
|
|
8
8
|
|
|
9
9
|
//#region src/components/EditableField/EditableFieldLayout.tsx
|
|
10
10
|
const EditableFieldLayout = ({ value = "", onCancel, onSave, onClick, children, isDisabled, ...props }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useItemSelector } from "../../../hooks/useItemSelector.mjs";
|
|
4
3
|
import { InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "../../Input/OTPInput.mjs";
|
|
4
|
+
import { useItemSelector } from "../../../hooks/useItemSelector.mjs";
|
|
5
5
|
import { FormField, useFormField } from "../FormField.mjs";
|
|
6
6
|
import { FormItemLayout } from "../layout/FormItemLayout.mjs";
|
|
7
7
|
import { useEffect, useRef } from "react";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
+
import { Eye, EyeOff } from "lucide-react";
|
|
4
5
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Eye, EyeOff } from "lucide-react";
|
|
7
7
|
|
|
8
8
|
//#region src/components/HideShow/index.tsx
|
|
9
9
|
const insertBreaks = (str, groupSize = 6) => str.replace(new RegExp(`.{1,${groupSize}}`, "g"), "$&");
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
|
|
5
5
|
import { createFileTree } from "./createFileTree.mjs";
|
|
6
|
+
import { ChevronRight } from "lucide-react";
|
|
6
7
|
import { useState } from "react";
|
|
7
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { ChevronRight } from "lucide-react";
|
|
9
9
|
|
|
10
10
|
//#region src/components/IDE/FileTree.tsx
|
|
11
11
|
const concatFilePath = (paths) => paths.join("/");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Code } from "./Code.mjs";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import cn from "cnfast";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { MarkdownRenderer as MarkdownRenderer$1 } from "react-intlayer/markdown";
|
|
5
5
|
|
|
6
6
|
//#region src/components/IDE/MarkDownRender.tsx
|
|
@@ -33,8 +33,6 @@ const grammarAliases = {
|
|
|
33
33
|
cjs: "javascript",
|
|
34
34
|
console: "bash",
|
|
35
35
|
cts: "typescript",
|
|
36
|
-
dockerfile: "docker",
|
|
37
|
-
gql: "graphql",
|
|
38
36
|
htm: "html",
|
|
39
37
|
js: "javascript",
|
|
40
38
|
jsonc: "json5",
|
|
@@ -63,7 +61,7 @@ const PLAIN_TEXT_LANGUAGE = "plaintext";
|
|
|
63
61
|
*
|
|
64
62
|
* @example
|
|
65
63
|
* resolveCodeLanguage('ts'); // { id: 'typescript', loadGrammar: fn }
|
|
66
|
-
* resolveCodeLanguage('
|
|
64
|
+
* resolveCodeLanguage('yaml'); // { id: 'yaml', loadGrammar: fn }
|
|
67
65
|
* resolveCodeLanguage('brainfuck'); // { id: 'plaintext', loadGrammar: null }
|
|
68
66
|
*/
|
|
69
67
|
const resolveCodeLanguage = (language) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shikiLanguages.mjs","names":[],"sources":["../../../../src/components/IDE/shikiLanguages.ts"],"sourcesContent":["/**\n * Grammar registrations, as default-exported by the `shiki/langs/*` modules.\n */\nexport type LanguageGrammar =\n typeof import('shiki/langs/typescript.mjs')['default'];\n\n/**\n * Loads a single Shiki grammar (and its embedded dependencies).\n */\nexport type GrammarLoader = () => Promise<{ default: LanguageGrammar }>;\n\n/**\n * Shiki grammar loaders, keyed by the canonical Shiki language id.\n *\n * Import specifiers are written as literals (never template strings) so that\n * bundlers can statically analyse them and emit one lazily fetched chunk per\n * grammar instead of bundling every language up front.\n */\nexport const grammarLoaders = {\n astro: () => import('shiki/langs/astro.mjs'),\n bash: () => import('shiki/langs/bash.mjs'),\n css: () => import('shiki/langs/css.mjs'),\n html: () => import('shiki/langs/html.mjs'),\n javascript: () => import('shiki/langs/javascript.mjs'),\n json: () => import('shiki/langs/json.mjs'),\n json5: () => import('shiki/langs/json5.mjs'),\n jsonc: () => import('shiki/langs/jsonc.mjs'),\n markdown: () => import('shiki/langs/markdown.mjs'),\n svelte: () => import('shiki/langs/svelte.mjs'),\n tsx: () => import('shiki/langs/tsx.mjs'),\n typescript: () => import('shiki/langs/typescript.mjs'),\n vue: () => import('shiki/langs/vue.mjs'),\n xml: () => import('shiki/langs/xml.mjs'),\n yaml: () => import('shiki/langs/yaml.mjs'),\n // 'angular-html': () => import('shiki/langs/angular-html.mjs'),\n // 'angular-ts': () => import('shiki/langs/angular-ts.mjs'),\n // c: () => import('shiki/langs/c.mjs'),\n // cpp: () => import('shiki/langs/cpp.mjs'),\n // csharp: () => import('shiki/langs/csharp.mjs'),\n // csv: () => import('shiki/langs/csv.mjs'),\n // dart: () => import('shiki/langs/dart.mjs'),\n // diff: () => import('shiki/langs/diff.mjs'),\n // docker: () => import('shiki/langs/docker.mjs'),\n // go: () => import('shiki/langs/go.mjs'),\n // graphql: () => import('shiki/langs/graphql.mjs'),\n // http: () => import('shiki/langs/http.mjs'),\n // ini: () => import('shiki/langs/ini.mjs'),\n // java: () => import('shiki/langs/java.mjs'),\n // kotlin: () => import('shiki/langs/kotlin.mjs'),\n // less: () => import('shiki/langs/less.mjs'),\n // lua: () => import('shiki/langs/lua.mjs'),\n // nginx: () => import('shiki/langs/nginx.mjs'),\n // php: () => import('shiki/langs/php.mjs'),\n // powershell: () => import('shiki/langs/powershell.mjs'),\n // prisma: () => import('shiki/langs/prisma.mjs'),\n // python: () => import('shiki/langs/python.mjs'),\n // ruby: () => import('shiki/langs/ruby.mjs'),\n // rust: () => import('shiki/langs/rust.mjs'),\n // scss: () => import('shiki/langs/scss.mjs'),\n // sql: () => import('shiki/langs/sql.mjs'), // swift: () => import('shiki/langs/swift.mjs'),\n // toml: () => import('shiki/langs/toml.mjs'),\n} satisfies Record<string, GrammarLoader>;\n\n/** Canonical Shiki language ids this package can highlight. */\nexport type ShikiLanguageId = keyof typeof grammarLoaders;\n\n/** Every canonical language id that ships with a grammar loader. */\nexport const shikiLanguageIds = Object.keys(\n grammarLoaders\n) as ShikiLanguageId[];\n\n/**\n * Code fence names that are rendered by another grammar, mapped to the\n * canonical id that actually owns the grammar.\n */\nexport const grammarAliases = {\n cjs: 'javascript',\n console: 'bash',\n cts: 'typescript',\n
|
|
1
|
+
{"version":3,"file":"shikiLanguages.mjs","names":[],"sources":["../../../../src/components/IDE/shikiLanguages.ts"],"sourcesContent":["/**\n * Grammar registrations, as default-exported by the `shiki/langs/*` modules.\n */\nexport type LanguageGrammar =\n typeof import('shiki/langs/typescript.mjs')['default'];\n\n/**\n * Loads a single Shiki grammar (and its embedded dependencies).\n */\nexport type GrammarLoader = () => Promise<{ default: LanguageGrammar }>;\n\n/**\n * Shiki grammar loaders, keyed by the canonical Shiki language id.\n *\n * Import specifiers are written as literals (never template strings) so that\n * bundlers can statically analyse them and emit one lazily fetched chunk per\n * grammar instead of bundling every language up front.\n */\nexport const grammarLoaders = {\n astro: () => import('shiki/langs/astro.mjs'),\n bash: () => import('shiki/langs/bash.mjs'),\n css: () => import('shiki/langs/css.mjs'),\n html: () => import('shiki/langs/html.mjs'),\n javascript: () => import('shiki/langs/javascript.mjs'),\n json: () => import('shiki/langs/json.mjs'),\n json5: () => import('shiki/langs/json5.mjs'),\n jsonc: () => import('shiki/langs/jsonc.mjs'),\n markdown: () => import('shiki/langs/markdown.mjs'),\n svelte: () => import('shiki/langs/svelte.mjs'),\n tsx: () => import('shiki/langs/tsx.mjs'),\n typescript: () => import('shiki/langs/typescript.mjs'),\n vue: () => import('shiki/langs/vue.mjs'),\n xml: () => import('shiki/langs/xml.mjs'),\n yaml: () => import('shiki/langs/yaml.mjs'),\n // 'angular-html': () => import('shiki/langs/angular-html.mjs'),\n // 'angular-ts': () => import('shiki/langs/angular-ts.mjs'),\n // c: () => import('shiki/langs/c.mjs'),\n // cpp: () => import('shiki/langs/cpp.mjs'),\n // csharp: () => import('shiki/langs/csharp.mjs'),\n // csv: () => import('shiki/langs/csv.mjs'),\n // dart: () => import('shiki/langs/dart.mjs'),\n // diff: () => import('shiki/langs/diff.mjs'),\n // docker: () => import('shiki/langs/docker.mjs'),\n // go: () => import('shiki/langs/go.mjs'),\n // graphql: () => import('shiki/langs/graphql.mjs'),\n // http: () => import('shiki/langs/http.mjs'),\n // ini: () => import('shiki/langs/ini.mjs'),\n // java: () => import('shiki/langs/java.mjs'),\n // kotlin: () => import('shiki/langs/kotlin.mjs'),\n // less: () => import('shiki/langs/less.mjs'),\n // lua: () => import('shiki/langs/lua.mjs'),\n // nginx: () => import('shiki/langs/nginx.mjs'),\n // php: () => import('shiki/langs/php.mjs'),\n // powershell: () => import('shiki/langs/powershell.mjs'),\n // prisma: () => import('shiki/langs/prisma.mjs'),\n // python: () => import('shiki/langs/python.mjs'),\n // ruby: () => import('shiki/langs/ruby.mjs'),\n // rust: () => import('shiki/langs/rust.mjs'),\n // scss: () => import('shiki/langs/scss.mjs'),\n // sql: () => import('shiki/langs/sql.mjs'), // swift: () => import('shiki/langs/swift.mjs'),\n // toml: () => import('shiki/langs/toml.mjs'),\n} satisfies Record<string, GrammarLoader>;\n\n/** Canonical Shiki language ids this package can highlight. */\nexport type ShikiLanguageId = keyof typeof grammarLoaders;\n\n/** Every canonical language id that ships with a grammar loader. */\nexport const shikiLanguageIds = Object.keys(\n grammarLoaders\n) as ShikiLanguageId[];\n\n/**\n * Code fence names that are rendered by another grammar, mapped to the\n * canonical id that actually owns the grammar.\n */\nexport const grammarAliases = {\n cjs: 'javascript',\n console: 'bash',\n cts: 'typescript',\n htm: 'html',\n js: 'javascript',\n jsonc: 'json5',\n jsx: 'tsx',\n md: 'markdown',\n mdx: 'markdown',\n mjs: 'javascript',\n mts: 'typescript',\n postcss: 'css',\n sh: 'bash',\n shell: 'bash',\n shellscript: 'bash',\n ts: 'typescript',\n yml: 'yaml',\n zsh: 'bash',\n} satisfies Record<string, ShikiLanguageId>;\n\n/** Code fence names accepted as aliases of a canonical language id. */\nexport type ShikiLanguageAlias = keyof typeof grammarAliases;\n\n/**\n * Languages Shiki renders without any grammar. They are also used as the\n * fallback for languages this package does not ship a grammar for.\n */\nexport type PlainTextLanguage = 'plaintext' | 'text' | 'txt';\n\nconst PLAIN_TEXT_LANGUAGE = 'plaintext' satisfies PlainTextLanguage;\n\n/** Every language name accepted by the code block components. */\nexport type CodeLanguage =\n | ShikiLanguageId\n | ShikiLanguageAlias\n | PlainTextLanguage;\n\n/**\n * A language name resolved to what Shiki actually needs to highlight it.\n */\nexport type ResolvedCodeLanguage = {\n /** Canonical language id to pass to `codeToHtml` / `codeToHast`. */\n id: ShikiLanguageId | PlainTextLanguage;\n /** Grammar loader, or `null` when the language needs no grammar. */\n loadGrammar: GrammarLoader | null;\n};\n\n/**\n * Resolve a code fence language name to a canonical Shiki id and its grammar\n * loader.\n *\n * Unknown names resolve to plain text rather than to an arbitrary grammar, so\n * that `codeToHtml` never receives a language it has not loaded.\n *\n * @param language - Language name coming from a code fence or a `lang` prop.\n *\n * @example\n * resolveCodeLanguage('ts'); // { id: 'typescript', loadGrammar: fn }\n * resolveCodeLanguage('yaml'); // { id: 'yaml', loadGrammar: fn }\n * resolveCodeLanguage('brainfuck'); // { id: 'plaintext', loadGrammar: null }\n */\nexport const resolveCodeLanguage = (\n language: CodeLanguage | string | undefined | null\n): ResolvedCodeLanguage => {\n const normalizedLanguage = (language ?? '').trim().toLowerCase();\n\n const canonicalId =\n grammarAliases[normalizedLanguage as ShikiLanguageAlias] ??\n (normalizedLanguage as ShikiLanguageId);\n\n const loadGrammar = grammarLoaders[canonicalId] as GrammarLoader | undefined;\n\n if (!loadGrammar) {\n return { id: PLAIN_TEXT_LANGUAGE, loadGrammar: null };\n }\n\n return { id: canonicalId, loadGrammar };\n};\n"],"mappings":";;;;;;;;AAkBA,MAAa,iBAAiB;CAC5B,aAAa,OAAO;CACpB,YAAY,OAAO;CACnB,WAAW,OAAO;CAClB,YAAY,OAAO;CACnB,kBAAkB,OAAO;CACzB,YAAY,OAAO;CACnB,aAAa,OAAO;CACpB,aAAa,OAAO;CACpB,gBAAgB,OAAO;CACvB,cAAc,OAAO;CACrB,WAAW,OAAO;CAClB,kBAAkB,OAAO;CACzB,WAAW,OAAO;CAClB,WAAW,OAAO;CAClB,YAAY,OAAO;AA4BrB;;AAMA,MAAa,mBAAmB,OAAO,KACrC,cACF;;;;;AAMA,MAAa,iBAAiB;CAC5B,KAAK;CACL,SAAS;CACT,KAAK;CACL,KAAK;CACL,IAAI;CACJ,OAAO;CACP,KAAK;CACL,IAAI;CACJ,KAAK;CACL,KAAK;CACL,KAAK;CACL,SAAS;CACT,IAAI;CACJ,OAAO;CACP,aAAa;CACb,IAAI;CACJ,KAAK;CACL,KAAK;AACP;AAWA,MAAM,sBAAsB;;;;;;;;;;;;;;;AAgC5B,MAAa,uBACX,aACyB;CACzB,MAAM,sBAAsB,YAAY,GAAE,CAAE,KAAK,CAAC,CAAC,YAAY;CAE/D,MAAM,cACJ,eAAe,uBACd;CAEH,MAAM,cAAc,eAAe;CAEnC,IAAI,CAAC,aACH,OAAO;EAAE,IAAI;EAAqB,aAAa;CAAK;CAGtD,OAAO;EAAE,IAAI;EAAa;CAAY;AACxC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.mjs";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { cva } from "class-variance-authority";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Input/Checkbox.tsx
|
|
6
6
|
const checkboxVariants = cva([
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Input } from "./Input.mjs";
|
|
4
|
+
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
4
5
|
import { useState } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
7
7
|
|
|
8
8
|
//#region src/components/Input/InputPassword.tsx
|
|
9
9
|
const InputPassword = (props) => {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { Button } from "../Button/Button.mjs";
|
|
5
|
+
import { MinusIcon } from "lucide-react";
|
|
5
6
|
import { createContext, useContext, useEffect, useRef, useState } from "react";
|
|
6
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
|
-
import {
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/Input/OTPInput.tsx
|
|
11
11
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.mjs";
|
|
2
2
|
import { Input } from "./Input.mjs";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { Search } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Input/SearchInput.tsx
|
|
7
7
|
const SearchInput = ({ className, ...props }) => /* @__PURE__ */ jsxs("div", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.mjs";
|
|
2
|
+
import { ExternalLink, MoveRight } from "lucide-react";
|
|
2
3
|
import { isValidElement } from "react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import {
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { getLocalizedUrl } from "@intlayer/core/localization";
|
|
7
7
|
|
|
8
8
|
//#region src/components/Link/Link.tsx
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { usePersistedStore } from "../../hooks/usePersistedStore.mjs";
|
|
4
3
|
import { Button } from "../Button/Button.mjs";
|
|
5
4
|
import { Container } from "../Container/index.mjs";
|
|
6
5
|
import { DropDown } from "../DropDown/index.mjs";
|
|
7
6
|
import { Input } from "../Input/Input.mjs";
|
|
8
7
|
import { SwitchSelector } from "../SwitchSelector/SwitchSelector.mjs";
|
|
8
|
+
import { usePersistedStore } from "../../hooks/usePersistedStore.mjs";
|
|
9
9
|
import { useLocaleSwitcherContent } from "./LocaleSwitcherContentContext.mjs";
|
|
10
|
+
import { Check, Globe, MoveVertical } from "lucide-react";
|
|
10
11
|
import { useMemo, useRef, useState } from "react";
|
|
11
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
import { Check, Globe, MoveVertical } from "lucide-react";
|
|
13
13
|
import { useIntlayer, useLocale } from "react-intlayer";
|
|
14
14
|
import { getHTMLTextDir, getLocaleName } from "@intlayer/core/localization";
|
|
15
15
|
import { ENGLISH } from "@intlayer/types/locales";
|
|
@@ -1,20 +1,35 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { cn } from "../../utils/cn.mjs";
|
|
3
4
|
import { Button } from "../Button/Button.mjs";
|
|
4
5
|
import { Container } from "../Container/index.mjs";
|
|
5
6
|
import { DropDown } from "../DropDown/index.mjs";
|
|
6
7
|
import { Input } from "../Input/Input.mjs";
|
|
8
|
+
import { MoveVertical } from "lucide-react";
|
|
7
9
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
8
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { MoveVertical } from "lucide-react";
|
|
10
11
|
import { useIntlayer } from "react-intlayer";
|
|
11
12
|
import { getHTMLTextDir, getLocaleName } from "@intlayer/core/localization";
|
|
12
13
|
import { ENGLISH } from "@intlayer/types/locales";
|
|
13
14
|
import Fuse from "fuse.js";
|
|
14
15
|
|
|
15
16
|
//#region src/components/LocaleSwitcherDropDown/LocaleSwitcher.tsx
|
|
17
|
+
const sizeClassNames = {
|
|
18
|
+
sm: {
|
|
19
|
+
nav: "rounded-full border-[1.3px] border-text",
|
|
20
|
+
trigger: "min-h-0 px-1.5 py-0.5 text-xs",
|
|
21
|
+
label: "px-1",
|
|
22
|
+
icon: "size-3"
|
|
23
|
+
},
|
|
24
|
+
md: {
|
|
25
|
+
nav: "rounded-xl border border-text",
|
|
26
|
+
trigger: "",
|
|
27
|
+
label: "px-2",
|
|
28
|
+
icon: "w-5"
|
|
29
|
+
}
|
|
30
|
+
};
|
|
16
31
|
const DROPDOWN_IDENTIFIER = "locale-switcher";
|
|
17
|
-
const LocaleSwitcher = ({ locale, localeList, availableLocales, fullLocaleName = true, setLocale, panelProps }) => {
|
|
32
|
+
const LocaleSwitcher = ({ locale, localeList, availableLocales, fullLocaleName = true, setLocale, panelProps, size = "md" }) => {
|
|
18
33
|
let localeName = "Select a locale";
|
|
19
34
|
const { switchTo, searchInput, languageListLabel, localeSwitcherLabel } = useIntlayer("locale-switcher");
|
|
20
35
|
const inputRef = useRef(null);
|
|
@@ -58,19 +73,22 @@ const LocaleSwitcher = ({ locale, localeList, availableLocales, fullLocaleName =
|
|
|
58
73
|
}, [fuse, multilingualAvailableLocales]);
|
|
59
74
|
if (locale) localeName = fullLocaleName ? getLocaleName(locale) : locale.toUpperCase();
|
|
60
75
|
return /* @__PURE__ */ jsx("nav", {
|
|
61
|
-
className:
|
|
76
|
+
className: sizeClassNames[size].nav,
|
|
62
77
|
"aria-label": localeSwitcherLabel.value,
|
|
63
78
|
children: /* @__PURE__ */ jsxs(DropDown, {
|
|
64
79
|
identifier: DROPDOWN_IDENTIFIER,
|
|
65
80
|
children: [/* @__PURE__ */ jsx(DropDown.Trigger, {
|
|
66
81
|
identifier: DROPDOWN_IDENTIFIER,
|
|
67
|
-
color: "
|
|
82
|
+
color: "custom",
|
|
83
|
+
size: size === "sm" ? "custom" : "md",
|
|
84
|
+
roundedSize: size === "sm" ? "full" : "md",
|
|
85
|
+
className: cn("text-text", sizeClassNames[size].trigger),
|
|
68
86
|
children: /* @__PURE__ */ jsxs("div", {
|
|
69
87
|
className: "flex w-full items-center justify-between",
|
|
70
88
|
children: [/* @__PURE__ */ jsx("div", {
|
|
71
|
-
className: "text-nowrap
|
|
89
|
+
className: cn("text-nowrap", sizeClassNames[size].label),
|
|
72
90
|
children: localeName
|
|
73
|
-
}), /* @__PURE__ */ jsx(MoveVertical, { className: "
|
|
91
|
+
}), /* @__PURE__ */ jsx(MoveVertical, { className: cn("self-center", sizeClassNames[size].icon) })]
|
|
74
92
|
})
|
|
75
93
|
}), /* @__PURE__ */ jsx(DropDown.Panel, {
|
|
76
94
|
identifier: DROPDOWN_IDENTIFIER,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocaleSwitcher.mjs","names":[],"sources":["../../../../src/components/LocaleSwitcherDropDown/LocaleSwitcher.tsx"],"sourcesContent":["'use client';\n\nimport { getHTMLTextDir, getLocaleName } from '@intlayer/core/localization';\nimport type { Locale } from '@intlayer/types/allLocales';\nimport { ENGLISH } from '@intlayer/types/locales';\nimport Fuse, { type IFuseOptions } from 'fuse.js';\nimport { MoveVertical } from 'lucide-react';\nimport { type FC, useCallback, useMemo, useRef, useState } from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { DropDown, type PanelProps } from '../DropDown';\nimport { Input } from '../Input';\n\nexport type LocaleSwitcherProps = {\n locale?: Locale;\n localeList: Locale[];\n availableLocales?: Locale[];\n fullLocaleName?: boolean;\n setLocale: (locale: Locale) => void;\n panelProps?: Omit<PanelProps, 'identifier'>;\n};\n\nconst DROPDOWN_IDENTIFIER = 'locale-switcher';\n\ntype MultilingualAvailableLocales = {\n locale: Locale;\n englishName: string;\n currentLocaleName: string;\n ownLocaleName: string;\n};\n\nexport const LocaleSwitcher: FC<LocaleSwitcherProps> = ({\n locale,\n localeList,\n availableLocales,\n fullLocaleName = true,\n setLocale,\n panelProps,\n}) => {\n let localeName = 'Select a locale';\n const { switchTo, searchInput, languageListLabel, localeSwitcherLabel } =\n useIntlayer('locale-switcher');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const multilingualAvailableLocales: MultilingualAvailableLocales[] = useMemo(\n () =>\n localeList.map((localeEl) => {\n const englishName = getLocaleName(localeEl, ENGLISH);\n const currentLocaleName = getLocaleName(localeEl, locale);\n const ownLocaleName = getLocaleName(localeEl);\n return {\n locale: localeEl,\n englishName,\n currentLocaleName,\n ownLocaleName,\n };\n }),\n [localeList, locale]\n );\n\n const [results, setResults] = useState<MultilingualAvailableLocales[]>(\n multilingualAvailableLocales\n );\n\n // Create a new Fuse instance with the options and documentation data\n const fuse = useMemo(() => {\n const fuseOptions: IFuseOptions<MultilingualAvailableLocales> = {\n keys: [\n { name: 'ownLocaleName', weight: 0.4 },\n { name: 'englishName', weight: 0.2 },\n { name: 'currentLocaleName', weight: 0.2 },\n { name: 'locale', weight: 0.2 },\n ],\n threshold: 0.02, // Defines how fuzzy the matching should be (lower is more strict)\n };\n\n return new Fuse(multilingualAvailableLocales, fuseOptions);\n }, [multilingualAvailableLocales]);\n\n const handleSearch = useCallback(\n (searchQuery: string) => {\n if (searchQuery) {\n // Perform search on every input change\n const searchResults = fuse\n .search(searchQuery)\n .map((result) => result.item);\n setResults(searchResults);\n } else {\n setResults(multilingualAvailableLocales);\n }\n },\n [fuse, multilingualAvailableLocales]\n );\n\n if (locale) {\n localeName = fullLocaleName ? getLocaleName(locale) : locale.toUpperCase();\n }\n\n return (\n <nav\n className
|
|
1
|
+
{"version":3,"file":"LocaleSwitcher.mjs","names":[],"sources":["../../../../src/components/LocaleSwitcherDropDown/LocaleSwitcher.tsx"],"sourcesContent":["'use client';\n\nimport { getHTMLTextDir, getLocaleName } from '@intlayer/core/localization';\nimport type { Locale } from '@intlayer/types/allLocales';\nimport { ENGLISH } from '@intlayer/types/locales';\nimport { cn } from '@utils/cn';\nimport Fuse, { type IFuseOptions } from 'fuse.js';\nimport { MoveVertical } from 'lucide-react';\nimport { type FC, useCallback, useMemo, useRef, useState } from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { Container } from '../Container';\nimport { DropDown, type PanelProps } from '../DropDown';\nimport { Input } from '../Input';\n\nexport type LocaleSwitcherProps = {\n locale?: Locale;\n localeList: Locale[];\n availableLocales?: Locale[];\n fullLocaleName?: boolean;\n setLocale: (locale: Locale) => void;\n panelProps?: Omit<PanelProps, 'identifier'>;\n /** `sm` renders a compact pill, matching the `xs` `SwitchSelector`. */\n size?: LocaleSwitcherSize;\n};\n\nexport type LocaleSwitcherSize = 'sm' | 'md';\n\nconst sizeClassNames: Record<\n LocaleSwitcherSize,\n { nav: string; trigger: string; label: string; icon: string }\n> = {\n sm: {\n nav: 'rounded-full border-[1.3px] border-text',\n trigger: 'min-h-0 px-1.5 py-0.5 text-xs',\n label: 'px-1',\n icon: 'size-3',\n },\n md: {\n nav: 'rounded-xl border border-text',\n trigger: '',\n label: 'px-2',\n icon: 'w-5',\n },\n};\n\nconst DROPDOWN_IDENTIFIER = 'locale-switcher';\n\ntype MultilingualAvailableLocales = {\n locale: Locale;\n englishName: string;\n currentLocaleName: string;\n ownLocaleName: string;\n};\n\nexport const LocaleSwitcher: FC<LocaleSwitcherProps> = ({\n locale,\n localeList,\n availableLocales,\n fullLocaleName = true,\n setLocale,\n panelProps,\n size = 'md',\n}) => {\n let localeName = 'Select a locale';\n const { switchTo, searchInput, languageListLabel, localeSwitcherLabel } =\n useIntlayer('locale-switcher');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const multilingualAvailableLocales: MultilingualAvailableLocales[] = useMemo(\n () =>\n localeList.map((localeEl) => {\n const englishName = getLocaleName(localeEl, ENGLISH);\n const currentLocaleName = getLocaleName(localeEl, locale);\n const ownLocaleName = getLocaleName(localeEl);\n return {\n locale: localeEl,\n englishName,\n currentLocaleName,\n ownLocaleName,\n };\n }),\n [localeList, locale]\n );\n\n const [results, setResults] = useState<MultilingualAvailableLocales[]>(\n multilingualAvailableLocales\n );\n\n // Create a new Fuse instance with the options and documentation data\n const fuse = useMemo(() => {\n const fuseOptions: IFuseOptions<MultilingualAvailableLocales> = {\n keys: [\n { name: 'ownLocaleName', weight: 0.4 },\n { name: 'englishName', weight: 0.2 },\n { name: 'currentLocaleName', weight: 0.2 },\n { name: 'locale', weight: 0.2 },\n ],\n threshold: 0.02, // Defines how fuzzy the matching should be (lower is more strict)\n };\n\n return new Fuse(multilingualAvailableLocales, fuseOptions);\n }, [multilingualAvailableLocales]);\n\n const handleSearch = useCallback(\n (searchQuery: string) => {\n if (searchQuery) {\n // Perform search on every input change\n const searchResults = fuse\n .search(searchQuery)\n .map((result) => result.item);\n setResults(searchResults);\n } else {\n setResults(multilingualAvailableLocales);\n }\n },\n [fuse, multilingualAvailableLocales]\n );\n\n if (locale) {\n localeName = fullLocaleName ? getLocaleName(locale) : locale.toUpperCase();\n }\n\n return (\n <nav\n className={sizeClassNames[size].nav}\n aria-label={localeSwitcherLabel.value}\n >\n <DropDown identifier={DROPDOWN_IDENTIFIER}>\n <DropDown.Trigger\n identifier={DROPDOWN_IDENTIFIER}\n // `text` color paints children with `text-opposite`, unreadable on\n // the transparent `none` variant.\n color=\"custom\"\n size={size === 'sm' ? 'custom' : 'md'}\n roundedSize={size === 'sm' ? 'full' : 'md'}\n className={cn('text-text', sizeClassNames[size].trigger)}\n >\n <div className=\"flex w-full items-center justify-between\">\n <div className={cn('text-nowrap', sizeClassNames[size].label)}>\n {localeName}\n </div>\n <MoveVertical\n className={cn('self-center', sizeClassNames[size].icon)}\n />\n </div>\n </DropDown.Trigger>\n\n <DropDown.Panel\n identifier={DROPDOWN_IDENTIFIER}\n isOverable\n isFocusable\n align=\"end\"\n {...panelProps}\n >\n <Container\n className=\"max-h-[80vh] min-w-28\"\n separator=\"y\"\n role=\"listbox\"\n transparency=\"xs\"\n aria-label={languageListLabel.value}\n >\n <div className=\"p-3\">\n <Input\n type=\"search\"\n aria-label={searchInput.ariaLabel.value}\n placeholder={searchInput.placeholder.value}\n onChange={(e) => handleSearch(e.target.value)}\n ref={inputRef}\n />\n </div>\n <ol className=\"divide-y divide-dashed divide-text/20 overflow-y-auto p-1\">\n {results.map(\n ({ locale: localeItem, currentLocaleName, ownLocaleName }) => (\n <li className=\"px-1.5 py-1\" key={localeItem}>\n <Button\n onClick={() => setLocale(localeItem)}\n label={`${switchTo} ${currentLocaleName}`}\n disabled={\n !(availableLocales ?? localeList).includes(localeItem)\n }\n isActive={locale === localeItem}\n variant=\"hoverable\"\n color=\"text\"\n isFullWidth\n textAlign=\"left\"\n >\n <div className=\"flex flex-row items-center justify-between gap-3 px-2 py-1\">\n <div className=\"flex flex-col text-nowrap\">\n <span\n dir={getHTMLTextDir(localeItem)}\n lang={localeItem}\n suppressHydrationWarning\n >\n {ownLocaleName}\n </span>\n <span\n className=\"text-neutral text-xs\"\n suppressHydrationWarning\n >\n {currentLocaleName}\n </span>\n </div>\n <span className=\"text-neutral text-sm\">\n {localeItem.toUpperCase()}\n </span>\n </div>\n </Button>\n </li>\n )\n )}\n </ol>\n </Container>\n </DropDown.Panel>\n </DropDown>\n </nav>\n );\n};\n"],"mappings":"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"}
|
|
@@ -6,9 +6,9 @@ import { Link } from "../Link/Link.mjs";
|
|
|
6
6
|
import { Container } from "../Container/index.mjs";
|
|
7
7
|
import { Modal } from "../Modal/Modal.mjs";
|
|
8
8
|
import { getYoutubeEmbedUrl, getYoutubeVideoId, getYoutubeWatchUrl } from "./youtubeUrl.mjs";
|
|
9
|
+
import { MoveDiagonal } from "lucide-react";
|
|
9
10
|
import { useEffect, useRef, useState } from "react";
|
|
10
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { MoveDiagonal } from "lucide-react";
|
|
12
12
|
|
|
13
13
|
//#region src/components/MarkDownRender/MarkDownIframe.tsx
|
|
14
14
|
/**
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { Command } from "../../Command/index.mjs";
|
|
4
4
|
import { useEditor } from "../novel/components/index.mjs";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { Check, TextQuote, TrashIcon } from "lucide-react";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useIntlayer } from "react-intlayer";
|
|
8
8
|
|
|
9
9
|
//#region src/components/MarkdownEditor/generative/AICompletionCommands.tsx
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { toast } from "../../Toaster/useToast.mjs";
|
|
4
3
|
import { Loader } from "../../Loader/index.mjs";
|
|
5
4
|
import { Button } from "../../Button/Button.mjs";
|
|
6
5
|
import { Command, CommandRoot } from "../../Command/index.mjs";
|
|
7
6
|
import { MarkdownRenderer } from "../../MarkDownRender/MarkDownRender.mjs";
|
|
8
7
|
import { useEditor } from "../novel/components/index.mjs";
|
|
9
8
|
import { addAIHighlight } from "../novel/extensions/ai-highlight.mjs";
|
|
9
|
+
import { toast } from "../../Toaster/useToast.mjs";
|
|
10
10
|
import { AICompletionCommands } from "./AICompletionCommands.mjs";
|
|
11
11
|
import { AISelectorCommands } from "./AISelectorCommands.mjs";
|
|
12
12
|
import { useAICompletion } from "./useAICompletion.mjs";
|
|
13
|
+
import { ArrowUp, Sparkles } from "lucide-react";
|
|
13
14
|
import { useState } from "react";
|
|
14
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { ArrowUp, Sparkles } from "lucide-react";
|
|
16
16
|
import { useIntlayer } from "react-intlayer";
|
|
17
17
|
|
|
18
18
|
//#region src/components/MarkdownEditor/generative/AISelector.tsx
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { Command } from "../../Command/index.mjs";
|
|
4
4
|
import { useEditor } from "../novel/components/index.mjs";
|
|
5
5
|
import { getPrevText } from "../novel/utils/index.mjs";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { ArrowDownWideNarrow, CheckCheck, RefreshCcwDot, StepForward, WrapText } from "lucide-react";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useIntlayer } from "react-intlayer";
|
|
9
9
|
|
|
10
10
|
//#region src/components/MarkdownEditor/generative/AISelectorCommands.tsx
|
|
@@ -5,9 +5,9 @@ import { EditorBubble } from "../novel/components/editor-bubble.mjs";
|
|
|
5
5
|
import { useEditor } from "../novel/components/index.mjs";
|
|
6
6
|
import { removeAIHighlight } from "../novel/extensions/ai-highlight.mjs";
|
|
7
7
|
import { AISelector } from "./AISelector.mjs";
|
|
8
|
+
import { Sparkles } from "lucide-react";
|
|
8
9
|
import { Fragment, useEffect } from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import { Sparkles } from "lucide-react";
|
|
11
11
|
import { useIntlayer } from "react-intlayer";
|
|
12
12
|
|
|
13
13
|
//#region src/components/MarkdownEditor/generative/GenerativeMenuSwitch.tsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useEditor } from "../novel/components/index.mjs";
|
|
4
|
+
import { Check, ChevronDown } from "lucide-react";
|
|
4
5
|
import { useEffect, useRef, useState } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Check, ChevronDown } from "lucide-react";
|
|
7
7
|
import { useIntlayer } from "react-intlayer";
|
|
8
8
|
|
|
9
9
|
//#region src/components/MarkdownEditor/selectors/ColorSelector.tsx
|
|
@@ -4,9 +4,9 @@ import { cn } from "../../../utils/cn.mjs";
|
|
|
4
4
|
import { Button } from "../../Button/Button.mjs";
|
|
5
5
|
import { useEditor } from "../novel/components/index.mjs";
|
|
6
6
|
import { getUrlFromString } from "../novel/utils/index.mjs";
|
|
7
|
+
import { Check, Link2, Trash } from "lucide-react";
|
|
7
8
|
import { useEffect, useRef, useState } from "react";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { Check, Link2, Trash } from "lucide-react";
|
|
10
10
|
import { useIntlayer } from "react-intlayer";
|
|
11
11
|
|
|
12
12
|
//#region src/components/MarkdownEditor/selectors/LinkSelector.tsx
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../../utils/cn.mjs";
|
|
4
4
|
import { useEditor } from "../novel/components/index.mjs";
|
|
5
|
+
import { Check, CheckSquare, ChevronDown, Code, Heading1, Heading2, Heading3, ListOrdered, TextIcon, TextQuote } from "lucide-react";
|
|
5
6
|
import { useEffect, useRef, useState } from "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Check, CheckSquare, ChevronDown, Code, Heading1, Heading2, Heading3, ListOrdered, TextIcon, TextQuote } from "lucide-react";
|
|
8
8
|
import { useIntlayer } from "react-intlayer";
|
|
9
9
|
|
|
10
10
|
//#region src/components/MarkdownEditor/selectors/NodeSelector.tsx
|
|
@@ -4,8 +4,8 @@ import { cn } from "../../../utils/cn.mjs";
|
|
|
4
4
|
import { Button } from "../../Button/Button.mjs";
|
|
5
5
|
import { EditorBubbleItem } from "../novel/components/editor-bubble-item.mjs";
|
|
6
6
|
import { useEditor } from "../novel/components/index.mjs";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
7
|
import { BoldIcon, CodeIcon, ItalicIcon, StrikethroughIcon, UnderlineIcon } from "lucide-react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
import { useIntlayer } from "react-intlayer";
|
|
10
10
|
|
|
11
11
|
//#region src/components/MarkdownEditor/selectors/TextButtons.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { YoutubeLogo } from "../SocialNetworks/YoutubeLogo.mjs";
|
|
2
2
|
import { Command, createSuggestionItems, renderItems } from "./novel/extensions/slash-command.mjs";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { CheckSquare, Code, Heading1, Heading2, Heading3, ImageIcon, List, ListOrdered, Text, TextQuote } from "lucide-react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/MarkdownEditor/slashCommand.tsx
|
|
7
7
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
-
import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
|
|
5
|
-
import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
|
|
6
4
|
import { Button } from "../Button/Button.mjs";
|
|
7
5
|
import { Container } from "../Container/index.mjs";
|
|
6
|
+
import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
|
|
7
|
+
import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
|
|
8
8
|
import { H3 } from "../Headers/index.mjs";
|
|
9
|
+
import { X } from "lucide-react";
|
|
9
10
|
import { useEffect } from "react";
|
|
10
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { cva } from "class-variance-authority";
|
|
12
|
-
import {
|
|
12
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { motion } from "framer-motion";
|
|
14
14
|
import { createPortal } from "react-dom";
|
|
15
15
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
+
import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
|
|
4
5
|
import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
|
|
5
6
|
import { useScrollDetection } from "../../hooks/useScrollDetection.mjs";
|
|
6
|
-
import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
|
|
7
7
|
import { Burger } from "./Burger.mjs";
|
|
8
8
|
import { useEffect, useRef, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
-
import { useItemSelector } from "../../hooks/useItemSelector.mjs";
|
|
5
4
|
import { Button } from "../Button/Button.mjs";
|
|
5
|
+
import { useItemSelector } from "../../hooks/useItemSelector.mjs";
|
|
6
|
+
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
6
7
|
import { useEffect, useRef } from "react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { cva } from "class-variance-authority";
|
|
9
|
-
import {
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useIntlayer } from "react-intlayer";
|
|
11
11
|
|
|
12
12
|
//#region src/components/Pagination/Pagination.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useTheme } from "../../providers/ThemeProvider.mjs";
|
|
4
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
+
import { useTheme } from "../../providers/ThemeProvider.mjs";
|
|
5
5
|
import { useEffect, useRef } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
|
|
4
|
-
import { useDevice } from "../../hooks/useDevice.mjs";
|
|
5
|
-
import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
|
|
6
3
|
import { Button } from "../Button/Button.mjs";
|
|
7
4
|
import { Container } from "../Container/index.mjs";
|
|
5
|
+
import { useDevice } from "../../hooks/useDevice.mjs";
|
|
8
6
|
import { KeyboardShortcut } from "../KeyboardShortcut/KeyboardShortcut.mjs";
|
|
9
7
|
import { Popover } from "../Popover/dynamic.mjs";
|
|
8
|
+
import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
|
|
9
|
+
import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
|
|
10
10
|
import { MaxWidthSmoother } from "../MaxWidthSmoother/index.mjs";
|
|
11
11
|
import { isElementAtTopAndNotCovered } from "./isElementAtTopAndNotCovered.mjs";
|
|
12
12
|
import { useIsRightDrawerOpen, useRightDrawerActions } from "./useRightDrawer.mjs";
|
|
13
|
+
import { ChevronLeft, X } from "lucide-react";
|
|
13
14
|
import { useEffect, useRef, useState } from "react";
|
|
14
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { ChevronLeft, X } from "lucide-react";
|
|
16
16
|
import { useIntlayer } from "react-intlayer";
|
|
17
17
|
import { createPortal } from "react-dom";
|
|
18
18
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { Badge } from "../Badge/index.mjs";
|
|
5
5
|
import { Command, CommandRoot } from "../Command/index.mjs";
|
|
6
|
+
import { Check, X } from "lucide-react";
|
|
6
7
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { Check, X } from "lucide-react";
|
|
9
9
|
|
|
10
10
|
//#region src/components/Select/Multiselect.tsx
|
|
11
11
|
const MultiSelectContext = createContext(null);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon, ChevronsUpDown } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
7
7
|
|
|
8
8
|
//#region src/components/Select/Select.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useTheme } from "../../providers/ThemeProvider.mjs";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import cn from "cnfast";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Status/index.tsx
|
|
6
6
|
const Status = ({ className, ...props }) => {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { useSwitchSelector } from "./useSwitchSelector.mjs";
|
|
5
5
|
import { createElement } from "react";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { cva } from "class-variance-authority";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/components/SwitchSelector/SwitchSelector.tsx
|
|
10
10
|
const defaultChoices = [{
|
|
@@ -4,8 +4,8 @@ import { cn } from "../../utils/cn.mjs";
|
|
|
4
4
|
import { useSwitchSelector } from "./useSwitchSelector.mjs";
|
|
5
5
|
import { defaultChoices } from "./SwitchSelector.mjs";
|
|
6
6
|
import { createElement } from "react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { cva } from "class-variance-authority";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/SwitchSelector/VerticalSwitchSelector.tsx
|
|
11
11
|
const verticalSwitchSelectorVariant = cva("flex h-fit w-fit cursor-pointer flex-col gap-2 rounded-2xl border-[1.3px] p-1", {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
-
import { useHorizontalSwipe } from "../../hooks/useHorizontalSwipe.mjs";
|
|
5
4
|
import { TabSelector } from "../TabSelector/TabSelector.mjs";
|
|
5
|
+
import { useHorizontalSwipe } from "../../hooks/useHorizontalSwipe.mjs";
|
|
6
6
|
import { useTabContext } from "./TabContext.mjs";
|
|
7
7
|
import { Children, createContext, isValidElement, useState } from "react";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
|
|
11
11
|
//#region src/components/Tab/Tab.tsx
|
|
12
12
|
/**
|