@haklex/rich-editor 0.0.32 → 0.0.34

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.
Files changed (47) hide show
  1. package/README.md +256 -85
  2. package/dist/{RichEditor-CXvIPtDS.js → RichEditor-C6rSAXFC.js} +501 -11
  3. package/dist/components/RichEditor.d.ts +1 -1
  4. package/dist/components/RichEditor.d.ts.map +1 -1
  5. package/dist/components/utils.d.ts +1 -2
  6. package/dist/components/utils.d.ts.map +1 -1
  7. package/dist/context/ImageUploadContext.d.ts +8 -0
  8. package/dist/context/ImageUploadContext.d.ts.map +1 -0
  9. package/dist/editor.mjs +2 -2
  10. package/dist/index.d.ts +5 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.mjs +38 -37
  13. package/dist/nodes/ImageNode.d.ts +13 -0
  14. package/dist/nodes/ImageNode.d.ts.map +1 -1
  15. package/dist/plugins/ImageUploadPlugin.d.ts +2 -1
  16. package/dist/plugins/ImageUploadPlugin.d.ts.map +1 -1
  17. package/dist/plugins/image-upload-command.d.ts +2 -0
  18. package/dist/plugins/image-upload-command.d.ts.map +1 -0
  19. package/dist/plugins/image-upload.css.d.ts +28 -0
  20. package/dist/plugins/image-upload.css.d.ts.map +1 -0
  21. package/dist/plugins/index.d.ts +2 -1
  22. package/dist/plugins/index.d.ts.map +1 -1
  23. package/dist/rich-editor.css +1 -1
  24. package/dist/shared.css-BqX4HjVE.js +5 -0
  25. package/dist/static-entry.d.ts +4 -4
  26. package/dist/static-entry.d.ts.map +1 -1
  27. package/dist/static-entry.mjs +5 -10
  28. package/dist/styles/article.css.d.ts +0 -1
  29. package/dist/styles/article.css.d.ts.map +1 -1
  30. package/dist/styles/comment.css.d.ts +0 -1
  31. package/dist/styles/comment.css.d.ts.map +1 -1
  32. package/dist/styles/index.d.ts +4 -4
  33. package/dist/styles/index.d.ts.map +1 -1
  34. package/dist/styles/note.css.d.ts +0 -1
  35. package/dist/styles/note.css.d.ts.map +1 -1
  36. package/dist/styles/shared.css.d.ts.map +1 -1
  37. package/dist/styles-entry.d.ts +4 -4
  38. package/dist/styles-entry.d.ts.map +1 -1
  39. package/dist/styles-entry.mjs +4 -16
  40. package/dist/{theme-C_ic3l9g.js → theme-DOLFsBRg.js} +103 -45
  41. package/dist/types.d.ts +2 -0
  42. package/dist/types.d.ts.map +1 -1
  43. package/dist/utils-fpeaZV1R.js +18 -0
  44. package/package.json +4 -4
  45. package/dist/styles/vars.css.d.ts +0 -8
  46. package/dist/styles/vars.css.d.ts.map +0 -1
  47. package/dist/utils-C9cpKf8S.js +0 -28
