Skip to content

Commit a6a36fb

Browse files
committed
feat: change package name to @charlietango/react-umbraco
1 parent b138081 commit a6a36fb

File tree

8 files changed

+781
-1279
lines changed

8 files changed

+781
-1279
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ jobs:
2525
run: pnpm install
2626
- name: Lint
2727
run: pnpm biome ci .
28+
- name: Type check
29+
run: pnpm typecheck
30+
- name: Example type check
31+
run: pnpm typecheck
32+
working-directory: examples/UmbracoRichText
2833
- name: Install playwright
2934
run: pnpm exec playwright install
3035
- name: Test

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# We use Biome to format our code, so we ignore all files for Prettier
12
**/*.*
3+
# Biome doesn't format these files, so include them in Prettier
24
!**/*.md

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Charlie Tango <https://github.com/charlietango>
3+
Copyright (c) 2025 Charlie Tango <https://github.com/charlietango>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# react-umbraco
1+
# Umbraco Rich Text
22

33
[![npm version][npm-version-src]][npm-version-href]
44
[![License][license-src]][license-href]
@@ -8,11 +8,11 @@ A collection of React components for working with the Umbraco
88

99
## Install
1010

11-
Install the `@charlietango/react-umbraco` package with your package manager of
12-
choice.
11+
Install the `@charlietango/umbraco-rich-text` package with your package manager
12+
of choice.
1313

1414
```sh
15-
npm install @charlietango/react-umbraco
15+
npm install @charlietango/umbraco-rich-text
1616
```
1717

1818
## `<UmbracoRichText>`
@@ -50,7 +50,7 @@ import {
5050
UmbracoRichText,
5151
RenderBlockContext,
5252
RenderNodeContext,
53-
} from "@charlietango/react-umbraco";
53+
} from "@charlietango/umbraco-rich-text";
5454
import Image from "next/image";
5555
import Link from "next/link";
5656

@@ -117,7 +117,7 @@ import { components } from "@/openapi/umbraco";
117117
// Define the intermediate interface
118118
type ApiBlockItemModel = components["schemas"]["ApiBlockItemModel"];
119119

