@rspress/core 2.0.3 → 2.0.4
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/dist/{0~7675.872de9ba.js → 0~7675.423f6a06.js} +2 -2
- package/dist/{5485.888e77db.js → 5485.7e481fde.js} +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/config/loadConfigFile.js +1 -1
- package/dist/eject-theme/components/Badge/index.tsx +1 -1
- package/dist/eject-theme/components/Button/index.tsx +1 -1
- package/dist/eject-theme/components/CodeBlock/index.scss +5 -1
- package/dist/eject-theme/components/DocContent/docComponents/title.tsx +7 -2
- package/dist/eject-theme/components/EditLink/index.scss +10 -8
- package/dist/eject-theme/components/EditLink/index.tsx +13 -4
- package/dist/eject-theme/components/HoverGroup/index.tsx +8 -2
- package/dist/eject-theme/components/Llms/LlmsCopyRow.tsx +51 -0
- package/dist/eject-theme/components/Llms/LlmsOpenRow.scss +10 -0
- package/dist/eject-theme/components/Llms/LlmsOpenRow.tsx +170 -0
- package/dist/eject-theme/components/Nav/NavMenu.tsx +7 -1
- package/dist/eject-theme/components/Nav/hooks.tsx +2 -0
- package/dist/eject-theme/components/NavScreen/NavScreenLangs.tsx +8 -1
- package/dist/eject-theme/components/NavScreen/NavScreenMenuItem.scss +0 -1
- package/dist/eject-theme/components/Outline/ScrollToTop.tsx +12 -34
- package/dist/eject-theme/components/Outline/index.scss +41 -5
- package/dist/eject-theme/components/Outline/index.tsx +19 -2
- package/dist/eject-theme/components/PackageManagerTabs/index.tsx +10 -2
- package/dist/eject-theme/components/Search/SearchPanel.tsx +2 -1
- package/dist/eject-theme/components/Search/logic/providers/LocalProvider.ts +1 -1
- package/dist/eject-theme/components/Sidebar/SidebarItem.scss +0 -2
- package/dist/eject-theme/components/SourceCode/index.tsx +1 -1
- package/dist/eject-theme/components/SvgWrapper/index.tsx +5 -2
- package/dist/eject-theme/components/Tabs/index.scss +1 -1
- package/dist/eject-theme/components/Tabs/index.tsx +1 -1
- package/dist/index.js +1 -1
- package/dist/node/auto-nav-sidebar/index.js +1 -1
- package/dist/node/auto-nav-sidebar/normalize.js +30 -4
- package/dist/node/constants.js +1 -1
- package/dist/node/initRsbuild.js +11 -9
- package/dist/node/last-updated/index.js +1 -1
- package/dist/node/logger/hint.d.ts +0 -3
- package/dist/node/logger/hint.js +7 -1
- package/dist/node/mdx/rehypePlugins/transformers/add-line-numbers.js +3 -2
- package/dist/node/mdx/rehypePlugins/transformers/add-wrap-code.js +4 -3
- package/dist/node/route/RouteService.js +1 -1
- package/dist/node/route/extractPageData.js +23 -2
- package/dist/node/route/normalizeRoutePath.js +1 -1
- package/dist/node/runtimeModule/DEFAULT_I18N_TEXT.d.ts +4 -4
- package/dist/node/runtimeModule/DEFAULT_I18N_TEXT.js +4 -4
- package/dist/node/runtimeModule/i18n.js +1 -1
- package/dist/node/runtimeModule/pageData/createPageData.js +2 -2
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +1 -1
- package/dist/node/serve.js +1 -1
- package/dist/node/ssg/renderPage.js +1 -1
- package/dist/node/ssg/renderPageWorker.js +1 -1
- package/dist/node/ssg/renderPages.js +2 -2
- package/dist/node/ssg-md/llms/emitLlmsTxt.js +1 -1
- package/dist/node/ssg-md/remarkSplitMdx.js +11 -1
- package/dist/node/ssg-md/renderPage.js +1 -1
- package/dist/node/ssg-md/renderPages.js +1 -1
- package/dist/node/utils/createHash.js +1 -1
- package/dist/node/utils/flattenMdxContent.js +1 -1
- package/dist/node/utils/reactAlias.d.ts +1 -0
- package/dist/node/utils/reactAlias.js +34 -2
- package/dist/runtime/ssrMdServerEntry.js +1 -1
- package/dist/theme/assets/copy.js +3 -3
- package/dist/theme/assets/edit.js +18 -0
- package/dist/theme/assets/scroll-to-top.js +36 -0
- package/dist/theme/assets/success.js +3 -2
- package/dist/theme/components/Badge/index.d.ts +1 -2
- package/dist/theme/components/Button/index.d.ts +1 -2
- package/dist/theme/components/CodeBlock/index.css +5 -1
- package/dist/theme/components/DocContent/docComponents/title.js +5 -2
- package/dist/theme/components/EditLink/index.css +2 -2
- package/dist/theme/components/EditLink/index.d.ts +3 -1
- package/dist/theme/components/EditLink/index.js +18 -4
- package/dist/theme/components/HoverGroup/index.js +8 -1
- package/dist/theme/components/Llms/LlmsCopyRow.d.ts +1 -0
- package/dist/theme/components/Llms/LlmsCopyRow.js +50 -0
- package/dist/theme/components/Llms/LlmsOpenRow.css +11 -0
- package/dist/theme/components/Llms/LlmsOpenRow.d.ts +3 -0
- package/dist/theme/components/Llms/LlmsOpenRow.js +168 -0
- package/dist/theme/components/Nav/NavMenu.js +3 -0
- package/dist/theme/components/Nav/hooks.d.ts +2 -0
- package/dist/theme/components/Nav/hooks.js +3 -1
- package/dist/theme/components/NavScreen/NavScreenLangs.js +3 -0
- package/dist/theme/components/NavScreen/NavScreenMenuItem.css +0 -1
- package/dist/theme/components/Outline/ScrollToTop.d.ts +1 -2
- package/dist/theme/components/Outline/ScrollToTop.js +7 -32
- package/dist/theme/components/Outline/index.css +39 -4
- package/dist/theme/components/Outline/index.js +16 -4
- package/dist/theme/components/PackageManagerTabs/index.js +10 -3
- package/dist/theme/components/Search/SearchPanel.js +1 -1
- package/dist/theme/components/Search/logic/providers/LocalProvider.js +1 -1
- package/dist/theme/components/Sidebar/SidebarItem.css +0 -2
- package/dist/theme/components/SourceCode/index.d.ts +1 -2
- package/dist/theme/components/SvgWrapper/index.d.ts +1 -2
- package/dist/theme/components/SvgWrapper/index.js +2 -1
- package/dist/theme/components/Tabs/index.css +1 -1
- package/dist/theme/components/Tabs/index.d.ts +1 -1
- package/dist/theme/icons.d.ts +2 -0
- package/dist/theme/icons.js +5 -1
- package/dist/theme/index.d.ts +8 -5
- package/dist/theme/index.js +4 -1
- package/dist/theme/layout/DocLayout/index.css +3 -3
- package/dist/theme/styles/base.css +4 -0
- package/nav-json-schema.json +12 -0
- package/package.json +14 -16
- package/dist/_private/react/index.js +0 -2
- package/dist/_private/react/reconciler.js +0 -169
- package/dist/_private/react/render.js +0 -168
- package/dist/eject-theme/components/Outline/ScrollToTop.scss +0 -13
- package/dist/node/ssg-md/react/index.d.ts +0 -1
- package/dist/node/ssg-md/react/reconciler.d.ts +0 -18
- package/dist/node/ssg-md/react/render.d.ts +0 -2
- package/dist/node/ssg-md/react/render.test.d.ts +0 -1
- package/dist/theme/components/Outline/ScrollToTop.css +0 -14
- /package/dist/{8995.421b464f.js → 7744.421b464f.js} +0 -0
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { createContext } from "react";
|
|
2
|
-
import react_reconciler from "react-reconciler";
|
|
3
|
-
import { DefaultEventPriority, NoEventPriority } from "react-reconciler/constants.js";
|
|
4
|
-
class TextNode {
|
|
5
|
-
text;
|
|
6
|
-
parent;
|
|
7
|
-
constructor(text){
|
|
8
|
-
this.text = text;
|
|
9
|
-
}
|
|
10
|
-
setText(text) {
|
|
11
|
-
this.text = text;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
class MarkdownNode {
|
|
15
|
-
type;
|
|
16
|
-
props;
|
|
17
|
-
children;
|
|
18
|
-
parent;
|
|
19
|
-
constructor(type, props = {}){
|
|
20
|
-
this.type = type;
|
|
21
|
-
this.props = props;
|
|
22
|
-
this.children = [];
|
|
23
|
-
}
|
|
24
|
-
appendChild(child) {
|
|
25
|
-
this.children.push(child);
|
|
26
|
-
if ('parent' in child) child.parent = this;
|
|
27
|
-
}
|
|
28
|
-
removeChild(child) {
|
|
29
|
-
const index = this.children.indexOf(child);
|
|
30
|
-
if (-1 !== index) this.children.splice(index, 1);
|
|
31
|
-
}
|
|
32
|
-
insertBefore(child, beforeChild) {
|
|
33
|
-
const index = this.children.indexOf(beforeChild);
|
|
34
|
-
if (-1 !== index) this.children.splice(index, 0, child);
|
|
35
|
-
else this.appendChild(child);
|
|
36
|
-
if ('parent' in child) child.parent = this;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
let currentUpdatePriority = NoEventPriority;
|
|
40
|
-
const hostConfig = {
|
|
41
|
-
supportsMutation: true,
|
|
42
|
-
supportsPersistence: false,
|
|
43
|
-
supportsHydration: false,
|
|
44
|
-
isPrimaryRenderer: false,
|
|
45
|
-
getRootHostContext () {
|
|
46
|
-
return {
|
|
47
|
-
isInsideText: false
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
getChildHostContext (parentHostContext, type) {
|
|
51
|
-
const previousIsInsideText = parentHostContext.isInsideText;
|
|
52
|
-
const isInsideText = 'text' === type || 'span' === type || previousIsInsideText;
|
|
53
|
-
if (previousIsInsideText === isInsideText) return parentHostContext;
|
|
54
|
-
return {
|
|
55
|
-
isInsideText
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
createInstance (type, props) {
|
|
59
|
-
return new MarkdownNode(type, props);
|
|
60
|
-
},
|
|
61
|
-
createTextInstance (text) {
|
|
62
|
-
return new TextNode(text);
|
|
63
|
-
},
|
|
64
|
-
shouldSetTextContent (_type, _props) {
|
|
65
|
-
return false;
|
|
66
|
-
},
|
|
67
|
-
appendChild (parent, child) {
|
|
68
|
-
parent.appendChild(child);
|
|
69
|
-
},
|
|
70
|
-
insertBefore (parent, child, beforeChild) {
|
|
71
|
-
parent.insertBefore(child, beforeChild);
|
|
72
|
-
},
|
|
73
|
-
removeChild (parent, child) {
|
|
74
|
-
parent.removeChild(child);
|
|
75
|
-
},
|
|
76
|
-
commitTextUpdate (textInstance, _oldText, newText) {
|
|
77
|
-
textInstance.setText(newText);
|
|
78
|
-
},
|
|
79
|
-
commitUpdate (instance, _type, _oldProps, newProps, _internalHandle) {
|
|
80
|
-
instance.props = newProps;
|
|
81
|
-
},
|
|
82
|
-
finalizeInitialChildren () {
|
|
83
|
-
return false;
|
|
84
|
-
},
|
|
85
|
-
commitMount () {},
|
|
86
|
-
clearContainer (container) {
|
|
87
|
-
container.children = [];
|
|
88
|
-
},
|
|
89
|
-
setCurrentUpdatePriority (newPriority) {
|
|
90
|
-
currentUpdatePriority = newPriority;
|
|
91
|
-
},
|
|
92
|
-
getCurrentUpdatePriority () {
|
|
93
|
-
return currentUpdatePriority;
|
|
94
|
-
},
|
|
95
|
-
resolveUpdatePriority () {
|
|
96
|
-
if (currentUpdatePriority !== NoEventPriority) return currentUpdatePriority;
|
|
97
|
-
return DefaultEventPriority;
|
|
98
|
-
},
|
|
99
|
-
appendInitialChild (parent, child) {
|
|
100
|
-
parent.appendChild(child);
|
|
101
|
-
},
|
|
102
|
-
preparePortalMount () {},
|
|
103
|
-
resetTextContent () {},
|
|
104
|
-
getPublicInstance (instance) {
|
|
105
|
-
return instance;
|
|
106
|
-
},
|
|
107
|
-
prepareForCommit (_containerInfo) {
|
|
108
|
-
return null;
|
|
109
|
-
},
|
|
110
|
-
resetAfterCommit (_containerInfo) {},
|
|
111
|
-
scheduleTimeout: setTimeout,
|
|
112
|
-
cancelTimeout: clearTimeout,
|
|
113
|
-
noTimeout: -1,
|
|
114
|
-
scheduleMicrotask: 'function' == typeof queueMicrotask ? queueMicrotask : (fn)=>Promise.resolve().then(fn),
|
|
115
|
-
getInstanceFromNode () {
|
|
116
|
-
return null;
|
|
117
|
-
},
|
|
118
|
-
beforeActiveInstanceBlur () {},
|
|
119
|
-
afterActiveInstanceBlur () {},
|
|
120
|
-
prepareScopeUpdate () {},
|
|
121
|
-
getInstanceFromScope () {
|
|
122
|
-
return null;
|
|
123
|
-
},
|
|
124
|
-
detachDeletedInstance () {},
|
|
125
|
-
appendChildToContainer (container, child) {
|
|
126
|
-
container.appendChild(child);
|
|
127
|
-
},
|
|
128
|
-
insertInContainerBefore (container, child, beforeChild) {
|
|
129
|
-
container.insertBefore(child, beforeChild);
|
|
130
|
-
},
|
|
131
|
-
removeChildFromContainer (container, child) {
|
|
132
|
-
container.removeChild(child);
|
|
133
|
-
},
|
|
134
|
-
hideInstance (_instance) {},
|
|
135
|
-
hideTextInstance (textInstance) {
|
|
136
|
-
textInstance.setText('');
|
|
137
|
-
},
|
|
138
|
-
unhideInstance (_instance) {},
|
|
139
|
-
unhideTextInstance (textInstance, text) {
|
|
140
|
-
textInstance.setText(text);
|
|
141
|
-
},
|
|
142
|
-
maySuspendCommit () {
|
|
143
|
-
return false;
|
|
144
|
-
},
|
|
145
|
-
preloadInstance () {
|
|
146
|
-
return true;
|
|
147
|
-
},
|
|
148
|
-
startSuspendingCommit () {},
|
|
149
|
-
suspendInstance () {},
|
|
150
|
-
waitForCommitToBeReady () {
|
|
151
|
-
return null;
|
|
152
|
-
},
|
|
153
|
-
NotPendingTransition: null,
|
|
154
|
-
HostTransitionContext: createContext(null),
|
|
155
|
-
resetFormInstance () {},
|
|
156
|
-
requestPostPaintCallback () {},
|
|
157
|
-
shouldAttemptEagerTransition () {
|
|
158
|
-
return false;
|
|
159
|
-
},
|
|
160
|
-
trackSchedulerEvent () {},
|
|
161
|
-
resolveEventType () {
|
|
162
|
-
return null;
|
|
163
|
-
},
|
|
164
|
-
resolveEventTimeStamp () {
|
|
165
|
-
return -1.1;
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
const reconciler = react_reconciler(hostConfig);
|
|
169
|
-
export { MarkdownNode, TextNode, reconciler };
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import react from "react";
|
|
2
|
-
import { MarkdownNode, TextNode, reconciler } from "./reconciler.js";
|
|
3
|
-
const ReactSharedInternals = react.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
4
|
-
function noop() {}
|
|
5
|
-
let interceptorRefCount = 0;
|
|
6
|
-
let originalDescriptor;
|
|
7
|
-
let realH = null;
|
|
8
|
-
let cachedTarget = null;
|
|
9
|
-
let cachedProxy = null;
|
|
10
|
-
function installEffectInterceptor() {
|
|
11
|
-
if (!ReactSharedInternals) return noop;
|
|
12
|
-
interceptorRefCount++;
|
|
13
|
-
if (1 === interceptorRefCount) {
|
|
14
|
-
originalDescriptor = Object.getOwnPropertyDescriptor(ReactSharedInternals, 'H');
|
|
15
|
-
realH = ReactSharedInternals.H;
|
|
16
|
-
cachedTarget = null;
|
|
17
|
-
cachedProxy = null;
|
|
18
|
-
Object.defineProperty(ReactSharedInternals, 'H', {
|
|
19
|
-
get () {
|
|
20
|
-
if (null == realH) return realH;
|
|
21
|
-
if (cachedTarget !== realH) {
|
|
22
|
-
cachedTarget = realH;
|
|
23
|
-
cachedProxy = new Proxy(realH, {
|
|
24
|
-
get (target, prop, receiver) {
|
|
25
|
-
if ('useEffect' === prop || 'useLayoutEffect' === prop || 'useInsertionEffect' === prop) return noop;
|
|
26
|
-
return Reflect.get(target, prop, receiver);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return cachedProxy;
|
|
31
|
-
},
|
|
32
|
-
set (value) {
|
|
33
|
-
realH = value;
|
|
34
|
-
},
|
|
35
|
-
configurable: true
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return ()=>{
|
|
39
|
-
interceptorRefCount--;
|
|
40
|
-
if (0 === interceptorRefCount) if (originalDescriptor) Object.defineProperty(ReactSharedInternals, 'H', originalDescriptor);
|
|
41
|
-
else {
|
|
42
|
-
delete ReactSharedInternals.H;
|
|
43
|
-
ReactSharedInternals.H = realH;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
function toMarkdown(root) {
|
|
48
|
-
const { type, props, children } = root;
|
|
49
|
-
const childrenMd = children.map((child)=>{
|
|
50
|
-
if (child instanceof TextNode) return child.text;
|
|
51
|
-
return toMarkdown(child);
|
|
52
|
-
}).join('');
|
|
53
|
-
switch(type){
|
|
54
|
-
case 'root':
|
|
55
|
-
return childrenMd;
|
|
56
|
-
case 'h1':
|
|
57
|
-
return `# ${childrenMd}\n\n`;
|
|
58
|
-
case 'h2':
|
|
59
|
-
return `## ${childrenMd}\n\n`;
|
|
60
|
-
case 'h3':
|
|
61
|
-
return `### ${childrenMd}\n\n`;
|
|
62
|
-
case 'h4':
|
|
63
|
-
return `#### ${childrenMd}\n\n`;
|
|
64
|
-
case 'h5':
|
|
65
|
-
return `##### ${childrenMd}\n\n`;
|
|
66
|
-
case 'h6':
|
|
67
|
-
return `###### ${childrenMd}\n\n`;
|
|
68
|
-
case 'p':
|
|
69
|
-
return `${childrenMd}\n\n`;
|
|
70
|
-
case 'strong':
|
|
71
|
-
case 'b':
|
|
72
|
-
return `**${childrenMd}**`;
|
|
73
|
-
case 'em':
|
|
74
|
-
case 'i':
|
|
75
|
-
return `*${childrenMd}*`;
|
|
76
|
-
case 'code':
|
|
77
|
-
if (root.parent?.type === 'pre') return childrenMd;
|
|
78
|
-
return `\`${childrenMd}\``;
|
|
79
|
-
case 'pre':
|
|
80
|
-
{
|
|
81
|
-
const _language = props['data-lang'] || props.language || props.lang || '';
|
|
82
|
-
const language = 'string' == typeof _language ? _language : '';
|
|
83
|
-
const title = props['data-title'] || '';
|
|
84
|
-
const block = [
|
|
85
|
-
'markdown',
|
|
86
|
-
'mdx',
|
|
87
|
-
'md',
|
|
88
|
-
''
|
|
89
|
-
].includes(language) ? '````' : '```';
|
|
90
|
-
return `\n${block}${language}${title ? ` title=${title}` : ''}\n${childrenMd}\n${block}\n`;
|
|
91
|
-
}
|
|
92
|
-
case 'a':
|
|
93
|
-
return `[${childrenMd}](${props.href || '#'})`;
|
|
94
|
-
case 'img':
|
|
95
|
-
return ``;
|
|
96
|
-
case 'ul':
|
|
97
|
-
return `${childrenMd}\n`;
|
|
98
|
-
case 'ol':
|
|
99
|
-
return `${childrenMd}\n`;
|
|
100
|
-
case 'li':
|
|
101
|
-
{
|
|
102
|
-
const isOrdered = root.parent && 'ol' === root.parent.type;
|
|
103
|
-
const prefix = isOrdered ? '1. ' : '- ';
|
|
104
|
-
return `${prefix}${childrenMd}\n`;
|
|
105
|
-
}
|
|
106
|
-
case 'blockquote':
|
|
107
|
-
return `> ${childrenMd.split('\n').join('\n> ')}\n\n`;
|
|
108
|
-
case 'br':
|
|
109
|
-
return '\n';
|
|
110
|
-
case 'hr':
|
|
111
|
-
return '---\n\n';
|
|
112
|
-
case 'table':
|
|
113
|
-
return `${childrenMd}\n`;
|
|
114
|
-
case 'thead':
|
|
115
|
-
return childrenMd;
|
|
116
|
-
case 'tbody':
|
|
117
|
-
return childrenMd;
|
|
118
|
-
case 'tr':
|
|
119
|
-
{
|
|
120
|
-
const cells = children.filter((child)=>child instanceof MarkdownNode).map((cell)=>toMarkdown(cell).trim());
|
|
121
|
-
if (root.parent && 'thead' === root.parent.type) {
|
|
122
|
-
const separator = `|${cells.map(()=>' --- ').join('|')}|\n`;
|
|
123
|
-
return `| ${cells.join(' | ')} |\n${separator}`;
|
|
124
|
-
}
|
|
125
|
-
return `| ${cells.join(' | ')} |\n`;
|
|
126
|
-
}
|
|
127
|
-
case 'th':
|
|
128
|
-
case 'td':
|
|
129
|
-
return childrenMd;
|
|
130
|
-
case 'div':
|
|
131
|
-
case 'span':
|
|
132
|
-
case 'section':
|
|
133
|
-
case 'article':
|
|
134
|
-
case 'main':
|
|
135
|
-
case 'aside':
|
|
136
|
-
case 'header':
|
|
137
|
-
case 'footer':
|
|
138
|
-
case 'nav':
|
|
139
|
-
default:
|
|
140
|
-
return childrenMd;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
async function renderToMarkdownString(element) {
|
|
144
|
-
const container = new MarkdownNode('root');
|
|
145
|
-
const root = reconciler.createContainer(container, 1, null, false, false, '', (error, info)=>{
|
|
146
|
-
if (process.env.DEBUG) {
|
|
147
|
-
console.error('Reconciler Error:', error, info);
|
|
148
|
-
const message = `Reconciler Error:${error.message}`;
|
|
149
|
-
throw new Error(message);
|
|
150
|
-
}
|
|
151
|
-
}, ()=>{}, (...args)=>{
|
|
152
|
-
if (process.env.DEBUG) console.log('Reconciler onRecoverable Error:', ...args);
|
|
153
|
-
}, ()=>{}, null);
|
|
154
|
-
const removeInterceptor = installEffectInterceptor();
|
|
155
|
-
try {
|
|
156
|
-
let resolveCommit = null;
|
|
157
|
-
const commitPromise = new Promise((resolve)=>{
|
|
158
|
-
resolveCommit = resolve;
|
|
159
|
-
});
|
|
160
|
-
reconciler.updateContainer(element, root, null, ()=>{
|
|
161
|
-
if (resolveCommit) resolveCommit(toMarkdown(container));
|
|
162
|
-
});
|
|
163
|
-
return await commitPromise;
|
|
164
|
-
} finally{
|
|
165
|
-
removeInterceptor();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
export { renderToMarkdownString };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
.rp-outline__scroll-to-top {
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
font-size: 0.875rem;
|
|
4
|
-
font-style: normal;
|
|
5
|
-
font-weight: 400;
|
|
6
|
-
line-height: 20px;
|
|
7
|
-
color: var(--rp-c-text-2);
|
|
8
|
-
background: transparent;
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
gap: 8px;
|
|
12
|
-
border: none;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { renderToMarkdownString } from './render.js';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import createReconciler from 'react-reconciler';
|
|
2
|
-
export declare class TextNode {
|
|
3
|
-
text: string;
|
|
4
|
-
parent?: MarkdownNode;
|
|
5
|
-
constructor(text: string);
|
|
6
|
-
setText(text: string): void;
|
|
7
|
-
}
|
|
8
|
-
export declare class MarkdownNode {
|
|
9
|
-
type: string;
|
|
10
|
-
props: Record<string, unknown>;
|
|
11
|
-
children: (MarkdownNode | TextNode)[];
|
|
12
|
-
parent?: MarkdownNode;
|
|
13
|
-
constructor(type: string, props?: Record<string, unknown>);
|
|
14
|
-
appendChild(child: MarkdownNode | TextNode): void;
|
|
15
|
-
removeChild(child: MarkdownNode | TextNode): void;
|
|
16
|
-
insertBefore(child: MarkdownNode | TextNode, beforeChild: MarkdownNode | TextNode): void;
|
|
17
|
-
}
|
|
18
|
-
export declare const reconciler: createReconciler.Reconciler<MarkdownNode, MarkdownNode, TextNode, MarkdownNode, unknown, unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
.rp-outline__scroll-to-top {
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
color: var(--rp-c-text-2);
|
|
4
|
-
background: none;
|
|
5
|
-
border: none;
|
|
6
|
-
align-items: center;
|
|
7
|
-
gap: 8px;
|
|
8
|
-
font-size: .875rem;
|
|
9
|
-
font-style: normal;
|
|
10
|
-
font-weight: 400;
|
|
11
|
-
line-height: 20px;
|
|
12
|
-
display: flex;
|
|
13
|
-
}
|
|
14
|
-
|
|
File without changes
|