@mintlify/common 1.0.784 → 1.0.785
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Program, Property } from 'estree-jsx';
|
|
2
2
|
import type { Root } from 'mdast';
|
|
3
|
-
export declare const REACT_HOOKS: string[];
|
|
4
3
|
export declare function isStringSafe(value: string): boolean;
|
|
5
4
|
export declare function filterStyleProperties(estree: Program): Program | null;
|
|
6
5
|
export declare function rebuildStyleValue(properties: Property[]): string;
|
|
6
|
+
export declare function isUnsafeEsm(estree: Program): boolean;
|
|
7
7
|
export declare function remarkMdxRemoveJs(): (tree: Root) => void;
|
|
@@ -136,25 +136,6 @@ const DEFAULT_PROP_EXPRESSIONS = {
|
|
|
136
136
|
'x-hidden': { value: '"true"', estree: trueEstree },
|
|
137
137
|
'x-excluded': { value: '"true"', estree: trueEstree },
|
|
138
138
|
};
|
|
139
|
-
export const REACT_HOOKS = [
|
|
140
|
-
'useState',
|
|
141
|
-
'useEffect',
|
|
142
|
-
'useRef',
|
|
143
|
-
'useCallback',
|
|
144
|
-
'useMemo',
|
|
145
|
-
'useReducer',
|
|
146
|
-
'useContext',
|
|
147
|
-
'useLayoutEffect',
|
|
148
|
-
'useImperativeHandle',
|
|
149
|
-
'useDebugValue',
|
|
150
|
-
'useDeferredValue',
|
|
151
|
-
'useTransition',
|
|
152
|
-
'useId',
|
|
153
|
-
'useSyncExternalStore',
|
|
154
|
-
'useInsertionEffect',
|
|
155
|
-
'useOptimistic',
|
|
156
|
-
'useActionState',
|
|
157
|
-
];
|
|
158
139
|
export function isStringSafe(value) {
|
|
159
140
|
switch (true) {
|
|
160
141
|
case value === 'true':
|
|
@@ -231,7 +212,7 @@ export function rebuildStyleValue(properties) {
|
|
|
231
212
|
});
|
|
232
213
|
return `{ ${parts.join(', ')} }`;
|
|
233
214
|
}
|
|
234
|
-
function isUnsafeEsm(estree) {
|
|
215
|
+
export function isUnsafeEsm(estree) {
|
|
235
216
|
if (!estree.body.length)
|
|
236
217
|
return false;
|
|
237
218
|
let hasUnsafeNode = false;
|