@@ -1,26 +1,14 @@
1
- import { a, c, d, b, e, g, n } from "./utils-C9cpKf8S.js";
2
- var richContent = "r8uj4t0";
3
- var articleTheme = "_17pm0gw0";
4
- var commentTheme = "_17pm0gw1";
5
- var darkArticleTheme = "_17pm0gw2";
6
- var darkCommentTheme = "_17pm0gw3";
7
- var noteTheme = "_17pm0gw4";
8
- var darkNoteTheme = "_17pm0gw5";
9
- var vars = { color: { text: "var(--rc-text)", textSecondary: "var(--rc-text-secondary)", bg: "var(--rc-bg)", bgSecondary: "var(--rc-bg-secondary)", bgTertiary: "var(--rc-bg-tertiary)", border: "var(--rc-border)", accent: "var(--rc-accent)", accentLight: "var(--rc-accent-light)", link: "var(--rc-link)", codeText: "var(--rc-code-text)", codeBg: "var(--rc-code-bg)", hrBorder: "var(--rc-hr-border)", quoteBorder: "var(--rc-quote-border)", quoteBg: "var(--rc-quote-bg)", alertInfo: "var(--rc-alert-info)", alertWarning: "var(--rc-alert-warning)", alertTip: "var(--rc-alert-tip)", alertCaution: "var(--rc-alert-caution)", alertImportant: "var(--rc-alert-important)" }, spacing: { xs: "var(--rc-space-xs)", sm: "var(--rc-space-sm)", md: "var(--rc-space-md)", lg: "var(--rc-space-lg)", xl: "var(--rc-space-xl)" }, typography: { fontFamily: "var(--rc-font-family)", fontFamilySans: "var(--rc-font-family-sans)", fontFamilySerif: "var(--rc-font-family-serif)", fontMono: "var(--rc-font-mono)", fontSize2xs: "var(--rc-font-size-2xs)", fontSizeXs: "var(--rc-font-size-xs)", fontSizeSm: "var(--rc-font-size-sm)", fontSizeMd: "var(--rc-font-size-md)", fontSizeLg: "var(--rc-font-size-lg)", fontSizeBase: "var(--rc-font-size-base)", fontSizeSmall: "var(--rc-font-size-small)", lineHeight: "var(--rc-line-height)", lineHeightTight: "var(--rc-line-height-tight)" }, borderRadius: { sm: "var(--rc-radius-sm)", md: "var(--rc-radius-md)", lg: "var(--rc-radius-lg)" }, layout: { maxWidth: "var(--rc-max-width)" } };
1
+ import { a, c, g, n } from "./utils-fpeaZV1R.js";
2
+ import { r } from "./shared.css-BqX4HjVE.js";
3
+ import { articleTheme, commentTheme, noteTheme, vars } from "@haklex/rich-style-token";
10
4
  export {
11
5
  articleTheme,
12
6
  a as articleVariant,
13
7
  commentTheme,
14
8
  c as commentVariant,
15
- darkArticleTheme,
16
- d as darkArticleVariant,
17
- darkCommentTheme,
18
- b as darkCommentVariant,
19
- darkNoteTheme,
20
- e as darkNoteVariant,
21
9
  g as getVariantClass,
22
10
  noteTheme,
23
11
  n as noteVariant,
24
- richContent,
12
+ r as richContent,
25
13
  vars
26
14
  };
@@ -7,7 +7,7 @@ import { LinkNode, AutoLinkNode } from "@lexical/link";
7
7
  import { ListNode, ListItemNode } from "@lexical/list";
8
8
  import { HeadingNode, QuoteNode } from "@lexical/rich-text";
9
9
  import { TableNode, TableCellNode, TableRowNode } from "@lexical/table";
10
- import { DecoratorNode, $insertNodes, ElementNode, $getNodeByKey } from "lexical";
10
+ import { DecoratorNode, $insertNodes, ElementNode, createCommand, $getNodeByKey } from "lexical";
11
11
  import { createContext, use, useMemo, createElement, useState, useRef, useEffect, useCallback } from "react";
12
12
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
13
13
  import { OctagonAlert, TriangleAlert, MessageSquareWarning, Lightbulb, Info, Code, ChevronRight, ImageIcon, Sigma, Link, Workflow, Video } from "lucide-react";
@@ -1286,6 +1286,9 @@ function ImageRenderer({
1286
1286
  )
1287
1287
  ] });
1288
1288
  }
