expo-router 4.1.0-canary-20250219-4a5dade → 5.0.0-sdk-52-router-patches
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/build/ExpoRoot.d.ts.map +1 -1
- package/build/ExpoRoot.js +10 -2
- package/build/ExpoRoot.js.map +1 -1
- package/build/fork/NavigationContainer.js.map +1 -1
- package/build/fork/getPathFromState-forks.d.ts.map +1 -1
- package/build/fork/getPathFromState-forks.js +0 -1
- package/build/fork/getPathFromState-forks.js.map +1 -1
- package/build/fork/getPathFromState.d.ts.map +1 -1
- package/build/fork/getPathFromState.js +29 -7
- package/build/fork/getPathFromState.js.map +1 -1
- package/build/fork/getStateFromPath-forks.d.ts.map +1 -1
- package/build/fork/getStateFromPath-forks.js +2 -1
- package/build/fork/getStateFromPath-forks.js.map +1 -1
- package/build/fork/getStateFromPath.d.ts.map +1 -1
- package/build/fork/getStateFromPath.js +4 -2
- package/build/fork/getStateFromPath.js.map +1 -1
- package/build/fork/native-stack/createNativeStackNavigator.d.ts +1 -1
- package/build/fork/native-stack/createNativeStackNavigator.d.ts.map +1 -1
- package/build/fork/native-stack/createNativeStackNavigator.js +1 -2
- package/build/fork/native-stack/createNativeStackNavigator.js.map +1 -1
- package/build/fork/useBackButton.d.ts +1 -1
- package/build/fork/useBackButton.d.ts.map +1 -1
- package/build/fork/useBackButton.js.map +1 -1
- package/build/fork/useDocumentTitle.d.ts +1 -1
- package/build/fork/useDocumentTitle.d.ts.map +1 -1
- package/build/fork/useDocumentTitle.js.map +1 -1
- package/build/fork/useLinking.d.ts +1 -1
- package/build/fork/useLinking.d.ts.map +1 -1
- package/build/fork/useLinking.js.map +1 -1
- package/build/getDevServer/index.native.d.ts.map +1 -1
- package/build/getDevServer/index.native.js +1 -1
- package/build/getDevServer/index.native.js.map +1 -1
- package/build/getLinkingConfig.d.ts +8 -2
- package/build/getLinkingConfig.d.ts.map +1 -1
- package/build/getLinkingConfig.js +10 -2
- package/build/getLinkingConfig.js.map +1 -1
- package/build/global-state/router-store.d.ts.map +1 -1
- package/build/global-state/router-store.js.map +1 -1
- package/build/global-state/routing.d.ts +7 -0
- package/build/global-state/routing.d.ts.map +1 -1
- package/build/global-state/routing.js +7 -25
- package/build/global-state/routing.js.map +1 -1
- package/build/head/ExpoHead.d.ts +1 -1
- package/build/head/ExpoHead.d.ts.map +1 -1
- package/build/head/ExpoHead.ios.d.ts.map +1 -1
- package/build/head/ExpoHead.ios.js +18 -3
- package/build/head/ExpoHead.ios.js.map +1 -1
- package/build/head/ExpoHead.js +3 -3
- package/build/head/ExpoHead.js.map +1 -1
- package/build/layouts/DrawerClient.d.ts +18 -40
- package/build/layouts/DrawerClient.d.ts.map +1 -1
- package/build/layouts/StackClient.d.ts +37 -43
- package/build/layouts/StackClient.d.ts.map +1 -1
- package/build/layouts/StackClient.js +176 -5
- package/build/layouts/StackClient.js.map +1 -1
- package/build/layouts/TabsClient.d.ts +18 -40
- package/build/layouts/TabsClient.d.ts.map +1 -1
- package/build/layouts/withLayoutContext.d.ts +2 -2
- package/build/layouts/withLayoutContext.d.ts.map +1 -1
- package/build/layouts/withLayoutContext.js +8 -4
- package/build/layouts/withLayoutContext.js.map +1 -1
- package/build/link/Link.d.ts +1 -1
- package/build/link/Link.d.ts.map +1 -1
- package/build/link/Link.js +2 -1
- package/build/link/Link.js.map +1 -1
- package/build/link/linking.d.ts.map +1 -1
- package/build/link/linking.js +3 -0
- package/build/link/linking.js.map +1 -1
- package/build/link/useLinkHooks.d.ts +8 -0
- package/build/link/useLinkHooks.d.ts.map +1 -1
- package/build/link/useLinkHooks.js.map +1 -1
- package/build/rsc/router/client.js +1 -1
- package/build/rsc/router/client.js.map +1 -1
- package/build/rsc/router/host.d.ts +5 -5
- package/build/rsc/router/host.d.ts.map +1 -1
- package/build/rsc/router/host.js.map +1 -1
- package/build/testing-library/index.d.ts +1 -1
- package/build/testing-library/index.d.ts.map +1 -1
- package/build/testing-library/index.js.map +1 -1
- package/build/testing-library/mock-config.d.ts +7 -2
- package/build/testing-library/mock-config.d.ts.map +1 -1
- package/build/ui/TabContext.d.ts +29 -22
- package/build/ui/TabContext.d.ts.map +1 -1
- package/build/ui/TabRouter.d.ts +1 -0
- package/build/ui/TabRouter.d.ts.map +1 -1
- package/build/ui/Tabs.d.ts +43 -45
- package/build/ui/Tabs.d.ts.map +1 -1
- package/build/ui/Tabs.js +16 -3
- package/build/ui/Tabs.js.map +1 -1
- package/build/ui/common.d.ts.map +1 -1
- package/build/ui/common.js +6 -8
- package/build/ui/common.js.map +1 -1
- package/build/ui/useComponent.d.ts +1 -1
- package/build/ui/useComponent.d.ts.map +1 -1
- package/build/ui/useComponent.js.map +1 -1
- package/build/useNavigation.d.ts.map +1 -1
- package/build/useNavigation.js +3 -1
- package/build/useNavigation.js.map +1 -1
- package/build/useScreens.d.ts +6 -4
- package/build/useScreens.d.ts.map +1 -1
- package/build/useScreens.js +38 -47
- package/build/useScreens.js.map +1 -1
- package/build/views/Navigator.d.ts +3 -2
- package/build/views/Navigator.d.ts.map +1 -1
- package/build/views/Navigator.js +3 -2
- package/build/views/Navigator.js.map +1 -1
- package/build/views/Try.d.ts +1 -1
- package/package.json +18 -16
- package/vendor/react-helmet-async/LICENSE +201 -0
- package/vendor/react-helmet-async/README.md +205 -0
- package/vendor/react-helmet-async/lib/Dispatcher.d.ts +23 -0
- package/vendor/react-helmet-async/lib/HelmetData.d.ts +26 -0
- package/vendor/react-helmet-async/lib/Provider.d.ts +17 -0
- package/vendor/react-helmet-async/lib/client.d.ts +3 -0
- package/vendor/react-helmet-async/lib/constants.d.ts +58 -0
- package/vendor/react-helmet-async/lib/index.d.ts +38 -0
- package/vendor/react-helmet-async/lib/index.esm.js +798 -0
- package/vendor/react-helmet-async/lib/index.js +829 -0
- package/vendor/react-helmet-async/lib/server.d.ts +44 -0
- package/vendor/react-helmet-async/lib/types.d.ts +85 -0
- package/vendor/react-helmet-async/lib/utils.d.ts +33 -0
- package/vendor/react-helmet-async/package_original.json +49 -0
- package/vendor/react-helmet-async/vendor.md +3 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# react-helmet-async
|
|
2
|
+
|
|
3
|
+
[](https://circleci.com/gh/staylor/react-helmet-async)
|
|
4
|
+
|
|
5
|
+
[Announcement post on Times Open blog](https://open.nytimes.com/the-future-of-meta-tag-management-for-modern-react-development-ec26a7dc9183)
|
|
6
|
+
|
|
7
|
+
This package is a fork of [React Helmet Async](https://github.com/staylor/react-helmet-async), which is a fork of [React Helmet](https://github.com/nfl/react-helmet).
|
|
8
|
+
It's a version of React Helmet Async without the peer dependency to `react-dom`, [see this issue](https://github.com/staylor/react-helmet-async/pull/224).
|
|
9
|
+
`<Helmet>` usage is synonymous, but server and client now requires `<HelmetProvider>` to encapsulate state per request.
|
|
10
|
+
|
|
11
|
+
`react-helmet` relies on `react-side-effect`, which is not thread-safe. If you are doing anything asynchronous on the server, you need Helmet to encapsulate data on a per-request basis, this package does just that.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
**New is 1.0.0:** No more default export! `import { Helmet } from 'react-helmet-async'`
|
|
16
|
+
|
|
17
|
+
The main way that this package differs from `react-helmet` is that it requires using a Provider to encapsulate Helmet state for your React tree. If you use libraries like Redux or Apollo, you are already familiar with this paradigm:
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
import React from 'react';
|
|
21
|
+
import ReactDOM from 'react-dom';
|
|
22
|
+
import { Helmet, HelmetProvider } from 'react-helmet-async';
|
|
23
|
+
|
|
24
|
+
const app = (
|
|
25
|
+
<HelmetProvider>
|
|
26
|
+
<App>
|
|
27
|
+
<Helmet>
|
|
28
|
+
<title>Hello World</title>
|
|
29
|
+
<link rel="canonical" href="https://www.tacobell.com/" />
|
|
30
|
+
</Helmet>
|
|
31
|
+
<h1>Hello World</h1>
|
|
32
|
+
</App>
|
|
33
|
+
</HelmetProvider>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
ReactDOM.hydrate(
|
|
37
|
+
app,
|
|
38
|
+
document.getElementById(‘app’)
|
|
39
|
+
);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
On the server, we will no longer use static methods to extract state. `react-side-effect`
|
|
43
|
+
exposed a `.rewind()` method, which Helmet used when calling `Helmet.renderStatic()`. Instead, we are going
|
|
44
|
+
to pass a `context` prop to `HelmetProvider`, which will hold our state specific to each request.
|
|
45
|
+
|
|
46
|
+
```javascript
|
|
47
|
+
import React from 'react';
|
|
48
|
+
import { renderToString } from 'react-dom/server';
|
|
49
|
+
import { Helmet, HelmetProvider } from 'react-helmet-async';
|
|
50
|
+
|
|
51
|
+
const helmetContext = {};
|
|
52
|
+
|
|
53
|
+
const app = (
|
|
54
|
+
<HelmetProvider context={helmetContext}>
|
|
55
|
+
<App>
|
|
56
|
+
<Helmet>
|
|
57
|
+
<title>Hello World</title>
|
|
58
|
+
<link rel="canonical" href="https://www.tacobell.com/" />
|
|
59
|
+
</Helmet>
|
|
60
|
+
<h1>Hello World</h1>
|
|
61
|
+
</App>
|
|
62
|
+
</HelmetProvider>
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const html = renderToString(app);
|
|
66
|
+
|
|
67
|
+
const { helmet } = helmetContext;
|
|
68
|
+
|
|
69
|
+
// helmet.title.toString() etc…
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Streams
|
|
73
|
+
|
|
74
|
+
This package only works with streaming if your `<head>` data is output outside of `renderToNodeStream()`.
|
|
75
|
+
This is possible if your data hydration method already parses your React tree. Example:
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
import through from 'through';
|
|
79
|
+
import { renderToNodeStream } from 'react-dom/server';
|
|
80
|
+
import { getDataFromTree } from 'react-apollo';
|
|
81
|
+
import { Helmet, HelmetProvider } from 'react-helmet-async';
|
|
82
|
+
import template from 'server/template';
|
|
83
|
+
|
|
84
|
+
const helmetContext = {};
|
|
85
|
+
|
|
86
|
+
const app = (
|
|
87
|
+
<HelmetProvider context={helmetContext}>
|
|
88
|
+
<App>
|
|
89
|
+
<Helmet>
|
|
90
|
+
<title>Hello World</title>
|
|
91
|
+
<link rel="canonical" href="https://www.tacobell.com/" />
|
|
92
|
+
</Helmet>
|
|
93
|
+
<h1>Hello World</h1>
|
|
94
|
+
</App>
|
|
95
|
+
</HelmetProvider>
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
await getDataFromTree(app);
|
|
99
|
+
|
|
100
|
+
const [header, footer] = template({
|
|
101
|
+
helmet: helmetContext.helmet,
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
res.status(200);
|
|
105
|
+
res.write(header);
|
|
106
|
+
renderToNodeStream(app)
|
|
107
|
+
.pipe(
|
|
108
|
+
through(
|
|
109
|
+
function write(data) {
|
|
110
|
+
this.queue(data);
|
|
111
|
+
},
|
|
112
|
+
function end() {
|
|
113
|
+
this.queue(footer);
|
|
114
|
+
this.queue(null);
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
)
|
|
118
|
+
.pipe(res);
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Usage in Jest
|
|
122
|
+
While testing in using jest, if there is a need to emulate SSR, the following string is required to have the test behave the way they are expected to.
|
|
123
|
+
|
|
124
|
+
```javascript
|
|
125
|
+
import { HelmetProvider } from 'react-helmet-async';
|
|
126
|
+
|
|
127
|
+
HelmetProvider.canUseDOM = false;
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Prioritizing tags for SEO
|
|
131
|
+
|
|
132
|
+
It is understood that in some cases for SEO, certain tags should appear earlier in the HEAD. Using the `prioritizeSeoTags` flag on any `<Helmet>` component allows the server render of react-helmet-async to expose a method for prioritizing relevant SEO tags.
|
|
133
|
+
|
|
134
|
+
In the component:
|
|
135
|
+
```javascript
|
|
136
|
+
<Helmet prioritizeSeoTags>
|
|
137
|
+
<title>A fancy webpage</title>
|
|
138
|
+
<link rel="notImportant" href="https://www.chipotle.com" />
|
|
139
|
+
<meta name="whatever" value="notImportant" />
|
|
140
|
+
<link rel="canonical" href="https://www.tacobell.com" />
|
|
141
|
+
<meta property="og:title" content="A very important title"/>
|
|
142
|
+
</Helmet>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
In your server template:
|
|
146
|
+
|
|
147
|
+
```javascript
|
|
148
|
+
<html>
|
|
149
|
+
<head>
|
|
150
|
+
${helmet.title.toString()}
|
|
151
|
+
${helmet.priority.toString()}
|
|
152
|
+
${helmet.meta.toString()}
|
|
153
|
+
${helmet.link.toString()}
|
|
154
|
+
${helmet.script.toString()}
|
|
155
|
+
</head>
|
|
156
|
+
...
|
|
157
|
+
</html>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Will result in:
|
|
161
|
+
|
|
162
|
+
```html
|
|
163
|
+
<html>
|
|
164
|
+
<head>
|
|
165
|
+
<title>A fancy webpage</title>
|
|
166
|
+
<meta property="og:title" content="A very important title"/>
|
|
167
|
+
<link rel="canonical" href="https://www.tacobell.com" />
|
|
168
|
+
<meta name="whatever" value="notImportant" />
|
|
169
|
+
<link rel="notImportant" href="https://www.chipotle.com" />
|
|
170
|
+
</head>
|
|
171
|
+
...
|
|
172
|
+
</html>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
A list of prioritized tags and attributes can be found in [constants.js](./src/constants.js).
|
|
176
|
+
|
|
177
|
+
## Usage without Context
|
|
178
|
+
You can optionally use `<Helmet>` outside a context by manually creating a stateful `HelmetData` instance, and passing that stateful object to each `<Helmet>` instance:
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
```js
|
|
182
|
+
import React from 'react';
|
|
183
|
+
import { renderToString } from 'react-dom/server';
|
|
184
|
+
import { Helmet, HelmetProvider, HelmetData } from 'react-helmet-async';
|
|
185
|
+
|
|
186
|
+
const helmetData = new HelmetData({});
|
|
187
|
+
|
|
188
|
+
const app = (
|
|
189
|
+
<App>
|
|
190
|
+
<Helmet helmetData={helmetData}>
|
|
191
|
+
<title>Hello World</title>
|
|
192
|
+
<link rel="canonical" href="https://www.tacobell.com/" />
|
|
193
|
+
</Helmet>
|
|
194
|
+
<h1>Hello World</h1>
|
|
195
|
+
</App>
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
const html = renderToString(app);
|
|
199
|
+
|
|
200
|
+
const { helmet } = helmetData.context;
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## License
|
|
204
|
+
|
|
205
|
+
Licensed under the Apache 2.0 License, Copyright © 2018 Scott Taylor
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { HelmetServerState } from './types';
|
|
3
|
+
export interface DispatcherContextProp {
|
|
4
|
+
setHelmet: (newState: HelmetServerState) => void;
|
|
5
|
+
helmetInstances: {
|
|
6
|
+
get: () => HelmetDispatcher[];
|
|
7
|
+
add: (helmet: HelmetDispatcher) => void;
|
|
8
|
+
remove: (helmet: HelmetDispatcher) => void;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
interface DispatcherProps {
|
|
12
|
+
context: DispatcherContextProp;
|
|
13
|
+
}
|
|
14
|
+
export default class HelmetDispatcher extends Component<DispatcherProps> {
|
|
15
|
+
rendered: boolean;
|
|
16
|
+
shouldComponentUpdate(nextProps: DispatcherProps): boolean;
|
|
17
|
+
componentDidUpdate(): void;
|
|
18
|
+
componentWillUnmount(): void;
|
|
19
|
+
emitChange(): void;
|
|
20
|
+
init(): void;
|
|
21
|
+
render(): any;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type HelmetDispatcher from './Dispatcher';
|
|
2
|
+
import type { HelmetServerState } from './types';
|
|
3
|
+
export declare function clearInstances(): void;
|
|
4
|
+
export interface HelmetDataType {
|
|
5
|
+
instances: HelmetDispatcher[];
|
|
6
|
+
context: HelmetDataContext;
|
|
7
|
+
}
|
|
8
|
+
interface HelmetDataContext {
|
|
9
|
+
helmet: HelmetServerState;
|
|
10
|
+
}
|
|
11
|
+
export declare const isDocument: boolean;
|
|
12
|
+
export default class HelmetData implements HelmetDataType {
|
|
13
|
+
instances: any[];
|
|
14
|
+
canUseDOM: boolean;
|
|
15
|
+
context: HelmetDataContext;
|
|
16
|
+
value: {
|
|
17
|
+
setHelmet: (serverState: HelmetServerState) => void;
|
|
18
|
+
helmetInstances: {
|
|
19
|
+
get: () => any[];
|
|
20
|
+
add: (instance: HelmetDispatcher) => void;
|
|
21
|
+
remove: (instance: HelmetDispatcher) => void;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
constructor(context: any, canUseDOM?: boolean);
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import React, { Component } from 'react';
|
|
3
|
+
import HelmetData from './HelmetData';
|
|
4
|
+
import type { HelmetServerState } from './types';
|
|
5
|
+
export declare const Context: React.Context<{}>;
|
|
6
|
+
interface ProviderProps {
|
|
7
|
+
context?: {
|
|
8
|
+
helmet?: HelmetServerState;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export default class HelmetProvider extends Component<PropsWithChildren<ProviderProps>> {
|
|
12
|
+
static canUseDOM: boolean;
|
|
13
|
+
helmetData: HelmetData;
|
|
14
|
+
constructor(props: PropsWithChildren<ProviderProps>);
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare enum TAG_PROPERTIES {
|
|
2
|
+
CHARSET = "charset",
|
|
3
|
+
CSS_TEXT = "cssText",
|
|
4
|
+
HREF = "href",
|
|
5
|
+
HTTPEQUIV = "http-equiv",
|
|
6
|
+
INNER_HTML = "innerHTML",
|
|
7
|
+
ITEM_PROP = "itemprop",
|
|
8
|
+
NAME = "name",
|
|
9
|
+
PROPERTY = "property",
|
|
10
|
+
REL = "rel",
|
|
11
|
+
SRC = "src"
|
|
12
|
+
}
|
|
13
|
+
export declare enum ATTRIBUTE_NAMES {
|
|
14
|
+
BODY = "bodyAttributes",
|
|
15
|
+
HTML = "htmlAttributes",
|
|
16
|
+
TITLE = "titleAttributes"
|
|
17
|
+
}
|
|
18
|
+
export declare enum TAG_NAMES {
|
|
19
|
+
BASE = "base",
|
|
20
|
+
BODY = "body",
|
|
21
|
+
HEAD = "head",
|
|
22
|
+
HTML = "html",
|
|
23
|
+
LINK = "link",
|
|
24
|
+
META = "meta",
|
|
25
|
+
NOSCRIPT = "noscript",
|
|
26
|
+
SCRIPT = "script",
|
|
27
|
+
STYLE = "style",
|
|
28
|
+
TITLE = "title",
|
|
29
|
+
FRAGMENT = "Symbol(react.fragment)"
|
|
30
|
+
}
|
|
31
|
+
export declare const SEO_PRIORITY_TAGS: {
|
|
32
|
+
link: {
|
|
33
|
+
rel: string[];
|
|
34
|
+
};
|
|
35
|
+
script: {
|
|
36
|
+
type: string[];
|
|
37
|
+
};
|
|
38
|
+
meta: {
|
|
39
|
+
charset: string;
|
|
40
|
+
name: string[];
|
|
41
|
+
property: string[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const VALID_TAG_NAMES: TAG_NAMES[];
|
|
45
|
+
export declare const REACT_TAG_MAP: {
|
|
46
|
+
accesskey: string;
|
|
47
|
+
charset: string;
|
|
48
|
+
class: string;
|
|
49
|
+
contenteditable: string;
|
|
50
|
+
contextmenu: string;
|
|
51
|
+
'http-equiv': string;
|
|
52
|
+
itemprop: string;
|
|
53
|
+
tabindex: string;
|
|
54
|
+
};
|
|
55
|
+
export declare const HTML_TAG_MAP: {
|
|
56
|
+
[key: string]: string;
|
|
57
|
+
};
|
|
58
|
+
export declare const HELMET_ATTRIBUTE = "data-rh";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { PropsWithChildren, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import React, { Component } from 'react';
|
|
3
|
+
import type { HelmetProps } from './types';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export { default as HelmetData } from './HelmetData';
|
|
6
|
+
export { default as HelmetProvider } from './Provider';
|
|
7
|
+
type Props = {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
export declare class Helmet extends Component<PropsWithChildren<HelmetProps>> {
|
|
11
|
+
static defaultProps: {
|
|
12
|
+
defer: boolean;
|
|
13
|
+
encodeSpecialCharacters: boolean;
|
|
14
|
+
prioritizeSeoTags: boolean;
|
|
15
|
+
};
|
|
16
|
+
shouldComponentUpdate(nextProps: HelmetProps): boolean;
|
|
17
|
+
mapNestedChildrenToProps(child: ReactElement, nestedChildren: ReactNode): {
|
|
18
|
+
innerHTML: string | number | true | ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.ReactPortal;
|
|
19
|
+
cssText?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
cssText: string | number | true | ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.ReactPortal;
|
|
22
|
+
innerHTML?: undefined;
|
|
23
|
+
};
|
|
24
|
+
flattenArrayTypeChildren(child: JSX.Element, arrayTypeChildren: {
|
|
25
|
+
[key: string]: JSX.Element[];
|
|
26
|
+
}, newChildProps: Props, nestedChildren: ReactNode): {};
|
|
27
|
+
mapObjectTypeChildren(child: JSX.Element, newProps: Props, newChildProps: Props, nestedChildren: ReactNode): {};
|
|
28
|
+
mapArrayTypeChildrenToProps(arrayTypeChildren: {
|
|
29
|
+
[key: string]: JSX.Element;
|
|
30
|
+
}, newProps: Props): {
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
};
|
|
33
|
+
warnOnInvalidChildren(child: JSX.Element, nestedChildren: ReactNode): boolean;
|
|
34
|
+
mapChildrenToProps(children: ReactNode, newProps: Props): {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
};
|
|
37
|
+
render(): React.JSX.Element;
|
|
38
|
+
}
|