sample-cross-fx 1.10.2-beta.dc71cd5 → 1.10.2
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/app/{index.f1bda3.js → index.9e12bd.js} +5 -5
- package/app/{index.f1bda3.js.map → index.9e12bd.js.map} +1 -1
- package/app/index.d.ts +115 -5
- package/app/index.html +1 -1
- package/files.tar +0 -0
- package/files_once.tar +0 -0
- package/package.json +20 -20
package/app/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import * as Inferno from 'inferno';
|
|
|
6
6
|
import * as Preact from 'preact';
|
|
7
7
|
import * as Riot from 'riot';
|
|
8
8
|
import * as SolidJs from 'solid-js';
|
|
9
|
-
import * as ReactRouter from 'react-router';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Defines the API accessible from pilets.
|
|
@@ -500,9 +499,9 @@ export type AnyComponent<T> = React.ComponentType<T> | FirstParametersOf<Compone
|
|
|
500
499
|
/**
|
|
501
500
|
* The props used by a page component.
|
|
502
501
|
*/
|
|
503
|
-
export interface PageComponentProps<
|
|
504
|
-
[K in keyof
|
|
505
|
-
} =
|
|
502
|
+
export interface PageComponentProps<UrlParams extends {
|
|
503
|
+
[K in keyof UrlParams]?: string;
|
|
504
|
+
} = Record<string, string>, UrlState = any> extends RouteBaseProps<UrlParams, UrlState> {
|
|
506
505
|
/**
|
|
507
506
|
* The meta data registered with the page.
|
|
508
507
|
*/
|
|
@@ -972,7 +971,20 @@ export interface ComponentConverters<TProps> extends PiralCustomComponentConvert
|
|
|
972
971
|
*/
|
|
973
972
|
export interface RouteBaseProps<UrlParams extends {
|
|
974
973
|
[K in keyof UrlParams]?: string;
|
|
975
|
-
} = {}, UrlState = any> extends
|
|
974
|
+
} = {}, UrlState = any> extends BaseComponentProps {
|
|
975
|
+
/**
|
|
976
|
+
* The history API to navigate.
|
|
977
|
+
*/
|
|
978
|
+
history: History<UrlState>;
|
|
979
|
+
/**
|
|
980
|
+
* Information about the current location.
|
|
981
|
+
*/
|
|
982
|
+
location: Location<UrlState>;
|
|
983
|
+
/**
|
|
984
|
+
* Information about the matching of the current route.
|
|
985
|
+
*/
|
|
986
|
+
match: RouteMatch<UrlParams>;
|
|
987
|
+
}
|
|
976
988
|
|
|
977
989
|
/**
|
|
978
990
|
* Custom meta data to include for pages.
|
|
@@ -1256,6 +1268,52 @@ export interface ForeignComponent<TProps> {
|
|
|
1256
1268
|
unmount?(element: HTMLElement, locals: Record<string, any>): void;
|
|
1257
1269
|
}
|
|
1258
1270
|
|
|
1271
|
+
export interface History<HistoryLocationState = LocationState> {
|
|
1272
|
+
length: number;
|
|
1273
|
+
action: Action;
|
|
1274
|
+
location: Location<HistoryLocationState>;
|
|
1275
|
+
push(location: Path | LocationDescriptor<HistoryLocationState>, state?: HistoryLocationState): void;
|
|
1276
|
+
replace(location: Path | LocationDescriptor<HistoryLocationState>, state?: HistoryLocationState): void;
|
|
1277
|
+
go(n: number): void;
|
|
1278
|
+
goBack(): void;
|
|
1279
|
+
goForward(): void;
|
|
1280
|
+
block(prompt?: boolean | string | TransitionPromptHook<HistoryLocationState>): UnregisterCallback;
|
|
1281
|
+
listen(listener: LocationListener<HistoryLocationState>): UnregisterCallback;
|
|
1282
|
+
createHref(location: LocationDescriptorObject<HistoryLocationState>): Href;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
export interface Location<S = LocationState> {
|
|
1286
|
+
pathname: Pathname;
|
|
1287
|
+
search: Search;
|
|
1288
|
+
state: S;
|
|
1289
|
+
hash: Hash;
|
|
1290
|
+
key?: LocationKey | undefined;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* The match object determining what exactly has been matched for the current navigation.
|
|
1295
|
+
*/
|
|
1296
|
+
export interface RouteMatch<Params extends {
|
|
1297
|
+
[K in keyof Params]?: string;
|
|
1298
|
+
} = {}> {
|
|
1299
|
+
/**
|
|
1300
|
+
* The parameters extracted from the current navigation.
|
|
1301
|
+
*/
|
|
1302
|
+
params: Params;
|
|
1303
|
+
/**
|
|
1304
|
+
* Indicates if the parameters have been matched exactly.
|
|
1305
|
+
*/
|
|
1306
|
+
isExact: boolean;
|
|
1307
|
+
/**
|
|
1308
|
+
* The relative path.
|
|
1309
|
+
*/
|
|
1310
|
+
path: string;
|
|
1311
|
+
/**
|
|
1312
|
+
* The fully qualified URL.
|
|
1313
|
+
*/
|
|
1314
|
+
url: string;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1259
1317
|
/**
|
|
1260
1318
|
* Custom extension slots outside of piral-core.
|
|
1261
1319
|
*/
|
|
@@ -1395,6 +1453,38 @@ export interface ComponentContext {
|
|
|
1395
1453
|
publicPath: string;
|
|
1396
1454
|
}
|
|
1397
1455
|
|
|
1456
|
+
export type Action = "PUSH" | "POP" | "REPLACE";
|
|
1457
|
+
|
|
1458
|
+
export type Path = Path___1;
|
|
1459
|
+
|
|
1460
|
+
export type LocationDescriptor<S = LocationState> = LocationDescriptor___1<S>;
|
|
1461
|
+
|
|
1462
|
+
export type TransitionPromptHook<S = LocationState> = TransitionPromptHook___1<S>;
|
|
1463
|
+
|
|
1464
|
+
export type UnregisterCallback = () => void;
|
|
1465
|
+
|
|
1466
|
+
export type LocationListener<S = LocationState> = LocationListener___1<S>;
|
|
1467
|
+
|
|
1468
|
+
export interface LocationDescriptorObject<S = LocationState> {
|
|
1469
|
+
pathname?: Pathname | undefined;
|
|
1470
|
+
search?: Search | undefined;
|
|
1471
|
+
state?: S | undefined;
|
|
1472
|
+
hash?: Hash | undefined;
|
|
1473
|
+
key?: LocationKey | undefined;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
export type Href = Href___1;
|
|
1477
|
+
|
|
1478
|
+
export type LocationState = LocationState___1;
|
|
1479
|
+
|
|
1480
|
+
export type Pathname = Pathname___1;
|
|
1481
|
+
|
|
1482
|
+
export type Search = Search___1;
|
|
1483
|
+
|
|
1484
|
+
export type Hash = Hash___1;
|
|
1485
|
+
|
|
1486
|
+
export type LocationKey = LocationKey___1;
|
|
1487
|
+
|
|
1398
1488
|
/**
|
|
1399
1489
|
* The base type for pilet component registration in the global state context.
|
|
1400
1490
|
*/
|
|
@@ -1509,6 +1599,26 @@ export interface NavigationApi {
|
|
|
1509
1599
|
publicPath: string;
|
|
1510
1600
|
}
|
|
1511
1601
|
|
|
1602
|
+
export type Path___1 = string;
|
|
1603
|
+
|
|
1604
|
+
export type LocationDescriptor___1<S = LocationState___1> = Path___1 | LocationDescriptorObject<S>;
|
|
1605
|
+
|
|
1606
|
+
export type TransitionPromptHook___1<S = LocationState___1> = (location: Location<S>, action: Action) => string | false | void;
|
|
1607
|
+
|
|
1608
|
+
export type LocationListener___1<S = LocationState___1> = (location: Location<S>, action: Action) => void;
|
|
1609
|
+
|
|
1610
|
+
export type Href___1 = string;
|
|
1611
|
+
|
|
1612
|
+
export type LocationState___1 = unknown;
|
|
1613
|
+
|
|
1614
|
+
export type Pathname___1 = string;
|
|
1615
|
+
|
|
1616
|
+
export type Search___1 = string;
|
|
1617
|
+
|
|
1618
|
+
export type Hash___1 = string;
|
|
1619
|
+
|
|
1620
|
+
export type LocationKey___1 = string;
|
|
1621
|
+
|
|
1512
1622
|
export type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
1513
1623
|
|
|
1514
1624
|
/**
|
package/app/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<title>Sample - Cross Framework with Piral</title>
|
|
6
6
|
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
|
7
7
|
|
|
8
|
-
<script defer src="/index.
|
|
8
|
+
<script defer src="/index.9e12bd.js"></script></head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="app"></div>
|
|
11
11
|
|
package/files.tar
CHANGED
|
Binary file
|
package/files_once.tar
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sample-cross-fx",
|
|
3
3
|
"description": "Example project illustrating the mixing of different (opt-in) frameworks via plugins.",
|
|
4
|
-
"version": "1.10.2
|
|
4
|
+
"version": "1.10.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://piral.io",
|
|
7
7
|
"keywords": [
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"files": []
|
|
51
51
|
},
|
|
52
52
|
"piralCLI": {
|
|
53
|
-
"version": "1.10.2
|
|
53
|
+
"version": "1.10.2",
|
|
54
54
|
"generated": true
|
|
55
55
|
},
|
|
56
56
|
"main": "./app/index.js",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@types/react-router": "^5.1.8",
|
|
66
66
|
"@types/react-router-dom": "^5.1.6",
|
|
67
67
|
"@vue/component-compiler-utils": "^3.0.0",
|
|
68
|
-
"piral-cli": "^1.10.2
|
|
69
|
-
"piral-cli-webpack5": "^1.10.2
|
|
68
|
+
"piral-cli": "^1.10.2",
|
|
69
|
+
"piral-cli-webpack5": "^1.10.2",
|
|
70
70
|
"sass": "^1.17.0",
|
|
71
71
|
"vue-template-compiler": "^2.6.10",
|
|
72
72
|
"@angular/common": "16.2.12",
|
|
@@ -89,22 +89,22 @@
|
|
|
89
89
|
"inferno-create-element": "7.4.11",
|
|
90
90
|
"lit-element": "2.5.1",
|
|
91
91
|
"mithril": "2.3.8",
|
|
92
|
-
"piral-aurelia": "^1.10.2
|
|
93
|
-
"piral-blazor": "^1.10.2
|
|
94
|
-
"piral-core": "^1.10.2
|
|
95
|
-
"piral-elm": "^1.10.2
|
|
96
|
-
"piral-hyperapp": "^1.10.2
|
|
97
|
-
"piral-inferno": "^1.10.2
|
|
98
|
-
"piral-lazy": "^1.10.2
|
|
99
|
-
"piral-litel": "^1.10.2
|
|
100
|
-
"piral-mithril": "^1.10.2
|
|
101
|
-
"piral-ng": "^1.10.2
|
|
102
|
-
"piral-ngjs": "^1.10.2
|
|
103
|
-
"piral-preact": "^1.10.2
|
|
104
|
-
"piral-riot": "^1.10.2
|
|
105
|
-
"piral-solid": "^1.10.2
|
|
106
|
-
"piral-svelte": "^1.10.2
|
|
107
|
-
"piral-vue": "^1.10.2
|
|
92
|
+
"piral-aurelia": "^1.10.2",
|
|
93
|
+
"piral-blazor": "^1.10.2",
|
|
94
|
+
"piral-core": "^1.10.2",
|
|
95
|
+
"piral-elm": "^1.10.2",
|
|
96
|
+
"piral-hyperapp": "^1.10.2",
|
|
97
|
+
"piral-inferno": "^1.10.2",
|
|
98
|
+
"piral-lazy": "^1.10.2",
|
|
99
|
+
"piral-litel": "^1.10.2",
|
|
100
|
+
"piral-mithril": "^1.10.2",
|
|
101
|
+
"piral-ng": "^1.10.2",
|
|
102
|
+
"piral-ngjs": "^1.10.2",
|
|
103
|
+
"piral-preact": "^1.10.2",
|
|
104
|
+
"piral-riot": "^1.10.2",
|
|
105
|
+
"piral-solid": "^1.10.2",
|
|
106
|
+
"piral-svelte": "^1.10.2",
|
|
107
|
+
"piral-vue": "^1.10.2",
|
|
108
108
|
"preact": "10.27.3",
|
|
109
109
|
"react": "18.3.1",
|
|
110
110
|
"react-dom": "18.3.1",
|