@tumaet/prompt-ui-components 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +106 -0
  3. package/package.json +17 -17
  4. package/readme.md +0 -36
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 TUM Applied Education Technologies
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,106 @@
1
+ # prompt-ui-components
2
+
3
+ A shared UI component library for the **AET Prompt** system, built on [shadcn/ui](https://ui.shadcn.dev/).
4
+
5
+ Components are designed for **Module Federation** singleton usage, which ensures:
6
+ - A **consistent UI experience** across microfrontends
7
+ - **Reduced bundle size** by avoiding duplicate component loading
8
+ - **Unified UI state** such as shared toast handling across apps
9
+
10
+ For shared state primitives and shared TypeScript interfaces, use [`@tumaet/prompt-shared-state`](https://github.com/prompt-edu/prompt-shared-state).
11
+
12
+ ---
13
+
14
+ ## Package
15
+
16
+ `@tumaet/prompt-ui-components` provides:
17
+ - **36+ shadcn/ui base components** (buttons, dialogs, forms, tables, etc.)
18
+ - **PromptTable** — advanced data table with sorting, filtering, pagination, row selection, and URL-synced state
19
+ - **MinimalTiptapEditor** — rich text editor with toolbar, code highlighting, image support, and link management
20
+ - **Custom components** — date pickers, multi-select, management page headers, score level selectors, and more
21
+
22
+ ---
23
+
24
+ ## Prerequisites
25
+
26
+ This project uses **Yarn 4** as specified in the `packageManager` field of each `package.json`. To work with this repository, enable Corepack, which will automatically use the correct Yarn version.
27
+
28
+ ```bash
29
+ corepack enable
30
+ ```
31
+
32
+ Corepack is included by default with Node.js 16.9+ and 14.19+. If you see an error like:
33
+
34
+ ```text
35
+ error This project's package.json defines "packageManager": "yarn@4.13.0". However the current global version of Yarn is 1.22.22.
36
+ ```
37
+
38
+ Run `corepack enable` to fix it.
39
+
40
+ ---
41
+
42
+ ## Development
43
+
44
+ ### Building Locally
45
+
46
+ ```bash
47
+ yarn install
48
+ yarn build
49
+ ```
50
+
51
+ ### Linting
52
+
53
+ ```bash
54
+ # From within the package directory
55
+ yarn lint
56
+ ```
57
+
58
+ ### Testing Before Release
59
+
60
+ ```bash
61
+ yarn build
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Publishing Packages
67
+
68
+ The package is published to npm when you create a GitHub release.
69
+
70
+ ### 1. Update Package Version
71
+
72
+ Ensure `package.json` has the version number matching your intended release tag.
73
+
74
+ ```bash
75
+ yarn version patch # 1.2.3 -> 1.2.4
76
+ # or: yarn version minor (1.2.3 -> 1.3.0)
77
+ # or: yarn version major (1.2.3 -> 2.0.0)
78
+ ```
79
+
80
+ Or edit the `package.json` file manually.
81
+
82
+ ### 2. Create a GitHub Release
83
+
84
+ 1. Go to the [Releases page](../../releases)
85
+ 2. Click **"Create a new release"**
86
+ 3. Create a new tag with the format `v{version}` (for example, `v1.2.3`)
87
+ 4. Set the release title and add release notes
88
+ 5. Click **"Publish release"**
89
+
90
+ ### 3. Automated Publishing
91
+
92
+ Once you publish the release, the GitHub Actions workflow:
93
+
94
+ 1. **Validates** that `package.json` matches the release tag
95
+ 2. **Builds** the package
96
+ 3. **Publishes** `@tumaet/prompt-ui-components` to npm
97
+
98
+ If there is a version mismatch, the workflow fails with a clear error.
99
+
100
+ ---
101
+
102
+ ## Package Information
103
+
104
+ | Package | Latest Version | Description |
105
+ |---|---|---|
106
+ | [@tumaet/prompt-ui-components](https://www.npmjs.com/package/@tumaet/prompt-ui-components) | ![npm](https://img.shields.io/npm/v/@tumaet/prompt-ui-components) | Reusable React UI components |
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@tumaet/prompt-ui-components",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "repository": {
5
5
  "type": "git",
6
- "url": "git+https://github.com/ls1intum/prompt-lib.git"
6
+ "url": "git+https://github.com/prompt-edu/prompt-lib.git"
7
7
  },
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.js",
@@ -66,39 +66,39 @@
66
66
  "@tiptap/pm": "^2.27.2",
67
67
  "@tiptap/react": "^2.27.2",
68
68
  "@tiptap/starter-kit": "^2.27.2",
69
- "@tumaet/prompt-shared-state": "^1.0.8",
69
+ "@tumaet/prompt-shared-state": "^1.0.13",
70
70
  "class-variance-authority": "^0.7.1",
71
71
  "clsx": "^2.1.1",
72
72
  "cmdk": "1.1.1",
73
73
  "date-fns": "^4.1.0",
74
74
  "highlight.js": "^11.11.1",
75
75
  "lowlight": "^3.3.0",
76
- "lucide-react": "^1.0.1",
77
- "postcss": "^8.5.8",
78
- "postcss-preset-env": "^11.2.0",
79
- "react": "^19.2.4",
76
+ "lucide-react": "^1.8.0",
77
+ "postcss": "^8.5.10",
78
+ "postcss-preset-env": "^11.2.1",
79
+ "react": "^19.2.5",
80
80
  "react-day-picker": "8.10.1",
81
- "react-dom": "^19.2.4",
82
- "react-hook-form": "^7.72.0",
83
- "react-medium-image-zoom": "^5.4.1",
84
- "react-router-dom": "^7.13.2",
85
- "recharts": "^3.8.0",
81
+ "react-dom": "^19.2.5",
82
+ "react-hook-form": "^7.72.1",
83
+ "react-medium-image-zoom": "^5.4.3",
84
+ "react-router-dom": "^7.14.2",
85
+ "recharts": "^3.8.1",
86
86
  "sonner": "^2.0.7",
87
- "tailwind-merge": "^2.6.1",
87
+ "tailwind-merge": "^3.5.0",
88
88
  "tsc-alias": "^1.8.16",
89
89
  "typescript": "^5.9.3"
90
90
  },
91
91
  "devDependencies": {
92
- "@eslint/compat": "^2.0.3",
92
+ "@eslint/compat": "^2.0.5",
93
93
  "@types/react": "^19.2.14",
94
94
  "@typescript-eslint/eslint-plugin": "^8.57.1",
95
95
  "@typescript-eslint/parser": "^8.57.1",
96
- "eslint": "^10.1.0",
96
+ "eslint": "^10.2.1",
97
97
  "eslint-plugin-prettier": "^5.5.5",
98
98
  "eslint-plugin-react": "^7.37.5",
99
- "eslint-plugin-react-hooks": "^7.0.1",
99
+ "eslint-plugin-react-hooks": "^7.1.1",
100
100
  "postcss-cli": "^11.0.1",
101
- "prettier": "^3.8.1"
101
+ "prettier": "^3.8.3"
102
102
  },
103
103
  "resolutions": {
104
104
  "tar": "^7.5.13"
package/readme.md DELETED
@@ -1,36 +0,0 @@
1
- # prompt-ui-components
2
-
3
- A shared library for the **AET Prompt2** system that provides common UI components.
4
-
5
- These components are built using [shadcn/ui](https://ui.shadcn.dev/) and are maintained centrally to enable loading via **Module Federation** as a **singleton**.
6
- This ensures:
7
- - A **consistent UI experience** across microfrontends
8
- - **Reduced bundle size** by avoiding duplicate component loading
9
- - **Unified UI state management** (e.g., for global toast notifications)
10
-
11
- ## Overview
12
-
13
- The **prompt-ui-components-lib** package is designed to allow multiple microfrontends to share:
14
- - **Common, reusable UI components** with a unified look and feel
15
- - **Shared UI state**, such as toasts and modals, across independently deployed apps
16
-
17
- By using this library, all microfrontends rely on the same component instances and styling, preventing UI inconsistencies and improving maintainability.
18
-
19
- ## Features
20
-
21
- - **Reusable UI Components**: Built on shadcn/ui, styled and configured for the Prompt2 system
22
- - **Shared UI State**: Centralized management for features like toast notifications
23
- - **Module Federation Ready**: Components are loaded as a singleton, preventing duplication
24
- - **Consistent Design System**: Ensures the same visual language across all microfrontends
25
-
26
- ## Installation
27
-
28
- Install the package with your preferred package manager:
29
-
30
- ```bash
31
- # Using Yarn
32
- yarn add @tumaet/prompt-ui-components-lib
33
-
34
- # Or using npm
35
- npm install @tumaet/prompt-ui-components-lib
36
- ```