@apify/ui-library 0.57.3 → 0.59.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/.eslintrc +1 -0
- package/CHANGELOG.md +22 -0
- package/dist/src/components/action_link.d.ts +1 -1
- package/dist/src/components/action_link.d.ts.map +1 -1
- package/dist/src/components/{action_link.jsx → action_link.js} +6 -12
- package/dist/src/components/action_link.js.map +1 -0
- package/dist/src/components/{actor_template_card.jsx → actor_template_card.js} +5 -13
- package/dist/src/components/actor_template_card.js.map +1 -0
- package/dist/src/components/badge.d.ts +1 -1
- package/dist/src/components/badge.d.ts.map +1 -1
- package/dist/src/components/{badge.jsx → badge.js} +5 -7
- package/dist/src/components/badge.js.map +1 -0
- package/dist/src/components/{banner.jsx → banner.js} +3 -5
- package/dist/src/components/banner.js.map +1 -0
- package/dist/src/components/blog_article.d.ts +1 -1
- package/dist/src/components/blog_article.d.ts.map +1 -1
- package/dist/src/components/{blog_article.jsx → blog_article.js} +3 -7
- package/dist/src/components/blog_article.js.map +1 -0
- package/dist/src/components/{box.jsx → box.js} +4 -3
- package/dist/src/components/box.js.map +1 -0
- package/dist/src/components/button.d.ts +2 -2
- package/dist/src/components/button.d.ts.map +1 -1
- package/dist/src/components/{button.jsx → button.js} +12 -19
- package/dist/src/components/button.js.map +1 -0
- package/dist/src/components/chip.d.ts +1 -1
- package/dist/src/components/chip.d.ts.map +1 -1
- package/dist/src/components/{chip.jsx → chip.js} +9 -8
- package/dist/src/components/chip.js.map +1 -0
- package/dist/src/components/code/action_button.d.ts +2 -2
- package/dist/src/components/code/action_button.d.ts.map +1 -1
- package/dist/src/components/code/{action_button.jsx → action_button.js} +4 -8
- package/dist/src/components/code/action_button.js.map +1 -0
- package/dist/src/components/code/code_block/code_block.d.ts +2 -2
- package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block.js +69 -0
- package/dist/src/components/code/code_block/code_block.js.map +1 -0
- package/dist/src/components/code/code_block/code_block.styled.d.ts +2 -2
- package/dist/src/components/code/code_block/code_block.styled.d.ts.map +1 -1
- package/dist/src/components/code/code_block/{code_block.styled.jsx → code_block.styled.js} +2 -2
- package/dist/src/components/code/code_block/code_block.styled.js.map +1 -0
- package/dist/src/components/code/index.d.ts +3 -3
- package/dist/src/components/code/index.d.ts.map +1 -1
- package/dist/src/components/code/index.js +3 -3
- package/dist/src/components/code/index.js.map +1 -1
- package/dist/src/components/code/inline_code/inline_code.d.ts +2 -2
- package/dist/src/components/code/inline_code/inline_code.d.ts.map +1 -1
- package/dist/src/components/code/inline_code/{inline_code.jsx → inline_code.js} +3 -7
- package/dist/src/components/code/inline_code/inline_code.js.map +1 -0
- package/dist/src/components/code/one_line_code/one_line_code.d.ts +3 -4
- package/dist/src/components/code/one_line_code/one_line_code.d.ts.map +1 -1
- package/dist/src/components/code/one_line_code/{one_line_code.jsx → one_line_code.js} +6 -26
- package/dist/src/components/code/one_line_code/one_line_code.js.map +1 -0
- package/dist/src/components/code/syntax_highlighter.d.ts +3 -4
- package/dist/src/components/code/syntax_highlighter.d.ts.map +1 -1
- package/dist/src/components/code/{syntax_highlighter.jsx → syntax_highlighter.js} +7 -8
- package/dist/src/components/code/syntax_highlighter.js.map +1 -0
- package/dist/src/components/{color_wheel_gradient.jsx → color_wheel_gradient.js} +1 -1
- package/dist/src/components/color_wheel_gradient.js.map +1 -0
- package/dist/src/components/floating/index.d.ts +3 -3
- package/dist/src/components/floating/index.d.ts.map +1 -1
- package/dist/src/components/floating/index.js +3 -3
- package/dist/src/components/floating/index.js.map +1 -1
- package/dist/src/components/floating/menu.d.ts +2 -2
- package/dist/src/components/floating/menu.d.ts.map +1 -1
- package/dist/src/components/floating/{menu.jsx → menu.js} +22 -34
- package/dist/src/components/floating/menu.js.map +1 -0
- package/dist/src/components/floating/{menu_common.jsx → menu_common.js} +1 -1
- package/dist/src/components/floating/menu_common.js.map +1 -0
- package/dist/src/components/floating/menu_components.d.ts +4 -5
- package/dist/src/components/floating/menu_components.d.ts.map +1 -1
- package/dist/src/components/floating/{menu_components.jsx → menu_components.js} +5 -7
- package/dist/src/components/floating/menu_components.js.map +1 -0
- package/dist/src/components/image.d.ts +2 -3
- package/dist/src/components/image.d.ts.map +1 -1
- package/dist/src/components/image.js +9 -0
- package/dist/src/components/image.js.map +1 -0
- package/dist/src/components/index.d.ts +14 -14
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +14 -14
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/link.d.ts +1 -1
- package/dist/src/components/link.d.ts.map +1 -1
- package/dist/src/components/{link.jsx → link.js} +9 -9
- package/dist/src/components/link.js.map +1 -0
- package/dist/src/components/message.d.ts +5 -5
- package/dist/src/components/message.d.ts.map +1 -1
- package/dist/src/components/{message.jsx → message.js} +9 -19
- package/dist/src/components/message.js.map +1 -0
- package/dist/src/components/rating.d.ts +1 -1
- package/dist/src/components/rating.d.ts.map +1 -1
- package/dist/src/components/{rating.jsx → rating.js} +10 -16
- package/dist/src/components/rating.js.map +1 -0
- package/dist/src/components/readme_renderer/index.d.ts +2 -2
- package/dist/src/components/readme_renderer/index.d.ts.map +1 -1
- package/dist/src/components/readme_renderer/index.js +2 -2
- package/dist/src/components/readme_renderer/index.js.map +1 -1
- package/dist/src/components/readme_renderer/table_of_contents.d.ts +1 -1
- package/dist/src/components/readme_renderer/{table_of_contents.jsx → table_of_contents.js} +44 -49
- package/dist/src/components/readme_renderer/{table_of_contents.jsx.map → table_of_contents.js.map} +1 -1
- package/dist/src/components/readme_renderer/{utils.jsx → utils.js} +1 -1
- package/dist/src/components/readme_renderer/utils.js.map +1 -0
- package/dist/src/components/simple_markdown/index.d.ts +2 -2
- package/dist/src/components/simple_markdown/index.d.ts.map +1 -1
- package/dist/src/components/simple_markdown/index.js +2 -2
- package/dist/src/components/simple_markdown/index.js.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown.d.ts +1 -1
- package/dist/src/components/simple_markdown/simple_markdown.d.ts.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown.js +161 -0
- package/dist/src/components/simple_markdown/simple_markdown.js.map +1 -0
- package/dist/src/components/simple_markdown/simple_markdown_components.d.ts +4 -4
- package/dist/src/components/simple_markdown/simple_markdown_components.d.ts.map +1 -1
- package/dist/src/components/simple_markdown/{simple_markdown_components.jsx → simple_markdown_components.js} +13 -26
- package/dist/src/components/simple_markdown/simple_markdown_components.js.map +1 -0
- package/dist/src/components/tag.d.ts +3 -3
- package/dist/src/components/tag.d.ts.map +1 -1
- package/dist/src/components/{tag.jsx → tag.js} +6 -9
- package/dist/src/components/tag.js.map +1 -0
- package/dist/src/components/text/heading_content.d.ts +1 -1
- package/dist/src/components/text/heading_content.d.ts.map +1 -1
- package/dist/src/components/text/{heading_content.jsx → heading_content.js} +4 -4
- package/dist/src/components/text/heading_content.js.map +1 -0
- package/dist/src/components/text/heading_marketing.d.ts +1 -1
- package/dist/src/components/text/heading_marketing.d.ts.map +1 -1
- package/dist/src/components/text/{heading_marketing.jsx → heading_marketing.js} +4 -4
- package/dist/src/components/text/heading_marketing.js.map +1 -0
- package/dist/src/components/text/heading_shared.d.ts +1 -1
- package/dist/src/components/text/heading_shared.d.ts.map +1 -1
- package/dist/src/components/text/{heading_shared.jsx → heading_shared.js} +4 -4
- package/dist/src/components/text/heading_shared.js.map +1 -0
- package/dist/src/components/text/index.d.ts +8 -8
- package/dist/src/components/text/index.d.ts.map +1 -1
- package/dist/src/components/text/index.js +7 -7
- package/dist/src/components/text/index.js.map +1 -1
- package/dist/src/components/text/text_base.d.ts +1 -1
- package/dist/src/components/text/text_base.d.ts.map +1 -1
- package/dist/src/components/text/{text_base.jsx → text_base.js} +4 -4
- package/dist/src/components/text/text_base.js.map +1 -0
- package/dist/src/components/text/text_content.d.ts +2 -3
- package/dist/src/components/text/text_content.d.ts.map +1 -1
- package/dist/src/components/text/{text_content.jsx → text_content.js} +10 -9
- package/dist/src/components/text/text_content.js.map +1 -0
- package/dist/src/components/text/text_marketing.d.ts +2 -3
- package/dist/src/components/text/text_marketing.d.ts.map +1 -1
- package/dist/src/components/text/{text_marketing.jsx → text_marketing.js} +10 -9
- package/dist/src/components/text/text_marketing.js.map +1 -0
- package/dist/src/components/text/text_shared.d.ts +2 -3
- package/dist/src/components/text/text_shared.d.ts.map +1 -1
- package/dist/src/components/text/{text_shared.jsx → text_shared.js} +10 -9
- package/dist/src/components/text/text_shared.js.map +1 -0
- package/dist/src/components/tile/{horizontal_tile.jsx → horizontal_tile.js} +3 -7
- package/dist/src/components/tile/horizontal_tile.js.map +1 -0
- package/dist/src/components/tile/index.d.ts +2 -2
- package/dist/src/components/tile/index.d.ts.map +1 -1
- package/dist/src/components/tile/index.js +2 -2
- package/dist/src/components/tile/index.js.map +1 -1
- package/dist/src/components/tile/{vertical_tile.jsx → vertical_tile.js} +3 -5
- package/dist/src/components/tile/vertical_tile.js.map +1 -0
- package/dist/src/components/to_consolidate/card.d.ts +1 -1
- package/dist/src/components/to_consolidate/card.d.ts.map +1 -1
- package/dist/src/components/to_consolidate/{card.jsx → card.js} +5 -13
- package/dist/src/components/to_consolidate/card.js.map +1 -0
- package/dist/src/components/to_consolidate/index.d.ts +4 -4
- package/dist/src/components/to_consolidate/index.d.ts.map +1 -1
- package/dist/src/components/to_consolidate/index.js +4 -4
- package/dist/src/components/to_consolidate/index.js.map +1 -1
- package/dist/src/components/to_consolidate/markdown.d.ts +1 -1
- package/dist/src/components/to_consolidate/markdown.d.ts.map +1 -1
- package/dist/src/components/to_consolidate/{markdown.jsx → markdown.js} +21 -33
- package/dist/src/components/to_consolidate/markdown.js.map +1 -0
- package/dist/src/components/to_consolidate/{pagination.jsx → pagination.js} +14 -27
- package/dist/src/components/to_consolidate/pagination.js.map +1 -0
- package/dist/src/components/to_consolidate/{tab_number_chip.jsx → tab_number_chip.js} +3 -5
- package/dist/src/components/to_consolidate/tab_number_chip.js.map +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/{ui_dependency_provider.jsx → ui_dependency_provider.js} +4 -5
- package/dist/src/ui_dependency_provider.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/src/components/action_link.tsx +2 -2
- package/src/components/actor_template_card.tsx +1 -1
- package/src/components/badge.tsx +1 -1
- package/src/components/button.tsx +3 -3
- package/src/components/chip.tsx +1 -1
- package/src/components/code/code_block/code_block.styled.tsx +2 -2
- package/src/components/code/code_block/code_block.tsx +6 -6
- package/src/components/code/index.ts +3 -3
- package/src/components/code/inline_code/inline_code.tsx +2 -2
- package/src/components/code/one_line_code/one_line_code.tsx +6 -6
- package/src/components/code/syntax_highlighter.tsx +4 -4
- package/src/components/floating/index.ts +3 -3
- package/src/components/floating/menu.tsx +3 -3
- package/src/components/floating/menu_components.tsx +2 -2
- package/src/components/image.tsx +3 -3
- package/src/components/index.ts +14 -14
- package/src/components/link.tsx +2 -2
- package/src/components/message.tsx +2 -2
- package/src/components/rating.tsx +3 -3
- package/src/components/readme_renderer/index.ts +2 -2
- package/src/components/readme_renderer/table_of_contents.tsx +2 -2
- package/src/components/simple_markdown/index.ts +2 -2
- package/src/components/simple_markdown/simple_markdown.tsx +45 -12
- package/src/components/simple_markdown/simple_markdown_components.tsx +6 -6
- package/src/components/tag.tsx +2 -2
- package/src/components/text/heading_content.tsx +2 -2
- package/src/components/text/heading_marketing.tsx +2 -2
- package/src/components/text/heading_shared.tsx +2 -2
- package/src/components/text/index.ts +8 -8
- package/src/components/text/text_base.tsx +2 -2
- package/src/components/text/text_content.tsx +3 -3
- package/src/components/text/text_marketing.tsx +3 -3
- package/src/components/text/text_shared.tsx +3 -3
- package/src/components/tile/index.ts +2 -2
- package/src/components/to_consolidate/card.tsx +2 -2
- package/src/components/to_consolidate/index.ts +4 -4
- package/src/components/to_consolidate/markdown.tsx +1 -1
- package/src/components/to_consolidate/pagination.tsx +3 -3
- package/src/index.ts +1 -1
- package/tsconfig.build.json +1 -1
- package/tsconfig.json +1 -1
- package/dist/src/components/action_link.jsx.map +0 -1
- package/dist/src/components/actor_template_card.jsx.map +0 -1
- package/dist/src/components/badge.jsx.map +0 -1
- package/dist/src/components/banner.jsx.map +0 -1
- package/dist/src/components/blog_article.jsx.map +0 -1
- package/dist/src/components/box.jsx.map +0 -1
- package/dist/src/components/button.jsx.map +0 -1
- package/dist/src/components/chip.jsx.map +0 -1
- package/dist/src/components/code/action_button.jsx.map +0 -1
- package/dist/src/components/code/code_block/code_block.jsx +0 -99
- package/dist/src/components/code/code_block/code_block.jsx.map +0 -1
- package/dist/src/components/code/code_block/code_block.styled.jsx.map +0 -1
- package/dist/src/components/code/inline_code/inline_code.jsx.map +0 -1
- package/dist/src/components/code/one_line_code/one_line_code.jsx.map +0 -1
- package/dist/src/components/code/syntax_highlighter.jsx.map +0 -1
- package/dist/src/components/color_wheel_gradient.jsx.map +0 -1
- package/dist/src/components/floating/menu.jsx.map +0 -1
- package/dist/src/components/floating/menu_common.jsx.map +0 -1
- package/dist/src/components/floating/menu_components.jsx.map +0 -1
- package/dist/src/components/image.jsx +0 -8
- package/dist/src/components/image.jsx.map +0 -1
- package/dist/src/components/link.jsx.map +0 -1
- package/dist/src/components/message.jsx.map +0 -1
- package/dist/src/components/rating.jsx.map +0 -1
- package/dist/src/components/readme_renderer/utils.jsx.map +0 -1
- package/dist/src/components/simple_markdown/simple_markdown.jsx +0 -137
- package/dist/src/components/simple_markdown/simple_markdown.jsx.map +0 -1
- package/dist/src/components/simple_markdown/simple_markdown_components.jsx.map +0 -1
- package/dist/src/components/tag.jsx.map +0 -1
- package/dist/src/components/text/heading_content.jsx.map +0 -1
- package/dist/src/components/text/heading_marketing.jsx.map +0 -1
- package/dist/src/components/text/heading_shared.jsx.map +0 -1
- package/dist/src/components/text/text_base.jsx.map +0 -1
- package/dist/src/components/text/text_content.jsx.map +0 -1
- package/dist/src/components/text/text_marketing.jsx.map +0 -1
- package/dist/src/components/text/text_shared.jsx.map +0 -1
- package/dist/src/components/tile/horizontal_tile.jsx.map +0 -1
- package/dist/src/components/tile/vertical_tile.jsx.map +0 -1
- package/dist/src/components/to_consolidate/card.jsx.map +0 -1
- package/dist/src/components/to_consolidate/markdown.jsx.map +0 -1
- package/dist/src/components/to_consolidate/pagination.jsx.map +0 -1
- package/dist/src/components/to_consolidate/tab_number_chip.jsx.map +0 -1
- package/dist/src/ui_dependency_provider.jsx.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export * from './text/index.js';
|
|
2
|
-
export * from './box.
|
|
3
|
-
export * from './message.
|
|
2
|
+
export * from './box.js';
|
|
3
|
+
export * from './message.js';
|
|
4
4
|
export * from './floating/index.js';
|
|
5
|
-
export * from './button.
|
|
6
|
-
export * from './link.
|
|
7
|
-
export * from './action_link.
|
|
5
|
+
export * from './button.js';
|
|
6
|
+
export * from './link.js';
|
|
7
|
+
export * from './action_link.js';
|
|
8
8
|
export * from './simple_markdown/index.js';
|
|
9
9
|
export * from './code/index.js';
|
|
10
|
-
export * from './color_wheel_gradient.
|
|
10
|
+
export * from './color_wheel_gradient.js';
|
|
11
11
|
export * from './readme_renderer/index.js';
|
|
12
12
|
export * from './to_consolidate/index.js';
|
|
13
13
|
export * from './tile/index.js';
|
|
14
|
-
export * from './blog_article.
|
|
15
|
-
export * from './banner.
|
|
16
|
-
export * from './actor_template_card.
|
|
17
|
-
export * from './chip.
|
|
18
|
-
export * from './image.
|
|
19
|
-
export * from './rating.
|
|
20
|
-
export * from './badge.
|
|
21
|
-
export * from './tag.
|
|
14
|
+
export * from './blog_article.js';
|
|
15
|
+
export * from './banner.js';
|
|
16
|
+
export * from './actor_template_card.js';
|
|
17
|
+
export * from './chip.js';
|
|
18
|
+
export * from './image.js';
|
|
19
|
+
export * from './rating.js';
|
|
20
|
+
export * from './badge.js';
|
|
21
|
+
export * from './tag.js';
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/components/link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/components/link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,MAAM,EAAE,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACxC,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,EAAE,CAAC;IACP,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD;;GAEG;AACH,eAAO,MAAM,aAAa,QAAS,EAAE,sBAAsB,MAAM,YAIhE,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,UAAU,QAAS,EAAE,YAGjC,CAAC;AAsBF,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,QAAQ,CAAC;AAEpD,eAAO,MAAM,IAAI,+EAkDf,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import clsx from 'clsx';
|
|
2
3
|
import { createPath } from 'history';
|
|
3
|
-
import
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import styled from 'styled-components';
|
|
5
6
|
import { ExternalLinkIcon } from '@apify/ui-icons';
|
|
6
7
|
import { theme } from '../design_system/theme.js';
|
|
7
|
-
import { useSharedUiDependencies } from '../ui_dependency_provider.
|
|
8
|
-
import { Box } from './box.
|
|
8
|
+
import { useSharedUiDependencies } from '../ui_dependency_provider.js';
|
|
9
|
+
import { Box } from './box.js';
|
|
9
10
|
// TODO: This function is copied from tools.client.js. We can remove it from there once this is deployed
|
|
10
11
|
/**
|
|
11
12
|
* Checks if passed url is external
|
|
@@ -57,11 +58,10 @@ export const Link = forwardRef(({ to, children, rel, target, hideExternalIcon, s
|
|
|
57
58
|
onClick(e);
|
|
58
59
|
};
|
|
59
60
|
const effectiveRel = clsx(rel, isExternal && 'external', (isExternal || target === '_blank') && 'noopener noreferrer', (isExternal && !isTrusted) && 'nofollow');
|
|
60
|
-
return (
|
|
61
|
+
return (_jsxs(StyledLink
|
|
61
62
|
// We use the InternalLink only for internal navigation
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</StyledLink>);
|
|
63
|
+
, {
|
|
64
|
+
// We use the InternalLink only for internal navigation
|
|
65
|
+
forwardedAs: (isEmail || isExternal) ? 'a' : InternalLink, href: href, rel: effectiveRel, target: target || (isExternal ? '_blank' : '_self'), onClick: trackedOnClick, ref: ref, ...rest, children: [children, ((isExternal && !hideExternalIcon) || showExternalIcon) && _jsx(ExternalLinkIcon, { size: "16" })] }));
|
|
66
66
|
});
|
|
67
|
-
//# sourceMappingURL=link.
|
|
67
|
+
//# sourceMappingURL=link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/components/link.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAa,MAAM,SAAS,CAAC;AAChD,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,GAAG,EAAiB,MAAM,UAAU,CAAC;AAa9C,wGAAwG;AACxG;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAO,EAAE,kBAA0B,EAAE,EAAE;IACjE,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACpD,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAA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AC,IAAI,CAAC,CAAC;IAEtC,MAAM,cAAc,GAAG,CAAC,CAAmB,EAAE,EAAE;QAC3C,IAAI,UAAU,IAAI,UAAU;YAAE,UAAU,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QACnE,IAAI,OAAO;YAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,IAAI,CACrB,GAAG,EACH,UAAU,IAAI,UAAU,EACxB,CAAC,UAAU,IAAI,MAAM,KAAK,QAAQ,CAAC,IAAI,qBAAqB,EAC5D,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,IAAI,UAAU,CAC3C,CAAC;IAEF,OAAO,CACH,MAAC,UAAU;IACP,uDAAuD;;QAAvD,uDAAuD;QACvD,WAAW,EAAE,CAAC,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,EACzD,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,EACnD,OAAO,EAAE,cAAc,EACvB,GAAG,EAAE,GAAG,KACJ,IAAI,aAEP,QAAQ,EACR,CAAC,CAAC,UAAU,IAAI,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,CAAC,IAAI,KAAC,gBAAgB,IAAC,IAAI,EAAC,IAAI,GAAG,IACjF,CAChB,CAAC;AACN,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type BoxProps } from './box.
|
|
2
|
+
import { type BoxProps } from './box.js';
|
|
3
3
|
export declare const messageClassNames: {
|
|
4
4
|
main: string;
|
|
5
5
|
icon: string;
|
|
@@ -23,9 +23,9 @@ type MessageProps = BoxProps & {
|
|
|
23
23
|
*/
|
|
24
24
|
export declare const Message: React.FC<MessageProps>;
|
|
25
25
|
type SpecificMessageProps = Omit<MessageProps, 'type'>;
|
|
26
|
-
export declare const InfoMessage: (props: SpecificMessageProps) =>
|
|
27
|
-
export declare const WarningMessage: (props: SpecificMessageProps) =>
|
|
28
|
-
export declare const SuccessMessage: (props: SpecificMessageProps) =>
|
|
29
|
-
export declare const DangerMessage: (props: SpecificMessageProps) =>
|
|
26
|
+
export declare const InfoMessage: (props: SpecificMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const WarningMessage: (props: SpecificMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const SuccessMessage: (props: SpecificMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const DangerMessage: (props: SpecificMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export {};
|
|
31
31
|
//# sourceMappingURL=message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/components/message.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/components/message.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAI9C,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC;AAiEF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AASpE,KAAK,YAAY,GAAG,QAAQ,GAAG;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAwC1C,CAAC;AAEF,KAAK,oBAAoB,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,WAAW,UAAW,oBAAoB,4CAAyC,CAAC;AACjG,eAAO,MAAM,cAAc,UAAW,oBAAoB,4CAA4C,CAAC;AACvG,eAAO,MAAM,cAAc,UAAW,oBAAoB,4CAA4C,CAAC;AACvG,eAAO,MAAM,aAAa,UAAW,oBAAoB,4CAA2C,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import clsx from 'clsx';
|
|
2
|
-
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { CheckCircleIcon, CrossIcon, InfoIcon, WarningTriangleIcon } from '@apify/ui-icons';
|
|
5
5
|
import { theme } from '../design_system/theme.js';
|
|
6
|
-
import { Box } from './box.
|
|
7
|
-
import { Button } from './button.
|
|
6
|
+
import { Box } from './box.js';
|
|
7
|
+
import { Button } from './button.js';
|
|
8
8
|
import { Heading } from './text/index.js';
|
|
9
9
|
export const messageClassNames = {
|
|
10
10
|
main: 'Message',
|
|
@@ -86,21 +86,11 @@ const typeToIcon = {
|
|
|
86
86
|
*/
|
|
87
87
|
export const Message = ({ className, icon, caption, children, onDismissClick, type = 'warning', borderless = false, boxless = false, dismissTrackingId, as, ...rest }) => {
|
|
88
88
|
const Icon = icon || typeToIcon[type];
|
|
89
|
-
return (
|
|
90
|
-
p={boxless ? 'none' : 'space16'} forwardedAs={as} {...rest}>
|
|
91
|
-
<Icon className={messageClassNames.icon} size="20"/>
|
|
92
|
-
<div className={messageClassNames.content}>
|
|
93
|
-
{caption && (<Heading as='div' type='titleM' className={messageClassNames.caption}>{caption}</Heading>)}
|
|
94
|
-
{children}
|
|
95
|
-
</div>
|
|
96
|
-
{onDismissClick && (<Button size='small' variant='text' trackingId={dismissTrackingId} onClick={onDismissClick} className={messageClassNames.dismiss}>
|
|
97
|
-
<CrossIcon size="16"/>
|
|
98
|
-
</Button>)}
|
|
99
|
-
</StyledMessage>);
|
|
89
|
+
return (_jsxs(StyledMessage, { className: clsx(className, messageClassNames.main, type, borderless && 'borderless'), mb: boxless ? 'space8' : 'space16', p: boxless ? 'none' : 'space16', forwardedAs: as, ...rest, children: [_jsx(Icon, { className: messageClassNames.icon, size: "20" }), _jsxs("div", { className: messageClassNames.content, children: [caption && (_jsx(Heading, { as: 'div', type: 'titleM', className: messageClassNames.caption, children: caption })), children] }), onDismissClick && (_jsx(Button, { size: 'small', variant: 'text', trackingId: dismissTrackingId, onClick: onDismissClick, className: messageClassNames.dismiss, children: _jsx(CrossIcon, { size: "16" }) }))] }));
|
|
100
90
|
};
|
|
101
91
|
// Semantic classes for all the message types
|
|
102
|
-
export const InfoMessage = (props) => (
|
|
103
|
-
export const WarningMessage = (props) => (
|
|
104
|
-
export const SuccessMessage = (props) => (
|
|
105
|
-
export const DangerMessage = (props) => (
|
|
106
|
-
//# sourceMappingURL=message.
|
|
92
|
+
export const InfoMessage = (props) => (_jsx(Message, { ...props, type: 'info' }));
|
|
93
|
+
export const WarningMessage = (props) => (_jsx(Message, { ...props, type: 'warning' }));
|
|
94
|
+
export const SuccessMessage = (props) => (_jsx(Message, { ...props, type: 'success' }));
|
|
95
|
+
export const DangerMessage = (props) => (_jsx(Message, { ...props, type: 'danger' }));
|
|
96
|
+
//# sourceMappingURL=message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../src/components/message.tsx"],"names":[],"mappings":";AAAA,OA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;AAMhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../../src/components/rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAIzC,KAAK,gBAAgB,GAAG;IACpB,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;CAC5C,CAAA;AA0CD,KAAK,WAAW,GAAG,QAAQ,GAAG;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAmBlC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,GAAG,QAAQ,CAsBvD,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, useMemo } from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import { StarEmptyIcon, StarFullIcon, StarHalfIcon } from '@apify/ui-icons';
|
|
4
5
|
import { theme } from '../design_system/theme.js';
|
|
5
|
-
import { Box } from './box.
|
|
6
|
+
import { Box } from './box.js';
|
|
6
7
|
import { Text } from './text/index.js';
|
|
7
8
|
const StyledRating = styled(Box) `
|
|
8
9
|
display: flex;
|
|
@@ -45,26 +46,19 @@ export const Rating = ({ rating = 0, color = theme.color.neutral.icon, ...rest }
|
|
|
45
46
|
const ratingFloor = Math.floor(rating);
|
|
46
47
|
const ratingDecimals = rating % 1;
|
|
47
48
|
if (ratingFloor >= rate || (ratingFloor === rate - 1 && ratingDecimals > 0.75))
|
|
48
|
-
return
|
|
49
|
+
return _jsx(StarFullIcon, { size: "12", color: color }, rate);
|
|
49
50
|
if (ratingFloor === rate - 1 && ratingDecimals > 0.25)
|
|
50
|
-
return
|
|
51
|
-
return
|
|
51
|
+
return _jsx(StarHalfIcon, { size: "12", color: color }, rate);
|
|
52
|
+
return _jsx(StarEmptyIcon, { size: "12", color: color }, rate);
|
|
52
53
|
}), [rating, color]);
|
|
53
|
-
return (
|
|
54
|
-
{ratingStatsContent}
|
|
55
|
-
</StyledRating>);
|
|
54
|
+
return (_jsx(StyledRating, { ...rest, children: ratingStatsContent }));
|
|
56
55
|
};
|
|
57
56
|
export const RatingStats = ({ ratingStats, ...rest }) => {
|
|
58
57
|
const totalRates = ratingStats[1] + ratingStats[2] + ratingStats[3] + ratingStats[4] + ratingStats[5];
|
|
59
58
|
const ratingStatsContent = useMemo(() => [5, 4, 3, 2, 1].map((rate) => {
|
|
60
59
|
const widthPercent = totalRates > 0 ? ((ratingStats[rate] / totalRates) * 100) : 0;
|
|
61
|
-
return (
|
|
62
|
-
<Text color={theme.color.neutral.textSubtle}>{rate}</Text>
|
|
63
|
-
<StyledRatingBar $widthPercent={widthPercent}/>
|
|
64
|
-
</Fragment>);
|
|
60
|
+
return (_jsxs(Fragment, { children: [_jsx(Text, { color: theme.color.neutral.textSubtle, children: rate }), _jsx(StyledRatingBar, { "$widthPercent": widthPercent })] }, rate));
|
|
65
61
|
}), [totalRates, ratingStats]);
|
|
66
|
-
return (
|
|
67
|
-
{ratingStatsContent}
|
|
68
|
-
</StyledRatingStats>);
|
|
62
|
+
return (_jsx(StyledRatingStats, { ...rest, children: ratingStatsContent }));
|
|
69
63
|
};
|
|
70
|
-
//# sourceMappingURL=rating.
|
|
64
|
+
//# sourceMappingURL=rating.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rating.js","source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H,MAAC,QAAQ,eACL,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,YAAG,IAAI,GAAQ,EAC1D,KAAC,eAAe,qBAAgB,YAAY,GAAG,KAFpC,IAAI,CAGR,CACd,CAAC;IACN,CAAC,CAAC,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;IAE/B,OAAO,CACH,KAAC,iBAAiB,OAAK,IAAI,YACtB,kBAAkB,GACH,CACvB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useActorTitleHeadingFilter } from './utils.
|
|
1
|
+
export { useActorTitleHeadingFilter } from './utils.js';
|
|
2
2
|
export { default as pythonizeValue } from './pythonize_value.js';
|
|
3
|
-
export { default as TableOfContents } from './table_of_contents.
|
|
3
|
+
export { default as TableOfContents } from './table_of_contents.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/readme_renderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/readme_renderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useActorTitleHeadingFilter } from './utils.
|
|
1
|
+
export { useActorTitleHeadingFilter } from './utils.js';
|
|
2
2
|
export { default as pythonizeValue } from './pythonize_value.js';
|
|
3
|
-
export { default as TableOfContents } from './table_of_contents.
|
|
3
|
+
export { default as TableOfContents } from './table_of_contents.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/readme_renderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/readme_renderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -5,6 +5,6 @@ export interface TableOfContentsProps {
|
|
|
5
5
|
headingOffsetPx?: number;
|
|
6
6
|
allowElement?: AllowElement;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: React.MemoExoticComponent<({ markdown, headingOffsetPx, allowElement, ...rest }: TableOfContentsProps) =>
|
|
8
|
+
declare const _default: React.MemoExoticComponent<({ markdown, headingOffsetPx, allowElement, ...rest }: TableOfContentsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=table_of_contents.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import _ from 'lodash';
|
|
2
3
|
import React, { useMemo, useCallback, } from 'react';
|
|
3
4
|
import ReactMarkdown from 'react-markdown';
|
|
@@ -5,9 +6,9 @@ import remarkToc from 'remark-toc';
|
|
|
5
6
|
import styled from 'styled-components';
|
|
6
7
|
import { theme } from '../../design_system/theme.js';
|
|
7
8
|
import { inlineCodeStyles } from '../code/index.js';
|
|
8
|
-
import { Link } from '../link.
|
|
9
|
+
import { Link } from '../link.js';
|
|
9
10
|
import { Text } from '../text/index.js';
|
|
10
|
-
import { cleanMarkdown, slugifyHeadingChildren } from './utils.
|
|
11
|
+
import { cleanMarkdown, slugifyHeadingChildren } from './utils.js';
|
|
11
12
|
const TOC_HEADING_ID = 'Contents';
|
|
12
13
|
const StyledTOCLink = styled(Text) `
|
|
13
14
|
display: inline-block;
|
|
@@ -143,55 +144,49 @@ const TableOfContents = ({ markdown, headingOffsetPx = 10, allowElement, ...rest
|
|
|
143
144
|
}
|
|
144
145
|
scrollHandler(); // call for the first time so we select the first heading without scrolling
|
|
145
146
|
}, [headingOffsetPx]);
|
|
146
|
-
return (
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
147
|
+
return (_jsx(StyledTableOfContents, { ref: tocRef, ...rest, children: _jsx(ReactMarkdown, { allowElement: allowElement, remarkPlugins: [
|
|
148
|
+
[remarkToc, { heading: TOC_HEADING_ID, maxDepth: 3 }],
|
|
149
|
+
() => ({ children, ...nodeRest }) => {
|
|
150
|
+
// TOC plug-ins only inject content table to existing markdown documents - only generating it is not a common use-case
|
|
151
|
+
// To make is happen, we can just take the generated node where toc is located and throw away the rest.
|
|
152
|
+
// children[0] is the heading where toc is placed (that's plug-in's requirement)
|
|
153
|
+
// children[1] is the generated table of contents we can simply pick
|
|
154
|
+
let tocContentNode = children[1];
|
|
155
|
+
// If there is no H1 heading in the readme then assignHeadingLevelsRecursively does not work correctly.
|
|
156
|
+
// We need to 'normalize' the final node to have all the levels we expect
|
|
157
|
+
// - solution is to wrap the content in extra node that mimic this H1 group that remarkToc would normally create
|
|
158
|
+
if (!hasTopLevelHeading) {
|
|
159
|
+
tocContentNode = {
|
|
160
|
+
type: 'list',
|
|
161
|
+
ordered: false,
|
|
162
|
+
spread: false,
|
|
163
|
+
children: [
|
|
164
|
+
{
|
|
165
|
+
type: 'listItem',
|
|
166
|
+
spread: true,
|
|
167
|
+
children: [
|
|
168
|
+
tocContentNode,
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
...nodeRest,
|
|
163
176
|
children: [
|
|
164
|
-
|
|
165
|
-
type: 'listItem',
|
|
166
|
-
spread: true,
|
|
167
|
-
children: [
|
|
168
|
-
tocContentNode,
|
|
169
|
-
],
|
|
170
|
-
},
|
|
177
|
+
tocContentNode,
|
|
171
178
|
],
|
|
172
179
|
};
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
// in order to allow hiding blocks with h3 headings that are out of the viewport
|
|
184
|
-
assignHeadingLevelsRecursively(input.children[0], 1);
|
|
185
|
-
return input;
|
|
186
|
-
}]} components={{
|
|
187
|
-
a: ({ children }) => (<StyledTOCLink forwardedAs={Link} to={`#${slugifyHeadingChildren(children)}`} py={'space4'}>
|
|
188
|
-
{children}
|
|
189
|
-
</StyledTOCLink>),
|
|
190
|
-
code: ({ children }) => (<code className="inline-code">{children}</code>),
|
|
191
|
-
}}>
|
|
192
|
-
{cleanedMarkdown}
|
|
193
|
-
</ReactMarkdown>
|
|
194
|
-
</StyledTableOfContents>);
|
|
180
|
+
},
|
|
181
|
+
], rehypePlugins: [() => (input) => {
|
|
182
|
+
// this plug-in already works with html node representation so we can assign classNames that we need
|
|
183
|
+
// in order to allow hiding blocks with h3 headings that are out of the viewport
|
|
184
|
+
assignHeadingLevelsRecursively(input.children[0], 1);
|
|
185
|
+
return input;
|
|
186
|
+
}], components: {
|
|
187
|
+
a: ({ children }) => (_jsx(StyledTOCLink, { forwardedAs: Link, to: `#${slugifyHeadingChildren(children)}`, py: 'space4', children: children })),
|
|
188
|
+
code: ({ children }) => (_jsx("code", { className: "inline-code", children: children })),
|
|
189
|
+
}, children: cleanedMarkdown }) }));
|
|
195
190
|
};
|
|
196
191
|
export default React.memo(TableOfContents, (prevProps, nextProps) => _.isEqual(prevProps, nextProps));
|
|
197
|
-
//# sourceMappingURL=table_of_contents.
|
|
192
|
+
//# sourceMappingURL=table_of_contents.js.map
|
package/dist/src/components/readme_renderer/{table_of_contents.jsx.map → table_of_contents.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_of_contents.
|
|
1
|
+
{"version":3,"file":"table_of_contents.js","sourceRoot":"","sources":["../../../../src/components/readme_renderer/table_of_contents.tsx"],"names":[],"mappings":";AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,KAAK,EAAE,EACV,OAAO,EACP,WAAW,GACd,MAAM,OAAO,CAAC;AACf,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAE3C,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,cAAc,GAAG,UAAU,CAAC;AAElC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;aAErB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS;;;;;;;;;;;iBAWzB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI;;;;;;;;;;;4BAWb,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM;;;;4BAI1B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI;;CAEnD,CAAC;AAEF,MAAM,qBAAq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,CAAC,IAAI,KAAK,MAAM;eACnC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,UAAU,CAAC,WAAW,EAAE;YAAE,OAAO,KAAK,CAAC;QAC3F,OAAO,IAAI,CAAC;IAChB,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './simple_markdown.
|
|
2
|
-
export * from './simple_markdown_components.
|
|
1
|
+
export * from './simple_markdown.js';
|
|
2
|
+
export * from './simple_markdown_components.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/simple_markdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/simple_markdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './simple_markdown.
|
|
2
|
-
export * from './simple_markdown_components.
|
|
1
|
+
export * from './simple_markdown.js';
|
|
2
|
+
export * from './simple_markdown_components.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/simple_markdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/simple_markdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC"}
|
|
@@ -4,9 +4,9 @@ import type { ReactMarkdownOptions } from 'react-markdown/lib/react-markdown';
|
|
|
4
4
|
import rehypeRaw from 'rehype-raw';
|
|
5
5
|
import remarkGfm from 'remark-gfm';
|
|
6
6
|
export type SimpleMarkdownComponents = Components;
|
|
7
|
+
export declare const defaultAllowedElements: string[];
|
|
7
8
|
export declare const defaultRehypePlugins: (typeof rehypeRaw)[];
|
|
8
9
|
export declare const defaultRemarkPlugins: (typeof remarkGfm)[];
|
|
9
|
-
export declare const defaultAllowedElements: string[];
|
|
10
10
|
type MarkdownSize = 'regular' | 'small';
|
|
11
11
|
interface SimpleMarkdownProps extends ReactMarkdownOptions {
|
|
12
12
|
size?: MarkdownSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple_markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/simple_markdown/simple_markdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"simple_markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/simple_markdown/simple_markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,SAAS,MAAM,YAAY,CAAC;AAoBnC,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC;AAgDlD,eAAO,MAAM,sBAAsB,UAgClC,CAAC;AAEF,eAAO,MAAM,oBAAoB,sBAAc,CAAC;AAChD,eAAO,MAAM,oBAAoB,sBAAc,CAAC;AA2ChD,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,CAAC;AAExC,UAAU,mBAAoB,SAAQ,oBAAoB;IACtD,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAeD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyCxD,CAAC"}
|