@bettercms-ai/richtext 0.8.1 → 0.8.2
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.
- package/package.json +1 -1
- package/src/styled.ts +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bettercms-ai/richtext",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "The one Portable Text contract for BetterCMS: schema, converters, and rendering. Shared by the backend, the dashboard and every delivery SDK.",
|
package/src/styled.ts
CHANGED
|
@@ -36,8 +36,14 @@ export const STYLED_TAGS = [
|
|
|
36
36
|
"strong", "b", "em", "i", "u", "s", "mark", "code", "q", "cite", "dfn", "var", "samp", "ins", "del",
|
|
37
37
|
] as const;
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Tags whose bare form IS the design, so they are annotated even with no class: every styled tag
|
|
41
|
+
* that is neither a `<span>` nor a tag a decorator already holds. A keycap, a citation or a
|
|
42
|
+
* deleted price dropped to bare words is the page restyled by the author's first save.
|
|
43
|
+
*/
|
|
44
|
+
export const BARE_IS_DESIGN: ReadonlySet<string> = new Set([
|
|
45
|
+
"small", "sup", "sub", "kbd", "abbr", "time", "q", "cite", "dfn", "var", "samp", "ins", "del",
|
|
46
|
+
]);
|
|
41
47
|
|
|
42
48
|
export type StyledTag = (typeof STYLED_TAGS)[number];
|
|
43
49
|
|