@hotwired/turbo 7.1.0 → 7.2.0-beta.1
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/turbo.es2017-esm.js +712 -364
- package/dist/turbo.es2017-umd.js +717 -365
- package/dist/types/core/bardo.d.ts +7 -2
- package/dist/types/core/cache.d.ts +10 -0
- package/dist/types/core/drive/error_renderer.d.ts +1 -0
- package/dist/types/core/drive/form_submission.d.ts +12 -3
- package/dist/types/core/drive/history.d.ts +1 -1
- package/dist/types/core/drive/navigator.d.ts +1 -0
- package/dist/types/core/drive/page_renderer.d.ts +3 -0
- package/dist/types/core/drive/page_view.d.ts +8 -5
- package/dist/types/core/drive/preloader.d.ts +14 -0
- package/dist/types/core/drive/progress_bar.d.ts +1 -0
- package/dist/types/core/drive/visit.d.ts +3 -3
- package/dist/types/core/frames/frame_controller.d.ts +26 -16
- package/dist/types/core/frames/frame_redirector.d.ts +1 -1
- package/dist/types/core/frames/frame_renderer.d.ts +8 -1
- package/dist/types/core/frames/frame_view.d.ts +2 -1
- package/dist/types/core/frames/link_interceptor.d.ts +1 -1
- package/dist/types/core/index.d.ts +11 -2
- package/dist/types/core/native/adapter.d.ts +2 -1
- package/dist/types/core/native/browser_adapter.d.ts +17 -8
- package/dist/types/core/renderer.d.ts +12 -4
- package/dist/types/core/session.d.ts +68 -16
- package/dist/types/core/snapshot.d.ts +2 -1
- package/dist/types/core/view.d.ts +12 -6
- package/dist/types/elements/frame_element.d.ts +5 -1
- package/dist/types/elements/stream_element.d.ts +1 -0
- package/dist/types/elements/stream_source_element.d.ts +7 -0
- package/dist/types/http/fetch_request.d.ts +8 -0
- package/dist/types/observers/cache_observer.d.ts +1 -1
- package/dist/types/observers/form_link_interceptor.d.ts +14 -0
- package/dist/types/observers/link_click_observer.d.ts +2 -2
- package/dist/types/polyfills/submit-event.d.ts +1 -7
- package/dist/types/tests/functional/async_script_tests.d.ts +1 -6
- package/dist/types/tests/functional/autofocus_tests.d.ts +1 -9
- package/dist/types/tests/functional/cache_observer_tests.d.ts +1 -5
- package/dist/types/tests/functional/drive_disabled_tests.d.ts +1 -9
- package/dist/types/tests/functional/drive_tests.d.ts +1 -8
- package/dist/types/tests/functional/form_submission_tests.d.ts +1 -84
- package/dist/types/tests/functional/frame_navigation_tests.d.ts +1 -7
- package/dist/types/tests/functional/frame_tests.d.ts +1 -52
- package/dist/types/tests/functional/import_tests.d.ts +1 -4
- package/dist/types/tests/functional/loading_tests.d.ts +1 -13
- package/dist/types/tests/functional/navigation_tests.d.ts +1 -38
- package/dist/types/tests/functional/pausable_rendering_tests.d.ts +1 -6
- package/dist/types/tests/functional/pausable_requests_tests.d.ts +1 -6
- package/dist/types/tests/functional/preloader_tests.d.ts +1 -0
- package/dist/types/tests/functional/rendering_tests.d.ts +1 -35
- package/dist/types/tests/functional/scroll_restoration_tests.d.ts +1 -6
- package/dist/types/tests/functional/stream_tests.d.ts +1 -6
- package/dist/types/tests/functional/visit_tests.d.ts +1 -15
- package/dist/types/tests/helpers/page.d.ts +44 -0
- package/dist/types/tests/unit/deprecated_adapter_support_test.d.ts +10 -10
- package/dist/types/util.d.ts +6 -3
- package/package.json +22 -8
- package/CHANGELOG.md +0 -3
- package/dist/types/tests/functional/index.d.ts +0 -17
- package/dist/types/tests/helpers/functional_test_case.d.ts +0 -44
- package/dist/types/tests/helpers/remote_channel.d.ts +0 -10
- package/dist/types/tests/helpers/turbo_drive_test_case.d.ts +0 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotwired/turbo",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0-beta.1",
|
|
4
4
|
"description": "The speed of a single-page web application without having to write any JavaScript",
|
|
5
5
|
"module": "dist/turbo.es2017-esm.js",
|
|
6
6
|
"main": "dist/turbo.es2017-umd.js",
|
|
@@ -35,15 +35,23 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@rollup/plugin-
|
|
38
|
+
"@playwright/test": "^1.22.2",
|
|
39
|
+
"@rollup/plugin-node-resolve": "13.1.3",
|
|
40
|
+
"@rollup/plugin-typescript": "8.3.1",
|
|
40
41
|
"@types/multer": "^1.4.5",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
|
43
|
+
"@typescript-eslint/parser": "^5.20.0",
|
|
44
|
+
"arg": "^5.0.1",
|
|
45
|
+
"chai": "~4.3.4",
|
|
46
|
+
"eslint": "^8.13.0",
|
|
47
|
+
"eslint-config-prettier": "^8.5.0",
|
|
48
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
41
49
|
"intern": "^4.9.0",
|
|
42
|
-
"arg": "^4.1.0",
|
|
43
50
|
"multer": "^1.4.2",
|
|
51
|
+
"prettier": "2.6.2",
|
|
44
52
|
"rollup": "^2.35.1",
|
|
45
53
|
"tslib": "^2.0.3",
|
|
46
|
-
"typescript": "^4.
|
|
54
|
+
"typescript": "^4.6.3"
|
|
47
55
|
},
|
|
48
56
|
"scripts": {
|
|
49
57
|
"clean": "rm -fr dist",
|
|
@@ -52,9 +60,15 @@
|
|
|
52
60
|
"build:win": "tsc --noEmit false --declaration true --emitDeclarationOnly true --outDir dist/types & rollup -c",
|
|
53
61
|
"watch": "rollup -wc",
|
|
54
62
|
"start": "node src/tests/runner.js serveOnly",
|
|
55
|
-
"test": "
|
|
56
|
-
"test:
|
|
63
|
+
"test": "yarn test:unit && yarn test:browser",
|
|
64
|
+
"test:browser": "playwright test",
|
|
65
|
+
"test:unit": "NODE_OPTIONS=--inspect node src/tests/runner.js",
|
|
66
|
+
"test:unit:win": "SET NODE_OPTIONS=--inspect & node src/tests/runner.js",
|
|
57
67
|
"prerelease": "yarn build && git --no-pager diff && echo && npm pack --dry-run && echo && read -n 1 -p \"Look OK? Press any key to publish and commit v$npm_package_version\" && echo",
|
|
58
|
-
"release": "npm publish && git commit -am \"$npm_package_name v$npm_package_version\" && git push"
|
|
68
|
+
"release": "npm publish && git commit -am \"$npm_package_name v$npm_package_version\" && git push",
|
|
69
|
+
"lint": "eslint . --ext .ts"
|
|
70
|
+
},
|
|
71
|
+
"engines": {
|
|
72
|
+
"node": ">= 14"
|
|
59
73
|
}
|
|
60
74
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from "./async_script_tests";
|
|
2
|
-
export * from "./autofocus_tests";
|
|
3
|
-
export * from "./cache_observer_tests";
|
|
4
|
-
export * from "./drive_disabled_tests";
|
|
5
|
-
export * from "./drive_tests";
|
|
6
|
-
export * from "./form_submission_tests";
|
|
7
|
-
export * from "./frame_tests";
|
|
8
|
-
export * from "./import_tests";
|
|
9
|
-
export * from "./frame_navigation_tests";
|
|
10
|
-
export * from "./loading_tests";
|
|
11
|
-
export * from "./navigation_tests";
|
|
12
|
-
export * from "./pausable_rendering_tests";
|
|
13
|
-
export * from "./pausable_requests_tests";
|
|
14
|
-
export * from "./rendering_tests";
|
|
15
|
-
export * from "./scroll_restoration_tests";
|
|
16
|
-
export * from "./stream_tests";
|
|
17
|
-
export * from "./visit_tests";
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { InternTestCase } from "./intern_test_case";
|
|
2
|
-
import { Element } from "@theintern/leadfoot";
|
|
3
|
-
export declare class FunctionalTestCase extends InternTestCase {
|
|
4
|
-
get remote(): import("intern/lib/executors/Node").Remote;
|
|
5
|
-
goToLocation(location: string): Promise<void>;
|
|
6
|
-
goBack(): Promise<void>;
|
|
7
|
-
goForward(): Promise<void>;
|
|
8
|
-
reload(): Promise<void>;
|
|
9
|
-
hasSelector(selector: string): Promise<boolean>;
|
|
10
|
-
selectorHasFocus(selector: string): Promise<boolean>;
|
|
11
|
-
querySelector(selector: string): Promise<Element>;
|
|
12
|
-
waitUntilSelector(selector: string): Promise<void>;
|
|
13
|
-
waitUntilNoSelector(selector: string): Promise<void>;
|
|
14
|
-
querySelectorAll(selector: string): Promise<Element[]>;
|
|
15
|
-
clickSelector(selector: string): Promise<void>;
|
|
16
|
-
scrollToSelector(selector: string): Promise<void>;
|
|
17
|
-
pressTab(): Promise<void>;
|
|
18
|
-
outerHTMLForSelector(selector: string): Promise<string>;
|
|
19
|
-
innerHTMLForSelector(selector: string): Promise<string>;
|
|
20
|
-
attributeForSelector(selector: string, attributeName: string): Promise<string | null>;
|
|
21
|
-
propertyForSelector(selector: string, attributeName: string): Promise<any>;
|
|
22
|
-
get scrollPosition(): Promise<{
|
|
23
|
-
x: number;
|
|
24
|
-
y: number;
|
|
25
|
-
}>;
|
|
26
|
-
isScrolledToTop(): Promise<boolean>;
|
|
27
|
-
isScrolledToSelector(selector: string): Promise<boolean>;
|
|
28
|
-
get nextBeat(): Promise<void>;
|
|
29
|
-
sleep(ms: number): Promise<void>;
|
|
30
|
-
evaluate<T>(callback: (...args: any[]) => T, ...args: any[]): Promise<T>;
|
|
31
|
-
get head(): Promise<Element>;
|
|
32
|
-
get body(): Promise<Element>;
|
|
33
|
-
get location(): Promise<string>;
|
|
34
|
-
get origin(): Promise<string>;
|
|
35
|
-
get pathname(): Promise<string>;
|
|
36
|
-
get search(): Promise<string>;
|
|
37
|
-
get searchParams(): Promise<URLSearchParams>;
|
|
38
|
-
getSearchParam(key: string): Promise<string>;
|
|
39
|
-
getAllSearchParams(key: string): Promise<string[]>;
|
|
40
|
-
get hash(): Promise<string>;
|
|
41
|
-
acceptAlert(): Promise<void>;
|
|
42
|
-
dismissAlert(): Promise<void>;
|
|
43
|
-
getAlertText(): Promise<string>;
|
|
44
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Remote } from "intern/lib/executors/Node";
|
|
2
|
-
export declare class RemoteChannel<T> {
|
|
3
|
-
readonly remote: Remote;
|
|
4
|
-
readonly identifier: string;
|
|
5
|
-
private index;
|
|
6
|
-
constructor(remote: Remote, identifier: string);
|
|
7
|
-
read(length?: number): Promise<T[]>;
|
|
8
|
-
drain(): Promise<void>;
|
|
9
|
-
private get newRecords();
|
|
10
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FunctionalTestCase } from "./functional_test_case";
|
|
2
|
-
import { RemoteChannel } from "./remote_channel";
|
|
3
|
-
import { Element } from "@theintern/leadfoot";
|
|
4
|
-
declare type EventLog = [string, any, string | null];
|
|
5
|
-
declare type MutationLog = [string, string | null, string | null];
|
|
6
|
-
export declare class TurboDriveTestCase extends FunctionalTestCase {
|
|
7
|
-
eventLogChannel: RemoteChannel<EventLog>;
|
|
8
|
-
mutationLogChannel: RemoteChannel<MutationLog>;
|
|
9
|
-
lastBody?: Element;
|
|
10
|
-
beforeTest(): Promise<void>;
|
|
11
|
-
get nextWindowHandle(): Promise<string>;
|
|
12
|
-
nextEventNamed(eventName: string): Promise<any>;
|
|
13
|
-
noNextEventNamed(eventName: string): Promise<boolean>;
|
|
14
|
-
nextEventOnTarget(elementId: string, eventName: string): Promise<any>;
|
|
15
|
-
nextAttributeMutationNamed(elementId: string, attributeName: string): Promise<string | null>;
|
|
16
|
-
get nextBody(): Promise<Element>;
|
|
17
|
-
get changedBody(): Promise<Element | undefined>;
|
|
18
|
-
get visitAction(): Promise<string>;
|
|
19
|
-
drainEventLog(): Promise<void>;
|
|
20
|
-
}
|
|
21
|
-
export {};
|