@atom-learning/components 10.0.0 → 10.0.1
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/components/accordion/Accordion.js +1 -1
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js +2 -2
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/alert-dialog/Alert.d.ts +3 -0
- package/dist/components/alert-dialog/Alert.js +7 -0
- package/dist/components/alert-dialog/Alert.js.map +1 -0
- package/dist/components/alert-dialog/alert-context/AlertDialog.js +1 -1
- package/dist/components/calendar/Calendar.js +2 -2
- package/dist/components/checkbox-group/CheckboxGroup.d.ts +1 -1
- package/dist/components/data-table/DataTableBulkActionsFloating.js +1 -1
- package/dist/components/data-table/DataTableHeaderCell.js +1 -1
- package/dist/components/file-input/FileInput.js +1 -1
- package/dist/components/index.d.ts +1 -3
- package/dist/components/inline-message/InlineMessage.js +1 -1
- package/dist/components/markdown-content/MarkdownContent.js +5 -5
- package/dist/components/markdown-content/MarkdownContent.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownEmphasis.d.ts +2 -2
- package/dist/components/markdown-content/components/MarkdownEmphasis.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownHeading.d.ts +2 -2
- package/dist/components/markdown-content/components/MarkdownHeading.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownLink.d.ts +2 -2
- package/dist/components/markdown-content/components/MarkdownLink.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownList.d.ts +2 -2
- package/dist/components/markdown-content/components/MarkdownList.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownListItem.d.ts +2 -2
- package/dist/components/markdown-content/components/MarkdownListItem.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownParagraph.d.ts +2 -2
- package/dist/components/markdown-content/components/MarkdownParagraph.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownStrong.d.ts +2 -2
- package/dist/components/markdown-content/components/MarkdownStrong.js.map +1 -1
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +778 -781
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +7 -7
- package/package.json +11 -5
- package/dist/components/index.js +0 -102
- package/dist/components/index.js.map +0 -1
|
@@ -2,9 +2,9 @@ import { cn } from "../../styled.js";
|
|
|
2
2
|
import { AccordionContent } from "./AccordionContent.js";
|
|
3
3
|
import { AccordionItem } from "./AccordionItem.js";
|
|
4
4
|
import { AccordionTrigger } from "./AccordionTrigger.js";
|
|
5
|
+
import { Root } from "@radix-ui/react-accordion";
|
|
5
6
|
import "react";
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { Root } from "@radix-ui/react-accordion";
|
|
8
8
|
//#region src/components/accordion/Accordion.tsx
|
|
9
9
|
var AccordionBase = ({ ref, type = "single", className, children, ...rest }) => /* @__PURE__ */ jsx(Root, {
|
|
10
10
|
ref,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { styled } from "../../styled.js";
|
|
2
2
|
import { CSSWrapper } from "../../utilities/css-wrapper/CSSWrapper.js";
|
|
3
|
+
import { Content } from "@radix-ui/react-accordion";
|
|
3
4
|
import "react";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Content } from "@radix-ui/react-accordion";
|
|
6
6
|
//#region src/components/accordion/AccordionContent.tsx
|
|
7
7
|
var StyledContent = styled(Content, { base: [
|
|
8
8
|
"border-none",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styled } from "../../styled.js";
|
|
2
|
-
import "react";
|
|
3
2
|
import { Item } from "@radix-ui/react-accordion";
|
|
3
|
+
import "react";
|
|
4
4
|
//#region src/components/accordion/AccordionItem.tsx
|
|
5
5
|
var AccordionItem = styled(Item, { base: ["w-full", "not-last:mb-1"] }, { enablePolymorphism: false });
|
|
6
6
|
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { styled } from "../../styled.js";
|
|
2
|
-
import { Icon } from "../icon/Icon.js";
|
|
3
2
|
import { ColorScheme } from "../../experiments/color-scheme/ColorScheme.js";
|
|
3
|
+
import { Icon } from "../icon/Icon.js";
|
|
4
|
+
import { Trigger } from "@radix-ui/react-accordion";
|
|
4
5
|
import "react";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { ChevronDown } from "@atom-learning/icons";
|
|
7
|
-
import { Trigger } from "@radix-ui/react-accordion";
|
|
8
8
|
//#region src/components/accordion/AccordionTrigger.tsx
|
|
9
9
|
var RotatingIcon = styled(Icon, { base: [
|
|
10
10
|
"transition-transform",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled } from "../../styled.js";
|
|
2
|
-
import { getExternalAnchorProps } from "../../utilities/uri/index.js";
|
|
3
2
|
import { Icon } from "../icon/Icon.js";
|
|
4
3
|
import { OptionalTooltipWrapper } from "../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js";
|
|
4
|
+
import { getExternalAnchorProps } from "../../utilities/uri/index.js";
|
|
5
5
|
import { ActionIconSizeMap } from "./ActionIcon.constants.js";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.js","names":[],"sources":["../../../src/components/alert-dialog/Alert.ts"],"sourcesContent":["import { AlertProvider } from './AlertDialog.context'\n\n// The alert system's provider lives under the `Alert` name; the alert UI\n// itself is imperative (`useAlert`), so there is no root component to render.\n// This compound must live in its own module, not the components barrel — a\n// value declared in the barrel forces the root barrel's `export *` to pull the\n// whole barrel (all components) into the eager entry chunk instead of resolving\n// each export to its individual module.\nexport const Alert = { Provider: AlertProvider }\n"],"mappings":";;AAQA,IAAa,QAAQ,EAAE,UAAU,cAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { AlertDialog } from "../AlertDialog.js";
|
|
1
2
|
import { Button } from "../../button/Button.js";
|
|
2
3
|
import { Heading } from "../../heading/Heading.js";
|
|
3
4
|
import { Text } from "../../text/Text.js";
|
|
4
|
-
import { AlertDialog } from "../AlertDialog.js";
|
|
5
5
|
import { AlertDialogIcon } from "./AlertDialogIcon.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn, styled } from "../../styled.js";
|
|
2
|
-
import { Button } from "../button/Button.js";
|
|
3
|
-
import { Text } from "../text/Text.js";
|
|
4
2
|
import { Icon } from "../icon/Icon.js";
|
|
5
3
|
import { ActionIcon } from "../action-icon/ActionIcon.js";
|
|
4
|
+
import { Button } from "../button/Button.js";
|
|
5
|
+
import { Text } from "../text/Text.js";
|
|
6
6
|
import { DEFAULT_LABELS, monthNamesShort, weekdayNamesShort } from "./constants.js";
|
|
7
7
|
import { Day } from "./Day.js";
|
|
8
8
|
import * as React$1 from "react";
|
|
@@ -307,8 +307,8 @@ export declare const CheckboxGroup: (({ checked, defaultChecked, onCheckedChange
|
|
|
307
307
|
name?: string | undefined;
|
|
308
308
|
type?: "submit" | "reset" | "button" | undefined;
|
|
309
309
|
value?: string | readonly string[] | number | undefined;
|
|
310
|
-
as?: never;
|
|
311
310
|
asChild?: boolean;
|
|
311
|
+
as?: never;
|
|
312
312
|
required?: boolean;
|
|
313
313
|
onCheckedChange?: ((checked: import("@radix-ui/react-checkbox").CheckedState) => void) | undefined;
|
|
314
314
|
state?: "error" | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled } from "../../styled.js";
|
|
2
|
-
import { Text } from "../text/Text.js";
|
|
3
2
|
import { Icon } from "../icon/Icon.js";
|
|
4
3
|
import { ActionIcon } from "../action-icon/ActionIcon.js";
|
|
4
|
+
import { Text } from "../text/Text.js";
|
|
5
5
|
import { Badge } from "../badge/Badge.js";
|
|
6
6
|
import { useDataTable } from "./DataTable.context.js";
|
|
7
7
|
import { BulkActionsSelectedRowActions } from "./DataTableBulkActionsSelectedRowActions.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn, styled } from "../../styled.js";
|
|
2
|
-
import { Text } from "../text/Text.js";
|
|
3
2
|
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import { Text } from "../text/Text.js";
|
|
4
4
|
import { useDataTable } from "./DataTable.context.js";
|
|
5
5
|
import { Table } from "../table/Table.js";
|
|
6
6
|
import "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../styled.js";
|
|
2
|
-
import { Button } from "../button/Button.js";
|
|
3
2
|
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import { Button } from "../button/Button.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Upload } from "@atom-learning/icons";
|
|
@@ -3,9 +3,7 @@ export { Accordion } from './accordion/Accordion';
|
|
|
3
3
|
export { ActionIcon } from './action-icon/ActionIcon';
|
|
4
4
|
export { AlertDialog } from './alert-dialog/AlertDialog';
|
|
5
5
|
export { useAlert } from './alert-dialog/AlertDialog.context';
|
|
6
|
-
export
|
|
7
|
-
Provider: ({ children }: React.PropsWithChildren<unknown>) => import("react").JSX.Element;
|
|
8
|
-
};
|
|
6
|
+
export { Alert } from './alert-dialog/Alert';
|
|
9
7
|
export { Avatar } from './avatar/Avatar';
|
|
10
8
|
export { Badge, type BadgeProps } from './badge/Badge';
|
|
11
9
|
export { BannerRegular } from './banner/banner-regular/BannerRegular';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styled } from "../../styled.js";
|
|
2
|
-
import { Text } from "../text/Text.js";
|
|
3
2
|
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import { Text } from "../text/Text.js";
|
|
4
4
|
import { INLINE_MESSAGE_ICONS } from "./InlineMessage.config.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -13,9 +13,9 @@ import { MarkdownText } from "./components/MarkdownText.js";
|
|
|
13
13
|
import { MarkdownThematicBreak } from "./components/MarkdownThematicBreak.js";
|
|
14
14
|
import "react";
|
|
15
15
|
import { jsx } from "react/jsx-runtime";
|
|
16
|
-
import
|
|
17
|
-
import fromMarkdown from "mdast-util-from-markdown";
|
|
18
|
-
import
|
|
16
|
+
import { directiveFromMarkdown } from "mdast-util-directive";
|
|
17
|
+
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
18
|
+
import { directive } from "micromark-extension-directive";
|
|
19
19
|
//#region src/components/markdown-content/MarkdownContent.tsx
|
|
20
20
|
var StyledMarkdownContent = styled("div", { base: [
|
|
21
21
|
"flex",
|
|
@@ -51,8 +51,8 @@ var generateNodeKey = (node, index) => {
|
|
|
51
51
|
};
|
|
52
52
|
var MarkdownContent = ({ content, customComponents = {}, className }) => {
|
|
53
53
|
const AST = fromMarkdown(content, {
|
|
54
|
-
extensions: [
|
|
55
|
-
mdastExtensions: [
|
|
54
|
+
extensions: [directive()],
|
|
55
|
+
mdastExtensions: [directiveFromMarkdown()]
|
|
56
56
|
});
|
|
57
57
|
const componentsMap = {
|
|
58
58
|
...defaultComponentsMap,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownContent.js","names":[],"sources":["../../../src/components/markdown-content/MarkdownContent.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"MarkdownContent.js","names":[],"sources":["../../../src/components/markdown-content/MarkdownContent.tsx"],"sourcesContent":["import { directiveFromMarkdown } from 'mdast-util-directive'\nimport { fromMarkdown } from 'mdast-util-from-markdown'\nimport { directive } from 'micromark-extension-directive'\nimport * as React from 'react'\n\nimport { styled } from '../../styled'\nimport { MarkdownCode } from './components/MarkdownCode'\nimport { MarkdownEmphasis } from './components/MarkdownEmphasis'\nimport { MarkdownHeading } from './components/MarkdownHeading'\nimport { MarkdownImage } from './components/MarkdownImage'\nimport { MarkdownInlineCode } from './components/MarkdownInlineCode'\nimport { MarkdownLink } from './components/MarkdownLink'\nimport { MarkdownList } from './components/MarkdownList'\nimport { MarkdownListItem } from './components/MarkdownListItem'\nimport { MarkdownParagraph } from './components/MarkdownParagraph'\nimport { MarkdownStrong } from './components/MarkdownStrong'\nimport { MarkdownText } from './components/MarkdownText'\nimport { MarkdownThematicBreak } from './components/MarkdownThematicBreak'\n\ntype HandleNode = (node, index?: number) => React.JSX.Element | null\n\nconst StyledMarkdownContent = styled('div', {\n base: [\n 'flex',\n 'flex-col',\n 'gap-8',\n '[&>h1]:max-w-[65ch]',\n '[&>h2]:max-w-[65ch]',\n '[&>h3]:max-w-[65ch]',\n '[&>h4]:max-w-[65ch]',\n '[&>p]:max-w-[75ch]',\n '[&>ul]:max-w-[75ch]'\n ]\n})\n\ntype MarkdownContentProps = React.ComponentProps<\n typeof StyledMarkdownContent\n> & {\n content: string\n customComponents?: {\n [key: string]: (props: {\n node: any\n handleNode: HandleNode\n }) => React.JSX.Element\n }\n}\n\nconst defaultComponentsMap = {\n code: MarkdownCode,\n emphasis: MarkdownEmphasis,\n heading: MarkdownHeading,\n inlineCode: MarkdownInlineCode,\n image: MarkdownImage,\n link: MarkdownLink,\n list: MarkdownList,\n listItem: MarkdownListItem,\n paragraph: MarkdownParagraph,\n strong: MarkdownStrong,\n text: MarkdownText,\n thematicBreak: MarkdownThematicBreak\n}\n\nconst generateNodeKey = (node, index: number) => {\n if (node.position?.start) {\n const { line, column, offset } = node.position.start\n return `${node.type}${line}${column}${offset}`\n }\n\n // Deterministic fallback: keys must be stable across renders and identical\n // between server and client, so no timestamps or random values.\n return `${node.type}${index}`\n}\n\nexport const MarkdownContent = ({\n content,\n customComponents = {},\n className\n}: MarkdownContentProps) => {\n const AST = fromMarkdown(content, {\n extensions: [directive()],\n mdastExtensions: [directiveFromMarkdown()]\n })\n\n const componentsMap = {\n ...defaultComponentsMap,\n ...customComponents\n }\n\n const handleNode: HandleNode = (node, index = 0) => {\n const MarkdownComponent = componentsMap[node.type]\n\n return MarkdownComponent ? (\n <MarkdownComponent\n key={generateNodeKey(node, index)}\n node={node}\n handleNode={handleNode}\n />\n ) : null\n }\n\n return (\n <StyledMarkdownContent className={className}>\n {AST.children.map(handleNode)}\n </StyledMarkdownContent>\n )\n}\n\nMarkdownContent.displayName = 'MarkdownContent'\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,IAAM,wBAAwB,OAAO,OAAO,EAC1C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF,CAAC;AAcD,IAAM,uBAAuB;CAC3B,MAAM;CACN,UAAU;CACV,SAAS;CACT,YAAY;CACZ,OAAO;CACP,MAAM;CACN,MAAM;CACN,UAAU;CACV,WAAW;CACX,QAAQ;CACR,MAAM;CACN,eAAe;AACjB;AAEA,IAAM,mBAAmB,MAAM,UAAkB;CAC/C,IAAI,KAAK,UAAU,OAAO;EACxB,MAAM,EAAE,MAAM,QAAQ,WAAW,KAAK,SAAS;EAC/C,OAAO,GAAG,KAAK,OAAO,OAAO,SAAS;CACxC;CAIA,OAAO,GAAG,KAAK,OAAO;AACxB;AAEA,IAAa,mBAAmB,EAC9B,SACA,mBAAmB,CAAC,GACpB,gBAC0B;CAC1B,MAAM,MAAM,aAAa,SAAS;EAChC,YAAY,CAAC,UAAU,CAAC;EACxB,iBAAiB,CAAC,sBAAsB,CAAC;CAC3C,CAAC;CAED,MAAM,gBAAgB;EACpB,GAAG;EACH,GAAG;CACL;CAEA,MAAM,cAA0B,MAAM,QAAQ,MAAM;EAClD,MAAM,oBAAoB,cAAc,KAAK;EAE7C,OAAO,oBACL,oBAAC,mBAAD;GAEQ;GACM;EACb,GAHM,gBAAgB,MAAM,KAAK,CAGjC,IACC;CACN;CAEA,OACE,oBAAC,uBAAD;EAAkC;YAC/B,IAAI,SAAS,IAAI,UAAU;CACP,CAAA;AAE3B;AAEA,gBAAgB,cAAc"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RootContent, Emphasis } from 'mdast';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type MarkdownEmphasisProps = {
|
|
4
4
|
node: Emphasis;
|
|
5
|
-
handleNode: (node:
|
|
5
|
+
handleNode: (node: RootContent) => React.ReactElement<unknown>;
|
|
6
6
|
};
|
|
7
7
|
export declare const StyledMarkdownEmphasis: import("../../..").PolymorphicComponent<"em", unknown>;
|
|
8
8
|
export declare const MarkdownEmphasis: ({ node, handleNode }: MarkdownEmphasisProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownEmphasis.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownEmphasis.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"MarkdownEmphasis.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownEmphasis.tsx"],"sourcesContent":["import type { RootContent, Emphasis } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownEmphasisProps = {\n node: Emphasis\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const StyledMarkdownEmphasis = styled('em', {\n base: ['italic']\n})\n\nexport const MarkdownEmphasis = ({\n node,\n handleNode\n}: MarkdownEmphasisProps) => (\n <StyledMarkdownEmphasis>\n {node.children?.map(handleNode)}\n </StyledMarkdownEmphasis>\n)\n"],"mappings":";;;;AAUA,IAAa,yBAAyB,OAAO,MAAM,EACjD,MAAM,CAAC,QAAQ,EACjB,CAAC;AAED,IAAa,oBAAoB,EAC/B,MACA,iBAEA,oBAAC,wBAAD,EAAA,UACG,KAAK,UAAU,IAAI,UAAU,EACR,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RootContent, Heading as HeadingType } from 'mdast';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type MarkdownHeadingProps = {
|
|
4
4
|
node: HeadingType;
|
|
5
|
-
handleNode: (node:
|
|
5
|
+
handleNode: (node: RootContent) => React.ReactElement<unknown>;
|
|
6
6
|
};
|
|
7
7
|
export declare const MarkdownHeading: ({ node, handleNode, ...rest }: MarkdownHeadingProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownHeading.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownHeading.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"MarkdownHeading.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownHeading.tsx"],"sourcesContent":["import type { RootContent, Heading as HeadingType } from 'mdast'\nimport * as React from 'react'\n\nimport { Heading, type HeadingProps } from '../../heading/Heading'\n\ntype MarkdownHeadingProps = {\n node: HeadingType\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nconst getHeadingProps = (depth: number): HeadingProps => {\n switch (depth) {\n case 1:\n return { size: 'xl', as: 'h1' }\n case 2:\n return { size: 'lg', as: 'h2' }\n case 3:\n return { size: 'md', as: 'h3' }\n case 4:\n return { size: 'sm', as: 'h4' }\n case 5:\n return { size: 'xs', as: 'h5' }\n default:\n return { size: 'xs', as: 'h6' }\n }\n}\n\nexport const MarkdownHeading = ({\n node,\n handleNode,\n ...rest\n}: MarkdownHeadingProps) => {\n const { as, size } = getHeadingProps(node.depth)\n\n return (\n <Heading as={as} size={size} {...rest}>\n {node.children?.map(handleNode)}\n </Heading>\n )\n}\n"],"mappings":";;;;AAUA,IAAM,mBAAmB,UAAgC;CACvD,QAAQ,OAAR;EACE,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,KAAK,GACH,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;EAChC,SACE,OAAO;GAAE,MAAM;GAAM,IAAI;EAAK;CAClC;AACF;AAEA,IAAa,mBAAmB,EAC9B,MACA,YACA,GAAG,WACuB;CAC1B,MAAM,EAAE,IAAI,SAAS,gBAAgB,KAAK,KAAK;CAE/C,OACE,oBAAC,SAAD;EAAa;EAAU;EAAM,GAAI;YAC9B,KAAK,UAAU,IAAI,UAAU;CACvB,CAAA;AAEb"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RootContent, Link as LinkType } from 'mdast';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type MarkdownLinkProps = {
|
|
4
4
|
node: LinkType;
|
|
5
|
-
handleNode: (node:
|
|
5
|
+
handleNode: (node: RootContent) => React.ReactElement<unknown>;
|
|
6
6
|
};
|
|
7
7
|
export declare const MarkdownLink: ({ node, handleNode }: MarkdownLinkProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownLink.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownLink.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"MarkdownLink.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownLink.tsx"],"sourcesContent":["import type { RootContent, Link as LinkType } from 'mdast'\nimport * as React from 'react'\n\nimport { Link } from '../../link/Link'\n\ntype MarkdownLinkProps = {\n node: LinkType\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const MarkdownLink = ({ node, handleNode }: MarkdownLinkProps) => (\n <Link title={node.title ?? undefined} href={node.url}>\n {node.children?.map(handleNode)}\n </Link>\n)\n"],"mappings":";;;;AAUA,IAAa,gBAAgB,EAAE,MAAM,iBACnC,oBAAC,MAAD;CAAM,OAAO,KAAK,SAAS,KAAA;CAAW,MAAM,KAAK;WAC9C,KAAK,UAAU,IAAI,UAAU;AAC1B,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RootContent, List as ListType } from 'mdast';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type MarkdownListProps = {
|
|
4
4
|
node: ListType;
|
|
5
|
-
handleNode: (node:
|
|
5
|
+
handleNode: (node: RootContent) => React.ReactElement<unknown>;
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
8
|
export declare const MarkdownList: ({ node, handleNode, className }: MarkdownListProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownList.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownList.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"MarkdownList.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownList.tsx"],"sourcesContent":["import type { RootContent, List as ListType } from 'mdast'\nimport * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { List } from '../../list/List'\n\ntype MarkdownListProps = {\n node: ListType\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n className?: string\n}\n\nexport const MarkdownList = ({\n node,\n handleNode,\n className\n}: MarkdownListProps) => (\n <List\n ordered={node.ordered || undefined}\n className={cn(\n '[&_p]:inline',\n '[&_p]:before:hidden',\n '[&_p]:after:hidden',\n className\n )}\n >\n {node.children?.map(handleNode)}\n </List>\n)\n"],"mappings":";;;;;AAYA,IAAa,gBAAgB,EAC3B,MACA,YACA,gBAEA,oBAAC,MAAD;CACE,SAAS,KAAK,WAAW,KAAA;CACzB,WAAW,GACT,gBACA,uBACA,sBACA,SACF;WAEC,KAAK,UAAU,IAAI,UAAU;AAC1B,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RootContent, ListItem } from 'mdast';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type MarkdownListItemProps = {
|
|
4
4
|
node: ListItem;
|
|
5
|
-
handleNode: (node:
|
|
5
|
+
handleNode: (node: RootContent) => React.ReactElement<unknown>;
|
|
6
6
|
};
|
|
7
7
|
export declare const MarkdownListItem: ({ node, handleNode }: MarkdownListItemProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownListItem.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownListItem.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"MarkdownListItem.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownListItem.tsx"],"sourcesContent":["import type { RootContent, ListItem } from 'mdast'\nimport * as React from 'react'\n\nimport { List } from '../../list/List'\n\ntype MarkdownListItemProps = {\n node: ListItem\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const MarkdownListItem = ({\n node,\n handleNode\n}: MarkdownListItemProps) => (\n <List.Item>{node.children?.map(handleNode)}</List.Item>\n)\n"],"mappings":";;;;AAUA,IAAa,oBAAoB,EAC/B,MACA,iBAEA,oBAAC,KAAK,MAAN,EAAA,UAAY,KAAK,UAAU,IAAI,UAAU,EAAa,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RootContent, Paragraph } from 'mdast';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type MarkdownParagraphProps = {
|
|
4
4
|
node: Paragraph;
|
|
5
|
-
handleNode: (node:
|
|
5
|
+
handleNode: (node: RootContent) => React.ReactElement<unknown>;
|
|
6
6
|
};
|
|
7
7
|
export declare const MarkdownParagraph: ({ node, handleNode, ...rest }: MarkdownParagraphProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownParagraph.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownParagraph.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"MarkdownParagraph.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownParagraph.tsx"],"sourcesContent":["import type { RootContent, Paragraph } from 'mdast'\nimport * as React from 'react'\n\nimport { Text } from '../../text/Text'\n\ntype MarkdownParagraphProps = {\n node: Paragraph\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nexport const MarkdownParagraph = ({\n node,\n handleNode,\n ...rest\n}: MarkdownParagraphProps) => (\n <Text {...rest}>{node.children?.map(handleNode)}</Text>\n)\n"],"mappings":";;;;AAUA,IAAa,qBAAqB,EAChC,MACA,YACA,GAAG,WAEH,oBAAC,MAAD;CAAM,GAAI;WAAO,KAAK,UAAU,IAAI,UAAU;AAAQ,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RootContent, Strong } from 'mdast';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type MarkdownStrongProps = {
|
|
4
4
|
node: Strong;
|
|
5
|
-
handleNode: (node:
|
|
5
|
+
handleNode: (node: RootContent) => React.ReactElement<unknown>;
|
|
6
6
|
};
|
|
7
7
|
export declare const MarkdownStrong: ({ node, handleNode }: MarkdownStrongProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownStrong.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownStrong.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"MarkdownStrong.js","names":[],"sources":["../../../../src/components/markdown-content/components/MarkdownStrong.tsx"],"sourcesContent":["import type { RootContent, Strong } from 'mdast'\nimport * as React from 'react'\n\nimport { styled } from '../../../styled'\n\ntype MarkdownStrongProps = {\n node: Strong\n handleNode: (node: RootContent) => React.ReactElement<unknown>\n}\n\nconst StyledMarkdownStrong = styled('strong', {\n base: ['font-semibold']\n})\n\nexport const MarkdownStrong = ({ node, handleNode }: MarkdownStrongProps) => (\n <StyledMarkdownStrong>{node.children?.map(handleNode)}</StyledMarkdownStrong>\n)\n"],"mappings":";;;;AAUA,IAAM,uBAAuB,OAAO,UAAU,EAC5C,MAAM,CAAC,eAAe,EACxB,CAAC;AAED,IAAa,kBAAkB,EAAE,MAAM,iBACrC,oBAAC,sBAAD,EAAA,UAAuB,KAAK,UAAU,IAAI,UAAU,EAAwB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styled } from "../../styled.js";
|
|
2
|
-
import { Icon } from "../icon/Icon.js";
|
|
3
2
|
import { ColorScheme } from "../../experiments/color-scheme/ColorScheme.js";
|
|
3
|
+
import { Icon } from "../icon/Icon.js";
|
|
4
4
|
import { ActionIcon } from "../action-icon/ActionIcon.js";
|
|
5
5
|
import { useCallbackRefState } from "../../utilities/hooks/useCallbackRef.js";
|
|
6
6
|
import { useScrollPosition } from "../../utilities/hooks/useScrollPosition.js";
|