1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { HTMLStencilElement, JSXBase } from './stencil.core';
|
9 | import {
|
10 | HistoryType,
|
11 | LocationSegments,
|
12 | MatchResults,
|
13 | Path,
|
14 | Prompt,
|
15 | RouteRenderProps,
|
16 | RouterHistory,
|
17 | RouteViewOptions,
|
18 | } from './global/interfaces';
|
19 |
|
20 | export namespace Components {
|
21 | interface StencilAsyncContent {
|
22 | 'documentLocation'?: string;
|
23 | }
|
24 | interface StencilRoute {
|
25 | 'component'?: string;
|
26 | 'componentProps'?: { [key: string]: any };
|
27 | 'componentUpdated'?: (options: RouteViewOptions) => void;
|
28 | 'exact': boolean;
|
29 | 'group': string | null;
|
30 | 'history'?: RouterHistory;
|
31 | 'historyType'?: HistoryType;
|
32 | 'location'?: LocationSegments;
|
33 | 'match': MatchResults | null;
|
34 | 'routeRender'?: (props: RouteRenderProps) => any;
|
35 | 'routeViewsUpdated'?: (options: RouteViewOptions) => void;
|
36 | 'scrollTopOffset'?: number;
|
37 | 'url'?: string | string[];
|
38 | }
|
39 | interface StencilRouteLink {
|
40 | 'activeClass': string;
|
41 | 'anchorClass'?: string;
|
42 | 'anchorId'?: string;
|
43 | 'anchorRole'?: string;
|
44 | 'anchorTabIndex'?: string;
|
45 | 'anchorTitle'?: string;
|
46 | 'ariaHaspopup'?: string;
|
47 | 'ariaLabel'?: string;
|
48 | 'ariaPosinset'?: string;
|
49 | 'ariaSetsize'?: number;
|
50 | |
51 |
|
52 |
|
53 | 'custom': string;
|
54 | 'exact': boolean;
|
55 | 'history'?: RouterHistory;
|
56 | 'location'?: LocationSegments;
|
57 | 'root'?: string;
|
58 | 'strict': boolean;
|
59 | 'url'?: string;
|
60 | 'urlMatch'?: Path;
|
61 | }
|
62 | interface StencilRouteSwitch {
|
63 | 'group': string;
|
64 | 'location'?: LocationSegments;
|
65 | 'routeViewsUpdated'?: (options: RouteViewOptions) => void;
|
66 | 'scrollTopOffset'?: number;
|
67 | }
|
68 | interface StencilRouteTitle {
|
69 | 'pageTitle': string;
|
70 | 'titleSuffix': string;
|
71 | }
|
72 | interface StencilRouter {
|
73 | 'historyType': HistoryType;
|
74 | 'root': string;
|
75 | 'scrollTopOffset'?: number;
|
76 | 'titleSuffix': string;
|
77 | }
|
78 | interface StencilRouterPrompt {
|
79 | 'history'?: RouterHistory;
|
80 | 'message': string | Prompt;
|
81 | 'when': boolean;
|
82 | }
|
83 | interface StencilRouterRedirect {
|
84 | 'history'?: RouterHistory;
|
85 | 'root'?: string;
|
86 | 'url'?: string;
|
87 | }
|
88 | }
|
89 |
|
90 | declare global {
|
91 |
|
92 |
|
93 | interface HTMLStencilAsyncContentElement extends Components.StencilAsyncContent, HTMLStencilElement {}
|
94 | var HTMLStencilAsyncContentElement: {
|
95 | prototype: HTMLStencilAsyncContentElement;
|
96 | new (): HTMLStencilAsyncContentElement;
|
97 | };
|
98 |
|
99 | interface HTMLStencilRouteElement extends Components.StencilRoute, HTMLStencilElement {}
|
100 | var HTMLStencilRouteElement: {
|
101 | prototype: HTMLStencilRouteElement;
|
102 | new (): HTMLStencilRouteElement;
|
103 | };
|
104 |
|
105 | interface HTMLStencilRouteLinkElement extends Components.StencilRouteLink, HTMLStencilElement {}
|
106 | var HTMLStencilRouteLinkElement: {
|
107 | prototype: HTMLStencilRouteLinkElement;
|
108 | new (): HTMLStencilRouteLinkElement;
|
109 | };
|
110 |
|
111 | interface HTMLStencilRouteSwitchElement extends Components.StencilRouteSwitch, HTMLStencilElement {}
|
112 | var HTMLStencilRouteSwitchElement: {
|
113 | prototype: HTMLStencilRouteSwitchElement;
|
114 | new (): HTMLStencilRouteSwitchElement;
|
115 | };
|
116 |
|
117 | interface HTMLStencilRouteTitleElement extends Components.StencilRouteTitle, HTMLStencilElement {}
|
118 | var HTMLStencilRouteTitleElement: {
|
119 | prototype: HTMLStencilRouteTitleElement;
|
120 | new (): HTMLStencilRouteTitleElement;
|
121 | };
|
122 |
|
123 | interface HTMLStencilRouterElement extends Components.StencilRouter, HTMLStencilElement {}
|
124 | var HTMLStencilRouterElement: {
|
125 | prototype: HTMLStencilRouterElement;
|
126 | new (): HTMLStencilRouterElement;
|
127 | };
|
128 |
|
129 | interface HTMLStencilRouterPromptElement extends Components.StencilRouterPrompt, HTMLStencilElement {}
|
130 | var HTMLStencilRouterPromptElement: {
|
131 | prototype: HTMLStencilRouterPromptElement;
|
132 | new (): HTMLStencilRouterPromptElement;
|
133 | };
|
134 |
|
135 | interface HTMLStencilRouterRedirectElement extends Components.StencilRouterRedirect, HTMLStencilElement {}
|
136 | var HTMLStencilRouterRedirectElement: {
|
137 | prototype: HTMLStencilRouterRedirectElement;
|
138 | new (): HTMLStencilRouterRedirectElement;
|
139 | };
|
140 | interface HTMLElementTagNameMap {
|
141 | 'stencil-async-content': HTMLStencilAsyncContentElement;
|
142 | 'stencil-route': HTMLStencilRouteElement;
|
143 | 'stencil-route-link': HTMLStencilRouteLinkElement;
|
144 | 'stencil-route-switch': HTMLStencilRouteSwitchElement;
|
145 | 'stencil-route-title': HTMLStencilRouteTitleElement;
|
146 | 'stencil-router': HTMLStencilRouterElement;
|
147 | 'stencil-router-prompt': HTMLStencilRouterPromptElement;
|
148 | 'stencil-router-redirect': HTMLStencilRouterRedirectElement;
|
149 | }
|
150 | }
|
151 |
|
152 | declare namespace LocalJSX {
|
153 | interface StencilAsyncContent extends JSXBase.HTMLAttributes<HTMLStencilAsyncContentElement> {
|
154 | 'documentLocation'?: string;
|
155 | }
|
156 | interface StencilRoute extends JSXBase.HTMLAttributes<HTMLStencilRouteElement> {
|
157 | 'component'?: string;
|
158 | 'componentProps'?: { [key: string]: any };
|
159 | 'componentUpdated'?: (options: RouteViewOptions) => void;
|
160 | 'exact'?: boolean;
|
161 | 'group'?: string | null;
|
162 | 'history'?: RouterHistory;
|
163 | 'historyType'?: HistoryType;
|
164 | 'location'?: LocationSegments;
|
165 | 'match'?: MatchResults | null;
|
166 | 'routeRender'?: (props: RouteRenderProps) => any;
|
167 | 'routeViewsUpdated'?: (options: RouteViewOptions) => void;
|
168 | 'scrollTopOffset'?: number;
|
169 | 'url'?: string | string[];
|
170 | }
|
171 | interface StencilRouteLink extends JSXBase.HTMLAttributes<HTMLStencilRouteLinkElement> {
|
172 | 'activeClass'?: string;
|
173 | 'anchorClass'?: string;
|
174 | 'anchorId'?: string;
|
175 | 'anchorRole'?: string;
|
176 | 'anchorTabIndex'?: string;
|
177 | 'anchorTitle'?: string;
|
178 | 'ariaHaspopup'?: string;
|
179 | 'ariaLabel'?: string;
|
180 | 'ariaPosinset'?: string;
|
181 | 'ariaSetsize'?: number;
|
182 | |
183 |
|
184 |
|
185 | 'custom'?: string;
|
186 | 'exact'?: boolean;
|
187 | 'history'?: RouterHistory;
|
188 | 'location'?: LocationSegments;
|
189 | 'root'?: string;
|
190 | 'strict'?: boolean;
|
191 | 'url'?: string;
|
192 | 'urlMatch'?: Path;
|
193 | }
|
194 | interface StencilRouteSwitch extends JSXBase.HTMLAttributes<HTMLStencilRouteSwitchElement> {
|
195 | 'group'?: string;
|
196 | 'location'?: LocationSegments;
|
197 | 'routeViewsUpdated'?: (options: RouteViewOptions) => void;
|
198 | 'scrollTopOffset'?: number;
|
199 | }
|
200 | interface StencilRouteTitle extends JSXBase.HTMLAttributes<HTMLStencilRouteTitleElement> {
|
201 | 'pageTitle'?: string;
|
202 | 'titleSuffix'?: string;
|
203 | }
|
204 | interface StencilRouter extends JSXBase.HTMLAttributes<HTMLStencilRouterElement> {
|
205 | 'historyType'?: HistoryType;
|
206 | 'root'?: string;
|
207 | 'scrollTopOffset'?: number;
|
208 | 'titleSuffix'?: string;
|
209 | }
|
210 | interface StencilRouterPrompt extends JSXBase.HTMLAttributes<HTMLStencilRouterPromptElement> {
|
211 | 'history'?: RouterHistory;
|
212 | 'message'?: string | Prompt;
|
213 | 'when'?: boolean;
|
214 | }
|
215 | interface StencilRouterRedirect extends JSXBase.HTMLAttributes<HTMLStencilRouterRedirectElement> {
|
216 | 'history'?: RouterHistory;
|
217 | 'root'?: string;
|
218 | 'url'?: string;
|
219 | }
|
220 |
|
221 | interface IntrinsicElements {
|
222 | 'stencil-async-content': StencilAsyncContent;
|
223 | 'stencil-route': StencilRoute;
|
224 | 'stencil-route-link': StencilRouteLink;
|
225 | 'stencil-route-switch': StencilRouteSwitch;
|
226 | 'stencil-route-title': StencilRouteTitle;
|
227 | 'stencil-router': StencilRouter;
|
228 | 'stencil-router-prompt': StencilRouterPrompt;
|
229 | 'stencil-router-redirect': StencilRouterRedirect;
|
230 | }
|
231 | }
|
232 |
|
233 | export { LocalJSX as JSX };
|
234 |
|
235 |
|
236 | declare module "@stencil/core" {
|
237 | export namespace JSX {
|
238 | interface IntrinsicElements extends LocalJSX.IntrinsicElements {}
|
239 | }
|
240 | }
|
241 |
|
242 |
|