@readme/markdown 15.0.0 → 15.0.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/components/Tabs/style.scss +4 -0
- package/dist/lib/ast-processor.d.ts +1 -0
- package/dist/lib/utils/literal-expression.d.ts +16 -0
- package/dist/lib/utils/mdxish/mdxish-variables.d.ts +1 -1
- package/dist/main.css +1 -1
- package/dist/main.css.map +1 -1
- package/dist/main.js +559 -139
- package/dist/main.node.js +559 -139
- package/dist/main.node.js.map +1 -1
- package/dist/processor/transform/flatten-attribute-expressions.d.ts +11 -0
- package/dist/processor/transform/index.d.ts +2 -1
- package/dist/render-fixture.css +1 -1
- package/dist/render-fixture.css.map +1 -1
- package/dist/render-fixture.node.js +559 -139
- package/dist/render-fixture.node.js.map +1 -1
- package/dist/utils/user.d.ts +15 -2
- package/package.json +3 -2
- package/types.d.ts +1 -1
package/dist/utils/user.d.ts
CHANGED
|
@@ -4,7 +4,20 @@ interface Default {
|
|
|
4
4
|
}
|
|
5
5
|
export interface Variables {
|
|
6
6
|
defaults: Default[];
|
|
7
|
-
user: Record<string,
|
|
7
|
+
user: Record<string, unknown>;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Coerce a user variable value to a string for substitution into markdown text.
|
|
11
|
+
* Non-string values (arrays, objects, numbers) are stringified via JSON or `String()`
|
|
12
|
+
* so that `<<var>>` syntax doesn't produce `[object Object]` for structured data like
|
|
13
|
+
* JWT `keys`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const stringifyVariableValue: (value: unknown) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Flatten `variables.user` into a string-keyed string-valued record by coercing
|
|
18
|
+
* each value. Used by markdown substitution paths that need a plain
|
|
19
|
+
* `Record<string, string>` lookup.
|
|
20
|
+
*/
|
|
21
|
+
export declare const flattenUserVariables: (user: Record<string, unknown>) => Record<string, string>;
|
|
22
|
+
declare const User: (variables?: Variables) => Record<string, unknown>;
|
|
10
23
|
export default User;
|
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.0.
|
|
5
|
+
"version": "15.0.2",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"browser": "dist/main.js",
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
"micromark-extension-mdxjs-esm": "^3.0.0",
|
|
81
81
|
"micromark-util-character": "^2.1.1",
|
|
82
82
|
"micromark-util-html-tag-name": "^2.0.1",
|
|
83
|
+
"micromark-util-subtokenize": "2.0.4",
|
|
83
84
|
"micromark-util-symbol": "^2.0.1",
|
|
84
85
|
"path-browserify": "^1.0.1",
|
|
85
86
|
"postcss": "^8.5.1",
|
|
@@ -197,7 +198,7 @@
|
|
|
197
198
|
},
|
|
198
199
|
{
|
|
199
200
|
"path": "dist/main.node.js",
|
|
200
|
-
"maxSize": "
|
|
201
|
+
"maxSize": "980KB"
|
|
201
202
|
},
|
|
202
203
|
{
|
|
203
204
|
"path": "dist/render-diff.node.js",
|
package/types.d.ts
CHANGED