From 8d6beb8dc8aeeff45e5159892ab7fabd69ce2f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bego=C3=B1a=20=C3=81lvarez=20de=20la=20Cruz?= Date: Tue, 27 Jun 2023 15:18:28 +0200 Subject: [PATCH] feat: handle faqs with markdown (#22) * feat: handle faqs with markdown * refactor: improve code * feat: improve code * chore: make parseMarkdownToFaqs function a bit more generic * fix: last subsection not having description --------- Co-authored-by: Jean Carlo Noguera --- package.json | 3 +- src/global.d.ts | 5 + src/lib/constants/faq.constants.ts | 157 ----------------------------- src/lib/constants/index.ts | 1 - src/lib/markdown/faqs.md | 75 ++++++++++++++ src/lib/markdown/index.ts | 1 + src/lib/utils.ts | 69 +++++++++++++ src/sections/faq/faqs.svelte | 5 +- vite.config.js | 3 +- yarn.lock | 65 +++++++++++- 10 files changed, 220 insertions(+), 164 deletions(-) delete mode 100644 src/lib/constants/faq.constants.ts create mode 100644 src/lib/markdown/faqs.md create mode 100644 src/lib/markdown/index.ts diff --git a/package.json b/package.json index 4a802d9..e14f8c3 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,8 @@ "marked": "^4.2.5", "pino": "^8.14.1", "swiper": "^8.4.5", - "url-metadata": "^2.5.0" + "url-metadata": "^2.5.0", + "vite-plugin-markdown": "^2.1.0" }, "lint-staged": { "**/*.{js,ts,svelte,scss}": [ diff --git a/src/global.d.ts b/src/global.d.ts index 63908c6..ae03a5f 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -1 +1,6 @@ /// + +declare module "*.md" { + const html: string; + export { html }; +} diff --git a/src/lib/constants/faq.constants.ts b/src/lib/constants/faq.constants.ts deleted file mode 100644 index 2187754..0000000 --- a/src/lib/constants/faq.constants.ts +++ /dev/null @@ -1,157 +0,0 @@ -/* eslint-disable import/no-unresolved */ -/* eslint-disable max-len */ -/* eslint-disable jsdoc/require-jsdoc */ -import type { FaqSection } from "$lib/types/components"; - -const WHAT_IS_IMPACT = ` -- TLIP enables a transparent, efficient and cost-effective way of managing trade information across borders. It allows for trade processes to become paperless and fully digital. -- TLIP will create trust and visibility along the trade supply chains as actors can securely exchange information in a digital format. -- TLIP supports WTO’s Trade Facilitation Agreement and the ambition to make cross-border trade processes more efficient-both in terms of saved time and cost. -- The impact of TLIP is to make East African exports more competitive through building efficiencies around information generation, transmission and storage. TLIP will link the East African trading community to the global trade supply chain in a way that gives the region and its trading partners access to the critical information required to make informed decisions well in advance of the arrival of physical goods. -`; - -const WHY_WAS_INITIATED = ` -- International trade is an information-intensive process, involving hundreds of data points and multiple information exchanges between traders, transporters and border authorities. Most information exchanged throughout the journey of a single product is paper-based, making it unsustainable, expensive, slow, error-prone and inefficient. The TLIP project was initiated to tackle problems associated with paper-based information sharing and to increase the transparency, efficiency and sustainability of international trade. -- TLIP’s vision is to enhance the international competitiveness of all East African traders by digitizing and covering the end-to-end trade-data journey to save time, cost, errors and lost documents. -`; - -const HOW_IS_ORGANIZED = ` -- TLIP was initiated by TradeMark Africa and the initial stages of development and implementation are done by a team consisting of experts from TradeMark Africa and the IOTA Foundation. -- As the TLIP moves from testing and learning into production, the aim is to anchor the project with relevant government bodies in the target countries such as Uganda, Kenya, Rwanda and Tanzania for the first phase. -- A Technical Working Group, representing both public and private entities, has been established to oversee and provide feedback during the project. -`; - -const HOW_WILL_GROW = ` -- TLIP is currently being tested for selected tradelanes and commodities such as flowers, fish, tea and textiles As new tradelanes and commodities are added, TLIP will partner with the relevant government agencies, trade associations and traders to build out new features. -- We plan to pilot TLIP across Kenya, Uganda, Rwanda and Tanzania to establish integrations with relevant border agencies for secure data exchange. Furthermore, different destination markets will be involved in accepting digital certificates for the commodities involved in TLIP. -- Further, TLIP has been selected by the UK Border Innovation Team under Cabinet Office for pilots on export/import with the UK during 2022. -- The aim is to establish TLIP as the public system, starting in the East African Community and the UK, for the exchange of trade data and certificates. Piloting across different trade lanes and commodities enables a robust system to be built that over time can cover all trade lanes and commodities. -`; - -const WHO_OWNS = ` -- Currently TLIP is anchored as an innovation project under TradeMark Africa. -- TLIP will become a public infrastructure for government agencies to exchange information with both foreign customs authorities and with traders, transporters and other private actors. As the system transitions into production mode, relevant government institutions will host the system to ensure it is compliant with national legislation and public service principles. -`; - -const WHO_USES = ` -- Once TLIP is in full production, it is available to anybody who needs to share trade information to ensure goods get from A to B. This involves traders from various industries, border authorities, transporters and freight providers. -- Currently, TLIP is in testing and pilot stage, with the goal of building the right integrations with border agencies in East Africa, ensuring a high quality user experience and delivering the envisioned impact. -- A number of tradelanes/commodities have been preselected for the testing phase including Flowers, Fish, Tea, Rice, Livestock, Seeds and Textiles - more will likely follow. -`; - -const WHY_USES_IOTA = ` -- The TLIP project uses the IOTA DLT because it is highly scalable, energy-efficient and does not require the use of a cryptocurrency. IOTA is an open-source technology so that TLIP can be developed, maintained and serviced by any skillful technology consultancy. -- TradeMark Africa has partnered with the IOTA Foundation in order to establish TLIP. The IOTA Foundation is a not-for-profit organisation registered in Germany that is paid on a consultancy-based fee structure to support building TLIP. -`; - -const WHY_IS_DLT_IMPORTANT = ` -- DLT (such as blockchain) is a technology that can ensure the immutability and integrity of digital data. It performs the same function as a government stamp on a trade certificate. Digital certificates shared using DLT can be trusted to be authentic and cannot be tampered with at a later stage. DLT provides the security and auditability of trade certification to be shared through the TLIP system alone. For example, customs in destination markets will not need a stamped physical Certificate of Origin when using TLIP. -- Furthermore, DLT enables parties to interact securely online without requiring a centralised platform that stores all information and is vulnerable to hacking or manipulation. -`; - -const WHAT_COST_TO_USE = ` -- Currently TLIP is in an innovation project and any costs associated with testing and using the system are covered by participating donor organizations. -- Potential future fees for using TLIP will be decided on by the relevant government agencies in each participating country. -- The total cost of trade is expected to decline as TLIP becomes the standard for cross-border trade processes. -`; - -const INVEST_NEW_TECHNOLOGY = ` -- Private actors such as traders, forwarders and transporters can access TLIP via a normal browser on both PCs and mobile devices, using their secure login credentials. As such, no new investments are required. -- Government agencies participating in the TLIP network can share information through either a set of standard APIs or by establishing a tailored “TLIP bridge” that communicates with their internal systems and databases. Furthermore, government agencies are expected to run DLT nodes to ensure the data integrity that provides trust to the system and the information shared across it. Some establishment costs are to be expected and financial support is leveraged through TradeMark Africa and participating donor countries. -- Large corporations can also opt to use open APIs for integrating with their internal systems and thus ensure more automated workflows. Our long-term vision is to establish standard setup processes to connect with relevant ERP systems. -`; - -export const FAQS: FaqSection[] = [ - { - id: "Purpose", - title: "Purpose", - subsections: [ - { - id: "what-is", - title: "What is TLIP?", - description: - "TLIP is a digital system that enables the secure storing and sharing of trade-related information. TLIP is both i) a set of secure connections to border agencies’ databases; and ii) a user-friendly dashboard, which can be accessed via a secure login from PCs and mobile devices. The backend connections are automated to allow border agencies to share information without introducing new work processes. The front end allows all actors (agencies, traders, transporters, etc.) to upload typical trade documentation such as the Certificate of Origin, the Phytosanitary Certificate, Packing List or Commercial Invoice. Once uploaded, documents are protected against loss and forgery, and can be easily shared with relevant parties. " - }, - { - id: "what-is-impact", - title: "What is the impact of TLIP?", - description: WHAT_IS_IMPACT - } - ] - }, - { - id: "Roadmap", - title: "Roadmap", - subsections: [ - { - id: "why-was-initiated", - title: "Why was TLIP initiated?", - description: WHY_WAS_INITIATED - }, - { - id: "how-is-organized", - title: "How is the TLIP project organized?", - description: HOW_IS_ORGANIZED - }, - { - id: "how-will-grow", - title: "How will TLIP grow in the next 18 months?", - description: HOW_WILL_GROW - } - ] - }, - { - id: "Governance", - title: "Governance", - subsections: [ - { - id: "who-owns", - title: "Who owns TLIP?", - description: WHO_OWNS - }, - { - id: "who-uses", - title: "Who uses TLIP?", - description: WHO_USES - } - ] - }, - { - id: "Technology", - title: "Technology", - subsections: [ - { - id: "why-uses-IOTA", - title: "Why does TLIP use a DLT called IOTA?", - description: WHY_USES_IOTA - }, - { - id: "why-is-DLT-important", - title: "Why is Distributed Ledger Technology (DLT) important for TLIP?", - description: WHY_IS_DLT_IMPORTANT - } - ] - }, - { - id: "Finance", - title: "Finance", - subsections: [ - { - id: "what-cost-to-use", - title: "What does it cost to use TLIP?", - description: WHAT_COST_TO_USE - }, - { - id: "how-TLIP-funded", - title: "How is the TLIP project funded?", - description: - "Development of the project is made possible by the generous support of the development agencies of the following governments: the Netherlands, the United Kingdom and the United States of America." - }, - { - id: "invest-new-technology", - title: "Will TLIP require users to invest in new technology?", - description: INVEST_NEW_TECHNOLOGY - } - ] - } -]; diff --git a/src/lib/constants/index.ts b/src/lib/constants/index.ts index 54a0566..ebd5e69 100644 --- a/src/lib/constants/index.ts +++ b/src/lib/constants/index.ts @@ -1,2 +1 @@ -export * from "./faq.constants"; export * from "./partners.constants"; diff --git a/src/lib/markdown/faqs.md b/src/lib/markdown/faqs.md new file mode 100644 index 0000000..77cc264 --- /dev/null +++ b/src/lib/markdown/faqs.md @@ -0,0 +1,75 @@ +## Purpose + +### What is TLIP? + +TLIP is a digital system that enables the secure storing and sharing of trade-related information. TLIP is both i) a set of secure connections to border agencies’ databases; and ii) a user-friendly dashboard, which can be accessed via a secure login from PCs and mobile devices. The backend connections are automated to allow border agencies to share information without introducing new work processes. The front end allows all actors (agencies, traders, transporters, etc.) to upload typical trade documentation such as the Certificate of Origin, the Phytosanitary Certificate, Packing List or Commercial Invoice. Once uploaded, documents are protected against loss and forgery, and can be easily shared with relevant parties. + +### What is the impact of TLIP? + +- TLIP enables a transparent, efficient and cost-effective way of managing trade information across borders. It allows for trade processes to become paperless and fully digital. +- TLIP will create trust and visibility along the trade supply chains as actors can securely exchange information in a digital format. +- TLIP supports WTO’s Trade Facilitation Agreement and the ambition to make cross-border trade processes more efficient-both in terms of saved time and cost. +- The impact of TLIP is to make East African exports more competitive through building efficiencies around information generation, transmission and storage. TLIP will link the East African trading community to the global trade supply chain in a way that gives the region and its trading partners access to the critical information required to make informed decisions well in advance of the arrival of physical goods. + +## Roadmap + +### Why was TLIP initiated? + +- International trade is an information-intensive process, involving hundreds of data points and multiple information exchanges between traders, transporters and border authorities. Most information exchanged throughout the journey of a single product is paper-based, making it unsustainable, expensive, slow, error-prone and inefficient. The TLIP project was initiated to tackle problems associated with paper-based information sharing and to increase the transparency, efficiency and sustainability of international trade. +- TLIP’s vision is to enhance the international competitiveness of all East African traders by digitizing and covering the end-to-end trade-data journey to save time, cost, errors and lost documents. + +### How is the TLIP project organized? + +- TLIP was initiated by TradeMark Africa and the initial stages of development and implementation are done by a team consisting of experts from TradeMark Africa and the IOTA Foundation. +- As the TLIP moves from testing and learning into production, the aim is to anchor the project with relevant government bodies in the target countries such as Uganda, Kenya, Rwanda and Tanzania for the first phase. +- A Technical Working Group, representing both public and private entities, has been established to oversee and provide feedback during the project. + +### How will TLIP grow in the next 18 months? + +- TLIP is currently being tested for selected tradelanes and commodities such as flowers, fish, tea and textiles As new tradelanes and commodities are added, TLIP will partner with the relevant government agencies, trade associations and traders to build out new features. +- We plan to pilot TLIP across Kenya, Uganda, Rwanda and Tanzania to establish integrations with relevant border agencies for secure data exchange. Furthermore, different destination markets will be involved in accepting digital certificates for the commodities involved in TLIP. +- Further, TLIP has been selected by the UK Border Innovation Team under Cabinet Office for pilots on export/import with the UK during 2022. +- The aim is to establish TLIP as the public system, starting in the East African Community and the UK, for the exchange of trade data and certificates. Piloting across different trade lanes and commodities enables a robust system to be built that over time can cover all trade lanes and commodities. + +## Governance + +### Who owns TLIP? + +- Currently TLIP is anchored as an innovation project under TradeMark Africa. +- TLIP will become a public infrastructure for government agencies to exchange information with both foreign customs authorities and with traders, transporters and other private actors. As the system transitions into production mode, relevant government institutions will host the system to ensure it is compliant with national legislation and public service principles. + +### Who uses TLIP? + +- Once TLIP is in full production, it is available to anybody who needs to share trade information to ensure goods get from A to B. This involves traders from various industries, border authorities, transporters and freight providers. +- Currently, TLIP is in testing and pilot stage, with the goal of building the right integrations with border agencies in East Africa, ensuring a high quality user experience and delivering the envisioned impact. +- A number of tradelanes/commodities have been preselected for the testing phase including Flowers, Fish, Tea, Rice, Livestock, Seeds and Textiles - more will likely follow. + +## Technology + +### Why does TLIP use a DLT called IOTA? + +- The TLIP project uses the IOTA DLT because it is highly scalable, energy-efficient and does not require the use of a cryptocurrency. IOTA is an open-source technology so that TLIP can be developed, maintained and serviced by any skillful technology consultancy. +- TradeMark Africa has partnered with the IOTA Foundation in order to establish TLIP. The IOTA Foundation is a not-for-profit organisation registered in Germany that is paid on a consultancy-based fee structure to support building TLIP. + +### Why is Distributed Ledger Technology (DLT) important for TLIP? + +- DLT (such as blockchain) is a technology that can ensure the immutability and integrity of digital data. It performs the same function as a government stamp on a trade certificate. Digital certificates shared using DLT can be trusted to be authentic and cannot be tampered with at a later stage. DLT provides the security and auditability of trade certification to be shared through the TLIP system alone. For example, customs in destination markets will not need a stamped physical Certificate of Origin when using TLIP. +- Furthermore, DLT enables parties to interact securely online without requiring a centralised platform that stores all information and is vulnerable to hacking or manipulation. + +## Finance + +### What does it cost to use TLIP? + +- Currently TLIP is in an innovation project and any costs associated with testing and using the system are covered by participating donor organizations. +- Potential future fees for using TLIP will be decided on by the relevant government agencies in each participating country. +- The total cost of trade is expected to decline as TLIP becomes the standard for cross-border trade processes. + +### How is the TLIP project funded? + +Development of the project is made possible by the generous support of the development agencies of the following governments: the Netherlands, the United Kingdom and the United States of America. + +### Will TLIP require users to invest in new technology? + +- Private actors such as traders, forwarders and transporters can access TLIP via a normal browser on both PCs and mobile devices, using their secure login credentials. As such, no new investments are required. +- Government agencies participating in the TLIP network can share information through either a set of standard APIs or by establishing a tailored “TLIP bridge” that communicates with their internal systems and databases. Furthermore, government agencies are expected to run DLT nodes to ensure the data integrity that provides trust to the system and the information shared across it. Some establishment costs are to be expected and financial support is leveraged through TradeMark Africa and participating donor countries. +- Large corporations can also opt to use open APIs for integrating with their internal systems and thus ensure more automated workflows. Our long-term vision is to establish standard setup processes to connect with relevant ERP systems. diff --git a/src/lib/markdown/index.ts b/src/lib/markdown/index.ts new file mode 100644 index 0000000..102acf9 --- /dev/null +++ b/src/lib/markdown/index.ts @@ -0,0 +1 @@ +export { html as FAQS } from "./faqs.md"; diff --git a/src/lib/utils.ts b/src/lib/utils.ts index cb28477..ea46df3 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -111,3 +111,72 @@ export function formatDateToDDMMYYYY(date?: Date | null) { new Date(date) ); } + +/** + * Parses the HTML string and returns an array of sections. + * @param html - The HTML string to parse. + * @returns An array of sections. + */ +export function parseMarkdownToFaqs(html: string): FaqSection[] { + const HEADING_REGEX = /(.*?)<\/h\d>/g; + const headingMatches = Array.from(html.matchAll(HEADING_REGEX)); + + const sections: FaqSection[] = []; + let currentSection: FaqSection = null; + let currentSubsection: FaqSubsection = null; + let firstHeadingLevel: number; + let lastMatchIndex: number; + + for (const matchHeading of headingMatches) { + const level = Number.parseInt(matchHeading[1], 10); + const title = matchHeading[2]; + const id = title.toLowerCase().replace(/[^\w-]/g, "-"); + + if (!firstHeadingLevel) { + firstHeadingLevel = level; + } + + if (lastMatchIndex !== undefined) { + const descriptionStartIndex = lastMatchIndex; + const descriptionEndIndex = matchHeading.index; + const description = html.slice(descriptionStartIndex, descriptionEndIndex).trim(); + if (currentSubsection) { + currentSubsection.description = description; + } else if (currentSection) { + currentSection.description = description; + } + } + + if (level === firstHeadingLevel) { + currentSection = { + id, + title, + subsections: [] + }; + sections.push(currentSection); + currentSubsection = null; + } else if (level > firstHeadingLevel && currentSection) { + currentSubsection = { + id, + title, + description: "" + }; + currentSection.subsections.push(currentSubsection); + } + + lastMatchIndex = matchHeading.index + matchHeading[0].length; + } + + if (lastMatchIndex !== undefined) { + const descriptionStartIndex = lastMatchIndex; + const descriptionEndIndex = html.length; + const description = html.slice(descriptionStartIndex, descriptionEndIndex).trim(); + if (currentSubsection) { + currentSubsection.description = description; + } else if (currentSection) { + currentSection.description = description; + } + } + + return sections; +} diff --git a/src/sections/faq/faqs.svelte b/src/sections/faq/faqs.svelte index 8579c9d..9dbc2c1 100644 --- a/src/sections/faq/faqs.svelte +++ b/src/sections/faq/faqs.svelte @@ -1,6 +1,9 @@
diff --git a/vite.config.js b/vite.config.js index 33b76f5..93343af 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,8 +1,9 @@ import { sveltekit } from "@sveltejs/kit/vite"; +import { plugin as mdPlugin, Mode } from "vite-plugin-markdown"; /** @type {import('vite').UserConfig} */ const config = { - plugins: [sveltekit()] + plugins: [sveltekit(), mdPlugin({ mode: Mode.HTML })] }; export default config; diff --git a/yarn.lock b/yarn.lock index 457645e..d767027 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1483,7 +1483,7 @@ domhandler@^2.3.0: dependencies: domelementtype "1" -domhandler@^4.2.0, domhandler@^4.3.1: +domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== @@ -1506,7 +1506,7 @@ domutils@^1.5.1: dom-serializer "0" domelementtype "1" -domutils@^2.8.0: +domutils@^2.5.2, domutils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== @@ -1560,6 +1560,11 @@ entities@^2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -2242,6 +2247,13 @@ fraction.js@^4.2.0: resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== +front-matter@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/front-matter/-/front-matter-4.0.2.tgz#b14e54dc745cfd7293484f3210d15ea4edd7f4d5" + integrity sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg== + dependencies: + js-yaml "^3.13.1" + fs-minipass@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -2593,6 +2605,16 @@ htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^3.1.1" +htmlparser2@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -2924,7 +2946,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg== -js-yaml@^3.11.0: +js-yaml@^3.11.0, js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -3084,6 +3106,13 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +linkify-it@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" + integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ== + dependencies: + uc.micro "^1.0.1" + lint-staged@^13.1.0: version "13.1.0" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.1.0.tgz#d4c61aec939e789e489fa51987ec5207b50fd37e" @@ -3294,6 +3323,17 @@ map-obj@^4.0.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== +markdown-it@^12.0.0: + version "12.3.2" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.3.2.tgz#bf92ac92283fe983fe4de8ff8abfb5ad72cd0c90" + integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== + dependencies: + argparse "^2.0.1" + entities "~2.1.0" + linkify-it "^3.0.1" + mdurl "^1.0.1" + uc.micro "^1.0.5" + marked@^4.2.5: version "4.2.5" resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.5.tgz#979813dfc1252cc123a79b71b095759a32f42a5d" @@ -3309,6 +3349,11 @@ mdn-data@2.0.14: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== + memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" @@ -5458,6 +5503,11 @@ typescript@^4.9.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -5553,6 +5603,15 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +vite-plugin-markdown@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/vite-plugin-markdown/-/vite-plugin-markdown-2.1.0.tgz#3c90b91eb8c05a5701d944e9948739f514c79af1" + integrity sha512-eWLlrWzYZXEX3/HaXZo/KLjRpO72IUhbgaoFrbwB07ueXi6QfwqrgdZQfUcXTSofJCkN7GhErMC1K1RTAE0gGQ== + dependencies: + front-matter "^4.0.0" + htmlparser2 "^6.0.0" + markdown-it "^12.0.0" + vite@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/vite/-/vite-4.0.4.tgz#4612ce0b47bbb233a887a54a4ae0c6e240a0da31"