Skip to content

Commit 000aa0a

Browse files
committed
Refactor code structure for improved readability and maintainability
1 parent 83dbf80 commit 000aa0a

File tree

3 files changed

+670
-735
lines changed

3 files changed

+670
-735
lines changed

docusaurus.config.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
const { themes } = require('prism-react-renderer');
55

6-
const PUBLIC_BASE_URL = 'https://public-ui.github.io/';
6+
const PUBLIC_BASE_URL = 'https://public-ui.github.io';
77

88
/** @type {import('@docusaurus/types').Config} */
99
const config = {
1010
title: 'KoliBri - Public UI',
1111
tagline: 'The accessible Web Component Library',
12-
url: 'https://public-ui.github.io',
12+
url: PUBLIC_BASE_URL,
1313
baseUrl: '/',
1414
onBrokenLinks: 'throw',
1515
trailingSlash: false,
@@ -97,16 +97,21 @@ const config = {
9797
position: 'left',
9898
dropdownActiveClassDisabled: true,
9999
dropdownItemsAfter: [
100+
{
101+
type: 'html',
102+
className: 'dropdown-archived-versions',
103+
value: '<strong class="dropdown__link">Version 3</strong>',
104+
},
105+
{ to: `${PUBLIC_BASE_URL}/v2/`, label: 'Version 2' },
100106
{
101107
type: 'html',
102108
value: '<hr class="dropdown-separator">',
103109
},
104110
{
105111
type: 'html',
106112
className: 'dropdown-archived-versions',
107-
value: '<b>Archive</b>',
113+
value: '<span class="dropdown__link">Version 1</span>',
108114
},
109-
{ to: `${PUBLIC_BASE_URL}docs/2.2/`, label: '2.2' },
110115
],
111116
},
112117
{

package.json

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "root",
3-
"private": true,
2+
"name": "@public-ui/docs-v3",
3+
"version": "3.0.0-rc.7",
44
"scripts": {
55
"clean": "git clean -f -d -X",
66
"clean:branches": "git branch --merged | grep -v \\* | xargs git branch -D",
@@ -15,20 +15,21 @@
1515
"write-translations": "npm run gen:doc && docusaurus write-translations",
1616
"write-heading-ids": "npm run gen:doc && docusaurus write-heading-ids",
1717
"format": "prettier blog docs src -c",
18-
"lint": "eslint src",
19-
"lint:hard": "tsc --noemit && eslint src",
18+
"lint": "tsc --noemit && eslint src",
2019
"ncu:major": "ncu",
2120
"ncu:minor": "ncu -t minor -u",
2221
"ncu:patch": "ncu -t patch -u",
2322
"gen:doc": "node scripts/autogen.doc.js",
2423
":prepack": "npm run build",
2524
"unused": "knip",
26-
"postinstall": "npm-run-all postinstall:*",
25+
"postinstall": "npm-run-all2 postinstall:*",
2726
"postinstall:components-assets": "cpy \"node_modules/@public-ui/components/assets/**/*\" static/assets --dot",
2827
"postinstall:themes-assets": "cpy \"node_modules/@public-ui/theme-default/assets/**/*\" static/assets --dot",
29-
"update": "pnpm ncu:minor && pnpm ncu:major",
30-
"regenerate:version": "rimraf i18n/en/docusaurus-plugin-content-docs/version-2.0 versioned_docs/version-2.0 versioned_readmes/2.0 versioned_sidebars/version-2.0-sidebars.json && npm run docusaurus docs:version 2.0"
28+
"update": "pnpm ncu:minor && pnpm ncu:major"
3129
},
30+
"files": [
31+
"build"
32+
],
3233
"dependencies": {
3334
"@docusaurus/core": "3.7.0",
3435
"@docusaurus/eslint-plugin": "3.7.0",
@@ -41,46 +42,54 @@
4142
"@leanup/form": "1.3.54",
4243
"@mdx-js/react": "3.1.0",
4344
"@monaco-editor/react": "4.7.0",
44-
"@public-ui/components": "3.0.0-rc.6",
45-
"@public-ui/react": "3.0.0-rc.6",
46-
"@public-ui/theme-default": "3.0.0-rc.6",
45+
"@public-ui/components": "3.0.0-rc.7",
46+
"@public-ui/react": "3.0.0-rc.7",
47+
"@public-ui/theme-default": "3.0.0-rc.7",
4748
"classnames": "2.5.1",
4849
"docusaurus-lunr-search": "3.6.1",
49-
"mermaid": "11.4.1",
50+
"mermaid": "11.6.0",
5051
"prettier": "2.8.8",
51-
"react": "19.0.0",
52-
"react-dom": "19.0.0",
53-
"read-excel-file": "5.8.6"
52+
"react": "19.1.0",
53+
"react-dom": "19.1.0",
54+
"read-excel-file": "5.8.7"
5455
},
5556
"devDependencies": {
5657
"@docsearch/react": "3.9.0",
5758
"@docusaurus/module-type-aliases": "3.7.0",
59+
"@docusaurus/plugin-content-docs": "3.7.0",
60+
"@docusaurus/theme-classic": "3.7.0",
61+
"@docusaurus/theme-common": "3.7.0",
5862
"@docusaurus/types": "3.7.0",
59-
"@eslint/eslintrc": "3.3.0",
60-
"@eslint/js": "9.21.0",
63+
"@docusaurus/utils": "3.7.0",
64+
"@eslint/eslintrc": "3.3.1",
65+
"@eslint/js": "9.25.1",
6166
"@tsconfig/docusaurus": "2.0.3",
67+
"@types/node": "22.15.2",
6268
"@types/prettier": "2.7.3",
63-
"@typescript-eslint/eslint-plugin": "8.25.0",
64-
"@typescript-eslint/parser": "8.25.0",
65-
"adopted-style-sheets": "1.1.7",
66-
"autoprefixer": "10.4.20",
69+
"@types/react": "19.1.2",
70+
"@typescript-eslint/eslint-plugin": "8.31.0",
71+
"@typescript-eslint/parser": "8.31.0",
72+
"adopted-style-sheets": "1.1.8",
73+
"autoprefixer": "10.4.21",
6774
"cpy-cli": "5.0.0",
6875
"depcheck": "1.4.7",
6976
"docusaurus-plugin-sass": "0.2.6",
70-
"eslint": "9.21.0",
77+
"eslint": "9.25.1",
7178
"eslint-plugin-jsx-a11y": "6.10.2",
72-
"eslint-plugin-mdx": "3.1.5",
73-
"eslint-plugin-react": "7.37.4",
79+
"eslint-plugin-mdx": "3.4.1",
80+
"eslint-plugin-react": "7.37.5",
7481
"html-minifier-terser": "7.2.0",
75-
"knip": "5.45.0",
76-
"npm-check-updates": "17.1.15",
77-
"npm-run-all": "4.1.5",
82+
"knip": "5.50.5",
83+
"lunr": "2.3.9",
84+
"npm-check-updates": "18.0.1",
85+
"npm-run-all2": "7.0.2",
7886
"postcss": "8.5.3",
87+
"prism-react-renderer": "2.4.1",
7988
"prop-types": "15.8.1",
8089
"rimraf": "3.0.2",
81-
"sass": "1.85.1",
90+
"sass": "1.87.0",
8291
"tailwindcss": "3.4.17",
83-
"typescript": "5.7.3"
92+
"typescript": "5.8.3"
8493
},
8594
"browserslist": {
8695
"production": [

0 commit comments

Comments
 (0)