120-
declare module "@charlietango/react-umbraco" {
120+
declare module "@charlietango/umbraco-rich-text" {
121121
interface UmbracoBlockItemModel extends ApiBlockItemModel {}
122122
}
123123
```
@@ -146,7 +146,7 @@ can be useful for generating meta descriptions or other text-based properties.
146146
### Example
147147

148148
```ts
149-
import { richTextToPlainText } from "@charlietango/react-umbraco";
149+
import { richTextToPlainText } from "@charlietango/umbraco-rich-text";
150150

151151
const plainText = richTextToPlainText(richTextData);
152152

@@ -169,8 +169,8 @@ const ignoreTags = richTextToPlainText(richTextData, {
169169
<!-- Badges -->
170170

171171
[npm-version-src]:
172-
https://img.shields.io/npm/v/@charlietango/react-umbraco?style=flat&colorA=080f12&colorB=1fa669
173-
[npm-version-href]: https://npmjs.com/package/@charlietango/react-umbraco
172+
https://img.shields.io/npm/v/@charlietango/umbraco-rich-text?style=flat&colorA=080f12&colorB=1fa669
173+
[npm-version-href]: https://npmjs.com/package/@charlietango/umbraco-rich-text
174174
[license-src]:
175175
https://img.shields.io/github/license/charlie-tango/react-umbraco.svg?style=flat&colorA=080f12&colorB=1fa669
176176
[license-href]: https://github.com/charlie-tango/react-umbraco/blob/main/LICENSE
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
{
2-
"name": "react-umbraco-example",
2+
"name": "@charlietango/umbraco-rich-text--example",
33
"private": true,
44
"type": "module",
55
"scripts": {
66
"dev": "vite",
77
"build": "tsc && vite build",
8-
"preview": "vite preview"
8+
"preview": "vite preview",
9+
"typecheck": "tsc --noEmit"
910
},
1011
"dependencies": {
11-
"@charlietango/react-umbraco": "workspace:*",
12-
"react": "^19.1.0",
13-
"react-dom": "^19.1.0",
12+
"@charlietango/umbraco-rich-text": "workspace:*",
13+
"react": "^19.1.1",
14+
"react-dom": "^19.1.1",
1415
"react-lazy-load-image-component": "^1.6.3"
1516
},
1617
"devDependencies": {
1718
"@tailwindcss/typography": "^0.5.16",
1819
"@tailwindcss/vite": "^4.1.11",
19-
"@types/react": "^19.1.8",
20-
"@types/react-dom": "^19.1.6",
21-
"@vitejs/plugin-react": "^4.6.0",
20+
"@types/react": "^19.1.10",
21+
"@types/react-dom": "^19.1.7",
22+
"@vitejs/plugin-react": "^5.0.0",
2223
"tailwindcss": "^4.1.11",
23-
"typescript": "^5.8.3",
24-
"vite": "^7.0.5"
24+
"typescript": "^5.9.2",
25+
"vite": "^7.1.2"
2526
}
2627
}

examples/UmbracoRichText/src/RichText.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
2-
type UmbracoBlockContext,
2+
type RenderBlockContext,
33
type RenderNodeContext,
44
UmbracoRichText,
5-
} from '@charlietango/react-umbraco';
5+
} from '@charlietango/umbraco-rich-text';
66

77
// replace with ApiBlockItemModel from your own Umbraco API openapi docs for type safety
88
interface ApiBlockItemModel {
@@ -14,7 +14,7 @@ interface ApiBlockItemModel {
1414
};
1515
}
1616

17-
declare module '@charlietango/react-umbraco' {
17+
declare module '@charlietango/umbraco-rich-text' {
1818
interface UmbracoBlockItemModel extends ApiBlockItemModel {}
1919
}
2020

@@ -42,7 +42,7 @@ function exhaustiveGuard(value: never): never {
4242
// provide handling of rendering blocks from Umbraco
4343
function renderBlock({
4444
content,
45-
}: UmbracoBlockContext): React.ReactNode | undefined {
45+
}: RenderBlockContext): React.ReactNode | undefined {
4646
if (!content) return undefined;
4747

4848
// discriminating on content.id ensures correct typing for the content properties based on the defined ApiBlockItemModel

package.json

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
2-
"name": "@charlietango/react-umbraco",
2+
"name": "@charlietango/umbraco-rich-text",
33
"private": false,
44
"type": "module",
55
"version": "0.6.0",
6-
"packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39",
7-
"description": "React components for working with Umbraco Headless",
6+
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
7+
"description": "React component for working with rich text from the Umbraco Content Delivery API.",
88
"author": "Charlie Tango",
99
"license": "MIT",
10-
"homepage": "https://github.com/charlie-tango/react-umbraco#readme",
10+
"homepage": "https://github.com/charlie-tango/umbraco-rich-text#readme",
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/charlie-tango/react-umbraco.git"
13+
"url": "git+https://github.com/charlie-tango/umbraco-rich-text.git"
1414
},
15-
"bugs": "https://github.com/charlie-tango/react-umbraco/issues",
15+
"bugs": "https://github.com/charlie-tango/umbraco-rich-text/issues",
1616
"keywords": [
1717
"umbraco",
1818
"react",
19+
"rich text",
1920
"content delivery api",
2021
"headless cms"
2122
],
@@ -52,7 +53,7 @@
5253
"prepare": "simple-git-hooks"
5354
},
5455
"stackblitz": {
55-
"startCommand": "pnpm build && pnpm --filter=react-umbraco-example dev"
56+
"startCommand": "pnpm build && pnpm --filter=umbraco-rich-text-example dev"
5657
},
5758
"dependencies": {
5859
"html-entities": "^2.6.0"
@@ -61,25 +62,25 @@
6162
"react": "^18.0.0 || ^19.0.0"
6263
},
6364
"devDependencies": {
64-
"@biomejs/biome": "^2.1.1",
65-
"@types/node": "^24.0.14",
66-
"@types/react": "^19.1.8",
67-
"@types/react-dom": "^19.1.6",
68-
"@vitejs/plugin-react": "^4.6.0",
65+
"@biomejs/biome": "^2.1.4",
66+
"@types/node": "^24.2.1",
67+
"@types/react": "^19.1.10",
68+
"@types/react-dom": "^19.1.7",
69+
"@vitejs/plugin-react": "^5.0.0",
6970
"@vitest/browser": "^3.2.4",
70-
"bumpp": "^10.2.0",
71-
"lint-staged": "^16.1.2",
72-
"playwright": "^1.54.1",
71+
"bumpp": "^10.2.3",
72+
"lint-staged": "^16.1.5",
73+
"playwright": "^1.54.2",
7374
"prettier": "^3.6.2",
74-
"react": "^19.1.0",
75-
"react-dom": "^19.1.0",
75+
"react": "^19.1.1",
76+
"react-dom": "^19.1.1",
7677
"rimraf": "^6.0.1",
77-
"simple-git-hooks": "^2.13.0",
78-
"typescript": "^5.8.3",
79-
"unbuild": "^3.5.0",
80-
"vite": "^7.0.5",
78+
"simple-git-hooks": "^2.13.1",
79+
"typescript": "^5.9.2",
80+
"unbuild": "^3.6.0",
81+
"vite": "^7.1.2",
8182
"vitest": "^3.2.4",
82-
"vitest-browser-react": "^1.0.0"
83+
"vitest-browser-react": "^1.0.1"
8384
},
8485
"simple-git-hooks": {
8586
"pre-commit": "pnpm lint-staged"

0 commit comments

Comments
 (0)