1289
+ const OPEN_IMAGE_UPLOAD_DIALOG_COMMAND = createCommand(
1290
+ "OPEN_IMAGE_UPLOAD_DIALOG_COMMAND"
1291
+ );
1289
1292
  function sanitizeImageSrc(src) {
1290
1293
  const trimmed = src.trim();
1291
1294
  if (/^(javascript\s*:|vbscript\s*:|data\s*:(?!image\/))/i.test(trimmed)) {
@@ -1372,6 +1375,52 @@ const _ImageNode = class _ImageNode extends DecoratorNode {
1372
1375
  version: 1
1373
1376
  };
1374
1377
  }
1378
+ setSrc(src) {
1379
+ const writable = this.getWritable();
1380
+ writable.__src = sanitizeImageSrc(src);
1381
+ }
1382
+ setAltText(altText) {
1383
+ const writable = this.getWritable();
1384
+ writable.__altText = altText;
1385
+ }
1386
+ setCaption(caption) {
1387
+ const writable = this.getWritable();
1388
+ writable.__caption = caption;
1389
+ }
1390
+ setDimensions(width, height) {
1391
+ const writable = this.getWritable();
1392
+ writable.__width = width;
1393
+ writable.__height = height;
1394
+ }
1395
+ setThumbhash(thumbhash) {
1396
+ const writable = this.getWritable();
1397
+ writable.__thumbhash = thumbhash;
1398
+ }
1399
+ setAccent(accent) {
1400
+ const writable = this.getWritable();
1401
+ writable.__accent = sanitizeColor(accent);
1402
+ }
1403
+ getSrc() {
1404
+ return this.__src;
1405
+ }
1406
+ getAltText() {
1407
+ return this.__altText;
1408
+ }
1409
+ getCaption() {
1410
+ return this.__caption;
1411
+ }
1412
+ getWidth() {
1413
+ return this.__width;
1414
+ }
1415
+ getHeight() {
1416
+ return this.__height;
1417
+ }
1418
+ getThumbhash() {
1419
+ return this.__thumbhash;
1420
+ }
1421
+ getAccent() {
1422
+ return this.__accent;
1423
+ }
1375
1424
  decorate(_editor, _config) {
1376
1425
  return createRendererDecoration("Image", ImageRenderer, {
1377
1426
  src: this.__src,
@@ -1392,6 +1441,10 @@ __publicField(_ImageNode, "slashMenuItems", [
1392
1441
  keywords: ["image", "picture", "photo"],
1393
1442
  section: "MEDIA",
1394
1443
  onSelect: (editor) => {
1444
+ const opened = editor.dispatchCommand(
1445
+ OPEN_IMAGE_UPLOAD_DIALOG_COMMAND
1446
+ );
1447
+ if (opened) return;
1395
1448
  editor.update(() => {
1396
1449
  $insertNodes([$createImageNode({ src: "", altText: "" })]);
1397
1450
  });
@@ -1402,6 +1455,9 @@ let ImageNode = _ImageNode;
1402
1455
  function $createImageNode(payload) {
1403
1456
  return new ImageNode(payload);
1404
1457
  }
1458
+ function $isImageNode(node) {
1459
+ return node instanceof ImageNode;
1460
+ }
1405
1461
  let katexModule = null;
1406
1462
  let katexLoadPromise = null;
1407
1463
  function loadKaTeX() {
@@ -2144,46 +2200,48 @@ const editorTheme = {
2144
2200
  export {
2145
2201
  $createFootnoteSectionNode as $,
2146
2202
  ALERT_LABELS as A,
2147
- BANNER_LABELS as B,
2203
+ ALERT_TYPES as B,
2148
2204
  ColorSchemeProvider as C,
2149
- FootnoteSectionNode as D,
2150
- FootnoteStaticRenderer as E,
2205
+ BANNER_LABELS as D,
2206
+ BANNER_TYPES as E,
2151
2207
  FootnoteDefinitionsProvider as F,
2152
- GridContainerNode as G,
2153
- KaTeXInlineNode as H,
2154
- KaTeXRenderer as I,
2155
- LinkCardRenderer as J,
2208
+ FootnoteSectionNode as G,
2209
+ FootnoteStaticRenderer as H,
2210
+ GridContainerNode as I,
2211
+ ImageNode as J,
2156
2212
  KaTeXBlockNode as K,
2157
- LinkCardNode as L,
2158
- MermaidNode as M,
2213
+ KaTeXInlineNode as L,
2214
+ KaTeXRenderer as M,
2159
2215
  NestedContentRendererProvider as N,
2160
- computeImageMeta as O,
2161
- decodeThumbHash as P,
2162
- $isAlertQuoteNode as Q,
2216
+ LinkCardNode as O,
2217
+ LinkCardRenderer as P,
2218
+ MermaidNode as Q,
2163
2219
  RendererConfigProvider as R,
2164
- AlertRenderer as S,
2165
- SpoilerNode as T,
2166
- MentionNode as U,
2167
- FootnoteNode as V,
2168
- AlertQuoteNode as W,
2169
- $isBannerNode as X,
2170
- BannerRenderer as Y,
2171
- BannerNode as Z,
2172
- normalizeBannerType as _,
2220
+ OPEN_IMAGE_UPLOAD_DIALOG_COMMAND as S,
2221
+ computeImageMeta as T,
2222
+ decodeThumbHash as U,
2223
+ $isAlertQuoteNode as V,
2224
+ AlertRenderer as W,
2225
+ SpoilerNode as X,
2226
+ MentionNode as Y,
2227
+ FootnoteNode as Z,
2228
+ AlertQuoteNode as _,
2173
2229
  allNodes as a,
2174
- $isCodeBlockNode as a0,
2175
- CodeBlockRenderer as a1,
2176
- CodeBlockNode as a2,
2177
- ImageNode as a3,
2178
- VideoNode as a4,
2179
- DetailsNode as a5,
2180
- $createImageNode as a6,
2181
- $createKaTeXInlineNode as a7,
2182
- $createKaTeXBlockNode as a8,
2183
- $createDetailsNode as a9,
2184
- $createFootnoteNode as aa,
2185
- $createMentionNode as ab,
2186
- $createSpoilerNode as ac,
2230
+ $isBannerNode as a0,
2231
+ BannerRenderer as a1,
2232
+ BannerNode as a2,
2233
+ normalizeBannerType as a3,
2234
+ $isCodeBlockNode as a4,
2235
+ CodeBlockRenderer as a5,
2236
+ CodeBlockNode as a6,
2237
+ VideoNode as a7,
2238
+ DetailsNode as a8,
2239
+ $createKaTeXInlineNode as a9,
2240
+ $createKaTeXBlockNode as aa,
2241
+ $createDetailsNode as ab,
2242
+ $createFootnoteNode as ac,
2243
+ $createMentionNode as ad,
2244
+ $createSpoilerNode as ae,
2187
2245
  builtinNodes as b,
2188
2246
  customNodes as c,
2189
2247
  RendererWrapper as d,
@@ -2198,15 +2256,15 @@ export {
2198
2256
  useRendererMode as m,
2199
2257
  useVariant as n,
2200
2258
  $createGridContainerNode as o,
2201
- $createLinkCardNode as p,
2202
- $createMermaidNode as q,
2203
- $isFootnoteSectionNode as r,
2204
- $isGridContainerNode as s,
2205
- $isKaTeXBlockNode as t,
2259
+ $createImageNode as p,
2260
+ $createLinkCardNode as q,
2261
+ $createMermaidNode as r,
2262
+ $isFootnoteSectionNode as s,
2263
+ $isGridContainerNode as t,
2206
2264
  useColorScheme as u,
2207
- $isKaTeXInlineNode as v,
2208
- $isLinkCardNode as w,
2209
- $isMermaidNode as x,
2210
- ALERT_TYPES as y,
2211
- BANNER_TYPES as z
2265
+ $isImageNode as v,
2266
+ $isKaTeXBlockNode as w,
2267
+ $isKaTeXInlineNode as x,
2268
+ $isLinkCardNode as y,
2269
+ $isMermaidNode as z
2212
2270
  };
package/dist/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Klass, LexicalEditor, LexicalNode, SerializedEditorState } from 'lexical';
2
2
  import { ReactNode } from 'react';
3
3
  import { ColorScheme } from './context/ColorSchemeContext';
4
+ import { ImageUploadFn } from './plugins/ImageUploadPlugin';
4
5
  import { RendererConfig } from './types/renderer-config';
5
6
  export type RichEditorVariant = 'article' | 'comment' | 'note';
6
7
  export interface RichEditorProps {
@@ -18,6 +19,7 @@ export interface RichEditorProps {
18
19
  onEditorReady?: (editor: LexicalEditor | null) => void;
19
20
  extraNodes?: Array<Klass<LexicalNode>>;
20
21
  rendererConfig?: RendererConfig;
22
+ imageUpload?: ImageUploadFn;
21
23
  debounceMs?: number;
22
24
  children?: ReactNode;
23
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,WAAW,EACX,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE7D,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;AAE9D,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAA;IACjD,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAC3B,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAA;IACtD,UAAU,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAA;IACtC,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,WAAW,EACX,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE7D,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;AAE9D,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAA;IACjD,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAC3B,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAA;IACtD,UAAU,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAA;IACtC,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,WAAW,CAAC,EAAE,aAAa,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB"}
@@ -0,0 +1,18 @@
1
+ var articleVariant = "v10dui1 r8uj4t0 _13h71jk0 v10dui0";
2
+ var commentVariant = "_14ko36c1 r8uj4t0 _13h71jk2 _14ko36c0";
3
+ var noteVariant = "ys4fw91 r8uj4t0 _13h71jk1 ys4fw90";
4
+ function clsx(...args) {
5
+ return args.filter(Boolean).join(" ");
6
+ }
7
+ function getVariantClass(variant) {
8
+ if (variant === "comment") return commentVariant;
9
+ if (variant === "note") return noteVariant;
10
+ return articleVariant;
11
+ }
12
+ export {
13
+ articleVariant as a,
14
+ clsx as b,
15
+ commentVariant as c,
16
+ getVariantClass as g,
17
+ noteVariant as n
18
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-editor",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "Core rich text editor based on Lexical",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,9 +29,9 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "thumbhash": "^0.1.1",
32
- "@haklex/rich-editor-ui": "0.0.32",
33
- "@haklex/rich-headless": "0.0.32",
34
- "@haklex/rich-style-token": "0.0.32"
32
+ "@haklex/rich-style-token": "0.0.34",
33
+ "@haklex/rich-editor-ui": "0.0.34",
34
+ "@haklex/rich-headless": "0.0.34"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@base-ui/react": "^1.2.0",
@@ -1,8 +0,0 @@
1
- export declare const articleTheme: string;
2
- export declare const commentTheme: string;
3
- export declare const darkArticleTheme: string;
4
- export declare const darkCommentTheme: string;
5
- export declare const noteTheme: string;
6
- export declare const darkNoteTheme: string;
7
- export { vars } from '@haklex/rich-style-token';
8
- //# sourceMappingURL=vars.css.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vars.css.d.ts","sourceRoot":"","sources":["../../src/styles/vars.css.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,YAAY,QAGvB,CAAA;AAEF,eAAO,MAAM,YAAY,QAGvB,CAAA;AAEF,eAAO,MAAM,gBAAgB,QAG3B,CAAA;AAEF,eAAO,MAAM,gBAAgB,QAG3B,CAAA;AAEF,eAAO,MAAM,SAAS,QAGpB,CAAA;AAEF,eAAO,MAAM,aAAa,QAGxB,CAAA;AAGF,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA"}
@@ -1,28 +0,0 @@
1
- var articleVariant = "v10dui1 r8uj4t0 _17pm0gw0 v10dui0";
2
- var darkArticleVariant = "v10dui2 r8uj4t0 _17pm0gw2 v10dui0";
3
- var commentVariant = "_14ko36c1 r8uj4t0 _17pm0gw1 _14ko36c0";
4
- var darkCommentVariant = "_14ko36c2 r8uj4t0 _17pm0gw3 _14ko36c0";
5
- var noteVariant = "ys4fw91 r8uj4t0 _17pm0gw4 ys4fw90";
6
- var darkNoteVariant = "ys4fw92 r8uj4t0 _17pm0gw5 ys4fw90";
7
- function clsx(...args) {
8
- return args.filter(Boolean).join(" ");
9
- }
10
- function getVariantClass(variant, colorScheme) {
11
- if (variant === "comment") {
12
- return colorScheme === "dark" ? darkCommentVariant : commentVariant;
13
- }
14
- if (variant === "note") {
15
- return colorScheme === "dark" ? darkNoteVariant : noteVariant;
16
- }
17
- return colorScheme === "dark" ? darkArticleVariant : articleVariant;
18
- }
19
- export {
20
- articleVariant as a,
21
- darkCommentVariant as b,
22
- commentVariant as c,
23
- darkArticleVariant as d,
24
- darkNoteVariant as e,
25
- clsx as f,
26
- getVariantClass as g,
27
- noteVariant as n
28
- };