diff --git a/docs/docs/api-reference/_category_.json b/docs/docs/api-reference/_category_.json new file mode 100644 index 000000000..cc5acae89 --- /dev/null +++ b/docs/docs/api-reference/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "API reference", + "position": 50, + "link": { + "type": "generated-index" + } +} diff --git a/docs/docs/api-reference/enriched-text-input.md b/docs/docs/api-reference/enriched-text-input.md new file mode 100644 index 000000000..1e71e6859 --- /dev/null +++ b/docs/docs/api-reference/enriched-text-input.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 1 +--- + +# EnrichedTextInput + + diff --git a/docs/docs/api-reference/enriched-text.md b/docs/docs/api-reference/enriched-text.md new file mode 100644 index 000000000..d2bde28cf --- /dev/null +++ b/docs/docs/api-reference/enriched-text.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 2 +--- + +# EnrichedText + + diff --git a/docs/docs/core-functionalities/_category_.json b/docs/docs/core-functionalities/_category_.json new file mode 100644 index 000000000..602a6243b --- /dev/null +++ b/docs/docs/core-functionalities/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Core functionalities", + "position": 30, + "link": { + "type": "generated-index" + } +} diff --git a/docs/docs/core-functionalities/handling-events.md b/docs/docs/core-functionalities/handling-events.md new file mode 100644 index 000000000..f66526c28 --- /dev/null +++ b/docs/docs/core-functionalities/handling-events.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 3 +--- + +# Handling events + + diff --git a/docs/docs/core-functionalities/rendering-rich-text.md b/docs/docs/core-functionalities/rendering-rich-text.md new file mode 100644 index 000000000..be631660e --- /dev/null +++ b/docs/docs/core-functionalities/rendering-rich-text.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 2 +--- + +# Rendering rich text + + diff --git a/docs/docs/core-functionalities/styling-the-input.md b/docs/docs/core-functionalities/styling-the-input.md new file mode 100644 index 000000000..f517a6deb --- /dev/null +++ b/docs/docs/core-functionalities/styling-the-input.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 1 +--- + +# Styling the input + + diff --git a/docs/docs/core-functionalities/web-support.md b/docs/docs/core-functionalities/web-support.md new file mode 100644 index 000000000..bc5958b68 --- /dev/null +++ b/docs/docs/core-functionalities/web-support.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 4 +--- + +# Web support + + diff --git a/docs/docs/fundamentals/_category_.json b/docs/docs/fundamentals/_category_.json new file mode 100644 index 000000000..61e8f6f9a --- /dev/null +++ b/docs/docs/fundamentals/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Fundamentals", + "position": 10, + "link": { + "type": "generated-index" + } +} diff --git a/docs/docs/fundamentals/core-concepts.md b/docs/docs/fundamentals/core-concepts.md new file mode 100644 index 000000000..22319d745 --- /dev/null +++ b/docs/docs/fundamentals/core-concepts.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 3 +--- + +# Core concepts + + diff --git a/docs/docs/fundamentals/getting-started.md b/docs/docs/fundamentals/getting-started.md index 6f6a180eb..505177606 100644 --- a/docs/docs/fundamentals/getting-started.md +++ b/docs/docs/fundamentals/getting-started.md @@ -1,3 +1,8 @@ -# Getting Started +--- +slug: / +sidebar_position: 1 +--- + +# Getting started diff --git a/docs/docs/fundamentals/html-format-and-supported-tags.md b/docs/docs/fundamentals/html-format-and-supported-tags.md new file mode 100644 index 000000000..7cda41d42 --- /dev/null +++ b/docs/docs/fundamentals/html-format-and-supported-tags.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 4 +--- + +# HTML format and supported tags + + diff --git a/docs/docs/fundamentals/intro.md b/docs/docs/fundamentals/intro.md deleted file mode 100644 index f05d69bfb..000000000 --- a/docs/docs/fundamentals/intro.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -slug: / -sidebar_label: Introduction ---- - -# React Native Enriched HTML - - diff --git a/docs/docs/fundamentals/your-first-editor.md b/docs/docs/fundamentals/your-first-editor.md new file mode 100644 index 000000000..c527655ec --- /dev/null +++ b/docs/docs/fundamentals/your-first-editor.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 2 +--- + +# Your first editor + + diff --git a/docs/docs/guides/_category_.json b/docs/docs/guides/_category_.json new file mode 100644 index 000000000..6c1154419 --- /dev/null +++ b/docs/docs/guides/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Guides", + "position": 40, + "link": { + "type": "generated-index" + } +} diff --git a/docs/docs/guides/chat-input-with-images.md b/docs/docs/guides/chat-input-with-images.md new file mode 100644 index 000000000..e5cc04798 --- /dev/null +++ b/docs/docs/guides/chat-input-with-images.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 1 +--- + +# Chat input with images + + diff --git a/docs/docs/guides/custom-context-menu.md b/docs/docs/guides/custom-context-menu.md new file mode 100644 index 000000000..fabbe5fa7 --- /dev/null +++ b/docs/docs/guides/custom-context-menu.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 4 +--- + +# Custom context menu + + diff --git a/docs/docs/guides/index.md b/docs/docs/guides/emojis.md similarity index 53% rename from docs/docs/guides/index.md rename to docs/docs/guides/emojis.md index b3943b400..b8fc83f9a 100644 --- a/docs/docs/guides/index.md +++ b/docs/docs/guides/emojis.md @@ -1,3 +1,7 @@ -# Guides +--- +sidebar_position: 3 +--- + +# Emojis diff --git a/docs/docs/guides/mention-only-input.md b/docs/docs/guides/mention-only-input.md new file mode 100644 index 000000000..85b2e7572 --- /dev/null +++ b/docs/docs/guides/mention-only-input.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 2 +--- + +# Mention-only input + + diff --git a/docs/docs/misc/_category_.json b/docs/docs/misc/_category_.json new file mode 100644 index 000000000..a0b718a02 --- /dev/null +++ b/docs/docs/misc/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Misc", + "position": 60, + "link": { + "type": "generated-index" + } +} diff --git a/docs/docs/misc/comparison-with-other-libraries.md b/docs/docs/misc/comparison-with-other-libraries.md new file mode 100644 index 000000000..939389b68 --- /dev/null +++ b/docs/docs/misc/comparison-with-other-libraries.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 2 +--- + +# Comparison with other libraries + + diff --git a/docs/docs/misc/compatibility.md b/docs/docs/misc/compatibility.md new file mode 100644 index 000000000..326f8ab42 --- /dev/null +++ b/docs/docs/misc/compatibility.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 1 +--- + +# Compatibility + + diff --git a/docs/docs/misc/contributing.md b/docs/docs/misc/contributing.md new file mode 100644 index 000000000..cd2d319b8 --- /dev/null +++ b/docs/docs/misc/contributing.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 5 +--- + +# Contributing + + diff --git a/docs/docs/misc/known-limitations.md b/docs/docs/misc/known-limitations.md new file mode 100644 index 000000000..af18c99cd --- /dev/null +++ b/docs/docs/misc/known-limitations.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 3 +--- + +# Known limitations + + diff --git a/docs/docs/misc/roadmap.md b/docs/docs/misc/roadmap.md new file mode 100644 index 000000000..28978894c --- /dev/null +++ b/docs/docs/misc/roadmap.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 4 +--- + +# Roadmap + + diff --git a/docs/docs/rich-text-formatting/_category_.json b/docs/docs/rich-text-formatting/_category_.json new file mode 100644 index 000000000..974b57b7c --- /dev/null +++ b/docs/docs/rich-text-formatting/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Rich text formatting", + "position": 20, + "link": { + "type": "generated-index" + } +} diff --git a/docs/docs/rich-text-formatting/basic-styles.md b/docs/docs/rich-text-formatting/basic-styles.md new file mode 100644 index 000000000..f5945cb02 --- /dev/null +++ b/docs/docs/rich-text-formatting/basic-styles.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 1 +--- + +# Basic styles + + diff --git a/docs/docs/rich-text-formatting/inline-images.md b/docs/docs/rich-text-formatting/inline-images.md new file mode 100644 index 000000000..464ec5746 --- /dev/null +++ b/docs/docs/rich-text-formatting/inline-images.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 5 +--- + +# Inline images + + diff --git a/docs/docs/api-reference/index.md b/docs/docs/rich-text-formatting/links.md similarity index 54% rename from docs/docs/api-reference/index.md rename to docs/docs/rich-text-formatting/links.md index 6ecb4ad75..549f3ac11 100644 --- a/docs/docs/api-reference/index.md +++ b/docs/docs/rich-text-formatting/links.md @@ -1,3 +1,7 @@ -# API Reference +--- +sidebar_position: 2 +--- + +# Links diff --git a/docs/docs/fundamentals/installation.md b/docs/docs/rich-text-formatting/lists.md similarity index 54% rename from docs/docs/fundamentals/installation.md rename to docs/docs/rich-text-formatting/lists.md index 37bf5da4a..8f296a6e0 100644 --- a/docs/docs/fundamentals/installation.md +++ b/docs/docs/rich-text-formatting/lists.md @@ -1,3 +1,7 @@ -# Installation +--- +sidebar_position: 4 +--- + +# Lists diff --git a/docs/docs/rich-text-formatting/mentions.md b/docs/docs/rich-text-formatting/mentions.md new file mode 100644 index 000000000..ee0a2d492 --- /dev/null +++ b/docs/docs/rich-text-formatting/mentions.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 3 +--- + +# Mentions + + diff --git a/docs/docs/rich-text-formatting/text-alignment.md b/docs/docs/rich-text-formatting/text-alignment.md new file mode 100644 index 000000000..1619e7a0a --- /dev/null +++ b/docs/docs/rich-text-formatting/text-alignment.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 6 +--- + +# Text alignment + + diff --git a/docs/docs/rich-text-formatting/text-shortcuts.md b/docs/docs/rich-text-formatting/text-shortcuts.md new file mode 100644 index 000000000..9b8de802b --- /dev/null +++ b/docs/docs/rich-text-formatting/text-shortcuts.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 7 +--- + +# Text shortcuts + + diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 3c43225c2..de52af0eb 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -61,9 +61,29 @@ const config = { }, }), ], + require.resolve('@swmansion/t-rex-ui/preset'), ], plugins: [ + function transpileTRexUiTheme() { + return { + name: 'transpile-t-rex-ui-theme', + configureWebpack(_config, isServer, utils) { + return { + module: { + rules: [ + { + test: /\.jsx?$/, + include: + /node_modules[\\/]@swmansion[\\/]t-rex-ui[\\/]theme[\\/]/, + use: [utils.getJSLoader({ isServer })], + }, + ], + }, + }; + }, + }; + }, // TODO: enable Google Tag Manager with a container id for this site. // process.env.NODE_ENV === 'production' && [ // '@docusaurus/plugin-google-tag-manager', @@ -93,7 +113,7 @@ const config = { }, items: [ { - to: 'fundamentals/getting-started', + to: '/', label: 'Docs', position: 'right', }, diff --git a/docs/sidebars.js b/docs/sidebars.js index 3cdc0848d..a7d751476 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -2,27 +2,7 @@ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { - tutorialSidebar: [ - { - type: 'category', - label: 'Fundamentals', - items: [ - 'fundamentals/intro', - 'fundamentals/getting-started', - 'fundamentals/installation', - ], - }, - { - type: 'category', - label: 'Guides', - items: ['guides/index'], - }, - { - type: 'category', - label: 'API Reference', - items: ['api-reference/index'], - }, - ], + tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }], }; module.exports = sidebars;