From 482882574c84f645f75131b7add1945c454d1255 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Thu, 5 Sep 2024 12:00:24 +0530 Subject: [PATCH 01/17] chore: some work --- package.json | 18 +++++++++++++----- src/hooks/useMarkdown.ts | 13 +++++++------ src/index.ts | 4 ++-- src/lib/Markdown.tsx | 4 ++-- src/lib/Parser.tsx | 31 ++++++++++++++++++------------- src/lib/Renderer.tsx | 2 +- src/lib/types.ts | 36 ++---------------------------------- yarn.lock | 18 +++++++++--------- 8 files changed, 54 insertions(+), 72 deletions(-) diff --git a/package.json b/package.json index 09f922d1..7b5ba16e 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,11 @@ "test:updateSnapshot": "jest --updateSnapshot", "reassure": "reassure" }, - "keywords": ["react-native", "markdown", "react-native markdown"], + "keywords": [ + "react-native", + "markdown", + "react-native markdown" + ], "repository": "https://github.com/gmsgowtham/react-native-marked", "author": "Gowtham G (https://github.com/gmsgowtham)", "license": "MIT", @@ -57,7 +61,6 @@ "@testing-library/jest-native": "5.4.3", "@testing-library/react-native": "12.6.1", "@types/jest": "29.5.12", - "@types/marked": "5.0.0", "@types/node": "20.16.5", "@types/react": "18.3.5", "@types/react-native": "0.72.6", @@ -91,13 +94,17 @@ "/examples/*/node_modules", "/dist/" ], - "setupFilesAfterEnv": ["@testing-library/jest-native/extend-expect"], + "setupFilesAfterEnv": [ + "@testing-library/jest-native/extend-expect" + ], "transformIgnorePatterns": [ "node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|react-native-table-component)" ] }, "commitlint": { - "extends": ["@commitlint/config-conventional"], + "extends": [ + "@commitlint/config-conventional" + ], "rules": { "type-enum": [ 2, @@ -156,8 +163,9 @@ "dependencies": { "@jsamr/counter-style": "2.0.2", "@jsamr/react-native-li": "2.3.1", + "github-slugger": "2.0.0", "html-entities": "2.5.2", - "marked": "5.0.5", + "marked": "14.1.1", "react-native-svg": "13.14.1", "react-native-table-component": "1.2.2", "svg-parser": "2.0.4" diff --git a/src/hooks/useMarkdown.ts b/src/hooks/useMarkdown.ts index 9ea3aa00..7e4939f4 100644 --- a/src/hooks/useMarkdown.ts +++ b/src/hooks/useMarkdown.ts @@ -1,11 +1,11 @@ import { useMemo, type ReactNode } from "react"; -import { type Tokenizer, marked } from "marked"; +import { lexer } from "marked"; import type { MarkedStyles, UserTheme } from "./../theme/types"; import Parser from "../lib/Parser"; import Renderer from "../lib/Renderer"; import getStyles from "./../theme/styles"; import type { ColorSchemeName } from "react-native"; -import type { CustomToken, RendererInterface } from "../lib/types"; +import type { RendererInterface } from "../lib/types"; export interface useMarkdownHookOptions { colorScheme?: ColorSchemeName; @@ -13,7 +13,7 @@ export interface useMarkdownHookOptions { theme?: UserTheme; styles?: MarkedStyles; baseUrl?: string; - tokenizer?: Tokenizer; + // tokenizer?: Tokenizer; } const useMarkdown = ( @@ -36,12 +36,13 @@ const useMarkdown = ( ); const elements = useMemo(() => { - const tokens = marked.lexer(value, { + const tokens = lexer(value, { gfm: true, - tokenizer: options?.tokenizer as Tokenizer, + // tokenizer: options?.tokenizer as Tokenizer, }); return parser.parse(tokens); - }, [value, parser, options?.tokenizer]); + }, [value, parser]); + // }, [value, parser, options?.tokenizer]); return elements; }; diff --git a/src/index.ts b/src/index.ts index 21909fd2..f8080d57 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,7 +6,7 @@ import type { MarkdownProps, ParserOptions, RendererInterface, - CustomToken, + // CustomToken, } from "./lib/types"; const MarkedLexer = marked.lexer; @@ -16,7 +16,7 @@ export type { ParserOptions, RendererInterface, useMarkdownHookOptions, - CustomToken, + // CustomToken, }; export { Renderer, useMarkdown, Tokenizer as MarkedTokenizer, MarkedLexer }; diff --git a/src/lib/Markdown.tsx b/src/lib/Markdown.tsx index 583130dc..d0dbb578 100644 --- a/src/lib/Markdown.tsx +++ b/src/lib/Markdown.tsx @@ -15,7 +15,7 @@ const Markdown = ({ baseUrl, renderer, styles, - tokenizer, + // tokenizer, }: MarkdownProps) => { const colorScheme = useColorScheme(); @@ -25,7 +25,7 @@ const Markdown = ({ renderer, colorScheme, styles, - tokenizer, + // tokenizer, }); const renderItem = useCallback(({ item }: { item: ReactNode }) => { diff --git a/src/lib/Parser.tsx b/src/lib/Parser.tsx index 9ebd2896..0ec66e33 100644 --- a/src/lib/Parser.tsx +++ b/src/lib/Parser.tsx @@ -1,9 +1,9 @@ import type { ReactNode } from "react"; import type { TextStyle, ViewStyle, ImageStyle } from "react-native"; -import type { marked } from "marked"; +import type { Token, Tokens } from "marked"; import { decode } from "html-entities"; import type { MarkedStyles } from "../theme/types"; -import type { RendererInterface, ParserOptions, Token } from "./types"; +import type { RendererInterface, ParserOptions } from "./types"; import { getValidURL } from "./../utils/url"; import { getTableColAlignmentStyle } from "./../utils/table"; @@ -27,11 +27,16 @@ class Parser { }; } - parse(tokens: Token[]) { + parse(tokens?: Token[]) { return this._parse(tokens); } - private _parse(tokens: Token[], styles?: ViewStyle | TextStyle | ImageStyle) { + private _parse( + tokens?: Token[], + styles?: ViewStyle | TextStyle | ImageStyle, + ): ReactNode[] { + if (!tokens) return []; + const elements: ReactNode[] = tokens.map((token) => { return this._parseToken(token, styles); }); @@ -45,7 +50,7 @@ class Parser { switch (token.type) { case "paragraph": { const children = this.getNormalizedSiblingNodesForBlockAndInlineTokens( - token.tokens, + token.tokens ?? [], this.styles.text, ); @@ -81,11 +86,11 @@ class Parser { if (Number.isNaN(startIndex)) { startIndex = 1; } - const li = token.items.map((item) => { + const li = (token as Tokens.List).items.map((item) => { const children = item.tokens.flatMap((cItem) => { if (cItem.type === "text") { /* getViewNode since tokens could contain a block like elements (i.e. img) */ - const childTokens = (cItem as marked.Tokens.Text).tokens || []; + const childTokens = (cItem as Tokens.Text).tokens || []; const listChildren = this.getNormalizedSiblingNodesForBlockAndInlineTokens( childTokens, @@ -118,7 +123,7 @@ class Parser { } case "link": { // Don't render anchors without text and children - if (token.text.trim.length < 1 && token.tokens.length < 1) { + if (token.text.trim.length < 1 || !token.tokens) { return null; } @@ -207,13 +212,13 @@ class Parser { }); } case "table": { - const header = token.header.map((row, i) => + const header = (token as Tokens.Table).header.map((row, i) => this._parse(row.tokens, { ...getTableColAlignmentStyle(token.align[i]), }), ); - const rows = token.rows.map((cols) => + const rows = (token as Tokens.Table).rows.map((cols) => cols.map((col, i) => this._parse(col.tokens, { ...getTableColAlignmentStyle(token.align[i]), @@ -272,14 +277,14 @@ class Parser { // Render the current block token if (t.type === "image") { siblingNodes.push(this._parseToken(t)); - } else if (t.type === "link") { - const imageToken = t.tokens[0] as marked.Tokens.Image; + } else if (t.type === "link" && t.tokens && t.tokens[0]) { + const imageToken = t.tokens[0] as Tokens.Image; const href = getValidURL(this.baseUrl, t.href); siblingNodes.push( this.renderer.linkImage( href, imageToken.href, - imageToken.text || imageToken.title, + imageToken.text ?? imageToken.title ?? "", this.styles.image, ), ); diff --git a/src/lib/Renderer.tsx b/src/lib/Renderer.tsx index ce5a510c..c4be4848 100644 --- a/src/lib/Renderer.tsx +++ b/src/lib/Renderer.tsx @@ -12,7 +12,7 @@ import { import MarkedList from "@jsamr/react-native-li"; import Disc from "@jsamr/counter-style/presets/disc"; import Decimal from "@jsamr/counter-style/presets/decimal"; -import { Slugger } from "marked"; +import Slugger from "github-slugger"; import { Table, Cell, TableWrapper } from "react-native-table-component"; import MDImage from "./../components/MDImage"; import { onLinkPress } from "../utils/handlers"; diff --git a/src/lib/types.ts b/src/lib/types.ts index c7bcfb55..025c3533 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -6,7 +6,7 @@ import type { ImageStyle, } from "react-native"; import type { MarkedStyles, UserTheme } from "./../theme/types"; -import type { Tokenizer as MarkedTokenizer, marked } from "marked"; +// import type { Tokenizer as MarkedTokenizer } from "marked"; export interface ParserOptions { styles?: MarkedStyles; @@ -21,7 +21,7 @@ export interface MarkdownProps extends Partial { "data" | "renderItem" | "horizontal" >; theme?: UserTheme; - tokenizer?: MarkedTokenizer; + // tokenizer?: MarkedTokenizer; } export type TableColAlignment = "center" | "left" | "right" | null; @@ -83,35 +83,3 @@ export interface RendererInterface { args?: Record, ): ReactNode; } - -export interface CustomToken { - type: "custom"; - identifier: string; - raw: string; - tokens?: Token[]; - args?: Record; -} - -export type Token = - | marked.Tokens.Space - | marked.Tokens.Code - | marked.Tokens.Heading - | marked.Tokens.Table - | marked.Tokens.Hr - | marked.Tokens.Blockquote - | marked.Tokens.List - | marked.Tokens.ListItem - | marked.Tokens.Paragraph - | marked.Tokens.HTML - | marked.Tokens.Text - | marked.Tokens.Def - | marked.Tokens.Escape - | marked.Tokens.Tag - | marked.Tokens.Image - | marked.Tokens.Link - | marked.Tokens.Strong - | marked.Tokens.Em - | marked.Tokens.Codespan - | marked.Tokens.Br - | marked.Tokens.Del - | CustomToken; diff --git a/yarn.lock b/yarn.lock index 1cebe09b..c7a6f071 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3939,11 +3939,6 @@ "@types/tough-cookie" "*" parse5 "^7.0.0" -"@types/marked@5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-5.0.0.tgz#3235b9133054e6586eedabfb77aa7d4a4bafbfcf" - integrity sha512-YcZe50jhltsCq7rc9MNZC/4QB/OnA2Pd6hrOSTOFajtabN+38slqgDDCeE/0F83SjkKBQcsZUj7VLWR0H5cKRA== - "@types/node@*": version "18.8.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.8.2.tgz#17d42c6322d917764dd3d2d3a10d7884925de067" @@ -6239,6 +6234,11 @@ git-url-parse@14.0.0: dependencies: git-up "^7.0.0" +github-slugger@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-2.0.0.tgz#52cf2f9279a21eb6c59dd385b410f0c0adda8f1a" + integrity sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw== + glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -8118,10 +8118,10 @@ markdown-table@^2.0.0: dependencies: repeat-string "^1.0.0" -marked@5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/marked/-/marked-5.0.5.tgz#1c7bd284d7d29d7d75d6241b26e5d5bf3b558a12" - integrity sha512-auTmKJTBwZM/GLVFOhmkY7pL8v/0DxiDaXRC2kEyajcNJ0XXn9NphLD0106dbWrbPwcyD4Y0Dus16OkCzUMkfg== +marked@14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/marked/-/marked-14.1.1.tgz#83a8da67de6b236420e9cfb30e6f774cfb40255f" + integrity sha512-eS59oxof5eBVDCKTs+mJbvB/6Vq137GbimF9wkTIlto2/B2ppY5nigUUQgKVmA3bI2mPTIshUyDj5j612ZxlQQ== marky@^1.2.2: version "1.2.5" From 2f291ecf947e50fbff56f678a42064de5f203390 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 12:23:55 +0530 Subject: [PATCH 02/17] fix: tsc issues --- package.json | 14 +- src/components/MDImage.d.ts | 10 + src/components/MDImage.js | 58 ++ src/components/MDSvg.d.ts | 7 + src/components/MDSvg.js | 78 +++ src/hooks/useMarkdown.d.ts | 18 + src/hooks/useMarkdown.js | 29 + src/hooks/useMarkdown.ts | 9 +- src/index.d.ts | 18 + src/index.js | 7 + src/lib/Markdown.d.ts | 14 + src/lib/Markdown.js | 39 ++ src/lib/Markdown.tsx | 4 +- src/lib/Parser.d.ts | 16 + src/lib/Parser.js | 283 ++++++++ src/lib/Renderer.d.ts | 65 ++ src/lib/Renderer.js | 193 ++++++ src/lib/__perf__/Markdown.perf-test.d.ts | 1 + src/lib/__perf__/Markdown.perf-test.js | 277 ++++++++ src/lib/__tests__/Markdown.spec.d.ts | 1 + src/lib/__tests__/Markdown.spec.js | 845 +++++++++++++++++++++++ src/lib/__tests__/Markdown.spec.tsx | 20 +- src/lib/__tests__/Renderer.spec.d.ts | 1 + src/lib/__tests__/Renderer.spec.js | 232 +++++++ src/lib/types.d.ts | 81 +++ src/lib/types.js | 1 + src/lib/types.ts | 4 +- src/theme/__tests__/styles.spec.d.ts | 1 + src/theme/__tests__/styles.spec.js | 198 ++++++ src/theme/colors.d.ts | 13 + src/theme/colors.js | 17 + src/theme/spacing.d.ts | 3 + src/theme/spacing.js | 7 + src/theme/styles.d.ts | 8 + src/theme/styles.js | 189 +++++ src/theme/types.d.ts | 31 + src/theme/types.js | 1 + src/utils/__tests__/handlers.spec.d.ts | 1 + src/utils/__tests__/handlers.spec.js | 18 + src/utils/__tests__/svg.spec.d.ts | 1 + src/utils/__tests__/svg.spec.js | 222 ++++++ src/utils/__tests__/table.spec.d.ts | 1 + src/utils/__tests__/table.spec.js | 49 ++ src/utils/__tests__/url.spec.d.ts | 1 + src/utils/__tests__/url.spec.js | 45 ++ src/utils/handlers.d.ts | 1 + src/utils/handlers.js | 8 + src/utils/svg.d.ts | 5 + src/utils/svg.js | 10 + src/utils/table.d.ts | 9 + src/utils/table.js | 22 + src/utils/url.d.ts | 1 + src/utils/url.js | 19 + 53 files changed, 3174 insertions(+), 32 deletions(-) create mode 100644 src/components/MDImage.d.ts create mode 100644 src/components/MDImage.js create mode 100644 src/components/MDSvg.d.ts create mode 100644 src/components/MDSvg.js create mode 100644 src/hooks/useMarkdown.d.ts create mode 100644 src/hooks/useMarkdown.js create mode 100644 src/index.d.ts create mode 100644 src/index.js create mode 100644 src/lib/Markdown.d.ts create mode 100644 src/lib/Markdown.js create mode 100644 src/lib/Parser.d.ts create mode 100644 src/lib/Parser.js create mode 100644 src/lib/Renderer.d.ts create mode 100644 src/lib/Renderer.js create mode 100644 src/lib/__perf__/Markdown.perf-test.d.ts create mode 100644 src/lib/__perf__/Markdown.perf-test.js create mode 100644 src/lib/__tests__/Markdown.spec.d.ts create mode 100644 src/lib/__tests__/Markdown.spec.js create mode 100644 src/lib/__tests__/Renderer.spec.d.ts create mode 100644 src/lib/__tests__/Renderer.spec.js create mode 100644 src/lib/types.d.ts create mode 100644 src/lib/types.js create mode 100644 src/theme/__tests__/styles.spec.d.ts create mode 100644 src/theme/__tests__/styles.spec.js create mode 100644 src/theme/colors.d.ts create mode 100644 src/theme/colors.js create mode 100644 src/theme/spacing.d.ts create mode 100644 src/theme/spacing.js create mode 100644 src/theme/styles.d.ts create mode 100644 src/theme/styles.js create mode 100644 src/theme/types.d.ts create mode 100644 src/theme/types.js create mode 100644 src/utils/__tests__/handlers.spec.d.ts create mode 100644 src/utils/__tests__/handlers.spec.js create mode 100644 src/utils/__tests__/svg.spec.d.ts create mode 100644 src/utils/__tests__/svg.spec.js create mode 100644 src/utils/__tests__/table.spec.d.ts create mode 100644 src/utils/__tests__/table.spec.js create mode 100644 src/utils/__tests__/url.spec.d.ts create mode 100644 src/utils/__tests__/url.spec.js create mode 100644 src/utils/handlers.d.ts create mode 100644 src/utils/handlers.js create mode 100644 src/utils/svg.d.ts create mode 100644 src/utils/svg.js create mode 100644 src/utils/table.d.ts create mode 100644 src/utils/table.js create mode 100644 src/utils/url.d.ts create mode 100644 src/utils/url.js diff --git a/package.json b/package.json index 88ca3768..0f079681 100644 --- a/package.json +++ b/package.json @@ -35,11 +35,7 @@ "test:updateSnapshot": "jest --updateSnapshot", "reassure": "reassure" }, - "keywords": [ - "react-native", - "markdown", - "react-native markdown" - ], + "keywords": ["react-native", "markdown", "react-native markdown"], "repository": "https://github.com/gmsgowtham/react-native-marked", "author": "Gowtham G (https://github.com/gmsgowtham)", "license": "MIT", @@ -95,17 +91,13 @@ "/examples/*/node_modules", "/dist/" ], - "setupFilesAfterEnv": [ - "@testing-library/jest-native/extend-expect" - ], + "setupFilesAfterEnv": ["@testing-library/jest-native/extend-expect"], "transformIgnorePatterns": [ "node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|react-native-table-component)" ] }, "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ], + "extends": ["@commitlint/config-conventional"], "rules": { "type-enum": [ 2, diff --git a/src/components/MDImage.d.ts b/src/components/MDImage.d.ts new file mode 100644 index 00000000..33fff7dd --- /dev/null +++ b/src/components/MDImage.d.ts @@ -0,0 +1,10 @@ +import React from "react"; +import type { ImageStyle } from "react-native"; +type MDImageProps = { + uri: string; + label?: string; + alt?: string; + style?: ImageStyle; +}; +declare const _default: React.NamedExoticComponent; +export default _default; diff --git a/src/components/MDImage.js b/src/components/MDImage.js new file mode 100644 index 00000000..a280e16c --- /dev/null +++ b/src/components/MDImage.js @@ -0,0 +1,58 @@ +import React, { memo, useEffect, useState } from "react"; +import { ActivityIndicator, ImageBackground, Image } from "react-native"; +const MDImage = ({ uri, label, alt = "Image", style }) => { + const [imageState, setImageState] = useState({ + isLoading: true, + aspectRatio: undefined, + }); + useEffect(() => { + fetchOriginalSizeFromRemoteImage(); + }, []); + /** + * Fetches image dimension + * Sets aspect ratio if resolved + */ + const fetchOriginalSizeFromRemoteImage = () => { + Image.getSize( + uri, + (width, height) => { + if (width > 0 && height > 0) { + setImageState({ isLoading: false, aspectRatio: width / height }); + } else { + setImageState({ isLoading: false, aspectRatio: undefined }); + } + }, + () => { + setImageState((current) => { + return { + ...current, + isLoading: false, + }; + }); + }, + ); + }; + return React.createElement( + ImageBackground, + { + source: { uri: uri }, + style: { + width: "100%", + aspectRatio: imageState.aspectRatio, + }, + "aria-label": label, + accessibilityRole: "image", + accessibilityLabel: alt, + accessibilityHint: undefined, + imageStyle: style, + testID: "react-native-marked-md-image", + }, + imageState.isLoading + ? React.createElement(ActivityIndicator, { + testID: "react-native-marked-md-image-activity-indicator", + size: "small", + }) + : null, + ); +}; +export default memo(MDImage); diff --git a/src/components/MDSvg.d.ts b/src/components/MDSvg.d.ts new file mode 100644 index 00000000..04530e32 --- /dev/null +++ b/src/components/MDSvg.d.ts @@ -0,0 +1,7 @@ +import React from "react"; +type MDSvgProps = { + uri: string; + alt?: string; +}; +declare const _default: React.NamedExoticComponent; +export default _default; diff --git a/src/components/MDSvg.js b/src/components/MDSvg.js new file mode 100644 index 00000000..25077cc5 --- /dev/null +++ b/src/components/MDSvg.js @@ -0,0 +1,78 @@ +import React, { memo, useEffect, useState, useRef } from "react"; +import { ActivityIndicator, View } from "react-native"; +import { SvgFromXml } from "react-native-svg"; +import { getSvgDimensions } from "./../utils/svg"; +const MDSvg = ({ uri, alt = "image" }) => { + const isFirstLoad = useRef(false); + const [layoutWidth, setLayoutWidth] = useState(0); + const [svgState, setSvgState] = useState({ + viewBox: "", + width: 0, + height: 0, + svg: "", + isLoading: true, + error: false, + aspectRatio: undefined, + }); + useEffect(() => { + const fetchSvg = async () => { + try { + const res = await fetch(uri); + const text = await res.text(); + if (res.status !== 200) { + throw new Error("Status is not 200"); + } + const { viewBox, width, height } = getSvgDimensions(text); + setSvgState({ + width, + height, + viewBox, + svg: text, + isLoading: false, + error: false, + aspectRatio: width / height, + }); + } catch (e) { + setSvgState((state) => ({ + ...state, + error: true, + isLoading: false, + })); + } + }; + fetchSvg(); + }, [uri]); + const onLayout = (event) => { + if (!isFirstLoad.current) { + setLayoutWidth(event.nativeEvent.layout.width ?? 0); + isFirstLoad.current = true; + } + }; + const getWidth = () => { + if (layoutWidth && svgState.width) { + return Math.min(layoutWidth, svgState.width); + } + return "100%"; + }; + return React.createElement( + View, + { + style: { width: getWidth(), aspectRatio: svgState.aspectRatio }, + onLayout: onLayout, + }, + svgState.isLoading + ? React.createElement(ActivityIndicator, { size: "small" }) + : React.createElement(SvgFromXml, { + xml: svgState.svg, + width: "100%", + height: "100%", + viewBox: svgState.viewBox, + "aria-label": alt, + accessibilityRole: "image", + accessibilityLabel: alt, + accessibilityHint: undefined, + testID: "react-native-marked-md-svg", + }), + ); +}; +export default memo(MDSvg); diff --git a/src/hooks/useMarkdown.d.ts b/src/hooks/useMarkdown.d.ts new file mode 100644 index 00000000..7729a26e --- /dev/null +++ b/src/hooks/useMarkdown.d.ts @@ -0,0 +1,18 @@ +import type { ReactNode } from "react"; +import type { Tokenizer } from "marked"; +import type { MarkedStyles, UserTheme } from "./../theme/types"; +import type { ColorSchemeName } from "react-native"; +import type { RendererInterface } from "../lib/types"; +export interface useMarkdownHookOptions { + colorScheme?: ColorSchemeName; + renderer?: RendererInterface; + theme?: UserTheme; + styles?: MarkedStyles; + baseUrl?: string; + tokenizer?: Tokenizer; +} +declare const useMarkdown: ( + value: string, + options?: useMarkdownHookOptions, +) => ReactNode[]; +export default useMarkdown; diff --git a/src/hooks/useMarkdown.js b/src/hooks/useMarkdown.js new file mode 100644 index 00000000..40f3a7af --- /dev/null +++ b/src/hooks/useMarkdown.js @@ -0,0 +1,29 @@ +import { useMemo } from "react"; +import { lexer, Tokenizer } from "marked"; +import Parser from "../lib/Parser"; +import Renderer from "../lib/Renderer"; +import getStyles from "./../theme/styles"; +const useMarkdown = (value, options) => { + const styles = useMemo( + () => getStyles(options?.styles, options?.colorScheme, options?.theme), + [options?.styles, options?.theme, options?.colorScheme], + ); + const parser = useMemo( + () => + new Parser({ + styles: styles, + baseUrl: options?.baseUrl, + renderer: options?.renderer ?? new Renderer(), + }), + [options?.renderer, options?.baseUrl, styles], + ); + const elements = useMemo(() => { + const tokens = lexer(value, { + gfm: true, + tokenizer: options?.tokenizer, + }); + return parser.parse(tokens); + }, [value, parser, options?.tokenizer]); + return elements; +}; +export default useMarkdown; diff --git a/src/hooks/useMarkdown.ts b/src/hooks/useMarkdown.ts index 7e4939f4..91d9659a 100644 --- a/src/hooks/useMarkdown.ts +++ b/src/hooks/useMarkdown.ts @@ -1,5 +1,5 @@ import { useMemo, type ReactNode } from "react"; -import { lexer } from "marked"; +import { lexer, type Tokenizer } from "marked"; import type { MarkedStyles, UserTheme } from "./../theme/types"; import Parser from "../lib/Parser"; import Renderer from "../lib/Renderer"; @@ -13,7 +13,7 @@ export interface useMarkdownHookOptions { theme?: UserTheme; styles?: MarkedStyles; baseUrl?: string; - // tokenizer?: Tokenizer; + tokenizer?: Tokenizer; } const useMarkdown = ( @@ -38,11 +38,10 @@ const useMarkdown = ( const elements = useMemo(() => { const tokens = lexer(value, { gfm: true, - // tokenizer: options?.tokenizer as Tokenizer, + tokenizer: options?.tokenizer, }); return parser.parse(tokens); - }, [value, parser]); - // }, [value, parser, options?.tokenizer]); + }, [value, parser, options?.tokenizer]); return elements; }; diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 00000000..a690d765 --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1,18 @@ +import { Tokenizer } from "marked"; +import Markdown from "./lib/Markdown"; +import Renderer from "./lib/Renderer"; +import useMarkdown, { type useMarkdownHookOptions } from "./hooks/useMarkdown"; +import type { + MarkdownProps, + ParserOptions, + RendererInterface, +} from "./lib/types"; +declare const MarkedLexer: typeof import("marked").Lexer.lex; +export type { + MarkdownProps, + ParserOptions, + RendererInterface, + useMarkdownHookOptions, +}; +export { Renderer, useMarkdown, Tokenizer as MarkedTokenizer, MarkedLexer }; +export default Markdown; diff --git a/src/index.js b/src/index.js new file mode 100644 index 00000000..4752ad35 --- /dev/null +++ b/src/index.js @@ -0,0 +1,7 @@ +import { Tokenizer, marked } from "marked"; +import Markdown from "./lib/Markdown"; +import Renderer from "./lib/Renderer"; +import useMarkdown, {} from "./hooks/useMarkdown"; +const MarkedLexer = marked.lexer; +export { Renderer, useMarkdown, Tokenizer as MarkedTokenizer, MarkedLexer }; +export default Markdown; diff --git a/src/lib/Markdown.d.ts b/src/lib/Markdown.d.ts new file mode 100644 index 00000000..d31e5acf --- /dev/null +++ b/src/lib/Markdown.d.ts @@ -0,0 +1,14 @@ +import React from "react"; +import type { MarkdownProps } from "./types"; +declare const _default: React.MemoExoticComponent< + ({ + value, + flatListProps, + theme, + baseUrl, + renderer, + styles, + tokenizer, + }: MarkdownProps) => React.JSX.Element +>; +export default _default; diff --git a/src/lib/Markdown.js b/src/lib/Markdown.js new file mode 100644 index 00000000..45cfb6d2 --- /dev/null +++ b/src/lib/Markdown.js @@ -0,0 +1,39 @@ +import React, { memo, useCallback } from "react"; +import { FlatList, useColorScheme } from "react-native"; +import useMarkdown from "../hooks/useMarkdown"; +const Markdown = ({ + value, + flatListProps, + theme, + baseUrl, + renderer, + styles, + tokenizer, +}) => { + const colorScheme = useColorScheme(); + const rnElements = useMarkdown(value, { + theme, + baseUrl, + renderer, + colorScheme, + styles, + tokenizer, + }); + const renderItem = useCallback(({ item }) => { + return item; + }, []); + const keyExtractor = useCallback((_, index) => index.toString(), []); + return React.createElement(FlatList, { + removeClippedSubviews: false, + keyExtractor: keyExtractor, + maxToRenderPerBatch: 8, + initialNumToRender: 8, + style: { + backgroundColor: colorScheme === "light" ? "#ffffff" : "#000000", + }, + ...flatListProps, + data: rnElements, + renderItem: renderItem, + }); +}; +export default memo(Markdown); diff --git a/src/lib/Markdown.tsx b/src/lib/Markdown.tsx index d0dbb578..583130dc 100644 --- a/src/lib/Markdown.tsx +++ b/src/lib/Markdown.tsx @@ -15,7 +15,7 @@ const Markdown = ({ baseUrl, renderer, styles, - // tokenizer, + tokenizer, }: MarkdownProps) => { const colorScheme = useColorScheme(); @@ -25,7 +25,7 @@ const Markdown = ({ renderer, colorScheme, styles, - // tokenizer, + tokenizer, }); const renderItem = useCallback(({ item }: { item: ReactNode }) => { diff --git a/src/lib/Parser.d.ts b/src/lib/Parser.d.ts new file mode 100644 index 00000000..510b995a --- /dev/null +++ b/src/lib/Parser.d.ts @@ -0,0 +1,16 @@ +import type { ReactNode } from "react"; +import type { Token } from "marked"; +import type { ParserOptions } from "./types"; +declare class Parser { + private renderer; + private styles; + private headingStylesMap; + private baseUrl; + constructor(options: ParserOptions); + parse(tokens?: Token[]): ReactNode[]; + private _parse; + private _parseToken; + private getNormalizedSiblingNodesForBlockAndInlineTokens; + private hasDuplicateTextChildToken; +} +export default Parser; diff --git a/src/lib/Parser.js b/src/lib/Parser.js new file mode 100644 index 00000000..dd795411 --- /dev/null +++ b/src/lib/Parser.js @@ -0,0 +1,283 @@ +import { decode } from "html-entities"; +import { getValidURL } from "./../utils/url"; +import { getTableColAlignmentStyle } from "./../utils/table"; +class Parser { + renderer; + styles; + headingStylesMap; + baseUrl; + constructor(options) { + this.styles = { ...options.styles }; + this.baseUrl = options.baseUrl ?? ""; + this.renderer = options.renderer; + this.headingStylesMap = { + 1: this.styles.h1, + 2: this.styles.h2, + 3: this.styles.h3, + 4: this.styles.h4, + 5: this.styles.h5, + 6: this.styles.h6, + }; + } + parse(tokens) { + return this._parse(tokens); + } + _parse(tokens, styles) { + if (!tokens) return []; + const elements = tokens.map((token) => { + return this._parseToken(token, styles); + }); + return elements.filter((element) => element !== null); + } + _parseToken(token, styles) { + switch (token.type) { + case "paragraph": { + const children = this.getNormalizedSiblingNodesForBlockAndInlineTokens( + token.tokens ?? [], + this.styles.text, + ); + return this.renderer.paragraph(children, this.styles.paragraph); + } + case "blockquote": { + const children = this.parse(token.tokens); + return this.renderer.blockquote(children, this.styles.blockquote); + } + case "heading": { + const styles = this.headingStylesMap[token.depth]; + if (this.hasDuplicateTextChildToken(token)) { + return this.renderer.heading(token.text, styles, token.depth); + } + const children = this._parse(token.tokens, styles); + return this.renderer.heading(children, styles, token.depth); + } + case "code": { + return this.renderer.code( + token.text, + token.lang, + this.styles.code, + this.styles.em, + ); + } + case "hr": { + return this.renderer.hr(this.styles.hr); + } + case "list": { + let startIndex = Number.parseInt(token.start.toString()); + if (Number.isNaN(startIndex)) { + startIndex = 1; + } + const li = token.items.map((item) => { + const children = item.tokens.flatMap((cItem) => { + if (cItem.type === "text") { + /* getViewNode since tokens could contain a block like elements (i.e. img) */ + const childTokens = cItem.tokens || []; + const listChildren = + this.getNormalizedSiblingNodesForBlockAndInlineTokens( + childTokens, + this.styles.li, + ); + // return this.renderer.listItem(listChildren, this.styles.li); + return listChildren; + } + /* Parse the nested token */ + return this._parseToken(cItem); + }); + return this.renderer.listItem(children, this.styles.li); + }); + return this.renderer.list( + token.ordered, + li, + this.styles.list, + this.styles.li, + startIndex, + ); + } + case "escape": { + return this.renderer.escape(token.text, { + ...this.styles.text, + ...styles, + }); + } + case "link": { + // Don't render anchors without text and children + if (token.text.trim.length < 1 || !token.tokens) { + return null; + } + // Note: Linking Images (https://www.markdownguide.org/basic-syntax/#linking-images) are wrapped + // in paragraph token, so will be handled via `getNormalizedSiblingNodesForBlockAndInlineTokens` + const linkStyle = { + ...this.styles.link, + ...styles, + // To override color and fontStyle properties + color: this.styles.link?.color, + fontStyle: this.styles.link?.fontStyle, + }; + const href = getValidURL(this.baseUrl, token.href); + if (this.hasDuplicateTextChildToken(token)) { + return this.renderer.link(token.text, href, linkStyle); + } + const children = this._parse(token.tokens, linkStyle); + return this.renderer.link(children, href, linkStyle); + } + case "image": { + return this.renderer.image( + token.href, + token.text || token.title, + this.styles.image, + ); + } + case "strong": { + const boldStyle = { + ...this.styles.strong, + ...styles, + }; + if (this.hasDuplicateTextChildToken(token)) { + return this.renderer.strong(token.text, boldStyle); + } + const children = this._parse(token.tokens, boldStyle); + return this.renderer.strong(children, boldStyle); + } + case "em": { + const italicStyle = { + ...this.styles.em, + ...styles, + }; + if (this.hasDuplicateTextChildToken(token)) { + return this.renderer.em(token.text, italicStyle); + } + const children = this._parse(token.tokens, italicStyle); + return this.renderer.em(children, italicStyle); + } + case "codespan": { + return this.renderer.codespan(decode(token.text), { + ...this.styles.codespan, + ...styles, + }); + } + case "br": { + return this.renderer.br(); + } + case "del": { + const strikethroughStyle = { + ...this.styles.strikethrough, + ...styles, + }; + if (this.hasDuplicateTextChildToken(token)) { + return this.renderer.del(token.text, strikethroughStyle); + } + const children = this._parse(token.tokens, strikethroughStyle); + return this.renderer.del(children, strikethroughStyle); + } + case "text": + return this.renderer.text(token.raw, { + ...this.styles.text, + ...styles, + }); + case "html": { + console.warn( + "react-native-marked: rendering html from markdown is not supported", + ); + return this.renderer.html(token.raw, { + ...this.styles.text, + ...styles, + }); + } + case "table": { + const header = token.header.map((row, i) => + this._parse(row.tokens, { + ...getTableColAlignmentStyle(token.align[i]), + }), + ); + const rows = token.rows.map((cols) => + cols.map((col, i) => + this._parse(col.tokens, { + ...getTableColAlignmentStyle(token.align[i]), + }), + ), + ); + return this.renderer.table( + header, + rows, + this.styles.table, + this.styles.tableRow, + this.styles.tableCell, + ); + } + case "custom": { + const children = this._parse(token.tokens ?? []); + return this.renderer.custom( + token.identifier, + token.raw, + children, + token.args, + ); + } + default: { + return null; + } + } + } + getNormalizedSiblingNodesForBlockAndInlineTokens(tokens, textStyle) { + let tokenRenderQueue = []; + const siblingNodes = []; + for (const t of tokens) { + /** + * To avoid inlining images + * Currently supports images, link images + * Note: to be extend for other token types + */ + if ( + t.type === "image" || + (t.type === "link" && + t.tokens && + t.tokens[0] && + t.tokens[0].type === "image") + ) { + // Render existing inline tokens in the queue + const parsed = this._parse(tokenRenderQueue); + if (parsed.length > 0) { + siblingNodes.push(this.renderer.text(parsed, textStyle)); + } + // Render the current block token + if (t.type === "image") { + siblingNodes.push(this._parseToken(t)); + } else if (t.type === "link" && t.tokens && t.tokens[0]) { + const imageToken = t.tokens[0]; + const href = getValidURL(this.baseUrl, t.href); + siblingNodes.push( + this.renderer.linkImage( + href, + imageToken.href, + imageToken.text ?? imageToken.title ?? "", + this.styles.image, + ), + ); + } + tokenRenderQueue = []; + continue; + } + tokenRenderQueue = [...tokenRenderQueue, t]; + } + /* Remaining temp tokens if any */ + if (tokenRenderQueue.length > 0) { + siblingNodes.push(this.renderer.text(this.parse(tokenRenderQueue), {})); + } + return siblingNodes; + } + // To avoid duplicate text node nesting when there are no child tokens with text emphasis (i.e., italic) + // ref: https://github.com/gmsgowtham/react-native-marked/issues/522 + hasDuplicateTextChildToken(token) { + if (!("tokens" in token)) { + return false; + } + if ( + token.tokens && + token.tokens.length === 1 && + token.tokens[0]?.type === "text" + ) { + return true; + } + return false; + } +} +export default Parser; diff --git a/src/lib/Renderer.d.ts b/src/lib/Renderer.d.ts new file mode 100644 index 00000000..a33d07dc --- /dev/null +++ b/src/lib/Renderer.d.ts @@ -0,0 +1,65 @@ +import React, { type ReactNode } from "react"; +import type { TextStyle, ViewStyle, ImageStyle } from "react-native"; +import type { RendererInterface } from "./types"; +declare class Renderer implements RendererInterface { + private slugPrefix; + private slugger; + private windowWidth; + constructor(); + paragraph(children: ReactNode[], styles?: ViewStyle): ReactNode; + blockquote(children: ReactNode[], styles?: ViewStyle): ReactNode; + heading(text: string | ReactNode[], styles?: TextStyle): ReactNode; + code( + text: string, + _language?: string, + containerStyle?: ViewStyle, + textStyle?: TextStyle, + ): ReactNode; + hr(styles?: ViewStyle): ReactNode; + listItem(children: ReactNode[], styles?: ViewStyle): ReactNode; + list( + ordered: boolean, + li: ReactNode[], + listStyle?: ViewStyle, + textStyle?: TextStyle, + startIndex?: number, + ): ReactNode; + escape(text: string, styles?: TextStyle): ReactNode; + link( + children: string | ReactNode[], + href: string, + styles?: TextStyle, + ): ReactNode; + image(uri: string, alt?: string, style?: ImageStyle): ReactNode; + strong(children: string | ReactNode[], styles?: TextStyle): ReactNode; + em(children: string | ReactNode[], styles?: TextStyle): ReactNode; + codespan(text: string, styles?: TextStyle): ReactNode; + br(): ReactNode; + del(children: string | ReactNode[], styles?: TextStyle): ReactNode; + text(text: string | ReactNode[], styles?: TextStyle): ReactNode; + html(text: string | ReactNode[], styles?: TextStyle): ReactNode; + linkImage( + href: string, + imageUrl: string, + alt?: string, + style?: ImageStyle, + ): ReactNode; + table( + header: ReactNode[][], + rows: ReactNode[][][], + tableStyle?: ViewStyle, + rowStyle?: ViewStyle, + cellStyle?: ViewStyle, + ): React.ReactNode; + custom( + _identifier: string, + _raw: string, + _children: ReactNode[], + _args: Record, + ): ReactNode; + getKey(): string; + private getTextNode; + private getViewNode; + private getBlockquoteNode; +} +export default Renderer; diff --git a/src/lib/Renderer.js b/src/lib/Renderer.js new file mode 100644 index 00000000..20017dcf --- /dev/null +++ b/src/lib/Renderer.js @@ -0,0 +1,193 @@ +import React, {} from "react"; +import { + ScrollView, + View, + Text, + TouchableHighlight, + Dimensions, +} from "react-native"; +import MarkedList from "@jsamr/react-native-li"; +import Disc from "@jsamr/counter-style/presets/disc"; +import Decimal from "@jsamr/counter-style/presets/decimal"; +import Slugger from "github-slugger"; +import { Table, Cell, TableWrapper } from "react-native-table-component"; +import MDImage from "./../components/MDImage"; +import { onLinkPress } from "../utils/handlers"; +import { getTableWidthArr } from "../utils/table"; +import MDSvg from "./../components/MDSvg"; +class Renderer { + slugPrefix = "react-native-marked-ele"; + slugger; + windowWidth; + constructor() { + this.slugger = new Slugger(); + const { width } = Dimensions.get("window"); + this.windowWidth = width; + } + paragraph(children, styles) { + return this.getViewNode(children, styles); + } + blockquote(children, styles) { + return this.getBlockquoteNode(children, styles); + } + heading(text, styles) { + return this.getTextNode(text, styles); + } + code(text, _language, containerStyle, textStyle) { + return React.createElement( + ScrollView, + { + horizontal: true, + key: this.getKey(), + contentContainerStyle: containerStyle, + }, + React.createElement(View, null, this.getTextNode(text, textStyle)), + ); + } + hr(styles) { + return this.getViewNode(null, styles); + } + listItem(children, styles) { + return this.getViewNode(children, styles); + } + list(ordered, li, listStyle, textStyle, startIndex) { + return React.createElement( + MarkedList, + { + counterRenderer: ordered ? Decimal : Disc, + markerTextStyle: textStyle, + markerBoxStyle: listStyle, + key: this.getKey(), + startIndex: startIndex, + }, + li.map((node) => node), + ); + } + escape(text, styles) { + return this.getTextNode(text, styles); + } + link(children, href, styles) { + return React.createElement( + Text, + { + selectable: true, + accessibilityRole: "link", + accessibilityHint: "Opens in a new window", + key: this.getKey(), + onPress: onLinkPress(href), + style: styles, + }, + children, + ); + } + image(uri, alt, style) { + const key = this.getKey(); + if (uri.endsWith(".svg")) { + return React.createElement(MDSvg, { uri: uri, key: key }); + } + return React.createElement(MDImage, { + key: key, + uri: uri, + alt: alt, + style: style, + }); + } + strong(children, styles) { + return this.getTextNode(children, styles); + } + em(children, styles) { + return this.getTextNode(children, styles); + } + codespan(text, styles) { + return this.getTextNode(text, styles); + } + br() { + return this.getTextNode("\n", {}); + } + del(children, styles) { + return this.getTextNode(children, styles); + } + text(text, styles) { + return this.getTextNode(text, styles); + } + html(text, styles) { + return this.getTextNode(text, styles); + } + linkImage(href, imageUrl, alt, style) { + const imageNode = this.image(imageUrl, alt, style); + return React.createElement( + TouchableHighlight, + { + accessibilityRole: "link", + accessibilityHint: "Opens in a new window", + onPress: onLinkPress(href), + key: this.getKey(), + }, + imageNode, + ); + } + table(header, rows, tableStyle, rowStyle, cellStyle) { + const widthArr = getTableWidthArr(header.length, this.windowWidth); + const { borderWidth, borderColor, ...tableStyleRest } = tableStyle || {}; + return React.createElement( + ScrollView, + { horizontal: true }, + React.createElement( + Table, + { borderStyle: { borderWidth, borderColor }, style: tableStyleRest }, + React.createElement( + TableWrapper, + { style: rowStyle }, + header.map((headerCol, index) => { + return React.createElement(Cell, { + width: widthArr[index], + key: `${index}`, + data: React.createElement(View, { style: cellStyle }, headerCol), + }); + }), + ), + rows.map((rowData, index) => { + return React.createElement( + TableWrapper, + { key: `${index}`, style: rowStyle }, + rowData.map((cellData, cellIndex) => { + return React.createElement(Cell, { + width: widthArr[cellIndex], + key: `${cellIndex}`, + data: React.createElement(View, { style: cellStyle }, cellData), + }); + }), + ); + }), + ), + ); + } + custom(_identifier, _raw, _children, _args) { + return null; + } + getKey() { + return this.slugger.slug(this.slugPrefix); + } + getTextNode(children, styles) { + return React.createElement( + Text, + { selectable: true, key: this.getKey(), style: styles }, + children, + ); + } + getViewNode(children, styles) { + return React.createElement( + View, + { key: this.getKey(), style: styles }, + children, + ); + } + getBlockquoteNode(children, styles) { + return React.createElement( + View, + { key: this.getKey(), style: styles }, + children, + ); + } +} +export default Renderer; diff --git a/src/lib/__perf__/Markdown.perf-test.d.ts b/src/lib/__perf__/Markdown.perf-test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/lib/__perf__/Markdown.perf-test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/lib/__perf__/Markdown.perf-test.js b/src/lib/__perf__/Markdown.perf-test.js new file mode 100644 index 00000000..711aca2d --- /dev/null +++ b/src/lib/__perf__/Markdown.perf-test.js @@ -0,0 +1,277 @@ +import React from "react"; +import { StyleSheet } from "react-native"; +import { screen } from "@testing-library/react-native"; +import { measureRenders } from "reassure"; +import Markdown from "../Markdown"; +const mdString = `Markdown Quick Reference +======================== + +This guide is a very brief overview, with examples, of the syntax that [Markdown] supports. It is itself written in Markdown and you can copy the samples over to the left-hand pane for experimentation. It's shown as *text* and not *rendered HTML*. + +[Markdown]: http://daringfireball.net/projects/markdown/ + + +Simple Text Formatting +====================== + +First thing is first. You can use *stars* or _underscores_ for italics. **Double stars** and __double underscores__ for bold. ***Three together*** for ___both___. + +Paragraphs are pretty easy too. Just have a blank line between chunks of text. + +> This chunk of text is in a block quote. Its multiple lines will all be +> indented a bit from the rest of the text. +> +> > Multiple levels of block quotes also work. + +Sometimes you want to include code, such as when you are explaining how \`

\` HTML tags work, or maybe you are a programmer and you are discussing \`someMethod()\`. + +If you want to include code and have new +lines preserved, indent the line with a tab +or at least four spaces: + + Extra spaces work here too. + This is also called preformatted text and it is useful for showing examples. + The text will stay as text, so any *markdown* or HTML you add will + not show up formatted. This way you can show markdown examples in a + markdown document. + +> You can also use preformatted text with your blockquotes +> as long as you add at least five spaces. + + +Headings +======== + +There are a couple of ways to make headings. Using three or more equals signs on a line under a heading makes it into an "h1" style. Three or more hyphens under a line makes it "h2" (slightly smaller). You can also use multiple pound symbols (\`#\`) before and after a heading. Pounds after the title are ignored. Here are some examples: + +This is H1 +========== + +This is H2 +---------- + +# This is H1 +## This is H2 +### This is H3 with some extra pounds ### +#### You get the idea #### +##### I don't need extra pounds at the end +###### H6 is the max + + +Links +===== + +Let's link to a few sites. First, let's use the bare URL, like . Great for text, but ugly for HTML. +Next is an inline link to [Google](https://www.google.com). A little nicer. +This is a reference-style link to [Wikipedia] [1]. +Lastly, here's a pretty link to [Yahoo]. The reference-style and pretty links both automatically use the links defined below, but they could be defined *anywhere* in the markdown and are removed from the HTML. The names are also case insensitive, so you can use [YaHoO] and have it link properly. + +[1]: https://www.wikipedia.org +[Yahoo]: https://www.yahoo.com + +Title attributes may be added to links by adding text after a link. +This is the [inline link](https://www.bing.com "Bing") with a "Bing" title. +You can also go to [W3C] [2] and maybe visit a [friend]. + +[2]: https://w3c.org (The W3C puts out specs for web-based things) +[Friend]: https://facebook.com "Facebook!" + +Email addresses in plain text are not linked: test@example.com. +Email addresses wrapped in angle brackets are linked: . +They are also obfuscated so that email harvesting spam robots hopefully won't get them. + + +Lists +===== + +* This is a bulleted list +* Great for shopping lists +- You can also use hyphens ++ Or plus symbols + +The above is an "unordered" list. Now, on for a bit of order. + +1. Numbered lists are also easy +2. Just start with a number +3738762. However, the actual number doesn't matter when converted to HTML. +1. This will still show up as 4. + +You might want a few advanced lists: + +- This top-level list is wrapped in paragraph tags +- This generates an extra space between each top-level item. + +- You do it by adding a blank line + +- This nested list also has blank lines between the list items. + +- How to create nested lists + 1. Start your regular list + 2. Indent nested lists with two spaces + 3. Further nesting means you should indent with two more spaces + * This line is indented with four spaces. + +- List items can be quite lengthy. You can keep typing and either continue +them on the next line with no indentation. + +- Alternately, if that looks ugly, you can also + indent the next line a bit for a prettier look. + +- You can put large blocks of text in your list by just indenting with two spaces. + + This is formatted the same as code, but you can inspect the HTML and find that it's just wrapped in a \`

\` tag and *won't* be shown as preformatted text. + + You can keep adding more and more paragraphs to a single list item by adding the traditional blank line and then keep on indenting the paragraphs with two spaces. + + You really only need to indent the first line, +but that looks ugly. + +- Lists support blockquotes + + > Just like this example here. By the way, you can + > nest lists inside blockquotes! + > - Fantastic! + +- Lists support preformatted text + + You just need to indent an additional four spaces. + + +Even More +========= + +Horizontal Rule +--------------- + +If you need a horizontal rule you just need to put at least three hyphens, asterisks, or underscores on a line by themselves. You can also even put spaces between the characters. + +--- +**************************** +_ _ _ _ _ _ _ + +Those three all produced horizontal lines. Keep in mind that three hyphens under any text turns that text into a heading, so add a blank like if you use hyphens. + +Images +------ + +Images work exactly like links, but they have exclamation points in front. They work with references and titles too. + +![Google Logo](https://www.google.com/images/errors/logo_sm.gif) and ![Happy]. + +[Happy]: https://wpclipart.com/smiley/happy/simple_colors/smiley_face_simple_green_small.png ("Smiley face") + + +Inline HTML +----------- + +If markdown is too limiting, you can just insert your own crazy HTML. Span-level HTML can *still* use markdown. Block level elements must be separated from text by a blank line and must not have any spaces before the opening and closing HTML. + +

+It is a pity, but markdown does **not** work in here for most markdown parsers. +[Marked] handles it pretty well. +
+`; +const styles = StyleSheet.create({ + em: { + fontSize: 12, + }, + strong: { + fontSize: 12, + }, + strikethrough: { + fontSize: 12, + }, + text: { + fontSize: 12, + }, + paragraph: { + borderWidth: 1, + }, + link: { + fontSize: 12, + }, + blockquote: { + borderWidth: 1, + }, + h1: { + fontSize: 12, + }, + h2: { + fontSize: 12, + }, + h3: { + fontSize: 12, + }, + h4: { + fontSize: 12, + }, + h5: { + fontSize: 12, + }, + h6: { + fontSize: 12, + }, + codespan: { + fontSize: 12, + }, + code: { + borderWidth: 1, + }, + hr: { + borderWidth: 1, + }, + list: { + borderWidth: 1, + }, + li: { + fontSize: 12, + }, + image: { + width: "100%", + }, + table: { + borderWidth: 1, + }, + tableRow: { + borderWidth: 1, + }, + tableCell: { + borderWidth: 1, + }, +}); +const theme = { + colors: { + background: "#ffffff", + link: "#58a6ff", + border: "#d0d7de", + code: "#161b22", + text: "#ffffff", + }, + spacing: { + xs: 3, + s: 6, + m: 9, + l: 18, + }, +}; +describe("Perf test", () => { + it("Renders markdown", async () => { + const scenario = async () => { + await screen.queryByText("Markdown Quick Reference"); + await screen.queryByText("Inline HTML"); + await screen.queryByText( + "If markdown is too limiting, you can just insert your own crazy HTML. Span-level HTML can *still* use markdown. Block level elements must be separated from text by a blank line and must not have any spaces before the opening and closing HTML.", + ); + }; + measureRenders( + React.createElement(Markdown, { + value: mdString, + styles: styles, + theme: theme, + }), + { + scenario, + }, + ); + }); +}); diff --git a/src/lib/__tests__/Markdown.spec.d.ts b/src/lib/__tests__/Markdown.spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/lib/__tests__/Markdown.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/lib/__tests__/Markdown.spec.js b/src/lib/__tests__/Markdown.spec.js new file mode 100644 index 00000000..0813dcf4 --- /dev/null +++ b/src/lib/__tests__/Markdown.spec.js @@ -0,0 +1,845 @@ +import React, {} from "react"; +import { render, screen, waitFor } from "@testing-library/react-native"; +import { Text } from "react-native"; +import Markdown from "../Markdown"; +import Renderer from "../Renderer"; +import { Tokenizer } from "marked"; +// https://www.markdownguide.org/basic-syntax/#headings +describe("Headings", () => { + it("Heading level 1", () => { + const r = render( + React.createElement(Markdown, { value: "# Heading level 1" }), + ); + expect(screen.queryByText("Heading level 1")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Heading level 2", () => { + const r = render( + React.createElement(Markdown, { value: "## Heading level 2" }), + ); + expect(screen.queryByText("Heading level 2")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Heading level 3", () => { + const r = render( + React.createElement(Markdown, { value: "### Heading level 3" }), + ); + expect(screen.queryByText("Heading level 3")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Heading level 4", () => { + const r = render( + React.createElement(Markdown, { value: "#### Heading level 4" }), + ); + expect(screen.queryByText("Heading level 4")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Heading level 5", () => { + const r = render( + React.createElement(Markdown, { value: "##### Heading level 5" }), + ); + expect(screen.queryByText("Heading level 5")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Heading level 6", () => { + const r = render( + React.createElement(Markdown, { value: "###### Heading level 6" }), + ); + expect(screen.queryByText("Heading level 6")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Alternate Syntax: Heading level 1", () => { + const r = render( + React.createElement(Markdown, { + value: "Heading level 1\n===============", + }), + ); + expect(screen.queryByText("Heading level 1")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Alternate Syntax: Heading level 2", () => { + const r = render( + React.createElement(Markdown, { + value: "Heading level 2\n---------------", + }), + ); + expect(screen.queryByText("Heading level 2")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Best Practice", () => { + const r = render( + React.createElement(Markdown, { + value: + "Try to put a blank line before...\n\n# Heading\n\n...and after a heading.", + }), + ); + expect(screen.queryByText("Heading")).toBeTruthy(); + expect( + screen.queryByText("Try to put a blank line before..."), + ).toBeTruthy(); + expect(screen.queryByText("...and after a heading.")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Heading with text emphasis", () => { + const r = render( + React.createElement(Markdown, { value: "## ~~_Heading level 2_~~" }), + ); + expect(screen.queryByText("Heading level 2")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/basic-syntax/#paragraphs-1 +describe("Paragraphs", () => { + it("Paragraph", () => { + const r = render( + React.createElement(Markdown, { + value: + "I really like using Markdown.\n\nI think I'll use it to format all of my documents from now on.", + }), + ); + expect(screen.queryByText("I really like using Markdown.")).toBeTruthy(); + expect( + screen.queryByText( + "I think I'll use it to format all of my documents from now on.", + ), + ).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Paragraph with Image", async () => { + const r = render( + React.createElement(Markdown, { + value: + "Here, I'll guide you through sending desktop notifications to offline users when they have new chat messages.![Chat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5kq947hwxmjvlmhrbnm6.png)", + }), + ); + await waitFor(() => { + expect( + screen.queryByText( + "Here, I'll guide you through sending desktop notifications to offline users when they have new chat messages.", + ), + ).toBeTruthy(); + expect( + screen.queryAllByTestId("react-native-marked-md-image"), + ).toBeDefined(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); +}); +describe("Line Breaks", () => { + it("Trailing New Line Character", () => { + const r = render( + React.createElement(Markdown, { + value: "First line with a backslash after.\nAnd the next line.", + }), + ); + expect( + screen.queryByText( + "First line with a backslash after. And the next line.", + ), + ).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Trailing slash", () => { + const r = render( + React.createElement(Markdown, { + value: `First line with a backslash after.\\ + And the next line.`, + }), + ); + expect( + screen.queryByText("First line with a backslash after."), + ).toBeTruthy(); + expect(screen.queryByText("And the next line.")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/basic-syntax/#emphasis +describe("Emphasis", () => { + it("Bold", () => { + const r = render( + React.createElement(Markdown, { value: "Love **is** bold" }), + ); + expect(screen.queryByText("is")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Italic", () => { + const r = render(React.createElement(Markdown, { value: "A *cat* meow" })); + expect(screen.queryByText("cat")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Strikethrough", () => { + const r = render( + React.createElement(Markdown, { value: "A ~~cat~~ meow" }), + ); + expect(screen.queryByText("cat")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Bold and Italic", () => { + const r = render( + React.createElement(Markdown, { + value: "This is really ***very*** important text.", + }), + ); + expect(screen.queryByText("very")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/basic-syntax/#blockquotes-1 +describe("Blockquotes", () => { + it("Blockquote", () => { + const r = render( + React.createElement(Markdown, { + value: + "> Dorothy followed her through many of the beautiful rooms in her castle.", + }), + ); + expect( + screen.queryByText( + "Dorothy followed her through many of the beautiful rooms in her castle.", + ), + ).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Blockquotes with Multiple Paragraphs", () => { + const r = render( + React.createElement(Markdown, { + value: + "> Dorothy followed her through many of the beautiful rooms in her castle.\n>\n> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.", + }), + ); + expect( + screen.queryByText( + "Dorothy followed her through many of the beautiful rooms in her castle.", + ), + ).toBeTruthy(); + expect( + screen.queryByText( + "The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.", + ), + ).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Nested Blockquotes", () => { + const r = render( + React.createElement(Markdown, { + value: + "> Dorothy followed her through many of the beautiful rooms in her castle.\n>\n\n>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.", + }), + ); + expect( + screen.queryByText( + "Dorothy followed her through many of the beautiful rooms in her castle.", + ), + ).toBeTruthy(); + expect( + screen.queryByText( + "The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.", + ), + ).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Blockquotes with Other Elements", () => { + const r = render( + React.createElement(Markdown, { + value: + "> #### The quarterly results look great!\n>\n> - Revenue was off the chart.\n> - Profits were higher than ever.\n>\n> *Everything* is going according to **plan**.", + }), + ); + expect( + screen.queryByText("The quarterly results look great!"), + ).toBeTruthy(); + expect(screen.queryByText("Revenue was off the chart.")).toBeTruthy(); + expect(screen.queryByText("Profits were higher than ever.")).toBeTruthy(); + expect(screen.queryByText("Everything")).toBeTruthy(); + expect(screen.queryByText("is going according to")).toBeTruthy(); + expect(screen.queryByText("plan")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/basic-syntax/#lists-1 +describe("Lists", () => { + it("Ordered Lists", () => { + const r = render( + React.createElement(Markdown, { + value: + "1. First item\n2. Second item\n3. Third item\n 1. Indented item1\n 2. Indented item2\n4. Fourth item", + }), + ); + expect(screen.queryByText("First item")).toBeTruthy(); + expect(screen.queryByText("Second item")).toBeTruthy(); + expect(screen.queryByText("Third item")).toBeTruthy(); + expect(screen.queryByText("Indented item1")).toBeTruthy(); + expect(screen.queryByText("Indented item2")).toBeTruthy(); + expect(screen.queryByText("Fourth item")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Ordered Lists: With Start Offset", () => { + const r = render( + React.createElement(Markdown, { value: "57. foo\n1. bar\n2. baz" }), + ); + expect(screen.queryByText("foo")).toBeTruthy(); + expect(screen.queryByText("bar")).toBeTruthy(); + expect(screen.queryByText("baz")).toBeTruthy(); + expect(screen.queryByText("57.")).toBeTruthy(); + expect(screen.queryByText("58.")).toBeTruthy(); + expect(screen.queryByText("59.")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Unordered Lists", () => { + const r = render( + React.createElement(Markdown, { + value: + "- First item\n- Second item\n- Third item\n - Indented item1\n - Indented item2\n- Fourth item", + }), + ); + expect(screen.queryByText("First item")).toBeTruthy(); + expect(screen.queryByText("Second item")).toBeTruthy(); + expect(screen.queryByText("Third item")).toBeTruthy(); + expect(screen.queryByText("Indented item1")).toBeTruthy(); + expect(screen.queryByText("Indented item2")).toBeTruthy(); + expect(screen.queryByText("Fourth item")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Elements in Lists: Paragraphs", () => { + const r = render( + React.createElement(Markdown, { + value: + "- This is the first list item.\n- Here's the second list item.\n\n I need to add another paragraph below the second list item.\n\n- And here's the third list item.", + }), + ); + expect(screen.queryByText("This is the first list item.")).toBeTruthy(); + expect(screen.queryByText("Here's the second list item.")).toBeTruthy(); + expect( + screen.queryByText( + "I need to add another paragraph below the second list item.", + ), + ).toBeTruthy(); + expect(screen.queryByText("And here's the third list item.")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Elements in Lists: Blockquotes", () => { + const r = render( + React.createElement(Markdown, { + value: + "- This is the first list item.\n- Here's the second list item.\n\n > A blockquote would look great below the second list item.\n\n- And here's the third list item.", + }), + ); + expect(screen.queryByText("This is the first list item.")).toBeTruthy(); + expect(screen.queryByText("Here's the second list item.")).toBeTruthy(); + expect( + screen.queryByText( + "A blockquote would look great below the second list item.", + ), + ).toBeTruthy(); + expect(screen.queryByText("And here's the third list item.")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Elements in Lists: Code Blocks", () => { + const r = render( + React.createElement(Markdown, { + value: + "* This is the first list item.\n* Here's the second list item.\n\n \n \n \n \n\n* And here's the third list item.", + }), + ); + expect(screen.queryByText("This is the first list item.")).toBeTruthy(); + expect(screen.queryByText("Here's the second list item.")).toBeTruthy(); + expect(screen.queryByText("And here's the third list item.")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Elements in Lists: Images", async () => { + const r = render( + React.createElement(Markdown, { + value: + "1. Open the file containing the Linux mascot.\n2. Marvel at its beauty.\n\n ![](https://dummyimage.com/100x100/fff/aaa)\n\n3. Close the file.", + }), + ); + await waitFor(() => { + expect( + screen.queryByText("Open the file containing the Linux mascot."), + ).toBeTruthy(); + expect(screen.queryByText("Marvel at its beauty.")).toBeTruthy(); + expect(screen.queryByText("Close the file.")).toBeTruthy(); + expect( + screen.queryAllByTestId("react-native-marked-md-image"), + ).toBeDefined(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + it("Elements in Lists: Lists", () => { + const r = render( + React.createElement(Markdown, { + value: + "1. First item\n2. Second item\n3. Third item\n - Indented item1\n - Indented item2\n4. Fourth item", + }), + ); + expect(screen.queryByText("First item")).toBeTruthy(); + expect(screen.queryByText("Second item")).toBeTruthy(); + expect(screen.queryByText("Third item")).toBeTruthy(); + expect(screen.queryByText("Indented item1")).toBeTruthy(); + expect(screen.queryByText("Indented item2")).toBeTruthy(); + expect(screen.queryByText("Fourth item")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/basic-syntax/#code +describe("Code", () => { + it("Code Span", () => { + const r = render( + React.createElement(Markdown, { + value: "At the command prompt, type `'nano'`.", + }), + ); + expect(screen.queryByText("At the command prompt, type")).toBeTruthy(); + expect(screen.queryByText("'nano'")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Code Blocks", () => { + const r = render( + React.createElement(Markdown, { + value: " \n \n \n ", + }), + ); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Code Blocks (backtick)", () => { + const r = render( + React.createElement(Markdown, { + value: "```\n \n \n \n```", + }), + ); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Code Blocks (backtick), no ending backtick", () => { + const r = render( + React.createElement(Markdown, { + value: "```\n \n \n ", + }), + ); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/basic-syntax/#horizontal-rules +describe("Horizontal Rules", () => { + it("Asterisks", () => { + const r = render(React.createElement(Markdown, { value: "***" })); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Dashes", () => { + const r = render(React.createElement(Markdown, { value: "---" })); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Underscores", () => { + const r = render( + React.createElement(Markdown, { value: "_________________" }), + ); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Horizontal Rule with Paragraph", () => { + const r = render( + React.createElement(Markdown, { + value: + "Try to put a blank line before...\n\n---\n\n...and after a horizontal rule.", + }), + ); + expect( + screen.queryByText("Try to put a blank line before..."), + ).toBeTruthy(); + expect(screen.queryByText("...and after a horizontal rule.")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/basic-syntax/#links +describe("Links", () => { + it("Basic", () => { + const r = render( + React.createElement(Markdown, { + value: + "My favorite search engine is [Duck Duck Go](https://duckduckgo.com).", + }), + ); + expect(screen.queryByText("My favorite search engine is")).toBeTruthy(); + expect(screen.queryByText("Duck Duck Go")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Titles", () => { + const r = render( + React.createElement(Markdown, { + value: + 'My favorite search engine is [Duck Duck Go](https://duckduckgo.com "The best search engine for privacy").', + }), + ); + expect(screen.queryByText("My favorite search engine is")).toBeTruthy(); + expect(screen.queryByText("Duck Duck Go")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("URLs and Email Addresses", () => { + const r = render( + React.createElement(Markdown, { + value: "\n\n", + }), + ); + expect(screen.queryByText("https://www.markdownguide.org")).toBeTruthy(); + expect(screen.queryByText("fake@example.com")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Formatting Links", () => { + const r = render( + React.createElement(Markdown, { + value: + "I love supporting the **[EFF](https://eff.org)**.\nThis is the *[Markdown Guide](https://www.markdownguide.org)*.\nSee the section on [`code`](#code).", + }), + ); + expect(screen.queryByText("EFF")).toBeTruthy(); + expect(screen.queryByText("Markdown Guide")).toBeTruthy(); + expect(screen.queryByText("code")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("Links without text, (no render)", () => { + const r = render( + React.createElement(Markdown, { + value: + "Table of Contents[](https://mastersoftwaretesting.com/testing-fundamentals/software-testing-101-what-is-software-testing#table-of-contents)\n-------------------------------------------------------------------------------------------------------------------------------------------\n", + }), + ); + expect(screen.queryByText("Table of Contents")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/basic-syntax/#images-1 +describe("Images", () => { + it("Render", async () => { + const r = render( + React.createElement(Markdown, { + value: + '![The San Juan Mountains are beautiful!](https://dummyimage.com/100x100/fff/aaa "San Juan Mountains")', + }), + ); + await waitFor(() => { + expect( + screen.queryAllByTestId("react-native-marked-md-image"), + ).toBeDefined(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + it("Linking Images", async () => { + const r = render( + React.createElement(Markdown, { + value: + '[![An old rock in the desert](https://dummyimage.com/100x100/fff/aaa "Shiprock, New Mexico by Beau Rogers")](https://dummyimage.com/100x100/fff/aaa)', + }), + ); + await waitFor(() => { + expect( + screen.queryAllByTestId("react-native-marked-md-image"), + ).toBeDefined(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + it("SVG images", async () => { + const r = render( + React.createElement(Markdown, { + value: "![svg](https://www.svgrepo.com/show/513268/beer.svg)", + }), + ); + await waitFor(() => { + expect( + screen.queryAllByTestId("react-native-marked-md-svg"), + ).toBeDefined(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + it("SVG Linking", async () => { + const r = render( + React.createElement(Markdown, { + value: + '[![SVG Repo](https://www.svgrepo.com/show/513268/beer.svg "SVG Repo")](https://www.svgrepo.com)', + }), + ); + await waitFor(() => { + expect( + screen.queryAllByTestId("react-native-marked-md-svg"), + ).toBeDefined(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); +}); +// https://www.markdownguide.org/basic-syntax/#escaping-characters +describe("Escaping Characters", () => { + it("Render", () => { + const r = render( + React.createElement(Markdown, { + value: + "\\* Without the backslash, this would be a bullet in an unordered list.", + }), + ); + expect(screen.queryByText("*")).toBeTruthy(); + expect( + screen.queryByText( + "Without the backslash, this would be a bullet in an unordered list.", + ), + ).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/basic-syntax/#html +describe("HTML", () => { + it("Render", () => { + const r = render( + React.createElement(Markdown, { + value: "This **word** is bold. This word is italic.", + }), + ); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); +// https://www.markdownguide.org/extended-syntax/#tables +describe("Tables", () => { + it("Basic", () => { + const r = render( + React.createElement(Markdown, { + value: ` +| Syntax | Description | +| ----------- | ----------- | +| Header | Title | +| Paragraph | Text | + `, + }), + ); + const tree = r.toJSON(); + expect(screen.queryByText("Syntax")).toBeTruthy(); + expect(screen.queryByText("Description")).toBeTruthy(); + expect(screen.queryByText("Header")).toBeTruthy(); + expect(screen.queryByText("Title")).toBeTruthy(); + expect(screen.queryByText("Paragraph")).toBeTruthy(); + expect(screen.queryByText("Text")).toBeTruthy(); + expect(tree).toMatchSnapshot(); + }); + it("Different Cell Widths", () => { + const r = render( + React.createElement(Markdown, { + value: ` +| Syntax | Description | +| --- | ----------- | +| Header | Title | +| Paragraph | Text | + `, + }), + ); + const tree = r.toJSON(); + expect(screen.queryByText("Syntax")).toBeTruthy(); + expect(screen.queryByText("Description")).toBeTruthy(); + expect(screen.queryByText("Header")).toBeTruthy(); + expect(screen.queryByText("Title")).toBeTruthy(); + expect(screen.queryByText("Paragraph")).toBeTruthy(); + expect(screen.queryByText("Text")).toBeTruthy(); + expect(tree).toMatchSnapshot(); + }); + it("Alignment", () => { + const r = render( + React.createElement(Markdown, { + value: ` +| Syntax | Description | Test Text | +| :--- | :----: | ---: | +| Header | Title | Here's this | +| Paragraph | Text | And more | + `, + }), + ); + const tree = r.toJSON(); + expect(screen.queryByText("Syntax")).toBeTruthy(); + expect(screen.queryByText("Description")).toBeTruthy(); + expect(screen.queryByText("Test Text")).toBeTruthy(); + expect(screen.queryByText("Header")).toBeTruthy(); + expect(screen.queryByText("Title")).toBeTruthy(); + expect(screen.queryByText("Here's this")).toBeTruthy(); + expect(screen.queryByText("Paragraph")).toBeTruthy(); + expect(screen.queryByText("Text")).toBeTruthy(); + expect(screen.queryByText("And more")).toBeTruthy(); + expect(tree).toMatchSnapshot(); + }); + it("Pipe Character", () => { + const r = render( + React.createElement(Markdown, { + value: ` +| Syntax | Description | Test Text | +| :-------- | :---------: | --------------: | +| Header | Title | Here's \\| this | +| Paragraph | Text | And more | + `, + }), + ); + const tree = r.toJSON(); + expect(screen.queryByText("Syntax")).toBeTruthy(); + expect(screen.queryByText("Description")).toBeTruthy(); + expect(screen.queryByText("Test Text")).toBeTruthy(); + expect(screen.queryByText("Header")).toBeTruthy(); + expect(screen.queryByText("Title")).toBeTruthy(); + expect(screen.queryByText("Here's | this")).toBeTruthy(); + expect(screen.queryByText("Paragraph")).toBeTruthy(); + expect(screen.queryByText("Text")).toBeTruthy(); + expect(screen.queryByText("And more")).toBeTruthy(); + expect(tree).toMatchSnapshot(); + }); + it("Emphasis, Code, Links", () => { + const r = render( + React.createElement(Markdown, { + value: ` +| _This will also be italic_ | _You **can** combine them_ | +| -------------------------- | :-----------------------------------: | +| **left foo** | _right foo_ | +| \`left bar\` | right bar | +| ~~left baz~~ | right [link](https://duckduckgo.com). | + `, + }), + ); + const tree = r.toJSON(); + expect(screen.queryByText("This will also be italic")).toBeTruthy(); + expect(screen.queryByText("You can combine them")).toBeTruthy(); + expect(screen.queryByText("left foo")).toBeTruthy(); + expect(screen.queryByText("right foo")).toBeTruthy(); + expect(screen.queryByText("left bar")).toBeTruthy(); + expect(screen.queryByText("right bar")).toBeTruthy(); + expect(screen.queryByText("left baz")).toBeTruthy(); + expect(screen.queryByText("link")).toBeTruthy(); + expect(tree).toMatchSnapshot(); + }); + it("Images", async () => { + const r = render( + React.createElement(Markdown, { + value: ` +| Hello | +| :-----------------------------------------------------------------: | +| Bingo ![](https://goo.gl/1R3T6h "Tonejito") This also works for me. | + `, + }), + ); + await waitFor(() => { + expect( + screen.queryAllByTestId("react-native-marked-md-image"), + ).toBeDefined(); + const tree = r.toJSON(); + expect(screen.queryByText("Hello")).toBeTruthy(); + expect(screen.queryByText("Bingo")).toBeTruthy(); + expect(screen.queryByText("This also works for me.")).toBeTruthy(); + expect(tree).toMatchSnapshot(); + }); + }); +}); +describe("Renderer override", () => { + it("Custom", () => { + const fn = jest.fn((text, styles) => + React.createElement(Text, { style: styles, key: "key-1" }, text), + ); + const style = { + color: "#ff0000", + }; + class CustomRenderer extends Renderer { + codespan = fn; + } + const r = render( + React.createElement(Markdown, { + value: "`hello`", + renderer: new CustomRenderer(), + styles: { codespan: { ...style } }, + }), + ); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + expect(screen.queryByText("hello")).toBeTruthy(); + }); +}); +describe("Tokenizer", () => { + it("Custom", () => { + const codespanFn = jest.fn((text, styles) => + React.createElement(Text, { style: styles, key: "key-1" }, text), + ); + const customFn = jest.fn((_identifier, _raw, _children, args = {}) => { + const text = args.text ?? ""; + return React.createElement(Text, { key: "custom-token" }, text); + }); + const style = { + color: "#ff0000", + }; + class CustomRenderer extends Renderer { + codespan = codespanFn; + custom = customFn; + } + class CustomTokenizer extends Tokenizer { + codespan(src) { + const match = src.match(/^\$+([^\$\n]+?)\$+/); + if (match?.[1]) { + return { + type: "codespan", + raw: match[0], + text: match[1].trim(), + }; + } + return super.codespan(src); + } + } + const r = render( + React.createElement(Markdown, { + value: "$ latex code $\n\n`hello`", + renderer: new CustomRenderer(), + styles: { codespan: { ...style } }, + tokenizer: new CustomTokenizer(), + }), + ); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + expect(customFn).toHaveBeenCalledWith("latex", "$ latex code $", [], { + text: "latex code", + }); + expect(screen.queryByText("hello")).toBeTruthy(); + expect(screen.queryByText("latex code")).toBeTruthy(); + }); +}); diff --git a/src/lib/__tests__/Markdown.spec.tsx b/src/lib/__tests__/Markdown.spec.tsx index 94a3c421..d00b3554 100644 --- a/src/lib/__tests__/Markdown.spec.tsx +++ b/src/lib/__tests__/Markdown.spec.tsx @@ -3,8 +3,8 @@ import { render, screen, waitFor } from "@testing-library/react-native"; import { Text, type TextStyle } from "react-native"; import Markdown from "../Markdown"; import Renderer from "../Renderer"; -import { MarkedTokenizer } from "../../index"; -import type { CustomToken, RendererInterface } from "../types"; +import type { RendererInterface } from "../types"; +import { Tokenizer, type Tokens } from "marked"; // https://www.markdownguide.org/basic-syntax/#headings describe("Headings", () => { @@ -836,19 +836,15 @@ describe("Tokenizer", () => { custom = customFn; } - class CustomTokenizer extends MarkedTokenizer { - codespan(this: MarkedTokenizer, src: string) { + class CustomTokenizer extends Tokenizer { + codespan(src: string): Tokens.Codespan | undefined { const match = src.match(/^\$+([^\$\n]+?)\$+/); if (match?.[1]) { - const token: CustomToken = { - type: "custom", - raw: src, - identifier: "latex", - args: { - text: match[1].trim(), - }, + return { + type: "codespan", + raw: match[0], + text: match[1].trim(), }; - return token; } return super.codespan(src); diff --git a/src/lib/__tests__/Renderer.spec.d.ts b/src/lib/__tests__/Renderer.spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/lib/__tests__/Renderer.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/lib/__tests__/Renderer.spec.js b/src/lib/__tests__/Renderer.spec.js new file mode 100644 index 00000000..98313f66 --- /dev/null +++ b/src/lib/__tests__/Renderer.spec.js @@ -0,0 +1,232 @@ +import { Linking } from "react-native"; +import { + fireEvent, + render, + screen, + waitFor, +} from "@testing-library/react-native"; +import Renderer from "../Renderer"; +import getStyles from "./../../theme/styles"; +jest.mock("react-native/Libraries/Linking/Linking", () => ({ + openURL: jest.fn(() => Promise.resolve("mockResolve")), +})); +const renderer = new Renderer(); +const userStyles = { + text: { + fontSize: 24, + }, + list: { + padding: 24, + }, +}; +describe("Renderer", () => { + const themes = ["light", "dark"]; + for (const theme of themes) { + const styles = getStyles(userStyles, theme); + describe(`${theme} theme`, () => { + describe("Text Nodes", () => { + it("returns a Text node", () => { + const TextNode = renderer.text("Hello world", styles.text); + const r = render(TextNode); + expect(screen.queryByText("Hello world")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("returns a wrapped Text node", () => { + const TextNodeChild = renderer.text("Hello world", {}); + const TextNode = renderer.text([TextNodeChild], styles.text); + const r = render(TextNode); + expect(screen.queryByText("Hello world")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("returns a wrapped Text node with styles", () => { + const TextNodeChild = renderer.text("Hello world", styles.text); + const TextNode = renderer.text([TextNodeChild], styles.text); + const r = render(TextNode); + expect(screen.queryByText("Hello world")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + describe("Link Nodes", () => { + it("returns a Text Link node", () => { + const LinkNode = renderer.link( + "Link", + "https://example.com", + styles.link, + ); + const r = render(LinkNode); + expect(screen.queryByText("Link")).toBeTruthy(); + fireEvent.press(screen.queryByText("Link")); + expect(Linking.openURL).toHaveBeenCalled(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + describe("getImageLinkNode", () => { + it("returns a Image Link node", async () => { + const LinkNode = renderer.linkImage( + "https://example.com", + "https://dummyimage.com/100x100/fff/aaa", + "Hello world", + ); + await waitFor(() => { + const tree = render(LinkNode).toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + }); + describe("View Nodes", () => { + it("returns a paragraph View node", () => { + const TextNode = renderer.text("Hello world", styles.text); + const LinkNode = renderer.link( + "Link", + "https://example.com", + styles.link, + ); + const ViewNode = renderer.paragraph( + [TextNode, LinkNode], + styles.paragraph, + ); + const r = render(ViewNode); + expect(screen.queryByText("Hello world")).toBeTruthy(); + expect(screen.queryByText("Link")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("returns a hr View node", () => { + const ViewNode = renderer.hr(styles.hr); + const r = render(ViewNode); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + describe("Table Nodes", () => { + it("returns a Table", () => { + const TextNode1 = renderer.text("Hello world 1"); + const TextNode2 = renderer.text("Hello world 2", styles.strong); + const TextNode3 = renderer.text("Hello world 3", styles.em); + const TextNode4 = renderer.text("Hello world 4", styles.text); + const TextNode5 = renderer.text("Hello world 5", styles.link); + const headers = [[TextNode1], [TextNode2]]; + const rows = [[[TextNode3]], [[TextNode4, TextNode5]]]; + const Table = renderer.table( + headers, + rows, + styles.table, + styles.tableRow, + styles.tableCell, + ); + const r = render(Table); + expect(screen.queryByText("Hello world 1")).toBeTruthy(); + expect(screen.queryByText("Hello world 2")).toBeTruthy(); + expect(screen.queryByText("Hello world 3")).toBeTruthy(); + expect(screen.queryByText("Hello world 4")).toBeTruthy(); + expect(screen.queryByText("Hello world 5")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("returns a Table without styles", () => { + const TextNode1 = renderer.text("Hello world 1"); + const TextNode2 = renderer.text("Hello world 2", styles.strong); + const TextNode3 = renderer.text("Hello world 3", styles.em); + const TextNode4 = renderer.text("Hello world 4", styles.text); + const TextNode5 = renderer.text("Hello world 5", styles.link); + const headers = [[TextNode1], [TextNode2]]; + const rows = [[[TextNode3]], [[TextNode4, TextNode5]]]; + const Table = renderer.table(headers, rows); + const r = render(Table); + expect(screen.queryByText("Hello world 1")).toBeTruthy(); + expect(screen.queryByText("Hello world 2")).toBeTruthy(); + expect(screen.queryByText("Hello world 3")).toBeTruthy(); + expect(screen.queryByText("Hello world 4")).toBeTruthy(); + expect(screen.queryByText("Hello world 5")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + describe("getCodeBlockNode", () => { + it("returns a Code block (horizontal ScrollView)", () => { + const CodeBlock = renderer.code( + "print('hello')", + "", + styles.code, + styles.em, + ); + const r = render(CodeBlock); + expect(screen.queryByText("print('hello')")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + describe("getBlockquoteNode", () => { + it("returns a Blockquote", () => { + const TextNode = renderer.text("Hello world", styles.text); + const LinkNode = renderer.link( + "Link", + "https://example.com", + styles.link, + ); + const Blockquote = renderer.blockquote( + [TextNode, LinkNode], + styles.blockquote, + ); + const r = render(Blockquote); + expect(screen.queryByText("Hello world")).toBeTruthy(); + expect(screen.queryByText("Link")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + describe("getImageNode", () => { + it("returns a Image", async () => { + const ImageNode = renderer.image( + "https://picsum.photos/100/100", + "Hello world", + ); + await waitFor(() => { + const tree = render(ImageNode).toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + }); + describe("getListNode", () => { + it("returns Ordered List", () => { + const TextNode1 = renderer.text("Hello world 1", styles.li); + const TextNode2 = renderer.text("Hello world 2", styles.li); + const TextNode3 = renderer.text("Hello world 3", styles.li); + const OL = renderer.list( + true, + [TextNode1, TextNode2, TextNode3], + styles.list, + styles.li, + ); + const r = render(OL); + expect(screen.queryByText("Hello world 1")).toBeTruthy(); + expect(screen.queryByText("Hello world 2")).toBeTruthy(); + expect(screen.queryByText("Hello world 3")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + it("returns Un-Ordered List", () => { + const TextNode1 = renderer.text("Hello world 1", styles.li); + const TextNode2 = renderer.text("Hello world 2", styles.li); + const TextNode3 = renderer.text("Hello world 3", styles.li); + const OL = renderer.list( + false, + [TextNode1, TextNode2, TextNode3], + styles.list, + styles.li, + ); + const r = render(OL); + expect(screen.queryByText("Hello world 1")).toBeTruthy(); + expect(screen.queryByText("Hello world 2")).toBeTruthy(); + expect(screen.queryByText("Hello world 3")).toBeTruthy(); + const tree = r.toJSON(); + expect(tree).toMatchSnapshot(); + }); + }); + }); + } +}); diff --git a/src/lib/types.d.ts b/src/lib/types.d.ts new file mode 100644 index 00000000..f540ff6f --- /dev/null +++ b/src/lib/types.d.ts @@ -0,0 +1,81 @@ +import type { ReactNode } from "react"; +import type { + FlatListProps, + ViewStyle, + TextStyle, + ImageStyle, +} from "react-native"; +import type { MarkedStyles, UserTheme } from "./../theme/types"; +import type { Tokenizer } from "marked"; +export interface ParserOptions { + styles?: MarkedStyles; + baseUrl?: string; + renderer: RendererInterface; +} +export interface MarkdownProps extends Partial { + value: string; + flatListProps?: Omit< + FlatListProps, + "data" | "renderItem" | "horizontal" + >; + theme?: UserTheme; + tokenizer?: Tokenizer; +} +export type TableColAlignment = "center" | "left" | "right" | null; +export interface RendererInterface { + paragraph(children: ReactNode[], styles?: ViewStyle): ReactNode; + blockquote(children: ReactNode[], styles?: ViewStyle): ReactNode; + heading( + text: string | ReactNode[], + styles?: TextStyle, + depth?: number, + ): ReactNode; + code( + text: string, + language?: string, + containerStyle?: ViewStyle, + textStyle?: TextStyle, + ): ReactNode; + hr(styles?: ViewStyle): ReactNode; + listItem(children: ReactNode[], styles?: ViewStyle): ReactNode; + list( + ordered: boolean, + li: ReactNode[], + listStyle?: ViewStyle, + textStyle?: TextStyle, + startIndex?: number, + ): ReactNode; + escape(text: string, styles?: TextStyle): ReactNode; + link( + children: string | ReactNode[], + href: string, + styles?: TextStyle, + ): ReactNode; + image(uri: string, alt?: string, style?: ImageStyle): ReactNode; + strong(children: string | ReactNode[], styles?: TextStyle): ReactNode; + em(children: string | ReactNode[], styles?: TextStyle): ReactNode; + codespan(text: string, styles?: TextStyle): ReactNode; + br(): ReactNode; + del(children: string | ReactNode[], styles?: TextStyle): ReactNode; + text(text: string | ReactNode[], styles?: TextStyle): ReactNode; + html(text: string | ReactNode[], styles?: TextStyle): ReactNode; + linkImage( + href: string, + imageUrl: string, + alt?: string, + style?: ImageStyle, + ): ReactNode; + table( + header: ReactNode[][], + rows: ReactNode[][][], + tableStyle?: ViewStyle, + rowStyle?: ViewStyle, + cellStyle?: ViewStyle, + ): ReactNode; + custom( + identifier: string, + raw: string, + children?: ReactNode[], + args?: Record, + ): ReactNode; +} diff --git a/src/lib/types.js b/src/lib/types.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/lib/types.js @@ -0,0 +1 @@ +export {}; diff --git a/src/lib/types.ts b/src/lib/types.ts index 025c3533..74bbbb21 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -6,7 +6,7 @@ import type { ImageStyle, } from "react-native"; import type { MarkedStyles, UserTheme } from "./../theme/types"; -// import type { Tokenizer as MarkedTokenizer } from "marked"; +import type { Tokenizer } from "marked"; export interface ParserOptions { styles?: MarkedStyles; @@ -21,7 +21,7 @@ export interface MarkdownProps extends Partial { "data" | "renderItem" | "horizontal" >; theme?: UserTheme; - // tokenizer?: MarkedTokenizer; + tokenizer?: Tokenizer; } export type TableColAlignment = "center" | "left" | "right" | null; diff --git a/src/theme/__tests__/styles.spec.d.ts b/src/theme/__tests__/styles.spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/theme/__tests__/styles.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/theme/__tests__/styles.spec.js b/src/theme/__tests__/styles.spec.js new file mode 100644 index 00000000..4737ae1e --- /dev/null +++ b/src/theme/__tests__/styles.spec.js @@ -0,0 +1,198 @@ +import colors from "../colors"; +import getStyles from "./../styles"; +describe("getStyles", () => { + it("light scheme", () => { + const styles = getStyles({}, "light"); + expect(styles.text?.color).toBe(colors.light.text); + }); + it("dark scheme", () => { + const styles = getStyles({}, "dark"); + expect(styles.text?.color).toBe(colors.dark.text); + }); + it("default scheme", () => { + const styles = getStyles({}, null); + expect(styles.text?.color).toBe(colors.light.text); + }); + it("user styles, light scheme", () => { + const styles = getStyles( + { + text: { + color: "#aaa", + padding: 2, + }, + }, + "light", + ); + expect(styles.text?.color).toBe("#aaa"); + expect(styles.text?.padding).toBe(2); + }); + it("user styles, dark scheme", () => { + const styles = getStyles( + { + text: { + color: "#aaa", + padding: 2, + }, + }, + "dark", + ); + expect(styles.text?.color).toBe("#aaa"); + expect(styles.text?.padding).toBe(2); + }); + it("user styles, default scheme", () => { + const styles = getStyles( + { + text: { + color: "#aaa", + padding: 2, + }, + }, + null, + ); + expect(styles.text?.color).toBe("#aaa"); + expect(styles.text?.padding).toBe(2); + }); + it("light scheme, custom theme", () => { + const customColors = { + background: "#aaa", + code: "#bbb", + text: "#ccc", + link: "#ddd", + border: "#eee", + }; + const styles = getStyles({}, "light", { colors: customColors }); + expect(styles.code?.backgroundColor).toBe(customColors.code); + expect(styles.text?.color).toBe(customColors.text); + expect(styles.link?.color).toBe(customColors.link); + expect(styles.hr?.borderBottomColor).toBe(customColors.border); + }); + it("dark scheme, custom theme", () => { + const customColors = { + background: "#aaa", + code: "#bbb", + text: "#ccc", + link: "#ddd", + border: "#eee", + }; + const styles = getStyles({}, "dark", { colors: customColors }); + expect(styles.code?.backgroundColor).toBe(customColors.code); + expect(styles.text?.color).toBe(customColors.text); + expect(styles.link?.color).toBe(customColors.link); + expect(styles.hr?.borderBottomColor).toBe(customColors.border); + }); + it("default scheme, custom theme", () => { + const customColors = { + background: "#aaa", + code: "#bbb", + text: "#ccc", + link: "#ddd", + border: "#eee", + }; + const styles = getStyles({}, null, { colors: customColors }); + expect(styles.code?.backgroundColor).toBe(customColors.code); + expect(styles.text?.color).toBe(customColors.text); + expect(styles.link?.color).toBe(customColors.link); + expect(styles.hr?.borderBottomColor).toBe(customColors.border); + }); + it("light scheme, custom theme, spacing", () => { + const customColors = { + background: "#aaa", + code: "#bbb", + text: "#ccc", + link: "#ddd", + border: "#eee", + }; + const spacing = { xs: 10, s: 20, m: 30, l: 40 }; + const styles = getStyles({}, "light", { spacing, colors: customColors }); + expect(styles.code?.backgroundColor).toBe(customColors.code); + expect(styles.text?.color).toBe(customColors.text); + expect(styles.link?.color).toBe(customColors.link); + expect(styles.hr?.borderBottomColor).toBe(customColors.border); + expect(styles.h6?.marginVertical).toBe(spacing.xs); + expect(styles.h1?.paddingBottom).toBe(spacing.s); + expect(styles.h1?.marginVertical).toBe(spacing.m); + expect(styles.code?.padding).toBe(spacing.l); + }); + it("dark scheme, custom theme, spacing", () => { + const customColors = { + background: "#aaa", + code: "#bbb", + text: "#ccc", + link: "#ddd", + border: "#eee", + }; + const spacing = { xs: 10, s: 20, m: 30, l: 40 }; + const styles = getStyles({}, "dark", { spacing, colors: customColors }); + expect(styles.code?.backgroundColor).toBe(customColors.code); + expect(styles.text?.color).toBe(customColors.text); + expect(styles.link?.color).toBe(customColors.link); + expect(styles.hr?.borderBottomColor).toBe(customColors.border); + expect(styles.h6?.marginVertical).toBe(spacing.xs); + expect(styles.h1?.paddingBottom).toBe(spacing.s); + expect(styles.h1?.marginVertical).toBe(spacing.m); + expect(styles.code?.padding).toBe(spacing.l); + }); + it("default scheme, custom theme, spacing", () => { + const customColors = { + background: "#aaa", + code: "#bbb", + text: "#ccc", + link: "#ddd", + border: "#eee", + }; + const spacing = { xs: 10, s: 20, m: 30, l: 40 }; + const styles = getStyles({}, null, { spacing, colors: customColors }); + expect(styles.code?.backgroundColor).toBe(customColors.code); + expect(styles.text?.color).toBe(customColors.text); + expect(styles.link?.color).toBe(customColors.link); + expect(styles.hr?.borderBottomColor).toBe(customColors.border); + expect(styles.h6?.marginVertical).toBe(spacing.xs); + expect(styles.h1?.paddingBottom).toBe(spacing.s); + expect(styles.h1?.marginVertical).toBe(spacing.m); + expect(styles.code?.padding).toBe(spacing.l); + }); + it("user styles, custom theme, spacing", () => { + const customColors = { + background: "#aaa", + code: "#bbb", + text: "#ccc", + link: "#ddd", + border: "#eee", + }; + const spacing = { xs: 10, s: 20, m: 30, l: 40 }; + const userStyles = { + code: { + backgroundColor: "#222", + padding: 4, + }, + text: { + color: "#333", + }, + link: { + color: "#444", + }, + hr: { + borderBottomColor: "#555", + }, + h1: { + paddingBottom: 2, + marginVertical: 3, + }, + h6: { + marginVertical: 1, + }, + }; + const styles = getStyles(userStyles, "light", { + spacing, + colors: customColors, + }); + expect(styles.code?.backgroundColor).toBe("#222"); + expect(styles.text?.color).toBe("#333"); + expect(styles.link?.color).toBe("#444"); + expect(styles.hr?.borderBottomColor).toBe("#555"); + expect(styles.h6?.marginVertical).toBe(1); + expect(styles.h1?.paddingBottom).toBe(2); + expect(styles.h1?.marginVertical).toBe(3); + expect(styles.code?.padding).toBe(4); + }); +}); diff --git a/src/theme/colors.d.ts b/src/theme/colors.d.ts new file mode 100644 index 00000000..822ab9a3 --- /dev/null +++ b/src/theme/colors.d.ts @@ -0,0 +1,13 @@ +import type { ColorValue } from "react-native"; +export interface ColorsPropType { + code: ColorValue; + link: ColorValue; + text: ColorValue; + border: ColorValue; + /** + * @deprecated Use flatlist containerStyle or style prop for setting background color + */ + background?: ColorValue; +} +declare const colors: Record<"light" | "dark", ColorsPropType>; +export default colors; diff --git a/src/theme/colors.js b/src/theme/colors.js new file mode 100644 index 00000000..f6aca4e4 --- /dev/null +++ b/src/theme/colors.js @@ -0,0 +1,17 @@ +const colors = { + light: { + background: "#ffffff", + code: "#f6f8fa", + link: "#58a6ff", + text: "#333333", + border: "#d0d7de", + }, + dark: { + background: "#000000", + code: "#161b22", + link: "#58a6ff", + text: "#ffffff", + border: "#30363d", + }, +}; +export default colors; diff --git a/src/theme/spacing.d.ts b/src/theme/spacing.d.ts new file mode 100644 index 00000000..b79c8932 --- /dev/null +++ b/src/theme/spacing.d.ts @@ -0,0 +1,3 @@ +export type SpacingKeysType = "xs" | "s" | "m" | "l"; +declare const padding: Record; +export default padding; diff --git a/src/theme/spacing.js b/src/theme/spacing.js new file mode 100644 index 00000000..370f21dd --- /dev/null +++ b/src/theme/spacing.js @@ -0,0 +1,7 @@ +const padding = { + xs: 2, + s: 4, + m: 8, + l: 16, +}; +export default padding; diff --git a/src/theme/styles.d.ts b/src/theme/styles.d.ts new file mode 100644 index 00000000..4bf1c3d9 --- /dev/null +++ b/src/theme/styles.d.ts @@ -0,0 +1,8 @@ +import type { ColorSchemeName } from "react-native"; +import type { MarkedStyles, UserTheme } from "./types"; +declare const getStyles: ( + userStyles?: MarkedStyles, + colorScheme?: ColorSchemeName, + userTheme?: UserTheme, +) => MarkedStyles; +export default getStyles; diff --git a/src/theme/styles.js b/src/theme/styles.js new file mode 100644 index 00000000..252c4c4b --- /dev/null +++ b/src/theme/styles.js @@ -0,0 +1,189 @@ +import { StyleSheet } from "react-native"; +import spacing from "./spacing"; +import colors, {} from "./colors"; +const getFontStyles = (mdColors) => { + return StyleSheet.create({ + regular: { + fontSize: 16, + lineHeight: 24, + color: mdColors.text, + }, + heading: { + fontWeight: "500", + color: mdColors.text, + }, + }); +}; +const getStyles = (userStyles, colorScheme, userTheme) => { + const mdColors = { ...colors[colorScheme || "light"], ...userTheme?.colors }; + const mdSpacing = { ...spacing, ...userTheme?.spacing }; + const fontStyle = getFontStyles(mdColors); + return StyleSheet.create({ + em: StyleSheet.flatten([ + fontStyle.regular, + { + fontStyle: "italic", + }, + userStyles?.em, + ]), + strong: StyleSheet.flatten([ + fontStyle.regular, + { + fontWeight: "bold", + }, + userStyles?.strong, + ]), + strikethrough: StyleSheet.flatten([ + fontStyle.regular, + { + textDecorationLine: "line-through", + textDecorationStyle: "solid", + }, + userStyles?.strikethrough, + ]), + text: StyleSheet.flatten([fontStyle.regular, userStyles?.text]), + paragraph: StyleSheet.flatten([ + fontStyle.regular, + { + paddingVertical: mdSpacing.m, + }, + userStyles?.paragraph, + ]), + link: StyleSheet.flatten([ + fontStyle.regular, + { + fontStyle: "italic", + color: mdColors.link, + }, + userStyles?.link, + ]), + blockquote: StyleSheet.flatten([ + { + borderLeftColor: mdColors.border, + paddingLeft: mdSpacing.l, + borderLeftWidth: mdSpacing.s, + opacity: 0.8, + }, + userStyles?.blockquote, + ]), + h1: StyleSheet.flatten([ + fontStyle.heading, + { + fontSize: 32, + lineHeight: 40, + fontWeight: "bold", + marginVertical: mdSpacing.m, + letterSpacing: 0, + paddingBottom: mdSpacing.s, + borderBottomColor: mdColors.border, + borderBottomWidth: 1, + }, + userStyles?.h1, + ]), + h2: StyleSheet.flatten([ + fontStyle.heading, + { + fontSize: 28, + lineHeight: 36, + marginVertical: mdSpacing.m, + paddingBottom: mdSpacing.s, + borderBottomColor: mdColors.border, + borderBottomWidth: 1, + }, + userStyles?.h2, + ]), + h3: StyleSheet.flatten([ + fontStyle.heading, + { + fontSize: 24, + lineHeight: 32, + marginVertical: mdSpacing.s, + }, + userStyles?.h3, + ]), + h4: StyleSheet.flatten([ + fontStyle.heading, + { + fontSize: 22, + lineHeight: 28, + marginVertical: mdSpacing.s, + }, + userStyles?.h4, + ]), + h5: StyleSheet.flatten([ + fontStyle.regular, + fontStyle.heading, + { + marginVertical: mdSpacing.xs, + }, + userStyles?.h5, + ]), + h6: StyleSheet.flatten([ + fontStyle.heading, + { + fontSize: 14, + lineHeight: 20, + marginVertical: mdSpacing.xs, + }, + userStyles?.h6, + ]), + codespan: StyleSheet.flatten([ + fontStyle.regular, + { + fontStyle: "italic", + backgroundColor: mdColors.code, + fontWeight: "300", + }, + userStyles?.codespan, + ]), + code: StyleSheet.flatten([ + { + padding: mdSpacing.l, + backgroundColor: mdColors.code, + minWidth: "100%", + }, + userStyles?.code, + ]), + hr: StyleSheet.flatten([ + { + borderBottomWidth: 1, + borderBottomColor: mdColors.border, + marginVertical: mdSpacing.s, + }, + userStyles?.hr, + ]), + li: StyleSheet.flatten([ + fontStyle.regular, + { + flexShrink: 1, + }, + userStyles?.li, + ]), + image: StyleSheet.flatten([ + { + resizeMode: "cover", + }, + userStyles?.image, + ]), + table: StyleSheet.flatten([ + { + borderWidth: 1, + borderColor: mdColors.border, + }, + userStyles?.table, + ]), + tableRow: StyleSheet.flatten([ + { + flexDirection: "row", + }, + userStyles?.tableRow, + ]), + tableCell: StyleSheet.flatten([ + { + padding: mdSpacing.s, + }, + userStyles?.tableCell, + ]), + }); +}; +export default getStyles; diff --git a/src/theme/types.d.ts b/src/theme/types.d.ts new file mode 100644 index 00000000..b7efc116 --- /dev/null +++ b/src/theme/types.d.ts @@ -0,0 +1,31 @@ +import type { ImageStyle, TextStyle, ViewStyle } from "react-native"; +import type { ColorsPropType } from "./colors"; +import type { SpacingKeysType } from "./spacing"; +export interface MarkedStyles { + em?: TextStyle; + strong?: TextStyle; + strikethrough?: TextStyle; + text?: TextStyle; + paragraph?: ViewStyle; + link?: TextStyle; + blockquote?: ViewStyle; + h1?: TextStyle; + h2?: TextStyle; + h3?: TextStyle; + h4?: TextStyle; + h5?: TextStyle; + h6?: TextStyle; + codespan?: TextStyle; + code?: ViewStyle; + hr?: ViewStyle; + list?: ViewStyle; + li?: TextStyle; + image?: ImageStyle; + table?: ViewStyle; + tableRow?: ViewStyle; + tableCell?: ViewStyle; +} +export interface UserTheme { + colors?: ColorsPropType; + spacing?: Record; +} diff --git a/src/theme/types.js b/src/theme/types.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/theme/types.js @@ -0,0 +1 @@ +export {}; diff --git a/src/utils/__tests__/handlers.spec.d.ts b/src/utils/__tests__/handlers.spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/utils/__tests__/handlers.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/utils/__tests__/handlers.spec.js b/src/utils/__tests__/handlers.spec.js new file mode 100644 index 00000000..67a2dcf8 --- /dev/null +++ b/src/utils/__tests__/handlers.spec.js @@ -0,0 +1,18 @@ +import { Linking } from "react-native"; +import { onLinkPress } from "../handlers"; +jest.mock("react-native/Libraries/Linking/Linking", () => ({ + openURL: jest.fn(() => Promise.resolve("mockResolve")), +})); +describe("onLinkPress", () => { + it("Good url", async () => { + const cb = onLinkPress("https://example.com"); + cb.call(null); + expect(Linking.openURL).toHaveBeenCalled(); + }); + it("Bad url", async () => { + Linking.openURL = jest.fn(() => Promise.reject("mockReject")); + const cb = onLinkPress("example"); + cb.call(null); + expect(Linking.openURL).toHaveBeenCalled(); + }); +}); diff --git a/src/utils/__tests__/svg.spec.d.ts b/src/utils/__tests__/svg.spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/utils/__tests__/svg.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/utils/__tests__/svg.spec.js b/src/utils/__tests__/svg.spec.js new file mode 100644 index 00000000..9a1b0168 --- /dev/null +++ b/src/utils/__tests__/svg.spec.js @@ -0,0 +1,222 @@ +import { getSvgDimensions } from "../svg"; +describe("getSvgDimensions", () => { + it("svg with width, height, viewBox attribute", () => { + expect(getSvgDimensions(SVG_WITH_WIDTH_HEIGHT)).toStrictEqual({ + width: 800, + height: 800, + viewBox: "0 0 64 64", + }); + }); + it("svg without width, height", () => { + expect(getSvgDimensions(SVG_WITHOUT_WIDTH_HEIGHT)).toStrictEqual({ + width: 0, + height: 0, + viewBox: "0 0 64 64", + }); + }); + it("svg without width, height, viewBox", () => { + expect(getSvgDimensions(SVG_WITHOUT_WIDTH_HEIGHT_VIEW_BOX)).toStrictEqual({ + width: 0, + height: 0, + viewBox: "", + }); + }); +}); +const SVG_WITH_WIDTH_HEIGHT = ` + + + + + + + + + + + + + + + + + + + + + + +`; +const SVG_WITHOUT_WIDTH_HEIGHT = ` + + + + + + + + + + + + + + + + + + + + + + +`; +const SVG_WITHOUT_WIDTH_HEIGHT_VIEW_BOX = ` + + + + + + + + + + + + + + + + + + + + + + +`; diff --git a/src/utils/__tests__/table.spec.d.ts b/src/utils/__tests__/table.spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/utils/__tests__/table.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/utils/__tests__/table.spec.js b/src/utils/__tests__/table.spec.js new file mode 100644 index 00000000..592d294c --- /dev/null +++ b/src/utils/__tests__/table.spec.js @@ -0,0 +1,49 @@ +import { getTableWidthArr, getTableColAlignmentStyle } from "./../table"; +describe("getTableWidthArr", () => { + const windowWidth = 360; + const colWidth = Math.floor(360 * (1.3 / 3)); + it("negative", () => { + expect(getTableWidthArr(-2, windowWidth)).toStrictEqual([]); + }); + it("zero", () => { + expect(getTableWidthArr(0, windowWidth)).toStrictEqual([]); + }); + it("positive", () => { + expect(getTableWidthArr(2, windowWidth)).toStrictEqual( + Array(2).fill(colWidth), + ); + }); + it("random", () => { + const random = Math.floor(100 * Math.random()); + expect(getTableWidthArr(random, windowWidth)).toStrictEqual( + Array(random).fill(colWidth), + ); + }); +}); +describe("getTableColAlignmentStyle", () => { + it("center", () => { + expect(getTableColAlignmentStyle("center")).toStrictEqual({ + textAlign: "center", + }); + }); + it("left", () => { + expect(getTableColAlignmentStyle("left")).toStrictEqual({ + textAlign: "left", + }); + }); + it("right", () => { + expect(getTableColAlignmentStyle("right")).toStrictEqual({ + textAlign: "right", + }); + }); + it("undefined", () => { + expect(getTableColAlignmentStyle()).toStrictEqual({ + textAlign: "left", + }); + }); + it("null", () => { + expect(getTableColAlignmentStyle(null)).toStrictEqual({ + textAlign: "left", + }); + }); +}); diff --git a/src/utils/__tests__/url.spec.d.ts b/src/utils/__tests__/url.spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/utils/__tests__/url.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/utils/__tests__/url.spec.js b/src/utils/__tests__/url.spec.js new file mode 100644 index 00000000..788d07a9 --- /dev/null +++ b/src/utils/__tests__/url.spec.js @@ -0,0 +1,45 @@ +import { getValidURL } from "../url"; +describe("getValidURL", () => { + it("abs with http prefix", () => { + expect( + getValidURL("https://www.example.com", "http://www.example.com/path"), + ).toBe("http://www.example.com/path"); + }); + it("abs with https prefix", () => { + expect( + getValidURL("https://www.example.com", "https://www.example.com/path"), + ).toBe("https://www.example.com/path"); + }); + it("abs with no prefix", () => { + expect(getValidURL("https://www.example.com", "/path")).toBe( + "https://www.example.com/path", + ); + }); + it("relative with no prefix", () => { + expect(getValidURL("https://www.example.com", "path")).toBe( + "https://www.example.com/path", + ); + }); + it("prefix with trailing slash", () => { + expect(getValidURL("https://www.example.com/", "path")).toBe( + "https://www.example.com/path", + ); + }); + it("empty prefix", () => { + expect(getValidURL("", "path")).toBe("/path"); + }); + it("ignores prefix value for non-http URLs", () => { + expect(getValidURL("", "mailto:example.com")).toBe("mailto:example.com"); + expect(getValidURL("https://www.example.com", "mailto:example.com")).toBe( + "mailto:example.com", + ); + expect(getValidURL("", "tel:0123456789")).toBe("tel:0123456789"); + expect(getValidURL("https://www.example.com", "tel:0123456789")).toBe( + "tel:0123456789", + ); + expect(getValidURL("", "slack://open")).toBe("slack://open"); + expect(getValidURL("https://www.example.com", "slack://open")).toBe( + "slack://open", + ); + }); +}); diff --git a/src/utils/handlers.d.ts b/src/utils/handlers.d.ts new file mode 100644 index 00000000..08b63da1 --- /dev/null +++ b/src/utils/handlers.d.ts @@ -0,0 +1 @@ +export declare const onLinkPress: (url: string) => () => void; diff --git a/src/utils/handlers.js b/src/utils/handlers.js new file mode 100644 index 00000000..c11110b8 --- /dev/null +++ b/src/utils/handlers.js @@ -0,0 +1,8 @@ +import { Linking } from "react-native"; +export const onLinkPress = (url) => () => { + Linking.openURL(url) + .then(() => null) + .catch((e) => { + console.warn("URL can't be opened", e); + }); +}; diff --git a/src/utils/svg.d.ts b/src/utils/svg.d.ts new file mode 100644 index 00000000..1897d346 --- /dev/null +++ b/src/utils/svg.d.ts @@ -0,0 +1,5 @@ +export declare const getSvgDimensions: (svg: string) => { + width: number; + height: number; + viewBox: string; +}; diff --git a/src/utils/svg.js b/src/utils/svg.js new file mode 100644 index 00000000..9be614e3 --- /dev/null +++ b/src/utils/svg.js @@ -0,0 +1,10 @@ +import { parse } from "svg-parser"; +export const getSvgDimensions = (svg) => { + const parsed = parse(svg); + const rootChild = parsed.children[0]; + return { + width: Number.parseInt(String(rootChild.properties?.width ?? "0")), + height: Number.parseInt(String(rootChild.properties?.height ?? "0")), + viewBox: String(rootChild.properties?.viewBox ?? ""), + }; +}; diff --git a/src/utils/table.d.ts b/src/utils/table.d.ts new file mode 100644 index 00000000..cced791c --- /dev/null +++ b/src/utils/table.d.ts @@ -0,0 +1,9 @@ +import type { TextStyle } from "react-native"; +import type { TableColAlignment } from "../lib/types"; +export declare const getTableWidthArr: ( + totalCols: number, + windowWidth: number, +) => number[]; +export declare const getTableColAlignmentStyle: ( + alignment?: TableColAlignment, +) => TextStyle; diff --git a/src/utils/table.js b/src/utils/table.js new file mode 100644 index 00000000..20c39bee --- /dev/null +++ b/src/utils/table.js @@ -0,0 +1,22 @@ +export const getTableWidthArr = (totalCols, windowWidth) => { + if (totalCols < 1) { + return []; + } + return Array(totalCols) + .fill(0) + .map(() => { + return Math.floor(windowWidth * (1.3 / 3)); + }); +}; +export const getTableColAlignmentStyle = (alignment) => { + switch (alignment) { + case "center": + return { textAlign: "center" }; + case "left": + return { textAlign: "left" }; + case "right": + return { textAlign: "right" }; + default: + return { textAlign: "left" }; + } +}; diff --git a/src/utils/url.d.ts b/src/utils/url.d.ts new file mode 100644 index 00000000..9ae161f6 --- /dev/null +++ b/src/utils/url.d.ts @@ -0,0 +1 @@ +export declare const getValidURL: (prefix: string, path: string) => string; diff --git a/src/utils/url.js b/src/utils/url.js new file mode 100644 index 00000000..7e77e426 --- /dev/null +++ b/src/utils/url.js @@ -0,0 +1,19 @@ +export const getValidURL = (prefix, path) => { + let _prefix = prefix; + // remove trailing slash from prefix + if (_prefix.endsWith("/")) { + _prefix = _prefix.slice(0, -1); + } + // consider path a valid url if it starts with a scheme name followed by a semicolon + // i.e. https://example.com, mailto:person@example.com, tel:1234567, slack://open + const urlPattern = /^[a-z]+:/i; + if (urlPattern.test(path)) { + return path; + } + // absolute path + if (path.startsWith("/")) { + return `${_prefix}${path}`; + } + // relative path + return `${_prefix}/${path}`; +}; From a57a546762785d448e3f682ef13dc96e63d70090 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 12:26:35 +0530 Subject: [PATCH 03/17] chore: update marked to latest --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0f079681..1e374ae6 100644 --- a/package.json +++ b/package.json @@ -158,7 +158,7 @@ "@jsamr/react-native-li": "2.3.1", "github-slugger": "2.0.0", "html-entities": "2.5.2", - "marked": "14.1.1", + "marked": "15.0.6", "react-native-table-component": "1.2.2", "svg-parser": "2.0.4" }, diff --git a/yarn.lock b/yarn.lock index c05b1625..7c59645a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9039,10 +9039,10 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" -marked@14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/marked/-/marked-14.1.1.tgz#83a8da67de6b236420e9cfb30e6f774cfb40255f" - integrity sha512-eS59oxof5eBVDCKTs+mJbvB/6Vq137GbimF9wkTIlto2/B2ppY5nigUUQgKVmA3bI2mPTIshUyDj5j612ZxlQQ== +marked@15.0.6: + version "15.0.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-15.0.6.tgz#8165f16afb6f4b30a35bdcee657c3b8415820a8f" + integrity sha512-Y07CUOE+HQXbVDCGl3LXggqJDbXDP2pArc2C1N1RRMN0ONiShoSsIInMd5Gsxupe7fKLpgimTV+HOJ9r7bA+pg== marky@^1.2.2: version "1.2.5" From ccf8a51c5620dea7a4d15d18db9ce6d9cae1ccaa Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 12:36:58 +0530 Subject: [PATCH 04/17] chore: remove tsc gen files --- src/components/MDImage.d.ts | 10 - src/components/MDImage.js | 58 -- src/components/MDSvg.d.ts | 7 - src/components/MDSvg.js | 78 --- src/hooks/useMarkdown.d.ts | 18 - src/hooks/useMarkdown.js | 29 - src/index.d.ts | 18 - src/index.js | 7 - src/lib/Markdown.d.ts | 14 - src/lib/Markdown.js | 39 -- src/lib/Parser.d.ts | 16 - src/lib/Parser.js | 283 -------- src/lib/Renderer.d.ts | 65 -- src/lib/Renderer.js | 193 ------ src/lib/__perf__/Markdown.perf-test.d.ts | 1 - src/lib/__perf__/Markdown.perf-test.js | 277 -------- src/lib/__tests__/Markdown.spec.d.ts | 1 - src/lib/__tests__/Markdown.spec.js | 845 ----------------------- src/lib/__tests__/Renderer.spec.d.ts | 1 - src/lib/__tests__/Renderer.spec.js | 232 ------- src/lib/types.d.ts | 81 --- src/lib/types.js | 1 - src/theme/__tests__/styles.spec.d.ts | 1 - src/theme/__tests__/styles.spec.js | 198 ------ src/theme/colors.d.ts | 13 - src/theme/colors.js | 17 - src/theme/spacing.d.ts | 3 - src/theme/spacing.js | 7 - src/theme/styles.d.ts | 8 - src/theme/styles.js | 189 ----- src/theme/types.d.ts | 31 - src/theme/types.js | 1 - src/utils/__tests__/handlers.spec.d.ts | 1 - src/utils/__tests__/handlers.spec.js | 18 - src/utils/__tests__/svg.spec.d.ts | 1 - src/utils/__tests__/svg.spec.js | 222 ------ src/utils/__tests__/table.spec.d.ts | 1 - src/utils/__tests__/table.spec.js | 49 -- src/utils/__tests__/url.spec.d.ts | 1 - src/utils/__tests__/url.spec.js | 45 -- src/utils/handlers.d.ts | 1 - src/utils/handlers.js | 8 - src/utils/svg.d.ts | 5 - src/utils/svg.js | 10 - src/utils/table.d.ts | 9 - src/utils/table.js | 22 - src/utils/url.d.ts | 1 - src/utils/url.js | 19 - 48 files changed, 3155 deletions(-) delete mode 100644 src/components/MDImage.d.ts delete mode 100644 src/components/MDImage.js delete mode 100644 src/components/MDSvg.d.ts delete mode 100644 src/components/MDSvg.js delete mode 100644 src/hooks/useMarkdown.d.ts delete mode 100644 src/hooks/useMarkdown.js delete mode 100644 src/index.d.ts delete mode 100644 src/index.js delete mode 100644 src/lib/Markdown.d.ts delete mode 100644 src/lib/Markdown.js delete mode 100644 src/lib/Parser.d.ts delete mode 100644 src/lib/Parser.js delete mode 100644 src/lib/Renderer.d.ts delete mode 100644 src/lib/Renderer.js delete mode 100644 src/lib/__perf__/Markdown.perf-test.d.ts delete mode 100644 src/lib/__perf__/Markdown.perf-test.js delete mode 100644 src/lib/__tests__/Markdown.spec.d.ts delete mode 100644 src/lib/__tests__/Markdown.spec.js delete mode 100644 src/lib/__tests__/Renderer.spec.d.ts delete mode 100644 src/lib/__tests__/Renderer.spec.js delete mode 100644 src/lib/types.d.ts delete mode 100644 src/lib/types.js delete mode 100644 src/theme/__tests__/styles.spec.d.ts delete mode 100644 src/theme/__tests__/styles.spec.js delete mode 100644 src/theme/colors.d.ts delete mode 100644 src/theme/colors.js delete mode 100644 src/theme/spacing.d.ts delete mode 100644 src/theme/spacing.js delete mode 100644 src/theme/styles.d.ts delete mode 100644 src/theme/styles.js delete mode 100644 src/theme/types.d.ts delete mode 100644 src/theme/types.js delete mode 100644 src/utils/__tests__/handlers.spec.d.ts delete mode 100644 src/utils/__tests__/handlers.spec.js delete mode 100644 src/utils/__tests__/svg.spec.d.ts delete mode 100644 src/utils/__tests__/svg.spec.js delete mode 100644 src/utils/__tests__/table.spec.d.ts delete mode 100644 src/utils/__tests__/table.spec.js delete mode 100644 src/utils/__tests__/url.spec.d.ts delete mode 100644 src/utils/__tests__/url.spec.js delete mode 100644 src/utils/handlers.d.ts delete mode 100644 src/utils/handlers.js delete mode 100644 src/utils/svg.d.ts delete mode 100644 src/utils/svg.js delete mode 100644 src/utils/table.d.ts delete mode 100644 src/utils/table.js delete mode 100644 src/utils/url.d.ts delete mode 100644 src/utils/url.js diff --git a/src/components/MDImage.d.ts b/src/components/MDImage.d.ts deleted file mode 100644 index 33fff7dd..00000000 --- a/src/components/MDImage.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import React from "react"; -import type { ImageStyle } from "react-native"; -type MDImageProps = { - uri: string; - label?: string; - alt?: string; - style?: ImageStyle; -}; -declare const _default: React.NamedExoticComponent; -export default _default; diff --git a/src/components/MDImage.js b/src/components/MDImage.js deleted file mode 100644 index a280e16c..00000000 --- a/src/components/MDImage.js +++ /dev/null @@ -1,58 +0,0 @@ -import React, { memo, useEffect, useState } from "react"; -import { ActivityIndicator, ImageBackground, Image } from "react-native"; -const MDImage = ({ uri, label, alt = "Image", style }) => { - const [imageState, setImageState] = useState({ - isLoading: true, - aspectRatio: undefined, - }); - useEffect(() => { - fetchOriginalSizeFromRemoteImage(); - }, []); - /** - * Fetches image dimension - * Sets aspect ratio if resolved - */ - const fetchOriginalSizeFromRemoteImage = () => { - Image.getSize( - uri, - (width, height) => { - if (width > 0 && height > 0) { - setImageState({ isLoading: false, aspectRatio: width / height }); - } else { - setImageState({ isLoading: false, aspectRatio: undefined }); - } - }, - () => { - setImageState((current) => { - return { - ...current, - isLoading: false, - }; - }); - }, - ); - }; - return React.createElement( - ImageBackground, - { - source: { uri: uri }, - style: { - width: "100%", - aspectRatio: imageState.aspectRatio, - }, - "aria-label": label, - accessibilityRole: "image", - accessibilityLabel: alt, - accessibilityHint: undefined, - imageStyle: style, - testID: "react-native-marked-md-image", - }, - imageState.isLoading - ? React.createElement(ActivityIndicator, { - testID: "react-native-marked-md-image-activity-indicator", - size: "small", - }) - : null, - ); -}; -export default memo(MDImage); diff --git a/src/components/MDSvg.d.ts b/src/components/MDSvg.d.ts deleted file mode 100644 index 04530e32..00000000 --- a/src/components/MDSvg.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import React from "react"; -type MDSvgProps = { - uri: string; - alt?: string; -}; -declare const _default: React.NamedExoticComponent; -export default _default; diff --git a/src/components/MDSvg.js b/src/components/MDSvg.js deleted file mode 100644 index 25077cc5..00000000 --- a/src/components/MDSvg.js +++ /dev/null @@ -1,78 +0,0 @@ -import React, { memo, useEffect, useState, useRef } from "react"; -import { ActivityIndicator, View } from "react-native"; -import { SvgFromXml } from "react-native-svg"; -import { getSvgDimensions } from "./../utils/svg"; -const MDSvg = ({ uri, alt = "image" }) => { - const isFirstLoad = useRef(false); - const [layoutWidth, setLayoutWidth] = useState(0); - const [svgState, setSvgState] = useState({ - viewBox: "", - width: 0, - height: 0, - svg: "", - isLoading: true, - error: false, - aspectRatio: undefined, - }); - useEffect(() => { - const fetchSvg = async () => { - try { - const res = await fetch(uri); - const text = await res.text(); - if (res.status !== 200) { - throw new Error("Status is not 200"); - } - const { viewBox, width, height } = getSvgDimensions(text); - setSvgState({ - width, - height, - viewBox, - svg: text, - isLoading: false, - error: false, - aspectRatio: width / height, - }); - } catch (e) { - setSvgState((state) => ({ - ...state, - error: true, - isLoading: false, - })); - } - }; - fetchSvg(); - }, [uri]); - const onLayout = (event) => { - if (!isFirstLoad.current) { - setLayoutWidth(event.nativeEvent.layout.width ?? 0); - isFirstLoad.current = true; - } - }; - const getWidth = () => { - if (layoutWidth && svgState.width) { - return Math.min(layoutWidth, svgState.width); - } - return "100%"; - }; - return React.createElement( - View, - { - style: { width: getWidth(), aspectRatio: svgState.aspectRatio }, - onLayout: onLayout, - }, - svgState.isLoading - ? React.createElement(ActivityIndicator, { size: "small" }) - : React.createElement(SvgFromXml, { - xml: svgState.svg, - width: "100%", - height: "100%", - viewBox: svgState.viewBox, - "aria-label": alt, - accessibilityRole: "image", - accessibilityLabel: alt, - accessibilityHint: undefined, - testID: "react-native-marked-md-svg", - }), - ); -}; -export default memo(MDSvg); diff --git a/src/hooks/useMarkdown.d.ts b/src/hooks/useMarkdown.d.ts deleted file mode 100644 index 7729a26e..00000000 --- a/src/hooks/useMarkdown.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { ReactNode } from "react"; -import type { Tokenizer } from "marked"; -import type { MarkedStyles, UserTheme } from "./../theme/types"; -import type { ColorSchemeName } from "react-native"; -import type { RendererInterface } from "../lib/types"; -export interface useMarkdownHookOptions { - colorScheme?: ColorSchemeName; - renderer?: RendererInterface; - theme?: UserTheme; - styles?: MarkedStyles; - baseUrl?: string; - tokenizer?: Tokenizer; -} -declare const useMarkdown: ( - value: string, - options?: useMarkdownHookOptions, -) => ReactNode[]; -export default useMarkdown; diff --git a/src/hooks/useMarkdown.js b/src/hooks/useMarkdown.js deleted file mode 100644 index 40f3a7af..00000000 --- a/src/hooks/useMarkdown.js +++ /dev/null @@ -1,29 +0,0 @@ -import { useMemo } from "react"; -import { lexer, Tokenizer } from "marked"; -import Parser from "../lib/Parser"; -import Renderer from "../lib/Renderer"; -import getStyles from "./../theme/styles"; -const useMarkdown = (value, options) => { - const styles = useMemo( - () => getStyles(options?.styles, options?.colorScheme, options?.theme), - [options?.styles, options?.theme, options?.colorScheme], - ); - const parser = useMemo( - () => - new Parser({ - styles: styles, - baseUrl: options?.baseUrl, - renderer: options?.renderer ?? new Renderer(), - }), - [options?.renderer, options?.baseUrl, styles], - ); - const elements = useMemo(() => { - const tokens = lexer(value, { - gfm: true, - tokenizer: options?.tokenizer, - }); - return parser.parse(tokens); - }, [value, parser, options?.tokenizer]); - return elements; -}; -export default useMarkdown; diff --git a/src/index.d.ts b/src/index.d.ts deleted file mode 100644 index a690d765..00000000 --- a/src/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Tokenizer } from "marked"; -import Markdown from "./lib/Markdown"; -import Renderer from "./lib/Renderer"; -import useMarkdown, { type useMarkdownHookOptions } from "./hooks/useMarkdown"; -import type { - MarkdownProps, - ParserOptions, - RendererInterface, -} from "./lib/types"; -declare const MarkedLexer: typeof import("marked").Lexer.lex; -export type { - MarkdownProps, - ParserOptions, - RendererInterface, - useMarkdownHookOptions, -}; -export { Renderer, useMarkdown, Tokenizer as MarkedTokenizer, MarkedLexer }; -export default Markdown; diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 4752ad35..00000000 --- a/src/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Tokenizer, marked } from "marked"; -import Markdown from "./lib/Markdown"; -import Renderer from "./lib/Renderer"; -import useMarkdown, {} from "./hooks/useMarkdown"; -const MarkedLexer = marked.lexer; -export { Renderer, useMarkdown, Tokenizer as MarkedTokenizer, MarkedLexer }; -export default Markdown; diff --git a/src/lib/Markdown.d.ts b/src/lib/Markdown.d.ts deleted file mode 100644 index d31e5acf..00000000 --- a/src/lib/Markdown.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; -import type { MarkdownProps } from "./types"; -declare const _default: React.MemoExoticComponent< - ({ - value, - flatListProps, - theme, - baseUrl, - renderer, - styles, - tokenizer, - }: MarkdownProps) => React.JSX.Element ->; -export default _default; diff --git a/src/lib/Markdown.js b/src/lib/Markdown.js deleted file mode 100644 index 45cfb6d2..00000000 --- a/src/lib/Markdown.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, { memo, useCallback } from "react"; -import { FlatList, useColorScheme } from "react-native"; -import useMarkdown from "../hooks/useMarkdown"; -const Markdown = ({ - value, - flatListProps, - theme, - baseUrl, - renderer, - styles, - tokenizer, -}) => { - const colorScheme = useColorScheme(); - const rnElements = useMarkdown(value, { - theme, - baseUrl, - renderer, - colorScheme, - styles, - tokenizer, - }); - const renderItem = useCallback(({ item }) => { - return item; - }, []); - const keyExtractor = useCallback((_, index) => index.toString(), []); - return React.createElement(FlatList, { - removeClippedSubviews: false, - keyExtractor: keyExtractor, - maxToRenderPerBatch: 8, - initialNumToRender: 8, - style: { - backgroundColor: colorScheme === "light" ? "#ffffff" : "#000000", - }, - ...flatListProps, - data: rnElements, - renderItem: renderItem, - }); -}; -export default memo(Markdown); diff --git a/src/lib/Parser.d.ts b/src/lib/Parser.d.ts deleted file mode 100644 index 510b995a..00000000 --- a/src/lib/Parser.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ReactNode } from "react"; -import type { Token } from "marked"; -import type { ParserOptions } from "./types"; -declare class Parser { - private renderer; - private styles; - private headingStylesMap; - private baseUrl; - constructor(options: ParserOptions); - parse(tokens?: Token[]): ReactNode[]; - private _parse; - private _parseToken; - private getNormalizedSiblingNodesForBlockAndInlineTokens; - private hasDuplicateTextChildToken; -} -export default Parser; diff --git a/src/lib/Parser.js b/src/lib/Parser.js deleted file mode 100644 index dd795411..00000000 --- a/src/lib/Parser.js +++ /dev/null @@ -1,283 +0,0 @@ -import { decode } from "html-entities"; -import { getValidURL } from "./../utils/url"; -import { getTableColAlignmentStyle } from "./../utils/table"; -class Parser { - renderer; - styles; - headingStylesMap; - baseUrl; - constructor(options) { - this.styles = { ...options.styles }; - this.baseUrl = options.baseUrl ?? ""; - this.renderer = options.renderer; - this.headingStylesMap = { - 1: this.styles.h1, - 2: this.styles.h2, - 3: this.styles.h3, - 4: this.styles.h4, - 5: this.styles.h5, - 6: this.styles.h6, - }; - } - parse(tokens) { - return this._parse(tokens); - } - _parse(tokens, styles) { - if (!tokens) return []; - const elements = tokens.map((token) => { - return this._parseToken(token, styles); - }); - return elements.filter((element) => element !== null); - } - _parseToken(token, styles) { - switch (token.type) { - case "paragraph": { - const children = this.getNormalizedSiblingNodesForBlockAndInlineTokens( - token.tokens ?? [], - this.styles.text, - ); - return this.renderer.paragraph(children, this.styles.paragraph); - } - case "blockquote": { - const children = this.parse(token.tokens); - return this.renderer.blockquote(children, this.styles.blockquote); - } - case "heading": { - const styles = this.headingStylesMap[token.depth]; - if (this.hasDuplicateTextChildToken(token)) { - return this.renderer.heading(token.text, styles, token.depth); - } - const children = this._parse(token.tokens, styles); - return this.renderer.heading(children, styles, token.depth); - } - case "code": { - return this.renderer.code( - token.text, - token.lang, - this.styles.code, - this.styles.em, - ); - } - case "hr": { - return this.renderer.hr(this.styles.hr); - } - case "list": { - let startIndex = Number.parseInt(token.start.toString()); - if (Number.isNaN(startIndex)) { - startIndex = 1; - } - const li = token.items.map((item) => { - const children = item.tokens.flatMap((cItem) => { - if (cItem.type === "text") { - /* getViewNode since tokens could contain a block like elements (i.e. img) */ - const childTokens = cItem.tokens || []; - const listChildren = - this.getNormalizedSiblingNodesForBlockAndInlineTokens( - childTokens, - this.styles.li, - ); - // return this.renderer.listItem(listChildren, this.styles.li); - return listChildren; - } - /* Parse the nested token */ - return this._parseToken(cItem); - }); - return this.renderer.listItem(children, this.styles.li); - }); - return this.renderer.list( - token.ordered, - li, - this.styles.list, - this.styles.li, - startIndex, - ); - } - case "escape": { - return this.renderer.escape(token.text, { - ...this.styles.text, - ...styles, - }); - } - case "link": { - // Don't render anchors without text and children - if (token.text.trim.length < 1 || !token.tokens) { - return null; - } - // Note: Linking Images (https://www.markdownguide.org/basic-syntax/#linking-images) are wrapped - // in paragraph token, so will be handled via `getNormalizedSiblingNodesForBlockAndInlineTokens` - const linkStyle = { - ...this.styles.link, - ...styles, - // To override color and fontStyle properties - color: this.styles.link?.color, - fontStyle: this.styles.link?.fontStyle, - }; - const href = getValidURL(this.baseUrl, token.href); - if (this.hasDuplicateTextChildToken(token)) { - return this.renderer.link(token.text, href, linkStyle); - } - const children = this._parse(token.tokens, linkStyle); - return this.renderer.link(children, href, linkStyle); - } - case "image": { - return this.renderer.image( - token.href, - token.text || token.title, - this.styles.image, - ); - } - case "strong": { - const boldStyle = { - ...this.styles.strong, - ...styles, - }; - if (this.hasDuplicateTextChildToken(token)) { - return this.renderer.strong(token.text, boldStyle); - } - const children = this._parse(token.tokens, boldStyle); - return this.renderer.strong(children, boldStyle); - } - case "em": { - const italicStyle = { - ...this.styles.em, - ...styles, - }; - if (this.hasDuplicateTextChildToken(token)) { - return this.renderer.em(token.text, italicStyle); - } - const children = this._parse(token.tokens, italicStyle); - return this.renderer.em(children, italicStyle); - } - case "codespan": { - return this.renderer.codespan(decode(token.text), { - ...this.styles.codespan, - ...styles, - }); - } - case "br": { - return this.renderer.br(); - } - case "del": { - const strikethroughStyle = { - ...this.styles.strikethrough, - ...styles, - }; - if (this.hasDuplicateTextChildToken(token)) { - return this.renderer.del(token.text, strikethroughStyle); - } - const children = this._parse(token.tokens, strikethroughStyle); - return this.renderer.del(children, strikethroughStyle); - } - case "text": - return this.renderer.text(token.raw, { - ...this.styles.text, - ...styles, - }); - case "html": { - console.warn( - "react-native-marked: rendering html from markdown is not supported", - ); - return this.renderer.html(token.raw, { - ...this.styles.text, - ...styles, - }); - } - case "table": { - const header = token.header.map((row, i) => - this._parse(row.tokens, { - ...getTableColAlignmentStyle(token.align[i]), - }), - ); - const rows = token.rows.map((cols) => - cols.map((col, i) => - this._parse(col.tokens, { - ...getTableColAlignmentStyle(token.align[i]), - }), - ), - ); - return this.renderer.table( - header, - rows, - this.styles.table, - this.styles.tableRow, - this.styles.tableCell, - ); - } - case "custom": { - const children = this._parse(token.tokens ?? []); - return this.renderer.custom( - token.identifier, - token.raw, - children, - token.args, - ); - } - default: { - return null; - } - } - } - getNormalizedSiblingNodesForBlockAndInlineTokens(tokens, textStyle) { - let tokenRenderQueue = []; - const siblingNodes = []; - for (const t of tokens) { - /** - * To avoid inlining images - * Currently supports images, link images - * Note: to be extend for other token types - */ - if ( - t.type === "image" || - (t.type === "link" && - t.tokens && - t.tokens[0] && - t.tokens[0].type === "image") - ) { - // Render existing inline tokens in the queue - const parsed = this._parse(tokenRenderQueue); - if (parsed.length > 0) { - siblingNodes.push(this.renderer.text(parsed, textStyle)); - } - // Render the current block token - if (t.type === "image") { - siblingNodes.push(this._parseToken(t)); - } else if (t.type === "link" && t.tokens && t.tokens[0]) { - const imageToken = t.tokens[0]; - const href = getValidURL(this.baseUrl, t.href); - siblingNodes.push( - this.renderer.linkImage( - href, - imageToken.href, - imageToken.text ?? imageToken.title ?? "", - this.styles.image, - ), - ); - } - tokenRenderQueue = []; - continue; - } - tokenRenderQueue = [...tokenRenderQueue, t]; - } - /* Remaining temp tokens if any */ - if (tokenRenderQueue.length > 0) { - siblingNodes.push(this.renderer.text(this.parse(tokenRenderQueue), {})); - } - return siblingNodes; - } - // To avoid duplicate text node nesting when there are no child tokens with text emphasis (i.e., italic) - // ref: https://github.com/gmsgowtham/react-native-marked/issues/522 - hasDuplicateTextChildToken(token) { - if (!("tokens" in token)) { - return false; - } - if ( - token.tokens && - token.tokens.length === 1 && - token.tokens[0]?.type === "text" - ) { - return true; - } - return false; - } -} -export default Parser; diff --git a/src/lib/Renderer.d.ts b/src/lib/Renderer.d.ts deleted file mode 100644 index a33d07dc..00000000 --- a/src/lib/Renderer.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -import React, { type ReactNode } from "react"; -import type { TextStyle, ViewStyle, ImageStyle } from "react-native"; -import type { RendererInterface } from "./types"; -declare class Renderer implements RendererInterface { - private slugPrefix; - private slugger; - private windowWidth; - constructor(); - paragraph(children: ReactNode[], styles?: ViewStyle): ReactNode; - blockquote(children: ReactNode[], styles?: ViewStyle): ReactNode; - heading(text: string | ReactNode[], styles?: TextStyle): ReactNode; - code( - text: string, - _language?: string, - containerStyle?: ViewStyle, - textStyle?: TextStyle, - ): ReactNode; - hr(styles?: ViewStyle): ReactNode; - listItem(children: ReactNode[], styles?: ViewStyle): ReactNode; - list( - ordered: boolean, - li: ReactNode[], - listStyle?: ViewStyle, - textStyle?: TextStyle, - startIndex?: number, - ): ReactNode; - escape(text: string, styles?: TextStyle): ReactNode; - link( - children: string | ReactNode[], - href: string, - styles?: TextStyle, - ): ReactNode; - image(uri: string, alt?: string, style?: ImageStyle): ReactNode; - strong(children: string | ReactNode[], styles?: TextStyle): ReactNode; - em(children: string | ReactNode[], styles?: TextStyle): ReactNode; - codespan(text: string, styles?: TextStyle): ReactNode; - br(): ReactNode; - del(children: string | ReactNode[], styles?: TextStyle): ReactNode; - text(text: string | ReactNode[], styles?: TextStyle): ReactNode; - html(text: string | ReactNode[], styles?: TextStyle): ReactNode; - linkImage( - href: string, - imageUrl: string, - alt?: string, - style?: ImageStyle, - ): ReactNode; - table( - header: ReactNode[][], - rows: ReactNode[][][], - tableStyle?: ViewStyle, - rowStyle?: ViewStyle, - cellStyle?: ViewStyle, - ): React.ReactNode; - custom( - _identifier: string, - _raw: string, - _children: ReactNode[], - _args: Record, - ): ReactNode; - getKey(): string; - private getTextNode; - private getViewNode; - private getBlockquoteNode; -} -export default Renderer; diff --git a/src/lib/Renderer.js b/src/lib/Renderer.js deleted file mode 100644 index 20017dcf..00000000 --- a/src/lib/Renderer.js +++ /dev/null @@ -1,193 +0,0 @@ -import React, {} from "react"; -import { - ScrollView, - View, - Text, - TouchableHighlight, - Dimensions, -} from "react-native"; -import MarkedList from "@jsamr/react-native-li"; -import Disc from "@jsamr/counter-style/presets/disc"; -import Decimal from "@jsamr/counter-style/presets/decimal"; -import Slugger from "github-slugger"; -import { Table, Cell, TableWrapper } from "react-native-table-component"; -import MDImage from "./../components/MDImage"; -import { onLinkPress } from "../utils/handlers"; -import { getTableWidthArr } from "../utils/table"; -import MDSvg from "./../components/MDSvg"; -class Renderer { - slugPrefix = "react-native-marked-ele"; - slugger; - windowWidth; - constructor() { - this.slugger = new Slugger(); - const { width } = Dimensions.get("window"); - this.windowWidth = width; - } - paragraph(children, styles) { - return this.getViewNode(children, styles); - } - blockquote(children, styles) { - return this.getBlockquoteNode(children, styles); - } - heading(text, styles) { - return this.getTextNode(text, styles); - } - code(text, _language, containerStyle, textStyle) { - return React.createElement( - ScrollView, - { - horizontal: true, - key: this.getKey(), - contentContainerStyle: containerStyle, - }, - React.createElement(View, null, this.getTextNode(text, textStyle)), - ); - } - hr(styles) { - return this.getViewNode(null, styles); - } - listItem(children, styles) { - return this.getViewNode(children, styles); - } - list(ordered, li, listStyle, textStyle, startIndex) { - return React.createElement( - MarkedList, - { - counterRenderer: ordered ? Decimal : Disc, - markerTextStyle: textStyle, - markerBoxStyle: listStyle, - key: this.getKey(), - startIndex: startIndex, - }, - li.map((node) => node), - ); - } - escape(text, styles) { - return this.getTextNode(text, styles); - } - link(children, href, styles) { - return React.createElement( - Text, - { - selectable: true, - accessibilityRole: "link", - accessibilityHint: "Opens in a new window", - key: this.getKey(), - onPress: onLinkPress(href), - style: styles, - }, - children, - ); - } - image(uri, alt, style) { - const key = this.getKey(); - if (uri.endsWith(".svg")) { - return React.createElement(MDSvg, { uri: uri, key: key }); - } - return React.createElement(MDImage, { - key: key, - uri: uri, - alt: alt, - style: style, - }); - } - strong(children, styles) { - return this.getTextNode(children, styles); - } - em(children, styles) { - return this.getTextNode(children, styles); - } - codespan(text, styles) { - return this.getTextNode(text, styles); - } - br() { - return this.getTextNode("\n", {}); - } - del(children, styles) { - return this.getTextNode(children, styles); - } - text(text, styles) { - return this.getTextNode(text, styles); - } - html(text, styles) { - return this.getTextNode(text, styles); - } - linkImage(href, imageUrl, alt, style) { - const imageNode = this.image(imageUrl, alt, style); - return React.createElement( - TouchableHighlight, - { - accessibilityRole: "link", - accessibilityHint: "Opens in a new window", - onPress: onLinkPress(href), - key: this.getKey(), - }, - imageNode, - ); - } - table(header, rows, tableStyle, rowStyle, cellStyle) { - const widthArr = getTableWidthArr(header.length, this.windowWidth); - const { borderWidth, borderColor, ...tableStyleRest } = tableStyle || {}; - return React.createElement( - ScrollView, - { horizontal: true }, - React.createElement( - Table, - { borderStyle: { borderWidth, borderColor }, style: tableStyleRest }, - React.createElement( - TableWrapper, - { style: rowStyle }, - header.map((headerCol, index) => { - return React.createElement(Cell, { - width: widthArr[index], - key: `${index}`, - data: React.createElement(View, { style: cellStyle }, headerCol), - }); - }), - ), - rows.map((rowData, index) => { - return React.createElement( - TableWrapper, - { key: `${index}`, style: rowStyle }, - rowData.map((cellData, cellIndex) => { - return React.createElement(Cell, { - width: widthArr[cellIndex], - key: `${cellIndex}`, - data: React.createElement(View, { style: cellStyle }, cellData), - }); - }), - ); - }), - ), - ); - } - custom(_identifier, _raw, _children, _args) { - return null; - } - getKey() { - return this.slugger.slug(this.slugPrefix); - } - getTextNode(children, styles) { - return React.createElement( - Text, - { selectable: true, key: this.getKey(), style: styles }, - children, - ); - } - getViewNode(children, styles) { - return React.createElement( - View, - { key: this.getKey(), style: styles }, - children, - ); - } - getBlockquoteNode(children, styles) { - return React.createElement( - View, - { key: this.getKey(), style: styles }, - children, - ); - } -} -export default Renderer; diff --git a/src/lib/__perf__/Markdown.perf-test.d.ts b/src/lib/__perf__/Markdown.perf-test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/lib/__perf__/Markdown.perf-test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/lib/__perf__/Markdown.perf-test.js b/src/lib/__perf__/Markdown.perf-test.js deleted file mode 100644 index 711aca2d..00000000 --- a/src/lib/__perf__/Markdown.perf-test.js +++ /dev/null @@ -1,277 +0,0 @@ -import React from "react"; -import { StyleSheet } from "react-native"; -import { screen } from "@testing-library/react-native"; -import { measureRenders } from "reassure"; -import Markdown from "../Markdown"; -const mdString = `Markdown Quick Reference -======================== - -This guide is a very brief overview, with examples, of the syntax that [Markdown] supports. It is itself written in Markdown and you can copy the samples over to the left-hand pane for experimentation. It's shown as *text* and not *rendered HTML*. - -[Markdown]: http://daringfireball.net/projects/markdown/ - - -Simple Text Formatting -====================== - -First thing is first. You can use *stars* or _underscores_ for italics. **Double stars** and __double underscores__ for bold. ***Three together*** for ___both___. - -Paragraphs are pretty easy too. Just have a blank line between chunks of text. - -> This chunk of text is in a block quote. Its multiple lines will all be -> indented a bit from the rest of the text. -> -> > Multiple levels of block quotes also work. - -Sometimes you want to include code, such as when you are explaining how \`

\` HTML tags work, or maybe you are a programmer and you are discussing \`someMethod()\`. - -If you want to include code and have new -lines preserved, indent the line with a tab -or at least four spaces: - - Extra spaces work here too. - This is also called preformatted text and it is useful for showing examples. - The text will stay as text, so any *markdown* or HTML you add will - not show up formatted. This way you can show markdown examples in a - markdown document. - -> You can also use preformatted text with your blockquotes -> as long as you add at least five spaces. - - -Headings -======== - -There are a couple of ways to make headings. Using three or more equals signs on a line under a heading makes it into an "h1" style. Three or more hyphens under a line makes it "h2" (slightly smaller). You can also use multiple pound symbols (\`#\`) before and after a heading. Pounds after the title are ignored. Here are some examples: - -This is H1 -========== - -This is H2 ----------- - -# This is H1 -## This is H2 -### This is H3 with some extra pounds ### -#### You get the idea #### -##### I don't need extra pounds at the end -###### H6 is the max - - -Links -===== - -Let's link to a few sites. First, let's use the bare URL, like . Great for text, but ugly for HTML. -Next is an inline link to [Google](https://www.google.com). A little nicer. -This is a reference-style link to [Wikipedia] [1]. -Lastly, here's a pretty link to [Yahoo]. The reference-style and pretty links both automatically use the links defined below, but they could be defined *anywhere* in the markdown and are removed from the HTML. The names are also case insensitive, so you can use [YaHoO] and have it link properly. - -[1]: https://www.wikipedia.org -[Yahoo]: https://www.yahoo.com - -Title attributes may be added to links by adding text after a link. -This is the [inline link](https://www.bing.com "Bing") with a "Bing" title. -You can also go to [W3C] [2] and maybe visit a [friend]. - -[2]: https://w3c.org (The W3C puts out specs for web-based things) -[Friend]: https://facebook.com "Facebook!" - -Email addresses in plain text are not linked: test@example.com. -Email addresses wrapped in angle brackets are linked: . -They are also obfuscated so that email harvesting spam robots hopefully won't get them. - - -Lists -===== - -* This is a bulleted list -* Great for shopping lists -- You can also use hyphens -+ Or plus symbols - -The above is an "unordered" list. Now, on for a bit of order. - -1. Numbered lists are also easy -2. Just start with a number -3738762. However, the actual number doesn't matter when converted to HTML. -1. This will still show up as 4. - -You might want a few advanced lists: - -- This top-level list is wrapped in paragraph tags -- This generates an extra space between each top-level item. - -- You do it by adding a blank line - -- This nested list also has blank lines between the list items. - -- How to create nested lists - 1. Start your regular list - 2. Indent nested lists with two spaces - 3. Further nesting means you should indent with two more spaces - * This line is indented with four spaces. - -- List items can be quite lengthy. You can keep typing and either continue -them on the next line with no indentation. - -- Alternately, if that looks ugly, you can also - indent the next line a bit for a prettier look. - -- You can put large blocks of text in your list by just indenting with two spaces. - - This is formatted the same as code, but you can inspect the HTML and find that it's just wrapped in a \`

\` tag and *won't* be shown as preformatted text. - - You can keep adding more and more paragraphs to a single list item by adding the traditional blank line and then keep on indenting the paragraphs with two spaces. - - You really only need to indent the first line, -but that looks ugly. - -- Lists support blockquotes - - > Just like this example here. By the way, you can - > nest lists inside blockquotes! - > - Fantastic! - -- Lists support preformatted text - - You just need to indent an additional four spaces. - - -Even More -========= - -Horizontal Rule ---------------- - -If you need a horizontal rule you just need to put at least three hyphens, asterisks, or underscores on a line by themselves. You can also even put spaces between the characters. - ---- -**************************** -_ _ _ _ _ _ _ - -Those three all produced horizontal lines. Keep in mind that three hyphens under any text turns that text into a heading, so add a blank like if you use hyphens. - -Images ------- - -Images work exactly like links, but they have exclamation points in front. They work with references and titles too. - -![Google Logo](https://www.google.com/images/errors/logo_sm.gif) and ![Happy]. - -[Happy]: https://wpclipart.com/smiley/happy/simple_colors/smiley_face_simple_green_small.png ("Smiley face") - - -Inline HTML ------------ - -If markdown is too limiting, you can just insert your own crazy HTML. Span-level HTML can *still* use markdown. Block level elements must be separated from text by a blank line and must not have any spaces before the opening and closing HTML. - -

-It is a pity, but markdown does **not** work in here for most markdown parsers. -[Marked] handles it pretty well. -
-`; -const styles = StyleSheet.create({ - em: { - fontSize: 12, - }, - strong: { - fontSize: 12, - }, - strikethrough: { - fontSize: 12, - }, - text: { - fontSize: 12, - }, - paragraph: { - borderWidth: 1, - }, - link: { - fontSize: 12, - }, - blockquote: { - borderWidth: 1, - }, - h1: { - fontSize: 12, - }, - h2: { - fontSize: 12, - }, - h3: { - fontSize: 12, - }, - h4: { - fontSize: 12, - }, - h5: { - fontSize: 12, - }, - h6: { - fontSize: 12, - }, - codespan: { - fontSize: 12, - }, - code: { - borderWidth: 1, - }, - hr: { - borderWidth: 1, - }, - list: { - borderWidth: 1, - }, - li: { - fontSize: 12, - }, - image: { - width: "100%", - }, - table: { - borderWidth: 1, - }, - tableRow: { - borderWidth: 1, - }, - tableCell: { - borderWidth: 1, - }, -}); -const theme = { - colors: { - background: "#ffffff", - link: "#58a6ff", - border: "#d0d7de", - code: "#161b22", - text: "#ffffff", - }, - spacing: { - xs: 3, - s: 6, - m: 9, - l: 18, - }, -}; -describe("Perf test", () => { - it("Renders markdown", async () => { - const scenario = async () => { - await screen.queryByText("Markdown Quick Reference"); - await screen.queryByText("Inline HTML"); - await screen.queryByText( - "If markdown is too limiting, you can just insert your own crazy HTML. Span-level HTML can *still* use markdown. Block level elements must be separated from text by a blank line and must not have any spaces before the opening and closing HTML.", - ); - }; - measureRenders( - React.createElement(Markdown, { - value: mdString, - styles: styles, - theme: theme, - }), - { - scenario, - }, - ); - }); -}); diff --git a/src/lib/__tests__/Markdown.spec.d.ts b/src/lib/__tests__/Markdown.spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/lib/__tests__/Markdown.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/lib/__tests__/Markdown.spec.js b/src/lib/__tests__/Markdown.spec.js deleted file mode 100644 index 0813dcf4..00000000 --- a/src/lib/__tests__/Markdown.spec.js +++ /dev/null @@ -1,845 +0,0 @@ -import React, {} from "react"; -import { render, screen, waitFor } from "@testing-library/react-native"; -import { Text } from "react-native"; -import Markdown from "../Markdown"; -import Renderer from "../Renderer"; -import { Tokenizer } from "marked"; -// https://www.markdownguide.org/basic-syntax/#headings -describe("Headings", () => { - it("Heading level 1", () => { - const r = render( - React.createElement(Markdown, { value: "# Heading level 1" }), - ); - expect(screen.queryByText("Heading level 1")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Heading level 2", () => { - const r = render( - React.createElement(Markdown, { value: "## Heading level 2" }), - ); - expect(screen.queryByText("Heading level 2")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Heading level 3", () => { - const r = render( - React.createElement(Markdown, { value: "### Heading level 3" }), - ); - expect(screen.queryByText("Heading level 3")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Heading level 4", () => { - const r = render( - React.createElement(Markdown, { value: "#### Heading level 4" }), - ); - expect(screen.queryByText("Heading level 4")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Heading level 5", () => { - const r = render( - React.createElement(Markdown, { value: "##### Heading level 5" }), - ); - expect(screen.queryByText("Heading level 5")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Heading level 6", () => { - const r = render( - React.createElement(Markdown, { value: "###### Heading level 6" }), - ); - expect(screen.queryByText("Heading level 6")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Alternate Syntax: Heading level 1", () => { - const r = render( - React.createElement(Markdown, { - value: "Heading level 1\n===============", - }), - ); - expect(screen.queryByText("Heading level 1")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Alternate Syntax: Heading level 2", () => { - const r = render( - React.createElement(Markdown, { - value: "Heading level 2\n---------------", - }), - ); - expect(screen.queryByText("Heading level 2")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Best Practice", () => { - const r = render( - React.createElement(Markdown, { - value: - "Try to put a blank line before...\n\n# Heading\n\n...and after a heading.", - }), - ); - expect(screen.queryByText("Heading")).toBeTruthy(); - expect( - screen.queryByText("Try to put a blank line before..."), - ).toBeTruthy(); - expect(screen.queryByText("...and after a heading.")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Heading with text emphasis", () => { - const r = render( - React.createElement(Markdown, { value: "## ~~_Heading level 2_~~" }), - ); - expect(screen.queryByText("Heading level 2")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/basic-syntax/#paragraphs-1 -describe("Paragraphs", () => { - it("Paragraph", () => { - const r = render( - React.createElement(Markdown, { - value: - "I really like using Markdown.\n\nI think I'll use it to format all of my documents from now on.", - }), - ); - expect(screen.queryByText("I really like using Markdown.")).toBeTruthy(); - expect( - screen.queryByText( - "I think I'll use it to format all of my documents from now on.", - ), - ).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Paragraph with Image", async () => { - const r = render( - React.createElement(Markdown, { - value: - "Here, I'll guide you through sending desktop notifications to offline users when they have new chat messages.![Chat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5kq947hwxmjvlmhrbnm6.png)", - }), - ); - await waitFor(() => { - expect( - screen.queryByText( - "Here, I'll guide you through sending desktop notifications to offline users when they have new chat messages.", - ), - ).toBeTruthy(); - expect( - screen.queryAllByTestId("react-native-marked-md-image"), - ).toBeDefined(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); -}); -describe("Line Breaks", () => { - it("Trailing New Line Character", () => { - const r = render( - React.createElement(Markdown, { - value: "First line with a backslash after.\nAnd the next line.", - }), - ); - expect( - screen.queryByText( - "First line with a backslash after. And the next line.", - ), - ).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Trailing slash", () => { - const r = render( - React.createElement(Markdown, { - value: `First line with a backslash after.\\ - And the next line.`, - }), - ); - expect( - screen.queryByText("First line with a backslash after."), - ).toBeTruthy(); - expect(screen.queryByText("And the next line.")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/basic-syntax/#emphasis -describe("Emphasis", () => { - it("Bold", () => { - const r = render( - React.createElement(Markdown, { value: "Love **is** bold" }), - ); - expect(screen.queryByText("is")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Italic", () => { - const r = render(React.createElement(Markdown, { value: "A *cat* meow" })); - expect(screen.queryByText("cat")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Strikethrough", () => { - const r = render( - React.createElement(Markdown, { value: "A ~~cat~~ meow" }), - ); - expect(screen.queryByText("cat")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Bold and Italic", () => { - const r = render( - React.createElement(Markdown, { - value: "This is really ***very*** important text.", - }), - ); - expect(screen.queryByText("very")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/basic-syntax/#blockquotes-1 -describe("Blockquotes", () => { - it("Blockquote", () => { - const r = render( - React.createElement(Markdown, { - value: - "> Dorothy followed her through many of the beautiful rooms in her castle.", - }), - ); - expect( - screen.queryByText( - "Dorothy followed her through many of the beautiful rooms in her castle.", - ), - ).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Blockquotes with Multiple Paragraphs", () => { - const r = render( - React.createElement(Markdown, { - value: - "> Dorothy followed her through many of the beautiful rooms in her castle.\n>\n> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.", - }), - ); - expect( - screen.queryByText( - "Dorothy followed her through many of the beautiful rooms in her castle.", - ), - ).toBeTruthy(); - expect( - screen.queryByText( - "The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.", - ), - ).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Nested Blockquotes", () => { - const r = render( - React.createElement(Markdown, { - value: - "> Dorothy followed her through many of the beautiful rooms in her castle.\n>\n\n>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.", - }), - ); - expect( - screen.queryByText( - "Dorothy followed her through many of the beautiful rooms in her castle.", - ), - ).toBeTruthy(); - expect( - screen.queryByText( - "The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.", - ), - ).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Blockquotes with Other Elements", () => { - const r = render( - React.createElement(Markdown, { - value: - "> #### The quarterly results look great!\n>\n> - Revenue was off the chart.\n> - Profits were higher than ever.\n>\n> *Everything* is going according to **plan**.", - }), - ); - expect( - screen.queryByText("The quarterly results look great!"), - ).toBeTruthy(); - expect(screen.queryByText("Revenue was off the chart.")).toBeTruthy(); - expect(screen.queryByText("Profits were higher than ever.")).toBeTruthy(); - expect(screen.queryByText("Everything")).toBeTruthy(); - expect(screen.queryByText("is going according to")).toBeTruthy(); - expect(screen.queryByText("plan")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/basic-syntax/#lists-1 -describe("Lists", () => { - it("Ordered Lists", () => { - const r = render( - React.createElement(Markdown, { - value: - "1. First item\n2. Second item\n3. Third item\n 1. Indented item1\n 2. Indented item2\n4. Fourth item", - }), - ); - expect(screen.queryByText("First item")).toBeTruthy(); - expect(screen.queryByText("Second item")).toBeTruthy(); - expect(screen.queryByText("Third item")).toBeTruthy(); - expect(screen.queryByText("Indented item1")).toBeTruthy(); - expect(screen.queryByText("Indented item2")).toBeTruthy(); - expect(screen.queryByText("Fourth item")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Ordered Lists: With Start Offset", () => { - const r = render( - React.createElement(Markdown, { value: "57. foo\n1. bar\n2. baz" }), - ); - expect(screen.queryByText("foo")).toBeTruthy(); - expect(screen.queryByText("bar")).toBeTruthy(); - expect(screen.queryByText("baz")).toBeTruthy(); - expect(screen.queryByText("57.")).toBeTruthy(); - expect(screen.queryByText("58.")).toBeTruthy(); - expect(screen.queryByText("59.")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Unordered Lists", () => { - const r = render( - React.createElement(Markdown, { - value: - "- First item\n- Second item\n- Third item\n - Indented item1\n - Indented item2\n- Fourth item", - }), - ); - expect(screen.queryByText("First item")).toBeTruthy(); - expect(screen.queryByText("Second item")).toBeTruthy(); - expect(screen.queryByText("Third item")).toBeTruthy(); - expect(screen.queryByText("Indented item1")).toBeTruthy(); - expect(screen.queryByText("Indented item2")).toBeTruthy(); - expect(screen.queryByText("Fourth item")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Elements in Lists: Paragraphs", () => { - const r = render( - React.createElement(Markdown, { - value: - "- This is the first list item.\n- Here's the second list item.\n\n I need to add another paragraph below the second list item.\n\n- And here's the third list item.", - }), - ); - expect(screen.queryByText("This is the first list item.")).toBeTruthy(); - expect(screen.queryByText("Here's the second list item.")).toBeTruthy(); - expect( - screen.queryByText( - "I need to add another paragraph below the second list item.", - ), - ).toBeTruthy(); - expect(screen.queryByText("And here's the third list item.")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Elements in Lists: Blockquotes", () => { - const r = render( - React.createElement(Markdown, { - value: - "- This is the first list item.\n- Here's the second list item.\n\n > A blockquote would look great below the second list item.\n\n- And here's the third list item.", - }), - ); - expect(screen.queryByText("This is the first list item.")).toBeTruthy(); - expect(screen.queryByText("Here's the second list item.")).toBeTruthy(); - expect( - screen.queryByText( - "A blockquote would look great below the second list item.", - ), - ).toBeTruthy(); - expect(screen.queryByText("And here's the third list item.")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Elements in Lists: Code Blocks", () => { - const r = render( - React.createElement(Markdown, { - value: - "* This is the first list item.\n* Here's the second list item.\n\n \n \n \n \n\n* And here's the third list item.", - }), - ); - expect(screen.queryByText("This is the first list item.")).toBeTruthy(); - expect(screen.queryByText("Here's the second list item.")).toBeTruthy(); - expect(screen.queryByText("And here's the third list item.")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Elements in Lists: Images", async () => { - const r = render( - React.createElement(Markdown, { - value: - "1. Open the file containing the Linux mascot.\n2. Marvel at its beauty.\n\n ![](https://dummyimage.com/100x100/fff/aaa)\n\n3. Close the file.", - }), - ); - await waitFor(() => { - expect( - screen.queryByText("Open the file containing the Linux mascot."), - ).toBeTruthy(); - expect(screen.queryByText("Marvel at its beauty.")).toBeTruthy(); - expect(screen.queryByText("Close the file.")).toBeTruthy(); - expect( - screen.queryAllByTestId("react-native-marked-md-image"), - ).toBeDefined(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - it("Elements in Lists: Lists", () => { - const r = render( - React.createElement(Markdown, { - value: - "1. First item\n2. Second item\n3. Third item\n - Indented item1\n - Indented item2\n4. Fourth item", - }), - ); - expect(screen.queryByText("First item")).toBeTruthy(); - expect(screen.queryByText("Second item")).toBeTruthy(); - expect(screen.queryByText("Third item")).toBeTruthy(); - expect(screen.queryByText("Indented item1")).toBeTruthy(); - expect(screen.queryByText("Indented item2")).toBeTruthy(); - expect(screen.queryByText("Fourth item")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/basic-syntax/#code -describe("Code", () => { - it("Code Span", () => { - const r = render( - React.createElement(Markdown, { - value: "At the command prompt, type `'nano'`.", - }), - ); - expect(screen.queryByText("At the command prompt, type")).toBeTruthy(); - expect(screen.queryByText("'nano'")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Code Blocks", () => { - const r = render( - React.createElement(Markdown, { - value: " \n \n \n ", - }), - ); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Code Blocks (backtick)", () => { - const r = render( - React.createElement(Markdown, { - value: "```\n \n \n \n```", - }), - ); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Code Blocks (backtick), no ending backtick", () => { - const r = render( - React.createElement(Markdown, { - value: "```\n \n \n ", - }), - ); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/basic-syntax/#horizontal-rules -describe("Horizontal Rules", () => { - it("Asterisks", () => { - const r = render(React.createElement(Markdown, { value: "***" })); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Dashes", () => { - const r = render(React.createElement(Markdown, { value: "---" })); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Underscores", () => { - const r = render( - React.createElement(Markdown, { value: "_________________" }), - ); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Horizontal Rule with Paragraph", () => { - const r = render( - React.createElement(Markdown, { - value: - "Try to put a blank line before...\n\n---\n\n...and after a horizontal rule.", - }), - ); - expect( - screen.queryByText("Try to put a blank line before..."), - ).toBeTruthy(); - expect(screen.queryByText("...and after a horizontal rule.")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/basic-syntax/#links -describe("Links", () => { - it("Basic", () => { - const r = render( - React.createElement(Markdown, { - value: - "My favorite search engine is [Duck Duck Go](https://duckduckgo.com).", - }), - ); - expect(screen.queryByText("My favorite search engine is")).toBeTruthy(); - expect(screen.queryByText("Duck Duck Go")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Titles", () => { - const r = render( - React.createElement(Markdown, { - value: - 'My favorite search engine is [Duck Duck Go](https://duckduckgo.com "The best search engine for privacy").', - }), - ); - expect(screen.queryByText("My favorite search engine is")).toBeTruthy(); - expect(screen.queryByText("Duck Duck Go")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("URLs and Email Addresses", () => { - const r = render( - React.createElement(Markdown, { - value: "\n\n", - }), - ); - expect(screen.queryByText("https://www.markdownguide.org")).toBeTruthy(); - expect(screen.queryByText("fake@example.com")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Formatting Links", () => { - const r = render( - React.createElement(Markdown, { - value: - "I love supporting the **[EFF](https://eff.org)**.\nThis is the *[Markdown Guide](https://www.markdownguide.org)*.\nSee the section on [`code`](#code).", - }), - ); - expect(screen.queryByText("EFF")).toBeTruthy(); - expect(screen.queryByText("Markdown Guide")).toBeTruthy(); - expect(screen.queryByText("code")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("Links without text, (no render)", () => { - const r = render( - React.createElement(Markdown, { - value: - "Table of Contents[](https://mastersoftwaretesting.com/testing-fundamentals/software-testing-101-what-is-software-testing#table-of-contents)\n-------------------------------------------------------------------------------------------------------------------------------------------\n", - }), - ); - expect(screen.queryByText("Table of Contents")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/basic-syntax/#images-1 -describe("Images", () => { - it("Render", async () => { - const r = render( - React.createElement(Markdown, { - value: - '![The San Juan Mountains are beautiful!](https://dummyimage.com/100x100/fff/aaa "San Juan Mountains")', - }), - ); - await waitFor(() => { - expect( - screen.queryAllByTestId("react-native-marked-md-image"), - ).toBeDefined(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - it("Linking Images", async () => { - const r = render( - React.createElement(Markdown, { - value: - '[![An old rock in the desert](https://dummyimage.com/100x100/fff/aaa "Shiprock, New Mexico by Beau Rogers")](https://dummyimage.com/100x100/fff/aaa)', - }), - ); - await waitFor(() => { - expect( - screen.queryAllByTestId("react-native-marked-md-image"), - ).toBeDefined(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - it("SVG images", async () => { - const r = render( - React.createElement(Markdown, { - value: "![svg](https://www.svgrepo.com/show/513268/beer.svg)", - }), - ); - await waitFor(() => { - expect( - screen.queryAllByTestId("react-native-marked-md-svg"), - ).toBeDefined(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - it("SVG Linking", async () => { - const r = render( - React.createElement(Markdown, { - value: - '[![SVG Repo](https://www.svgrepo.com/show/513268/beer.svg "SVG Repo")](https://www.svgrepo.com)', - }), - ); - await waitFor(() => { - expect( - screen.queryAllByTestId("react-native-marked-md-svg"), - ).toBeDefined(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); -}); -// https://www.markdownguide.org/basic-syntax/#escaping-characters -describe("Escaping Characters", () => { - it("Render", () => { - const r = render( - React.createElement(Markdown, { - value: - "\\* Without the backslash, this would be a bullet in an unordered list.", - }), - ); - expect(screen.queryByText("*")).toBeTruthy(); - expect( - screen.queryByText( - "Without the backslash, this would be a bullet in an unordered list.", - ), - ).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/basic-syntax/#html -describe("HTML", () => { - it("Render", () => { - const r = render( - React.createElement(Markdown, { - value: "This **word** is bold. This word is italic.", - }), - ); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); -}); -// https://www.markdownguide.org/extended-syntax/#tables -describe("Tables", () => { - it("Basic", () => { - const r = render( - React.createElement(Markdown, { - value: ` -| Syntax | Description | -| ----------- | ----------- | -| Header | Title | -| Paragraph | Text | - `, - }), - ); - const tree = r.toJSON(); - expect(screen.queryByText("Syntax")).toBeTruthy(); - expect(screen.queryByText("Description")).toBeTruthy(); - expect(screen.queryByText("Header")).toBeTruthy(); - expect(screen.queryByText("Title")).toBeTruthy(); - expect(screen.queryByText("Paragraph")).toBeTruthy(); - expect(screen.queryByText("Text")).toBeTruthy(); - expect(tree).toMatchSnapshot(); - }); - it("Different Cell Widths", () => { - const r = render( - React.createElement(Markdown, { - value: ` -| Syntax | Description | -| --- | ----------- | -| Header | Title | -| Paragraph | Text | - `, - }), - ); - const tree = r.toJSON(); - expect(screen.queryByText("Syntax")).toBeTruthy(); - expect(screen.queryByText("Description")).toBeTruthy(); - expect(screen.queryByText("Header")).toBeTruthy(); - expect(screen.queryByText("Title")).toBeTruthy(); - expect(screen.queryByText("Paragraph")).toBeTruthy(); - expect(screen.queryByText("Text")).toBeTruthy(); - expect(tree).toMatchSnapshot(); - }); - it("Alignment", () => { - const r = render( - React.createElement(Markdown, { - value: ` -| Syntax | Description | Test Text | -| :--- | :----: | ---: | -| Header | Title | Here's this | -| Paragraph | Text | And more | - `, - }), - ); - const tree = r.toJSON(); - expect(screen.queryByText("Syntax")).toBeTruthy(); - expect(screen.queryByText("Description")).toBeTruthy(); - expect(screen.queryByText("Test Text")).toBeTruthy(); - expect(screen.queryByText("Header")).toBeTruthy(); - expect(screen.queryByText("Title")).toBeTruthy(); - expect(screen.queryByText("Here's this")).toBeTruthy(); - expect(screen.queryByText("Paragraph")).toBeTruthy(); - expect(screen.queryByText("Text")).toBeTruthy(); - expect(screen.queryByText("And more")).toBeTruthy(); - expect(tree).toMatchSnapshot(); - }); - it("Pipe Character", () => { - const r = render( - React.createElement(Markdown, { - value: ` -| Syntax | Description | Test Text | -| :-------- | :---------: | --------------: | -| Header | Title | Here's \\| this | -| Paragraph | Text | And more | - `, - }), - ); - const tree = r.toJSON(); - expect(screen.queryByText("Syntax")).toBeTruthy(); - expect(screen.queryByText("Description")).toBeTruthy(); - expect(screen.queryByText("Test Text")).toBeTruthy(); - expect(screen.queryByText("Header")).toBeTruthy(); - expect(screen.queryByText("Title")).toBeTruthy(); - expect(screen.queryByText("Here's | this")).toBeTruthy(); - expect(screen.queryByText("Paragraph")).toBeTruthy(); - expect(screen.queryByText("Text")).toBeTruthy(); - expect(screen.queryByText("And more")).toBeTruthy(); - expect(tree).toMatchSnapshot(); - }); - it("Emphasis, Code, Links", () => { - const r = render( - React.createElement(Markdown, { - value: ` -| _This will also be italic_ | _You **can** combine them_ | -| -------------------------- | :-----------------------------------: | -| **left foo** | _right foo_ | -| \`left bar\` | right bar | -| ~~left baz~~ | right [link](https://duckduckgo.com). | - `, - }), - ); - const tree = r.toJSON(); - expect(screen.queryByText("This will also be italic")).toBeTruthy(); - expect(screen.queryByText("You can combine them")).toBeTruthy(); - expect(screen.queryByText("left foo")).toBeTruthy(); - expect(screen.queryByText("right foo")).toBeTruthy(); - expect(screen.queryByText("left bar")).toBeTruthy(); - expect(screen.queryByText("right bar")).toBeTruthy(); - expect(screen.queryByText("left baz")).toBeTruthy(); - expect(screen.queryByText("link")).toBeTruthy(); - expect(tree).toMatchSnapshot(); - }); - it("Images", async () => { - const r = render( - React.createElement(Markdown, { - value: ` -| Hello | -| :-----------------------------------------------------------------: | -| Bingo ![](https://goo.gl/1R3T6h "Tonejito") This also works for me. | - `, - }), - ); - await waitFor(() => { - expect( - screen.queryAllByTestId("react-native-marked-md-image"), - ).toBeDefined(); - const tree = r.toJSON(); - expect(screen.queryByText("Hello")).toBeTruthy(); - expect(screen.queryByText("Bingo")).toBeTruthy(); - expect(screen.queryByText("This also works for me.")).toBeTruthy(); - expect(tree).toMatchSnapshot(); - }); - }); -}); -describe("Renderer override", () => { - it("Custom", () => { - const fn = jest.fn((text, styles) => - React.createElement(Text, { style: styles, key: "key-1" }, text), - ); - const style = { - color: "#ff0000", - }; - class CustomRenderer extends Renderer { - codespan = fn; - } - const r = render( - React.createElement(Markdown, { - value: "`hello`", - renderer: new CustomRenderer(), - styles: { codespan: { ...style } }, - }), - ); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - expect(screen.queryByText("hello")).toBeTruthy(); - }); -}); -describe("Tokenizer", () => { - it("Custom", () => { - const codespanFn = jest.fn((text, styles) => - React.createElement(Text, { style: styles, key: "key-1" }, text), - ); - const customFn = jest.fn((_identifier, _raw, _children, args = {}) => { - const text = args.text ?? ""; - return React.createElement(Text, { key: "custom-token" }, text); - }); - const style = { - color: "#ff0000", - }; - class CustomRenderer extends Renderer { - codespan = codespanFn; - custom = customFn; - } - class CustomTokenizer extends Tokenizer { - codespan(src) { - const match = src.match(/^\$+([^\$\n]+?)\$+/); - if (match?.[1]) { - return { - type: "codespan", - raw: match[0], - text: match[1].trim(), - }; - } - return super.codespan(src); - } - } - const r = render( - React.createElement(Markdown, { - value: "$ latex code $\n\n`hello`", - renderer: new CustomRenderer(), - styles: { codespan: { ...style } }, - tokenizer: new CustomTokenizer(), - }), - ); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - expect(customFn).toHaveBeenCalledWith("latex", "$ latex code $", [], { - text: "latex code", - }); - expect(screen.queryByText("hello")).toBeTruthy(); - expect(screen.queryByText("latex code")).toBeTruthy(); - }); -}); diff --git a/src/lib/__tests__/Renderer.spec.d.ts b/src/lib/__tests__/Renderer.spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/lib/__tests__/Renderer.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/lib/__tests__/Renderer.spec.js b/src/lib/__tests__/Renderer.spec.js deleted file mode 100644 index 98313f66..00000000 --- a/src/lib/__tests__/Renderer.spec.js +++ /dev/null @@ -1,232 +0,0 @@ -import { Linking } from "react-native"; -import { - fireEvent, - render, - screen, - waitFor, -} from "@testing-library/react-native"; -import Renderer from "../Renderer"; -import getStyles from "./../../theme/styles"; -jest.mock("react-native/Libraries/Linking/Linking", () => ({ - openURL: jest.fn(() => Promise.resolve("mockResolve")), -})); -const renderer = new Renderer(); -const userStyles = { - text: { - fontSize: 24, - }, - list: { - padding: 24, - }, -}; -describe("Renderer", () => { - const themes = ["light", "dark"]; - for (const theme of themes) { - const styles = getStyles(userStyles, theme); - describe(`${theme} theme`, () => { - describe("Text Nodes", () => { - it("returns a Text node", () => { - const TextNode = renderer.text("Hello world", styles.text); - const r = render(TextNode); - expect(screen.queryByText("Hello world")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("returns a wrapped Text node", () => { - const TextNodeChild = renderer.text("Hello world", {}); - const TextNode = renderer.text([TextNodeChild], styles.text); - const r = render(TextNode); - expect(screen.queryByText("Hello world")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("returns a wrapped Text node with styles", () => { - const TextNodeChild = renderer.text("Hello world", styles.text); - const TextNode = renderer.text([TextNodeChild], styles.text); - const r = render(TextNode); - expect(screen.queryByText("Hello world")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - describe("Link Nodes", () => { - it("returns a Text Link node", () => { - const LinkNode = renderer.link( - "Link", - "https://example.com", - styles.link, - ); - const r = render(LinkNode); - expect(screen.queryByText("Link")).toBeTruthy(); - fireEvent.press(screen.queryByText("Link")); - expect(Linking.openURL).toHaveBeenCalled(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - describe("getImageLinkNode", () => { - it("returns a Image Link node", async () => { - const LinkNode = renderer.linkImage( - "https://example.com", - "https://dummyimage.com/100x100/fff/aaa", - "Hello world", - ); - await waitFor(() => { - const tree = render(LinkNode).toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - }); - describe("View Nodes", () => { - it("returns a paragraph View node", () => { - const TextNode = renderer.text("Hello world", styles.text); - const LinkNode = renderer.link( - "Link", - "https://example.com", - styles.link, - ); - const ViewNode = renderer.paragraph( - [TextNode, LinkNode], - styles.paragraph, - ); - const r = render(ViewNode); - expect(screen.queryByText("Hello world")).toBeTruthy(); - expect(screen.queryByText("Link")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("returns a hr View node", () => { - const ViewNode = renderer.hr(styles.hr); - const r = render(ViewNode); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - describe("Table Nodes", () => { - it("returns a Table", () => { - const TextNode1 = renderer.text("Hello world 1"); - const TextNode2 = renderer.text("Hello world 2", styles.strong); - const TextNode3 = renderer.text("Hello world 3", styles.em); - const TextNode4 = renderer.text("Hello world 4", styles.text); - const TextNode5 = renderer.text("Hello world 5", styles.link); - const headers = [[TextNode1], [TextNode2]]; - const rows = [[[TextNode3]], [[TextNode4, TextNode5]]]; - const Table = renderer.table( - headers, - rows, - styles.table, - styles.tableRow, - styles.tableCell, - ); - const r = render(Table); - expect(screen.queryByText("Hello world 1")).toBeTruthy(); - expect(screen.queryByText("Hello world 2")).toBeTruthy(); - expect(screen.queryByText("Hello world 3")).toBeTruthy(); - expect(screen.queryByText("Hello world 4")).toBeTruthy(); - expect(screen.queryByText("Hello world 5")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("returns a Table without styles", () => { - const TextNode1 = renderer.text("Hello world 1"); - const TextNode2 = renderer.text("Hello world 2", styles.strong); - const TextNode3 = renderer.text("Hello world 3", styles.em); - const TextNode4 = renderer.text("Hello world 4", styles.text); - const TextNode5 = renderer.text("Hello world 5", styles.link); - const headers = [[TextNode1], [TextNode2]]; - const rows = [[[TextNode3]], [[TextNode4, TextNode5]]]; - const Table = renderer.table(headers, rows); - const r = render(Table); - expect(screen.queryByText("Hello world 1")).toBeTruthy(); - expect(screen.queryByText("Hello world 2")).toBeTruthy(); - expect(screen.queryByText("Hello world 3")).toBeTruthy(); - expect(screen.queryByText("Hello world 4")).toBeTruthy(); - expect(screen.queryByText("Hello world 5")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - describe("getCodeBlockNode", () => { - it("returns a Code block (horizontal ScrollView)", () => { - const CodeBlock = renderer.code( - "print('hello')", - "", - styles.code, - styles.em, - ); - const r = render(CodeBlock); - expect(screen.queryByText("print('hello')")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - describe("getBlockquoteNode", () => { - it("returns a Blockquote", () => { - const TextNode = renderer.text("Hello world", styles.text); - const LinkNode = renderer.link( - "Link", - "https://example.com", - styles.link, - ); - const Blockquote = renderer.blockquote( - [TextNode, LinkNode], - styles.blockquote, - ); - const r = render(Blockquote); - expect(screen.queryByText("Hello world")).toBeTruthy(); - expect(screen.queryByText("Link")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - describe("getImageNode", () => { - it("returns a Image", async () => { - const ImageNode = renderer.image( - "https://picsum.photos/100/100", - "Hello world", - ); - await waitFor(() => { - const tree = render(ImageNode).toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - }); - describe("getListNode", () => { - it("returns Ordered List", () => { - const TextNode1 = renderer.text("Hello world 1", styles.li); - const TextNode2 = renderer.text("Hello world 2", styles.li); - const TextNode3 = renderer.text("Hello world 3", styles.li); - const OL = renderer.list( - true, - [TextNode1, TextNode2, TextNode3], - styles.list, - styles.li, - ); - const r = render(OL); - expect(screen.queryByText("Hello world 1")).toBeTruthy(); - expect(screen.queryByText("Hello world 2")).toBeTruthy(); - expect(screen.queryByText("Hello world 3")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - it("returns Un-Ordered List", () => { - const TextNode1 = renderer.text("Hello world 1", styles.li); - const TextNode2 = renderer.text("Hello world 2", styles.li); - const TextNode3 = renderer.text("Hello world 3", styles.li); - const OL = renderer.list( - false, - [TextNode1, TextNode2, TextNode3], - styles.list, - styles.li, - ); - const r = render(OL); - expect(screen.queryByText("Hello world 1")).toBeTruthy(); - expect(screen.queryByText("Hello world 2")).toBeTruthy(); - expect(screen.queryByText("Hello world 3")).toBeTruthy(); - const tree = r.toJSON(); - expect(tree).toMatchSnapshot(); - }); - }); - }); - } -}); diff --git a/src/lib/types.d.ts b/src/lib/types.d.ts deleted file mode 100644 index f540ff6f..00000000 --- a/src/lib/types.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -import type { ReactNode } from "react"; -import type { - FlatListProps, - ViewStyle, - TextStyle, - ImageStyle, -} from "react-native"; -import type { MarkedStyles, UserTheme } from "./../theme/types"; -import type { Tokenizer } from "marked"; -export interface ParserOptions { - styles?: MarkedStyles; - baseUrl?: string; - renderer: RendererInterface; -} -export interface MarkdownProps extends Partial { - value: string; - flatListProps?: Omit< - FlatListProps, - "data" | "renderItem" | "horizontal" - >; - theme?: UserTheme; - tokenizer?: Tokenizer; -} -export type TableColAlignment = "center" | "left" | "right" | null; -export interface RendererInterface { - paragraph(children: ReactNode[], styles?: ViewStyle): ReactNode; - blockquote(children: ReactNode[], styles?: ViewStyle): ReactNode; - heading( - text: string | ReactNode[], - styles?: TextStyle, - depth?: number, - ): ReactNode; - code( - text: string, - language?: string, - containerStyle?: ViewStyle, - textStyle?: TextStyle, - ): ReactNode; - hr(styles?: ViewStyle): ReactNode; - listItem(children: ReactNode[], styles?: ViewStyle): ReactNode; - list( - ordered: boolean, - li: ReactNode[], - listStyle?: ViewStyle, - textStyle?: TextStyle, - startIndex?: number, - ): ReactNode; - escape(text: string, styles?: TextStyle): ReactNode; - link( - children: string | ReactNode[], - href: string, - styles?: TextStyle, - ): ReactNode; - image(uri: string, alt?: string, style?: ImageStyle): ReactNode; - strong(children: string | ReactNode[], styles?: TextStyle): ReactNode; - em(children: string | ReactNode[], styles?: TextStyle): ReactNode; - codespan(text: string, styles?: TextStyle): ReactNode; - br(): ReactNode; - del(children: string | ReactNode[], styles?: TextStyle): ReactNode; - text(text: string | ReactNode[], styles?: TextStyle): ReactNode; - html(text: string | ReactNode[], styles?: TextStyle): ReactNode; - linkImage( - href: string, - imageUrl: string, - alt?: string, - style?: ImageStyle, - ): ReactNode; - table( - header: ReactNode[][], - rows: ReactNode[][][], - tableStyle?: ViewStyle, - rowStyle?: ViewStyle, - cellStyle?: ViewStyle, - ): ReactNode; - custom( - identifier: string, - raw: string, - children?: ReactNode[], - args?: Record, - ): ReactNode; -} diff --git a/src/lib/types.js b/src/lib/types.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/lib/types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/theme/__tests__/styles.spec.d.ts b/src/theme/__tests__/styles.spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/theme/__tests__/styles.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/theme/__tests__/styles.spec.js b/src/theme/__tests__/styles.spec.js deleted file mode 100644 index 4737ae1e..00000000 --- a/src/theme/__tests__/styles.spec.js +++ /dev/null @@ -1,198 +0,0 @@ -import colors from "../colors"; -import getStyles from "./../styles"; -describe("getStyles", () => { - it("light scheme", () => { - const styles = getStyles({}, "light"); - expect(styles.text?.color).toBe(colors.light.text); - }); - it("dark scheme", () => { - const styles = getStyles({}, "dark"); - expect(styles.text?.color).toBe(colors.dark.text); - }); - it("default scheme", () => { - const styles = getStyles({}, null); - expect(styles.text?.color).toBe(colors.light.text); - }); - it("user styles, light scheme", () => { - const styles = getStyles( - { - text: { - color: "#aaa", - padding: 2, - }, - }, - "light", - ); - expect(styles.text?.color).toBe("#aaa"); - expect(styles.text?.padding).toBe(2); - }); - it("user styles, dark scheme", () => { - const styles = getStyles( - { - text: { - color: "#aaa", - padding: 2, - }, - }, - "dark", - ); - expect(styles.text?.color).toBe("#aaa"); - expect(styles.text?.padding).toBe(2); - }); - it("user styles, default scheme", () => { - const styles = getStyles( - { - text: { - color: "#aaa", - padding: 2, - }, - }, - null, - ); - expect(styles.text?.color).toBe("#aaa"); - expect(styles.text?.padding).toBe(2); - }); - it("light scheme, custom theme", () => { - const customColors = { - background: "#aaa", - code: "#bbb", - text: "#ccc", - link: "#ddd", - border: "#eee", - }; - const styles = getStyles({}, "light", { colors: customColors }); - expect(styles.code?.backgroundColor).toBe(customColors.code); - expect(styles.text?.color).toBe(customColors.text); - expect(styles.link?.color).toBe(customColors.link); - expect(styles.hr?.borderBottomColor).toBe(customColors.border); - }); - it("dark scheme, custom theme", () => { - const customColors = { - background: "#aaa", - code: "#bbb", - text: "#ccc", - link: "#ddd", - border: "#eee", - }; - const styles = getStyles({}, "dark", { colors: customColors }); - expect(styles.code?.backgroundColor).toBe(customColors.code); - expect(styles.text?.color).toBe(customColors.text); - expect(styles.link?.color).toBe(customColors.link); - expect(styles.hr?.borderBottomColor).toBe(customColors.border); - }); - it("default scheme, custom theme", () => { - const customColors = { - background: "#aaa", - code: "#bbb", - text: "#ccc", - link: "#ddd", - border: "#eee", - }; - const styles = getStyles({}, null, { colors: customColors }); - expect(styles.code?.backgroundColor).toBe(customColors.code); - expect(styles.text?.color).toBe(customColors.text); - expect(styles.link?.color).toBe(customColors.link); - expect(styles.hr?.borderBottomColor).toBe(customColors.border); - }); - it("light scheme, custom theme, spacing", () => { - const customColors = { - background: "#aaa", - code: "#bbb", - text: "#ccc", - link: "#ddd", - border: "#eee", - }; - const spacing = { xs: 10, s: 20, m: 30, l: 40 }; - const styles = getStyles({}, "light", { spacing, colors: customColors }); - expect(styles.code?.backgroundColor).toBe(customColors.code); - expect(styles.text?.color).toBe(customColors.text); - expect(styles.link?.color).toBe(customColors.link); - expect(styles.hr?.borderBottomColor).toBe(customColors.border); - expect(styles.h6?.marginVertical).toBe(spacing.xs); - expect(styles.h1?.paddingBottom).toBe(spacing.s); - expect(styles.h1?.marginVertical).toBe(spacing.m); - expect(styles.code?.padding).toBe(spacing.l); - }); - it("dark scheme, custom theme, spacing", () => { - const customColors = { - background: "#aaa", - code: "#bbb", - text: "#ccc", - link: "#ddd", - border: "#eee", - }; - const spacing = { xs: 10, s: 20, m: 30, l: 40 }; - const styles = getStyles({}, "dark", { spacing, colors: customColors }); - expect(styles.code?.backgroundColor).toBe(customColors.code); - expect(styles.text?.color).toBe(customColors.text); - expect(styles.link?.color).toBe(customColors.link); - expect(styles.hr?.borderBottomColor).toBe(customColors.border); - expect(styles.h6?.marginVertical).toBe(spacing.xs); - expect(styles.h1?.paddingBottom).toBe(spacing.s); - expect(styles.h1?.marginVertical).toBe(spacing.m); - expect(styles.code?.padding).toBe(spacing.l); - }); - it("default scheme, custom theme, spacing", () => { - const customColors = { - background: "#aaa", - code: "#bbb", - text: "#ccc", - link: "#ddd", - border: "#eee", - }; - const spacing = { xs: 10, s: 20, m: 30, l: 40 }; - const styles = getStyles({}, null, { spacing, colors: customColors }); - expect(styles.code?.backgroundColor).toBe(customColors.code); - expect(styles.text?.color).toBe(customColors.text); - expect(styles.link?.color).toBe(customColors.link); - expect(styles.hr?.borderBottomColor).toBe(customColors.border); - expect(styles.h6?.marginVertical).toBe(spacing.xs); - expect(styles.h1?.paddingBottom).toBe(spacing.s); - expect(styles.h1?.marginVertical).toBe(spacing.m); - expect(styles.code?.padding).toBe(spacing.l); - }); - it("user styles, custom theme, spacing", () => { - const customColors = { - background: "#aaa", - code: "#bbb", - text: "#ccc", - link: "#ddd", - border: "#eee", - }; - const spacing = { xs: 10, s: 20, m: 30, l: 40 }; - const userStyles = { - code: { - backgroundColor: "#222", - padding: 4, - }, - text: { - color: "#333", - }, - link: { - color: "#444", - }, - hr: { - borderBottomColor: "#555", - }, - h1: { - paddingBottom: 2, - marginVertical: 3, - }, - h6: { - marginVertical: 1, - }, - }; - const styles = getStyles(userStyles, "light", { - spacing, - colors: customColors, - }); - expect(styles.code?.backgroundColor).toBe("#222"); - expect(styles.text?.color).toBe("#333"); - expect(styles.link?.color).toBe("#444"); - expect(styles.hr?.borderBottomColor).toBe("#555"); - expect(styles.h6?.marginVertical).toBe(1); - expect(styles.h1?.paddingBottom).toBe(2); - expect(styles.h1?.marginVertical).toBe(3); - expect(styles.code?.padding).toBe(4); - }); -}); diff --git a/src/theme/colors.d.ts b/src/theme/colors.d.ts deleted file mode 100644 index 822ab9a3..00000000 --- a/src/theme/colors.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { ColorValue } from "react-native"; -export interface ColorsPropType { - code: ColorValue; - link: ColorValue; - text: ColorValue; - border: ColorValue; - /** - * @deprecated Use flatlist containerStyle or style prop for setting background color - */ - background?: ColorValue; -} -declare const colors: Record<"light" | "dark", ColorsPropType>; -export default colors; diff --git a/src/theme/colors.js b/src/theme/colors.js deleted file mode 100644 index f6aca4e4..00000000 --- a/src/theme/colors.js +++ /dev/null @@ -1,17 +0,0 @@ -const colors = { - light: { - background: "#ffffff", - code: "#f6f8fa", - link: "#58a6ff", - text: "#333333", - border: "#d0d7de", - }, - dark: { - background: "#000000", - code: "#161b22", - link: "#58a6ff", - text: "#ffffff", - border: "#30363d", - }, -}; -export default colors; diff --git a/src/theme/spacing.d.ts b/src/theme/spacing.d.ts deleted file mode 100644 index b79c8932..00000000 --- a/src/theme/spacing.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type SpacingKeysType = "xs" | "s" | "m" | "l"; -declare const padding: Record; -export default padding; diff --git a/src/theme/spacing.js b/src/theme/spacing.js deleted file mode 100644 index 370f21dd..00000000 --- a/src/theme/spacing.js +++ /dev/null @@ -1,7 +0,0 @@ -const padding = { - xs: 2, - s: 4, - m: 8, - l: 16, -}; -export default padding; diff --git a/src/theme/styles.d.ts b/src/theme/styles.d.ts deleted file mode 100644 index 4bf1c3d9..00000000 --- a/src/theme/styles.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ColorSchemeName } from "react-native"; -import type { MarkedStyles, UserTheme } from "./types"; -declare const getStyles: ( - userStyles?: MarkedStyles, - colorScheme?: ColorSchemeName, - userTheme?: UserTheme, -) => MarkedStyles; -export default getStyles; diff --git a/src/theme/styles.js b/src/theme/styles.js deleted file mode 100644 index 252c4c4b..00000000 --- a/src/theme/styles.js +++ /dev/null @@ -1,189 +0,0 @@ -import { StyleSheet } from "react-native"; -import spacing from "./spacing"; -import colors, {} from "./colors"; -const getFontStyles = (mdColors) => { - return StyleSheet.create({ - regular: { - fontSize: 16, - lineHeight: 24, - color: mdColors.text, - }, - heading: { - fontWeight: "500", - color: mdColors.text, - }, - }); -}; -const getStyles = (userStyles, colorScheme, userTheme) => { - const mdColors = { ...colors[colorScheme || "light"], ...userTheme?.colors }; - const mdSpacing = { ...spacing, ...userTheme?.spacing }; - const fontStyle = getFontStyles(mdColors); - return StyleSheet.create({ - em: StyleSheet.flatten([ - fontStyle.regular, - { - fontStyle: "italic", - }, - userStyles?.em, - ]), - strong: StyleSheet.flatten([ - fontStyle.regular, - { - fontWeight: "bold", - }, - userStyles?.strong, - ]), - strikethrough: StyleSheet.flatten([ - fontStyle.regular, - { - textDecorationLine: "line-through", - textDecorationStyle: "solid", - }, - userStyles?.strikethrough, - ]), - text: StyleSheet.flatten([fontStyle.regular, userStyles?.text]), - paragraph: StyleSheet.flatten([ - fontStyle.regular, - { - paddingVertical: mdSpacing.m, - }, - userStyles?.paragraph, - ]), - link: StyleSheet.flatten([ - fontStyle.regular, - { - fontStyle: "italic", - color: mdColors.link, - }, - userStyles?.link, - ]), - blockquote: StyleSheet.flatten([ - { - borderLeftColor: mdColors.border, - paddingLeft: mdSpacing.l, - borderLeftWidth: mdSpacing.s, - opacity: 0.8, - }, - userStyles?.blockquote, - ]), - h1: StyleSheet.flatten([ - fontStyle.heading, - { - fontSize: 32, - lineHeight: 40, - fontWeight: "bold", - marginVertical: mdSpacing.m, - letterSpacing: 0, - paddingBottom: mdSpacing.s, - borderBottomColor: mdColors.border, - borderBottomWidth: 1, - }, - userStyles?.h1, - ]), - h2: StyleSheet.flatten([ - fontStyle.heading, - { - fontSize: 28, - lineHeight: 36, - marginVertical: mdSpacing.m, - paddingBottom: mdSpacing.s, - borderBottomColor: mdColors.border, - borderBottomWidth: 1, - }, - userStyles?.h2, - ]), - h3: StyleSheet.flatten([ - fontStyle.heading, - { - fontSize: 24, - lineHeight: 32, - marginVertical: mdSpacing.s, - }, - userStyles?.h3, - ]), - h4: StyleSheet.flatten([ - fontStyle.heading, - { - fontSize: 22, - lineHeight: 28, - marginVertical: mdSpacing.s, - }, - userStyles?.h4, - ]), - h5: StyleSheet.flatten([ - fontStyle.regular, - fontStyle.heading, - { - marginVertical: mdSpacing.xs, - }, - userStyles?.h5, - ]), - h6: StyleSheet.flatten([ - fontStyle.heading, - { - fontSize: 14, - lineHeight: 20, - marginVertical: mdSpacing.xs, - }, - userStyles?.h6, - ]), - codespan: StyleSheet.flatten([ - fontStyle.regular, - { - fontStyle: "italic", - backgroundColor: mdColors.code, - fontWeight: "300", - }, - userStyles?.codespan, - ]), - code: StyleSheet.flatten([ - { - padding: mdSpacing.l, - backgroundColor: mdColors.code, - minWidth: "100%", - }, - userStyles?.code, - ]), - hr: StyleSheet.flatten([ - { - borderBottomWidth: 1, - borderBottomColor: mdColors.border, - marginVertical: mdSpacing.s, - }, - userStyles?.hr, - ]), - li: StyleSheet.flatten([ - fontStyle.regular, - { - flexShrink: 1, - }, - userStyles?.li, - ]), - image: StyleSheet.flatten([ - { - resizeMode: "cover", - }, - userStyles?.image, - ]), - table: StyleSheet.flatten([ - { - borderWidth: 1, - borderColor: mdColors.border, - }, - userStyles?.table, - ]), - tableRow: StyleSheet.flatten([ - { - flexDirection: "row", - }, - userStyles?.tableRow, - ]), - tableCell: StyleSheet.flatten([ - { - padding: mdSpacing.s, - }, - userStyles?.tableCell, - ]), - }); -}; -export default getStyles; diff --git a/src/theme/types.d.ts b/src/theme/types.d.ts deleted file mode 100644 index b7efc116..00000000 --- a/src/theme/types.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { ImageStyle, TextStyle, ViewStyle } from "react-native"; -import type { ColorsPropType } from "./colors"; -import type { SpacingKeysType } from "./spacing"; -export interface MarkedStyles { - em?: TextStyle; - strong?: TextStyle; - strikethrough?: TextStyle; - text?: TextStyle; - paragraph?: ViewStyle; - link?: TextStyle; - blockquote?: ViewStyle; - h1?: TextStyle; - h2?: TextStyle; - h3?: TextStyle; - h4?: TextStyle; - h5?: TextStyle; - h6?: TextStyle; - codespan?: TextStyle; - code?: ViewStyle; - hr?: ViewStyle; - list?: ViewStyle; - li?: TextStyle; - image?: ImageStyle; - table?: ViewStyle; - tableRow?: ViewStyle; - tableCell?: ViewStyle; -} -export interface UserTheme { - colors?: ColorsPropType; - spacing?: Record; -} diff --git a/src/theme/types.js b/src/theme/types.js deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/theme/types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/utils/__tests__/handlers.spec.d.ts b/src/utils/__tests__/handlers.spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/utils/__tests__/handlers.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/utils/__tests__/handlers.spec.js b/src/utils/__tests__/handlers.spec.js deleted file mode 100644 index 67a2dcf8..00000000 --- a/src/utils/__tests__/handlers.spec.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Linking } from "react-native"; -import { onLinkPress } from "../handlers"; -jest.mock("react-native/Libraries/Linking/Linking", () => ({ - openURL: jest.fn(() => Promise.resolve("mockResolve")), -})); -describe("onLinkPress", () => { - it("Good url", async () => { - const cb = onLinkPress("https://example.com"); - cb.call(null); - expect(Linking.openURL).toHaveBeenCalled(); - }); - it("Bad url", async () => { - Linking.openURL = jest.fn(() => Promise.reject("mockReject")); - const cb = onLinkPress("example"); - cb.call(null); - expect(Linking.openURL).toHaveBeenCalled(); - }); -}); diff --git a/src/utils/__tests__/svg.spec.d.ts b/src/utils/__tests__/svg.spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/utils/__tests__/svg.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/utils/__tests__/svg.spec.js b/src/utils/__tests__/svg.spec.js deleted file mode 100644 index 9a1b0168..00000000 --- a/src/utils/__tests__/svg.spec.js +++ /dev/null @@ -1,222 +0,0 @@ -import { getSvgDimensions } from "../svg"; -describe("getSvgDimensions", () => { - it("svg with width, height, viewBox attribute", () => { - expect(getSvgDimensions(SVG_WITH_WIDTH_HEIGHT)).toStrictEqual({ - width: 800, - height: 800, - viewBox: "0 0 64 64", - }); - }); - it("svg without width, height", () => { - expect(getSvgDimensions(SVG_WITHOUT_WIDTH_HEIGHT)).toStrictEqual({ - width: 0, - height: 0, - viewBox: "0 0 64 64", - }); - }); - it("svg without width, height, viewBox", () => { - expect(getSvgDimensions(SVG_WITHOUT_WIDTH_HEIGHT_VIEW_BOX)).toStrictEqual({ - width: 0, - height: 0, - viewBox: "", - }); - }); -}); -const SVG_WITH_WIDTH_HEIGHT = ` - - - - - - - - - - - - - - - - - - - - - - -`; -const SVG_WITHOUT_WIDTH_HEIGHT = ` - - - - - - - - - - - - - - - - - - - - - - -`; -const SVG_WITHOUT_WIDTH_HEIGHT_VIEW_BOX = ` - - - - - - - - - - - - - - - - - - - - - - -`; diff --git a/src/utils/__tests__/table.spec.d.ts b/src/utils/__tests__/table.spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/utils/__tests__/table.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/utils/__tests__/table.spec.js b/src/utils/__tests__/table.spec.js deleted file mode 100644 index 592d294c..00000000 --- a/src/utils/__tests__/table.spec.js +++ /dev/null @@ -1,49 +0,0 @@ -import { getTableWidthArr, getTableColAlignmentStyle } from "./../table"; -describe("getTableWidthArr", () => { - const windowWidth = 360; - const colWidth = Math.floor(360 * (1.3 / 3)); - it("negative", () => { - expect(getTableWidthArr(-2, windowWidth)).toStrictEqual([]); - }); - it("zero", () => { - expect(getTableWidthArr(0, windowWidth)).toStrictEqual([]); - }); - it("positive", () => { - expect(getTableWidthArr(2, windowWidth)).toStrictEqual( - Array(2).fill(colWidth), - ); - }); - it("random", () => { - const random = Math.floor(100 * Math.random()); - expect(getTableWidthArr(random, windowWidth)).toStrictEqual( - Array(random).fill(colWidth), - ); - }); -}); -describe("getTableColAlignmentStyle", () => { - it("center", () => { - expect(getTableColAlignmentStyle("center")).toStrictEqual({ - textAlign: "center", - }); - }); - it("left", () => { - expect(getTableColAlignmentStyle("left")).toStrictEqual({ - textAlign: "left", - }); - }); - it("right", () => { - expect(getTableColAlignmentStyle("right")).toStrictEqual({ - textAlign: "right", - }); - }); - it("undefined", () => { - expect(getTableColAlignmentStyle()).toStrictEqual({ - textAlign: "left", - }); - }); - it("null", () => { - expect(getTableColAlignmentStyle(null)).toStrictEqual({ - textAlign: "left", - }); - }); -}); diff --git a/src/utils/__tests__/url.spec.d.ts b/src/utils/__tests__/url.spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/src/utils/__tests__/url.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/utils/__tests__/url.spec.js b/src/utils/__tests__/url.spec.js deleted file mode 100644 index 788d07a9..00000000 --- a/src/utils/__tests__/url.spec.js +++ /dev/null @@ -1,45 +0,0 @@ -import { getValidURL } from "../url"; -describe("getValidURL", () => { - it("abs with http prefix", () => { - expect( - getValidURL("https://www.example.com", "http://www.example.com/path"), - ).toBe("http://www.example.com/path"); - }); - it("abs with https prefix", () => { - expect( - getValidURL("https://www.example.com", "https://www.example.com/path"), - ).toBe("https://www.example.com/path"); - }); - it("abs with no prefix", () => { - expect(getValidURL("https://www.example.com", "/path")).toBe( - "https://www.example.com/path", - ); - }); - it("relative with no prefix", () => { - expect(getValidURL("https://www.example.com", "path")).toBe( - "https://www.example.com/path", - ); - }); - it("prefix with trailing slash", () => { - expect(getValidURL("https://www.example.com/", "path")).toBe( - "https://www.example.com/path", - ); - }); - it("empty prefix", () => { - expect(getValidURL("", "path")).toBe("/path"); - }); - it("ignores prefix value for non-http URLs", () => { - expect(getValidURL("", "mailto:example.com")).toBe("mailto:example.com"); - expect(getValidURL("https://www.example.com", "mailto:example.com")).toBe( - "mailto:example.com", - ); - expect(getValidURL("", "tel:0123456789")).toBe("tel:0123456789"); - expect(getValidURL("https://www.example.com", "tel:0123456789")).toBe( - "tel:0123456789", - ); - expect(getValidURL("", "slack://open")).toBe("slack://open"); - expect(getValidURL("https://www.example.com", "slack://open")).toBe( - "slack://open", - ); - }); -}); diff --git a/src/utils/handlers.d.ts b/src/utils/handlers.d.ts deleted file mode 100644 index 08b63da1..00000000 --- a/src/utils/handlers.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const onLinkPress: (url: string) => () => void; diff --git a/src/utils/handlers.js b/src/utils/handlers.js deleted file mode 100644 index c11110b8..00000000 --- a/src/utils/handlers.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Linking } from "react-native"; -export const onLinkPress = (url) => () => { - Linking.openURL(url) - .then(() => null) - .catch((e) => { - console.warn("URL can't be opened", e); - }); -}; diff --git a/src/utils/svg.d.ts b/src/utils/svg.d.ts deleted file mode 100644 index 1897d346..00000000 --- a/src/utils/svg.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare const getSvgDimensions: (svg: string) => { - width: number; - height: number; - viewBox: string; -}; diff --git a/src/utils/svg.js b/src/utils/svg.js deleted file mode 100644 index 9be614e3..00000000 --- a/src/utils/svg.js +++ /dev/null @@ -1,10 +0,0 @@ -import { parse } from "svg-parser"; -export const getSvgDimensions = (svg) => { - const parsed = parse(svg); - const rootChild = parsed.children[0]; - return { - width: Number.parseInt(String(rootChild.properties?.width ?? "0")), - height: Number.parseInt(String(rootChild.properties?.height ?? "0")), - viewBox: String(rootChild.properties?.viewBox ?? ""), - }; -}; diff --git a/src/utils/table.d.ts b/src/utils/table.d.ts deleted file mode 100644 index cced791c..00000000 --- a/src/utils/table.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { TextStyle } from "react-native"; -import type { TableColAlignment } from "../lib/types"; -export declare const getTableWidthArr: ( - totalCols: number, - windowWidth: number, -) => number[]; -export declare const getTableColAlignmentStyle: ( - alignment?: TableColAlignment, -) => TextStyle; diff --git a/src/utils/table.js b/src/utils/table.js deleted file mode 100644 index 20c39bee..00000000 --- a/src/utils/table.js +++ /dev/null @@ -1,22 +0,0 @@ -export const getTableWidthArr = (totalCols, windowWidth) => { - if (totalCols < 1) { - return []; - } - return Array(totalCols) - .fill(0) - .map(() => { - return Math.floor(windowWidth * (1.3 / 3)); - }); -}; -export const getTableColAlignmentStyle = (alignment) => { - switch (alignment) { - case "center": - return { textAlign: "center" }; - case "left": - return { textAlign: "left" }; - case "right": - return { textAlign: "right" }; - default: - return { textAlign: "left" }; - } -}; diff --git a/src/utils/url.d.ts b/src/utils/url.d.ts deleted file mode 100644 index 9ae161f6..00000000 --- a/src/utils/url.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const getValidURL: (prefix: string, path: string) => string; diff --git a/src/utils/url.js b/src/utils/url.js deleted file mode 100644 index 7e77e426..00000000 --- a/src/utils/url.js +++ /dev/null @@ -1,19 +0,0 @@ -export const getValidURL = (prefix, path) => { - let _prefix = prefix; - // remove trailing slash from prefix - if (_prefix.endsWith("/")) { - _prefix = _prefix.slice(0, -1); - } - // consider path a valid url if it starts with a scheme name followed by a semicolon - // i.e. https://example.com, mailto:person@example.com, tel:1234567, slack://open - const urlPattern = /^[a-z]+:/i; - if (urlPattern.test(path)) { - return path; - } - // absolute path - if (path.startsWith("/")) { - return `${_prefix}${path}`; - } - // relative path - return `${_prefix}/${path}`; -}; From 423f00f09d3fa52a5be20b316caf05aeed175870 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 13:59:07 +0530 Subject: [PATCH 05/17] fix: support custom token rendering --- src/index.ts | 10 ++++++---- src/lib/Parser.tsx | 12 ++---------- src/lib/Renderer.tsx | 8 ++------ src/lib/__tests__/Markdown.spec.tsx | 15 ++++----------- src/lib/types.ts | 9 ++------- 5 files changed, 16 insertions(+), 38 deletions(-) diff --git a/src/index.ts b/src/index.ts index f8080d57..fadf6104 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ -import { Tokenizer, marked } from "marked"; +import { Tokenizer as MarkedTokenizer, marked } from "marked"; +import type { Token, Tokens } from "marked"; import Markdown from "./lib/Markdown"; import Renderer from "./lib/Renderer"; import useMarkdown, { type useMarkdownHookOptions } from "./hooks/useMarkdown"; @@ -6,7 +7,6 @@ import type { MarkdownProps, ParserOptions, RendererInterface, - // CustomToken, } from "./lib/types"; const MarkedLexer = marked.lexer; @@ -16,8 +16,10 @@ export type { ParserOptions, RendererInterface, useMarkdownHookOptions, - // CustomToken, + Token, + Tokens, }; -export { Renderer, useMarkdown, Tokenizer as MarkedTokenizer, MarkedLexer }; +export { useMarkdown, MarkedLexer, Renderer, MarkedTokenizer }; + export default Markdown; diff --git a/src/lib/Parser.tsx b/src/lib/Parser.tsx index 0ec66e33..7412779a 100644 --- a/src/lib/Parser.tsx +++ b/src/lib/Parser.tsx @@ -198,6 +198,7 @@ class Parser { return this.renderer.del(children, strikethroughStyle); } case "text": + case "space": return this.renderer.text(token.raw, { ...this.styles.text, ...styles, @@ -234,17 +235,8 @@ class Parser { this.styles.tableCell, ); } - case "custom": { - const children = this._parse(token.tokens ?? []); - return this.renderer.custom( - token.identifier, - token.raw, - children, - token.args, - ); - } default: { - return null; + return this.renderer.custom(token); } } } diff --git a/src/lib/Renderer.tsx b/src/lib/Renderer.tsx index c4be4848..d8230c3c 100644 --- a/src/lib/Renderer.tsx +++ b/src/lib/Renderer.tsx @@ -10,6 +10,7 @@ import { Dimensions, } from "react-native"; import MarkedList from "@jsamr/react-native-li"; +import type { Tokens } from "marked"; import Disc from "@jsamr/counter-style/presets/disc"; import Decimal from "@jsamr/counter-style/presets/decimal"; import Slugger from "github-slugger"; @@ -216,12 +217,7 @@ class Renderer implements RendererInterface { ); } - custom( - _identifier: string, - _raw: string, - _children: ReactNode[], - _args: Record, - ): ReactNode { + custom(_token: Tokens.Generic): ReactNode { return null; } diff --git a/src/lib/__tests__/Markdown.spec.tsx b/src/lib/__tests__/Markdown.spec.tsx index d00b3554..8ea991d8 100644 --- a/src/lib/__tests__/Markdown.spec.tsx +++ b/src/lib/__tests__/Markdown.spec.tsx @@ -817,17 +817,10 @@ describe("Tokenizer", () => { ), ); - const customFn = jest.fn( - ( - _identifier: string, - _raw: string, - _children: React.ReactNode[], - args: Record = {}, - ): ReactNode => { - const text = (args.text as string) ?? ""; - return {text}; - }, - ); + const customFn = jest.fn((token: Tokens.Generic): ReactNode => { + const text = (token.raw as string) ?? ""; + return {text}; + }); const style: TextStyle = { color: "#ff0000", }; diff --git a/src/lib/types.ts b/src/lib/types.ts index 74bbbb21..381a6cdc 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -6,7 +6,7 @@ import type { ImageStyle, } from "react-native"; import type { MarkedStyles, UserTheme } from "./../theme/types"; -import type { Tokenizer } from "marked"; +import type { Tokenizer, Tokens } from "marked"; export interface ParserOptions { styles?: MarkedStyles; @@ -76,10 +76,5 @@ export interface RendererInterface { rowStyle?: ViewStyle, cellStyle?: ViewStyle, ): ReactNode; - custom( - identifier: string, - raw: string, - children?: ReactNode[], - args?: Record, - ): ReactNode; + custom: (token: Tokens.Generic) => ReactNode; } From 199ed33372e17ffdf101a490c0caeb11afc018ac Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 14:56:36 +0530 Subject: [PATCH 06/17] fix: link display --- examples/react-native-marked-sample/App.tsx | 34 ++++--------------- package.json | 2 +- src/lib/Parser.tsx | 5 ++- src/lib/Renderer.tsx | 4 --- src/lib/__tests__/Markdown.spec.tsx | 10 +----- .../__snapshots__/Markdown.spec.tsx.snap | 26 ++++++++++++-- src/lib/types.ts | 1 - 7 files changed, 34 insertions(+), 48 deletions(-) diff --git a/examples/react-native-marked-sample/App.tsx b/examples/react-native-marked-sample/App.tsx index 80bbab33..6b92cc3e 100644 --- a/examples/react-native-marked-sample/App.tsx +++ b/examples/react-native-marked-sample/App.tsx @@ -11,24 +11,19 @@ import Markdown, { Renderer, MarkedTokenizer, type RendererInterface, - type CustomToken, - MarkedLexer, + type Tokens, } from "react-native-marked"; import { MD_STRING } from "./const"; -class CustomTokenizer extends MarkedTokenizer { - codespan(this: MarkedTokenizer, src: string) { +class CustomTokenizer extends MarkedTokenizer { + codespan(this: MarkedTokenizer, src: string): Tokens.Codespan | undefined { const match = src.match(/^\$+([^\$\n]+?)\$+/); if (match?.[1]) { - const token: CustomToken = { - type: "custom", + return { + type: "codespan", raw: match[0], - identifier: "latex", - args: { - text: match[1].trim(), - }, + text: match[1].trim(), }; - return token; } return super.codespan(src); @@ -45,23 +40,6 @@ class CustomRenderer extends Renderer implements RendererInterface { ); } - custom( - identifier: string, - _raw: string, - _children: ReactNode[] = [], - args: Record = {}, - ): ReactNode { - if (identifier === "latex" && args.text) { - return this.code(args.text as string, "latex", { - flex: 1, - width: "100%", - padding: 16, - minWidth: "100%", - backgroundColor: "#f6f8fa", - }); - } - return null; - } } const renderer = new CustomRenderer(); diff --git a/package.json b/package.json index 1e374ae6..3310feb4 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ ], "setupFilesAfterEnv": ["@testing-library/jest-native/extend-expect"], "transformIgnorePatterns": [ - "node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|react-native-table-component)" + "node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|react-native-table-component|github-slugger)" ] }, "commitlint": { diff --git a/src/lib/Parser.tsx b/src/lib/Parser.tsx index 7412779a..872642e1 100644 --- a/src/lib/Parser.tsx +++ b/src/lib/Parser.tsx @@ -123,7 +123,7 @@ class Parser { } case "link": { // Don't render anchors without text and children - if (token.text.trim.length < 1 || !token.tokens) { + if (token.text.trim().length < 1 || !token.tokens) { return null; } @@ -198,7 +198,6 @@ class Parser { return this.renderer.del(children, strikethroughStyle); } case "text": - case "space": return this.renderer.text(token.raw, { ...this.styles.text, ...styles, @@ -236,7 +235,7 @@ class Parser { ); } default: { - return this.renderer.custom(token); + return null; } } } diff --git a/src/lib/Renderer.tsx b/src/lib/Renderer.tsx index d8230c3c..e0d85e8d 100644 --- a/src/lib/Renderer.tsx +++ b/src/lib/Renderer.tsx @@ -217,10 +217,6 @@ class Renderer implements RendererInterface { ); } - custom(_token: Tokens.Generic): ReactNode { - return null; - } - getKey(): string { return this.slugger.slug(this.slugPrefix); } diff --git a/src/lib/__tests__/Markdown.spec.tsx b/src/lib/__tests__/Markdown.spec.tsx index 8ea991d8..aab9e29d 100644 --- a/src/lib/__tests__/Markdown.spec.tsx +++ b/src/lib/__tests__/Markdown.spec.tsx @@ -4,7 +4,7 @@ import { Text, type TextStyle } from "react-native"; import Markdown from "../Markdown"; import Renderer from "../Renderer"; import type { RendererInterface } from "../types"; -import { Tokenizer, type Tokens } from "marked"; +import { Tokenizer, type Token, type Tokens } from "marked"; // https://www.markdownguide.org/basic-syntax/#headings describe("Headings", () => { @@ -817,16 +817,11 @@ describe("Tokenizer", () => { ), ); - const customFn = jest.fn((token: Tokens.Generic): ReactNode => { - const text = (token.raw as string) ?? ""; - return {text}; - }); const style: TextStyle = { color: "#ff0000", }; class CustomRenderer extends Renderer implements RendererInterface { codespan = codespanFn; - custom = customFn; } class CustomTokenizer extends Tokenizer { @@ -854,9 +849,6 @@ describe("Tokenizer", () => { ); const tree = r.toJSON(); expect(tree).toMatchSnapshot(); - expect(customFn).toHaveBeenCalledWith("latex", "$ latex code $", [], { - text: "latex code", - }); expect(screen.queryByText("hello")).toBeTruthy(); expect(screen.queryByText("latex code")).toBeTruthy(); }); diff --git a/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap b/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap index fad1c577..8395bd79 100644 --- a/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap +++ b/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap @@ -13479,7 +13479,18 @@ exports[`Tokenizer Custom 1`] = ` selectable={true} style={{}} > - + latex code @@ -13559,7 +13570,18 @@ exports[`Tokenizer Custom 1`] = ` selectable={true} style={{}} > - + latex code diff --git a/src/lib/types.ts b/src/lib/types.ts index 381a6cdc..d11acce6 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -76,5 +76,4 @@ export interface RendererInterface { rowStyle?: ViewStyle, cellStyle?: ViewStyle, ): ReactNode; - custom: (token: Tokens.Generic) => ReactNode; } From ef3634b973d5ad7a36f9a9f89c6022cd506560c7 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 17:42:35 +0530 Subject: [PATCH 07/17] chore: upgrade sample app deps --- .../react-native-marked-sample/package.json | 8 +- examples/react-native-marked-sample/yarn.lock | 508 +++++++++--------- 2 files changed, 255 insertions(+), 261 deletions(-) diff --git a/examples/react-native-marked-sample/package.json b/examples/react-native-marked-sample/package.json index a41aee6a..847ed8f0 100644 --- a/examples/react-native-marked-sample/package.json +++ b/examples/react-native-marked-sample/package.json @@ -11,12 +11,12 @@ "web": "expo start --web" }, "dependencies": { - "@expo/metro-runtime": "~4.0.0", - "expo": "~52.0.24", - "expo-status-bar": "~2.0.0", + "@expo/metro-runtime": "~4.0.1", + "expo": "~52.0.28", + "expo-status-bar": "~2.0.1", "react": "18.3.1", "react-dom": "18.3.1", - "react-native": "0.76.5", + "react-native": "0.76.6", "react-native-svg": "15.8.0", "react-native-web": "~0.19.13" }, diff --git a/examples/react-native-marked-sample/yarn.lock b/examples/react-native-marked-sample/yarn.lock index 542a010f..d1e65c00 100644 --- a/examples/react-native-marked-sample/yarn.lock +++ b/examples/react-native-marked-sample/yarn.lock @@ -777,7 +777,20 @@ "@babel/parser" "^7.25.9" "@babel/types" "^7.25.9" -"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.9": +"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3": + version "7.26.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd" + integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.3" + "@babel/parser" "^7.26.3" + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.3" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/traverse@^7.25.3", "@babel/traverse@^7.25.9": version "7.26.4" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd" integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w== @@ -805,29 +818,29 @@ dependencies: uuid "^8.0.0" -"@expo/cli@0.22.8": - version "0.22.8" - resolved "https://registry.yarnpkg.com/@expo/cli/-/cli-0.22.8.tgz#7c9235d733e9bfd24af5e798393da60ad6f0cfaf" - integrity sha512-MpHrfPKcHL+b1wwx+WiniEL5n33tl964tN8EW1K4okW3/tAPgbu3R00NZs6OExH9PZGQP8OKhCXhZttbK2jUnA== +"@expo/cli@0.22.11": + version "0.22.11" + resolved "https://registry.yarnpkg.com/@expo/cli/-/cli-0.22.11.tgz#5bbf562d897e60e170dfc6053a6f5bd71c651669" + integrity sha512-D5Vl7IBLi53WmL57NAFYB1mIqlMQxDIZVzbi/FTpo5a3oIHELKr0ElTKeOLf1f1/Y3FA7cxgphoawdA0+O1JWQ== dependencies: "@0no-co/graphql.web" "^1.0.8" "@babel/runtime" "^7.20.0" "@expo/code-signing-certificates" "^0.0.5" - "@expo/config" "~10.0.7" - "@expo/config-plugins" "~9.0.13" + "@expo/config" "~10.0.8" + "@expo/config-plugins" "~9.0.14" "@expo/devcert" "^1.1.2" - "@expo/env" "~0.4.0" - "@expo/image-utils" "^0.6.0" - "@expo/json-file" "^9.0.0" - "@expo/metro-config" "~0.19.8" - "@expo/osascript" "^2.0.31" - "@expo/package-manager" "^1.7.0" - "@expo/plist" "^0.2.0" - "@expo/prebuild-config" "^8.0.24" + "@expo/env" "~0.4.1" + "@expo/image-utils" "^0.6.4" + "@expo/json-file" "^9.0.1" + "@expo/metro-config" "~0.19.9" + "@expo/osascript" "^2.1.5" + "@expo/package-manager" "^1.7.1" + "@expo/plist" "^0.2.1" + "@expo/prebuild-config" "^8.0.25" "@expo/rudder-sdk-node" "^1.1.1" "@expo/spawn-async" "^1.7.2" "@expo/xcpretty" "^4.3.0" - "@react-native/dev-middleware" "0.76.5" + "@react-native/dev-middleware" "0.76.6" "@urql/core" "^5.0.6" "@urql/exchange-retry" "^1.3.0" accepts "^1.3.8" @@ -866,7 +879,7 @@ requireg "^0.2.2" resolve "^1.22.2" resolve-from "^5.0.0" - resolve.exports "^2.0.2" + resolve.exports "^2.0.3" semver "^7.6.0" send "^0.19.0" slugify "^1.3.4" @@ -890,34 +903,14 @@ node-forge "^1.2.1" nullthrows "^1.1.1" -"@expo/config-plugins@~9.0.10": - version "9.0.12" - resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-9.0.12.tgz#f122b2dca22e135eadf6e73442da3ced0ce8aa0a" - integrity sha512-/Ko/NM+GzvJyRkq8PITm8ms0KY5v0wmN1OQFYRMkcJqOi3PjlhndW+G6bHpJI9mkQXBaUnHwAiGLqIC3+MQ5Wg== - dependencies: - "@expo/config-types" "^52.0.0" - "@expo/json-file" "~9.0.0" - "@expo/plist" "^0.2.0" - "@expo/sdk-runtime-versions" "^1.0.0" - chalk "^4.1.2" - debug "^4.3.5" - getenv "^1.0.0" - glob "^10.4.2" - resolve-from "^5.0.0" - semver "^7.5.4" - slash "^3.0.0" - slugify "^1.6.6" - xcode "^3.0.1" - xml2js "0.6.0" - -"@expo/config-plugins@~9.0.13": - version "9.0.13" - resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-9.0.13.tgz#051f75115943017755000ee429d7cc12d34c60e3" - integrity sha512-9mSjuMoCijA0O4JONJwWXg+xaD4tVeVv7pXWQovnQGxorgMNgygOGEzGi9GXFMki8FJ1Zlt2gyXrcPFXiId7Hw== +"@expo/config-plugins@~9.0.14": + version "9.0.14" + resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-9.0.14.tgz#c57cc86c238b276823ff66d96e4722366d57b12c" + integrity sha512-Lx1ebV95rTFKKQmbu4wMPLz65rKn7mqSpfANdCx+KwRxuLY2JQls8V4h3lQjG6dW8NWf9qV5QaEFAgNB6VMyOQ== dependencies: - "@expo/config-types" "^52.0.2" - "@expo/json-file" "~9.0.0" - "@expo/plist" "^0.2.0" + "@expo/config-types" "^52.0.3" + "@expo/json-file" "~9.0.1" + "@expo/plist" "^0.2.1" "@expo/sdk-runtime-versions" "^1.0.0" chalk "^4.1.2" debug "^4.3.5" @@ -930,44 +923,20 @@ xcode "^3.0.1" xml2js "0.6.0" -"@expo/config-types@^52.0.0": - version "52.0.1" - resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-52.0.1.tgz#327af1b72a3a9d4556f41e083e0e284dd8198b96" - integrity sha512-vD8ZetyKV7U29lR6+NJohYeoLYTH+eNYXJeNiSOrWCz0witJYY11meMmEnpEaVbN89EfC6uauSUOa6wihtbyPQ== - -"@expo/config-types@^52.0.2": - version "52.0.2" - resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-52.0.2.tgz#71f5c43e52fc3af023e936a80f43720c42904d18" - integrity sha512-4hYwnaCxOLlXXF1TE17RY+GU1CyBqzRx7s13VUDhU1PQ8Zr9/kzGoJI0McmfayncO9RIeSqeDWO6dELZWk/0uw== - -"@expo/config@~10.0.4": - version "10.0.6" - resolved "https://registry.yarnpkg.com/@expo/config/-/config-10.0.6.tgz#85830491bc8cce2af3f19276922a13f5578d2aa8" - integrity sha512-xXkfPElrtxznkOZxFASJ7OPa6E9IHSjcZwj5BQ6XUF2dz5M7AFa2h5sXM8AalSaDU5tEBSgoUOjTh5957TlR8g== - dependencies: - "@babel/code-frame" "~7.10.4" - "@expo/config-plugins" "~9.0.10" - "@expo/config-types" "^52.0.0" - "@expo/json-file" "^9.0.0" - deepmerge "^4.3.1" - getenv "^1.0.0" - glob "^10.4.2" - require-from-string "^2.0.2" - resolve-from "^5.0.0" - resolve-workspace-root "^2.0.0" - semver "^7.6.0" - slugify "^1.3.4" - sucrase "3.35.0" +"@expo/config-types@^52.0.3": + version "52.0.3" + resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-52.0.3.tgz#511f2f868172c93abeac7183beeb921dc72d6e1e" + integrity sha512-muxvuARmbysH5OGaiBRlh1Y6vfdmL56JtpXxB+y2Hfhu0ezG1U4FjZYBIacthckZPvnDCcP3xIu1R+eTo7/QFA== -"@expo/config@~10.0.7": - version "10.0.7" - resolved "https://registry.yarnpkg.com/@expo/config/-/config-10.0.7.tgz#173bf8013c81e23dd155c4060f84e1eb5b672601" - integrity sha512-fS9xuxH3U9tuiXofwxrmsan8TfzlDXgPiX38SDMkq/AQctmRtWllD8GNHRIk9Bdz3vODeBv7vRVGKXPBYG72cQ== +"@expo/config@~10.0.8": + version "10.0.8" + resolved "https://registry.yarnpkg.com/@expo/config/-/config-10.0.8.tgz#c94cf98328d2ec38c9da80ec68d252539cd6eb2d" + integrity sha512-RaKwi8e6PbkMilRexdsxObLMdQwxhY6mlgel+l/eW+IfIw8HEydSU0ERlzYUjlGJxHLHUXe4rC2vw8FEvaowyQ== dependencies: "@babel/code-frame" "~7.10.4" - "@expo/config-plugins" "~9.0.13" - "@expo/config-types" "^52.0.2" - "@expo/json-file" "^9.0.0" + "@expo/config-plugins" "~9.0.14" + "@expo/config-types" "^52.0.3" + "@expo/json-file" "^9.0.1" deepmerge "^4.3.1" getenv "^1.0.0" glob "^10.4.2" @@ -996,10 +965,10 @@ tmp "^0.0.33" tslib "^2.4.0" -"@expo/env@~0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@expo/env/-/env-0.4.0.tgz#1ff3a15084566d12ca92cb67e5b0a9796a9f0aa7" - integrity sha512-g2JYFqck3xKIwJyK+8LxZ2ENZPWtRgjFWpeht9abnKgzXVXBeSNECFBkg+WQjQocSIdxXhEWM6hz4ZAe7Tc4ng== +"@expo/env@~0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@expo/env/-/env-0.4.1.tgz#8691f6c7df08e66af767ff607e1eac2010487fdc" + integrity sha512-oDtbO3i9yXD1nx93acWiPTWGljJ3vABn35x1NAbqtQ2JL6mFOcRcArt1dwi4imZyLnG4VCcjabT9irj+LgYntw== dependencies: chalk "^4.0.0" debug "^4.3.4" @@ -1007,10 +976,10 @@ dotenv-expand "~11.0.6" getenv "^1.0.0" -"@expo/fingerprint@0.11.6": - version "0.11.6" - resolved "https://registry.yarnpkg.com/@expo/fingerprint/-/fingerprint-0.11.6.tgz#7e01d436c1610c7dc1fc6898b2d90adaa19a39a0" - integrity sha512-hlVIfMEJYZIqIFMjeGRN5GhK/h6vJ3M4QVc1ZD8F0Bh7gMeI+jZkEyZdL5XT29jergQrksP638e2qFwgrGTw/w== +"@expo/fingerprint@0.11.7": + version "0.11.7" + resolved "https://registry.yarnpkg.com/@expo/fingerprint/-/fingerprint-0.11.7.tgz#cd326b48e18f979b4428e75c84a4c3a66a0cd985" + integrity sha512-2rfYVS4nqWmOPQk+AL5GPfPSawbqqmI5mL++bxAhWADt+d+fjoQYfIrGtjZxQ30f9o/a1PrRPVSuh2j09+diVg== dependencies: "@expo/spawn-async" "^1.7.2" arg "^5.0.2" @@ -1023,10 +992,10 @@ resolve-from "^5.0.0" semver "^7.6.0" -"@expo/image-utils@^0.6.0": - version "0.6.3" - resolved "https://registry.yarnpkg.com/@expo/image-utils/-/image-utils-0.6.3.tgz#89c744460beefc686989b969121357bbd5520c8a" - integrity sha512-v/JbCKBrHeudxn1gN1TgfPE/pWJSlLPrl29uXJBgrJFQVkViQvUHQNDhaS+UEa9wYI5HHh7XYmtzAehyG4L+GA== +"@expo/image-utils@^0.6.4": + version "0.6.4" + resolved "https://registry.yarnpkg.com/@expo/image-utils/-/image-utils-0.6.4.tgz#fc0c18de576c2bb0328d0ff9d067c5ba68c83d28" + integrity sha512-L++1PBzSvf5iYc6UHJ8Db8GcYNkfLDw+a+zqEFBQ3xqRXP/muxb/O7wuiMFlXrj/cfkx4e0U+z1a4ceV0A7S7Q== dependencies: "@expo/spawn-async" "^1.7.2" chalk "^4.0.0" @@ -1039,27 +1008,27 @@ temp-dir "~2.0.0" unique-string "~2.0.0" -"@expo/json-file@^9.0.0", "@expo/json-file@~9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-9.0.0.tgz#e3688c9b108cfd7e819f1354a9458ba6e93fc943" - integrity sha512-M+55xFVrFzDcgMDf+52lPDLjKB5xwRfStWlv/b/Vu2OLgxGZLWpxoPYjlRoHqxjPbCQIi2ZCbobK+0KuNhsELg== +"@expo/json-file@^9.0.1", "@expo/json-file@~9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-9.0.1.tgz#ff60654caf1fa3c33f9b17dcd1e9691eb854a318" + integrity sha512-ZVPhbbEBEwafPCJ0+kI25O2Iivt3XKHEKAADCml1q2cmOIbQnKgLyn8DpOJXqWEyRQr/VWS+hflBh8DU2YFSqg== dependencies: "@babel/code-frame" "~7.10.4" json5 "^2.2.3" write-file-atomic "^2.3.0" -"@expo/metro-config@0.19.8", "@expo/metro-config@~0.19.8": - version "0.19.8" - resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.19.8.tgz#f1ea552b6fa5217093fe364ff5ca78a7e261a28b" - integrity sha512-dVAOetouQYuOTEJ2zR0OTLNPOH6zPkeEt5fY53TK0Wxi1QmtsmH6vEWg05U4zkSJ6f1aXmQ0Za77R8QxuukESA== +"@expo/metro-config@0.19.9", "@expo/metro-config@~0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.19.9.tgz#f020a2523cecf90e4f2a833386a88e07f6d004f8" + integrity sha512-JAsLWhFQqwLH0KsI4OMbPXsKFji5KJEmsi+/02Sz1GCT17YrjRmv1fZ91regUS/FUH2Y/PDAE/+2ulrTgMeG7A== dependencies: "@babel/core" "^7.20.0" "@babel/generator" "^7.20.5" "@babel/parser" "^7.20.0" "@babel/types" "^7.20.0" - "@expo/config" "~10.0.4" - "@expo/env" "~0.4.0" - "@expo/json-file" "~9.0.0" + "@expo/config" "~10.0.8" + "@expo/env" "~0.4.1" + "@expo/json-file" "~9.0.1" "@expo/spawn-async" "^1.7.2" chalk "^4.1.0" debug "^4.3.2" @@ -1072,25 +1041,25 @@ postcss "~8.4.32" resolve-from "^5.0.0" -"@expo/metro-runtime@~4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@expo/metro-runtime/-/metro-runtime-4.0.0.tgz#fedccde1baebe97c02584331194f1f793492abbe" - integrity sha512-+zgCyuXqIzgZVN8h0g36sursGXBy3xqtJW9han7t/iR2HTTrrbEoep5ftW1a27bdSINU96ng+rSsPLbyHYeBvw== +"@expo/metro-runtime@~4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@expo/metro-runtime/-/metro-runtime-4.0.1.tgz#ccc74b32bd48eb64c34a4ff29690204cc11c6e7a" + integrity sha512-CRpbLvdJ1T42S+lrYa1iZp1KfDeBp4oeZOK3hdpiS5n0vR0nhD6sC1gGF0sTboCTp64tLteikz5Y3j53dvgOIw== -"@expo/osascript@^2.0.31": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@expo/osascript/-/osascript-2.1.4.tgz#4918d16ba09d8b01cb393bc5997055e61d31246f" - integrity sha512-LcPjxJ5FOFpqPORm+5MRLV0CuYWMthJYV6eerF+lQVXKlvgSn3EOqaHC3Vf3H+vmB0f6G4kdvvFtg40vG4bIhA== +"@expo/osascript@^2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@expo/osascript/-/osascript-2.1.5.tgz#655c3913e592efbb5db41273b76920911c60809e" + integrity sha512-Cp7YF7msGiTAIbFdzNovwHBfecdMLVL5XzSqq4xQz72ALFCQ3uSIUXRph1QV2r61ugH7Yem0gY8yi7RcDlI4qg== dependencies: "@expo/spawn-async" "^1.7.2" exec-async "^2.2.0" -"@expo/package-manager@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@expo/package-manager/-/package-manager-1.7.0.tgz#6d98090fdfa9d31ab885acb012d6615741594fd1" - integrity sha512-yWn5TIjd42wLHZjNtdZkvCkcxqUGxlI4YHb+bQmgm3tWZ8aBHnLhPb0rgU8+hVHCofmRvVUXfVZv8Uh+kkLXgw== +"@expo/package-manager@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@expo/package-manager/-/package-manager-1.7.1.tgz#13eb686bc949a395d992fb2575f8a1930a6aebf3" + integrity sha512-DKbELrTOdl7U3KT0C07Aka9P+sUP3LL+1UTKf1KmLx2x2gPH1IC+c68N7iQlwNt+yA37qIw6/vKoqyTGu5EL9g== dependencies: - "@expo/json-file" "^9.0.0" + "@expo/json-file" "^9.0.1" "@expo/spawn-async" "^1.7.2" ansi-regex "^5.0.0" chalk "^4.0.0" @@ -1103,26 +1072,26 @@ split "^1.0.1" sudo-prompt "9.1.1" -"@expo/plist@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@expo/plist/-/plist-0.2.0.tgz#beb014c0bfd56a993086c0972ec1ca3ef3f9d36c" - integrity sha512-F/IZJQaf8OIVnVA6XWUeMPC3OH6MV00Wxf0WC0JhTQht2QgjyHUa3U5Gs3vRtDq8tXNsZneOQRDVwpaOnd4zTQ== +"@expo/plist@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@expo/plist/-/plist-0.2.1.tgz#a315e1964ee9eece5c56040d460db5de7af85889" + integrity sha512-9TaXGuNxa0LQwHQn4rYiU6YaERv6dPnQgsdKWq2rKKTr6LWOtGNQCi/yOk/HBLeZSxBm59APT5/6x60uRvr0Mg== dependencies: "@xmldom/xmldom" "~0.7.7" base64-js "^1.2.3" xmlbuilder "^14.0.0" -"@expo/prebuild-config@^8.0.24": - version "8.0.24" - resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-8.0.24.tgz#ec418888e934b9ae3da6310f0de7c30e9d31a38c" - integrity sha512-zxbKW+oHn0/QwKaShjbxD7tv+5WtK2+C5ZJTHztyXJXrBP6BOL5dK4lP2djQVzpHYU1p6ZzKFvp9d1bW/+S32Q== - dependencies: - "@expo/config" "~10.0.7" - "@expo/config-plugins" "~9.0.13" - "@expo/config-types" "^52.0.2" - "@expo/image-utils" "^0.6.0" - "@expo/json-file" "^9.0.0" - "@react-native/normalize-colors" "0.76.5" +"@expo/prebuild-config@^8.0.25": + version "8.0.25" + resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-8.0.25.tgz#c802303030377e73b6c405ef3200a8c751f7631a" + integrity sha512-xYHV8eiydZEDedf2AGaOFRFwcGlaSzrqQH94dwX42urNCU03FO0RUb7yPp4nkb7WNFg5Ov6PDsV7ES+YwzNgYQ== + dependencies: + "@expo/config" "~10.0.8" + "@expo/config-plugins" "~9.0.14" + "@expo/config-types" "^52.0.3" + "@expo/image-utils" "^0.6.4" + "@expo/json-file" "^9.0.1" + "@react-native/normalize-colors" "0.76.6" debug "^4.3.1" fs-extra "^9.0.0" resolve-from "^5.0.0" @@ -1346,22 +1315,22 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@react-native/assets-registry@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.76.5.tgz#3343338813aa6354df9fec52af50d0b5f7f3d013" - integrity sha512-MN5dasWo37MirVcKWuysRkRr4BjNc81SXwUtJYstwbn8oEkfnwR9DaqdDTo/hHOnTdhafffLIa2xOOHcjDIGEw== +"@react-native/assets-registry@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.76.6.tgz#649af8a19cbabcea321dbcfb1a1ae04bb298d958" + integrity sha512-YI8HoReYiIwdFQs+k9Q9qpFTnsyYikZxgs/UVtVbhKixXDQF6F9LLvj2naOx4cfV+RGybNKxwmDl1vUok/dRFQ== -"@react-native/babel-plugin-codegen@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.76.5.tgz#a7c32274351e51db9c0a7849ce8059940448c087" - integrity sha512-xe7HSQGop4bnOLMaXt0aU+rIatMNEQbz242SDl8V9vx5oOTI0VbZV9yLy6yBc6poUlYbcboF20YVjoRsxX4yww== +"@react-native/babel-plugin-codegen@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.76.6.tgz#0c249966ab43ac2200aadd051abcec4691c9a845" + integrity sha512-yFC9I/aDBOBz3ZMlqKn2NY/mDUtCksUNZ7AQmBiTAeVTUP0ujEjE0hTOx5Qd+kok7A7hwZEX87HdSgjiJZfr5g== dependencies: - "@react-native/codegen" "0.76.5" + "@react-native/codegen" "0.76.6" -"@react-native/babel-preset@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.76.5.tgz#794ca17e1107e46712153f296a4930de2048e20e" - integrity sha512-1Nu5Um4EogOdppBLI4pfupkteTjWfmI0hqW8ezWTg7Bezw0FtBj8yS8UYVd3wTnDFT9A5mA2VNoNUqomJnvj2A== +"@react-native/babel-preset@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.76.6.tgz#f84fd12ceb2961946c599714d379bf900e140952" + integrity sha512-ojlVWY6S/VE/nb9hIRetPMTsW9ZmGb2R3dnToEXAtQQDz41eHMHXbkw/k2h0THp6qhas25ruNvn3N5n2o+lBzg== dependencies: "@babel/core" "^7.25.2" "@babel/plugin-proposal-export-default-from" "^7.24.7" @@ -1404,15 +1373,15 @@ "@babel/plugin-transform-typescript" "^7.25.2" "@babel/plugin-transform-unicode-regex" "^7.24.7" "@babel/template" "^7.25.0" - "@react-native/babel-plugin-codegen" "0.76.5" + "@react-native/babel-plugin-codegen" "0.76.6" babel-plugin-syntax-hermes-parser "^0.25.1" babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.14.0" -"@react-native/codegen@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.76.5.tgz#4d89ec14a023d6946dbc44537c39b03bd006db7b" - integrity sha512-FoZ9VRQ5MpgtDAnVo1rT9nNRfjnWpE40o1GeJSDlpUMttd36bVXvsDm8W/NhX8BKTWXSX+CPQJsRcvN1UPYGKg== +"@react-native/codegen@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.76.6.tgz#1c6822c59ac25a1ce608562481caf25e535f091f" + integrity sha512-BABb3e5G/+hyQYEYi0AODWh2km2d8ERoASZr6Hv90pVXdUHRYR+yxCatX7vSd9rnDUYndqRTzD0hZWAucPNAKg== dependencies: "@babel/parser" "^7.25.3" glob "^7.1.1" @@ -1423,13 +1392,13 @@ nullthrows "^1.1.1" yargs "^17.6.2" -"@react-native/community-cli-plugin@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.76.5.tgz#e701a9f99565504a2510d1b54713b1c5dd0f1bb4" - integrity sha512-3MKMnlU0cZOWlMhz5UG6WqACJiWUrE3XwBEumzbMmZw3Iw3h+fIsn+7kLLE5EhzqLt0hg5Y4cgYFi4kOaNgq+g== +"@react-native/community-cli-plugin@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.76.6.tgz#3cdd87405c9e0ace5a5df29d206dea22a14e6334" + integrity sha512-nETlc/+U5cESVluzzgN0OcVfcoMijGBaDWzOaJhoYUodcuqnqtu75XsSEc7yzlYjwNQG+vF83mu9CQGezruNMA== dependencies: - "@react-native/dev-middleware" "0.76.5" - "@react-native/metro-babel-transformer" "0.76.5" + "@react-native/dev-middleware" "0.76.6" + "@react-native/metro-babel-transformer" "0.76.6" chalk "^4.0.0" execa "^5.1.1" invariant "^2.2.4" @@ -1440,18 +1409,18 @@ readline "^1.3.0" semver "^7.1.3" -"@react-native/debugger-frontend@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.76.5.tgz#0e89940543fb5029506690b83f12547d0bf42cc4" - integrity sha512-5gtsLfBaSoa9WP8ToDb/8NnDBLZjv4sybQQj7rDKytKOdsXm3Pr2y4D7x7GQQtP1ZQRqzU0X0OZrhRz9xNnOqA== +"@react-native/debugger-frontend@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.76.6.tgz#e8eae252f9a3d4b2a811748cf2a504242de2ce0f" + integrity sha512-kP97xMQjiANi5/lmf8MakS7d8FTJl+BqYHQMqyvNiY+eeWyKnhqW2GL2v3eEUBAuyPBgJGivuuO4RvjZujduJg== -"@react-native/dev-middleware@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.76.5.tgz#10d02fcc6c3c9d24f6dc147c2ef95d6fa6bd3787" - integrity sha512-f8eimsxpkvMgJia7POKoUu9uqjGF6KgkxX4zqr/a6eoR1qdEAWUd6PonSAqtag3PAqvEaJpB99gLH2ZJI1nDGg== +"@react-native/dev-middleware@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.76.6.tgz#c10c1587444abbc7e9f92491a4a79d4464dc3ecd" + integrity sha512-1bAyd2/X48Nzb45s5l2omM75vy764odx/UnDs4sJfFCuK+cupU4nRPgl0XWIqgdM/2+fbQ3E4QsVS/WIKTFxvQ== dependencies: "@isaacs/ttlcache" "^1.4.1" - "@react-native/debugger-frontend" "0.76.5" + "@react-native/debugger-frontend" "0.76.6" chrome-launcher "^0.15.2" chromium-edge-launcher "^0.2.0" connect "^3.6.5" @@ -1462,40 +1431,40 @@ serve-static "^1.13.1" ws "^6.2.3" -"@react-native/gradle-plugin@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.76.5.tgz#90d55ec3a99c609358db97b2d7444b28fdc35bc0" - integrity sha512-7KSyD0g0KhbngITduC8OABn0MAlJfwjIdze7nA4Oe1q3R7qmAv+wQzW+UEXvPah8m1WqFjYTkQwz/4mK3XrQGw== +"@react-native/gradle-plugin@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.76.6.tgz#50786e65da9baa6b78b504602bf8481be173e3fc" + integrity sha512-sDzpf4eiynryoS6bpYCweGoxSmWgCSx9lzBoxIIW+S6siyGiTaffzZHWCm8mIn9UZsSPlEO37q62ggnR9Zu/OA== -"@react-native/js-polyfills@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.76.5.tgz#8f35696d96f804de589cd38382c4f0ffbbc248d5" - integrity sha512-ggM8tcKTcaqyKQcXMIvcB0vVfqr9ZRhWVxWIdiFO1mPvJyS6n+a+lLGkgQAyO8pfH0R1qw6K9D0nqbbDo865WQ== +"@react-native/js-polyfills@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.76.6.tgz#83b65f3ca5f531abfcc6debb2b47c18b32d4bd47" + integrity sha512-cDD7FynxWYxHkErZzAJtzPGhJ13JdOgL+R0riTh0hCovOfIUz9ItffdLQv2nx48lnvMTQ+HZXMnGOZnsFCNzQw== -"@react-native/metro-babel-transformer@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.76.5.tgz#ed5a05fff34c47af43eba4069e50be7c486f77bd" - integrity sha512-Cm9G5Sg5BDty3/MKa3vbCAJtT3YHhlEaPlQALLykju7qBS+pHZV9bE9hocfyyvc5N/osTIGWxG5YOfqTeMu1oQ== +"@react-native/metro-babel-transformer@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.76.6.tgz#ec77a5459b288db81dba53dc24747c71eb3c041f" + integrity sha512-xSBi9jPliThu5HRSJvluqUlDOLLEmf34zY/U7RDDjEbZqC0ufPcPS7c5XsSg0GDPiXc7lgjBVesPZsKFkoIBgA== dependencies: "@babel/core" "^7.25.2" - "@react-native/babel-preset" "0.76.5" + "@react-native/babel-preset" "0.76.6" hermes-parser "0.23.1" nullthrows "^1.1.1" -"@react-native/normalize-colors@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.5.tgz#a33560736311aefcf1d3cb594597befe81a9a53c" - integrity sha512-6QRLEok1r55gLqj+94mEWUENuU5A6wsr2OoXpyq/CgQ7THWowbHtru/kRGRr6o3AQXrVnZheR60JNgFcpNYIug== +"@react-native/normalize-colors@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.6.tgz#c2688aee5a824ad5331bb2b01791b024cd6643ea" + integrity sha512-1n4udXH2Cla31iA/8eLRdhFHpYUYK1NKWCn4m1Sr9L4SarWKAYuRFliK1fcLvPPALCFoFlWvn8I0ekdUOHMzDQ== "@react-native/normalize-colors@^0.74.1": version "0.74.88" resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.74.88.tgz#46f4c7270c8e6853281d7dd966e0eb362068e41a" integrity sha512-He5oTwPBxvXrxJ91dZzpxR7P+VYmc9IkJfhuH8zUiU50ckrt+xWNjtVugPdUv4LuVjmZ36Vk2EX8bl1gVn2dVA== -"@react-native/virtualized-lists@0.76.5": - version "0.76.5" - resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.76.5.tgz#394c2d48687db30c79278d183fda8a129a2d24d3" - integrity sha512-M/fW1fTwxrHbcx0OiVOIxzG6rKC0j9cR9Csf80o77y1Xry0yrNPpAlf8D1ev3LvHsiAUiRNFlauoPtodrs2J1A== +"@react-native/virtualized-lists@0.76.6": + version "0.76.6" + resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.76.6.tgz#ae08b1efd49060c253da889a1a37ffbef9388743" + integrity sha512-0HUWVwJbRq1BWFOu11eOWGTSmK9nMHhoMPyoI27wyWcl/nqUx7HOxMbRVq0DsTCyATSMPeF+vZ6o1REapcNWKw== dependencies: invariant "^2.2.4" nullthrows "^1.1.1" @@ -1923,10 +1892,10 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" -babel-preset-expo@~12.0.5: - version "12.0.5" - resolved "https://registry.yarnpkg.com/babel-preset-expo/-/babel-preset-expo-12.0.5.tgz#6ed5fa3ad442ca3e88670a91dae39492fd46007b" - integrity sha512-rEFjN1CoMYEWSRpE+Hvw+zv+nLbDXyRM8vGAoYJtFPJovHupX2VRWPVaqtHlnMTrzsGFQDf4WfQJrjAQ9e2hAQ== +babel-preset-expo@~12.0.6: + version "12.0.6" + resolved "https://registry.yarnpkg.com/babel-preset-expo/-/babel-preset-expo-12.0.6.tgz#2f39fe421d5ba9a0ce74dcd918a458c62c6601da" + integrity sha512-az3H7gDVo0wxNBAFES8h5vLLWE8NPGkD9g5P962hDEOqZUdyPacb9MOzicypeLmcq9zQWr6E3iVtEHoNagCTTQ== dependencies: "@babel/plugin-proposal-decorators" "^7.12.9" "@babel/plugin-transform-export-namespace-from" "^7.22.11" @@ -1934,7 +1903,7 @@ babel-preset-expo@~12.0.5: "@babel/plugin-transform-parameters" "^7.22.15" "@babel/preset-react" "^7.22.15" "@babel/preset-typescript" "^7.23.0" - "@react-native/babel-preset" "0.76.5" + "@react-native/babel-preset" "0.76.6" babel-plugin-react-native-web "~0.19.13" react-refresh "^0.14.2" @@ -2711,47 +2680,47 @@ execa@^5.1.1: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -expo-asset@~11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/expo-asset/-/expo-asset-11.0.1.tgz#8608f5ea4639698553725b6690dd621f6f70f206" - integrity sha512-WatvD7JVC89EsllXFYcS/rji3ajVzE2B/USo0TqedsETixwyVCQfrrvCdCPQyuKghrxVNEj8bQ/Qbea/RZLYjg== +expo-asset@~11.0.2: + version "11.0.3" + resolved "https://registry.yarnpkg.com/expo-asset/-/expo-asset-11.0.3.tgz#2fa2ff07c4ba028e2fa8210bd44b5aa2107b6101" + integrity sha512-vgJnC82IooAVMy5PxbdFIMNJhW4hKAUyxc5VIiAPPf10vFYw6CqHm+hrehu4ST1I4bvg5PV4uKdPxliebcbgLg== dependencies: - "@expo/image-utils" "^0.6.0" - expo-constants "~17.0.0" + "@expo/image-utils" "^0.6.4" + expo-constants "~17.0.5" invariant "^2.2.4" md5-file "^3.2.3" -expo-constants@~17.0.0, expo-constants@~17.0.3: - version "17.0.3" - resolved "https://registry.yarnpkg.com/expo-constants/-/expo-constants-17.0.3.tgz#a05b38e0417d59759ece1642b4d483889e04dbda" - integrity sha512-lnbcX2sAu8SucHXEXxSkhiEpqH+jGrf+TF+MO6sHWIESjwOUVVYlT8qYdjR9xbxWmqFtrI4KV44FkeJf2DaFjQ== +expo-constants@~17.0.5: + version "17.0.5" + resolved "https://registry.yarnpkg.com/expo-constants/-/expo-constants-17.0.5.tgz#b5deb4a4242cd6ef1f6c68e745664f69d41a0ffb" + integrity sha512-6SHXh32jCB+vrp2TRDNkoGoM421eOBPZIXX9ixI0hKKz71tIjD+LMr/P+rGUd/ks312MP3WK3j5vcYYPkCD8tQ== dependencies: - "@expo/config" "~10.0.4" - "@expo/env" "~0.4.0" + "@expo/config" "~10.0.8" + "@expo/env" "~0.4.1" -expo-file-system@~18.0.6: - version "18.0.6" - resolved "https://registry.yarnpkg.com/expo-file-system/-/expo-file-system-18.0.6.tgz#43f7718530d0e2aa1f49bca7ccb721007acabf2c" - integrity sha512-gGEwIJCXV3/wpIJ/wRyhmieLOSAY7HeFFjb+wEfHs04aE63JYR+rXXV4b7rBpEh1ZgNV9U91zfet/iQG7J8HBQ== +expo-file-system@~18.0.7: + version "18.0.8" + resolved "https://registry.yarnpkg.com/expo-file-system/-/expo-file-system-18.0.8.tgz#20a72fbb914ed7f96963d37e38ff80cb42311a84" + integrity sha512-hU4N6Jfr08b5/mXH3A9JDpmmHJrH3rM8Xu46ZxEzqGTmyk+FW9raCPP93uyVl1LIxi8+21/p44ih/SHIwUY4cA== dependencies: web-streams-polyfill "^3.3.2" -expo-font@~13.0.2: - version "13.0.2" - resolved "https://registry.yarnpkg.com/expo-font/-/expo-font-13.0.2.tgz#efd3e91714c040a0cf38db91920bce2e0331ff6e" - integrity sha512-H9FaXM7ZW5+EfV38w80BgJG3H17kB7CuVXwHoiszIYyoPfWz9bWesFe4QwNZjTq3pzKes28sSd8irFuflIrSIA== +expo-font@~13.0.3: + version "13.0.3" + resolved "https://registry.yarnpkg.com/expo-font/-/expo-font-13.0.3.tgz#7660ec4e3f5df0782bfa563fea7170c7ce2865ab" + integrity sha512-9IdYz+A+b3KvuCYP7DUUXF4VMZjPU+IsvAnLSVJ2TfP6zUD2JjZFx3jeo/cxWRkYk/aLj5+53Te7elTAScNl4Q== dependencies: fontfaceobserver "^2.1.0" -expo-keep-awake@~14.0.1: - version "14.0.1" - resolved "https://registry.yarnpkg.com/expo-keep-awake/-/expo-keep-awake-14.0.1.tgz#77c38feefa95c494aa167e6df5a6eacd17af2358" - integrity sha512-c5mGCAIk2YM+Vsdy90BlEJ4ZX+KG5Au9EkJUIxXWlpnuKmDAJ3N+5nEZ7EUO1ZTheqoSBeAo4jJ8rTWPU+JXdw== +expo-keep-awake@~14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/expo-keep-awake/-/expo-keep-awake-14.0.2.tgz#124a729df43c87994631f51d5b1b5093d58e6c80" + integrity sha512-71XAMnoWjKZrN8J7Q3+u0l9Ytp4OfhNAYz8BCWF1/9aFUw09J3I7Z5DuI3MUsVMa/KWi+XhG+eDUFP8cVA19Uw== -expo-modules-autolinking@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/expo-modules-autolinking/-/expo-modules-autolinking-2.0.4.tgz#28fcd12fb0d066a2933cca3bf3b597da0f6b2f2a" - integrity sha512-e0p+19NhmD50U7s7BV7kWIypWmTNC9n/VlJKlXS05hM/zX7pe6JKmXyb+BFnXJq3SLBalLCUY0tu2gEUF3XeVg== +expo-modules-autolinking@2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/expo-modules-autolinking/-/expo-modules-autolinking-2.0.7.tgz#fc40ba7505f42f971253ea20a927693f2c123a56" + integrity sha512-rkGc6a/90AC3q8wSy4V+iIpq6Fd0KXmQICKrvfmSWwrMgJmLfwP4QTrvLYPYOOMjFwNJcTaohcH8vzW/wYKrMg== dependencies: "@expo/spawn-async" "^1.7.2" chalk "^4.1.0" @@ -2762,38 +2731,38 @@ expo-modules-autolinking@2.0.4: require-from-string "^2.0.2" resolve-from "^5.0.0" -expo-modules-core@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-2.1.2.tgz#258be4fbd162b69eb4ad2789131ac2dc7e85fc08" - integrity sha512-0OhMU5S8zf9c/CRh1MwiXfOInI9wzz6yiIh5RuR/9J7N6xHRum68hInsPbaSc1UQpo08ZZLM4MPsbpoNRUoqIg== +expo-modules-core@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-2.2.0.tgz#2b74fc72524197cd7f9908b91fbd8d9c7b423673" + integrity sha512-mOFEHIe6jZ7G5pYUVSQ2Ghs3CUr9Uz6DOh4JI+4PsTf0gmEvMmMEOrxirS89jRWQjXPJ7QaGBK0CJrZlj/Sdeg== dependencies: invariant "^2.2.4" -expo-status-bar@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/expo-status-bar/-/expo-status-bar-2.0.0.tgz#dd99adc2ace12a24c92718cd0f97b93347103393" - integrity sha512-vxxdpvpNDMTEc5uTiIrbTvySKKUsOACmfl8OZuUdjNle05oGqwtq3v5YObwym/njSByjoyuZX8UpXBZnxvarwQ== +expo-status-bar@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/expo-status-bar/-/expo-status-bar-2.0.1.tgz#fc07726346dc30fbb68aadb0d7890b34fba42eee" + integrity sha512-AkIPX7jWHRPp83UBZ1iXtVvyr0g+DgBVvIXTtlmPtmUsm8Vq9Bb5IGj86PW8osuFlgoTVAg7HI/+Ok7yEYwiRg== -expo@~52.0.24: - version "52.0.24" - resolved "https://registry.yarnpkg.com/expo/-/expo-52.0.24.tgz#e53a5f4a608c35f1f125c64d64580988023c3080" - integrity sha512-g9o7Hi1Zqr5MHNR76sMVm3oEwBFWgAozx4CMbVIgJE+wq8Gu0WZyOFOL6NswR5aZs+Cx0CK5hZEXwDtLQql8WQ== +expo@~52.0.28: + version "52.0.28" + resolved "https://registry.yarnpkg.com/expo/-/expo-52.0.28.tgz#3dd23d5ebbccd50797c375b8723b6bfe1a374d4c" + integrity sha512-0O/JEYYCFszJ85frislm79YmlrQA5ghAQXV4dqcQcsy9FqftdicD4p/ehT36yiuGIhaKC6fn25LEaJ9JR2ei7g== dependencies: "@babel/runtime" "^7.20.0" - "@expo/cli" "0.22.8" - "@expo/config" "~10.0.7" - "@expo/config-plugins" "~9.0.13" - "@expo/fingerprint" "0.11.6" - "@expo/metro-config" "0.19.8" + "@expo/cli" "0.22.11" + "@expo/config" "~10.0.8" + "@expo/config-plugins" "~9.0.14" + "@expo/fingerprint" "0.11.7" + "@expo/metro-config" "0.19.9" "@expo/vector-icons" "^14.0.0" - babel-preset-expo "~12.0.5" - expo-asset "~11.0.1" - expo-constants "~17.0.3" - expo-file-system "~18.0.6" - expo-font "~13.0.2" - expo-keep-awake "~14.0.1" - expo-modules-autolinking "2.0.4" - expo-modules-core "2.1.2" + babel-preset-expo "~12.0.6" + expo-asset "~11.0.2" + expo-constants "~17.0.5" + expo-file-system "~18.0.7" + expo-font "~13.0.3" + expo-keep-awake "~14.0.2" + expo-modules-autolinking "2.0.7" + expo-modules-core "2.2.0" fbemitter "^3.0.0" web-streams-polyfill "^3.3.2" whatwg-url-without-unicode "8.0.0-3" @@ -4726,19 +4695,19 @@ react-native-web@~0.19.13: postcss-value-parser "^4.2.0" styleq "^0.1.3" -react-native@0.76.5: - version "0.76.5" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.76.5.tgz#3ce43d3c31f46cfd98e56ef2dfc70866c04ad185" - integrity sha512-op2p2kB+lqMF1D7AdX4+wvaR0OPFbvWYs+VBE7bwsb99Cn9xISrLRLAgFflZedQsa5HvnOGrULhtnmItbIKVVw== +react-native@0.76.6: + version "0.76.6" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.76.6.tgz#65f56f43ef1f4ec0fb0c132adba4f278a7e28cfa" + integrity sha512-AsRi+ud6v6ADH7ZtSOY42kRB4nbM0KtSu450pGO4pDudl4AEK/AF96ai88snb2/VJJSGGa/49QyJVFXxz/qoFg== dependencies: "@jest/create-cache-key-function" "^29.6.3" - "@react-native/assets-registry" "0.76.5" - "@react-native/codegen" "0.76.5" - "@react-native/community-cli-plugin" "0.76.5" - "@react-native/gradle-plugin" "0.76.5" - "@react-native/js-polyfills" "0.76.5" - "@react-native/normalize-colors" "0.76.5" - "@react-native/virtualized-lists" "0.76.5" + "@react-native/assets-registry" "0.76.6" + "@react-native/codegen" "0.76.6" + "@react-native/community-cli-plugin" "0.76.6" + "@react-native/gradle-plugin" "0.76.6" + "@react-native/js-polyfills" "0.76.6" + "@react-native/normalize-colors" "0.76.6" + "@react-native/virtualized-lists" "0.76.6" abort-controller "^3.0.0" anser "^1.4.9" ansi-regex "^5.0.0" @@ -4907,7 +4876,7 @@ resolve-workspace-root@^2.0.0: resolved "https://registry.yarnpkg.com/resolve-workspace-root/-/resolve-workspace-root-2.0.0.tgz#a0098daa0067cd0efa6eb525c57c8fb4a61e78f8" integrity sha512-IsaBUZETJD5WsI11Wt8PKHwaIe45or6pwNc8yflvLJ4DWtImK9kuLoH5kUva/2Mmx/RdIyr4aONNSa2v9LTJsw== -resolve.exports@^2.0.2: +resolve.exports@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f" integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== @@ -5232,7 +5201,16 @@ stream-buffers@2.2.x, stream-buffers@~2.2.0: resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" integrity sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -5257,7 +5235,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -5271,6 +5249,13 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -5715,7 +5700,16 @@ wonka@^6.3.2: resolved "https://registry.yarnpkg.com/wonka/-/wonka-6.3.4.tgz#76eb9316e3d67d7febf4945202b5bdb2db534594" integrity sha512-CjpbqNtBGNAeyNS/9W6q3kSkKE52+FjIj7AkFlLr11s/VWGUu6a2CdYSdGxocIhIVjaW/zchesBQUKPVU69Cqg== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== From 590f3996ce90a7cbc1b9d801a7132a06666128c8 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 17:44:34 +0530 Subject: [PATCH 08/17] fix: remove unused imports --- src/lib/Renderer.tsx | 1 - src/lib/__tests__/Markdown.spec.tsx | 2 +- src/lib/types.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/Renderer.tsx b/src/lib/Renderer.tsx index e0d85e8d..ba11c5f2 100644 --- a/src/lib/Renderer.tsx +++ b/src/lib/Renderer.tsx @@ -10,7 +10,6 @@ import { Dimensions, } from "react-native"; import MarkedList from "@jsamr/react-native-li"; -import type { Tokens } from "marked"; import Disc from "@jsamr/counter-style/presets/disc"; import Decimal from "@jsamr/counter-style/presets/decimal"; import Slugger from "github-slugger"; diff --git a/src/lib/__tests__/Markdown.spec.tsx b/src/lib/__tests__/Markdown.spec.tsx index aab9e29d..82ec8848 100644 --- a/src/lib/__tests__/Markdown.spec.tsx +++ b/src/lib/__tests__/Markdown.spec.tsx @@ -4,7 +4,7 @@ import { Text, type TextStyle } from "react-native"; import Markdown from "../Markdown"; import Renderer from "../Renderer"; import type { RendererInterface } from "../types"; -import { Tokenizer, type Token, type Tokens } from "marked"; +import { Tokenizer, type Tokens } from "marked"; // https://www.markdownguide.org/basic-syntax/#headings describe("Headings", () => { diff --git a/src/lib/types.ts b/src/lib/types.ts index d11acce6..e2197013 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -6,7 +6,7 @@ import type { ImageStyle, } from "react-native"; import type { MarkedStyles, UserTheme } from "./../theme/types"; -import type { Tokenizer, Tokens } from "marked"; +import type { Tokenizer } from "marked"; export interface ParserOptions { styles?: MarkedStyles; From 3212112e38550c71abbfc0ed1f14f1ff5e020c9f Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 18:21:41 +0530 Subject: [PATCH 09/17] feat(minor): migrate to react-native-reanimated-table --- package.json | 5 +- src/components/MDTable.tsx | 60 +++ src/lib/Renderer.tsx | 46 +-- yarn.lock | 812 +------------------------------------ 4 files changed, 86 insertions(+), 837 deletions(-) create mode 100644 src/components/MDTable.tsx diff --git a/package.json b/package.json index 3310feb4..ce4eef79 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "@types/node": "22.10.6", "@types/react": "18.3.18", "@types/react-native": "0.72.6", - "@types/react-native-table-component": "1.2.8", "@types/svg-parser": "^2.0.3", "commitlint": "19.6.1", "danger": "12.3.3", @@ -93,7 +92,7 @@ ], "setupFilesAfterEnv": ["@testing-library/jest-native/extend-expect"], "transformIgnorePatterns": [ - "node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|react-native-table-component|github-slugger)" + "node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|github-slugger)" ] }, "commitlint": { @@ -159,7 +158,7 @@ "github-slugger": "2.0.0", "html-entities": "2.5.2", "marked": "15.0.6", - "react-native-table-component": "1.2.2", + "react-native-reanimated-table": "^0.0.2", "svg-parser": "2.0.4" }, "engines": { diff --git a/src/components/MDTable.tsx b/src/components/MDTable.tsx new file mode 100644 index 00000000..157962ea --- /dev/null +++ b/src/components/MDTable.tsx @@ -0,0 +1,60 @@ +import React, { memo, type FunctionComponent, type ReactNode } from "react"; +import { View, ScrollView, type ViewStyle } from "react-native"; +import { Table, TableWrapper, Cell } from "react-native-reanimated-table"; + +type MDTableProps = { + header: ReactNode[][]; + rows: ReactNode[][][]; + widthArr: number[]; + rowStyle?: ViewStyle; + cellStyle?: ViewStyle; + borderColor?: string; + borderWidth?: number; + tableStyle?: ViewStyle; +}; + +const MDTable: FunctionComponent = ({ + header, + rows, + widthArr, + cellStyle, + rowStyle, + tableStyle, + borderColor, + borderWidth, +}) => { + return ( + + + + {header.map((headerCol, index) => { + return ( + {headerCol}} + /> + ); + })} + + {rows.map((rowData, index) => { + return ( + + {rowData.map((cellData, cellIndex) => { + return ( + {cellData}} + /> + ); + })} + + ); + })} +
+
+ ); +}; + +export default memo(MDTable); diff --git a/src/lib/Renderer.tsx b/src/lib/Renderer.tsx index ba11c5f2..47a39841 100644 --- a/src/lib/Renderer.tsx +++ b/src/lib/Renderer.tsx @@ -13,12 +13,12 @@ import MarkedList from "@jsamr/react-native-li"; import Disc from "@jsamr/counter-style/presets/disc"; import Decimal from "@jsamr/counter-style/presets/decimal"; import Slugger from "github-slugger"; -import { Table, Cell, TableWrapper } from "react-native-table-component"; import MDImage from "./../components/MDImage"; import { onLinkPress } from "../utils/handlers"; import type { RendererInterface } from "./types"; import { getTableWidthArr } from "../utils/table"; import MDSvg from "./../components/MDSvg"; +import MDTable from "./../components/MDTable"; class Renderer implements RendererInterface { private slugPrefix = "react-native-marked-ele"; @@ -178,41 +178,17 @@ class Renderer implements RendererInterface { cellStyle?: ViewStyle, ): React.ReactNode { const widthArr = getTableWidthArr(header.length, this.windowWidth); - const { borderWidth, borderColor, ...tableStyleRest } = tableStyle || {}; + const { borderWidth, borderColor } = tableStyle || {}; return ( - - - - {header.map((headerCol, index) => { - return ( - {headerCol}} - /> - ); - })} - - {rows.map((rowData, index) => { - return ( - - {rowData.map((cellData, cellIndex) => { - return ( - {cellData}} - /> - ); - })} - - ); - })} -
-
+ ); } diff --git a/yarn.lock b/yarn.lock index 7c59645a..038327b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25,13 +25,6 @@ "@babel/highlight" "^7.22.13" chalk "^2.4.2" -"@babel/code-frame@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" - integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== - dependencies: - "@babel/highlight" "^7.22.5" - "@babel/code-frame@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" @@ -267,13 +260,6 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-annotate-as-pure@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" - integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== - dependencies: - "@babel/types" "^7.22.5" - "@babel/helper-annotate-as-pure@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz#5373c7bc8366b12a033b4be1ac13a206c6656aab" @@ -381,21 +367,6 @@ "@babel/helper-replace-supers" "^7.18.9" "@babel/helper-split-export-declaration" "^7.18.6" -"@babel/helper-create-class-features-plugin@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz#97a61b385e57fe458496fad19f8e63b63c867de4" - integrity sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" - "@babel/helper-member-expression-to-functions" "^7.22.15" - "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.9" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - semver "^6.3.1" - "@babel/helper-create-class-features-plugin@^7.24.7": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.0.tgz#a109bf9c3d58dfed83aaf42e85633c89f43a6253" @@ -505,11 +476,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== -"@babel/helper-environment-visitor@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98" - integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== - "@babel/helper-explode-assignable-expression@7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" @@ -525,14 +491,6 @@ "@babel/template" "^7.18.10" "@babel/types" "^7.19.0" -"@babel/helper-function-name@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be" - integrity sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ== - dependencies: - "@babel/template" "^7.22.5" - "@babel/types" "^7.22.5" - "@babel/helper-function-name@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" @@ -555,20 +513,6 @@ dependencies: "@babel/types" "^7.18.9" -"@babel/helper-member-expression-to-functions@^7.22.15": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366" - integrity sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA== - dependencies: - "@babel/types" "^7.23.0" - -"@babel/helper-member-expression-to-functions@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz#0a7c56117cad3372fbf8d2fb4bf8f8d64a1e76b2" - integrity sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ== - dependencies: - "@babel/types" "^7.22.5" - "@babel/helper-member-expression-to-functions@^7.24.8": version "7.24.8" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz#6155e079c913357d24a4c20480db7c712a5c3fb6" @@ -672,13 +616,6 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-optimise-call-expression@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e" - integrity sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw== - dependencies: - "@babel/types" "^7.22.5" - "@babel/helper-optimise-call-expression@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz#8b0a0456c92f6b323d27cfd00d1d664e76692a0f" @@ -757,15 +694,6 @@ "@babel/traverse" "^7.19.1" "@babel/types" "^7.19.0" -"@babel/helper-replace-supers@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.9.tgz#cbdc27d6d8d18cd22c81ae4293765a5d9afd0779" - integrity sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg== - dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-member-expression-to-functions" "^7.22.5" - "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/helper-replace-supers@^7.24.7", "@babel/helper-replace-supers@^7.25.0": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz#ff44deac1c9f619523fe2ca1fd650773792000a9" @@ -828,13 +756,6 @@ dependencies: "@babel/types" "^7.20.0" -"@babel/helper-skip-transparent-expression-wrappers@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847" - integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q== - dependencies: - "@babel/types" "^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz#5f8fa83b69ed5c27adc56044f8be2b3ea96669d9" @@ -1025,15 +946,6 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/highlight@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" - integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== - dependencies: - "@babel/helper-validator-identifier" "^7.22.5" - chalk "^2.0.0" - js-tokens "^4.0.0" - "@babel/highlight@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" @@ -1074,11 +986,6 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.15.tgz#d34592bfe288a32e741aa0663dbc4829fcd55160" integrity sha512-RWmQ/sklUN9BvGGpCDgSubhHWfAx24XDTDObup4ffvxaYsptOg2P3KG0j+1eWKLxpkX0j0uHxmpq2Z1SP/VhxA== -"@babel/parser@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.5.tgz#721fd042f3ce1896238cf1b341c77eb7dee7dbea" - integrity sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q== - "@babel/parser@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" @@ -2203,14 +2110,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-private-methods@^7.22.5": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz#b2d7a3c97e278bfe59137a978d53b2c2e038c0e4" - integrity sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/plugin-transform-private-methods@^7.25.4": version "7.25.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.4.tgz#9bbefbe3649f470d681997e0b64a4b254d877242" @@ -2227,16 +2126,6 @@ "@babel/helper-create-class-features-plugin" "^7.25.9" "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-private-property-in-object@^7.22.11": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz#3ec711d05d6608fd173d9b8de39872d8dbf68bf5" - integrity sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-create-class-features-plugin" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-transform-private-property-in-object@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz#4eec6bc701288c1fab5f72e6a4bbc9d67faca061" @@ -2868,15 +2757,6 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" -"@babel/template@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" - integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== - dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/types" "^7.22.5" - "@babel/template@^7.24.7", "@babel/template@^7.25.0": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" @@ -3496,11 +3376,6 @@ resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.2.tgz#baff9f8d70947181deb36772cd9a5b6876d3e60c" integrity sha512-ZhQ4TvhwHZF+lGhQ2O/rsjo80XoZR5/5qhOY3t6FJuX5XBg5Be8YzYTvaUGJnc12AUGI2nr4QSUE4PhKSigx7g== -"@isaacs/ttlcache@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz#21fb23db34e9b6220c6ba023a0118a2dd3461ea2" - integrity sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA== - "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -3570,13 +3445,6 @@ dependencies: "@jest/types" "^29.5.0" -"@jest/create-cache-key-function@^29.6.3": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz#793be38148fab78e65f40ae30c36785f4ad859f0" - integrity sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA== - dependencies: - "@jest/types" "^29.6.3" - "@jest/environment@^29.5.0": version "29.5.0" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.5.0.tgz#9152d56317c1fdb1af389c46640ba74ef0bb4c65" @@ -4182,15 +4050,6 @@ execa "^5.0.0" prompts "^2.4.0" -"@react-native-community/cli-clean@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-12.3.0.tgz#667b32daa58b4d11d5b5ab9eb0a2e216d500c90b" - integrity sha512-iAgLCOWYRGh9ukr+eVQnhkV/OqN3V2EGd/in33Ggn/Mj4uO6+oUncXFwB+yjlyaUNz6FfjudhIz09yYGSF+9sg== - dependencies: - "@react-native-community/cli-tools" "12.3.0" - chalk "^4.1.2" - execa "^5.0.0" - "@react-native-community/cli-config@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-11.3.7.tgz#4ce95548252ecb094b576369abebf9867c95d277" @@ -4203,18 +4062,6 @@ glob "^7.1.3" joi "^17.2.1" -"@react-native-community/cli-config@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-12.3.0.tgz#255b4e5391878937a25888f452f50a968d053e3e" - integrity sha512-BrTn5ndFD9uOxO8kxBQ32EpbtOvAsQExGPI7SokdI4Zlve70FziLtTq91LTlTUgMq1InVZn/jJb3VIDk6BTInQ== - dependencies: - "@react-native-community/cli-tools" "12.3.0" - chalk "^4.1.2" - cosmiconfig "^5.1.0" - deepmerge "^4.3.0" - glob "^7.1.3" - joi "^17.2.1" - "@react-native-community/cli-debugger-ui@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-11.3.7.tgz#2147b73313af8de3c9b396406d5d344b904cf2bb" @@ -4222,13 +4069,6 @@ dependencies: serve-static "^1.13.1" -"@react-native-community/cli-debugger-ui@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-12.3.0.tgz#75bbb2082a369b3559e0dffa8bfeebf2a9107e3e" - integrity sha512-w3b0iwjQlk47GhZWHaeTG8kKH09NCMUJO729xSdMBXE8rlbm4kHpKbxQY9qKb6NlfWSJN4noGY+FkNZS2rRwnQ== - dependencies: - serve-static "^1.13.1" - "@react-native-community/cli-doctor@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-11.3.7.tgz#7d5f5b1aea78134bba713fa97795986345ff1344" @@ -4253,29 +4093,6 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-doctor@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-12.3.0.tgz#420eb4e80d482f16d431c4df33fbc203862508af" - integrity sha512-BPCwNNesoQMkKsxB08Ayy6URgGQ8Kndv6mMhIvJSNdST3J1+x3ehBHXzG9B9Vfi+DrTKRb8lmEl/b/7VkDlPkA== - dependencies: - "@react-native-community/cli-config" "12.3.0" - "@react-native-community/cli-platform-android" "12.3.0" - "@react-native-community/cli-platform-ios" "12.3.0" - "@react-native-community/cli-tools" "12.3.0" - chalk "^4.1.2" - command-exists "^1.2.8" - deepmerge "^4.3.0" - envinfo "^7.10.0" - execa "^5.0.0" - hermes-profile-transformer "^0.0.6" - ip "^1.1.5" - node-stream-zip "^1.9.1" - ora "^5.4.1" - semver "^7.5.2" - strip-ansi "^5.2.0" - wcwidth "^1.0.1" - yaml "^2.2.1" - "@react-native-community/cli-hermes@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-11.3.7.tgz#091e730a1f8bace6c3729e8744bad6141002e0e8" @@ -4287,17 +4104,6 @@ hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-hermes@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-12.3.0.tgz#c302acbfb07e1f4e73e76e3150c32f0e4f54e9ed" - integrity sha512-G6FxpeZBO4AimKZwtWR3dpXRqTvsmEqlIkkxgwthdzn3LbVjDVIXKpVYU9PkR5cnT+KuAUxO0WwthrJ6Nmrrlg== - dependencies: - "@react-native-community/cli-platform-android" "12.3.0" - "@react-native-community/cli-tools" "12.3.0" - chalk "^4.1.2" - hermes-profile-transformer "^0.0.6" - ip "^1.1.5" - "@react-native-community/cli-platform-android@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-11.3.7.tgz#7845bc48258b6bb55df208a23b3690647f113995" @@ -4309,18 +4115,6 @@ glob "^7.1.3" logkitty "^0.7.1" -"@react-native-community/cli-platform-android@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-12.3.0.tgz#eafa5fb12ebc25f716aea18cd55039c19fbedca6" - integrity sha512-VU1NZw63+GLU2TnyQ919bEMThpHQ/oMFju9MCfrd3pyPJz4Sn+vc3NfnTDUVA5Z5yfLijFOkHIHr4vo/C9bjnw== - dependencies: - "@react-native-community/cli-tools" "12.3.0" - chalk "^4.1.2" - execa "^5.0.0" - fast-xml-parser "^4.2.4" - glob "^7.1.3" - logkitty "^0.7.1" - "@react-native-community/cli-platform-ios@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-11.3.7.tgz#87478f907634713b7236c77870446a5ca1f35ff1" @@ -4333,18 +4127,6 @@ glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-platform-ios@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-12.3.0.tgz#42a9185bb51f35a7eb9c5818b2f0072846945ef5" - integrity sha512-H95Sgt3wT7L8V75V0syFJDtv4YgqK5zbu69ko4yrXGv8dv2EBi6qZP0VMmkqXDamoPm9/U7tDTdbcf26ctnLfg== - dependencies: - "@react-native-community/cli-tools" "12.3.0" - chalk "^4.1.2" - execa "^5.0.0" - fast-xml-parser "^4.0.12" - glob "^7.1.3" - ora "^5.4.1" - "@react-native-community/cli-plugin-metro@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-11.3.7.tgz#2e8a9deb30b40495c5c1347a1837a824400fa00f" @@ -4362,11 +4144,6 @@ metro-runtime "0.76.8" readline "^1.3.0" -"@react-native-community/cli-plugin-metro@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-12.3.0.tgz#b4ea8da691d294aee98ccfcd1162bcd958cae834" - integrity sha512-tYNHIYnNmxrBcsqbE2dAnLMzlKI3Cp1p1xUgTrNaOMsGPDN1epzNfa34n6Nps3iwKElSL7Js91CzYNqgTalucA== - "@react-native-community/cli-server-api@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-11.3.7.tgz#2cce54b3331c9c51b9067129c297ab2e9a142216" @@ -4382,21 +4159,6 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-server-api@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-12.3.0.tgz#0460472d44c121d1db8a98ad1df811200c074fb3" - integrity sha512-Rode8NrdyByC+lBKHHn+/W8Zu0c+DajJvLmOWbe2WY/ECvnwcd9MHHbu92hlT2EQaJ9LbLhGrSbQE3cQy9EOCw== - dependencies: - "@react-native-community/cli-debugger-ui" "12.3.0" - "@react-native-community/cli-tools" "12.3.0" - compression "^1.7.1" - connect "^3.6.5" - errorhandler "^1.5.1" - nocache "^3.0.1" - pretty-format "^26.6.2" - serve-static "^1.13.1" - ws "^7.5.1" - "@react-native-community/cli-tools@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-11.3.7.tgz#37aa7efc7b4a1b7077d541f1d7bb11a2ab7b6ff2" @@ -4412,22 +4174,6 @@ semver "^7.5.2" shell-quote "^1.7.3" -"@react-native-community/cli-tools@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-12.3.0.tgz#d459a116e1a95034d3c9a6385069c9e2049fb2a6" - integrity sha512-2GafnCr8D88VdClwnm9KZfkEb+lzVoFdr/7ybqhdeYM0Vnt/tr2N+fM1EQzwI1DpzXiBzTYemw8GjRq+Utcz2Q== - dependencies: - appdirsjs "^1.2.4" - chalk "^4.1.2" - find-up "^5.0.0" - mime "^2.4.1" - node-fetch "^2.6.0" - open "^6.2.0" - ora "^5.4.1" - semver "^7.5.2" - shell-quote "^1.7.3" - sudo-prompt "^9.0.0" - "@react-native-community/cli-types@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-11.3.7.tgz#12fe7cff3da08bd27e11116531b2e001939854b9" @@ -4435,13 +4181,6 @@ dependencies: joi "^17.2.1" -"@react-native-community/cli-types@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-12.3.0.tgz#2d21a1f93aefbdb34a04311d68097aef0388704f" - integrity sha512-MgOkmrXH4zsGxhte4YqKL7d+N8ZNEd3w1wo56MZlhu5WabwCJh87wYpU5T8vyfujFLYOFuFK5jjlcbs8F4/WDw== - dependencies: - joi "^17.2.1" - "@react-native-community/cli@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-11.3.7.tgz#564c0054269d8385fa9d301750b2e56dbb5c0cc9" @@ -4465,108 +4204,11 @@ prompts "^2.4.0" semver "^7.5.2" -"@react-native-community/cli@12.3.0": - version "12.3.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-12.3.0.tgz#c89aacc3973943bf24002255d7d0859b511d88a1" - integrity sha512-XeQohi2E+S2+MMSz97QcEZ/bWpi8sfKiQg35XuYeJkc32Til2g0b97jRpn0/+fV0BInHoG1CQYWwHA7opMsrHg== - dependencies: - "@react-native-community/cli-clean" "12.3.0" - "@react-native-community/cli-config" "12.3.0" - "@react-native-community/cli-debugger-ui" "12.3.0" - "@react-native-community/cli-doctor" "12.3.0" - "@react-native-community/cli-hermes" "12.3.0" - "@react-native-community/cli-plugin-metro" "12.3.0" - "@react-native-community/cli-server-api" "12.3.0" - "@react-native-community/cli-tools" "12.3.0" - "@react-native-community/cli-types" "12.3.0" - chalk "^4.1.2" - commander "^9.4.1" - deepmerge "^4.3.0" - execa "^5.0.0" - find-up "^4.1.0" - fs-extra "^8.1.0" - graceful-fs "^4.1.3" - prompts "^2.4.2" - semver "^7.5.2" - -"@react-native/assets-registry@0.73.1": - version "0.73.1" - resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.73.1.tgz#e2a6b73b16c183a270f338dc69c36039b3946e85" - integrity sha512-2FgAbU7uKM5SbbW9QptPPZx8N9Ke2L7bsHb+EhAanZjFZunA9PaYtyjUQ1s7HD+zDVqOQIvjkpXSv7Kejd2tqg== - "@react-native/assets-registry@^0.72.0": version "0.72.0" resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.72.0.tgz#c82a76a1d86ec0c3907be76f7faf97a32bbed05d" integrity sha512-Im93xRJuHHxb1wniGhBMsxLwcfzdYreSZVQGDoMJgkd6+Iky61LInGEHnQCTN0fKNYF1Dvcofb4uMmE1RQHXHQ== -"@react-native/babel-plugin-codegen@0.73.2": - version "0.73.2" - resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.73.2.tgz#447656cde437b71dc3ef0af3f8a5b215653d5d07" - integrity sha512-PadyFZWVaWXIBP7Q5dgEL7eAd7tnsgsLjoHJB1hIRZZuVUg1Zqe3nULwC7RFAqOtr5Qx7KXChkFFcKQ3WnZzGw== - dependencies: - "@react-native/codegen" "0.73.2" - -"@react-native/babel-preset@0.73.19": - version "0.73.19" - resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.73.19.tgz#a6c0587651804f8f01d6f3b7729f1d4a2d469691" - integrity sha512-ujon01uMOREZecIltQxPDmJ6xlVqAUFGI/JCSpeVYdxyXBoBH5dBb0ihj7h6LKH1q1jsnO9z4MxfddtypKkIbg== - dependencies: - "@babel/core" "^7.20.0" - "@babel/plugin-proposal-async-generator-functions" "^7.0.0" - "@babel/plugin-proposal-class-properties" "^7.18.0" - "@babel/plugin-proposal-export-default-from" "^7.0.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.0" - "@babel/plugin-proposal-numeric-separator" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.20.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.0" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.18.0" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-syntax-optional-chaining" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.20.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.20.0" - "@babel/plugin-transform-flow-strip-types" "^7.20.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-private-methods" "^7.22.5" - "@babel/plugin-transform-private-property-in-object" "^7.22.11" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-react-jsx-self" "^7.0.0" - "@babel/plugin-transform-react-jsx-source" "^7.0.0" - "@babel/plugin-transform-runtime" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.5.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - "@babel/template" "^7.0.0" - "@react-native/babel-plugin-codegen" "0.73.2" - babel-plugin-transform-flow-enums "^0.0.2" - react-refresh "^0.14.0" - -"@react-native/codegen@0.73.2": - version "0.73.2" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.73.2.tgz#58af4e4c3098f0e6338e88ec64412c014dd51519" - integrity sha512-lfy8S7umhE3QLQG5ViC4wg5N1Z+E6RnaeIw8w1voroQsXXGPB72IBozh8dAHR3+ceTxIU0KX3A8OpJI8e1+HpQ== - dependencies: - "@babel/parser" "^7.20.0" - flow-parser "^0.206.0" - glob "^7.1.1" - invariant "^2.2.4" - jscodeshift "^0.14.0" - mkdirp "^0.5.1" - nullthrows "^1.1.1" - "@react-native/codegen@^0.72.7": version "0.72.7" resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.72.7.tgz#b6832ce631ac63143024ea094a6b5480a780e589" @@ -4577,97 +4219,26 @@ jscodeshift "^0.14.0" nullthrows "^1.1.1" -"@react-native/community-cli-plugin@0.73.12": - version "0.73.12" - resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.73.12.tgz#3a72a8cbae839a0382d1a194a7067d4ffa0da04c" - integrity sha512-xWU06OkC1cX++Duh/cD/Wv+oZ0oSY3yqbtxAqQA2H3Q+MQltNNJM6MqIHt1VOZSabRf/LVlR1JL6U9TXJirkaw== - dependencies: - "@react-native-community/cli-server-api" "12.3.0" - "@react-native-community/cli-tools" "12.3.0" - "@react-native/dev-middleware" "0.73.7" - "@react-native/metro-babel-transformer" "0.73.13" - chalk "^4.0.0" - execa "^5.1.1" - metro "^0.80.3" - metro-config "^0.80.3" - metro-core "^0.80.3" - node-fetch "^2.2.0" - readline "^1.3.0" - -"@react-native/debugger-frontend@0.73.3": - version "0.73.3" - resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.73.3.tgz#033757614d2ada994c68a1deae78c1dd2ad33c2b" - integrity sha512-RgEKnWuoo54dh7gQhV7kvzKhXZEhpF9LlMdZolyhGxHsBqZ2gXdibfDlfcARFFifPIiaZ3lXuOVVa4ei+uPgTw== - -"@react-native/dev-middleware@0.73.7": - version "0.73.7" - resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.73.7.tgz#61d2bf08973d9a537fa3f2a42deeb13530d721ae" - integrity sha512-BZXpn+qKp/dNdr4+TkZxXDttfx8YobDh8MFHsMk9usouLm22pKgFIPkGBV0X8Do4LBkFNPGtrnsKkWk/yuUXKg== - dependencies: - "@isaacs/ttlcache" "^1.4.1" - "@react-native/debugger-frontend" "0.73.3" - chrome-launcher "^0.15.2" - chromium-edge-launcher "^1.0.0" - connect "^3.6.5" - debug "^2.2.0" - node-fetch "^2.2.0" - open "^7.0.3" - serve-static "^1.13.1" - temp-dir "^2.0.0" - -"@react-native/gradle-plugin@0.73.4": - version "0.73.4" - resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.73.4.tgz#aa55784a8c2b471aa89934db38c090d331baf23b" - integrity sha512-PMDnbsZa+tD55Ug+W8CfqXiGoGneSSyrBZCMb5JfiB3AFST3Uj5e6lw8SgI/B6SKZF7lG0BhZ6YHZsRZ5MlXmg== - "@react-native/gradle-plugin@^0.72.11": version "0.72.11" resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.72.11.tgz#c063ef12778706611de7a1e42b74b14d9405fb9f" integrity sha512-P9iRnxiR2w7EHcZ0mJ+fmbPzMby77ZzV6y9sJI3lVLJzF7TLSdbwcQyD3lwMsiL+q5lKUHoZJS4sYmih+P2HXw== -"@react-native/js-polyfills@0.73.1": - version "0.73.1" - resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.73.1.tgz#730b0a7aaab947ae6f8e5aa9d995e788977191ed" - integrity sha512-ewMwGcumrilnF87H4jjrnvGZEaPFCAC4ebraEK+CurDDmwST/bIicI4hrOAv+0Z0F7DEK4O4H7r8q9vH7IbN4g== - "@react-native/js-polyfills@^0.72.1": version "0.72.1" resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.72.1.tgz#905343ef0c51256f128256330fccbdb35b922291" integrity sha512-cRPZh2rBswFnGt5X5EUEPs0r+pAsXxYsifv/fgy9ZLQokuT52bPH+9xjDR+7TafRua5CttGW83wP4TntRcWNDA== -"@react-native/metro-babel-transformer@0.73.13": - version "0.73.13" - resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.73.13.tgz#81cb6dd8d5140c57f5595183fd6857feb8b7f5d7" - integrity sha512-k9AQifogQfgUXPlqQSoMtX2KUhniw4XvJl+nZ4hphCH7qiMDAwuP8OmkJbz5E/N+Ro9OFuLE7ax4GlwxaTsAWg== - dependencies: - "@babel/core" "^7.20.0" - "@react-native/babel-preset" "0.73.19" - hermes-parser "0.15.0" - nullthrows "^1.1.1" - "@react-native/normalize-colors@*": version "0.73.0" resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.73.0.tgz#23e15cf2a2b73ac7e5e6df8d5b86b173cfb35a3f" integrity sha512-EmSCmJ0djeMJadeFsms6Pl/R85i9xSJMc+tyJu/GEMkKXBVyYQyqanK4RHFU0v8MO90OWj+SiFXjCkKYiJ6mkg== -"@react-native/normalize-colors@0.73.2", "@react-native/normalize-colors@^0.73.0": - version "0.73.2" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.73.2.tgz#cc8e48fbae2bbfff53e12f209369e8d2e4cf34ec" - integrity sha512-bRBcb2T+I88aG74LMVHaKms2p/T8aQd8+BZ7LuuzXlRfog1bMWWn/C5i0HVuvW4RPtXQYgIlGiXVDy9Ir1So/w== - "@react-native/normalize-colors@^0.72.0": version "0.72.0" resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.72.0.tgz#14294b7ed3c1d92176d2a00df48456e8d7d62212" integrity sha512-285lfdqSXaqKuBbbtP9qL2tDrfxdOFtIMvkKadtleRQkdOxx+uzGvFr82KHmc/sSiMtfXGp7JnFYWVh4sFl7Yw== -"@react-native/virtualized-lists@0.73.4": - version "0.73.4" - resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.73.4.tgz#640e594775806f63685435b5d9c3d05c378ccd8c" - integrity sha512-HpmLg1FrEiDtrtAbXiwCgXFYyloK/dOIPIuWW3fsqukwJEWAiTzm1nXGJ7xPU5XTHiWZ4sKup5Ebaj8z7iyWog== - dependencies: - invariant "^2.2.4" - nullthrows "^1.1.1" - "@react-native/virtualized-lists@^0.72.4": version "0.72.4" resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.72.4.tgz#926ddb5eced27dc3975dad0915cb96d1f9c01c62" @@ -4896,15 +4467,6 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== -"@types/react-native-table-component@1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@types/react-native-table-component/-/react-native-table-component-1.2.8.tgz#b4deb0d24f55641ac63783cc04a2bd4e40c11d65" - integrity sha512-ZhWnoW3LpzXx+fCyosNBVasVCuaWNCMDMcP0mO9FSSK8eRE4ihLTqKiit6zjpph9ot4LQ/mD8hmbhV0YpRLvOQ== - dependencies: - "@types/react" "*" - csstype "^3.0.3" - react-native "*" - "@types/react-native@0.72.6": version "0.72.6" resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.72.6.tgz#2c7a348ccb33637f482f36e4c6450d310805a290" @@ -5404,7 +4966,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.1.2, base64-js@^1.3.1, base64-js@^1.5.1: +base64-js@^1.1.2, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -5656,28 +5218,6 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -chrome-launcher@^0.15.2: - version "0.15.2" - resolved "https://registry.yarnpkg.com/chrome-launcher/-/chrome-launcher-0.15.2.tgz#4e6404e32200095fdce7f6a1e1004f9bd36fa5da" - integrity sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ== - dependencies: - "@types/node" "*" - escape-string-regexp "^4.0.0" - is-wsl "^2.2.0" - lighthouse-logger "^1.0.0" - -chromium-edge-launcher@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/chromium-edge-launcher/-/chromium-edge-launcher-1.0.0.tgz#0443083074715a13c669530b35df7bfea33b1509" - integrity sha512-pgtgjNKZ7i5U++1g1PWv75umkHvhVTDOQIZ+sjeUX9483S7Y6MUvO0lrd7ShGlQlFHMN4SwKTCq/X8hWrbv2KA== - dependencies: - "@types/node" "*" - escape-string-regexp "^4.0.0" - is-wsl "^2.2.0" - lighthouse-logger "^1.0.0" - mkdirp "^1.0.4" - rimraf "^3.0.2" - ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -6209,7 +5749,7 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" -csstype@^3.0.2, csstype@^3.0.3: +csstype@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9" integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw== @@ -6281,7 +5821,7 @@ dayjs@^1.8.15: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93" integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA== -debug@2.6.9, debug@^2.2.0, debug@^2.6.9: +debug@2.6.9, debug@^2.2.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -6436,15 +5976,6 @@ deprecated-react-native-prop-types@4.1.0: invariant "*" prop-types "*" -deprecated-react-native-prop-types@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-5.0.0.tgz#02a12f090da7bd9e8c3ac53c31cf786a1315d302" - integrity sha512-cIK8KYiiGVOFsKdPMmm1L3tA/Gl+JopXL6F5+C7x39MyPsQYnP57Im/D6bNUzcborD7fcMwiwZqcBdBXXZucYQ== - dependencies: - "@react-native/normalize-colors" "^0.73.0" - invariant "^2.2.4" - prop-types "^15.8.1" - deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" @@ -6607,11 +6138,6 @@ env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@^7.10.0: - version "7.11.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.11.0.tgz#c3793f44284a55ff8c82faf1ffd91bc6478ea01f" - integrity sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg== - envinfo@^7.7.2: version "7.8.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" @@ -6772,7 +6298,7 @@ execa@^4.0.3: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -execa@^5.0.0, execa@^5.1.1: +execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -6904,7 +6430,7 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -fast-xml-parser@^4.0.12, fast-xml-parser@^4.2.4: +fast-xml-parser@^4.0.12: version "4.4.1" resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz#86dbf3f18edf8739326447bcaac31b4ae7f6514f" integrity sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw== @@ -7228,7 +6754,7 @@ glob-parent@^5.1.2: dependencies: is-glob "^4.0.1" -glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: +glob@^7.0.0, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -7391,16 +6917,6 @@ hermes-estree@0.12.0: resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.12.0.tgz#8a289f9aee854854422345e6995a48613bac2ca8" integrity sha512-+e8xR6SCen0wyAKrMT3UD0ZCCLymKhRgjEB5sS28rKiFir/fXgLoeRilRUssFCILmGHb+OvHDUlhxs0+IEyvQw== -hermes-estree@0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.15.0.tgz#e32f6210ab18c7b705bdcb375f7700f2db15d6ba" - integrity sha512-lLYvAd+6BnOqWdnNbP/Q8xfl8LOGw4wVjfrNd9Gt8eoFzhNBRVD95n4l2ksfMVOoxuVyegs85g83KS9QOsxbVQ== - -hermes-estree@0.18.2: - version "0.18.2" - resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.18.2.tgz#fd450fa1659cf074ceaa2ddeeb21674f3b2342f3" - integrity sha512-KoLsoWXJ5o81nit1wSyEZnWUGy9cBna9iYMZBR7skKh7okYAYKqQ9/OczwpMHn/cH0hKDyblulGsJ7FknlfVxQ== - hermes-estree@0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.23.1.tgz#d0bac369a030188120ee7024926aabe5a9f84fdb" @@ -7413,20 +6929,6 @@ hermes-parser@0.12.0: dependencies: hermes-estree "0.12.0" -hermes-parser@0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.15.0.tgz#f611a297c2a2dbbfbce8af8543242254f604c382" - integrity sha512-Q1uks5rjZlE9RjMMjSUCkGrEIPI5pKJILeCtK1VmTj7U4pf3wVPoo+cxfu+s4cBAPy2JzikIIdCZgBoR6x7U1Q== - dependencies: - hermes-estree "0.15.0" - -hermes-parser@0.18.2: - version "0.18.2" - resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.18.2.tgz#50f15e2fcd559a48c68cd7af259d4292298bd14d" - integrity sha512-1eQfvib+VPpgBZ2zYKQhpuOjw1tH+Emuib6QmjkJWJMhyjM8xnXMvA+76o9LhF0zOAJDZgPfQhg43cyXEyl5Ew== - dependencies: - hermes-estree "0.18.2" - hermes-parser@0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.23.1.tgz#e5de648e664f3b3d84d01b48fc7ab164f4b68205" @@ -7742,11 +7244,6 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw== -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - is-docker@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" @@ -7950,13 +7447,6 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== -is-wsl@^2.1.1, is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - is-wsl@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" @@ -8192,7 +7682,7 @@ jest-environment-node@^29.2.1: jest-mock "^29.5.0" jest-util "^29.5.0" -jest-environment-node@^29.6.3, jest-environment-node@^29.7.0: +jest-environment-node@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== @@ -8799,14 +8289,6 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lighthouse-logger@^1.0.0: - version "1.4.2" - resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz#aef90f9e97cd81db367c7634292ee22079280aaa" - integrity sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g== - dependencies: - debug "^2.6.9" - marky "^1.2.2" - lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -9044,11 +8526,6 @@ marked@15.0.6: resolved "https://registry.yarnpkg.com/marked/-/marked-15.0.6.tgz#8165f16afb6f4b30a35bdcee657c3b8415820a8f" integrity sha512-Y07CUOE+HQXbVDCGl3LXggqJDbXDP2pArc2C1N1RRMN0ONiShoSsIInMd5Gsxupe7fKLpgimTV+HOJ9r7bA+pg== -marky@^1.2.2: - version "1.2.5" - resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.5.tgz#55796b688cbd72390d2d399eaaf1832c9413e3c0" - integrity sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q== - mathjs@^13.1.1: version "13.1.1" resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-13.1.1.tgz#72318c390ec3314e817b584a80152f6f10d7405d" @@ -9120,15 +8597,6 @@ metro-babel-transformer@0.80.11: hermes-parser "0.23.1" nullthrows "^1.1.1" -metro-babel-transformer@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.80.4.tgz#67dd300dd794d35ce24e22c17f317750669dd2b2" - integrity sha512-QP1kjYLap4O3w9tA4bYO8iyuNpR65If5Z97Ku37O4CwQPAwQaTmg67g4OdABS4BVK10fsxdExKp+fC37XirPow== - dependencies: - "@babel/core" "^7.20.0" - hermes-parser "0.18.2" - nullthrows "^1.1.1" - metro-cache-key@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.76.8.tgz#8a0a5e991c06f56fcc584acadacb313c312bdc16" @@ -9141,11 +8609,6 @@ metro-cache-key@0.80.11: dependencies: flow-enums-runtime "^0.0.6" -metro-cache-key@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.80.4.tgz#dc92ca7aa251b9f6ed232fef98a4649fcc5d614e" - integrity sha512-okOOSRFou7Mxaaigoi+KxdFIU/ZJtvDCC6l8BYKsdMx86JDlVdvtIgFU4tFrY1yEkv0wnn7WH0X3xSz4mHKwoQ== - metro-cache@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.76.8.tgz#296c1c189db2053b89735a8f33dbe82575f53661" @@ -9163,14 +8626,6 @@ metro-cache@0.80.11: flow-enums-runtime "^0.0.6" metro-core "0.80.11" -metro-cache@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.80.4.tgz#3bfe8176353dd1e44fef4361339bd8ee992d5900" - integrity sha512-Dj+GoYt4PvsnnE4GdXhqV9PxEF7GPilY5NPeoTgptWZLlaDuTT2+cJQoDOOit1SfRjnF0zqABtVvB6GGBWdtaQ== - dependencies: - metro-core "0.80.4" - rimraf "^3.0.2" - metro-config@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.76.8.tgz#20bd5397fcc6096f98d2a813a7cecb38b8af062d" @@ -9198,19 +8653,6 @@ metro-config@0.80.11, metro-config@^0.80.9: metro-core "0.80.11" metro-runtime "0.80.11" -metro-config@0.80.4, metro-config@^0.80.3: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.80.4.tgz#f14fe1465bf8812cd9a930f9a1667350161050cf" - integrity sha512-X3/3tleFYB4SdoxXg8uJ+qc8eITKiLnXs3Ev6pihM4jIM5JD89riwUsSLKVsovfZs8ETqKtjevzfe6jQ2O5NtQ== - dependencies: - connect "^3.6.5" - cosmiconfig "^5.0.5" - jest-validate "^29.6.3" - metro "0.80.4" - metro-cache "0.80.4" - metro-core "0.80.4" - metro-runtime "0.80.4" - metro-core@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.76.8.tgz#917c8157c63406cb223522835abb8e7c6291dcad" @@ -9228,14 +8670,6 @@ metro-core@0.80.11: lodash.throttle "^4.1.1" metro-resolver "0.80.11" -metro-core@0.80.4, metro-core@^0.80.3: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.80.4.tgz#1421e432f2f9ec69d82ea1f19832a0544a3ce294" - integrity sha512-HRb+zydAhI7QyLpK4D6ARZsKjaBwEn+kCrJEjnVFij8wjJxIIHVilgNCETgg9NWvKJFUoZZCG7ewHkxQ9Qpd8Q== - dependencies: - lodash.throttle "^4.1.1" - metro-resolver "0.80.4" - metro-file-map@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.76.8.tgz#a1db1185b6c316904ba6b53d628e5d1323991d79" @@ -9275,24 +8709,6 @@ metro-file-map@0.80.11: optionalDependencies: fsevents "^2.3.2" -metro-file-map@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.80.4.tgz#22d2e1fc1110490ab1a6c3ab4de4c21fef1951af" - integrity sha512-EvBC31JI5vsyebeQ8PWpGENuAWy2Ka7sLqEW7OInW+aLVWmBq02h0BNl33xRgAMz0gwvMf2nKie82hmefYF6ew== - dependencies: - anymatch "^3.0.3" - debug "^2.2.0" - fb-watchman "^2.0.0" - graceful-fs "^4.2.4" - invariant "^2.2.4" - jest-worker "^29.6.3" - micromatch "^4.0.4" - node-abort-controller "^3.1.1" - nullthrows "^1.1.1" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.3.2" - metro-inspector-proxy@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.76.8.tgz#6b8678a7461b0b42f913a7881cc9319b4d3cddff" @@ -9319,13 +8735,6 @@ metro-minify-terser@0.80.11: flow-enums-runtime "^0.0.6" terser "^5.15.0" -metro-minify-terser@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-minify-terser/-/metro-minify-terser-0.80.4.tgz#008a4874f6167a4da5d24c90d4281b56f09ba684" - integrity sha512-cuxfRZWDWGKjh+Z6t4KJkrvmV4JUKXfvQuAX7Pa7U0Mf1YJdLtoGQ5iVOu/6MkfYGXbppqGk2qmFECrRGRh0cA== - dependencies: - terser "^5.15.0" - metro-minify-uglify@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.76.8.tgz#74745045ea2dd29f8783db483b2fce58385ba695" @@ -9446,11 +8855,6 @@ metro-resolver@0.80.11: dependencies: flow-enums-runtime "^0.0.6" -metro-resolver@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.80.4.tgz#c04f2bf3995e11ee0484a067b7a51904ccee9964" - integrity sha512-PCiVWN+d3gtWlobf8jPypwKx9T1QrZmhLJAyqIWLoOsZbpSfj1dn5h0ajCr8rYi9LNzIHm58GGYJK8VFHNn8Cw== - metro-runtime@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.76.8.tgz#74b2d301a2be5f3bbde91b8f1312106f8ffe50c3" @@ -9467,13 +8871,6 @@ metro-runtime@0.80.11: "@babel/runtime" "^7.25.0" flow-enums-runtime "^0.0.6" -metro-runtime@0.80.4, metro-runtime@^0.80.3: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.80.4.tgz#24fe3e332cfbe303f944fc6d5f0c28bef6704ee1" - integrity sha512-CWIvf0zmL4jKHSj81zjUAbEwjTqFQmETI0NIQvN4JNwTSHiz50WPOuHnUUcmwM6Dye/ta6KNTELnERp0tKEYYg== - dependencies: - "@babel/runtime" "^7.0.0" - metro-source-map@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.76.8.tgz#f085800152a6ba0b41ca26833874d31ec36c5a53" @@ -9503,20 +8900,6 @@ metro-source-map@0.80.11: source-map "^0.5.6" vlq "^1.0.0" -metro-source-map@0.80.4, metro-source-map@^0.80.3: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.80.4.tgz#809d7d0eb36ccf912eecb4dc80ab50177f9fb5e1" - integrity sha512-x+0By55ml6IcGqY9x9HE0hyU0S+uDssrTQ0bPvuydG+iKCX85DzGnlT8k0Vs+EYgZl3KMWcvQ9TpGHW4LRL4GQ== - dependencies: - "@babel/traverse" "^7.20.0" - "@babel/types" "^7.20.0" - invariant "^2.2.4" - metro-symbolicate "0.80.4" - nullthrows "^1.1.1" - ob1 "0.80.4" - source-map "^0.5.6" - vlq "^1.0.0" - metro-symbolicate@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.76.8.tgz#f102ac1a306d51597ecc8fdf961c0a88bddbca03" @@ -9542,18 +8925,6 @@ metro-symbolicate@0.80.11: through2 "^2.0.1" vlq "^1.0.0" -metro-symbolicate@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.80.4.tgz#1c72c5c7b29941ecd95e53f2a25570e61dfd4eec" - integrity sha512-UmtH96G5TrcAgbIqdE4xA8MBS9fbZW9Pln+n7eJ0tQ0Fw0M/jzdpiZzhx3bIB2zzqbdm6Nv/kB1+aEo0WvXdyg== - dependencies: - invariant "^2.2.4" - metro-source-map "0.80.4" - nullthrows "^1.1.1" - source-map "^0.5.6" - through2 "^2.0.1" - vlq "^1.0.0" - metro-transform-plugins@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.76.8.tgz#d77c28a6547a8e3b72250f740fcfbd7f5408f8ba" @@ -9577,17 +8948,6 @@ metro-transform-plugins@0.80.11: flow-enums-runtime "^0.0.6" nullthrows "^1.1.1" -metro-transform-plugins@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.80.4.tgz#fd76d62f080d556a8626ec6a92f55d033aa64283" - integrity sha512-cvmTLBA9ET64h+tgHt6prHlvOq98zBA1Glc9+wLZihPJo+Qmu9i3nQ1g4O+4aUnHivDlp+4C00BMNC+aC/buRQ== - dependencies: - "@babel/core" "^7.20.0" - "@babel/generator" "^7.20.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.20.0" - nullthrows "^1.1.1" - metro-transform-worker@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.76.8.tgz#b9012a196cee205170d0c899b8b175b9305acdea" @@ -9625,23 +8985,6 @@ metro-transform-worker@0.80.11: metro-transform-plugins "0.80.11" nullthrows "^1.1.1" -metro-transform-worker@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.80.4.tgz#33cab53b0cc527b627f7f7ef9c07a41dd15682d3" - integrity sha512-hLCrlxXyyaV64XQNSiyY/0jMVvGXrgXMkpJ4KwH2t4clxbxyt6TBW+4TqmgAeU9WGclY0OuQ0HzfvIZiONcUOw== - dependencies: - "@babel/core" "^7.20.0" - "@babel/generator" "^7.20.0" - "@babel/parser" "^7.20.0" - "@babel/types" "^7.20.0" - metro "0.80.4" - metro-babel-transformer "0.80.4" - metro-cache "0.80.4" - metro-cache-key "0.80.4" - metro-source-map "0.80.4" - metro-transform-plugins "0.80.4" - nullthrows "^1.1.1" - metro@0.76.8: version "0.76.8" resolved "https://registry.yarnpkg.com/metro/-/metro-0.76.8.tgz#ba526808b99977ca3f9ac5a7432fd02a340d13a6" @@ -9744,56 +9087,6 @@ metro@0.80.11: ws "^7.5.10" yargs "^17.6.2" -metro@0.80.4, metro@^0.80.3: - version "0.80.4" - resolved "https://registry.yarnpkg.com/metro/-/metro-0.80.4.tgz#5f8cd8f7b730418ec6e7b377611caf620be33158" - integrity sha512-fBhZKU1z44KdhS6sH6Sk97595A66EOniH+jI9OjKDu6piH1SIEqQgdWAuWfJJMzgBHcJceRRvJY1zzsOT/Zx0g== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/core" "^7.20.0" - "@babel/generator" "^7.20.0" - "@babel/parser" "^7.20.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.20.0" - "@babel/types" "^7.20.0" - accepts "^1.3.7" - chalk "^4.0.0" - ci-info "^2.0.0" - connect "^3.6.5" - debug "^2.2.0" - denodeify "^1.2.1" - error-stack-parser "^2.0.6" - graceful-fs "^4.2.4" - hermes-parser "0.18.2" - image-size "^1.0.2" - invariant "^2.2.4" - jest-worker "^29.6.3" - jsc-safe-url "^0.2.2" - lodash.throttle "^4.1.1" - metro-babel-transformer "0.80.4" - metro-cache "0.80.4" - metro-cache-key "0.80.4" - metro-config "0.80.4" - metro-core "0.80.4" - metro-file-map "0.80.4" - metro-minify-terser "0.80.4" - metro-resolver "0.80.4" - metro-runtime "0.80.4" - metro-source-map "0.80.4" - metro-symbolicate "0.80.4" - metro-transform-plugins "0.80.4" - metro-transform-worker "0.80.4" - mime-types "^2.1.27" - node-fetch "^2.2.0" - nullthrows "^1.1.1" - rimraf "^3.0.2" - serialize-error "^2.1.0" - source-map "^0.5.6" - strip-ansi "^6.0.0" - throat "^5.0.0" - ws "^7.5.1" - yargs "^17.6.2" - micromatch@^4.0.4: version "4.0.8" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" @@ -9892,11 +9185,6 @@ mkdirp@^0.5.1: dependencies: minimist "^1.2.6" -mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -10064,11 +9352,6 @@ ob1@0.80.11: dependencies: flow-enums-runtime "^0.0.6" -ob1@0.80.4: - version "0.80.4" - resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.80.4.tgz#a2e77e2dbe144c76356c834b994e147e19bb472f" - integrity sha512-Lku8OBpq+fhF1ZdKUjbPnTNeqG+3OL0psGAEVJ8zcUiCB5/DPGR/rm3kLcjKDylzC9Rfv540/7I08+oImzfrhw== - object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -10158,14 +9441,6 @@ open@^6.2.0: dependencies: is-wsl "^1.1.0" -open@^7.0.3: - version "7.4.2" - resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" - integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== - dependencies: - is-docker "^2.0.0" - is-wsl "^2.1.1" - optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -10607,7 +9882,7 @@ prompts@^2.0.1, prompts@^2.4.0, prompts@^2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@*, prop-types@^15.8.1: +prop-types@*: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -10722,14 +9997,6 @@ react-devtools-core@^4.27.2: shell-quote "^1.6.1" ws "^7" -react-devtools-core@^4.27.7: - version "4.28.5" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.5.tgz#c8442b91f068cdf0c899c543907f7f27d79c2508" - integrity sha512-cq/o30z9W2Wb4rzBefjv5fBalHU0rJGZCHAkf/RHSBWSSYwh8PlQTqqOJmgIIbBtpj27T6FIPXeomIjZtCNVqA== - dependencies: - shell-quote "^1.6.1" - ws "^7" - "react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.0.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" @@ -10778,6 +10045,11 @@ react-native-builder-bob@0.36.0: which "^2.0.2" yargs "^17.5.1" +react-native-reanimated-table@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/react-native-reanimated-table/-/react-native-reanimated-table-0.0.2.tgz#015392dbc12fb03fd872d5a7eea9bc84c4f3a685" + integrity sha512-OeuqfU1AFEmHNTJlEOLWrV78JgAXnM0/ZrCm0Ab+9e5nwYJ+xab/UFXkNKz3Gyf08ZfLSNzwMQRjt3eZWPWoGA== + react-native-svg@15.11.1: version "15.11.1" resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-15.11.1.tgz#8152459a7a4d40b02e9ac8270f9b0692b3216715" @@ -10787,54 +10059,6 @@ react-native-svg@15.11.1: css-tree "^1.1.3" warn-once "0.1.1" -react-native-table-component@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/react-native-table-component/-/react-native-table-component-1.2.2.tgz#1c9bdcd8f1fd7edf10d1e93ebc3b7877ecd74def" - integrity sha512-7bbsi5431iWcjj3toASh8lFHGi6AG/+MTd4M7GuksXKxx/CFs/Qwv1Ys7D2wgyuYKe3hxWNfSVrteFj0tOYXYw== - -react-native@*: - version "0.73.2" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.73.2.tgz#74ee163c8189660d41d1da6560411da7ce41a608" - integrity sha512-7zj9tcUYpJUBdOdXY6cM8RcXYWkyql4kMyGZflW99E5EuFPoC7Ti+ZQSl7LP9ZPzGD0vMfslwyDW0I4tPWUCFw== - dependencies: - "@jest/create-cache-key-function" "^29.6.3" - "@react-native-community/cli" "12.3.0" - "@react-native-community/cli-platform-android" "12.3.0" - "@react-native-community/cli-platform-ios" "12.3.0" - "@react-native/assets-registry" "0.73.1" - "@react-native/codegen" "0.73.2" - "@react-native/community-cli-plugin" "0.73.12" - "@react-native/gradle-plugin" "0.73.4" - "@react-native/js-polyfills" "0.73.1" - "@react-native/normalize-colors" "0.73.2" - "@react-native/virtualized-lists" "0.73.4" - abort-controller "^3.0.0" - anser "^1.4.9" - ansi-regex "^5.0.0" - base64-js "^1.5.1" - deprecated-react-native-prop-types "^5.0.0" - event-target-shim "^5.0.1" - flow-enums-runtime "^0.0.6" - invariant "^2.2.4" - jest-environment-node "^29.6.3" - jsc-android "^250231.0.0" - memoize-one "^5.0.0" - metro-runtime "^0.80.3" - metro-source-map "^0.80.3" - mkdirp "^0.5.1" - nullthrows "^1.1.1" - pretty-format "^26.5.2" - promise "^8.3.0" - react-devtools-core "^4.27.7" - react-refresh "^0.14.0" - react-shallow-renderer "^16.15.0" - regenerator-runtime "^0.13.2" - scheduler "0.24.0-canary-efb381bbf-20230505" - stacktrace-parser "^0.1.10" - whatwg-fetch "^3.0.0" - ws "^6.2.2" - yargs "^17.6.2" - react-native@0.72.6: version "0.72.6" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.72.6.tgz#9f8d090694907e2f83af22e115cc0e4a3d5fa626" @@ -10877,11 +10101,6 @@ react-native@0.72.6: ws "^6.2.2" yargs "^17.6.2" -react-refresh@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" - integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== - react-refresh@^0.4.0: version "0.4.3" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.3.tgz#966f1750c191672e76e16c2efa569150cc73ab53" @@ -11790,11 +11009,6 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -temp-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" - integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== - temp@^0.8.4: version "0.8.4" resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2" From a02df1e8780a1377da2e34d222896fe052883d6e Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 18:22:24 +0530 Subject: [PATCH 10/17] test: update snapshot --- .../__snapshots__/Markdown.spec.tsx.snap | 3091 ++++++----------- .../__snapshots__/Renderer.spec.ts.snap | 392 +-- 2 files changed, 1224 insertions(+), 2259 deletions(-) diff --git a/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap b/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap index e01a6b6f..59e061e9 100644 --- a/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap +++ b/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap @@ -9822,278 +9822,174 @@ exports[`Tables Alignment 1`] = ` - - - - - Syntax - - - } - width={325} - /> - + Syntax + , + ], + [ + - - Description - - - } - width={325} - /> - + Description + , + ], + [ + - - Test Text - - - } - width={325} - /> - - - + Test Text + , + ], + ] + } + rowStyle={ + { + "flexDirection": "row", + } + } + rows={ + [ + [ + [ + - - Header - - - } - width={325} - /> - , + ], + [ + - - Title - - - } - width={325} - /> - , + ], + [ + - - Here's this - - - } - width={325} - /> - - - , + ], + ], + [ + [ + - - Paragraph - - - } - width={325} - /> - , + ], + [ + - - Text - - - } - width={325} - /> - , + ], + [ + - - And more - - - } - width={325} - /> - -
- , + } + > + And more + , + ], + ], + ] + } + widthArr={ + [ + 325, + 325, + 325, + ] + } + />, ] } getItem={[Function]} @@ -10132,7 +10028,7 @@ exports[`Tables Alignment 1`] = ` - - - Syntax - - - - - - - Description - - - - - - - Test Text - - - - - - - - - Header - - - - - - - Title - - - - - - - Here's this - - - - - - - Paragraph + Syntax - Text + Description - And more + Test Text - - -
- - - -`; - -exports[`Tables Basic 1`] = ` - - - - + - Syntax + Header - } - width={325} - /> - + - Description + Title - } - width={325} - /> - - - + - Header + Here's this + + + - + - Title + Paragraph - } - width={325} - /> - - - + - Paragraph + Text - } - width={325} - /> - + - Text + And more - } - width={325} - /> - -
- , + + + + +
+ + + +`; + +exports[`Tables Basic 1`] = ` + + Syntax + , + ], + [ + + Description + , + ], + ] + } + rowStyle={ + { + "flexDirection": "row", + } + } + rows={ + [ + [ + [ + + Header + , + ], + [ + + Title + , + ], + ], + [ + [ + + Paragraph + , + ], + [ + + Text + , + ], + ], + ] + } + widthArr={ + [ + 325, + 325, + ] + } + />, ] } getItem={[Function]} @@ -10796,7 +10530,7 @@ exports[`Tables Basic 1`] = ` - - - - - Syntax - - - } - width={325} - /> - + Syntax + , + ], + [ + - - Description - - - } - width={325} - /> - - - + Description + , + ], + ] + } + rowStyle={ + { + "flexDirection": "row", + } + } + rows={ + [ + [ + [ + - - Header - - - } - width={325} - /> - , + ], + [ + - - Title - - - } - width={325} - /> - - - , + ], + ], + [ + [ + - - Paragraph - - - } - width={325} - /> - , + ], + [ + - - Text - - - } - width={325} - /> - -
- , + Text + , + ], + ], + ] + } + widthArr={ + [ + 325, + 325, + ] + } + />, ] } getItem={[Function]} @@ -11331,7 +10933,7 @@ exports[`Tables Different Cell Widths 1`] = ` - - - + This will also be italic + , + ], + [ + + - - This will also be italic - - - } - width={325} - /> - + - + - - You - - - can - - - combine them - - - - } - width={325} - /> - - - + combine them + + , + ], + ] + } + rowStyle={ + { + "flexDirection": "row", + } + } + rows={ + [ + [ + [ + - , + ], + [ + - left foo - - - } - width={325} - /> - + right foo + , + ], + ], + [ + [ + + left bar + , + ], + [ + - - right foo - - - } - width={325} - /> - - - , + ], + ], + [ + [ + - - left bar - - - } - width={325} - /> - , + ], + [ + - - right bar - - - } - width={325} - /> - - - , + - - left baz - - - } - width={325} - /> - , + - - right - - - link - - - . - - - } - width={325} - /> - -
- , + . + , + ], + ], + ] + } + widthArr={ + [ + 325, + 325, + ] + } + />, ] } getItem={[Function]} @@ -12007,7 +11449,7 @@ exports[`Tables Emphasis, Code, Links 1`] = ` - - - + Hello + , + ], + ] + } + rowStyle={ + { + "flexDirection": "row", + } + } + rows={ + [ + [ + [ + - , + - Hello - - - } - width={325} - /> - - - , + - - Bingo - - - - This also works for me. - - - } - width={325} - /> - -
- , + This also works for me. + , + ], + ], + ] + } + widthArr={ + [ + 325, + ] + } + />, ] } getItem={[Function]} @@ -12627,7 +11966,7 @@ exports[`Tables Images 1`] = ` - - - - - Syntax - - - } - width={325} - /> - + Syntax + , + ], + [ + - - Description - - - } - width={325} - /> - + Description + , + ], + [ + - - Test Text - - - } - width={325} - /> - - - + Test Text + , + ], + ] + } + rowStyle={ + { + "flexDirection": "row", + } + } + rows={ + [ + [ + [ + - - Header - - - } - width={325} - /> - , + ], + [ + - - Title - - - } - width={325} - /> - , + ], + [ + - - Here's | this - - - } - width={325} - /> - - - , + ], + ], + [ + [ + - - Paragraph - - - } - width={325} - /> - , + ], + [ + - - Text - - - } - width={325} - /> - , + ], + [ + - - And more - - - } - width={325} - /> - -
- , + And more + , + ], + ], + ] + } + widthArr={ + [ + 325, + 325, + 325, + ] + } + />, ] } getItem={[Function]} @@ -13115,7 +12330,7 @@ exports[`Tables Pipe Character 1`] = ` @@ -290,23 +240,13 @@ exports[`Renderer dark theme Table Nodes returns a Table without styles 1`] = ` @@ -329,23 +269,13 @@ exports[`Renderer dark theme Table Nodes returns a Table without styles 1`] = ` @@ -368,23 +298,13 @@ exports[`Renderer dark theme Table Nodes returns a Table without styles 1`] = ` @@ -1090,7 +1010,7 @@ exports[`Renderer light theme Table Nodes returns a Table 1`] = ` @@ -1353,23 +1223,13 @@ exports[`Renderer light theme Table Nodes returns a Table without styles 1`] = ` @@ -1392,23 +1252,13 @@ exports[`Renderer light theme Table Nodes returns a Table without styles 1`] = ` @@ -1431,23 +1281,13 @@ exports[`Renderer light theme Table Nodes returns a Table without styles 1`] = ` From 1e2343bb15f6c8bacbc75137f482a6f46127e278 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 18:26:23 +0530 Subject: [PATCH 11/17] fix(breaking): require and use react-native v0.76.0 and above --- package.json | 22 +- src/theme/styles.ts | 1 - yarn.lock | 2204 +++++++++++++++---------------------------- 3 files changed, 787 insertions(+), 1440 deletions(-) diff --git a/package.json b/package.json index ce4eef79..d2d72c6a 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,11 @@ "test:updateSnapshot": "jest --updateSnapshot", "reassure": "reassure" }, - "keywords": ["react-native", "markdown", "react-native markdown"], + "keywords": [ + "react-native", + "markdown", + "react-native markdown" + ], "repository": "https://github.com/gmsgowtham/react-native-marked", "author": "Gowtham G (https://github.com/gmsgowtham)", "license": "MIT", @@ -59,7 +63,6 @@ "@types/jest": "29.5.14", "@types/node": "22.10.6", "@types/react": "18.3.18", - "@types/react-native": "0.72.6", "@types/svg-parser": "^2.0.3", "commitlint": "19.6.1", "danger": "12.3.3", @@ -70,7 +73,7 @@ "pod-install": "0.3.4", "postinstall-postinstall": "2.1.0", "react": "18.3.1", - "react-native": "0.72.6", + "react-native": "0.77.0", "react-native-builder-bob": "0.36.0", "react-native-svg": "15.11.1", "react-test-renderer": "18.3.1", @@ -80,7 +83,7 @@ }, "peerDependencies": { "react": "^16.8.6 || ^17.0.0 || ^18.0.0", - "react-native": ">=0.60.0", + "react-native": ">=0.76.0", "react-native-svg": ">=12.3.0" }, "jest": { @@ -90,13 +93,17 @@ "/examples/*/node_modules", "/dist/" ], - "setupFilesAfterEnv": ["@testing-library/jest-native/extend-expect"], + "setupFilesAfterEnv": [ + "@testing-library/jest-native/extend-expect" + ], "transformIgnorePatterns": [ "node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|github-slugger)" ] }, "commitlint": { - "extends": ["@commitlint/config-conventional"], + "extends": [ + "@commitlint/config-conventional" + ], "rules": { "type-enum": [ 2, @@ -165,7 +172,6 @@ "node": ">=18" }, "resolutions": { - "@types/react": "18.3.18", - "@types/react-native": "0.72.6" + "@types/react": "18.3.18" } } diff --git a/src/theme/styles.ts b/src/theme/styles.ts index dd679403..f43d3104 100644 --- a/src/theme/styles.ts +++ b/src/theme/styles.ts @@ -51,7 +51,6 @@ const getStyles = ( ]), text: StyleSheet.flatten([fontStyle.regular, userStyles?.text]), paragraph: StyleSheet.flatten([ - fontStyle.regular, { paddingVertical: mdSpacing.m, }, diff --git a/yarn.lock b/yarn.lock index 038327b6..ba54eab3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -50,7 +50,16 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.18.8", "@babel/compat-data@^7.19.3": +"@babel/code-frame@^7.26.2": + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== + dependencies: + "@babel/helper-validator-identifier" "^7.25.9" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.19.3": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.3.tgz#707b939793f867f5a73b2666e6d9a3396eb03151" integrity sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw== @@ -90,6 +99,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.0.tgz#f02ba6d34e88fadd5e8861e8b38902f43cc1c819" integrity sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA== +"@babel/compat-data@^7.26.5": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.5.tgz#df93ac37f4417854130e21d72c66ff3d4b897fc7" + integrity sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg== + "@babel/core@7.26.0": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.0.tgz#d78b6023cc8f3114ccf049eb219613f74a747b40" @@ -111,7 +125,7 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.13.16": +"@babel/core@^7.11.6", "@babel/core@^7.12.3": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.3.tgz#2519f62a51458f43b682d61583c3810e7dcee64c" integrity sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ== @@ -153,6 +167,27 @@ json5 "^2.2.1" semver "^6.3.0" +"@babel/core@^7.24.7": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.7.tgz#0439347a183b97534d52811144d763a17f9d2b24" + integrity sha512-SRijHmF0PSPgLIBYlWnG0hyeJLwXE2CgpsXaMOrtt2yp9/86ALw6oUlj9KYuZ0JN07T4eBMVIW4li/9S1j2BGA== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.5" + "@babel/helper-compilation-targets" "^7.26.5" + "@babel/helper-module-transforms" "^7.26.0" + "@babel/helpers" "^7.26.7" + "@babel/parser" "^7.26.7" + "@babel/template" "^7.25.9" + "@babel/traverse" "^7.26.7" + "@babel/types" "^7.26.7" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/core@^7.25.2": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" @@ -253,6 +288,17 @@ "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" +"@babel/generator@^7.26.5": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.5.tgz#e44d4ab3176bbcaf78a5725da5f1dc28802a9458" + integrity sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw== + dependencies: + "@babel/parser" "^7.26.5" + "@babel/types" "^7.26.5" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^3.0.2" + "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -354,6 +400,17 @@ lru-cache "^5.1.1" semver "^6.3.1" +"@babel/helper-compilation-targets@^7.26.5": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz#75d92bb8d8d51301c0d49e52a65c9a7fe94514d8" + integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== + dependencies: + "@babel/compat-data" "^7.26.5" + "@babel/helper-validator-option" "^7.25.9" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + "@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.19.0": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz#bfd6904620df4e46470bae4850d66be1054c404b" @@ -655,6 +712,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz#9cbdd63a9443a2c92a725cca7ebca12cc8dd9f46" integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw== +"@babel/helper-plugin-utils@^7.26.5": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz#18580d00c9934117ad719392c4f6585c9333cc35" + integrity sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg== + "@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" @@ -683,7 +745,7 @@ "@babel/helper-wrap-function" "^7.25.9" "@babel/traverse" "^7.25.9" -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.18.9": +"@babel/helper-replace-supers@^7.18.9": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz#e1592a9b4b368aa6bdb8784a711e0bcbf0612b78" integrity sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw== @@ -928,6 +990,14 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" +"@babel/helpers@^7.26.7": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.7.tgz#fd1d2a7c431b6e39290277aacfd8367857c576a4" + integrity sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A== + dependencies: + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.7" + "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -966,7 +1036,7 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.19.3": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.19.3": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.3.tgz#8dd36d17c53ff347f9e55c328710321b49479a9a" integrity sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ== @@ -991,6 +1061,13 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== +"@babel/parser@^7.24.7", "@babel/parser@^7.26.5", "@babel/parser@^7.26.7": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.7.tgz#e114cd099e5f7d17b05368678da0fb9f69b3385c" + integrity sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w== + dependencies: + "@babel/types" "^7.26.7" + "@babel/parser@^7.25.0", "@babel/parser@^7.25.3": version "7.25.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.3.tgz#91fb126768d944966263f0657ab222a642b82065" @@ -1107,7 +1184,7 @@ "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.18.0": +"@babel/plugin-proposal-class-properties@^7.18.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== @@ -1123,7 +1200,14 @@ "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-syntax-export-default-from" "^7.18.6" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.18.0": +"@babel/plugin-proposal-export-default-from@^7.24.7": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.25.9.tgz#52702be6ef8367fc8f18b8438278332beeb8f87c" + integrity sha512-ykqgwNfSnNOB+C8fV5X4mG3AVmvu+WVxcaU9xHHtBb7PCrPeweMmPjGsn8eMaeJg6SJuoUuZENeeSWaarWqonQ== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== @@ -1139,17 +1223,6 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz#f9434f6beb2c8cae9dfcf97d2a5941bbbf9ad4e7" - integrity sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q== - dependencies: - "@babel/compat-data" "^7.18.8" - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.18.8" - "@babel/plugin-proposal-object-rest-spread@^7.20.0": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" @@ -1169,15 +1242,6 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.13.12": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz#e8e8fe0723f2563960e4bf5e9690933691915993" - integrity sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-proposal-optional-chaining@^7.20.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" @@ -1206,7 +1270,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.0.0", "@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": +"@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -1234,6 +1298,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" +"@babel/plugin-syntax-export-default-from@^7.24.7": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.25.9.tgz#86614767a9ff140366f0c3766ef218beb32a730a" + integrity sha512-9MhJ/SMTsVqsd69GyQg89lYR4o9T+oDGv5F6IsigxxqFVOyR/IflDLYP8WDI1l8fkhNGGktqkvL5qwNCtGEpgQ== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-syntax-export-namespace-from@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" @@ -1241,7 +1312,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.12.1", "@babel/plugin-syntax-flow@^7.18.0", "@babel/plugin-syntax-flow@^7.18.6": +"@babel/plugin-syntax-flow@^7.12.1", "@babel/plugin-syntax-flow@^7.18.0", "@babel/plugin-syntax-flow@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz#774d825256f2379d06139be0c723c4dd444f3ca1" integrity sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A== @@ -1255,6 +1326,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" +"@babel/plugin-syntax-flow@^7.26.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.26.0.tgz#96507595c21b45fccfc2bc758d5c45452e6164fa" + integrity sha512-B+O2DnPc0iG+YXFqOxv2WNuNU97ToWjOomUQ78DouOENWUaM5sVrmet9mcomUGQFwpJd//gvUagXBSdzO1fRKg== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-syntax-import-assertions@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz#2a0b406b5871a20a841240586b1300ce2088a778" @@ -1297,7 +1375,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.18.6", "@babel/plugin-syntax-jsx@^7.7.2": +"@babel/plugin-syntax-jsx@^7.18.6", "@babel/plugin-syntax-jsx@^7.7.2": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== @@ -1311,6 +1389,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" +"@babel/plugin-syntax-jsx@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz#a34313a178ea56f1951599b929c1ceacee719290" + integrity sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -1332,7 +1417,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": +"@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== @@ -1381,6 +1466,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.8" +"@babel/plugin-syntax-typescript@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz#67dda2b74da43727cf21d46cf9afef23f4365399" + integrity sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-syntax-unicode-sets-regex@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" @@ -1456,13 +1548,6 @@ "@babel/helper-plugin-utils" "^7.25.9" "@babel/helper-remap-async-to-generator" "^7.25.9" -"@babel/plugin-transform-block-scoped-functions@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-transform-block-scoped-functions@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz#a4251d98ea0c0f399dafe1a35801eaba455bbf1f" @@ -1498,6 +1583,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" +"@babel/plugin-transform-class-properties@^7.24.7", "@babel/plugin-transform-class-properties@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz#a8ce84fedb9ad512549984101fa84080a9f5f51f" + integrity sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-transform-class-properties@^7.25.4": version "7.25.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.4.tgz#bae7dbfcdcc2e8667355cd1fb5eda298f05189fd" @@ -1506,14 +1599,6 @@ "@babel/helper-create-class-features-plugin" "^7.25.4" "@babel/helper-plugin-utils" "^7.24.8" -"@babel/plugin-transform-class-properties@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz#a8ce84fedb9ad512549984101fa84080a9f5f51f" - integrity sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/plugin-transform-class-static-block@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz#c82027ebb7010bc33c116d4b5044fbbf8c05484d" @@ -1593,13 +1678,6 @@ "@babel/helper-plugin-utils" "^7.25.9" "@babel/template" "^7.25.9" -"@babel/plugin-transform-destructuring@^7.0.0": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz#9e03bc4a94475d62b7f4114938e6c5c33372cbf5" - integrity sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-transform-destructuring@^7.20.0": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz#73b46d0fd11cd6ef57dea8a381b1215f4959d401" @@ -1713,14 +1791,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-flow-strip-types@^7.0.0", "@babel/plugin-transform-flow-strip-types@^7.18.6": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.19.0.tgz#e9e8606633287488216028719638cbbb2f2dde8f" - integrity sha512-sgeMlNaQVbCSpgLSKP4ZZKfsJVnFnNQlUSk6gPYzR/q7tzCgQF2t8RBKAP6cKJeZdveei7Q7Jm527xepI8lNLg== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - "@babel/plugin-syntax-flow" "^7.18.6" - "@babel/plugin-transform-flow-strip-types@^7.20.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.21.0.tgz#6aeca0adcb81dc627c8986e770bfaa4d9812aff5" @@ -1737,12 +1807,13 @@ "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-syntax-flow" "^7.24.7" -"@babel/plugin-transform-for-of@^7.0.0": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" - integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== +"@babel/plugin-transform-flow-strip-types@^7.25.2": + version "7.26.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.26.5.tgz#2904c85a814e7abb1f4850b8baf4f07d0a2389d4" + integrity sha512-eGK26RsbIkYUns3Y8qKl362juDDYK+wEdPGHGrhzUl6CewZFo55VZ7hg+CyMFU4dd5QQakBN86nBMpRsFpRvbQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.26.5" + "@babel/plugin-syntax-flow" "^7.26.0" "@babel/plugin-transform-for-of@^7.24.7": version "7.24.7" @@ -1838,13 +1909,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-member-expression-literals@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-transform-member-expression-literals@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz#3b4454fb0e302e18ba4945ba3246acb1248315df" @@ -1875,7 +1939,7 @@ "@babel/helper-module-transforms" "^7.25.9" "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.13.8": +"@babel/plugin-transform-modules-commonjs@^7.0.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== @@ -2026,14 +2090,6 @@ "@babel/helper-plugin-utils" "^7.25.9" "@babel/plugin-transform-parameters" "^7.25.9" -"@babel/plugin-transform-object-super@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - "@babel/plugin-transform-object-super@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz#66eeaff7830bba945dd8989b632a40c04ed625be" @@ -2082,7 +2138,7 @@ "@babel/helper-plugin-utils" "^7.25.9" "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" -"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.18.8": +"@babel/plugin-transform-parameters@^7.0.0": version "7.18.8" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz#ee9f1a0ce6d78af58d0956a9378ea3427cccb48a" integrity sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg== @@ -2110,6 +2166,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" +"@babel/plugin-transform-private-methods@^7.24.7", "@babel/plugin-transform-private-methods@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz#847f4139263577526455d7d3223cd8bda51e3b57" + integrity sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-transform-private-methods@^7.25.4": version "7.25.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.4.tgz#9bbefbe3649f470d681997e0b64a4b254d877242" @@ -2118,14 +2182,6 @@ "@babel/helper-create-class-features-plugin" "^7.25.4" "@babel/helper-plugin-utils" "^7.24.8" -"@babel/plugin-transform-private-methods@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz#847f4139263577526455d7d3223cd8bda51e3b57" - integrity sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.25.9" - "@babel/helper-plugin-utils" "^7.25.9" - "@babel/plugin-transform-private-property-in-object@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz#4eec6bc701288c1fab5f72e6a4bbc9d67faca061" @@ -2145,13 +2201,6 @@ "@babel/helper-create-class-features-plugin" "^7.25.9" "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-property-literals@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-transform-property-literals@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz#f0d2ed8380dfbed949c42d4d790266525d63bbdc" @@ -2194,6 +2243,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" +"@babel/plugin-transform-react-jsx-self@^7.24.7": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.9.tgz#c0b6cae9c1b73967f7f9eb2fca9536ba2fad2858" + integrity sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-transform-react-jsx-source@^7.0.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.18.6.tgz#06e9ae8a14d2bc19ce6e3c447d842032a50598fc" @@ -2201,6 +2257,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" +"@babel/plugin-transform-react-jsx-source@^7.24.7": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.9.tgz#4c6b8daa520b5f155b5fb55547d7c9fa91417503" + integrity sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-transform-react-jsx@^7.0.0": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.19.0.tgz#b3cbb7c3a00b92ec8ae1027910e331ba5c500eb9" @@ -2223,6 +2286,17 @@ "@babel/plugin-syntax-jsx" "^7.24.7" "@babel/types" "^7.25.2" +"@babel/plugin-transform-react-jsx@^7.25.2": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.9.tgz#06367940d8325b36edff5e2b9cbe782947ca4166" + integrity sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.25.9" + "@babel/helper-module-imports" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-syntax-jsx" "^7.25.9" + "@babel/types" "^7.25.9" + "@babel/plugin-transform-react-pure-annotations@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.24.7.tgz#bdd9d140d1c318b4f28b29a00fb94f97ecab1595" @@ -2281,6 +2355,18 @@ babel-plugin-polyfill-regenerator "^0.4.1" semver "^6.3.0" +"@babel/plugin-transform-runtime@^7.24.7": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.25.9.tgz#62723ea3f5b31ffbe676da9d6dae17138ae580ea" + integrity sha512-nZp7GlEl+yULJrClz0SwHPqir3lc0zsPrDHQUcxGspSL7AKrexNSEfTbfqnDNJUO13bgKyfuOLMF8Xqtu8j3YQ== + dependencies: + "@babel/helper-module-imports" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + babel-plugin-polyfill-corejs2 "^0.4.10" + babel-plugin-polyfill-corejs3 "^0.10.6" + babel-plugin-polyfill-regenerator "^0.6.1" + semver "^6.3.1" + "@babel/plugin-transform-shorthand-properties@^7.0.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" @@ -2354,13 +2440,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-template-literals@^7.0.0": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" - integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-transform-template-literals@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz#a05debb4a9072ae8f985bcf77f3f215434c8f8c8" @@ -2389,15 +2468,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-typescript@^7.18.6", "@babel/plugin-transform-typescript@^7.5.0": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.19.3.tgz#4f1db1e0fe278b42ddbc19ec2f6cd2f8262e35d6" - integrity sha512-z6fnuK9ve9u/0X0rRvI9MY0xg+DOUaABDYOe+/SQTxtlptaBB/V9JIUxJn6xp3lMBeb9qe8xSFmHU35oZDXD+w== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.19.0" - "@babel/helper-plugin-utils" "^7.19.0" - "@babel/plugin-syntax-typescript" "^7.18.6" - "@babel/plugin-transform-typescript@^7.24.7": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.2.tgz#237c5d10de6d493be31637c6b9fa30b6c5461add" @@ -2409,6 +2479,26 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-syntax-typescript" "^7.24.7" +"@babel/plugin-transform-typescript@^7.25.2": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.26.7.tgz#64339515ea3eff610160f62499c3ef437d0ac83d" + integrity sha512-5cJurntg+AT+cgelGP9Bt788DKiAw9gIMSMU2NJrLAilnj0m8WZWUNZPSLOmadYsujHutpgElO+50foX+ib/Wg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.25.9" + "@babel/helper-create-class-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.26.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" + "@babel/plugin-syntax-typescript" "^7.25.9" + +"@babel/plugin-transform-typescript@^7.5.0": + version "7.19.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.19.3.tgz#4f1db1e0fe278b42ddbc19ec2f6cd2f8262e35d6" + integrity sha512-z6fnuK9ve9u/0X0rRvI9MY0xg+DOUaABDYOe+/SQTxtlptaBB/V9JIUxJn6xp3lMBeb9qe8xSFmHU35oZDXD+w== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.19.0" + "@babel/helper-plugin-utils" "^7.19.0" + "@babel/plugin-syntax-typescript" "^7.18.6" + "@babel/plugin-transform-unicode-escapes@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz#2023a82ced1fb4971630a2e079764502c4148e0e" @@ -2643,15 +2733,6 @@ core-js-compat "^3.37.1" semver "^6.3.1" -"@babel/preset-flow@^7.13.13": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.18.6.tgz#83f7602ba566e72a9918beefafef8ef16d2810cb" - integrity sha512-E7BDhL64W6OUqpuyHnSroLnqyRTcG6ZdOBl1OKI/QK/HJfplqK/S3sq1Cckx7oTodJ5yOXyfw7rEADJ6UjoQDQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-flow-strip-types" "^7.18.6" - "@babel/preset-flow@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.24.7.tgz#eef5cb8e05e97a448fc50c16826f5612fe512c06" @@ -2682,15 +2763,6 @@ "@babel/plugin-transform-react-jsx-development" "^7.24.7" "@babel/plugin-transform-react-pure-annotations" "^7.24.7" -"@babel/preset-typescript@^7.13.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399" - integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-typescript" "^7.18.6" - "@babel/preset-typescript@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz#66cd86ea8f8c014855671d5ea9a737139cbbfef1" @@ -2702,15 +2774,15 @@ "@babel/plugin-transform-modules-commonjs" "^7.24.7" "@babel/plugin-transform-typescript" "^7.24.7" -"@babel/register@^7.13.16": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.18.9.tgz#1888b24bc28d5cc41c412feb015e9ff6b96e439c" - integrity sha512-ZlbnXDcNYHMR25ITwwNKT88JiaukkdVj/nG7r3wnuXkOTHc60Uy05PwMCPre0hSkY68E6zK3xz+vUJSP2jWmcw== +"@babel/register@^7.24.6": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.25.9.tgz#1c465acf7dc983d70ccc318eb5b887ecb04f021b" + integrity sha512-8D43jXtGsYmEeDvm4MWHYUpWf8iiXgWYx3fW7E7Wb7Oe6FWqJPl5K6TuFW0dOwNZzEE5rjlaSJYH9JjrUKJszA== dependencies: clone-deep "^4.0.1" find-cache-dir "^2.0.0" make-dir "^2.1.0" - pirates "^4.0.5" + pirates "^4.0.6" source-map-support "^0.5.16" "@babel/regjsgen@^0.8.0": @@ -2718,13 +2790,6 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.0.0": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.4.tgz#a42f814502ee467d55b38dd1c256f53a7b885c78" - integrity sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/runtime@^7.25.0", "@babel/runtime@^7.25.4": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" @@ -2775,6 +2840,19 @@ "@babel/parser" "^7.25.9" "@babel/types" "^7.25.9" +"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.7.tgz#99a0a136f6a75e7fb8b0a1ace421e0b25994b8bb" + integrity sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.5" + "@babel/parser" "^7.26.7" + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.7" + debug "^4.3.1" + globals "^11.1.0" + "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.19.3", "@babel/traverse@^7.20.0", "@babel/traverse@^7.20.1", "@babel/traverse@^7.20.5": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" @@ -2830,6 +2908,19 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.26.7": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.7.tgz#99a0a136f6a75e7fb8b0a1ace421e0b25994b8bb" + integrity sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.5" + "@babel/parser" "^7.26.7" + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.7" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.19.3", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.3.tgz#fc420e6bbe54880bce6779ffaf315f5e43ec9624" @@ -2927,6 +3018,14 @@ "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" +"@babel/types@^7.26.5", "@babel/types@^7.26.7": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.7.tgz#5e2b89c0768e874d4d061961f3a5a153d71dc17a" + integrity sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg== + dependencies: + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -3221,18 +3320,6 @@ "@gitbeaker/core" "^38.12.1" "@gitbeaker/requester-utils" "^38.12.1" -"@hapi/hoek@^9.0.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" - integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== - -"@hapi/topo@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" - integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hutson/parse-repository-url@^5.0.0": version "5.0.0" resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-5.0.0.tgz#bf344cc75136039bc41bcf5d1ddbcb40405fca3b" @@ -3376,6 +3463,11 @@ resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.2.tgz#baff9f8d70947181deb36772cd9a5b6876d3e60c" integrity sha512-ZhQ4TvhwHZF+lGhQ2O/rsjo80XoZR5/5qhOY3t6FJuX5XBg5Be8YzYTvaUGJnc12AUGI2nr4QSUE4PhKSigx7g== +"@isaacs/ttlcache@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz#21fb23db34e9b6220c6ba023a0118a2dd3461ea2" + integrity sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -3438,22 +3530,12 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/create-cache-key-function@^29.2.1": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-29.5.0.tgz#24e019d03e634be4affe8bcee787d75a36ae57a2" - integrity sha512-LIDZyZgnZss7uikvBKBB/USWwG+GO8+GnwRWT+YkCGDGsqLQlhm9BC3z6+7+eMs1kUlvXQIWEzBR8Q2Pnvx6lg== - dependencies: - "@jest/types" "^29.5.0" - -"@jest/environment@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.5.0.tgz#9152d56317c1fdb1af389c46640ba74ef0bb4c65" - integrity sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ== +"@jest/create-cache-key-function@^29.6.3": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz#793be38148fab78e65f40ae30c36785f4ad859f0" + integrity sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA== dependencies: - "@jest/fake-timers" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - jest-mock "^29.5.0" + "@jest/types" "^29.6.3" "@jest/environment@^29.7.0": version "29.7.0" @@ -3487,18 +3569,6 @@ expect "^29.7.0" jest-snapshot "^29.7.0" -"@jest/fake-timers@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.5.0.tgz#d4d09ec3286b3d90c60bdcd66ed28d35f1b4dc2c" - integrity sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg== - dependencies: - "@jest/types" "^29.5.0" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.5.0" - jest-mock "^29.5.0" - jest-util "^29.5.0" - "@jest/fake-timers@^29.7.0": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" @@ -3558,13 +3628,6 @@ dependencies: "@sinclair/typebox" "^0.24.1" -"@jest/schemas@^29.4.3": - version "29.4.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.3.tgz#39cf1b8469afc40b6f5a2baaa146e332c4151788" - integrity sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg== - dependencies: - "@sinclair/typebox" "^0.25.16" - "@jest/schemas@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" @@ -3622,28 +3685,6 @@ slash "^3.0.0" write-file-atomic "^4.0.2" -"@jest/types@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" - integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - "@jest/types@^29.1.2": version "29.1.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.1.2.tgz#7442d32b16bcd7592d9614173078b8c334ec730a" @@ -3656,18 +3697,6 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jest/types@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.5.0.tgz#f59ef9b031ced83047c67032700d8c807d6e1593" - integrity sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog== - dependencies: - "@jest/schemas" "^29.4.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - "@jest/types@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" @@ -4040,217 +4069,150 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" -"@react-native-community/cli-clean@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-11.3.7.tgz#cb4c2f225f78593412c2d191b55b8570f409a48f" - integrity sha512-twtsv54ohcRyWVzPXL3F9VHGb4Qhn3slqqRs3wEuRzjR7cTmV2TIO2b1VhaqF4HlCgNd+cGuirvLtK2JJyaxMg== - dependencies: - "@react-native-community/cli-tools" "11.3.7" - chalk "^4.1.2" - execa "^5.0.0" - prompts "^2.4.0" - -"@react-native-community/cli-config@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-11.3.7.tgz#4ce95548252ecb094b576369abebf9867c95d277" - integrity sha512-FDBLku9xskS+bx0YFJFLCmUJhEZ4/MMSC9qPYOGBollWYdgE7k/TWI0IeYFmMALAnbCdKQAYP5N29N55Tad8lg== - dependencies: - "@react-native-community/cli-tools" "11.3.7" - chalk "^4.1.2" - cosmiconfig "^5.1.0" - deepmerge "^4.3.0" - glob "^7.1.3" - joi "^17.2.1" - -"@react-native-community/cli-debugger-ui@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-11.3.7.tgz#2147b73313af8de3c9b396406d5d344b904cf2bb" - integrity sha512-aVmKuPKHZENR8SrflkMurZqeyLwbKieHdOvaZCh1Nn/0UC5CxWcyST2DB2XQboZwsvr3/WXKJkSUO+SZ1J9qTQ== - dependencies: - serve-static "^1.13.1" - -"@react-native-community/cli-doctor@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-11.3.7.tgz#7d5f5b1aea78134bba713fa97795986345ff1344" - integrity sha512-YEHUqWISOHnsl5+NM14KHelKh68Sr5/HeEZvvNdIcvcKtZic3FU7Xd1WcbNdo3gCq5JvzGFfufx02Tabh5zmrg== - dependencies: - "@react-native-community/cli-config" "11.3.7" - "@react-native-community/cli-platform-android" "11.3.7" - "@react-native-community/cli-platform-ios" "11.3.7" - "@react-native-community/cli-tools" "11.3.7" - chalk "^4.1.2" - command-exists "^1.2.8" - envinfo "^7.7.2" - execa "^5.0.0" - hermes-profile-transformer "^0.0.6" - ip "^1.1.5" - node-stream-zip "^1.9.1" - ora "^5.4.1" - prompts "^2.4.0" - semver "^7.5.2" - strip-ansi "^5.2.0" - sudo-prompt "^9.0.0" - wcwidth "^1.0.1" - yaml "^2.2.1" - -"@react-native-community/cli-hermes@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-11.3.7.tgz#091e730a1f8bace6c3729e8744bad6141002e0e8" - integrity sha512-chkKd8n/xeZkinRvtH6QcYA8rjNOKU3S3Lw/3Psxgx+hAYV0Gyk95qJHTalx7iu+PwjOOqqvCkJo5jCkYLkoqw== - dependencies: - "@react-native-community/cli-platform-android" "11.3.7" - "@react-native-community/cli-tools" "11.3.7" - chalk "^4.1.2" - hermes-profile-transformer "^0.0.6" - ip "^1.1.5" +"@react-native/assets-registry@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.77.0.tgz#15c0d65b386e61d669912dfdb2ddab225b10d5c3" + integrity sha512-Ms4tYYAMScgINAXIhE4riCFJPPL/yltughHS950l0VP5sm5glbimn9n7RFn9Tc8cipX74/ddbk19+ydK2iDMmA== -"@react-native-community/cli-platform-android@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-11.3.7.tgz#7845bc48258b6bb55df208a23b3690647f113995" - integrity sha512-WGtXI/Rm178UQb8bu1TAeFC/RJvYGnbHpULXvE20GkmeJ1HIrMjkagyk6kkY3Ej25JAP2R878gv+TJ/XiRhaEg== +"@react-native/babel-plugin-codegen@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.77.0.tgz#8d5111a18328a48762c2909849f23c4894952fee" + integrity sha512-5TYPn1k+jdDOZJU4EVb1kZ0p9TCVICXK3uplRev5Gul57oWesAaiWGZOzfRS3lonWeuR4ij8v8PFfIHOaq0vmA== dependencies: - "@react-native-community/cli-tools" "11.3.7" - chalk "^4.1.2" - execa "^5.0.0" - glob "^7.1.3" - logkitty "^0.7.1" + "@babel/traverse" "^7.25.3" + "@react-native/codegen" "0.77.0" -"@react-native-community/cli-platform-ios@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-11.3.7.tgz#87478f907634713b7236c77870446a5ca1f35ff1" - integrity sha512-Z/8rseBput49EldX7MogvN6zJlWzZ/4M97s2P+zjS09ZoBU7I0eOKLi0N9wx+95FNBvGQQ/0P62bB9UaFQH2jw== +"@react-native/babel-preset@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.77.0.tgz#abf6ca0747a1e44e3184e9fc03ac8d9581f000d2" + integrity sha512-Z4yxE66OvPyQ/iAlaETI1ptRLcDm7Tk6ZLqtCPuUX3AMg+JNgIA86979T4RSk486/JrBUBH5WZe2xjj7eEHXsA== dependencies: - "@react-native-community/cli-tools" "11.3.7" - chalk "^4.1.2" - execa "^5.0.0" - fast-xml-parser "^4.0.12" - glob "^7.1.3" - ora "^5.4.1" + "@babel/core" "^7.25.2" + "@babel/plugin-proposal-export-default-from" "^7.24.7" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-export-default-from" "^7.24.7" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-transform-arrow-functions" "^7.24.7" + "@babel/plugin-transform-async-generator-functions" "^7.25.4" + "@babel/plugin-transform-async-to-generator" "^7.24.7" + "@babel/plugin-transform-block-scoping" "^7.25.0" + "@babel/plugin-transform-class-properties" "^7.25.4" + "@babel/plugin-transform-classes" "^7.25.4" + "@babel/plugin-transform-computed-properties" "^7.24.7" + "@babel/plugin-transform-destructuring" "^7.24.8" + "@babel/plugin-transform-flow-strip-types" "^7.25.2" + "@babel/plugin-transform-for-of" "^7.24.7" + "@babel/plugin-transform-function-name" "^7.25.1" + "@babel/plugin-transform-literals" "^7.25.2" + "@babel/plugin-transform-logical-assignment-operators" "^7.24.7" + "@babel/plugin-transform-modules-commonjs" "^7.24.8" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.24.7" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.24.7" + "@babel/plugin-transform-numeric-separator" "^7.24.7" + "@babel/plugin-transform-object-rest-spread" "^7.24.7" + "@babel/plugin-transform-optional-catch-binding" "^7.24.7" + "@babel/plugin-transform-optional-chaining" "^7.24.8" + "@babel/plugin-transform-parameters" "^7.24.7" + "@babel/plugin-transform-private-methods" "^7.24.7" + "@babel/plugin-transform-private-property-in-object" "^7.24.7" + "@babel/plugin-transform-react-display-name" "^7.24.7" + "@babel/plugin-transform-react-jsx" "^7.25.2" + "@babel/plugin-transform-react-jsx-self" "^7.24.7" + "@babel/plugin-transform-react-jsx-source" "^7.24.7" + "@babel/plugin-transform-regenerator" "^7.24.7" + "@babel/plugin-transform-runtime" "^7.24.7" + "@babel/plugin-transform-shorthand-properties" "^7.24.7" + "@babel/plugin-transform-spread" "^7.24.7" + "@babel/plugin-transform-sticky-regex" "^7.24.7" + "@babel/plugin-transform-typescript" "^7.25.2" + "@babel/plugin-transform-unicode-regex" "^7.24.7" + "@babel/template" "^7.25.0" + "@react-native/babel-plugin-codegen" "0.77.0" + babel-plugin-syntax-hermes-parser "0.25.1" + babel-plugin-transform-flow-enums "^0.0.2" + react-refresh "^0.14.0" -"@react-native-community/cli-plugin-metro@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-11.3.7.tgz#2e8a9deb30b40495c5c1347a1837a824400fa00f" - integrity sha512-0WhgoBVGF1f9jXcuagQmtxpwpfP+2LbLZH4qMyo6OtYLWLG13n2uRep+8tdGzfNzl1bIuUTeE9yZSAdnf9LfYQ== +"@react-native/codegen@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.77.0.tgz#e735f7ed99705ad7a9d66827cf1f5f127c54a578" + integrity sha512-rE9lXx41ZjvE8cG7e62y/yGqzUpxnSvJ6me6axiX+aDewmI4ZrddvRGYyxCnawxy5dIBHSnrpZse3P87/4Lm7w== dependencies: - "@react-native-community/cli-server-api" "11.3.7" - "@react-native-community/cli-tools" "11.3.7" - chalk "^4.1.2" - execa "^5.0.0" - metro "0.76.8" - metro-config "0.76.8" - metro-core "0.76.8" - metro-react-native-babel-transformer "0.76.8" - metro-resolver "0.76.8" - metro-runtime "0.76.8" - readline "^1.3.0" + "@babel/parser" "^7.25.3" + glob "^7.1.1" + hermes-parser "0.25.1" + invariant "^2.2.4" + jscodeshift "^17.0.0" + nullthrows "^1.1.1" + yargs "^17.6.2" -"@react-native-community/cli-server-api@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-11.3.7.tgz#2cce54b3331c9c51b9067129c297ab2e9a142216" - integrity sha512-yoFyGdvR3HxCnU6i9vFqKmmSqFzCbnFSnJ29a+5dppgPRetN+d//O8ard/YHqHzToFnXutAFf2neONn23qcJAg== +"@react-native/community-cli-plugin@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.77.0.tgz#14af613b7c0c7f9a8a8fb7e07e08b84c38c402cd" + integrity sha512-GRshwhCHhtupa3yyCbel14SlQligV8ffNYN5L1f8HCo2SeGPsBDNjhj2U+JTrMPnoqpwowPGvkCwyqwqYff4MQ== dependencies: - "@react-native-community/cli-debugger-ui" "11.3.7" - "@react-native-community/cli-tools" "11.3.7" - compression "^1.7.1" - connect "^3.6.5" - errorhandler "^1.5.1" - nocache "^3.0.1" - pretty-format "^26.6.2" - serve-static "^1.13.1" - ws "^7.5.1" - -"@react-native-community/cli-tools@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-11.3.7.tgz#37aa7efc7b4a1b7077d541f1d7bb11a2ab7b6ff2" - integrity sha512-peyhP4TV6Ps1hk+MBHTFaIR1eI3u+OfGBvr5r0wPwo3FAJvldRinMgcB/TcCcOBXVORu7ba1XYjkubPeYcqAyA== - dependencies: - appdirsjs "^1.2.4" - chalk "^4.1.2" - find-up "^5.0.0" - mime "^2.4.1" - node-fetch "^2.6.0" - open "^6.2.0" - ora "^5.4.1" - semver "^7.5.2" - shell-quote "^1.7.3" - -"@react-native-community/cli-types@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-11.3.7.tgz#12fe7cff3da08bd27e11116531b2e001939854b9" - integrity sha512-OhSr/TiDQkXjL5YOs8+hvGSB+HltLn5ZI0+A3DCiMsjUgTTsYh+Z63OtyMpNjrdCEFcg0MpfdU2uxstCS6Dc5g== - dependencies: - joi "^17.2.1" - -"@react-native-community/cli@11.3.7": - version "11.3.7" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-11.3.7.tgz#564c0054269d8385fa9d301750b2e56dbb5c0cc9" - integrity sha512-Ou8eDlF+yh2rzXeCTpMPYJ2fuqsusNOhmpYPYNQJQ2h6PvaF30kPomflgRILems+EBBuggRtcT+I+1YH4o/q6w== - dependencies: - "@react-native-community/cli-clean" "11.3.7" - "@react-native-community/cli-config" "11.3.7" - "@react-native-community/cli-debugger-ui" "11.3.7" - "@react-native-community/cli-doctor" "11.3.7" - "@react-native-community/cli-hermes" "11.3.7" - "@react-native-community/cli-plugin-metro" "11.3.7" - "@react-native-community/cli-server-api" "11.3.7" - "@react-native-community/cli-tools" "11.3.7" - "@react-native-community/cli-types" "11.3.7" - chalk "^4.1.2" - commander "^9.4.1" - execa "^5.0.0" - find-up "^4.1.0" - fs-extra "^8.1.0" - graceful-fs "^4.1.3" - prompts "^2.4.0" - semver "^7.5.2" + "@react-native/dev-middleware" "0.77.0" + "@react-native/metro-babel-transformer" "0.77.0" + chalk "^4.0.0" + debug "^2.2.0" + invariant "^2.2.4" + metro "^0.81.0" + metro-config "^0.81.0" + metro-core "^0.81.0" + readline "^1.3.0" + semver "^7.1.3" -"@react-native/assets-registry@^0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.72.0.tgz#c82a76a1d86ec0c3907be76f7faf97a32bbed05d" - integrity sha512-Im93xRJuHHxb1wniGhBMsxLwcfzdYreSZVQGDoMJgkd6+Iky61LInGEHnQCTN0fKNYF1Dvcofb4uMmE1RQHXHQ== +"@react-native/debugger-frontend@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.77.0.tgz#9846c905ea423e3b12d94549268ca0e668ed0e7b" + integrity sha512-glOvSEjCbVXw+KtfiOAmrq21FuLE1VsmBsyT7qud4KWbXP43aUEhzn70mWyFuiIdxnzVPKe2u8iWTQTdJksR1w== -"@react-native/codegen@^0.72.7": - version "0.72.7" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.72.7.tgz#b6832ce631ac63143024ea094a6b5480a780e589" - integrity sha512-O7xNcGeXGbY+VoqBGNlZ3O05gxfATlwE1Q1qQf5E38dK+tXn5BY4u0jaQ9DPjfE8pBba8g/BYI1N44lynidMtg== +"@react-native/dev-middleware@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.77.0.tgz#a5a660e2fc9acf2262e0fc68164b26df3527356a" + integrity sha512-DAlEYujm43O+Dq98KP2XfLSX5c/TEGtt+JBDEIOQewk374uYY52HzRb1+Gj6tNaEj/b33no4GibtdxbO5zmPhg== dependencies: - "@babel/parser" "^7.20.0" - flow-parser "^0.206.0" - jscodeshift "^0.14.0" + "@isaacs/ttlcache" "^1.4.1" + "@react-native/debugger-frontend" "0.77.0" + chrome-launcher "^0.15.2" + chromium-edge-launcher "^0.2.0" + connect "^3.6.5" + debug "^2.2.0" nullthrows "^1.1.1" + open "^7.0.3" + selfsigned "^2.4.1" + serve-static "^1.16.2" + ws "^6.2.3" -"@react-native/gradle-plugin@^0.72.11": - version "0.72.11" - resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.72.11.tgz#c063ef12778706611de7a1e42b74b14d9405fb9f" - integrity sha512-P9iRnxiR2w7EHcZ0mJ+fmbPzMby77ZzV6y9sJI3lVLJzF7TLSdbwcQyD3lwMsiL+q5lKUHoZJS4sYmih+P2HXw== - -"@react-native/js-polyfills@^0.72.1": - version "0.72.1" - resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.72.1.tgz#905343ef0c51256f128256330fccbdb35b922291" - integrity sha512-cRPZh2rBswFnGt5X5EUEPs0r+pAsXxYsifv/fgy9ZLQokuT52bPH+9xjDR+7TafRua5CttGW83wP4TntRcWNDA== - -"@react-native/normalize-colors@*": - version "0.73.0" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.73.0.tgz#23e15cf2a2b73ac7e5e6df8d5b86b173cfb35a3f" - integrity sha512-EmSCmJ0djeMJadeFsms6Pl/R85i9xSJMc+tyJu/GEMkKXBVyYQyqanK4RHFU0v8MO90OWj+SiFXjCkKYiJ6mkg== +"@react-native/gradle-plugin@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.77.0.tgz#81e1a382e6c31f4f21e43ade2612c05f3e58e722" + integrity sha512-rmfh93jzbndSq7kihYHUQ/EGHTP8CCd3GDCmg5SbxSOHAaAYx2HZ28ZG7AVcGUsWeXp+e/90zGIyfOzDRx0Zaw== -"@react-native/normalize-colors@^0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.72.0.tgz#14294b7ed3c1d92176d2a00df48456e8d7d62212" - integrity sha512-285lfdqSXaqKuBbbtP9qL2tDrfxdOFtIMvkKadtleRQkdOxx+uzGvFr82KHmc/sSiMtfXGp7JnFYWVh4sFl7Yw== +"@react-native/js-polyfills@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.77.0.tgz#892d7f2f55c380623d1998a752f83bd37500a941" + integrity sha512-kHFcMJVkGb3ptj3yg1soUsMHATqal4dh0QTGAbYihngJ6zy+TnP65J3GJq4UlwqFE9K1RZkeCmTwlmyPFHOGvA== -"@react-native/virtualized-lists@^0.72.4": - version "0.72.4" - resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.72.4.tgz#926ddb5eced27dc3975dad0915cb96d1f9c01c62" - integrity sha512-2t8WBVACkKEadtsiGYJaYTix575J/5VQJyqnyL7iDIsd3iG7ODjfMDsTGsVyAA2Av/xeVIuVQRUX0ZzV3cucug== +"@react-native/metro-babel-transformer@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.77.0.tgz#86eef50eac7cae5ea54976d0195862dbb62958fb" + integrity sha512-19GfvhBRKCU3UDWwCnDR4QjIzz3B2ZuwhnxMRwfAgPxz7QY9uKour9RGmBAVUk1Wxi/SP7dLEvWnmnuBO39e2A== dependencies: - invariant "^2.2.4" + "@babel/core" "^7.25.2" + "@react-native/babel-preset" "0.77.0" + hermes-parser "0.25.1" nullthrows "^1.1.1" -"@react-native/virtualized-lists@^0.72.8": - version "0.72.8" - resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.72.8.tgz#a2c6a91ea0f1d40eb5a122fb063daedb92ed1dc3" - integrity sha512-J3Q4Bkuo99k7mu+jPS9gSUSgq+lLRSI/+ahXNwV92XgJ/8UgOTxu2LPwhJnBk/sQKxq7E8WkZBnBiozukQMqrw== +"@react-native/normalize-colors@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.77.0.tgz#dedd55b7c8d9c4b43cd3d12a06b654f0ff97949f" + integrity sha512-qjmxW3xRZe4T0ZBEaXZNHtuUbRgyfybWijf1yUuQwjBt24tSapmIslwhCjpKidA0p93ssPcepquhY0ykH25mew== + +"@react-native/virtualized-lists@0.77.0": + version "0.77.0" + resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.77.0.tgz#a8ac08b0de3f78648a3a8573135755301f36b03d" + integrity sha512-ppPtEu9ISO9iuzpA2HBqrfmDpDAnGGduNDVaegadOzbMCPAB3tC9Blxdu9W68LyYlNQILIsP6/FYtLwf7kfNew== dependencies: invariant "^2.2.4" nullthrows "^1.1.1" @@ -4271,33 +4233,11 @@ resolved "https://registry.yarnpkg.com/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz#60de891bb126abfdc5410fdc6166aca065f10a0c" integrity sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg== -"@sideway/address@^4.1.3": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" - integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== - dependencies: - "@hapi/hoek" "^9.0.0" - -"@sideway/formula@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" - integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== - -"@sideway/pinpoint@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" - integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== - "@sinclair/typebox@^0.24.1": version "0.24.44" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.44.tgz#0a0aa3bf4a155a678418527342a3ee84bd8caa5c" integrity sha512-ka0W0KN5i6LfrSocduwliMMpqVgohtPFidKdMEOUjoOFCHcOOYkKsPRxfs5f15oPNHTm6ERAm0GV/+/LTKeiWg== -"@sinclair/typebox@^0.25.16": - version "0.25.21" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.21.tgz#763b05a4b472c93a8db29b2c3e359d55b29ce272" - integrity sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g== - "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -4440,6 +4380,13 @@ "@types/tough-cookie" "*" parse5 "^7.0.0" +"@types/node-forge@^1.3.0": + version "1.3.11" + resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-1.3.11.tgz#0972ea538ddb0f4d9c2fa0ec5db5724773a604da" + integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== + dependencies: + "@types/node" "*" + "@types/node@*": version "18.8.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.8.2.tgz#17d42c6322d917764dd3d2d3a10d7884925de067" @@ -4467,15 +4414,7 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== -"@types/react-native@0.72.6": - version "0.72.6" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.72.6.tgz#2c7a348ccb33637f482f36e4c6450d310805a290" - integrity sha512-5Tan0ejOjbYyrnRreRZ7ftcWbehQELoHevJQliAu0Rhqrsnall8dyodf/434jdDJuQEzLisBMg7ZkQNnghUXIw== - dependencies: - "@react-native/virtualized-lists" "^0.72.4" - "@types/react" "*" - -"@types/react@*", "@types/react@18.3.18": +"@types/react@18.3.18": version "18.3.18" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.18.tgz#9b382c4cd32e13e463f97df07c2ee3bbcd26904b" integrity sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ== @@ -4508,20 +4447,6 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.2.tgz#7bd04c5da378496ef1695a1008bf8f71847a8b8b" integrity sha512-5qcvofLPbfjmBfKaLfj/+f+Sbd6pN4zl7w7VSVI5uz7m9QZTuB2aZAa2uo1wHFBNN2x6g/SoTkXmd8mQnQF2Cw== -"@types/yargs@^15.0.0": - version "15.0.17" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.17.tgz#bea870ba551b43831bfaa75de2e4a3849c39322b" - integrity sha512-cj53I8GUcWJIgWVTSVe2L7NJAB5XWGdsoMosVvUgv1jEnMbAcsbaCzt1coUcyi8Sda5PgTWAooG8jNyDTD+CWA== - dependencies: - "@types/yargs-parser" "*" - -"@types/yargs@^16.0.0": - version "16.0.4" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" - integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== - dependencies: - "@types/yargs-parser" "*" - "@types/yargs@^17.0.8": version "17.0.13" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76" @@ -4549,7 +4474,7 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -accepts@^1.3.7, accepts@~1.3.5, accepts@~1.3.7: +accepts@^1.3.7: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== @@ -4641,20 +4566,6 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.2: dependencies: type-fest "^0.21.3" -ansi-fragments@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ansi-fragments/-/ansi-fragments-0.2.1.tgz#24409c56c4cc37817c3d7caa99d8969e2de5a05e" - integrity sha512-DykbNHxuXQwUDRv5ibc2b0x7uw7wmwOGLBUd5RmaQ5z8Lhx19vwvKV+FAsM5rEA6dEcHxX+/Ad5s9eF2k2bB+w== - dependencies: - colorette "^1.0.7" - slice-ansi "^2.0.0" - strip-ansi "^5.0.0" - -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - ansi-regex@^5.0.0, ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -4665,7 +4576,7 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -4697,11 +4608,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -appdirsjs@^1.2.4: - version "1.2.7" - resolved "https://registry.yarnpkg.com/appdirsjs/-/appdirsjs-1.2.7.tgz#50b4b7948a26ba6090d4aede2ae2dc2b051be3b3" - integrity sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw== - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -4729,13 +4635,6 @@ asap@~2.0.6: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== -ast-types@0.15.2: - version "0.15.2" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.15.2.tgz#39ae4809393c4b16df751ee563411423e85fb49d" - integrity sha512-c27loCv9QkZinsa5ProX751khO9DJl/AcB5c2KNtA6NRvHKS0PgLfcftz72KVq504vB0Gku5s2kUZzDBvQWvHg== - dependencies: - tslib "^2.0.1" - ast-types@^0.13.4: version "0.13.4" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" @@ -4743,10 +4642,12 @@ ast-types@^0.13.4: dependencies: tslib "^2.0.1" -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +ast-types@^0.16.1: + version "0.16.1" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.16.1.tgz#7a9da1617c9081bc121faafe91711b4c8bb81da2" + integrity sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg== + dependencies: + tslib "^2.0.1" async-limiter@~1.0.0: version "1.0.1" @@ -4767,11 +4668,6 @@ async-retry@1.3.3: dependencies: retry "0.13.1" -async@^3.2.2: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -4785,11 +4681,6 @@ atomically@^2.0.3: stubborn-fs "^1.2.5" when-exit "^2.1.1" -babel-core@^7.0.0-bridge.0: - version "7.0.0-bridge.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" - integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== - babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" @@ -4890,10 +4781,12 @@ babel-plugin-polyfill-regenerator@^0.6.1: dependencies: "@babel/helper-define-polyfill-provider" "^0.6.1" -babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: - version "7.0.0-beta.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" - integrity sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ== +babel-plugin-syntax-hermes-parser@0.25.1: + version "0.25.1" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-hermes-parser/-/babel-plugin-syntax-hermes-parser-0.25.1.tgz#58b539df973427fcfbb5176a3aec7e5dee793cb0" + integrity sha512-IVNpGzboFLfXZUAwkLFcI/bnqVbwky0jP3eBno4HKtqvQJAHBLdgxiG6lQ4to0+Q/YCN3PO0od5NZwIKyY4REQ== + dependencies: + hermes-parser "0.25.1" babel-plugin-transform-flow-enums@^0.0.2: version "0.0.2" @@ -4920,39 +4813,6 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-fbjs@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.4.0.tgz#38a14e5a7a3b285a3f3a86552d650dca5cf6111c" - integrity sha512-9ywCsCvo1ojrw0b+XYk7aFvTH6D9064t0RIL1rtMf3nsa02Xw41MS7sZw216Im35xj/UY0PDBQsa1brUDDF1Ow== - dependencies: - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-block-scoped-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-member-expression-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-property-literals" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" - babel-preset-jest@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" @@ -4966,7 +4826,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.1.2, base64-js@^1.3.1: +base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -4986,15 +4846,6 @@ before-after-hook@^3.0.2: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-3.0.2.tgz#d5665a5fa8b62294a5aa0a499f933f4a1016195d" integrity sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A== -bl@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - boolbase@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" @@ -5093,14 +4944,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - bundle-name@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" @@ -5108,11 +4951,6 @@ bundle-name@^4.1.0: dependencies: run-applescript "^7.0.0" -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== - call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -5156,7 +4994,7 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase@^5.0.0, camelcase@^5.3.1: +camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== @@ -5181,7 +5019,7 @@ caniuse-lite@^1.0.30001663: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001666.tgz#112d77e80f1762f62a1b71ba92164e0cb3f3dd13" integrity sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g== -chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: +chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -5218,6 +5056,28 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +chrome-launcher@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/chrome-launcher/-/chrome-launcher-0.15.2.tgz#4e6404e32200095fdce7f6a1e1004f9bd36fa5da" + integrity sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ== + dependencies: + "@types/node" "*" + escape-string-regexp "^4.0.0" + is-wsl "^2.2.0" + lighthouse-logger "^1.0.0" + +chromium-edge-launcher@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/chromium-edge-launcher/-/chromium-edge-launcher-0.2.0.tgz#0c378f28c99aefc360705fa155de0113997f62fc" + integrity sha512-JfJjUnq25y9yg4FABRRVPmBGWPZZi+AQXT4mxupb67766/0UlhG8PAZCz6xzEMXTbW3CsSoE8PcCWA49n35mKg== + dependencies: + "@types/node" "*" + escape-string-regexp "^4.0.0" + is-wsl "^2.2.0" + lighthouse-logger "^1.0.0" + mkdirp "^1.0.4" + rimraf "^3.0.2" + ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -5248,13 +5108,6 @@ cli-boxes@^3.0.0: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-3.0.0.tgz#71a10c716feeba005e4504f36329ef0b17cf3145" integrity sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g== -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - cli-cursor@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-5.0.0.tgz#24a4831ecf5a6b01ddeb32fb71a4b2088b0dce38" @@ -5262,11 +5115,6 @@ cli-cursor@^5.0.0: dependencies: restore-cursor "^5.0.0" -cli-spinners@^2.5.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== - cli-spinners@^2.9.2: version "2.9.2" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" @@ -5277,15 +5125,6 @@ cli-width@^4.1.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" - cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -5304,11 +5143,6 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -5343,11 +5177,6 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^1.0.7: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" - integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== - colors@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -5360,26 +5189,16 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -command-exists@^1.2.8: - version "1.2.9" - resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" - integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== +commander@^12.0.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== commander@^2.18.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^9.4.1: - version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - -commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" - integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== - commitlint@19.6.1: version "19.6.1" resolved "https://registry.yarnpkg.com/commitlint/-/commitlint-19.6.1.tgz#8fbfc2ee8cd62172360923679287841b536ee271" @@ -5406,26 +5225,6 @@ complex.js@^2.1.1: resolved "https://registry.yarnpkg.com/complex.js/-/complex.js-2.1.1.tgz#0675dac8e464ec431fb2ab7d30f41d889fb25c31" integrity sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg== -compressible@~2.0.16: - version "2.0.18" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" - integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - dependencies: - mime-db ">= 1.43.0 < 2" - -compression@^1.7.1: - version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" - debug "2.6.9" - on-headers "~1.0.2" - safe-buffer "5.1.2" - vary "~1.1.2" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -5676,7 +5475,7 @@ cosmiconfig@9.0.0, cosmiconfig@^9.0.0: js-yaml "^4.1.0" parse-json "^5.2.0" -cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: +cosmiconfig@^5.0.5: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== @@ -5816,12 +5615,7 @@ data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" -dayjs@^1.8.15: - version "1.11.5" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93" - integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA== - -debug@2.6.9, debug@^2.2.0: +debug@2.6.9, debug@^2.2.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -5842,11 +5636,6 @@ debug@^4.3.5: dependencies: ms "2.1.2" -decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== - decimal.js@^10.4.1: version "10.4.1" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.1.tgz#be75eeac4a2281aace80c1a8753587c27ef053e7" @@ -5882,11 +5671,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== -deepmerge@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - default-browser-id@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26" @@ -5900,13 +5684,6 @@ default-browser@^5.2.1: bundle-name "^4.1.0" default-browser-id "^5.0.0" -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - integrity sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA== - dependencies: - clone "^1.0.2" - define-data-property@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" @@ -5967,15 +5744,6 @@ depd@2.0.0: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -deprecated-react-native-prop-types@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-4.1.0.tgz#8ed03a64c21b7fbdd2d000957b6838d4f38d2c66" - integrity sha512-WfepZHmRbbdTvhcolb8aOKEvQdcmTMn5tKLbqbXmkBvjFjRVWAYqsXk/DBsV8TZxws8SdGHLuHaJrHSQUPRdfw== - dependencies: - "@react-native/normalize-colors" "*" - invariant "*" - prop-types "*" - deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" @@ -6138,11 +5906,6 @@ env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@^7.7.2: - version "7.8.1" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" - integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== - error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -6157,14 +5920,6 @@ error-stack-parser@^2.0.6: dependencies: stackframe "^1.3.4" -errorhandler@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/errorhandler/-/errorhandler-1.5.1.tgz#b9ba5d17cf90744cd1e851357a6e75bf806a9a91" - integrity sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A== - dependencies: - accepts "~1.3.7" - escape-html "~1.0.3" - es-define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" @@ -6430,13 +6185,6 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -fast-xml-parser@^4.0.12: - version "4.4.1" - resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz#86dbf3f18edf8739326447bcaac31b4ae7f6514f" - integrity sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw== - dependencies: - strnum "^1.0.5" - fastq@^1.6.0: version "1.13.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" @@ -6514,14 +6262,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - find-up@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-7.0.0.tgz#e8dec1455f74f78d888ad65bf7ca13dd2b4e66fb" @@ -6531,11 +6271,6 @@ find-up@^7.0.0: path-exists "^5.0.0" unicorn-magic "^0.1.0" -flow-enums-runtime@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.5.tgz#95884bfcc82edaf27eef7e1dd09732331cfbafbc" - integrity sha512-PSZF9ZuaZD03sT9YaIs0FrGJ7lSUw7rHZIex+73UYVXg46eL/wxN5PaVcPJFudE2cJu5f0fezitV5aBkLHPUOQ== - flow-enums-runtime@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.6.tgz#5bb0cd1b0a3e471330f4d109039b7eba5cb3e787" @@ -6546,11 +6281,6 @@ flow-parser@0.*: resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.188.1.tgz#eb2174271d817d012708c39eb018c166a52d7ca6" integrity sha512-6PA9S1Dphgj5j61As1VkCw8xE0sBXd/ql/WYRQRT8kgORqclp5Eh/blAKvye2p/oIrCpWYwENs1khKqTZvd2UA== -flow-parser@^0.206.0: - version "0.206.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.206.0.tgz#f4f794f8026535278393308e01ea72f31000bfef" - integrity sha512-HVzoK3r6Vsg+lKvlIZzaWNBVai+FXTX1wdYhz/wVlH13tb/gOdLXmlTqy6odmTBhT5UoWUbq0k8263Qhr9d88w== - form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -6618,7 +6348,7 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1, get-caller-file@^2.0.5: +get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -6754,7 +6484,7 @@ glob-parent@^5.1.2: dependencies: is-glob "^4.0.1" -glob@^7.0.0, glob@^7.1.3, glob@^7.1.4: +glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -6830,7 +6560,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@4.2.10, graceful-fs@^4.1.11, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@4.2.10, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -6912,22 +6642,15 @@ hasown@^2.0.2: dependencies: function-bind "^1.1.2" -hermes-estree@0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.12.0.tgz#8a289f9aee854854422345e6995a48613bac2ca8" - integrity sha512-+e8xR6SCen0wyAKrMT3UD0ZCCLymKhRgjEB5sS28rKiFir/fXgLoeRilRUssFCILmGHb+OvHDUlhxs0+IEyvQw== - hermes-estree@0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.23.1.tgz#d0bac369a030188120ee7024926aabe5a9f84fdb" integrity sha512-eT5MU3f5aVhTqsfIReZ6n41X5sYn4IdQL0nvz6yO+MMlPxw49aSARHLg/MSehQftyjnrE8X6bYregzSumqc6cg== -hermes-parser@0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.12.0.tgz#114dc26697cfb41a6302c215b859b74224383773" - integrity sha512-d4PHnwq6SnDLhYl3LHNHvOg7nQ6rcI7QVil418REYksv0Mh3cEkHDcuhGxNQ3vgnLSLl4QSvDrFCwQNYdpWlzw== - dependencies: - hermes-estree "0.12.0" +hermes-estree@0.25.1: + version "0.25.1" + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.25.1.tgz#6aeec17d1983b4eabf69721f3aa3eb705b17f480" + integrity sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw== hermes-parser@0.23.1: version "0.23.1" @@ -6936,12 +6659,12 @@ hermes-parser@0.23.1: dependencies: hermes-estree "0.23.1" -hermes-profile-transformer@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/hermes-profile-transformer/-/hermes-profile-transformer-0.0.6.tgz#bd0f5ecceda80dd0ddaae443469ab26fb38fc27b" - integrity sha512-cnN7bQUm65UWOy6cbGcCcZ3rpwW8Q/j4OP5aWRhEry4Z2t2aR1cjrbp0BS+KiBN0smvP1caBgAuxutvyvJILzQ== +hermes-parser@0.25.1: + version "0.25.1" + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.25.1.tgz#5be0e487b2090886c62bd8a11724cd766d5f54d1" + integrity sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA== dependencies: - source-map "^0.7.3" + hermes-estree "0.25.1" homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1: version "1.0.3" @@ -7070,11 +6793,6 @@ iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" @@ -7152,7 +6870,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -7185,7 +6903,7 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -invariant@*, invariant@^2.2.4: +invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -7200,11 +6918,6 @@ ip-address@^9.0.5: jsbn "1.1.0" sprintf-js "^1.1.3" -ip@^1.1.5: - version "1.1.9" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396" - integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ== - is-absolute@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" @@ -7244,6 +6957,11 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw== +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-docker@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" @@ -7259,11 +6977,6 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== - is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" @@ -7317,11 +7030,6 @@ is-installed-globally@^1.0.0: global-directory "^4.0.1" is-path-inside "^4.0.0" -is-interactive@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" - integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== - is-interactive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" @@ -7422,11 +7130,6 @@ is-unc-path@^1.0.0: dependencies: unc-path-regex "^0.1.2" -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - is-unicode-supported@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" @@ -7442,10 +7145,12 @@ is-windows@^1.0.1: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== +is-wsl@^2.1.1, is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" is-wsl@^3.1.0: version "3.1.0" @@ -7670,19 +7375,7 @@ jest-environment-jsdom@29.7.0: jest-util "^29.7.0" jsdom "^20.0.0" -jest-environment-node@^29.2.1: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.5.0.tgz#f17219d0f0cc0e68e0727c58b792c040e332c967" - integrity sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw== - dependencies: - "@jest/environment" "^29.5.0" - "@jest/fake-timers" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/node" "*" - jest-mock "^29.5.0" - jest-util "^29.5.0" - -jest-environment-node@^29.7.0: +jest-environment-node@^29.6.3, jest-environment-node@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== @@ -7699,11 +7392,6 @@ jest-get-type@^29.0.0: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.0.0.tgz#843f6c50a1b778f7325df1129a0fd7aa713aef80" integrity sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw== -jest-get-type@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.3.tgz#1ab7a5207c995161100b5187159ca82dd48b3dd5" - integrity sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg== - jest-get-type@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" @@ -7771,21 +7459,6 @@ jest-message-util@^29.1.2: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.5.0.tgz#1f776cac3aca332ab8dd2e3b41625435085c900e" - integrity sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.5.0" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.5.0" - slash "^3.0.0" - stack-utils "^2.0.3" - jest-message-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" @@ -7801,15 +7474,6 @@ jest-message-util@^29.7.0: slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.5.0.tgz#26e2172bcc71d8b0195081ff1f146ac7e1518aed" - integrity sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw== - dependencies: - "@jest/types" "^29.5.0" - "@types/node" "*" - jest-util "^29.5.0" - jest-mock@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" @@ -7824,11 +7488,6 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-regex-util@^27.0.6: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== - jest-regex-util@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" @@ -7938,18 +7597,6 @@ jest-snapshot@^29.7.0: pretty-format "^29.7.0" semver "^7.5.3" -jest-util@^27.2.0: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - jest-util@^29.1.2: version "29.1.2" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.1.2.tgz#ac5798e93cb6a6703084e194cfa0898d66126df1" @@ -7962,18 +7609,6 @@ jest-util@^29.1.2: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-util@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.5.0.tgz#24a4d3d92fc39ce90425311b23c27a6e0ef16b8f" - integrity sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ== - dependencies: - "@jest/types" "^29.5.0" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - jest-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" @@ -7986,18 +7621,6 @@ jest-util@^29.7.0: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^29.2.1: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.5.0.tgz#8e5a8f36178d40e47138dc00866a5f3bd9916ffc" - integrity sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ== - dependencies: - "@jest/types" "^29.5.0" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^29.4.3" - leven "^3.1.0" - pretty-format "^29.5.0" - jest-validate@^29.6.3, jest-validate@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" @@ -8024,15 +7647,6 @@ jest-watcher@^29.7.0: jest-util "^29.7.0" string-length "^4.0.1" -jest-worker@^27.2.0: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - jest-worker@^29.6.3, jest-worker@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" @@ -8058,17 +7672,6 @@ jiti@^2.4.1: resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.4.2.tgz#d19b7732ebb6116b06e2038da74a55366faef560" integrity sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A== -joi@^17.2.1: - version "17.6.2" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.2.tgz#00ac55ce6495596545cce45309f38738cfbd7cd3" - integrity sha512-+gqqdh1xc1wb+Lor0J9toqgeReyDOCqOdG8QSdRcEvwrcRiFQZneUCGKjFjuyBWUb3uaFOgY56yMaZ5FIc+H4w== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.0" - "@sideway/pinpoint" "^2.0.0" - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -8104,30 +7707,29 @@ jsc-safe-url@^0.2.2: resolved "https://registry.yarnpkg.com/jsc-safe-url/-/jsc-safe-url-0.2.4.tgz#141c14fbb43791e88d5dc64e85a374575a83477a" integrity sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q== -jscodeshift@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.14.0.tgz#7542e6715d6d2e8bde0b4e883f0ccea358b46881" - integrity sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA== - dependencies: - "@babel/core" "^7.13.16" - "@babel/parser" "^7.13.16" - "@babel/plugin-proposal-class-properties" "^7.13.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.13.8" - "@babel/plugin-proposal-optional-chaining" "^7.13.12" - "@babel/plugin-transform-modules-commonjs" "^7.13.8" - "@babel/preset-flow" "^7.13.13" - "@babel/preset-typescript" "^7.13.0" - "@babel/register" "^7.13.16" - babel-core "^7.0.0-bridge.0" - chalk "^4.1.2" - flow-parser "0.*" - graceful-fs "^4.2.4" - micromatch "^4.0.4" +jscodeshift@^17.0.0: + version "17.1.2" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-17.1.2.tgz#d77e9d3d08fdbb1548818bc22f653aba7fc21a25" + integrity sha512-uime4vFOiZ1o3ICT4Sm/AbItHEVw2oCxQ3a0egYVy3JMMOctxe07H3SKL1v175YqjMt27jn1N+3+Bj9SKDNgdQ== + dependencies: + "@babel/core" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/plugin-transform-class-properties" "^7.24.7" + "@babel/plugin-transform-modules-commonjs" "^7.24.7" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.24.7" + "@babel/plugin-transform-optional-chaining" "^7.24.7" + "@babel/plugin-transform-private-methods" "^7.24.7" + "@babel/preset-flow" "^7.24.7" + "@babel/preset-typescript" "^7.24.7" + "@babel/register" "^7.24.6" + flow-parser "0.*" + graceful-fs "^4.2.4" + micromatch "^4.0.7" neo-async "^2.5.0" - node-dir "^0.1.17" - recast "^0.21.0" - temp "^0.8.4" - write-file-atomic "^2.3.0" + picocolors "^1.0.1" + recast "^0.23.9" + tmp "^0.2.3" + write-file-atomic "^5.0.1" jsdom@^20.0.0: version "20.0.1" @@ -8289,6 +7891,14 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lighthouse-logger@^1.0.0: + version "1.4.2" + resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz#aef90f9e97cd81db367c7634292ee22079280aaa" + integrity sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g== + dependencies: + debug "^2.6.9" + marky "^1.2.2" + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -8309,13 +7919,6 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - locate-path@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" @@ -8433,14 +8036,6 @@ lodash@4.17.21, lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - log-symbols@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-6.0.0.tgz#bb95e5f05322651cac30c0feb6404f9f2a8a9439" @@ -8449,16 +8044,7 @@ log-symbols@^6.0.0: chalk "^5.3.0" is-unicode-supported "^1.3.0" -logkitty@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/logkitty/-/logkitty-0.7.1.tgz#8e8d62f4085a826e8d38987722570234e33c6aa7" - integrity sha512-/3ER20CTTbahrCrpYfPn7Xavv9diBROZpoXGVZDWMw4b/X4uuUwAC0ki85tgsdMRONURyIJbcOvS94QsUBYPbQ== - dependencies: - ansi-fragments "^0.2.1" - dayjs "^1.8.15" - yargs "^15.1.0" - -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -8526,6 +8112,11 @@ marked@15.0.6: resolved "https://registry.yarnpkg.com/marked/-/marked-15.0.6.tgz#8165f16afb6f4b30a35bdcee657c3b8415820a8f" integrity sha512-Y07CUOE+HQXbVDCGl3LXggqJDbXDP2pArc2C1N1RRMN0ONiShoSsIInMd5Gsxupe7fKLpgimTV+HOJ9r7bA+pg== +marky@^1.2.2: + version "1.2.5" + resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.5.tgz#55796b688cbd72390d2d399eaaf1832c9413e3c0" + integrity sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q== + mathjs@^13.1.1: version "13.1.1" resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-13.1.1.tgz#72318c390ec3314e817b584a80152f6f10d7405d" @@ -8578,15 +8169,6 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -metro-babel-transformer@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.76.8.tgz#5efd1027353b36b73706164ef09c290dceac096a" - integrity sha512-Hh6PW34Ug/nShlBGxkwQJSgPGAzSJ9FwQXhUImkzdsDgVu6zj5bx258J8cJVSandjNoQ8nbaHK6CaHlnbZKbyA== - dependencies: - "@babel/core" "^7.20.0" - hermes-parser "0.12.0" - nullthrows "^1.1.1" - metro-babel-transformer@0.80.11: version "0.80.11" resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.80.11.tgz#a604e83f4cf62a85ca68a980788c0d0fb16519a0" @@ -8597,10 +8179,15 @@ metro-babel-transformer@0.80.11: hermes-parser "0.23.1" nullthrows "^1.1.1" -metro-cache-key@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.76.8.tgz#8a0a5e991c06f56fcc584acadacb313c312bdc16" - integrity sha512-buKQ5xentPig9G6T37Ww/R/bC+/V1MA5xU/D8zjnhlelsrPG6w6LtHUS61ID3zZcMZqYaELWk5UIadIdDsaaLw== +metro-babel-transformer@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.81.1.tgz#1fb74c8e136c4aadd0a410ff81579ae3e31dc1bd" + integrity sha512-JECKDrQaUnDmj0x/Q/c8c5YwsatVx38Lu+BfCwX9fR8bWipAzkvJocBpq5rOAJRDXRgDcPv2VO4Q4nFYrpYNQg== + dependencies: + "@babel/core" "^7.25.2" + flow-enums-runtime "^0.0.6" + hermes-parser "0.25.1" + nullthrows "^1.1.1" metro-cache-key@0.80.11: version "0.80.11" @@ -8609,13 +8196,12 @@ metro-cache-key@0.80.11: dependencies: flow-enums-runtime "^0.0.6" -metro-cache@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.76.8.tgz#296c1c189db2053b89735a8f33dbe82575f53661" - integrity sha512-QBJSJIVNH7Hc/Yo6br/U/qQDUpiUdRgZ2ZBJmvAbmAKp2XDzsapnMwK/3BGj8JNWJF7OLrqrYHsRsukSbUBpvQ== +metro-cache-key@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.81.1.tgz#6bc3dd54f36355c9ac333e4b4242902be21d8f4b" + integrity sha512-5fDaHR1yTvpaQuwMAeEoZGsVyvjrkw9IFAS7WixSPvaNY5YfleqoJICPc6hbXFJjvwCCpwmIYFkjqzR/qJ6yqA== dependencies: - metro-core "0.76.8" - rimraf "^3.0.2" + flow-enums-runtime "^0.0.6" metro-cache@0.80.11: version "0.80.11" @@ -8626,18 +8212,14 @@ metro-cache@0.80.11: flow-enums-runtime "^0.0.6" metro-core "0.80.11" -metro-config@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.76.8.tgz#20bd5397fcc6096f98d2a813a7cecb38b8af062d" - integrity sha512-SL1lfKB0qGHALcAk2zBqVgQZpazDYvYFGwCK1ikz0S6Y/CM2i2/HwuZN31kpX6z3mqjv/6KvlzaKoTb1otuSAA== +metro-cache@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.81.1.tgz#052bb51a4c5863dca6b544b5b5a7dad936e53e8b" + integrity sha512-Uqcmn6sZ+Y0VJHM88VrG5xCvSeU7RnuvmjPmSOpEcyJJBe02QkfHL05MX2ZyGDTyZdbKCzaX0IijrTe4hN3F0Q== dependencies: - connect "^3.6.5" - cosmiconfig "^5.0.5" - jest-validate "^29.2.1" - metro "0.76.8" - metro-cache "0.76.8" - metro-core "0.76.8" - metro-runtime "0.76.8" + exponential-backoff "^3.1.1" + flow-enums-runtime "^0.0.6" + metro-core "0.81.1" metro-config@0.80.11, metro-config@^0.80.9: version "0.80.11" @@ -8653,13 +8235,19 @@ metro-config@0.80.11, metro-config@^0.80.9: metro-core "0.80.11" metro-runtime "0.80.11" -metro-core@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.76.8.tgz#917c8157c63406cb223522835abb8e7c6291dcad" - integrity sha512-sl2QLFI3d1b1XUUGxwzw/KbaXXU/bvFYrSKz6Sg19AdYGWFyzsgZ1VISRIDf+HWm4R/TJXluhWMEkEtZuqi3qA== +metro-config@0.81.1, metro-config@^0.81.0: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.81.1.tgz#0cb36bd2f59028658f404d41f9ecd23440f0c1e4" + integrity sha512-VAAJmxsKIZ+Fz5/z1LVgxa32gE6+2TvrDSSx45g85WoX4EtLmdBGP3DSlpQW3DqFUfNHJCGwMLGXpJnxifd08g== dependencies: - lodash.throttle "^4.1.1" - metro-resolver "0.76.8" + connect "^3.6.5" + cosmiconfig "^5.0.5" + flow-enums-runtime "^0.0.6" + jest-validate "^29.6.3" + metro "0.81.1" + metro-cache "0.81.1" + metro-core "0.81.1" + metro-runtime "0.81.1" metro-core@0.80.11: version "0.80.11" @@ -8670,25 +8258,14 @@ metro-core@0.80.11: lodash.throttle "^4.1.1" metro-resolver "0.80.11" -metro-file-map@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.76.8.tgz#a1db1185b6c316904ba6b53d628e5d1323991d79" - integrity sha512-A/xP1YNEVwO1SUV9/YYo6/Y1MmzhL4ZnVgcJC3VmHp/BYVOXVStzgVbWv2wILe56IIMkfXU+jpXrGKKYhFyHVw== +metro-core@0.81.1, metro-core@^0.81.0: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.81.1.tgz#a18892fc334df8304019e15371442120d76cf6ce" + integrity sha512-4d2/+02IYqOwJs4dmM0dC8hIZqTzgnx2nzN4GTCaXb3Dhtmi/SJ3v6744zZRnithhN4lxf8TTJSHnQV75M7SSA== dependencies: - anymatch "^3.0.3" - debug "^2.2.0" - fb-watchman "^2.0.0" - graceful-fs "^4.2.4" - invariant "^2.2.4" - jest-regex-util "^27.0.6" - jest-util "^27.2.0" - jest-worker "^27.2.0" - micromatch "^4.0.4" - node-abort-controller "^3.1.1" - nullthrows "^1.1.1" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.3.2" + flow-enums-runtime "^0.0.6" + lodash.throttle "^4.1.1" + metro-resolver "0.81.1" metro-file-map@0.80.11: version "0.80.11" @@ -8709,23 +8286,20 @@ metro-file-map@0.80.11: optionalDependencies: fsevents "^2.3.2" -metro-inspector-proxy@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.76.8.tgz#6b8678a7461b0b42f913a7881cc9319b4d3cddff" - integrity sha512-Us5o5UEd4Smgn1+TfHX4LvVPoWVo9VsVMn4Ldbk0g5CQx3Gu0ygc/ei2AKPGTwsOZmKxJeACj7yMH2kgxQP/iw== +metro-file-map@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.81.1.tgz#65be578045e14543d702585233fd42905cf6f0c6" + integrity sha512-aY72H2ujmRfFxcsbyh83JgqFF+uQ4HFN1VhV2FmcfQG4s1bGKf2Vbkk+vtZ1+EswcBwDZFbkpvAjN49oqwGzAA== dependencies: - connect "^3.6.5" debug "^2.2.0" - node-fetch "^2.2.0" - ws "^7.5.1" - yargs "^17.6.2" - -metro-minify-terser@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-minify-terser/-/metro-minify-terser-0.76.8.tgz#915ab4d1419257fc6a0b9fa15827b83fe69814bf" - integrity sha512-Orbvg18qXHCrSj1KbaeSDVYRy/gkro2PC7Fy2tDSH1c9RB4aH8tuMOIXnKJE+1SXxBtjWmQ5Yirwkth2DyyEZA== - dependencies: - terser "^5.15.0" + fb-watchman "^2.0.0" + flow-enums-runtime "^0.0.6" + graceful-fs "^4.2.4" + invariant "^2.2.4" + jest-worker "^29.6.3" + micromatch "^4.0.4" + nullthrows "^1.1.1" + walker "^1.0.7" metro-minify-terser@0.80.11: version "0.80.11" @@ -8735,57 +8309,13 @@ metro-minify-terser@0.80.11: flow-enums-runtime "^0.0.6" terser "^5.15.0" -metro-minify-uglify@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.76.8.tgz#74745045ea2dd29f8783db483b2fce58385ba695" - integrity sha512-6l8/bEvtVaTSuhG1FqS0+Mc8lZ3Bl4RI8SeRIifVLC21eeSDp4CEBUWSGjpFyUDfi6R5dXzYaFnSgMNyfxADiQ== - dependencies: - uglify-es "^3.1.9" - -metro-react-native-babel-preset@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.76.8.tgz#7476efae14363cbdfeeec403b4f01d7348e6c048" - integrity sha512-Ptza08GgqzxEdK8apYsjTx2S8WDUlS2ilBlu9DR1CUcHmg4g3kOkFylZroogVAUKtpYQNYwAvdsjmrSdDNtiAg== +metro-minify-terser@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-minify-terser/-/metro-minify-terser-0.81.1.tgz#693ea83713a7625065fa1bb9dae18db3dbfddab8" + integrity sha512-p/Qz3NNh1nebSqMlxlUALAnESo6heQrnvgHtAuxufRPtKvghnVDq9hGGex8H7z7YYLsqe42PWdt4JxTA3mgkvg== dependencies: - "@babel/core" "^7.20.0" - "@babel/plugin-proposal-async-generator-functions" "^7.0.0" - "@babel/plugin-proposal-class-properties" "^7.18.0" - "@babel/plugin-proposal-export-default-from" "^7.0.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.0" - "@babel/plugin-proposal-numeric-separator" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.20.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.0" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.18.0" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-syntax-optional-chaining" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.20.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.20.0" - "@babel/plugin-transform-flow-strip-types" "^7.20.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-react-jsx-self" "^7.0.0" - "@babel/plugin-transform-react-jsx-source" "^7.0.0" - "@babel/plugin-transform-runtime" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.5.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - "@babel/template" "^7.0.0" - babel-plugin-transform-flow-enums "^0.0.2" - react-refresh "^0.4.0" + flow-enums-runtime "^0.0.6" + terser "^5.15.0" metro-react-native-babel-preset@0.77.0: version "0.77.0" @@ -8832,22 +8362,6 @@ metro-react-native-babel-preset@0.77.0: babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.4.0" -metro-react-native-babel-transformer@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.76.8.tgz#c3a98e1f4cd5faf1e21eba8e004b94a90c4db69b" - integrity sha512-3h+LfS1WG1PAzhq8QF0kfXjxuXetbY/lgz8vYMQhgrMMp17WM1DNJD0gjx8tOGYbpbBC1qesJ45KMS4o5TA73A== - dependencies: - "@babel/core" "^7.20.0" - babel-preset-fbjs "^3.4.0" - hermes-parser "0.12.0" - metro-react-native-babel-preset "0.76.8" - nullthrows "^1.1.1" - -metro-resolver@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.76.8.tgz#0862755b9b84e26853978322464fb37c6fdad76d" - integrity sha512-KccOqc10vrzS7ZhG2NSnL2dh3uVydarB7nOhjreQ7C4zyWuiW9XpLC4h47KtGQv3Rnv/NDLJYeDqaJ4/+140HQ== - metro-resolver@0.80.11: version "0.80.11" resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.80.11.tgz#e9033bf581d14de296d62dc2da21173288fecd45" @@ -8855,13 +8369,12 @@ metro-resolver@0.80.11: dependencies: flow-enums-runtime "^0.0.6" -metro-runtime@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.76.8.tgz#74b2d301a2be5f3bbde91b8f1312106f8ffe50c3" - integrity sha512-XKahvB+iuYJSCr3QqCpROli4B4zASAYpkK+j3a0CJmokxCDNbgyI4Fp88uIL6rNaZfN0Mv35S0b99SdFXIfHjg== +metro-resolver@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.81.1.tgz#f76bfb7925951cd5ac38e34a4ec9b83cfc77ff93" + integrity sha512-E61t6fxRoYRkl6Zo3iUfCKW4DYfum/bLjcejXBMt1y3I7LFkK84TCR/Rs9OAwsMCY/7GOPB4+CREYZOtCC7CNA== dependencies: - "@babel/runtime" "^7.0.0" - react-refresh "^0.4.0" + flow-enums-runtime "^0.0.6" metro-runtime@0.80.11: version "0.80.11" @@ -8871,19 +8384,13 @@ metro-runtime@0.80.11: "@babel/runtime" "^7.25.0" flow-enums-runtime "^0.0.6" -metro-source-map@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.76.8.tgz#f085800152a6ba0b41ca26833874d31ec36c5a53" - integrity sha512-Hh0ncPsHPVf6wXQSqJqB3K9Zbudht4aUtNpNXYXSxH+pteWqGAXnjtPsRAnCsCWl38wL0jYF0rJDdMajUI3BDw== +metro-runtime@0.81.1, metro-runtime@^0.81.0: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.81.1.tgz#a3a23c3c47e02115f8e6d1e10f19d8214eb845fd" + integrity sha512-pqu5j5d01rjF85V/K8SDDJ0NR3dRp6bE3z5bKVVb5O2Rx0nbR9KreUxYALQCRCcQHaYySqCg5fYbGKBHC295YQ== dependencies: - "@babel/traverse" "^7.20.0" - "@babel/types" "^7.20.0" - invariant "^2.2.4" - metro-symbolicate "0.76.8" - nullthrows "^1.1.1" - ob1 "0.76.8" - source-map "^0.5.6" - vlq "^1.0.0" + "@babel/runtime" "^7.25.0" + flow-enums-runtime "^0.0.6" metro-source-map@0.80.11: version "0.80.11" @@ -8900,16 +8407,20 @@ metro-source-map@0.80.11: source-map "^0.5.6" vlq "^1.0.0" -metro-symbolicate@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.76.8.tgz#f102ac1a306d51597ecc8fdf961c0a88bddbca03" - integrity sha512-LrRL3uy2VkzrIXVlxoPtqb40J6Bf1mlPNmUQewipc3qfKKFgtPHBackqDy1YL0njDsWopCKcfGtFYLn0PTUn3w== +metro-source-map@0.81.1, metro-source-map@^0.81.0: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.81.1.tgz#75632ebe66014e4e1a23e0f669ebbf0c737b59cd" + integrity sha512-1i8ROpNNiga43F0ZixAXoFE/SS3RqcRDCCslpynb+ytym0VI7pkTH1woAN2HI9pczYtPrp3Nq0AjRpsuY35ieA== dependencies: + "@babel/traverse" "^7.25.3" + "@babel/traverse--for-generate-function-map" "npm:@babel/traverse@^7.25.3" + "@babel/types" "^7.25.2" + flow-enums-runtime "^0.0.6" invariant "^2.2.4" - metro-source-map "0.76.8" + metro-symbolicate "0.81.1" nullthrows "^1.1.1" + ob1 "0.81.1" source-map "^0.5.6" - through2 "^2.0.1" vlq "^1.0.0" metro-symbolicate@0.80.11: @@ -8925,16 +8436,17 @@ metro-symbolicate@0.80.11: through2 "^2.0.1" vlq "^1.0.0" -metro-transform-plugins@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.76.8.tgz#d77c28a6547a8e3b72250f740fcfbd7f5408f8ba" - integrity sha512-PlkGTQNqS51Bx4vuufSQCdSn2R2rt7korzngo+b5GCkeX5pjinPjnO2kNhQ8l+5bO0iUD/WZ9nsM2PGGKIkWFA== +metro-symbolicate@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.81.1.tgz#f3e16182e51093ddf12bfda9c2bdd4c5512bc7f5" + integrity sha512-Lgk0qjEigtFtsM7C0miXITbcV47E1ZYIfB+m/hCraihiwRWkNUQEPCWvqZmwXKSwVE5mXA0EzQtghAvQSjZDxw== dependencies: - "@babel/core" "^7.20.0" - "@babel/generator" "^7.20.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.20.0" + flow-enums-runtime "^0.0.6" + invariant "^2.2.4" + metro-source-map "0.81.1" nullthrows "^1.1.1" + source-map "^0.5.6" + vlq "^1.0.0" metro-transform-plugins@0.80.11: version "0.80.11" @@ -8948,22 +8460,16 @@ metro-transform-plugins@0.80.11: flow-enums-runtime "^0.0.6" nullthrows "^1.1.1" -metro-transform-worker@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.76.8.tgz#b9012a196cee205170d0c899b8b175b9305acdea" - integrity sha512-mE1fxVAnJKmwwJyDtThildxxos9+DGs9+vTrx2ktSFMEVTtXS/bIv2W6hux1pqivqAfyJpTeACXHk5u2DgGvIQ== +metro-transform-plugins@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.81.1.tgz#2a3fe93b65d0536f7fef0a388cddbab1e1511a06" + integrity sha512-7L1lI44/CyjIoBaORhY9fVkoNe8hrzgxjSCQ/lQlcfrV31cZb7u0RGOQrKmUX7Bw4FpejrB70ArQ7Mse9mk7+Q== dependencies: - "@babel/core" "^7.20.0" - "@babel/generator" "^7.20.0" - "@babel/parser" "^7.20.0" - "@babel/types" "^7.20.0" - babel-preset-fbjs "^3.4.0" - metro "0.76.8" - metro-babel-transformer "0.76.8" - metro-cache "0.76.8" - metro-cache-key "0.76.8" - metro-source-map "0.76.8" - metro-transform-plugins "0.76.8" + "@babel/core" "^7.25.2" + "@babel/generator" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.3" + flow-enums-runtime "^0.0.6" nullthrows "^1.1.1" metro-transform-worker@0.80.11: @@ -8985,59 +8491,24 @@ metro-transform-worker@0.80.11: metro-transform-plugins "0.80.11" nullthrows "^1.1.1" -metro@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro/-/metro-0.76.8.tgz#ba526808b99977ca3f9ac5a7432fd02a340d13a6" - integrity sha512-oQA3gLzrrYv3qKtuWArMgHPbHu8odZOD9AoavrqSFllkPgOtmkBvNNDLCELqv5SjBfqjISNffypg+5UGG3y0pg== +metro-transform-worker@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.81.1.tgz#806cc3e5ff0338162eeba3c4d62abc0f587efb83" + integrity sha512-M+2hVT3rEy5K7PBmGDgQNq3Zx53TjScOcO/CieyLnCRFtBGWZiSJ2+bLAXXOKyKa/y3bI3i0owxtyxuPGDwbZg== dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/core" "^7.20.0" - "@babel/generator" "^7.20.0" - "@babel/parser" "^7.20.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.20.0" - "@babel/types" "^7.20.0" - accepts "^1.3.7" - async "^3.2.2" - chalk "^4.0.0" - ci-info "^2.0.0" - connect "^3.6.5" - debug "^2.2.0" - denodeify "^1.2.1" - error-stack-parser "^2.0.6" - graceful-fs "^4.2.4" - hermes-parser "0.12.0" - image-size "^1.0.2" - invariant "^2.2.4" - jest-worker "^27.2.0" - jsc-safe-url "^0.2.2" - lodash.throttle "^4.1.1" - metro-babel-transformer "0.76.8" - metro-cache "0.76.8" - metro-cache-key "0.76.8" - metro-config "0.76.8" - metro-core "0.76.8" - metro-file-map "0.76.8" - metro-inspector-proxy "0.76.8" - metro-minify-terser "0.76.8" - metro-minify-uglify "0.76.8" - metro-react-native-babel-preset "0.76.8" - metro-resolver "0.76.8" - metro-runtime "0.76.8" - metro-source-map "0.76.8" - metro-symbolicate "0.76.8" - metro-transform-plugins "0.76.8" - metro-transform-worker "0.76.8" - mime-types "^2.1.27" - node-fetch "^2.2.0" + "@babel/core" "^7.25.2" + "@babel/generator" "^7.25.0" + "@babel/parser" "^7.25.3" + "@babel/types" "^7.25.2" + flow-enums-runtime "^0.0.6" + metro "0.81.1" + metro-babel-transformer "0.81.1" + metro-cache "0.81.1" + metro-cache-key "0.81.1" + metro-minify-terser "0.81.1" + metro-source-map "0.81.1" + metro-transform-plugins "0.81.1" nullthrows "^1.1.1" - rimraf "^3.0.2" - serialize-error "^2.1.0" - source-map "^0.5.6" - strip-ansi "^6.0.0" - throat "^5.0.0" - ws "^7.5.1" - yargs "^17.6.2" metro@0.80.11: version "0.80.11" @@ -9087,7 +8558,53 @@ metro@0.80.11: ws "^7.5.10" yargs "^17.6.2" -micromatch@^4.0.4: +metro@0.81.1, metro@^0.81.0: + version "0.81.1" + resolved "https://registry.yarnpkg.com/metro/-/metro-0.81.1.tgz#d9ae427f0fea14384222fe8924059bcd4be611da" + integrity sha512-fqRu4fg8ONW7VfqWFMGgKAcOuMzyoQah2azv9Y3VyFXAmG+AoTU6YIFWqAADESCGVWuWEIvxTJhMf3jxU6jwjA== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/core" "^7.25.2" + "@babel/generator" "^7.25.0" + "@babel/parser" "^7.25.3" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.3" + "@babel/types" "^7.25.2" + accepts "^1.3.7" + chalk "^4.0.0" + ci-info "^2.0.0" + connect "^3.6.5" + debug "^2.2.0" + error-stack-parser "^2.0.6" + flow-enums-runtime "^0.0.6" + graceful-fs "^4.2.4" + hermes-parser "0.25.1" + image-size "^1.0.2" + invariant "^2.2.4" + jest-worker "^29.6.3" + jsc-safe-url "^0.2.2" + lodash.throttle "^4.1.1" + metro-babel-transformer "0.81.1" + metro-cache "0.81.1" + metro-cache-key "0.81.1" + metro-config "0.81.1" + metro-core "0.81.1" + metro-file-map "0.81.1" + metro-resolver "0.81.1" + metro-runtime "0.81.1" + metro-source-map "0.81.1" + metro-symbolicate "0.81.1" + metro-transform-plugins "0.81.1" + metro-transform-worker "0.81.1" + mime-types "^2.1.27" + nullthrows "^1.1.1" + serialize-error "^2.1.0" + source-map "^0.5.6" + throat "^5.0.0" + ws "^7.5.10" + yargs "^17.6.2" + +micromatch@^4.0.4, micromatch@^4.0.7: version "4.0.8" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== @@ -9095,7 +8612,7 @@ micromatch@^4.0.4: braces "^3.0.3" picomatch "^2.3.1" -mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": +mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -9112,11 +8629,6 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.4.1: - version "2.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" - integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -9137,7 +8649,7 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.1: +minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -9158,7 +8670,7 @@ minimatch@^8.0.2: dependencies: brace-expansion "^2.0.1" -minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.5: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== @@ -9178,12 +8690,10 @@ minipass@^4.2.4: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -mkdirp@^0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== ms@2.0.0: version "2.0.0" @@ -9232,11 +8742,6 @@ new-github-release-url@2.0.0: dependencies: type-fest "^2.5.1" -nocache@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/nocache/-/nocache-3.0.4.tgz#5b37a56ec6e09fc7d401dceaed2eab40c8bfdf79" - integrity sha512-WDD0bdg9mbq6F4mRxEYcPWwfA1vxd0mrvKOyxI7Xj/atfRHVeutzuWByG//jfm4uPzp0y4Kj051EORCBSQMycw== - node-abort-controller@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.1.1.tgz#a94377e964a9a37ac3976d848cb5c765833b8548" @@ -9247,20 +8752,18 @@ node-cleanup@^2.1.2: resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" integrity sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw== -node-dir@^0.1.17: - version "0.1.17" - resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" - integrity sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg== - dependencies: - minimatch "^3.0.2" - -node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.7: +node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== dependencies: whatwg-url "^5.0.0" +node-forge@^1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -9281,11 +8784,6 @@ node-releases@^2.0.6: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== -node-stream-zip@^1.9.1: - version "1.15.0" - resolved "https://registry.yarnpkg.com/node-stream-zip/-/node-stream-zip-1.15.0.tgz#158adb88ed8004c6c49a396b50a6a5de3bca33ea" - integrity sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw== - normalize-package-data@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-6.0.0.tgz#68a96b3c11edd462af7189c837b6b1064a484196" @@ -9340,11 +8838,6 @@ nwsapi@^2.2.2: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.2.tgz#e5418863e7905df67d51ec95938d67bf801f0bb0" integrity sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw== -ob1@0.76.8: - version "0.76.8" - resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.76.8.tgz#ac4c459465b1c0e2c29aaa527e09fc463d3ffec8" - integrity sha512-dlBkJJV5M/msj9KYA9upc+nUWVwuOFFTbu28X6kZeGwcuW+JxaHSBZ70SYQnk5M+j5JbNLR6yKHmgW4M5E7X5g== - ob1@0.80.11: version "0.80.11" resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.80.11.tgz#c1dd4d7825f94c9c51c94f0b02e88e828a2ce0d8" @@ -9352,6 +8845,13 @@ ob1@0.80.11: dependencies: flow-enums-runtime "^0.0.6" +ob1@0.81.1: + version "0.81.1" + resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.81.1.tgz#83cdbb68bc2baa6b2e1a29672daa10ac2341ccc3" + integrity sha512-1PEbvI+AFvOcgdNcO79FtDI1TUO8S3lhiKOyAiyWQF3sFDDKS+aw2/BZvGlArFnSmqckwOOB9chQuIX0/OahoQ== + dependencies: + flow-enums-runtime "^0.0.6" + object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -9391,11 +8891,6 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -on-headers@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -9434,12 +8929,13 @@ open@10.1.0: is-inside-container "^1.0.0" is-wsl "^3.1.0" -open@^6.2.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" - integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== +open@^7.0.3: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== dependencies: - is-wsl "^1.1.0" + is-docker "^2.0.0" + is-wsl "^2.1.1" optionator@^0.8.1: version "0.8.3" @@ -9468,21 +8964,6 @@ ora@8.1.1: string-width "^7.2.0" strip-ansi "^7.1.0" -ora@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" - integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== - dependencies: - bl "^4.1.0" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-spinners "^2.5.0" - is-interactive "^1.0.0" - is-unicode-supported "^0.1.0" - log-symbols "^4.1.0" - strip-ansi "^6.0.0" - wcwidth "^1.0.1" - os-name@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-6.0.0.tgz#9b891a5339d516420683aabdc31f4cc1a9c6aa31" @@ -9508,7 +8989,7 @@ p-limit@^2.0.0, p-limit@^2.1.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2, p-limit@^3.1.0: +p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -9536,13 +9017,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - p-locate@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" @@ -9769,11 +9243,16 @@ pinpoint@^1.1.0: resolved "https://registry.yarnpkg.com/pinpoint/-/pinpoint-1.1.0.tgz#0cf7757a6977f1bf7f6a32207b709e377388e874" integrity sha512-+04FTD9x7Cls2rihLlo57QDCcHoLBGn5Dk51SwtFBWkUWLxZaBXyNVpCw1S+atvE7GmnFjeaRZ0WLq3UYuqAdg== -pirates@^4.0.4, pirates@^4.0.5: +pirates@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== +pirates@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -9810,16 +9289,6 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== -pretty-format@^26.5.2, pretty-format@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" - integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== - dependencies: - "@jest/types" "^26.6.2" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^17.0.1" - pretty-format@^29.0.0, pretty-format@^29.0.3, pretty-format@^29.1.2: version "29.1.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.1.2.tgz#b1f6b75be7d699be1a051f5da36e8ae9e76a8e6a" @@ -9829,15 +9298,6 @@ pretty-format@^29.0.0, pretty-format@^29.0.3, pretty-format@^29.1.2: ansi-styles "^5.0.0" react-is "^18.0.0" -pretty-format@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.5.0.tgz#283134e74f70e2e3e7229336de0e4fce94ccde5a" - integrity sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw== - dependencies: - "@jest/schemas" "^29.4.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" - pretty-format@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" @@ -9874,7 +9334,7 @@ promise@^8.3.0: dependencies: asap "~2.0.6" -prompts@^2.0.1, prompts@^2.4.0, prompts@^2.4.2: +prompts@^2.0.1, prompts@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== @@ -9882,15 +9342,6 @@ prompts@^2.0.1, prompts@^2.4.0, prompts@^2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@*: - version "15.8.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" @@ -9989,10 +9440,10 @@ rc@1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-devtools-core@^4.27.2: - version "4.28.4" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.4.tgz#fb8183eada77093f4c2f9830e664bf22255abe27" - integrity sha512-IUZKLv3CimeM07G3vX4H4loxVpByrzq3HvfTX7v9migalwvLs9ZY5D3S3pKR33U+GguYfBBdMMZyToFhsSE/iQ== +react-devtools-core@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-6.1.0.tgz#d6398a57dad7a1bc65ed84dceb423b3212200335" + integrity sha512-sA8gF/pUhjoGAN3s1Ya43h+F4Q0z7cv9RgqbUfhP7bJI0MbqeshLYFb6hiHgZorovGr8AXqhLi22eQ7V3pru/Q== dependencies: shell-quote "^1.6.1" ws "^7" @@ -10002,16 +9453,6 @@ react-devtools-core@^4.27.2: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-is@^16.13.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -react-is@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" - integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== - react-is@^18.3.1: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" @@ -10059,48 +9500,54 @@ react-native-svg@15.11.1: css-tree "^1.1.3" warn-once "0.1.1" -react-native@0.72.6: - version "0.72.6" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.72.6.tgz#9f8d090694907e2f83af22e115cc0e4a3d5fa626" - integrity sha512-RafPY2gM7mcrFySS8TL8x+TIO3q7oAlHpzEmC7Im6pmXni6n1AuufGaVh0Narbr1daxstw7yW7T9BKW5dpVc2A== - dependencies: - "@jest/create-cache-key-function" "^29.2.1" - "@react-native-community/cli" "11.3.7" - "@react-native-community/cli-platform-android" "11.3.7" - "@react-native-community/cli-platform-ios" "11.3.7" - "@react-native/assets-registry" "^0.72.0" - "@react-native/codegen" "^0.72.7" - "@react-native/gradle-plugin" "^0.72.11" - "@react-native/js-polyfills" "^0.72.1" - "@react-native/normalize-colors" "^0.72.0" - "@react-native/virtualized-lists" "^0.72.8" +react-native@0.77.0: + version "0.77.0" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.77.0.tgz#ef194e6305cefde43d7ba5d242ceb9a1fddf9578" + integrity sha512-oCgHLGHFIp6F5UbyHSedyUXrZg6/GPe727freGFvlT7BjPJ3K6yvvdlsp7OEXSAHz6Fe7BI2n5cpUyqmP9Zn+Q== + dependencies: + "@jest/create-cache-key-function" "^29.6.3" + "@react-native/assets-registry" "0.77.0" + "@react-native/codegen" "0.77.0" + "@react-native/community-cli-plugin" "0.77.0" + "@react-native/gradle-plugin" "0.77.0" + "@react-native/js-polyfills" "0.77.0" + "@react-native/normalize-colors" "0.77.0" + "@react-native/virtualized-lists" "0.77.0" abort-controller "^3.0.0" anser "^1.4.9" - base64-js "^1.1.2" - deprecated-react-native-prop-types "4.1.0" + ansi-regex "^5.0.0" + babel-jest "^29.7.0" + babel-plugin-syntax-hermes-parser "0.25.1" + base64-js "^1.5.1" + chalk "^4.0.0" + commander "^12.0.0" event-target-shim "^5.0.1" - flow-enums-runtime "^0.0.5" + flow-enums-runtime "^0.0.6" + glob "^7.1.1" invariant "^2.2.4" - jest-environment-node "^29.2.1" + jest-environment-node "^29.6.3" jsc-android "^250231.0.0" memoize-one "^5.0.0" - metro-runtime "0.76.8" - metro-source-map "0.76.8" - mkdirp "^0.5.1" + metro-runtime "^0.81.0" + metro-source-map "^0.81.0" nullthrows "^1.1.1" - pretty-format "^26.5.2" + pretty-format "^29.7.0" promise "^8.3.0" - react-devtools-core "^4.27.2" - react-refresh "^0.4.0" - react-shallow-renderer "^16.15.0" + react-devtools-core "^6.0.1" + react-refresh "^0.14.0" regenerator-runtime "^0.13.2" scheduler "0.24.0-canary-efb381bbf-20230505" + semver "^7.1.3" stacktrace-parser "^0.1.10" - use-sync-external-store "^1.0.0" whatwg-fetch "^3.0.0" - ws "^6.2.2" + ws "^6.2.3" yargs "^17.6.2" +react-refresh@^0.14.0: + version "0.14.2" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9" + integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== + react-refresh@^0.4.0: version "0.4.3" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.3.tgz#966f1750c191672e76e16c2efa569150cc73ab53" @@ -10150,7 +9597,7 @@ read-pkg@^9.0.0: type-fest "^4.6.0" unicorn-magic "^0.1.0" -readable-stream@^3.0.2, readable-stream@^3.4.0: +readable-stream@^3.0.2: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -10193,14 +9640,15 @@ reassure@1.3.2: "@callstack/reassure-measure" "1.3.2" import-local "^3.2.0" -recast@^0.21.0: - version "0.21.5" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.21.5.tgz#e8cd22bb51bcd6130e54f87955d33a2b2e57b495" - integrity sha512-hjMmLaUXAm1hIuTqOdeYObMslq/q+Xff6QE3Y2P+uoHAg2nmVlLBps2hzh1UJDdMtDTMXOFewK6ky51JQIeECg== +recast@^0.23.9: + version "0.23.9" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.23.9.tgz#587c5d3a77c2cfcb0c18ccce6da4361528c2587b" + integrity sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q== dependencies: - ast-types "0.15.2" + ast-types "^0.16.1" esprima "~4.0.0" source-map "~0.6.1" + tiny-invariant "^1.3.3" tslib "^2.0.1" rechoir@^0.6.2: @@ -10374,11 +9822,6 @@ require-from-string@^2.0.2: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -10434,14 +9877,6 @@ resolve@^1.22.8: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - restore-cursor@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-5.1.0.tgz#0766d95699efacb14150993f55baf0953ea1ebe7" @@ -10472,13 +9907,6 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -rimraf@~2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - run-applescript@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb" @@ -10503,16 +9931,16 @@ rxjs@^7.8.1: dependencies: tslib "^2.1.0" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - safe-buffer@^5.0.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -10544,6 +9972,14 @@ seedrandom@^3.0.5: resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== +selfsigned@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.4.1.tgz#560d90565442a3ed35b674034cec4e95dceb4ae0" + integrity sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== + dependencies: + "@types/node-forge" "^1.3.0" + node-forge "^1" + semver@7.6.3, semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" @@ -10559,6 +9995,11 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== +semver@^7.1.3: + version "7.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.0.tgz#9c6fe61d0c6f9fa9e26575162ee5a9180361b09c" + integrity sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ== + semver@^7.3.5, semver@^7.3.8, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" @@ -10597,7 +10038,7 @@ serialize-error@^2.1.0: resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a" integrity sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw== -serve-static@^1.13.1: +serve-static@^1.16.2: version "1.16.2" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== @@ -10607,11 +10048,6 @@ serve-static@^1.13.1: parseurl "~1.3.3" send "0.19.0" -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - set-function-length@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.1.tgz#47cc5945f2c771e2cf261c6737cf9684a2a5e425" @@ -10648,7 +10084,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@^1.6.1, shell-quote@^1.7.3: +shell-quote@^1.6.1: version "1.7.3" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123" integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== @@ -10677,7 +10113,7 @@ signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^4.1.0: +signal-exit@^4.0.1, signal-exit@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== @@ -10706,15 +10142,6 @@ slash@^5.1.0: resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce" integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg== -slice-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" - integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== - dependencies: - ansi-styles "^3.2.0" - astral-regex "^1.0.0" - is-fullwidth-code-point "^2.0.0" - smart-buffer@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" @@ -10763,11 +10190,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: - version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -10892,13 +10314,6 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^5.0.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -10950,21 +10365,11 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -strnum@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" - integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== - stubborn-fs@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/stubborn-fs/-/stubborn-fs-1.2.5.tgz#e5e244223166921ddf66ed5e062b6b3bf285bfd2" integrity sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g== -sudo-prompt@^9.0.0: - version "9.2.1" - resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz#77efb84309c9ca489527a4e749f287e6bdd52afd" - integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw== - supports-color@^5.0.0, supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -11009,13 +10414,6 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -temp@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2" - integrity sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg== - dependencies: - rimraf "~2.6.2" - terser@^5.15.0: version "5.16.6" resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.6.tgz#f6c7a14a378ee0630fbe3ac8d1f41b4681109533" @@ -11063,6 +10461,11 @@ tiny-emitter@^2.1.0: resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== +tiny-invariant@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127" + integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg== + tinyexec@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.0.tgz#ed60cfce19c17799d4a241e06b31b0ec2bee69e6" @@ -11075,6 +10478,11 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" +tmp@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -11181,14 +10589,6 @@ typescript@5.7.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== -uglify-es@^3.1.9: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" - integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ== - dependencies: - commander "~2.13.0" - source-map "~0.6.1" - uglify-js@^3.1.4: version "3.17.2" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.2.tgz#f55f668b9a64b213977ae688703b6bbb7ca861c6" @@ -11337,11 +10737,6 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" -use-sync-external-store@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" - integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== - util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -11369,11 +10764,6 @@ validate-npm-package-license@^3.0.4: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - vlq@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468" @@ -11398,13 +10788,6 @@ warn-once@0.1.1: resolved "https://registry.yarnpkg.com/warn-once/-/warn-once-0.1.1.tgz#952088f4fb56896e73fd4e6a3767272a3fccce43" integrity sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q== -wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== - dependencies: - defaults "^1.0.3" - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -11453,11 +10836,6 @@ when-exit@^2.1.1: resolved "https://registry.yarnpkg.com/when-exit/-/when-exit-2.1.3.tgz#5831cdbed8ad4984645da98c4a00d4ee3a3757e7" integrity sha512-uVieSTccFIr/SFQdFWN/fFaQYmV37OKtuaGphMAzi4DmmUlrvRBJW5WSLkHyjNQY/ePJMz3LoiX9R3yy1Su6Hw== -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== - which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -11526,15 +10904,6 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@^2.3.0: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - write-file-atomic@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" @@ -11543,14 +10912,22 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@^6.2.2: +write-file-atomic@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" + integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^4.0.1" + +ws@^6.2.3: version "6.2.3" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.3.tgz#ccc96e4add5fd6fedbc491903075c85c5a11d9ee" integrity sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA== dependencies: async-limiter "~1.0.0" -ws@^7, ws@^7.5.1, ws@^7.5.10: +ws@^7, ws@^7.5.10: version "7.5.10" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== @@ -11585,11 +10962,6 @@ xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" - integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" @@ -11605,41 +10977,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" - integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== - yargs-parser@21.1.1, yargs-parser@^21.0.0, yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs-parser@^18.1.2: - version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs@^15.1.0: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.2" - yargs@^17.0.0, yargs@^17.3.1, yargs@^17.5.1: version "17.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.0.tgz#e134900fc1f218bc230192bdec06a0a5f973e46c" From ea284e56d6cdf4fb617adfe59c2d5e05169fbde7 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sat, 1 Feb 2025 18:45:05 +0530 Subject: [PATCH 12/17] test: fix test runner issues --- babel.config.js | 2 +- package.json | 5 +- .../__snapshots__/Markdown.spec.tsx.snap | 324 ++-------- .../__snapshots__/Renderer.spec.ts.snap | 6 - yarn.lock | 596 ++---------------- 5 files changed, 103 insertions(+), 830 deletions(-) diff --git a/babel.config.js b/babel.config.js index 35427137..30526a88 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: ["module:metro-react-native-babel-preset"], + presets: ["module:@react-native/babel-preset"], }; diff --git a/package.json b/package.json index 7b2421d0..d24540d6 100644 --- a/package.json +++ b/package.json @@ -50,9 +50,11 @@ "@babel/core": "7.26.7", "@babel/helper-explode-assignable-expression": "7.18.6", "@babel/preset-env": "7.26.7", + "@babel/traverse": "7.26.7", "@biomejs/biome": "1.9.4", "@commitlint/config-conventional": "19.6.0", "@evilmartians/lefthook": "1.10.10", + "@react-native/babel-preset": "0.77.0", "@release-it/conventional-changelog": "10.0.0", "@testing-library/jest-native": "5.4.3", "@testing-library/react-native": "13.0.1", @@ -65,7 +67,6 @@ "husky": "9.1.7", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", - "metro-react-native-babel-preset": "0.77.0", "pod-install": "0.3.4", "postinstall-postinstall": "2.1.0", "react": "18.3.1", @@ -157,7 +158,7 @@ "github-slugger": "2.0.0", "html-entities": "2.5.2", "marked": "15.0.6", - "react-native-reanimated-table": "^0.0.2", + "react-native-reanimated-table": "0.0.2", "svg-parser": "2.0.4" }, "engines": { diff --git a/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap b/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap index 59e061e9..99927076 100644 --- a/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap +++ b/src/lib/__tests__/__snapshots__/Markdown.spec.tsx.snap @@ -17,9 +17,6 @@ exports[`Blockquotes Blockquote 1`] = ` Date: Sat, 1 Feb 2025 19:20:08 +0530 Subject: [PATCH 13/17] chore: remove dep @babel/traverse --- package.json | 1 - yarn.lock | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index d24540d6..0c0caa42 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "@babel/core": "7.26.7", "@babel/helper-explode-assignable-expression": "7.18.6", "@babel/preset-env": "7.26.7", - "@babel/traverse": "7.26.7", "@biomejs/biome": "1.9.4", "@commitlint/config-conventional": "19.6.0", "@evilmartians/lefthook": "1.10.10", diff --git a/yarn.lock b/yarn.lock index 463f8fc9..e2a44520 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2396,19 +2396,6 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/traverse@7.26.7", "@babel/traverse@^7.26.7": - version "7.26.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.7.tgz#99a0a136f6a75e7fb8b0a1ace421e0b25994b8bb" - integrity sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA== - dependencies: - "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.5" - "@babel/parser" "^7.26.7" - "@babel/template" "^7.25.9" - "@babel/types" "^7.26.7" - debug "^4.3.1" - globals "^11.1.0" - "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.3", "@babel/traverse@^7.20.0", "@babel/traverse@^7.20.1", "@babel/traverse@^7.20.5": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" @@ -2464,6 +2451,19 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.26.7": + version "7.26.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.7.tgz#99a0a136f6a75e7fb8b0a1ace421e0b25994b8bb" + integrity sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.5" + "@babel/parser" "^7.26.7" + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.7" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.19.3", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.3.tgz#fc420e6bbe54880bce6779ffaf315f5e43ec9624" From 8d2b89d8499dcc9bde83dab8d1bbd8bf6875e5ca Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sun, 2 Feb 2025 13:31:30 +0530 Subject: [PATCH 14/17] docs: update readme --- README.md | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1f2c4ad8..f9dfc3cb 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,16 @@ Markdown renderer for React Native powered by ## Installation +#### For React Native 0.76 and above, please use the latest version. ```sh yarn add react-native-marked react-native-svg ``` +#### For React Native 0.75 and below, please use version 6. +```sh +yarn add react-native-marked@6.0.7 react-native-svg +``` + ## Usage ### Using Component @@ -206,41 +212,28 @@ import React, { ReactNode } from "react"; import Markdown, { Renderer, MarkedTokenizer, MarkedLexer } from "react-native-marked"; import type { RendererInterface, CustomToken } from "react-native-marked"; -class CustomTokenizer extends MarkedTokenizer { - // Override - codespan(this: MarkedTokenizer, src: string) { +class CustomTokenizer extends Tokenizer { + codespan(src: string): Tokens.Codespan | undefined { const match = src.match(/^\$+([^\$\n]+?)\$+/); if (match?.[1]) { - const text = match[1].trim(); - const token: CustomToken = { - type: 'custom', - raw: match[0], // should be the exact regex pattern match - identifier: "latex", // Uniq identifier for the token - tokens: MarkedLexer(text), // optional, can be used if the markdown contains children - args: { // optional, can be used to send more information to the renderer - text: text, - } + return { + type: "codespan", + raw: match[0], + text: match[1].trim(), }; - return token; } - return super.codespan(src) + return super.codespan(src); } } class CustomRenderer extends Renderer implements RendererInterface { - // Custom Token implementation - custom(identifier: string, _raw: string, _children?: ReactNode[], args?: Record): ReactNode { - const text = args?.text as string; - if (identifier === "latex") { - const styles = { - padding: 16, - minWidth: "100%", - backgroundColor: "#f6f8fa" - }; - return this.code(text.trim(), "latex", styles); - } - return null; + codespan(text: string, styles?: TextStyle): ReactNode { + return ( + + {text} + + ) } } From 060de6353bff65128e8c398c85b14b8ad6bbdf15 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Sun, 2 Feb 2025 13:50:21 +0530 Subject: [PATCH 15/17] docs: update readme and links --- README.md | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index f9dfc3cb..ec67c4ac 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,13 @@ export default ExampleComponent; #### [Props](https://github.com/gmsgowtham/react-native-marked/blob/main/src/lib/types.ts#L17) | Prop | Description | Type | Optional? | -| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- | +|---------------|----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------| | value | Markdown value | string | false | | flatListProps | Props for customizing the underlying FlatList used | `Omit, 'data' \| 'renderItem' \| 'horizontal'>`


(`'data'`, `'renderItem'`, and `'horizontal'` props are omitted and cannot be overridden.) | true | -| styles | Styles for parsed components | [MarkedStyles](https://github.com/gmsgowtham/react-native-marked/blob/main/src/theme/types.ts#L5) | true | -| theme | Props for customizing colors and spacing for all components,and it will get overridden with custom component style applied via 'styles' prop | [UserTheme](https://github.com/gmsgowtham/react-native-marked/blob/main/src/theme/types.ts#L28) | true | +| styles | Styles for parsed components | [MarkedStyles](src/theme/types.ts) | true | +| theme | Props for customizing colors and spacing for all components,and it will get overridden with custom component style applied via 'styles' prop | [UserTheme](src/theme/types.ts) | true | | baseUrl | A prefix url for any relative link | string | true | -| renderer | Custom component Renderer | [RendererInterface](https://github.com/gmsgowtham/react-native-marked/blob/main/src/lib/types.ts#L25) | true | +| renderer | Custom component Renderer | [RendererInterface](src/lib/types.ts) | true | ### Using hook @@ -82,19 +82,18 @@ const CustomComponent = () => { #### Options -| Option | Description | Type | Optional? | -| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------- | -| colorScheme | Device color scheme ("dark" or "light") | ColorSchemeName | false | -| styles | Styles for parsed components | [MarkedStyles](https://github.com/gmsgowtham/react-native-marked/blob/main/src/theme/types.ts#L5) | true | -| theme | Props for customizing colors and spacing for all components,and it will get overridden with custom component style applied via 'styles' prop | [UserTheme](https://github.com/gmsgowtham/react-native-marked/blob/main/src/theme/types.ts#L28) | true | -| baseUrl | A prefix url for any relative link | string | true | -| renderer | Custom component Renderer | [RendererInterface](https://github.com/gmsgowtham/react-native-marked/blob/main/src/lib/types.ts#L29) | true | -| tokenizer | Generate custom tokens | [MarkedTokenizer](https://github.com/gmsgowtham/react-native-marked/blob/main/src/lib/types.ts#L24) | true | +| Option | Description | Type | Optional? | +|-------------|----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|-----------| +| colorScheme | Device color scheme ("dark" or "light") | ColorSchemeName | false | +| styles | Styles for parsed components | [MarkedStyles](src/theme/types.ts) | true | +| theme | Props for customizing colors and spacing for all components,and it will get overridden with custom component style applied via 'styles' prop | [UserTheme](src/theme/types.ts) | true | +| baseUrl | A prefix url for any relative link | string | true | +| renderer | Custom component Renderer | [RendererInterface](src/lib/types.ts) | true | +| tokenizer | Generate custom tokens | [MarkedTokenizer](src/lib/types.ts) | true | ## Examples -- RN App: https://github.com/gmsgowtham/react-native-marked-test - CodeSandbox: https://codesandbox.io/s/react-native-marked-l2hpi3?file=/src/App.js ## Supported elements @@ -186,22 +185,12 @@ const ExampleComponentWithHook = () => { export default ExampleComponent; ``` -> Please refer to [RendererInterface](https://github.com/gmsgowtham/react-native-marked/blob/main/src/lib/types.ts#L2) for all the overrides +> Please refer to [RendererInterface](src/lib/types.ts) for all the overrides > Note: > > For `key` property for a component, you can use the `getKey` method from Renderer class. -### Using tokenizer with custom components - -Refer [marked](https://marked.js.org/using_pro#tokenizer) -> The tokenizer defines how to turn markdown text into tokens. If you supply a tokenizer object to the Marked options, it will be merged with the built-in tokenizer and any functions inside will override the default handling of that token type. - -------------- - -> The implementation requires you to return a token of type 'custom' (ref: [CustomToken](https://github.com/gmsgowtham/react-native-marked/blob/main/src/lib/types.ts#L83)) and the same needs to be implemented in the Renderer - - #### Example Overriding default codespan tokenizer to include LaTeX. @@ -259,7 +248,7 @@ const ExampleComponent = () => { ## Screenshots | Dark Theme | Light Theme | -| :-----------------------------------------------------------: | :--------------------------------------------------------------: | +|:-------------------------------------------------------------:|:----------------------------------------------------------------:| | ![Dark theme](assets/dark-theme-01.png?raw=true 'Dark Theme') | ![Light theme](assets/light-theme-01.png?raw=true 'Light Theme') | ## Contributing @@ -280,9 +269,11 @@ Made with - [Marked](https://marked.js.org/) - [@jsamr/react-native-li](https://github.com/jsamr/react-native-li) -- [react-native-table-component](https://github.com/Gil2015/react-native-table-component) +- [react-native-reanimated-table](https://github.com/dohooo/react-native-reanimated-table) - [react-native-svg](https://github.com/software-mansion/react-native-svg) - [svg-parser](https://github.com/Rich-Harris/svg-parser) +- [github-slugger](https://github.com/Flet/github-slugger) +- [html-entities](https://github.com/mdevils/html-entities) + - Buy Me A Coffee From a61d49bf464227dd2c97f1115e303c5825687077 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Tue, 4 Feb 2025 13:25:08 +0530 Subject: [PATCH 16/17] chore: fix format --- package.json | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 417884de..e9ae3b8b 100644 --- a/package.json +++ b/package.json @@ -35,11 +35,7 @@ "test:updateSnapshot": "jest --updateSnapshot", "reassure": "reassure" }, - "keywords": [ - "react-native", - "markdown", - "react-native markdown" - ], + "keywords": ["react-native", "markdown", "react-native markdown"], "repository": "https://github.com/gmsgowtham/react-native-marked", "author": "Gowtham G (https://github.com/gmsgowtham)", "license": "MIT", @@ -93,17 +89,13 @@ "/examples/*/node_modules", "/dist/" ], - "setupFilesAfterEnv": [ - "@testing-library/jest-native/extend-expect" - ], + "setupFilesAfterEnv": ["@testing-library/jest-native/extend-expect"], "transformIgnorePatterns": [ "node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|github-slugger)" ] }, "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ], + "extends": ["@commitlint/config-conventional"], "rules": { "type-enum": [ 2, From 4d11eeba9d30ed7f39a3548305adad9c8e4a38c4 Mon Sep 17 00:00:00 2001 From: Gowtham G Date: Tue, 4 Feb 2025 13:28:21 +0530 Subject: [PATCH 17/17] chore: release 7.0.0-alpha.0 --- package.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index e9ae3b8b..ae9ca725 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-marked", - "version": "6.0.7", + "version": "7.0.0-alpha.0", "description": "Markdown renderer for React Native powered by marked.js", "main": "dist/commonjs/index", "module": "dist/module/index", @@ -35,7 +35,11 @@ "test:updateSnapshot": "jest --updateSnapshot", "reassure": "reassure" }, - "keywords": ["react-native", "markdown", "react-native markdown"], + "keywords": [ + "react-native", + "markdown", + "react-native markdown" + ], "repository": "https://github.com/gmsgowtham/react-native-marked", "author": "Gowtham G (https://github.com/gmsgowtham)", "license": "MIT", @@ -89,13 +93,17 @@ "/examples/*/node_modules", "/dist/" ], - "setupFilesAfterEnv": ["@testing-library/jest-native/extend-expect"], + "setupFilesAfterEnv": [ + "@testing-library/jest-native/extend-expect" + ], "transformIgnorePatterns": [ "node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|github-slugger)" ] }, "commitlint": { - "extends": ["@commitlint/config-conventional"], + "extends": [ + "@commitlint/config-conventional" + ], "rules": { "type-enum": [ 2,