@readme/markdown 15.2.1 → 15.4.0
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/README.md +1 -0
- package/components/TailwindStyle/index.tsx +5 -2
- package/dist/components/TailwindStyle/index.d.ts +3 -1
- package/dist/lib/mdxish.d.ts +9 -0
- package/dist/main.js +73 -34
- package/dist/main.node.js +73 -34
- package/dist/main.node.js.map +1 -1
- package/dist/processor/transform/mdxish/magic-blocks/patterns.d.ts +3 -0
- package/dist/processor/transform/mdxish/magic-blocks/types.d.ts +1 -0
- package/dist/render-fixture.node.js +73 -34
- package/dist/render-fixture.node.js.map +1 -1
- package/dist/utils/common-html-words.d.ts +9 -2
- package/dist/utils/tailwind-compiler.d.ts +13 -1
- package/package.json +2 -1
|
@@ -17,8 +17,15 @@ export declare const CUSTOM_PROP_BOUNDARIES: string[];
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const RUNTIME_COMPONENT_TAGS: Set<string>;
|
|
19
19
|
/**
|
|
20
|
-
* Standard HTML tags
|
|
21
|
-
*
|
|
20
|
+
* Standard HTML tags list.
|
|
21
|
+
* A use case of this is to differentiate custom components tag vs standard HTML tags.
|
|
22
|
+
*
|
|
23
|
+
* Unioned from:
|
|
24
|
+
* - `html-tags`: All modern spec HTML elements
|
|
25
|
+
* - parse5's `TAG_NAMES`: Elements the HTML tree-construction algorithm has to special-case
|
|
26
|
+
* This includes obsolete tags that are still rendered by browsers.
|
|
27
|
+
* - NON_STANDARD_TAGS: We've had to filter because currently parse5's `TAG_NAMES` set over-enumerates
|
|
28
|
+
* tags that are not actually standard HTML tags. It also allows custom tags to be filtered out.
|
|
22
29
|
*/
|
|
23
30
|
export declare const STANDARD_HTML_TAGS: Set<string>;
|
|
24
31
|
/**
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import postcss from 'postcss';
|
|
2
|
-
export declare function tailwindCompiler(classes: string[], { prefix, darkModeDataAttribute }: {
|
|
2
|
+
export declare function tailwindCompiler(classes: string[], { prefix, darkModeDataAttribute, darkModeRootSelector, }: {
|
|
3
3
|
darkModeDataAttribute?: string | null;
|
|
4
|
+
/**
|
|
5
|
+
* Scopes the `dark:` variant to `darkModeRootSelector[darkModeDataAttribute=dark]`
|
|
6
|
+
* (self or descendant) instead of matching `[darkModeDataAttribute=dark]` on *any*
|
|
7
|
+
* ancestor. Matches `when-color-mode-dark($root)` in `styles/mixins/when-color-mode-dark.scss`
|
|
8
|
+
* — see that mixin's doc comment for the full rationale (two independent
|
|
9
|
+
* `data-color-mode` scopes on one page, e.g. readme's SuperHub admin shell vs. the
|
|
10
|
+
* hub content it's previewing) and why there's no default: this package ships one
|
|
11
|
+
* precompiled stylesheet, so whatever a caller passes is permanent for every
|
|
12
|
+
* installer, and readme (this package's only real consumer today) is expected to
|
|
13
|
+
* pass its hub color-mode root, `.rm-ReadMe`.
|
|
14
|
+
*/
|
|
15
|
+
darkModeRootSelector?: string | null;
|
|
4
16
|
prefix: string;
|
|
5
17
|
}): Promise<postcss.Result<postcss.Root>>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@readme/markdown",
|
|
3
3
|
"description": "ReadMe's React-based Markdown parser",
|
|
4
4
|
"author": "Rafe Goldberg <rafe@readme.io>",
|
|
5
|
-
"version": "15.
|
|
5
|
+
"version": "15.4.0",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"browser": "dist/main.js",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"micromark-util-html-tag-name": "^2.0.1",
|
|
83
83
|
"micromark-util-subtokenize": "2.0.4",
|
|
84
84
|
"micromark-util-symbol": "^2.0.1",
|
|
85
|
+
"parse5": "^7.3.0",
|
|
85
86
|
"path-browserify": "^1.0.1",
|
|
86
87
|
"postcss": "^8.5.10",
|
|
87
88
|
"postcss-prefix-selector": "^2.1.0",
|